diff --git a/libs/soonspacejs/index.js b/libs/soonspacejs/index.js index b8e22ca1..1e508b8b 100644 --- a/libs/soonspacejs/index.js +++ b/libs/soonspacejs/index.js @@ -1,4 +1,4 @@ -import*as e from"three";import{Vector3 as t,Euler as n,Box3 as i,Scene as s,Quaternion as r,Object3D as o,CubeTextureLoader as a,HalfFloatType as l,EquirectangularReflectionMapping as c,TextureLoader as h,Color as u,Texture as d,FileLoader as p,Vector2 as f,Matrix4 as m,BufferAttribute as g,BufferGeometry as v,Float32BufferAttribute as y,LineBasicMaterial as w,Line as x,Line3 as A,MathUtils as b,CurvePath as T,LineCurve as S,LineCurve3 as D,Bone as E,Uint16BufferAttribute as C,SkinnedMesh as M,Skeleton as P,AnimationClip as O,VectorKeyframeTrack as B,QuaternionKeyframeTrack as I,InterpolateLinear as L,InterpolateDiscrete as R,EventDispatcher as F,LoopPingPong as U,KeyframeTrack as z,BooleanKeyframeTrack as k,NumberKeyframeTrack as j,ColorKeyframeTrack as N,StringKeyframeTrack as G,NormalAnimationBlendMode as H,UnsignedByteType as V,SRGBColorSpace as _,DepthTexture as Q,DepthStencilFormat as W,UnsignedInt248Type as Y,UnsignedIntType as K,WebGLRenderTarget as X,Uniform as Z,RepeatWrapping as q,LoadingManager as J,NearestFilter as $,LinearFilter as ee,BasicDepthPacking as te,LinearMipmapLinearFilter as ne,REVISION as ie,Mesh as se,BackSide as re,DoubleSide as oe,ShaderMaterial as ae,FrontSide as le,LinearSRGBColorSpace as ce,NoColorSpace as he,NoBlending as ue,RGBADepthPacking as de,PerspectiveCamera as pe,MeshDepthMaterial as fe,Camera as me,Material as ge,Vector4 as ve,FogExp2 as ye,LineSegments as we,EdgesGeometry as xe,MeshStandardMaterial as Ae,OrthographicCamera as be,WebGLRenderer as Te,PCFSoftShadowMap as Se,Spherical as De,Sphere as Ee,DataTexture as Ce,WebGLMultipleRenderTargets as Me,RedFormat as Pe,FloatType as Oe,RGBAFormat as Be,ShaderChunk as Ie,WebGLCubeRenderTarget as Le,CubeCamera as Re,PMREMGenerator as Fe,FramebufferTexture as Ue,Matrix3 as ze,TangentSpaceNormalMap as ke,GLSL3 as je,VideoTexture as Ne,GLBufferAttribute as Ge,InterleavedBufferAttribute as He,Raycaster as Ve,BoxGeometry as _e,Sprite as Qe,MeshBasicMaterial as We,CanvasTexture as Ye,SpriteMaterial as Ke,Clock as Xe,AnimationMixer as Ze,UVMapping as qe,CubeTexture as Je,NoToneMapping as $e,ReinhardToneMapping as et,CineonToneMapping as tt,ACESFilmicToneMapping as nt,SphereGeometry as it,CircleGeometry as st,PlaneGeometry as rt,ExtrudeGeometry as ot,Shape as at,Group as lt,Box2 as ct,Triangle as ht,AmbientLight as ut,DirectionalLight as dt,HemisphereLight as pt,SpotLight as ft,PointLight as mt,RectAreaLight as gt,Loader as vt,LoaderUtils as yt,ClampToEdgeWrapping as wt,PropertyBinding as xt,ShapeUtils as At,PointsMaterial as bt,Points as Tt,ImageLoader as St,InstancedMesh as Dt,GridHelper as Et,AxesHelper as Ct,Box3Helper as Mt,DirectionalLightHelper as Pt,HemisphereLightHelper as Ot,SpotLightHelper as Bt,PointLightHelper as It,ShapeGeometry as Lt,Plane as Rt,MeshPhongMaterial as Ft}from"three";import*as Ut from"three/examples/jsm/libs/tween.module.js";import zt,{Easing as kt,Tween as jt}from"three/examples/jsm/libs/tween.module.js";import{RGBELoader as Nt}from"three/examples/jsm/loaders/RGBELoader.js";import{GLTFExporter as Gt}from"three/examples/jsm/exporters/GLTFExporter.js";import{RoomEnvironment as Ht}from"three/examples/jsm/environments/RoomEnvironment.js";import Vt from"three/examples/jsm/libs/stats.module.js";import{Sky as _t}from"three/examples/jsm/objects/Sky.js";import{mergeGeometries as Qt,deinterleaveGeometry as Wt}from"three/examples/jsm/utils/BufferGeometryUtils.js";import"three/examples/jsm/postprocessing/Pass.js";import{WorkerPool as Yt}from"three/examples/jsm/utils/WorkerPool.js";import{MeshBVH as Kt,computeBoundsTree as Xt,disposeBoundsTree as Zt,acceleratedRaycast as qt}from"three-mesh-bvh";import{RectAreaLightUniformsLib as Jt}from"three/examples/jsm/lights/RectAreaLightUniformsLib.js";import{GLTFLoader as $t}from"three/examples/jsm/loaders/GLTFLoader.js";import{STLLoader as en}from"three/examples/jsm/loaders/STLLoader.js";import{TGALoader as tn}from"three/examples/jsm/loaders/TGALoader.js";import{DRACOLoader as nn}from"three/examples/jsm/loaders/DRACOLoader.js";import{KTX2Loader as sn}from"three/examples/jsm/loaders/KTX2Loader.js";import{MeshoptDecoder as rn}from"three/examples/jsm/libs/meshopt_decoder.module.js";import*as on from"three/examples/jsm/utils/SkeletonUtils.js";import*as an from"three/examples/jsm/libs/fflate.module.js";import{NURBSCurve as ln}from"three/examples/jsm/curves/NURBSCurve.js";import{RectAreaLightHelper as cn}from"three/examples/jsm/helpers/RectAreaLightHelper.js";var hn="soonspacejs",un="2.11.51"; +import*as e from"three";import{Vector3 as t,Euler as n,Box3 as i,Scene as s,Quaternion as r,Object3D as o,CubeTextureLoader as a,HalfFloatType as l,EquirectangularReflectionMapping as c,TextureLoader as h,Color as u,Texture as d,FileLoader as p,Vector2 as f,Matrix4 as m,BufferAttribute as g,BufferGeometry as v,Float32BufferAttribute as y,LineBasicMaterial as w,Line as x,Line3 as A,MathUtils as b,CurvePath as T,LineCurve as S,LineCurve3 as D,Bone as E,Uint16BufferAttribute as C,SkinnedMesh as M,Skeleton as P,AnimationClip as O,VectorKeyframeTrack as B,QuaternionKeyframeTrack as I,InterpolateLinear as L,InterpolateDiscrete as R,EventDispatcher as F,LoopPingPong as U,KeyframeTrack as z,BooleanKeyframeTrack as k,NumberKeyframeTrack as j,ColorKeyframeTrack as N,StringKeyframeTrack as G,NormalAnimationBlendMode as H,UnsignedByteType as V,SRGBColorSpace as _,DepthTexture as Q,DepthStencilFormat as W,UnsignedInt248Type as Y,UnsignedIntType as K,WebGLRenderTarget as X,Uniform as Z,RepeatWrapping as q,LoadingManager as J,NearestFilter as $,LinearFilter as ee,BasicDepthPacking as te,LinearMipmapLinearFilter as ne,REVISION as ie,Mesh as se,BackSide as re,DoubleSide as oe,ShaderMaterial as ae,FrontSide as le,LinearSRGBColorSpace as ce,NoColorSpace as he,NoBlending as ue,RGBADepthPacking as de,PerspectiveCamera as pe,MeshDepthMaterial as fe,Camera as me,Material as ge,Vector4 as ve,FogExp2 as ye,LineSegments as we,EdgesGeometry as xe,MeshStandardMaterial as Ae,OrthographicCamera as be,WebGLRenderer as Te,PCFSoftShadowMap as Se,Spherical as De,Sphere as Ee,DataTexture as Ce,WebGLMultipleRenderTargets as Me,RedFormat as Pe,FloatType as Oe,RGBAFormat as Be,ShaderChunk as Ie,WebGLCubeRenderTarget as Le,CubeCamera as Re,PMREMGenerator as Fe,FramebufferTexture as Ue,Matrix3 as ze,TangentSpaceNormalMap as ke,GLSL3 as je,VideoTexture as Ne,GLBufferAttribute as Ge,InterleavedBufferAttribute as He,Raycaster as Ve,BoxGeometry as _e,Sprite as Qe,MeshBasicMaterial as We,CanvasTexture as Ye,SpriteMaterial as Ke,Clock as Xe,AnimationMixer as Ze,UVMapping as qe,CubeTexture as Je,NoToneMapping as $e,ReinhardToneMapping as et,CineonToneMapping as tt,ACESFilmicToneMapping as nt,SphereGeometry as it,CircleGeometry as st,PlaneGeometry as rt,ExtrudeGeometry as ot,Shape as at,Group as lt,Box2 as ct,Triangle as ht,AmbientLight as ut,DirectionalLight as dt,HemisphereLight as pt,SpotLight as ft,PointLight as mt,RectAreaLight as gt,Loader as vt,LoaderUtils as yt,ClampToEdgeWrapping as wt,PropertyBinding as xt,ShapeUtils as At,PointsMaterial as bt,Points as Tt,ImageLoader as St,InstancedMesh as Dt,GridHelper as Et,AxesHelper as Ct,Box3Helper as Mt,DirectionalLightHelper as Pt,HemisphereLightHelper as Ot,SpotLightHelper as Bt,PointLightHelper as It,ShapeGeometry as Lt,Plane as Rt,MeshPhongMaterial as Ft}from"three";import*as Ut from"three/examples/jsm/libs/tween.module.js";import zt,{Easing as kt,Tween as jt}from"three/examples/jsm/libs/tween.module.js";import{RGBELoader as Nt}from"three/examples/jsm/loaders/RGBELoader.js";import{GLTFExporter as Gt}from"three/examples/jsm/exporters/GLTFExporter.js";import{RoomEnvironment as Ht}from"three/examples/jsm/environments/RoomEnvironment.js";import Vt from"three/examples/jsm/libs/stats.module.js";import{Sky as _t}from"three/examples/jsm/objects/Sky.js";import{mergeGeometries as Qt,deinterleaveGeometry as Wt}from"three/examples/jsm/utils/BufferGeometryUtils.js";import"three/examples/jsm/postprocessing/Pass.js";import{WorkerPool as Yt}from"three/examples/jsm/utils/WorkerPool.js";import{MeshBVH as Kt,computeBoundsTree as Xt,disposeBoundsTree as Zt,acceleratedRaycast as qt}from"three-mesh-bvh";import{RectAreaLightUniformsLib as Jt}from"three/examples/jsm/lights/RectAreaLightUniformsLib.js";import{GLTFLoader as $t}from"three/examples/jsm/loaders/GLTFLoader.js";import{STLLoader as en}from"three/examples/jsm/loaders/STLLoader.js";import{TGALoader as tn}from"three/examples/jsm/loaders/TGALoader.js";import{DRACOLoader as nn}from"three/examples/jsm/loaders/DRACOLoader.js";import{KTX2Loader as sn}from"three/examples/jsm/loaders/KTX2Loader.js";import{MeshoptDecoder as rn}from"three/examples/jsm/libs/meshopt_decoder.module.js";import*as on from"three/examples/jsm/utils/SkeletonUtils.js";import*as an from"three/examples/jsm/libs/fflate.module.js";import{NURBSCurve as ln}from"three/examples/jsm/curves/NURBSCurve.js";import{RectAreaLightHelper as cn}from"three/examples/jsm/helpers/RectAreaLightHelper.js";var hn="soonspacejs",un="2.11.52"; /*! * camera-controls * https://github.com/yomotsu/camera-controls @@ -10,4 +10,4 @@ import*as e from"three";import{Vector3 as t,Euler as n,Box3 as i,Scene as s,Quat * https://github.com/pmndrs/postprocessing * Copyright 2015-2024 Raoul van Rüschen * @license Zlib - */var zr=.001,kr=new me,jr=null;var Nr=class e{constructor(e="Pass",t=new s,n=kr){this.name=e,this.renderer=null,this.scene=t,this.camera=n,this.screen=null,this.rtt=!0,this.needsSwap=!0,this.needsDepthTexture=!1,this.enabled=!0}get renderToScreen(){return!this.rtt}set renderToScreen(e){if(this.rtt===e){const t=this.fullscreenMaterial;null!==t&&(t.needsUpdate=!0),this.rtt=!e}}set mainScene(e){}set mainCamera(e){}setRenderer(e){this.renderer=e}isEnabled(){return this.enabled}setEnabled(e){this.enabled=e}get fullscreenMaterial(){return null!==this.screen?this.screen.material:null}set fullscreenMaterial(e){let t=this.screen;null!==t?t.material=e:(t=new se(function(){if(null===jr){const e=new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),t=new Float32Array([0,0,2,0,0,2]);void 0!==(jr=new v).setAttribute?(jr.setAttribute("position",new g(e,3)),jr.setAttribute("uv",new g(t,2))):(jr.addAttribute("position",new g(e,3)),jr.addAttribute("uv",new g(t,2)))}return jr}(),e),t.frustumCulled=!1,null===this.scene&&(this.scene=new s),this.scene.add(t),this.screen=t)}getFullscreenMaterial(){return this.fullscreenMaterial}setFullscreenMaterial(e){this.fullscreenMaterial=e}getDepthTexture(){return null}setDepthTexture(e,t=te){}render(e,t,n,i,s){throw new Error("Render method not implemented!")}setSize(e,t){}initialize(e,t,n){}dispose(){for(const t of Object.keys(this)){const n=this[t];(n instanceof X||n instanceof ge||n instanceof d||n instanceof e)&&this[t].dispose()}}},Gr=class extends Nr{constructor(){super("ClearMaskPass",null,null),this.needsSwap=!1}render(e,t,n,i,s){const r=e.state.buffers.stencil;r.setLocked(!1),r.setTest(!1)}},Hr="varying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}",Vr=class extends ae{constructor(){super({name:"CopyMaterial",uniforms:{inputBuffer:new Z(null),opacity:new Z(1)},blending:ue,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#include \n#include \n#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\nuniform float opacity;varying vec2 vUv;void main(){vec4 texel=texture2D(inputBuffer,vUv);gl_FragColor=opacity*texel;\n#include \n#include \n}",vertexShader:Hr})}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}getOpacity(e){return this.uniforms.opacity.value}setOpacity(e){this.uniforms.opacity.value=e}},_r=class extends Nr{constructor(e,t=!0){super("CopyPass"),this.fullscreenMaterial=new Vr,this.needsSwap=!1,this.renderTarget=e,void 0===e&&(this.renderTarget=new X(1,1,{minFilter:ee,magFilter:ee,stencilBuffer:!1,depthBuffer:!1}),this.renderTarget.texture.name="CopyPass.Target"),this.autoResize=t}get resize(){return this.autoResize}set resize(e){this.autoResize=e}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}setAutoResizeEnabled(e){this.autoResize=e}render(e,t,n,i,s){this.fullscreenMaterial.inputBuffer=t.texture,e.setRenderTarget(this.renderToScreen?null:this.renderTarget),e.render(this.scene,this.camera)}setSize(e,t){this.autoResize&&this.renderTarget.setSize(e,t)}initialize(e,t,n){void 0!==n&&(this.renderTarget.texture.type=n,n!==V?this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1":null!==e&&e.outputColorSpace===_&&(this.renderTarget.texture.colorSpace=_))}},Qr=new u,Wr=class extends Nr{constructor(e=!0,t=!0,n=!1){super("ClearPass",null,null),this.needsSwap=!1,this.color=e,this.depth=t,this.stencil=n,this.overrideClearColor=null,this.overrideClearAlpha=-1}setClearFlags(e,t,n){this.color=e,this.depth=t,this.stencil=n}getOverrideClearColor(){return this.overrideClearColor}setOverrideClearColor(e){this.overrideClearColor=e}getOverrideClearAlpha(){return this.overrideClearAlpha}setOverrideClearAlpha(e){this.overrideClearAlpha=e}render(e,t,n,i,s){const r=this.overrideClearColor,o=this.overrideClearAlpha,a=e.getClearAlpha(),l=null!==r,c=o>=0;l?(e.getClearColor(Qr),e.setClearColor(r,c?o:a)):c&&e.setClearAlpha(o),e.setRenderTarget(this.renderToScreen?null:t),e.clear(this.color,this.depth,this.stencil),l?e.setClearColor(Qr,a):c&&e.setClearAlpha(a)}},Yr=class extends Nr{constructor(e,t){super("MaskPass",e,t),this.needsSwap=!1,this.clearPass=new Wr(!1,!1,!0),this.inverse=!1}set mainScene(e){this.scene=e}set mainCamera(e){this.camera=e}get inverted(){return this.inverse}set inverted(e){this.inverse=e}get clear(){return this.clearPass.enabled}set clear(e){this.clearPass.enabled=e}getClearPass(){return this.clearPass}isInverted(){return this.inverted}setInverted(e){this.inverted=e}render(e,t,n,i,s){const r=e.getContext(),o=e.state.buffers,a=this.scene,l=this.camera,c=this.clearPass,h=this.inverted?0:1,u=1-h;o.color.setMask(!1),o.depth.setMask(!1),o.color.setLocked(!0),o.depth.setLocked(!0),o.stencil.setTest(!0),o.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),o.stencil.setFunc(r.ALWAYS,h,4294967295),o.stencil.setClear(u),o.stencil.setLocked(!0),this.clearPass.enabled&&(this.renderToScreen?c.render(e,null):(c.render(e,t),c.render(e,n))),this.renderToScreen?(e.setRenderTarget(null),e.render(a,l)):(e.setRenderTarget(t),e.render(a,l),e.setRenderTarget(n),e.render(a,l)),o.color.setLocked(!1),o.depth.setLocked(!1),o.stencil.setLocked(!1),o.stencil.setFunc(r.EQUAL,1,4294967295),o.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),o.stencil.setLocked(!0)}},Kr=0,Xr=1,Zr=2,qr={FRAGMENT_HEAD:"FRAGMENT_HEAD",FRAGMENT_MAIN_UV:"FRAGMENT_MAIN_UV",FRAGMENT_MAIN_IMAGE:"FRAGMENT_MAIN_IMAGE",VERTEX_HEAD:"VERTEX_HEAD",VERTEX_MAIN_SUPPORT:"VERTEX_MAIN_SUPPORT"},Jr=!1,$r=class{constructor(e=null){this.originalMaterials=new Map,this.material=null,this.materials=null,this.materialsBackSide=null,this.materialsDoubleSide=null,this.materialsFlatShaded=null,this.materialsFlatShadedBackSide=null,this.materialsFlatShadedDoubleSide=null,this.setMaterial(e),this.meshCount=0,this.replaceMaterial=e=>{if(e.isMesh){let t;if(e.material.flatShading)switch(e.material.side){case oe:t=this.materialsFlatShadedDoubleSide;break;case re:t=this.materialsFlatShadedBackSide;break;default:t=this.materialsFlatShaded}else switch(e.material.side){case oe:t=this.materialsDoubleSide;break;case re:t=this.materialsBackSide;break;default:t=this.materials}this.originalMaterials.set(e,e.material),e.isSkinnedMesh?e.material=t[2]:e.isInstancedMesh?e.material=t[1]:e.material=t[0],++this.meshCount}}}cloneMaterial(e){if(!(e instanceof ae))return e.clone();const t=e.uniforms,n=new Map;for(const e in t){const i=t[e].value;i.isRenderTargetTexture&&(t[e].value=null,n.set(e,i))}const i=e.clone();for(const e of n)t[e[0]].value=e[1],i.uniforms[e[0]].value=e[1];return i}setMaterial(e){if(this.disposeMaterials(),this.material=e,null!==e){const t=this.materials=[this.cloneMaterial(e),this.cloneMaterial(e),this.cloneMaterial(e)];for(const n of t)n.uniforms=Object.assign({},e.uniforms),n.side=le;t[2].skinning=!0,this.materialsBackSide=t.map((t=>{const n=this.cloneMaterial(t);return n.uniforms=Object.assign({},e.uniforms),n.side=re,n})),this.materialsDoubleSide=t.map((t=>{const n=this.cloneMaterial(t);return n.uniforms=Object.assign({},e.uniforms),n.side=oe,n})),this.materialsFlatShaded=t.map((t=>{const n=this.cloneMaterial(t);return n.uniforms=Object.assign({},e.uniforms),n.flatShading=!0,n})),this.materialsFlatShadedBackSide=t.map((t=>{const n=this.cloneMaterial(t);return n.uniforms=Object.assign({},e.uniforms),n.flatShading=!0,n.side=re,n})),this.materialsFlatShadedDoubleSide=t.map((t=>{const n=this.cloneMaterial(t);return n.uniforms=Object.assign({},e.uniforms),n.flatShading=!0,n.side=oe,n}))}}render(e,t,n){const i=e.shadowMap.enabled;if(e.shadowMap.enabled=!1,Jr){const i=this.originalMaterials;this.meshCount=0,t.traverse(this.replaceMaterial),e.render(t,n);for(const e of i)e[0].material=e[1];this.meshCount!==i.size&&i.clear()}else{const i=t.overrideMaterial;t.overrideMaterial=this.material,e.render(t,n),t.overrideMaterial=i}e.shadowMap.enabled=i}disposeMaterials(){if(null!==this.material){const e=this.materials.concat(this.materialsBackSide).concat(this.materialsDoubleSide).concat(this.materialsFlatShaded).concat(this.materialsFlatShadedBackSide).concat(this.materialsFlatShadedDoubleSide);for(const t of e)t.dispose()}}dispose(){this.originalMaterials.clear(),this.disposeMaterials()}static get workaroundEnabled(){return Jr}static set workaroundEnabled(e){Jr=e}},eo=-1,to=class extends F{constructor(e,t=-1,n=-1,i=1){super(),this.resizable=e,this.baseSize=new f(1,1),this.preferredSize=new f(t,n),this.target=this.preferredSize,this.s=i,this.effectiveSize=new f,this.addEventListener("change",(()=>this.updateEffectiveSize())),this.updateEffectiveSize()}updateEffectiveSize(){const e=this.baseSize,t=this.preferredSize,n=this.effectiveSize,i=this.scale;t.width!==eo?n.width=t.width:t.height!==eo?n.width=Math.round(t.height*(e.width/Math.max(e.height,1))):n.width=Math.round(e.width*i),t.height!==eo?n.height=t.height:t.width!==eo?n.height=Math.round(t.width/Math.max(e.width/Math.max(e.height,1),1)):n.height=Math.round(e.height*i)}get width(){return this.effectiveSize.width}set width(e){this.preferredWidth=e}get height(){return this.effectiveSize.height}set height(e){this.preferredHeight=e}getWidth(){return this.width}getHeight(){return this.height}get scale(){return this.s}set scale(e){this.s!==e&&(this.s=e,this.preferredSize.setScalar(eo),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getScale(){return this.scale}setScale(e){this.scale=e}get baseWidth(){return this.baseSize.width}set baseWidth(e){this.baseSize.width!==e&&(this.baseSize.width=e,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getBaseWidth(){return this.baseWidth}setBaseWidth(e){this.baseWidth=e}get baseHeight(){return this.baseSize.height}set baseHeight(e){this.baseSize.height!==e&&(this.baseSize.height=e,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getBaseHeight(){return this.baseHeight}setBaseHeight(e){this.baseHeight=e}setBaseSize(e,t){this.baseSize.width===e&&this.baseSize.height===t||(this.baseSize.set(e,t),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}get preferredWidth(){return this.preferredSize.width}set preferredWidth(e){this.preferredSize.width!==e&&(this.preferredSize.width=e,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getPreferredWidth(){return this.preferredWidth}setPreferredWidth(e){this.preferredWidth=e}get preferredHeight(){return this.preferredSize.height}set preferredHeight(e){this.preferredSize.height!==e&&(this.preferredSize.height=e,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getPreferredHeight(){return this.preferredHeight}setPreferredHeight(e){this.preferredHeight=e}setPreferredSize(e,t){this.preferredSize.width===e&&this.preferredSize.height===t||(this.preferredSize.set(e,t),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}copy(e){this.s=e.scale,this.baseSize.set(e.baseWidth,e.baseHeight),this.preferredSize.set(e.preferredWidth,e.preferredHeight),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height)}static get AUTO_SIZE(){return eo}},no=class extends Set{constructor(e,t=10){super(),this.l=t,this.exclusive=!1,void 0!==e&&this.set(e)}get layer(){return this.l}set layer(e){const t=this.l;for(const n of this)n.layers.disable(t),n.layers.enable(e);this.l=e}getLayer(){return this.layer}setLayer(e){this.layer=e}isExclusive(){return this.exclusive}setExclusive(e){this.exclusive=e}clear(){const e=this.layer;for(const t of this)t.layers.disable(e);return super.clear()}set(e){this.clear();for(const t of e)this.add(t);return this}indexOf(e){return this.has(e)?0:-1}add(e){return this.exclusive?e.layers.set(this.layer):e.layers.enable(this.layer),super.add(e)}delete(e){return this.has(e)&&e.layers.disable(this.layer),super.delete(e)}toggle(e){let t;return this.has(e)?(this.delete(e),t=!1):(this.add(e),t=!0),t}setVisible(e){for(const t of this)e?t.layers.enable(0):t.layers.disable(0);return this}},io=0,so=1,ro=9,oo=23,ao=28,lo=30,co=new Map([[io,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x+y,opacity);}"],[so,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y,min(y.a,opacity));}"],[2,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,(x+y)*0.5,opacity);}"],[3,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(yHSL.rg,xHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}"],[4,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(step(0.0,y)*(1.0-min(vec4(1.0),(1.0-x)/y)),vec4(1.0),step(1.0,x));return mix(x,z,opacity);}"],[5,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=step(0.0,x)*mix(min(vec4(1.0),x/max(1.0-y,1e-9)),vec4(1.0),step(1.0,y));return mix(x,z,opacity);}"],[6,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,min(x,y),opacity);}"],[7,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,abs(x-y),opacity);}"],[8,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x/max(y,1e-12),opacity);}"],[ro,null],[10,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,(x+y-2.0*x*y),opacity);}"],[11,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 a=min(x,1.0),b=min(y,1.0);vec4 z=mix(2.0*a*b,1.0-2.0*(1.0-a)*(1.0-b),step(0.5,y));return mix(x,z,opacity);}"],[12,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,step(1.0,x+y),opacity);}"],[13,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(yHSL.r,xHSL.gb));return vec4(mix(x.rgb,z,opacity),y.a);}"],[14,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,1.0-y,opacity);}"],[15,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y*(1.0-x),opacity);}"],[16,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,max(x,y),opacity);}"],[17,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,clamp(y+x-1.0,0.0,1.0),opacity);}"],[18,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,min(x+y,1.0),opacity);}"],[19,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,clamp(2.0*y+x-1.0,0.0,1.0),opacity);}"],[20,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(xHSL.rg,yHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}"],[21,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x*y,opacity);}"],[22,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,1.0-abs(1.0-x-y),opacity);}"],[oo,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y,opacity);}"],[24,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(2.0*y*x,1.0-2.0*(1.0-y)*(1.0-x),step(0.5,x));return mix(x,z,opacity);}"],[25,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 y2=2.0*y;vec4 z=mix(mix(y2,x,step(0.5*x,y)),max(vec4(0.0),y2-1.0),step(x,(y2-1.0)));return mix(x,z,opacity);}"],[26,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(min(x*x/max(1.0-y,1e-12),1.0),y,step(1.0,y));return mix(x,z,opacity);}"],[27,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(xHSL.r,yHSL.g,xHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}"],[ao,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x+y-min(x*y,1.0),opacity);}"],[29,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 y2=2.0*y;vec4 w=step(0.5,y);vec4 z=mix(x-(1.0-y2)*x*(1.0-x),mix(x+(y2-1.0)*(sqrt(x)-x),x+(y2-1.0)*x*((16.0*x-12.0)*x+3.0),w*(1.0-step(0.25,x))),w);return mix(x,z,opacity);}"],[lo,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return y;}"],[31,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,max(x+y-1.0,0.0),opacity);}"],[32,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(max(1.0-min((1.0-x)/(2.0*y),1.0),0.0),min(x/(2.0*(1.0-y)),1.0),step(0.5,y));return mix(x,z,opacity);}"]]),ho=class extends F{constructor(e,t=1){super(),this._blendFunction=e,this.opacity=new Z(t)}getOpacity(){return this.opacity.value}setOpacity(e){this.opacity.value=e}get blendFunction(){return this._blendFunction}set blendFunction(e){this._blendFunction=e,this.dispatchEvent({type:"change"})}getBlendFunction(){return this.blendFunction}setBlendFunction(e){this.blendFunction=e}getShaderCode(){return co.get(this.blendFunction)}},uo=0,po=2,fo=3,mo=[new Float32Array([0,0]),new Float32Array([0,1,1]),new Float32Array([0,1,1,2]),new Float32Array([0,1,2,2,3]),new Float32Array([0,1,2,3,4,4,5]),new Float32Array([0,1,2,3,4,5,7,8,9,10])],go=class extends ae{constructor(e=new ve){super({name:"KawaseBlurMaterial",uniforms:{inputBuffer:new Z(null),texelSize:new Z(new ve),scale:new Z(1),kernel:new Z(0)},blending:ue,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\nvarying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec4 sum=texture2D(inputBuffer,vUv0);sum+=texture2D(inputBuffer,vUv1);sum+=texture2D(inputBuffer,vUv2);sum+=texture2D(inputBuffer,vUv3);gl_FragColor=sum*0.25;\n#include \n}",vertexShader:"uniform vec4 texelSize;uniform float kernel;uniform float scale;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vec2 dUv=(texelSize.xy*vec2(kernel)+texelSize.zw)*scale;vUv0=vec2(uv.x-dUv.x,uv.y+dUv.y);vUv1=vec2(uv.x+dUv.x,uv.y+dUv.y);vUv2=vec2(uv.x+dUv.x,uv.y-dUv.y);vUv3=vec2(uv.x-dUv.x,uv.y-dUv.y);gl_Position=vec4(position.xy,1.0,1.0);}"}),this.setTexelSize(e.x,e.y),this.kernelSize=po}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.inputBuffer=e}get kernelSequence(){return mo[this.kernelSize]}get scale(){return this.uniforms.scale.value}set scale(e){this.uniforms.scale.value=e}getScale(){return this.uniforms.scale.value}setScale(e){this.uniforms.scale.value=e}getKernel(){return null}get kernel(){return this.uniforms.kernel.value}set kernel(e){this.uniforms.kernel.value=e}setKernel(e){this.kernel=e}setTexelSize(e,t){this.uniforms.texelSize.value.set(e,t,.5*e,.5*t)}setSize(e,t){const n=1/e,i=1/t;this.uniforms.texelSize.value.set(n,i,.5*n,.5*i)}},vo=class extends Nr{constructor({kernelSize:e=po,resolutionScale:t=.5,width:n=to.AUTO_SIZE,height:i=to.AUTO_SIZE,resolutionX:s=n,resolutionY:r=i}={}){super("KawaseBlurPass"),this.renderTargetA=new X(1,1,{depthBuffer:!1}),this.renderTargetA.texture.name="Blur.Target.A",this.renderTargetB=this.renderTargetA.clone(),this.renderTargetB.texture.name="Blur.Target.B";const o=this.resolution=new to(this,s,r,t);o.addEventListener("change",(e=>this.setSize(o.baseWidth,o.baseHeight))),this._blurMaterial=new go,this._blurMaterial.kernelSize=e,this.copyMaterial=new Vr}getResolution(){return this.resolution}get blurMaterial(){return this._blurMaterial}set blurMaterial(e){this._blurMaterial=e}get dithering(){return this.copyMaterial.dithering}set dithering(e){this.copyMaterial.dithering=e}get kernelSize(){return this.blurMaterial.kernelSize}set kernelSize(e){this.blurMaterial.kernelSize=e}get width(){return this.resolution.width}set width(e){this.resolution.preferredWidth=e}get height(){return this.resolution.height}set height(e){this.resolution.preferredHeight=e}get scale(){return this.blurMaterial.scale}set scale(e){this.blurMaterial.scale=e}getScale(){return this.blurMaterial.scale}setScale(e){this.blurMaterial.scale=e}getKernelSize(){return this.kernelSize}setKernelSize(e){this.kernelSize=e}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}render(e,t,n,i,s){const r=this.scene,o=this.camera,a=this.renderTargetA,l=this.renderTargetB,c=this.blurMaterial,h=c.kernelSequence;let u=t;this.fullscreenMaterial=c;for(let t=0,n=h.length;t\n#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\n#ifdef RANGE\nuniform vec2 range;\n#elif defined(THRESHOLD)\nuniform float threshold;uniform float smoothing;\n#endif\nvarying vec2 vUv;void main(){vec4 texel=texture2D(inputBuffer,vUv);float l=luminance(texel.rgb);\n#ifdef RANGE\nfloat low=step(range.x,l);float high=step(l,range.y);l*=low*high;\n#elif defined(THRESHOLD)\nl=smoothstep(threshold,threshold+smoothing,l)*l;\n#endif\n#ifdef COLOR\ngl_FragColor=vec4(texel.rgb*clamp(l,0.0,1.0),l);\n#else\ngl_FragColor=vec4(l);\n#endif\n}",vertexShader:Hr}),this.colorOutput=e,this.luminanceRange=t}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}get threshold(){return this.uniforms.threshold.value}set threshold(e){this.smoothing>0||e>0?this.defines.THRESHOLD="1":delete this.defines.THRESHOLD,this.uniforms.threshold.value=e}getThreshold(){return this.threshold}setThreshold(e){this.threshold=e}get smoothing(){return this.uniforms.smoothing.value}set smoothing(e){this.threshold>0||e>0?this.defines.THRESHOLD="1":delete this.defines.THRESHOLD,this.uniforms.smoothing.value=e}getSmoothingFactor(){return this.smoothing}setSmoothingFactor(e){this.smoothing=e}get useThreshold(){return this.threshold>0||this.smoothing>0}set useThreshold(e){}get colorOutput(){return void 0!==this.defines.COLOR}set colorOutput(e){e?this.defines.COLOR="1":delete this.defines.COLOR,this.needsUpdate=!0}isColorOutputEnabled(e){return this.colorOutput}setColorOutputEnabled(e){this.colorOutput=e}get useRange(){return null!==this.luminanceRange}set useRange(e){this.luminanceRange=null}get luminanceRange(){return this.uniforms.range.value}set luminanceRange(e){null!==e?this.defines.RANGE="1":delete this.defines.RANGE,this.uniforms.range.value=e,this.needsUpdate=!0}getLuminanceRange(){return this.luminanceRange}setLuminanceRange(e){this.luminanceRange=e}},wo=class extends Nr{constructor({renderTarget:e,luminanceRange:t,colorOutput:n,resolutionScale:i=1,width:s=to.AUTO_SIZE,height:r=to.AUTO_SIZE,resolutionX:o=s,resolutionY:a=r}={}){super("LuminancePass"),this.fullscreenMaterial=new yo(n,t),this.needsSwap=!1,this.renderTarget=e,void 0===this.renderTarget&&(this.renderTarget=new X(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="LuminancePass.Target");const l=this.resolution=new to(this,o,a,i);l.addEventListener("change",(e=>this.setSize(l.baseWidth,l.baseHeight)))}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}render(e,t,n,i,s){this.fullscreenMaterial.inputBuffer=t.texture,e.setRenderTarget(this.renderToScreen?null:this.renderTarget),e.render(this.scene,this.camera)}setSize(e,t){const n=this.resolution;n.setBaseSize(e,t),this.renderTarget.setSize(n.width,n.height)}initialize(e,t,n){void 0!==n&&n!==V&&(this.renderTarget.texture.type=n,this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}},xo=class extends ae{constructor(){super({name:"DownsamplingMaterial",uniforms:{inputBuffer:new Z(null),texelSize:new Z(new f)},blending:ue,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\n#define WEIGHT_INNER 0.125\n#define WEIGHT_OUTER 0.0555555\nvarying vec2 vUv;varying vec2 vUv00;varying vec2 vUv01;varying vec2 vUv02;varying vec2 vUv03;varying vec2 vUv04;varying vec2 vUv05;varying vec2 vUv06;varying vec2 vUv07;varying vec2 vUv08;varying vec2 vUv09;varying vec2 vUv10;varying vec2 vUv11;float clampToBorder(const in vec2 uv){return float(uv.s>=0.0&&uv.s<=1.0&&uv.t>=0.0&&uv.t<=1.0);}void main(){vec4 c=vec4(0.0);vec4 w=WEIGHT_INNER*vec4(clampToBorder(vUv00),clampToBorder(vUv01),clampToBorder(vUv02),clampToBorder(vUv03));c+=w.x*texture2D(inputBuffer,vUv00);c+=w.y*texture2D(inputBuffer,vUv01);c+=w.z*texture2D(inputBuffer,vUv02);c+=w.w*texture2D(inputBuffer,vUv03);w=WEIGHT_OUTER*vec4(clampToBorder(vUv04),clampToBorder(vUv05),clampToBorder(vUv06),clampToBorder(vUv07));c+=w.x*texture2D(inputBuffer,vUv04);c+=w.y*texture2D(inputBuffer,vUv05);c+=w.z*texture2D(inputBuffer,vUv06);c+=w.w*texture2D(inputBuffer,vUv07);w=WEIGHT_OUTER*vec4(clampToBorder(vUv08),clampToBorder(vUv09),clampToBorder(vUv10),clampToBorder(vUv11));c+=w.x*texture2D(inputBuffer,vUv08);c+=w.y*texture2D(inputBuffer,vUv09);c+=w.z*texture2D(inputBuffer,vUv10);c+=w.w*texture2D(inputBuffer,vUv11);c+=WEIGHT_OUTER*texture2D(inputBuffer,vUv);gl_FragColor=c;\n#include \n}",vertexShader:"uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv00;varying vec2 vUv01;varying vec2 vUv02;varying vec2 vUv03;varying vec2 vUv04;varying vec2 vUv05;varying vec2 vUv06;varying vec2 vUv07;varying vec2 vUv08;varying vec2 vUv09;varying vec2 vUv10;varying vec2 vUv11;void main(){vUv=position.xy*0.5+0.5;vUv00=vUv+texelSize*vec2(-1.0,1.0);vUv01=vUv+texelSize*vec2(1.0,1.0);vUv02=vUv+texelSize*vec2(-1.0,-1.0);vUv03=vUv+texelSize*vec2(1.0,-1.0);vUv04=vUv+texelSize*vec2(-2.0,2.0);vUv05=vUv+texelSize*vec2(0.0,2.0);vUv06=vUv+texelSize*vec2(2.0,2.0);vUv07=vUv+texelSize*vec2(-2.0,0.0);vUv08=vUv+texelSize*vec2(2.0,0.0);vUv09=vUv+texelSize*vec2(-2.0,-2.0);vUv10=vUv+texelSize*vec2(0.0,-2.0);vUv11=vUv+texelSize*vec2(2.0,-2.0);gl_Position=vec4(position.xy,1.0,1.0);}"})}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}},Ao=class extends ae{constructor(){super({name:"UpsamplingMaterial",uniforms:{inputBuffer:new Z(null),supportBuffer:new Z(null),texelSize:new Z(new f),radius:new Z(.85)},blending:ue,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;uniform mediump sampler2D supportBuffer;\n#else\nuniform lowp sampler2D inputBuffer;uniform lowp sampler2D supportBuffer;\n#endif\nuniform float radius;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;varying vec2 vUv6;varying vec2 vUv7;void main(){vec4 c=vec4(0.0);c+=texture2D(inputBuffer,vUv0)*0.0625;c+=texture2D(inputBuffer,vUv1)*0.125;c+=texture2D(inputBuffer,vUv2)*0.0625;c+=texture2D(inputBuffer,vUv3)*0.125;c+=texture2D(inputBuffer,vUv)*0.25;c+=texture2D(inputBuffer,vUv4)*0.125;c+=texture2D(inputBuffer,vUv5)*0.0625;c+=texture2D(inputBuffer,vUv6)*0.125;c+=texture2D(inputBuffer,vUv7)*0.0625;vec4 baseColor=texture2D(supportBuffer,vUv);gl_FragColor=mix(baseColor,c,radius);\n#include \n}",vertexShader:"uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;varying vec2 vUv6;varying vec2 vUv7;void main(){vUv=position.xy*0.5+0.5;vUv0=vUv+texelSize*vec2(-1.0,1.0);vUv1=vUv+texelSize*vec2(0.0,1.0);vUv2=vUv+texelSize*vec2(1.0,1.0);vUv3=vUv+texelSize*vec2(-1.0,0.0);vUv4=vUv+texelSize*vec2(1.0,0.0);vUv5=vUv+texelSize*vec2(-1.0,-1.0);vUv6=vUv+texelSize*vec2(0.0,-1.0);vUv7=vUv+texelSize*vec2(1.0,-1.0);gl_Position=vec4(position.xy,1.0,1.0);}"})}set inputBuffer(e){this.uniforms.inputBuffer.value=e}set supportBuffer(e){this.uniforms.supportBuffer.value=e}get radius(){return this.uniforms.radius.value}set radius(e){this.uniforms.radius.value=e}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}},bo=class extends Nr{constructor(){super("MipmapBlurPass"),this.needsSwap=!1,this.renderTarget=new X(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="Upsampling.Mipmap0",this.downsamplingMipmaps=[],this.upsamplingMipmaps=[],this.downsamplingMaterial=new xo,this.upsamplingMaterial=new Ao,this.resolution=new f}get texture(){return this.renderTarget.texture}get levels(){return this.downsamplingMipmaps.length}set levels(e){if(this.levels!==e){const t=this.renderTarget;this.dispose(),this.downsamplingMipmaps=[],this.upsamplingMipmaps=[];for(let n=0;n=0;--t){const n=h[t];l.setSize(u.width,u.height),l.inputBuffer=u.texture,l.supportBuffer=c[t].texture,e.setRenderTarget(n),e.render(r,o),u=n}}setSize(e,t){const n=this.resolution;n.set(e,t);let i=n.width,s=n.height;for(let e=0,t=this.downsamplingMipmaps.length;ethis.setChanged())),this._inputColorSpace=ce,this._outputColorSpace=he}get inputColorSpace(){return this._inputColorSpace}set inputColorSpace(e){this._inputColorSpace=e,this.setChanged()}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e,this.setChanged()}set mainScene(e){}set mainCamera(e){}getName(){return this.name}setRenderer(e){this.renderer=e}getDefines(){return this.defines}getUniforms(){return this.uniforms}getExtensions(){return this.extensions}getBlendMode(){return this.blendMode}getAttributes(){return this.attributes}setAttributes(e){this.attributes=e,this.setChanged()}getFragmentShader(){return this.fragmentShader}setFragmentShader(e){this.fragmentShader=e,this.setChanged()}getVertexShader(){return this.vertexShader}setVertexShader(e){this.vertexShader=e,this.setChanged()}setChanged(){this.dispatchEvent({type:"change"})}setDepthTexture(e,t=te){}update(e,t,n){}setSize(e,t){}initialize(e,t,n){}dispose(){for(const e of Object.keys(this)){const t=this[e];(t instanceof X||t instanceof ge||t instanceof d||t instanceof Nr)&&this[e].dispose()}}},So=class extends To{constructor({blendFunction:e=ao,luminanceThreshold:t=.9,luminanceSmoothing:n=.025,mipmapBlur:i=!1,intensity:s=1,radius:r=.85,levels:o=8,kernelSize:a=fo,resolutionScale:l=.5,width:c=to.AUTO_SIZE,height:h=to.AUTO_SIZE,resolutionX:u=c,resolutionY:d=h}={}){super("BloomEffect","#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D map;\n#else\nuniform lowp sampler2D map;\n#endif\nuniform float intensity;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec4 texel=texture2D(map,uv);outputColor=vec4(texel.rgb*intensity,texel.a);}",{blendFunction:e,uniforms:new Map([["map",new Z(null)],["intensity",new Z(s)]])}),this.renderTarget=new X(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="Bloom.Target",this.blurPass=new vo({kernelSize:a}),this.luminancePass=new wo({colorOutput:!0}),this.luminanceMaterial.threshold=t,this.luminanceMaterial.smoothing=n,this.mipmapBlurPass=new bo,this.mipmapBlurPass.enabled=i,this.mipmapBlurPass.radius=r,this.mipmapBlurPass.levels=o,this.uniforms.get("map").value=i?this.mipmapBlurPass.texture:this.renderTarget.texture;const p=this.resolution=new to(this,u,d,l);p.addEventListener("change",(e=>this.setSize(p.baseWidth,p.baseHeight)))}get texture(){return this.mipmapBlurPass.enabled?this.mipmapBlurPass.texture:this.renderTarget.texture}getTexture(){return this.texture}getResolution(){return this.resolution}getBlurPass(){return this.blurPass}getLuminancePass(){return this.luminancePass}get luminanceMaterial(){return this.luminancePass.fullscreenMaterial}getLuminanceMaterial(){return this.luminancePass.fullscreenMaterial}get width(){return this.resolution.width}set width(e){this.resolution.preferredWidth=e}get height(){return this.resolution.height}set height(e){this.resolution.preferredHeight=e}get dithering(){return this.blurPass.dithering}set dithering(e){this.blurPass.dithering=e}get kernelSize(){return this.blurPass.kernelSize}set kernelSize(e){this.blurPass.kernelSize=e}get distinction(){return console.warn(this.name,"distinction was removed"),1}set distinction(e){console.warn(this.name,"distinction was removed")}get intensity(){return this.uniforms.get("intensity").value}set intensity(e){this.uniforms.get("intensity").value=e}getIntensity(){return this.intensity}setIntensity(e){this.intensity=e}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}update(e,t,n){const i=this.renderTarget,s=this.luminancePass;s.enabled?(s.render(e,t),this.mipmapBlurPass.enabled?this.mipmapBlurPass.render(e,s.renderTarget):this.blurPass.render(e,s.renderTarget,i)):this.mipmapBlurPass.enabled?this.mipmapBlurPass.render(e,t):this.blurPass.render(e,t,i)}setSize(e,t){const n=this.resolution;n.setBaseSize(e,t),this.renderTarget.setSize(n.width,n.height),this.blurPass.resolution.copy(n),this.luminancePass.setSize(e,t),this.mipmapBlurPass.setSize(e,t)}initialize(e,t,n){this.blurPass.initialize(e,t,n),this.luminancePass.initialize(e,t,n),this.mipmapBlurPass.initialize(e,t,n),void 0!==n&&(this.renderTarget.texture.type=n,null!==e&&e.outputColorSpace===_&&(this.renderTarget.texture.colorSpace=_))}},Do=class extends Nr{constructor(e,t="inputBuffer"){super("ShaderPass"),this.fullscreenMaterial=e,this.input=t}setInput(e){this.input=e}render(e,t,n,i,s){const r=this.fullscreenMaterial.uniforms;null!==t&&void 0!==r&&void 0!==r[this.input]&&(r[this.input].value=t.texture),e.setRenderTarget(this.renderToScreen?null:n),e.render(this.scene,this.camera)}initialize(e,t,n){void 0!==n&&n!==V&&(this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}},Eo=class extends Nr{constructor(e,t,n=null){super("RenderPass",e,t),this.needsSwap=!1,this.clearPass=new Wr,this.overrideMaterialManager=null===n?null:new $r(n),this.ignoreBackground=!1,this.skipShadowMapUpdate=!1,this.selection=null}set mainScene(e){this.scene=e}set mainCamera(e){this.camera=e}get renderToScreen(){return super.renderToScreen}set renderToScreen(e){super.renderToScreen=e,this.clearPass.renderToScreen=e}get overrideMaterial(){const e=this.overrideMaterialManager;return null!==e?e.material:null}set overrideMaterial(e){const t=this.overrideMaterialManager;null!==e?null!==t?t.setMaterial(e):this.overrideMaterialManager=new $r(e):null!==t&&(t.dispose(),this.overrideMaterialManager=null)}getOverrideMaterial(){return this.overrideMaterial}setOverrideMaterial(e){this.overrideMaterial=e}get clear(){return this.clearPass.enabled}set clear(e){this.clearPass.enabled=e}getSelection(){return this.selection}setSelection(e){this.selection=e}isBackgroundDisabled(){return this.ignoreBackground}setBackgroundDisabled(e){this.ignoreBackground=e}isShadowMapDisabled(){return this.skipShadowMapUpdate}setShadowMapDisabled(e){this.skipShadowMapUpdate=e}getClearPass(){return this.clearPass}render(e,t,n,i,s){const r=this.scene,o=this.camera,a=this.selection,l=o.layers.mask,c=r.background,h=e.shadowMap.autoUpdate,u=this.renderToScreen?null:t;null!==a&&o.layers.set(a.getLayer()),this.skipShadowMapUpdate&&(e.shadowMap.autoUpdate=!1),(this.ignoreBackground||null!==this.clearPass.overrideClearColor)&&(r.background=null),this.clearPass.enabled&&this.clearPass.render(e,t),e.setRenderTarget(u),null!==this.overrideMaterialManager?this.overrideMaterialManager.render(e,r,o):e.render(r,o),o.layers.mask=l,r.background=c,e.shadowMap.autoUpdate=h}},Co=2,Mo=0,Po=0,Oo=1,Bo=2,Io=3,Lo=0,Ro=1,Fo=2,Uo=3,zo=5,ko=6,jo=7,No=8,Go=class extends ae{constructor(e=null,t){super({name:"DepthComparisonMaterial",defines:{DEPTH_PACKING:"0"},uniforms:{depthBuffer:new Z(null),cameraNear:new Z(.3),cameraFar:new Z(1e3)},blending:ue,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#include \n#include \n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\nuniform float cameraNear;uniform float cameraFar;centroid varying float vViewZ;centroid varying vec4 vProjTexCoord;void main(){\n#include \nvec2 projTexCoord=(vProjTexCoord.xy/vProjTexCoord.w)*0.5+0.5;projTexCoord=clamp(projTexCoord,0.002,0.998);\n#if DEPTH_PACKING == 3201\nfloat fragCoordZ=unpackRGBAToDepth(texture2D(depthBuffer,projTexCoord));\n#else\nfloat fragCoordZ=texture2D(depthBuffer,projTexCoord).r;\n#endif\n#ifdef PERSPECTIVE_CAMERA\nfloat viewZ=perspectiveDepthToViewZ(fragCoordZ,cameraNear,cameraFar);\n#else\nfloat viewZ=orthographicDepthToViewZ(fragCoordZ,cameraNear,cameraFar);\n#endif\nfloat depthTest=(-vViewZ>-viewZ)?1.0:0.0;gl_FragColor.rg=vec2(0.0,depthTest);}",vertexShader:"#include \n#include \n#include \n#include \nvarying float vViewZ;varying vec4 vProjTexCoord;void main(){\n#include \n#include \n#include \n#include \n#include \nvViewZ=mvPosition.z;vProjTexCoord=gl_Position;\n#include \n}"}),this.depthBuffer=e,this.depthPacking=de,this.copyCameraSettings(t)}set depthBuffer(e){this.uniforms.depthBuffer.value=e}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e,t=de){this.depthBuffer=e,this.depthPacking=t}adoptCameraSettings(e){this.copyCameraSettings(e)}copyCameraSettings(e){e&&(this.uniforms.cameraNear.value=e.near,this.uniforms.cameraFar.value=e.far,e instanceof pe?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}},Ho=class extends ae{constructor(e=new f){super({name:"OutlineMaterial",uniforms:{inputBuffer:new Z(null),texelSize:new Z(new f)},blending:ue,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"uniform lowp sampler2D inputBuffer;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 c0=texture2D(inputBuffer,vUv0).rg;vec2 c1=texture2D(inputBuffer,vUv1).rg;vec2 c2=texture2D(inputBuffer,vUv2).rg;vec2 c3=texture2D(inputBuffer,vUv3).rg;float d0=(c0.x-c1.x)*0.5;float d1=(c2.x-c3.x)*0.5;float d=length(vec2(d0,d1));float a0=min(c0.y,c1.y);float a1=min(c2.y,c3.y);float visibilityFactor=min(a0,a1);gl_FragColor.rg=(1.0-visibilityFactor>0.001)?vec2(d,0.0):vec2(0.0,d);}",vertexShader:"uniform vec2 texelSize;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vUv0=vec2(uv.x+texelSize.x,uv.y);vUv1=vec2(uv.x-texelSize.x,uv.y);vUv2=vec2(uv.x,uv.y+texelSize.y);vUv3=vec2(uv.x,uv.y-texelSize.y);gl_Position=vec4(position.xy,1.0,1.0);}"}),this.uniforms.texelSize.value.set(e.x,e.y),this.uniforms.maskTexture=this.uniforms.inputBuffer}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}setTexelSize(e,t){this.uniforms.texelSize.value.set(e,t)}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}},Vo=class extends Nr{constructor(e,t,{renderTarget:n,resolutionScale:i=1,width:s=to.AUTO_SIZE,height:r=to.AUTO_SIZE,resolutionX:o=s,resolutionY:a=r}={}){super("DepthPass"),this.needsSwap=!1,this.renderPass=new Eo(e,t,new fe({depthPacking:de}));const l=this.renderPass;l.skipShadowMapUpdate=!0,l.ignoreBackground=!0;const c=l.clearPass;c.overrideClearColor=new u(16777215),c.overrideClearAlpha=1,this.renderTarget=n,void 0===this.renderTarget&&(this.renderTarget=new X(1,1,{minFilter:$,magFilter:$}),this.renderTarget.texture.name="DepthPass.Target");const h=this.resolution=new to(this,o,a,i);h.addEventListener("change",(e=>this.setSize(h.baseWidth,h.baseHeight)))}set mainScene(e){this.renderPass.mainScene=e}set mainCamera(e){this.renderPass.mainCamera=e}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}render(e,t,n,i,s){const r=this.renderToScreen?null:this.renderTarget;this.renderPass.render(e,r)}setSize(e,t){const n=this.resolution;n.setBaseSize(e,t),this.renderTarget.setSize(n.width,n.height)}},_o=class extends To{constructor(e,t,{blendFunction:n=ao,patternTexture:i=null,patternScale:s=1,edgeStrength:r=1,pulseSpeed:o=0,visibleEdgeColor:a=16777215,hiddenEdgeColor:l=2230538,kernelSize:c=uo,blur:h=!1,xRay:d=!0,multisampling:p=0,resolutionScale:f=.5,width:m=to.AUTO_SIZE,height:g=to.AUTO_SIZE,resolutionX:v=m,resolutionY:y=g}={}){super("OutlineEffect","uniform lowp sampler2D edgeTexture;uniform lowp sampler2D maskTexture;uniform vec3 visibleEdgeColor;uniform vec3 hiddenEdgeColor;uniform float pulse;uniform float edgeStrength;\n#ifdef USE_PATTERN\nuniform lowp sampler2D patternTexture;varying vec2 vUvPattern;\n#endif\nvoid mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec2 edge=texture2D(edgeTexture,uv).rg;vec2 mask=texture2D(maskTexture,uv).rg;\n#ifndef X_RAY\nedge.y=0.0;\n#endif\nedge*=(edgeStrength*mask.x*pulse);vec3 color=edge.x*visibleEdgeColor+edge.y*hiddenEdgeColor;float visibilityFactor=0.0;\n#ifdef USE_PATTERN\nvec4 patternColor=texture2D(patternTexture,vUvPattern);\n#ifdef X_RAY\nfloat hiddenFactor=0.5;\n#else\nfloat hiddenFactor=0.0;\n#endif\nvisibilityFactor=(1.0-mask.y>0.0)?1.0:hiddenFactor;visibilityFactor*=(1.0-mask.x)*patternColor.a;color+=visibilityFactor*patternColor.rgb;\n#endif\nfloat alpha=max(max(edge.x,edge.y),visibilityFactor);\n#ifdef ALPHA\noutputColor=vec4(color,alpha);\n#else\noutputColor=vec4(color,max(alpha,inputColor.a));\n#endif\n}",{uniforms:new Map([["maskTexture",new Z(null)],["edgeTexture",new Z(null)],["edgeStrength",new Z(r)],["visibleEdgeColor",new Z(new u(a))],["hiddenEdgeColor",new Z(new u(l))],["pulse",new Z(1)],["patternScale",new Z(s)],["patternTexture",new Z(null)]])}),this.blendMode.addEventListener("change",(e=>{this.blendMode.blendFunction===so?this.defines.set("ALPHA","1"):this.defines.delete("ALPHA"),this.setChanged()})),this.blendMode.blendFunction=n,this.patternTexture=i,this.xRay=d,this.scene=e,this.camera=t,this.renderTargetMask=new X(1,1),this.renderTargetMask.samples=p,this.renderTargetMask.texture.name="Outline.Mask",this.uniforms.get("maskTexture").value=this.renderTargetMask.texture,this.renderTargetOutline=new X(1,1,{depthBuffer:!1}),this.renderTargetOutline.texture.name="Outline.Edges",this.uniforms.get("edgeTexture").value=this.renderTargetOutline.texture,this.clearPass=new Wr,this.clearPass.overrideClearColor=new u(0),this.clearPass.overrideClearAlpha=1,this.depthPass=new Vo(e,t),this.maskPass=new Eo(e,t,new Go(this.depthPass.texture,t));const w=this.maskPass.clearPass;w.overrideClearColor=new u(16777215),w.overrideClearAlpha=1,this.blurPass=new vo({resolutionScale:f,resolutionX:v,resolutionY:y,kernelSize:c}),this.blurPass.enabled=h;const x=this.blurPass.resolution;x.addEventListener("change",(e=>this.setSize(x.baseWidth,x.baseHeight))),this.outlinePass=new Do(new Ho);this.outlinePass.fullscreenMaterial.inputBuffer=this.renderTargetMask.texture,this.time=0,this.forceUpdate=!0,this.selection=new no,this.selection.layer=10,this.pulseSpeed=o}set mainScene(e){this.scene=e,this.depthPass.mainScene=e,this.maskPass.mainScene=e}set mainCamera(e){this.camera=e,this.depthPass.mainCamera=e,this.maskPass.mainCamera=e,this.maskPass.overrideMaterial.copyCameraSettings(e)}get resolution(){return this.blurPass.resolution}getResolution(){return this.blurPass.getResolution()}get multisampling(){return this.renderTargetMask.samples}set multisampling(e){this.renderTargetMask.samples=e,this.renderTargetMask.dispose()}get patternScale(){return this.uniforms.get("patternScale").value}set patternScale(e){this.uniforms.get("patternScale").value=e}get edgeStrength(){return this.uniforms.get("edgeStrength").value}set edgeStrength(e){this.uniforms.get("edgeStrength").value=e}get visibleEdgeColor(){return this.uniforms.get("visibleEdgeColor").value}set visibleEdgeColor(e){this.uniforms.get("visibleEdgeColor").value=e}get hiddenEdgeColor(){return this.uniforms.get("hiddenEdgeColor").value}set hiddenEdgeColor(e){this.uniforms.get("hiddenEdgeColor").value=e}getBlurPass(){return this.blurPass}getSelection(){return this.selection}getPulseSpeed(){return this.pulseSpeed}setPulseSpeed(e){this.pulseSpeed=e}get width(){return this.resolution.width}set width(e){this.resolution.preferredWidth=e}get height(){return this.resolution.height}set height(e){this.resolution.preferredHeight=e}get selectionLayer(){return this.selection.layer}set selectionLayer(e){this.selection.layer=e}get dithering(){return this.blurPass.dithering}set dithering(e){this.blurPass.dithering=e}get kernelSize(){return this.blurPass.kernelSize}set kernelSize(e){this.blurPass.kernelSize=e}get blur(){return this.blurPass.enabled}set blur(e){this.blurPass.enabled=e}get xRay(){return this.defines.has("X_RAY")}set xRay(e){this.xRay!==e&&(e?this.defines.set("X_RAY","1"):this.defines.delete("X_RAY"),this.setChanged())}isXRayEnabled(){return this.xRay}setXRayEnabled(e){this.xRay=e}get patternTexture(){return this.uniforms.get("patternTexture").value}set patternTexture(e){null!==e?(e.wrapS=e.wrapT=q,this.defines.set("USE_PATTERN","1"),this.setVertexShader("uniform float patternScale;varying vec2 vUvPattern;void mainSupport(const in vec2 uv){vUvPattern=uv*vec2(aspect,1.0)*patternScale;}")):(this.defines.delete("USE_PATTERN"),this.setVertexShader(null)),this.uniforms.get("patternTexture").value=e,this.setChanged()}setPatternTexture(e){this.patternTexture=e}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}setSelection(e){return this.selection.set(e),this}clearSelection(){return this.selection.clear(),this}selectObject(e){return this.selection.add(e),this}deselectObject(e){return this.selection.delete(e),this}update(e,t,n){const i=this.scene,s=this.camera,r=this.selection,o=this.uniforms.get("pulse"),a=i.background,l=s.layers.mask;(this.forceUpdate||r.size>0)&&(i.background=null,o.value=1,this.pulseSpeed>0&&(o.value=.375*Math.cos(this.time*this.pulseSpeed*10)+.625),this.time+=n,r.setVisible(!1),this.depthPass.render(e),r.setVisible(!0),s.layers.set(r.layer),this.maskPass.render(e,this.renderTargetMask),s.layers.mask=l,i.background=a,this.outlinePass.render(e,null,this.renderTargetOutline),this.blurPass.enabled&&this.blurPass.render(e,this.renderTargetOutline,this.renderTargetOutline)),this.forceUpdate=r.size>0}setSize(e,t){this.blurPass.setSize(e,t),this.renderTargetMask.setSize(e,t);const n=this.resolution;n.setBaseSize(e,t);const i=n.width,s=n.height;this.depthPass.setSize(i,s),this.renderTargetOutline.setSize(i,s),this.outlinePass.fullscreenMaterial.setSize(i,s)}initialize(e,t,n){this.blurPass.initialize(e,t,V),void 0!==n&&(this.depthPass.initialize(e,t,n),this.maskPass.initialize(e,t,n),this.outlinePass.initialize(e,t,n))}},Qo=class extends ae{constructor(e=new f,t=Co){super({name:"EdgeDetectionMaterial",defines:{THREE_REVISION:ie.replace(/\D+/g,""),LOCAL_CONTRAST_ADAPTATION_FACTOR:"2.0",EDGE_THRESHOLD:"0.1",DEPTH_THRESHOLD:"0.01",PREDICATION_MODE:"0",PREDICATION_THRESHOLD:"0.01",PREDICATION_SCALE:"2.0",PREDICATION_STRENGTH:"1.0",DEPTH_PACKING:"0"},uniforms:{inputBuffer:new Z(null),depthBuffer:new Z(null),predicationBuffer:new Z(null),texelSize:new Z(e)},blending:ue,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;\n#if EDGE_DETECTION_MODE != 0\nvarying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;\n#endif\n#if EDGE_DETECTION_MODE == 1\n#include \n#endif\n#if EDGE_DETECTION_MODE == 0 || PREDICATION_MODE == 1\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\nfloat readDepth(const in vec2 uv){\n#if DEPTH_PACKING == 3201\nreturn unpackRGBAToDepth(texture2D(depthBuffer,uv));\n#else\nreturn texture2D(depthBuffer,uv).r;\n#endif\n}vec3 gatherNeighbors(){float p=readDepth(vUv);float pLeft=readDepth(vUv0);float pTop=readDepth(vUv1);return vec3(p,pLeft,pTop);}\n#elif PREDICATION_MODE == 2\nuniform sampler2D predicationBuffer;vec3 gatherNeighbors(){float p=texture2D(predicationBuffer,vUv).r;float pLeft=texture2D(predicationBuffer,vUv0).r;float pTop=texture2D(predicationBuffer,vUv1).r;return vec3(p,pLeft,pTop);}\n#endif\n#if PREDICATION_MODE != 0\nvec2 calculatePredicatedThreshold(){vec3 neighbours=gatherNeighbors();vec2 delta=abs(neighbours.xx-neighbours.yz);vec2 edges=step(PREDICATION_THRESHOLD,delta);return PREDICATION_SCALE*EDGE_THRESHOLD*(1.0-PREDICATION_STRENGTH*edges);}\n#endif\n#if EDGE_DETECTION_MODE != 0\nuniform sampler2D inputBuffer;\n#endif\nvoid main(){\n#if EDGE_DETECTION_MODE == 0\nconst vec2 threshold=vec2(DEPTH_THRESHOLD);\n#elif PREDICATION_MODE != 0\nvec2 threshold=calculatePredicatedThreshold();\n#else\nconst vec2 threshold=vec2(EDGE_THRESHOLD);\n#endif\n#if EDGE_DETECTION_MODE == 0\nvec3 neighbors=gatherNeighbors();vec2 delta=abs(neighbors.xx-vec2(neighbors.y,neighbors.z));vec2 edges=step(threshold,delta);if(dot(edges,vec2(1.0))==0.0){discard;}gl_FragColor=vec4(edges,0.0,1.0);\n#elif EDGE_DETECTION_MODE == 1\nfloat l=luminance(texture2D(inputBuffer,vUv).rgb);float lLeft=luminance(texture2D(inputBuffer,vUv0).rgb);float lTop=luminance(texture2D(inputBuffer,vUv1).rgb);vec4 delta;delta.xy=abs(l-vec2(lLeft,lTop));vec2 edges=step(threshold,delta.xy);if(dot(edges,vec2(1.0))==0.0){discard;}float lRight=luminance(texture2D(inputBuffer,vUv2).rgb);float lBottom=luminance(texture2D(inputBuffer,vUv3).rgb);delta.zw=abs(l-vec2(lRight,lBottom));vec2 maxDelta=max(delta.xy,delta.zw);float lLeftLeft=luminance(texture2D(inputBuffer,vUv4).rgb);float lTopTop=luminance(texture2D(inputBuffer,vUv5).rgb);delta.zw=abs(vec2(lLeft,lTop)-vec2(lLeftLeft,lTopTop));maxDelta=max(maxDelta.xy,delta.zw);float finalDelta=max(maxDelta.x,maxDelta.y);edges.xy*=step(finalDelta,LOCAL_CONTRAST_ADAPTATION_FACTOR*delta.xy);gl_FragColor=vec4(edges,0.0,1.0);\n#elif EDGE_DETECTION_MODE == 2\nvec4 delta;vec3 c=texture2D(inputBuffer,vUv).rgb;vec3 cLeft=texture2D(inputBuffer,vUv0).rgb;vec3 t=abs(c-cLeft);delta.x=max(max(t.r,t.g),t.b);vec3 cTop=texture2D(inputBuffer,vUv1).rgb;t=abs(c-cTop);delta.y=max(max(t.r,t.g),t.b);vec2 edges=step(threshold,delta.xy);if(dot(edges,vec2(1.0))==0.0){discard;}vec3 cRight=texture2D(inputBuffer,vUv2).rgb;t=abs(c-cRight);delta.z=max(max(t.r,t.g),t.b);vec3 cBottom=texture2D(inputBuffer,vUv3).rgb;t=abs(c-cBottom);delta.w=max(max(t.r,t.g),t.b);vec2 maxDelta=max(delta.xy,delta.zw);vec3 cLeftLeft=texture2D(inputBuffer,vUv4).rgb;t=abs(c-cLeftLeft);delta.z=max(max(t.r,t.g),t.b);vec3 cTopTop=texture2D(inputBuffer,vUv5).rgb;t=abs(c-cTopTop);delta.w=max(max(t.r,t.g),t.b);maxDelta=max(maxDelta.xy,delta.zw);float finalDelta=max(maxDelta.x,maxDelta.y);edges*=step(finalDelta,LOCAL_CONTRAST_ADAPTATION_FACTOR*delta.xy);gl_FragColor=vec4(edges,0.0,1.0);\n#endif\n}",vertexShader:"uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;\n#if EDGE_DETECTION_MODE != 0\nvarying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;\n#endif\nvoid main(){vUv=position.xy*0.5+0.5;vUv0=vUv+texelSize*vec2(-1.0,0.0);vUv1=vUv+texelSize*vec2(0.0,-1.0);\n#if EDGE_DETECTION_MODE != 0\nvUv2=vUv+texelSize*vec2(1.0,0.0);vUv3=vUv+texelSize*vec2(0.0,1.0);vUv4=vUv+texelSize*vec2(-2.0,0.0);vUv5=vUv+texelSize*vec2(0.0,-2.0);\n#endif\ngl_Position=vec4(position.xy,1.0,1.0);}"}),this.edgeDetectionMode=t}set depthBuffer(e){this.uniforms.depthBuffer.value=e}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e,t=te){this.depthBuffer=e,this.depthPacking=t}get edgeDetectionMode(){return Number(this.defines.EDGE_DETECTION_MODE)}set edgeDetectionMode(e){this.defines.EDGE_DETECTION_MODE=e.toFixed(0),this.needsUpdate=!0}getEdgeDetectionMode(){return this.edgeDetectionMode}setEdgeDetectionMode(e){this.edgeDetectionMode=e}get localContrastAdaptationFactor(){return Number(this.defines.LOCAL_CONTRAST_ADAPTATION_FACTOR)}set localContrastAdaptationFactor(e){this.defines.LOCAL_CONTRAST_ADAPTATION_FACTOR=e.toFixed("6"),this.needsUpdate=!0}getLocalContrastAdaptationFactor(){return this.localContrastAdaptationFactor}setLocalContrastAdaptationFactor(e){this.localContrastAdaptationFactor=e}get edgeDetectionThreshold(){return Number(this.defines.EDGE_THRESHOLD)}set edgeDetectionThreshold(e){this.defines.EDGE_THRESHOLD=e.toFixed("6"),this.defines.DEPTH_THRESHOLD=(.1*e).toFixed("6"),this.needsUpdate=!0}getEdgeDetectionThreshold(){return this.edgeDetectionThreshold}setEdgeDetectionThreshold(e){this.edgeDetectionThreshold=e}get predicationMode(){return Number(this.defines.PREDICATION_MODE)}set predicationMode(e){this.defines.PREDICATION_MODE=e.toFixed(0),this.needsUpdate=!0}getPredicationMode(){return this.predicationMode}setPredicationMode(e){this.predicationMode=e}set predicationBuffer(e){this.uniforms.predicationBuffer.value=e}setPredicationBuffer(e){this.uniforms.predicationBuffer.value=e}get predicationThreshold(){return Number(this.defines.PREDICATION_THRESHOLD)}set predicationThreshold(e){this.defines.PREDICATION_THRESHOLD=e.toFixed("6"),this.needsUpdate=!0}getPredicationThreshold(){return this.predicationThreshold}setPredicationThreshold(e){this.predicationThreshold=e}get predicationScale(){return Number(this.defines.PREDICATION_SCALE)}set predicationScale(e){this.defines.PREDICATION_SCALE=e.toFixed("6"),this.needsUpdate=!0}getPredicationScale(){return this.predicationScale}setPredicationScale(e){this.predicationScale=e}get predicationStrength(){return Number(this.defines.PREDICATION_STRENGTH)}set predicationStrength(e){this.defines.PREDICATION_STRENGTH=e.toFixed("6"),this.needsUpdate=!0}getPredicationStrength(){return this.predicationStrength}setPredicationStrength(e){this.predicationStrength=e}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}},Wo=class extends ae{constructor(e=new f,t=new f){super({name:"SMAAWeightsMaterial",defines:{MAX_SEARCH_STEPS_INT:"16",MAX_SEARCH_STEPS_FLOAT:"16.0",MAX_SEARCH_STEPS_DIAG_INT:"8",MAX_SEARCH_STEPS_DIAG_FLOAT:"8.0",CORNER_ROUNDING:"25",CORNER_ROUNDING_NORM:"0.25",AREATEX_MAX_DISTANCE:"16.0",AREATEX_MAX_DISTANCE_DIAG:"20.0",AREATEX_PIXEL_SIZE:"(1.0 / vec2(160.0, 560.0))",AREATEX_SUBTEX_SIZE:"(1.0 / 7.0)",SEARCHTEX_SIZE:"vec2(66.0, 33.0)",SEARCHTEX_PACKED_SIZE:"vec2(64.0, 16.0)"},uniforms:{inputBuffer:new Z(null),searchTexture:new Z(null),areaTexture:new Z(null),resolution:new Z(t),texelSize:new Z(e)},blending:ue,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#define sampleLevelZeroOffset(t, coord, offset) texture2D(t, coord + offset * texelSize)\n#if __VERSION__ < 300\n#define round(v) floor(v + 0.5)\n#endif\n#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\nuniform lowp sampler2D areaTexture;uniform lowp sampler2D searchTexture;uniform vec2 texelSize;uniform vec2 resolution;varying vec2 vUv;varying vec4 vOffset[3];varying vec2 vPixCoord;void movec(const in bvec2 c,inout vec2 variable,const in vec2 value){if(c.x){variable.x=value.x;}if(c.y){variable.y=value.y;}}void movec(const in bvec4 c,inout vec4 variable,const in vec4 value){movec(c.xy,variable.xy,value.xy);movec(c.zw,variable.zw,value.zw);}vec2 decodeDiagBilinearAccess(in vec2 e){e.r=e.r*abs(5.0*e.r-5.0*0.75);return round(e);}vec4 decodeDiagBilinearAccess(in vec4 e){e.rb=e.rb*abs(5.0*e.rb-5.0*0.75);return round(e);}vec2 searchDiag1(const in vec2 texCoord,const in vec2 dir,out vec2 e){vec4 coord=vec4(texCoord,-1.0,1.0);vec3 t=vec3(texelSize,1.0);for(int i=0;i0.9)){break;}coord.xyz=t*vec3(dir,1.0)+coord.xyz;e=texture2D(inputBuffer,coord.xy).rg;coord.w=dot(e,vec2(0.5));}return coord.zw;}vec2 searchDiag2(const in vec2 texCoord,const in vec2 dir,out vec2 e){vec4 coord=vec4(texCoord,-1.0,1.0);coord.x+=0.25*texelSize.x;vec3 t=vec3(texelSize,1.0);for(int i=0;i0.9)){break;}coord.xyz=t*vec3(dir,1.0)+coord.xyz;e=texture2D(inputBuffer,coord.xy).rg;e=decodeDiagBilinearAccess(e);coord.w=dot(e,vec2(0.5));}return coord.zw;}vec2 areaDiag(const in vec2 dist,const in vec2 e,const in float offset){vec2 texCoord=vec2(AREATEX_MAX_DISTANCE_DIAG,AREATEX_MAX_DISTANCE_DIAG)*e+dist;texCoord=AREATEX_PIXEL_SIZE*texCoord+0.5*AREATEX_PIXEL_SIZE;texCoord.x+=0.5;texCoord.y+=AREATEX_SUBTEX_SIZE*offset;return texture2D(areaTexture,texCoord).rg;}vec2 calculateDiagWeights(const in vec2 texCoord,const in vec2 e,const in vec4 subsampleIndices){vec2 weights=vec2(0.0);vec4 d;vec2 end;if(e.r>0.0){d.xz=searchDiag1(texCoord,vec2(-1.0,1.0),end);d.x+=float(end.y>0.9);}else{d.xz=vec2(0.0);}d.yw=searchDiag1(texCoord,vec2(1.0,-1.0),end);if(d.x+d.y>2.0){vec4 coords=vec4(-d.x+0.25,d.x,d.y,-d.y-0.25)*texelSize.xyxy+texCoord.xyxy;vec4 c;c.xy=sampleLevelZeroOffset(inputBuffer,coords.xy,vec2(-1,0)).rg;c.zw=sampleLevelZeroOffset(inputBuffer,coords.zw,vec2(1,0)).rg;c.yxwz=decodeDiagBilinearAccess(c.xyzw);vec2 cc=vec2(2.0)*c.xz+c.yw;movec(bvec2(step(0.9,d.zw)),cc,vec2(0.0));weights+=areaDiag(d.xy,cc,subsampleIndices.z);}d.xz=searchDiag2(texCoord,vec2(-1.0,-1.0),end);if(sampleLevelZeroOffset(inputBuffer,texCoord,vec2(1,0)).r>0.0){d.yw=searchDiag2(texCoord,vec2(1.0),end);d.y+=float(end.y>0.9);}else{d.yw=vec2(0.0);}if(d.x+d.y>2.0){vec4 coords=vec4(-d.x,-d.x,d.y,d.y)*texelSize.xyxy+texCoord.xyxy;vec4 c;c.x=sampleLevelZeroOffset(inputBuffer,coords.xy,vec2(-1,0)).g;c.y=sampleLevelZeroOffset(inputBuffer,coords.xy,vec2(0,-1)).r;c.zw=sampleLevelZeroOffset(inputBuffer,coords.zw,vec2(1,0)).gr;vec2 cc=vec2(2.0)*c.xz+c.yw;movec(bvec2(step(0.9,d.zw)),cc,vec2(0.0));weights+=areaDiag(d.xy,cc,subsampleIndices.w).gr;}return weights;}float searchLength(const in vec2 e,const in float offset){vec2 scale=SEARCHTEX_SIZE*vec2(0.5,-1.0);vec2 bias=SEARCHTEX_SIZE*vec2(offset,1.0);scale+=vec2(-1.0,1.0);bias+=vec2(0.5,-0.5);scale*=1.0/SEARCHTEX_PACKED_SIZE;bias*=1.0/SEARCHTEX_PACKED_SIZE;return texture2D(searchTexture,scale*e+bias).r;}float searchXLeft(in vec2 texCoord,const in float end){vec2 e=vec2(0.0,1.0);for(int i=0;iend&&e.g>0.8281&&e.r==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=vec2(-2.0,0.0)*texelSize+texCoord;}float offset=-(255.0/127.0)*searchLength(e,0.0)+3.25;return texelSize.x*offset+texCoord.x;}float searchXRight(vec2 texCoord,const in float end){vec2 e=vec2(0.0,1.0);for(int i=0;i0.8281&&e.r==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=vec2(2.0,0.0)*texelSize.xy+texCoord;}float offset=-(255.0/127.0)*searchLength(e,0.5)+3.25;return-texelSize.x*offset+texCoord.x;}float searchYUp(vec2 texCoord,const in float end){vec2 e=vec2(1.0,0.0);for(int i=0;iend&&e.r>0.8281&&e.g==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=-vec2(0.0,2.0)*texelSize.xy+texCoord;}float offset=-(255.0/127.0)*searchLength(e.gr,0.0)+3.25;return texelSize.y*offset+texCoord.y;}float searchYDown(vec2 texCoord,const in float end){vec2 e=vec2(1.0,0.0);for(int i=0;i0.8281&&e.g==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=vec2(0.0,2.0)*texelSize.xy+texCoord;}float offset=-(255.0/127.0)*searchLength(e.gr,0.5)+3.25;return-texelSize.y*offset+texCoord.y;}vec2 area(const in vec2 dist,const in float e1,const in float e2,const in float offset){vec2 texCoord=vec2(AREATEX_MAX_DISTANCE)*round(4.0*vec2(e1,e2))+dist;texCoord=AREATEX_PIXEL_SIZE*texCoord+0.5*AREATEX_PIXEL_SIZE;texCoord.y=AREATEX_SUBTEX_SIZE*offset+texCoord.y;return texture2D(areaTexture,texCoord).rg;}void detectHorizontalCornerPattern(inout vec2 weights,const in vec4 texCoord,const in vec2 d){\n#if !defined(DISABLE_CORNER_DETECTION)\nvec2 leftRight=step(d.xy,d.yx);vec2 rounding=(1.0-CORNER_ROUNDING_NORM)*leftRight;rounding/=leftRight.x+leftRight.y;vec2 factor=vec2(1.0);factor.x-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(0,1)).r;factor.x-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(1,1)).r;factor.y-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(0,-2)).r;factor.y-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(1,-2)).r;weights*=clamp(factor,0.0,1.0);\n#endif\n}void detectVerticalCornerPattern(inout vec2 weights,const in vec4 texCoord,const in vec2 d){\n#if !defined(DISABLE_CORNER_DETECTION)\nvec2 leftRight=step(d.xy,d.yx);vec2 rounding=(1.0-CORNER_ROUNDING_NORM)*leftRight;rounding/=leftRight.x+leftRight.y;vec2 factor=vec2(1.0);factor.x-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(1,0)).g;factor.x-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(1,1)).g;factor.y-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(-2,0)).g;factor.y-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(-2,1)).g;weights*=clamp(factor,0.0,1.0);\n#endif\n}void main(){vec4 weights=vec4(0.0);vec4 subsampleIndices=vec4(0.0);vec2 e=texture2D(inputBuffer,vUv).rg;if(e.g>0.0){\n#if !defined(DISABLE_DIAG_DETECTION)\nweights.rg=calculateDiagWeights(vUv,e,subsampleIndices);if(weights.r==-weights.g){\n#endif\nvec2 d;vec3 coords;coords.x=searchXLeft(vOffset[0].xy,vOffset[2].x);coords.y=vOffset[1].y;d.x=coords.x;float e1=texture2D(inputBuffer,coords.xy).r;coords.z=searchXRight(vOffset[0].zw,vOffset[2].y);d.y=coords.z;d=round(resolution.xx*d+-vPixCoord.xx);vec2 sqrtD=sqrt(abs(d));float e2=sampleLevelZeroOffset(inputBuffer,coords.zy,vec2(1,0)).r;weights.rg=area(sqrtD,e1,e2,subsampleIndices.y);coords.y=vUv.y;detectHorizontalCornerPattern(weights.rg,coords.xyzy,d);\n#if !defined(DISABLE_DIAG_DETECTION)\n}else{e.r=0.0;}\n#endif\n}if(e.r>0.0){vec2 d;vec3 coords;coords.y=searchYUp(vOffset[1].xy,vOffset[2].z);coords.x=vOffset[0].x;d.x=coords.y;float e1=texture2D(inputBuffer,coords.xy).g;coords.z=searchYDown(vOffset[1].zw,vOffset[2].w);d.y=coords.z;d=round(resolution.yy*d-vPixCoord.yy);vec2 sqrtD=sqrt(abs(d));float e2=sampleLevelZeroOffset(inputBuffer,coords.xz,vec2(0,1)).g;weights.ba=area(sqrtD,e1,e2,subsampleIndices.x);coords.x=vUv.x;detectVerticalCornerPattern(weights.ba,coords.xyxz,d);}gl_FragColor=weights;}",vertexShader:"uniform vec2 texelSize;uniform vec2 resolution;varying vec2 vUv;varying vec4 vOffset[3];varying vec2 vPixCoord;void main(){vUv=position.xy*0.5+0.5;vPixCoord=vUv*resolution;vOffset[0]=vUv.xyxy+texelSize.xyxy*vec4(-0.25,-0.125,1.25,-0.125);vOffset[1]=vUv.xyxy+texelSize.xyxy*vec4(-0.125,-0.25,-0.125,1.25);vOffset[2]=vec4(vOffset[0].xz,vOffset[1].yw)+vec4(-2.0,2.0,-2.0,2.0)*texelSize.xxyy*MAX_SEARCH_STEPS_FLOAT;gl_Position=vec4(position.xy,1.0,1.0);}"})}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}get searchTexture(){return this.uniforms.searchTexture.value}set searchTexture(e){this.uniforms.searchTexture.value=e}get areaTexture(){return this.uniforms.areaTexture.value}set areaTexture(e){this.uniforms.areaTexture.value=e}setLookupTextures(e,t){this.searchTexture=e,this.areaTexture=t}get orthogonalSearchSteps(){return Number(this.defines.MAX_SEARCH_STEPS_INT)}set orthogonalSearchSteps(e){const t=Math.min(Math.max(e,0),112);this.defines.MAX_SEARCH_STEPS_INT=t.toFixed("0"),this.defines.MAX_SEARCH_STEPS_FLOAT=t.toFixed("1"),this.needsUpdate=!0}setOrthogonalSearchSteps(e){this.orthogonalSearchSteps=e}get diagonalSearchSteps(){return Number(this.defines.MAX_SEARCH_STEPS_DIAG_INT)}set diagonalSearchSteps(e){const t=Math.min(Math.max(e,0),20);this.defines.MAX_SEARCH_STEPS_DIAG_INT=t.toFixed("0"),this.defines.MAX_SEARCH_STEPS_DIAG_FLOAT=t.toFixed("1"),this.needsUpdate=!0}setDiagonalSearchSteps(e){this.diagonalSearchSteps=e}get diagonalDetection(){return void 0===this.defines.DISABLE_DIAG_DETECTION}set diagonalDetection(e){e?delete this.defines.DISABLE_DIAG_DETECTION:this.defines.DISABLE_DIAG_DETECTION="1",this.needsUpdate=!0}isDiagonalDetectionEnabled(){return this.diagonalDetection}setDiagonalDetectionEnabled(e){this.diagonalDetection=e}get cornerRounding(){return Number(this.defines.CORNER_ROUNDING)}set cornerRounding(e){const t=Math.min(Math.max(e,0),100);this.defines.CORNER_ROUNDING=t.toFixed("4"),this.defines.CORNER_ROUNDING_NORM=(t/100).toFixed("4"),this.needsUpdate=!0}setCornerRounding(e){this.cornerRounding=e}get cornerDetection(){return void 0===this.defines.DISABLE_CORNER_DETECTION}set cornerDetection(e){e?delete this.defines.DISABLE_CORNER_DETECTION:this.defines.DISABLE_CORNER_DETECTION="1",this.needsUpdate=!0}isCornerRoundingEnabled(){return this.cornerDetection}setCornerRoundingEnabled(e){this.cornerDetection=e}setSize(e,t){const n=this.uniforms;n.texelSize.value.set(1/e,1/t),n.resolution.value.set(e,t)}},Yo="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAAQCAYAAACm53kpAAAAeElEQVRYR+2XSwqAMAxEJ168ePEqwRSKhIIiuHjJqiU0gWE+1CQdApcVAMUAuARaMGCX1MIL/Ow13++9lW2s3mW9MWvsnWc/2fvGygwPAN4E8QzAA4CXAB6AHjG4JTHYI1ey3pcx6FHnEfhLDOIBKAmUBK6/ANUDTlROXAHd9EC1AAAAAElFTkSuQmCC",Ko="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAIwCAYAAAABNmBHAAAgAElEQVR4Xuy9CbhlV1ktOvbpq09DkiIkUBI6kxASIH0DlAQiIK1wRfSJTx+i4JX7vKIigs8HXpXvqVcvrcC9agQ7IDTSSWgqCQQliDRBJKkkhDSkqVPNqVOnP+8b//rH3P+eZ+199tlznVTlvVrft7+1T7OaueZY42/m37QALKNk2wHg1pITlB17mC+Pp11W3X/LHyT32vhg48/5SOv+PnwpsH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IKFCCRRqKuPUdqjlC9o07JZwKVNHeBC94DQcZO0XAAkmgotAk9QYrR9f/BvByYfMSATDVMzwTXMM3QMDAVAgVHCZ7/MaQK4QZUHiNCbBQlqUw74YCb7gcmYkelC9YFlwvVv7RRAorTuBkECU9asCID9/x9B935zYzyKkqpfiNHxcA0gLQgvBAaPVkCqm3h2AtC5m/RyEqzw/4xhGL3hD++MmslgqCbgUfLKAcRrmTlBzDN0DA1tAXUlWcDm1IOIIJAjlT/Fd05lbFQFwjdtgGcewesFt7Rc/Gx8iWjUCjGCT1YvWT1MwgUqrf3NG45tTbcu0aximWx9xENcEQHGbcYAEwtSXSqY0gnCdgeuMI0cvuGx/FUGgFhwEYrR80QckWN+X0fjm1DwAWv8RgJFilJZBznz0pQg+AZAAlVWh1GvGka0XzB0cCQi30aSGVa9AF62fLOB7MhrfnJoPwPER59Px+o3e76mL5Kwp2G57xPl0kxc3er+nLvyKtLmhfUC78RHn081ONnq/pzcAR5xPR9mRRu/31IVgvgUccT4dNaobvd/TGYAjzqejumqj93s6A3DE+XRUg2VSCjdaGr3fUw+I+VPwiPPpqJjO8J1Nw43e7ymHwHoAKMFd7QErAeEE5NNJMb3R+z3lsGcNzgfgiPPpomJ6o/d76oGwPgCOKJ8uKqY3er+nKwBHmE+noqRG7/fUA199U/AI8+kEwEbv93QHoEhZTnA+nYqSGr3fBoAtaiqBUImdm5hPJwA2er+nKwBHnE+X1gUzSbnR+z11wPj/AeCpPDD3t7rvAAAAAElFTkSuQmCC",Xo=class extends To{constructor({blendFunction:e=lo,preset:t=Oo,edgeDetectionMode:n=Co,predicationMode:i=Mo}={}){let s,r;super("SMAAEffect","uniform sampler2D weightMap;varying vec2 vOffset0;varying vec2 vOffset1;void movec(const in bvec2 c,inout vec2 variable,const in vec2 value){if(c.x){variable.x=value.x;}if(c.y){variable.y=value.y;}}void movec(const in bvec4 c,inout vec4 variable,const in vec4 value){movec(c.xy,variable.xy,value.xy);movec(c.zw,variable.zw,value.zw);}void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec4 a;a.x=texture2D(weightMap,vOffset0).a;a.y=texture2D(weightMap,vOffset1).g;a.wz=texture2D(weightMap,uv).rb;vec4 color=inputColor;if(dot(a,vec4(1.0))>=1e-5){bool h=max(a.x,a.z)>max(a.y,a.w);vec4 blendingOffset=vec4(0.0,a.y,0.0,a.w);vec2 blendingWeight=a.yw;movec(bvec4(h),blendingOffset,vec4(a.x,0.0,a.z,0.0));movec(bvec2(h),blendingWeight,a.xz);blendingWeight/=dot(blendingWeight,vec2(1.0));vec4 blendingCoord=blendingOffset*vec4(texelSize,-texelSize)+uv.xyxy;color=blendingWeight.x*texture2D(inputBuffer,blendingCoord.xy);color+=blendingWeight.y*texture2D(inputBuffer,blendingCoord.zw);}outputColor=color;}",{vertexShader:"varying vec2 vOffset0;varying vec2 vOffset1;void mainSupport(const in vec2 uv){vOffset0=uv+texelSize*vec2(1.0,0.0);vOffset1=uv+texelSize*vec2(0.0,1.0);}",blendFunction:e,attributes:Zr|Xr,uniforms:new Map([["weightMap",new Z(null)]])}),arguments.length>1&&(s=arguments[0],r=arguments[1],arguments.length>2&&(t=arguments[2]),arguments.length>3&&(n=arguments[3])),this.renderTargetEdges=new X(1,1,{depthBuffer:!1}),this.renderTargetEdges.texture.name="SMAA.Edges",this.renderTargetWeights=this.renderTargetEdges.clone(),this.renderTargetWeights.texture.name="SMAA.Weights",this.uniforms.get("weightMap").value=this.renderTargetWeights.texture,this.clearPass=new Wr(!0,!1,!1),this.clearPass.overrideClearColor=new u(0),this.clearPass.overrideClearAlpha=1,this.edgeDetectionPass=new Do(new Qo),this.edgeDetectionMaterial.edgeDetectionMode=n,this.edgeDetectionMaterial.predicationMode=i,this.weightsPass=new Do(new Wo);const o=new J;o.onLoad=()=>{const e=new d(s);e.name="SMAA.Search",e.magFilter=$,e.minFilter=$,e.generateMipmaps=!1,e.needsUpdate=!0,e.flipY=!0,this.weightsMaterial.searchTexture=e;const t=new d(r);t.name="SMAA.Area",t.magFilter=ee,t.minFilter=ee,t.generateMipmaps=!1,t.needsUpdate=!0,t.flipY=!1,this.weightsMaterial.areaTexture=t,this.dispatchEvent({type:"load"})},o.itemStart("search"),o.itemStart("area"),void 0!==s&&void 0!==r?(o.itemEnd("search"),o.itemEnd("area")):"undefined"!=typeof Image&&(s=new Image,r=new Image,s.addEventListener("load",(()=>o.itemEnd("search"))),r.addEventListener("load",(()=>o.itemEnd("area"))),s.src=Yo,r.src=Ko),this.applyPreset(t)}get edgesTexture(){return this.renderTargetEdges.texture}getEdgesTexture(){return this.edgesTexture}get weightsTexture(){return this.renderTargetWeights.texture}getWeightsTexture(){return this.weightsTexture}get edgeDetectionMaterial(){return this.edgeDetectionPass.fullscreenMaterial}get colorEdgesMaterial(){return this.edgeDetectionMaterial}getEdgeDetectionMaterial(){return this.edgeDetectionMaterial}get weightsMaterial(){return this.weightsPass.fullscreenMaterial}getWeightsMaterial(){return this.weightsMaterial}setEdgeDetectionThreshold(e){this.edgeDetectionMaterial.edgeDetectionThreshold=e}setOrthogonalSearchSteps(e){this.weightsMaterial.orthogonalSearchSteps=e}applyPreset(e){const t=this.edgeDetectionMaterial,n=this.weightsMaterial;switch(e){case Po:t.edgeDetectionThreshold=.15,n.orthogonalSearchSteps=4,n.diagonalDetection=!1,n.cornerDetection=!1;break;case Oo:t.edgeDetectionThreshold=.1,n.orthogonalSearchSteps=8,n.diagonalDetection=!1,n.cornerDetection=!1;break;case Bo:t.edgeDetectionThreshold=.1,n.orthogonalSearchSteps=16,n.diagonalSearchSteps=8,n.cornerRounding=25,n.diagonalDetection=!0,n.cornerDetection=!0;break;case Io:t.edgeDetectionThreshold=.05,n.orthogonalSearchSteps=32,n.diagonalSearchSteps=16,n.cornerRounding=25,n.diagonalDetection=!0,n.cornerDetection=!0}}setDepthTexture(e,t=te){this.edgeDetectionMaterial.depthBuffer=e,this.edgeDetectionMaterial.depthPacking=t}update(e,t,n){this.clearPass.render(e,this.renderTargetEdges),this.edgeDetectionPass.render(e,t,this.renderTargetEdges),this.weightsPass.render(e,this.renderTargetEdges,this.renderTargetWeights)}setSize(e,t){this.edgeDetectionMaterial.setSize(e,t),this.weightsMaterial.setSize(e,t),this.renderTargetEdges.setSize(e,t),this.renderTargetWeights.setSize(e,t)}dispose(){const{searchTexture:e,areaTexture:t}=this.weightsMaterial;null!==e&&null!==t&&(e.dispose(),t.dispose()),super.dispose()}static get searchImageDataURL(){return Yo}static get areaImageDataURL(){return Ko}},Zo=class extends ae{constructor(){super({name:"AdaptiveLuminanceMaterial",defines:{MIP_LEVEL_1X1:"0.0"},uniforms:{luminanceBuffer0:new Z(null),luminanceBuffer1:new Z(null),minLuminance:new Z(.01),deltaTime:new Z(0),tau:new Z(1)},extensions:{shaderTextureLOD:!0},blending:ue,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#include \n#define packFloatToRGBA(v) packDepthToRGBA(v)\n#define unpackRGBAToFloat(v) unpackRGBAToDepth(v)\nuniform lowp sampler2D luminanceBuffer0;uniform lowp sampler2D luminanceBuffer1;uniform float minLuminance;uniform float deltaTime;uniform float tau;varying vec2 vUv;void main(){float l0=unpackRGBAToFloat(texture2D(luminanceBuffer0,vUv));\n#if __VERSION__ < 300\nfloat l1=texture2DLodEXT(luminanceBuffer1,vUv,MIP_LEVEL_1X1).r;\n#else\nfloat l1=textureLod(luminanceBuffer1,vUv,MIP_LEVEL_1X1).r;\n#endif\nl0=max(minLuminance,l0);l1=max(minLuminance,l1);float adaptedLum=l0+(l1-l0)*(1.0-exp(-deltaTime*tau));gl_FragColor=(adaptedLum==1.0)?vec4(1.0):packFloatToRGBA(adaptedLum);}",vertexShader:Hr})}set luminanceBuffer0(e){this.uniforms.luminanceBuffer0.value=e}setLuminanceBuffer0(e){this.uniforms.luminanceBuffer0.value=e}set luminanceBuffer1(e){this.uniforms.luminanceBuffer1.value=e}setLuminanceBuffer1(e){this.uniforms.luminanceBuffer1.value=e}set mipLevel1x1(e){this.defines.MIP_LEVEL_1X1=e.toFixed(1),this.needsUpdate=!0}setMipLevel1x1(e){this.mipLevel1x1=e}set deltaTime(e){this.uniforms.deltaTime.value=e}setDeltaTime(e){this.uniforms.deltaTime.value=e}get minLuminance(){return this.uniforms.minLuminance.value}set minLuminance(e){this.uniforms.minLuminance.value=e}getMinLuminance(){return this.uniforms.minLuminance.value}setMinLuminance(e){this.uniforms.minLuminance.value=e}get adaptationRate(){return this.uniforms.tau.value}set adaptationRate(e){this.uniforms.tau.value=e}getAdaptationRate(){return this.uniforms.tau.value}setAdaptationRate(e){this.uniforms.tau.value=e}},qo=class extends Nr{constructor(e,{minLuminance:t=.01,adaptationRate:n=1}={}){super("AdaptiveLuminancePass"),this.fullscreenMaterial=new Zo,this.needsSwap=!1,this.renderTargetPrevious=new X(1,1,{minFilter:$,magFilter:$,depthBuffer:!1}),this.renderTargetPrevious.texture.name="Luminance.Previous";const i=this.fullscreenMaterial;i.luminanceBuffer0=this.renderTargetPrevious.texture,i.luminanceBuffer1=e,i.minLuminance=t,i.adaptationRate=n,this.renderTargetAdapted=this.renderTargetPrevious.clone(),this.renderTargetAdapted.texture.name="Luminance.Adapted",this.copyPass=new _r(this.renderTargetPrevious,!1)}get texture(){return this.renderTargetAdapted.texture}getTexture(){return this.renderTargetAdapted.texture}set mipLevel1x1(e){this.fullscreenMaterial.mipLevel1x1=e}get adaptationRate(){return this.fullscreenMaterial.adaptationRate}set adaptationRate(e){this.fullscreenMaterial.adaptationRate=e}render(e,t,n,i,s){this.fullscreenMaterial.deltaTime=i,e.setRenderTarget(this.renderToScreen?null:this.renderTargetAdapted),e.render(this.scene,this.camera),this.copyPass.render(e,this.renderTargetAdapted)}},Jo=class extends To{constructor({blendFunction:e=lo,adaptive:t=!1,mode:n=(t?Uo:jo),resolution:i=256,maxLuminance:s=4,whitePoint:r=s,middleGrey:o=.6,minLuminance:a=.01,averageLuminance:l=1,adaptationRate:c=1}={}){super("ToneMappingEffect","#include \nuniform float whitePoint;\n#if TONE_MAPPING_MODE == 2 || TONE_MAPPING_MODE == 3\nuniform float middleGrey;\n#if TONE_MAPPING_MODE == 3\nuniform lowp sampler2D luminanceBuffer;\n#else\nuniform float averageLuminance;\n#endif\nvec3 Reinhard2ToneMapping(vec3 color){color*=toneMappingExposure;float l=luminance(color);\n#if TONE_MAPPING_MODE == 3\nfloat lumAvg=unpackRGBAToFloat(texture2D(luminanceBuffer,vec2(0.5)));\n#else\nfloat lumAvg=averageLuminance;\n#endif\nfloat lumScaled=(l*middleGrey)/max(lumAvg,1e-6);float lumCompressed=lumScaled*(1.0+lumScaled/(whitePoint*whitePoint));lumCompressed/=(1.0+lumScaled);return clamp(lumCompressed*color,0.0,1.0);}\n#elif TONE_MAPPING_MODE == 4\n#define A 0.15\n#define B 0.50\n#define C 0.10\n#define D 0.20\n#define E 0.02\n#define F 0.30\nvec3 Uncharted2Helper(const in vec3 x){return((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F;}vec3 Uncharted2ToneMapping(vec3 color){color*=toneMappingExposure;return clamp(Uncharted2Helper(color)/Uncharted2Helper(vec3(whitePoint)),0.0,1.0);}\n#endif\nvoid mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){\n#if TONE_MAPPING_MODE == 2 || TONE_MAPPING_MODE == 3\noutputColor=vec4(Reinhard2ToneMapping(inputColor.rgb),inputColor.a);\n#elif TONE_MAPPING_MODE == 4\noutputColor=vec4(Uncharted2ToneMapping(inputColor.rgb),inputColor.a);\n#else\noutputColor=vec4(toneMapping(inputColor.rgb),inputColor.a);\n#endif\n}",{blendFunction:e,uniforms:new Map([["luminanceBuffer",new Z(null)],["maxLuminance",new Z(s)],["whitePoint",new Z(r)],["middleGrey",new Z(o)],["averageLuminance",new Z(l)]])}),this.renderTargetLuminance=new X(1,1,{minFilter:ne,depthBuffer:!1}),this.renderTargetLuminance.texture.generateMipmaps=!0,this.renderTargetLuminance.texture.name="Luminance",this.luminancePass=new wo({renderTarget:this.renderTargetLuminance}),this.adaptiveLuminancePass=new qo(this.luminancePass.texture,{minLuminance:a,adaptationRate:c}),this.uniforms.get("luminanceBuffer").value=this.adaptiveLuminancePass.texture,this.resolution=i,this.mode=n}get mode(){return Number(this.defines.get("TONE_MAPPING_MODE"))}set mode(e){if(this.mode!==e){switch(this.defines.clear(),this.defines.set("TONE_MAPPING_MODE",e.toFixed(0)),e){case Lo:this.defines.set("toneMapping(texel)","LinearToneMapping(texel)");break;case Ro:this.defines.set("toneMapping(texel)","ReinhardToneMapping(texel)");break;case zo:this.defines.set("toneMapping(texel)","OptimizedCineonToneMapping(texel)");break;case ko:this.defines.set("toneMapping(texel)","ACESFilmicToneMapping(texel)");break;case jo:this.defines.set("toneMapping(texel)","AgXToneMapping(texel)");break;case No:this.defines.set("toneMapping(texel)","NeutralToneMapping(texel)");break;default:this.defines.set("toneMapping(texel)","texel")}this.adaptiveLuminancePass.enabled=e===Uo,this.setChanged()}}getMode(){return this.mode}setMode(e){this.mode=e}get whitePoint(){return this.uniforms.get("whitePoint").value}set whitePoint(e){this.uniforms.get("whitePoint").value=e}get middleGrey(){return this.uniforms.get("middleGrey").value}set middleGrey(e){this.uniforms.get("middleGrey").value=e}get averageLuminance(){return this.uniforms.get("averageLuminance").value}set averageLuminance(e){this.uniforms.get("averageLuminance").value=e}get adaptiveLuminanceMaterial(){return this.adaptiveLuminancePass.fullscreenMaterial}getAdaptiveLuminanceMaterial(){return this.adaptiveLuminanceMaterial}get resolution(){return this.luminancePass.resolution.width}set resolution(e){const t=Math.max(0,Math.ceil(Math.log2(e))),n=Math.pow(2,t);this.luminancePass.resolution.setPreferredSize(n,n),this.adaptiveLuminanceMaterial.mipLevel1x1=t}getResolution(){return this.resolution}setResolution(e){this.resolution=e}get adaptive(){return this.mode===Uo}set adaptive(e){this.mode=e?Uo:Fo}get adaptationRate(){return this.adaptiveLuminanceMaterial.adaptationRate}set adaptationRate(e){this.adaptiveLuminanceMaterial.adaptationRate=e}get distinction(){return console.warn(this.name,"distinction was removed."),1}set distinction(e){console.warn(this.name,"distinction was removed.")}update(e,t,n){this.adaptiveLuminancePass.enabled&&(this.luminancePass.render(e,t),this.adaptiveLuminancePass.render(e,null,null,n))}initialize(e,t,n){this.adaptiveLuminancePass.initialize(e,t,n)}},$o=class extends ae{constructor(e,t,n,i,s=!1){super({name:"EffectMaterial",defines:{THREE_REVISION:ie.replace(/\D+/g,""),DEPTH_PACKING:"0",ENCODE_OUTPUT:"1"},uniforms:{inputBuffer:new Z(null),depthBuffer:new Z(null),resolution:new Z(new f),texelSize:new Z(new f),cameraNear:new Z(.3),cameraFar:new Z(1e3),aspect:new Z(1),time:new Z(0)},blending:ue,toneMapped:!1,depthWrite:!1,depthTest:!1,dithering:s}),e&&this.setShaderParts(e),t&&this.setDefines(t),n&&this.setUniforms(n),this.copyCameraSettings(i)}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}get depthBuffer(){return this.uniforms.depthBuffer.value}set depthBuffer(e){this.uniforms.depthBuffer.value=e}get depthPacking(){return Number(this.defines.DEPTH_PACKING)}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e,t=te){this.depthBuffer=e,this.depthPacking=t}setShaderData(e){this.setShaderParts(e.shaderParts),this.setDefines(e.defines),this.setUniforms(e.uniforms),this.setExtensions(e.extensions)}setShaderParts(e){return this.fragmentShader="#include \n#include \n#include \n#define packFloatToRGBA(v) packDepthToRGBA(v)\n#define unpackRGBAToFloat(v) unpackRGBAToDepth(v)\n#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\n#if DEPTH_PACKING == 3201\nuniform lowp sampler2D depthBuffer;\n#elif defined(GL_FRAGMENT_PRECISION_HIGH)\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\nuniform vec2 resolution;uniform vec2 texelSize;uniform float cameraNear;uniform float cameraFar;uniform float aspect;uniform float time;varying vec2 vUv;vec4 sRGBToLinear(const in vec4 value){return vec4(mix(pow(value.rgb*0.9478672986+vec3(0.0521327014),vec3(2.4)),value.rgb*0.0773993808,vec3(lessThanEqual(value.rgb,vec3(0.04045)))),value.a);}float readDepth(const in vec2 uv){\n#if DEPTH_PACKING == 3201\nreturn unpackRGBAToDepth(texture2D(depthBuffer,uv));\n#else\nreturn texture2D(depthBuffer,uv).r;\n#endif\n}float getViewZ(const in float depth){\n#ifdef PERSPECTIVE_CAMERA\nreturn perspectiveDepthToViewZ(depth,cameraNear,cameraFar);\n#else\nreturn orthographicDepthToViewZ(depth,cameraNear,cameraFar);\n#endif\n}vec3 RGBToHCV(const in vec3 RGB){vec4 P=mix(vec4(RGB.bg,-1.0,2.0/3.0),vec4(RGB.gb,0.0,-1.0/3.0),step(RGB.b,RGB.g));vec4 Q=mix(vec4(P.xyw,RGB.r),vec4(RGB.r,P.yzx),step(P.x,RGB.r));float C=Q.x-min(Q.w,Q.y);float H=abs((Q.w-Q.y)/(6.0*C+EPSILON)+Q.z);return vec3(H,C,Q.x);}vec3 RGBToHSL(const in vec3 RGB){vec3 HCV=RGBToHCV(RGB);float L=HCV.z-HCV.y*0.5;float S=HCV.y/(1.0-abs(L*2.0-1.0)+EPSILON);return vec3(HCV.x,S,L);}vec3 HueToRGB(const in float H){float R=abs(H*6.0-3.0)-1.0;float G=2.0-abs(H*6.0-2.0);float B=2.0-abs(H*6.0-4.0);return clamp(vec3(R,G,B),0.0,1.0);}vec3 HSLToRGB(const in vec3 HSL){vec3 RGB=HueToRGB(HSL.x);float C=(1.0-abs(2.0*HSL.z-1.0))*HSL.y;return(RGB-0.5)*C+HSL.z;}FRAGMENT_HEAD void main(){FRAGMENT_MAIN_UV vec4 color0=texture2D(inputBuffer,UV);vec4 color1=vec4(0.0);FRAGMENT_MAIN_IMAGE color0.a=clamp(color0.a,0.0,1.0);gl_FragColor=color0;\n#ifdef ENCODE_OUTPUT\n#include \n#endif\n#include \n}".replace(qr.FRAGMENT_HEAD,e.get(qr.FRAGMENT_HEAD)||"").replace(qr.FRAGMENT_MAIN_UV,e.get(qr.FRAGMENT_MAIN_UV)||"").replace(qr.FRAGMENT_MAIN_IMAGE,e.get(qr.FRAGMENT_MAIN_IMAGE)||""),this.vertexShader="uniform vec2 resolution;uniform vec2 texelSize;uniform float cameraNear;uniform float cameraFar;uniform float aspect;uniform float time;varying vec2 vUv;VERTEX_HEAD void main(){vUv=position.xy*0.5+0.5;VERTEX_MAIN_SUPPORT gl_Position=vec4(position.xy,1.0,1.0);}".replace(qr.VERTEX_HEAD,e.get(qr.VERTEX_HEAD)||"").replace(qr.VERTEX_MAIN_SUPPORT,e.get(qr.VERTEX_MAIN_SUPPORT)||""),this.needsUpdate=!0,this}setDefines(e){for(const t of e.entries())this.defines[t[0]]=t[1];return this.needsUpdate=!0,this}setUniforms(e){for(const t of e.entries())this.uniforms[t[0]]=t[1];return this}setExtensions(e){this.extensions={};for(const t of e)this.extensions[t]=!0;return this}get encodeOutput(){return void 0!==this.defines.ENCODE_OUTPUT}set encodeOutput(e){this.encodeOutput!==e&&(e?this.defines.ENCODE_OUTPUT="1":delete this.defines.ENCODE_OUTPUT,this.needsUpdate=!0)}isOutputEncodingEnabled(e){return this.encodeOutput}setOutputEncodingEnabled(e){this.encodeOutput=e}get time(){return this.uniforms.time.value}set time(e){this.uniforms.time.value=e}setDeltaTime(e){this.uniforms.time.value+=e}adoptCameraSettings(e){this.copyCameraSettings(e)}copyCameraSettings(e){e&&(this.uniforms.cameraNear.value=e.near,this.uniforms.cameraFar.value=e.far,e instanceof pe?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}setSize(e,t){const n=this.uniforms;n.resolution.value.set(e,t),n.texelSize.value.set(1/e,1/t),n.aspect.value=e/t}static get Section(){return qr}};function ea(e,t,n){for(const i of t){const t="$1"+e+i.charAt(0).toUpperCase()+i.slice(1),s=new RegExp("([^\\.])(\\b"+i+"\\b)","g");for(const e of n.entries())null!==e[1]&&n.set(e[0],e[1].replace(s,t))}}function ta(e,t,n){let i=t.getFragmentShader(),s=t.getVertexShader();const r=void 0!==i&&/mainImage/.test(i),o=void 0!==i&&/mainUv/.test(i);if(n.attributes|=t.getAttributes(),void 0===i)throw new Error(`Missing fragment shader (${t.name})`);if(o&&0!=(n.attributes&Zr))throw new Error(`Effects that transform UVs are incompatible with convolution effects (${t.name})`);if(!r&&!o)throw new Error(`Could not find mainImage or mainUv function (${t.name})`);{const a=/\w+\s+(\w+)\([\w\s,]*\)\s*{/g,l=n.shaderParts;let c=l.get(qr.FRAGMENT_HEAD)||"",h=l.get(qr.FRAGMENT_MAIN_UV)||"",u=l.get(qr.FRAGMENT_MAIN_IMAGE)||"",d=l.get(qr.VERTEX_HEAD)||"",p=l.get(qr.VERTEX_MAIN_SUPPORT)||"";const f=new Set,m=new Set;if(o&&(h+=`\t${e}MainUv(UV);\n`,n.uvTransformation=!0),null!==s&&/mainSupport/.test(s)){const t=/mainSupport *\([\w\s]*?uv\s*?\)/.test(s);p+=`\t${e}MainSupport(`,p+=t?"vUv);\n":");\n";for(const e of s.matchAll(/(?:varying\s+\w+\s+([\S\s]*?);)/g))for(const t of e[1].split(/\s*,\s*/))n.varyings.add(t),f.add(t),m.add(t);for(const e of s.matchAll(a))m.add(e[1])}for(const e of i.matchAll(a))m.add(e[1]);for(const e of t.defines.keys())m.add(e.replace(/\([\w\s,]*\)/g,""));for(const e of t.uniforms.keys())m.add(e);m.delete("while"),m.delete("for"),m.delete("if"),t.uniforms.forEach(((t,i)=>n.uniforms.set(e+i.charAt(0).toUpperCase()+i.slice(1),t))),t.defines.forEach(((t,i)=>n.defines.set(e+i.charAt(0).toUpperCase()+i.slice(1),t)));const g=new Map([["fragment",i],["vertex",s]]);ea(e,m,n.defines),ea(e,m,g),i=g.get("fragment"),s=g.get("vertex");const v=t.blendMode;if(n.blendModes.set(v.blendFunction,v),r){null!==t.inputColorSpace&&t.inputColorSpace!==n.colorSpace&&(u+=t.inputColorSpace===_?"color0 = sRGBTransferOETF(color0);\n\t":"color0 = sRGBToLinear(color0);\n\t"),t.outputColorSpace!==he?n.colorSpace=t.outputColorSpace:null!==t.inputColorSpace&&(n.colorSpace=t.inputColorSpace);const s=/MainImage *\([\w\s,]*?depth[\w\s,]*?\)/;u+=`${e}MainImage(color0, UV, `,0!=(n.attributes&Xr)&&s.test(i)&&(u+="depth, ",n.readDepth=!0),u+="color1);\n\t";const r=e+"BlendOpacity";n.uniforms.set(r,v.opacity),u+=`color0 = blend${v.blendFunction}(color0, color1, ${r});\n\n\t`,c+=`uniform float ${r};\n\n`}if(c+=i+"\n",null!==s&&(d+=s+"\n"),l.set(qr.FRAGMENT_HEAD,c),l.set(qr.FRAGMENT_MAIN_UV,h),l.set(qr.FRAGMENT_MAIN_IMAGE,u),l.set(qr.VERTEX_HEAD,d),l.set(qr.VERTEX_MAIN_SUPPORT,p),null!==t.extensions)for(const e of t.extensions)n.extensions.add(e)}}Number(ie.replace(/\D+/g,""));var na=class extends Nr{constructor(e,...t){super("EffectPass"),this.fullscreenMaterial=new $o(null,null,null,e),this.listener=e=>this.handleEvent(e),this.effects=[],this.setEffects(t),this.skipRendering=!1,this.minTime=1,this.maxTime=Number.POSITIVE_INFINITY,this.timeScale=1}set mainScene(e){for(const t of this.effects)t.mainScene=e}set mainCamera(e){this.fullscreenMaterial.copyCameraSettings(e);for(const t of this.effects)t.mainCamera=e}get encodeOutput(){return this.fullscreenMaterial.encodeOutput}set encodeOutput(e){this.fullscreenMaterial.encodeOutput=e}get dithering(){return this.fullscreenMaterial.dithering}set dithering(e){const t=this.fullscreenMaterial;t.dithering=e,t.needsUpdate=!0}setEffects(e){for(const e of this.effects)e.removeEventListener("change",this.listener);this.effects=e.sort(((e,t)=>t.attributes-e.attributes));for(const e of this.effects)e.addEventListener("change",this.listener)}updateMaterial(){const e=new class{constructor(){this.shaderParts=new Map([[qr.FRAGMENT_HEAD,null],[qr.FRAGMENT_MAIN_UV,null],[qr.FRAGMENT_MAIN_IMAGE,null],[qr.VERTEX_HEAD,null],[qr.VERTEX_MAIN_SUPPORT,null]]),this.defines=new Map,this.uniforms=new Map,this.blendModes=new Map,this.extensions=new Set,this.attributes=Kr,this.varyings=new Set,this.uvTransformation=!1,this.readDepth=!1,this.colorSpace=ce}};let t=0;for(const n of this.effects)if(n.blendMode.blendFunction===ro)e.attributes|=n.getAttributes()&Xr;else{if(0!=(e.attributes&n.getAttributes()&Zr))throw new Error(`Convolution effects cannot be merged (${n.name})`);ta("e"+t++,n,e)}let n=e.shaderParts.get(qr.FRAGMENT_HEAD),i=e.shaderParts.get(qr.FRAGMENT_MAIN_IMAGE),s=e.shaderParts.get(qr.FRAGMENT_MAIN_UV);const r=/\bblend\b/g;for(const t of e.blendModes.values())n+=t.getShaderCode().replace(r,`blend${t.blendFunction}`)+"\n";0!=(e.attributes&Xr)?(e.readDepth&&(i="float depth = readDepth(UV);\n\n\t"+i),this.needsDepthTexture=null===this.getDepthTexture()):this.needsDepthTexture=!1,e.colorSpace===_&&(i+="color0 = sRGBToLinear(color0);\n\t"),e.uvTransformation?(s="vec2 transformedUv = vUv;\n"+s,e.defines.set("UV","transformedUv")):e.defines.set("UV","vUv"),e.shaderParts.set(qr.FRAGMENT_HEAD,n),e.shaderParts.set(qr.FRAGMENT_MAIN_IMAGE,i),e.shaderParts.set(qr.FRAGMENT_MAIN_UV,s);for(const[t,n]of e.shaderParts)null!==n&&e.shaderParts.set(t,n.trim().replace(/^#/,"\n#"));this.skipRendering=0===t,this.needsSwap=!this.skipRendering,this.fullscreenMaterial.setShaderData(e)}recompile(){this.updateMaterial()}getDepthTexture(){return this.fullscreenMaterial.depthBuffer}setDepthTexture(e,t=te){this.fullscreenMaterial.depthBuffer=e,this.fullscreenMaterial.depthPacking=t;for(const n of this.effects)n.setDepthTexture(e,t)}render(e,t,n,i,s){for(const n of this.effects)n.update(e,t,i);if(!this.skipRendering||this.renderToScreen){const s=this.fullscreenMaterial;s.inputBuffer=t.texture,s.time+=i*this.timeScale,e.setRenderTarget(this.renderToScreen?null:n),e.render(this.scene,this.camera)}}setSize(e,t){this.fullscreenMaterial.setSize(e,t);for(const n of this.effects)n.setSize(e,t)}initialize(e,t,n){this.renderer=e;for(const i of this.effects)i.initialize(e,t,n);this.updateMaterial(),void 0!==n&&n!==V&&(this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}dispose(){super.dispose();for(const e of this.effects)e.removeEventListener("change",this.listener),e.dispose()}handleEvent(e){if("change"===e.type)this.recompile()}},ia="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function sa(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){if(this instanceof e){var n=[null];return n.push.apply(n,arguments),new(Function.bind.apply(t,n))}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,i.get?i:{enumerable:!0,get:function(){return e[t]}})})),n}function ra(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var oa={},aa={get exports(){return oa},set exports(e){oa=e}};aa.exports=function e(t,n,i){function s(o,a){if(!n[o]){if(!t[o]){if(!a&&ra)return ra(o);if(r)return r(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[o]={exports:{}};t[o][0].call(c.exports,(function(e){var n=t[o][1][e];return s(n||e)}),c,c.exports,e,t,n,i)}return n[o].exports}for(var r=ra,o=0;o=43)}})).catch((function(){return!1}))}function b(e){return"boolean"==typeof m?c.resolve(m):A(e).then((function(e){return m=e}))}function T(e){var t=g[e.name],n={};n.promise=new c((function(e,t){n.resolve=e,n.reject=t})),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then((function(){return n.promise})):t.dbReady=n.promise}function S(e){var t=g[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function D(e,t){var n=g[e.name].deferredOperations.pop();if(n)return n.reject(t),n.promise}function E(e,t){return new c((function(n,i){if(g[e.name]=g[e.name]||U(),e.db){if(!t)return n(e.db);T(e),e.db.close()}var s=[e.name];t&&s.push(e.version);var r=o.open.apply(o,s);t&&(r.onupgradeneeded=function(t){var n=r.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore(f)}catch(n){if("ConstraintError"!==n.name)throw n;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),r.onerror=function(e){e.preventDefault(),i(r.error)},r.onsuccess=function(){n(r.result),S(e)}}))}function C(e){return E(e,!1)}function M(e){return E(e,!0)}function P(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),i=e.versione.db.version;if(i&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),s||n){if(n){var r=e.db.version+1;r>e.version&&(e.version=r)}return!0}return!1}function O(e){return new c((function(t,n){var i=new FileReader;i.onerror=n,i.onloadend=function(n){var i=btoa(n.target.result||"");t({__local_forage_encoded_blob:!0,data:i,type:e.type})},i.readAsBinaryString(e)}))}function B(e){return l([x(atob(e.data))],{type:e.type})}function I(e){return e&&e.__local_forage_encoded_blob}function L(e){var t=this,n=t._initReady().then((function(){var e=g[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return u(n,e,e),n}function R(e){T(e);for(var t=g[e.name],n=t.forages,i=0;i0&&(!e.db||"InvalidStateError"===s.name||"NotFoundError"===s.name))return c.resolve().then((function(){if(!e.db||"NotFoundError"===s.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),M(e)})).then((function(){return R(e).then((function(){F(e,t,n,i-1)}))})).catch(n);n(s)}}function U(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function z(e){var t=this,n={db:null};if(e)for(var i in e)n[i]=e[i];var s=g[n.name];s||(s=U(),g[n.name]=s),s.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=L);var r=[];function o(){return c.resolve()}for(var a=0;a>4,h[l++]=(15&i)<<4|s>>2,h[l++]=(3&s)<<6|63&r;return c}function fe(e){var t,n=new Uint8Array(e),i="";for(t=0;t>2],i+=X[(3&n[t])<<4|n[t+1]>>4],i+=X[(15&n[t+1])<<2|n[t+2]>>6],i+=X[63&n[t+2]];return n.length%3==2?i=i.substring(0,i.length-1)+"=":n.length%3==1&&(i=i.substring(0,i.length-2)+"=="),i}function me(e,t){var n="";if(e&&(n=de.call(e)),e&&("[object ArrayBuffer]"===n||e.buffer&&"[object ArrayBuffer]"===de.call(e.buffer))){var i,s=J;e instanceof ArrayBuffer?(i=e,s+=ee):(i=e.buffer,"[object Int8Array]"===n?s+=ne:"[object Uint8Array]"===n?s+=ie:"[object Uint8ClampedArray]"===n?s+=se:"[object Int16Array]"===n?s+=re:"[object Uint16Array]"===n?s+=ae:"[object Int32Array]"===n?s+=oe:"[object Uint32Array]"===n?s+=le:"[object Float32Array]"===n?s+=ce:"[object Float64Array]"===n?s+=he:t(new Error("Failed to get type for BinaryArray"))),t(s+fe(i))}else if("[object Blob]"===n){var r=new FileReader;r.onload=function(){var n=Z+e.type+"~"+fe(this.result);t(J+te+n)},r.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(n){console.error("Couldn't convert value into a JSON string: ",e),t(null,n)}}function ge(e){if(e.substring(0,$)!==J)return JSON.parse(e);var t,n=e.substring(ue),i=e.substring($,ue);if(i===te&&q.test(n)){var s=n.match(q);t=s[1],n=n.substring(s[0].length)}var r=pe(n);switch(i){case ee:return r;case te:return l([r],{type:t});case ne:return new Int8Array(r);case ie:return new Uint8Array(r);case se:return new Uint8ClampedArray(r);case re:return new Int16Array(r);case ae:return new Uint16Array(r);case oe:return new Int32Array(r);case le:return new Uint32Array(r);case ce:return new Float32Array(r);case he:return new Float64Array(r);default:throw new Error("Unkown type: "+i)}}var ve={serialize:me,deserialize:ge,stringToBuffer:pe,bufferToString:fe};function ye(e,t,n,i){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,i)}function we(e){var t=this,n={db:null};if(e)for(var i in e)n[i]="string"!=typeof e[i]?e[i].toString():e[i];var s=new c((function(e,i){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(e){return i(e)}n.db.transaction((function(s){ye(s,n,(function(){t._dbInfo=n,e()}),(function(e,t){i(t)}))}),i)}));return n.serializer=ve,s}function xe(e,t,n,i,s,r){e.executeSql(n,i,s,(function(e,o){o.code===o.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,a){a.rows.length?r(e,o):ye(e,t,(function(){e.executeSql(n,i,s,r)}),r)}),r):r(e,o)}),r)}function Ae(e,t){var n=this;e=d(e);var i=new c((function(t,i){n.ready().then((function(){var s=n._dbInfo;s.db.transaction((function(n){xe(n,s,"SELECT * FROM "+s.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,n){var i=n.rows.length?n.rows.item(0).value:null;i&&(i=s.serializer.deserialize(i)),t(i)}),(function(e,t){i(t)}))}))})).catch(i)}));return h(i,t),i}function be(e,t){var n=this,i=new c((function(t,i){n.ready().then((function(){var s=n._dbInfo;s.db.transaction((function(n){xe(n,s,"SELECT * FROM "+s.storeName,[],(function(n,i){for(var r=i.rows,o=r.length,a=0;a0)return void r(Te.apply(s,[e,a,n,i-1]));o(t)}}))}))})).catch(o)}));return h(r,n),r}function Se(e,t,n){return Te.apply(this,[e,t,n,1])}function De(e,t){var n=this;e=d(e);var i=new c((function(t,i){n.ready().then((function(){var s=n._dbInfo;s.db.transaction((function(n){xe(n,s,"DELETE FROM "+s.storeName+" WHERE key = ?",[e],(function(){t()}),(function(e,t){i(t)}))}))})).catch(i)}));return h(i,t),i}function Ee(e){var t=this,n=new c((function(e,n){t.ready().then((function(){var i=t._dbInfo;i.db.transaction((function(t){xe(t,i,"DELETE FROM "+i.storeName,[],(function(){e()}),(function(e,t){n(t)}))}))})).catch(n)}));return h(n,e),n}function Ce(e){var t=this,n=new c((function(e,n){t.ready().then((function(){var i=t._dbInfo;i.db.transaction((function(t){xe(t,i,"SELECT COUNT(key) as c FROM "+i.storeName,[],(function(t,n){var i=n.rows.item(0).c;e(i)}),(function(e,t){n(t)}))}))})).catch(n)}));return h(n,e),n}function Me(e,t){var n=this,i=new c((function(t,i){n.ready().then((function(){var s=n._dbInfo;s.db.transaction((function(n){xe(n,s,"SELECT key FROM "+s.storeName+" WHERE id = ? LIMIT 1",[e+1],(function(e,n){var i=n.rows.length?n.rows.item(0).key:null;t(i)}),(function(e,t){i(t)}))}))})).catch(i)}));return h(i,t),i}function Pe(e){var t=this,n=new c((function(e,n){t.ready().then((function(){var i=t._dbInfo;i.db.transaction((function(t){xe(t,i,"SELECT key FROM "+i.storeName,[],(function(t,n){for(var i=[],s=0;s '__WebKitDatabaseInfoTable__'",[],(function(n,i){for(var s=[],r=0;r0}function ze(e){var t=this,n={};if(e)for(var i in e)n[i]=e[i];return n.keyPrefix=Re(e,t._defaultConfig),Ue()?(t._dbInfo=n,n.serializer=ve,c.resolve()):c.reject()}function ke(e){var t=this,n=t.ready().then((function(){for(var e=t._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var i=localStorage.key(n);0===i.indexOf(e)&&localStorage.removeItem(i)}}));return h(n,e),n}function je(e,t){var n=this;e=d(e);var i=n.ready().then((function(){var t=n._dbInfo,i=localStorage.getItem(t.keyPrefix+e);return i&&(i=t.serializer.deserialize(i)),i}));return h(i,t),i}function Ne(e,t){var n=this,i=n.ready().then((function(){for(var t=n._dbInfo,i=t.keyPrefix,s=i.length,r=localStorage.length,o=1,a=0;a=0;t--){var n=localStorage.key(t);0===n.indexOf(e)&&localStorage.removeItem(n)}})):c.reject("Invalid arguments"),h(i,t),i}var Ye={_driver:"localStorageWrapper",_initStorage:ze,_support:Le(),iterate:Ne,getItem:je,setItem:Qe,removeItem:_e,clear:ke,length:Ve,key:Ge,keys:He,dropInstance:We},Ke=function(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)},Xe=function(e,t){for(var n=e.length,i=0;i{var n;if(e.geometry&&e.material){const n=e;n.geometry.dispose(),Ui(n.material,t)}e instanceof jl&&(null===(n=e.element)||void 0===n||n.remove());const{meshOfModelList:i,poiIconList:s,otherObjList:r}=this.intersectsList,o=i.findIndex((t=>t.uuid===e.uuid)),a=s.findIndex((t=>t.uuid===e.uuid)),l=r.findIndex((t=>t.uuid===e.uuid));o>-1&&this.intersectsList.meshOfModelList.splice(o,1),a>-1&&this.intersectsList.poiIconList.splice(a,1),l>-1&&this.intersectsList.otherObjList.splice(l,1)})),e.removeFromParent(),this.signals.objectRemoved.dispatch(e)}openSceneFog(e={}){const{color:t=13426943,density:n=.002}=e;this.scene.fog=new ye(t,n),this.signals.sceneChanged.dispatch()}closeSceneFog(){this.scene.fog=null,this.signals.sceneChanged.dispatch()}edgeShow(e,t){const n=[],i=e=>{-1===this.selectedObjects.edge.findIndex((t=>t.uuid===e.uuid))&&n.push(e)};return ts(e)?e.forEach((e=>i(e))):ns(e)&&i(e),this.selectedObjects.edge=[...this.selectedObjects.edge,...n],this.signals.outlineChange.dispatch({objects:this.selectedObjects.edge,options:t}),Promise.resolve()}unEdgeShow(e){e||(e=[...this.selectedObjects.edge]);const t=e=>{const t=this.selectedObjects.edge.findIndex((t=>t.uuid===e.uuid));return-1===t||(this.selectedObjects.edge.splice(t,1),this.signals.outlineChange.dispatch({objects:this.selectedObjects.edge})),Promise.resolve()};return ts(e)?Promise.all(e.map((e=>t(e)))):ns(e)?t(e):Promise.resolve()}strokeShow(e,t={}){const{isOpacityShow:n=!0,color:i=4647927,opacity:s=.2,edgeColor:r=61183,edgeOpacity:o=1,modelCache:a=!0,firstChild:l=!1}=t,c=async e=>{var c;if(-1!==this.selectedObjects.stroke.findIndex((t=>t.uuid===e.uuid)))return Promise.resolve();if(e.userData.strokeGroup)return Promise.resolve();const h=new zl({id:`${null!==(c=e.sid)&&void 0!==c?c:e.id}_stroke`,name:`${e.name}_stroke`}),u=new we,d=new w({color:r,transparent:!0,opacity:o});u.material=d,h.add(u);let p=null;const f=()=>{const t=[];if((l?e.children[0]:e).traverse((n=>{if("Mesh"===n.type&&n instanceof se){const i=new xe(n.geometry,89);n.updateWorldMatrix(!0,!1);const s=n.matrixWorld.clone().premultiply(e.matrixWorld.clone().invert());i.applyMatrix4(s),t.push(i)}})),0!==t.length)return Qt(t)};if(a&&e instanceof Nl&&e.url){const{url:t}=e;await this.strokeStore.ready();const n=await this.strokeStore.getItem(t);if(n)p=new v,p.setAttribute("position",new y(n,3));else{const e=f();if(e){p=e;const n=e.getAttribute("position");n.array instanceof Float32Array&&this.strokeStore.setItem(t,n.array.buffer)}}}else{const e=f();e&&(p=e)}return null!==p?(u.geometry=p,e.userData.strokeGroup=h,e.userData.strokeOptions=t,this.addObject(h,e),this.selectedObjects.stroke.push(e),n&&this.opacityShow(l?e.children[0]:e,{color:i,opacity:s}),Promise.resolve()):void 0};return ts(e)?Promise.all(e.map((e=>c(e)))):ns(e)?c(e):Promise.resolve()}unStrokeShow(e){e||(e=[...this.selectedObjects.stroke]);const t=e=>{if(!e.userData.strokeGroup)return Promise.resolve();this.removeObject(e.userData.strokeGroup),Reflect.deleteProperty(e.userData,"strokeGroup");const t=this.selectedObjects.stroke.findIndex((t=>t.uuid===e.uuid));if(-1===t)return Promise.resolve();this.selectedObjects.stroke.splice(t,1),this.signals.geometryChanged.dispatch();const{firstChild:n}=e.userData.strokeOptions;return this.unOpacityShow(n?e.children[0]:e),Reflect.deleteProperty(e.userData,"strokeOptions"),Promise.resolve()};return ts(e)?Promise.all(e.map((e=>t(e)))):ns(e)?t(e):Promise.resolve()}opacityShow(e,t={}){const{color:n="#fff",opacity:i=.8}=t;function s(e){const t=zi(e);return t.map=null,t.transparent=i<1,t.depthWrite=!t.transparent,t.color.set(n),t.opacity=i,t}const r=e=>(-1!==this.selectedObjects.opacity.findIndex((t=>t.uuid===e.uuid))||(e.traverse((e=>{if(e instanceof se){if(e.userData.material)return;e.userData.material=e.material,e.material=Ui(e.material,s)}})),this.signals.materialChanged.dispatch(),this.selectedObjects.opacity.push(e)),Promise.resolve());return ts(e)?Promise.all(e.map((e=>r(e)))):ns(e)?r(e):Promise.resolve()}unOpacityShow(e){e||(e=[...this.selectedObjects.opacity]);const t=e=>new Promise((t=>{const n=this.selectedObjects.opacity.findIndex((t=>t.uuid===e.uuid));-1===n&&t(),this.selectedObjects.opacity.splice(n,1),e.traverse((e=>{if(e instanceof se){if(!e.userData.material)return;ki(e.material),e.material=e.userData.material,Reflect.deleteProperty(e.userData,"material")}})),this.signals.materialChanged.dispatch(),t()}));return ts(e)?Promise.all(e.map((e=>t(e)))):ns(e)?t(e):Promise.resolve()}highlightShow(e,t={}){const{color:n="red",opacity:i=1}=t;function s(e){e instanceof Ae&&(e.color=new u(n),e.opacity=i,e.transparent=i<1,e.depthWrite=!e.transparent)}const r=e=>(-1!==this.selectedObjects.highlight.findIndex((t=>t.uuid===e.uuid))||(e.traverse((e=>{if(e instanceof se){if(e.userData.material)return;e.userData.material=e.material,e.material=zi(e.material),Ui(e.material,s)}})),this.signals.materialChanged.dispatch(),this.selectedObjects.highlight.push(e)),Promise.resolve());return ts(e)?Promise.all(e.map((e=>r(e)))):ns(e)?r(e):Promise.resolve()}unHighlightShow(e){e||(e=[...this.selectedObjects.highlight]);const t=e=>new Promise((t=>{const n=this.selectedObjects.highlight.findIndex((t=>t.uuid===e.uuid));-1===n&&t(),this.selectedObjects.highlight.splice(n,1),e.traverse((e=>{if(e instanceof se){if(!e.userData.material)return;ki(e.material),e.material=e.userData.material,Reflect.deleteProperty(e.userData,"material")}})),this.signals.materialChanged.dispatch(),t()}));return ts(e)?Promise.all(e.map((e=>t(e)))):ns(e)?t(e):Promise.resolve()}emissiveShow(e,t={}){const{color:n="red",baseColor:i,maxOpacity:s=1,minOpacity:r=0,duration:o=1e3,yoyo:a=!1}=t;function l(e){e instanceof Ae&&(i&&e.color.set(i),e.emissive.set(n),e.emissiveIntensity=s,0!==o&&ps({emissiveIntensity:s},{emissiveIntensity:r},{duration:o,yoyo:a,repeat:!0},(t=>e.emissiveIntensity=t.emissiveIntensity),(t=>e.userData.animation=t)))}const c=e=>(-1!==this.selectedObjects.emissive.findIndex((t=>t.uuid===e.uuid))||(e.traverse((e=>{if(e instanceof se){if(e.userData.material)return;e.userData.material=e.material,e.material=zi(e.material),Ui(e.material,l)}})),this.selectedObjects.emissive.push(e),this.signals.materialChanged.dispatch()),Promise.resolve());return ts(e)?Promise.all(e.map((e=>c(e)))):ns(e)?c(e):Promise.resolve()}unEmissiveShow(e){function t(e){e.userData.animation&&zt.remove(e.userData.animation)}e||(e=[...this.selectedObjects.emissive]);const n=e=>new Promise((n=>{const i=this.selectedObjects.emissive.findIndex((t=>t.uuid===e.uuid));-1===i&&n(),this.selectedObjects.emissive.splice(i,1),e.traverse((e=>{if(e instanceof se){if(!e.userData.material)return;Ui(e.material,t),ki(e.material),e.material=e.userData.material,Reflect.deleteProperty(e.userData,"material")}})),this.signals.materialChanged.dispatch(),n()}));return ts(e)?Promise.all(e.map((e=>n(e)))):ns(e)?n(e):Promise.resolve()}_triggerObjectAdded(e){if(e instanceof Fl)if("Model"===e.stype)e.traverse((e=>{if(e instanceof se){-1===this.intersectsList.meshOfModelList.findIndex((t=>t.uuid===e.uuid))&&this.intersectsList.meshOfModelList.push(e)}}));else if("Poi"===e.stype&&e instanceof Gl){const t=this.intersectsList.poiIconList.findIndex((t=>{var n;return t.uuid===(null===(n=e.icon)||void 0===n?void 0:n.uuid)}));-1===t&&e.icon&&this.intersectsList.poiIconList.push(e.icon)}else"Group"===e.stype?e.children.forEach((e=>this._triggerObjectAdded(e))):e.isObject3D&&e.traverse((e=>{if(e instanceof se){-1===this.intersectsList.otherObjList.findIndex((t=>t.uuid===e.uuid))&&this.intersectsList.otherObjList.push(e)}}));else e.isObject3D&&e.traverse((e=>{if(e instanceof se){-1===this.intersectsList.otherObjList.findIndex((t=>t.uuid===e.uuid))&&this.intersectsList.otherObjList.push(e)}}))}}class ha extends o{constructor(e=document.createElement("div")){super(),this.isCSS2DObject=!0,this.element=e,this.element.style.position="absolute",this.addEventListener("removed",(()=>{this.traverse((function(e){e instanceof ha&&e.element instanceof Element&&null!==e.element.parentNode&&e.element.parentNode.removeChild(e.element)}))}))}copy(e,t){return super.copy(e,t),this.element=e.element.cloneNode(!0),this}}const ua=new t,da=new m,pa=new m,fa=new t,ma=new t;class ga{constructor(e){let t,n,i,s;this.viewport=e,this.domElement=document.createElement("div");const r={objects:new WeakMap};this.domElement.style.overflow="hidden",this.getSize=function(){return{width:t,height:n}},this.render=function(e,t){!0===e.matrixWorldAutoUpdate&&e.updateMatrixWorld(),null===t.parent&&!0===t.matrixWorldAutoUpdate&&t.updateMatrixWorld(),da.copy(t.matrixWorldInverse),pa.multiplyMatrices(t.projectionMatrix,da),o(e,e,t),function(e){const t=function(e){const t=[];return e.traverse((function(e){e instanceof ha&&t.push(e)})),t}(e).sort((function(e,t){if(e.renderOrder!==t.renderOrder)return t.renderOrder-e.renderOrder;return r.objects.get(e).distanceToCameraSquared-r.objects.get(t).distanceToCameraSquared})),n=t.length;for(let e=0,i=t.length;e{t=e,n=r,i=t/2,s=n/2,this.domElement.style.width=e+"px",this.domElement.style.height=r+"px"};const o=(e,t,n)=>{var l;if(e instanceof ha){Qi(e,this.viewport);const t=e.parent;ua.setFromMatrixPosition(e.matrixWorld),ua.applyMatrix4(pa);const o=Si(e)&&ua.z>=-1&&ua.z<=1&&!0===e.layers.test(n.layers);if(e.userData.prevVisible!==o&&(null===(l=t.onChange)||void 0===l||l.call(t,o),t.elementAutoDisplay&&(e.element.style.display=!0===o?"":"none")),e.userData.prevVisible=o,!0===o||!1===t.elementAutoDisplay){const t=e.element;t.style.transform="translate(-50%,-50%) translate("+(ua.x*i+i)+"px,"+(-ua.y*s+s)+"px)",t.parentNode!==this.domElement&&this.domElement.appendChild(t)}const c={distanceToCameraSquared:a(n,e)};r.objects.set(e,c)}for(let i=0,s=e.children.length;i{this.traverse((function(e){e instanceof xa&&e.element instanceof Element&&null!==e.element.parentNode&&e.element.parentNode.removeChild(e.element)}))}))}copy(e,t){return super.copy(e,t),this.element=e.element.cloneNode(!0),this}}class Aa extends xa{constructor(e){super(e),this.isCSS3DSprite=!0,this.rotation2D=0}copy(e,t){return super.copy(e,t),this.rotation2D=e.rotation2D,this}}const ba=new m,Ta=new m;class Sa{constructor(e){let t,n,i,s;this.viewport=e,this.domElement=document.createElement("div");const r={camera:{style:""},objects:new WeakMap};this.domElement.style.overflow="hidden";const o=document.createElement("div");o.style.transformOrigin="0 0",this.domElement.appendChild(o);const a=document.createElement("div");function l(e){return Math.abs(e)<1e-10?0:e}function c(e){const t=e.elements;return"matrix3d("+l(t[0])+","+l(-t[1])+","+l(t[2])+","+l(t[3])+","+l(t[4])+","+l(-t[5])+","+l(t[6])+","+l(t[7])+","+l(t[8])+","+l(-t[9])+","+l(t[10])+","+l(t[11])+","+l(t[12])+","+l(-t[13])+","+l(t[14])+","+l(t[15])+")"}function h(e){const t=e.elements;return"translate(-50%,-50%)"+("matrix3d("+l(t[0])+","+l(t[1])+","+l(t[2])+","+l(t[3])+","+l(-t[4])+","+l(-t[5])+","+l(-t[6])+","+l(-t[7])+","+l(t[8])+","+l(t[9])+","+l(t[10])+","+l(t[11])+","+l(t[12])+","+l(t[13])+","+l(t[14])+","+l(t[15])+")")}a.style.transformStyle="preserve-3d",o.appendChild(a),this.getSize=()=>({width:t,height:n}),this.render=(e,h)=>{const d=h.projectionMatrix.elements[5]*s;h.view&&h.view.enabled?(o.style.transform=`translate( ${-h.view.offsetX*(t/h.view.width)}px, ${-h.view.offsetY*(n/h.view.height)}px )`,o.style.transform+=`scale( ${h.view.fullWidth/h.view.width}, ${h.view.fullHeight/h.view.height} )`):o.style.transform="",!0===e.matrixWorldAutoUpdate&&e.updateMatrixWorld(),null===h.parent&&!0===h.matrixWorldAutoUpdate&&h.updateMatrixWorld();let p=0,f=0;h instanceof be&&(p=-(h.right+h.left)/2,f=(h.top+h.bottom)/2);const m=h.view&&h.view.enabled?h.view.height/h.view.fullHeight:1,g=h instanceof be?`scale( ${m} )scale(`+d+")translate("+l(p)+"px,"+l(f)+"px)"+c(h.matrixWorldInverse):`scale( ${m} )translateZ(`+d+"px)"+c(h.matrixWorldInverse),v=(h instanceof pe?"perspective("+d+"px) ":"")+g+"translate("+i+"px,"+s+"px)";r.camera.style!==v&&(a.style.transform=v,r.camera.style=v),u(e,e,h)},this.setSize=(e,r)=>{t=e,n=r,i=t/2,s=n/2,this.domElement.style.width=e+"px",this.domElement.style.height=r+"px",o.style.width=e+"px",o.style.height=r+"px",a.style.width=e+"px",a.style.height=r+"px"};const u=(e,t,n,i)=>{var s;if(e instanceof xa){Qi(e,this.viewport);const t=e.parent,i=Si(e)&&!0===e.layers.test(n.layers);if(e.userData.prevVisible!==i&&(null===(s=t.onChange)||void 0===s||s.call(t,i),t.elementAutoDisplay&&(e.element.style.display=!0===i?"":"none")),e.userData.prevVisible=i,!0===i||!1===t.elementAutoDisplay){let t;e instanceof Aa?(ba.copy(n.matrixWorldInverse),ba.transpose(),0!==e.rotation2D&&ba.multiply(Ta.makeRotationZ(e.rotation2D)),e.matrixWorld.decompose(va,ya,wa),ba.setPosition(va),ba.scale(wa),ba.elements[3]=0,ba.elements[7]=0,ba.elements[11]=0,ba.elements[15]=1,t=h(ba)):t=h(e.matrixWorld);const i=e.element,s=r.objects.get(e);if(void 0===s||s.style!==t){i.style.transform=t;const n={style:t};r.objects.set(e,n)}i.parentNode!==a&&a.appendChild(i)}}for(let i=0,s=e.children.length;i{const i=Ea.clone(),s=Ea.clone(),r=Ea.clone();i.makeRotationY(e),s.makeRotationX(t);const o=new n;return r.multiplyMatrices(i,s),o.setFromRotationMatrix(r),o},Ma=Ca(-Math.PI/2,-Math.PI/4),Pa=Ca(Math.PI/2,-Math.PI/4),Oa=Ca(-Math.PI/4,-Math.PI/4),Ba=Ca(Math.PI/4,-Math.PI/4),Ia=Ca(1.25*Math.PI,-Math.PI/4),La=Ca(.75*Math.PI,-Math.PI/4),Ra={LEFT:new n(0,-Math.PI/2,0),RIGHT:new n(0,Math.PI/2,0),FRONT:new n(0,0,0),BACK:new n(0,Math.PI,0),TOP:new n(-Math.PI/2,0,0),BOTTOM:new n(Math.PI/2,0,0),FRONTTOP:new n(-Math.PI/4,0,0),BACKTOP:new n(Math.PI/4,Math.PI,0),LEFTTOP:new n(Ma.x,Ma.y,Ma.z),RIGHTTOP:new n(Pa.x,Pa.y,Pa.z),LEFTFRONTTOP:new n(Oa.x,Oa.y,Oa.z),RIGHTFRONTTOP:new n(Ba.x,Ba.y,Ba.z),LEFTBACKTOP:new n(Ia.x,Ia.y,Ia.z),RIGHTBACKTOP:new n(La.x,La.y,La.z)},Fa={LEFT:new De(0,Math.PI/2,-Math.PI/2),RIGHT:new De(0,Math.PI/2,Math.PI/2),FRONT:new De(0,Math.PI/2,0),BACK:new De(0,Math.PI/2,Math.PI),TOP:new De(0,0,0),BOTTOM:new De(0,Math.PI,0),FRONTTOP:new De(0,Math.PI/4,0),BACKTOP:new De(0,Math.PI/4,Math.PI),LEFTTOP:new De(0,Math.PI/4,-Math.PI/2),RIGHTTOP:new De(0,Math.PI/4,Math.PI/2),LEFTFRONTTOP:new De(0,Math.PI/4,-Math.PI/4),RIGHTFRONTTOP:new De(0,Math.PI/4,Math.PI/4),LEFTBACKTOP:new De(0,Math.PI/4,-Math.PI/4*3),RIGHTBACKTOP:new De(0,Math.PI/4,Math.PI/4*3)},Ua=new t,za=new n,ka=new pe(50,1,.01,5e4);ka.position.set(500,1e3,500),ka.lookAt(Ua.set(0,0,0)),ka.name="SspCamera";const ja=new be(-500,500,500,-500,.01,5e4);ja.position.set(500,1e3,500),ja.lookAt(Ua.set(0,0,0)),ka.name="SspCamera";class Na{constructor(e){this.viewport=e,this.mainCamera=ka.clone(),this.mainCamera.name="CameraControls",this.currentCamera=this.mainCamera,this.cameras={}}createCamera(e){const t=ka.clone();return t.name=e,this.cameras[e]=t,t}removeCamera(e){return"fullFreeCamera"!==e&&(delete this.cameras[e],!0)}setCurrentCamera(e){this.currentCamera=this.viewport.camera=e,this.viewport.signals.cameraObjectChange.dispatch()}async setCamera(e,t,n){let i=ka.clone();const s="orthographic"===e;if(s&&(i=ja.clone()),this.mainCamera.type!==i.type){const{controls:e}=this.viewport;this.mainCamera=e.camera=i,s?e.mouseButtons.wheel=li.ACTION.ZOOM:(e.mouseButtons.wheel=li.ACTION.DOLLY,e.zoomTo(1)),this.setCurrentCamera(i)}t&&await this.setCameraViewpoint(t,n)}getCameraViewpoint(){const{controls:e}=this.viewport;return{position:e.getPosition(new t),target:e.getTarget(new t),zoom:e.camera.zoom}}async setCameraViewpoint(e,t){const{controls:n}=this.viewport,i=e,s=e;if(i.target){const{position:e,target:s,zoom:r=n.camera.zoom}=i;await Promise.all([n.zoomTo(r,t),n.setLookAt(e.x,e.y,e.z,s.x,s.y,s.z,t)])}else if(s.rotation){const{position:e,rotation:i}=s,r=Oi(e,i);await n.setLookAt(e.x,e.y,e.z,r.x,r.y,r.z,t)}}moveTo(e,t){return ps(this.currentCamera.position,e,t,(e=>this.viewport.signals.cameraChange.dispatch(e)))}rotateTo(e,t){const n=this.currentCamera.quaternion.clone(),i=(new r).setFromEuler(e);return ps({t:0},{t:1},t,(({t:e})=>{this.currentCamera.quaternion.slerpQuaternions(n,i,e)}))}async flyTo(e,t="frontTop",i={}){const{enableTransition:s=!0}=i;if(Ji(t)){const e=t.toLocaleUpperCase();"CURRENT"===e?za.copy(this.currentCamera.rotation):Ra[e]&&za.copy(Ra[e])}else t instanceof n?za.copy(t):ns(t)&&za.set(t.x,t.y,t.z);return this.setCameraViewpoint({position:e,rotation:za},s)}async flyToObj(e,n="frontTop",i={}){var s;let{padding:a="30%"}=i;const{enableTransition:l=!0,viewpointSpace:c="world",minPadding:h=1}=i;e instanceof jl&&(a=null!==(s=i.padding)&&void 0!==s?s:50);const u=e instanceof o?wi(e):e,d=u.getSize(Ua);if(Ji(a)){const e=Math.max(d.x,d.y,d.z,h);a=(es(p=a)?p:p.includes("%")?.01*Number(p.split("%")[0]):isNaN(+p)?0:Number(p))*e}var p;Ua.setScalar(a/2),u.max.add(Ua),u.min.sub(Ua);const{controls:f}=this.viewport,m=[];if(f.normalizeRotations(),"current"!==n){m.push(f.fitToBox(u,l));const i=Fa[n.toLocaleUpperCase()];if("local"===c&&e instanceof o){const n=new t(0,0,1),s=e.getWorldQuaternion(new r),o=new De;n.applyQuaternion(s),o.setFromVector3(n),o.phi-=Math.PI/2,m.push(f.rotateTo(i.theta+o.theta,i.phi+o.phi,l))}else m.push(f.rotateTo(i.theta,i.phi,l))}else{const e=new Ee;u.getBoundingSphere(e),m.push(f.fitToSphere(e,l))}await Promise.all(m)}surroundOnTarget(e,t={}){const{duration:n=3e3,startAngle:i=0,endAngle:s=360,onStart:r}=t,o=vi(e),{controls:a}=this.viewport;return a.setTarget(o.x,o.y,o.z),ps({radian:Ai(i)},{radian:Ai(s)},{duration:n},(({radian:e})=>{a.rotateAzimuthTo(e,!1)}),r)}surroundOnObject(e,t={}){const n=wi(e).getCenter(Ua);return this.surroundOnTarget(n,t)}getObjectLabelPos(e,n="frontTop",s={}){if(e instanceof o&&(e=(new i).setFromObject(e)),e.isEmpty())return mi("target box is empty"),new t;const{extendScale:r=1.6,mode:a="scene"}=s;if("scene"===a){const t=e.getCenter(Ua),i=e.max.clone().sub(e.min),s=Math.max(i.x,i.y,i.z),o=t.clone(),a=e=>{const t=(r-.5)*Math.abs(s),n=Math.max(t,this.viewport.camera.near);o.add(e.multiplyScalar(n))};let l;return l=Ji(n)?Ra[n.toLocaleUpperCase()]:yi(n),a(Ua.set(0,0,1).applyEuler(l)),o}return"screen"===a?e.getCenter(Ua).clone():new t}}const Ga=new v;Ga.setAttribute("position",new g(new Float32Array([-1,-1,3,-1,-1,3]),2)),Ga.setAttribute("uv",new g(new Float32Array([0,0,2,0,0,2]),2)),Ga.boundingSphere=new Ee,Ga.computeBoundingSphere=function(){};const Ha=new be;class Va{constructor(e){this._mesh=new se(Ga,e),this._mesh.frustumCulled=!1}render(e){e.render(this._mesh,Ha)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}dispose(){this._mesh.material.dispose(),this._mesh.geometry.dispose()}}const _a={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},sceneNormal:{value:null},projMat:{value:new m},viewMat:{value:new m},projViewMat:{value:new m},projectionMatrixInv:{value:new m},viewMatrixInv:{value:new m},cameraPos:{value:new t},resolution:{value:new f},time:{value:0},samples:{value:[]},samplesR:{value:[]},bluenoise:{value:null},distanceFalloff:{value:1},radius:{value:5},near:{value:.1},far:{value:1e3},logDepth:{value:!1},ortho:{value:!1},screenSpaceRadius:{value:!1}},vertexShader:"\nvarying vec2 vUv;\nvoid main() {\n vUv = uv;\n gl_Position = vec4(position, 1);\n}",fragmentShader:"\n #define SAMPLES 16\n #define FSAMPLES 16.0\nuniform sampler2D sceneDiffuse;\nuniform highp sampler2D sceneNormal;\nuniform highp sampler2D sceneDepth;\nuniform mat4 projectionMatrixInv;\nuniform mat4 viewMatrixInv;\nuniform mat4 projMat;\nuniform mat4 viewMat;\nuniform mat4 projViewMat;\nuniform vec3 cameraPos;\nuniform vec2 resolution;\nuniform float time;\nuniform vec3[SAMPLES] samples;\nuniform float[SAMPLES] samplesR;\nuniform float radius;\nuniform float distanceFalloff;\nuniform float near;\nuniform float far;\nuniform bool logDepth;\nuniform bool ortho;\nuniform bool screenSpaceRadius;\nuniform sampler2D bluenoise;\n varying vec2 vUv;\n highp float linearize_depth(highp float d, highp float zNear,highp float zFar)\n {\n return (zFar * zNear) / (zFar - d * (zFar - zNear));\n }\n highp float linearize_depth_ortho(highp float d, highp float nearZ, highp float farZ) {\n return nearZ + (farZ - nearZ) * d;\n }\n highp float linearize_depth_log(highp float d, highp float nearZ,highp float farZ) {\n float depth = pow(2.0, d * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n return ortho ? linearize_depth_ortho(\n linDepth,\n nearZ,\n farZ\n ) :linearize_depth(linDepth, nearZ, farZ);\n }\n\n vec3 getWorldPosLog(vec3 posS) {\n vec2 uv = posS.xy;\n float z = posS.z;\n float nearZ =near;\n float farZ = far;\n float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0;\n vec4 wpos = projectionMatrixInv * clipVec;\n return wpos.xyz / wpos.w;\n }\n vec3 getWorldPos(float depth, vec2 coord) {\n #ifdef LOGDEPTH\n return getWorldPosLog(vec3(coord, depth));\n #endif\n float z = depth * 2.0 - 1.0;\n vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0);\n vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition;\n // Perspective division\n vec4 worldSpacePosition = viewSpacePosition;\n worldSpacePosition.xyz /= worldSpacePosition.w;\n return worldSpacePosition.xyz;\n }\n\n vec3 computeNormal(vec3 worldPos, vec2 vUv) {\n ivec2 p = ivec2(vUv * resolution);\n float c0 = texelFetch(sceneDepth, p, 0).x;\n float l2 = texelFetch(sceneDepth, p - ivec2(2, 0), 0).x;\n float l1 = texelFetch(sceneDepth, p - ivec2(1, 0), 0).x;\n float r1 = texelFetch(sceneDepth, p + ivec2(1, 0), 0).x;\n float r2 = texelFetch(sceneDepth, p + ivec2(2, 0), 0).x;\n float b2 = texelFetch(sceneDepth, p - ivec2(0, 2), 0).x;\n float b1 = texelFetch(sceneDepth, p - ivec2(0, 1), 0).x;\n float t1 = texelFetch(sceneDepth, p + ivec2(0, 1), 0).x;\n float t2 = texelFetch(sceneDepth, p + ivec2(0, 2), 0).x;\n\n float dl = abs((2.0 * l1 - l2) - c0);\n float dr = abs((2.0 * r1 - r2) - c0);\n float db = abs((2.0 * b1 - b2) - c0);\n float dt = abs((2.0 * t1 - t2) - c0);\n\n vec3 ce = getWorldPos(c0, vUv).xyz;\n\n vec3 dpdx = (dl < dr) ? ce - getWorldPos(l1, (vUv - vec2(1.0 / resolution.x, 0.0))).xyz\n : -ce + getWorldPos(r1, (vUv + vec2(1.0 / resolution.x, 0.0))).xyz;\n vec3 dpdy = (db < dt) ? ce - getWorldPos(b1, (vUv - vec2(0.0, 1.0 / resolution.y))).xyz\n : -ce + getWorldPos(t1, (vUv + vec2(0.0, 1.0 / resolution.y))).xyz;\n\n return normalize(cross(dpdx, dpdy));\n}\n\nvoid main() {\n vec4 diffuse = texture2D(sceneDiffuse, vUv);\n float depth = texture2D(sceneDepth, vUv).x;\n if (depth == 1.0) {\n gl_FragColor = vec4(vec3(1.0), 1.0);\n return;\n }\n vec3 worldPos = getWorldPos(depth, vUv);\n // vec3 normal = texture2D(sceneNormal, vUv).rgb;//computeNormal(worldPos, vUv);\n #ifdef HALFRES\n vec3 normal = texture2D(sceneNormal, vUv).rgb;\n #else\n vec3 normal = computeNormal(worldPos, vUv);\n #endif\n vec4 noise = texture2D(bluenoise, gl_FragCoord.xy / 128.0);\n vec3 randomVec = normalize(noise.rgb * 2.0 - 1.0);\n vec3 tangent = normalize(randomVec - normal * dot(randomVec, normal));\n vec3 bitangent = cross(normal, tangent);\n mat3 tbn = mat3(tangent, bitangent, normal);\n float occluded = 0.0;\n float totalWeight = 0.0;\n /* float radiusScreen = distance(\n worldPos,\n getWorldPos(depth, vUv + \n vec2(48.0, 0.0) / resolution)\n );/*vUv.x < 0.5 ? radius : min(distance(\n worldPos,\n getWorldPos(depth, vUv + \n vec2(100.0, 0.0) / resolution)\n ), radius);\n float distanceFalloffScreen = radiusScreen * 0.2;*/\n float radiusToUse = screenSpaceRadius ? distance(\n worldPos,\n getWorldPos(depth, vUv +\n vec2(radius, 0.0) / resolution)\n ) : radius;\n float distanceFalloffToUse =screenSpaceRadius ?\n radiusToUse * distanceFalloff\n : distanceFalloff;\n float bias = (0.1 / near) * fwidth(distance(worldPos, cameraPos)) / radiusToUse;\n for(float i = 0.0; i < FSAMPLES; i++) {\n vec3 sampleDirection = \n tbn * \n samples[int(i)];\n ;\n float moveAmt = samplesR[int(mod(i + noise.a * FSAMPLES, FSAMPLES))];\n vec3 samplePos = worldPos + radiusToUse * moveAmt * sampleDirection;\n vec4 offset = projMat * vec4(samplePos, 1.0);\n offset.xyz /= offset.w;\n offset.xyz = offset.xyz * 0.5 + 0.5;\n float sampleDepth = textureLod(sceneDepth, offset.xy, 0.0).x;\n /*float distSample = logDepth ? linearize_depth_log(sampleDepth, near, far) \n (ortho ? linearize_depth_ortho(sampleDepth, near, far) : linearize_depth(sampleDepth, near, far));*/\n #ifdef LOGDEPTH\n float distSample = linearize_depth_log(sampleDepth, near, far);\n #else\n float distSample = ortho ? linearize_depth_ortho(sampleDepth, near, far) : linearize_depth(sampleDepth, near, far);\n #endif\n float distWorld = ortho ? linearize_depth_ortho(offset.z, near, far) : linearize_depth(offset.z, near, far);\n float rangeCheck = smoothstep(0.0, 1.0, distanceFalloffToUse / (abs(distSample - distWorld)));\n vec2 diff = gl_FragCoord.xy - ( offset.xy * resolution);\n float weight = dot(sampleDirection, normal);\n occluded += rangeCheck * weight * \n (distSample + bias\n < distWorld ? 1.0 : 0.0) * (\n (dot(\n diff,\n diff\n \n ) < 1.0 || (sampleDepth == depth) || (\n offset.x < 0.0 || offset.x > 1.0 || offset.y < 0.0 || offset.y > 1.0\n ) ? 0.0 : 1.0)\n );\n totalWeight += weight;\n }\n float occ = clamp(1.0 - occluded / totalWeight, 0.0, 1.0);\n gl_FragColor = vec4(0.5 + 0.5 * normal, occ);\n}"},Qa={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},tDiffuse:{value:null},projMat:{value:new m},viewMat:{value:new m},projectionMatrixInv:{value:new m},viewMatrixInv:{value:new m},cameraPos:{value:new t},resolution:{value:new f},color:{value:new t(0,0,0)},blueNoise:{value:null},downsampledDepth:{value:null},time:{value:0},intensity:{value:10},renderMode:{value:0},gammaCorrection:{value:!1},logDepth:{value:!1},ortho:{value:!1},near:{value:.1},far:{value:1e3},screenSpaceRadius:{value:!1},radius:{value:0},distanceFalloff:{value:1},fog:{value:!1},fogExp:{value:!1},fogDensity:{value:0},fogNear:{value:1/0},fogFar:{value:1/0},colorMultiply:{value:!0}},vertexShader:"\n\t\tvarying vec2 vUv;\n\t\tvoid main() {\n\t\t\tvUv = uv;\n\t\t\tgl_Position = vec4(position, 1);\n\t\t}",fragmentShader:"\n\t\tuniform sampler2D sceneDiffuse;\n uniform highp sampler2D sceneDepth;\n uniform highp sampler2D downsampledDepth;\n uniform sampler2D tDiffuse;\n uniform sampler2D blueNoise;\n uniform vec2 resolution;\n uniform vec3 color;\n uniform mat4 projectionMatrixInv;\n uniform mat4 viewMatrixInv;\n uniform float intensity;\n uniform float renderMode;\n uniform float near;\n uniform float far;\n uniform bool gammaCorrection;\n uniform bool logDepth;\n uniform bool ortho;\n uniform bool screenSpaceRadius;\n uniform bool fog;\n uniform bool fogExp;\n uniform bool colorMultiply;\n uniform float fogDensity;\n uniform float fogNear;\n uniform float fogFar;\n uniform float radius;\n uniform float distanceFalloff;\n uniform vec3 cameraPos;\n varying vec2 vUv;\n highp float linearize_depth(highp float d, highp float zNear,highp float zFar)\n {\n return (zFar * zNear) / (zFar - d * (zFar - zNear));\n }\n highp float linearize_depth_ortho(highp float d, highp float nearZ, highp float farZ) {\n return nearZ + (farZ - nearZ) * d;\n }\n highp float linearize_depth_log(highp float d, highp float nearZ,highp float farZ) {\n float depth = pow(2.0, d * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n return ortho ? linearize_depth_ortho(\n linDepth,\n nearZ,\n farZ\n ) :linearize_depth(linDepth, nearZ, farZ);\n }\n vec3 getWorldPosLog(vec3 posS) {\n vec2 uv = posS.xy;\n float z = posS.z;\n float nearZ =near;\n float farZ = far;\n float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0;\n vec4 wpos = projectionMatrixInv * clipVec;\n return wpos.xyz / wpos.w;\n }\n vec3 getWorldPos(float depth, vec2 coord) {\n // if (logDepth) {\n #ifdef LOGDEPTH\n return getWorldPosLog(vec3(coord, depth));\n #endif\n // }\n float z = depth * 2.0 - 1.0;\n vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0);\n vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition;\n // Perspective division\n vec4 worldSpacePosition = viewSpacePosition;\n worldSpacePosition.xyz /= worldSpacePosition.w;\n return worldSpacePosition.xyz;\n }\n \n vec3 computeNormal(vec3 worldPos, vec2 vUv) {\n ivec2 p = ivec2(vUv * resolution);\n float c0 = texelFetch(sceneDepth, p, 0).x;\n float l2 = texelFetch(sceneDepth, p - ivec2(2, 0), 0).x;\n float l1 = texelFetch(sceneDepth, p - ivec2(1, 0), 0).x;\n float r1 = texelFetch(sceneDepth, p + ivec2(1, 0), 0).x;\n float r2 = texelFetch(sceneDepth, p + ivec2(2, 0), 0).x;\n float b2 = texelFetch(sceneDepth, p - ivec2(0, 2), 0).x;\n float b1 = texelFetch(sceneDepth, p - ivec2(0, 1), 0).x;\n float t1 = texelFetch(sceneDepth, p + ivec2(0, 1), 0).x;\n float t2 = texelFetch(sceneDepth, p + ivec2(0, 2), 0).x;\n \n float dl = abs((2.0 * l1 - l2) - c0);\n float dr = abs((2.0 * r1 - r2) - c0);\n float db = abs((2.0 * b1 - b2) - c0);\n float dt = abs((2.0 * t1 - t2) - c0);\n \n vec3 ce = getWorldPos(c0, vUv).xyz;\n \n vec3 dpdx = (dl < dr) ? ce - getWorldPos(l1, (vUv - vec2(1.0 / resolution.x, 0.0))).xyz\n : -ce + getWorldPos(r1, (vUv + vec2(1.0 / resolution.x, 0.0))).xyz;\n vec3 dpdy = (db < dt) ? ce - getWorldPos(b1, (vUv - vec2(0.0, 1.0 / resolution.y))).xyz\n : -ce + getWorldPos(t1, (vUv + vec2(0.0, 1.0 / resolution.y))).xyz;\n \n return normalize(cross(dpdx, dpdy));\n }\n\n #include \n #include \n void main() {\n //vec4 texel = texture2D(tDiffuse, vUv);//vec3(0.0);\n vec4 sceneTexel = texture2D(sceneDiffuse, vUv);\n float depth = texture2D(\n sceneDepth,\n vUv\n ).x;\n #ifdef HALFRES \n vec4 texel;\n if (depth == 1.0) {\n texel = vec4(0.0, 0.0, 0.0, 1.0);\n } else {\n vec3 worldPos = getWorldPos(depth, vUv);\n vec3 normal = computeNormal(getWorldPos(depth, vUv), vUv);\n // vec4 texel = texture2D(tDiffuse, vUv);\n // Find closest depth;\n float totalWeight = 0.0;\n float radiusToUse = screenSpaceRadius ? distance(\n worldPos,\n getWorldPos(depth, vUv +\n vec2(radius, 0.0) / resolution)\n ) : radius;\n float distanceFalloffToUse =screenSpaceRadius ?\n radiusToUse * distanceFalloff\n : distanceFalloff;\n for(float x = -1.0; x <= 1.0; x++) {\n for(float y = -1.0; y <= 1.0; y++) {\n vec2 offset = vec2(x, y);\n ivec2 p = ivec2(\n (vUv * resolution * 0.5) + offset\n );\n vec2 pUv = vec2(p) / (resolution * 0.5);\n float sampleDepth = texelFetch(downsampledDepth,p, 0).x;\n vec4 sampleInfo = texelFetch(tDiffuse, p, 0);\n vec3 normalSample = sampleInfo.xyz * 2.0 - 1.0;\n vec3 worldPosSample = getWorldPos(sampleDepth, pUv);\n float tangentPlaneDist = abs(dot(worldPos - worldPosSample, normal));\n float rangeCheck = exp(-1.0 * tangentPlaneDist * (1.0 / distanceFalloffToUse)) * max(dot(normal, normalSample), 0.0);\n float weight = rangeCheck;\n totalWeight += weight;\n texel += sampleInfo * weight;\n }\n }\n if (totalWeight == 0.0) {\n texel = texture2D(tDiffuse, vUv);\n } else {\n texel /= totalWeight;\n }\n }\n #else\n vec4 texel = texture2D(tDiffuse, vUv);\n #endif\n\n \n float finalAo = pow(texel.a, intensity);\n float fogFactor;\n float fogDepth = distance(\n cameraPos,\n getWorldPos(depth, vUv)\n );\n if (fog) {\n if (fogExp) {\n fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\n } else {\n fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n }\n }\n finalAo = mix(finalAo, 1.0, fogFactor);\n vec3 aoApplied = color * mix(vec3(1.0), sceneTexel.rgb, float(colorMultiply));\n if (renderMode == 0.0) {\n gl_FragColor = vec4( mix(sceneTexel.rgb, aoApplied, 1.0 - finalAo), sceneTexel.a);\n } else if (renderMode == 1.0) {\n gl_FragColor = vec4( mix(vec3(1.0), aoApplied, 1.0 - finalAo), sceneTexel.a);\n } else if (renderMode == 2.0) {\n gl_FragColor = vec4( sceneTexel.rgb, sceneTexel.a);\n } else if (renderMode == 3.0) {\n if (vUv.x < 0.5) {\n gl_FragColor = vec4( sceneTexel.rgb, sceneTexel.a);\n } else if (abs(vUv.x - 0.5) < 1.0 / resolution.x) {\n gl_FragColor = vec4(1.0);\n } else {\n gl_FragColor = vec4( mix(sceneTexel.rgb, aoApplied, 1.0 - finalAo), sceneTexel.a);\n }\n } else if (renderMode == 4.0) {\n if (vUv.x < 0.5) {\n gl_FragColor = vec4( sceneTexel.rgb, sceneTexel.a);\n } else if (abs(vUv.x - 0.5) < 1.0 / resolution.x) {\n gl_FragColor = vec4(1.0);\n } else {\n gl_FragColor = vec4( mix(vec3(1.0), aoApplied, 1.0 - finalAo), sceneTexel.a);\n }\n }\n #include \n if (gammaCorrection) {\n gl_FragColor = LinearTosRGB(gl_FragColor);\n }\n }\n "},Wa={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},tDiffuse:{value:null},projMat:{value:new m},viewMat:{value:new m},projectionMatrixInv:{value:new m},viewMatrixInv:{value:new m},cameraPos:{value:new t},resolution:{value:new f},time:{value:0},r:{value:5},blueNoise:{value:null},radius:{value:12},worldRadius:{value:5},index:{value:0},poissonDisk:{value:[]},distanceFalloff:{value:1},near:{value:.1},far:{value:1e3},logDepth:{value:!1},screenSpaceRadius:{value:!1}},vertexShader:"\n\t\tvarying vec2 vUv;\n\t\tvoid main() {\n\t\t\tvUv = uv;\n\t\t\tgl_Position = vec4(position, 1.0);\n\t\t}",fragmentShader:"\n\t\tuniform sampler2D sceneDiffuse;\n uniform highp sampler2D sceneDepth;\n uniform sampler2D tDiffuse;\n uniform sampler2D blueNoise;\n uniform mat4 projectionMatrixInv;\n uniform mat4 viewMatrixInv;\n uniform vec2 resolution;\n uniform float r;\n uniform float radius;\n uniform float worldRadius;\n uniform float index;\n uniform float near;\n uniform float far;\n uniform float distanceFalloff;\n uniform bool logDepth;\n uniform bool screenSpaceRadius;\n varying vec2 vUv;\n\n highp float linearize_depth(highp float d, highp float zNear,highp float zFar)\n {\n highp float z_n = 2.0 * d - 1.0;\n return 2.0 * zNear * zFar / (zFar + zNear - z_n * (zFar - zNear));\n }\n highp float linearize_depth_log(highp float d, highp float nearZ,highp float farZ) {\n float depth = pow(2.0, d * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n return linearize_depth(linDepth, nearZ, farZ);\n }\n highp float linearize_depth_ortho(highp float d, highp float nearZ, highp float farZ) {\n return nearZ + (farZ - nearZ) * d;\n }\n vec3 getWorldPosLog(vec3 posS) {\n vec2 uv = posS.xy;\n float z = posS.z;\n float nearZ =near;\n float farZ = far;\n float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0;\n vec4 wpos = projectionMatrixInv * clipVec;\n return wpos.xyz / wpos.w;\n }\n vec3 getWorldPos(float depth, vec2 coord) {\n #ifdef LOGDEPTH\n return getWorldPosLog(vec3(coord, depth));\n #endif\n \n float z = depth * 2.0 - 1.0;\n vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0);\n vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition;\n // Perspective division\n vec4 worldSpacePosition = viewSpacePosition;\n worldSpacePosition.xyz /= worldSpacePosition.w;\n return worldSpacePosition.xyz;\n }\n #include \n #define NUM_SAMPLES 16\n uniform vec2 poissonDisk[NUM_SAMPLES];\n void main() {\n const float pi = 3.14159;\n vec2 texelSize = vec2(1.0 / resolution.x, 1.0 / resolution.y);\n vec2 uv = vUv;\n vec4 data = texture2D(tDiffuse, vUv);\n float occlusion = data.a;\n float baseOcc = data.a;\n vec3 normal = data.rgb * 2.0 - 1.0;\n float count = 1.0;\n float d = texture2D(sceneDepth, vUv).x;\n if (d == 1.0) {\n gl_FragColor = data;\n return;\n }\n vec3 worldPos = getWorldPos(d, vUv);\n float size = radius;\n float angle;\n if (index == 0.0) {\n angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).x * PI2;\n } else if (index == 1.0) {\n angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).y * PI2;\n } else if (index == 2.0) {\n angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).z * PI2;\n } else {\n angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).w * PI2;\n }\n\n mat2 rotationMatrix = mat2(cos(angle), -sin(angle), sin(angle), cos(angle));\n float radiusToUse = screenSpaceRadius ? distance(\n worldPos,\n getWorldPos(d, vUv +\n vec2(worldRadius, 0.0) / resolution)\n ) : worldRadius;\n float distanceFalloffToUse =screenSpaceRadius ?\n radiusToUse * distanceFalloff\n : distanceFalloff;\n\n\n for(int i = 0; i < NUM_SAMPLES; i++) {\n vec2 offset = (rotationMatrix * poissonDisk[i]) * texelSize * size;\n vec4 dataSample = texture2D(tDiffuse, uv + offset);\n float occSample = dataSample.a;\n vec3 normalSample = dataSample.rgb * 2.0 - 1.0;\n float dSample = texture2D(sceneDepth, uv + offset).x;\n vec3 worldPosSample = getWorldPos(dSample, uv + offset);\n float tangentPlaneDist = abs(dot(worldPos - worldPosSample, normal));\n float rangeCheck = dSample == 1.0 ? 0.0 :exp(-1.0 * tangentPlaneDist * (1.0 / distanceFalloffToUse)) * max(dot(normal, normalSample), 0.0) * (1.0 - abs(occSample - baseOcc));\n occlusion += occSample * rangeCheck;\n count += rangeCheck;\n }\n occlusion /= count;\n gl_FragColor = vec4(0.5 + 0.5 * normal, occlusion);\n }\n "},Ya={uniforms:{sceneDepth:{value:null},resolution:{value:new f},near:{value:.1},far:{value:1e3},viewMatrixInv:{value:new m},projectionMatrixInv:{value:new m},logDepth:{value:!1}},vertexShader:"\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = vec4(position, 1);\n }",fragmentShader:"\n uniform highp sampler2D sceneDepth;\n uniform vec2 resolution;\n uniform float near;\n uniform float far;\n uniform bool logDepth;\n uniform mat4 viewMatrixInv;\n uniform mat4 projectionMatrixInv;\n varying vec2 vUv;\n layout(location = 1) out vec4 gNormal;\n vec3 getWorldPosLog(vec3 posS) {\n vec2 uv = posS.xy;\n float z = posS.z;\n float nearZ =near;\n float farZ = far;\n float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0;\n vec4 wpos = projectionMatrixInv * clipVec;\n return wpos.xyz / wpos.w;\n }\n vec3 getWorldPos(float depth, vec2 coord) {\n if (logDepth) {\n return getWorldPosLog(vec3(coord, depth));\n }\n float z = depth * 2.0 - 1.0;\n vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0);\n vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition;\n // Perspective division\n vec4 worldSpacePosition = viewSpacePosition;\n worldSpacePosition.xyz /= worldSpacePosition.w;\n return worldSpacePosition.xyz;\n }\n \n vec3 computeNormal(vec3 worldPos, vec2 vUv) {\n ivec2 p = ivec2(vUv * resolution);\n float c0 = texelFetch(sceneDepth, p, 0).x;\n float l2 = texelFetch(sceneDepth, p - ivec2(2, 0), 0).x;\n float l1 = texelFetch(sceneDepth, p - ivec2(1, 0), 0).x;\n float r1 = texelFetch(sceneDepth, p + ivec2(1, 0), 0).x;\n float r2 = texelFetch(sceneDepth, p + ivec2(2, 0), 0).x;\n float b2 = texelFetch(sceneDepth, p - ivec2(0, 2), 0).x;\n float b1 = texelFetch(sceneDepth, p - ivec2(0, 1), 0).x;\n float t1 = texelFetch(sceneDepth, p + ivec2(0, 1), 0).x;\n float t2 = texelFetch(sceneDepth, p + ivec2(0, 2), 0).x;\n \n float dl = abs((2.0 * l1 - l2) - c0);\n float dr = abs((2.0 * r1 - r2) - c0);\n float db = abs((2.0 * b1 - b2) - c0);\n float dt = abs((2.0 * t1 - t2) - c0);\n \n vec3 ce = getWorldPos(c0, vUv).xyz;\n \n vec3 dpdx = (dl < dr) ? ce - getWorldPos(l1, (vUv - vec2(1.0 / resolution.x, 0.0))).xyz\n : -ce + getWorldPos(r1, (vUv + vec2(1.0 / resolution.x, 0.0))).xyz;\n vec3 dpdy = (db < dt) ? ce - getWorldPos(b1, (vUv - vec2(0.0, 1.0 / resolution.y))).xyz\n : -ce + getWorldPos(t1, (vUv + vec2(0.0, 1.0 / resolution.y))).xyz;\n \n return normalize(cross(dpdx, dpdy));\n }\n void main() {\n vec2 uv = vUv - vec2(0.5) / resolution;\n vec2 pixelSize = vec2(1.0) / resolution;\n vec2[] uvSamples = vec2[4](\n uv,\n uv + vec2(pixelSize.x, 0.0),\n uv + vec2(0.0, pixelSize.y),\n uv + pixelSize\n );\n float depth00 = texture2D(sceneDepth, uvSamples[0]).r;\n float depth10 = texture2D(sceneDepth, uvSamples[1]).r;\n float depth01 = texture2D(sceneDepth, uvSamples[2]).r;\n float depth11 = texture2D(sceneDepth, uvSamples[3]).r;\n float minDepth = min(min(depth00, depth10), min(depth01, depth11));\n float maxDepth = max(max(depth00, depth10), max(depth01, depth11));\n float targetDepth = minDepth;\n // Checkerboard pattern to avoid artifacts\n if (mod(gl_FragCoord.x + gl_FragCoord.y, 2.0) > 0.5) { \n targetDepth = maxDepth;\n }\n int chosenIndex = 0;\n float[] samples = float[4](depth00, depth10, depth01, depth11);\n for(int i = 0; i < 4; ++i) {\n if (samples[i] == targetDepth) {\n chosenIndex = i;\n break;\n }\n }\n gl_FragColor = vec4(samples[chosenIndex], 0.0, 0.0, 1.0);\n gNormal = vec4(computeNormal(\n getWorldPos(samples[chosenIndex], uvSamples[chosenIndex]), uvSamples[chosenIndex]\n ), 0.0);\n /* float[] samples = float[4](depth00, depth10, depth01, depth11);\n float c = 0.25 * (depth00 + depth10 + depth01 + depth11);\n float[] distances = float[4](depth00, depth10, depth01, depth11);\n float maxDistance = max(max(distances[0], distances[1]), max(distances[2], distances[3]));\n\n int remaining[3];\n int rejected[3];\n int i, j, k;\n\n for(i = 0, j = 0, k = 0; i < 4; ++i) {\n if (distances[i] < maxDistance) {\n remaining[j++] = i;\n } else {\n rejected[k++] = i;\n }\n }\n for(;j < 3;++j) {\n remaining[j] = rejected[--k];\n }\n vec3 s = vec3(\n samples[remaining[0]],\n samples[remaining[1]],\n samples[remaining[2]]\n );\n c = (s.x + s.y + s.z) / 3.0;\n\n distances[0] = abs(c - s.x);\n distances[1] = abs(c - s.y);\n distances[2] = abs(c - s.z);\n\n float minDistance = min(min(distances[0], distances[1]), distances[2]);\n\n for(i = 0; i < 3; ++i) {\n if (distances[i] == minDistance) {\n break;\n }\n }*/\n /* gl_FragColor = vec4(samples[remaining[i]], 0.0, 0.0, 0.0);\n gNormal = vec4(computeNormal(\n getWorldPos(samples[remaining[i]], uvSamples[remaining[i]]), uvSamples[remaining[i]]\n ), 0.0);*/\n }"};var Ka="5L7pP4UXrOIr/VZ1G3f6p89FIWU7lqc7J3DPxKjJUXODJoHQzf/aNVM+ABlvhXeBGN7iC0WkmTjEaAqOItBfBdaK5KSGV1ET5SOKl3x9JOX5w2sAl6+6KjDhVUHgbqq7DZ5EeYzbdSNxtrQLW/KkPJoOTG4u5CBUZkCKHniY9l7DUgjuz708zG1HIC8qfohi1vPjPH9Lq47ksjRrjwXD4MlVCjdAqYFGodQ8tRmHkOfq4wVRIAHvoavPHvN1lpk3X4Y1yzAPGe8S9KBs3crc4GwlU1dEOXiWol/mgQqxkNqB1xd04+0Bmpwj0GcCc4NUi+c731FUxjvaexCkCJ0qhrJJ++htWqetNC4NewClu8aFRSwrqiJEGe+qtTg4CYCHaF1wJI0sy/ZBQAI0qAMyBvVjWZlv2pdkCaro9eWDLK5I4mbb8E4d7hZr9dDJiTJm6Bmb5S+2F7yal/JPdeLUfwq7jmVLaQfhv4tWMJAt7V4sG9LuAv2oPJgSj1nnlBvPibfHM2TrlWHwGCLGxW/5Jm2TotaDL+pHDM5pn1r0UuTZ24N8S5k68bLHW9tfD+2k4zGev23ExJb4YTRKWrj82N5LjJ26lj1BkGZ0CsXLGGELoPaYQomjTqPxYqhfwOwDliNGVqux9ffuybqOKgsbB51B1GbZfG8vHDBE2JQGib1mnCmWOWAMJcHN0cKeDHYTflbDTVXajtr68mwfRje6WueQ/6yWqmZMLWNH7P27zGFhMFqaqfg11Q88g/9UA/FROe9yfq0yOO0pnNAxvepFy2BpEbcgG+mCyjCC01JWlOZlIPdf1TtlyOt7L94ToYGCukoFt4OqwOrofamjECpSgKLLmrRM+sNRAw12eaqk8KtdFk7pn2IcDQiPXCh16t1a+psi+w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JNlXRXQJqCUKXk2d1RSBGzDP6HDSpo863BhVRFFF6uIpjQV7j5ebFe3UkkO/+coIo2BTAcgBqOtQ134s9a4QJvofuqBYMGOBMsWZ+sn/2AOxDx6SfAnDFGw==";const Xa=Uint8Array.from(atob(Ka),(e=>e.charCodeAt(0)));function Za(e,t,n){if(t.getQueryParameter(e,t.QUERY_RESULT_AVAILABLE)){const i=t.getQueryParameter(e,t.QUERY_RESULT)/1e6;n.lastTime=i}else setTimeout((()=>{Za(e,t,n)}),1)}class qa extends Nr{constructor(e,t,n=512,i=512){super(),this.width=n,this.height=i,this.clear=!0,this.camera=t,this.scene=e,this.autosetGamma=!0,this.configuration=new Proxy({aoSamples:16,aoRadius:5,denoiseSamples:8,denoiseRadius:12,distanceFalloff:1,intensity:5,denoiseIterations:2,renderMode:0,color:new u(0,0,0),gammaCorrection:!0,logarithmicDepthBuffer:!1,screenSpaceRadius:!1,halfRes:!1,depthAwareUpsampling:!0,colorMultiply:!0},{set:(e,t,n)=>{const i=e[t];return e[t]=n,"aoSamples"===t&&i!==n&&this.configureAOPass(this.configuration.logarithmicDepthBuffer),"denoiseSamples"===t&&i!==n&&this.configureDenoisePass(this.configuration.logarithmicDepthBuffer),"halfRes"===t&&i!==n&&(this.configureAOPass(this.configuration.logarithmicDepthBuffer),this.configureHalfResTargets(),this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer),this.setSize(this.width,this.height)),"depthAwareUpsampling"===t&&i!==n&&this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer),"gammaCorrection"===t&&(this.autosetGamma=!1),!0}}),this.samples=[],this.samplesR=[],this.samplesDenoise=[],this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer),this.configureSampleDependentPasses(),this.configureHalfResTargets(),this.copyQuad=new Va(new ae({uniforms:{tDiffuse:{value:null}},depthWrite:!1,vertexShader:"\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = vec4(position, 1);\n }\n ",fragmentShader:"\n uniform sampler2D tDiffuse;\n varying vec2 vUv;\n void main() {\n gl_FragColor = texture2D(tDiffuse, vUv);\n }\n "})),this.writeTargetInternal=new X(this.width,this.height,{minFilter:ee,magFilter:ee,depthBuffer:!1}),this.readTargetInternal=new X(this.width,this.height,{minFilter:ee,magFilter:ee,depthBuffer:!1}),this.outputTargetInternal=new X(this.width,this.height,{minFilter:ee,magFilter:ee,depthBuffer:!1}),this.bluenoise=new Ce(Xa,128,128),this.bluenoise.colorSpace=he,this.bluenoise.wrapS=q,this.bluenoise.wrapT=q,this.bluenoise.minFilter=$,this.bluenoise.magFilter=$,this.bluenoise.needsUpdate=!0,this.lastTime=0,this.needsDepthTexture=!0,this.needsSwap=!0,this._r=new f,this._c=new u}configureHalfResTargets(){this.configuration.halfRes?(this.depthDownsampleTarget=new Me(this.width/2,this.height/2,2),this.depthDownsampleTarget.texture[0].format=Pe,this.depthDownsampleTarget.texture[0].type=Oe,this.depthDownsampleTarget.texture[0].minFilter=$,this.depthDownsampleTarget.texture[0].magFilter=$,this.depthDownsampleTarget.texture[0].depthBuffer=!1,this.depthDownsampleTarget.texture[1].format=Be,this.depthDownsampleTarget.texture[1].type=l,this.depthDownsampleTarget.texture[1].minFilter=$,this.depthDownsampleTarget.texture[1].magFilter=$,this.depthDownsampleTarget.texture[1].depthBuffer=!1,this.depthDownsampleQuad=new Va(new ae(Ya))):(this.depthDownsampleTarget&&(this.depthDownsampleTarget.dispose(),this.depthDownsampleTarget=null),this.depthDownsampleQuad&&(this.depthDownsampleQuad.dispose(),this.depthDownsampleQuad=null))}configureSampleDependentPasses(){this.configureAOPass(this.configuration.logarithmicDepthBuffer),this.configureDenoisePass(this.configuration.logarithmicDepthBuffer)}configureAOPass(e=!1){this.samples=this.generateHemisphereSamples(this.configuration.aoSamples),this.samplesR=this.generateHemisphereSamplesR(this.configuration.aoSamples);const t={..._a};t.fragmentShader=t.fragmentShader.replace("16",this.configuration.aoSamples).replace("16.0",this.configuration.aoSamples+".0"),e&&(t.fragmentShader="#define LOGDEPTH\n"+t.fragmentShader),this.configuration.halfRes&&(t.fragmentShader="#define HALFRES\n"+t.fragmentShader),this.effectShaderQuad?(this.effectShaderQuad.material.dispose(),this.effectShaderQuad.material=new ae(t)):this.effectShaderQuad=new Va(new ae(t))}configureDenoisePass(e=!1){this.samplesDenoise=this.generateDenoiseSamples(this.configuration.denoiseSamples,11);const t={...Wa};t.fragmentShader=t.fragmentShader.replace("16",this.configuration.denoiseSamples),e&&(t.fragmentShader="#define LOGDEPTH\n"+t.fragmentShader),this.poissonBlurQuad?(this.poissonBlurQuad.material.dispose(),this.poissonBlurQuad.material=new ae(t)):this.poissonBlurQuad=new Va(new ae(t))}configureEffectCompositer(e=!1){const t={...Qa};e&&(t.fragmentShader="#define LOGDEPTH\n"+t.fragmentShader),this.configuration.halfRes&&this.configuration.depthAwareUpsampling&&(t.fragmentShader="#define HALFRES\n"+t.fragmentShader),this.effectCompositerQuad?(this.effectCompositerQuad.material.dispose(),this.effectCompositerQuad.material=new ae(t)):this.effectCompositerQuad=new Va(new ae(t))}generateHemisphereSamples(e){const n=[];for(let i=0;ie.charCodeAt(0)));var $a="#define GLSLIFY 1\nvec3 getViewPosition(const float depth){float clipW=_projectionMatrix[2][3]*depth+_projectionMatrix[3][3];vec4 clipPosition=vec4((vec3(vUv,depth)-0.5)*2.0,1.0);clipPosition*=clipW;return(_inverseProjectionMatrix*clipPosition).xyz;}float getViewZ(const in float depth){\n#ifdef PERSPECTIVE_CAMERA\nreturn perspectiveDepthToViewZ(depth,cameraNear,cameraFar);\n#else\nreturn orthographicDepthToViewZ(depth,cameraNear,cameraFar);\n#endif\n}vec3 screenSpaceToWorldSpace(const vec2 uv,const float depth){vec4 ndc=vec4((uv.x-0.5)*2.0,(uv.y-0.5)*2.0,(depth-0.5)*2.0,1.0);vec4 clip=_inverseProjectionMatrix*ndc;vec4 view=cameraMatrixWorld*(clip/clip.w);return view.xyz;}\n#define Scale (vec3(0.8, 0.8, 0.8))\n#define K (19.19)\nvec3 hash(vec3 a){a=fract(a*Scale);a+=dot(a,a.yxz+K);return fract((a.xxy+a.yxx)*a.zyx);}float fresnel_dielectric_cos(float cosi,float eta){float c=abs(cosi);float g=eta*eta-1.0+c*c;float result;if(g>0.0){g=sqrt(g);float A=(g-c)/(g+c);float B=(c*(g+c)-1.0)/(c*(g-c)+1.0);result=0.5*A*A*(1.0+B*B);}else{result=1.0;}return result;}float fresnel_dielectric(vec3 Incoming,vec3 Normal,float eta){float cosine=dot(Incoming,Normal);return min(1.0,5.0*fresnel_dielectric_cos(cosine,eta));}";class el extends ae{constructor(){super({type:"MRTMaterial",defines:{USE_UV:"",TEMPORAL_RESOLVE:""},uniforms:{opacity:new Z(1),normalMap:new Z(null),normalScale:new Z(new f(1,1)),uvTransform:new Z(new ze),roughness:new Z(1),roughnessMap:new Z(null)},vertexShader:"\n #ifdef USE_MRT\n varying vec2 vHighPrecisionZW;\n #endif\n #define NORMAL\n varying vec3 vViewPosition;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n uniform mat3 uvTransform;\n void main() {\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #ifdef USE_MRT\n vHighPrecisionZW = gl_Position.zw;\n #endif \n #ifdef USE_UV\n vUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n #endif\n }\n ",fragmentShader:"\n #define NORMAL\n varying vec3 vViewPosition;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n \n #ifdef USE_MRT\n layout(location = 0) out vec4 gNormal;\n layout(location = 1) out vec4 gDepth;\n \n varying vec2 vHighPrecisionZW;\n #endif\n uniform float roughness;\n void main() {\n #include \n #include \n #include \n #include \n\n float roughnessFactor = roughness;\n \n if(roughness > 10.0e9){\n roughnessFactor = 1.;\n }else{\n #ifdef useRoughnessMap\n vec4 texelRoughness = texture2D( roughnessMap, vUv );\n // reads channel G, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n roughnessFactor *= texelRoughness.g;\n #endif\n }\n\n vec3 normalColor = packNormalToRGB( normal );\n #ifdef USE_MRT\n float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n vec4 depthColor = packDepthToRGBA( fragCoordZ );\n gNormal = vec4( normalColor, roughnessFactor );\n gDepth = depthColor;\n #else\n gl_FragColor = vec4(normalColor, roughnessFactor);\n #endif\n }\n ",toneMapped:!1}),this.normalMapType=ke,this.normalScale=new f(1,1),Object.defineProperty(this,"glslVersion",{get(){return"USE_MRT"in this.defines?je:null},set(e){}})}}class tl extends ae{constructor(){super({type:"ReflectionsMaterial",uniforms:{inputTexture:new Z(null),accumulatedTexture:new Z(null),normalTexture:new Z(null),depthTexture:new Z(null),_projectionMatrix:new Z(new m),_inverseProjectionMatrix:new Z(new m),cameraMatrixWorld:new Z(new m),cameraNear:new Z(0),cameraFar:new Z(0),rayDistance:new Z(0),intensity:new Z(0),roughnessFade:new Z(0),fade:new Z(0),thickness:new Z(0),ior:new Z(0),maxDepthDifference:new Z(0),jitter:new Z(0),jitterRoughness:new Z(0),maxRoughness:new Z(0),samples:new Z(0),envMap:new Z(null),envMapPosition:new Z(new t),envMapSize:new Z(new t),viewMatrix:new Z(new m)},defines:{steps:20,refineSteps:5,CUBEUV_TEXEL_WIDTH:0,CUBEUV_TEXEL_HEIGHT:0,CUBEUV_MAX_MIP:0,vWorldPosition:"worldPos"},fragmentShader:"#define GLSLIFY 1\nvarying vec2 vUv;uniform sampler2D inputTexture;uniform sampler2D accumulatedTexture;uniform sampler2D normalTexture;uniform sampler2D depthTexture;uniform sampler2D envMap;uniform mat4 _projectionMatrix;uniform mat4 _inverseProjectionMatrix;uniform mat4 cameraMatrixWorld;uniform float cameraNear;uniform float cameraFar;uniform float rayDistance;uniform float intensity;uniform float maxDepthDifference;uniform float roughnessFade;uniform float maxRoughness;uniform float fade;uniform float thickness;uniform float ior;uniform float samples;uniform float jitter;uniform float jitterRoughness;\n#define INVALID_RAY_COORDS vec2(-1.0);\n#define EARLY_OUT_COLOR vec4(0.0, 0.0, 0.0, 1.0)\n#define FLOAT_EPSILON 0.00001\nfloat nearMinusFar;float nearMulFar;float farMinusNear;\n#include \n#include \nvec2 RayMarch(vec3 dir,inout vec3 hitPos,inout float rayHitDepthDifference);vec2 BinarySearch(in vec3 dir,inout vec3 hitPos,inout float rayHitDepthDifference);float fastGetViewZ(const in float depth);vec3 getIBLRadiance(const in vec3 viewDir,const in vec3 normal,const in float roughness);void main(){vec4 depthTexel=textureLod(depthTexture,vUv,0.0);if(dot(depthTexel.rgb,depthTexel.rgb)1.0)jitterMix=1.0;jitt=mix(vec3(0.0),randomJitter*spread,jitterMix);}viewNormal+=jitt;float fresnelFactor=fresnel_dielectric(viewDir,viewNormal,ior);vec3 iblRadiance=getIBLRadiance(-viewDir,viewNormal,0.)*fresnelFactor;float lastFrameAlpha=textureLod(accumulatedTexture,vUv,0.0).a;if(roughness>maxRoughness||(roughness>1.0-FLOAT_EPSILON&&roughnessFade>1.0-FLOAT_EPSILON)){gl_FragColor=vec4(iblRadiance,lastFrameAlpha);return;}vec3 reflected=reflect(viewDir,viewNormal);vec3 rayDir=reflected*-viewPos.z;vec3 hitPos=viewPos;float rayHitDepthDifference;vec2 coords=RayMarch(rayDir,hitPos,rayHitDepthDifference);if(coords.x==-1.0){gl_FragColor=vec4(iblRadiance,lastFrameAlpha);return;}vec4 SSRTexel=textureLod(inputTexture,coords.xy,0.0);vec4 SSRTexelReflected=textureLod(accumulatedTexture,coords.xy,0.0);vec3 SSR=SSRTexel.rgb+SSRTexelReflected.rgb;float roughnessFactor=mix(specular,1.0,max(0.0,1.0-roughnessFade));vec2 coordsNDC=(coords.xy*2.0-1.0);float screenFade=0.1;float maxDimension=min(1.0,max(abs(coordsNDC.x),abs(coordsNDC.y)));float reflectionIntensity=1.0-(max(0.0,maxDimension-screenFade)/(1.0-screenFade));reflectionIntensity=max(0.,reflectionIntensity);vec3 finalSSR=mix(iblRadiance,SSR,reflectionIntensity)*roughnessFactor;if(fade!=0.0){vec3 hitWorldPos=screenSpaceToWorldSpace(coords,rayHitDepthDifference);float reflectionDistance=distance(hitWorldPos,worldPos)+1.0;float opacity=1.0/(reflectionDistance*fade*0.1);if(opacity>1.0)opacity=1.0;finalSSR*=opacity;}finalSSR*=fresnelFactor*intensity;finalSSR=min(vec3(1.0),finalSSR);float alpha=hitPos.z==1.0 ? 1.0 : SSRTexelReflected.a;alpha=min(lastFrameAlpha,alpha);gl_FragColor=vec4(finalSSR,alpha);}vec2 RayMarch(vec3 dir,inout vec3 hitPos,inout float rayHitDepthDifference){dir=normalize(dir);dir*=rayDistance/float(steps);float depth;vec4 projectedCoord;vec4 lastProjectedCoord;float unpackedDepth;vec4 depthTexel;for(int i=0;i1.0||projectedCoord.y<0.0||projectedCoord.y>1.0){return INVALID_RAY_COORDS;}\n#endif\ndepthTexel=textureLod(depthTexture,projectedCoord.xy,0.0);unpackedDepth=unpackRGBAToDepth(depthTexel);depth=fastGetViewZ(unpackedDepth);rayHitDepthDifference=depth-hitPos.z;if(rayHitDepthDifference>=0.0&&rayHitDepthDifference0.0){return INVALID_RAY_COORDS;}\n#endif\nlastProjectedCoord=projectedCoord;}hitPos.z=1.0;\n#ifndef missedRays\nreturn INVALID_RAY_COORDS;\n#endif\nrayHitDepthDifference=unpackedDepth;return projectedCoord.xy;}vec2 BinarySearch(in vec3 dir,inout vec3 hitPos,inout float rayHitDepthDifference){float depth;vec4 projectedCoord;vec2 lastMinProjectedCoordXY;float unpackedDepth;vec4 depthTexel;for(int i=0;i0.0){hitPos-=dir;}else{hitPos+=dir;}}if(dot(depthTexel.rgb,depthTexel.rgb)maxDepthDifference)return INVALID_RAY_COORDS;projectedCoord=_projectionMatrix*vec4(hitPos,1.0);projectedCoord.xy/=projectedCoord.w;projectedCoord.xy=projectedCoord.xy*0.5+0.5;rayHitDepthDifference=unpackedDepth;return projectedCoord.xy;}float fastGetViewZ(const in float depth){\n#ifdef PERSPECTIVE_CAMERA\nreturn nearMulFar/(farMinusNear*depth-cameraFar);\n#else\nreturn depth*nearMinusFar-cameraNear;\n#endif\n}\n#include \n#include \nvec3 getIBLRadiance(const in vec3 viewDir,const in vec3 normal,const in float roughness){\n#if defined(ENVMAP_TYPE_CUBE_UV)\nvec3 reflectVec=reflect(-viewDir,normal);reflectVec=normalize(mix(reflectVec,normal,roughness*roughness));reflectVec=inverseTransformDirection(reflectVec,viewMatrix);vec4 envMapColor=textureCubeUV(envMap,reflectVec,roughness);return envMapColor.rgb*intensity;\n#else\nreturn vec3(0.0);\n#endif\n}".replace("#include ",$a),vertexShader:"#define GLSLIFY 1\nvarying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}",toneMapped:!1,depthWrite:!1,depthTest:!1})}}const nl=e=>{const t=[e],n=[];for(;0!==t.length;){const e=t.shift();e.material&&n.push(e);for(const n of e.children)n.visible&&t.push(n)}return n},il=(e,t,n)=>{e.uniforms.envMap.value=t;const i=(e=>{const t=e.envMapCubeUVHeight;if(null===t)return null;const n=Math.log2(t)-2,i=1/t;return{texelWidth:1/(3*Math.max(Math.pow(2,n),112)),texelHeight:i,maxMip:n}})({envMapCubeUVHeight:n});e.defines.ENVMAP_TYPE_CUBE_UV="",e.defines.CUBEUV_TEXEL_WIDTH=i.texelWidth,e.defines.CUBEUV_TEXEL_HEIGHT=i.texelHeight,e.defines.CUBEUV_MAX_MIP=i.maxMip+".0",e.needsUpdate=!0};class sl extends Nr{constructor(e,t={}){super("ReflectionsPass"),this.ssrEffect=void 0,this.cachedMaterials=new WeakMap,this.USE_MRT=!1,this.webgl1DepthPass=null,this.visibleMeshes=[],this.ssrEffect=e,this._scene=e._scene,this._camera=e._camera,this.fullscreenMaterial=new tl,e._camera.isPerspectiveCamera&&(this.fullscreenMaterial.defines.PERSPECTIVE_CAMERA="");const n=t.width||"undefined"!=typeof window?window.innerWidth:2e3,i=t.height||"undefined"!=typeof window?window.innerHeight:1e3;this.renderTarget=new X(n,i,{minFilter:ee,magFilter:ee,type:l,depthBuffer:!1}),this.renderPass=new Eo(this._scene,this._camera),this.USE_MRT=(()=>{try{const e=document.createElement("canvas");return!(!window.WebGL2RenderingContext||!e.getContext("webgl2"))}catch(e){return!1}})(),this.USE_MRT?(this.gBuffersRenderTarget=new X(n,i,{minFilter:ee,magFilter:ee,count:2}),this.normalTexture=this.gBuffersRenderTarget.texture[0],this.depthTexture=this.gBuffersRenderTarget.texture[1]):(this.webgl1DepthPass=new Vo(this._scene,this._camera),this.webgl1DepthPass.renderTarget.minFilter=ee,this.webgl1DepthPass.renderTarget.magFilter=ee,this.webgl1DepthPass.renderTarget.texture.minFilter=ee,this.webgl1DepthPass.renderTarget.texture.magFilter=ee,this.webgl1DepthPass.setSize("undefined"!=typeof window?window.innerWidth:2e3,"undefined"!=typeof window?window.innerHeight:1e3),this.gBuffersRenderTarget=new X(n,i,{minFilter:ee,magFilter:ee}),this.normalTexture=this.gBuffersRenderTarget.texture,this.depthTexture=this.webgl1DepthPass.texture),this.fullscreenMaterial.uniforms.normalTexture.value=this.normalTexture,this.fullscreenMaterial.uniforms.depthTexture.value=this.depthTexture,this.fullscreenMaterial.uniforms.accumulatedTexture.value=this.ssrEffect.temporalResolvePass.accumulatedTexture,this.fullscreenMaterial.uniforms.cameraMatrixWorld.value=this._camera.matrixWorld,this.fullscreenMaterial.uniforms._projectionMatrix.value=this._camera.projectionMatrix,this.fullscreenMaterial.uniforms._inverseProjectionMatrix.value=this._camera.projectionMatrixInverse}setSize(e,t){this.renderTarget.setSize(e*this.ssrEffect.resolutionScale,t*this.ssrEffect.resolutionScale),this.gBuffersRenderTarget.setSize(e*this.ssrEffect.resolutionScale,t*this.ssrEffect.resolutionScale),this.fullscreenMaterial.uniforms.accumulatedTexture.value=this.ssrEffect.temporalResolvePass.accumulatedTexture,this.fullscreenMaterial.needsUpdate=!0}dispose(){this.renderTarget.dispose(),this.gBuffersRenderTarget.dispose(),this.renderPass.dispose(),this.USE_MRT||this.webgl1DepthPass.dispose(),this.fullscreenMaterial.dispose(),this.normalTexture=null,this.depthTexture=null,this.velocityTexture=null}keepMaterialMapUpdated(e,t,n,i){this.ssrEffect[i]?t[n]!==e[n]&&(e[n]=t[n],e.uniforms[n].value=t[n],t[n]?e.defines[i]="":delete e.defines[i],e.needsUpdate=!0):void 0!==e[n]&&(e[n]=void 0,e.uniforms[n].value=void 0,delete e.defines[i],e.needsUpdate=!0)}setMRTMaterialInScene(){this.visibleMeshes=nl(this._scene);for(const e of this.visibleMeshes)if(e.material){const t=e.material;let[n,i]=this.cachedMaterials.get(e)||[];if(t!==n){i&&i.dispose(),i=new el,this.USE_MRT&&(i.defines.USE_MRT=""),i.normalScale=t.normalScale,i.uniforms.normalScale.value=t.normalScale;const n=t.map||t.normalMap||t.roughnessMap||t.metalnessMap;n&&(i.uniforms.uvTransform.value=n.matrix),this.cachedMaterials.set(e,[t,i])}this.keepMaterialMapUpdated(i,t,"normalMap","useNormalMap"),this.keepMaterialMapUpdated(i,t,"roughnessMap","useRoughnessMap"),i.uniforms.roughness.value=0===this.ssrEffect.selection.size||this.ssrEffect.selection.has(e)?t.roughness||0:1e11,e.material=i}}unsetMRTMaterialInScene(){for(const t of this.visibleMeshes){var e;if("MRTMaterial"===(null==(e=t.material)?void 0:e.type)){t.visible=!0;const[e]=this.cachedMaterials.get(t);t.material=e}}}render(e,t){this.setMRTMaterialInScene(),e.setRenderTarget(this.gBuffersRenderTarget),this.renderPass.render(e,this.gBuffersRenderTarget),this.unsetMRTMaterialInScene(),this.USE_MRT||this.webgl1DepthPass.renderPass.render(e,this.webgl1DepthPass.renderTarget),this.fullscreenMaterial.uniforms.inputTexture.value=t.texture,this.fullscreenMaterial.uniforms.samples.value=this.ssrEffect.temporalResolvePass.samples,this.fullscreenMaterial.uniforms.cameraNear.value=this._camera.near,this.fullscreenMaterial.uniforms.cameraFar.value=this._camera.far,this.fullscreenMaterial.uniforms.viewMatrix.value.copy(this._camera.matrixWorldInverse),e.setRenderTarget(this.renderTarget),e.render(this.scene,this.camera)}}const rl={intensity:1,exponent:1,distance:10,fade:0,roughnessFade:1,thickness:10,ior:1.45,maxRoughness:1,maxDepthDifference:10,blend:.9,correction:1,correctionRadius:1,blur:.5,blurKernel:1,blurSharpness:10,jitter:0,jitterRoughness:0,steps:20,refineSteps:5,missedRays:!0,useNormalMap:!0,useRoughnessMap:!0,resolutionScale:1,velocityResolutionScale:1};class ol extends ae{constructor(e){const t="#define GLSLIFY 1\nuniform sampler2D inputTexture;uniform sampler2D accumulatedTexture;uniform sampler2D velocityTexture;uniform sampler2D lastVelocityTexture;uniform float blend;uniform float correction;uniform float exponent;uniform float samples;uniform vec2 invTexSize;uniform mat4 curInverseProjectionMatrix;uniform mat4 curCameraMatrixWorld;uniform mat4 prevInverseProjectionMatrix;uniform mat4 prevCameraMatrixWorld;varying vec2 vUv;\n#define MAX_NEIGHBOR_DEPTH_DIFFERENCE 0.001\n#define FLOAT_EPSILON 0.00001\n#define FLOAT_ONE_MINUS_EPSILON 0.99999\nvec3 transformexponent;vec3 undoColorTransformExponent;vec3 transformColor(vec3 color){if(exponent==1.0)return color;return pow(abs(color),transformexponent);}vec3 undoColorTransform(vec3 color){if(exponent==1.0)return color;return max(pow(abs(color),undoColorTransformExponent),vec3(0.0));}void main(){if(exponent!=1.0){transformexponent=vec3(1.0/exponent);undoColorTransformExponent=vec3(exponent);}vec4 inputTexel=textureLod(inputTexture,vUv,0.0);vec4 accumulatedTexel;vec3 inputColor=transformColor(inputTexel.rgb);vec3 accumulatedColor;float alpha=inputTexel.a;float velocityDisocclusion;bool didReproject=false;\n#ifdef boxBlur\nvec3 boxBlurredColor=inputTexel.rgb;\n#endif\nvec4 velocity=textureLod(velocityTexture,vUv,0.0);bool isMoving=alpha<1.0||dot(velocity.xy,velocity.xy)>0.0;if(isMoving){vec3 minNeighborColor=inputColor;vec3 maxNeighborColor=inputColor;vec3 col;vec2 neighborUv;vec2 reprojectedUv=vUv-velocity.xy;vec4 lastVelocity=textureLod(lastVelocityTexture,reprojectedUv,0.0);float depth=velocity.b;float closestDepth=depth;float lastClosestDepth=lastVelocity.b;float neighborDepth;float lastNeighborDepth;for(int x=-correctionRadius;x<=correctionRadius;x++){for(int y=-correctionRadius;y<=correctionRadius;y++){if(x!=0||y!=0){neighborUv=vUv+vec2(x,y)*invTexSize;vec4 neigborVelocity=textureLod(velocityTexture,neighborUv,0.0);neighborDepth=neigborVelocity.b;col=textureLod(inputTexture,neighborUv,0.0).xyz;int absX=abs(x);int absY=abs(y);\n#ifdef dilation\nif(absX==1&&absY==1){if(neighborDepth>closestDepth){velocity=neigborVelocity;closestDepth=neighborDepth;}vec4 lastNeighborVelocity=textureLod(velocityTexture,vUv+vec2(x,y)*invTexSize,0.0);lastNeighborDepth=lastNeighborVelocity.b;if(neighborDepth>closestDepth){lastVelocity=lastNeighborVelocity;lastClosestDepth=lastNeighborDepth;}}\n#endif\nif(abs(depth-neighborDepth)5 ? 121.0 : pow(float(correctionRadius*2+1),2.0);boxBlurredColor/=pxRadius;boxBlurredColor=transformColor(boxBlurredColor);\n#endif\nif(reprojectedUv.x>=0.0&&reprojectedUv.x<=1.0&&reprojectedUv.y>=0.0&&reprojectedUv.y<=1.0){accumulatedTexel=textureLod(accumulatedTexture,reprojectedUv,0.0);accumulatedColor=transformColor(accumulatedTexel.rgb);vec3 clampedColor=clamp(accumulatedColor,minNeighborColor,maxNeighborColor);accumulatedColor=mix(accumulatedColor,clampedColor,correction);didReproject=true;}else{\n#ifdef boxBlur\naccumulatedColor=boxBlurredColor;\n#else\naccumulatedColor=inputColor;\n#endif\n}if(velocity.r>FLOAT_ONE_MINUS_EPSILON&&velocity.g>FLOAT_ONE_MINUS_EPSILON){alpha=0.0;velocityDisocclusion=1.0;}}else{accumulatedColor=transformColor(textureLod(accumulatedTexture,vUv,0.0).rgb);}vec3 outputColor=inputColor;\n#include \ngl_FragColor=vec4(undoColorTransform(outputColor),alpha);}".replace("#include ",e);super({type:"TemporalResolveMaterial",uniforms:{inputTexture:new Z(null),accumulatedTexture:new Z(null),velocityTexture:new Z(null),lastVelocityTexture:new Z(null),samples:new Z(1),blend:new Z(.5),correction:new Z(1),exponent:new Z(1),invTexSize:new Z(new f)},defines:{correctionRadius:1},vertexShader:"#define GLSLIFY 1\nvarying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}",fragmentShader:t})}}const al=`\n\t\tvec3 transformed;\n\n\t\t// Get the normal\n\t\t${Ie.skinbase_vertex}\n\t\t${Ie.beginnormal_vertex}\n\t\t${Ie.skinnormal_vertex}\n\t\t${Ie.defaultnormal_vertex}\n\n\t\t// Get the current vertex position\n\t\ttransformed = vec3( position );\n\t\t${Ie.skinning_vertex}\n\t\tnewPosition = velocityMatrix * vec4( transformed, 1.0 );\n\n\t\t// Get the previous vertex position\n\t\ttransformed = vec3( position );\n\t\t${Ie.skinbase_vertex.replace(/mat4 /g,"").replace(/getBoneMatrix/g,"getPrevBoneMatrix")}\n\t\t${Ie.skinning_vertex.replace(/vec4 /g,"")}\n\t\tprevPosition = prevVelocityMatrix * vec4( transformed, 1.0 );\n\n\t\tgl_Position = newPosition;\n`;class ll extends ae{constructor(){super({uniforms:{prevVelocityMatrix:{value:new m},velocityMatrix:{value:new m},prevBoneTexture:{value:null},interpolateGeometry:{value:0},intensity:{value:1},boneTexture:{value:null},alphaTest:{value:0},map:{value:null},alphaMap:{value:null},opacity:{value:1}},vertexShader:`\n #define MAX_BONES 1024\n \n ${Ie.skinning_pars_vertex}\n \n\t\t#ifdef USE_SKINNING\n\t\t#ifdef BONE_TEXTURE\n\t\t\tuniform sampler2D prevBoneTexture;\n\t\t\tmat4 getPrevBoneMatrix( const in float i ) {\n\t\t\t\tfloat j = i * 4.0;\n\t\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\t\ty = dy * ( y + 0.5 );\n\t\t\t\tvec4 v1 = texture2D( prevBoneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\t\tvec4 v2 = texture2D( prevBoneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\t\tvec4 v3 = texture2D( prevBoneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\t\tvec4 v4 = texture2D( prevBoneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\t\treturn bone;\n\t\t\t}\n\t\t#else\n\t\t\tuniform mat4 prevBoneMatrices[ MAX_BONES ];\n\t\t\tmat4 getPrevBoneMatrix( const in float i ) {\n\t\t\t\tmat4 bone = prevBoneMatrices[ int(i) ];\n\t\t\t\treturn bone;\n\t\t\t}\n\t\t#endif\n\t\t#endif\n\n \n uniform mat4 velocityMatrix;\n uniform mat4 prevVelocityMatrix;\n uniform float interpolateGeometry;\n varying vec4 prevPosition;\n varying vec4 newPosition;\n\t\t\t\t\tvarying vec2 vHighPrecisionZW;\n \n void main() {\n \n ${al}\n\n\t\t\t\t\t\tvHighPrecisionZW = gl_Position.zw;\n \n }`,fragmentShader:"\n uniform float intensity;\n varying vec4 prevPosition;\n varying vec4 newPosition;\n\t\t\t\t\tvarying vec2 vHighPrecisionZW;\n \n void main() {\n\t\t\t\t\t\t#ifdef FULL_MOVEMENT\n\t\t\t\t\t\tgl_FragColor = vec4( 1., 1., 1. - gl_FragCoord.z, 0. );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t\t#endif\n\n vec2 pos0 = (prevPosition.xy / prevPosition.w) * 0.5 + 0.5;\n vec2 pos1 = (newPosition.xy / newPosition.w) * 0.5 + 0.5;\n \n vec2 vel = pos1 - pos0;\n\n\t\t\t\t\t\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n \n gl_FragColor = vec4( vel, 1. - fragCoordZ, 0. );\n \n }"}),this.isVelocityMaterial=!0}}const cl=new u(0),hl=["visible","wireframe","side"];class ul extends Nr{constructor(e,n){var i,s;super("VelocityPass"),this.cachedMaterials=new WeakMap,this.lastCameraTransform={position:new t,quaternion:new r},this.visibleMeshes=[],this.renderedMeshesThisFrame=0,this.renderedMeshesLastFrame=0,this._scene=e,this._camera=n,this.renderTarget=new X((null==(i=window)?void 0:i.innerWidth)||1e3,(null==(s=window)?void 0:s.innerHeight)||1e3,{type:l})}setVelocityMaterialInScene(){this.renderedMeshesThisFrame=0,this.visibleMeshes=nl(this._scene);for(const n of this.visibleMeshes){var e;const i=n.material;let[s,r]=this.cachedMaterials.get(n)||[];var t;if(i!==s)r=new ll,r.lastMatrixWorld=new m,n.material=r,null!=(t=n.skeleton)&&t.boneTexture&&this.saveBoneTexture(n),this.cachedMaterials.set(n,[i,r]);if(r.uniforms.velocityMatrix.value.multiplyMatrices(this._camera.projectionMatrix,n.modelViewMatrix),n.userData.needsUpdatedReflections||i.map instanceof Ne?("FULL_MOVEMENT"in r.defines||(r.needsUpdate=!0),r.defines.FULL_MOVEMENT=""):"FULL_MOVEMENT"in r.defines&&(delete r.defines.FULL_MOVEMENT,r.needsUpdate=!0),n.visible=this.cameraMovedThisFrame||!n.matrixWorld.equals(r.lastMatrixWorld)||n.skeleton||"FULL_MOVEMENT"in r.defines,n.material=r,n.visible){this.renderedMeshesThisFrame++;for(const e of hl)r[e]=i[e];null!=(e=n.skeleton)&&e.boneTexture&&(r.defines.USE_SKINNING="",r.defines.BONE_TEXTURE="",r.uniforms.boneTexture.value=n.skeleton.boneTexture)}}}saveBoneTexture(e){let t=e.material.uniforms.prevBoneTexture.value;if(t&&t.image.width===e.skeleton.boneTexture.width)t=e.material.uniforms.prevBoneTexture.value,t.image.data.set(e.skeleton.boneTexture.image.data);else{var n;null==(n=t)||n.dispose();const i=e.skeleton.boneTexture.image.data.slice(),s=e.skeleton.boneTexture.image.width;t=new Ce(i,s,s,Be,Oe),e.material.uniforms.prevBoneTexture.value=t,t.needsUpdate=!0}}unsetVelocityMaterialInScene(){for(const t of this.visibleMeshes){var e;if(t.material.isVelocityMaterial)t.visible=!0,t.material.lastMatrixWorld.copy(t.matrixWorld),t.material.uniforms.prevVelocityMatrix.value.multiplyMatrices(this._camera.projectionMatrix,t.modelViewMatrix),null!=(e=t.skeleton)&&e.boneTexture&&this.saveBoneTexture(t),t.material=this.cachedMaterials.get(t)[0]}}setSize(e,t){this.renderTarget.setSize(e,t)}renderVelocity(e){if(e.setRenderTarget(this.renderTarget),this.renderedMeshesThisFrame>0){const{background:t}=this._scene;this._scene.background=cl,e.render(this._scene,this._camera),this._scene.background=t}else e.clearColor()}checkCameraMoved(){const e=this.lastCameraTransform.position.distanceToSquared(this._camera.position),t=8*(1-this.lastCameraTransform.quaternion.dot(this._camera.quaternion));return(e>1e-6||t>1e-6)&&(this.lastCameraTransform.position.copy(this._camera.position),this.lastCameraTransform.quaternion.copy(this._camera.quaternion),!0)}render(e){this.cameraMovedThisFrame=this.checkCameraMoved(),this.setVelocityMaterialInScene(),(this.renderedMeshesThisFrame>0||this.renderedMeshesLastFrame>0)&&this.renderVelocity(e),this.unsetVelocityMaterialInScene(),this.renderedMeshesLastFrame=this.renderedMeshesThisFrame}}const dl=new f;class pl extends Nr{constructor(e,n,i,s={}){super("TemporalResolvePass"),this.velocityPass=null,this.velocityResolutionScale=1,this.samples=1,this.lastCameraTransform={position:new t,quaternion:new r},this._scene=e,this._camera=n,this.renderTarget=new X(1,1,{minFilter:ee,magFilter:ee,type:l,depthBuffer:!1}),this.velocityPass=new ul(e,n),this.fullscreenMaterial=new ol(i),this.fullscreenMaterial.defines.correctionRadius=s.correctionRadius||1,s.dilation&&(this.fullscreenMaterial.defines.dilation=""),s.boxBlur&&(this.fullscreenMaterial.defines.boxBlur=""),this.setupFramebuffers(1,1),this.checkCanUseSharedVelocityTexture()}dispose(){this._scene.userData.velocityTexture===this.velocityPass.renderTarget.texture&&(delete this._scene.userData.velocityTexture,delete this._scene.userData.lastVelocityTexture),this.renderTarget.dispose(),this.accumulatedTexture.dispose(),this.fullscreenMaterial.dispose(),this.velocityPass.dispose()}setSize(e,t){this.renderTarget.setSize(e,t),this.velocityPass.setSize(e*this.velocityResolutionScale,t*this.velocityResolutionScale),this.velocityPass.renderTarget.texture.minFilter=1===this.velocityResolutionScale?$:ee,this.velocityPass.renderTarget.texture.magFilter=1===this.velocityResolutionScale?$:ee,this.velocityPass.renderTarget.texture.needsUpdate=!0,this.fullscreenMaterial.uniforms.invTexSize.value.set(1/e,1/t),this.setupFramebuffers(e,t)}setupFramebuffers(e,t){this.accumulatedTexture&&this.accumulatedTexture.dispose(),this.lastVelocityTexture&&this.lastVelocityTexture.dispose(),this.accumulatedTexture=new Ue(e,t,Be),this.accumulatedTexture.minFilter=ee,this.accumulatedTexture.magFilter=ee,this.accumulatedTexture.type=l,this.lastVelocityTexture=new Ue(e*this.velocityResolutionScale,t*this.velocityResolutionScale,Be),this.lastVelocityTexture.minFilter=1===this.velocityResolutionScale?$:ee,this.lastVelocityTexture.magFilter=1===this.velocityResolutionScale?$:ee,this.lastVelocityTexture.type=l,this.fullscreenMaterial.uniforms.accumulatedTexture.value=this.accumulatedTexture,this.fullscreenMaterial.uniforms.lastVelocityTexture.value=this.lastVelocityTexture,this.fullscreenMaterial.needsUpdate=!0}checkCanUseSharedVelocityTexture(){return this._scene.userData.velocityTexture&&this.velocityPass.renderTarget.texture!==this._scene.userData.velocityTexture?this.velocityPass.renderTarget.texture===this.fullscreenMaterial.uniforms.velocityTexture.value&&(this.fullscreenMaterial.uniforms.lastVelocityTexture.value=this._scene.userData.lastVelocityTexture,this.fullscreenMaterial.uniforms.velocityTexture.value=this._scene.userData.velocityTexture,this.fullscreenMaterial.needsUpdate=!0):this.velocityPass.renderTarget.texture!==this.fullscreenMaterial.uniforms.velocityTexture.value&&(this.fullscreenMaterial.uniforms.velocityTexture.value=this.velocityPass.renderTarget.texture,this.fullscreenMaterial.uniforms.lastVelocityTexture.value=this.lastVelocityTexture,this.fullscreenMaterial.needsUpdate=!0,this._scene.userData.velocityTexture||(this._scene.userData.velocityTexture=this.velocityPass.renderTarget.texture,this._scene.userData.lastVelocityTexture=this.lastVelocityTexture)),this.velocityPass.renderTarget.texture!==this.fullscreenMaterial.uniforms.velocityTexture.value}checkNeedsResample(){const e=this.lastCameraTransform.position.distanceToSquared(this._camera.position),t=8*(1-this.lastCameraTransform.quaternion.dot(this._camera.quaternion));(e>1e-6||t>1e-6)&&(this.samples=1,this.lastCameraTransform.position.copy(this._camera.position),this.lastCameraTransform.quaternion.copy(this._camera.quaternion))}render(e){this.samples++,this.checkNeedsResample(),this.fullscreenMaterial.uniforms.samples.value=this.samples,e.setRenderTarget(this.renderTarget),e.render(this.scene,this.camera),e.copyFramebufferToTexture(dl,this.accumulatedTexture),e.setRenderTarget(this.velocityPass.renderTarget),e.copyFramebufferToTexture(dl,this.lastVelocityTexture)}}const fl=function(e,t){let n=1,i=0;for(;e>0;)n/=t,i+=n*(e%t),e=~~(e/t);return i};function ml(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const gl="#define GLSLIFY 1\n#define MODE_DEFAULT 0\n#define MODE_REFLECTIONS 1\n#define MODE_RAW_REFLECTION 2\n#define MODE_BLURRED_REFLECTIONS 3\n#define MODE_INPUT 4\n#define MODE_BLUR_MIX 5\n#define FLOAT_EPSILON 0.00001\nuniform sampler2D inputTexture;uniform sampler2D reflectionsTexture;uniform float samples;\n#include \nvoid mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec4 reflectionsTexel=texture2D(reflectionsTexture,vUv);ivec2 size=textureSize(reflectionsTexture,0);vec2 invTexSize=1./vec2(size.x,size.y);vec3 reflectionClr=reflectionsTexel.xyz;if(blur>FLOAT_EPSILON){vec3 blurredReflectionsColor=denoise(reflectionsTexel.rgb,reflectionsTexture,vUv,invTexSize,blur,blurSharpness,blurKernel);reflectionClr=mix(reflectionClr,blurredReflectionsColor.rgb,blur);}\n#if RENDER_MODE == MODE_DEFAULT\noutputColor=vec4(inputColor.rgb+reflectionClr,1.0);\n#endif\n#if RENDER_MODE == MODE_REFLECTIONS\noutputColor=vec4(reflectionClr,1.0);\n#endif\n#if RENDER_MODE == MODE_RAW_REFLECTION\noutputColor=vec4(reflectionsTexel.xyz,1.0);\n#endif\n#if RENDER_MODE == MODE_BLURRED_REFLECTIONS\noutputColor=vec4(blurredReflectionsTexel.xyz,1.0);\n#endif\n#if RENDER_MODE == MODE_INPUT\noutputColor=vec4(inputColor.xyz,1.0);\n#endif\n#if RENDER_MODE == MODE_BLUR_MIX\noutputColor=vec4(vec3(blur),1.0);\n#endif\n}".replace("#include ",$a).replace("#include ","#define GLSLIFY 1\nuniform float blur;uniform float blurSharpness;uniform int blurKernel;vec3 denoise(vec3 center,sampler2D tex,vec2 uv,vec2 invTexSize,float blur,float blurSharpness,int blurKernel){vec3 color;float total;vec3 col;float weight;for(int x=-blurKernel;x<=blurKernel;x++){for(int y=-blurKernel;y<=blurKernel;y++){col=textureLod(tex,uv+vec2(x,y)*invTexSize,0.).rgb;weight=1.0-abs(dot(col-center,vec3(0.25)));weight=pow(weight,blurSharpness);color+=col*weight;total+=weight;}}return color/total;}"),vl=["blur","blurSharpness","blurKernel"],yl=new Le(1);let wl;class xl extends To{constructor(e,t,n=rl){super("SSREffect",gl,{type:"FinalSSRMaterial",uniforms:new Map([["reflectionsTexture",new Z(null)],["blur",new Z(0)],["blurSharpness",new Z(0)],["blurKernel",new Z(0)]]),defines:new Map([["RENDER_MODE","0"]])}),this.haltonSequence=(e=>{const t=[];let n=1;const i=n+e;for(;n0.5;\n#ifdef boxBlur\nif(needsBlur)inputColor=boxBlurredColor;\n#endif\nif(alpha==1.0){outputColor=accumulatedColor;}else{float m=mix(alpha,1.0,blend);if(needsBlur)m=0.0;outputColor=accumulatedColor*m+inputColor*(1.0-m);}",n),this.uniforms.get("reflectionsTexture").value=this.temporalResolvePass.renderTarget.texture,this.reflectionsPass=new sl(this,n),this.temporalResolvePass.fullscreenMaterial.uniforms.inputTexture.value=this.reflectionsPass.renderTarget.texture,this.lastSize={width:n.width,height:n.height,resolutionScale:n.resolutionScale,velocityResolutionScale:n.velocityResolutionScale},this.setSize(n.width,n.height),this.makeOptionsReactive(n)}makeOptionsReactive(e){let t=!1;const n=this.reflectionsPass.fullscreenMaterial.uniforms,i=Object.keys(n);for(const s of Object.keys(e))Object.defineProperty(this,s,{get:()=>e[s],set(r){if(e[s]!==r||!t)switch(e[s]=r,vl.includes(s)||this.setSize(this.lastSize.width,this.lastSize.height,!0),s){case"resolutionScale":this.setSize(this.lastSize.width,this.lastSize.height);break;case"velocityResolutionScale":this.temporalResolvePass.velocityResolutionScale=r,this.setSize(this.lastSize.width,this.lastSize.height,!0);break;case"blur":this.uniforms.get("blur").value=r;break;case"blurSharpness":this.uniforms.get("blurSharpness").value=r;break;case"blurKernel":this.uniforms.get("blurKernel").value=r;break;case"steps":this.reflectionsPass.fullscreenMaterial.defines.steps=parseInt(r),this.reflectionsPass.fullscreenMaterial.needsUpdate=t;break;case"refineSteps":this.reflectionsPass.fullscreenMaterial.defines.refineSteps=parseInt(r),this.reflectionsPass.fullscreenMaterial.needsUpdate=t;break;case"missedRays":r?this.reflectionsPass.fullscreenMaterial.defines.missedRays="":delete this.reflectionsPass.fullscreenMaterial.defines.missedRays,this.reflectionsPass.fullscreenMaterial.needsUpdate=t;break;case"correctionRadius":this.temporalResolvePass.fullscreenMaterial.defines.correctionRadius=Math.round(r),this.temporalResolvePass.fullscreenMaterial.needsUpdate=t;break;case"blend":this.temporalResolvePass.fullscreenMaterial.uniforms.blend.value=r;break;case"correction":this.temporalResolvePass.fullscreenMaterial.uniforms.correction.value=r;break;case"exponent":this.temporalResolvePass.fullscreenMaterial.uniforms.exponent.value=r;break;case"distance":n.rayDistance.value=r;default:i.includes(s)&&(n[s].value=r)}}}),this[s]=e[s];t=!0}setSize(e,t,n=!1){(n||e!==this.lastSize.width||t!==this.lastSize.height||this.resolutionScale!==this.lastSize.resolutionScale||this.velocityResolutionScale!==this.lastSize.velocityResolutionScale)&&(this.temporalResolvePass.setSize(e,t),this.reflectionsPass.setSize(e,t),this.lastSize={width:e,height:t,resolutionScale:this.resolutionScale,velocityResolutionScale:this.velocityResolutionScale})}generateBoxProjectedEnvMapFallback(e,n=new t,i=new t,s=512){this.cubeCamera.renderTarget.dispose(),this.cubeCamera.renderTarget=new Le(s),this.cubeCamera.position.copy(n),this.cubeCamera.updateMatrixWorld(),this.cubeCamera.update(e,this._scene),wl||(wl=new Fe(e),wl.compileCubemapShader());const r=wl.fromCubemap(this.cubeCamera.renderTarget.texture).texture;r.minFilter=ee,r.magFilter=ee;const o=this.reflectionsPass.fullscreenMaterial;return function(e,t,n){e.defines.BOX_PROJECTED_ENV_MAP="",e.uniforms.envMapPosition={value:t},e.uniforms.envMapSize={value:n};const i=new RegExp(ml("vec3 worldNormal = inverseTransformDirection ( normal , viewMatrix ) ;").replaceAll(" ","\\s*"),"g"),s=new RegExp(ml("reflectVec = inverseTransformDirection ( reflectVec , viewMatrix ) ;").replaceAll(" ","\\s*"),"g");e.vertexShader="varying vec3 vWorldPosition;\n"+e.vertexShader.replace("#include ","\n#if defined( USE_ENVMAP ) || defined( ) || defined ( USE_SHADOWMAP )\n vec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\n\n #ifdef BOX_PROJECTED_ENV_MAP\n vWorldPosition = worldPosition.xyz;\n #endif\n#endif\n"),e.fragmentShader="\n#ifdef BOX_PROJECTED_ENV_MAP\n uniform vec3 envMapSize;\n uniform vec3 envMapPosition;\n varying vec3 vWorldPosition;\n \n vec3 parallaxCorrectNormal( vec3 v, vec3 cubeSize, vec3 cubePos ) {\n vec3 nDir = normalize( v );\n\n vec3 rbmax = ( .5 * cubeSize + cubePos - vWorldPosition ) / nDir;\n vec3 rbmin = ( -.5 * cubeSize + cubePos - vWorldPosition ) / nDir;\n\n vec3 rbminmax;\n\n rbminmax.x = ( nDir.x > 0. ) ? rbmax.x : rbmin.x;\n rbminmax.y = ( nDir.y > 0. ) ? rbmax.y : rbmin.y;\n rbminmax.z = ( nDir.z > 0. ) ? rbmax.z : rbmin.z;\n\n float correction = min( min( rbminmax.x, rbminmax.y ), rbminmax.z );\n vec3 boxIntersection = vWorldPosition + nDir * correction;\n \n return boxIntersection - cubePos;\n }\n#endif\n\n"+e.fragmentShader.replace("#include ",Ie.envmap_physical_pars_fragment).replace(i,"vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n \n#ifdef BOX_PROJECTED_ENV_MAP\n worldNormal = parallaxCorrectNormal( worldNormal, envMapSize, envMapPosition );\n#endif\n").replace(s,"reflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n \n#ifdef BOX_PROJECTED_ENV_MAP\n reflectVec = parallaxCorrectNormal( reflectVec, envMapSize, envMapPosition );\n#endif\n")}(o,n,i),o.fragmentShader=o.fragmentShader.replace("vec3 worldPos","worldPos").replace("varying vec3 vWorldPosition;","vec3 worldPos;"),o.uniforms.envMapPosition.value.copy(n),o.uniforms.envMapSize.value.copy(i),il(o,r,s),this.usingBoxProjectedEnvMap=!0,r}setIBLRadiance(e,t){this._scene.traverse((n=>{if(n.material){var i;const s=null==(i=t.properties.get(n.material))?void 0:i.uniforms;s&&"disableIBLRadiance"in s&&(s.disableIBLRadiance.value=e)}}))}deleteBoxProjectedEnvMapFallback(){const e=this.reflectionsPass.fullscreenMaterial;e.uniforms.envMap.value=null,e.fragmentShader=e.fragmentShader.replace("worldPos = ","vec3 worldPos = "),delete e.defines.BOX_PROJECTED_ENV_MAP,e.needsUpdate=!0,this.usingBoxProjectedEnvMap=!1}dispose(){super.dispose(),this.reflectionsPass.dispose(),this.temporalResolvePass.dispose()}update(e,t){if(!this.usingBoxProjectedEnvMap&&this._scene.environment){const t=this.reflectionsPass.fullscreenMaterial;let n=null;if(this._scene.traverse((t=>{if(!n&&t.material&&!t.material.envMap){const i=e.properties.get(t.material);"envMap"in i&&i.envMap instanceof d&&(n=i.envMap)}})),n){const e=this._scene.environment.image.height;il(t,n,e)}}this.haltonIndex=(this.haltonIndex+1)%this.haltonSequence.length;const[n,i]=this.haltonSequence[this.haltonIndex],{width:s,height:r}=this.lastSize;this.temporalResolvePass.velocityPass.render(e),this._camera.setViewOffset&&this._camera.setViewOffset(s,r,n,i,s,r),this.reflectionsPass.render(e,t),this.temporalResolvePass.render(e),this._camera.clearViewOffset()}static patchDirectEnvIntensity(e=0){Ie.envmap_physical_pars_fragment=0===e?Ie.envmap_physical_pars_fragment.replace("vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {","vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { return vec3(0.0);"):Ie.envmap_physical_pars_fragment.replace("vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );","vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness ) * "+e.toFixed(5)+";")}}const Al="EffectPass";class bl{constructor(e,t,n){this.renderer=e,this.scene=t,this.camera=n,this.passesMap=new Map,this.effectsMap=new Map,this.effectsNeedsUpdate=!0,this.effectComposer=this._initEffectComposer(),this._initPasses(),this._initEffects()}updateEffectPass(){if(!this.effectsNeedsUpdate)return;this.effectsNeedsUpdate=!1;const{effectComposer:e}=this;e.passes.forEach((t=>{t.name===Al&&(e.removePass(t),t.dispose())}));const t=Array.from(this.effectsMap).filter((([,{enabled:e}])=>e)).map((([,{effect:e}])=>e)),n=new na(this.camera,...t);n.name=Al,n.enabled=!!t.length,this.passesMap.set(bl.CONSTANTS.effectPass,n),e.addPass(n)}updateCamera(e){const{effectComposer:t}=this;t.setMainCamera(e),this.effectsMap.forEach((({effect:t})=>t.mainCamera=e))}_initEffectComposer(){return new class{constructor(e=null,{depthBuffer:t=!0,stencilBuffer:n=!1,multisampling:i=0,frameBufferType:s}={}){this.renderer=null,this.inputBuffer=this.createBuffer(t,n,s,i),this.outputBuffer=this.inputBuffer.clone(),this.copyPass=new _r,this.depthTexture=null,this.passes=[],this.timer=new class{constructor(){this.startTime=performance.now(),this.previousTime=0,this.currentTime=0,this._delta=0,this._elapsed=0,this._fixedDelta=1e3/60,this.timescale=1,this.useFixedDelta=!1,this._autoReset=!1}get autoReset(){return this._autoReset}set autoReset(e){"undefined"!=typeof document&&void 0!==document.hidden&&(e?document.addEventListener("visibilitychange",this):document.removeEventListener("visibilitychange",this),this._autoReset=e)}get delta(){return this._delta*zr}get fixedDelta(){return this._fixedDelta*zr}set fixedDelta(e){this._fixedDelta=1e3*e}get elapsed(){return this._elapsed*zr}update(e){this.useFixedDelta?this._delta=this.fixedDelta:(this.previousTime=this.currentTime,this.currentTime=(void 0!==e?e:performance.now())-this.startTime,this._delta=this.currentTime-this.previousTime),this._delta*=this.timescale,this._elapsed+=this._delta}reset(){this._delta=0,this._elapsed=0,this.currentTime=performance.now()-this.startTime}getDelta(){return this.delta}getElapsed(){return this.elapsed}handleEvent(e){document.hidden||(this.currentTime=performance.now()-this.startTime)}dispose(){this.autoReset=!1}},this.autoRenderToScreen=!0,this.setRenderer(e)}get multisampling(){return this.inputBuffer.samples||0}set multisampling(e){const t=this.inputBuffer,n=this.multisampling;n>0&&e>0?(this.inputBuffer.samples=e,this.outputBuffer.samples=e,this.inputBuffer.dispose(),this.outputBuffer.dispose()):n!==e&&(this.inputBuffer.dispose(),this.outputBuffer.dispose(),this.inputBuffer=this.createBuffer(t.depthBuffer,t.stencilBuffer,t.texture.type,e),this.inputBuffer.depthTexture=this.depthTexture,this.outputBuffer=this.inputBuffer.clone())}getTimer(){return this.timer}getRenderer(){return this.renderer}setRenderer(e){if(this.renderer=e,null!==e){const t=e.getSize(new f),n=e.getContext().getContextAttributes().alpha,i=this.inputBuffer.texture.type;i===V&&e.outputColorSpace===_&&(this.inputBuffer.texture.colorSpace=_,this.outputBuffer.texture.colorSpace=_,this.inputBuffer.dispose(),this.outputBuffer.dispose()),e.autoClear=!1,this.setSize(t.width,t.height);for(const t of this.passes)t.initialize(e,n,i)}}replaceRenderer(e,t=!0){const n=this.renderer,i=n.domElement.parentNode;return this.setRenderer(e),t&&null!==i&&(i.removeChild(n.domElement),i.appendChild(e.domElement)),n}createDepthTexture(){const e=this.depthTexture=new Q;return this.inputBuffer.depthTexture=e,this.inputBuffer.dispose(),this.inputBuffer.stencilBuffer?(e.format=W,e.type=Y):e.type=K,e}deleteDepthTexture(){if(null!==this.depthTexture){this.depthTexture.dispose(),this.depthTexture=null,this.inputBuffer.depthTexture=null,this.inputBuffer.dispose();for(const e of this.passes)e.setDepthTexture(null)}}createBuffer(e,t,n,i){const s=this.renderer,r=null===s?new f:s.getDrawingBufferSize(new f),o={minFilter:ee,magFilter:ee,stencilBuffer:t,depthBuffer:e,type:n},a=new X(r.width,r.height,o);return i>0&&(a.ignoreDepthForMultisampleCopy=!1,a.samples=i),n===V&&null!==s&&s.outputColorSpace===_&&(a.texture.colorSpace=_),a.texture.name="EffectComposer.Buffer",a.texture.generateMipmaps=!1,a}setMainScene(e){for(const t of this.passes)t.mainScene=e}setMainCamera(e){for(const t of this.passes)t.mainCamera=e}addPass(e,t){const n=this.passes,i=this.renderer,s=i.getDrawingBufferSize(new f),r=i.getContext().getContextAttributes().alpha,o=this.inputBuffer.texture.type;if(e.setRenderer(i),e.setSize(s.width,s.height),e.initialize(i,r,o),this.autoRenderToScreen&&(n.length>0&&(n[n.length-1].renderToScreen=!1),e.renderToScreen&&(this.autoRenderToScreen=!1)),void 0!==t?n.splice(t,0,e):n.push(e),this.autoRenderToScreen&&(n[n.length-1].renderToScreen=!0),e.needsDepthTexture||null!==this.depthTexture)if(null===this.depthTexture){const t=this.createDepthTexture();for(e of n)e.setDepthTexture(t)}else e.setDepthTexture(this.depthTexture)}removePass(e){const t=this.passes,n=t.indexOf(e);if(-1!==n&&t.splice(n,1).length>0){if(null!==this.depthTexture){const n=(e,t)=>e||t.needsDepthTexture;t.reduce(n,!1)||(e.getDepthTexture()===this.depthTexture&&e.setDepthTexture(null),this.deleteDepthTexture())}this.autoRenderToScreen&&n===t.length&&(e.renderToScreen=!1,t.length>0&&(t[t.length-1].renderToScreen=!0))}}removeAllPasses(){const e=this.passes;this.deleteDepthTexture(),e.length>0&&(this.autoRenderToScreen&&(e[e.length-1].renderToScreen=!1),this.passes=[])}render(e){const t=this.renderer,n=this.copyPass;let i,s,r,o=this.inputBuffer,a=this.outputBuffer,l=!1;void 0===e&&(this.timer.update(),e=this.timer.getDelta());for(const c of this.passes)c.enabled&&(c.render(t,o,a,e,l),c.needsSwap&&(l&&(n.renderToScreen=c.renderToScreen,i=t.getContext(),s=t.state.buffers.stencil,s.setFunc(i.NOTEQUAL,1,4294967295),n.render(t,o,a,e,l),s.setFunc(i.EQUAL,1,4294967295)),r=o,o=a,a=r),c instanceof Yr?l=!0:c instanceof Gr&&(l=!1))}setSize(e,t,n){const i=this.renderer,s=i.getSize(new f);void 0!==e&&void 0!==t||(e=s.width,t=s.height),s.width===e&&s.height===t||i.setSize(e,t,n);const r=i.getDrawingBufferSize(new f);this.inputBuffer.setSize(r.width,r.height),this.outputBuffer.setSize(r.width,r.height);for(const e of this.passes)e.setSize(r.width,r.height)}reset(){this.dispose(),this.autoRenderToScreen=!0}dispose(){for(const e of this.passes)e.dispose();this.passes=[],null!==this.inputBuffer&&this.inputBuffer.dispose(),null!==this.outputBuffer&&this.outputBuffer.dispose(),this.deleteDepthTexture(),this.copyPass.dispose(),this.timer.dispose()}}(this.renderer,{multisampling:8,frameBufferType:l})}_initPasses(){const{effectComposer:e}=this,t=this._initRenderPass(),n=this._initSSAOPass(),i=this._initEffectPass();this.passesMap.set(bl.CONSTANTS.renderPass,t),this.passesMap.set(bl.CONSTANTS.ssaoPass,n),this.passesMap.set(bl.CONSTANTS.effectPass,i),e.addPass(t),e.addPass(n),e.addPass(i)}_initRenderPass(){return new Eo(this.scene,this.camera)}_initSSAOPass(){const e=new qa(this.scene,this.camera);return e.enabled=!1,e.configuration.gammaCorrection=!1,e}_initEffectPass(){const e=new na(this.camera);return e.name=Al,e}_initEffects(){const{CONSTANTS:e}=bl,t=this._initSMAAEffect(),n=this._initToneMappingEffect(),i=this._initOutlineEffect(),s=this._initSSREffect(),r=this._initBloomEffect();this.effectsMap.set(e.smaaEffect,{enabled:!0,effect:t}),this.effectsMap.set(e.toneMappingEffect,{enabled:!0,effect:n}),this.effectsMap.set(e.outlineEffect,{enabled:!1,effect:i}),this.effectsMap.set(e.ssrEffect,{enabled:!1,effect:s}),this.effectsMap.set(e.bloomEffect,{enabled:!1,effect:r})}_initSMAAEffect(){return new Xo({preset:Bo,edgeDetectionMode:Co})}_initToneMappingEffect(){return new Jo({mode:ko,resolution:256,whitePoint:16,middleGrey:.6,minLuminance:.01,averageLuminance:.001,adaptationRate:1})}_initSSREffect(){return new xl(this.scene,this.camera)}_initBloomEffect(){return new So({blendFunction:io})}_initOutlineEffect(){return new _o(this.scene,this.camera,{blendFunction:ao})}}bl.CONSTANTS={renderPass:"renderPass",ssaoPass:"ssaoPass",effectPass:"effectPass",smaaEffect:"smaaEffect",outlineEffect:"outlineEffect",ssrEffect:"ssrEffect",bloomEffect:"bloomEffect",toneMappingEffect:"toneMappingEffect"};const Tl=new class{constructor(){this.workerPool=new Yt(4)}generate(e,t={}){const{workerPool:n}=this;return new Promise(((s,r)=>{if(e.attributes.position instanceof Ge)throw new Error("GenerateMeshBVHWorker: GLBufferAttribute are not supported for the geometry attributes.");Wt(e);const o=e.index?e.index.array:null,a=e.attributes.position.array;n.postMessage({index:o,position:a,options:Object.assign(Object.assign({},t),{onProgress:null,includedProgressCallback:Boolean(t.onProgress),groups:[...e.groups]})}).then((n=>{const{data:o}=n;if(o)if(o.error)r(new Error(o.error));else if(o.serialized){const{serialized:n,position:r}=o,a=Kt.deserialize(n,e,{setIndex:!1}),l=Object.assign({setBoundingBox:!1},t);if(e.attributes.position instanceof He?e.attributes.position.data.array=r:e.attributes.position instanceof g&&(e.attributes.position.array=r),e.index)e.index.array=n.index;else{const t=new g(n.index,1,!1);e.setIndex(t)}l.setBoundingBox&&(e.boundingBox=a.getBoundingBox(new i)),s(a)}else t.onProgress&&t.onProgress(o.progress)}))}))}dispose(){this.workerPool.dispose()}};class Sl{constructor(e){this.viewport=e,this.cameraChanging=!1,this.timer=null,this.computedGeometriesUuid=new Map,this.generateMeshBVHWorker=Tl,this.viewport.signals.cameraChange.add((()=>{this.cameraChanging=!0,this.timer&&(clearTimeout(this.timer),this.timer=null),this.timer=window.setTimeout((()=>{this.cameraChanging=!1}),1e3)}))}computeModelsBoundsTree(e={}){const{type:t="slice",force:n=!1,frameSliceCount:i=500,workerCreator:s}=e,{meshOfModelList:r}=this.viewport.scener.intersectsList,o=(e,t=(async e=>e.geometry.computeBoundsTree({setBoundingBox:!1})))=>{!n&&this.computedGeometriesUuid.has(e.geometry.uuid)||t(e).then((()=>{this.computedGeometriesUuid.set(e.geometry.uuid,e.geometry.uuid)}))};return new Promise(((e,n)=>{if("block"===t)r.forEach((e=>o(e))),e();else if("slice"===t){let t=0,n=0;const s=()=>{if(t=requestAnimationFrame(s),!this.cameraChanging){for(const e of r.slice(n,n+i))o(e),n+=1;n>=r.length&&(cancelAnimationFrame(t),e())}};s()}else if("worker"===t)if(s){this.generateMeshBVHWorker.workerPool.setWorkerCreator(s);const t=e=>this.generateMeshBVHWorker.generate(e.geometry).then((t=>t&&(e.geometry.boundsTree=t)));Promise.allSettled(r.map((e=>o(e,t)))).then((()=>e()))}else n("请设置 workerCreator")}))}dispose(){this.computedGeometriesUuid.clear(),this.generateMeshBVHWorker.dispose()}}li.install({THREE:e});class Dl extends li{constructor(e){super(e.cameraManager.mainCamera,e.interactiveContainer),this.viewport=e,this.dollySpeed=.2,this.azimuthRotateSpeed=.5,this.polarRotateSpeed=.5,this.truckSpeed=1,this.draggingSmoothTime=.1,e.interactiveContainer.style.userSelect="auto"}setOptions(e){Object.assign(this,e)}}class El{constructor(e){this.viewport=e,this.touchLongUpMaxInterval=800,this.isTouchLongPressAsTouchRightClick=!1,this.timer=null,this.touchStartEvent=null,this.touchstartTimes=[0,0],this.selectModel=null,this.selectPoi=null,this.options=e.options,this.signals=e.signals,this.container=e.container,this.dblClickMaxInterval=300,this.mouseDownTimes=[0,0],this.mouseDownEvent=null,this.handleMouseDown=this.handleMouseDown.bind(this),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseUp=this.handleMouseUp.bind(this),this.handleDblClick=this.handleDblClick.bind(this),this.handleMouseWheel=this.handleMouseWheel.bind(this),this.handleTouchStart=this.handleTouchStart.bind(this),this.handleTouchEnd=this.handleTouchEnd.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this),this.addEventListeners()}_triggerSceneEventInAllObject(e,t){const n=this.viewport.getIntersects(t,this.viewport.scener.intersectsList.getAll());if(0===n.length)return this.selectModel&&this.signals.modelHover.numListeners>0&&this.signals.modelUnHover.dispatch(this.selectModel),this.selectPoi&&this.signals.poiHover.numListeners>0&&this.signals.poiUnHover.dispatch(this.selectPoi),this.selectModel=null,this.selectPoi=null,void("click"===e&&this.signals.sceneClick.dispatch({type:e,event:t}));const i={object:null,type:null,point:null},s=[],r=[];function a(e){return e.parent?"Model"===e.parent.stype?e.parent:a(e.parent):void 0}n.forEach((e=>{if(e.object.parent instanceof Gl){const t=e.object.parent;i.object||(i.type="Poi",i.object=e.object,i.point=e.point);-1===s.findIndex((e=>e.poi.uuid===t.uuid))&&s.push({poi:t,sourceData:e})}else if(e.object instanceof o){const t=a(e.object);t&&(i.object||(i.type="Model",i.object=e.object,i.point=e.point),r.push({model:t,sourceData:e}))}})),"click"===e&&i.point&&this.signals.selectPosition.dispatch(i.point);const l=e.slice(0,1).toUpperCase()+e.slice(1),c=(e,t,n,i)=>{if(e){if("Hover"===l)return void((null==n?void 0:n.uuid)!==e.uuid&&(this.signals[t].dispatch(i),this[`select${e.stype}`]=e));const s=e[`on${l}`];s?s(e):e.isEventPropagation=!0,e.isEventPropagation&&(this.signals[t].dispatch(i),e.isEventPropagation=!1)}},h=e=>{const{model:n}=e[0];c(n,`model${l}`,this.selectModel,{target:n,currentTarget:i.object,intersects:e,event:t})},u=e=>{const{poi:n}=e[0];c(n,`poi${l}`,this.selectPoi,{target:n,event:t})};if("Hover"===l){if(r.length>0){const[{model:e}]=r;this.selectModel&&this.selectModel.uuid!==e.uuid&&(this.signals.modelUnHover.dispatch(this.selectModel),this.selectModel=null)}if(s.length>0){const[{poi:e}]=s;this.selectPoi&&this.selectPoi.uuid!==e.uuid&&(this.signals.poiUnHover.dispatch(this.selectPoi),this.selectPoi=null)}}"Model"===i.type?h(r):"Poi"===i.type&&u(s)}handleMouseDown(e){this.mouseDownEvent=e,this.signals.mouseDown.dispatch(e),0===this.mouseDownTimes[0]?this.mouseDownTimes[0]=performance.now():0===this.mouseDownTimes[1]&&(this.mouseDownTimes[1]=performance.now()),this.container.addEventListener("mouseup",this.handleMouseUp,!1)}handleMouseMove(e){this.signals.mouseMove.dispatch(e),this.options.hoverEnabled&&this._triggerSceneEventInAllObject("hover",e)}handleMouseUp(e){var t,n,i,s;this.signals.mouseUp.dispatch(e);const r=e.offsetX-(null!==(n=null===(t=this.mouseDownEvent)||void 0===t?void 0:t.offsetX)&&void 0!==n?n:0),o=e.offsetY-(null!==(s=null===(i=this.mouseDownEvent)||void 0===i?void 0:i.offsetY)&&void 0!==s?s:0);if(Math.abs(r)>2||Math.abs(o)>2)return this.mouseDownTimes[0]=0,void(this.mouseDownTimes[1]=0);setTimeout((()=>{0!==this.mouseDownTimes[0]&&0===this.mouseDownTimes[1]?0===e.button?(this.signals.click.dispatch(e),this._triggerSceneEventInAllObject("click",e)):2===e.button&&(this.signals.rightClick.dispatch(e),this._triggerSceneEventInAllObject("rightClick",e)):0!==this.mouseDownTimes[0]&&0!==this.mouseDownTimes[1]&&(this.mouseDownTimes[1],this.mouseDownTimes[0],this.dblClickMaxInterval),this.mouseDownTimes[0]=0,this.mouseDownTimes[1]=0}),this.dblClickMaxInterval),this.container.removeEventListener("mouseup",this.handleMouseUp,!1)}handleDblClick(e){this.signals.dblClick.dispatch(e),this._triggerSceneEventInAllObject("dblClick",e)}handleMouseWheel(e){this.signals.mouseWheel.dispatch(e)}handleTouchStart(e){0===this.touchstartTimes[0]?this.touchstartTimes[0]=performance.now():0===this.touchstartTimes[1]&&(this.touchstartTimes[1]=performance.now()),this.touchStartEvent=e,this.timer&&clearTimeout(this.timer),this.timer=window.setTimeout((()=>{this.isTouchLongPressAsTouchRightClick=!0}),this.touchLongUpMaxInterval),this.container.addEventListener("touchend",this.handleTouchEnd,{once:!0})}handleTouchEnd(e){var t,n,i,s;this.timer&&clearTimeout(this.timer);const r=()=>{this.isTouchLongPressAsTouchRightClick=!1,this.touchstartTimes[0]=0,this.touchstartTimes[1]=0},o=e.changedTouches[0].clientX-(null!==(n=null===(t=this.touchStartEvent)||void 0===t?void 0:t.changedTouches[0].clientX)&&void 0!==n?n:0),a=e.changedTouches[0].clientY-(null!==(s=null===(i=this.touchStartEvent)||void 0===i?void 0:i.changedTouches[0].clientY)&&void 0!==s?s:0);Math.abs(o)>2||Math.abs(a)>2?r():this.isTouchLongPressAsTouchRightClick?(r(),this.signals.rightClick.dispatch(e),this._triggerSceneEventInAllObject("rightClick",e)):setTimeout((()=>{0!==this.touchstartTimes[0]&&0===this.touchstartTimes[1]?(this.signals.click.dispatch(e),this._triggerSceneEventInAllObject("click",e)):0!==this.touchstartTimes[0]&&0!==this.touchstartTimes[1]&&this.touchstartTimes[1]-this.touchstartTimes[0]<=this.dblClickMaxInterval&&(this.signals.dblClick.dispatch(e),this._triggerSceneEventInAllObject("dblClick",e)),r()}),this.dblClickMaxInterval)}handleContextmenu(e){e.preventDefault()}handleKeyDown(e){this.signals.keyDown.dispatch(e)}handleKeyUp(e){this.signals.keyUp.dispatch(e)}addEventListeners(){this.container.addEventListener("mousedown",this.handleMouseDown,!1),this.container.addEventListener("mousemove",this.handleMouseMove,!1),this.container.addEventListener("dblclick",this.handleDblClick,!1),this.container.addEventListener("wheel",this.handleMouseWheel,{passive:!0}),this.container.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),this.container.addEventListener("contextmenu",this.handleContextmenu,!1),document.addEventListener("keydown",this.handleKeyDown,!1),document.addEventListener("keyup",this.handleKeyUp,!1)}removeEventListeners(){this.container.removeEventListener("mousedown",this.handleMouseDown),this.container.removeEventListener("mousemove",this.handleMouseMove),this.container.removeEventListener("dblclick",this.handleDblClick),this.container.removeEventListener("wheel",this.handleMouseWheel),this.container.removeEventListener("touchstart",this.handleTouchStart),this.container.removeEventListener("contextmenu",this.handleContextmenu),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}dispose(){this.removeEventListeners()}}class Cl{constructor(e,t){this.scene=e,this.signals=t;const n=document.createElement("div");n.style.position="absolute",n.style.left="12px",n.style.bottom="12px",n.style.fontSize="12px",n.style.color="#fff",n.style.pointerEvents="none",this.container=n,this.state={objects:0,vertices:0,triangles:0,frametime:0}}addListeners(){const{scene:e,signals:t}=this;function n(e,t=!0){const n=document.createElement("span");return t&&(n.style.marginLeft="6px"),n.innerText=e,n}function i(){return document.createElement("br")}const s=n("0"),r=n("0"),o=n("0"),a=n("0");this.container.appendChild(n("objects",!1)),this.container.appendChild(s),this.container.appendChild(i()),this.container.appendChild(n("vertices",!1)),this.container.appendChild(o),this.container.appendChild(i()),this.container.appendChild(n("triangles",!1)),this.container.appendChild(r),this.container.appendChild(i()),this.container.appendChild(n("frametime",!1)),this.container.appendChild(a),this.container.appendChild(i());const l=()=>{this.state.objects=0,this.state.vertices=0,this.state.triangles=0;for(let t=0,n=e.children.length;t{this.state.objects++;const t=e.geometry;(e.isMesh||e.isPoints)&&t.attributes.position&&(this.state.vertices+=t.attributes.position.count,e.isMesh&&(null!==t.index?this.state.triangles+=t.index.count/3:this.state.triangles+=t.attributes.position.count/3))}))}s.innerText=String(this.state.objects),o.innerText=String(this.state.vertices),r.innerText=String(this.state.triangles)};t.objectAdded.add(l),t.objectRemoved.add(l),t.geometryChanged.add(l);t.sceneRendered.add((e=>{this.state.frametime=e,a.innerText=Number(e).toFixed(2)+" ms"}))}}class Ml extends o{constructor(e,n,i){super(),this.camera=e,this.controls=i,this.isViewHelper=!0,this.animating=!1;const s=new u("#ff3653"),r=new u("#8adb00"),o=new u("#2c8fff"),a=new u("#000000"),l=[],c=new Ve,h=new f,d=new be(-2,2,2,-2,0,4);d.position.set(0,0,2);const p=new _e(.8,.05,.05).translate(.4,0,0),m=new se(p,B(s)),g=new se(p,B(r)),v=new se(p,B(o));g.rotation.z=Math.PI/2,v.rotation.y=-Math.PI/2,this.add(m),this.add(v),this.add(g);const y=I(s),w=I(r),x=I(o),A=I(a),b=new Qe(y),T=new Qe(w),S=new Qe(x),D=new Qe(A),E=new Qe(A),C=new Qe(A);b.userData.type="right",T.userData.type="top",S.userData.type="front",D.userData.type="left",E.userData.type="bottom",C.userData.type="back",b.position.x=1,T.position.y=1,S.position.z=1,D.position.x=-1,D.scale.setScalar(.8),E.position.y=-1,E.scale.setScalar(.8),C.position.z=-1,C.scale.setScalar(.8),this.add(b),this.add(T),this.add(S),this.add(D),this.add(E),this.add(C),l.push(b),l.push(T),l.push(S),l.push(D),l.push(E),l.push(C);const M=new t,P=new ve,O=128;function B(e){return new We({color:e,toneMapped:!1})}function I(e){const t=document.createElement("canvas");t.width=64,t.height=64;const n=t.getContext("2d");n.beginPath(),n.arc(32,32,14,0,2*Math.PI),n.closePath(),n.fillStyle=e.getStyle(),n.fill();const i=new Ye(t);return i.colorSpace=_,new Ke({map:i,toneMapped:!1})}this.render=function(e){this.quaternion.copy(this.camera.quaternion).invert(),this.updateMatrixWorld(),M.set(0,0,1),M.applyQuaternion(this.camera.quaternion),M.x>=0?(b.material.opacity=1,D.material.opacity=.5):(b.material.opacity=.5,D.material.opacity=1),M.y>=0?(T.material.opacity=1,E.material.opacity=.5):(T.material.opacity=.5,E.material.opacity=1),M.z>=0?(S.material.opacity=1,C.material.opacity=.5):(S.material.opacity=.5,C.material.opacity=1);const t=n.offsetWidth-O;e.clearDepth(),e.getViewport(P),e.setViewport(t,0,O,O),e.render(this,d),e.setViewport(P.x,P.y,P.z,P.w)},this.handleClick=async function(e){if(!0===this.animating)return!1;const t=n.getBoundingClientRect(),s=t.left+(n.offsetWidth-O),r=t.top+(n.offsetHeight-O);h.x=(e.clientX-s)/(t.right-s)*2-1,h.y=-(e.clientY-r)/(t.bottom-r)*2+1,c.setFromCamera(h,d);const o=c.intersectObjects(l);if(o.length>0){const e=o[0].object,{type:t}=e.userData,n=Fa[t.toLocaleUpperCase()];return n&&(i.normalizeRotations(),this.animating=!0,await i.rotateTo(n.theta,n.phi,!0),this.animating=!1),!0}return!1},this.dispose=function(){var e,t,n,i,s,r;p.dispose(),m.material.dispose(),g.material.dispose(),v.material.dispose(),null===(e=b.material.map)||void 0===e||e.dispose(),null===(t=T.material.map)||void 0===t||t.dispose(),null===(n=S.material.map)||void 0===n||n.dispose(),null===(i=D.material.map)||void 0===i||i.dispose(),null===(s=E.material.map)||void 0===s||s.dispose(),null===(r=C.material.map)||void 0===r||r.dispose(),b.material.dispose(),T.material.dispose(),S.material.dispose(),D.material.dispose(),E.material.dispose(),C.material.dispose()}}}const Pl={needsUpdate:!1};let Ol=0,Bl=0;const Il=e=>{e instanceof d&&e.dispose()};class Ll{constructor(e,t){this.options=e,this.signals=t,this.clock=new Xe,this.raycaster=new Ve,this.sky=null,this.resizeObserver=new ResizeObserver(hs((()=>{this.signals.windowResize.dispatch()}))),this.options=e,this.state={useFreq:1,delta:0,enabledPostprocessing:!0,isPausedRender:!1,isDisposed:!1},this.scener=new ca(this.signals,this.state),this.scene=this.scener.scene,this.cameraManager=new Na(this),this.camera=this.cameraManager.currentCamera,this.rendererManager=new Da(this),this.container=this.rendererManager.container,this.interactiveContainer=this.rendererManager.interactiveContainer,this.renderer=this.rendererManager.renderer,this.rendererCSS3D=this.rendererManager.rendererCSS3D,this.rendererCSS2D=this.rendererManager.rendererCSS2D,this.pmremGenerator=new Fe(this.renderer),this.pmremGenerator.compileEquirectangularShader(),this.effectManager=new bl(this.renderer,this.scene,this.camera),this.effectComposer=this.effectManager.effectComposer,this.bvh=new Sl(this),this.controls=new Dl(this),this.info=new Cl(this.scene,this.signals),this.stats=new Vt,this.mixer=new Ze(this.scene),this.clipsSet=new Set,this.postUpdate=new Map,this.postRender=new Map,this._loop=0,this.viewHelper=new Ml(this.camera,this.container,this.controls),this.eventHandler=new El(this),this.resizeObserver.observe(this.container),this._initInfo(),this._initStats(),this._signalsEventListenr(),this.animate(0)}_initInfo(){if(this.options.showInfo){this.info.addListeners();const{container:e}=this.info;e.style.zIndex="1",this.container.appendChild(e)}}_initStats(){if(this.options.showStats){const{dom:e}=this.stats;e.style.zIndex="1",this.container.appendChild(e),this.signals.sceneRendered.add((()=>{this.stats.update()}))}}setSSR(e={}){const{enabled:t=!0,intensity:n=1,exponent:i=1.75,distance:s=20,fade:r=0,roughnessFade:o=1,thickness:a=3.5,ior:l=1.75,maxRoughness:c=.1,maxDepthDifference:h=20,blend:u=.95,correction:d=1,correctionRadius:p=1,blur:f=1,blurKernel:m=1,blurSharpness:g=10,jitter:v=0,jitterRoughness:y=2,steps:w=20,refineSteps:x=10,missedRays:A=!1,useNormalMap:b=!0,useRoughnessMap:T=!0,resolutionScale:S=1,velocityResolutionScale:D=1}=e,{effectManager:E}=this,C=E.effectsMap.get(bl.CONSTANTS.ssrEffect);C.enabled!==t&&(C.enabled=t,E.effectsNeedsUpdate=!0);const{effect:M}=C;M.usingBoxProjectedEnvMap=!0,M.intensity=n,M.exponent=i,M.distance=s,M.fade=r,M.roughnessFade=o,M.thickness=a,M.ior=l,M.maxRoughness=c,M.maxDepthDifference=h,M.blend=u,M.correction=d,M.correctionRadius=p,M.blur=f,M.blurKernel=m,M.blurSharpness=g,M.jitter=v,M.jitterRoughness=y,M.steps=w,M.refineSteps=x,M.missedRays=A,M.useNormalMap=b,M.useRoughnessMap=T,M.resolutionScale=S,M.velocityResolutionScale=D,this.triggerRender()}setBloom(e={}){var t;const{enabled:n=!0,mipmapBlur:i=!0,radius:s=.85,intensity:r=3,threshold:o=1,smoothing:a=.01,scalar:l=2,opacity:c=1,selection:h=[]}=e,{effectManager:u}=this,d=u.effectsMap.get(bl.CONSTANTS.bloomEffect);d.enabled!==n&&(d.enabled=n,u.effectsNeedsUpdate=!0);const{effect:p}=d;p.intensity=r;const{mipmapBlurPass:f,renderTarget:m}=p;f.enabled=i,f.radius=s;const g=p.uniforms.get("map");g&&(g.value=i?f.texture:m.texture),p.luminanceMaterial.threshold=o,p.luminanceMaterial.smoothing=a,p.blendMode.opacity.value=c,null===(t=p.luminanceMaterial.userData.bloomSelection)||void 0===t||t.forEach((e=>{e.toneMapped=!0,e.userData.prevEmissive&&(e.emissive.copy(e.userData.prevEmissive),Reflect.deleteProperty(e.userData,"prevEmissive"))})),p.luminanceMaterial.userData.bloomSelection=new Set,n&&h.forEach((e=>{e.traverse((e=>{e instanceof se&&e.material.color&&!p.luminanceMaterial.userData.bloomSelection.has(e.material)&&(e.material.toneMapped=!1,e.material.userData.prevEmissive=e.material.emissive.clone(),e.material.emissive.copy(e.material.color),e.material.emissive.multiplyScalar(l),p.luminanceMaterial.userData.bloomSelection.add(e.material))}))})),this.triggerRender()}setSSAO(e={}){const{enabled:t=!0,aoRadius:n=3,aoSamples:i=16,denoiseSamples:s=4,denoiseRadius:r=12,distanceFalloff:o=1,intensity:a=3,color:l="#333"}=e,{effectManager:c}=this,h=c.passesMap.get(bl.CONSTANTS.ssaoPass);h.enabled=t,h.configuration.aoRadius=n,h.configuration.aoSamples=i,h.configuration.denoiseSamples=s,h.configuration.denoiseRadius=r,h.configuration.distanceFalloff=o,h.configuration.intensity=a,l&&(h.configuration.color=new u(l)),this.triggerRender()}setColorSpace(e){this.renderer.outputColorSpace="sRGB"===e?_:ce,this.signals.sceneChanged.dispatch()}setToneMapping(e={}){const{type:t="ACESFilmic",exposure:n=.8}=e,i=this.effectManager.effectsMap.get(bl.CONSTANTS.toneMappingEffect),s={Reinhard:Uo,Cineon:zo,ACESFilmic:ko},r={None:$e,Reinhard:et,Cineon:tt,ACESFilmic:nt},o="None"!==t;i.enabled!==o&&(i.enabled=o,this.effectManager.effectsNeedsUpdate=!0),o&&(i.effect.mode=s[t]),this.renderer.toneMappingExposure=n,this.renderer.toneMapping=r[t],this.signals.sceneChanged.dispatch()}async setSphereSkyBackground(e){const t=await Ii({file:e});Il(this.scene.background),this.scene.background=t,this.signals.backgroundChanged.dispatch()}async setSkyBackground(e,t=["px.jpg","nx.jpg","py.jpg","ny.jpg","pz.jpg","nz.jpg"]){const n=await Ii({path:e,file:t});Il(this.scene.background),this.scene.background=n,this.signals.backgroundChanged.dispatch()}setBackgroundColor(e){Il(this.scene.background),this.scene.background=new u(e),this.signals.backgroundChanged.dispatch()}setBackgroundColorAlpha(e,t){Il(this.scene.background),this.scene.background=null,this.renderer.setClearColor(new u(e),t),this.signals.backgroundChanged.dispatch()}async setBackgroundImage(e){const t=await Ii({file:e});t.mapping=qe,this.scene.background=t,this.signals.backgroundChanged.dispatch()}setSky(e={}){const{enabled:n=!0,position:i={x:0,y:0,z:0},scalar:s=45e4,turbidity:r=10,rayleigh:o=3,elevation:a=2,azimuth:l=180}=e;if(!n)return void this.closeSky();this.sky||(this.sky=new _t,this.scene.add(this.sky)),this.sky.name="sky",this.sky.position.set(i.x,i.y,i.z),this.sky.scale.setScalar(s);const c=this.sky.material.uniforms;c.turbidity.value=r,c.rayleigh.value=o,c.mieCoefficient.value=.005,c.mieDirectionalG.value=.7;const h=new t,u=Ai(90-a),d=Ai(l);return h.setFromSphericalCoords(1,u,d),c.sunPosition.value.copy(h),this.signals.objectAdded.dispatch(),this.sky}closeSky(){return!!this.sky&&(this.sky.removeFromParent(),this.sky=null,this.signals.objectRemoved.dispatch(),!0)}screenshot(){return new Promise((e=>{this.renderer.domElement.toBlob((t=>{e(t)}))}))}async setEnvironment(e){if(e){const{path:t,file:n,background:i}=e,s=await Ii({path:t,file:n});this.scene.environment=s instanceof Je?this.pmremGenerator.fromCubemap(s).texture:this.pmremGenerator.fromEquirectangular(s).texture,i&&(Il(this.scene.background),this.scene.background=s)}else this.scene.environment=this.pmremGenerator.fromScene(new Ht(this.renderer),.04).texture;return this.signals.sceneChanged.dispatch(),this.scene.environment}playModelAnimation(e,t){let n;if(t instanceof O?n=t:es(t)?n=e.animations[t]:is(t)&&(n=e.animations.find(t)),!n)return;const i=Sr(this.mixer.clipAction(n,e));return i.play(),this.clipsSet.add(n),i}stopModelAnimation(e,t){var n;let i;t instanceof O?i=t:es(t)?i=e.animations[t]:is(t)&&(i=e.animations.find(t)),i&&(null===(n=this.mixer.existingAction(i,e))||void 0===n||n.stop(),this.mixer.uncacheAction(i,e),this.clipsSet.delete(i))}async render(e){return await(null==e?void 0:e()),new Promise((e=>{this.signals.sceneRendered.addOnce(e),this.triggerRender()}))}triggerRender(e=1){this.state.useFreq=e}async setPauseRender(e=!0){if(this.state.isPausedRender=e,!1===e)return this.render()}_passesObserver(){this.effectManager.updateEffectPass()}autoRender(){this.state.useFreq<=0&&!Pl.needsUpdate||(this.state.useFreq>0&&this.state.useFreq--,Pl.needsUpdate&&(Pl.needsUpdate=!1),this.state.isPausedRender||this.baseRender())}baseRender(){Ol=performance.now(),this.signals.beforeRender.dispatch(),this._passesObserver(),this.renderer.info.reset(),this.state.enabledPostprocessing?this.effectComposer.render():(this.renderer.clear(),this.renderer.render(this.scene,this.camera));const e=this.scene.matrixWorldAutoUpdate;if(this.scene.matrixWorldAutoUpdate=!1,this.rendererCSS2D&&this.rendererManager.internalOptions.enableRenderCss2D&&this.rendererCSS2D.render(this.scene,this.camera),this.rendererCSS3D&&this.rendererManager.internalOptions.enableRenderCss3D&&this.rendererCSS3D.render(this.scene,this.camera),this.scene.matrixWorldAutoUpdate=e,this.options.showViewHelper){const e=this.renderer.clippingPlanes;this.renderer.clippingPlanes=[],this.viewHelper.render(this.renderer),this.renderer.clippingPlanes=e}this.postRender.forEach((e=>e())),Bl=performance.now(),this.signals.sceneRendered.dispatch(Bl-Ol)}animate(e){this._loop=requestAnimationFrame((e=>{this.animate(e)}));const t=this.clock.getDelta();this.state.delta=t,this.clipsSet.size>0&&(this.mixer.update(t),this.signals.modelAnimation.dispatch()),zt.update(e)&&this.signals.tweenUpdate.dispatch(),this.controls.update(t)&&this.signals.cameraChange.dispatch(),this.postUpdate.forEach((t=>t(e))),this.autoRender(),this.signals.getSceneInfo.dispatch(this.info.state)}getOffsetByPosition(e){const n=new t(e.x,e.y,e.z).project(this.camera),i=this.renderer.domElement.getBoundingClientRect();return{left:i.left+i.width/2*(n.x+1),top:i.top+i.height/2*(1-n.y)}}getPositionByOffset(e,n=.1,i){const s=new t(0,0,0),r=new t(0,0,0),o=this.renderer.domElement.getBoundingClientRect();return r.set(e.offsetX/o.width*2-1,-e.offsetY/o.height*2+1,n),r.unproject(this.camera),r.sub(this.camera.position).normalize(),s.copy(this.camera.position).add(r.multiplyScalar(null!=i?i:this.camera.position.length())),s}getIntersects(e,t=this.scener.intersectsList.getAll(),n={}){const{isFilterHideObject:i=!0}=n,s=this.container.getBoundingClientRect();let r={offsetX:0,offsetY:0};if(e instanceof MouseEvent)r={offsetX:e.clientX-s.left,offsetY:e.clientY-s.top};else if(e instanceof TouchEvent){const t=e.changedTouches[0];r={offsetX:t.clientX-s.left,offsetY:t.clientY-s.top}}else r=e;const o=new f;o.set(r.offsetX/s.width*2-1,-r.offsetY/s.height*2+1),this.raycaster.setFromCamera(o,this.camera);let a=[];return a=ts(t)?this.raycaster.intersectObjects(t,!0):this.raycaster.intersectObject(t,!0),i&&(a=a.filter((({object:e})=>Si(e)))),a=a.filter((({point:e,object:t})=>{const n=this.renderer.clippingPlanes.every((t=>t.distanceToPoint(e)>0));let i=!0;const s=t;return s.material&&Ui(s.material,(t=>{i&&ts(t.clippingPlanes)&&(i=t.clippingPlanes.every((t=>t.distanceToPoint(e)>0)))})),n&&i})),a}rayClash(e=this.camera.position,n=new t(0,-1,0),i=this.scener.intersectsList.meshOfModelList){const s=new Ve;return s.set(e,n),ts(i)?s.intersectObjects(i,!0):s.intersectObject(i,!0)}clearSignals(){for(const e in this.signals)this.signals[e].removeAll()}dispose(){cancelAnimationFrame(this._loop),this.bvh.dispose(),this.mixer.stopAllAction(),this.clipsSet.forEach((e=>{this.mixer.uncacheAction(e),this.mixer.uncacheClip(e)})),this.mixer.uncacheRoot(this.scene),this.clipsSet.clear(),this.controls.dispose(),this.viewHelper.dispose(),zt.removeAll(),this.clearSignals(),this.scene.clear(),this.pmremGenerator.dispose(),this.effectComposer.dispose(),this.renderer.dispose(),this.rendererCSS2D.domElement.remove(),this.rendererCSS3D.domElement.remove(),this.renderer.forceContextLoss(),this.container.remove(),this.state.isDisposed=!0,this.eventHandler.dispose(),this.resizeObserver.disconnect()}_signalsEventListenr(){const e=()=>{const{clientWidth:e,clientHeight:t}=this.container;this.effectManager.updateCamera(this.camera),this.viewHelper.camera=this.camera,this.camera instanceof pe&&(this.camera.aspect=e/t),this.camera instanceof be&&(this.camera.left=e/-2,this.camera.right=e/2,this.camera.top=t/2,this.camera.bottom=t/-2),this.camera.updateProjectionMatrix(),this.effectComposer.setSize(e,t),this.rendererCSS3D&&this.rendererCSS3D.setSize(e,t),this.rendererCSS2D&&this.rendererCSS2D.setSize(e,t),this.triggerRender()};requestAnimationFrame((()=>{e()})),this.signals.windowResize.add(e),this.signals.cameraObjectChange.add(e),this.signals.sceneChanged.add((()=>this.triggerRender())),this.signals.backgroundChanged.add((()=>this.triggerRender())),this.signals.objectAdded.add((()=>this.triggerRender())),this.signals.objectRemoved.add((()=>this.triggerRender())),this.signals.objectChanged.add((()=>this.triggerRender())),this.signals.materialAdded.add((()=>this.triggerRender())),this.signals.materialRemoved.add((()=>this.triggerRender())),this.signals.materialChanged.add((()=>this.triggerRender())),this.signals.geometryChanged.add((()=>this.triggerRender())),this.signals.cameraChange.add((()=>this.triggerRender())),this.signals.tweenUpdate.add((()=>this.triggerRender())),this.signals.modelAnimation.add((()=>this.triggerRender()));this.signals.outlineChange.add((e=>{const{objects:t,options:n}=e,{color:i,hideColor:s,edgeThickness:r,edgeStrength:o}=Object.assign(Object.assign({},{color:16777215,hideColor:10066329,edgeThickness:3,edgeStrength:10}),n),{effectManager:a}=this,l=a.effectsMap.get(bl.CONSTANTS.outlineEffect),c=t.length>0;l.enabled!==c&&(l.enabled=c,a.effectsNeedsUpdate=!0);const{effect:h}=l,{uniforms:u}=h,d=[];t.forEach((e=>{e.traverse((e=>{e instanceof se&&d.push(e)}))})),h.selection.set(d),h.blur=r>0,h.blurPass.kernelSize=r;const p=u.get("visibleEdgeColor"),f=u.get("hiddenEdgeColor"),m=u.get("edgeStrength");p&&p.value.set(i),f&&f.value.set(s),m&&(m.value=o),this.triggerRender()}))}}const Rl={onLoad:null,onClick:null,onDblClick:null,onRightClick:null};class Fl extends o{constructor(e={id:os()}){var t,n,i,s,r,o,a,l,c;super(),this.isEventPropagation=!1;const{id:h,name:u="",level:d={max:null,min:null},visible:p=!0,position:f={x:0,y:0,z:0},rotation:m={x:0,y:0,z:0},scale:g={x:1,y:1,z:1},userData:v={},onLoad:y,onClick:w,onDblClick:x,onRightClick:A}=Object.assign(Object.assign({},Rl),e);if(void 0===h)throw new Error("In soonspacejs: 空间对象实例化失败,缺少必要字段 'id'!");this.sid=h,this.name=u,this.stype="BaseObject3D",this.level=d,this.visible=null==p||p,this.handleHide=!p,this.position.set(null!==(t=f.x)&&void 0!==t?t:0,null!==(n=f.y)&&void 0!==n?n:0,null!==(i=f.z)&&void 0!==i?i:0),this.rotation.set(null!==(s=m.x)&&void 0!==s?s:0,null!==(r=m.y)&&void 0!==r?r:0,null!==(o=m.z)&&void 0!==o?o:0),this.scale.set(null!==(a=g.x)&&void 0!==a?a:1,null!==(l=g.y)&&void 0!==l?l:1,null!==(c=g.z)&&void 0!==c?c:1),this.castShadow=!0,this.receiveShadow=!0,this.userData=v,this.onLoad=(null==y?void 0:y.bind(this))||null,this.onClick=(null==w?void 0:w.bind(this))||null,this.onDblClick=(null==x?void 0:x.bind(this))||null,this.onRightClick=(null==A?void 0:A.bind(this))||null}eventPropagation(){this.isEventPropagation=!0}show(){this.visible=!0,this.handleHide=!1,Pl.needsUpdate=!0}hide(){this.visible=!1,this.handleHide=!0,Pl.needsUpdate=!0}setMove(e,t,n,i){return ps(this.position,vi(e),t,n,i)}setRotate(e,t,n,i){return ps(this.rotation,yi(e),t,n,i)}setScale(e,t,n,i){return ps(this.scale,vi(e),t,n,i)}getBoundingBox(){return wi(this)}getSpaceAttribute(e=!0){return bi(this,e)}syncSpaceAttribute(e,t=!0){Ti(this,e,t)}copy(e,t){return super.copy(e,t),this.handleHide=e.handleHide,this.level=e.level,this}}class Ul extends se{constructor(e={id:os()},t,n){var i,s,r,o,a,l,c,h,u;super(t,n);const{id:d,name:p="",level:f={max:null,min:null},visible:m=!0,position:g={x:0,y:0,z:0},rotation:v={x:0,y:0,z:0},scale:y={x:1,y:1,z:1},userData:w={}}=e;if(void 0===d)throw new Error("In soonspacejs: 空间对象实例化失败,缺少必要字段 'id'!");this.sid=d,this.name=p,this.stype="BaseMesh",this.level=f,this.visible=null==m||m,this.handleHide=!m,this.position.set(null!==(i=g.x)&&void 0!==i?i:0,null!==(s=g.y)&&void 0!==s?s:0,null!==(r=g.z)&&void 0!==r?r:0),this.rotation.set(null!==(o=v.x)&&void 0!==o?o:0,null!==(a=v.y)&&void 0!==a?a:0,null!==(l=v.z)&&void 0!==l?l:0),this.scale.set(null!==(c=y.x)&&void 0!==c?c:1,null!==(h=y.y)&&void 0!==h?h:1,null!==(u=y.z)&&void 0!==u?u:1),this.castShadow=!0,this.receiveShadow=!0,this.userData=w}show(){this.visible=!0,this.handleHide=!1,Pl.needsUpdate=!0}hide(){this.visible=!1,this.handleHide=!0,Pl.needsUpdate=!0}setMove(e,t,n,i){return ps(this.position,vi(e),t,n,i)}setRotate(e,t,n,i){return ps(this.rotation,yi(e),t,n,i)}setScale(e,t,n,i){return ps(this.scale,vi(e),t,n,i)}getBoundingBox(){return wi(this)}copy(e,t){return super.copy(e,t),this.handleHide=e.handleHide,this.level=e.level,this}}class zl extends Fl{constructor(e){super(e),this.stype="Group"}showAllChild(){this.children.forEach((e=>{e instanceof Fl&&e.show()}))}hideAllChild(){this.children.forEach((e=>{e instanceof Fl&&e.hide()}))}}class kl extends Fl{constructor(e){super(e),this.stype="PluginObject"}}class jl extends Fl{constructor(e){super(e),this.stype="PoiNode";const{type:t="2D",element:n=document.createElement("div"),elementAutoDisplay:i=!0,occlude:s=!1,occludeThrottle:r=0,onChange:o,scaleFixed:a=null}=null!=e?e:{};this.elementType=t,this.element=n,this.elementAutoDisplay=i,this.occlude=s,this.occludeThrottle=r,this.onChange=o,this.scaleFixed=a,this.create(t)}create(e){"2D"===e||"2d"===e?this._create2D():"2.5D"===e||"2.5d"===e?this._create2DHalf():"3D"!==e&&"3d"!==e||this._create3D()}getBoundingBox(e=50){e=e<=0?50:e;const n=new t,s=new t,r=new t(e,e,e);return n.copy(this.position),s.copy(this.position),n.sub(r),s.add(r),new i(n,s)}_create2D(){this.add(new ha(this.element))}_create2DHalf(){this.add(new Aa(this.element))}_create3D(){this.add(new xa(this.element))}}class Nl extends Fl{constructor(e){super(e),this.stype="Model";const{format:t,url:n}=null!=e?e:{};this.formatType=t,this.url=n}setEnvMap(e,t=["px.jpg","nx.jpg","py.jpg","ny.jpg","pz.jpg","nz.jpg"],n={}){Ii({path:e,file:t}).then((e=>{this.traverse((t=>{if(t instanceof se&&t.material instanceof Ae){const{reflectivity:i=.5}=n;t.material.envMap=e,t.material.envMapIntensity=i,Pl.needsUpdate=!0}}))}))}copy(e,t){return super.copy(e,t),this.formatType=e.formatType,this.url=e.url,this}}class Gl extends Fl{constructor(e){super(e),this.stype="Poi";const{type:t,scaleFixed:n=null}=null!=e?e:{};this.iconType=t,this.scaleFixed=n,this.renderOrder=11}getBoundingBox(e=50){e=e<=0?50:e;const n=new t,s=new t,r=new t(e,e,e);return n.copy(this.position),s.copy(this.position),n.sub(r),s.add(r),new i(n,s)}copy(e,t=!1){var n,i;return super.copy(e,t),this.icon=null===(n=e.icon)||void 0===n?void 0:n.clone(),this.text=null===(i=e.text)||void 0===i?void 0:i.clone(),this.clear(),this.icon&&this.add(this.icon),this.text&&this.add(this.text),this.iconType=e.iconType,this.scaleFixed=e.scaleFixed,this}}const Hl={position:{x:0,y:0,z:0},scale:{x:1,y:1,z:1}};class Vl extends Qe{constructor(e,t){super(e),this.stype="Icon";const{position:n,scale:i}=Object.assign(Object.assign({},Hl),t);this.position.set(n.x,n.y,n.z),this.scale.set(i.x,i.y,i.z),this.renderOrder=1}}class _l extends Ul{constructor(e){const{radius:t=10,color:n=16777215,opacity:i=1,gradient:s}=null!=e?e:{};super(e),this.params=e,this.material=new Ae,this.updateGeometry(t),this.updateMaterialOpacity(i),this.updateMaterial(n,s),this.stype="Point"}updateGeometry(e){this.geometry.dispose(),this.geometry=new it(e)}updateMaterialOpacity(e){const t=e<1;this.material.transparent=t,this.material.depthWrite=!t,this.material.opacity=e,this.material.needsUpdate=!0}updateMaterial(e,t){this.material.color=new u(e),this.material.map=Li(t),this.material.needsUpdate=!0}setOptions(e){const{color:t,opacity:n,radius:i,gradient:s}=e,r=this.material;t&&(r.color=new u(t)),void 0!==n&&this.updateMaterialOpacity(n),void 0!==i&&(this.geometry=new it(i,32,32)),s&&(r.map=Li(s)),this.params&&Object.assign(this.params,e),r.needsUpdate=!0,Pl.needsUpdate=!0}}class Ql extends _l{constructor(e){super(e),this.graphs=[],this.stype="Node",e&&(this.graphs=e.graphs)}}class Wl extends Ul{constructor(e){const{radius:t=50,color:n=16777215,opacity:i=1,gradient:s}=null!=e?e:{};super(e),this.params=e,this.material=new Ae({side:oe}),this.updateGeometry(t),this.updateMaterialOpacity(i),this.updateMaterial(n,s),this.stype="Circle",this.rotation.set(-Math.PI/2,0,0)}updateGeometry(e){this.geometry.dispose(),this.geometry=new st(e)}updateMaterialOpacity(e){const t=e<1;this.material.transparent=t,this.material.depthWrite=!t,this.material.opacity=e,this.material.needsUpdate=!0}updateMaterial(e,t){this.material.color=new u(e),this.material.map=Li(t),this.material.needsUpdate=!0}setOptions(e){const{color:t,opacity:n,radius:i,gradient:s}=e,r=this.material;t&&(r.color=new u(t)),void 0!==n&&this.updateMaterialOpacity(n),void 0!==i&&this.updateGeometry(i),s&&(r.map=Li(s)),this.params&&Object.assign(this.params,e),r.needsUpdate=!0,Pl.needsUpdate=!0}}const Yl=new Map;class Kl extends Ul{constructor(e){const{start:t,end:n,imgUrl:i,color:s,transparent:r=!1,passable:o=0}=null!=e?e:{};super(e,void 0,void 0),this.params=e,this.geometry=new v,this.material=new Ae({side:oe}),this.passable=0,this.stype="Link",s&&this.material.color.set(s),this.material.transparent=r,this.material.depthWrite=!r,this.material.flatShading=!0;const a=this.createTexture(i);a&&(this.material.map=a),t&&n&&this.updateGeometry({start:t,end:n}),this.passable=o,this.addEventListener("removed",(()=>{this.geometry.dispose(),this.material.dispose(),null==a||a.dispose()}))}updateGeometry(e){this.params&&Object.assign(this.params,e),this.computeVertex();const t=this.material.map;t&&this.computeTextureRepeat(t)}computeVertex(){if(!this.params)return;const{start:e,end:n,width:i}=this.params,s=vi(e),r=vi(n),o=(new t).addVectors(s,r).divideScalar(2),a=s.distanceTo(r),l=new m;this.geometry.dispose(),this.geometry=new rt(i,a),this.geometry.rotateX(-Math.PI/2),l.lookAt(s,o,this.up),this.position.copy(o),this.quaternion.setFromRotationMatrix(l)}computeTextureRepeat(e){if(this.params&&e.image){const{start:t,end:n,width:i}=this.params,s=vi(t),r=vi(n),o=s.distanceTo(r)/(i*(e.image.height/e.image.width));e.repeat.set(-1,o)}}createTexture(e){if(e){const t=Yl.get(e);if(t){return t.clone()}const n=(new h).load(e,(()=>{n.wrapS=q,n.wrapT=q,n.anisotropy=16,this.computeTextureRepeat(n),Yl.set(e,n),Pl.needsUpdate=!0}));return n}}}class Xl extends Fl{constructor(e){super(e),this.nodes=[],this.links=[],this.linksImgAnimation=null,this.info={type:"line",nodes:[],id:os()},this.stype="Topology";const{type:t="line"}=null!=e?e:{};this.topologyType=t,e&&(this.info=e),this.create(),this.addEventListener("removed",(()=>{var e;null===(e=this.linksImgAnimation)||void 0===e||e.stop(),this.linksImgAnimation=null}))}create(){var e;const{nodes:t,renderLink:n=!0,linkWidth:i=20,linkColor:s=65280,renderNode:r=!0,nodeColor:o=255,nodeRadius:a=i/2,imgUrl:l,animation:c=!1}=this.info,h=[];for(const c of t){const t=this.createNode(Object.assign(Object.assign({},c),{radius:a,color:o}));if(!1===r&&t.hide(),this.nodes.push(t),!l&&n&&!r){const n=Zl(s,null===(e=t.graphs[0])||void 0===e?void 0:e.passable);this.createCircle({id:`${c.id}_circle`,name:`${c.name||c.id}_circle`,position:c.position,radius:i/2,color:n})}if(n)for(let e=0;ee.id===n));if(!h.includes(o)&&u){h.push(o);const e=Zl(s,r),t=this.createLink({id:o,name:a,start:c.position,end:u.position,width:i,color:e,imgUrl:l,transparent:!!l,passable:r,userData:{startNodeId:c.id,endNodeId:u.id}});this.links.push(t)}}}this.updateLinksImgAnimation({imgUrl:l,animation:c})}createNode(e){const t=new Ql(Object.assign({},e));return this.add(t),t}createCircle(e){const t=new Wl(Object.assign(Object.assign({},e),{rotation:{x:Math.PI/2,y:0,z:0}}));return this.add(t),t}createLink(e){const t=new Kl(Object.assign({},e));return this.add(t),t}updateLinksImgAnimation(e={}){var t;const{imgUrl:n,animation:i}=e;if(n&&!this.linksImgAnimation){let e=null;$i(i)&&i?e={repeat:!0,duration:500}:ns(i)&&es(i.duration)&&i.duration>0&&(e=Object.assign({repeat:!0},i)),e&&ps(new f(0,0),new f(0,-1),e,(e=>{this.links.forEach((t=>{var n;null===(n=t.material.map)||void 0===n||n.offset.copy(e)}))}),(e=>{var t;null===(t=this.linksImgAnimation)||void 0===t||t.stop(),this.linksImgAnimation=e})).catch((()=>{}))}n||(null===(t=this.linksImgAnimation)||void 0===t||t.stop(),this.linksImgAnimation=null)}resetNodes(e){const{linkWidth:t=20,renderNode:n=!0,nodeColor:i=255,nodeRadius:s=t/2}=this.info,r=[...this.info.nodes];this.info.nodes=[...e];const o=[];for(let t=0;te.id===r[t].id));n&&vi(n.position).equals(vi(r[t].position))||o.push(r[t])}for(let e=0;eo[e].id===t.sid));this.remove(this.nodes[t]),this.nodes.splice(t,1)}const a=[];for(let t=0;tn.id===e[t].id));n&&vi(n.position).equals(vi(e[t].position))||a.push(e[t])}for(let e=0;e{o.set(e.id,e)}));const a=[...this.links];for(const s of this.info.nodes)if(e)for(let e=0;ee.sid===u));if(l)l.updateGeometry({start:o.start,end:o.end}),e&&l.material.color.set(e),l.passable=h;else{const e=this.createLink(o);this.links.push(e)}}}a.forEach((e=>{if(!1===r.has(e.sid)){const t=this.links.findIndex((t=>t===e));t>-1&&(e.removeFromParent(),this.links.splice(t,1))}})),this.updateLinksImgAnimation({imgUrl:i,animation:s})}getLength(){let e=0;for(let n=1;n2?new ot(new at(n),{depth:t,bevelEnabled:!1}):new v}updateMaterialOpacity(e){const t=e<1;this.material.transparent=t,this.material.depthWrite=!t,this.material.opacity=e,this.material.needsUpdate=!0}updateMaterial(e,t){this.material.color=new u(e),this.material.map=Li(t),this.material.needsUpdate=!0}setOptions(e){var t,n,i,s;const{color:r,opacity:o,yHeight:a,points:l,gradient:c,depth:h}=e,d=this.material;r&&(d.color=new u(r)),void 0!==o&&this.updateMaterialOpacity(o),c&&(d.map=Li(c)),void 0!==a&&this.position.set(0,a,0),l&&void 0!==h?this.updateGeometry(l,h):l?this.updateGeometry(l,null!==(n=null===(t=this.params)||void 0===t?void 0:t.depth)&&void 0!==n?n:0):void 0!==h&&this.updateGeometry(null!==(s=null===(i=this.params)||void 0===i?void 0:i.points)&&void 0!==s?s:[],h),this.params&&Object.assign(this.params,e),d.needsUpdate=!0,Pl.needsUpdate=!0}}class $l extends Fl{constructor(e){super(e),this.stype="Canvas3D",this.create(e)}create(e){const{points:t=[],lines:n=[],polygons:i=[],circles:s=[]}=null!=e?e:{};for(let e=0;e(((e,t,n)=>{t in e?tc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);const ic=[new f,new f,new f,new f],sc=[new t,new t,new t,new t],rc=[new m,new m,new m,new m],oc=[new r,new r,new r,new r];function ac(e,t,n){return t.clone().sub(e).lengthSq()<=n**2}function lc(e,t,n){return t.clone().sub(e).lengthSq()<=n**2*Math.max(e.lengthSq(),t.length())}function cc(e,t){const{epsilon:n=0,relativeEpsilon:i}=t||{},s=0===n?(e,t)=>e.equals(t):i?lc:ac,r=e.length/3,o=new Array(r),[a,l]=sc;for(let t=0;t{if(o=n.length>1,r&&!o)return;const a=new Array(t);if(a.fill(0),n.forEach((function(n){const i=n*t;for(let n=0;nthis.isAncestor(e),onlyC:null!=o,equalVertexIndexMap:t};return e&&(u.positions=n.attributes.position.array,u.getParentMidpoint=t=>e[t].triangle.getMidpoint(h),u.getDepth=t=>e[t].depth),l.branchFace&&(u.maxCount=1/0),function(e,t={}){const{indexes:n,a:i,b:s,c:r,equalVertexIndexMap:o,faceIndex:a,onlyC:l,maxCount:c=(l?2:3),positions:h,getParentMidpoint:u,isAncestor:d,getDepth:p}=e,f=n.length/3,m=a??Math.trunc(f/2),g=o?e=>o[e]:e=>e,v=g(i),y=g(s),w=g(r),x=[];let A=()=>0,b=0;null!=a&&p&&(b=p(a)+1,A=e=>b-p(e));const[T,S,D]=sc;let E=()=>null;function C(e){const i=3*e,s=n.slice(i,i+3);if(t[e]){const t=A(e);return t>0?null:t<0?{posIndexes:s,consumed:!0}:E(e,s)}return{posIndexes:s}}h&&(T.set(0,0,0),[i,s,r].forEach((e=>{D.fromArray(h,3*e),T.add(D)})),T.multiplyScalar(1/3),E=(e,t)=>{S.set(0,0,0);for(let e=0;e{i.push(e)})),i.forEach((e=>{delete t[e.faceIndex],e.removeFromParent()})),!0}removeChildFaces(e){return this.children.slice().forEach((t=>{const n=t.faceIndex;this.removeFace(n,e)})),this}clear(){return this.removeChildFaces()}updateSelfChildren(e={},t=this.root.equalVertexIndexMap){const{geometry:n}=this;return this.removeChildFaces(e),this.getAdjacentFaces(e,t).forEach((t=>{t.consumed&&this.removeFace(t.faceIndex,e);const i=new pc({geometry:n,...t});e[t.faceIndex]=i,this.add(i)})),e}updateChildrenDFS(e,t){const{geometry:n}=this;return e||(e=this.root.childrenFaceIndexes={[this.faceIndex]:this}),t||(t=this.equalVertexIndexMap=this.root.equalVertexIndexMap??cc(n.attributes.position.array)),this.getAdjacentFaces(e,t).forEach((i=>{i.consumed&&this.removeFace(i.faceIndex,e);const s=new pc({geometry:n,...i});return e[i.faceIndex]=s,this.add(s),s.updateChildrenDFS(e,t),s})),e}get equalVertexIndexMap(){return this._equalVertexIndexMap}set equalVertexIndexMap(e){this._equalVertexIndexMap=e,this._equalVertexIndexes=null}get equalVertexIndexes(){let{_equalVertexIndexes:e,equalVertexIndexMap:t}=this;return!e&&t&&(this._equalVertexIndexes=e=hc(t)),e}updateChildrenBFS(e){const t=this.childrenFaceIndexes={[this.faceIndex]:this},n=this.equalVertexIndexMap=null==(null==e?void 0:e.epsilon)&&this.equalVertexIndexMap?this.equalVertexIndexMap:cc(this.geometry.attributes.position.array,e);return this.traversalBFS((function(e){e.updateSelfChildren(t,n)})),t}traversalBFS(e){return function(e,t,n){const i=[e];for(;i.length;){const e=i.shift();if(n(e))return e;i.push(...e[t])}}(this,"children",e)}}var fc=Object.defineProperty,mc=(e,t,n)=>(((e,t,n)=>{t in e?fc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);function gc(e,t){const n=t.toArray(),i=n.findIndex((e=>0!==e));if(-1===i)return 0;const s=e.toArray()[i];return 0===s?1/0:n[i]/s}function vc(e,t){const n=e.clone().cross(t);return"number"==typeof n?0===n:0===n.lengthSq()}function yc(e,t,n){let i=function(e,t,n=0){let i=e.lengthSq()*t.lengthSq();if(0===i)return n;i=Math.sqrt(i);let s=e.dot(t)/i;return s=Math.max(-1,Math.min(1,s)),Math.acos(s)}(e,t);return 0===i?i:e.clone().cross(t).dot(n)<0?-i:i}const wc=180/Math.PI,xc={yaw:[{name:"前",range:[-15,15]},{name:"左",range:[15,165]},{name:"右",range:[-165,-15]},{name:"后",range:[-180.1,-165]},{name:"后",range:[165,180.1]}],pitch:[{name:"前",range:[-15,15]},{name:"上",range:[15,165]},{name:"下",range:[-165,-15]},{name:"后",range:[-180.1,-165]},{name:"后",range:[165,180.1]}],roll:[{name:"上",range:[-15,15]},{name:"左",range:[15,165]},{name:"右",range:[-165,-15]},{name:"下",range:[-180.1,-165]},{name:"下",range:[165,180.1]}]};const Ac={degrees:!0,map:xc,front:{x:0,y:0,z:1},up:{x:0,y:1,z:0}};class bc{constructor(e){mc(this,"_options"),mc(this,"_listMap"),mc(this,"_front"),mc(this,"_up"),e&&(this.options=e)}static get options(){return this._options??(this.options=Ac)}static set options(e){this._options=Object.assign({},structuredClone(xc),e)}get defaultOptions(){return this.constructor.options}get options(){return this._options??(this.options=this.defaultOptions)}set options(e){this._options=Object.assign({},structuredClone(this.defaultOptions),e),this._listMap=null,this._front=null,this._up=null}get degrees(){return this.options.degrees??(this.options.degrees=this.defaultOptions.degrees??!0)}set degrees(e){this.options.degrees=e}get map(){return this.options.map||(this.map=this.defaultOptions.map),this.options.map}set map(e){const t=structuredClone(this.defaultOptions.map),n=structuredClone(xc);e=e?{yaw:e.yaw??t.yaw??n.yaw,pitch:e.pitch??t.pitch??n.pitch,roll:e.roll??t.roll??n.roll}:t,this.options.map=e,this._listMap=null}get listMap(){return this._listMap??(this._listMap=function(e){const t={};for(const[n,i]of Object.entries(e))t[n]=Array.isArray(i)?i:Object.entries(i).map((([e,t])=>({name:e,range:t})));return t}(this.map??{}))}get front(){return this._front||(this.front=this.options.front??this.defaultOptions.front??Ac.front),this._front}set front(e){this._front=(new t).copy(e)}get up(){return this._up||(this.up=this.options.up??this.defaultOptions.up??Ac.up),this._up}set up(e){this._up=(new t).copy(e)}computeAzimuth(e,n,i){const s=(new t).copy(e),r=(new t).copy(n??this.front),o=(new t).copy(i??this.up);let{yaw:a,pitch:l,roll:c}=function(e,t,n){const i=t.clone().negate(),s=n.clone().projectOnPlane(t),r=yc(t,e.clone().projectOnPlane(s),s),o=t.clone().cross(s);return{yaw:r,pitch:yc(t,e.clone().projectOnPlane(o),o),roll:yc(s,e.clone().projectOnPlane(i),i)}}(s,r,o);return this.degrees&&(a*=wc,l*=wc,c*=wc),{yaw:{angle:a,name:this.findAzimuthNames("yaw",a)},pitch:{angle:l,name:this.findAzimuthNames("pitch",l)},roll:{angle:c,name:this.findAzimuthNames("roll",c)}}}findAzimuthNames(e,t){const n=[],i=this.listMap[e];if(!i)return n;for(const{name:e,range:[s,r]}of i)(t>=s&&tr)&&n.push(e);return n}}mc(bc,"_options"),new bc,new m(1,0,0,0,0,0,1,0,0,1,0,0,0,0,0,1);var Tc=(e=>(e[e.ThroughIntersect=1]="ThroughIntersect",e[e.JointIntersect=2]="JointIntersect",e[e.Intersect=3]="Intersect",e[e.Tangency=4]="Tangency",e[e.Contain=8]="Contain",e[e.Dissociation=16]="Dissociation",e))(Tc||{});function Sc(e,n){const[i,s]=e,r=s.clone().sub(i),[o,a]=n,l=a.clone().sub(o),c=r.clone().cross(l),[h,u]=function(e){return void 0!==e.w?[ve,4]:void 0!==e.z?[t,3]:[f,2]}(i);if(2===u?0===c:c.equals(new h))return null;const d=o.clone().sub(i).cross(l),p=2===u?d/c:gc(c,d);return r.clone().multiplyScalar(p).add(i)}function Dc(e,t){const[n,i]=e,[s,r]=t,o=i.clone().sub(n),a=function(e,t){const[n,i]=e,s=i.clone().sub(n),[r,o]=t;if(vc(o.clone().sub(r),s))return vc(r.clone().sub(n),s)?Tc.Tangency:Tc.Dissociation;return Tc.Intersect}(e,t);if(a===Tc.Tangency){let e=0,t=0;const i=gc(o,s.clone().sub(n));i<0?e++:i>1&&t++;const a=gc(o,r.clone().sub(n));return a<0?e++:a>1&&t++,2===e||2===t?Tc.Dissociation:e+t===1?Tc.Tangency:Tc.Contain}if(a!==Tc.Intersect)return a;const l=Sc(e,t),c=gc(r.clone().sub(s),l.clone().sub(s));if(c<0||c>1)return Tc.Dissociation;if(0===c||1===c)return Tc.JointIntersect;const h=gc(o,l.clone().sub(n));return h<0||h>1?Tc.Dissociation:0===h||1===h?Tc.JointIntersect:Tc.ThroughIntersect}function Ec(e,t){const n=t.length;let i,s=!1;for(let r=0;r{const s=new Pc({geometry:i,...t},this,!0);n&&s.isOutFlatRange(n)?this.remove(s):(t.consumed&&this.removeFace(t.faceIndex,e),e[t.faceIndex]=s)})),e}updateChildrenDFS(e,t,n){this.updateFace();const{geometry:i}=this;if(!e){if(e=this.root.childrenFaceIndexes={},n&&this.isOutFlatRange(n))return this.removeFromParent(),e;e[this.faceIndex]=this}return t||(t=this.equalVertexIndexMap=this.root.equalVertexIndexMap??cc(i.attributes.position.array)),this.getAdjacentFaces(e,t).forEach((s=>{const r=new Pc({geometry:i,...s},this);n&&r.isOutFlatRange(n)?this.remove(r):(s.consumed&&this.removeFace(s.faceIndex,e),e[s.faceIndex]=r,r.updateChildrenDFS(e,t,n))})),e}updateChildrenBFS(e,t){this.updateFace();const n=this.childrenFaceIndexes={};if(t&&this.isOutFlatRange(t))return this.removeFromParent(),n;n[this.faceIndex]=this;const i=this.equalVertexIndexMap=null==(null==e?void 0:e.epsilon)&&this.equalVertexIndexMap?this.equalVertexIndexMap:cc(this.geometry.attributes.position.array,e);return this.traversalBFS((function(e){e.updateSelfChildren(n,i,t)})),n}appendVertex(e,n,i,s,r=!0){const{positions:o,normals:a,uvs:l}=n,{[e]:c,real:{[e]:h},normalMatrix:u,matrixWorld:d,geometry:p}=this,{[e]:m}=r?this.flatTriangle:this.triangle,g=i[s?h:c]=o.length;o.push(m.clone());const{attributes:{normal:v,uv:y}}=p;if(a){const e=new t;r?this.flatTriangle.getNormal(e):e.fromBufferAttribute(v,h),a.push(e)}if(l){const e=(new f).fromBufferAttribute(y,h);l.push(e)}return g}appendFace(e,t,n=!0){const{indexes:i}=e,{a:s,b:r,order:o}=this,a=this.appendVertex("c",e,t,!1,n);if(i){const e=i.length;i[e+o[0]]=t[s],i[e+o[1]]=t[r],i[e+o[2]]=a}return a}appendFaceVertices(e,t,n=!0){const{indexes:i}=e,{order:s}=this,r=this.appendVertex("a",e,t,!0,n),o=this.appendVertex("b",e,t,!0,n),a=this.appendVertex("c",e,t,!0,n);if(i){const e=i.length;i[e+s[0]]=r,i[e+s[1]]=o,i[e+s[2]]=a}return[r,o,a]}createFaceGeometry(e=!0){const t=[],n=[],i=[],s=[],r=new Array(3),{normal:o,uv:a}=this.geometry.attributes,l={positions:t,indexes:s};o&&(l.normals=n),a&&(l.uvs=i),this.appendFaceVertices(l,r,e);const c=[],h=[],u=[];for(let e=0;e<3;e++)t[e].toArray(c,c.length),o&&n[e].toArray(h,h.length),a&&i[e].toArray(u,u.length);const d=new v;return d.setAttribute("position",new y(c,3)),o&&d.setAttribute("normal",new y(h,3)),a&&d.setAttribute("uv",new y(u,2)),d.index=new C(s,1),d}createFaceFlatKeyframeTracks(e,t,n=0,i){const{uuid:s,position:r,quaternion:o,scale:a}=e,{matrixInvert:l,parent:c}=this;let h=l;if(!i&&c){const{matrixWorld:e}=c;h=e.clone().multiply(l)}const[u,d]=sc,p=oc[0];h.decompose(u,p,d);const f=[n,n+t],m=[];r.toArray(m),u.toArray(m,m.length);const g=[];o.toArray(g),p.toArray(g,g.length);const v=[];a.toArray(v),d.toArray(v,v.length);return[new B(`${s}.position`,f,m),new I(`${s}.quaternion`,f,g),new B(`${s}.scale`,f,v)]}createFaceMesh(e,t=!0){const n=this.createFaceGeometry(t);return new se(n,e)}createFlatFaceMeshTree(e,t,n){const i=this.createFaceMesh(e),s=n||[];let{duration:r,layer:o=0,byLayer:a}=t||{};if(r&&o>0){const e=a?r*(o-1):0,t=this.createFaceFlatKeyframeTracks(i,r,e);s.push(...t)}if(t={duration:r,layer:o+1,byLayer:a},this.children.forEach((n=>{const r=n.createFlatFaceMeshTree(e,t,s);i.add(r)})),!n&&s.length){const e=new O("展开",void 0,s);i.animations.push(e)}return i}}let Oc=class e extends Pc{constructor(e){var n;const{geometry:i,faceIndex:s,origin:r,normal:o,angle:a=0,xyPlane:l=!1,meshMatrix:c,flatRange:h}=e;let u=null==(n=i.index)?void 0:n.array;u||(u=dc(i.attributes.position.count),i.index=new C(u,1));const d=3*s;super({geometry:i,a:u[d],b:u[d+1],c:u[d+2],faceIndex:s,order:[0,1,2]}),nc(this,"origin",new t),nc(this,"normal"),nc(this,"angle"),nc(this,"xyPlane"),nc(this,"xyPlaneMatrix",new m),nc(this,"meshMatrix",null),nc(this,"flatRange",null),nc(this,"_isBounded",!1);const{triangle:p}=this;if(this.origin.copy(r||p.b),this.normal=o||p.getNormal(new t),this.angle=a,this.meshMatrix=c,this.flatRange=h,h&&c){let e=c.getMaxScaleOnAxis();e=0===e?1:1/e,this.flatRange=h.map((t=>t.multiplyScalar(e)))}this.xyPlane=!!h||l,this.updateFace(),this.updateChildrenBFS(e,this.flatRange)}static createFlatFaceTreeByRay(t){const{object:n,origin:i,direction:s,angle:r,planeNormal:o,...a}=t,l=new Ve(i,s),[c]=l.intersectObject(n);if(!c)return null;const{object:h,instanceId:u,point:d,normal:p,faceIndex:f,face:g}=c;if(null==g)return null;const{geometry:v,matrixWorld:y}=h,w=new m;null==u?w.copy(y):(h.getMatrixAt(u,w),w.premultiply(y));const x=rc[0].copy(w).invert();let A;switch(o){case 1:A=p;break;case 2:A=s.clone().negate(),A.transformDirection(x);break;default:A=g.normal}return d.applyMatrix4(x),new e({...a,geometry:v,origin:d,faceIndex:f,normal:A,angle:r,meshMatrix:w})}updateMatrix(){if(!this.xyPlane)return super.updateMatrix();const{origin:e,normal:t,angle:n,xyPlaneMatrix:i}=this,[s,r]=oc,o=sc[0];o.set(0,0,1),s.setFromUnitVectors(o,t),r.setFromAxisAngle(o,n),s.multiply(r),i.makeRotationFromQuaternion(s),i.setPosition(e),this.matrix.copy(i).invert()}averageEqualVectors(e,t){const n=e[0].toArray().length;let i=[];for(let t=0;t{const t=n[e];void 0!==t&&a.push(t)}))}return uc(e,t,r)}getVerticesByReuse(e,t=!0,n){const i=[];if(this.appendVertex("a",e,i,!1,t),this.appendVertex("b",e,i,!1,t),this.traversalBFS((n=>{n.appendFace(e,i,t)})),t&&n){const{positions:t}=e;let n=[];for(let e=0;e{n.appendFaceVertices(e,s,t)})),t&&n){const{positions:t}=e;let n=[];for(let e=0;e{o[e]=[]})),o.indexMap=e?this.getVerticesByAll(o,t,n):this.getVerticesByReuse(o,t,n),o}createGeometry(e,t=!0){const{normal:n,uv:i}=this.geometry.attributes,{positions:s,normals:r,uvs:o,indexes:a,indexMap:l}=this.generateGeometryData(e,t),c=s.length,h=[],u=[],d=[];for(let e=0;e{const r=s.createFaceMesh(e);if(i.add(r),t){const e=s.createFaceFlatKeyframeTracks(r,t,0,!0);n.push(...e)}})),n.length){const e=new O("独立展开",t,n);i.animations.push(e)}return this.transformFlatObjectToWorld(i)}createFlatFaceMeshTree(e,t,n){const i=super.createFlatFaceMeshTree(e,t,n);return this.transformFlatObjectToWorld(i)}transformFlatObjectToWorld(e){const{meshMatrix:t,xyPlaneMatrix:n}=this;return t&&e.matrix.copy(t),e.matrix.multiply(n),e.matrix.decompose(e.position,e.quaternion,e.scale),e}};function Bc(e,t,n,i,s){const r=e.length;if(!s){s=[];for(let e=0;ee.length/o|0));for(let t=0;t0,m=l[0][n]-i>0,g=c[0][n]-i>0;switch(i<0&&(f=!f,m=!m,g=!g),f+m+g){case 0:for(let e=0;e(e[e.Projection=0]="Projection",e[e.Distance=1]="Distance",e[e.ContinuousDistance=2]="ContinuousDistance",e[e.UVIncrement=3]="UVIncrement",e[e.Mapping=4]="Mapping",e[e.Original=5]="Original",e))(Lc||{});class Rc extends v{constructor(){super(...arguments),nc(this,"isDecalGeometry",!0),nc(this,"originalUVs"),nc(this,"uvMap",1),nc(this,"offsetFactor",0),nc(this,"offsetUnits",0),nc(this,"epsilon",1e-8),nc(this,"relativeEpsilon",!1),nc(this,"_equalVertexIndexMap",null),nc(this,"_equalVertexIndexes",null),nc(this,"border",[])}get equalVertexIndexMap(){let{_equalVertexIndexMap:e}=this;if(!e){const{cutPositions:t,epsilon:n,relativeEpsilon:i}=this;this._equalVertexIndexMap=e=cc(t,{epsilon:n,relativeEpsilon:i}),this._equalVertexIndexes=null}return e}get equalVertexIndexes(){let{_equalVertexIndexes:e}=this;return e||(this._equalVertexIndexes=e=hc(this.equalVertexIndexMap)),e}empty(){const{normal:e,uv:t}=this.attributes;this.attributes={},this.setAttribute("position",new y([],3)),e&&this.setAttribute("normal",new y([],3)),t&&this.setAttribute("uv",new y([],3)),this.setIndex([])}clipGeometryData(e,t){return function(e,t,n){for(let i=0;i3){n=[0,0,0];const e=t.length;for(let i=0;i.5*e))}get meshMatrix(){return this.faceTree.meshMatrix}get geometry(){return this.faceTree.geometry}setOptions(e){let{object:t,origin:n,direction:i,angle:s,size:r,uvMap:o,offsetFactor:a,offsetUnits:l,epsilon:c,relativeEpsilon:h,branchFace:u}=e,d=!1;t&&(this.object=t,d=!0),r&&(this.size=r,d=!0),c&&(this.epsilon=c,d=!0),h&&(this.relativeEpsilon=h,d=!0),n&&(this.origin.copy(n),d=!0),i&&(this.direction.copy(i),d=!0),null!=s&&(this.angle=s,d=!0),null!=u&&(this.branchFace=u,d=!0);let p=!1;if(a&&(p=!0,this.offsetFactor=a),l&&(p=!0,this.offsetUnits=l),null!=o&&(this.uvMap=o,o===Lc.ContinuousDistance&&(d=!0)),d)return this.updateGeometry();p&&this.updatePosition(),null!=o&&this.updateUV()}updateGeometry(){const{object:e,origin:t,direction:n,angle:i,border:[s,r],branchFace:o,epsilon:a,relativeEpsilon:l}=this,c=this.faceTree=Oc.createFlatFaceTreeByRay({object:e,origin:t,direction:n,angle:i,flatRange:[new f(s,r),new f(-s,r),new f(-s,-r),new f(s,-r)],xyPlane:!0,branchFace:o,epsilon:a,relativeEpsilon:l});if(this._equalVertexIndexMap=this._equalVertexIndexes=null,!c)return this.empty();const{flatPositions:h,positions:u,normals:d,uvs:p,averagePositions:m}=this.generateDecalGeometryData(this.geometry);this.flatPositions=h,this.cutPositions=u,this.averageFlatPositions=m,this.originalUVs=p,d&&this.setAttribute("normal",new y(d,3)),this.updatePosition(),this.updateUV()}generateDecalGeometryData(e){const{faceTree:t}=this,{attributes:n}=e,i={positions:[]},s=["positions"];n.normal&&s.push("normals"),n.uv&&s.push("uvs");const r={},o=[i.positions];s.forEach((e=>o.push(r[e]=[])));const a=this.uvMap===Lc.ContinuousDistance;t.getVertices(i,r,!0,a);let l=[];const c=o.length,h=i.positions.length;for(let e=0;e{u[e]=l[t+1]})),u.normals&&function(e,t){const n=e.length/t|0;for(let i=0;i(((e,t,n)=>{t in e?jc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);function Gc(e,n,i){const s=(i=i??0)+1;if(ms(e))return e;if(null!=e.x&&null!=e.y)return function(e){return null!=e.w?(new ve).copy(e):null!=e.z?(new t).copy(e):(new f).copy(e)}(e);if(Array.isArray(e))return e.map((e=>Gc(e,n,s)));if(e instanceof Map){const t=new Map;for(const i of e.keys()){const r=Gc(e.get(i),n,s);t.set(i,r)}return t}if(function(e){return e&&"function"==typeof e[Symbol.iterator]}(e)){const t=[];for(const i of e){const e=Gc(i,n,s);t.push(e)}return t}if((n||0===i)&&"object"==typeof e){const t={};for(const i of Object.keys(e))t[i]=Gc(e[i],n,s);return t}return e}function Hc(e,t,n){let i=function(e,t){const n=Math.sqrt(e.lengthSq()*t.lengthSq());if(0===n)return 0;let i=e.dot(t)/n;return i=Math.max(-1,Math.min(1,i)),Math.acos(i)}(e,t);return 0===i?i:e.clone().cross(t).dot(n)<0?-i:i}const Vc=180/Math.PI,_c={yaw:[{name:"前",range:[-15,15]},{name:"左",range:[15,165]},{name:"右",range:[-165,-15]},{name:"后",range:[-180.1,-165]},{name:"后",range:[165,180.1]}],pitch:[{name:"前",range:[-15,15]},{name:"上",range:[15,165]},{name:"下",range:[-165,-15]},{name:"后",range:[-180.1,-165]},{name:"后",range:[165,180.1]}],roll:[{name:"上",range:[-15,15]},{name:"左",range:[15,165]},{name:"右",range:[-165,-15]},{name:"下",range:[-180.1,-165]},{name:"下",range:[165,180.1]}]};const Qc={degrees:!0,map:_c,front:{x:0,y:0,z:1},up:{x:0,y:1,z:0}};class Wc{constructor(e){Nc(this,"_options"),Nc(this,"_listMap"),Nc(this,"_front"),Nc(this,"_up"),e&&(this.options=e)}static get options(){return this._options??(this.options=Qc)}static set options(e){this._options=Object.assign({},structuredClone(_c),e)}get defaultOptions(){return this.constructor.options}get options(){return this._options??(this.options=this.defaultOptions)}set options(e){this._options=Object.assign({},structuredClone(this.defaultOptions),e),this._listMap=null,this._front=null,this._up=null}get degrees(){return this.options.degrees??(this.options.degrees=this.defaultOptions.degrees??!0)}set degrees(e){this.options.degrees=e}get map(){return this.options.map||(this.map=this.defaultOptions.map),this.options.map}set map(e){const t=structuredClone(this.defaultOptions.map),n=structuredClone(_c);e=e?{yaw:e.yaw??t.yaw??n.yaw,pitch:e.pitch??t.pitch??n.pitch,roll:e.roll??t.roll??n.roll}:t,this.options.map=e,this._listMap=null}get listMap(){return this._listMap??(this._listMap=function(e){const t={};for(const[n,i]of Object.entries(e))t[n]=Array.isArray(i)?i:Object.entries(i).map((([e,t])=>({name:e,range:t})));return t}(this.map??{}))}get front(){return this._front||(this.front=this.options.front??this.defaultOptions.front??Qc.front),this._front}set front(e){this._front=(new t).copy(e)}get up(){return this._up||(this.up=this.options.up??this.defaultOptions.up??Qc.up),this._up}set up(e){this._up=(new t).copy(e)}computeAzimuth(e,n,i){const s=(new t).copy(e),r=(new t).copy(n??this.front),o=(new t).copy(i??this.up);let{yaw:a,pitch:l,roll:c}=function(e,t,n){const i=t.clone().negate(),s=n.clone().projectOnPlane(t),r=Hc(t,e.clone().projectOnPlane(s),s),o=t.clone().cross(s);return{yaw:r,pitch:Hc(t,e.clone().projectOnPlane(o),o),roll:Hc(s,e.clone().projectOnPlane(i),i)}}(s,r,o);return this.degrees&&(a*=Vc,l*=Vc,c*=Vc),{yaw:{angle:a,name:this.findAzimuthNames("yaw",a)},pitch:{angle:l,name:this.findAzimuthNames("pitch",l)},roll:{angle:c,name:this.findAzimuthNames("roll",c)}}}findAzimuthNames(e,t){const n=[],i=this.listMap[e];if(!i)return n;for(const{name:e,range:[s,r]}of i)(t>=s&&tr)&&n.push(e);return n}}function Yc(e){const n={};if(Array.isArray(e)){const i=e.map((e=>(new t).copy(e)));n.points=i}else if(e instanceof Xl){const i=e.nodes.map((e=>e.getWorldPosition(new t)));n.points=i}else n.curve=e;return n}Nc(Wc,"_options"),new Wc,new ze;var Kc={},Xc={},Zc=function(e,t){return Zc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Zc(e,t)};function qc(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Zc(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Jc=function(){return Jc=Object.assign||function(e){for(var t,n=1,i=arguments.length;n=0;a--)(s=e[a])&&(o=(r<3?s(o):r>3?s(t,n,o):s(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o}function th(e,t){return function(n,i){t(n,i,e)}}function nh(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function ih(e,t,n,i){return new(n||(n=Promise))((function(s,r){function o(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}l((i=i.apply(e,t||[])).next())}))}function sh(e,t){var n,i,s,r,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;r&&(r=0,a[0]&&(o=0)),o;)try{if(n=1,i&&(s=2&a[0]?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[2&a[0],s.value]),a[0]){case 0:case 1:s=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(s=o.trys,(s=s.length>0&&s[s.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!s||a[1]>s[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function lh(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,s,r=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(e){s={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o}function ch(){for(var e=[],t=0;t1||a(e,t)}))})}function a(e,t){try{(n=s[e](t)).value instanceof dh?Promise.resolve(n.value.v).then(l,c):h(r[0][2],n)}catch(e){h(r[0][3],e)}var n}function l(e){a("next",e)}function c(e){a("throw",e)}function h(e,t){e(t),r.shift(),r.length&&a(r[0][0],r[0][1])}}function fh(e){var t,n;return t={},i("next"),i("throw",(function(e){throw e})),i("return"),t[Symbol.iterator]=function(){return this},t;function i(i,s){t[i]=e[i]?function(t){return(n=!n)?{value:dh(e[i](t)),done:!1}:s?s(t):t}:s}}function mh(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=ah(e),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(n){t[n]=e[n]&&function(t){return new Promise((function(i,s){(function(e,t,n,i){Promise.resolve(i).then((function(t){e({value:t,done:n})}),t)})(i,s,(t=e[n](t)).done,t.value)}))}}}function gh(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var vh=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function yh(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&rh(t,e,n);return vh(t,e),t}function wh(e){return e&&e.__esModule?e:{default:e}}function xh(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)}function Ah(e,t,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(e,n):s?s.value=n:t.set(e,n),n}function bh(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function Th(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var i;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");i=t[Symbol.asyncDispose]}if(void 0===i){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");i=t[Symbol.dispose]}if("function"!=typeof i)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:i,async:n})}else n&&e.stack.push({async:!0});return t}var Sh="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var i=new Error(n);return i.name="SuppressedError",i.error=e,i.suppressed=t,i};function Dh(e){function t(t){e.error=e.hasError?new Sh(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function n(){for(;e.stack.length;){var i=e.stack.pop();try{var s=i.dispose&&i.dispose.call(i.value);if(i.async)return Promise.resolve(s).then(n,(function(e){return t(e),n()}))}catch(e){t(e)}}if(e.hasError)throw e.error}()}var Eh={__extends:qc,__assign:Jc,__rest:$c,__decorate:eh,__param:th,__metadata:nh,__awaiter:ih,__generator:sh,__createBinding:rh,__exportStar:oh,__values:ah,__read:lh,__spread:ch,__spreadArrays:hh,__spreadArray:uh,__await:dh,__asyncGenerator:ph,__asyncDelegator:fh,__asyncValues:mh,__makeTemplateObject:gh,__importStar:yh,__importDefault:wh,__classPrivateFieldGet:xh,__classPrivateFieldSet:Ah,__classPrivateFieldIn:bh,__addDisposableResource:Th,__disposeResources:Dh},Ch=Object.freeze({__proto__:null,__addDisposableResource:Th,get __assign(){return Jc},__asyncDelegator:fh,__asyncGenerator:ph,__asyncValues:mh,__await:dh,__awaiter:ih,__classPrivateFieldGet:xh,__classPrivateFieldIn:bh,__classPrivateFieldSet:Ah,__createBinding:rh,__decorate:eh,__disposeResources:Dh,__esDecorate:function(e,t,n,i,s,r){function o(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var a,l=i.kind,c="getter"===l?"get":"setter"===l?"set":"value",h=!t&&e?i.static?e:e.prototype:null,u=t||(h?Object.getOwnPropertyDescriptor(h,i.name):{}),d=!1,p=n.length-1;p>=0;p--){var f={};for(var m in i)f[m]="access"===m?{}:i[m];for(var m in i.access)f.access[m]=i.access[m];f.addInitializer=function(e){if(d)throw new TypeError("Cannot add initializers after decoration has completed");r.push(o(e||null))};var g=(0,n[p])("accessor"===l?{get:u.get,set:u.set}:u[c],f);if("accessor"===l){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(a=o(g.get))&&(u.get=a),(a=o(g.set))&&(u.set=a),(a=o(g.init))&&s.unshift(a)}else(a=o(g))&&("field"===l?s.unshift(a):u[c]=a)}h&&Object.defineProperty(h,i.name,u),d=!0},__exportStar:oh,__extends:qc,__generator:sh,__importDefault:wh,__importStar:yh,__makeTemplateObject:gh,__metadata:nh,__param:th,__propKey:function(e){return"symbol"==typeof e?e:"".concat(e)},__read:lh,__rest:$c,__runInitializers:function(e,t,n){for(var i=arguments.length>2,s=0;sthis.head.priority)return this.prepend(t);for(var i=new e(this.head),s=i,r=this.tail;r.nonEmpty;){if(n>r.head.priority)return s.tail=r.prepend(t),i;s=s.tail=new e(r.head),r=r.tail}return s.tail=new e(t),i},e.prototype.filterNot=function(t){if(!this.nonEmpty||null==t)return this;if(t===this.head.listener)return this.tail;for(var n=new e(this.head),i=n,s=this.tail;s.nonEmpty;){if(s.head.listener===t)return i.tail=s.tail,n;i=i.tail=new e(s.head),s=s.tail}return this},e.prototype.contains=function(e){if(!this.nonEmpty)return!1;for(var t=this;t.nonEmpty;){if(t.head.listener===e)return!0;t=t.tail}return!1},e.prototype.find=function(e){if(!this.nonEmpty)return null;for(var t=this;t.nonEmpty;){if(t.head.listener===e)return t.head;t=t.tail}return null},e.prototype.toString=function(){for(var e="",t=this;t.nonEmpty;)e+=t.head+" -> ",t=t.tail;return"[List "+(e+="NIL")+"]"},e.NIL=new e(null,null),e}();Ih.SlotList=Lh;var Rh={};Object.defineProperty(Rh,"__esModule",{value:!0});var Fh=function(){function e(e,t,n,i){void 0===n&&(n=!1),void 0===i&&(i=0),this._enabled=!0,this._once=!1,this._priority=0,this._listener=e,this._once=n,this._signal=t,this._priority=i,this.verifyListener(e)}return e.prototype.execute0=function(){this._enabled&&(this._once&&this.remove(),this._params&&this._params.length?this._listener.apply(null,this._params):this._listener())},e.prototype.execute1=function(e){this._enabled&&(this._once&&this.remove(),this._params&&this._params.length?this._listener.apply(null,[e].concat(this._params)):this._listener(e))},e.prototype.execute=function(e){if(this._enabled){this._once&&this.remove(),this._params&&this._params.length&&(e=e.concat(this._params));var t=e.length;0===t?this._listener():1===t?this._listener(e[0]):2===t?this._listener(e[0],e[1]):3===t?this._listener(e[0],e[1],e[2]):this._listener.apply(null,e)}},Object.defineProperty(e.prototype,"listener",{get:function(){return this._listener},set:function(e){if(null==e)throw new Error("Given listener is null.\nDid you want to set enabled to false instead?");this.verifyListener(e),this._listener=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"once",{get:function(){return this._once},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"priority",{get:function(){return this._priority},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return"[Slot listener: "+this._listener+", once: "+this._once+", priority: "+this._priority+", enabled: "+this._enabled+"]"},Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._enabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"params",{get:function(){return this._params},set:function(e){this._params=e},enumerable:!0,configurable:!0}),e.prototype.remove=function(){this._signal.remove(this._listener)},e.prototype.verifyListener=function(e){if(null==e)throw new Error("Given listener is null.");if(null==this._signal)throw new Error("Internal signal reference has not been set yet.")},e}();Rh.Slot=Fh,Object.defineProperty(Bh,"__esModule",{value:!0});var Uh=Ih,zh=Rh,kh=function(){function e(){for(var e=[],t=0;t."+this._valueClasses[t])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numListeners",{get:function(){return this.slots.length},enumerable:!0,configurable:!0}),e.prototype.addOnce=function(e){return this.registerListener(e,!0)},e.prototype.remove=function(e){var t=this.slots.find(e);return t?(this.slots=this.slots.filterNot(e),t):null},e.prototype.removeAll=function(){this.slots=Uh.SlotList.NIL},e.prototype.dispatch=function(){for(var e=[],t=0;t is not an instance of <"+this._valueClasses[s]+">.");var r=this.slots;if(r.nonEmpty)for(;r.nonEmpty;)r.head.execute(e),r=r.tail},e.prototype.registerListener=function(e,t){if(void 0===t&&(t=!1),this.registrationPossible(e,t)){var n=new zh.Slot(e,this,t);return this.slots=this.slots.prepend(n),n}return this.slots.find(e)},e.prototype.registrationPossible=function(e,t){if(!this.slots.nonEmpty)return!0;var n=this.slots.find(e);if(!n)return!0;if(n.once!==t)throw new Error("You cannot addOnce() then add() the same listener without removing the relationship first.");return!1},e}();Bh.OnceSignal=kh,Object.defineProperty(Oh,"__esModule",{value:!0});var jh=Mh,Nh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jh.__extends(t,e),t.prototype.add=function(e){return this.registerListener(e)},t}(Bh.OnceSignal);Oh.Signal=Nh,Object.defineProperty(Ph,"__esModule",{value:!0});var Gh=Mh,Hh=Rh,Vh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Gh.__extends(t,e),t.prototype.addWithPriority=function(e,t){return void 0===t&&(t=0),this.registerListenerWithPriority(e,!1,t)},t.prototype.addOnceWithPriority=function(e,t){return void 0===t&&(t=0),this.registerListenerWithPriority(e,!0,t)},t.prototype.registerListener=function(e,t){return void 0===t&&(t=!1),this.registerListenerWithPriority(e,t)},t.prototype.registerListenerWithPriority=function(e,t,n){if(void 0===n&&(n=0),this.registrationPossible(e,t)){var i=new Hh.Slot(e,this,t,n);return this.slots=this.slots.insertWithPriority(i),i}return this.slots.find(e)},t}(Oh.Signal);Ph.PrioritySignal=Vh,Object.defineProperty(Xc,"__esModule",{value:!0});var _h=Mh,Qh=function(e){function t(t){void 0===t&&(t=null);for(var n=[],i=1;i is not an instance of <"+this._valueClasses[s]+">.");var r=e[0];r&&(r.target&&(r=r.clone(),e[0]=r),r.target=this.target,r.currentTarget=this.target,r.signal=this);for(var o=this.slots;o.nonEmpty;)o.head.execute(e),o=o.tail;if(r&&r.bubbles)for(var a=this.target;a&&a.hasOwnProperty("parent")&&(null===(a=a.parent).onEventBubbled||(r.currentTarget=a,a.onEventBubbled(r))););},t}(Ph.PrioritySignal);Xc.DeluxeSignal=Qh;var Wh={};Object.defineProperty(Wh,"__esModule",{value:!0});var Yh=function(){function e(e){void 0===e&&(e=!1),this._bubbles=e}return Object.defineProperty(e.prototype,"signal",{get:function(){return this._signal},set:function(e){this._signal=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){return this._target},set:function(e){this._target=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentTarget",{get:function(){return this._currentTarget},set:function(e){this._currentTarget=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bubbles",{get:function(){return this._bubbles},set:function(e){this._bubbles=e},enumerable:!0,configurable:!0}),e.prototype.clone=function(){return new e(this._bubbles)},e}();Wh.GenericEvent=Yh;var Kh={};Object.defineProperty(Kh,"__esModule",{value:!0}),Kh.IOnceSignal=Symbol("IOnceSignal");var Xh={};Object.defineProperty(Xh,"__esModule",{value:!0}),Xh.IPrioritySignal=Symbol("IPrioritySignal");var Zh={};Object.defineProperty(Zh,"__esModule",{value:!0}),Zh.ISignal=Symbol("ISignal");var qh={};Object.defineProperty(qh,"__esModule",{value:!0}),qh.ISlot=Symbol("ISlot");var Jh={};Object.defineProperty(Jh,"__esModule",{value:!0});var $h=Rh,eu=function(){function e(){for(var e=[],t=0;t."+this._valueClasses[t])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numListeners",{get:function(){return this.slot?1:0},enumerable:!0,configurable:!0}),e.prototype.add=function(e){return this.registerListener(e)},e.prototype.addOnce=function(e){return this.registerListener(e,!0)},e.prototype.remove=function(e){if(this.slot&&this.slot.listener===e){var t=this.slot;return this.slot=null,t}return null},e.prototype.removeAll=function(){this.slot&&this.slot.remove()},e.prototype.dispatch=function(){for(var e=[],t=0;t is not an instance of <"+this._valueClasses[s]+">.");this.slot&&this.slot.execute(e)},e.prototype.registerListener=function(e,t){if(void 0===t&&(t=!1),this.slot)throw new Error("You cannot add or addOnce with a listener already added, remove the current listener first.");return this.slot=new $h.Slot(e,this,t)},e}();Jh.MonoSignal=eu;var tu={};Object.defineProperty(tu,"__esModule",{value:!0});var nu=Mh,iu=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return nu.__extends(t,e),t.prototype.addOnce=function(t){var n=e.prototype.addOnce.call(this,t);return this.isDispatched&&(n.execute(this.valueObjects),n.remove()),n},t.prototype.dispatch=function(){for(var t=[],n=0;n{this.viewport.scener.removeObject(e)}))}getAll(){return[...this.objectsCache]}hideAll(){this.getAll().forEach((e=>{e.hide?e.hide():e.visible=!1})),this.viewport.signals.objectChanged.dispatch()}showAll(){this.getAll().forEach((e=>{e.show?e.show():e.visible=!0})),this.viewport.signals.objectChanged.dispatch()}}class wu extends yu{constructor(e,t){super(hi.Light,e,t.classified.Light),this.viewport=e,this.cache=t,Jt.init()}createAmbientLight(e){const{id:t,name:n="",color:i=10132122,intensity:s=10}=e,r=new ut(i,s);return r.name=n,r.userData.sid=t,r.userData.stype="Light",this.viewport.scener.addObject(r,this.scene),r}setAmbientLight(e,t){const{name:n="",color:i=10132122,intensity:s=10}=t;return!!e&&(e.name=n,e.color=new u(i),e.intensity=s,this.viewport.signals.objectChanged.dispatch(),!0)}createDirectionalLight(e){const{id:t,name:n="",color:i=10132122,intensity:s=10,position:r={x:1e3,y:1e3,z:1e3},target:o={x:-1e3,y:-1e3,z:-1e3},openShadow:a=!1,shadowAutoUpdate:l=!1,mapSize:c=4096}=e,h=new dt(i,s);if(h.name=n,h.userData.sid=t,h.userData.stype="Light",h.position.set(r.x,r.y,r.z),h.target.name=`${n}-target`,h.target.position.set(o.x,o.y,o.z),h.castShadow=a,a){const e=h.position.distanceTo(h.target.position);h.shadow.bias=-.005,h.shadow.camera.left=-e,h.shadow.camera.right=e,h.shadow.camera.top=e,h.shadow.camera.bottom=-e,h.shadow.camera.far=e,h.shadow.autoUpdate=l,h.shadow.needsUpdate=!l,h.shadow.mapSize.width=c,h.shadow.mapSize.height=c,h.shadow.camera.updateProjectionMatrix()}return this.viewport.scener.addObject(h,this.scene),this.viewport.scener.addObject(h.target,this.scene),h}setDirectionalLight(e,t){const{name:n="",color:i=10132122,intensity:s=10,position:r={x:1e3,y:1e3,z:1e3},target:o={x:-1e3,y:-1e3,z:-1e3},openShadow:a=!1,shadowAutoUpdate:l=!1,mapSize:c=4096}=t;if(!e)return!1;if(e.name=n,e.color=new u(i),e.intensity=s,e.position.set(r.x,r.y,r.z),e.target.position.set(o.x,o.y,o.z),e.castShadow=a,a){const t=e.position.distanceTo(e.target.position);e.shadow.bias=-.005,e.shadow.camera.left=-t,e.shadow.camera.right=t,e.shadow.camera.top=t,e.shadow.camera.bottom=-t,e.shadow.camera.far=t,e.shadow.autoUpdate=l,e.shadow.needsUpdate=!l,e.shadow.mapSize.width=c,e.shadow.mapSize.height=c,e.shadow.camera.updateProjectionMatrix()}return this.viewport.signals.objectChanged.dispatch(),!0}createHemisphereLight(e){const{id:t,name:n="",skyColor:i=16777215,groundColor:s=14540253,intensity:r=10,position:o={x:0,y:0,z:0}}=e,a=new pt(i,s,r);return a.name=n,a.position.set(o.x,o.y,o.z),a.userData.sid=t,a.userData.stype="Light",this.viewport.scener.addObject(a,this.scene),a}setHemisphereLight(e,t){const{name:n="",skyColor:i=16777215,groundColor:s=14540253,intensity:r=10,position:o={x:0,y:0,z:0}}=t;return!!e&&(e.name=n,e.color=new u(i),e.groundColor=new u(s),e.intensity=r,e.position.set(o.x,o.y,o.z),this.viewport.signals.objectChanged.dispatch(),!0)}createSpotLight(e){const{id:t,name:n="",color:i=16777215,intensity:s=10,angle:r=45,position:o={x:0,y:500,z:0},target:a={x:0,y:0,z:0},openShadow:l=!1,shadowAutoUpdate:c=!1,mapSize:h=4096}=e,u=vi(o).distanceTo(vi(a)),d=new ft(i,s,u,Math.PI/360*r,0,0);if(d.name=n,d.position.set(o.x,o.y,o.z),d.userData.sid=t,d.userData.stype="Light",d.castShadow=l,d.target.position.set(a.x,a.y,a.z),d.target.castShadow=l,d.target.receiveShadow=!0,d.target.updateMatrixWorld(),l){const e=d.position.distanceTo(d.target.position);d.shadow.autoUpdate=c,d.shadow.needsUpdate=!c,d.shadow.mapSize.width=h,d.shadow.mapSize.height=h,d.shadow.bias=-.005,d.shadow.focus=.6,d.shadow.camera.far=e,d.shadow.camera.updateProjectionMatrix()}return this.viewport.scener.addObject(d,this.scene),d}setSpotLight(e,t){const{name:n="",color:i=16777215,intensity:s=10,angle:r=45,position:o={x:0,y:500,z:0},target:a={x:0,y:0,z:0},openShadow:l=!1,shadowAutoUpdate:c=!1,mapSize:h=4096}=t;if(!e)return!1;const d=vi(o).distanceTo(vi(a));if(e.name=n,e.color=new u(i),e.intensity=s,e.distance=d,e.angle=Math.PI/360*r,e.position.set(o.x,o.y,o.z),e.castShadow=l,e.target.position.set(a.x,a.y,a.z),e.target.castShadow=l,e.target.updateMatrixWorld(),l){const t=e.position.distanceTo(e.target.position);e.shadow.autoUpdate=c,e.shadow.needsUpdate=!c,e.shadow.mapSize.width=h,e.shadow.mapSize.height=h,e.shadow.bias=-.005,e.shadow.focus=.6,e.shadow.camera.far=t,e.shadow.camera.updateProjectionMatrix()}return this.viewport.signals.objectChanged.dispatch(),!0}createPointLight(e){const{id:t,name:n="",color:i=16777215,intensity:s=10,distance:r=5e3,position:o={x:0,y:500,z:0},openShadow:a=!1,shadowAutoUpdate:l=!1,mapSize:c=4096}=e,h=new mt(i,s,r);return h.name=n,h.userData.sid=t,h.userData.stype="Light",h.position.set(o.x,o.y,o.z),h.castShadow=a,a&&(h.shadow.bias=-.005,h.shadow.camera.far=r,h.shadow.autoUpdate=l,h.shadow.needsUpdate=!l,h.shadow.mapSize.width=c,h.shadow.mapSize.height=c,h.shadow.camera.updateProjectionMatrix()),this.viewport.scener.addObject(h,this.scene),h}setPointLight(e,t){const{name:n="",color:i=16777215,intensity:s=10,distance:r=5e3,position:o={x:0,y:500,z:0},openShadow:a=!1,shadowAutoUpdate:l=!1,mapSize:c=4096}=t;return!!e&&(e.name=n,e.color=new u(i),e.intensity=s,e.distance=r,e.position.set(o.x,o.y,o.z),e.castShadow=a,a&&(e.shadow.bias=-.005,e.shadow.camera.far=r,e.shadow.autoUpdate=l,e.shadow.needsUpdate=!l,e.shadow.mapSize.width=c,e.shadow.mapSize.height=c,e.shadow.camera.updateProjectionMatrix()),this.viewport.signals.objectChanged.dispatch(),!0)}createRectAreaLight(e){const{id:t,name:n="",color:i=16777215,intensity:s=10,width:r=10,height:o=10,position:a={x:0,y:0,z:0}}=e,l=new gt(i,s,r,o);return l.name=n,l.userData.sid=t,l.userData.stype="Light",l.position.set(a.x,a.y,a.z),this.viewport.scener.addObject(l,this.scene),l}setRectAreaLight(e,t){const{name:n="",color:i=16777215,intensity:s=10,width:r=10,height:o=10,position:a={x:0,y:0,z:0}}=t;return!!e&&(e.name=n,e.color=new u(i),e.intensity=s,e.width=r,e.height=o,e.position.set(a.x,a.y,a.z),this.viewport.signals.objectChanged.dispatch(),!0)}updateAllShadow(){this.getAll().forEach((e=>{var t;!1===(null===(t=e.shadow)||void 0===t?void 0:t.autoUpdate)&&(e.shadow.needsUpdate=!0)})),this.viewport.signals.objectChanged.dispatch()}dispose(){this.getAll().forEach((e=>{var t;null===(t=e.shadow)||void 0===t||t.dispose()}))}}let xu,Au,bu;class Tu extends vt{constructor(e){super(e)}load(e,t,n,i){const s=this,r=""===s.path?yt.extractUrlBase(e):s.path,o=new p(this.manager);o.setPath(s.path),o.setResponseType("arraybuffer"),o.setRequestHeader(s.requestHeader),o.setWithCredentials(s.withCredentials),o.load(e,(function(n){try{t(s.parse(n,r))}catch(t){i?i(t):console.error(t),s.manager.itemError(e)}}),n,i)}parse(e,t){if(function(e){const t="Kaydara FBX Binary \0";return e.byteLength>=t.length&&t===Nu(e,0,t.length)}(e))xu=(new Mu).parse(e);else{const t=Nu(e);if(!function(e){const t=["K","a","y","d","a","r","a","\\","F","B","X","\\","B","i","n","a","r","y","\\","\\"];let n=0;function i(t){const i=e[t-1];return e=e.slice(n+t),n++,i}for(let e=0;e0,r="string"==typeof s.Content&&""!==s.Content;if(e||r){const e=this.parseImage(n[i]);t[s.RelativeFilename||s.Filename]=e}}}}for(const n in e){const i=e[n];void 0!==t[i]?e[n]=t[i]:e[n]=e[n].split("\\").pop()}return e}parseImage(e){const t=e.Content,n=e.RelativeFilename||e.Filename,i=n.slice(n.lastIndexOf(".")+1).toLowerCase();let s;switch(i){case"bmp":s="image/bmp";break;case"jpg":case"jpeg":s="image/jpeg";break;case"png":s="image/png";break;case"tif":s="image/tiff";break;case"tga":null===this.manager.getHandler(".tga")&&console.warn("FBXLoader: TGA loader not found, skipping ",n),s="image/tga";break;default:return void console.warn('FBXLoader: Image type "'+i+'" is not supported.')}if("string"==typeof t)return"data:"+s+";base64,"+t;{const e=new Uint8Array(t);return window.URL.createObjectURL(new Blob([e],{type:s}))}}parseTextures(e){const t=new Map;if("Texture"in xu.Objects){const n=xu.Objects.Texture;for(const i in n){const s=this.parseTexture(n[i],e);t.set(parseInt(i),s)}}return t}parseTexture(e,t){const n=this.loadTexture(e,t);n.ID=e.id,n.name=e.attrName;const i=e.WrapModeU,s=e.WrapModeV,r=void 0!==i?i.value:0,o=void 0!==s?s.value:0;if(n.wrapS=0===r?q:wt,n.wrapT=0===o?q:wt,"Scaling"in e){const t=e.Scaling.value;n.repeat.x=t[0],n.repeat.y=t[1]}if("Translation"in e){const t=e.Translation.value;n.offset.x=t[0],n.offset.y=t[1]}return n}loadTexture(e,t){let n;const i=this.textureLoader.path,s=Au.get(e.id).children;let r;void 0!==s&&s.length>0&&void 0!==t[s[0].ID]&&(n=t[s[0].ID],0!==n.indexOf("blob:")&&0!==n.indexOf("data:")||this.textureLoader.setPath(void 0));const o=e.FileName.slice(-3).toLowerCase();if("tga"===o){const t=this.manager.getHandler(".tga");null===t?(console.warn("FBXLoader: TGA loader not found, creating placeholder texture for",e.RelativeFilename),r=new d):(t.setPath(this.textureLoader.path),r=t.load(n))}else"psd"===o?(console.warn("FBXLoader: PSD textures are not supported, creating placeholder texture for",e.RelativeFilename),r=new d):r=this.textureLoader.load(n);return this.textureLoader.setPath(i),r}parseMaterials(e){const t=new Map;if("Material"in xu.Objects){const n=xu.Objects.Material;for(const i in n){const s=this.parseMaterial(n[i],e);null!==s&&t.set(parseInt(i),s)}}return t}parseMaterial(e,t){const n=e.id,i=e.attrName;let s=e.ShadingModel;if("object"==typeof s&&(s=s.value),!Au.has(n))return null;const r=this.parseParameters(e,t,n);let o;return s.toLowerCase(),o=new Ae,o.setValues(r),o.name=i,o}parseParameters(e,t,n){const i={};e.BumpFactor&&(i.bumpScale=e.BumpFactor.value),e.Diffuse?i.color=(new u).fromArray(e.Diffuse.value).convertSRGBToLinear():!e.DiffuseColor||"Color"!==e.DiffuseColor.type&&"ColorRGB"!==e.DiffuseColor.type||(i.color=(new u).fromArray(e.DiffuseColor.value).convertSRGBToLinear()),e.DisplacementFactor&&(i.displacementScale=e.DisplacementFactor.value),e.Emissive?i.emissive=(new u).fromArray(e.Emissive.value).convertSRGBToLinear():!e.EmissiveColor||"Color"!==e.EmissiveColor.type&&"ColorRGB"!==e.EmissiveColor.type||(i.emissive=(new u).fromArray(e.EmissiveColor.value).convertSRGBToLinear()),e.EmissiveFactor&&(i.emissiveIntensity=parseFloat(e.EmissiveFactor.value)),e.Opacity&&(i.opacity=parseFloat(e.Opacity.value)),i.opacity<1&&(i.transparent=!0),e.ReflectionFactor,e.Shininess,e.Specular||e.SpecularColor&&e.SpecularColor.type;const s=this;return Au.get(n).children.forEach((function(e){const n=e.relationship;switch(n){case"Bump":i.bumpMap=s.getTexture(t,e.ID);break;case"Maya|TEX_ao_map":i.aoMap=s.getTexture(t,e.ID);break;case"DiffuseColor":case"Maya|TEX_color_map":i.map=s.getTexture(t,e.ID),void 0!==i.map&&(i.map.colorSpace=_);break;case"DisplacementColor":i.displacementMap=s.getTexture(t,e.ID);break;case"EmissiveColor":i.emissiveMap=s.getTexture(t,e.ID),void 0!==i.emissiveMap&&(i.emissiveMap.colorSpace=_);break;case"NormalMap":case"Maya|TEX_normal_map":i.normalMap=s.getTexture(t,e.ID);break;case"ReflectionColor":i.envMap=s.getTexture(t,e.ID),void 0!==i.envMap&&(i.envMap.mapping=c,i.envMap.colorSpace=_);break;case"SpecularColor":i.specularMap=s.getTexture(t,e.ID),void 0!==i.specularMap&&(i.specularMap.colorSpace=_);break;case"TransparentColor":case"TransparencyFactor":i.alphaMap=s.getTexture(t,e.ID),i.transparent=!0;break;default:console.warn("THREE.FBXLoader: %s map is not supported in three.js, skipping texture.",n)}})),i}getTexture(e,t){return"LayeredTexture"in xu.Objects&&t in xu.Objects.LayeredTexture&&(console.warn("THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer."),t=Au.get(t).children[0].ID),e.get(t)}parseDeformers(){const e={},t={};if("Deformer"in xu.Objects){const n=xu.Objects.Deformer;for(const i in n){const s=n[i],r=Au.get(parseInt(i));if("Skin"===s.attrType){const t=this.parseSkeleton(r,n);t.ID=i,r.parents.length>1&&console.warn("THREE.FBXLoader: skeleton attached to more than one geometry is not supported."),t.geometryID=r.parents[0].ID,e[i]=t}else if("BlendShape"===s.attrType){const e={id:i};e.rawTargets=this.parseMorphTargets(r,n),e.id=i,r.parents.length>1&&console.warn("THREE.FBXLoader: morph target attached to more than one geometry is not supported."),t[i]=e}}}return{skeletons:e,morphTargets:t}}parseSkeleton(e,t){const n=[];return e.children.forEach((function(e){const i=t[e.ID];if("Cluster"!==i.attrType)return;const s={ID:e.ID,indices:[],weights:[],transformLink:(new m).fromArray(i.TransformLink.a)};"Indexes"in i&&(s.indices=i.Indexes.a,s.weights=i.Weights.a),n.push(s)})),{rawBones:n,bones:[]}}parseMorphTargets(e,t){const n=[];for(let i=0;i1?r=o:o.length>0?r=o[0]:(r=new Ae({name:vt.DEFAULT_MATERIAL_NAME,color:13421772}),o.push(r)),"color"in s.attributes&&o.forEach((function(e){e.vertexColors=!0})),s.FBX_Deformer?(i=new M(s,r),i.normalizeSkinWeights()):(i=new se(s,r),i.castShadow=!0,i.receiveShadow=!0),i}createCurve(e,t){const n=e.children.reduce((function(e,n){return t.has(n.ID)&&(e=t.get(n.ID)),e}),null),i=new w({name:vt.DEFAULT_MATERIAL_NAME,color:3342591,linewidth:1});return new x(n,i)}getTransformData(e,t){const n={};"InheritType"in t&&(n.inheritType=parseInt(t.InheritType.value)),n.eulerOrder="RotationOrder"in t?ku(t.RotationOrder.value):"ZYX","Lcl_Translation"in t&&(n.translation=t.Lcl_Translation.value),"PreRotation"in t&&(n.preRotation=t.PreRotation.value),"Lcl_Rotation"in t&&(n.rotation=t.Lcl_Rotation.value),"PostRotation"in t&&(n.postRotation=t.PostRotation.value),"Lcl_Scaling"in t&&(n.scale=t.Lcl_Scaling.value),"ScalingOffset"in t&&(n.scalingOffset=t.ScalingOffset.value),"ScalingPivot"in t&&(n.scalingPivot=t.ScalingPivot.value),"RotationOffset"in t&&(n.rotationOffset=t.RotationOffset.value),"RotationPivot"in t&&(n.rotationPivot=t.RotationPivot.value),e.userData.transformData=n}setLookAtProperties(e,n){if("LookAtProperty"in n){Au.get(e.ID).children.forEach((function(n){if("LookAtProperty"===n.relationship){const i=xu.Objects.Model[n.ID];if("Lcl_Translation"in i){const n=i.Lcl_Translation.value;void 0!==e.target?(e.target.position.fromArray(n),bu.add(e.target)):e.lookAt((new t).fromArray(n))}}}))}}bindSkeleton(e,t,n){const i=this.parsePoseNodes();for(const s in e){const r=e[s];Au.get(parseInt(r.ID)).parents.forEach((function(e){if(t.has(e.ID)){const t=e.ID;Au.get(t).parents.forEach((function(e){if(n.has(e.ID)){n.get(e.ID).bind(new P(r.bones),i[e.ID])}}))}}))}}parsePoseNodes(){const e={};if("Pose"in xu.Objects){const t=xu.Objects.Pose;for(const n in t)if("BindPose"===t[n].attrType&&t[n].NbPoseNodes>0){const i=t[n].PoseNode;Array.isArray(i)?i.forEach((function(t){e[t.Node]=(new m).fromArray(t.Matrix.a)})):e[i.Node]=(new m).fromArray(i.Matrix.a)}}return e}createAmbientLight(){if("GlobalSettings"in xu&&"AmbientColor"in xu.GlobalSettings){const e=xu.GlobalSettings.AmbientColor.value,t=e[0],n=e[1],i=e[2];if(0!==t||0!==n||0!==i){const e=new u(t,n,i).convertSRGBToLinear();bu.add(new ut(e,1))}}}}class Du{constructor(){this.negativeMaterialIndices=!1}parse(e){const t=new Map;if("Geometry"in xu.Objects){const n=xu.Objects.Geometry;for(const i in n){const s=Au.get(parseInt(i)),r=this.parseGeometry(s,n[i],e);t.set(parseInt(i),r)}}return!0===this.negativeMaterialIndices&&console.warn("THREE.FBXLoader: The FBX file contains invalid (negative) material indices. The asset might not render as expected."),t}parseGeometry(e,t,n){switch(t.attrType){case"Mesh":return this.parseMeshGeometry(e,t,n);case"NurbsCurve":return this.parseNurbsGeometry(t)}}parseMeshGeometry(e,t,n){const i=n.skeletons,s=[],r=e.parents.map((function(e){return xu.Objects.Model[e.ID]}));if(0===r.length)return;const o=e.children.reduce((function(e,t){return void 0!==i[t.ID]&&(e=i[t.ID]),e}),null);e.children.forEach((function(e){void 0!==n.morphTargets[e.ID]&&s.push(n.morphTargets[e.ID])}));const a=r[0],l={};"RotationOrder"in a&&(l.eulerOrder=ku(a.RotationOrder.value)),"InheritType"in a&&(l.inheritType=parseInt(a.InheritType.value)),"GeometricTranslation"in a&&(l.translation=a.GeometricTranslation.value),"GeometricRotation"in a&&(l.rotation=a.GeometricRotation.value),"GeometricScaling"in a&&(l.scale=a.GeometricScaling.value);const c=zu(l);return this.genGeometry(t,o,s,c)}genGeometry(e,t,n,i){const s=new v;e.attrName&&(s.name=e.attrName);const r=this.parseGeoNode(e,t),o=this.genBuffers(r),a=new y(o.vertex,3);if(a.applyMatrix4(i),s.setAttribute("position",a),o.colors.length>0&&s.setAttribute("color",new y(o.colors,3)),t&&(s.setAttribute("skinIndex",new C(o.weightsIndices,4)),s.setAttribute("skinWeight",new y(o.vertexWeights,4)),s.FBX_Deformer=t),o.normal.length>0){const e=(new ze).getNormalMatrix(i),t=new y(o.normal,3);t.applyNormalMatrix(e),s.setAttribute("normal",t)}if(o.uvs.forEach((function(e,t){const n=0===t?"uv":`uv${t}`;s.setAttribute(n,new y(o.uvs[t],2))})),r.material&&"AllSame"!==r.material.mappingType){let e=o.materialIndex[0],t=0;if(o.materialIndex.forEach((function(n,i){n!==e&&(s.addGroup(t,i-t,e),e=n,t=i)})),s.groups.length>0){const t=s.groups[s.groups.length-1],n=t.start+t.count;n!==o.materialIndex.length&&s.addGroup(n,o.materialIndex.length-n,e)}0===s.groups.length&&s.addGroup(0,o.materialIndex.length,o.materialIndex[0])}return this.addMorphTargets(s,e,n,i),s}parseGeoNode(e,t){const n={};if(n.vertexPositions=void 0!==e.Vertices?e.Vertices.a:[],n.vertexIndices=void 0!==e.PolygonVertexIndex?e.PolygonVertexIndex.a:[],e.LayerElementColor&&(n.color=this.parseVertexColors(e.LayerElementColor[0])),e.LayerElementMaterial&&(n.material=this.parseMaterialIndices(e.LayerElementMaterial[0])),e.LayerElementNormal&&(n.normal=this.parseNormals(e.LayerElementNormal[0])),e.LayerElementUV){n.uv=[];let t=0;for(;e.LayerElementUV[t];)e.LayerElementUV[t].UV&&n.uv.push(this.parseUVs(e.LayerElementUV[t])),t++}return n.weightTable={},null!==t&&(n.skeleton=t,t.rawBones.forEach((function(e,t){e.indices.forEach((function(i,s){void 0===n.weightTable[i]&&(n.weightTable[i]=[]),n.weightTable[i].push({id:t,weight:e.weights[s]})}))}))),n}genBuffers(e){const t={vertex:[],normal:[],colors:[],uvs:[],materialIndex:[],vertexWeights:[],weightsIndices:[]};let n=0,i=0,s=!1,r=[],o=[],a=[],l=[],c=[],h=[];const u=this;return e.vertexIndices.forEach((function(d,p){let f,m=!1;d<0&&(d^=-1,m=!0);let g=[],v=[];if(r.push(3*d,3*d+1,3*d+2),e.color){const t=Ru(p,n,d,e.color);a.push(t[0],t[1],t[2])}if(e.skeleton){if(void 0!==e.weightTable[d]&&e.weightTable[d].forEach((function(e){v.push(e.weight),g.push(e.id)})),v.length>4){s||(console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."),s=!0);const e=[0,0,0,0],t=[0,0,0,0];v.forEach((function(n,i){let s=n,r=g[i];t.forEach((function(t,n,i){if(s>t){i[n]=s,s=t;const o=e[n];e[n]=r,r=o}}))})),g=e,v=t}for(;v.length<4;)v.push(0),g.push(0);for(let e=0;e<4;++e)c.push(v[e]),h.push(g[e])}if(e.normal){const t=Ru(p,n,d,e.normal);o.push(t[0],t[1],t[2])}e.material&&"AllSame"!==e.material.mappingType&&(f=Ru(p,n,d,e.material)[0],f<0&&(u.negativeMaterialIndices=!0,f=0)),e.uv&&e.uv.forEach((function(e,t){const i=Ru(p,n,d,e);void 0===l[t]&&(l[t]=[]),l[t].push(i[0]),l[t].push(i[1])})),i++,m&&(u.genFace(t,e,r,f,o,a,l,c,h,i),n++,i=0,r=[],o=[],a=[],l=[],c=[],h=[])})),t}getNormalNewell(e){const n=new t(0,0,0);for(let t=0;t.5?new t(0,1,0):new t(0,0,1)).cross(n).normalize(),s=n.clone().cross(i).normalize();return{normal:n,tangent:i,bitangent:s}}flattenVertex(e,t,n){return new f(e.dot(t),e.dot(n))}genFace(e,n,i,s,r,o,a,l,c,h){let u;if(h>3){const e=[];for(let s=0;s1&&console.warn("THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.");const r=e.get(s[0].ID);n[i]={name:t[i].attrName,layer:r}}return n}addClip(e){let t=[];const n=this;return e.layer.forEach((function(e){t=t.concat(n.generateTracks(e))})),new O(e.name,-1,t)}generateTracks(e){const n=[];let i=new t,s=new t;if(e.transform&&e.transform.decompose(i,new r,s),i=i.toArray(),s=s.toArray(),void 0!==e.T&&Object.keys(e.T.curves).length>0){const t=this.generateVectorTrack(e.modelName,e.T.curves,i,"position");void 0!==t&&n.push(t)}if(void 0!==e.R&&Object.keys(e.R.curves).length>0){const t=this.generateRotationTrack(e.modelName,e.R.curves,e.preRotation,e.postRotation,e.eulerOrder);void 0!==t&&n.push(t)}if(void 0!==e.S&&Object.keys(e.S.curves).length>0){const t=this.generateVectorTrack(e.modelName,e.S.curves,s,"scale");void 0!==t&&n.push(t)}if(void 0!==e.DeformPercent){const t=this.generateMorphTrack(e);void 0!==t&&n.push(t)}return n}generateVectorTrack(e,t,n,i){const s=this.getTimesForAllAxes(t),r=this.getKeyframeTrackValues(s,t,n);return new B(e+"."+i,s,r)}generateRotationTrack(e,t,i,s,o){let a,l;if(void 0!==t.x&&void 0!==t.y&&void 0!==t.z){const e=this.interpolateRotations(t.x,t.y,t.z,o);a=e[0],l=e[1]}void 0!==i&&((i=i.map(b.degToRad)).push(o),i=(new n).fromArray(i),i=(new r).setFromEuler(i)),void 0!==s&&((s=s.map(b.degToRad)).push(o),s=(new n).fromArray(s),s=(new r).setFromEuler(s).invert());const c=new r,h=new n,u=[];if(!l||!a)return new I(e+".quaternion",[],[]);for(let e=0;e2){(new r).fromArray(u,(e-3)/3*4).dot(c)<0&&c.set(-c.x,-c.y,-c.z,-c.w)}c.toArray(u,e/3*4)}return new I(e+".quaternion",a,u)}generateMorphTrack(e){const t=e.DeformPercent.curves.morph,n=t.values.map((function(e){return e/100})),i=bu.getObjectByName(e.modelName).morphTargetDictionary[e.morphName];return new j(e.modelName+".morphTargetInfluences["+i+"]",t.times,n)}getTimesForAllAxes(e){let t=[];if(void 0!==e.x&&(t=t.concat(e.x.times)),void 0!==e.y&&(t=t.concat(e.y.times)),void 0!==e.z&&(t=t.concat(e.z.times)),t=t.sort((function(e,t){return e-t})),t.length>1){let e=1,n=t[0];for(let i=1;i=180||f[1]>=180||f[2]>=180){const t=Math.max(...f)/180,i=new n(...h,s),c=new n(...d,s),u=(new r).setFromEuler(i),p=(new r).setFromEuler(c);u.dot(p)&&p.set(-p.x,-p.y,-p.z,-p.w);const m=e.times[l-1],g=e.times[l]-m,v=new r,y=new n;for(let e=0;e<1;e+=1/t)v.copy(u.clone().slerp(p.clone(),e)),o.push(m+e*g),y.setFromQuaternion(v,s),a.push(y.x),a.push(y.y),a.push(y.z)}else o.push(e.times[l]),a.push(b.degToRad(e.values[l])),a.push(b.degToRad(t.values[l])),a.push(b.degToRad(i.values[l]))}return[o,a]}}class Cu{getPrevNode(){return this.nodeStack[this.currentIndent-2]}getCurrentNode(){return this.nodeStack[this.currentIndent-1]}getCurrentProp(){return this.currentProp}pushStack(e){this.nodeStack.push(e),this.currentIndent+=1}popStack(){this.nodeStack.pop(),this.currentIndent-=1}setCurrentProp(e,t){this.currentProp=e,this.currentPropName=t}parse(e){this.currentIndent=0,this.allNodes=new Ou,this.nodeStack=[],this.currentProp=[],this.currentPropName="";const t=this,n=e.split(/[\r\n]+/);return n.forEach((function(e,i){const s=e.match(/^[\s\t]*;/),r=e.match(/^[\s\t]*$/);if(s||r)return;const o=e.match("^\\t{"+t.currentIndent+"}(\\w+):(.*){",""),a=e.match("^\\t{"+t.currentIndent+"}(\\w+):[\\s\\t\\r\\n](.*)"),l=e.match("^\\t{"+(t.currentIndent-1)+"}}");o?t.parseNodeBegin(e,o):a?t.parseNodeProperty(e,a,n[++i]):l?t.popStack():e.match(/^[^\s\t}]/)&&t.parseNodePropertyContinued(e)})),this.allNodes}parseNodeBegin(e,t){const n=t[1].trim().replace(/^"/,"").replace(/"$/,""),i=t[2].split(",").map((function(e){return e.trim().replace(/^"/,"").replace(/"$/,"")})),s={name:n},r=this.parseNodeAttr(i),o=this.getCurrentNode();0===this.currentIndent?this.allNodes.add(n,s):n in o?("PoseNode"===n?o.PoseNode.push(s):void 0!==o[n].id&&(o[n]={},o[n][o[n].id]=o[n]),""!==r.id&&(o[n][r.id]=s)):"number"==typeof r.id?(o[n]={},o[n][r.id]=s):"Properties70"!==n&&(o[n]="PoseNode"===n?[s]:s),"number"==typeof r.id&&(s.id=r.id),""!==r.name&&(s.attrName=r.name),""!==r.type&&(s.attrType=r.type),this.pushStack(s)}parseNodeAttr(e){let t=e[0];""!==e[0]&&(t=parseInt(e[0]),isNaN(t)&&(t=e[0]));let n="",i="";return e.length>1&&(n=e[1].replace(/^(\w+)::/,""),i=e[2]),{id:t,name:n,type:i}}parseNodeProperty(e,t,n){let i=t[1].replace(/^"/,"").replace(/"$/,"").trim(),s=t[2].replace(/^"/,"").replace(/"$/,"").trim();"Content"===i&&","===s&&(s=n.replace(/"/g,"").replace(/,$/,"").trim());const r=this.getCurrentNode();if("Properties70"!==r.name){if("C"===i){const e=s.split(",").slice(1),t=parseInt(e[0]),n=parseInt(e[1]);let o=s.split(",").slice(3);o=o.map((function(e){return e.trim().replace(/^"/,"")})),i="connections",s=[t,n],function(e,t){for(let n=0,i=e.length,s=t.length;n=e.size():e.getOffset()+160+16>=e.size()}parseNode(e,t){const n={},i=t>=7500?e.getUint64():e.getUint32(),s=t>=7500?e.getUint64():e.getUint32();t>=7500?e.getUint64():e.getUint32();const r=e.getUint8(),o=e.getString(r);if(0===i)return null;const a=[];for(let t=0;t0?a[0]:"",c=a.length>1?a[1]:"",h=a.length>2?a[2]:"";for(n.singleProperty=1===s&&e.getOffset()===i;i>e.getOffset();){const i=this.parseNode(e,t);null!==i&&this.parseSubNode(o,n,i)}return n.propertyList=a,"number"==typeof l&&(n.id=l),""!==c&&(n.attrName=c),""!==h&&(n.attrType=h),""!==o&&(n.name=o),n}parseSubNode(e,t,n){if(!0===n.singleProperty){const e=n.propertyList[0];Array.isArray(e)?(t[n.name]=n,n.a=e):t[n.name]=e}else if("Connections"===e&&"C"===n.name){const e=[];n.propertyList.forEach((function(t,n){0!==n&&e.push(t)})),void 0===t.connections&&(t.connections=[]),t.connections.push(e)}else if("Properties70"===n.name){Object.keys(n).forEach((function(e){t[e]=n[e]}))}else if("Properties70"===e&&"P"===n.name){let e=n.propertyList[0],i=n.propertyList[1];const s=n.propertyList[2],r=n.propertyList[3];let o;0===e.indexOf("Lcl ")&&(e=e.replace("Lcl ","Lcl_")),0===i.indexOf("Lcl ")&&(i=i.replace("Lcl ","Lcl_")),o="Color"===i||"ColorRGB"===i||"Vector"===i||"Vector3D"===i||0===i.indexOf("Lcl_")?[n.propertyList[4],n.propertyList[5],n.propertyList[6]]:n.propertyList[4],t[e]={type:i,type2:s,flag:r,value:o}}else void 0===t[n.name]?"number"==typeof n.id?(t[n.name]={},t[n.name][n.id]=n):t[n.name]=n:"PoseNode"===n.name?(Array.isArray(t[n.name])||(t[n.name]=[t[n.name]]),t[n.name].push(n)):void 0===t[n.name][n.id]&&(t[n.name][n.id]=n)}parseProperty(e){const t=e.getString(1);let n;switch(t){case"C":return e.getBoolean();case"D":return e.getFloat64();case"F":return e.getFloat32();case"I":return e.getInt32();case"L":return e.getInt64();case"R":return n=e.getUint32(),e.getArrayBuffer(n);case"S":return n=e.getUint32(),e.getString(n);case"Y":return e.getInt16();case"b":case"c":case"d":case"f":case"i":case"l":const i=e.getUint32(),s=e.getUint32(),r=e.getUint32();if(0===s)switch(t){case"b":case"c":return e.getBooleanArray(i);case"d":return e.getFloat64Array(i);case"f":return e.getFloat32Array(i);case"i":return e.getInt32Array(i);case"l":return e.getInt64Array(i)}const o=an.unzlibSync(new Uint8Array(e.getArrayBuffer(r))),a=new Pu(o.buffer);switch(t){case"b":case"c":return a.getBooleanArray(i);case"d":return a.getFloat64Array(i);case"f":return a.getFloat32Array(i);case"i":return a.getInt32Array(i);case"l":return a.getInt64Array(i)}break;default:throw new Error("THREE.FBXLoader: Unknown property type "+t)}}}class Pu{constructor(e,t){this.dv=new DataView(e),this.offset=0,this.littleEndian=void 0===t||t,this._textDecoder=new TextDecoder}getOffset(){return this.offset}size(){return this.dv.buffer.byteLength}skip(e){this.offset+=e}getBoolean(){return 1==(1&this.getUint8())}getBooleanArray(e){const t=[];for(let n=0;n=0&&(n=new Uint8Array(this.dv.buffer,t,i)),this._textDecoder.decode(n)}}class Ou{add(e,t){this[e]=t}}function Bu(e){const t=e.match(/FBXVersion: (\d+)/);if(t){return parseInt(t[1])}throw new Error("THREE.FBXLoader: Cannot find the version number for the file given.")}function Iu(e){return e/46186158e3}const Lu=[];function Ru(e,t,n,i){let s;switch(i.mappingType){case"ByPolygonVertex":s=e;break;case"ByPolygon":s=t;break;case"ByVertice":s=n;break;case"AllSame":s=i.indices[0];break;default:console.warn("THREE.FBXLoader: unknown attribute mapping type "+i.mappingType)}"IndexToDirect"===i.referenceType&&(s=i.indices[s]);const r=s*i.dataSize,o=r+i.dataSize;return function(e,t,n,i){for(let s=n,r=0;s0?t[t.length-1]:"",smooth:void 0!==n?n.smooth:this.smooth,groupStart:void 0!==n?n.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(e){const t={index:"number"==typeof e?e:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return t.clone=this.clone.bind(t),t}};return this.materials.push(i),i},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(e){const t=this.currentMaterial();if(t&&-1===t.groupEnd&&(t.groupEnd=this.geometry.vertices.length/3,t.groupCount=t.groupEnd-t.groupStart,t.inherited=!1),e&&this.materials.length>1)for(let e=this.materials.length-1;e>=0;e--)this.materials[e].groupCount<=0&&this.materials.splice(e,1);return e&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),t}},n&&n.name&&"function"==typeof n.clone){const e=n.clone(0);e.inherited=!0,this.object.materials.push(e)}this.objects.push(this.object)},finalize:function(){this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0)},parseVertexIndex:function(e,t){const n=parseInt(e,10);return 3*(n>=0?n-1:n+t/3)},parseNormalIndex:function(e,t){const n=parseInt(e,10);return 3*(n>=0?n-1:n+t/3)},parseUVIndex:function(e,t){const n=parseInt(e,10);return 2*(n>=0?n-1:n+t/2)},addVertex:function(e,t,n){const i=this.vertices,s=this.object.geometry.vertices;s.push(i[e+0],i[e+1],i[e+2]),s.push(i[t+0],i[t+1],i[t+2]),s.push(i[n+0],i[n+1],i[n+2])},addVertexPoint:function(e){const t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addVertexLine:function(e){const t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addNormal:function(e,t,n){const i=this.normals,s=this.object.geometry.normals;s.push(i[e+0],i[e+1],i[e+2]),s.push(i[t+0],i[t+1],i[t+2]),s.push(i[n+0],i[n+1],i[n+2])},addFaceNormal:function(e,t,n){const i=this.vertices,s=this.object.geometry.normals;Wu.fromArray(i,e),Yu.fromArray(i,t),Ku.fromArray(i,n),Zu.subVectors(Ku,Yu),Xu.subVectors(Wu,Yu),Zu.cross(Xu),Zu.normalize(),s.push(Zu.x,Zu.y,Zu.z),s.push(Zu.x,Zu.y,Zu.z),s.push(Zu.x,Zu.y,Zu.z)},addColor:function(e,t,n){const i=this.colors,s=this.object.geometry.colors;void 0!==i[e]&&s.push(i[e+0],i[e+1],i[e+2]),void 0!==i[t]&&s.push(i[t+0],i[t+1],i[t+2]),void 0!==i[n]&&s.push(i[n+0],i[n+1],i[n+2])},addUV:function(e,t,n){const i=this.uvs,s=this.object.geometry.uvs;s.push(i[e+0],i[e+1]),s.push(i[t+0],i[t+1]),s.push(i[n+0],i[n+1])},addDefaultUV:function(){const e=this.object.geometry.uvs;e.push(0,0),e.push(0,0),e.push(0,0)},addUVLine:function(e){const t=this.uvs;this.object.geometry.uvs.push(t[e+0],t[e+1])},addFace:function(e,t,n,i,s,r,o,a,l){const c=this.vertices.length;let h=this.parseVertexIndex(e,c),u=this.parseVertexIndex(t,c),d=this.parseVertexIndex(n,c);if(this.addVertex(h,u,d),this.addColor(h,u,d),void 0!==o&&""!==o){const e=this.normals.length;h=this.parseNormalIndex(o,e),u=this.parseNormalIndex(a,e),d=this.parseNormalIndex(l,e),this.addNormal(h,u,d)}else this.addFaceNormal(h,u,d);if(void 0!==i&&""!==i){const e=this.uvs.length;h=this.parseUVIndex(i,e),u=this.parseUVIndex(s,e),d=this.parseUVIndex(r,e),this.addUV(h,u,d),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(e){this.object.geometry.type="Points";const t=this.vertices.length;for(let n=0,i=e.length;n=7?(qu.setRGB(parseFloat(e[4]),parseFloat(e[5]),parseFloat(e[6])).convertSRGBToLinear(),t.colors.push(qu.r,qu.g,qu.b)):t.colors.push(void 0,void 0,void 0);break;case"vn":t.normals.push(parseFloat(e[1]),parseFloat(e[2]),parseFloat(e[3]));break;case"vt":t.uvs.push(parseFloat(e[1]),parseFloat(e[2]))}}else if("f"===r){const e=s.slice(1).trim().split(Qu),n=[];for(let t=0,i=e.length;t0){const e=i.split("/");n.push(e)}}const i=n[0];for(let e=1,s=n.length-1;e1){const e=i[1].trim().toLowerCase();t.object.smooth="0"!==e&&"off"!==e}else t.object.smooth=!0;const e=t.object.currentMaterial();e&&(e.smooth=t.object.smooth)}else{if("\0"===s)continue;console.warn('THREE.OBJLoader: Unexpected line: "'+s+'"')}}t.finalize();const s=new lt;s.materialLibraries=[].concat(t.materialLibraries);if(!0===!(1===t.objects.length&&0===t.objects[0].geometry.vertices.length))for(let e=0,n=t.objects.length;e0&&c.setAttribute("normal",new y(i.normals,3)),i.colors.length>0&&(l=!0,c.setAttribute("color",new y(i.colors,3))),!0===i.hasUVIndices&&c.setAttribute("uv",new y(i.uvs,2));const h=[];for(let e=0,n=r.length;e1){for(let e=0,t=r.length;e0){const e=new bt({size:1,sizeAttenuation:!1}),n=new v;n.setAttribute("position",new y(t.vertices,3)),t.colors.length>0&&void 0!==t.colors[0]&&(n.setAttribute("color",new y(t.colors,3)),e.vertexColors=!0);const i=new Tt(n,e);s.add(i)}return s}}const ed=new Map,td=e=>{var t;return null!==(t=null==e?void 0:e.toLowerCase().endsWith(".png"))&&void 0!==t&&t},nd=new TextDecoder,id=(e,t,n)=>{const i=e.buffer.slice(n,n+t);return nd.decode(i).replace("\\","/")},sd=/^\w+:\/\//;const rd=(e,t)=>{let n=t;const i=t.lastIndexOf("/");-1!==i&&(n=t.substring(i+1));let s=[];const r="http://guo.bin.yong",o=!sd.test(e);let a;if(o){s=function(e){let t=e.match(/(^[./]*)\/(.*)$/);return t?t.shift():t=[e],t}(e);const t=s.pop();a=new URL(t,r)}else a=new URL(e);const l=a.searchParams;let c=l.get("path"),h="";if(c){if(c.includes(".sbm")){const e=c.lastIndexOf("/");-1!==e&&(c=c.substring(0,e))}c+=`/Maps/${n}`,l.set("path",c),h=a.href}else{const e=a.href;h=new URL(`./Maps/${n}`,e).href}return o&&(h=h.substring(20)),h=h.replaceAll("#","%23"),h.length>0&&s.push(h),h=s.join("/"),h},od=(e,t)=>{if(ed.has(t)){const n=ed.get(t);e.map=n,e.needsUpdate=!0,Pl.needsUpdate=!0}const n=new d;n.colorSpace=_,n.wrapS=q,n.wrapT=q,n.flipY=!1,n.anisotropy=16,n.mipmaps=[],n.generateMipmaps=!0,(new St).load(t,(i=>{n.image=i,n.needsUpdate=!0,ed.set(t,n),e.map=n,e.needsUpdate=!0,Pl.needsUpdate=!0}))},ad=(e,t,n)=>{const[i,s,r,o,a]=t,l=n||o<1;return new Ae({name:e,color:new u(i,s,r),opacity:o,transparent:l,alphaTest:.01,side:a})},ld=new TextDecoder,cd=new TextEncoder;function hd(e){let t=8;const n=new Uint8Array(e,0,t);if("SBK-----"!==ld.decode(n))return e;t+=130;const i=new Uint8Array(e,0,t);if(1===i[40]){const n=cd.encode("SBM-----"),s=new Uint8Array([i[41]]),r=function(e){const t=new Uint8Array(64);return t.set(e.slice(0,8),0),t.set(e.slice(24,32),8),t.set(e.slice(40,56),16),t.set(e.slice(64,88),32),t.set(e.slice(96,104),56),t}(function(e){const t=new Uint8Array(128);return t.set(e.slice(42,74),0),t.set(e.slice(74,138),32),t.set(e.slice(8,40),96),t}(i));let o=66%r.length;const a=new Uint8Array(e,t+66),l=new Uint8Array(a.length);for(let e=0;e0?id(e,l,n):"";if(n+=l,!this.materials.has(t)){const e=[i,s,r,o,a],n=ad(t,e,td(c));if(this.materials.set(t,n),h[t].materialInfo=e,c){const{url:e}=this.sbmInfo,i=rd(e,c);h[t].textureUrl=i,od(n,i)}}}const u={};for(let o=0;o0)for(let i=0;i0)for(let e=0;e0)for(let t=0;t0)for(let t=0;t0&&p.push([h[r[0]],h[r[1]],h[r[2]]])}const A=[],b=[];for(let e=0;e0&&D.setAttribute("position",new g(T,3)),S.length>0&&D.setAttribute("uv",new g(S,2)),D.computeVertexNormals();const E=D.getAttribute("normal").array.buffer;if(u[o].normal=E,this.materials.has(l)){const e=new se(D,this.materials.get(l));e.name=o,e.castShadow=!0,e.receiveShadow=!0,a.add(e)}r.loaded++,r.timeStamp=performance.now()-s,null==i||i(r)}const d={materialsCache:h,meshsCache:u};return Promise.resolve({model:o,caches:d})}_parseV3(e,n,i){const s=performance.now(),r={total:0,loaded:0,timeStamp:0};if(!this.sbmInfo)return Promise.reject("In soonspacejs: sbm 模型资源解析时 'sbmInfo' 缺失!");const o=new Nl(Object.assign(Object.assign({},this.sbmInfo),{format:ui.sbm})),a=new zl({id:os()});o.add(a);const l=e.getUint16(n,this.isLE);n+=2;const c=e.getUint16(n,this.isLE);n+=2,r.total=c;const h={};for(let t=0;t0?id(e,l,n):"";if(n+=l,!this.materials.has(t)){const e=[i,s,r,o,a],n=ad(t,e,td(c));if(this.materials.set(t,n),h[t].materialInfo=e,c){const{url:e}=this.sbmInfo,i=rd(e,c);h[t].textureUrl=i,od(n,i)}}}const u={};for(let o=0;o0){const t=new Uint8Array(e.buffer,n,l);c=ud.decode(t),n+=l}const h=e.getUint16(n,this.isLE).toString();n+=2,u[o]={meshName:c,materialId:h,position:new ArrayBuffer(0),uv:new ArrayBuffer(0)};const d=[],p=[],m=[],y=[],w=e.getUint32(n,this.isLE);if(n+=4,w>0)for(let i=0;i0)for(let i=0;i0)for(let t=0;t0)for(let t=0;t0&&y.push([p[r[0]],p[r[1]],p[r[2]]])}const T=[],S=[];for(let e=0;e0&&C.setAttribute("position",new g(D,3)),E.length>0&&C.setAttribute("uv",new g(E,2)),C.computeVertexNormals();const M=C.getAttribute("normal").array.buffer;if(u[o].normal=M,this.materials.has(h)){const e=new se(C,this.materials.get(h));e.name=c||o,e.castShadow=!0,e.receiveShadow=!0,a.add(e)}r.loaded++,r.timeStamp=performance.now()-s,null==i||i(r)}const d={materialsCache:h,meshsCache:u};return Promise.resolve({model:o,caches:d})}}const pd=new TextDecoder;class fd{parseBuffer(e,t){switch(pd.decode(e.slice(0,8))){case"SBK-----":case"SBM-----":return(new dd).parseBuffer(e,t);default:return Promise.reject(`In soonspacejs: sbm 资源模型(${t.url})格式或数据错误!`)}}}class md{constructor(){this.materials=new Map}parseObject(e,t){const n=new Nl(Object.assign(Object.assign({},t),{format:ui.sbm})),i=new zl({id:os()});n.add(i);const{materialsCache:s,meshsCache:r}=e;for(const[e,t]of Object.entries(s)){if(this.materials.has(e))continue;const{textureUrl:n,materialInfo:i}=t,s=ad(e,i,td(n));this.materials.set(e,s),n&&od(s,n)}for(const[e,t]of Object.entries(r)){const{meshName:n,materialId:s,position:r,uv:o,normal:a}=t,l=this.materials.get(s.toString());if(l){const t=new v,s=new Float32Array(r),c=new Float32Array(o),h=a&&new Float32Array(a);s.length>0&&t.setAttribute("position",new g(s,3)),c.length>0&&t.setAttribute("uv",new g(c,2)),h&&h.length>0?t.setAttribute("normal",new g(h,3)):t.computeVertexNormals();const u=new se(t,l);u.name=n||e,u.castShadow=!0,u.receiveShadow=!0,i.add(u)}}return n}}class gd extends yu{constructor(e,t){super(hi.Model,e,t.classified.Model),this.viewport=e,this.cache=t,this.isDisposed=!1,this.modelsPromiseMap=new Map,this.modelsMap=new Map,this._dbReady=!1,this.store=oa.createInstance({name:"soonspace",storeName:"modelData"}),this.cacheStore=oa.createInstance({name:"soonspace",storeName:"modelCache"}),this.loadingManager=new J,this.gltfLoader=new $t(this.loadingManager),this.fbxLoader=new Tu(this.loadingManager),this.objLoader=new $u(this.loadingManager),this.stlLoader=new en(this.loadingManager),this.gltfLoader.setMeshoptDecoder(rn),this._initLoadingManager(this.loadingManager)}setDracoDecoderPath(e){const t=(new nn).setDecoderPath(e);this.gltfLoader.setDRACOLoader(t)}setKtx2DecoderPath(e){const t=(new sn).setTranscoderPath(e).detectSupport(this.viewport.renderer).setWorkerLimit(2);this.gltfLoader.setKTX2Loader(t)}async load(e,t){const{url:n}=e,i=this.modelsPromiseMap.get(n);if(i){if(await i,this.isDisposed)return this.dispose(),null;const s=this.modelsMap.get(n);return s?this.clone(s,e,t):null}const s=this._innerLoad(e,t);return this.modelsPromiseMap.set(n,s),s}async parse(e){var t;const{url:n,id:i,format:s}=e;if(!n)return mi(`id: ${i} url: ${n} is empty`),null;await this._checkDbReady();switch(null===(t=null!=s?s:as(n))||void 0===t?void 0:t.toLocaleUpperCase()){case"SBM":return this._parseSbm(e);case"SBMX":return this._parseSbmx(e);case"GLB":case"GLTF":return this._parseGltf(e);case"FBX":return this._parseFbx(e);case"OBJ":return this._parseObj(e);case"STL":return this._parseStl(e);default:return gi(`模型资源( id: ${i}, url: ${n} )格式错误,当前格式支持 sbm、sbmx、fbx、gltf、glb !`),null}}clone(e,t,n){return new Promise(((i,s)=>{var r;"Model"!==e.stype&&s("In soonspacejs: 方法 cloneModel 参入对象类型错误!");const{id:o,name:a,level:l,visible:c,position:h,rotation:u,scale:d,onClick:p,onDblClick:f,onRightClick:m,onLoad:g,userData:v}=t,y=on.clone(e);y.animations=y.animations.map((e=>e.clone())),o&&(y.sid=o),a&&(y.name=a),l&&(y.level=l),!1===c?y.hide():!0===c&&y.show(),h&&y.position.set(h.x,h.y,h.z),u&&y.rotation.set(u.x,u.y,u.z),d&&y.scale.set(d.x,d.y,d.z),y.onClick=p?p.bind(y):null,y.onDblClick=f?f.bind(y):null,y.onRightClick=m?m.bind(y):null,y.onLoad=g?g.bind(y):null,null===(r=y.onLoad)||void 0===r||r.call(y,y),v&&(y.userData=v),null!==n&&this.viewport.scener.addObject(y,n||this.scene||e.parent),i(y)}))}async loadToGroup(e,t){const n=this.createGroup(e,null);return await Promise.allSettled(t.map((e=>this.load(e,null).then((e=>e&&n.add(e))).catch(console.error)))),this.viewport.scener.addObject(n,this.scene),n}async addForGroup(e,t){return e&&await Promise.allSettled(t.map((async t=>this.load(t,null).then((t=>t&&this.viewport.scener.addObject(t,e))).catch(console.error)))),e}async clearIdb(){await this._checkDbReady(),await this.store.clear(),await this.cacheStore.clear()}dispose(){var e,t;this.isDisposed=!0,this.modelsPromiseMap.clear(),this.modelsMap.clear(),null===(e=this.gltfLoader.dracoLoader)||void 0===e||e.dispose(),null===(t=this.gltfLoader.ktx2Loader)||void 0===t||t.dispose()}async _checkDbReady(){this._dbReady||(await Promise.all([this.store.ready(),this.cacheStore.ready()]),this._dbReady=!0)}_initLoadingManager(e){e.addHandler(/\.tga$/i,new tn)}_setModelsMap(e,t){this.modelsMap.has(e)||this.modelsMap.set(e,on.clone(t))}async _parseSbm(e){const{useIndexedDB:t}=this.viewport.options,{url:n}=e,i=async t=>{const i=await(new fd).parseBuffer(t,e),{model:s,caches:r}=i;return r&&Wi((()=>{this.cacheStore.setItem(n,r)})),s},s=e=>{var t;null===(t=e.onLoad)||void 0===t||t.call(e,e)};if(t){const t=await this.cacheStore.getItem(n);if(t){const n=(new md).parseObject(t,e);return s(n),n}{const e=await this.store.getItem(n)||await this._fetchBuffer(n),t=await i(e);return s(t),t}}{const e=await this._fetchBuffer(n),t=await i(e);return s(t),t}}async _parseSbmx(e){const{url:t}=e,n=await this._getBuffer(t);if("SBMG----"===rs(n.slice(0,8))){const t=Xi(n.slice(8));return this._parseGltf(e,t)}return this._parseGltf(e,n)}async _parseGltf(e,t){const{url:n}=e,i=Ri(n),s=t||await this._getBuffer(n),r=new Nl(Object.assign(Object.assign({},e),{format:ui.gltf}));try{const e=await this.gltfLoader.parseAsync(s,i),{animations:t}=e;t&&t.length>0&&(r.animations=t),e.scene.traverse((e=>{"AmbientLight"!==e.type&&"DirectionalLight"!==e.type||(e.visible=!1),e instanceof Dt&&(e.frustumCulled=!0),e.castShadow=!0,e.receiveShadow=!0})),r.add(e.scene)}catch(e){if(e.message.includes("No DRACOLoader"))throw new Error(`${di}请使用 setModelDracoDecoderPath 设置 draco 解压库路径`);if(e.message.includes("setKTX2Loader"))throw new Error(`${di}请使用 setModelKtx2DecoderPath 设置 ktx2 解压库路径`);throw new Error(e)}return r}async _parseFbx(e){const{url:t}=e,n=Ri(t),i=await this._getBuffer(t);if("ssp"===rs(Xi(i.slice(0,3)))){const t=Xi(i.slice(3));return this._parseGltf(e,t)}const s=new Nl(Object.assign(Object.assign({},e),{format:ui.fbx})),r=this.fbxLoader.parse(i,n),{animations:o}=r;return o&&o.length>0&&(s.animations=o),s.add(r),s}async _parseObj(e){const{url:t}=e,n=await this._getBuffer(t),i=await new Blob([n]).text(),s=new Nl(Object.assign(Object.assign({},e),{format:ui.obj})),r=this.objLoader.parse(i);return s.add(r),s}async _parseStl(e){const{url:t}=e,n=await this._getBuffer(t),i=new Nl(Object.assign(Object.assign({},e),{format:ui.stl})),s=this.stlLoader.parse(n),r=new zl({id:os()}),o=new se(s,new Ae);return r.add(o),i.add(r),i}async _innerLoad(e,t){var n;const{url:i}=e,s=await this.parse(e);return s?(null===(n=s.onLoad)||void 0===n||n.call(s,s),this._setModelsMap(i,s),null!==t&&this.viewport.scener.addObject(s,t),s):null}async _fetchBuffer(e){const{useIndexedDB:t}=this.viewport.options,n=await Ni(e,"arraybuffer");return t&&this.store.setItem(e,n),n}async _getBuffer(e){const{useIndexedDB:t}=this.viewport.options;if(t){const t=await this.store.getItem(e);return t||this._fetchBuffer(e)}return this._fetchBuffer(e)}}const vd=new rt(1,1);class yd extends yu{constructor(e,t){super(hi.Poi,e,t.classified.Poi),this.viewport=e,this.cache=t,this.textures=new Map}_createIcon(e){const t=this._createIconMaterial(e),n={scale:e.iconScale};let i;return wd(e.type)?(i=new se,i.renderOrder=1,i.geometry=vd,i.material=t,e.iconScale&&i.scale.set(e.iconScale.x,e.iconScale.y,e.iconScale.z)):(i=new Vl(t,n),this._computeMaterialSizeAttenuation(t,e.type)),i.name="icon",i}_createIconMaterial({url:e,type:t}){if(!e)return;let n=this.textures.get(e);if(n||(n=(new h).load(e,(t=>{this.textures.set(e,t),Pl.needsUpdate=!0})),n.colorSpace=_,n.flipY=!0),wd(t)){return new We({map:n,transparent:!0,depthWrite:!1,side:oe})}return new Ke({map:n,depthWrite:!1})}_createText(e){const t=this._createTextMaterial(e),n={position:e.namePosition,scale:e.nameScale};let i;return wd(e.type)?(i=new se,i.renderOrder=1,i.geometry=vd,i.material=t,e.namePosition&&i.position.set(e.namePosition.x,e.namePosition.y,e.namePosition.z),e.nameScale&&i.scale.set(e.nameScale.x,e.nameScale.y,e.nameScale.z)):(i=new Vl(t,n),this._computeMaterialSizeAttenuation(t,e.type)),i.name="text",i}_createTextMaterial(e){const t=this._createTextTexture(e);if(wd(e.type)){return new We({map:t,transparent:!0,depthWrite:!1,side:oe})}return new Ke({map:t,depthWrite:!1})}_createTextTexture(e){const t=this._createTextCanvas(e.name||"",e.nameCanvasInfo),n=new Ye(t);return n.colorSpace=_,n}_createTextCanvas(e,t={}){const{canvasWidth:n=256,canvasHeight:i=256,font:s="32px Microsoft YaHei",fillStyle:r="#fff",strokeStyle:o="#000",textAlign:a="center",textBaseline:l="middle",backgroundStyle:c,borderStyle:h,borderWidth:u=3}=t,d=document.createElement("canvas");d.width=n,d.height=i;const p=d.getContext("2d"),f=.5*n,m=.5*i;return p&&(c&&(p.fillStyle=c,p.fillRect(0,0,n,i)),h&&(p.strokeStyle=h,p.lineWidth=u,p.strokeRect(0,0,n,i),p.lineWidth=1),p.font=s,p.fillStyle=r,p.strokeStyle=o,p.textAlign=a,p.textBaseline=l,p.strokeText(e,f,m,n),p.fillText(e,f,m,n)),d}_computeMaterialSizeAttenuation(e,t){return"2D"===t||"2d"===t?e.sizeAttenuation=!1:"2.5D"!==t&&"2.5d"!==t||(e.sizeAttenuation=!0),e}_create(e){e=Object.assign({type:"2.5d",namePosition:{x:0,y:10,z:0},nameScale:{x:16,y:16,z:1},iconScale:{x:16,y:16,z:1}},e);const t=new Gl(e),n=this._createText(e);if(t.text=n,t.add(n),e.url){const n=this._createIcon(e);t.icon=n,t.add(n)}return t}create(e){const t=this._create(e);return this.viewport.scener.addObject(t,this.scene),t}clone(e,t,n){var i,s,r;"Poi"!==e.stype&&console.error("In soonspacejs: 方法 clonePoi 参入对象类型错误!");const{id:o,name:a,level:l,namePosition:c,nameScale:h,iconScale:u,scaleFixed:d,visible:p,position:f,rotation:m,scale:g,onClick:v,onDblClick:y,onRightClick:w,userData:x}=t,A=e.clone();if(a!==A.name&&A.text){const e=A.text.material.clone();e.map=this._createTextTexture(t),A.text.material=e}return c&&(null===(i=A.text)||void 0===i||i.position.set(c.x,c.y,c.z)),h&&(null===(s=A.text)||void 0===s||s.scale.set(h.x,h.y,h.z)),u&&(null===(r=A.icon)||void 0===r||r.scale.set(u.x,u.y,u.z)),o&&(A.sid=o),a&&(A.name=a),l&&(A.level=l),d&&(A.scaleFixed=d),$i(p)&&(A.visible=p),f&&A.position.set(f.x,f.y,f.z),m&&A.rotation.set(m.x,m.y,m.z),g&&A.scale.set(g.x,g.y,g.z),A.onClick=v?v.bind(A):null,A.onDblClick=y?y.bind(A):null,A.onRightClick=w?w.bind(A):null,x&&(A.userData=x),null!==n&&this.viewport.scener.addObject(A,n||this.scene||e.parent),A}createToGroup(e,t){const n=this.createGroup(e,null);return t.forEach((e=>{const t=this._create(e);n.add(t)})),this.viewport.scener.addObject(n,this.scene),n}addForGroup(e,t){return e&&t.forEach((t=>{const n=this._create(t);this.viewport.scener.addObject(n,e)})),e}}function wd(e){return"3D"===e||"3d"===e}class xd extends yu{constructor(e,t){super(hi.PoiNode,e,t.classified.PoiNode),this.viewport=e,this.cache=t}create(e){this._openEnableRenderCss(e);const t=new jl(e);return this.viewport.scener.addObject(t,this.scene),t}createToGroup(e,t){const n=this.createGroup(e,null);return t.forEach((e=>{this._openEnableRenderCss(e);const t=new jl(e);n.add(t)})),this.viewport.scener.addObject(n,this.scene),n}addForGroup(e,t){return e&&t.forEach((t=>{this._openEnableRenderCss(t);const n=new jl(t);this.viewport.scener.addObject(n,e)})),e}_openEnableRenderCss(e){switch(e.type){case"2d":case"2D":this.viewport.rendererManager.setInternalState("enableRenderCss2D",!0);break;case"2.5d":case"2.5D":case"3d":case"3D":this.viewport.rendererManager.setInternalState("enableRenderCss3D",!0)}}}class Ad extends yu{constructor(e,t){super(hi.Canvas3D,e,t.classified.Canvas3D),this.viewport=e,this.cache=t}create(e,t){const n=new $l(e);return null!==t&&this.viewport.scener.addObject(n,t),n}createToGroup(e,t){const n=this.createGroup(e,null);return t.forEach((e=>{const t=new $l(e);n.add(t)})),this.viewport.scener.addObject(n,this.scene),n}addForGroup(e,t){return e&&t.forEach((t=>{const n=new $l(t);this.viewport.scener.addObject(n,e)})),e}}let bd=class Dijkstras{constructor(){this.graph=new Map,this.queue=null,this.previous=new Map}setGraph(e){if(!(e.length<1))for(const t of e){const[e,n]=t;this.graph.set(e,new Map);for(const t of n){const[n,i]=t,s=this.graph.get(e);null==s||s.set(n,i)}}}getPath(e,t){var n;if(e===t)return[];const i=this.queue=new Bi;i.add(e,0),this.previous.set(e,null);let s=null;for(;s=i.shift();){if(s===t){const e=[];for(;null!==s&&null!==this.previous.get(s);)e.unshift(s),s=null!==(n=this.previous.get(s))&&void 0!==n?n:null;return e}const e=i.getDistance(s);if(e===1/0)return[];const r=this.graph.get(s);r&&r.forEach(((t,n)=>{const r=i.getDistance(n),o=e+t;o{if(!this.workerSourceURL){const e=Td.toString(),t=["/* deps */",Bi.toString(),bd.toString(),"/* worker */",e.substring(e.indexOf("{")+1,e.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([t]))}return new Worker(this.workerSourceURL)}))}async getPath(e,t){await this.workerPool.postMessage({type:"setGraph",graph:this.dijkstra.graph});const{data:{pathIds:n}}=await this.workerPool.postMessage({type:"getPath",st:[e,t]});return n}dispose(){this.workerPool.dispose(),this.workerSourceURL&&URL.revokeObjectURL(this.workerSourceURL)}}class Dd extends yu{constructor(e,t){super(hi.Topology,e,t.classified.Topology),this.viewport=e,this.cache=t,this.dijkstra=new bd,this.dijkstraWorker=new Sd(this.dijkstra)}async createFromGml(e){const{url:t,linkWidth:n=20,linkColor:i=65280,renderNode:s=!0,nodeColor:r=255}=e;return Ki(t).then((t=>{if(!t||!t.MultiLayeredGraph)return Promise.reject('In soonspace: createTopologyFromGml "url" path error!');const o=[],a=new Map;let l=[],c=[];const h=t.MultiLayeredGraph.SpaceLayerMember.SpaceLayer.X_floor;ts(h)?h.forEach((e=>{l=[...l,...e.state],c=[...c,...e.transition]})):(l=[...l,...h.state],c=[...c,...h.transition]),l.forEach(((e,t)=>{const n=e.State._attributes["gml:id"],i=e.State.topoNode["gml:Node"].node_name;o.push({id:Ji(n)?n:"",name:Ji(i)?i:"",position:{x:Number(e.State.topoNode["gml:Node"].xcoord["#text"]),y:Number(e.State.topoNode["gml:Node"].zcoord["#text"]),z:-1*Number(e.State.topoNode["gml:Node"].ycoord["#text"])},graphs:[]}),a.set(n,t)})),c.forEach((e=>{const t=e.Transition.topoEdge["gml:Edge"]["gml:directedNode"][0]._attributes["xlink:href"],n=e.Transition.topoEdge["gml:Edge"]["gml:directedNode"][1]._attributes["xlink:href"],i=e.Transition.topoEdge["gml:Edge"].passable["#text"],s=a.get(t),r=a.get(n),l=e.Transition._attributes["gml:id"],c=e.Transition.topoEdge["gml:Edge"].link_name["#text"];void 0!==s&&void 0!==r&&("2"!==i&&"3"!==i&&o[s].graphs.push({targetNodeId:n,linkInfo:{id:l,name:c},passable:+i}),"1"!==i&&"3"!==i&&o[r].graphs.push({targetNodeId:t,linkInfo:{id:l,name:c},passable:+i}))}));const u=new Xl(Object.assign(Object.assign({},e),{type:"network",nodes:o,linkWidth:n,renderLink:!0,linkColor:i,renderNode:s,nodeColor:r}));return this.setDijkstraGraph(u.nodes),this.viewport.scener.addObject(u,this.scene),Promise.resolve(u)}))}create(e){const t=this.generateLineTopologyInfoNodeGraphs(e),n=new Xl(t);return this.setDijkstraGraph(n.nodes),this.viewport.scener.addObject(n,this.scene),n}setPassable(e,t){if("line"===e.topologyType)return void gi("只支持 network 类型");const n=Fi(e.info.nodes),i=n.reduce(((e,t)=>(e.set(t.id,t),e)),new Map),s=e.nodes.reduce(((e,t)=>(e.set(t.sid,t),e)),new Map);t.forEach((({sourceNodeId:e,targetNodeId:t,passable:n})=>{const s=i.get(e),r=i.get(t);if(!s||!r)return void mi(`sourceNodeId:${e} 或 targetNodeId:${t} 未找到对应节点`);const o=s.graphs.findIndex((e=>e.targetNodeId===r.id)),a=r.graphs.findIndex((e=>e.targetNodeId===s.id));switch(n){case 0:-1===o?s.graphs.push({targetNodeId:r.id,linkInfo:{id:os()},passable:n}):s.graphs[o].passable=n,-1===a?r.graphs.push({targetNodeId:s.id,linkInfo:{id:os()},passable:n}):r.graphs[a].passable=n;break;case 1:-1===o?s.graphs.push({targetNodeId:r.id,linkInfo:{id:os()},passable:n}):s.graphs[o].passable=n,-1!==a&&r.graphs.splice(a,1);break;case 2:-1!==o&&s.graphs.splice(o,1),-1===a?r.graphs.push({targetNodeId:s.id,linkInfo:{id:os()},passable:n}):r.graphs[a].passable=n;break;case 3:-1!==o&&s.graphs.splice(o,1),-1!==a&&r.graphs.splice(a,1)}})),e.info.nodes=n,n.forEach((e=>{const t=s.get(e.id);t&&(t.graphs=e.graphs)})),e.updateLinks(),this.setDijkstraGraph(e.nodes),this.viewport.signals.objectChanged.dispatch()}resetNodes(e,t){const n=this.generateLineTopologyInfoNodeGraphs(Object.assign(Object.assign({},e.info),{nodes:t}));return e.resetNodes(n.nodes),this.setDijkstraGraph(e.nodes),this.viewport.signals.objectChanged.dispatch(),e}createToGroup(e,t){const n=this.createGroup(e,null);return t.forEach((e=>{const t=this.generateLineTopologyInfoNodeGraphs(e),i=new Xl(t);this.setDijkstraGraph(i.nodes),n.add(i)})),this.viewport.scener.addObject(n,this.scene),n}addForGroup(e,t){return e&&t.forEach((t=>{const n=this.generateLineTopologyInfoNodeGraphs(t),i=new Xl(n);this.setDijkstraGraph(i.nodes),e.add(i)})),e}_getPath(e,n){const i=vi(n.start),s=vi(n.end);let r=null,o=1/0,a=null,l=1/0;const c=e.nodes.reduce(((e,t)=>(e.set(t.sid,t),e)),new Map);for(const[,e]of c){if(0===e.graphs.length)continue;const n=e.getWorldPosition(new t),c=n.distanceTo(i),h=n.distanceTo(s);c(e.set(t.sid,t),e)),new Map);for(const[,e]of c){if(0===e.graphs.length)continue;const n=e.getWorldPosition(new t),c=n.distanceTo(i),h=n.distanceTo(s);c{const t=e.position.clone();return t.y+=.01,{id:`${e.sid}_${os()}`,name:e.name,position:t,graphs:e.graphs}}))}getShortestPath(e,t){const n=this._getPath(e,{start:t.start,end:t.end});if(null===n||n.length<=1)return null;const i=this._generateNodesInfo(n),s=Object.assign(Object.assign(Object.assign(Object.assign({},e.info),e.getSpaceAttribute(!0)),t),{type:"line",nodes:i});this.generateLineTopologyInfoNodeGraphs(s);const r=new Xl(s);return this.viewport.scener.addObject(r,this.scene),r}async getShortestPathAsync(e,t){const n=await this._getPathAsync(e,{start:t.start,end:t.end});if(null===n||n.length<=1)return null;const i=this._generateNodesInfo(n),s=Object.assign(Object.assign(Object.assign(Object.assign({},e.info),e.getSpaceAttribute(!0)),t),{type:"line",nodes:i});this.generateLineTopologyInfoNodeGraphs(s);const r=new Xl(s);return this.viewport.scener.addObject(r,this.scene),r}_getShortestPathByMultiplePoints(e,n,i,s,r){const o=[];i.forEach((n=>{const i={start:"start"===r?n:s,end:"end"===r?n:s},a=this._getPath(e,i);if(null===a||a.length<=1)return;let l=0;a.forEach(((e,n)=>{const i=a[n+1];i&&(l+=e.getWorldPosition(new t).distanceTo(i.getWorldPosition(new t)))})),l>0&&o.push({nodes:a,pathLength:l})}));let a=[],l=1/0;if(o.forEach((({nodes:e,pathLength:t})=>{t0){const t=this._generateNodesInfo(a),i=Object.assign(Object.assign(Object.assign(Object.assign({},e.info),e.getSpaceAttribute(!0)),n),{type:"line",nodes:t});this.generateLineTopologyInfoNodeGraphs(i);const s=new Xl(i);return this.viewport.scener.addObject(s,this.scene),s}return null}async _getShortestPathByMultiplePointsAsync(e,n,i,s,r){const o=[];await Promise.all(i.map((async n=>{const i={start:"start"===r?n:s,end:"end"===r?n:s},a=await this._getPathAsync(e,i);if(null===a||a.length<=1)return;let l=0;a.forEach(((e,n)=>{const i=a[n+1];i&&(l+=e.getWorldPosition(new t).distanceTo(i.getWorldPosition(new t)))})),l>0&&o.push({nodes:a,pathLength:l})})));let a=[],l=1/0;if(o.forEach((({nodes:e,pathLength:t})=>{t0){const t=this._generateNodesInfo(a),i=Object.assign(Object.assign(Object.assign(Object.assign({},e.info),e.getSpaceAttribute(!0)),n),{type:"line",nodes:t});this.generateLineTopologyInfoNodeGraphs(i);const s=new Xl(i);return this.viewport.scener.addObject(s,this.scene),s}return null}getShortestPathByMultipleStartPoints(e,t){return this._getShortestPathByMultiplePoints(e,t,t.start,t.end,"start")}getShortestPathByMultipleEndPoints(e,t){return this._getShortestPathByMultiplePoints(e,t,t.end,t.start,"end")}getShortestPathByMultipleStartPointsAsync(e,t){return this._getShortestPathByMultiplePointsAsync(e,t,t.start,t.end,"start")}getShortestPathByMultipleEndPointsAsync(e,t){return this._getShortestPathByMultiplePointsAsync(e,t,t.end,t.start,"end")}setDijkstraGraph(e){const n=[];for(let i=0;i(e.set(t.sid,t),e)),new Map);for(let e=0;ethis.updateGeometry(t,e)))}updateGeometry(e,i={}){const{meshOfModelList:s}=this.viewport.scener.intersectsList,{snapping:o=!0,snappingDistance:a=1,snappingTargets:l=s,offsetUnits:c=.01}=i,{decalMesh:h}=e;if(h.geometry.dispose(),this.viewport.render(),o){h.updateWorldMatrix(!0,!1);const s=new t,o=new t,u=h.matrixWorld.elements,d={position:new t,quaternion:new r,scale:new t};h.matrixWorld.decompose(d.position,d.quaternion,d.scale),d.scale.multiply(e.textureAspect),h.getWorldPosition(s),o.set(-u[8],-u[9],-u[10]).normalize(),Pd.set(s,o),Pd.near=0,Pd.far=a;const[p]=Pd.intersectObjects(l).filter((({object:e})=>!(e instanceof zc)));if(p){const{object:t}=p,r=(new n).setFromRotationMatrix(h.matrixWorld,"XYZ"),a=new Fc(Object.assign(Object.assign({offsetUnits:c},i),{object:t,origin:s,direction:o,angle:r.z,size:(new f).copy(d.scale)})),l=h.matrixWorld.clone().invert();return a.meshMatrix&&l.multiply(a.meshMatrix),a.applyMatrix4(l),h.geometry=a,e}}const{x:u,y:d}=e.textureAspect;return h.geometry=new rt(u,d),e}}class Bd{constructor(e){this.viewport=e,this.scene=this.viewport.scene,this.cache={objects:new Map,classified:{Group:new Set,Light:new Set,Model:new Set,Poi:new Set,PoiNode:new Set,Canvas3D:new Set,Topology:new Set,Helper:new Set,Decal:new Set,PluginObject:new Set}},this.store={groupManager:new Md(this.viewport,this.cache),lightManager:new wu(this.viewport,this.cache),modelManager:new gd(this.viewport,this.cache),poiManager:new yd(this.viewport,this.cache),poiNodeManager:new xd(this.viewport,this.cache),canvas3DManager:new Ad(this.viewport,this.cache),topologyManager:new Dd(this.viewport,this.cache),helperManager:new Ed(this.viewport,this.cache),decalManager:new Od(this.viewport,this.cache),pluginObjectManager:new Cd(this.viewport,this.cache)},e.signals.beforeRender.add(this.update.bind(this)),e.signals.objectAdded.add(this.setObjectCache.bind(this)),e.signals.objectRemoved.add(this.deleteObjectCache.bind(this))}levelUpdate(){const e=(e,t)=>{e.visible!==t&&(e.visible=t,this.viewport.signals.objectChanged.dispatch())},n=n=>{const{level:i,handleHide:s}=n,{max:r=null,min:o=null}=i;if(!s&&(es(r)||es(o))){const i=new t;i.setFromMatrixPosition(n.matrixWorld);const s=this.viewport.camera.position.distanceTo(i);es(r)&&s>r||es(o)&&s{(e instanceof Fl||e instanceof Ul)&&n(e)}))}scaleFixedUpdate(){this.cache.objects.forEach((e=>{if(e instanceof Gl||e instanceof jl){const{scaleFixed:n}=e;if(n){const i=new t;if(i.setFromMatrixPosition(e.matrixWorld),i.distanceTo(this.viewport.camera.position)>n.distance){const t=Pi(i,n.fixedScale,this.viewport.camera,this.viewport.renderer.getSize(new f));e.scale.setScalar(t)}else e.scale.setScalar(n.originScale)}}}))}update(){this.viewport.options.levelEnabled&&this.levelUpdate(),this.viewport.options.scaleFixedEnabled&&this.scaleFixedUpdate()}isObjectInScene(e){let t=!1;return e.traverseAncestors((e=>{e===this.scene&&(t=!0)})),t}getObjectById(e){const t=this.getObjectCache(e);if(t){if(this.isObjectInScene(t))return t}return null}getObjectByName(e){return this._getObjectByProps("name",e)}getObjectByUserDataProperty(e,t){const n=[];return this.cache.objects.forEach((i=>{this.isObjectInScene(i)&&ns(i)&&(i instanceof Fl||i instanceof Ul||i.userData.stype)&&(is(e)&&e(i.userData)||Ji(e)&&i.userData[e]===t)&&n.push(i)})),n}removeObjectById(e){const t=this.getObjectById(e);return!!t&&(this.viewport.scener.removeObject(t),!0)}_getObjectByProps(e,t){const n=[];return this.cache.objects.forEach((i=>{this.isObjectInScene(i)&&((i instanceof Fl||i instanceof Ul)&&ns(i)&&i[e]===t||ns(i)&&i.userData.stype&&("name"===e&&i.name===t||"sid"===e&&i.userData.sid===t))&&n.push(i)})),n}getObjectCache(e){return this.cache.objects.get(e)}setObjectCache(e){const t=(e,t)=>{const n=this.cache.objects.get(t);n&&n!==e&&mi(`object id ${t} already exists in scene`)};null==e||e.traverse((n=>{if(n instanceof Fl||n instanceof Ul){if("string"==typeof n.sid&&n.sid.startsWith(ci))return;t(n,n.sid),this.cache.objects.set(n.sid,n);const e=n.stype;this.cache.classified[e]&&this.cache.classified[e].add(n)}else if(n.userData.sid&&e.userData.stype){t(n,n.userData.sid),this.cache.objects.set(n.userData.sid,n);const e=n.userData.stype;this.cache.classified[e]&&this.cache.classified[e].add(n)}}))}deleteObjectCache(e){null==e||e.traverse((t=>{if(t instanceof Fl||t instanceof Ul){this.cache.objects.delete(t.sid);const e=t.stype;this.cache.classified[e]&&this.cache.classified[e].delete(t)}else if(t.userData.sid&&e.userData.stype){this.cache.objects.delete(t.userData.sid);const e=t.userData.stype;this.cache.classified[e]&&this.cache.classified[e].delete(t)}}))}clearObject(){this.store.modelManager.clear(),this.store.poiManager.clear(),this.store.poiNodeManager.clear(),this.store.canvas3DManager.clear(),this.store.topologyManager.clear(),this.store.helperManager.clear(),this.store.decalManager.clear(),this.store.pluginObjectManager.clear()}clear(){this.clearObject(),this.store.lightManager.clear()}dispose(){this.store.modelManager.dispose(),this.store.topologyManager.dispose(),this.store.lightManager.dispose(),this.cache.objects.clear(),Object.values(this.cache.classified).forEach((e=>e.clear())),this.clear()}}function Id(e){const t=Ld(e),n=new m;n.setFromMatrix3(t);const i=e[0],s=n.clone();s.setPosition(i);const r=s.clone().invert(),o=e.map((e=>{const t=e.clone().applyMatrix4(r);return new f(t.x,t.y)})),a=new at(o),l=new Lt(a),c=new ct;c.setFromPoints(o);const h=Rd(c);return l.getAttribute("uv").applyMatrix3(h),l.applyMatrix4(n),{geometry:l,polygonBox:c,modelMatrix:n,planeMatrix:s,projectionMatrix:r,position:i}}function Ld(e){const[n,i,s]=e,r=new Rt;r.setFromCoplanarPoints(i,n,s);const o=r.normal,a=o.clone().cross(new t(0,0,1));a.equals(new t)&&a.set(1,0,0);const l=o.clone().cross(a);a.normalize(),l.normalize(),o.normalize();const c=new ze;return c.elements=[a.x,a.y,a.z,l.x,l.y,l.z,o.x,o.y,o.z],c}function Rd(e){const t=e.min,n=e.getSize(new f),i=new ze;return i.elements=[n.x,0,0,0,n.y,0,t.x,t.y,1],i.invert()}function Fd(e,t){const n=wi(t);return e.intersectsBox(n)}function Ud(e,t,n){if("string"==typeof e){let i=t?null==n?void 0:n.get(e):null;if(!i){i=(new h).load(e,(()=>{Pl.needsUpdate=!0})),null==n||n.set(e,i)}return i}return e instanceof HTMLImageElement?new d(e):e instanceof HTMLCanvasElement?new Ye(e):new Ne(e)}function zd(e,t,n,i){const s=e.map,r=Ud(t,n,i);if(s){const e=r.source;r.copy(s),r.source=e}return e.map=r,r}function kd(e,n){const{top:s,left:r,bottom:o,right:a,front:l,back:c}=e,h=new t(a,s,l),u=new t(r,o,c),d=new i;return function(e){return d.max.addVectors(e,h),d.min.subVectors(e,u),n.filter((e=>Fd(d,e)))}}function jd(e,n){const i=new Ee(new t,e);return function(e){return i.center.copy(e),n.filter((e=>Fd(i,e)))}}function Nd(e,n){const i=e.length-1,s=[];for(let t=0;t{const n=wi(e),i=new t;n.getCenter(i);const o=s.filter((e=>{const t=e.closestPointToPointParameter(i);return 0<=t||t>=1}));if(0===o.length)return!1;let a=1/0,l=i;for(const e of o){const n=e.closestPointToPoint(i,!0,new t),s=i.distanceToSquared(n);snew t(e.x,e.y,e.z))),m=s?Object.assign(Object.assign({transparent:!0},p),{map:Ud(s,null==d||d,n)}):p,g=o?new Ft(m):new We(m),{geometry:v,position:y}=Id(f),w=new Ul({id:a,name:l,userData:c,level:h,visible:u},v,g);return w.position.copy(y),w}v.prototype.computeBoundsTree=Xt,v.prototype.disposeBoundsTree=Zt,se.prototype.raycast=qt,Ve.prototype.firstHitOnly=!0,e.ColorManagement.enabled=!0;class Vd{constructor(t){var n;this.THREE=e,this.TWEEN=Ut,this.utils=us,this.animation=ps,this.library=kc,this.version=un,this.domElement=null,this.plugins={},this.textureCache=new Map;const{el:i,options:s={},events:r={}}=t;if(this.options=Object.assign(Object.assign({},{showInfo:!1,showStats:!1,showViewHelper:!1,showGrid:!1,background:{color:11459572,alpha:!1},fog:!1,hoverEnabled:!1,levelEnabled:!1,scaleFixedEnabled:!1,fileCacheEnabled:!0,closeInfoLog:!1,closeWarnLog:!1,useIndexedDB:!0}),s),this.signals={windowResize:new mu,cameraObjectChange:new mu,sceneChanged:new mu,backgroundChanged:new mu,beforeRender:new mu,sceneRendered:new mu,tweenUpdate:new mu,hover:new mu,click:new mu,dblClick:new mu,rightClick:new mu,mouseDown:new mu,mouseMove:new mu,mouseUp:new mu,mouseWheel:new mu,keyDown:new mu,keyUp:new mu,modelHover:new mu,modelUnHover:new mu,modelClick:new mu,modelDblClick:new mu,modelRightClick:new mu,poiHover:new mu,poiUnHover:new mu,poiClick:new mu,poiDblClick:new mu,poiRightClick:new mu,selectPosition:new mu,sceneClick:new mu,objectAdded:new mu,objectRemoved:new mu,objectChanged:new mu,geometryChanged:new mu,materialAdded:new mu,materialChanged:new mu,materialRemoved:new mu,cameraChange:new mu,outlineChange:new mu,modelAnimation:new mu,getSceneInfo:new mu},this.viewport=new Ll(this.options,this.signals),this.controls=this.viewport.controls,this.manager=new Bd(this.viewport),i&&(this.domElement=i instanceof HTMLElement?i:document.querySelector(i),null===(n=this.domElement)||void 0===n||n.appendChild(this.viewport.container)),!this.domElement)throw new Error("In SoonSpace: Can't find container!");this._init(),this._initEvents(r),this._initDefaultSettings()}_init(){const{showGrid:e,background:t,fog:n,controls:i,fileCacheEnabled:s,closeInfoLog:r,closeWarnLog:o,useIndexedDB:a}=this.options;if(!r){pi(" ____ ____ _ \n / ___| ___ ___ _ __ / ___| _ __ __ _ ___ ___ (_)___ \n \\___ \\ / _ \\ / _ \\| '_ \\\\___ \\| '_ \\ / _` |/ __/ _ \\ | / __| \n ___) | (_) | (_) | | | |___) | |_) | (_| | (_| __/_ | \\__ \\ \n |____/ \\___/ \\___/|_| |_|____/| .__/ \\__,_|\\___\\___(_)/ |___/ \n |_| |__/ \n",{color:"#3eaf7c"}),pi(hn,{color:"#3eaf7c","font-size":"24px"}),pi(`当前版本: ${this.version}`,{color:"#3eaf7c","font-size":"12px"}),pi("文档: https://www.xwbuilders.com/soonspacejs/",{color:"#3eaf7c","font-size":"12px"}),pi("样例: https://www.xwbuilders.com/soonspacejs/examples/",{color:"#3eaf7c","font-size":"12px"}),pi("GitHub: https://github.com/soonspacejs",{color:"#3eaf7c","font-size":"12px"})}e&&this.addGridHelper(!0===e?{id:"defaultGridHelper"}:e),(null==t?void 0:t.skyBox)?Ji(null==t?void 0:t.skyBox)?this.setSphereSkyBackground(null==t?void 0:t.skyBox):ns(null==t?void 0:t.skyBox)&&this.setSkyBackground(t.skyBox.dirPath,t.skyBox.fileNames):(null==t?void 0:t.img)?this.setBackgroundImage(t.img):(null==t?void 0:t.color)?this.setBackgroundColor(t.color):!0===(null==t?void 0:t.alpha)&&this.setBackgroundColorAlpha("#000",0),n&&this.openSceneFog(!0===n?void 0:n),i&&this.setControlsOptions(i),void 0!==s&&this.setFileCacheEnabled(s),o&&(window.console.warn=function(){}),a&&!window.indexedDB&&(this.options.useIndexedDB=!1,window.console.warn("Your browser doesn't support a stable version of IndexedDB. Such and such feature will not be available."))}_initEvents(e){const t={modelHover:this.signals.modelHover,modelUnHover:this.signals.modelUnHover,modelClick:this.signals.modelClick,modelRightClick:this.signals.modelRightClick,modelDblClick:this.signals.modelDblClick,poiHover:this.signals.poiHover,poiUnHover:this.signals.poiUnHover,poiClick:this.signals.poiClick,poiRightClick:this.signals.poiRightClick,poiDblClick:this.signals.poiDblClick,selectPosition:this.signals.selectPosition,sceneClick:this.signals.sceneClick};for(const[n,i]of Object.entries(t)){const t=e[n];t&&i.add(t)}}_initDefaultSettings(){this.setEnvironment(),this.setColorSpace("sRGB"),this.setToneMapping({type:"ACESFilmic",exposure:.8})}setHoverEnabled(e){this.options.hoverEnabled=e}setLevelEnabled(e){this.options.levelEnabled=e}setScaleFixedEnabled(e){this.options.scaleFixedEnabled=e}setFileCacheEnabled(t){e.Cache.enabled=t}registerPlugin(e,t,n){const i=new e(this,n);return this.plugins[t]=i,i}getPlugin(e){return this.plugins[e]?this.plugins[e]:null}createPluginObject(e,t){return this.manager.store.pluginObjectManager.createObject(e,t)}addToPluginObject(e,t){const n=this.getObjectById(e);return this.manager.store.pluginObjectManager.addToObject(n,t)}getPluginObjectById(e){return mi("getPluginObjectById is deprecated, use getObjectById instead"),this.getObjectById(e)}getPluginObjectByName(e){return mi("getPluginObjectByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}removePluginObjectById(e){return mi("removePluginObjectById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}setSSR(e){this.viewport.setSSR(e)}setBloom(e){this.viewport.setBloom(e)}setSSAO(e){this.viewport.setSSAO(e)}setColorSpace(e){this.viewport.setColorSpace(e)}setToneMapping(e){this.viewport.setToneMapping(e)}setBackgroundColor(e){this.viewport.setBackgroundColor(e)}setBackgroundColorAlpha(e,t){this.viewport.setBackgroundColorAlpha(e,t)}setBackgroundImage(e){return this.viewport.setBackgroundImage(e)}setSphereSkyBackground(e){return this.viewport.setSphereSkyBackground(e)}setSkyBackground(e,t){return this.viewport.setSkyBackground(e,t)}setEnvironment(e){return this.viewport.setEnvironment(e)}playModelAnimation(e,t){return this.viewport.playModelAnimation(e,t)}stopModelAnimation(e,t){this.viewport.stopModelAnimation(e,t)}getOffsetByPosition(e){return this.viewport.getOffsetByPosition(e)}getPositionByOffset(e,t,n){return this.viewport.getPositionByOffset(e,t,n)}render(e){return this.viewport.render(e)}clearSignals(){this.viewport.clearSignals()}dispose(){this.manager.dispose(),this.viewport.dispose()}async setCamera(e,t,n=!0){return this.viewport.cameraManager.setCamera(e,t,n)}getCameraViewpoint(){return this.viewport.cameraManager.getCameraViewpoint()}setCameraViewpoint(e,t=!1){return this.viewport.cameraManager.setCameraViewpoint(e,t)}flyTo(e,t="frontTop",n){return this.viewport.cameraManager.flyTo(e,t,n)}flyToBoundingBox(e,t="frontTop",n){return this.flyToObj(e,t,n)}flyToObj(e,t="frontTop",n){return this.viewport.cameraManager.flyToObj(e,t,n)}flyMainViewpoint(e="frontTop",t){return this.flyToObj(this.manager.scene,e,t)}surroundOnTarget(e,t){return this.viewport.cameraManager.surroundOnTarget(e,t)}surroundOnObject(e,t){return this.viewport.cameraManager.surroundOnObject(e,t)}getObjectLabelPos(e,t="frontTop",n){return this.viewport.cameraManager.getObjectLabelPos(e,t,n)}setControlsOptions(e){return this.controls.setOptions(e)}addObject(e,t){this.viewport.scener.addObject(e,t)}attachObject(e,t){this.viewport.scener.attachObject(e,t)}removeObject(e){this.viewport.scener.removeObject(e)}openSceneFog(e){this.viewport.scener.openSceneFog(e)}closeSceneFog(){this.viewport.scener.closeSceneFog()}setSky(e){return this.viewport.setSky(e)}getScreenshot(){return this.screenshot()}screenshot(){return this.viewport.screenshot()}edgeShow(e,t){return this.viewport.scener.edgeShow(e,t)}unEdgeShow(e){return this.viewport.scener.unEdgeShow(e)}strokeShow(e,t){return this.viewport.scener.strokeShow(e,t)}unStrokeShow(e){return this.viewport.scener.unStrokeShow(e)}opacityShow(e,t){return this.viewport.scener.opacityShow(e,t)}unOpacityShow(e){return this.viewport.scener.unOpacityShow(e)}highlightShow(e,t){return this.viewport.scener.highlightShow(e,t)}unHighlightShow(e){return this.viewport.scener.unHighlightShow(e)}emissiveShow(e,t){return this.viewport.scener.emissiveShow(e,t)}unEmissiveShow(e){return this.viewport.scener.unEmissiveShow(e)}clearObject(){this.manager.clearObject()}clear(){this.manager.clear()}createAmbientLight(e){return this.manager.store.lightManager.createAmbientLight(e)}setAmbientLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setAmbientLight(t,e)}createDirectionalLight(e){return this.manager.store.lightManager.createDirectionalLight(e)}setDirectionalLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setDirectionalLight(t,e)}createHemisphereLight(e){return this.manager.store.lightManager.createHemisphereLight(e)}setHemisphereLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setHemisphereLight(t,e)}createSpotLight(e){return this.manager.store.lightManager.createSpotLight(e)}setSpotLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setSpotLight(t,e)}createPointLight(e){return this.manager.store.lightManager.createPointLight(e)}setPointLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setPointLight(t,e)}createRectAreaLight(e){return this.manager.store.lightManager.createRectAreaLight(e)}setRectAreaLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setRectAreaLight(t,e)}getLightById(e){return mi("getLightById is deprecated, use getObjectById instead"),this.getObjectById(e)}removeLightById(e){return mi("removeLightById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}getAllLight(){return this.manager.store.lightManager.getAll()}clearLight(){return this.manager.store.lightManager.clear()}showAllLight(){return this.manager.store.lightManager.showAll()}hideAllLight(){return this.manager.store.lightManager.hideAll()}updateAllShadow(){return this.manager.store.lightManager.updateAllShadow()}getObjectById(e){return this.manager.getObjectById(e)}getObjectByName(e){return this.manager.getObjectByName(e)}getObjectByUserDataProperty(e,t){return this.manager.getObjectByUserDataProperty(e,t)}removeObjectById(e){return this.manager.removeObjectById(e)}createGroup(e,t){return this.manager.store.groupManager.createGroup(e,t)}getGroupById(e){return mi("getGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getGroupByName(e){return mi("getGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllGroup(){return this.manager.store.groupManager.getAll()}showAllGroup(){return this.manager.store.groupManager.showAll()}hideAllGroup(){return this.manager.store.groupManager.hideAll()}removeGroupById(e){return mi("removeGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}loadSbm(e){return mi("loadSbm is deprecated, use loadModel instead"),this.loadModel(e)}parseSbm(){mi("parseSbm is deprecated!")}cloneSbm(e,t,n){return mi("cloneSbm is deprecated, use cloneModel instead"),this.cloneModel(e,t,n)}getSbmById(e){return mi("getSbmById is deprecated, use getObjectById instead"),this.getObjectById(e)}getSbmByName(e){return mi("getSbmByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getSbmByUserDataProperty(e,t){return mi("getSbmByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removeSbmById(e){return mi("removeSbmById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForSbm(e){return mi("createGroupForSbm is deprecated, use createGroup instead"),this.createGroup(e)}loadSbmToGroup(e,t){return mi("loadSbmToGroup is deprecated, use loadModelToGroup instead"),this.loadModelToGroup(e,t)}addSbmForGroup(e,t){return mi("addSbmForGroup is deprecated, use addModelForGroup instead"),this.addModelForGroup(e,t)}createSbmGroupFromXml(){mi("createGroupForSbm is deprecated!")}getSbmGroupById(e){return mi("getSbmGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getSbmGroupByName(e){return mi("getSbmGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllSbmGroup(){return mi("getAllSbmGroup is deprecated, use getAllGroup instead"),this.getAllGroup()}removeSbmGroupById(e){return mi("removeSbmGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearSbm(){return mi("clearSbm is deprecated, use clearModel instead"),this.clearModel()}getAllSbm(){return mi("getAllSbm is deprecated, use getAllModel instead"),this.getAllModel()}showAllSbm(){return mi("showAllSbm is deprecated, use showAllModel instead"),this.showAllModel()}hideAllSbm(){return mi("hideAllSbm is deprecated, use hideAllModel instead"),this.hideAllModel()}getSbmModelMaps(){return mi("getSbmModelMaps is deprecated, use getModelsMap instead"),this.getModelsMap()}setSbmModelMaps(e){return mi("setSbmModelMaps is deprecated, use setModelsMap instead"),this.setModelsMap(e)}setModelDracoDecoderPath(e){return this.manager.store.modelManager.setDracoDecoderPath(e)}setModelKtx2DecoderPath(e){return this.manager.store.modelManager.setKtx2DecoderPath(e)}loadModel(e,t){return this.manager.store.modelManager.load(e,t)}cloneModel(e,t,n){return this.manager.store.modelManager.clone(e,t,n)}getModelById(e){return mi("getModelById is deprecated, use getObjectById instead"),this.getObjectById(e)}getModelByName(e){return mi("getModelByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getModelByUserDataProperty(e,t){return mi("getModelByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removeModelById(e){return mi("removeModelById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForModel(e){return mi("createGroupForModel is deprecated, use createGroup instead"),this.createGroup(e)}loadModelToGroup(e,t){return this.manager.store.modelManager.loadToGroup(e,t)}addModelForGroup(e,t){const n=this.getObjectById(e);return this.manager.store.modelManager.addForGroup(n,t)}getModelGroupById(e){return mi("getModelGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getModelGroupByName(e){return mi("getModelGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllModelGroup(){return mi("getAllModelGroup is deprecated, use getAllGroup instead"),this.getAllGroup()}removeModelGroupById(e){return mi("removeModelGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearModel(){return this.manager.store.modelManager.clear()}getAllModel(){return this.manager.store.modelManager.getAll()}showAllModel(){return this.manager.store.modelManager.showAll()}hideAllModel(){return this.manager.store.modelManager.hideAll()}computeModelsBoundsTree(e){return this.viewport.bvh.computeModelsBoundsTree(e)}clearIdb(){return this.manager.store.modelManager.clearIdb()}getModelsMap(){return this.manager.store.modelManager.modelsMap}setModelsMap(e){this.manager.store.modelManager.modelsMap=e}createPoi(e){return this.manager.store.poiManager.create(e)}clonePoi(e,t,n){return this.manager.store.poiManager.clone(e,t,n)}getPoiById(e){return mi("getPoiById is deprecated, use getObjectById instead"),this.getObjectById(e)}getPoiByName(e){return mi("getPoiByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getPoiByUserDataProperty(e,t){return mi("getPoiByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removePoiById(e){return mi("removePoiById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForPoi(e){return mi("createGroupForPoi is deprecated, use createGroup instead"),this.createGroup(e)}createPoiToGroup(e,t){return this.manager.store.poiManager.createToGroup(e,t)}addPoiForGroup(e,t){const n=this.getObjectById(e);return this.manager.store.poiManager.addForGroup(n,t)}getPoiGroupById(e){return mi("getPoiGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getPoiGroupByName(e){return mi("getPoiGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllPoiGroup(){return mi("getAllPoiGroup is deprecated, use getAllGroup instead"),this.getAllGroup()}removePoiGroupById(e){return mi("removePoiGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearPoi(){return this.manager.store.poiManager.clear()}getAllPoi(){return this.manager.store.poiManager.getAll()}showAllPoi(){return this.manager.store.poiManager.showAll()}hideAllPoi(){return this.manager.store.poiManager.hideAll()}createPoiNode(e){return this.manager.store.poiNodeManager.create(e)}getPoiNodeById(e){return mi("getPoiNodeById is deprecated, use getObjectById instead"),this.getObjectById(e)}getPoiNodeByName(e){return mi("getPoiNodeByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getPoiNodeByUserDataProperty(e,t){return mi("getPoiNodeByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removePoiNodeById(e){return mi("removePoiNodeById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForPoiNode(e){return mi("createGroupForPoiNode is deprecated, use createGroup instead"),this.createGroup(e)}createPoiNodeToGroup(e,t){return this.manager.store.poiNodeManager.createToGroup(e,t)}addPoiNodeForGroup(e,t){const n=this.getObjectById(e);return this.manager.store.poiNodeManager.addForGroup(n,t)}getPoiNodeGroupById(e){return mi("getPoiNodeGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getPoiNodeGroupByName(e){return mi("getPoiNodeGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllPoiNodeGroup(){return mi("getAllPoiNodeGroup is deprecated, use getAllGroup instead"),this.getAllGroup()}removePoiNodeGroupById(e){return mi("removePoiNodeGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearPoiNode(){return this.manager.store.poiNodeManager.clear()}getAllPoiNode(){return this.manager.store.poiNodeManager.getAll()}showAllPoiNode(){return this.manager.store.poiNodeManager.showAll()}hideAllPoiNode(){return this.manager.store.poiNodeManager.hideAll()}createPoiMesh(e){const t=Gd(e,this.textureCache);return this.addObject(t),t}createPolygonPoiMesh(e){const t=Hd(e,this.textureCache);return this.addObject(t),t}setTexture(e,t,n={}){const{cache:i=!0,independ:s=!0}=n||{};let r=e.material;if(s&&(r=r.clone(),e.material=r),null===t)return r.map=null,this.render(),null;const o=zd(r,t,i,this.textureCache);return this.render(),o}createCanvas3D(e,t){return this.manager.store.canvas3DManager.create(e,t)}getCanvas3DById(e){return mi("getCanvas3DById is deprecated, use getObjectById instead"),this.getObjectById(e)}getCanvas3DByName(e){return mi("getCanvas3DByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getCanvas3DByUserDataProperty(e,t){return mi("getCanvas3DByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removeCanvas3DById(e){return mi("removeCanvas3DById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForCanvas3D(e){return mi("createGroupForCanvas3D is deprecated, use createGroup instead"),this.createGroup(e)}createCanvas3DToGroup(e,t){return this.manager.store.canvas3DManager.createToGroup(e,t)}addCanvas3DForGroup(e,t){const n=this.getObjectById(e);return this.manager.store.canvas3DManager.addForGroup(n,t)}getCanvas3DGroupById(e){return mi("getCanvas3DGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getCanvas3DGroupByName(e){return mi("getCanvas3DGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllCanvas3DGroup(){return mi("getAllCanvas3DGroup is deprecated, use getAllGroup instead"),this.getAllGroup()}removeCanvas3DGroupById(e){return mi("removeCanvas3DGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearCanvas3D(){return this.manager.store.canvas3DManager.clear()}getAllCanvas3D(){return this.manager.store.canvas3DManager.getAll()}showAllCanvas3D(){return this.manager.store.canvas3DManager.showAll()}hideAllCanvas3D(){return this.manager.store.canvas3DManager.hideAll()}getShortestPath(e,t){return this.manager.store.topologyManager.getShortestPath(e,t)}getShortestPathAsync(e,t){return this.manager.store.topologyManager.getShortestPathAsync(e,t)}getShortestPathByMultipleStartPoints(e,t){return this.manager.store.topologyManager.getShortestPathByMultipleStartPoints(e,t)}getShortestPathByMultipleStartPointsAsync(e,t){return this.manager.store.topologyManager.getShortestPathByMultipleStartPointsAsync(e,t)}getShortestPathByMultipleEndPoints(e,t){return this.manager.store.topologyManager.getShortestPathByMultipleEndPoints(e,t)}getShortestPathByMultipleEndPointsAsync(e,t){return this.manager.store.topologyManager.getShortestPathByMultipleEndPointsAsync(e,t)}createTopologyFromGml(e){return this.manager.store.topologyManager.createFromGml(e)}createTopology(e){return this.manager.store.topologyManager.create(e)}setTopologyPassable(e,t){this.manager.store.topologyManager.setPassable(e,t)}resetTopologyNodes(e,t){return this.manager.store.topologyManager.resetNodes(e,t)}getTopologyById(e){return mi("getTopologyById is deprecated, use getObjectById instead"),this.getObjectById(e)}getTopologyByName(e){return mi("getTopologyByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getTopologyByUserDataProperty(e,t){return mi("getTopologyByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removeTopologyById(e){return mi("removeTopologyById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForTopology(e){return mi("createGroupForTopology is deprecated, use createGroup instead"),this.createGroup(e)}createTopologyToGroup(e,t){return this.manager.store.topologyManager.createToGroup(e,t)}addTopologyForGroup(e,t){const n=this.getObjectById(e);return this.manager.store.topologyManager.addForGroup(n,t)}getTopologyGroupById(e){return mi("getTopologyGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getTopologyGroupByName(e){return mi("getTopologyGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllTopologyGroup(){return mi("getAllTopologyGroup is deprecated, use getAllGroups instead"),this.getAllGroup()}removeTopologyGroupById(e){return mi("removeTopologyGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearTopology(){return this.manager.store.topologyManager.clear()}getAllTopology(){return this.manager.store.topologyManager.getAll()}showAllTopology(){return this.manager.store.topologyManager.showAll()}hideAllTopology(){return this.manager.store.topologyManager.hideAll()}addGridHelper(e){return this.manager.store.helperManager.addGridHelper(e)}addAxesHelper(e){return this.manager.store.helperManager.addAxesHelper(e)}addBoxHelper(e){return this.manager.store.helperManager.addBoxHelper(e)}addPlaneHelper(e){return this.manager.store.helperManager.addPlaneHelper(e)}createGround(e){return mi("In soonspacejs: 'createGround' 已弃用,请使用 'addGroundHelper'!"),this.addGroundHelper(e)}addGroundHelper(e){return this.manager.store.helperManager.addGroundHelper(e)}addDirectionalLightHelper(e){return this.manager.store.helperManager.addDirectionalLightHelper(e)}addHemisphereLightHelper(e){return this.manager.store.helperManager.addHemisphereLightHelper(e)}addSpotLightHelper(e){return this.manager.store.helperManager.addSpotLightHelper(e)}addPointLightHelper(e){return this.manager.store.helperManager.addPointLightHelper(e)}addRectAreaLightHelper(e){return this.manager.store.helperManager.addRectAreaLightHelper(e)}getHelperById(e){return mi("getHelperById is deprecated, use getObjectById instead"),this.getObjectById(e)}removeHelperById(e){return mi("removeHelperById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearHelper(){return this.manager.store.helperManager.clear()}showAllHelper(){return this.manager.store.helperManager.showAll()}hideAllHelper(){return this.manager.store.helperManager.hideAll()}createDecal(e,t){return this.manager.store.decalManager.create(e,t)}updateDecalGeometry(e,t={}){return this.manager.store.decalManager.updateGeometry(e,t)}updateAllDecalGeometry(e={}){return this.manager.store.decalManager.updateAllGeometry(e)}clearDecal(){return this.manager.store.decalManager.clear()}getAllDecal(){return this.manager.store.decalManager.getAll()}showAllDecal(){return this.manager.store.decalManager.showAll()}hideAllDecal(){return this.manager.store.decalManager.hideAll()}createFindObjectsInBoxNearPosition(e,t){return kd(e,t)}createFindObjectsInSphereNearPosition(e,t){return jd(e,t)}createFindObjectsNearPath(e,t){return Nd(e,t)}createPathAnimation(e,t,n){return new fs(e,t,n)}createTopologyAnimation(e,n,i){const s=n.nodes.map((e=>e.getWorldPosition(new t)));return new fs(e,s,i)}createPathAnimationAction(e,t,n){return function(e,t,n,i){const s=i?Gc(i,!1):null,r=Yc(t),{clip:o}=tr(Object.assign(Object.assign(Object.assign({},s),r),{target:e})),a=n.playModelAnimation(e,o),{points:l}=r;return l?(a.enableKeyframeEvent=!1,a.points=l):a.enablePointEvent=!1,a}(e,t,this,n)}createPathAnimationActionForCamera(e,t){}createBonePathAnimation(e,t,n){return function(e,t,n,i){const s=i?Gc(i,!1):null,r=Yc(t),o=ur(Object.assign(Object.assign(Object.assign({},s),r),{target:e})),{model:a,clip:l}=o,c=n.playModelAnimation(a,l);return Object.assign(Object.assign({},o),{action:c})}(e,t,this,n)}createChainSkeletalModel(e,t){return function(e,t){const n=Zs(Object.assign(Object.assign({},t),{target:e})),{model:i,skeleton:s}=n;return{skeletalModel:i,skeleton:s}}(e,t)}createPathAnimationForBones(e,t,n){const i=function(e,t,n,i){const s=dr(Object.assign(Object.assign({},i),{target:e,skeleton:t}));return n.playModelAnimation(t,s)}(e,t,this,n);return i}}Vd.THREE=e,Vd.TWEEN=Ut,Vd.utils=us,Vd.animation=ps,Vd.library=kc,Vd.ACTION=li.ACTION;export{Dr as AnimationActionController,Rr as AnimationActionCreator,Ar as AnimationActionKeyframe,Tr as AnimationActionOperate,Lr as AnimationClipCreator,yr as AnimationClipKeyframe,wr as AnimationEventBaseType,Ul as BaseMesh,Fl as BaseObject3D,$l as Canvas3D,Wl as Circle,zc as Decal,Lc as DecalUVMapType,Rs as DirectionSide,ec as Ground,zl as Group,Cr as GuiAnimationActionController,ci as INNER_ID,Vl as Icon,ql as Line,Kl as Link,Nl as Model,ui as ModelFormat,Ql as Node,hi as ObjecType,kl as PluginObject,Gl as Poi,jl as PoiNode,_l as Point,Jl as Polygon,Vd as SoonSpace,Xl as Topology,Pr as TrackProperty_Common,Or as ValueTypeNames,Fd as boundingIsIntersected,_s as configVertexWeightByEquallyDivided,Ws as configVertexWeightForChainBones,Qs as configVertexWeightForEqualChainBones,Sr as createAnimationOperate,ur as createBonePathAnimation,Ns as createChainBones,Gs as createChainBonesByAxials,Hs as createChainBonesByJoints,Zs as createChainSkeletalModel,Ys as createChainSkinnedMesh,Ks as createChainSkinnedMeshForMesh,tr as createCurveAnimationClip,nr as createCurveAnimationClipByCurve,lr as createCurveAnimationClipByPolyline,dr as createCurveAnimationClipForBones,mr as createCurveAnimationClipForBonesTarget,Ds as createCurveBufferGeometry,Vs as createEqualChainBones,kd as createFindObjectsInBoxNearPosition,jd as createFindObjectsInSphereNearPosition,Nd as createFindObjectsNearPath,Mr as createGuiAnimationController,pr as createKeyframeTracksForBones,gr as createKeyframeTracksForBonesTarget,ir as createKeyframeTracksOfCurveAnimation,cr as createKeyframeTracksOfCurveAnimationByPolyline,Cs as createLineSegmentsByCurve,Ps as createLines,Ld as createPlaneMatrix,Gd as createPoiMesh,Hd as createPolygonPoiMesh,Es as createPolylineBufferGeometry,Ls as createPolylineCurve,Ud as createTexture,Rd as createUVMatrix,Vd as default,Js as getAllRootBones,Ur as getClosestContinuousIndexes,Bs as getClosestDistanceInfoOfPointToLines,Fr as getContinuousNumsList,Ss as getCurveDivisionLength,Fs as getCurvePointAwayFrom,Us as getCurvePointAwayFromOrigin,As as getCurveULengths,Is as getDistanceInfoOfPointToLines,sr as getDurationOfPathAnimationOptions,$s as getFirstRootBone,rr as getKeyframeTransformDatas,hr as getKeyframeTransformDatasByPolyline,bs as getLengthsOfTs,Ms as getLinesInfo,Id as getPolygonGeometryInfo,Os as getProjectionLines,er as getRootBone,fr as getSampleDataForBones,vr as getSampleDataForBonesTarget,Ts as getSampleNum,or as getTS,ar as getTimes,br as requestAnimation,zd as setTexture}; + */var zr=.001,kr=new me,jr=null;var Nr=class e{constructor(e="Pass",t=new s,n=kr){this.name=e,this.renderer=null,this.scene=t,this.camera=n,this.screen=null,this.rtt=!0,this.needsSwap=!0,this.needsDepthTexture=!1,this.enabled=!0}get renderToScreen(){return!this.rtt}set renderToScreen(e){if(this.rtt===e){const t=this.fullscreenMaterial;null!==t&&(t.needsUpdate=!0),this.rtt=!e}}set mainScene(e){}set mainCamera(e){}setRenderer(e){this.renderer=e}isEnabled(){return this.enabled}setEnabled(e){this.enabled=e}get fullscreenMaterial(){return null!==this.screen?this.screen.material:null}set fullscreenMaterial(e){let t=this.screen;null!==t?t.material=e:(t=new se(function(){if(null===jr){const e=new Float32Array([-1,-1,0,3,-1,0,-1,3,0]),t=new Float32Array([0,0,2,0,0,2]);void 0!==(jr=new v).setAttribute?(jr.setAttribute("position",new g(e,3)),jr.setAttribute("uv",new g(t,2))):(jr.addAttribute("position",new g(e,3)),jr.addAttribute("uv",new g(t,2)))}return jr}(),e),t.frustumCulled=!1,null===this.scene&&(this.scene=new s),this.scene.add(t),this.screen=t)}getFullscreenMaterial(){return this.fullscreenMaterial}setFullscreenMaterial(e){this.fullscreenMaterial=e}getDepthTexture(){return null}setDepthTexture(e,t=te){}render(e,t,n,i,s){throw new Error("Render method not implemented!")}setSize(e,t){}initialize(e,t,n){}dispose(){for(const t of Object.keys(this)){const n=this[t];(n instanceof X||n instanceof ge||n instanceof d||n instanceof e)&&this[t].dispose()}}},Gr=class extends Nr{constructor(){super("ClearMaskPass",null,null),this.needsSwap=!1}render(e,t,n,i,s){const r=e.state.buffers.stencil;r.setLocked(!1),r.setTest(!1)}},Hr="varying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}",Vr=class extends ae{constructor(){super({name:"CopyMaterial",uniforms:{inputBuffer:new Z(null),opacity:new Z(1)},blending:ue,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#include \n#include \n#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\nuniform float opacity;varying vec2 vUv;void main(){vec4 texel=texture2D(inputBuffer,vUv);gl_FragColor=opacity*texel;\n#include \n#include \n}",vertexShader:Hr})}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}getOpacity(e){return this.uniforms.opacity.value}setOpacity(e){this.uniforms.opacity.value=e}},_r=class extends Nr{constructor(e,t=!0){super("CopyPass"),this.fullscreenMaterial=new Vr,this.needsSwap=!1,this.renderTarget=e,void 0===e&&(this.renderTarget=new X(1,1,{minFilter:ee,magFilter:ee,stencilBuffer:!1,depthBuffer:!1}),this.renderTarget.texture.name="CopyPass.Target"),this.autoResize=t}get resize(){return this.autoResize}set resize(e){this.autoResize=e}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}setAutoResizeEnabled(e){this.autoResize=e}render(e,t,n,i,s){this.fullscreenMaterial.inputBuffer=t.texture,e.setRenderTarget(this.renderToScreen?null:this.renderTarget),e.render(this.scene,this.camera)}setSize(e,t){this.autoResize&&this.renderTarget.setSize(e,t)}initialize(e,t,n){void 0!==n&&(this.renderTarget.texture.type=n,n!==V?this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1":null!==e&&e.outputColorSpace===_&&(this.renderTarget.texture.colorSpace=_))}},Qr=new u,Wr=class extends Nr{constructor(e=!0,t=!0,n=!1){super("ClearPass",null,null),this.needsSwap=!1,this.color=e,this.depth=t,this.stencil=n,this.overrideClearColor=null,this.overrideClearAlpha=-1}setClearFlags(e,t,n){this.color=e,this.depth=t,this.stencil=n}getOverrideClearColor(){return this.overrideClearColor}setOverrideClearColor(e){this.overrideClearColor=e}getOverrideClearAlpha(){return this.overrideClearAlpha}setOverrideClearAlpha(e){this.overrideClearAlpha=e}render(e,t,n,i,s){const r=this.overrideClearColor,o=this.overrideClearAlpha,a=e.getClearAlpha(),l=null!==r,c=o>=0;l?(e.getClearColor(Qr),e.setClearColor(r,c?o:a)):c&&e.setClearAlpha(o),e.setRenderTarget(this.renderToScreen?null:t),e.clear(this.color,this.depth,this.stencil),l?e.setClearColor(Qr,a):c&&e.setClearAlpha(a)}},Yr=class extends Nr{constructor(e,t){super("MaskPass",e,t),this.needsSwap=!1,this.clearPass=new Wr(!1,!1,!0),this.inverse=!1}set mainScene(e){this.scene=e}set mainCamera(e){this.camera=e}get inverted(){return this.inverse}set inverted(e){this.inverse=e}get clear(){return this.clearPass.enabled}set clear(e){this.clearPass.enabled=e}getClearPass(){return this.clearPass}isInverted(){return this.inverted}setInverted(e){this.inverted=e}render(e,t,n,i,s){const r=e.getContext(),o=e.state.buffers,a=this.scene,l=this.camera,c=this.clearPass,h=this.inverted?0:1,u=1-h;o.color.setMask(!1),o.depth.setMask(!1),o.color.setLocked(!0),o.depth.setLocked(!0),o.stencil.setTest(!0),o.stencil.setOp(r.REPLACE,r.REPLACE,r.REPLACE),o.stencil.setFunc(r.ALWAYS,h,4294967295),o.stencil.setClear(u),o.stencil.setLocked(!0),this.clearPass.enabled&&(this.renderToScreen?c.render(e,null):(c.render(e,t),c.render(e,n))),this.renderToScreen?(e.setRenderTarget(null),e.render(a,l)):(e.setRenderTarget(t),e.render(a,l),e.setRenderTarget(n),e.render(a,l)),o.color.setLocked(!1),o.depth.setLocked(!1),o.stencil.setLocked(!1),o.stencil.setFunc(r.EQUAL,1,4294967295),o.stencil.setOp(r.KEEP,r.KEEP,r.KEEP),o.stencil.setLocked(!0)}},Kr=0,Xr=1,Zr=2,qr={FRAGMENT_HEAD:"FRAGMENT_HEAD",FRAGMENT_MAIN_UV:"FRAGMENT_MAIN_UV",FRAGMENT_MAIN_IMAGE:"FRAGMENT_MAIN_IMAGE",VERTEX_HEAD:"VERTEX_HEAD",VERTEX_MAIN_SUPPORT:"VERTEX_MAIN_SUPPORT"},Jr=!1,$r=class{constructor(e=null){this.originalMaterials=new Map,this.material=null,this.materials=null,this.materialsBackSide=null,this.materialsDoubleSide=null,this.materialsFlatShaded=null,this.materialsFlatShadedBackSide=null,this.materialsFlatShadedDoubleSide=null,this.setMaterial(e),this.meshCount=0,this.replaceMaterial=e=>{if(e.isMesh){let t;if(e.material.flatShading)switch(e.material.side){case oe:t=this.materialsFlatShadedDoubleSide;break;case re:t=this.materialsFlatShadedBackSide;break;default:t=this.materialsFlatShaded}else switch(e.material.side){case oe:t=this.materialsDoubleSide;break;case re:t=this.materialsBackSide;break;default:t=this.materials}this.originalMaterials.set(e,e.material),e.isSkinnedMesh?e.material=t[2]:e.isInstancedMesh?e.material=t[1]:e.material=t[0],++this.meshCount}}}cloneMaterial(e){if(!(e instanceof ae))return e.clone();const t=e.uniforms,n=new Map;for(const e in t){const i=t[e].value;i.isRenderTargetTexture&&(t[e].value=null,n.set(e,i))}const i=e.clone();for(const e of n)t[e[0]].value=e[1],i.uniforms[e[0]].value=e[1];return i}setMaterial(e){if(this.disposeMaterials(),this.material=e,null!==e){const t=this.materials=[this.cloneMaterial(e),this.cloneMaterial(e),this.cloneMaterial(e)];for(const n of t)n.uniforms=Object.assign({},e.uniforms),n.side=le;t[2].skinning=!0,this.materialsBackSide=t.map((t=>{const n=this.cloneMaterial(t);return n.uniforms=Object.assign({},e.uniforms),n.side=re,n})),this.materialsDoubleSide=t.map((t=>{const n=this.cloneMaterial(t);return n.uniforms=Object.assign({},e.uniforms),n.side=oe,n})),this.materialsFlatShaded=t.map((t=>{const n=this.cloneMaterial(t);return n.uniforms=Object.assign({},e.uniforms),n.flatShading=!0,n})),this.materialsFlatShadedBackSide=t.map((t=>{const n=this.cloneMaterial(t);return n.uniforms=Object.assign({},e.uniforms),n.flatShading=!0,n.side=re,n})),this.materialsFlatShadedDoubleSide=t.map((t=>{const n=this.cloneMaterial(t);return n.uniforms=Object.assign({},e.uniforms),n.flatShading=!0,n.side=oe,n}))}}render(e,t,n){const i=e.shadowMap.enabled;if(e.shadowMap.enabled=!1,Jr){const i=this.originalMaterials;this.meshCount=0,t.traverse(this.replaceMaterial),e.render(t,n);for(const e of i)e[0].material=e[1];this.meshCount!==i.size&&i.clear()}else{const i=t.overrideMaterial;t.overrideMaterial=this.material,e.render(t,n),t.overrideMaterial=i}e.shadowMap.enabled=i}disposeMaterials(){if(null!==this.material){const e=this.materials.concat(this.materialsBackSide).concat(this.materialsDoubleSide).concat(this.materialsFlatShaded).concat(this.materialsFlatShadedBackSide).concat(this.materialsFlatShadedDoubleSide);for(const t of e)t.dispose()}}dispose(){this.originalMaterials.clear(),this.disposeMaterials()}static get workaroundEnabled(){return Jr}static set workaroundEnabled(e){Jr=e}},eo=-1,to=class extends F{constructor(e,t=-1,n=-1,i=1){super(),this.resizable=e,this.baseSize=new f(1,1),this.preferredSize=new f(t,n),this.target=this.preferredSize,this.s=i,this.effectiveSize=new f,this.addEventListener("change",(()=>this.updateEffectiveSize())),this.updateEffectiveSize()}updateEffectiveSize(){const e=this.baseSize,t=this.preferredSize,n=this.effectiveSize,i=this.scale;t.width!==eo?n.width=t.width:t.height!==eo?n.width=Math.round(t.height*(e.width/Math.max(e.height,1))):n.width=Math.round(e.width*i),t.height!==eo?n.height=t.height:t.width!==eo?n.height=Math.round(t.width/Math.max(e.width/Math.max(e.height,1),1)):n.height=Math.round(e.height*i)}get width(){return this.effectiveSize.width}set width(e){this.preferredWidth=e}get height(){return this.effectiveSize.height}set height(e){this.preferredHeight=e}getWidth(){return this.width}getHeight(){return this.height}get scale(){return this.s}set scale(e){this.s!==e&&(this.s=e,this.preferredSize.setScalar(eo),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getScale(){return this.scale}setScale(e){this.scale=e}get baseWidth(){return this.baseSize.width}set baseWidth(e){this.baseSize.width!==e&&(this.baseSize.width=e,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getBaseWidth(){return this.baseWidth}setBaseWidth(e){this.baseWidth=e}get baseHeight(){return this.baseSize.height}set baseHeight(e){this.baseSize.height!==e&&(this.baseSize.height=e,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getBaseHeight(){return this.baseHeight}setBaseHeight(e){this.baseHeight=e}setBaseSize(e,t){this.baseSize.width===e&&this.baseSize.height===t||(this.baseSize.set(e,t),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}get preferredWidth(){return this.preferredSize.width}set preferredWidth(e){this.preferredSize.width!==e&&(this.preferredSize.width=e,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getPreferredWidth(){return this.preferredWidth}setPreferredWidth(e){this.preferredWidth=e}get preferredHeight(){return this.preferredSize.height}set preferredHeight(e){this.preferredSize.height!==e&&(this.preferredSize.height=e,this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}getPreferredHeight(){return this.preferredHeight}setPreferredHeight(e){this.preferredHeight=e}setPreferredSize(e,t){this.preferredSize.width===e&&this.preferredSize.height===t||(this.preferredSize.set(e,t),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height))}copy(e){this.s=e.scale,this.baseSize.set(e.baseWidth,e.baseHeight),this.preferredSize.set(e.preferredWidth,e.preferredHeight),this.dispatchEvent({type:"change"}),this.resizable.setSize(this.baseSize.width,this.baseSize.height)}static get AUTO_SIZE(){return eo}},no=class extends Set{constructor(e,t=10){super(),this.l=t,this.exclusive=!1,void 0!==e&&this.set(e)}get layer(){return this.l}set layer(e){const t=this.l;for(const n of this)n.layers.disable(t),n.layers.enable(e);this.l=e}getLayer(){return this.layer}setLayer(e){this.layer=e}isExclusive(){return this.exclusive}setExclusive(e){this.exclusive=e}clear(){const e=this.layer;for(const t of this)t.layers.disable(e);return super.clear()}set(e){this.clear();for(const t of e)this.add(t);return this}indexOf(e){return this.has(e)?0:-1}add(e){return this.exclusive?e.layers.set(this.layer):e.layers.enable(this.layer),super.add(e)}delete(e){return this.has(e)&&e.layers.disable(this.layer),super.delete(e)}toggle(e){let t;return this.has(e)?(this.delete(e),t=!1):(this.add(e),t=!0),t}setVisible(e){for(const t of this)e?t.layers.enable(0):t.layers.disable(0);return this}},io=0,so=1,ro=9,oo=23,ao=28,lo=30,co=new Map([[io,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x+y,opacity);}"],[so,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y,min(y.a,opacity));}"],[2,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,(x+y)*0.5,opacity);}"],[3,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(yHSL.rg,xHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}"],[4,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(step(0.0,y)*(1.0-min(vec4(1.0),(1.0-x)/y)),vec4(1.0),step(1.0,x));return mix(x,z,opacity);}"],[5,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=step(0.0,x)*mix(min(vec4(1.0),x/max(1.0-y,1e-9)),vec4(1.0),step(1.0,y));return mix(x,z,opacity);}"],[6,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,min(x,y),opacity);}"],[7,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,abs(x-y),opacity);}"],[8,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x/max(y,1e-12),opacity);}"],[ro,null],[10,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,(x+y-2.0*x*y),opacity);}"],[11,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 a=min(x,1.0),b=min(y,1.0);vec4 z=mix(2.0*a*b,1.0-2.0*(1.0-a)*(1.0-b),step(0.5,y));return mix(x,z,opacity);}"],[12,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,step(1.0,x+y),opacity);}"],[13,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(yHSL.r,xHSL.gb));return vec4(mix(x.rgb,z,opacity),y.a);}"],[14,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,1.0-y,opacity);}"],[15,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y*(1.0-x),opacity);}"],[16,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,max(x,y),opacity);}"],[17,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,clamp(y+x-1.0,0.0,1.0),opacity);}"],[18,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,min(x+y,1.0),opacity);}"],[19,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,clamp(2.0*y+x-1.0,0.0,1.0),opacity);}"],[20,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(xHSL.rg,yHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}"],[21,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x*y,opacity);}"],[22,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,1.0-abs(1.0-x-y),opacity);}"],[oo,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,y,opacity);}"],[24,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(2.0*y*x,1.0-2.0*(1.0-y)*(1.0-x),step(0.5,x));return mix(x,z,opacity);}"],[25,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 y2=2.0*y;vec4 z=mix(mix(y2,x,step(0.5*x,y)),max(vec4(0.0),y2-1.0),step(x,(y2-1.0)));return mix(x,z,opacity);}"],[26,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(min(x*x/max(1.0-y,1e-12),1.0),y,step(1.0,y));return mix(x,z,opacity);}"],[27,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec3 xHSL=RGBToHSL(x.rgb);vec3 yHSL=RGBToHSL(y.rgb);vec3 z=HSLToRGB(vec3(xHSL.r,yHSL.g,xHSL.b));return vec4(mix(x.rgb,z,opacity),y.a);}"],[ao,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,x+y-min(x*y,1.0),opacity);}"],[29,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 y2=2.0*y;vec4 w=step(0.5,y);vec4 z=mix(x-(1.0-y2)*x*(1.0-x),mix(x+(y2-1.0)*(sqrt(x)-x),x+(y2-1.0)*x*((16.0*x-12.0)*x+3.0),w*(1.0-step(0.25,x))),w);return mix(x,z,opacity);}"],[lo,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return y;}"],[31,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){return mix(x,max(x+y-1.0,0.0),opacity);}"],[32,"vec4 blend(const in vec4 x,const in vec4 y,const in float opacity){vec4 z=mix(max(1.0-min((1.0-x)/(2.0*y),1.0),0.0),min(x/(2.0*(1.0-y)),1.0),step(0.5,y));return mix(x,z,opacity);}"]]),ho=class extends F{constructor(e,t=1){super(),this._blendFunction=e,this.opacity=new Z(t)}getOpacity(){return this.opacity.value}setOpacity(e){this.opacity.value=e}get blendFunction(){return this._blendFunction}set blendFunction(e){this._blendFunction=e,this.dispatchEvent({type:"change"})}getBlendFunction(){return this.blendFunction}setBlendFunction(e){this.blendFunction=e}getShaderCode(){return co.get(this.blendFunction)}},uo=0,po=2,fo=3,mo=[new Float32Array([0,0]),new Float32Array([0,1,1]),new Float32Array([0,1,1,2]),new Float32Array([0,1,2,2,3]),new Float32Array([0,1,2,3,4,4,5]),new Float32Array([0,1,2,3,4,5,7,8,9,10])],go=class extends ae{constructor(e=new ve){super({name:"KawaseBlurMaterial",uniforms:{inputBuffer:new Z(null),texelSize:new Z(new ve),scale:new Z(1),kernel:new Z(0)},blending:ue,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\nvarying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec4 sum=texture2D(inputBuffer,vUv0);sum+=texture2D(inputBuffer,vUv1);sum+=texture2D(inputBuffer,vUv2);sum+=texture2D(inputBuffer,vUv3);gl_FragColor=sum*0.25;\n#include \n}",vertexShader:"uniform vec4 texelSize;uniform float kernel;uniform float scale;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vec2 dUv=(texelSize.xy*vec2(kernel)+texelSize.zw)*scale;vUv0=vec2(uv.x-dUv.x,uv.y+dUv.y);vUv1=vec2(uv.x+dUv.x,uv.y+dUv.y);vUv2=vec2(uv.x+dUv.x,uv.y-dUv.y);vUv3=vec2(uv.x-dUv.x,uv.y-dUv.y);gl_Position=vec4(position.xy,1.0,1.0);}"}),this.setTexelSize(e.x,e.y),this.kernelSize=po}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.inputBuffer=e}get kernelSequence(){return mo[this.kernelSize]}get scale(){return this.uniforms.scale.value}set scale(e){this.uniforms.scale.value=e}getScale(){return this.uniforms.scale.value}setScale(e){this.uniforms.scale.value=e}getKernel(){return null}get kernel(){return this.uniforms.kernel.value}set kernel(e){this.uniforms.kernel.value=e}setKernel(e){this.kernel=e}setTexelSize(e,t){this.uniforms.texelSize.value.set(e,t,.5*e,.5*t)}setSize(e,t){const n=1/e,i=1/t;this.uniforms.texelSize.value.set(n,i,.5*n,.5*i)}},vo=class extends Nr{constructor({kernelSize:e=po,resolutionScale:t=.5,width:n=to.AUTO_SIZE,height:i=to.AUTO_SIZE,resolutionX:s=n,resolutionY:r=i}={}){super("KawaseBlurPass"),this.renderTargetA=new X(1,1,{depthBuffer:!1}),this.renderTargetA.texture.name="Blur.Target.A",this.renderTargetB=this.renderTargetA.clone(),this.renderTargetB.texture.name="Blur.Target.B";const o=this.resolution=new to(this,s,r,t);o.addEventListener("change",(e=>this.setSize(o.baseWidth,o.baseHeight))),this._blurMaterial=new go,this._blurMaterial.kernelSize=e,this.copyMaterial=new Vr}getResolution(){return this.resolution}get blurMaterial(){return this._blurMaterial}set blurMaterial(e){this._blurMaterial=e}get dithering(){return this.copyMaterial.dithering}set dithering(e){this.copyMaterial.dithering=e}get kernelSize(){return this.blurMaterial.kernelSize}set kernelSize(e){this.blurMaterial.kernelSize=e}get width(){return this.resolution.width}set width(e){this.resolution.preferredWidth=e}get height(){return this.resolution.height}set height(e){this.resolution.preferredHeight=e}get scale(){return this.blurMaterial.scale}set scale(e){this.blurMaterial.scale=e}getScale(){return this.blurMaterial.scale}setScale(e){this.blurMaterial.scale=e}getKernelSize(){return this.kernelSize}setKernelSize(e){this.kernelSize=e}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}render(e,t,n,i,s){const r=this.scene,o=this.camera,a=this.renderTargetA,l=this.renderTargetB,c=this.blurMaterial,h=c.kernelSequence;let u=t;this.fullscreenMaterial=c;for(let t=0,n=h.length;t\n#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\n#ifdef RANGE\nuniform vec2 range;\n#elif defined(THRESHOLD)\nuniform float threshold;uniform float smoothing;\n#endif\nvarying vec2 vUv;void main(){vec4 texel=texture2D(inputBuffer,vUv);float l=luminance(texel.rgb);\n#ifdef RANGE\nfloat low=step(range.x,l);float high=step(l,range.y);l*=low*high;\n#elif defined(THRESHOLD)\nl=smoothstep(threshold,threshold+smoothing,l)*l;\n#endif\n#ifdef COLOR\ngl_FragColor=vec4(texel.rgb*clamp(l,0.0,1.0),l);\n#else\ngl_FragColor=vec4(l);\n#endif\n}",vertexShader:Hr}),this.colorOutput=e,this.luminanceRange=t}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}get threshold(){return this.uniforms.threshold.value}set threshold(e){this.smoothing>0||e>0?this.defines.THRESHOLD="1":delete this.defines.THRESHOLD,this.uniforms.threshold.value=e}getThreshold(){return this.threshold}setThreshold(e){this.threshold=e}get smoothing(){return this.uniforms.smoothing.value}set smoothing(e){this.threshold>0||e>0?this.defines.THRESHOLD="1":delete this.defines.THRESHOLD,this.uniforms.smoothing.value=e}getSmoothingFactor(){return this.smoothing}setSmoothingFactor(e){this.smoothing=e}get useThreshold(){return this.threshold>0||this.smoothing>0}set useThreshold(e){}get colorOutput(){return void 0!==this.defines.COLOR}set colorOutput(e){e?this.defines.COLOR="1":delete this.defines.COLOR,this.needsUpdate=!0}isColorOutputEnabled(e){return this.colorOutput}setColorOutputEnabled(e){this.colorOutput=e}get useRange(){return null!==this.luminanceRange}set useRange(e){this.luminanceRange=null}get luminanceRange(){return this.uniforms.range.value}set luminanceRange(e){null!==e?this.defines.RANGE="1":delete this.defines.RANGE,this.uniforms.range.value=e,this.needsUpdate=!0}getLuminanceRange(){return this.luminanceRange}setLuminanceRange(e){this.luminanceRange=e}},wo=class extends Nr{constructor({renderTarget:e,luminanceRange:t,colorOutput:n,resolutionScale:i=1,width:s=to.AUTO_SIZE,height:r=to.AUTO_SIZE,resolutionX:o=s,resolutionY:a=r}={}){super("LuminancePass"),this.fullscreenMaterial=new yo(n,t),this.needsSwap=!1,this.renderTarget=e,void 0===this.renderTarget&&(this.renderTarget=new X(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="LuminancePass.Target");const l=this.resolution=new to(this,o,a,i);l.addEventListener("change",(e=>this.setSize(l.baseWidth,l.baseHeight)))}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}render(e,t,n,i,s){this.fullscreenMaterial.inputBuffer=t.texture,e.setRenderTarget(this.renderToScreen?null:this.renderTarget),e.render(this.scene,this.camera)}setSize(e,t){const n=this.resolution;n.setBaseSize(e,t),this.renderTarget.setSize(n.width,n.height)}initialize(e,t,n){void 0!==n&&n!==V&&(this.renderTarget.texture.type=n,this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}},xo=class extends ae{constructor(){super({name:"DownsamplingMaterial",uniforms:{inputBuffer:new Z(null),texelSize:new Z(new f)},blending:ue,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\n#define WEIGHT_INNER 0.125\n#define WEIGHT_OUTER 0.0555555\nvarying vec2 vUv;varying vec2 vUv00;varying vec2 vUv01;varying vec2 vUv02;varying vec2 vUv03;varying vec2 vUv04;varying vec2 vUv05;varying vec2 vUv06;varying vec2 vUv07;varying vec2 vUv08;varying vec2 vUv09;varying vec2 vUv10;varying vec2 vUv11;float clampToBorder(const in vec2 uv){return float(uv.s>=0.0&&uv.s<=1.0&&uv.t>=0.0&&uv.t<=1.0);}void main(){vec4 c=vec4(0.0);vec4 w=WEIGHT_INNER*vec4(clampToBorder(vUv00),clampToBorder(vUv01),clampToBorder(vUv02),clampToBorder(vUv03));c+=w.x*texture2D(inputBuffer,vUv00);c+=w.y*texture2D(inputBuffer,vUv01);c+=w.z*texture2D(inputBuffer,vUv02);c+=w.w*texture2D(inputBuffer,vUv03);w=WEIGHT_OUTER*vec4(clampToBorder(vUv04),clampToBorder(vUv05),clampToBorder(vUv06),clampToBorder(vUv07));c+=w.x*texture2D(inputBuffer,vUv04);c+=w.y*texture2D(inputBuffer,vUv05);c+=w.z*texture2D(inputBuffer,vUv06);c+=w.w*texture2D(inputBuffer,vUv07);w=WEIGHT_OUTER*vec4(clampToBorder(vUv08),clampToBorder(vUv09),clampToBorder(vUv10),clampToBorder(vUv11));c+=w.x*texture2D(inputBuffer,vUv08);c+=w.y*texture2D(inputBuffer,vUv09);c+=w.z*texture2D(inputBuffer,vUv10);c+=w.w*texture2D(inputBuffer,vUv11);c+=WEIGHT_OUTER*texture2D(inputBuffer,vUv);gl_FragColor=c;\n#include \n}",vertexShader:"uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv00;varying vec2 vUv01;varying vec2 vUv02;varying vec2 vUv03;varying vec2 vUv04;varying vec2 vUv05;varying vec2 vUv06;varying vec2 vUv07;varying vec2 vUv08;varying vec2 vUv09;varying vec2 vUv10;varying vec2 vUv11;void main(){vUv=position.xy*0.5+0.5;vUv00=vUv+texelSize*vec2(-1.0,1.0);vUv01=vUv+texelSize*vec2(1.0,1.0);vUv02=vUv+texelSize*vec2(-1.0,-1.0);vUv03=vUv+texelSize*vec2(1.0,-1.0);vUv04=vUv+texelSize*vec2(-2.0,2.0);vUv05=vUv+texelSize*vec2(0.0,2.0);vUv06=vUv+texelSize*vec2(2.0,2.0);vUv07=vUv+texelSize*vec2(-2.0,0.0);vUv08=vUv+texelSize*vec2(2.0,0.0);vUv09=vUv+texelSize*vec2(-2.0,-2.0);vUv10=vUv+texelSize*vec2(0.0,-2.0);vUv11=vUv+texelSize*vec2(2.0,-2.0);gl_Position=vec4(position.xy,1.0,1.0);}"})}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}},Ao=class extends ae{constructor(){super({name:"UpsamplingMaterial",uniforms:{inputBuffer:new Z(null),supportBuffer:new Z(null),texelSize:new Z(new f),radius:new Z(.85)},blending:ue,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;uniform mediump sampler2D supportBuffer;\n#else\nuniform lowp sampler2D inputBuffer;uniform lowp sampler2D supportBuffer;\n#endif\nuniform float radius;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;varying vec2 vUv6;varying vec2 vUv7;void main(){vec4 c=vec4(0.0);c+=texture2D(inputBuffer,vUv0)*0.0625;c+=texture2D(inputBuffer,vUv1)*0.125;c+=texture2D(inputBuffer,vUv2)*0.0625;c+=texture2D(inputBuffer,vUv3)*0.125;c+=texture2D(inputBuffer,vUv)*0.25;c+=texture2D(inputBuffer,vUv4)*0.125;c+=texture2D(inputBuffer,vUv5)*0.0625;c+=texture2D(inputBuffer,vUv6)*0.125;c+=texture2D(inputBuffer,vUv7)*0.0625;vec4 baseColor=texture2D(supportBuffer,vUv);gl_FragColor=mix(baseColor,c,radius);\n#include \n}",vertexShader:"uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;varying vec2 vUv6;varying vec2 vUv7;void main(){vUv=position.xy*0.5+0.5;vUv0=vUv+texelSize*vec2(-1.0,1.0);vUv1=vUv+texelSize*vec2(0.0,1.0);vUv2=vUv+texelSize*vec2(1.0,1.0);vUv3=vUv+texelSize*vec2(-1.0,0.0);vUv4=vUv+texelSize*vec2(1.0,0.0);vUv5=vUv+texelSize*vec2(-1.0,-1.0);vUv6=vUv+texelSize*vec2(0.0,-1.0);vUv7=vUv+texelSize*vec2(1.0,-1.0);gl_Position=vec4(position.xy,1.0,1.0);}"})}set inputBuffer(e){this.uniforms.inputBuffer.value=e}set supportBuffer(e){this.uniforms.supportBuffer.value=e}get radius(){return this.uniforms.radius.value}set radius(e){this.uniforms.radius.value=e}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}},bo=class extends Nr{constructor(){super("MipmapBlurPass"),this.needsSwap=!1,this.renderTarget=new X(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="Upsampling.Mipmap0",this.downsamplingMipmaps=[],this.upsamplingMipmaps=[],this.downsamplingMaterial=new xo,this.upsamplingMaterial=new Ao,this.resolution=new f}get texture(){return this.renderTarget.texture}get levels(){return this.downsamplingMipmaps.length}set levels(e){if(this.levels!==e){const t=this.renderTarget;this.dispose(),this.downsamplingMipmaps=[],this.upsamplingMipmaps=[];for(let n=0;n=0;--t){const n=h[t];l.setSize(u.width,u.height),l.inputBuffer=u.texture,l.supportBuffer=c[t].texture,e.setRenderTarget(n),e.render(r,o),u=n}}setSize(e,t){const n=this.resolution;n.set(e,t);let i=n.width,s=n.height;for(let e=0,t=this.downsamplingMipmaps.length;ethis.setChanged())),this._inputColorSpace=ce,this._outputColorSpace=he}get inputColorSpace(){return this._inputColorSpace}set inputColorSpace(e){this._inputColorSpace=e,this.setChanged()}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e,this.setChanged()}set mainScene(e){}set mainCamera(e){}getName(){return this.name}setRenderer(e){this.renderer=e}getDefines(){return this.defines}getUniforms(){return this.uniforms}getExtensions(){return this.extensions}getBlendMode(){return this.blendMode}getAttributes(){return this.attributes}setAttributes(e){this.attributes=e,this.setChanged()}getFragmentShader(){return this.fragmentShader}setFragmentShader(e){this.fragmentShader=e,this.setChanged()}getVertexShader(){return this.vertexShader}setVertexShader(e){this.vertexShader=e,this.setChanged()}setChanged(){this.dispatchEvent({type:"change"})}setDepthTexture(e,t=te){}update(e,t,n){}setSize(e,t){}initialize(e,t,n){}dispose(){for(const e of Object.keys(this)){const t=this[e];(t instanceof X||t instanceof ge||t instanceof d||t instanceof Nr)&&this[e].dispose()}}},So=class extends To{constructor({blendFunction:e=ao,luminanceThreshold:t=.9,luminanceSmoothing:n=.025,mipmapBlur:i=!1,intensity:s=1,radius:r=.85,levels:o=8,kernelSize:a=fo,resolutionScale:l=.5,width:c=to.AUTO_SIZE,height:h=to.AUTO_SIZE,resolutionX:u=c,resolutionY:d=h}={}){super("BloomEffect","#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D map;\n#else\nuniform lowp sampler2D map;\n#endif\nuniform float intensity;void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec4 texel=texture2D(map,uv);outputColor=vec4(texel.rgb*intensity,texel.a);}",{blendFunction:e,uniforms:new Map([["map",new Z(null)],["intensity",new Z(s)]])}),this.renderTarget=new X(1,1,{depthBuffer:!1}),this.renderTarget.texture.name="Bloom.Target",this.blurPass=new vo({kernelSize:a}),this.luminancePass=new wo({colorOutput:!0}),this.luminanceMaterial.threshold=t,this.luminanceMaterial.smoothing=n,this.mipmapBlurPass=new bo,this.mipmapBlurPass.enabled=i,this.mipmapBlurPass.radius=r,this.mipmapBlurPass.levels=o,this.uniforms.get("map").value=i?this.mipmapBlurPass.texture:this.renderTarget.texture;const p=this.resolution=new to(this,u,d,l);p.addEventListener("change",(e=>this.setSize(p.baseWidth,p.baseHeight)))}get texture(){return this.mipmapBlurPass.enabled?this.mipmapBlurPass.texture:this.renderTarget.texture}getTexture(){return this.texture}getResolution(){return this.resolution}getBlurPass(){return this.blurPass}getLuminancePass(){return this.luminancePass}get luminanceMaterial(){return this.luminancePass.fullscreenMaterial}getLuminanceMaterial(){return this.luminancePass.fullscreenMaterial}get width(){return this.resolution.width}set width(e){this.resolution.preferredWidth=e}get height(){return this.resolution.height}set height(e){this.resolution.preferredHeight=e}get dithering(){return this.blurPass.dithering}set dithering(e){this.blurPass.dithering=e}get kernelSize(){return this.blurPass.kernelSize}set kernelSize(e){this.blurPass.kernelSize=e}get distinction(){return console.warn(this.name,"distinction was removed"),1}set distinction(e){console.warn(this.name,"distinction was removed")}get intensity(){return this.uniforms.get("intensity").value}set intensity(e){this.uniforms.get("intensity").value=e}getIntensity(){return this.intensity}setIntensity(e){this.intensity=e}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}update(e,t,n){const i=this.renderTarget,s=this.luminancePass;s.enabled?(s.render(e,t),this.mipmapBlurPass.enabled?this.mipmapBlurPass.render(e,s.renderTarget):this.blurPass.render(e,s.renderTarget,i)):this.mipmapBlurPass.enabled?this.mipmapBlurPass.render(e,t):this.blurPass.render(e,t,i)}setSize(e,t){const n=this.resolution;n.setBaseSize(e,t),this.renderTarget.setSize(n.width,n.height),this.blurPass.resolution.copy(n),this.luminancePass.setSize(e,t),this.mipmapBlurPass.setSize(e,t)}initialize(e,t,n){this.blurPass.initialize(e,t,n),this.luminancePass.initialize(e,t,n),this.mipmapBlurPass.initialize(e,t,n),void 0!==n&&(this.renderTarget.texture.type=n,null!==e&&e.outputColorSpace===_&&(this.renderTarget.texture.colorSpace=_))}},Do=class extends Nr{constructor(e,t="inputBuffer"){super("ShaderPass"),this.fullscreenMaterial=e,this.input=t}setInput(e){this.input=e}render(e,t,n,i,s){const r=this.fullscreenMaterial.uniforms;null!==t&&void 0!==r&&void 0!==r[this.input]&&(r[this.input].value=t.texture),e.setRenderTarget(this.renderToScreen?null:n),e.render(this.scene,this.camera)}initialize(e,t,n){void 0!==n&&n!==V&&(this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}},Eo=class extends Nr{constructor(e,t,n=null){super("RenderPass",e,t),this.needsSwap=!1,this.clearPass=new Wr,this.overrideMaterialManager=null===n?null:new $r(n),this.ignoreBackground=!1,this.skipShadowMapUpdate=!1,this.selection=null}set mainScene(e){this.scene=e}set mainCamera(e){this.camera=e}get renderToScreen(){return super.renderToScreen}set renderToScreen(e){super.renderToScreen=e,this.clearPass.renderToScreen=e}get overrideMaterial(){const e=this.overrideMaterialManager;return null!==e?e.material:null}set overrideMaterial(e){const t=this.overrideMaterialManager;null!==e?null!==t?t.setMaterial(e):this.overrideMaterialManager=new $r(e):null!==t&&(t.dispose(),this.overrideMaterialManager=null)}getOverrideMaterial(){return this.overrideMaterial}setOverrideMaterial(e){this.overrideMaterial=e}get clear(){return this.clearPass.enabled}set clear(e){this.clearPass.enabled=e}getSelection(){return this.selection}setSelection(e){this.selection=e}isBackgroundDisabled(){return this.ignoreBackground}setBackgroundDisabled(e){this.ignoreBackground=e}isShadowMapDisabled(){return this.skipShadowMapUpdate}setShadowMapDisabled(e){this.skipShadowMapUpdate=e}getClearPass(){return this.clearPass}render(e,t,n,i,s){const r=this.scene,o=this.camera,a=this.selection,l=o.layers.mask,c=r.background,h=e.shadowMap.autoUpdate,u=this.renderToScreen?null:t;null!==a&&o.layers.set(a.getLayer()),this.skipShadowMapUpdate&&(e.shadowMap.autoUpdate=!1),(this.ignoreBackground||null!==this.clearPass.overrideClearColor)&&(r.background=null),this.clearPass.enabled&&this.clearPass.render(e,t),e.setRenderTarget(u),null!==this.overrideMaterialManager?this.overrideMaterialManager.render(e,r,o):e.render(r,o),o.layers.mask=l,r.background=c,e.shadowMap.autoUpdate=h}},Co=2,Mo=0,Po=0,Oo=1,Bo=2,Io=3,Lo=0,Ro=1,Fo=2,Uo=3,zo=5,ko=6,jo=7,No=8,Go=class extends ae{constructor(e=null,t){super({name:"DepthComparisonMaterial",defines:{DEPTH_PACKING:"0"},uniforms:{depthBuffer:new Z(null),cameraNear:new Z(.3),cameraFar:new Z(1e3)},blending:ue,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#include \n#include \n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\nuniform float cameraNear;uniform float cameraFar;centroid varying float vViewZ;centroid varying vec4 vProjTexCoord;void main(){\n#include \nvec2 projTexCoord=(vProjTexCoord.xy/vProjTexCoord.w)*0.5+0.5;projTexCoord=clamp(projTexCoord,0.002,0.998);\n#if DEPTH_PACKING == 3201\nfloat fragCoordZ=unpackRGBAToDepth(texture2D(depthBuffer,projTexCoord));\n#else\nfloat fragCoordZ=texture2D(depthBuffer,projTexCoord).r;\n#endif\n#ifdef PERSPECTIVE_CAMERA\nfloat viewZ=perspectiveDepthToViewZ(fragCoordZ,cameraNear,cameraFar);\n#else\nfloat viewZ=orthographicDepthToViewZ(fragCoordZ,cameraNear,cameraFar);\n#endif\nfloat depthTest=(-vViewZ>-viewZ)?1.0:0.0;gl_FragColor.rg=vec2(0.0,depthTest);}",vertexShader:"#include \n#include \n#include \n#include \nvarying float vViewZ;varying vec4 vProjTexCoord;void main(){\n#include \n#include \n#include \n#include \n#include \nvViewZ=mvPosition.z;vProjTexCoord=gl_Position;\n#include \n}"}),this.depthBuffer=e,this.depthPacking=de,this.copyCameraSettings(t)}set depthBuffer(e){this.uniforms.depthBuffer.value=e}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e,t=de){this.depthBuffer=e,this.depthPacking=t}adoptCameraSettings(e){this.copyCameraSettings(e)}copyCameraSettings(e){e&&(this.uniforms.cameraNear.value=e.near,this.uniforms.cameraFar.value=e.far,e instanceof pe?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}},Ho=class extends ae{constructor(e=new f){super({name:"OutlineMaterial",uniforms:{inputBuffer:new Z(null),texelSize:new Z(new f)},blending:ue,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"uniform lowp sampler2D inputBuffer;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 c0=texture2D(inputBuffer,vUv0).rg;vec2 c1=texture2D(inputBuffer,vUv1).rg;vec2 c2=texture2D(inputBuffer,vUv2).rg;vec2 c3=texture2D(inputBuffer,vUv3).rg;float d0=(c0.x-c1.x)*0.5;float d1=(c2.x-c3.x)*0.5;float d=length(vec2(d0,d1));float a0=min(c0.y,c1.y);float a1=min(c2.y,c3.y);float visibilityFactor=min(a0,a1);gl_FragColor.rg=(1.0-visibilityFactor>0.001)?vec2(d,0.0):vec2(0.0,d);}",vertexShader:"uniform vec2 texelSize;varying vec2 vUv0;varying vec2 vUv1;varying vec2 vUv2;varying vec2 vUv3;void main(){vec2 uv=position.xy*0.5+0.5;vUv0=vec2(uv.x+texelSize.x,uv.y);vUv1=vec2(uv.x-texelSize.x,uv.y);vUv2=vec2(uv.x,uv.y+texelSize.y);vUv3=vec2(uv.x,uv.y-texelSize.y);gl_Position=vec4(position.xy,1.0,1.0);}"}),this.uniforms.texelSize.value.set(e.x,e.y),this.uniforms.maskTexture=this.uniforms.inputBuffer}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}setTexelSize(e,t){this.uniforms.texelSize.value.set(e,t)}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}},Vo=class extends Nr{constructor(e,t,{renderTarget:n,resolutionScale:i=1,width:s=to.AUTO_SIZE,height:r=to.AUTO_SIZE,resolutionX:o=s,resolutionY:a=r}={}){super("DepthPass"),this.needsSwap=!1,this.renderPass=new Eo(e,t,new fe({depthPacking:de}));const l=this.renderPass;l.skipShadowMapUpdate=!0,l.ignoreBackground=!0;const c=l.clearPass;c.overrideClearColor=new u(16777215),c.overrideClearAlpha=1,this.renderTarget=n,void 0===this.renderTarget&&(this.renderTarget=new X(1,1,{minFilter:$,magFilter:$}),this.renderTarget.texture.name="DepthPass.Target");const h=this.resolution=new to(this,o,a,i);h.addEventListener("change",(e=>this.setSize(h.baseWidth,h.baseHeight)))}set mainScene(e){this.renderPass.mainScene=e}set mainCamera(e){this.renderPass.mainCamera=e}get texture(){return this.renderTarget.texture}getTexture(){return this.renderTarget.texture}getResolution(){return this.resolution}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}render(e,t,n,i,s){const r=this.renderToScreen?null:this.renderTarget;this.renderPass.render(e,r)}setSize(e,t){const n=this.resolution;n.setBaseSize(e,t),this.renderTarget.setSize(n.width,n.height)}},_o=class extends To{constructor(e,t,{blendFunction:n=ao,patternTexture:i=null,patternScale:s=1,edgeStrength:r=1,pulseSpeed:o=0,visibleEdgeColor:a=16777215,hiddenEdgeColor:l=2230538,kernelSize:c=uo,blur:h=!1,xRay:d=!0,multisampling:p=0,resolutionScale:f=.5,width:m=to.AUTO_SIZE,height:g=to.AUTO_SIZE,resolutionX:v=m,resolutionY:y=g}={}){super("OutlineEffect","uniform lowp sampler2D edgeTexture;uniform lowp sampler2D maskTexture;uniform vec3 visibleEdgeColor;uniform vec3 hiddenEdgeColor;uniform float pulse;uniform float edgeStrength;\n#ifdef USE_PATTERN\nuniform lowp sampler2D patternTexture;varying vec2 vUvPattern;\n#endif\nvoid mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec2 edge=texture2D(edgeTexture,uv).rg;vec2 mask=texture2D(maskTexture,uv).rg;\n#ifndef X_RAY\nedge.y=0.0;\n#endif\nedge*=(edgeStrength*mask.x*pulse);vec3 color=edge.x*visibleEdgeColor+edge.y*hiddenEdgeColor;float visibilityFactor=0.0;\n#ifdef USE_PATTERN\nvec4 patternColor=texture2D(patternTexture,vUvPattern);\n#ifdef X_RAY\nfloat hiddenFactor=0.5;\n#else\nfloat hiddenFactor=0.0;\n#endif\nvisibilityFactor=(1.0-mask.y>0.0)?1.0:hiddenFactor;visibilityFactor*=(1.0-mask.x)*patternColor.a;color+=visibilityFactor*patternColor.rgb;\n#endif\nfloat alpha=max(max(edge.x,edge.y),visibilityFactor);\n#ifdef ALPHA\noutputColor=vec4(color,alpha);\n#else\noutputColor=vec4(color,max(alpha,inputColor.a));\n#endif\n}",{uniforms:new Map([["maskTexture",new Z(null)],["edgeTexture",new Z(null)],["edgeStrength",new Z(r)],["visibleEdgeColor",new Z(new u(a))],["hiddenEdgeColor",new Z(new u(l))],["pulse",new Z(1)],["patternScale",new Z(s)],["patternTexture",new Z(null)]])}),this.blendMode.addEventListener("change",(e=>{this.blendMode.blendFunction===so?this.defines.set("ALPHA","1"):this.defines.delete("ALPHA"),this.setChanged()})),this.blendMode.blendFunction=n,this.patternTexture=i,this.xRay=d,this.scene=e,this.camera=t,this.renderTargetMask=new X(1,1),this.renderTargetMask.samples=p,this.renderTargetMask.texture.name="Outline.Mask",this.uniforms.get("maskTexture").value=this.renderTargetMask.texture,this.renderTargetOutline=new X(1,1,{depthBuffer:!1}),this.renderTargetOutline.texture.name="Outline.Edges",this.uniforms.get("edgeTexture").value=this.renderTargetOutline.texture,this.clearPass=new Wr,this.clearPass.overrideClearColor=new u(0),this.clearPass.overrideClearAlpha=1,this.depthPass=new Vo(e,t),this.maskPass=new Eo(e,t,new Go(this.depthPass.texture,t));const w=this.maskPass.clearPass;w.overrideClearColor=new u(16777215),w.overrideClearAlpha=1,this.blurPass=new vo({resolutionScale:f,resolutionX:v,resolutionY:y,kernelSize:c}),this.blurPass.enabled=h;const x=this.blurPass.resolution;x.addEventListener("change",(e=>this.setSize(x.baseWidth,x.baseHeight))),this.outlinePass=new Do(new Ho);this.outlinePass.fullscreenMaterial.inputBuffer=this.renderTargetMask.texture,this.time=0,this.forceUpdate=!0,this.selection=new no,this.selection.layer=10,this.pulseSpeed=o}set mainScene(e){this.scene=e,this.depthPass.mainScene=e,this.maskPass.mainScene=e}set mainCamera(e){this.camera=e,this.depthPass.mainCamera=e,this.maskPass.mainCamera=e,this.maskPass.overrideMaterial.copyCameraSettings(e)}get resolution(){return this.blurPass.resolution}getResolution(){return this.blurPass.getResolution()}get multisampling(){return this.renderTargetMask.samples}set multisampling(e){this.renderTargetMask.samples=e,this.renderTargetMask.dispose()}get patternScale(){return this.uniforms.get("patternScale").value}set patternScale(e){this.uniforms.get("patternScale").value=e}get edgeStrength(){return this.uniforms.get("edgeStrength").value}set edgeStrength(e){this.uniforms.get("edgeStrength").value=e}get visibleEdgeColor(){return this.uniforms.get("visibleEdgeColor").value}set visibleEdgeColor(e){this.uniforms.get("visibleEdgeColor").value=e}get hiddenEdgeColor(){return this.uniforms.get("hiddenEdgeColor").value}set hiddenEdgeColor(e){this.uniforms.get("hiddenEdgeColor").value=e}getBlurPass(){return this.blurPass}getSelection(){return this.selection}getPulseSpeed(){return this.pulseSpeed}setPulseSpeed(e){this.pulseSpeed=e}get width(){return this.resolution.width}set width(e){this.resolution.preferredWidth=e}get height(){return this.resolution.height}set height(e){this.resolution.preferredHeight=e}get selectionLayer(){return this.selection.layer}set selectionLayer(e){this.selection.layer=e}get dithering(){return this.blurPass.dithering}set dithering(e){this.blurPass.dithering=e}get kernelSize(){return this.blurPass.kernelSize}set kernelSize(e){this.blurPass.kernelSize=e}get blur(){return this.blurPass.enabled}set blur(e){this.blurPass.enabled=e}get xRay(){return this.defines.has("X_RAY")}set xRay(e){this.xRay!==e&&(e?this.defines.set("X_RAY","1"):this.defines.delete("X_RAY"),this.setChanged())}isXRayEnabled(){return this.xRay}setXRayEnabled(e){this.xRay=e}get patternTexture(){return this.uniforms.get("patternTexture").value}set patternTexture(e){null!==e?(e.wrapS=e.wrapT=q,this.defines.set("USE_PATTERN","1"),this.setVertexShader("uniform float patternScale;varying vec2 vUvPattern;void mainSupport(const in vec2 uv){vUvPattern=uv*vec2(aspect,1.0)*patternScale;}")):(this.defines.delete("USE_PATTERN"),this.setVertexShader(null)),this.uniforms.get("patternTexture").value=e,this.setChanged()}setPatternTexture(e){this.patternTexture=e}getResolutionScale(){return this.resolution.scale}setResolutionScale(e){this.resolution.scale=e}setSelection(e){return this.selection.set(e),this}clearSelection(){return this.selection.clear(),this}selectObject(e){return this.selection.add(e),this}deselectObject(e){return this.selection.delete(e),this}update(e,t,n){const i=this.scene,s=this.camera,r=this.selection,o=this.uniforms.get("pulse"),a=i.background,l=s.layers.mask;(this.forceUpdate||r.size>0)&&(i.background=null,o.value=1,this.pulseSpeed>0&&(o.value=.375*Math.cos(this.time*this.pulseSpeed*10)+.625),this.time+=n,r.setVisible(!1),this.depthPass.render(e),r.setVisible(!0),s.layers.set(r.layer),this.maskPass.render(e,this.renderTargetMask),s.layers.mask=l,i.background=a,this.outlinePass.render(e,null,this.renderTargetOutline),this.blurPass.enabled&&this.blurPass.render(e,this.renderTargetOutline,this.renderTargetOutline)),this.forceUpdate=r.size>0}setSize(e,t){this.blurPass.setSize(e,t),this.renderTargetMask.setSize(e,t);const n=this.resolution;n.setBaseSize(e,t);const i=n.width,s=n.height;this.depthPass.setSize(i,s),this.renderTargetOutline.setSize(i,s),this.outlinePass.fullscreenMaterial.setSize(i,s)}initialize(e,t,n){this.blurPass.initialize(e,t,V),void 0!==n&&(this.depthPass.initialize(e,t,n),this.maskPass.initialize(e,t,n),this.outlinePass.initialize(e,t,n))}},Qo=class extends ae{constructor(e=new f,t=Co){super({name:"EdgeDetectionMaterial",defines:{THREE_REVISION:ie.replace(/\D+/g,""),LOCAL_CONTRAST_ADAPTATION_FACTOR:"2.0",EDGE_THRESHOLD:"0.1",DEPTH_THRESHOLD:"0.01",PREDICATION_MODE:"0",PREDICATION_THRESHOLD:"0.01",PREDICATION_SCALE:"2.0",PREDICATION_STRENGTH:"1.0",DEPTH_PACKING:"0"},uniforms:{inputBuffer:new Z(null),depthBuffer:new Z(null),predicationBuffer:new Z(null),texelSize:new Z(e)},blending:ue,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;\n#if EDGE_DETECTION_MODE != 0\nvarying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;\n#endif\n#if EDGE_DETECTION_MODE == 1\n#include \n#endif\n#if EDGE_DETECTION_MODE == 0 || PREDICATION_MODE == 1\n#ifdef GL_FRAGMENT_PRECISION_HIGH\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\nfloat readDepth(const in vec2 uv){\n#if DEPTH_PACKING == 3201\nreturn unpackRGBAToDepth(texture2D(depthBuffer,uv));\n#else\nreturn texture2D(depthBuffer,uv).r;\n#endif\n}vec3 gatherNeighbors(){float p=readDepth(vUv);float pLeft=readDepth(vUv0);float pTop=readDepth(vUv1);return vec3(p,pLeft,pTop);}\n#elif PREDICATION_MODE == 2\nuniform sampler2D predicationBuffer;vec3 gatherNeighbors(){float p=texture2D(predicationBuffer,vUv).r;float pLeft=texture2D(predicationBuffer,vUv0).r;float pTop=texture2D(predicationBuffer,vUv1).r;return vec3(p,pLeft,pTop);}\n#endif\n#if PREDICATION_MODE != 0\nvec2 calculatePredicatedThreshold(){vec3 neighbours=gatherNeighbors();vec2 delta=abs(neighbours.xx-neighbours.yz);vec2 edges=step(PREDICATION_THRESHOLD,delta);return PREDICATION_SCALE*EDGE_THRESHOLD*(1.0-PREDICATION_STRENGTH*edges);}\n#endif\n#if EDGE_DETECTION_MODE != 0\nuniform sampler2D inputBuffer;\n#endif\nvoid main(){\n#if EDGE_DETECTION_MODE == 0\nconst vec2 threshold=vec2(DEPTH_THRESHOLD);\n#elif PREDICATION_MODE != 0\nvec2 threshold=calculatePredicatedThreshold();\n#else\nconst vec2 threshold=vec2(EDGE_THRESHOLD);\n#endif\n#if EDGE_DETECTION_MODE == 0\nvec3 neighbors=gatherNeighbors();vec2 delta=abs(neighbors.xx-vec2(neighbors.y,neighbors.z));vec2 edges=step(threshold,delta);if(dot(edges,vec2(1.0))==0.0){discard;}gl_FragColor=vec4(edges,0.0,1.0);\n#elif EDGE_DETECTION_MODE == 1\nfloat l=luminance(texture2D(inputBuffer,vUv).rgb);float lLeft=luminance(texture2D(inputBuffer,vUv0).rgb);float lTop=luminance(texture2D(inputBuffer,vUv1).rgb);vec4 delta;delta.xy=abs(l-vec2(lLeft,lTop));vec2 edges=step(threshold,delta.xy);if(dot(edges,vec2(1.0))==0.0){discard;}float lRight=luminance(texture2D(inputBuffer,vUv2).rgb);float lBottom=luminance(texture2D(inputBuffer,vUv3).rgb);delta.zw=abs(l-vec2(lRight,lBottom));vec2 maxDelta=max(delta.xy,delta.zw);float lLeftLeft=luminance(texture2D(inputBuffer,vUv4).rgb);float lTopTop=luminance(texture2D(inputBuffer,vUv5).rgb);delta.zw=abs(vec2(lLeft,lTop)-vec2(lLeftLeft,lTopTop));maxDelta=max(maxDelta.xy,delta.zw);float finalDelta=max(maxDelta.x,maxDelta.y);edges.xy*=step(finalDelta,LOCAL_CONTRAST_ADAPTATION_FACTOR*delta.xy);gl_FragColor=vec4(edges,0.0,1.0);\n#elif EDGE_DETECTION_MODE == 2\nvec4 delta;vec3 c=texture2D(inputBuffer,vUv).rgb;vec3 cLeft=texture2D(inputBuffer,vUv0).rgb;vec3 t=abs(c-cLeft);delta.x=max(max(t.r,t.g),t.b);vec3 cTop=texture2D(inputBuffer,vUv1).rgb;t=abs(c-cTop);delta.y=max(max(t.r,t.g),t.b);vec2 edges=step(threshold,delta.xy);if(dot(edges,vec2(1.0))==0.0){discard;}vec3 cRight=texture2D(inputBuffer,vUv2).rgb;t=abs(c-cRight);delta.z=max(max(t.r,t.g),t.b);vec3 cBottom=texture2D(inputBuffer,vUv3).rgb;t=abs(c-cBottom);delta.w=max(max(t.r,t.g),t.b);vec2 maxDelta=max(delta.xy,delta.zw);vec3 cLeftLeft=texture2D(inputBuffer,vUv4).rgb;t=abs(c-cLeftLeft);delta.z=max(max(t.r,t.g),t.b);vec3 cTopTop=texture2D(inputBuffer,vUv5).rgb;t=abs(c-cTopTop);delta.w=max(max(t.r,t.g),t.b);maxDelta=max(maxDelta.xy,delta.zw);float finalDelta=max(maxDelta.x,maxDelta.y);edges*=step(finalDelta,LOCAL_CONTRAST_ADAPTATION_FACTOR*delta.xy);gl_FragColor=vec4(edges,0.0,1.0);\n#endif\n}",vertexShader:"uniform vec2 texelSize;varying vec2 vUv;varying vec2 vUv0;varying vec2 vUv1;\n#if EDGE_DETECTION_MODE != 0\nvarying vec2 vUv2;varying vec2 vUv3;varying vec2 vUv4;varying vec2 vUv5;\n#endif\nvoid main(){vUv=position.xy*0.5+0.5;vUv0=vUv+texelSize*vec2(-1.0,0.0);vUv1=vUv+texelSize*vec2(0.0,-1.0);\n#if EDGE_DETECTION_MODE != 0\nvUv2=vUv+texelSize*vec2(1.0,0.0);vUv3=vUv+texelSize*vec2(0.0,1.0);vUv4=vUv+texelSize*vec2(-2.0,0.0);vUv5=vUv+texelSize*vec2(0.0,-2.0);\n#endif\ngl_Position=vec4(position.xy,1.0,1.0);}"}),this.edgeDetectionMode=t}set depthBuffer(e){this.uniforms.depthBuffer.value=e}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e,t=te){this.depthBuffer=e,this.depthPacking=t}get edgeDetectionMode(){return Number(this.defines.EDGE_DETECTION_MODE)}set edgeDetectionMode(e){this.defines.EDGE_DETECTION_MODE=e.toFixed(0),this.needsUpdate=!0}getEdgeDetectionMode(){return this.edgeDetectionMode}setEdgeDetectionMode(e){this.edgeDetectionMode=e}get localContrastAdaptationFactor(){return Number(this.defines.LOCAL_CONTRAST_ADAPTATION_FACTOR)}set localContrastAdaptationFactor(e){this.defines.LOCAL_CONTRAST_ADAPTATION_FACTOR=e.toFixed("6"),this.needsUpdate=!0}getLocalContrastAdaptationFactor(){return this.localContrastAdaptationFactor}setLocalContrastAdaptationFactor(e){this.localContrastAdaptationFactor=e}get edgeDetectionThreshold(){return Number(this.defines.EDGE_THRESHOLD)}set edgeDetectionThreshold(e){this.defines.EDGE_THRESHOLD=e.toFixed("6"),this.defines.DEPTH_THRESHOLD=(.1*e).toFixed("6"),this.needsUpdate=!0}getEdgeDetectionThreshold(){return this.edgeDetectionThreshold}setEdgeDetectionThreshold(e){this.edgeDetectionThreshold=e}get predicationMode(){return Number(this.defines.PREDICATION_MODE)}set predicationMode(e){this.defines.PREDICATION_MODE=e.toFixed(0),this.needsUpdate=!0}getPredicationMode(){return this.predicationMode}setPredicationMode(e){this.predicationMode=e}set predicationBuffer(e){this.uniforms.predicationBuffer.value=e}setPredicationBuffer(e){this.uniforms.predicationBuffer.value=e}get predicationThreshold(){return Number(this.defines.PREDICATION_THRESHOLD)}set predicationThreshold(e){this.defines.PREDICATION_THRESHOLD=e.toFixed("6"),this.needsUpdate=!0}getPredicationThreshold(){return this.predicationThreshold}setPredicationThreshold(e){this.predicationThreshold=e}get predicationScale(){return Number(this.defines.PREDICATION_SCALE)}set predicationScale(e){this.defines.PREDICATION_SCALE=e.toFixed("6"),this.needsUpdate=!0}getPredicationScale(){return this.predicationScale}setPredicationScale(e){this.predicationScale=e}get predicationStrength(){return Number(this.defines.PREDICATION_STRENGTH)}set predicationStrength(e){this.defines.PREDICATION_STRENGTH=e.toFixed("6"),this.needsUpdate=!0}getPredicationStrength(){return this.predicationStrength}setPredicationStrength(e){this.predicationStrength=e}setSize(e,t){this.uniforms.texelSize.value.set(1/e,1/t)}},Wo=class extends ae{constructor(e=new f,t=new f){super({name:"SMAAWeightsMaterial",defines:{MAX_SEARCH_STEPS_INT:"16",MAX_SEARCH_STEPS_FLOAT:"16.0",MAX_SEARCH_STEPS_DIAG_INT:"8",MAX_SEARCH_STEPS_DIAG_FLOAT:"8.0",CORNER_ROUNDING:"25",CORNER_ROUNDING_NORM:"0.25",AREATEX_MAX_DISTANCE:"16.0",AREATEX_MAX_DISTANCE_DIAG:"20.0",AREATEX_PIXEL_SIZE:"(1.0 / vec2(160.0, 560.0))",AREATEX_SUBTEX_SIZE:"(1.0 / 7.0)",SEARCHTEX_SIZE:"vec2(66.0, 33.0)",SEARCHTEX_PACKED_SIZE:"vec2(64.0, 16.0)"},uniforms:{inputBuffer:new Z(null),searchTexture:new Z(null),areaTexture:new Z(null),resolution:new Z(t),texelSize:new Z(e)},blending:ue,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#define sampleLevelZeroOffset(t, coord, offset) texture2D(t, coord + offset * texelSize)\n#if __VERSION__ < 300\n#define round(v) floor(v + 0.5)\n#endif\n#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\nuniform lowp sampler2D areaTexture;uniform lowp sampler2D searchTexture;uniform vec2 texelSize;uniform vec2 resolution;varying vec2 vUv;varying vec4 vOffset[3];varying vec2 vPixCoord;void movec(const in bvec2 c,inout vec2 variable,const in vec2 value){if(c.x){variable.x=value.x;}if(c.y){variable.y=value.y;}}void movec(const in bvec4 c,inout vec4 variable,const in vec4 value){movec(c.xy,variable.xy,value.xy);movec(c.zw,variable.zw,value.zw);}vec2 decodeDiagBilinearAccess(in vec2 e){e.r=e.r*abs(5.0*e.r-5.0*0.75);return round(e);}vec4 decodeDiagBilinearAccess(in vec4 e){e.rb=e.rb*abs(5.0*e.rb-5.0*0.75);return round(e);}vec2 searchDiag1(const in vec2 texCoord,const in vec2 dir,out vec2 e){vec4 coord=vec4(texCoord,-1.0,1.0);vec3 t=vec3(texelSize,1.0);for(int i=0;i0.9)){break;}coord.xyz=t*vec3(dir,1.0)+coord.xyz;e=texture2D(inputBuffer,coord.xy).rg;coord.w=dot(e,vec2(0.5));}return coord.zw;}vec2 searchDiag2(const in vec2 texCoord,const in vec2 dir,out vec2 e){vec4 coord=vec4(texCoord,-1.0,1.0);coord.x+=0.25*texelSize.x;vec3 t=vec3(texelSize,1.0);for(int i=0;i0.9)){break;}coord.xyz=t*vec3(dir,1.0)+coord.xyz;e=texture2D(inputBuffer,coord.xy).rg;e=decodeDiagBilinearAccess(e);coord.w=dot(e,vec2(0.5));}return coord.zw;}vec2 areaDiag(const in vec2 dist,const in vec2 e,const in float offset){vec2 texCoord=vec2(AREATEX_MAX_DISTANCE_DIAG,AREATEX_MAX_DISTANCE_DIAG)*e+dist;texCoord=AREATEX_PIXEL_SIZE*texCoord+0.5*AREATEX_PIXEL_SIZE;texCoord.x+=0.5;texCoord.y+=AREATEX_SUBTEX_SIZE*offset;return texture2D(areaTexture,texCoord).rg;}vec2 calculateDiagWeights(const in vec2 texCoord,const in vec2 e,const in vec4 subsampleIndices){vec2 weights=vec2(0.0);vec4 d;vec2 end;if(e.r>0.0){d.xz=searchDiag1(texCoord,vec2(-1.0,1.0),end);d.x+=float(end.y>0.9);}else{d.xz=vec2(0.0);}d.yw=searchDiag1(texCoord,vec2(1.0,-1.0),end);if(d.x+d.y>2.0){vec4 coords=vec4(-d.x+0.25,d.x,d.y,-d.y-0.25)*texelSize.xyxy+texCoord.xyxy;vec4 c;c.xy=sampleLevelZeroOffset(inputBuffer,coords.xy,vec2(-1,0)).rg;c.zw=sampleLevelZeroOffset(inputBuffer,coords.zw,vec2(1,0)).rg;c.yxwz=decodeDiagBilinearAccess(c.xyzw);vec2 cc=vec2(2.0)*c.xz+c.yw;movec(bvec2(step(0.9,d.zw)),cc,vec2(0.0));weights+=areaDiag(d.xy,cc,subsampleIndices.z);}d.xz=searchDiag2(texCoord,vec2(-1.0,-1.0),end);if(sampleLevelZeroOffset(inputBuffer,texCoord,vec2(1,0)).r>0.0){d.yw=searchDiag2(texCoord,vec2(1.0),end);d.y+=float(end.y>0.9);}else{d.yw=vec2(0.0);}if(d.x+d.y>2.0){vec4 coords=vec4(-d.x,-d.x,d.y,d.y)*texelSize.xyxy+texCoord.xyxy;vec4 c;c.x=sampleLevelZeroOffset(inputBuffer,coords.xy,vec2(-1,0)).g;c.y=sampleLevelZeroOffset(inputBuffer,coords.xy,vec2(0,-1)).r;c.zw=sampleLevelZeroOffset(inputBuffer,coords.zw,vec2(1,0)).gr;vec2 cc=vec2(2.0)*c.xz+c.yw;movec(bvec2(step(0.9,d.zw)),cc,vec2(0.0));weights+=areaDiag(d.xy,cc,subsampleIndices.w).gr;}return weights;}float searchLength(const in vec2 e,const in float offset){vec2 scale=SEARCHTEX_SIZE*vec2(0.5,-1.0);vec2 bias=SEARCHTEX_SIZE*vec2(offset,1.0);scale+=vec2(-1.0,1.0);bias+=vec2(0.5,-0.5);scale*=1.0/SEARCHTEX_PACKED_SIZE;bias*=1.0/SEARCHTEX_PACKED_SIZE;return texture2D(searchTexture,scale*e+bias).r;}float searchXLeft(in vec2 texCoord,const in float end){vec2 e=vec2(0.0,1.0);for(int i=0;iend&&e.g>0.8281&&e.r==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=vec2(-2.0,0.0)*texelSize+texCoord;}float offset=-(255.0/127.0)*searchLength(e,0.0)+3.25;return texelSize.x*offset+texCoord.x;}float searchXRight(vec2 texCoord,const in float end){vec2 e=vec2(0.0,1.0);for(int i=0;i0.8281&&e.r==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=vec2(2.0,0.0)*texelSize.xy+texCoord;}float offset=-(255.0/127.0)*searchLength(e,0.5)+3.25;return-texelSize.x*offset+texCoord.x;}float searchYUp(vec2 texCoord,const in float end){vec2 e=vec2(1.0,0.0);for(int i=0;iend&&e.r>0.8281&&e.g==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=-vec2(0.0,2.0)*texelSize.xy+texCoord;}float offset=-(255.0/127.0)*searchLength(e.gr,0.0)+3.25;return texelSize.y*offset+texCoord.y;}float searchYDown(vec2 texCoord,const in float end){vec2 e=vec2(1.0,0.0);for(int i=0;i0.8281&&e.g==0.0)){break;}e=texture2D(inputBuffer,texCoord).rg;texCoord=vec2(0.0,2.0)*texelSize.xy+texCoord;}float offset=-(255.0/127.0)*searchLength(e.gr,0.5)+3.25;return-texelSize.y*offset+texCoord.y;}vec2 area(const in vec2 dist,const in float e1,const in float e2,const in float offset){vec2 texCoord=vec2(AREATEX_MAX_DISTANCE)*round(4.0*vec2(e1,e2))+dist;texCoord=AREATEX_PIXEL_SIZE*texCoord+0.5*AREATEX_PIXEL_SIZE;texCoord.y=AREATEX_SUBTEX_SIZE*offset+texCoord.y;return texture2D(areaTexture,texCoord).rg;}void detectHorizontalCornerPattern(inout vec2 weights,const in vec4 texCoord,const in vec2 d){\n#if !defined(DISABLE_CORNER_DETECTION)\nvec2 leftRight=step(d.xy,d.yx);vec2 rounding=(1.0-CORNER_ROUNDING_NORM)*leftRight;rounding/=leftRight.x+leftRight.y;vec2 factor=vec2(1.0);factor.x-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(0,1)).r;factor.x-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(1,1)).r;factor.y-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(0,-2)).r;factor.y-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(1,-2)).r;weights*=clamp(factor,0.0,1.0);\n#endif\n}void detectVerticalCornerPattern(inout vec2 weights,const in vec4 texCoord,const in vec2 d){\n#if !defined(DISABLE_CORNER_DETECTION)\nvec2 leftRight=step(d.xy,d.yx);vec2 rounding=(1.0-CORNER_ROUNDING_NORM)*leftRight;rounding/=leftRight.x+leftRight.y;vec2 factor=vec2(1.0);factor.x-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(1,0)).g;factor.x-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(1,1)).g;factor.y-=rounding.x*sampleLevelZeroOffset(inputBuffer,texCoord.xy,vec2(-2,0)).g;factor.y-=rounding.y*sampleLevelZeroOffset(inputBuffer,texCoord.zw,vec2(-2,1)).g;weights*=clamp(factor,0.0,1.0);\n#endif\n}void main(){vec4 weights=vec4(0.0);vec4 subsampleIndices=vec4(0.0);vec2 e=texture2D(inputBuffer,vUv).rg;if(e.g>0.0){\n#if !defined(DISABLE_DIAG_DETECTION)\nweights.rg=calculateDiagWeights(vUv,e,subsampleIndices);if(weights.r==-weights.g){\n#endif\nvec2 d;vec3 coords;coords.x=searchXLeft(vOffset[0].xy,vOffset[2].x);coords.y=vOffset[1].y;d.x=coords.x;float e1=texture2D(inputBuffer,coords.xy).r;coords.z=searchXRight(vOffset[0].zw,vOffset[2].y);d.y=coords.z;d=round(resolution.xx*d+-vPixCoord.xx);vec2 sqrtD=sqrt(abs(d));float e2=sampleLevelZeroOffset(inputBuffer,coords.zy,vec2(1,0)).r;weights.rg=area(sqrtD,e1,e2,subsampleIndices.y);coords.y=vUv.y;detectHorizontalCornerPattern(weights.rg,coords.xyzy,d);\n#if !defined(DISABLE_DIAG_DETECTION)\n}else{e.r=0.0;}\n#endif\n}if(e.r>0.0){vec2 d;vec3 coords;coords.y=searchYUp(vOffset[1].xy,vOffset[2].z);coords.x=vOffset[0].x;d.x=coords.y;float e1=texture2D(inputBuffer,coords.xy).g;coords.z=searchYDown(vOffset[1].zw,vOffset[2].w);d.y=coords.z;d=round(resolution.yy*d-vPixCoord.yy);vec2 sqrtD=sqrt(abs(d));float e2=sampleLevelZeroOffset(inputBuffer,coords.xz,vec2(0,1)).g;weights.ba=area(sqrtD,e1,e2,subsampleIndices.x);coords.x=vUv.x;detectVerticalCornerPattern(weights.ba,coords.xyxz,d);}gl_FragColor=weights;}",vertexShader:"uniform vec2 texelSize;uniform vec2 resolution;varying vec2 vUv;varying vec4 vOffset[3];varying vec2 vPixCoord;void main(){vUv=position.xy*0.5+0.5;vPixCoord=vUv*resolution;vOffset[0]=vUv.xyxy+texelSize.xyxy*vec4(-0.25,-0.125,1.25,-0.125);vOffset[1]=vUv.xyxy+texelSize.xyxy*vec4(-0.125,-0.25,-0.125,1.25);vOffset[2]=vec4(vOffset[0].xz,vOffset[1].yw)+vec4(-2.0,2.0,-2.0,2.0)*texelSize.xxyy*MAX_SEARCH_STEPS_FLOAT;gl_Position=vec4(position.xy,1.0,1.0);}"})}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}get searchTexture(){return this.uniforms.searchTexture.value}set searchTexture(e){this.uniforms.searchTexture.value=e}get areaTexture(){return this.uniforms.areaTexture.value}set areaTexture(e){this.uniforms.areaTexture.value=e}setLookupTextures(e,t){this.searchTexture=e,this.areaTexture=t}get orthogonalSearchSteps(){return Number(this.defines.MAX_SEARCH_STEPS_INT)}set orthogonalSearchSteps(e){const t=Math.min(Math.max(e,0),112);this.defines.MAX_SEARCH_STEPS_INT=t.toFixed("0"),this.defines.MAX_SEARCH_STEPS_FLOAT=t.toFixed("1"),this.needsUpdate=!0}setOrthogonalSearchSteps(e){this.orthogonalSearchSteps=e}get diagonalSearchSteps(){return Number(this.defines.MAX_SEARCH_STEPS_DIAG_INT)}set diagonalSearchSteps(e){const t=Math.min(Math.max(e,0),20);this.defines.MAX_SEARCH_STEPS_DIAG_INT=t.toFixed("0"),this.defines.MAX_SEARCH_STEPS_DIAG_FLOAT=t.toFixed("1"),this.needsUpdate=!0}setDiagonalSearchSteps(e){this.diagonalSearchSteps=e}get diagonalDetection(){return void 0===this.defines.DISABLE_DIAG_DETECTION}set diagonalDetection(e){e?delete this.defines.DISABLE_DIAG_DETECTION:this.defines.DISABLE_DIAG_DETECTION="1",this.needsUpdate=!0}isDiagonalDetectionEnabled(){return this.diagonalDetection}setDiagonalDetectionEnabled(e){this.diagonalDetection=e}get cornerRounding(){return Number(this.defines.CORNER_ROUNDING)}set cornerRounding(e){const t=Math.min(Math.max(e,0),100);this.defines.CORNER_ROUNDING=t.toFixed("4"),this.defines.CORNER_ROUNDING_NORM=(t/100).toFixed("4"),this.needsUpdate=!0}setCornerRounding(e){this.cornerRounding=e}get cornerDetection(){return void 0===this.defines.DISABLE_CORNER_DETECTION}set cornerDetection(e){e?delete this.defines.DISABLE_CORNER_DETECTION:this.defines.DISABLE_CORNER_DETECTION="1",this.needsUpdate=!0}isCornerRoundingEnabled(){return this.cornerDetection}setCornerRoundingEnabled(e){this.cornerDetection=e}setSize(e,t){const n=this.uniforms;n.texelSize.value.set(1/e,1/t),n.resolution.value.set(e,t)}},Yo="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAAAQCAYAAACm53kpAAAAeElEQVRYR+2XSwqAMAxEJ168ePEqwRSKhIIiuHjJqiU0gWE+1CQdApcVAMUAuARaMGCX1MIL/Ow13++9lW2s3mW9MWvsnWc/2fvGygwPAN4E8QzAA4CXAB6AHjG4JTHYI1ey3pcx6FHnEfhLDOIBKAmUBK6/ANUDTlROXAHd9EC1AAAAAElFTkSuQmCC",Ko="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKAAAAIwCAYAAAABNmBHAAAgAElEQVR4Xuy9CbhlV1ktOvbpq09DkiIkUBI6kxASIH0DlAQiIK1wRfSJTx+i4JX7vKIigs8HXpXvqVcvrcC9agQ7IDTSSWgqCQQliDRBJKkkhDSkqVPNqVOnP+8b//rH3P+eZ+199tlznVTlvVrft7+1T7OaueZY42/m37QALKNk2wHg1pITlB17mC+Pp11W3X/LHyT32vhg48/5SOv+PnwpsHA70JoGlueB1iKApeqzvOzn44GatTB76Xzhd7suBR7+WWADgDEAwwCG/L54b/poDLrHuvvm70Z2Avhsc+PVcxscBU8F8C8ADg5+ipIjD/PlGwfgju8B924E5seARUfLsiNmqQW0IjL8+7L2NYD/7COBzfcCm+aB8SVgdAkYIRCXKyDax4EdAanL5PuNPllNvXDlAHwFgP8AcC2AhRIoDXbsYb48dl5WkVFTE3LGDcC9m4CZCWBuFFgeAZaGAYJQQCRqDHT+McJrVb8zwATUXH02MHYfMHEIGFsAxgjApQqACYQORjtd/B7Axt/z79sC0+cMPgjjlwPwVwHcA+DfAHzTxcVgWBroqMN8+cYBeM71wH0TwKExYHYUWCIAHYRLTlkCYgcIBcAgU/n3qy8GRu4HRgnAOWBkERhddPAJhG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g+AZAAlVWh1GvGka0XzB0cCQi30aSGVa9AF62fLOB7MhrfnJoPwPER59Px+o3e76mL5Kwp2G57xPl0kxc3er+nLvyKtLmhfUC78RHn081ONnq/pzcAR5xPR9mRRu/31IVgvgUccT4dNaobvd/TGYAjzqejumqj93s6A3DE+XRUg2VSCjdaGr3fUw+I+VPwiPPpqJjO8J1Nw43e7ymHwHoAKMFd7QErAeEE5NNJMb3R+z3lsGcNzgfgiPPpomJ6o/d76oGwPgCOKJ8uKqY3er+nKwBHmE+noqRG7/fUA199U/AI8+kEwEbv93QHoEhZTnA+nYqSGr3fBoAtaiqBUImdm5hPJwA2er+nKwBHnE+X1gUzSbnR+z11wPj/AeCpPDD3t7rvAAAAAElFTkSuQmCC",Xo=class extends To{constructor({blendFunction:e=lo,preset:t=Oo,edgeDetectionMode:n=Co,predicationMode:i=Mo}={}){let s,r;super("SMAAEffect","uniform sampler2D weightMap;varying vec2 vOffset0;varying vec2 vOffset1;void movec(const in bvec2 c,inout vec2 variable,const in vec2 value){if(c.x){variable.x=value.x;}if(c.y){variable.y=value.y;}}void movec(const in bvec4 c,inout vec4 variable,const in vec4 value){movec(c.xy,variable.xy,value.xy);movec(c.zw,variable.zw,value.zw);}void mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec4 a;a.x=texture2D(weightMap,vOffset0).a;a.y=texture2D(weightMap,vOffset1).g;a.wz=texture2D(weightMap,uv).rb;vec4 color=inputColor;if(dot(a,vec4(1.0))>=1e-5){bool h=max(a.x,a.z)>max(a.y,a.w);vec4 blendingOffset=vec4(0.0,a.y,0.0,a.w);vec2 blendingWeight=a.yw;movec(bvec4(h),blendingOffset,vec4(a.x,0.0,a.z,0.0));movec(bvec2(h),blendingWeight,a.xz);blendingWeight/=dot(blendingWeight,vec2(1.0));vec4 blendingCoord=blendingOffset*vec4(texelSize,-texelSize)+uv.xyxy;color=blendingWeight.x*texture2D(inputBuffer,blendingCoord.xy);color+=blendingWeight.y*texture2D(inputBuffer,blendingCoord.zw);}outputColor=color;}",{vertexShader:"varying vec2 vOffset0;varying vec2 vOffset1;void mainSupport(const in vec2 uv){vOffset0=uv+texelSize*vec2(1.0,0.0);vOffset1=uv+texelSize*vec2(0.0,1.0);}",blendFunction:e,attributes:Zr|Xr,uniforms:new Map([["weightMap",new Z(null)]])}),arguments.length>1&&(s=arguments[0],r=arguments[1],arguments.length>2&&(t=arguments[2]),arguments.length>3&&(n=arguments[3])),this.renderTargetEdges=new X(1,1,{depthBuffer:!1}),this.renderTargetEdges.texture.name="SMAA.Edges",this.renderTargetWeights=this.renderTargetEdges.clone(),this.renderTargetWeights.texture.name="SMAA.Weights",this.uniforms.get("weightMap").value=this.renderTargetWeights.texture,this.clearPass=new Wr(!0,!1,!1),this.clearPass.overrideClearColor=new u(0),this.clearPass.overrideClearAlpha=1,this.edgeDetectionPass=new Do(new Qo),this.edgeDetectionMaterial.edgeDetectionMode=n,this.edgeDetectionMaterial.predicationMode=i,this.weightsPass=new Do(new Wo);const o=new J;o.onLoad=()=>{const e=new d(s);e.name="SMAA.Search",e.magFilter=$,e.minFilter=$,e.generateMipmaps=!1,e.needsUpdate=!0,e.flipY=!0,this.weightsMaterial.searchTexture=e;const t=new d(r);t.name="SMAA.Area",t.magFilter=ee,t.minFilter=ee,t.generateMipmaps=!1,t.needsUpdate=!0,t.flipY=!1,this.weightsMaterial.areaTexture=t,this.dispatchEvent({type:"load"})},o.itemStart("search"),o.itemStart("area"),void 0!==s&&void 0!==r?(o.itemEnd("search"),o.itemEnd("area")):"undefined"!=typeof Image&&(s=new Image,r=new Image,s.addEventListener("load",(()=>o.itemEnd("search"))),r.addEventListener("load",(()=>o.itemEnd("area"))),s.src=Yo,r.src=Ko),this.applyPreset(t)}get edgesTexture(){return this.renderTargetEdges.texture}getEdgesTexture(){return this.edgesTexture}get weightsTexture(){return this.renderTargetWeights.texture}getWeightsTexture(){return this.weightsTexture}get edgeDetectionMaterial(){return this.edgeDetectionPass.fullscreenMaterial}get colorEdgesMaterial(){return this.edgeDetectionMaterial}getEdgeDetectionMaterial(){return this.edgeDetectionMaterial}get weightsMaterial(){return this.weightsPass.fullscreenMaterial}getWeightsMaterial(){return this.weightsMaterial}setEdgeDetectionThreshold(e){this.edgeDetectionMaterial.edgeDetectionThreshold=e}setOrthogonalSearchSteps(e){this.weightsMaterial.orthogonalSearchSteps=e}applyPreset(e){const t=this.edgeDetectionMaterial,n=this.weightsMaterial;switch(e){case Po:t.edgeDetectionThreshold=.15,n.orthogonalSearchSteps=4,n.diagonalDetection=!1,n.cornerDetection=!1;break;case Oo:t.edgeDetectionThreshold=.1,n.orthogonalSearchSteps=8,n.diagonalDetection=!1,n.cornerDetection=!1;break;case Bo:t.edgeDetectionThreshold=.1,n.orthogonalSearchSteps=16,n.diagonalSearchSteps=8,n.cornerRounding=25,n.diagonalDetection=!0,n.cornerDetection=!0;break;case Io:t.edgeDetectionThreshold=.05,n.orthogonalSearchSteps=32,n.diagonalSearchSteps=16,n.cornerRounding=25,n.diagonalDetection=!0,n.cornerDetection=!0}}setDepthTexture(e,t=te){this.edgeDetectionMaterial.depthBuffer=e,this.edgeDetectionMaterial.depthPacking=t}update(e,t,n){this.clearPass.render(e,this.renderTargetEdges),this.edgeDetectionPass.render(e,t,this.renderTargetEdges),this.weightsPass.render(e,this.renderTargetEdges,this.renderTargetWeights)}setSize(e,t){this.edgeDetectionMaterial.setSize(e,t),this.weightsMaterial.setSize(e,t),this.renderTargetEdges.setSize(e,t),this.renderTargetWeights.setSize(e,t)}dispose(){const{searchTexture:e,areaTexture:t}=this.weightsMaterial;null!==e&&null!==t&&(e.dispose(),t.dispose()),super.dispose()}static get searchImageDataURL(){return Yo}static get areaImageDataURL(){return Ko}},Zo=class extends ae{constructor(){super({name:"AdaptiveLuminanceMaterial",defines:{MIP_LEVEL_1X1:"0.0"},uniforms:{luminanceBuffer0:new Z(null),luminanceBuffer1:new Z(null),minLuminance:new Z(.01),deltaTime:new Z(0),tau:new Z(1)},extensions:{shaderTextureLOD:!0},blending:ue,toneMapped:!1,depthWrite:!1,depthTest:!1,fragmentShader:"#include \n#define packFloatToRGBA(v) packDepthToRGBA(v)\n#define unpackRGBAToFloat(v) unpackRGBAToDepth(v)\nuniform lowp sampler2D luminanceBuffer0;uniform lowp sampler2D luminanceBuffer1;uniform float minLuminance;uniform float deltaTime;uniform float tau;varying vec2 vUv;void main(){float l0=unpackRGBAToFloat(texture2D(luminanceBuffer0,vUv));\n#if __VERSION__ < 300\nfloat l1=texture2DLodEXT(luminanceBuffer1,vUv,MIP_LEVEL_1X1).r;\n#else\nfloat l1=textureLod(luminanceBuffer1,vUv,MIP_LEVEL_1X1).r;\n#endif\nl0=max(minLuminance,l0);l1=max(minLuminance,l1);float adaptedLum=l0+(l1-l0)*(1.0-exp(-deltaTime*tau));gl_FragColor=(adaptedLum==1.0)?vec4(1.0):packFloatToRGBA(adaptedLum);}",vertexShader:Hr})}set luminanceBuffer0(e){this.uniforms.luminanceBuffer0.value=e}setLuminanceBuffer0(e){this.uniforms.luminanceBuffer0.value=e}set luminanceBuffer1(e){this.uniforms.luminanceBuffer1.value=e}setLuminanceBuffer1(e){this.uniforms.luminanceBuffer1.value=e}set mipLevel1x1(e){this.defines.MIP_LEVEL_1X1=e.toFixed(1),this.needsUpdate=!0}setMipLevel1x1(e){this.mipLevel1x1=e}set deltaTime(e){this.uniforms.deltaTime.value=e}setDeltaTime(e){this.uniforms.deltaTime.value=e}get minLuminance(){return this.uniforms.minLuminance.value}set minLuminance(e){this.uniforms.minLuminance.value=e}getMinLuminance(){return this.uniforms.minLuminance.value}setMinLuminance(e){this.uniforms.minLuminance.value=e}get adaptationRate(){return this.uniforms.tau.value}set adaptationRate(e){this.uniforms.tau.value=e}getAdaptationRate(){return this.uniforms.tau.value}setAdaptationRate(e){this.uniforms.tau.value=e}},qo=class extends Nr{constructor(e,{minLuminance:t=.01,adaptationRate:n=1}={}){super("AdaptiveLuminancePass"),this.fullscreenMaterial=new Zo,this.needsSwap=!1,this.renderTargetPrevious=new X(1,1,{minFilter:$,magFilter:$,depthBuffer:!1}),this.renderTargetPrevious.texture.name="Luminance.Previous";const i=this.fullscreenMaterial;i.luminanceBuffer0=this.renderTargetPrevious.texture,i.luminanceBuffer1=e,i.minLuminance=t,i.adaptationRate=n,this.renderTargetAdapted=this.renderTargetPrevious.clone(),this.renderTargetAdapted.texture.name="Luminance.Adapted",this.copyPass=new _r(this.renderTargetPrevious,!1)}get texture(){return this.renderTargetAdapted.texture}getTexture(){return this.renderTargetAdapted.texture}set mipLevel1x1(e){this.fullscreenMaterial.mipLevel1x1=e}get adaptationRate(){return this.fullscreenMaterial.adaptationRate}set adaptationRate(e){this.fullscreenMaterial.adaptationRate=e}render(e,t,n,i,s){this.fullscreenMaterial.deltaTime=i,e.setRenderTarget(this.renderToScreen?null:this.renderTargetAdapted),e.render(this.scene,this.camera),this.copyPass.render(e,this.renderTargetAdapted)}},Jo=class extends To{constructor({blendFunction:e=lo,adaptive:t=!1,mode:n=(t?Uo:jo),resolution:i=256,maxLuminance:s=4,whitePoint:r=s,middleGrey:o=.6,minLuminance:a=.01,averageLuminance:l=1,adaptationRate:c=1}={}){super("ToneMappingEffect","#include \nuniform float whitePoint;\n#if TONE_MAPPING_MODE == 2 || TONE_MAPPING_MODE == 3\nuniform float middleGrey;\n#if TONE_MAPPING_MODE == 3\nuniform lowp sampler2D luminanceBuffer;\n#else\nuniform float averageLuminance;\n#endif\nvec3 Reinhard2ToneMapping(vec3 color){color*=toneMappingExposure;float l=luminance(color);\n#if TONE_MAPPING_MODE == 3\nfloat lumAvg=unpackRGBAToFloat(texture2D(luminanceBuffer,vec2(0.5)));\n#else\nfloat lumAvg=averageLuminance;\n#endif\nfloat lumScaled=(l*middleGrey)/max(lumAvg,1e-6);float lumCompressed=lumScaled*(1.0+lumScaled/(whitePoint*whitePoint));lumCompressed/=(1.0+lumScaled);return clamp(lumCompressed*color,0.0,1.0);}\n#elif TONE_MAPPING_MODE == 4\n#define A 0.15\n#define B 0.50\n#define C 0.10\n#define D 0.20\n#define E 0.02\n#define F 0.30\nvec3 Uncharted2Helper(const in vec3 x){return((x*(A*x+C*B)+D*E)/(x*(A*x+B)+D*F))-E/F;}vec3 Uncharted2ToneMapping(vec3 color){color*=toneMappingExposure;return clamp(Uncharted2Helper(color)/Uncharted2Helper(vec3(whitePoint)),0.0,1.0);}\n#endif\nvoid mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){\n#if TONE_MAPPING_MODE == 2 || TONE_MAPPING_MODE == 3\noutputColor=vec4(Reinhard2ToneMapping(inputColor.rgb),inputColor.a);\n#elif TONE_MAPPING_MODE == 4\noutputColor=vec4(Uncharted2ToneMapping(inputColor.rgb),inputColor.a);\n#else\noutputColor=vec4(toneMapping(inputColor.rgb),inputColor.a);\n#endif\n}",{blendFunction:e,uniforms:new Map([["luminanceBuffer",new Z(null)],["maxLuminance",new Z(s)],["whitePoint",new Z(r)],["middleGrey",new Z(o)],["averageLuminance",new Z(l)]])}),this.renderTargetLuminance=new X(1,1,{minFilter:ne,depthBuffer:!1}),this.renderTargetLuminance.texture.generateMipmaps=!0,this.renderTargetLuminance.texture.name="Luminance",this.luminancePass=new wo({renderTarget:this.renderTargetLuminance}),this.adaptiveLuminancePass=new qo(this.luminancePass.texture,{minLuminance:a,adaptationRate:c}),this.uniforms.get("luminanceBuffer").value=this.adaptiveLuminancePass.texture,this.resolution=i,this.mode=n}get mode(){return Number(this.defines.get("TONE_MAPPING_MODE"))}set mode(e){if(this.mode!==e){switch(this.defines.clear(),this.defines.set("TONE_MAPPING_MODE",e.toFixed(0)),e){case Lo:this.defines.set("toneMapping(texel)","LinearToneMapping(texel)");break;case Ro:this.defines.set("toneMapping(texel)","ReinhardToneMapping(texel)");break;case zo:this.defines.set("toneMapping(texel)","OptimizedCineonToneMapping(texel)");break;case ko:this.defines.set("toneMapping(texel)","ACESFilmicToneMapping(texel)");break;case jo:this.defines.set("toneMapping(texel)","AgXToneMapping(texel)");break;case No:this.defines.set("toneMapping(texel)","NeutralToneMapping(texel)");break;default:this.defines.set("toneMapping(texel)","texel")}this.adaptiveLuminancePass.enabled=e===Uo,this.setChanged()}}getMode(){return this.mode}setMode(e){this.mode=e}get whitePoint(){return this.uniforms.get("whitePoint").value}set whitePoint(e){this.uniforms.get("whitePoint").value=e}get middleGrey(){return this.uniforms.get("middleGrey").value}set middleGrey(e){this.uniforms.get("middleGrey").value=e}get averageLuminance(){return this.uniforms.get("averageLuminance").value}set averageLuminance(e){this.uniforms.get("averageLuminance").value=e}get adaptiveLuminanceMaterial(){return this.adaptiveLuminancePass.fullscreenMaterial}getAdaptiveLuminanceMaterial(){return this.adaptiveLuminanceMaterial}get resolution(){return this.luminancePass.resolution.width}set resolution(e){const t=Math.max(0,Math.ceil(Math.log2(e))),n=Math.pow(2,t);this.luminancePass.resolution.setPreferredSize(n,n),this.adaptiveLuminanceMaterial.mipLevel1x1=t}getResolution(){return this.resolution}setResolution(e){this.resolution=e}get adaptive(){return this.mode===Uo}set adaptive(e){this.mode=e?Uo:Fo}get adaptationRate(){return this.adaptiveLuminanceMaterial.adaptationRate}set adaptationRate(e){this.adaptiveLuminanceMaterial.adaptationRate=e}get distinction(){return console.warn(this.name,"distinction was removed."),1}set distinction(e){console.warn(this.name,"distinction was removed.")}update(e,t,n){this.adaptiveLuminancePass.enabled&&(this.luminancePass.render(e,t),this.adaptiveLuminancePass.render(e,null,null,n))}initialize(e,t,n){this.adaptiveLuminancePass.initialize(e,t,n)}},$o=class extends ae{constructor(e,t,n,i,s=!1){super({name:"EffectMaterial",defines:{THREE_REVISION:ie.replace(/\D+/g,""),DEPTH_PACKING:"0",ENCODE_OUTPUT:"1"},uniforms:{inputBuffer:new Z(null),depthBuffer:new Z(null),resolution:new Z(new f),texelSize:new Z(new f),cameraNear:new Z(.3),cameraFar:new Z(1e3),aspect:new Z(1),time:new Z(0)},blending:ue,toneMapped:!1,depthWrite:!1,depthTest:!1,dithering:s}),e&&this.setShaderParts(e),t&&this.setDefines(t),n&&this.setUniforms(n),this.copyCameraSettings(i)}set inputBuffer(e){this.uniforms.inputBuffer.value=e}setInputBuffer(e){this.uniforms.inputBuffer.value=e}get depthBuffer(){return this.uniforms.depthBuffer.value}set depthBuffer(e){this.uniforms.depthBuffer.value=e}get depthPacking(){return Number(this.defines.DEPTH_PACKING)}set depthPacking(e){this.defines.DEPTH_PACKING=e.toFixed(0),this.needsUpdate=!0}setDepthBuffer(e,t=te){this.depthBuffer=e,this.depthPacking=t}setShaderData(e){this.setShaderParts(e.shaderParts),this.setDefines(e.defines),this.setUniforms(e.uniforms),this.setExtensions(e.extensions)}setShaderParts(e){return this.fragmentShader="#include \n#include \n#include \n#define packFloatToRGBA(v) packDepthToRGBA(v)\n#define unpackRGBAToFloat(v) unpackRGBAToDepth(v)\n#ifdef FRAMEBUFFER_PRECISION_HIGH\nuniform mediump sampler2D inputBuffer;\n#else\nuniform lowp sampler2D inputBuffer;\n#endif\n#if DEPTH_PACKING == 3201\nuniform lowp sampler2D depthBuffer;\n#elif defined(GL_FRAGMENT_PRECISION_HIGH)\nuniform highp sampler2D depthBuffer;\n#else\nuniform mediump sampler2D depthBuffer;\n#endif\nuniform vec2 resolution;uniform vec2 texelSize;uniform float cameraNear;uniform float cameraFar;uniform float aspect;uniform float time;varying vec2 vUv;vec4 sRGBToLinear(const in vec4 value){return vec4(mix(pow(value.rgb*0.9478672986+vec3(0.0521327014),vec3(2.4)),value.rgb*0.0773993808,vec3(lessThanEqual(value.rgb,vec3(0.04045)))),value.a);}float readDepth(const in vec2 uv){\n#if DEPTH_PACKING == 3201\nreturn unpackRGBAToDepth(texture2D(depthBuffer,uv));\n#else\nreturn texture2D(depthBuffer,uv).r;\n#endif\n}float getViewZ(const in float depth){\n#ifdef PERSPECTIVE_CAMERA\nreturn perspectiveDepthToViewZ(depth,cameraNear,cameraFar);\n#else\nreturn orthographicDepthToViewZ(depth,cameraNear,cameraFar);\n#endif\n}vec3 RGBToHCV(const in vec3 RGB){vec4 P=mix(vec4(RGB.bg,-1.0,2.0/3.0),vec4(RGB.gb,0.0,-1.0/3.0),step(RGB.b,RGB.g));vec4 Q=mix(vec4(P.xyw,RGB.r),vec4(RGB.r,P.yzx),step(P.x,RGB.r));float C=Q.x-min(Q.w,Q.y);float H=abs((Q.w-Q.y)/(6.0*C+EPSILON)+Q.z);return vec3(H,C,Q.x);}vec3 RGBToHSL(const in vec3 RGB){vec3 HCV=RGBToHCV(RGB);float L=HCV.z-HCV.y*0.5;float S=HCV.y/(1.0-abs(L*2.0-1.0)+EPSILON);return vec3(HCV.x,S,L);}vec3 HueToRGB(const in float H){float R=abs(H*6.0-3.0)-1.0;float G=2.0-abs(H*6.0-2.0);float B=2.0-abs(H*6.0-4.0);return clamp(vec3(R,G,B),0.0,1.0);}vec3 HSLToRGB(const in vec3 HSL){vec3 RGB=HueToRGB(HSL.x);float C=(1.0-abs(2.0*HSL.z-1.0))*HSL.y;return(RGB-0.5)*C+HSL.z;}FRAGMENT_HEAD void main(){FRAGMENT_MAIN_UV vec4 color0=texture2D(inputBuffer,UV);vec4 color1=vec4(0.0);FRAGMENT_MAIN_IMAGE color0.a=clamp(color0.a,0.0,1.0);gl_FragColor=color0;\n#ifdef ENCODE_OUTPUT\n#include \n#endif\n#include \n}".replace(qr.FRAGMENT_HEAD,e.get(qr.FRAGMENT_HEAD)||"").replace(qr.FRAGMENT_MAIN_UV,e.get(qr.FRAGMENT_MAIN_UV)||"").replace(qr.FRAGMENT_MAIN_IMAGE,e.get(qr.FRAGMENT_MAIN_IMAGE)||""),this.vertexShader="uniform vec2 resolution;uniform vec2 texelSize;uniform float cameraNear;uniform float cameraFar;uniform float aspect;uniform float time;varying vec2 vUv;VERTEX_HEAD void main(){vUv=position.xy*0.5+0.5;VERTEX_MAIN_SUPPORT gl_Position=vec4(position.xy,1.0,1.0);}".replace(qr.VERTEX_HEAD,e.get(qr.VERTEX_HEAD)||"").replace(qr.VERTEX_MAIN_SUPPORT,e.get(qr.VERTEX_MAIN_SUPPORT)||""),this.needsUpdate=!0,this}setDefines(e){for(const t of e.entries())this.defines[t[0]]=t[1];return this.needsUpdate=!0,this}setUniforms(e){for(const t of e.entries())this.uniforms[t[0]]=t[1];return this}setExtensions(e){this.extensions={};for(const t of e)this.extensions[t]=!0;return this}get encodeOutput(){return void 0!==this.defines.ENCODE_OUTPUT}set encodeOutput(e){this.encodeOutput!==e&&(e?this.defines.ENCODE_OUTPUT="1":delete this.defines.ENCODE_OUTPUT,this.needsUpdate=!0)}isOutputEncodingEnabled(e){return this.encodeOutput}setOutputEncodingEnabled(e){this.encodeOutput=e}get time(){return this.uniforms.time.value}set time(e){this.uniforms.time.value=e}setDeltaTime(e){this.uniforms.time.value+=e}adoptCameraSettings(e){this.copyCameraSettings(e)}copyCameraSettings(e){e&&(this.uniforms.cameraNear.value=e.near,this.uniforms.cameraFar.value=e.far,e instanceof pe?this.defines.PERSPECTIVE_CAMERA="1":delete this.defines.PERSPECTIVE_CAMERA,this.needsUpdate=!0)}setSize(e,t){const n=this.uniforms;n.resolution.value.set(e,t),n.texelSize.value.set(1/e,1/t),n.aspect.value=e/t}static get Section(){return qr}};function ea(e,t,n){for(const i of t){const t="$1"+e+i.charAt(0).toUpperCase()+i.slice(1),s=new RegExp("([^\\.])(\\b"+i+"\\b)","g");for(const e of n.entries())null!==e[1]&&n.set(e[0],e[1].replace(s,t))}}function ta(e,t,n){let i=t.getFragmentShader(),s=t.getVertexShader();const r=void 0!==i&&/mainImage/.test(i),o=void 0!==i&&/mainUv/.test(i);if(n.attributes|=t.getAttributes(),void 0===i)throw new Error(`Missing fragment shader (${t.name})`);if(o&&0!=(n.attributes&Zr))throw new Error(`Effects that transform UVs are incompatible with convolution effects (${t.name})`);if(!r&&!o)throw new Error(`Could not find mainImage or mainUv function (${t.name})`);{const a=/\w+\s+(\w+)\([\w\s,]*\)\s*{/g,l=n.shaderParts;let c=l.get(qr.FRAGMENT_HEAD)||"",h=l.get(qr.FRAGMENT_MAIN_UV)||"",u=l.get(qr.FRAGMENT_MAIN_IMAGE)||"",d=l.get(qr.VERTEX_HEAD)||"",p=l.get(qr.VERTEX_MAIN_SUPPORT)||"";const f=new Set,m=new Set;if(o&&(h+=`\t${e}MainUv(UV);\n`,n.uvTransformation=!0),null!==s&&/mainSupport/.test(s)){const t=/mainSupport *\([\w\s]*?uv\s*?\)/.test(s);p+=`\t${e}MainSupport(`,p+=t?"vUv);\n":");\n";for(const e of s.matchAll(/(?:varying\s+\w+\s+([\S\s]*?);)/g))for(const t of e[1].split(/\s*,\s*/))n.varyings.add(t),f.add(t),m.add(t);for(const e of s.matchAll(a))m.add(e[1])}for(const e of i.matchAll(a))m.add(e[1]);for(const e of t.defines.keys())m.add(e.replace(/\([\w\s,]*\)/g,""));for(const e of t.uniforms.keys())m.add(e);m.delete("while"),m.delete("for"),m.delete("if"),t.uniforms.forEach(((t,i)=>n.uniforms.set(e+i.charAt(0).toUpperCase()+i.slice(1),t))),t.defines.forEach(((t,i)=>n.defines.set(e+i.charAt(0).toUpperCase()+i.slice(1),t)));const g=new Map([["fragment",i],["vertex",s]]);ea(e,m,n.defines),ea(e,m,g),i=g.get("fragment"),s=g.get("vertex");const v=t.blendMode;if(n.blendModes.set(v.blendFunction,v),r){null!==t.inputColorSpace&&t.inputColorSpace!==n.colorSpace&&(u+=t.inputColorSpace===_?"color0 = sRGBTransferOETF(color0);\n\t":"color0 = sRGBToLinear(color0);\n\t"),t.outputColorSpace!==he?n.colorSpace=t.outputColorSpace:null!==t.inputColorSpace&&(n.colorSpace=t.inputColorSpace);const s=/MainImage *\([\w\s,]*?depth[\w\s,]*?\)/;u+=`${e}MainImage(color0, UV, `,0!=(n.attributes&Xr)&&s.test(i)&&(u+="depth, ",n.readDepth=!0),u+="color1);\n\t";const r=e+"BlendOpacity";n.uniforms.set(r,v.opacity),u+=`color0 = blend${v.blendFunction}(color0, color1, ${r});\n\n\t`,c+=`uniform float ${r};\n\n`}if(c+=i+"\n",null!==s&&(d+=s+"\n"),l.set(qr.FRAGMENT_HEAD,c),l.set(qr.FRAGMENT_MAIN_UV,h),l.set(qr.FRAGMENT_MAIN_IMAGE,u),l.set(qr.VERTEX_HEAD,d),l.set(qr.VERTEX_MAIN_SUPPORT,p),null!==t.extensions)for(const e of t.extensions)n.extensions.add(e)}}Number(ie.replace(/\D+/g,""));var na=class extends Nr{constructor(e,...t){super("EffectPass"),this.fullscreenMaterial=new $o(null,null,null,e),this.listener=e=>this.handleEvent(e),this.effects=[],this.setEffects(t),this.skipRendering=!1,this.minTime=1,this.maxTime=Number.POSITIVE_INFINITY,this.timeScale=1}set mainScene(e){for(const t of this.effects)t.mainScene=e}set mainCamera(e){this.fullscreenMaterial.copyCameraSettings(e);for(const t of this.effects)t.mainCamera=e}get encodeOutput(){return this.fullscreenMaterial.encodeOutput}set encodeOutput(e){this.fullscreenMaterial.encodeOutput=e}get dithering(){return this.fullscreenMaterial.dithering}set dithering(e){const t=this.fullscreenMaterial;t.dithering=e,t.needsUpdate=!0}setEffects(e){for(const e of this.effects)e.removeEventListener("change",this.listener);this.effects=e.sort(((e,t)=>t.attributes-e.attributes));for(const e of this.effects)e.addEventListener("change",this.listener)}updateMaterial(){const e=new class{constructor(){this.shaderParts=new Map([[qr.FRAGMENT_HEAD,null],[qr.FRAGMENT_MAIN_UV,null],[qr.FRAGMENT_MAIN_IMAGE,null],[qr.VERTEX_HEAD,null],[qr.VERTEX_MAIN_SUPPORT,null]]),this.defines=new Map,this.uniforms=new Map,this.blendModes=new Map,this.extensions=new Set,this.attributes=Kr,this.varyings=new Set,this.uvTransformation=!1,this.readDepth=!1,this.colorSpace=ce}};let t=0;for(const n of this.effects)if(n.blendMode.blendFunction===ro)e.attributes|=n.getAttributes()&Xr;else{if(0!=(e.attributes&n.getAttributes()&Zr))throw new Error(`Convolution effects cannot be merged (${n.name})`);ta("e"+t++,n,e)}let n=e.shaderParts.get(qr.FRAGMENT_HEAD),i=e.shaderParts.get(qr.FRAGMENT_MAIN_IMAGE),s=e.shaderParts.get(qr.FRAGMENT_MAIN_UV);const r=/\bblend\b/g;for(const t of e.blendModes.values())n+=t.getShaderCode().replace(r,`blend${t.blendFunction}`)+"\n";0!=(e.attributes&Xr)?(e.readDepth&&(i="float depth = readDepth(UV);\n\n\t"+i),this.needsDepthTexture=null===this.getDepthTexture()):this.needsDepthTexture=!1,e.colorSpace===_&&(i+="color0 = sRGBToLinear(color0);\n\t"),e.uvTransformation?(s="vec2 transformedUv = vUv;\n"+s,e.defines.set("UV","transformedUv")):e.defines.set("UV","vUv"),e.shaderParts.set(qr.FRAGMENT_HEAD,n),e.shaderParts.set(qr.FRAGMENT_MAIN_IMAGE,i),e.shaderParts.set(qr.FRAGMENT_MAIN_UV,s);for(const[t,n]of e.shaderParts)null!==n&&e.shaderParts.set(t,n.trim().replace(/^#/,"\n#"));this.skipRendering=0===t,this.needsSwap=!this.skipRendering,this.fullscreenMaterial.setShaderData(e)}recompile(){this.updateMaterial()}getDepthTexture(){return this.fullscreenMaterial.depthBuffer}setDepthTexture(e,t=te){this.fullscreenMaterial.depthBuffer=e,this.fullscreenMaterial.depthPacking=t;for(const n of this.effects)n.setDepthTexture(e,t)}render(e,t,n,i,s){for(const n of this.effects)n.update(e,t,i);if(!this.skipRendering||this.renderToScreen){const s=this.fullscreenMaterial;s.inputBuffer=t.texture,s.time+=i*this.timeScale,e.setRenderTarget(this.renderToScreen?null:n),e.render(this.scene,this.camera)}}setSize(e,t){this.fullscreenMaterial.setSize(e,t);for(const n of this.effects)n.setSize(e,t)}initialize(e,t,n){this.renderer=e;for(const i of this.effects)i.initialize(e,t,n);this.updateMaterial(),void 0!==n&&n!==V&&(this.fullscreenMaterial.defines.FRAMEBUFFER_PRECISION_HIGH="1")}dispose(){super.dispose();for(const e of this.effects)e.removeEventListener("change",this.listener),e.dispose()}handleEvent(e){if("change"===e.type)this.recompile()}},ia="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function sa(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var n=function e(){if(this instanceof e){var n=[null];return n.push.apply(n,arguments),new(Function.bind.apply(t,n))}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,i.get?i:{enumerable:!0,get:function(){return e[t]}})})),n}function ra(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var oa={},aa={get exports(){return oa},set exports(e){oa=e}};aa.exports=function e(t,n,i){function s(o,a){if(!n[o]){if(!t[o]){if(!a&&ra)return ra(o);if(r)return r(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[o]={exports:{}};t[o][0].call(c.exports,(function(e){var n=t[o][1][e];return s(n||e)}),c,c.exports,e,t,n,i)}return n[o].exports}for(var r=ra,o=0;o=43)}})).catch((function(){return!1}))}function b(e){return"boolean"==typeof m?c.resolve(m):A(e).then((function(e){return m=e}))}function T(e){var t=g[e.name],n={};n.promise=new c((function(e,t){n.resolve=e,n.reject=t})),t.deferredOperations.push(n),t.dbReady?t.dbReady=t.dbReady.then((function(){return n.promise})):t.dbReady=n.promise}function S(e){var t=g[e.name].deferredOperations.pop();if(t)return t.resolve(),t.promise}function D(e,t){var n=g[e.name].deferredOperations.pop();if(n)return n.reject(t),n.promise}function E(e,t){return new c((function(n,i){if(g[e.name]=g[e.name]||U(),e.db){if(!t)return n(e.db);T(e),e.db.close()}var s=[e.name];t&&s.push(e.version);var r=o.open.apply(o,s);t&&(r.onupgradeneeded=function(t){var n=r.result;try{n.createObjectStore(e.storeName),t.oldVersion<=1&&n.createObjectStore(f)}catch(n){if("ConstraintError"!==n.name)throw n;console.warn('The database "'+e.name+'" has been upgraded from version '+t.oldVersion+" to version "+t.newVersion+', but the storage "'+e.storeName+'" already exists.')}}),r.onerror=function(e){e.preventDefault(),i(r.error)},r.onsuccess=function(){n(r.result),S(e)}}))}function C(e){return E(e,!1)}function M(e){return E(e,!0)}function P(e,t){if(!e.db)return!0;var n=!e.db.objectStoreNames.contains(e.storeName),i=e.versione.db.version;if(i&&(e.version!==t&&console.warn('The database "'+e.name+"\" can't be downgraded from version "+e.db.version+" to version "+e.version+"."),e.version=e.db.version),s||n){if(n){var r=e.db.version+1;r>e.version&&(e.version=r)}return!0}return!1}function O(e){return new c((function(t,n){var i=new FileReader;i.onerror=n,i.onloadend=function(n){var i=btoa(n.target.result||"");t({__local_forage_encoded_blob:!0,data:i,type:e.type})},i.readAsBinaryString(e)}))}function B(e){return l([x(atob(e.data))],{type:e.type})}function I(e){return e&&e.__local_forage_encoded_blob}function L(e){var t=this,n=t._initReady().then((function(){var e=g[t._dbInfo.name];if(e&&e.dbReady)return e.dbReady}));return u(n,e,e),n}function R(e){T(e);for(var t=g[e.name],n=t.forages,i=0;i0&&(!e.db||"InvalidStateError"===s.name||"NotFoundError"===s.name))return c.resolve().then((function(){if(!e.db||"NotFoundError"===s.name&&!e.db.objectStoreNames.contains(e.storeName)&&e.version<=e.db.version)return e.db&&(e.version=e.db.version+1),M(e)})).then((function(){return R(e).then((function(){F(e,t,n,i-1)}))})).catch(n);n(s)}}function U(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function z(e){var t=this,n={db:null};if(e)for(var i in e)n[i]=e[i];var s=g[n.name];s||(s=U(),g[n.name]=s),s.forages.push(t),t._initReady||(t._initReady=t.ready,t.ready=L);var r=[];function o(){return c.resolve()}for(var a=0;a>4,h[l++]=(15&i)<<4|s>>2,h[l++]=(3&s)<<6|63&r;return c}function fe(e){var t,n=new Uint8Array(e),i="";for(t=0;t>2],i+=X[(3&n[t])<<4|n[t+1]>>4],i+=X[(15&n[t+1])<<2|n[t+2]>>6],i+=X[63&n[t+2]];return n.length%3==2?i=i.substring(0,i.length-1)+"=":n.length%3==1&&(i=i.substring(0,i.length-2)+"=="),i}function me(e,t){var n="";if(e&&(n=de.call(e)),e&&("[object ArrayBuffer]"===n||e.buffer&&"[object ArrayBuffer]"===de.call(e.buffer))){var i,s=J;e instanceof ArrayBuffer?(i=e,s+=ee):(i=e.buffer,"[object Int8Array]"===n?s+=ne:"[object Uint8Array]"===n?s+=ie:"[object Uint8ClampedArray]"===n?s+=se:"[object Int16Array]"===n?s+=re:"[object Uint16Array]"===n?s+=ae:"[object Int32Array]"===n?s+=oe:"[object Uint32Array]"===n?s+=le:"[object Float32Array]"===n?s+=ce:"[object Float64Array]"===n?s+=he:t(new Error("Failed to get type for BinaryArray"))),t(s+fe(i))}else if("[object Blob]"===n){var r=new FileReader;r.onload=function(){var n=Z+e.type+"~"+fe(this.result);t(J+te+n)},r.readAsArrayBuffer(e)}else try{t(JSON.stringify(e))}catch(n){console.error("Couldn't convert value into a JSON string: ",e),t(null,n)}}function ge(e){if(e.substring(0,$)!==J)return JSON.parse(e);var t,n=e.substring(ue),i=e.substring($,ue);if(i===te&&q.test(n)){var s=n.match(q);t=s[1],n=n.substring(s[0].length)}var r=pe(n);switch(i){case ee:return r;case te:return l([r],{type:t});case ne:return new Int8Array(r);case ie:return new Uint8Array(r);case se:return new Uint8ClampedArray(r);case re:return new Int16Array(r);case ae:return new Uint16Array(r);case oe:return new Int32Array(r);case le:return new Uint32Array(r);case ce:return new Float32Array(r);case he:return new Float64Array(r);default:throw new Error("Unkown type: "+i)}}var ve={serialize:me,deserialize:ge,stringToBuffer:pe,bufferToString:fe};function ye(e,t,n,i){e.executeSql("CREATE TABLE IF NOT EXISTS "+t.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],n,i)}function we(e){var t=this,n={db:null};if(e)for(var i in e)n[i]="string"!=typeof e[i]?e[i].toString():e[i];var s=new c((function(e,i){try{n.db=openDatabase(n.name,String(n.version),n.description,n.size)}catch(e){return i(e)}n.db.transaction((function(s){ye(s,n,(function(){t._dbInfo=n,e()}),(function(e,t){i(t)}))}),i)}));return n.serializer=ve,s}function xe(e,t,n,i,s,r){e.executeSql(n,i,s,(function(e,o){o.code===o.SYNTAX_ERR?e.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[t.storeName],(function(e,a){a.rows.length?r(e,o):ye(e,t,(function(){e.executeSql(n,i,s,r)}),r)}),r):r(e,o)}),r)}function Ae(e,t){var n=this;e=d(e);var i=new c((function(t,i){n.ready().then((function(){var s=n._dbInfo;s.db.transaction((function(n){xe(n,s,"SELECT * FROM "+s.storeName+" WHERE key = ? LIMIT 1",[e],(function(e,n){var i=n.rows.length?n.rows.item(0).value:null;i&&(i=s.serializer.deserialize(i)),t(i)}),(function(e,t){i(t)}))}))})).catch(i)}));return h(i,t),i}function be(e,t){var n=this,i=new c((function(t,i){n.ready().then((function(){var s=n._dbInfo;s.db.transaction((function(n){xe(n,s,"SELECT * FROM "+s.storeName,[],(function(n,i){for(var r=i.rows,o=r.length,a=0;a0)return void r(Te.apply(s,[e,a,n,i-1]));o(t)}}))}))})).catch(o)}));return h(r,n),r}function Se(e,t,n){return Te.apply(this,[e,t,n,1])}function De(e,t){var n=this;e=d(e);var i=new c((function(t,i){n.ready().then((function(){var s=n._dbInfo;s.db.transaction((function(n){xe(n,s,"DELETE FROM "+s.storeName+" WHERE key = ?",[e],(function(){t()}),(function(e,t){i(t)}))}))})).catch(i)}));return h(i,t),i}function Ee(e){var t=this,n=new c((function(e,n){t.ready().then((function(){var i=t._dbInfo;i.db.transaction((function(t){xe(t,i,"DELETE FROM "+i.storeName,[],(function(){e()}),(function(e,t){n(t)}))}))})).catch(n)}));return h(n,e),n}function Ce(e){var t=this,n=new c((function(e,n){t.ready().then((function(){var i=t._dbInfo;i.db.transaction((function(t){xe(t,i,"SELECT COUNT(key) as c FROM "+i.storeName,[],(function(t,n){var i=n.rows.item(0).c;e(i)}),(function(e,t){n(t)}))}))})).catch(n)}));return h(n,e),n}function Me(e,t){var n=this,i=new c((function(t,i){n.ready().then((function(){var s=n._dbInfo;s.db.transaction((function(n){xe(n,s,"SELECT key FROM "+s.storeName+" WHERE id = ? LIMIT 1",[e+1],(function(e,n){var i=n.rows.length?n.rows.item(0).key:null;t(i)}),(function(e,t){i(t)}))}))})).catch(i)}));return h(i,t),i}function Pe(e){var t=this,n=new c((function(e,n){t.ready().then((function(){var i=t._dbInfo;i.db.transaction((function(t){xe(t,i,"SELECT key FROM "+i.storeName,[],(function(t,n){for(var i=[],s=0;s '__WebKitDatabaseInfoTable__'",[],(function(n,i){for(var s=[],r=0;r0}function ze(e){var t=this,n={};if(e)for(var i in e)n[i]=e[i];return n.keyPrefix=Re(e,t._defaultConfig),Ue()?(t._dbInfo=n,n.serializer=ve,c.resolve()):c.reject()}function ke(e){var t=this,n=t.ready().then((function(){for(var e=t._dbInfo.keyPrefix,n=localStorage.length-1;n>=0;n--){var i=localStorage.key(n);0===i.indexOf(e)&&localStorage.removeItem(i)}}));return h(n,e),n}function je(e,t){var n=this;e=d(e);var i=n.ready().then((function(){var t=n._dbInfo,i=localStorage.getItem(t.keyPrefix+e);return i&&(i=t.serializer.deserialize(i)),i}));return h(i,t),i}function Ne(e,t){var n=this,i=n.ready().then((function(){for(var t=n._dbInfo,i=t.keyPrefix,s=i.length,r=localStorage.length,o=1,a=0;a=0;t--){var n=localStorage.key(t);0===n.indexOf(e)&&localStorage.removeItem(n)}})):c.reject("Invalid arguments"),h(i,t),i}var Ye={_driver:"localStorageWrapper",_initStorage:ze,_support:Le(),iterate:Ne,getItem:je,setItem:Qe,removeItem:_e,clear:ke,length:Ve,key:Ge,keys:He,dropInstance:We},Ke=function(e,t){return e===t||"number"==typeof e&&"number"==typeof t&&isNaN(e)&&isNaN(t)},Xe=function(e,t){for(var n=e.length,i=0;i{var n;if(e.geometry&&e.material){const n=e;n.geometry.dispose(),Ui(n.material,t)}e instanceof jl&&(null===(n=e.element)||void 0===n||n.remove());const{meshOfModelList:i,poiIconList:s,otherObjList:r}=this.intersectsList,o=i.findIndex((t=>t.uuid===e.uuid)),a=s.findIndex((t=>t.uuid===e.uuid)),l=r.findIndex((t=>t.uuid===e.uuid));o>-1&&this.intersectsList.meshOfModelList.splice(o,1),a>-1&&this.intersectsList.poiIconList.splice(a,1),l>-1&&this.intersectsList.otherObjList.splice(l,1)})),e.removeFromParent(),this.signals.objectRemoved.dispatch(e)}openSceneFog(e={}){const{color:t=13426943,density:n=.002}=e;this.scene.fog=new ye(t,n),this.signals.sceneChanged.dispatch()}closeSceneFog(){this.scene.fog=null,this.signals.sceneChanged.dispatch()}edgeShow(e,t){const n=[],i=e=>{-1===this.selectedObjects.edge.findIndex((t=>t.uuid===e.uuid))&&n.push(e)};return ts(e)?e.forEach((e=>i(e))):ns(e)&&i(e),this.selectedObjects.edge=[...this.selectedObjects.edge,...n],this.signals.outlineChange.dispatch({objects:this.selectedObjects.edge,options:t}),Promise.resolve()}unEdgeShow(e){e||(e=[...this.selectedObjects.edge]);const t=e=>{const t=this.selectedObjects.edge.findIndex((t=>t.uuid===e.uuid));return-1===t||(this.selectedObjects.edge.splice(t,1),this.signals.outlineChange.dispatch({objects:this.selectedObjects.edge})),Promise.resolve()};return ts(e)?Promise.all(e.map((e=>t(e)))):ns(e)?t(e):Promise.resolve()}strokeShow(e,t={}){const{isOpacityShow:n=!0,color:i=4647927,opacity:s=.2,edgeColor:r=61183,edgeOpacity:o=1,modelCache:a=!0,firstChild:l=!1}=t,c=async e=>{var c;if(-1!==this.selectedObjects.stroke.findIndex((t=>t.uuid===e.uuid)))return Promise.resolve();if(e.userData.strokeGroup)return Promise.resolve();const h=new zl({id:`${null!==(c=e.sid)&&void 0!==c?c:e.id}_stroke`,name:`${e.name}_stroke`}),u=new we,d=new w({color:r,transparent:!0,opacity:o});u.material=d,h.add(u);let p=null;const f=()=>{const t=[];if((l?e.children[0]:e).traverse((n=>{if("Mesh"===n.type&&n instanceof se){const i=new xe(n.geometry,89);n.updateWorldMatrix(!0,!1);const s=n.matrixWorld.clone().premultiply(e.matrixWorld.clone().invert());i.applyMatrix4(s),t.push(i)}})),0!==t.length)return Qt(t)};if(a&&e instanceof Nl&&e.url){const{url:t}=e;await this.strokeStore.ready();const n=await this.strokeStore.getItem(t);if(n)p=new v,p.setAttribute("position",new y(n,3));else{const e=f();if(e){p=e;const n=e.getAttribute("position");n.array instanceof Float32Array&&this.strokeStore.setItem(t,n.array.buffer)}}}else{const e=f();e&&(p=e)}return null!==p?(u.geometry=p,e.userData.strokeGroup=h,e.userData.strokeOptions=t,this.addObject(h,e),this.selectedObjects.stroke.push(e),n&&this.opacityShow(l?e.children[0]:e,{color:i,opacity:s}),Promise.resolve()):void 0};return ts(e)?Promise.all(e.map((e=>c(e)))):ns(e)?c(e):Promise.resolve()}unStrokeShow(e){e||(e=[...this.selectedObjects.stroke]);const t=e=>{if(!e.userData.strokeGroup)return Promise.resolve();this.removeObject(e.userData.strokeGroup),Reflect.deleteProperty(e.userData,"strokeGroup");const t=this.selectedObjects.stroke.findIndex((t=>t.uuid===e.uuid));if(-1===t)return Promise.resolve();this.selectedObjects.stroke.splice(t,1),this.signals.geometryChanged.dispatch();const{firstChild:n}=e.userData.strokeOptions;return this.unOpacityShow(n?e.children[0]:e),Reflect.deleteProperty(e.userData,"strokeOptions"),Promise.resolve()};return ts(e)?Promise.all(e.map((e=>t(e)))):ns(e)?t(e):Promise.resolve()}opacityShow(e,t={}){const{color:n="#fff",opacity:i=.8}=t;function s(e){const t=zi(e);return t.map=null,t.transparent=i<1,t.depthWrite=!t.transparent,t.color.set(n),t.opacity=i,t}const r=e=>(-1!==this.selectedObjects.opacity.findIndex((t=>t.uuid===e.uuid))||(e.traverse((e=>{if(e instanceof se){if(e.userData.material)return;e.userData.material=e.material,e.material=Ui(e.material,s)}})),this.signals.materialChanged.dispatch(),this.selectedObjects.opacity.push(e)),Promise.resolve());return ts(e)?Promise.all(e.map((e=>r(e)))):ns(e)?r(e):Promise.resolve()}unOpacityShow(e){e||(e=[...this.selectedObjects.opacity]);const t=e=>new Promise((t=>{const n=this.selectedObjects.opacity.findIndex((t=>t.uuid===e.uuid));-1===n&&t(),this.selectedObjects.opacity.splice(n,1),e.traverse((e=>{if(e instanceof se){if(!e.userData.material)return;ki(e.material),e.material=e.userData.material,Reflect.deleteProperty(e.userData,"material")}})),this.signals.materialChanged.dispatch(),t()}));return ts(e)?Promise.all(e.map((e=>t(e)))):ns(e)?t(e):Promise.resolve()}highlightShow(e,t={}){const{color:n="red",opacity:i=1}=t;function s(e){e instanceof Ae&&(e.color=new u(n),e.opacity=i,e.transparent=i<1,e.depthWrite=!e.transparent)}const r=e=>(-1!==this.selectedObjects.highlight.findIndex((t=>t.uuid===e.uuid))||(e.traverse((e=>{if(e instanceof se){if(e.userData.material)return;e.userData.material=e.material,e.material=zi(e.material),Ui(e.material,s)}})),this.signals.materialChanged.dispatch(),this.selectedObjects.highlight.push(e)),Promise.resolve());return ts(e)?Promise.all(e.map((e=>r(e)))):ns(e)?r(e):Promise.resolve()}unHighlightShow(e){e||(e=[...this.selectedObjects.highlight]);const t=e=>new Promise((t=>{const n=this.selectedObjects.highlight.findIndex((t=>t.uuid===e.uuid));-1===n&&t(),this.selectedObjects.highlight.splice(n,1),e.traverse((e=>{if(e instanceof se){if(!e.userData.material)return;ki(e.material),e.material=e.userData.material,Reflect.deleteProperty(e.userData,"material")}})),this.signals.materialChanged.dispatch(),t()}));return ts(e)?Promise.all(e.map((e=>t(e)))):ns(e)?t(e):Promise.resolve()}emissiveShow(e,t={}){const{color:n="red",baseColor:i,maxOpacity:s=1,minOpacity:r=0,duration:o=1e3,yoyo:a=!1}=t;function l(e){e instanceof Ae&&(i&&e.color.set(i),e.emissive.set(n),e.emissiveIntensity=s,0!==o&&ps({emissiveIntensity:s},{emissiveIntensity:r},{duration:o,yoyo:a,repeat:!0},(t=>e.emissiveIntensity=t.emissiveIntensity),(t=>e.userData.animation=t)))}const c=e=>(-1!==this.selectedObjects.emissive.findIndex((t=>t.uuid===e.uuid))||(e.traverse((e=>{if(e instanceof se){if(e.userData.material)return;e.userData.material=e.material,e.material=zi(e.material),Ui(e.material,l)}})),this.selectedObjects.emissive.push(e),this.signals.materialChanged.dispatch()),Promise.resolve());return ts(e)?Promise.all(e.map((e=>c(e)))):ns(e)?c(e):Promise.resolve()}unEmissiveShow(e){function t(e){e.userData.animation&&zt.remove(e.userData.animation)}e||(e=[...this.selectedObjects.emissive]);const n=e=>new Promise((n=>{const i=this.selectedObjects.emissive.findIndex((t=>t.uuid===e.uuid));-1===i&&n(),this.selectedObjects.emissive.splice(i,1),e.traverse((e=>{if(e instanceof se){if(!e.userData.material)return;Ui(e.material,t),ki(e.material),e.material=e.userData.material,Reflect.deleteProperty(e.userData,"material")}})),this.signals.materialChanged.dispatch(),n()}));return ts(e)?Promise.all(e.map((e=>n(e)))):ns(e)?n(e):Promise.resolve()}_triggerObjectAdded(e){if(e instanceof Fl)if("Model"===e.stype)e.traverse((e=>{if(e instanceof se){-1===this.intersectsList.meshOfModelList.findIndex((t=>t.uuid===e.uuid))&&this.intersectsList.meshOfModelList.push(e)}}));else if("Poi"===e.stype&&e instanceof Gl){const t=this.intersectsList.poiIconList.findIndex((t=>{var n;return t.uuid===(null===(n=e.icon)||void 0===n?void 0:n.uuid)}));-1===t&&e.icon&&this.intersectsList.poiIconList.push(e.icon)}else"Group"===e.stype?e.children.forEach((e=>this._triggerObjectAdded(e))):e.isObject3D&&e.traverse((e=>{if(e instanceof se){-1===this.intersectsList.otherObjList.findIndex((t=>t.uuid===e.uuid))&&this.intersectsList.otherObjList.push(e)}}));else e.isObject3D&&e.traverse((e=>{if(e instanceof se){-1===this.intersectsList.otherObjList.findIndex((t=>t.uuid===e.uuid))&&this.intersectsList.otherObjList.push(e)}}))}}class ha extends o{constructor(e=document.createElement("div")){super(),this.isCSS2DObject=!0,this.element=e,this.element.style.position="absolute",this.addEventListener("removed",(()=>{this.traverse((function(e){e instanceof ha&&e.element instanceof Element&&null!==e.element.parentNode&&e.element.parentNode.removeChild(e.element)}))}))}copy(e,t){return super.copy(e,t),this.element=e.element.cloneNode(!0),this}}const ua=new t,da=new m,pa=new m,fa=new t,ma=new t;class ga{constructor(e){let t,n,i,s;this.viewport=e,this.domElement=document.createElement("div");const r={objects:new WeakMap};this.domElement.style.overflow="hidden",this.getSize=function(){return{width:t,height:n}},this.render=function(e,t){!0===e.matrixWorldAutoUpdate&&e.updateMatrixWorld(),null===t.parent&&!0===t.matrixWorldAutoUpdate&&t.updateMatrixWorld(),da.copy(t.matrixWorldInverse),pa.multiplyMatrices(t.projectionMatrix,da),o(e,e,t),function(e){const t=function(e){const t=[];return e.traverse((function(e){e instanceof ha&&t.push(e)})),t}(e).sort((function(e,t){if(e.renderOrder!==t.renderOrder)return t.renderOrder-e.renderOrder;return r.objects.get(e).distanceToCameraSquared-r.objects.get(t).distanceToCameraSquared})),n=t.length;for(let e=0,i=t.length;e{t=e,n=r,i=t/2,s=n/2,this.domElement.style.width=e+"px",this.domElement.style.height=r+"px"};const o=(e,t,n)=>{var l;if(e instanceof ha){Qi(e,this.viewport);const t=e.parent;ua.setFromMatrixPosition(e.matrixWorld),ua.applyMatrix4(pa);const o=Si(e)&&ua.z>=-1&&ua.z<=1&&!0===e.layers.test(n.layers);if(e.userData.prevVisible!==o&&(null===(l=t.onChange)||void 0===l||l.call(t,o),t.elementAutoDisplay&&(e.element.style.display=!0===o?"":"none")),e.userData.prevVisible=o,!0===o||!1===t.elementAutoDisplay){const t=e.element;t.style.transform="translate(-50%,-50%) translate("+(ua.x*i+i)+"px,"+(-ua.y*s+s)+"px)",t.parentNode!==this.domElement&&this.domElement.appendChild(t)}const c={distanceToCameraSquared:a(n,e)};r.objects.set(e,c)}for(let i=0,s=e.children.length;i{this.traverse((function(e){e instanceof xa&&e.element instanceof Element&&null!==e.element.parentNode&&e.element.parentNode.removeChild(e.element)}))}))}copy(e,t){return super.copy(e,t),this.element=e.element.cloneNode(!0),this}}class Aa extends xa{constructor(e){super(e),this.isCSS3DSprite=!0,this.rotation2D=0}copy(e,t){return super.copy(e,t),this.rotation2D=e.rotation2D,this}}const ba=new m,Ta=new m;class Sa{constructor(e){let t,n,i,s;this.viewport=e,this.domElement=document.createElement("div");const r={camera:{style:""},objects:new WeakMap};this.domElement.style.overflow="hidden";const o=document.createElement("div");o.style.transformOrigin="0 0",this.domElement.appendChild(o);const a=document.createElement("div");function l(e){return Math.abs(e)<1e-10?0:e}function c(e){const t=e.elements;return"matrix3d("+l(t[0])+","+l(-t[1])+","+l(t[2])+","+l(t[3])+","+l(t[4])+","+l(-t[5])+","+l(t[6])+","+l(t[7])+","+l(t[8])+","+l(-t[9])+","+l(t[10])+","+l(t[11])+","+l(t[12])+","+l(-t[13])+","+l(t[14])+","+l(t[15])+")"}function h(e){const t=e.elements;return"translate(-50%,-50%)"+("matrix3d("+l(t[0])+","+l(t[1])+","+l(t[2])+","+l(t[3])+","+l(-t[4])+","+l(-t[5])+","+l(-t[6])+","+l(-t[7])+","+l(t[8])+","+l(t[9])+","+l(t[10])+","+l(t[11])+","+l(t[12])+","+l(t[13])+","+l(t[14])+","+l(t[15])+")")}a.style.transformStyle="preserve-3d",o.appendChild(a),this.getSize=()=>({width:t,height:n}),this.render=(e,h)=>{const d=h.projectionMatrix.elements[5]*s;h.view&&h.view.enabled?(o.style.transform=`translate( ${-h.view.offsetX*(t/h.view.width)}px, ${-h.view.offsetY*(n/h.view.height)}px )`,o.style.transform+=`scale( ${h.view.fullWidth/h.view.width}, ${h.view.fullHeight/h.view.height} )`):o.style.transform="",!0===e.matrixWorldAutoUpdate&&e.updateMatrixWorld(),null===h.parent&&!0===h.matrixWorldAutoUpdate&&h.updateMatrixWorld();let p=0,f=0;h instanceof be&&(p=-(h.right+h.left)/2,f=(h.top+h.bottom)/2);const m=h.view&&h.view.enabled?h.view.height/h.view.fullHeight:1,g=h instanceof be?`scale( ${m} )scale(`+d+")translate("+l(p)+"px,"+l(f)+"px)"+c(h.matrixWorldInverse):`scale( ${m} )translateZ(`+d+"px)"+c(h.matrixWorldInverse),v=(h instanceof pe?"perspective("+d+"px) ":"")+g+"translate("+i+"px,"+s+"px)";r.camera.style!==v&&(a.style.transform=v,r.camera.style=v),u(e,e,h)},this.setSize=(e,r)=>{t=e,n=r,i=t/2,s=n/2,this.domElement.style.width=e+"px",this.domElement.style.height=r+"px",o.style.width=e+"px",o.style.height=r+"px",a.style.width=e+"px",a.style.height=r+"px"};const u=(e,t,n,i)=>{var s;if(e instanceof xa){Qi(e,this.viewport);const t=e.parent,i=Si(e)&&!0===e.layers.test(n.layers);if(e.userData.prevVisible!==i&&(null===(s=t.onChange)||void 0===s||s.call(t,i),t.elementAutoDisplay&&(e.element.style.display=!0===i?"":"none")),e.userData.prevVisible=i,!0===i||!1===t.elementAutoDisplay){let t;e instanceof Aa?(ba.copy(n.matrixWorldInverse),ba.transpose(),0!==e.rotation2D&&ba.multiply(Ta.makeRotationZ(e.rotation2D)),e.matrixWorld.decompose(va,ya,wa),ba.setPosition(va),ba.scale(wa),ba.elements[3]=0,ba.elements[7]=0,ba.elements[11]=0,ba.elements[15]=1,t=h(ba)):t=h(e.matrixWorld);const i=e.element,s=r.objects.get(e);if(void 0===s||s.style!==t){i.style.transform=t;const n={style:t};r.objects.set(e,n)}i.parentNode!==a&&a.appendChild(i)}}for(let i=0,s=e.children.length;i{const i=Ea.clone(),s=Ea.clone(),r=Ea.clone();i.makeRotationY(e),s.makeRotationX(t);const o=new n;return r.multiplyMatrices(i,s),o.setFromRotationMatrix(r),o},Ma=Ca(-Math.PI/2,-Math.PI/4),Pa=Ca(Math.PI/2,-Math.PI/4),Oa=Ca(-Math.PI/4,-Math.PI/4),Ba=Ca(Math.PI/4,-Math.PI/4),Ia=Ca(1.25*Math.PI,-Math.PI/4),La=Ca(.75*Math.PI,-Math.PI/4),Ra={LEFT:new n(0,-Math.PI/2,0),RIGHT:new n(0,Math.PI/2,0),FRONT:new n(0,0,0),BACK:new n(0,Math.PI,0),TOP:new n(-Math.PI/2,0,0),BOTTOM:new n(Math.PI/2,0,0),FRONTTOP:new n(-Math.PI/4,0,0),BACKTOP:new n(Math.PI/4,Math.PI,0),LEFTTOP:new n(Ma.x,Ma.y,Ma.z),RIGHTTOP:new n(Pa.x,Pa.y,Pa.z),LEFTFRONTTOP:new n(Oa.x,Oa.y,Oa.z),RIGHTFRONTTOP:new n(Ba.x,Ba.y,Ba.z),LEFTBACKTOP:new n(Ia.x,Ia.y,Ia.z),RIGHTBACKTOP:new n(La.x,La.y,La.z)},Fa={LEFT:new De(0,Math.PI/2,-Math.PI/2),RIGHT:new De(0,Math.PI/2,Math.PI/2),FRONT:new De(0,Math.PI/2,0),BACK:new De(0,Math.PI/2,Math.PI),TOP:new De(0,0,0),BOTTOM:new De(0,Math.PI,0),FRONTTOP:new De(0,Math.PI/4,0),BACKTOP:new De(0,Math.PI/4,Math.PI),LEFTTOP:new De(0,Math.PI/4,-Math.PI/2),RIGHTTOP:new De(0,Math.PI/4,Math.PI/2),LEFTFRONTTOP:new De(0,Math.PI/4,-Math.PI/4),RIGHTFRONTTOP:new De(0,Math.PI/4,Math.PI/4),LEFTBACKTOP:new De(0,Math.PI/4,-Math.PI/4*3),RIGHTBACKTOP:new De(0,Math.PI/4,Math.PI/4*3)},Ua=new t,za=new n,ka=new pe(50,1,.01,5e4);ka.position.set(500,1e3,500),ka.lookAt(Ua.set(0,0,0)),ka.name="SspCamera";const ja=new be(-500,500,500,-500,.01,5e4);ja.position.set(500,1e3,500),ja.lookAt(Ua.set(0,0,0)),ka.name="SspCamera";class Na{constructor(e){this.viewport=e,this.mainCamera=ka.clone(),this.mainCamera.name="CameraControls",this.currentCamera=this.mainCamera,this.cameras={}}createCamera(e){const t=ka.clone();return t.name=e,this.cameras[e]=t,t}removeCamera(e){return"fullFreeCamera"!==e&&(delete this.cameras[e],!0)}setCurrentCamera(e){this.currentCamera=this.viewport.camera=e,this.viewport.signals.cameraObjectChange.dispatch()}async setCamera(e,t,n){let i=ka.clone();const s="orthographic"===e;if(s&&(i=ja.clone()),this.mainCamera.type!==i.type){const{controls:e}=this.viewport;this.mainCamera=e.camera=i,s?e.mouseButtons.wheel=li.ACTION.ZOOM:(e.mouseButtons.wheel=li.ACTION.DOLLY,e.zoomTo(1)),this.setCurrentCamera(i)}t&&await this.setCameraViewpoint(t,n)}getCameraViewpoint(){const{controls:e}=this.viewport;return{position:e.getPosition(new t),target:e.getTarget(new t),zoom:e.camera.zoom}}async setCameraViewpoint(e,t){const{controls:n}=this.viewport,i=e,s=e;if(i.target){const{position:e,target:s,zoom:r=n.camera.zoom}=i;await Promise.all([n.zoomTo(r,t),n.setLookAt(e.x,e.y,e.z,s.x,s.y,s.z,t)])}else if(s.rotation){const{position:e,rotation:i}=s,r=Oi(e,i);await n.setLookAt(e.x,e.y,e.z,r.x,r.y,r.z,t)}}moveTo(e,t){return ps(this.currentCamera.position,e,t,(e=>this.viewport.signals.cameraChange.dispatch(e)))}rotateTo(e,t){const n=this.currentCamera.quaternion.clone(),i=(new r).setFromEuler(e);return ps({t:0},{t:1},t,(({t:e})=>{this.currentCamera.quaternion.slerpQuaternions(n,i,e)}))}async flyTo(e,t="frontTop",i={}){const{enableTransition:s=!0}=i;if(Ji(t)){const e=t.toLocaleUpperCase();"CURRENT"===e?za.copy(this.currentCamera.rotation):Ra[e]&&za.copy(Ra[e])}else t instanceof n?za.copy(t):ns(t)&&za.set(t.x,t.y,t.z);return this.setCameraViewpoint({position:e,rotation:za},s)}async flyToObj(e,n="frontTop",i={}){var s;let{padding:a="30%"}=i;const{enableTransition:l=!0,viewpointSpace:c="world",minPadding:h=1}=i;e instanceof jl&&(a=null!==(s=i.padding)&&void 0!==s?s:50);const u=e instanceof o?wi(e):e,d=u.getSize(Ua);if(Ji(a)){const e=Math.max(d.x,d.y,d.z,h);a=(es(p=a)?p:p.includes("%")?.01*Number(p.split("%")[0]):isNaN(+p)?0:Number(p))*e}var p;Ua.setScalar(a/2),u.max.add(Ua),u.min.sub(Ua);const{controls:f}=this.viewport,m=[];if(f.normalizeRotations(),"current"!==n){m.push(f.fitToBox(u,l));const i=Fa[n.toLocaleUpperCase()];if("local"===c&&e instanceof o){const n=new t(0,0,1),s=e.getWorldQuaternion(new r),o=new De;n.applyQuaternion(s),o.setFromVector3(n),o.phi-=Math.PI/2,m.push(f.rotateTo(i.theta+o.theta,i.phi+o.phi,l))}else m.push(f.rotateTo(i.theta,i.phi,l))}else{const e=new Ee;u.getBoundingSphere(e),m.push(f.fitToSphere(e,l))}await Promise.all(m)}surroundOnTarget(e,t={}){const{duration:n=3e3,startAngle:i=0,endAngle:s=360,onStart:r}=t,o=vi(e),{controls:a}=this.viewport;return a.setTarget(o.x,o.y,o.z),ps({radian:Ai(i)},{radian:Ai(s)},{duration:n},(({radian:e})=>{a.rotateAzimuthTo(e,!1)}),r)}surroundOnObject(e,t={}){const n=wi(e).getCenter(Ua);return this.surroundOnTarget(n,t)}getObjectLabelPos(e,n="frontTop",s={}){if(e instanceof o&&(e=(new i).setFromObject(e)),e.isEmpty())return mi("target box is empty"),new t;const{extendScale:r=1.6,mode:a="scene"}=s;if("scene"===a){const t=e.getCenter(Ua),i=e.max.clone().sub(e.min),s=Math.max(i.x,i.y,i.z),o=t.clone(),a=e=>{const t=(r-.5)*Math.abs(s),n=Math.max(t,this.viewport.camera.near);o.add(e.multiplyScalar(n))};let l;return l=Ji(n)?Ra[n.toLocaleUpperCase()]:yi(n),a(Ua.set(0,0,1).applyEuler(l)),o}return"screen"===a?e.getCenter(Ua).clone():new t}}const Ga=new v;Ga.setAttribute("position",new g(new Float32Array([-1,-1,3,-1,-1,3]),2)),Ga.setAttribute("uv",new g(new Float32Array([0,0,2,0,0,2]),2)),Ga.boundingSphere=new Ee,Ga.computeBoundingSphere=function(){};const Ha=new be;class Va{constructor(e){this._mesh=new se(Ga,e),this._mesh.frustumCulled=!1}render(e){e.render(this._mesh,Ha)}get material(){return this._mesh.material}set material(e){this._mesh.material=e}dispose(){this._mesh.material.dispose(),this._mesh.geometry.dispose()}}const _a={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},sceneNormal:{value:null},projMat:{value:new m},viewMat:{value:new m},projViewMat:{value:new m},projectionMatrixInv:{value:new m},viewMatrixInv:{value:new m},cameraPos:{value:new t},resolution:{value:new f},time:{value:0},samples:{value:[]},samplesR:{value:[]},bluenoise:{value:null},distanceFalloff:{value:1},radius:{value:5},near:{value:.1},far:{value:1e3},logDepth:{value:!1},ortho:{value:!1},screenSpaceRadius:{value:!1}},vertexShader:"\nvarying vec2 vUv;\nvoid main() {\n vUv = uv;\n gl_Position = vec4(position, 1);\n}",fragmentShader:"\n #define SAMPLES 16\n #define FSAMPLES 16.0\nuniform sampler2D sceneDiffuse;\nuniform highp sampler2D sceneNormal;\nuniform highp sampler2D sceneDepth;\nuniform mat4 projectionMatrixInv;\nuniform mat4 viewMatrixInv;\nuniform mat4 projMat;\nuniform mat4 viewMat;\nuniform mat4 projViewMat;\nuniform vec3 cameraPos;\nuniform vec2 resolution;\nuniform float time;\nuniform vec3[SAMPLES] samples;\nuniform float[SAMPLES] samplesR;\nuniform float radius;\nuniform float distanceFalloff;\nuniform float near;\nuniform float far;\nuniform bool logDepth;\nuniform bool ortho;\nuniform bool screenSpaceRadius;\nuniform sampler2D bluenoise;\n varying vec2 vUv;\n highp float linearize_depth(highp float d, highp float zNear,highp float zFar)\n {\n return (zFar * zNear) / (zFar - d * (zFar - zNear));\n }\n highp float linearize_depth_ortho(highp float d, highp float nearZ, highp float farZ) {\n return nearZ + (farZ - nearZ) * d;\n }\n highp float linearize_depth_log(highp float d, highp float nearZ,highp float farZ) {\n float depth = pow(2.0, d * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n return ortho ? linearize_depth_ortho(\n linDepth,\n nearZ,\n farZ\n ) :linearize_depth(linDepth, nearZ, farZ);\n }\n\n vec3 getWorldPosLog(vec3 posS) {\n vec2 uv = posS.xy;\n float z = posS.z;\n float nearZ =near;\n float farZ = far;\n float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0;\n vec4 wpos = projectionMatrixInv * clipVec;\n return wpos.xyz / wpos.w;\n }\n vec3 getWorldPos(float depth, vec2 coord) {\n #ifdef LOGDEPTH\n return getWorldPosLog(vec3(coord, depth));\n #endif\n float z = depth * 2.0 - 1.0;\n vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0);\n vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition;\n // Perspective division\n vec4 worldSpacePosition = viewSpacePosition;\n worldSpacePosition.xyz /= worldSpacePosition.w;\n return worldSpacePosition.xyz;\n }\n\n vec3 computeNormal(vec3 worldPos, vec2 vUv) {\n ivec2 p = ivec2(vUv * resolution);\n float c0 = texelFetch(sceneDepth, p, 0).x;\n float l2 = texelFetch(sceneDepth, p - ivec2(2, 0), 0).x;\n float l1 = texelFetch(sceneDepth, p - ivec2(1, 0), 0).x;\n float r1 = texelFetch(sceneDepth, p + ivec2(1, 0), 0).x;\n float r2 = texelFetch(sceneDepth, p + ivec2(2, 0), 0).x;\n float b2 = texelFetch(sceneDepth, p - ivec2(0, 2), 0).x;\n float b1 = texelFetch(sceneDepth, p - ivec2(0, 1), 0).x;\n float t1 = texelFetch(sceneDepth, p + ivec2(0, 1), 0).x;\n float t2 = texelFetch(sceneDepth, p + ivec2(0, 2), 0).x;\n\n float dl = abs((2.0 * l1 - l2) - c0);\n float dr = abs((2.0 * r1 - r2) - c0);\n float db = abs((2.0 * b1 - b2) - c0);\n float dt = abs((2.0 * t1 - t2) - c0);\n\n vec3 ce = getWorldPos(c0, vUv).xyz;\n\n vec3 dpdx = (dl < dr) ? ce - getWorldPos(l1, (vUv - vec2(1.0 / resolution.x, 0.0))).xyz\n : -ce + getWorldPos(r1, (vUv + vec2(1.0 / resolution.x, 0.0))).xyz;\n vec3 dpdy = (db < dt) ? ce - getWorldPos(b1, (vUv - vec2(0.0, 1.0 / resolution.y))).xyz\n : -ce + getWorldPos(t1, (vUv + vec2(0.0, 1.0 / resolution.y))).xyz;\n\n return normalize(cross(dpdx, dpdy));\n}\n\nvoid main() {\n vec4 diffuse = texture2D(sceneDiffuse, vUv);\n float depth = texture2D(sceneDepth, vUv).x;\n if (depth == 1.0) {\n gl_FragColor = vec4(vec3(1.0), 1.0);\n return;\n }\n vec3 worldPos = getWorldPos(depth, vUv);\n // vec3 normal = texture2D(sceneNormal, vUv).rgb;//computeNormal(worldPos, vUv);\n #ifdef HALFRES\n vec3 normal = texture2D(sceneNormal, vUv).rgb;\n #else\n vec3 normal = computeNormal(worldPos, vUv);\n #endif\n vec4 noise = texture2D(bluenoise, gl_FragCoord.xy / 128.0);\n vec3 randomVec = normalize(noise.rgb * 2.0 - 1.0);\n vec3 tangent = normalize(randomVec - normal * dot(randomVec, normal));\n vec3 bitangent = cross(normal, tangent);\n mat3 tbn = mat3(tangent, bitangent, normal);\n float occluded = 0.0;\n float totalWeight = 0.0;\n /* float radiusScreen = distance(\n worldPos,\n getWorldPos(depth, vUv + \n vec2(48.0, 0.0) / resolution)\n );/*vUv.x < 0.5 ? radius : min(distance(\n worldPos,\n getWorldPos(depth, vUv + \n vec2(100.0, 0.0) / resolution)\n ), radius);\n float distanceFalloffScreen = radiusScreen * 0.2;*/\n float radiusToUse = screenSpaceRadius ? distance(\n worldPos,\n getWorldPos(depth, vUv +\n vec2(radius, 0.0) / resolution)\n ) : radius;\n float distanceFalloffToUse =screenSpaceRadius ?\n radiusToUse * distanceFalloff\n : distanceFalloff;\n float bias = (0.1 / near) * fwidth(distance(worldPos, cameraPos)) / radiusToUse;\n for(float i = 0.0; i < FSAMPLES; i++) {\n vec3 sampleDirection = \n tbn * \n samples[int(i)];\n ;\n float moveAmt = samplesR[int(mod(i + noise.a * FSAMPLES, FSAMPLES))];\n vec3 samplePos = worldPos + radiusToUse * moveAmt * sampleDirection;\n vec4 offset = projMat * vec4(samplePos, 1.0);\n offset.xyz /= offset.w;\n offset.xyz = offset.xyz * 0.5 + 0.5;\n float sampleDepth = textureLod(sceneDepth, offset.xy, 0.0).x;\n /*float distSample = logDepth ? linearize_depth_log(sampleDepth, near, far) \n (ortho ? linearize_depth_ortho(sampleDepth, near, far) : linearize_depth(sampleDepth, near, far));*/\n #ifdef LOGDEPTH\n float distSample = linearize_depth_log(sampleDepth, near, far);\n #else\n float distSample = ortho ? linearize_depth_ortho(sampleDepth, near, far) : linearize_depth(sampleDepth, near, far);\n #endif\n float distWorld = ortho ? linearize_depth_ortho(offset.z, near, far) : linearize_depth(offset.z, near, far);\n float rangeCheck = smoothstep(0.0, 1.0, distanceFalloffToUse / (abs(distSample - distWorld)));\n vec2 diff = gl_FragCoord.xy - ( offset.xy * resolution);\n float weight = dot(sampleDirection, normal);\n occluded += rangeCheck * weight * \n (distSample + bias\n < distWorld ? 1.0 : 0.0) * (\n (dot(\n diff,\n diff\n \n ) < 1.0 || (sampleDepth == depth) || (\n offset.x < 0.0 || offset.x > 1.0 || offset.y < 0.0 || offset.y > 1.0\n ) ? 0.0 : 1.0)\n );\n totalWeight += weight;\n }\n float occ = clamp(1.0 - occluded / totalWeight, 0.0, 1.0);\n gl_FragColor = vec4(0.5 + 0.5 * normal, occ);\n}"},Qa={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},tDiffuse:{value:null},projMat:{value:new m},viewMat:{value:new m},projectionMatrixInv:{value:new m},viewMatrixInv:{value:new m},cameraPos:{value:new t},resolution:{value:new f},color:{value:new t(0,0,0)},blueNoise:{value:null},downsampledDepth:{value:null},time:{value:0},intensity:{value:10},renderMode:{value:0},gammaCorrection:{value:!1},logDepth:{value:!1},ortho:{value:!1},near:{value:.1},far:{value:1e3},screenSpaceRadius:{value:!1},radius:{value:0},distanceFalloff:{value:1},fog:{value:!1},fogExp:{value:!1},fogDensity:{value:0},fogNear:{value:1/0},fogFar:{value:1/0},colorMultiply:{value:!0}},vertexShader:"\n\t\tvarying vec2 vUv;\n\t\tvoid main() {\n\t\t\tvUv = uv;\n\t\t\tgl_Position = vec4(position, 1);\n\t\t}",fragmentShader:"\n\t\tuniform sampler2D sceneDiffuse;\n uniform highp sampler2D sceneDepth;\n uniform highp sampler2D downsampledDepth;\n uniform sampler2D tDiffuse;\n uniform sampler2D blueNoise;\n uniform vec2 resolution;\n uniform vec3 color;\n uniform mat4 projectionMatrixInv;\n uniform mat4 viewMatrixInv;\n uniform float intensity;\n uniform float renderMode;\n uniform float near;\n uniform float far;\n uniform bool gammaCorrection;\n uniform bool logDepth;\n uniform bool ortho;\n uniform bool screenSpaceRadius;\n uniform bool fog;\n uniform bool fogExp;\n uniform bool colorMultiply;\n uniform float fogDensity;\n uniform float fogNear;\n uniform float fogFar;\n uniform float radius;\n uniform float distanceFalloff;\n uniform vec3 cameraPos;\n varying vec2 vUv;\n highp float linearize_depth(highp float d, highp float zNear,highp float zFar)\n {\n return (zFar * zNear) / (zFar - d * (zFar - zNear));\n }\n highp float linearize_depth_ortho(highp float d, highp float nearZ, highp float farZ) {\n return nearZ + (farZ - nearZ) * d;\n }\n highp float linearize_depth_log(highp float d, highp float nearZ,highp float farZ) {\n float depth = pow(2.0, d * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n return ortho ? linearize_depth_ortho(\n linDepth,\n nearZ,\n farZ\n ) :linearize_depth(linDepth, nearZ, farZ);\n }\n vec3 getWorldPosLog(vec3 posS) {\n vec2 uv = posS.xy;\n float z = posS.z;\n float nearZ =near;\n float farZ = far;\n float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0;\n vec4 wpos = projectionMatrixInv * clipVec;\n return wpos.xyz / wpos.w;\n }\n vec3 getWorldPos(float depth, vec2 coord) {\n // if (logDepth) {\n #ifdef LOGDEPTH\n return getWorldPosLog(vec3(coord, depth));\n #endif\n // }\n float z = depth * 2.0 - 1.0;\n vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0);\n vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition;\n // Perspective division\n vec4 worldSpacePosition = viewSpacePosition;\n worldSpacePosition.xyz /= worldSpacePosition.w;\n return worldSpacePosition.xyz;\n }\n \n vec3 computeNormal(vec3 worldPos, vec2 vUv) {\n ivec2 p = ivec2(vUv * resolution);\n float c0 = texelFetch(sceneDepth, p, 0).x;\n float l2 = texelFetch(sceneDepth, p - ivec2(2, 0), 0).x;\n float l1 = texelFetch(sceneDepth, p - ivec2(1, 0), 0).x;\n float r1 = texelFetch(sceneDepth, p + ivec2(1, 0), 0).x;\n float r2 = texelFetch(sceneDepth, p + ivec2(2, 0), 0).x;\n float b2 = texelFetch(sceneDepth, p - ivec2(0, 2), 0).x;\n float b1 = texelFetch(sceneDepth, p - ivec2(0, 1), 0).x;\n float t1 = texelFetch(sceneDepth, p + ivec2(0, 1), 0).x;\n float t2 = texelFetch(sceneDepth, p + ivec2(0, 2), 0).x;\n \n float dl = abs((2.0 * l1 - l2) - c0);\n float dr = abs((2.0 * r1 - r2) - c0);\n float db = abs((2.0 * b1 - b2) - c0);\n float dt = abs((2.0 * t1 - t2) - c0);\n \n vec3 ce = getWorldPos(c0, vUv).xyz;\n \n vec3 dpdx = (dl < dr) ? ce - getWorldPos(l1, (vUv - vec2(1.0 / resolution.x, 0.0))).xyz\n : -ce + getWorldPos(r1, (vUv + vec2(1.0 / resolution.x, 0.0))).xyz;\n vec3 dpdy = (db < dt) ? ce - getWorldPos(b1, (vUv - vec2(0.0, 1.0 / resolution.y))).xyz\n : -ce + getWorldPos(t1, (vUv + vec2(0.0, 1.0 / resolution.y))).xyz;\n \n return normalize(cross(dpdx, dpdy));\n }\n\n #include \n #include \n void main() {\n //vec4 texel = texture2D(tDiffuse, vUv);//vec3(0.0);\n vec4 sceneTexel = texture2D(sceneDiffuse, vUv);\n float depth = texture2D(\n sceneDepth,\n vUv\n ).x;\n #ifdef HALFRES \n vec4 texel;\n if (depth == 1.0) {\n texel = vec4(0.0, 0.0, 0.0, 1.0);\n } else {\n vec3 worldPos = getWorldPos(depth, vUv);\n vec3 normal = computeNormal(getWorldPos(depth, vUv), vUv);\n // vec4 texel = texture2D(tDiffuse, vUv);\n // Find closest depth;\n float totalWeight = 0.0;\n float radiusToUse = screenSpaceRadius ? distance(\n worldPos,\n getWorldPos(depth, vUv +\n vec2(radius, 0.0) / resolution)\n ) : radius;\n float distanceFalloffToUse =screenSpaceRadius ?\n radiusToUse * distanceFalloff\n : distanceFalloff;\n for(float x = -1.0; x <= 1.0; x++) {\n for(float y = -1.0; y <= 1.0; y++) {\n vec2 offset = vec2(x, y);\n ivec2 p = ivec2(\n (vUv * resolution * 0.5) + offset\n );\n vec2 pUv = vec2(p) / (resolution * 0.5);\n float sampleDepth = texelFetch(downsampledDepth,p, 0).x;\n vec4 sampleInfo = texelFetch(tDiffuse, p, 0);\n vec3 normalSample = sampleInfo.xyz * 2.0 - 1.0;\n vec3 worldPosSample = getWorldPos(sampleDepth, pUv);\n float tangentPlaneDist = abs(dot(worldPos - worldPosSample, normal));\n float rangeCheck = exp(-1.0 * tangentPlaneDist * (1.0 / distanceFalloffToUse)) * max(dot(normal, normalSample), 0.0);\n float weight = rangeCheck;\n totalWeight += weight;\n texel += sampleInfo * weight;\n }\n }\n if (totalWeight == 0.0) {\n texel = texture2D(tDiffuse, vUv);\n } else {\n texel /= totalWeight;\n }\n }\n #else\n vec4 texel = texture2D(tDiffuse, vUv);\n #endif\n\n \n float finalAo = pow(texel.a, intensity);\n float fogFactor;\n float fogDepth = distance(\n cameraPos,\n getWorldPos(depth, vUv)\n );\n if (fog) {\n if (fogExp) {\n fogFactor = 1.0 - exp( - fogDensity * fogDensity * fogDepth * fogDepth );\n } else {\n fogFactor = smoothstep( fogNear, fogFar, fogDepth );\n }\n }\n finalAo = mix(finalAo, 1.0, fogFactor);\n vec3 aoApplied = color * mix(vec3(1.0), sceneTexel.rgb, float(colorMultiply));\n if (renderMode == 0.0) {\n gl_FragColor = vec4( mix(sceneTexel.rgb, aoApplied, 1.0 - finalAo), sceneTexel.a);\n } else if (renderMode == 1.0) {\n gl_FragColor = vec4( mix(vec3(1.0), aoApplied, 1.0 - finalAo), sceneTexel.a);\n } else if (renderMode == 2.0) {\n gl_FragColor = vec4( sceneTexel.rgb, sceneTexel.a);\n } else if (renderMode == 3.0) {\n if (vUv.x < 0.5) {\n gl_FragColor = vec4( sceneTexel.rgb, sceneTexel.a);\n } else if (abs(vUv.x - 0.5) < 1.0 / resolution.x) {\n gl_FragColor = vec4(1.0);\n } else {\n gl_FragColor = vec4( mix(sceneTexel.rgb, aoApplied, 1.0 - finalAo), sceneTexel.a);\n }\n } else if (renderMode == 4.0) {\n if (vUv.x < 0.5) {\n gl_FragColor = vec4( sceneTexel.rgb, sceneTexel.a);\n } else if (abs(vUv.x - 0.5) < 1.0 / resolution.x) {\n gl_FragColor = vec4(1.0);\n } else {\n gl_FragColor = vec4( mix(vec3(1.0), aoApplied, 1.0 - finalAo), sceneTexel.a);\n }\n }\n #include \n if (gammaCorrection) {\n gl_FragColor = LinearTosRGB(gl_FragColor);\n }\n }\n "},Wa={uniforms:{sceneDiffuse:{value:null},sceneDepth:{value:null},tDiffuse:{value:null},projMat:{value:new m},viewMat:{value:new m},projectionMatrixInv:{value:new m},viewMatrixInv:{value:new m},cameraPos:{value:new t},resolution:{value:new f},time:{value:0},r:{value:5},blueNoise:{value:null},radius:{value:12},worldRadius:{value:5},index:{value:0},poissonDisk:{value:[]},distanceFalloff:{value:1},near:{value:.1},far:{value:1e3},logDepth:{value:!1},screenSpaceRadius:{value:!1}},vertexShader:"\n\t\tvarying vec2 vUv;\n\t\tvoid main() {\n\t\t\tvUv = uv;\n\t\t\tgl_Position = vec4(position, 1.0);\n\t\t}",fragmentShader:"\n\t\tuniform sampler2D sceneDiffuse;\n uniform highp sampler2D sceneDepth;\n uniform sampler2D tDiffuse;\n uniform sampler2D blueNoise;\n uniform mat4 projectionMatrixInv;\n uniform mat4 viewMatrixInv;\n uniform vec2 resolution;\n uniform float r;\n uniform float radius;\n uniform float worldRadius;\n uniform float index;\n uniform float near;\n uniform float far;\n uniform float distanceFalloff;\n uniform bool logDepth;\n uniform bool screenSpaceRadius;\n varying vec2 vUv;\n\n highp float linearize_depth(highp float d, highp float zNear,highp float zFar)\n {\n highp float z_n = 2.0 * d - 1.0;\n return 2.0 * zNear * zFar / (zFar + zNear - z_n * (zFar - zNear));\n }\n highp float linearize_depth_log(highp float d, highp float nearZ,highp float farZ) {\n float depth = pow(2.0, d * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n return linearize_depth(linDepth, nearZ, farZ);\n }\n highp float linearize_depth_ortho(highp float d, highp float nearZ, highp float farZ) {\n return nearZ + (farZ - nearZ) * d;\n }\n vec3 getWorldPosLog(vec3 posS) {\n vec2 uv = posS.xy;\n float z = posS.z;\n float nearZ =near;\n float farZ = far;\n float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0;\n vec4 wpos = projectionMatrixInv * clipVec;\n return wpos.xyz / wpos.w;\n }\n vec3 getWorldPos(float depth, vec2 coord) {\n #ifdef LOGDEPTH\n return getWorldPosLog(vec3(coord, depth));\n #endif\n \n float z = depth * 2.0 - 1.0;\n vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0);\n vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition;\n // Perspective division\n vec4 worldSpacePosition = viewSpacePosition;\n worldSpacePosition.xyz /= worldSpacePosition.w;\n return worldSpacePosition.xyz;\n }\n #include \n #define NUM_SAMPLES 16\n uniform vec2 poissonDisk[NUM_SAMPLES];\n void main() {\n const float pi = 3.14159;\n vec2 texelSize = vec2(1.0 / resolution.x, 1.0 / resolution.y);\n vec2 uv = vUv;\n vec4 data = texture2D(tDiffuse, vUv);\n float occlusion = data.a;\n float baseOcc = data.a;\n vec3 normal = data.rgb * 2.0 - 1.0;\n float count = 1.0;\n float d = texture2D(sceneDepth, vUv).x;\n if (d == 1.0) {\n gl_FragColor = data;\n return;\n }\n vec3 worldPos = getWorldPos(d, vUv);\n float size = radius;\n float angle;\n if (index == 0.0) {\n angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).x * PI2;\n } else if (index == 1.0) {\n angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).y * PI2;\n } else if (index == 2.0) {\n angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).z * PI2;\n } else {\n angle = texture2D(blueNoise, gl_FragCoord.xy / 128.0).w * PI2;\n }\n\n mat2 rotationMatrix = mat2(cos(angle), -sin(angle), sin(angle), cos(angle));\n float radiusToUse = screenSpaceRadius ? distance(\n worldPos,\n getWorldPos(d, vUv +\n vec2(worldRadius, 0.0) / resolution)\n ) : worldRadius;\n float distanceFalloffToUse =screenSpaceRadius ?\n radiusToUse * distanceFalloff\n : distanceFalloff;\n\n\n for(int i = 0; i < NUM_SAMPLES; i++) {\n vec2 offset = (rotationMatrix * poissonDisk[i]) * texelSize * size;\n vec4 dataSample = texture2D(tDiffuse, uv + offset);\n float occSample = dataSample.a;\n vec3 normalSample = dataSample.rgb * 2.0 - 1.0;\n float dSample = texture2D(sceneDepth, uv + offset).x;\n vec3 worldPosSample = getWorldPos(dSample, uv + offset);\n float tangentPlaneDist = abs(dot(worldPos - worldPosSample, normal));\n float rangeCheck = dSample == 1.0 ? 0.0 :exp(-1.0 * tangentPlaneDist * (1.0 / distanceFalloffToUse)) * max(dot(normal, normalSample), 0.0) * (1.0 - abs(occSample - baseOcc));\n occlusion += occSample * rangeCheck;\n count += rangeCheck;\n }\n occlusion /= count;\n gl_FragColor = vec4(0.5 + 0.5 * normal, occlusion);\n }\n "},Ya={uniforms:{sceneDepth:{value:null},resolution:{value:new f},near:{value:.1},far:{value:1e3},viewMatrixInv:{value:new m},projectionMatrixInv:{value:new m},logDepth:{value:!1}},vertexShader:"\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = vec4(position, 1);\n }",fragmentShader:"\n uniform highp sampler2D sceneDepth;\n uniform vec2 resolution;\n uniform float near;\n uniform float far;\n uniform bool logDepth;\n uniform mat4 viewMatrixInv;\n uniform mat4 projectionMatrixInv;\n varying vec2 vUv;\n layout(location = 1) out vec4 gNormal;\n vec3 getWorldPosLog(vec3 posS) {\n vec2 uv = posS.xy;\n float z = posS.z;\n float nearZ =near;\n float farZ = far;\n float depth = pow(2.0, z * log2(farZ + 1.0)) - 1.0;\n float a = farZ / (farZ - nearZ);\n float b = farZ * nearZ / (nearZ - farZ);\n float linDepth = a + b / depth;\n vec4 clipVec = vec4(uv, linDepth, 1.0) * 2.0 - 1.0;\n vec4 wpos = projectionMatrixInv * clipVec;\n return wpos.xyz / wpos.w;\n }\n vec3 getWorldPos(float depth, vec2 coord) {\n if (logDepth) {\n return getWorldPosLog(vec3(coord, depth));\n }\n float z = depth * 2.0 - 1.0;\n vec4 clipSpacePosition = vec4(coord * 2.0 - 1.0, z, 1.0);\n vec4 viewSpacePosition = projectionMatrixInv * clipSpacePosition;\n // Perspective division\n vec4 worldSpacePosition = viewSpacePosition;\n worldSpacePosition.xyz /= worldSpacePosition.w;\n return worldSpacePosition.xyz;\n }\n \n vec3 computeNormal(vec3 worldPos, vec2 vUv) {\n ivec2 p = ivec2(vUv * resolution);\n float c0 = texelFetch(sceneDepth, p, 0).x;\n float l2 = texelFetch(sceneDepth, p - ivec2(2, 0), 0).x;\n float l1 = texelFetch(sceneDepth, p - ivec2(1, 0), 0).x;\n float r1 = texelFetch(sceneDepth, p + ivec2(1, 0), 0).x;\n float r2 = texelFetch(sceneDepth, p + ivec2(2, 0), 0).x;\n float b2 = texelFetch(sceneDepth, p - ivec2(0, 2), 0).x;\n float b1 = texelFetch(sceneDepth, p - ivec2(0, 1), 0).x;\n float t1 = texelFetch(sceneDepth, p + ivec2(0, 1), 0).x;\n float t2 = texelFetch(sceneDepth, p + ivec2(0, 2), 0).x;\n \n float dl = abs((2.0 * l1 - l2) - c0);\n float dr = abs((2.0 * r1 - r2) - c0);\n float db = abs((2.0 * b1 - b2) - c0);\n float dt = abs((2.0 * t1 - t2) - c0);\n \n vec3 ce = getWorldPos(c0, vUv).xyz;\n \n vec3 dpdx = (dl < dr) ? ce - getWorldPos(l1, (vUv - vec2(1.0 / resolution.x, 0.0))).xyz\n : -ce + getWorldPos(r1, (vUv + vec2(1.0 / resolution.x, 0.0))).xyz;\n vec3 dpdy = (db < dt) ? ce - getWorldPos(b1, (vUv - vec2(0.0, 1.0 / resolution.y))).xyz\n : -ce + getWorldPos(t1, (vUv + vec2(0.0, 1.0 / resolution.y))).xyz;\n \n return normalize(cross(dpdx, dpdy));\n }\n void main() {\n vec2 uv = vUv - vec2(0.5) / resolution;\n vec2 pixelSize = vec2(1.0) / resolution;\n vec2[] uvSamples = vec2[4](\n uv,\n uv + vec2(pixelSize.x, 0.0),\n uv + vec2(0.0, pixelSize.y),\n uv + pixelSize\n );\n float depth00 = texture2D(sceneDepth, uvSamples[0]).r;\n float depth10 = texture2D(sceneDepth, uvSamples[1]).r;\n float depth01 = texture2D(sceneDepth, uvSamples[2]).r;\n float depth11 = texture2D(sceneDepth, uvSamples[3]).r;\n float minDepth = min(min(depth00, depth10), min(depth01, depth11));\n float maxDepth = max(max(depth00, depth10), max(depth01, depth11));\n float targetDepth = minDepth;\n // Checkerboard pattern to avoid artifacts\n if (mod(gl_FragCoord.x + gl_FragCoord.y, 2.0) > 0.5) { \n targetDepth = maxDepth;\n }\n int chosenIndex = 0;\n float[] samples = float[4](depth00, depth10, depth01, depth11);\n for(int i = 0; i < 4; ++i) {\n if (samples[i] == targetDepth) {\n chosenIndex = i;\n break;\n }\n }\n gl_FragColor = vec4(samples[chosenIndex], 0.0, 0.0, 1.0);\n gNormal = vec4(computeNormal(\n getWorldPos(samples[chosenIndex], uvSamples[chosenIndex]), uvSamples[chosenIndex]\n ), 0.0);\n /* float[] samples = float[4](depth00, depth10, depth01, depth11);\n float c = 0.25 * (depth00 + depth10 + depth01 + depth11);\n float[] distances = float[4](depth00, depth10, depth01, depth11);\n float maxDistance = max(max(distances[0], distances[1]), max(distances[2], distances[3]));\n\n int remaining[3];\n int rejected[3];\n int i, j, k;\n\n for(i = 0, j = 0, k = 0; i < 4; ++i) {\n if (distances[i] < maxDistance) {\n remaining[j++] = i;\n } else {\n rejected[k++] = i;\n }\n }\n for(;j < 3;++j) {\n remaining[j] = rejected[--k];\n }\n vec3 s = vec3(\n samples[remaining[0]],\n samples[remaining[1]],\n samples[remaining[2]]\n );\n c = (s.x + s.y + s.z) / 3.0;\n\n distances[0] = abs(c - s.x);\n distances[1] = abs(c - s.y);\n distances[2] = abs(c - s.z);\n\n float minDistance = min(min(distances[0], distances[1]), distances[2]);\n\n for(i = 0; i < 3; ++i) {\n if (distances[i] == minDistance) {\n break;\n }\n }*/\n /* gl_FragColor = vec4(samples[remaining[i]], 0.0, 0.0, 0.0);\n gNormal = vec4(computeNormal(\n getWorldPos(samples[remaining[i]], uvSamples[remaining[i]]), uvSamples[remaining[i]]\n ), 0.0);*/\n }"};var Ka="5L7pP4UXrOIr/VZ1G3f6p89FIWU7lqc7J3DPxKjJUXODJoHQzf/aNVM+ABlvhXeBGN7iC0WkmTjEaAqOItBfBdaK5KSGV1ET5SOKl3x9JOX5w2sAl6+6KjDhVUHgbqq7DZ5EeYzbdSNxtrQLW/KkPJoOTG4u5CBUZkCKHniY9l7DUgjuz708zG1HIC8qfohi1vPjPH9Lq47ksjRrjwXD4MlVCjdAqYFGodQ8tRmHkO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bezVv9xbXKWz0xezRNQWqUqtYRTUbuzK7KTvjG4rQHfzBpVmK4wDLnSIwdSzTSk1fPNeY0WOpPZTLlvQ59xwgfFrb326vT2hS1JAZ9E6sujFtKTiJ7bxI6o4cBhDaX+adXREThhR+MwA4TqD7rga/o9iY7d6TVRe14CS2S3iSQsD0R6ApnhG/2Wa0A0AY2NtWTjmabdKU+KgIRDP9RQYVjXiF1qC+xyNVG03I9vpmEpY/G/zC4nLOKgXAZ/uTikHI9Afbkhfgfgo9arWbix5eH7WUo9RQygDzwCnVSjbXc7MihEufVj6WGbK963pw8VjY3RS8IH1cy2yZbIcKLO5CgAUcXJfF2+McnDLKtXxyZaf7SPA6KJq+zF2NHyfoeTOwHhGqNcnHVr1hT73pcoyXyfvCYBnG1Bp/aR9t8hoI7CXM3UZOisWGA1SHZ2jf7k9GlRnp3mF/c1AV+JjvUsnZrsybEOQJg/dn/9eJkyykQHjbF56zgcPX6DdMG03WKUMlYz+uOZ+5DZy9E9MZOZ9GMoLFdrIPPQQLjv+GlCMpoyHPXkzIODjHAID2PrnaRpqWVHh0rnieDILKq+Emrd5RnjgE9pDUXWTmHaKuqqYlcgEz4zbi46dbWrAAFBjsQq1rLHIiPJEcwFLCOY4JNlXRXQJqCUKXk2d1RSBGzDP6HDSpo863BhVRFFF6uIpjQV7j5ebFe3UkkO/+coIo2BTAcgBqOtQ134s9a4QJvofuqBYMGOBMsWZ+sn/2AOxDx6SfAnDFGw==";const Xa=Uint8Array.from(atob(Ka),(e=>e.charCodeAt(0)));function Za(e,t,n){if(t.getQueryParameter(e,t.QUERY_RESULT_AVAILABLE)){const i=t.getQueryParameter(e,t.QUERY_RESULT)/1e6;n.lastTime=i}else setTimeout((()=>{Za(e,t,n)}),1)}class qa extends Nr{constructor(e,t,n=512,i=512){super(),this.width=n,this.height=i,this.clear=!0,this.camera=t,this.scene=e,this.autosetGamma=!0,this.configuration=new Proxy({aoSamples:16,aoRadius:5,denoiseSamples:8,denoiseRadius:12,distanceFalloff:1,intensity:5,denoiseIterations:2,renderMode:0,color:new u(0,0,0),gammaCorrection:!0,logarithmicDepthBuffer:!1,screenSpaceRadius:!1,halfRes:!1,depthAwareUpsampling:!0,colorMultiply:!0},{set:(e,t,n)=>{const i=e[t];return e[t]=n,"aoSamples"===t&&i!==n&&this.configureAOPass(this.configuration.logarithmicDepthBuffer),"denoiseSamples"===t&&i!==n&&this.configureDenoisePass(this.configuration.logarithmicDepthBuffer),"halfRes"===t&&i!==n&&(this.configureAOPass(this.configuration.logarithmicDepthBuffer),this.configureHalfResTargets(),this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer),this.setSize(this.width,this.height)),"depthAwareUpsampling"===t&&i!==n&&this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer),"gammaCorrection"===t&&(this.autosetGamma=!1),!0}}),this.samples=[],this.samplesR=[],this.samplesDenoise=[],this.configureEffectCompositer(this.configuration.logarithmicDepthBuffer),this.configureSampleDependentPasses(),this.configureHalfResTargets(),this.copyQuad=new Va(new ae({uniforms:{tDiffuse:{value:null}},depthWrite:!1,vertexShader:"\n varying vec2 vUv;\n void main() {\n vUv = uv;\n gl_Position = vec4(position, 1);\n }\n ",fragmentShader:"\n uniform sampler2D tDiffuse;\n varying vec2 vUv;\n void main() {\n gl_FragColor = texture2D(tDiffuse, vUv);\n }\n "})),this.writeTargetInternal=new X(this.width,this.height,{minFilter:ee,magFilter:ee,depthBuffer:!1}),this.readTargetInternal=new X(this.width,this.height,{minFilter:ee,magFilter:ee,depthBuffer:!1}),this.outputTargetInternal=new X(this.width,this.height,{minFilter:ee,magFilter:ee,depthBuffer:!1}),this.bluenoise=new Ce(Xa,128,128),this.bluenoise.colorSpace=he,this.bluenoise.wrapS=q,this.bluenoise.wrapT=q,this.bluenoise.minFilter=$,this.bluenoise.magFilter=$,this.bluenoise.needsUpdate=!0,this.lastTime=0,this.needsDepthTexture=!0,this.needsSwap=!0,this._r=new f,this._c=new u}configureHalfResTargets(){this.configuration.halfRes?(this.depthDownsampleTarget=new Me(this.width/2,this.height/2,2),this.depthDownsampleTarget.texture[0].format=Pe,this.depthDownsampleTarget.texture[0].type=Oe,this.depthDownsampleTarget.texture[0].minFilter=$,this.depthDownsampleTarget.texture[0].magFilter=$,this.depthDownsampleTarget.texture[0].depthBuffer=!1,this.depthDownsampleTarget.texture[1].format=Be,this.depthDownsampleTarget.texture[1].type=l,this.depthDownsampleTarget.texture[1].minFilter=$,this.depthDownsampleTarget.texture[1].magFilter=$,this.depthDownsampleTarget.texture[1].depthBuffer=!1,this.depthDownsampleQuad=new Va(new ae(Ya))):(this.depthDownsampleTarget&&(this.depthDownsampleTarget.dispose(),this.depthDownsampleTarget=null),this.depthDownsampleQuad&&(this.depthDownsampleQuad.dispose(),this.depthDownsampleQuad=null))}configureSampleDependentPasses(){this.configureAOPass(this.configuration.logarithmicDepthBuffer),this.configureDenoisePass(this.configuration.logarithmicDepthBuffer)}configureAOPass(e=!1){this.samples=this.generateHemisphereSamples(this.configuration.aoSamples),this.samplesR=this.generateHemisphereSamplesR(this.configuration.aoSamples);const t={..._a};t.fragmentShader=t.fragmentShader.replace("16",this.configuration.aoSamples).replace("16.0",this.configuration.aoSamples+".0"),e&&(t.fragmentShader="#define LOGDEPTH\n"+t.fragmentShader),this.configuration.halfRes&&(t.fragmentShader="#define HALFRES\n"+t.fragmentShader),this.effectShaderQuad?(this.effectShaderQuad.material.dispose(),this.effectShaderQuad.material=new ae(t)):this.effectShaderQuad=new Va(new ae(t))}configureDenoisePass(e=!1){this.samplesDenoise=this.generateDenoiseSamples(this.configuration.denoiseSamples,11);const t={...Wa};t.fragmentShader=t.fragmentShader.replace("16",this.configuration.denoiseSamples),e&&(t.fragmentShader="#define LOGDEPTH\n"+t.fragmentShader),this.poissonBlurQuad?(this.poissonBlurQuad.material.dispose(),this.poissonBlurQuad.material=new ae(t)):this.poissonBlurQuad=new Va(new ae(t))}configureEffectCompositer(e=!1){const t={...Qa};e&&(t.fragmentShader="#define LOGDEPTH\n"+t.fragmentShader),this.configuration.halfRes&&this.configuration.depthAwareUpsampling&&(t.fragmentShader="#define HALFRES\n"+t.fragmentShader),this.effectCompositerQuad?(this.effectCompositerQuad.material.dispose(),this.effectCompositerQuad.material=new ae(t)):this.effectCompositerQuad=new Va(new ae(t))}generateHemisphereSamples(e){const n=[];for(let i=0;ie.charCodeAt(0)));var $a="#define GLSLIFY 1\nvec3 getViewPosition(const float depth){float clipW=_projectionMatrix[2][3]*depth+_projectionMatrix[3][3];vec4 clipPosition=vec4((vec3(vUv,depth)-0.5)*2.0,1.0);clipPosition*=clipW;return(_inverseProjectionMatrix*clipPosition).xyz;}float getViewZ(const in float depth){\n#ifdef PERSPECTIVE_CAMERA\nreturn perspectiveDepthToViewZ(depth,cameraNear,cameraFar);\n#else\nreturn orthographicDepthToViewZ(depth,cameraNear,cameraFar);\n#endif\n}vec3 screenSpaceToWorldSpace(const vec2 uv,const float depth){vec4 ndc=vec4((uv.x-0.5)*2.0,(uv.y-0.5)*2.0,(depth-0.5)*2.0,1.0);vec4 clip=_inverseProjectionMatrix*ndc;vec4 view=cameraMatrixWorld*(clip/clip.w);return view.xyz;}\n#define Scale (vec3(0.8, 0.8, 0.8))\n#define K (19.19)\nvec3 hash(vec3 a){a=fract(a*Scale);a+=dot(a,a.yxz+K);return fract((a.xxy+a.yxx)*a.zyx);}float fresnel_dielectric_cos(float cosi,float eta){float c=abs(cosi);float g=eta*eta-1.0+c*c;float result;if(g>0.0){g=sqrt(g);float A=(g-c)/(g+c);float B=(c*(g+c)-1.0)/(c*(g-c)+1.0);result=0.5*A*A*(1.0+B*B);}else{result=1.0;}return result;}float fresnel_dielectric(vec3 Incoming,vec3 Normal,float eta){float cosine=dot(Incoming,Normal);return min(1.0,5.0*fresnel_dielectric_cos(cosine,eta));}";class el extends ae{constructor(){super({type:"MRTMaterial",defines:{USE_UV:"",TEMPORAL_RESOLVE:""},uniforms:{opacity:new Z(1),normalMap:new Z(null),normalScale:new Z(new f(1,1)),uvTransform:new Z(new ze),roughness:new Z(1),roughnessMap:new Z(null)},vertexShader:"\n #ifdef USE_MRT\n varying vec2 vHighPrecisionZW;\n #endif\n #define NORMAL\n varying vec3 vViewPosition;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n uniform mat3 uvTransform;\n void main() {\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #ifdef USE_MRT\n vHighPrecisionZW = gl_Position.zw;\n #endif \n #ifdef USE_UV\n vUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n #endif\n }\n ",fragmentShader:"\n #define NORMAL\n varying vec3 vViewPosition;\n #include \n #include \n #include \n #include \n #include \n #include \n #include \n #include \n \n #ifdef USE_MRT\n layout(location = 0) out vec4 gNormal;\n layout(location = 1) out vec4 gDepth;\n \n varying vec2 vHighPrecisionZW;\n #endif\n uniform float roughness;\n void main() {\n #include \n #include \n #include \n #include \n\n float roughnessFactor = roughness;\n \n if(roughness > 10.0e9){\n roughnessFactor = 1.;\n }else{\n #ifdef useRoughnessMap\n vec4 texelRoughness = texture2D( roughnessMap, vUv );\n // reads channel G, compatible with a combined OcclusionRoughnessMetallic (RGB) texture\n roughnessFactor *= texelRoughness.g;\n #endif\n }\n\n vec3 normalColor = packNormalToRGB( normal );\n #ifdef USE_MRT\n float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n vec4 depthColor = packDepthToRGBA( fragCoordZ );\n gNormal = vec4( normalColor, roughnessFactor );\n gDepth = depthColor;\n #else\n gl_FragColor = vec4(normalColor, roughnessFactor);\n #endif\n }\n ",toneMapped:!1}),this.normalMapType=ke,this.normalScale=new f(1,1),Object.defineProperty(this,"glslVersion",{get(){return"USE_MRT"in this.defines?je:null},set(e){}})}}class tl extends ae{constructor(){super({type:"ReflectionsMaterial",uniforms:{inputTexture:new Z(null),accumulatedTexture:new Z(null),normalTexture:new Z(null),depthTexture:new Z(null),_projectionMatrix:new Z(new m),_inverseProjectionMatrix:new Z(new m),cameraMatrixWorld:new Z(new m),cameraNear:new Z(0),cameraFar:new Z(0),rayDistance:new Z(0),intensity:new Z(0),roughnessFade:new Z(0),fade:new Z(0),thickness:new Z(0),ior:new Z(0),maxDepthDifference:new Z(0),jitter:new Z(0),jitterRoughness:new Z(0),maxRoughness:new Z(0),samples:new Z(0),envMap:new Z(null),envMapPosition:new Z(new t),envMapSize:new Z(new t),viewMatrix:new Z(new m)},defines:{steps:20,refineSteps:5,CUBEUV_TEXEL_WIDTH:0,CUBEUV_TEXEL_HEIGHT:0,CUBEUV_MAX_MIP:0,vWorldPosition:"worldPos"},fragmentShader:"#define GLSLIFY 1\nvarying vec2 vUv;uniform sampler2D inputTexture;uniform sampler2D accumulatedTexture;uniform sampler2D normalTexture;uniform sampler2D depthTexture;uniform sampler2D envMap;uniform mat4 _projectionMatrix;uniform mat4 _inverseProjectionMatrix;uniform mat4 cameraMatrixWorld;uniform float cameraNear;uniform float cameraFar;uniform float rayDistance;uniform float intensity;uniform float maxDepthDifference;uniform float roughnessFade;uniform float maxRoughness;uniform float fade;uniform float thickness;uniform float ior;uniform float samples;uniform float jitter;uniform float jitterRoughness;\n#define INVALID_RAY_COORDS vec2(-1.0);\n#define EARLY_OUT_COLOR vec4(0.0, 0.0, 0.0, 1.0)\n#define FLOAT_EPSILON 0.00001\nfloat nearMinusFar;float nearMulFar;float farMinusNear;\n#include \n#include \nvec2 RayMarch(vec3 dir,inout vec3 hitPos,inout float rayHitDepthDifference);vec2 BinarySearch(in vec3 dir,inout vec3 hitPos,inout float rayHitDepthDifference);float fastGetViewZ(const in float depth);vec3 getIBLRadiance(const in vec3 viewDir,const in vec3 normal,const in float roughness);void main(){vec4 depthTexel=textureLod(depthTexture,vUv,0.0);if(dot(depthTexel.rgb,depthTexel.rgb)1.0)jitterMix=1.0;jitt=mix(vec3(0.0),randomJitter*spread,jitterMix);}viewNormal+=jitt;float fresnelFactor=fresnel_dielectric(viewDir,viewNormal,ior);vec3 iblRadiance=getIBLRadiance(-viewDir,viewNormal,0.)*fresnelFactor;float lastFrameAlpha=textureLod(accumulatedTexture,vUv,0.0).a;if(roughness>maxRoughness||(roughness>1.0-FLOAT_EPSILON&&roughnessFade>1.0-FLOAT_EPSILON)){gl_FragColor=vec4(iblRadiance,lastFrameAlpha);return;}vec3 reflected=reflect(viewDir,viewNormal);vec3 rayDir=reflected*-viewPos.z;vec3 hitPos=viewPos;float rayHitDepthDifference;vec2 coords=RayMarch(rayDir,hitPos,rayHitDepthDifference);if(coords.x==-1.0){gl_FragColor=vec4(iblRadiance,lastFrameAlpha);return;}vec4 SSRTexel=textureLod(inputTexture,coords.xy,0.0);vec4 SSRTexelReflected=textureLod(accumulatedTexture,coords.xy,0.0);vec3 SSR=SSRTexel.rgb+SSRTexelReflected.rgb;float roughnessFactor=mix(specular,1.0,max(0.0,1.0-roughnessFade));vec2 coordsNDC=(coords.xy*2.0-1.0);float screenFade=0.1;float maxDimension=min(1.0,max(abs(coordsNDC.x),abs(coordsNDC.y)));float reflectionIntensity=1.0-(max(0.0,maxDimension-screenFade)/(1.0-screenFade));reflectionIntensity=max(0.,reflectionIntensity);vec3 finalSSR=mix(iblRadiance,SSR,reflectionIntensity)*roughnessFactor;if(fade!=0.0){vec3 hitWorldPos=screenSpaceToWorldSpace(coords,rayHitDepthDifference);float reflectionDistance=distance(hitWorldPos,worldPos)+1.0;float opacity=1.0/(reflectionDistance*fade*0.1);if(opacity>1.0)opacity=1.0;finalSSR*=opacity;}finalSSR*=fresnelFactor*intensity;finalSSR=min(vec3(1.0),finalSSR);float alpha=hitPos.z==1.0 ? 1.0 : SSRTexelReflected.a;alpha=min(lastFrameAlpha,alpha);gl_FragColor=vec4(finalSSR,alpha);}vec2 RayMarch(vec3 dir,inout vec3 hitPos,inout float rayHitDepthDifference){dir=normalize(dir);dir*=rayDistance/float(steps);float depth;vec4 projectedCoord;vec4 lastProjectedCoord;float unpackedDepth;vec4 depthTexel;for(int i=0;i1.0||projectedCoord.y<0.0||projectedCoord.y>1.0){return INVALID_RAY_COORDS;}\n#endif\ndepthTexel=textureLod(depthTexture,projectedCoord.xy,0.0);unpackedDepth=unpackRGBAToDepth(depthTexel);depth=fastGetViewZ(unpackedDepth);rayHitDepthDifference=depth-hitPos.z;if(rayHitDepthDifference>=0.0&&rayHitDepthDifference0.0){return INVALID_RAY_COORDS;}\n#endif\nlastProjectedCoord=projectedCoord;}hitPos.z=1.0;\n#ifndef missedRays\nreturn INVALID_RAY_COORDS;\n#endif\nrayHitDepthDifference=unpackedDepth;return projectedCoord.xy;}vec2 BinarySearch(in vec3 dir,inout vec3 hitPos,inout float rayHitDepthDifference){float depth;vec4 projectedCoord;vec2 lastMinProjectedCoordXY;float unpackedDepth;vec4 depthTexel;for(int i=0;i0.0){hitPos-=dir;}else{hitPos+=dir;}}if(dot(depthTexel.rgb,depthTexel.rgb)maxDepthDifference)return INVALID_RAY_COORDS;projectedCoord=_projectionMatrix*vec4(hitPos,1.0);projectedCoord.xy/=projectedCoord.w;projectedCoord.xy=projectedCoord.xy*0.5+0.5;rayHitDepthDifference=unpackedDepth;return projectedCoord.xy;}float fastGetViewZ(const in float depth){\n#ifdef PERSPECTIVE_CAMERA\nreturn nearMulFar/(farMinusNear*depth-cameraFar);\n#else\nreturn depth*nearMinusFar-cameraNear;\n#endif\n}\n#include \n#include \nvec3 getIBLRadiance(const in vec3 viewDir,const in vec3 normal,const in float roughness){\n#if defined(ENVMAP_TYPE_CUBE_UV)\nvec3 reflectVec=reflect(-viewDir,normal);reflectVec=normalize(mix(reflectVec,normal,roughness*roughness));reflectVec=inverseTransformDirection(reflectVec,viewMatrix);vec4 envMapColor=textureCubeUV(envMap,reflectVec,roughness);return envMapColor.rgb*intensity;\n#else\nreturn vec3(0.0);\n#endif\n}".replace("#include ",$a),vertexShader:"#define GLSLIFY 1\nvarying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}",toneMapped:!1,depthWrite:!1,depthTest:!1})}}const nl=e=>{const t=[e],n=[];for(;0!==t.length;){const e=t.shift();e.material&&n.push(e);for(const n of e.children)n.visible&&t.push(n)}return n},il=(e,t,n)=>{e.uniforms.envMap.value=t;const i=(e=>{const t=e.envMapCubeUVHeight;if(null===t)return null;const n=Math.log2(t)-2,i=1/t;return{texelWidth:1/(3*Math.max(Math.pow(2,n),112)),texelHeight:i,maxMip:n}})({envMapCubeUVHeight:n});e.defines.ENVMAP_TYPE_CUBE_UV="",e.defines.CUBEUV_TEXEL_WIDTH=i.texelWidth,e.defines.CUBEUV_TEXEL_HEIGHT=i.texelHeight,e.defines.CUBEUV_MAX_MIP=i.maxMip+".0",e.needsUpdate=!0};class sl extends Nr{constructor(e,t={}){super("ReflectionsPass"),this.ssrEffect=void 0,this.cachedMaterials=new WeakMap,this.USE_MRT=!1,this.webgl1DepthPass=null,this.visibleMeshes=[],this.ssrEffect=e,this._scene=e._scene,this._camera=e._camera,this.fullscreenMaterial=new tl,e._camera.isPerspectiveCamera&&(this.fullscreenMaterial.defines.PERSPECTIVE_CAMERA="");const n=t.width||"undefined"!=typeof window?window.innerWidth:2e3,i=t.height||"undefined"!=typeof window?window.innerHeight:1e3;this.renderTarget=new X(n,i,{minFilter:ee,magFilter:ee,type:l,depthBuffer:!1}),this.renderPass=new Eo(this._scene,this._camera),this.USE_MRT=(()=>{try{const e=document.createElement("canvas");return!(!window.WebGL2RenderingContext||!e.getContext("webgl2"))}catch(e){return!1}})(),this.USE_MRT?(this.gBuffersRenderTarget=new X(n,i,{minFilter:ee,magFilter:ee,count:2}),this.normalTexture=this.gBuffersRenderTarget.texture[0],this.depthTexture=this.gBuffersRenderTarget.texture[1]):(this.webgl1DepthPass=new Vo(this._scene,this._camera),this.webgl1DepthPass.renderTarget.minFilter=ee,this.webgl1DepthPass.renderTarget.magFilter=ee,this.webgl1DepthPass.renderTarget.texture.minFilter=ee,this.webgl1DepthPass.renderTarget.texture.magFilter=ee,this.webgl1DepthPass.setSize("undefined"!=typeof window?window.innerWidth:2e3,"undefined"!=typeof window?window.innerHeight:1e3),this.gBuffersRenderTarget=new X(n,i,{minFilter:ee,magFilter:ee}),this.normalTexture=this.gBuffersRenderTarget.texture,this.depthTexture=this.webgl1DepthPass.texture),this.fullscreenMaterial.uniforms.normalTexture.value=this.normalTexture,this.fullscreenMaterial.uniforms.depthTexture.value=this.depthTexture,this.fullscreenMaterial.uniforms.accumulatedTexture.value=this.ssrEffect.temporalResolvePass.accumulatedTexture,this.fullscreenMaterial.uniforms.cameraMatrixWorld.value=this._camera.matrixWorld,this.fullscreenMaterial.uniforms._projectionMatrix.value=this._camera.projectionMatrix,this.fullscreenMaterial.uniforms._inverseProjectionMatrix.value=this._camera.projectionMatrixInverse}setSize(e,t){this.renderTarget.setSize(e*this.ssrEffect.resolutionScale,t*this.ssrEffect.resolutionScale),this.gBuffersRenderTarget.setSize(e*this.ssrEffect.resolutionScale,t*this.ssrEffect.resolutionScale),this.fullscreenMaterial.uniforms.accumulatedTexture.value=this.ssrEffect.temporalResolvePass.accumulatedTexture,this.fullscreenMaterial.needsUpdate=!0}dispose(){this.renderTarget.dispose(),this.gBuffersRenderTarget.dispose(),this.renderPass.dispose(),this.USE_MRT||this.webgl1DepthPass.dispose(),this.fullscreenMaterial.dispose(),this.normalTexture=null,this.depthTexture=null,this.velocityTexture=null}keepMaterialMapUpdated(e,t,n,i){this.ssrEffect[i]?t[n]!==e[n]&&(e[n]=t[n],e.uniforms[n].value=t[n],t[n]?e.defines[i]="":delete e.defines[i],e.needsUpdate=!0):void 0!==e[n]&&(e[n]=void 0,e.uniforms[n].value=void 0,delete e.defines[i],e.needsUpdate=!0)}setMRTMaterialInScene(){this.visibleMeshes=nl(this._scene);for(const e of this.visibleMeshes)if(e.material){const t=e.material;let[n,i]=this.cachedMaterials.get(e)||[];if(t!==n){i&&i.dispose(),i=new el,this.USE_MRT&&(i.defines.USE_MRT=""),i.normalScale=t.normalScale,i.uniforms.normalScale.value=t.normalScale;const n=t.map||t.normalMap||t.roughnessMap||t.metalnessMap;n&&(i.uniforms.uvTransform.value=n.matrix),this.cachedMaterials.set(e,[t,i])}this.keepMaterialMapUpdated(i,t,"normalMap","useNormalMap"),this.keepMaterialMapUpdated(i,t,"roughnessMap","useRoughnessMap"),i.uniforms.roughness.value=0===this.ssrEffect.selection.size||this.ssrEffect.selection.has(e)?t.roughness||0:1e11,e.material=i}}unsetMRTMaterialInScene(){for(const t of this.visibleMeshes){var e;if("MRTMaterial"===(null==(e=t.material)?void 0:e.type)){t.visible=!0;const[e]=this.cachedMaterials.get(t);t.material=e}}}render(e,t){this.setMRTMaterialInScene(),e.setRenderTarget(this.gBuffersRenderTarget),this.renderPass.render(e,this.gBuffersRenderTarget),this.unsetMRTMaterialInScene(),this.USE_MRT||this.webgl1DepthPass.renderPass.render(e,this.webgl1DepthPass.renderTarget),this.fullscreenMaterial.uniforms.inputTexture.value=t.texture,this.fullscreenMaterial.uniforms.samples.value=this.ssrEffect.temporalResolvePass.samples,this.fullscreenMaterial.uniforms.cameraNear.value=this._camera.near,this.fullscreenMaterial.uniforms.cameraFar.value=this._camera.far,this.fullscreenMaterial.uniforms.viewMatrix.value.copy(this._camera.matrixWorldInverse),e.setRenderTarget(this.renderTarget),e.render(this.scene,this.camera)}}const rl={intensity:1,exponent:1,distance:10,fade:0,roughnessFade:1,thickness:10,ior:1.45,maxRoughness:1,maxDepthDifference:10,blend:.9,correction:1,correctionRadius:1,blur:.5,blurKernel:1,blurSharpness:10,jitter:0,jitterRoughness:0,steps:20,refineSteps:5,missedRays:!0,useNormalMap:!0,useRoughnessMap:!0,resolutionScale:1,velocityResolutionScale:1};class ol extends ae{constructor(e){const t="#define GLSLIFY 1\nuniform sampler2D inputTexture;uniform sampler2D accumulatedTexture;uniform sampler2D velocityTexture;uniform sampler2D lastVelocityTexture;uniform float blend;uniform float correction;uniform float exponent;uniform float samples;uniform vec2 invTexSize;uniform mat4 curInverseProjectionMatrix;uniform mat4 curCameraMatrixWorld;uniform mat4 prevInverseProjectionMatrix;uniform mat4 prevCameraMatrixWorld;varying vec2 vUv;\n#define MAX_NEIGHBOR_DEPTH_DIFFERENCE 0.001\n#define FLOAT_EPSILON 0.00001\n#define FLOAT_ONE_MINUS_EPSILON 0.99999\nvec3 transformexponent;vec3 undoColorTransformExponent;vec3 transformColor(vec3 color){if(exponent==1.0)return color;return pow(abs(color),transformexponent);}vec3 undoColorTransform(vec3 color){if(exponent==1.0)return color;return max(pow(abs(color),undoColorTransformExponent),vec3(0.0));}void main(){if(exponent!=1.0){transformexponent=vec3(1.0/exponent);undoColorTransformExponent=vec3(exponent);}vec4 inputTexel=textureLod(inputTexture,vUv,0.0);vec4 accumulatedTexel;vec3 inputColor=transformColor(inputTexel.rgb);vec3 accumulatedColor;float alpha=inputTexel.a;float velocityDisocclusion;bool didReproject=false;\n#ifdef boxBlur\nvec3 boxBlurredColor=inputTexel.rgb;\n#endif\nvec4 velocity=textureLod(velocityTexture,vUv,0.0);bool isMoving=alpha<1.0||dot(velocity.xy,velocity.xy)>0.0;if(isMoving){vec3 minNeighborColor=inputColor;vec3 maxNeighborColor=inputColor;vec3 col;vec2 neighborUv;vec2 reprojectedUv=vUv-velocity.xy;vec4 lastVelocity=textureLod(lastVelocityTexture,reprojectedUv,0.0);float depth=velocity.b;float closestDepth=depth;float lastClosestDepth=lastVelocity.b;float neighborDepth;float lastNeighborDepth;for(int x=-correctionRadius;x<=correctionRadius;x++){for(int y=-correctionRadius;y<=correctionRadius;y++){if(x!=0||y!=0){neighborUv=vUv+vec2(x,y)*invTexSize;vec4 neigborVelocity=textureLod(velocityTexture,neighborUv,0.0);neighborDepth=neigborVelocity.b;col=textureLod(inputTexture,neighborUv,0.0).xyz;int absX=abs(x);int absY=abs(y);\n#ifdef dilation\nif(absX==1&&absY==1){if(neighborDepth>closestDepth){velocity=neigborVelocity;closestDepth=neighborDepth;}vec4 lastNeighborVelocity=textureLod(velocityTexture,vUv+vec2(x,y)*invTexSize,0.0);lastNeighborDepth=lastNeighborVelocity.b;if(neighborDepth>closestDepth){lastVelocity=lastNeighborVelocity;lastClosestDepth=lastNeighborDepth;}}\n#endif\nif(abs(depth-neighborDepth)5 ? 121.0 : pow(float(correctionRadius*2+1),2.0);boxBlurredColor/=pxRadius;boxBlurredColor=transformColor(boxBlurredColor);\n#endif\nif(reprojectedUv.x>=0.0&&reprojectedUv.x<=1.0&&reprojectedUv.y>=0.0&&reprojectedUv.y<=1.0){accumulatedTexel=textureLod(accumulatedTexture,reprojectedUv,0.0);accumulatedColor=transformColor(accumulatedTexel.rgb);vec3 clampedColor=clamp(accumulatedColor,minNeighborColor,maxNeighborColor);accumulatedColor=mix(accumulatedColor,clampedColor,correction);didReproject=true;}else{\n#ifdef boxBlur\naccumulatedColor=boxBlurredColor;\n#else\naccumulatedColor=inputColor;\n#endif\n}if(velocity.r>FLOAT_ONE_MINUS_EPSILON&&velocity.g>FLOAT_ONE_MINUS_EPSILON){alpha=0.0;velocityDisocclusion=1.0;}}else{accumulatedColor=transformColor(textureLod(accumulatedTexture,vUv,0.0).rgb);}vec3 outputColor=inputColor;\n#include \ngl_FragColor=vec4(undoColorTransform(outputColor),alpha);}".replace("#include ",e);super({type:"TemporalResolveMaterial",uniforms:{inputTexture:new Z(null),accumulatedTexture:new Z(null),velocityTexture:new Z(null),lastVelocityTexture:new Z(null),samples:new Z(1),blend:new Z(.5),correction:new Z(1),exponent:new Z(1),invTexSize:new Z(new f)},defines:{correctionRadius:1},vertexShader:"#define GLSLIFY 1\nvarying vec2 vUv;void main(){vUv=position.xy*0.5+0.5;gl_Position=vec4(position.xy,1.0,1.0);}",fragmentShader:t})}}const al=`\n\t\tvec3 transformed;\n\n\t\t// Get the normal\n\t\t${Ie.skinbase_vertex}\n\t\t${Ie.beginnormal_vertex}\n\t\t${Ie.skinnormal_vertex}\n\t\t${Ie.defaultnormal_vertex}\n\n\t\t// Get the current vertex position\n\t\ttransformed = vec3( position );\n\t\t${Ie.skinning_vertex}\n\t\tnewPosition = velocityMatrix * vec4( transformed, 1.0 );\n\n\t\t// Get the previous vertex position\n\t\ttransformed = vec3( position );\n\t\t${Ie.skinbase_vertex.replace(/mat4 /g,"").replace(/getBoneMatrix/g,"getPrevBoneMatrix")}\n\t\t${Ie.skinning_vertex.replace(/vec4 /g,"")}\n\t\tprevPosition = prevVelocityMatrix * vec4( transformed, 1.0 );\n\n\t\tgl_Position = newPosition;\n`;class ll extends ae{constructor(){super({uniforms:{prevVelocityMatrix:{value:new m},velocityMatrix:{value:new m},prevBoneTexture:{value:null},interpolateGeometry:{value:0},intensity:{value:1},boneTexture:{value:null},alphaTest:{value:0},map:{value:null},alphaMap:{value:null},opacity:{value:1}},vertexShader:`\n #define MAX_BONES 1024\n \n ${Ie.skinning_pars_vertex}\n \n\t\t#ifdef USE_SKINNING\n\t\t#ifdef BONE_TEXTURE\n\t\t\tuniform sampler2D prevBoneTexture;\n\t\t\tmat4 getPrevBoneMatrix( const in float i ) {\n\t\t\t\tfloat j = i * 4.0;\n\t\t\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\t\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\t\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\t\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\t\t\ty = dy * ( y + 0.5 );\n\t\t\t\tvec4 v1 = texture2D( prevBoneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\t\t\tvec4 v2 = texture2D( prevBoneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\t\t\tvec4 v3 = texture2D( prevBoneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\t\t\tvec4 v4 = texture2D( prevBoneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\t\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\t\t\treturn bone;\n\t\t\t}\n\t\t#else\n\t\t\tuniform mat4 prevBoneMatrices[ MAX_BONES ];\n\t\t\tmat4 getPrevBoneMatrix( const in float i ) {\n\t\t\t\tmat4 bone = prevBoneMatrices[ int(i) ];\n\t\t\t\treturn bone;\n\t\t\t}\n\t\t#endif\n\t\t#endif\n\n \n uniform mat4 velocityMatrix;\n uniform mat4 prevVelocityMatrix;\n uniform float interpolateGeometry;\n varying vec4 prevPosition;\n varying vec4 newPosition;\n\t\t\t\t\tvarying vec2 vHighPrecisionZW;\n \n void main() {\n \n ${al}\n\n\t\t\t\t\t\tvHighPrecisionZW = gl_Position.zw;\n \n }`,fragmentShader:"\n uniform float intensity;\n varying vec4 prevPosition;\n varying vec4 newPosition;\n\t\t\t\t\tvarying vec2 vHighPrecisionZW;\n \n void main() {\n\t\t\t\t\t\t#ifdef FULL_MOVEMENT\n\t\t\t\t\t\tgl_FragColor = vec4( 1., 1., 1. - gl_FragCoord.z, 0. );\n\t\t\t\t\t\treturn;\n\t\t\t\t\t\t#endif\n\n vec2 pos0 = (prevPosition.xy / prevPosition.w) * 0.5 + 0.5;\n vec2 pos1 = (newPosition.xy / newPosition.w) * 0.5 + 0.5;\n \n vec2 vel = pos1 - pos0;\n\n\t\t\t\t\t\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n \n gl_FragColor = vec4( vel, 1. - fragCoordZ, 0. );\n \n }"}),this.isVelocityMaterial=!0}}const cl=new u(0),hl=["visible","wireframe","side"];class ul extends Nr{constructor(e,n){var i,s;super("VelocityPass"),this.cachedMaterials=new WeakMap,this.lastCameraTransform={position:new t,quaternion:new r},this.visibleMeshes=[],this.renderedMeshesThisFrame=0,this.renderedMeshesLastFrame=0,this._scene=e,this._camera=n,this.renderTarget=new X((null==(i=window)?void 0:i.innerWidth)||1e3,(null==(s=window)?void 0:s.innerHeight)||1e3,{type:l})}setVelocityMaterialInScene(){this.renderedMeshesThisFrame=0,this.visibleMeshes=nl(this._scene);for(const n of this.visibleMeshes){var e;const i=n.material;let[s,r]=this.cachedMaterials.get(n)||[];var t;if(i!==s)r=new ll,r.lastMatrixWorld=new m,n.material=r,null!=(t=n.skeleton)&&t.boneTexture&&this.saveBoneTexture(n),this.cachedMaterials.set(n,[i,r]);if(r.uniforms.velocityMatrix.value.multiplyMatrices(this._camera.projectionMatrix,n.modelViewMatrix),n.userData.needsUpdatedReflections||i.map instanceof Ne?("FULL_MOVEMENT"in r.defines||(r.needsUpdate=!0),r.defines.FULL_MOVEMENT=""):"FULL_MOVEMENT"in r.defines&&(delete r.defines.FULL_MOVEMENT,r.needsUpdate=!0),n.visible=this.cameraMovedThisFrame||!n.matrixWorld.equals(r.lastMatrixWorld)||n.skeleton||"FULL_MOVEMENT"in r.defines,n.material=r,n.visible){this.renderedMeshesThisFrame++;for(const e of hl)r[e]=i[e];null!=(e=n.skeleton)&&e.boneTexture&&(r.defines.USE_SKINNING="",r.defines.BONE_TEXTURE="",r.uniforms.boneTexture.value=n.skeleton.boneTexture)}}}saveBoneTexture(e){let t=e.material.uniforms.prevBoneTexture.value;if(t&&t.image.width===e.skeleton.boneTexture.width)t=e.material.uniforms.prevBoneTexture.value,t.image.data.set(e.skeleton.boneTexture.image.data);else{var n;null==(n=t)||n.dispose();const i=e.skeleton.boneTexture.image.data.slice(),s=e.skeleton.boneTexture.image.width;t=new Ce(i,s,s,Be,Oe),e.material.uniforms.prevBoneTexture.value=t,t.needsUpdate=!0}}unsetVelocityMaterialInScene(){for(const t of this.visibleMeshes){var e;if(t.material.isVelocityMaterial)t.visible=!0,t.material.lastMatrixWorld.copy(t.matrixWorld),t.material.uniforms.prevVelocityMatrix.value.multiplyMatrices(this._camera.projectionMatrix,t.modelViewMatrix),null!=(e=t.skeleton)&&e.boneTexture&&this.saveBoneTexture(t),t.material=this.cachedMaterials.get(t)[0]}}setSize(e,t){this.renderTarget.setSize(e,t)}renderVelocity(e){if(e.setRenderTarget(this.renderTarget),this.renderedMeshesThisFrame>0){const{background:t}=this._scene;this._scene.background=cl,e.render(this._scene,this._camera),this._scene.background=t}else e.clearColor()}checkCameraMoved(){const e=this.lastCameraTransform.position.distanceToSquared(this._camera.position),t=8*(1-this.lastCameraTransform.quaternion.dot(this._camera.quaternion));return(e>1e-6||t>1e-6)&&(this.lastCameraTransform.position.copy(this._camera.position),this.lastCameraTransform.quaternion.copy(this._camera.quaternion),!0)}render(e){this.cameraMovedThisFrame=this.checkCameraMoved(),this.setVelocityMaterialInScene(),(this.renderedMeshesThisFrame>0||this.renderedMeshesLastFrame>0)&&this.renderVelocity(e),this.unsetVelocityMaterialInScene(),this.renderedMeshesLastFrame=this.renderedMeshesThisFrame}}const dl=new f;class pl extends Nr{constructor(e,n,i,s={}){super("TemporalResolvePass"),this.velocityPass=null,this.velocityResolutionScale=1,this.samples=1,this.lastCameraTransform={position:new t,quaternion:new r},this._scene=e,this._camera=n,this.renderTarget=new X(1,1,{minFilter:ee,magFilter:ee,type:l,depthBuffer:!1}),this.velocityPass=new ul(e,n),this.fullscreenMaterial=new ol(i),this.fullscreenMaterial.defines.correctionRadius=s.correctionRadius||1,s.dilation&&(this.fullscreenMaterial.defines.dilation=""),s.boxBlur&&(this.fullscreenMaterial.defines.boxBlur=""),this.setupFramebuffers(1,1),this.checkCanUseSharedVelocityTexture()}dispose(){this._scene.userData.velocityTexture===this.velocityPass.renderTarget.texture&&(delete this._scene.userData.velocityTexture,delete this._scene.userData.lastVelocityTexture),this.renderTarget.dispose(),this.accumulatedTexture.dispose(),this.fullscreenMaterial.dispose(),this.velocityPass.dispose()}setSize(e,t){this.renderTarget.setSize(e,t),this.velocityPass.setSize(e*this.velocityResolutionScale,t*this.velocityResolutionScale),this.velocityPass.renderTarget.texture.minFilter=1===this.velocityResolutionScale?$:ee,this.velocityPass.renderTarget.texture.magFilter=1===this.velocityResolutionScale?$:ee,this.velocityPass.renderTarget.texture.needsUpdate=!0,this.fullscreenMaterial.uniforms.invTexSize.value.set(1/e,1/t),this.setupFramebuffers(e,t)}setupFramebuffers(e,t){this.accumulatedTexture&&this.accumulatedTexture.dispose(),this.lastVelocityTexture&&this.lastVelocityTexture.dispose(),this.accumulatedTexture=new Ue(e,t,Be),this.accumulatedTexture.minFilter=ee,this.accumulatedTexture.magFilter=ee,this.accumulatedTexture.type=l,this.lastVelocityTexture=new Ue(e*this.velocityResolutionScale,t*this.velocityResolutionScale,Be),this.lastVelocityTexture.minFilter=1===this.velocityResolutionScale?$:ee,this.lastVelocityTexture.magFilter=1===this.velocityResolutionScale?$:ee,this.lastVelocityTexture.type=l,this.fullscreenMaterial.uniforms.accumulatedTexture.value=this.accumulatedTexture,this.fullscreenMaterial.uniforms.lastVelocityTexture.value=this.lastVelocityTexture,this.fullscreenMaterial.needsUpdate=!0}checkCanUseSharedVelocityTexture(){return this._scene.userData.velocityTexture&&this.velocityPass.renderTarget.texture!==this._scene.userData.velocityTexture?this.velocityPass.renderTarget.texture===this.fullscreenMaterial.uniforms.velocityTexture.value&&(this.fullscreenMaterial.uniforms.lastVelocityTexture.value=this._scene.userData.lastVelocityTexture,this.fullscreenMaterial.uniforms.velocityTexture.value=this._scene.userData.velocityTexture,this.fullscreenMaterial.needsUpdate=!0):this.velocityPass.renderTarget.texture!==this.fullscreenMaterial.uniforms.velocityTexture.value&&(this.fullscreenMaterial.uniforms.velocityTexture.value=this.velocityPass.renderTarget.texture,this.fullscreenMaterial.uniforms.lastVelocityTexture.value=this.lastVelocityTexture,this.fullscreenMaterial.needsUpdate=!0,this._scene.userData.velocityTexture||(this._scene.userData.velocityTexture=this.velocityPass.renderTarget.texture,this._scene.userData.lastVelocityTexture=this.lastVelocityTexture)),this.velocityPass.renderTarget.texture!==this.fullscreenMaterial.uniforms.velocityTexture.value}checkNeedsResample(){const e=this.lastCameraTransform.position.distanceToSquared(this._camera.position),t=8*(1-this.lastCameraTransform.quaternion.dot(this._camera.quaternion));(e>1e-6||t>1e-6)&&(this.samples=1,this.lastCameraTransform.position.copy(this._camera.position),this.lastCameraTransform.quaternion.copy(this._camera.quaternion))}render(e){this.samples++,this.checkNeedsResample(),this.fullscreenMaterial.uniforms.samples.value=this.samples,e.setRenderTarget(this.renderTarget),e.render(this.scene,this.camera),e.copyFramebufferToTexture(dl,this.accumulatedTexture),e.setRenderTarget(this.velocityPass.renderTarget),e.copyFramebufferToTexture(dl,this.lastVelocityTexture)}}const fl=function(e,t){let n=1,i=0;for(;e>0;)n/=t,i+=n*(e%t),e=~~(e/t);return i};function ml(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const gl="#define GLSLIFY 1\n#define MODE_DEFAULT 0\n#define MODE_REFLECTIONS 1\n#define MODE_RAW_REFLECTION 2\n#define MODE_BLURRED_REFLECTIONS 3\n#define MODE_INPUT 4\n#define MODE_BLUR_MIX 5\n#define FLOAT_EPSILON 0.00001\nuniform sampler2D inputTexture;uniform sampler2D reflectionsTexture;uniform float samples;\n#include \nvoid mainImage(const in vec4 inputColor,const in vec2 uv,out vec4 outputColor){vec4 reflectionsTexel=texture2D(reflectionsTexture,vUv);ivec2 size=textureSize(reflectionsTexture,0);vec2 invTexSize=1./vec2(size.x,size.y);vec3 reflectionClr=reflectionsTexel.xyz;if(blur>FLOAT_EPSILON){vec3 blurredReflectionsColor=denoise(reflectionsTexel.rgb,reflectionsTexture,vUv,invTexSize,blur,blurSharpness,blurKernel);reflectionClr=mix(reflectionClr,blurredReflectionsColor.rgb,blur);}\n#if RENDER_MODE == MODE_DEFAULT\noutputColor=vec4(inputColor.rgb+reflectionClr,1.0);\n#endif\n#if RENDER_MODE == MODE_REFLECTIONS\noutputColor=vec4(reflectionClr,1.0);\n#endif\n#if RENDER_MODE == MODE_RAW_REFLECTION\noutputColor=vec4(reflectionsTexel.xyz,1.0);\n#endif\n#if RENDER_MODE == MODE_BLURRED_REFLECTIONS\noutputColor=vec4(blurredReflectionsTexel.xyz,1.0);\n#endif\n#if RENDER_MODE == MODE_INPUT\noutputColor=vec4(inputColor.xyz,1.0);\n#endif\n#if RENDER_MODE == MODE_BLUR_MIX\noutputColor=vec4(vec3(blur),1.0);\n#endif\n}".replace("#include ",$a).replace("#include ","#define GLSLIFY 1\nuniform float blur;uniform float blurSharpness;uniform int blurKernel;vec3 denoise(vec3 center,sampler2D tex,vec2 uv,vec2 invTexSize,float blur,float blurSharpness,int blurKernel){vec3 color;float total;vec3 col;float weight;for(int x=-blurKernel;x<=blurKernel;x++){for(int y=-blurKernel;y<=blurKernel;y++){col=textureLod(tex,uv+vec2(x,y)*invTexSize,0.).rgb;weight=1.0-abs(dot(col-center,vec3(0.25)));weight=pow(weight,blurSharpness);color+=col*weight;total+=weight;}}return color/total;}"),vl=["blur","blurSharpness","blurKernel"],yl=new Le(1);let wl;class xl extends To{constructor(e,t,n=rl){super("SSREffect",gl,{type:"FinalSSRMaterial",uniforms:new Map([["reflectionsTexture",new Z(null)],["blur",new Z(0)],["blurSharpness",new Z(0)],["blurKernel",new Z(0)]]),defines:new Map([["RENDER_MODE","0"]])}),this.haltonSequence=(e=>{const t=[];let n=1;const i=n+e;for(;n0.5;\n#ifdef boxBlur\nif(needsBlur)inputColor=boxBlurredColor;\n#endif\nif(alpha==1.0){outputColor=accumulatedColor;}else{float m=mix(alpha,1.0,blend);if(needsBlur)m=0.0;outputColor=accumulatedColor*m+inputColor*(1.0-m);}",n),this.uniforms.get("reflectionsTexture").value=this.temporalResolvePass.renderTarget.texture,this.reflectionsPass=new sl(this,n),this.temporalResolvePass.fullscreenMaterial.uniforms.inputTexture.value=this.reflectionsPass.renderTarget.texture,this.lastSize={width:n.width,height:n.height,resolutionScale:n.resolutionScale,velocityResolutionScale:n.velocityResolutionScale},this.setSize(n.width,n.height),this.makeOptionsReactive(n)}makeOptionsReactive(e){let t=!1;const n=this.reflectionsPass.fullscreenMaterial.uniforms,i=Object.keys(n);for(const s of Object.keys(e))Object.defineProperty(this,s,{get:()=>e[s],set(r){if(e[s]!==r||!t)switch(e[s]=r,vl.includes(s)||this.setSize(this.lastSize.width,this.lastSize.height,!0),s){case"resolutionScale":this.setSize(this.lastSize.width,this.lastSize.height);break;case"velocityResolutionScale":this.temporalResolvePass.velocityResolutionScale=r,this.setSize(this.lastSize.width,this.lastSize.height,!0);break;case"blur":this.uniforms.get("blur").value=r;break;case"blurSharpness":this.uniforms.get("blurSharpness").value=r;break;case"blurKernel":this.uniforms.get("blurKernel").value=r;break;case"steps":this.reflectionsPass.fullscreenMaterial.defines.steps=parseInt(r),this.reflectionsPass.fullscreenMaterial.needsUpdate=t;break;case"refineSteps":this.reflectionsPass.fullscreenMaterial.defines.refineSteps=parseInt(r),this.reflectionsPass.fullscreenMaterial.needsUpdate=t;break;case"missedRays":r?this.reflectionsPass.fullscreenMaterial.defines.missedRays="":delete this.reflectionsPass.fullscreenMaterial.defines.missedRays,this.reflectionsPass.fullscreenMaterial.needsUpdate=t;break;case"correctionRadius":this.temporalResolvePass.fullscreenMaterial.defines.correctionRadius=Math.round(r),this.temporalResolvePass.fullscreenMaterial.needsUpdate=t;break;case"blend":this.temporalResolvePass.fullscreenMaterial.uniforms.blend.value=r;break;case"correction":this.temporalResolvePass.fullscreenMaterial.uniforms.correction.value=r;break;case"exponent":this.temporalResolvePass.fullscreenMaterial.uniforms.exponent.value=r;break;case"distance":n.rayDistance.value=r;default:i.includes(s)&&(n[s].value=r)}}}),this[s]=e[s];t=!0}setSize(e,t,n=!1){(n||e!==this.lastSize.width||t!==this.lastSize.height||this.resolutionScale!==this.lastSize.resolutionScale||this.velocityResolutionScale!==this.lastSize.velocityResolutionScale)&&(this.temporalResolvePass.setSize(e,t),this.reflectionsPass.setSize(e,t),this.lastSize={width:e,height:t,resolutionScale:this.resolutionScale,velocityResolutionScale:this.velocityResolutionScale})}generateBoxProjectedEnvMapFallback(e,n=new t,i=new t,s=512){this.cubeCamera.renderTarget.dispose(),this.cubeCamera.renderTarget=new Le(s),this.cubeCamera.position.copy(n),this.cubeCamera.updateMatrixWorld(),this.cubeCamera.update(e,this._scene),wl||(wl=new Fe(e),wl.compileCubemapShader());const r=wl.fromCubemap(this.cubeCamera.renderTarget.texture).texture;r.minFilter=ee,r.magFilter=ee;const o=this.reflectionsPass.fullscreenMaterial;return function(e,t,n){e.defines.BOX_PROJECTED_ENV_MAP="",e.uniforms.envMapPosition={value:t},e.uniforms.envMapSize={value:n};const i=new RegExp(ml("vec3 worldNormal = inverseTransformDirection ( normal , viewMatrix ) ;").replaceAll(" ","\\s*"),"g"),s=new RegExp(ml("reflectVec = inverseTransformDirection ( reflectVec , viewMatrix ) ;").replaceAll(" ","\\s*"),"g");e.vertexShader="varying vec3 vWorldPosition;\n"+e.vertexShader.replace("#include ","\n#if defined( USE_ENVMAP ) || defined( ) || defined ( USE_SHADOWMAP )\n vec4 worldPosition = modelMatrix * vec4( transformed, 1.0 );\n\n #ifdef BOX_PROJECTED_ENV_MAP\n vWorldPosition = worldPosition.xyz;\n #endif\n#endif\n"),e.fragmentShader="\n#ifdef BOX_PROJECTED_ENV_MAP\n uniform vec3 envMapSize;\n uniform vec3 envMapPosition;\n varying vec3 vWorldPosition;\n \n vec3 parallaxCorrectNormal( vec3 v, vec3 cubeSize, vec3 cubePos ) {\n vec3 nDir = normalize( v );\n\n vec3 rbmax = ( .5 * cubeSize + cubePos - vWorldPosition ) / nDir;\n vec3 rbmin = ( -.5 * cubeSize + cubePos - vWorldPosition ) / nDir;\n\n vec3 rbminmax;\n\n rbminmax.x = ( nDir.x > 0. ) ? rbmax.x : rbmin.x;\n rbminmax.y = ( nDir.y > 0. ) ? rbmax.y : rbmin.y;\n rbminmax.z = ( nDir.z > 0. ) ? rbmax.z : rbmin.z;\n\n float correction = min( min( rbminmax.x, rbminmax.y ), rbminmax.z );\n vec3 boxIntersection = vWorldPosition + nDir * correction;\n \n return boxIntersection - cubePos;\n }\n#endif\n\n"+e.fragmentShader.replace("#include ",Ie.envmap_physical_pars_fragment).replace(i,"vec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n \n#ifdef BOX_PROJECTED_ENV_MAP\n worldNormal = parallaxCorrectNormal( worldNormal, envMapSize, envMapPosition );\n#endif\n").replace(s,"reflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n \n#ifdef BOX_PROJECTED_ENV_MAP\n reflectVec = parallaxCorrectNormal( reflectVec, envMapSize, envMapPosition );\n#endif\n")}(o,n,i),o.fragmentShader=o.fragmentShader.replace("vec3 worldPos","worldPos").replace("varying vec3 vWorldPosition;","vec3 worldPos;"),o.uniforms.envMapPosition.value.copy(n),o.uniforms.envMapSize.value.copy(i),il(o,r,s),this.usingBoxProjectedEnvMap=!0,r}setIBLRadiance(e,t){this._scene.traverse((n=>{if(n.material){var i;const s=null==(i=t.properties.get(n.material))?void 0:i.uniforms;s&&"disableIBLRadiance"in s&&(s.disableIBLRadiance.value=e)}}))}deleteBoxProjectedEnvMapFallback(){const e=this.reflectionsPass.fullscreenMaterial;e.uniforms.envMap.value=null,e.fragmentShader=e.fragmentShader.replace("worldPos = ","vec3 worldPos = "),delete e.defines.BOX_PROJECTED_ENV_MAP,e.needsUpdate=!0,this.usingBoxProjectedEnvMap=!1}dispose(){super.dispose(),this.reflectionsPass.dispose(),this.temporalResolvePass.dispose()}update(e,t){if(!this.usingBoxProjectedEnvMap&&this._scene.environment){const t=this.reflectionsPass.fullscreenMaterial;let n=null;if(this._scene.traverse((t=>{if(!n&&t.material&&!t.material.envMap){const i=e.properties.get(t.material);"envMap"in i&&i.envMap instanceof d&&(n=i.envMap)}})),n){const e=this._scene.environment.image.height;il(t,n,e)}}this.haltonIndex=(this.haltonIndex+1)%this.haltonSequence.length;const[n,i]=this.haltonSequence[this.haltonIndex],{width:s,height:r}=this.lastSize;this.temporalResolvePass.velocityPass.render(e),this._camera.setViewOffset&&this._camera.setViewOffset(s,r,n,i,s,r),this.reflectionsPass.render(e,t),this.temporalResolvePass.render(e),this._camera.clearViewOffset()}static patchDirectEnvIntensity(e=0){Ie.envmap_physical_pars_fragment=0===e?Ie.envmap_physical_pars_fragment.replace("vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {","vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { return vec3(0.0);"):Ie.envmap_physical_pars_fragment.replace("vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );","vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness ) * "+e.toFixed(5)+";")}}const Al="EffectPass";class bl{constructor(e,t,n){this.renderer=e,this.scene=t,this.camera=n,this.passesMap=new Map,this.effectsMap=new Map,this.effectsNeedsUpdate=!0,this.effectComposer=this._initEffectComposer(),this._initPasses(),this._initEffects()}updateEffectPass(){if(!this.effectsNeedsUpdate)return;this.effectsNeedsUpdate=!1;const{effectComposer:e}=this;e.passes.forEach((t=>{t.name===Al&&(e.removePass(t),t.dispose())}));const t=Array.from(this.effectsMap).filter((([,{enabled:e}])=>e)).map((([,{effect:e}])=>e)),n=new na(this.camera,...t);n.name=Al,n.enabled=!!t.length,this.passesMap.set(bl.CONSTANTS.effectPass,n),e.addPass(n)}updateCamera(e){const{effectComposer:t}=this;t.setMainCamera(e),this.effectsMap.forEach((({effect:t})=>t.mainCamera=e))}_initEffectComposer(){return new class{constructor(e=null,{depthBuffer:t=!0,stencilBuffer:n=!1,multisampling:i=0,frameBufferType:s}={}){this.renderer=null,this.inputBuffer=this.createBuffer(t,n,s,i),this.outputBuffer=this.inputBuffer.clone(),this.copyPass=new _r,this.depthTexture=null,this.passes=[],this.timer=new class{constructor(){this.startTime=performance.now(),this.previousTime=0,this.currentTime=0,this._delta=0,this._elapsed=0,this._fixedDelta=1e3/60,this.timescale=1,this.useFixedDelta=!1,this._autoReset=!1}get autoReset(){return this._autoReset}set autoReset(e){"undefined"!=typeof document&&void 0!==document.hidden&&(e?document.addEventListener("visibilitychange",this):document.removeEventListener("visibilitychange",this),this._autoReset=e)}get delta(){return this._delta*zr}get fixedDelta(){return this._fixedDelta*zr}set fixedDelta(e){this._fixedDelta=1e3*e}get elapsed(){return this._elapsed*zr}update(e){this.useFixedDelta?this._delta=this.fixedDelta:(this.previousTime=this.currentTime,this.currentTime=(void 0!==e?e:performance.now())-this.startTime,this._delta=this.currentTime-this.previousTime),this._delta*=this.timescale,this._elapsed+=this._delta}reset(){this._delta=0,this._elapsed=0,this.currentTime=performance.now()-this.startTime}getDelta(){return this.delta}getElapsed(){return this.elapsed}handleEvent(e){document.hidden||(this.currentTime=performance.now()-this.startTime)}dispose(){this.autoReset=!1}},this.autoRenderToScreen=!0,this.setRenderer(e)}get multisampling(){return this.inputBuffer.samples||0}set multisampling(e){const t=this.inputBuffer,n=this.multisampling;n>0&&e>0?(this.inputBuffer.samples=e,this.outputBuffer.samples=e,this.inputBuffer.dispose(),this.outputBuffer.dispose()):n!==e&&(this.inputBuffer.dispose(),this.outputBuffer.dispose(),this.inputBuffer=this.createBuffer(t.depthBuffer,t.stencilBuffer,t.texture.type,e),this.inputBuffer.depthTexture=this.depthTexture,this.outputBuffer=this.inputBuffer.clone())}getTimer(){return this.timer}getRenderer(){return this.renderer}setRenderer(e){if(this.renderer=e,null!==e){const t=e.getSize(new f),n=e.getContext().getContextAttributes().alpha,i=this.inputBuffer.texture.type;i===V&&e.outputColorSpace===_&&(this.inputBuffer.texture.colorSpace=_,this.outputBuffer.texture.colorSpace=_,this.inputBuffer.dispose(),this.outputBuffer.dispose()),e.autoClear=!1,this.setSize(t.width,t.height);for(const t of this.passes)t.initialize(e,n,i)}}replaceRenderer(e,t=!0){const n=this.renderer,i=n.domElement.parentNode;return this.setRenderer(e),t&&null!==i&&(i.removeChild(n.domElement),i.appendChild(e.domElement)),n}createDepthTexture(){const e=this.depthTexture=new Q;return this.inputBuffer.depthTexture=e,this.inputBuffer.dispose(),this.inputBuffer.stencilBuffer?(e.format=W,e.type=Y):e.type=K,e}deleteDepthTexture(){if(null!==this.depthTexture){this.depthTexture.dispose(),this.depthTexture=null,this.inputBuffer.depthTexture=null,this.inputBuffer.dispose();for(const e of this.passes)e.setDepthTexture(null)}}createBuffer(e,t,n,i){const s=this.renderer,r=null===s?new f:s.getDrawingBufferSize(new f),o={minFilter:ee,magFilter:ee,stencilBuffer:t,depthBuffer:e,type:n},a=new X(r.width,r.height,o);return i>0&&(a.ignoreDepthForMultisampleCopy=!1,a.samples=i),n===V&&null!==s&&s.outputColorSpace===_&&(a.texture.colorSpace=_),a.texture.name="EffectComposer.Buffer",a.texture.generateMipmaps=!1,a}setMainScene(e){for(const t of this.passes)t.mainScene=e}setMainCamera(e){for(const t of this.passes)t.mainCamera=e}addPass(e,t){const n=this.passes,i=this.renderer,s=i.getDrawingBufferSize(new f),r=i.getContext().getContextAttributes().alpha,o=this.inputBuffer.texture.type;if(e.setRenderer(i),e.setSize(s.width,s.height),e.initialize(i,r,o),this.autoRenderToScreen&&(n.length>0&&(n[n.length-1].renderToScreen=!1),e.renderToScreen&&(this.autoRenderToScreen=!1)),void 0!==t?n.splice(t,0,e):n.push(e),this.autoRenderToScreen&&(n[n.length-1].renderToScreen=!0),e.needsDepthTexture||null!==this.depthTexture)if(null===this.depthTexture){const t=this.createDepthTexture();for(e of n)e.setDepthTexture(t)}else e.setDepthTexture(this.depthTexture)}removePass(e){const t=this.passes,n=t.indexOf(e);if(-1!==n&&t.splice(n,1).length>0){if(null!==this.depthTexture){const n=(e,t)=>e||t.needsDepthTexture;t.reduce(n,!1)||(e.getDepthTexture()===this.depthTexture&&e.setDepthTexture(null),this.deleteDepthTexture())}this.autoRenderToScreen&&n===t.length&&(e.renderToScreen=!1,t.length>0&&(t[t.length-1].renderToScreen=!0))}}removeAllPasses(){const e=this.passes;this.deleteDepthTexture(),e.length>0&&(this.autoRenderToScreen&&(e[e.length-1].renderToScreen=!1),this.passes=[])}render(e){const t=this.renderer,n=this.copyPass;let i,s,r,o=this.inputBuffer,a=this.outputBuffer,l=!1;void 0===e&&(this.timer.update(),e=this.timer.getDelta());for(const c of this.passes)c.enabled&&(c.render(t,o,a,e,l),c.needsSwap&&(l&&(n.renderToScreen=c.renderToScreen,i=t.getContext(),s=t.state.buffers.stencil,s.setFunc(i.NOTEQUAL,1,4294967295),n.render(t,o,a,e,l),s.setFunc(i.EQUAL,1,4294967295)),r=o,o=a,a=r),c instanceof Yr?l=!0:c instanceof Gr&&(l=!1))}setSize(e,t,n){const i=this.renderer,s=i.getSize(new f);void 0!==e&&void 0!==t||(e=s.width,t=s.height),s.width===e&&s.height===t||i.setSize(e,t,n);const r=i.getDrawingBufferSize(new f);this.inputBuffer.setSize(r.width,r.height),this.outputBuffer.setSize(r.width,r.height);for(const e of this.passes)e.setSize(r.width,r.height)}reset(){this.dispose(),this.autoRenderToScreen=!0}dispose(){for(const e of this.passes)e.dispose();this.passes=[],null!==this.inputBuffer&&this.inputBuffer.dispose(),null!==this.outputBuffer&&this.outputBuffer.dispose(),this.deleteDepthTexture(),this.copyPass.dispose(),this.timer.dispose()}}(this.renderer,{multisampling:8,frameBufferType:l})}_initPasses(){const{effectComposer:e}=this,t=this._initRenderPass(),n=this._initSSAOPass(),i=this._initEffectPass();this.passesMap.set(bl.CONSTANTS.renderPass,t),this.passesMap.set(bl.CONSTANTS.ssaoPass,n),this.passesMap.set(bl.CONSTANTS.effectPass,i),e.addPass(t),e.addPass(n),e.addPass(i)}_initRenderPass(){return new Eo(this.scene,this.camera)}_initSSAOPass(){const e=new qa(this.scene,this.camera);return e.enabled=!1,e.configuration.gammaCorrection=!1,e}_initEffectPass(){const e=new na(this.camera);return e.name=Al,e}_initEffects(){const{CONSTANTS:e}=bl,t=this._initSMAAEffect(),n=this._initToneMappingEffect(),i=this._initOutlineEffect(),s=this._initSSREffect(),r=this._initBloomEffect();this.effectsMap.set(e.smaaEffect,{enabled:!0,effect:t}),this.effectsMap.set(e.toneMappingEffect,{enabled:!0,effect:n}),this.effectsMap.set(e.outlineEffect,{enabled:!1,effect:i}),this.effectsMap.set(e.ssrEffect,{enabled:!1,effect:s}),this.effectsMap.set(e.bloomEffect,{enabled:!1,effect:r})}_initSMAAEffect(){return new Xo({preset:Bo,edgeDetectionMode:Co})}_initToneMappingEffect(){return new Jo({mode:ko,resolution:256,whitePoint:16,middleGrey:.6,minLuminance:.01,averageLuminance:.001,adaptationRate:1})}_initSSREffect(){return new xl(this.scene,this.camera)}_initBloomEffect(){return new So({blendFunction:io})}_initOutlineEffect(){return new _o(this.scene,this.camera,{blendFunction:ao})}}bl.CONSTANTS={renderPass:"renderPass",ssaoPass:"ssaoPass",effectPass:"effectPass",smaaEffect:"smaaEffect",outlineEffect:"outlineEffect",ssrEffect:"ssrEffect",bloomEffect:"bloomEffect",toneMappingEffect:"toneMappingEffect"};const Tl=new class{constructor(){this.workerPool=new Yt(4)}generate(e,t={}){const{workerPool:n}=this;return new Promise(((s,r)=>{if(e.attributes.position instanceof Ge)throw new Error("GenerateMeshBVHWorker: GLBufferAttribute are not supported for the geometry attributes.");Wt(e);const o=e.index?e.index.array:null,a=e.attributes.position.array;n.postMessage({index:o,position:a,options:Object.assign(Object.assign({},t),{onProgress:null,includedProgressCallback:Boolean(t.onProgress),groups:[...e.groups]})}).then((n=>{const{data:o}=n;if(o)if(o.error)r(new Error(o.error));else if(o.serialized){const{serialized:n,position:r}=o,a=Kt.deserialize(n,e,{setIndex:!1}),l=Object.assign({setBoundingBox:!1},t);if(e.attributes.position instanceof He?e.attributes.position.data.array=r:e.attributes.position instanceof g&&(e.attributes.position.array=r),e.index)e.index.array=n.index;else{const t=new g(n.index,1,!1);e.setIndex(t)}l.setBoundingBox&&(e.boundingBox=a.getBoundingBox(new i)),s(a)}else t.onProgress&&t.onProgress(o.progress)}))}))}dispose(){this.workerPool.dispose()}};class Sl{constructor(e){this.viewport=e,this.cameraChanging=!1,this.timer=null,this.computedGeometriesUuid=new Map,this.generateMeshBVHWorker=Tl,this.viewport.signals.cameraChange.add((()=>{this.cameraChanging=!0,this.timer&&(clearTimeout(this.timer),this.timer=null),this.timer=window.setTimeout((()=>{this.cameraChanging=!1}),1e3)}))}computeModelsBoundsTree(e={}){const{type:t="slice",force:n=!1,frameSliceCount:i=500,workerCreator:s}=e,{meshOfModelList:r}=this.viewport.scener.intersectsList,o=(e,t=(async e=>e.geometry.computeBoundsTree({setBoundingBox:!1})))=>{!n&&this.computedGeometriesUuid.has(e.geometry.uuid)||t(e).then((()=>{this.computedGeometriesUuid.set(e.geometry.uuid,e.geometry.uuid)}))};return new Promise(((e,n)=>{if("block"===t)r.forEach((e=>o(e))),e();else if("slice"===t){let t=0,n=0;const s=()=>{if(t=requestAnimationFrame(s),!this.cameraChanging){for(const e of r.slice(n,n+i))o(e),n+=1;n>=r.length&&(cancelAnimationFrame(t),e())}};s()}else if("worker"===t)if(s){this.generateMeshBVHWorker.workerPool.setWorkerCreator(s);const t=e=>this.generateMeshBVHWorker.generate(e.geometry).then((t=>t&&(e.geometry.boundsTree=t)));Promise.allSettled(r.map((e=>o(e,t)))).then((()=>e()))}else n("请设置 workerCreator")}))}dispose(){this.computedGeometriesUuid.clear(),this.generateMeshBVHWorker.dispose()}}li.install({THREE:e});class Dl extends li{constructor(e){super(e.cameraManager.mainCamera,e.interactiveContainer),this.viewport=e,this.dollySpeed=.2,this.azimuthRotateSpeed=.5,this.polarRotateSpeed=.5,this.truckSpeed=1,this.draggingSmoothTime=.1,e.interactiveContainer.style.userSelect="auto"}setOptions(e){Object.assign(this,e)}}class El{constructor(e){this.viewport=e,this.touchLongUpMaxInterval=800,this.isTouchLongPressAsTouchRightClick=!1,this.timer=null,this.touchStartEvent=null,this.touchstartTimes=[0,0],this.selectModel=null,this.selectPoi=null,this.options=e.options,this.signals=e.signals,this.container=e.container,this.dblClickMaxInterval=300,this.mouseDownTimes=[0,0],this.mouseDownEvent=null,this.handleMouseDown=this.handleMouseDown.bind(this),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseUp=this.handleMouseUp.bind(this),this.handleDblClick=this.handleDblClick.bind(this),this.handleMouseWheel=this.handleMouseWheel.bind(this),this.handleTouchStart=this.handleTouchStart.bind(this),this.handleTouchEnd=this.handleTouchEnd.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this),this.addEventListeners()}_triggerSceneEventInAllObject(e,t){const n=this.viewport.getIntersects(t,this.viewport.scener.intersectsList.getAll());if(0===n.length)return this.selectModel&&this.signals.modelHover.numListeners>0&&this.signals.modelUnHover.dispatch(this.selectModel),this.selectPoi&&this.signals.poiHover.numListeners>0&&this.signals.poiUnHover.dispatch(this.selectPoi),this.selectModel=null,this.selectPoi=null,void("click"===e&&this.signals.sceneClick.dispatch({type:e,event:t}));const i={object:null,type:null,point:null},s=[],r=[];function a(e){return e.parent?"Model"===e.parent.stype?e.parent:a(e.parent):void 0}n.forEach((e=>{if(e.object.parent instanceof Gl){const t=e.object.parent;i.object||(i.type="Poi",i.object=e.object,i.point=e.point);-1===s.findIndex((e=>e.poi.uuid===t.uuid))&&s.push({poi:t,sourceData:e})}else if(e.object instanceof o){const t=a(e.object);t&&(i.object||(i.type="Model",i.object=e.object,i.point=e.point),r.push({model:t,sourceData:e}))}})),"click"===e&&i.point&&this.signals.selectPosition.dispatch(i.point);const l=e.slice(0,1).toUpperCase()+e.slice(1),c=(e,t,n,i)=>{if(e){if("Hover"===l)return void((null==n?void 0:n.uuid)!==e.uuid&&(this.signals[t].dispatch(i),this[`select${e.stype}`]=e));const s=e[`on${l}`];s?s(e):e.isEventPropagation=!0,e.isEventPropagation&&(this.signals[t].dispatch(i),e.isEventPropagation=!1)}},h=e=>{const{model:n}=e[0];c(n,`model${l}`,this.selectModel,{target:n,currentTarget:i.object,intersects:e,event:t})},u=e=>{const{poi:n}=e[0];c(n,`poi${l}`,this.selectPoi,{target:n,event:t})};if("Hover"===l){if(r.length>0){const[{model:e}]=r;this.selectModel&&this.selectModel.uuid!==e.uuid&&(this.signals.modelUnHover.dispatch(this.selectModel),this.selectModel=null)}if(s.length>0){const[{poi:e}]=s;this.selectPoi&&this.selectPoi.uuid!==e.uuid&&(this.signals.poiUnHover.dispatch(this.selectPoi),this.selectPoi=null)}}"Model"===i.type?h(r):"Poi"===i.type&&u(s)}handleMouseDown(e){this.mouseDownEvent=e,this.signals.mouseDown.dispatch(e),0===this.mouseDownTimes[0]?this.mouseDownTimes[0]=performance.now():0===this.mouseDownTimes[1]&&(this.mouseDownTimes[1]=performance.now()),this.container.addEventListener("mouseup",this.handleMouseUp,!1)}handleMouseMove(e){this.signals.mouseMove.dispatch(e),this.options.hoverEnabled&&this._triggerSceneEventInAllObject("hover",e)}handleMouseUp(e){var t,n,i,s;this.signals.mouseUp.dispatch(e);const r=e.offsetX-(null!==(n=null===(t=this.mouseDownEvent)||void 0===t?void 0:t.offsetX)&&void 0!==n?n:0),o=e.offsetY-(null!==(s=null===(i=this.mouseDownEvent)||void 0===i?void 0:i.offsetY)&&void 0!==s?s:0);if(Math.abs(r)>2||Math.abs(o)>2)return this.mouseDownTimes[0]=0,void(this.mouseDownTimes[1]=0);setTimeout((()=>{0!==this.mouseDownTimes[0]&&0===this.mouseDownTimes[1]?0===e.button?(this.signals.click.dispatch(e),this._triggerSceneEventInAllObject("click",e)):2===e.button&&(this.signals.rightClick.dispatch(e),this._triggerSceneEventInAllObject("rightClick",e)):0!==this.mouseDownTimes[0]&&0!==this.mouseDownTimes[1]&&(this.mouseDownTimes[1],this.mouseDownTimes[0],this.dblClickMaxInterval),this.mouseDownTimes[0]=0,this.mouseDownTimes[1]=0}),this.dblClickMaxInterval),this.container.removeEventListener("mouseup",this.handleMouseUp,!1)}handleDblClick(e){this.signals.dblClick.dispatch(e),this._triggerSceneEventInAllObject("dblClick",e)}handleMouseWheel(e){this.signals.mouseWheel.dispatch(e)}handleTouchStart(e){0===this.touchstartTimes[0]?this.touchstartTimes[0]=performance.now():0===this.touchstartTimes[1]&&(this.touchstartTimes[1]=performance.now()),this.touchStartEvent=e,this.timer&&clearTimeout(this.timer),this.timer=window.setTimeout((()=>{this.isTouchLongPressAsTouchRightClick=!0}),this.touchLongUpMaxInterval),this.container.addEventListener("touchend",this.handleTouchEnd,{once:!0})}handleTouchEnd(e){var t,n,i,s;this.timer&&clearTimeout(this.timer);const r=()=>{this.isTouchLongPressAsTouchRightClick=!1,this.touchstartTimes[0]=0,this.touchstartTimes[1]=0},o=e.changedTouches[0].clientX-(null!==(n=null===(t=this.touchStartEvent)||void 0===t?void 0:t.changedTouches[0].clientX)&&void 0!==n?n:0),a=e.changedTouches[0].clientY-(null!==(s=null===(i=this.touchStartEvent)||void 0===i?void 0:i.changedTouches[0].clientY)&&void 0!==s?s:0);Math.abs(o)>2||Math.abs(a)>2?r():this.isTouchLongPressAsTouchRightClick?(r(),this.signals.rightClick.dispatch(e),this._triggerSceneEventInAllObject("rightClick",e)):setTimeout((()=>{0!==this.touchstartTimes[0]&&0===this.touchstartTimes[1]?(this.signals.click.dispatch(e),this._triggerSceneEventInAllObject("click",e)):0!==this.touchstartTimes[0]&&0!==this.touchstartTimes[1]&&this.touchstartTimes[1]-this.touchstartTimes[0]<=this.dblClickMaxInterval&&(this.signals.dblClick.dispatch(e),this._triggerSceneEventInAllObject("dblClick",e)),r()}),this.dblClickMaxInterval)}handleContextmenu(e){e.preventDefault()}handleKeyDown(e){this.signals.keyDown.dispatch(e)}handleKeyUp(e){this.signals.keyUp.dispatch(e)}addEventListeners(){this.container.addEventListener("mousedown",this.handleMouseDown,!1),this.container.addEventListener("mousemove",this.handleMouseMove,!1),this.container.addEventListener("dblclick",this.handleDblClick,!1),this.container.addEventListener("wheel",this.handleMouseWheel,{passive:!0}),this.container.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),this.container.addEventListener("contextmenu",this.handleContextmenu,!1),document.addEventListener("keydown",this.handleKeyDown,!1),document.addEventListener("keyup",this.handleKeyUp,!1)}removeEventListeners(){this.container.removeEventListener("mousedown",this.handleMouseDown),this.container.removeEventListener("mousemove",this.handleMouseMove),this.container.removeEventListener("dblclick",this.handleDblClick),this.container.removeEventListener("wheel",this.handleMouseWheel),this.container.removeEventListener("touchstart",this.handleTouchStart),this.container.removeEventListener("contextmenu",this.handleContextmenu),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}dispose(){this.removeEventListeners()}}class Cl{constructor(e,t){this.scene=e,this.signals=t;const n=document.createElement("div");n.style.position="absolute",n.style.left="12px",n.style.bottom="12px",n.style.fontSize="12px",n.style.color="#fff",n.style.pointerEvents="none",this.container=n,this.state={objects:0,vertices:0,triangles:0,frametime:0}}addListeners(){const{scene:e,signals:t}=this;function n(e,t=!0){const n=document.createElement("span");return t&&(n.style.marginLeft="6px"),n.innerText=e,n}function i(){return document.createElement("br")}const s=n("0"),r=n("0"),o=n("0"),a=n("0");this.container.appendChild(n("objects",!1)),this.container.appendChild(s),this.container.appendChild(i()),this.container.appendChild(n("vertices",!1)),this.container.appendChild(o),this.container.appendChild(i()),this.container.appendChild(n("triangles",!1)),this.container.appendChild(r),this.container.appendChild(i()),this.container.appendChild(n("frametime",!1)),this.container.appendChild(a),this.container.appendChild(i());const l=()=>{this.state.objects=0,this.state.vertices=0,this.state.triangles=0;for(let t=0,n=e.children.length;t{this.state.objects++;const t=e.geometry;(e.isMesh||e.isPoints)&&t.attributes.position&&(this.state.vertices+=t.attributes.position.count,e.isMesh&&(null!==t.index?this.state.triangles+=t.index.count/3:this.state.triangles+=t.attributes.position.count/3))}))}s.innerText=String(this.state.objects),o.innerText=String(this.state.vertices),r.innerText=String(this.state.triangles)};t.objectAdded.add(l),t.objectRemoved.add(l),t.geometryChanged.add(l);t.sceneRendered.add((e=>{this.state.frametime=e,a.innerText=Number(e).toFixed(2)+" ms"}))}}class Ml extends o{constructor(e,n,i){super(),this.camera=e,this.controls=i,this.isViewHelper=!0,this.animating=!1;const s=new u("#ff3653"),r=new u("#8adb00"),o=new u("#2c8fff"),a=new u("#000000"),l=[],c=new Ve,h=new f,d=new be(-2,2,2,-2,0,4);d.position.set(0,0,2);const p=new _e(.8,.05,.05).translate(.4,0,0),m=new se(p,B(s)),g=new se(p,B(r)),v=new se(p,B(o));g.rotation.z=Math.PI/2,v.rotation.y=-Math.PI/2,this.add(m),this.add(v),this.add(g);const y=I(s),w=I(r),x=I(o),A=I(a),b=new Qe(y),T=new Qe(w),S=new Qe(x),D=new Qe(A),E=new Qe(A),C=new Qe(A);b.userData.type="right",T.userData.type="top",S.userData.type="front",D.userData.type="left",E.userData.type="bottom",C.userData.type="back",b.position.x=1,T.position.y=1,S.position.z=1,D.position.x=-1,D.scale.setScalar(.8),E.position.y=-1,E.scale.setScalar(.8),C.position.z=-1,C.scale.setScalar(.8),this.add(b),this.add(T),this.add(S),this.add(D),this.add(E),this.add(C),l.push(b),l.push(T),l.push(S),l.push(D),l.push(E),l.push(C);const M=new t,P=new ve,O=128;function B(e){return new We({color:e,toneMapped:!1})}function I(e){const t=document.createElement("canvas");t.width=64,t.height=64;const n=t.getContext("2d");n.beginPath(),n.arc(32,32,14,0,2*Math.PI),n.closePath(),n.fillStyle=e.getStyle(),n.fill();const i=new Ye(t);return i.colorSpace=_,new Ke({map:i,toneMapped:!1})}this.render=function(e){this.quaternion.copy(this.camera.quaternion).invert(),this.updateMatrixWorld(),M.set(0,0,1),M.applyQuaternion(this.camera.quaternion),M.x>=0?(b.material.opacity=1,D.material.opacity=.5):(b.material.opacity=.5,D.material.opacity=1),M.y>=0?(T.material.opacity=1,E.material.opacity=.5):(T.material.opacity=.5,E.material.opacity=1),M.z>=0?(S.material.opacity=1,C.material.opacity=.5):(S.material.opacity=.5,C.material.opacity=1);const t=n.offsetWidth-O;e.clearDepth(),e.getViewport(P),e.setViewport(t,0,O,O),e.render(this,d),e.setViewport(P.x,P.y,P.z,P.w)},this.handleClick=async function(e){if(!0===this.animating)return!1;const t=n.getBoundingClientRect(),s=t.left+(n.offsetWidth-O),r=t.top+(n.offsetHeight-O);h.x=(e.clientX-s)/(t.right-s)*2-1,h.y=-(e.clientY-r)/(t.bottom-r)*2+1,c.setFromCamera(h,d);const o=c.intersectObjects(l);if(o.length>0){const e=o[0].object,{type:t}=e.userData,n=Fa[t.toLocaleUpperCase()];return n&&(i.normalizeRotations(),this.animating=!0,await i.rotateTo(n.theta,n.phi,!0),this.animating=!1),!0}return!1},this.dispose=function(){var e,t,n,i,s,r;p.dispose(),m.material.dispose(),g.material.dispose(),v.material.dispose(),null===(e=b.material.map)||void 0===e||e.dispose(),null===(t=T.material.map)||void 0===t||t.dispose(),null===(n=S.material.map)||void 0===n||n.dispose(),null===(i=D.material.map)||void 0===i||i.dispose(),null===(s=E.material.map)||void 0===s||s.dispose(),null===(r=C.material.map)||void 0===r||r.dispose(),b.material.dispose(),T.material.dispose(),S.material.dispose(),D.material.dispose(),E.material.dispose(),C.material.dispose()}}}const Pl={needsUpdate:!1};let Ol=0,Bl=0;const Il=e=>{e instanceof d&&e.dispose()};class Ll{constructor(e,t){this.options=e,this.signals=t,this.clock=new Xe,this.raycaster=new Ve,this.sky=null,this.resizeObserver=new ResizeObserver(hs((()=>{this.signals.windowResize.dispatch()}))),this.options=e,this.state={useFreq:1,delta:0,enabledPostprocessing:!0,isPausedRender:!1,isDisposed:!1},this.scener=new ca(this.signals,this.state),this.scene=this.scener.scene,this.cameraManager=new Na(this),this.camera=this.cameraManager.currentCamera,this.rendererManager=new Da(this),this.container=this.rendererManager.container,this.interactiveContainer=this.rendererManager.interactiveContainer,this.renderer=this.rendererManager.renderer,this.rendererCSS3D=this.rendererManager.rendererCSS3D,this.rendererCSS2D=this.rendererManager.rendererCSS2D,this.pmremGenerator=new Fe(this.renderer),this.pmremGenerator.compileEquirectangularShader(),this.effectManager=new bl(this.renderer,this.scene,this.camera),this.effectComposer=this.effectManager.effectComposer,this.bvh=new Sl(this),this.controls=new Dl(this),this.info=new Cl(this.scene,this.signals),this.stats=new Vt,this.mixer=new Ze(this.scene),this.clipsSet=new Set,this.postUpdate=new Map,this.postRender=new Map,this._loop=0,this.viewHelper=new Ml(this.camera,this.container,this.controls),this.eventHandler=new El(this),this.resizeObserver.observe(this.container),this._initInfo(),this._initStats(),this._signalsEventListenr(),this.animate(0)}_initInfo(){if(this.options.showInfo){this.info.addListeners();const{container:e}=this.info;e.style.zIndex="1",this.container.appendChild(e)}}_initStats(){if(this.options.showStats){const{dom:e}=this.stats;e.style.zIndex="1",this.container.appendChild(e),this.signals.sceneRendered.add((()=>{this.stats.update()}))}}setSSR(e={}){const{enabled:t=!0,intensity:n=1,exponent:i=1.75,distance:s=20,fade:r=0,roughnessFade:o=1,thickness:a=3.5,ior:l=1.75,maxRoughness:c=.1,maxDepthDifference:h=20,blend:u=.95,correction:d=1,correctionRadius:p=1,blur:f=1,blurKernel:m=1,blurSharpness:g=10,jitter:v=0,jitterRoughness:y=2,steps:w=20,refineSteps:x=10,missedRays:A=!1,useNormalMap:b=!0,useRoughnessMap:T=!0,resolutionScale:S=1,velocityResolutionScale:D=1}=e,{effectManager:E}=this,C=E.effectsMap.get(bl.CONSTANTS.ssrEffect);C.enabled!==t&&(C.enabled=t,E.effectsNeedsUpdate=!0);const{effect:M}=C;M.usingBoxProjectedEnvMap=!0,M.intensity=n,M.exponent=i,M.distance=s,M.fade=r,M.roughnessFade=o,M.thickness=a,M.ior=l,M.maxRoughness=c,M.maxDepthDifference=h,M.blend=u,M.correction=d,M.correctionRadius=p,M.blur=f,M.blurKernel=m,M.blurSharpness=g,M.jitter=v,M.jitterRoughness=y,M.steps=w,M.refineSteps=x,M.missedRays=A,M.useNormalMap=b,M.useRoughnessMap=T,M.resolutionScale=S,M.velocityResolutionScale=D,this.triggerRender()}setBloom(e={}){var t;const{enabled:n=!0,mipmapBlur:i=!0,radius:s=.85,intensity:r=3,threshold:o=1,smoothing:a=.01,scalar:l=2,opacity:c=1,selection:h=[]}=e,{effectManager:u}=this,d=u.effectsMap.get(bl.CONSTANTS.bloomEffect);d.enabled!==n&&(d.enabled=n,u.effectsNeedsUpdate=!0);const{effect:p}=d;p.intensity=r;const{mipmapBlurPass:f,renderTarget:m}=p;f.enabled=i,f.radius=s;const g=p.uniforms.get("map");g&&(g.value=i?f.texture:m.texture),p.luminanceMaterial.threshold=o,p.luminanceMaterial.smoothing=a,p.blendMode.opacity.value=c,null===(t=p.luminanceMaterial.userData.bloomSelection)||void 0===t||t.forEach((e=>{e.toneMapped=!0,e.userData.prevEmissive&&(e.emissive.copy(e.userData.prevEmissive),Reflect.deleteProperty(e.userData,"prevEmissive"))})),p.luminanceMaterial.userData.bloomSelection=new Set,n&&h.forEach((e=>{e.traverse((e=>{e instanceof se&&e.material.color&&!p.luminanceMaterial.userData.bloomSelection.has(e.material)&&(e.material.toneMapped=!1,e.material.userData.prevEmissive=e.material.emissive.clone(),e.material.emissive.copy(e.material.color),e.material.emissive.multiplyScalar(l),p.luminanceMaterial.userData.bloomSelection.add(e.material))}))})),this.triggerRender()}setSSAO(e={}){const{enabled:t=!0,aoRadius:n=3,aoSamples:i=16,denoiseSamples:s=4,denoiseRadius:r=12,distanceFalloff:o=1,intensity:a=3,color:l="#333"}=e,{effectManager:c}=this,h=c.passesMap.get(bl.CONSTANTS.ssaoPass);h.enabled=t,h.configuration.aoRadius=n,h.configuration.aoSamples=i,h.configuration.denoiseSamples=s,h.configuration.denoiseRadius=r,h.configuration.distanceFalloff=o,h.configuration.intensity=a,l&&(h.configuration.color=new u(l)),this.triggerRender()}setColorSpace(e){this.renderer.outputColorSpace="sRGB"===e?_:ce,this.signals.sceneChanged.dispatch()}setToneMapping(e={}){const{type:t="ACESFilmic",exposure:n=.8}=e,i=this.effectManager.effectsMap.get(bl.CONSTANTS.toneMappingEffect),s={Reinhard:Uo,Cineon:zo,ACESFilmic:ko},r={None:$e,Reinhard:et,Cineon:tt,ACESFilmic:nt},o="None"!==t;i.enabled!==o&&(i.enabled=o,this.effectManager.effectsNeedsUpdate=!0),o&&(i.effect.mode=s[t]),this.renderer.toneMappingExposure=n,this.renderer.toneMapping=r[t],this.signals.sceneChanged.dispatch()}async setSphereSkyBackground(e){const t=await Ii({file:e});Il(this.scene.background),this.scene.background=t,this.signals.backgroundChanged.dispatch()}async setSkyBackground(e,t=["px.jpg","nx.jpg","py.jpg","ny.jpg","pz.jpg","nz.jpg"]){const n=await Ii({path:e,file:t});Il(this.scene.background),this.scene.background=n,this.signals.backgroundChanged.dispatch()}setBackgroundColor(e){Il(this.scene.background),this.scene.background=new u(e),this.signals.backgroundChanged.dispatch()}setBackgroundColorAlpha(e,t){Il(this.scene.background),this.scene.background=null,this.renderer.setClearColor(new u(e),t),this.signals.backgroundChanged.dispatch()}async setBackgroundImage(e){const t=await Ii({file:e});t.mapping=qe,this.scene.background=t,this.signals.backgroundChanged.dispatch()}setSky(e={}){const{enabled:n=!0,position:i={x:0,y:0,z:0},scalar:s=45e4,turbidity:r=10,rayleigh:o=3,elevation:a=2,azimuth:l=180}=e;if(!n)return void this.closeSky();this.sky||(this.sky=new _t,this.scene.add(this.sky)),this.sky.name="sky",this.sky.position.set(i.x,i.y,i.z),this.sky.scale.setScalar(s);const c=this.sky.material.uniforms;c.turbidity.value=r,c.rayleigh.value=o,c.mieCoefficient.value=.005,c.mieDirectionalG.value=.7;const h=new t,u=Ai(90-a),d=Ai(l);return h.setFromSphericalCoords(1,u,d),c.sunPosition.value.copy(h),this.signals.objectAdded.dispatch(),this.sky}closeSky(){return!!this.sky&&(this.sky.removeFromParent(),this.sky=null,this.signals.objectRemoved.dispatch(),!0)}screenshot(){return new Promise((e=>{this.renderer.domElement.toBlob((t=>{e(t)}))}))}async setEnvironment(e){if(e){const{path:t,file:n,background:i}=e,s=await Ii({path:t,file:n});this.scene.environment=s instanceof Je?this.pmremGenerator.fromCubemap(s).texture:this.pmremGenerator.fromEquirectangular(s).texture,i&&(Il(this.scene.background),this.scene.background=s)}else this.scene.environment=this.pmremGenerator.fromScene(new Ht(this.renderer),.04).texture;return this.signals.sceneChanged.dispatch(),this.scene.environment}playModelAnimation(e,t){let n;if(t instanceof O?n=t:es(t)?n=e.animations[t]:is(t)&&(n=e.animations.find(t)),!n)return;const i=Sr(this.mixer.clipAction(n,e));return i.play(),this.clipsSet.add(n),i}stopModelAnimation(e,t){var n;let i;t instanceof O?i=t:es(t)?i=e.animations[t]:is(t)&&(i=e.animations.find(t)),i&&(null===(n=this.mixer.existingAction(i,e))||void 0===n||n.stop(),this.mixer.uncacheAction(i,e),this.clipsSet.delete(i))}async render(e){return await(null==e?void 0:e()),new Promise((e=>{this.signals.sceneRendered.addOnce(e),this.triggerRender()}))}triggerRender(e=1){this.state.useFreq=e}async setPauseRender(e=!0){if(this.state.isPausedRender=e,!1===e)return this.render()}_passesObserver(){this.effectManager.updateEffectPass()}autoRender(){this.state.useFreq<=0&&!Pl.needsUpdate||(this.state.useFreq>0&&this.state.useFreq--,Pl.needsUpdate&&(Pl.needsUpdate=!1),this.state.isPausedRender||this.baseRender())}baseRender(){Ol=performance.now(),this.signals.beforeRender.dispatch(),this._passesObserver(),this.renderer.info.reset(),this.state.enabledPostprocessing?this.effectComposer.render():(this.renderer.clear(),this.renderer.render(this.scene,this.camera));const e=this.scene.matrixWorldAutoUpdate;if(this.scene.matrixWorldAutoUpdate=!1,this.rendererCSS2D&&this.rendererManager.internalOptions.enableRenderCss2D&&this.rendererCSS2D.render(this.scene,this.camera),this.rendererCSS3D&&this.rendererManager.internalOptions.enableRenderCss3D&&this.rendererCSS3D.render(this.scene,this.camera),this.scene.matrixWorldAutoUpdate=e,this.options.showViewHelper){const e=this.renderer.clippingPlanes;this.renderer.clippingPlanes=[],this.viewHelper.render(this.renderer),this.renderer.clippingPlanes=e}this.postRender.forEach((e=>e())),Bl=performance.now(),this.signals.sceneRendered.dispatch(Bl-Ol)}animate(e){this._loop=requestAnimationFrame((e=>{this.animate(e)}));const t=this.clock.getDelta();this.state.delta=t,this.clipsSet.size>0&&(this.mixer.update(t),this.signals.modelAnimation.dispatch()),zt.update(e)&&this.signals.tweenUpdate.dispatch(),this.controls.update(t)&&this.signals.cameraChange.dispatch(),this.postUpdate.forEach((t=>t(e))),this.autoRender(),this.signals.getSceneInfo.dispatch(this.info.state)}getOffsetByPosition(e){const n=new t(e.x,e.y,e.z).project(this.camera),i=this.renderer.domElement.getBoundingClientRect();return{left:i.left+i.width/2*(n.x+1),top:i.top+i.height/2*(1-n.y)}}getPositionByOffset(e,n=.1,i){const s=new t(0,0,0),r=new t(0,0,0),o=this.renderer.domElement.getBoundingClientRect();return r.set(e.offsetX/o.width*2-1,-e.offsetY/o.height*2+1,n),r.unproject(this.camera),r.sub(this.camera.position).normalize(),s.copy(this.camera.position).add(r.multiplyScalar(null!=i?i:this.camera.position.length())),s}getIntersects(e,t=this.scener.intersectsList.getAll(),n={}){const{isFilterHideObject:i=!0}=n,s=this.container.getBoundingClientRect();let r={offsetX:0,offsetY:0};if(e instanceof MouseEvent)r={offsetX:e.clientX-s.left,offsetY:e.clientY-s.top};else if(e instanceof TouchEvent){const t=e.changedTouches[0];r={offsetX:t.clientX-s.left,offsetY:t.clientY-s.top}}else r=e;const o=new f;o.set(r.offsetX/s.width*2-1,-r.offsetY/s.height*2+1),this.raycaster.setFromCamera(o,this.camera);let a=[];return a=ts(t)?this.raycaster.intersectObjects(t,!0):this.raycaster.intersectObject(t,!0),i&&(a=a.filter((({object:e})=>Si(e)))),a=a.filter((({point:e,object:t})=>{const n=this.renderer.clippingPlanes.every((t=>t.distanceToPoint(e)>0));let i=!0;const s=t;return s.material&&Ui(s.material,(t=>{i&&ts(t.clippingPlanes)&&(i=t.clippingPlanes.every((t=>t.distanceToPoint(e)>0)))})),n&&i})),a}rayClash(e=this.camera.position,n=new t(0,-1,0),i=this.scener.intersectsList.meshOfModelList){const s=new Ve;return s.set(e,n),ts(i)?s.intersectObjects(i,!0):s.intersectObject(i,!0)}clearSignals(){for(const e in this.signals)this.signals[e].removeAll()}dispose(){cancelAnimationFrame(this._loop),this.bvh.dispose(),this.mixer.stopAllAction(),this.clipsSet.forEach((e=>{this.mixer.uncacheAction(e),this.mixer.uncacheClip(e)})),this.mixer.uncacheRoot(this.scene),this.clipsSet.clear(),this.controls.dispose(),this.viewHelper.dispose(),zt.removeAll(),this.clearSignals(),this.scene.clear(),this.pmremGenerator.dispose(),this.effectComposer.dispose(),this.renderer.dispose(),this.rendererCSS2D.domElement.remove(),this.rendererCSS3D.domElement.remove(),this.renderer.forceContextLoss(),this.container.remove(),this.state.isDisposed=!0,this.eventHandler.dispose(),this.resizeObserver.disconnect()}_signalsEventListenr(){const e=()=>{const{clientWidth:e,clientHeight:t}=this.container;this.effectManager.updateCamera(this.camera),this.viewHelper.camera=this.camera,this.camera instanceof pe&&(this.camera.aspect=e/t),this.camera instanceof be&&(this.camera.left=e/-2,this.camera.right=e/2,this.camera.top=t/2,this.camera.bottom=t/-2),this.camera.updateProjectionMatrix(),this.effectComposer.setSize(e,t),this.rendererCSS3D&&this.rendererCSS3D.setSize(e,t),this.rendererCSS2D&&this.rendererCSS2D.setSize(e,t),this.triggerRender()};requestAnimationFrame((()=>{e()})),this.signals.windowResize.add(e),this.signals.cameraObjectChange.add(e),this.signals.sceneChanged.add((()=>this.triggerRender())),this.signals.backgroundChanged.add((()=>this.triggerRender())),this.signals.objectAdded.add((()=>this.triggerRender())),this.signals.objectRemoved.add((()=>this.triggerRender())),this.signals.objectChanged.add((()=>this.triggerRender())),this.signals.materialAdded.add((()=>this.triggerRender())),this.signals.materialRemoved.add((()=>this.triggerRender())),this.signals.materialChanged.add((()=>this.triggerRender())),this.signals.geometryChanged.add((()=>this.triggerRender())),this.signals.cameraChange.add((()=>this.triggerRender())),this.signals.tweenUpdate.add((()=>this.triggerRender())),this.signals.modelAnimation.add((()=>this.triggerRender()));this.signals.outlineChange.add((e=>{const{objects:t,options:n}=e,{color:i,hideColor:s,edgeThickness:r,edgeStrength:o}=Object.assign(Object.assign({},{color:16777215,hideColor:10066329,edgeThickness:3,edgeStrength:10}),n),{effectManager:a}=this,l=a.effectsMap.get(bl.CONSTANTS.outlineEffect),c=t.length>0;l.enabled!==c&&(l.enabled=c,a.effectsNeedsUpdate=!0);const{effect:h}=l,{uniforms:u}=h,d=[];t.forEach((e=>{e.traverse((e=>{e instanceof se&&d.push(e)}))})),h.selection.set(d),h.blur=r>0,h.blurPass.kernelSize=r;const p=u.get("visibleEdgeColor"),f=u.get("hiddenEdgeColor"),m=u.get("edgeStrength");p&&p.value.set(i),f&&f.value.set(s),m&&(m.value=o),this.triggerRender()}))}}const Rl={onLoad:null,onClick:null,onDblClick:null,onRightClick:null};class Fl extends o{constructor(e={id:os()}){var t,n,i,s,r,o,a,l,c;super(),this.isEventPropagation=!1;const{id:h,name:u="",level:d={max:null,min:null},visible:p=!0,position:f={x:0,y:0,z:0},rotation:m={x:0,y:0,z:0},scale:g={x:1,y:1,z:1},userData:v={},onLoad:y,onClick:w,onDblClick:x,onRightClick:A}=Object.assign(Object.assign({},Rl),e);if(void 0===h)throw new Error("In soonspacejs: 空间对象实例化失败,缺少必要字段 'id'!");this.sid=h,this.name=u,this.stype="BaseObject3D",this.level=d,this.visible=null==p||p,this.handleHide=!p,this.position.set(null!==(t=f.x)&&void 0!==t?t:0,null!==(n=f.y)&&void 0!==n?n:0,null!==(i=f.z)&&void 0!==i?i:0),this.rotation.set(null!==(s=m.x)&&void 0!==s?s:0,null!==(r=m.y)&&void 0!==r?r:0,null!==(o=m.z)&&void 0!==o?o:0),this.scale.set(null!==(a=g.x)&&void 0!==a?a:1,null!==(l=g.y)&&void 0!==l?l:1,null!==(c=g.z)&&void 0!==c?c:1),this.castShadow=!0,this.receiveShadow=!0,this.userData=v,this.onLoad=(null==y?void 0:y.bind(this))||null,this.onClick=(null==w?void 0:w.bind(this))||null,this.onDblClick=(null==x?void 0:x.bind(this))||null,this.onRightClick=(null==A?void 0:A.bind(this))||null}eventPropagation(){this.isEventPropagation=!0}show(){this.visible=!0,this.handleHide=!1,Pl.needsUpdate=!0}hide(){this.visible=!1,this.handleHide=!0,Pl.needsUpdate=!0}setMove(e,t,n,i){return ps(this.position,vi(e),t,n,i)}setRotate(e,t,n,i){return ps(this.rotation,yi(e),t,n,i)}setScale(e,t,n,i){return ps(this.scale,vi(e),t,n,i)}getBoundingBox(){return wi(this)}getSpaceAttribute(e=!0){return bi(this,e)}syncSpaceAttribute(e,t=!0){Ti(this,e,t)}copy(e,t){return super.copy(e,t),this.handleHide=e.handleHide,this.level=e.level,this}}class Ul extends se{constructor(e={id:os()},t,n){var i,s,r,o,a,l,c,h,u;super(t,n);const{id:d,name:p="",level:f={max:null,min:null},visible:m=!0,position:g={x:0,y:0,z:0},rotation:v={x:0,y:0,z:0},scale:y={x:1,y:1,z:1},userData:w={}}=e;if(void 0===d)throw new Error("In soonspacejs: 空间对象实例化失败,缺少必要字段 'id'!");this.sid=d,this.name=p,this.stype="BaseMesh",this.level=f,this.visible=null==m||m,this.handleHide=!m,this.position.set(null!==(i=g.x)&&void 0!==i?i:0,null!==(s=g.y)&&void 0!==s?s:0,null!==(r=g.z)&&void 0!==r?r:0),this.rotation.set(null!==(o=v.x)&&void 0!==o?o:0,null!==(a=v.y)&&void 0!==a?a:0,null!==(l=v.z)&&void 0!==l?l:0),this.scale.set(null!==(c=y.x)&&void 0!==c?c:1,null!==(h=y.y)&&void 0!==h?h:1,null!==(u=y.z)&&void 0!==u?u:1),this.castShadow=!0,this.receiveShadow=!0,this.userData=w}show(){this.visible=!0,this.handleHide=!1,Pl.needsUpdate=!0}hide(){this.visible=!1,this.handleHide=!0,Pl.needsUpdate=!0}setMove(e,t,n,i){return ps(this.position,vi(e),t,n,i)}setRotate(e,t,n,i){return ps(this.rotation,yi(e),t,n,i)}setScale(e,t,n,i){return ps(this.scale,vi(e),t,n,i)}getBoundingBox(){return wi(this)}copy(e,t){return super.copy(e,t),this.handleHide=e.handleHide,this.level=e.level,this}}class zl extends Fl{constructor(e){super(e),this.stype="Group"}showAllChild(){this.children.forEach((e=>{e instanceof Fl&&e.show()}))}hideAllChild(){this.children.forEach((e=>{e instanceof Fl&&e.hide()}))}}class kl extends Fl{constructor(e){super(e),this.stype="PluginObject"}}class jl extends Fl{constructor(e){super(e),this.stype="PoiNode";const{type:t="2D",element:n=document.createElement("div"),elementAutoDisplay:i=!0,occlude:s=!1,occludeThrottle:r=0,onChange:o,scaleFixed:a=null}=null!=e?e:{};this.elementType=t,this.element=n,this.elementAutoDisplay=i,this.occlude=s,this.occludeThrottle=r,this.onChange=o,this.scaleFixed=a,this.create(t)}create(e){"2D"===e||"2d"===e?this._create2D():"2.5D"===e||"2.5d"===e?this._create2DHalf():"3D"!==e&&"3d"!==e||this._create3D()}getBoundingBox(e=50){e=e<=0?50:e;const n=new t,s=new t,r=new t(e,e,e);return n.copy(this.position),s.copy(this.position),n.sub(r),s.add(r),new i(n,s)}_create2D(){this.add(new ha(this.element))}_create2DHalf(){this.add(new Aa(this.element))}_create3D(){this.add(new xa(this.element))}}class Nl extends Fl{constructor(e){super(e),this.stype="Model";const{format:t,url:n}=null!=e?e:{};this.formatType=t,this.url=n}setEnvMap(e,t=["px.jpg","nx.jpg","py.jpg","ny.jpg","pz.jpg","nz.jpg"],n={}){Ii({path:e,file:t}).then((e=>{this.traverse((t=>{if(t instanceof se&&t.material instanceof Ae){const{reflectivity:i=.5}=n;t.material.envMap=e,t.material.envMapIntensity=i,Pl.needsUpdate=!0}}))}))}copy(e,t){return super.copy(e,t),this.formatType=e.formatType,this.url=e.url,this}}class Gl extends Fl{constructor(e){super(e),this.stype="Poi";const{type:t,scaleFixed:n=null}=null!=e?e:{};this.iconType=t,this.scaleFixed=n,this.renderOrder=11}getBoundingBox(e=50){e=e<=0?50:e;const n=new t,s=new t,r=new t(e,e,e);return n.copy(this.position),s.copy(this.position),n.sub(r),s.add(r),new i(n,s)}copy(e,t=!1){var n,i;return super.copy(e,t),this.icon=null===(n=e.icon)||void 0===n?void 0:n.clone(),this.text=null===(i=e.text)||void 0===i?void 0:i.clone(),this.clear(),this.icon&&this.add(this.icon),this.text&&this.add(this.text),this.iconType=e.iconType,this.scaleFixed=e.scaleFixed,this}}const Hl={position:{x:0,y:0,z:0},scale:{x:1,y:1,z:1}};class Vl extends Qe{constructor(e,t){super(e),this.stype="Icon";const{position:n,scale:i}=Object.assign(Object.assign({},Hl),t);this.position.set(n.x,n.y,n.z),this.scale.set(i.x,i.y,i.z),this.renderOrder=1}}class _l extends Ul{constructor(e){const{radius:t=10,color:n=16777215,opacity:i=1,gradient:s}=null!=e?e:{};super(e),this.params=e,this.material=new Ae,this.updateGeometry(t),this.updateMaterialOpacity(i),this.updateMaterial(n,s),this.stype="Point"}updateGeometry(e){this.geometry.dispose(),this.geometry=new it(e)}updateMaterialOpacity(e){const t=e<1;this.material.transparent=t,this.material.depthWrite=!t,this.material.opacity=e,this.material.needsUpdate=!0}updateMaterial(e,t){this.material.color=new u(e),this.material.map=Li(t),this.material.needsUpdate=!0}setOptions(e){const{color:t,opacity:n,radius:i,gradient:s}=e,r=this.material;t&&(r.color=new u(t)),void 0!==n&&this.updateMaterialOpacity(n),void 0!==i&&(this.geometry=new it(i,32,32)),s&&(r.map=Li(s)),this.params&&Object.assign(this.params,e),r.needsUpdate=!0,Pl.needsUpdate=!0}}class Ql extends _l{constructor(e){super(e),this.graphs=[],this.stype="Node",e&&(this.graphs=e.graphs)}}class Wl extends Ul{constructor(e){const{radius:t=50,color:n=16777215,opacity:i=1,gradient:s}=null!=e?e:{};super(e),this.params=e,this.material=new Ae({side:oe}),this.updateGeometry(t),this.updateMaterialOpacity(i),this.updateMaterial(n,s),this.stype="Circle",this.rotation.set(-Math.PI/2,0,0)}updateGeometry(e){this.geometry.dispose(),this.geometry=new st(e)}updateMaterialOpacity(e){const t=e<1;this.material.transparent=t,this.material.depthWrite=!t,this.material.opacity=e,this.material.needsUpdate=!0}updateMaterial(e,t){this.material.color=new u(e),this.material.map=Li(t),this.material.needsUpdate=!0}setOptions(e){const{color:t,opacity:n,radius:i,gradient:s}=e,r=this.material;t&&(r.color=new u(t)),void 0!==n&&this.updateMaterialOpacity(n),void 0!==i&&this.updateGeometry(i),s&&(r.map=Li(s)),this.params&&Object.assign(this.params,e),r.needsUpdate=!0,Pl.needsUpdate=!0}}const Yl=new Map;class Kl extends Ul{constructor(e){const{start:t,end:n,imgUrl:i,color:s,transparent:r=!1,passable:o=0}=null!=e?e:{};super(e,void 0,void 0),this.params=e,this.geometry=new v,this.material=new Ae({side:oe}),this.passable=0,this.stype="Link",s&&this.material.color.set(s),this.material.transparent=r,this.material.depthWrite=!r,this.material.flatShading=!0;const a=this.createTexture(i);a&&(this.material.map=a),t&&n&&this.updateGeometry({start:t,end:n}),this.passable=o,this.addEventListener("removed",(()=>{this.geometry.dispose(),this.material.dispose(),null==a||a.dispose()}))}updateGeometry(e){this.params&&Object.assign(this.params,e),this.computeVertex();const t=this.material.map;t&&this.computeTextureRepeat(t)}computeVertex(){if(!this.params)return;const{start:e,end:n,width:i}=this.params,s=vi(e),r=vi(n),o=(new t).addVectors(s,r).divideScalar(2),a=s.distanceTo(r),l=new m;this.geometry.dispose(),this.geometry=new rt(i,a),this.geometry.rotateX(-Math.PI/2),l.lookAt(s,o,this.up),this.position.copy(o),this.quaternion.setFromRotationMatrix(l)}computeTextureRepeat(e){if(this.params&&e.image){const{start:t,end:n,width:i}=this.params,s=vi(t),r=vi(n),o=s.distanceTo(r)/(i*(e.image.height/e.image.width));e.repeat.set(-1,o)}}createTexture(e){if(e){const t=Yl.get(e);if(t){return t.clone()}const n=(new h).load(e,(()=>{n.wrapS=q,n.wrapT=q,n.anisotropy=16,this.computeTextureRepeat(n),Yl.set(e,n),Pl.needsUpdate=!0}));return n}}}class Xl extends Fl{constructor(e){super(e),this.nodes=[],this.links=[],this.linksImgAnimation=null,this.info={type:"line",nodes:[],id:os()},this.stype="Topology";const{type:t="line"}=null!=e?e:{};this.topologyType=t,e&&(this.info=e),this.create(),this.addEventListener("removed",(()=>{var e;null===(e=this.linksImgAnimation)||void 0===e||e.stop(),this.linksImgAnimation=null}))}create(){var e;const{nodes:t,renderLink:n=!0,linkWidth:i=20,linkColor:s=65280,renderNode:r=!0,nodeColor:o=255,nodeRadius:a=i/2,imgUrl:l,animation:c=!1}=this.info,h=[];for(const c of t){const t=this.createNode(Object.assign(Object.assign({},c),{radius:a,color:o}));if(!1===r&&t.hide(),this.nodes.push(t),!l&&n&&!r){const n=Zl(s,null===(e=t.graphs[0])||void 0===e?void 0:e.passable);this.createCircle({id:`${c.id}_circle`,name:`${c.name||c.id}_circle`,position:c.position,radius:i/2,color:n})}if(n)for(let e=0;ee.id===n));if(!h.includes(o)&&u){h.push(o);const e=Zl(s,r),t=this.createLink({id:o,name:a,start:c.position,end:u.position,width:i,color:e,imgUrl:l,transparent:!!l,passable:r,userData:{startNodeId:c.id,endNodeId:u.id}});this.links.push(t)}}}this.updateLinksImgAnimation({imgUrl:l,animation:c})}createNode(e){const t=new Ql(Object.assign({},e));return this.add(t),t}createCircle(e){const t=new Wl(Object.assign(Object.assign({},e),{rotation:{x:Math.PI/2,y:0,z:0}}));return this.add(t),t}createLink(e){const t=new Kl(Object.assign({},e));return this.add(t),t}updateLinksImgAnimation(e={}){var t;const{imgUrl:n,animation:i}=e;if(n&&!this.linksImgAnimation){let e=null;$i(i)&&i?e={repeat:!0,duration:500}:ns(i)&&es(i.duration)&&i.duration>0&&(e=Object.assign({repeat:!0},i)),e&&ps(new f(0,0),new f(0,-1),e,(e=>{this.links.forEach((t=>{var n;null===(n=t.material.map)||void 0===n||n.offset.copy(e)}))}),(e=>{var t;null===(t=this.linksImgAnimation)||void 0===t||t.stop(),this.linksImgAnimation=e})).catch((()=>{}))}n||(null===(t=this.linksImgAnimation)||void 0===t||t.stop(),this.linksImgAnimation=null)}resetNodes(e){const{linkWidth:t=20,renderNode:n=!0,nodeColor:i=255,nodeRadius:s=t/2}=this.info,r=[...this.info.nodes];this.info.nodes=[...e];const o=[];for(let t=0;te.id===r[t].id));n&&vi(n.position).equals(vi(r[t].position))||o.push(r[t])}for(let e=0;eo[e].id===t.sid));this.remove(this.nodes[t]),this.nodes.splice(t,1)}const a=[];for(let t=0;tn.id===e[t].id));n&&vi(n.position).equals(vi(e[t].position))||a.push(e[t])}for(let e=0;e{o.set(e.id,e)}));const a=[...this.links];for(const s of this.info.nodes)if(e)for(let e=0;ee.sid===u));if(l)l.updateGeometry({start:o.start,end:o.end}),e&&l.material.color.set(e),l.passable=h;else{const e=this.createLink(o);this.links.push(e)}}}a.forEach((e=>{if(!1===r.has(e.sid)){const t=this.links.findIndex((t=>t===e));t>-1&&(e.removeFromParent(),this.links.splice(t,1))}})),this.updateLinksImgAnimation({imgUrl:i,animation:s})}getLength(){let e=0;for(let n=1;n2?new ot(new at(n),{depth:t,bevelEnabled:!1}):new v}updateMaterialOpacity(e){const t=e<1;this.material.transparent=t,this.material.depthWrite=!t,this.material.opacity=e,this.material.needsUpdate=!0}updateMaterial(e,t){this.material.color=new u(e),this.material.map=Li(t),this.material.needsUpdate=!0}setOptions(e){var t,n,i,s;const{color:r,opacity:o,yHeight:a,points:l,gradient:c,depth:h}=e,d=this.material;r&&(d.color=new u(r)),void 0!==o&&this.updateMaterialOpacity(o),c&&(d.map=Li(c)),void 0!==a&&this.position.set(0,a,0),l&&void 0!==h?this.updateGeometry(l,h):l?this.updateGeometry(l,null!==(n=null===(t=this.params)||void 0===t?void 0:t.depth)&&void 0!==n?n:0):void 0!==h&&this.updateGeometry(null!==(s=null===(i=this.params)||void 0===i?void 0:i.points)&&void 0!==s?s:[],h),this.params&&Object.assign(this.params,e),d.needsUpdate=!0,Pl.needsUpdate=!0}}class $l extends Fl{constructor(e){super(e),this.stype="Canvas3D",this.create(e)}create(e){const{points:t=[],lines:n=[],polygons:i=[],circles:s=[]}=null!=e?e:{};for(let e=0;e(((e,t,n)=>{t in e?tc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);const ic=[new f,new f,new f,new f],sc=[new t,new t,new t,new t],rc=[new m,new m,new m,new m],oc=[new r,new r,new r,new r];function ac(e,t,n){return t.clone().sub(e).lengthSq()<=n**2}function lc(e,t,n){return t.clone().sub(e).lengthSq()<=n**2*Math.max(e.lengthSq(),t.length())}function cc(e,t){const{epsilon:n=0,relativeEpsilon:i}=t||{},s=0===n?(e,t)=>e.equals(t):i?lc:ac,r=e.length/3,o=new Array(r),[a,l]=sc;for(let t=0;t{if(o=n.length>1,r&&!o)return;const a=new Array(t);if(a.fill(0),n.forEach((function(n){const i=n*t;for(let n=0;nthis.isAncestor(e),onlyC:null!=o,equalVertexIndexMap:t};return e&&(u.positions=n.attributes.position.array,u.getParentMidpoint=t=>e[t].triangle.getMidpoint(h),u.getDepth=t=>e[t].depth),l.branchFace&&(u.maxCount=1/0),function(e,t={}){const{indexes:n,a:i,b:s,c:r,equalVertexIndexMap:o,faceIndex:a,onlyC:l,maxCount:c=(l?2:3),positions:h,getParentMidpoint:u,isAncestor:d,getDepth:p}=e,f=n.length/3,m=a??Math.trunc(f/2),g=o?e=>o[e]:e=>e,v=g(i),y=g(s),w=g(r),x=[];let A=()=>0,b=0;null!=a&&p&&(b=p(a)+1,A=e=>b-p(e));const[T,S,D]=sc;let E=()=>null;function C(e){const i=3*e,s=n.slice(i,i+3);if(t[e]){const t=A(e);return t>0?null:t<0?{posIndexes:s,consumed:!0}:E(e,s)}return{posIndexes:s}}h&&(T.set(0,0,0),[i,s,r].forEach((e=>{D.fromArray(h,3*e),T.add(D)})),T.multiplyScalar(1/3),E=(e,t)=>{S.set(0,0,0);for(let e=0;e{i.push(e)})),i.forEach((e=>{delete t[e.faceIndex],e.removeFromParent()})),!0}removeChildFaces(e){return this.children.slice().forEach((t=>{const n=t.faceIndex;this.removeFace(n,e)})),this}clear(){return this.removeChildFaces()}updateSelfChildren(e={},t=this.root.equalVertexIndexMap){const{geometry:n}=this;return this.removeChildFaces(e),this.getAdjacentFaces(e,t).forEach((t=>{t.consumed&&this.removeFace(t.faceIndex,e);const i=new pc({geometry:n,...t});e[t.faceIndex]=i,this.add(i)})),e}updateChildrenDFS(e,t){const{geometry:n}=this;return e||(e=this.root.childrenFaceIndexes={[this.faceIndex]:this}),t||(t=this.equalVertexIndexMap=this.root.equalVertexIndexMap??cc(n.attributes.position.array)),this.getAdjacentFaces(e,t).forEach((i=>{i.consumed&&this.removeFace(i.faceIndex,e);const s=new pc({geometry:n,...i});return e[i.faceIndex]=s,this.add(s),s.updateChildrenDFS(e,t),s})),e}get equalVertexIndexMap(){return this._equalVertexIndexMap}set equalVertexIndexMap(e){this._equalVertexIndexMap=e,this._equalVertexIndexes=null}get equalVertexIndexes(){let{_equalVertexIndexes:e,equalVertexIndexMap:t}=this;return!e&&t&&(this._equalVertexIndexes=e=hc(t)),e}updateChildrenBFS(e){const t=this.childrenFaceIndexes={[this.faceIndex]:this},n=this.equalVertexIndexMap=null==(null==e?void 0:e.epsilon)&&this.equalVertexIndexMap?this.equalVertexIndexMap:cc(this.geometry.attributes.position.array,e);return this.traversalBFS((function(e){e.updateSelfChildren(t,n)})),t}traversalBFS(e){return function(e,t,n){const i=[e];for(;i.length;){const e=i.shift();if(n(e))return e;i.push(...e[t])}}(this,"children",e)}}var fc=Object.defineProperty,mc=(e,t,n)=>(((e,t,n)=>{t in e?fc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);function gc(e,t){const n=t.toArray(),i=n.findIndex((e=>0!==e));if(-1===i)return 0;const s=e.toArray()[i];return 0===s?1/0:n[i]/s}function vc(e,t){const n=e.clone().cross(t);return"number"==typeof n?0===n:0===n.lengthSq()}function yc(e,t,n){let i=function(e,t,n=0){let i=e.lengthSq()*t.lengthSq();if(0===i)return n;i=Math.sqrt(i);let s=e.dot(t)/i;return s=Math.max(-1,Math.min(1,s)),Math.acos(s)}(e,t);return 0===i?i:e.clone().cross(t).dot(n)<0?-i:i}const wc=180/Math.PI,xc={yaw:[{name:"前",range:[-15,15]},{name:"左",range:[15,165]},{name:"右",range:[-165,-15]},{name:"后",range:[-180.1,-165]},{name:"后",range:[165,180.1]}],pitch:[{name:"前",range:[-15,15]},{name:"上",range:[15,165]},{name:"下",range:[-165,-15]},{name:"后",range:[-180.1,-165]},{name:"后",range:[165,180.1]}],roll:[{name:"上",range:[-15,15]},{name:"左",range:[15,165]},{name:"右",range:[-165,-15]},{name:"下",range:[-180.1,-165]},{name:"下",range:[165,180.1]}]};const Ac={degrees:!0,map:xc,front:{x:0,y:0,z:1},up:{x:0,y:1,z:0}};class bc{constructor(e){mc(this,"_options"),mc(this,"_listMap"),mc(this,"_front"),mc(this,"_up"),e&&(this.options=e)}static get options(){return this._options??(this.options=Ac)}static set options(e){this._options=Object.assign({},structuredClone(xc),e)}get defaultOptions(){return this.constructor.options}get options(){return this._options??(this.options=this.defaultOptions)}set options(e){this._options=Object.assign({},structuredClone(this.defaultOptions),e),this._listMap=null,this._front=null,this._up=null}get degrees(){return this.options.degrees??(this.options.degrees=this.defaultOptions.degrees??!0)}set degrees(e){this.options.degrees=e}get map(){return this.options.map||(this.map=this.defaultOptions.map),this.options.map}set map(e){const t=structuredClone(this.defaultOptions.map),n=structuredClone(xc);e=e?{yaw:e.yaw??t.yaw??n.yaw,pitch:e.pitch??t.pitch??n.pitch,roll:e.roll??t.roll??n.roll}:t,this.options.map=e,this._listMap=null}get listMap(){return this._listMap??(this._listMap=function(e){const t={};for(const[n,i]of Object.entries(e))t[n]=Array.isArray(i)?i:Object.entries(i).map((([e,t])=>({name:e,range:t})));return t}(this.map??{}))}get front(){return this._front||(this.front=this.options.front??this.defaultOptions.front??Ac.front),this._front}set front(e){this._front=(new t).copy(e)}get up(){return this._up||(this.up=this.options.up??this.defaultOptions.up??Ac.up),this._up}set up(e){this._up=(new t).copy(e)}computeAzimuth(e,n,i){const s=(new t).copy(e),r=(new t).copy(n??this.front),o=(new t).copy(i??this.up);let{yaw:a,pitch:l,roll:c}=function(e,t,n){const i=t.clone().negate(),s=n.clone().projectOnPlane(t),r=yc(t,e.clone().projectOnPlane(s),s),o=t.clone().cross(s);return{yaw:r,pitch:yc(t,e.clone().projectOnPlane(o),o),roll:yc(s,e.clone().projectOnPlane(i),i)}}(s,r,o);return this.degrees&&(a*=wc,l*=wc,c*=wc),{yaw:{angle:a,name:this.findAzimuthNames("yaw",a)},pitch:{angle:l,name:this.findAzimuthNames("pitch",l)},roll:{angle:c,name:this.findAzimuthNames("roll",c)}}}findAzimuthNames(e,t){const n=[],i=this.listMap[e];if(!i)return n;for(const{name:e,range:[s,r]}of i)(t>=s&&tr)&&n.push(e);return n}}mc(bc,"_options"),new bc,new m(1,0,0,0,0,0,1,0,0,1,0,0,0,0,0,1);var Tc=(e=>(e[e.ThroughIntersect=1]="ThroughIntersect",e[e.JointIntersect=2]="JointIntersect",e[e.Intersect=3]="Intersect",e[e.Tangency=4]="Tangency",e[e.Contain=8]="Contain",e[e.Dissociation=16]="Dissociation",e))(Tc||{});function Sc(e,n){const[i,s]=e,r=s.clone().sub(i),[o,a]=n,l=a.clone().sub(o),c=r.clone().cross(l),[h,u]=function(e){return void 0!==e.w?[ve,4]:void 0!==e.z?[t,3]:[f,2]}(i);if(2===u?0===c:c.equals(new h))return null;const d=o.clone().sub(i).cross(l),p=2===u?d/c:gc(c,d);return r.clone().multiplyScalar(p).add(i)}function Dc(e,t){const[n,i]=e,[s,r]=t,o=i.clone().sub(n),a=function(e,t){const[n,i]=e,s=i.clone().sub(n),[r,o]=t;if(vc(o.clone().sub(r),s))return vc(r.clone().sub(n),s)?Tc.Tangency:Tc.Dissociation;return Tc.Intersect}(e,t);if(a===Tc.Tangency){let e=0,t=0;const i=gc(o,s.clone().sub(n));i<0?e++:i>1&&t++;const a=gc(o,r.clone().sub(n));return a<0?e++:a>1&&t++,2===e||2===t?Tc.Dissociation:e+t===1?Tc.Tangency:Tc.Contain}if(a!==Tc.Intersect)return a;const l=Sc(e,t),c=gc(r.clone().sub(s),l.clone().sub(s));if(c<0||c>1)return Tc.Dissociation;if(0===c||1===c)return Tc.JointIntersect;const h=gc(o,l.clone().sub(n));return h<0||h>1?Tc.Dissociation:0===h||1===h?Tc.JointIntersect:Tc.ThroughIntersect}function Ec(e,t){const n=t.length;let i,s=!1;for(let r=0;r{const s=new Pc({geometry:i,...t},this,!0);n&&s.isOutFlatRange(n)?this.remove(s):(t.consumed&&this.removeFace(t.faceIndex,e),e[t.faceIndex]=s)})),e}updateChildrenDFS(e,t,n){this.updateFace();const{geometry:i}=this;if(!e){if(e=this.root.childrenFaceIndexes={},n&&this.isOutFlatRange(n))return this.removeFromParent(),e;e[this.faceIndex]=this}return t||(t=this.equalVertexIndexMap=this.root.equalVertexIndexMap??cc(i.attributes.position.array)),this.getAdjacentFaces(e,t).forEach((s=>{const r=new Pc({geometry:i,...s},this);n&&r.isOutFlatRange(n)?this.remove(r):(s.consumed&&this.removeFace(s.faceIndex,e),e[s.faceIndex]=r,r.updateChildrenDFS(e,t,n))})),e}updateChildrenBFS(e,t){this.updateFace();const n=this.childrenFaceIndexes={};if(t&&this.isOutFlatRange(t))return this.removeFromParent(),n;n[this.faceIndex]=this;const i=this.equalVertexIndexMap=null==(null==e?void 0:e.epsilon)&&this.equalVertexIndexMap?this.equalVertexIndexMap:cc(this.geometry.attributes.position.array,e);return this.traversalBFS((function(e){e.updateSelfChildren(n,i,t)})),n}appendVertex(e,n,i,s,r=!0){const{positions:o,normals:a,uvs:l}=n,{[e]:c,real:{[e]:h},normalMatrix:u,matrixWorld:d,geometry:p}=this,{[e]:m}=r?this.flatTriangle:this.triangle,g=i[s?h:c]=o.length;o.push(m.clone());const{attributes:{normal:v,uv:y}}=p;if(a){const e=new t;r?this.flatTriangle.getNormal(e):e.fromBufferAttribute(v,h),a.push(e)}if(l){const e=(new f).fromBufferAttribute(y,h);l.push(e)}return g}appendFace(e,t,n=!0){const{indexes:i}=e,{a:s,b:r,order:o}=this,a=this.appendVertex("c",e,t,!1,n);if(i){const e=i.length;i[e+o[0]]=t[s],i[e+o[1]]=t[r],i[e+o[2]]=a}return a}appendFaceVertices(e,t,n=!0){const{indexes:i}=e,{order:s}=this,r=this.appendVertex("a",e,t,!0,n),o=this.appendVertex("b",e,t,!0,n),a=this.appendVertex("c",e,t,!0,n);if(i){const e=i.length;i[e+s[0]]=r,i[e+s[1]]=o,i[e+s[2]]=a}return[r,o,a]}createFaceGeometry(e=!0){const t=[],n=[],i=[],s=[],r=new Array(3),{normal:o,uv:a}=this.geometry.attributes,l={positions:t,indexes:s};o&&(l.normals=n),a&&(l.uvs=i),this.appendFaceVertices(l,r,e);const c=[],h=[],u=[];for(let e=0;e<3;e++)t[e].toArray(c,c.length),o&&n[e].toArray(h,h.length),a&&i[e].toArray(u,u.length);const d=new v;return d.setAttribute("position",new y(c,3)),o&&d.setAttribute("normal",new y(h,3)),a&&d.setAttribute("uv",new y(u,2)),d.index=new C(s,1),d}createFaceFlatKeyframeTracks(e,t,n=0,i){const{uuid:s,position:r,quaternion:o,scale:a}=e,{matrixInvert:l,parent:c}=this;let h=l;if(!i&&c){const{matrixWorld:e}=c;h=e.clone().multiply(l)}const[u,d]=sc,p=oc[0];h.decompose(u,p,d);const f=[n,n+t],m=[];r.toArray(m),u.toArray(m,m.length);const g=[];o.toArray(g),p.toArray(g,g.length);const v=[];a.toArray(v),d.toArray(v,v.length);return[new B(`${s}.position`,f,m),new I(`${s}.quaternion`,f,g),new B(`${s}.scale`,f,v)]}createFaceMesh(e,t=!0){const n=this.createFaceGeometry(t);return new se(n,e)}createFlatFaceMeshTree(e,t,n){const i=this.createFaceMesh(e),s=n||[];let{duration:r,layer:o=0,byLayer:a}=t||{};if(r&&o>0){const e=a?r*(o-1):0,t=this.createFaceFlatKeyframeTracks(i,r,e);s.push(...t)}if(t={duration:r,layer:o+1,byLayer:a},this.children.forEach((n=>{const r=n.createFlatFaceMeshTree(e,t,s);i.add(r)})),!n&&s.length){const e=new O("展开",void 0,s);i.animations.push(e)}return i}}let Oc=class e extends Pc{constructor(e){var n;const{geometry:i,faceIndex:s,origin:r,normal:o,angle:a=0,xyPlane:l=!1,meshMatrix:c,flatRange:h}=e;let u=null==(n=i.index)?void 0:n.array;u||(u=dc(i.attributes.position.count),i.index=new C(u,1));const d=3*s;super({geometry:i,a:u[d],b:u[d+1],c:u[d+2],faceIndex:s,order:[0,1,2]}),nc(this,"origin",new t),nc(this,"normal"),nc(this,"angle"),nc(this,"xyPlane"),nc(this,"xyPlaneMatrix",new m),nc(this,"meshMatrix",null),nc(this,"flatRange",null),nc(this,"_isBounded",!1);const{triangle:p}=this;if(this.origin.copy(r||p.b),this.normal=o||p.getNormal(new t),this.angle=a,this.meshMatrix=c,this.flatRange=h,h&&c){let e=c.getMaxScaleOnAxis();e=0===e?1:1/e,this.flatRange=h.map((t=>t.multiplyScalar(e)))}this.xyPlane=!!h||l,this.updateFace(),this.updateChildrenBFS(e,this.flatRange)}static createFlatFaceTreeByRay(t){const{object:n,origin:i,direction:s,angle:r,planeNormal:o,...a}=t,l=new Ve(i,s),[c]=l.intersectObject(n);if(!c)return null;const{object:h,instanceId:u,point:d,normal:p,faceIndex:f,face:g}=c;if(null==g)return null;const{geometry:v,matrixWorld:y}=h,w=new m;null==u?w.copy(y):(h.getMatrixAt(u,w),w.premultiply(y));const x=rc[0].copy(w).invert();let A;switch(o){case 1:A=p;break;case 2:A=s.clone().negate(),A.transformDirection(x);break;default:A=g.normal}return d.applyMatrix4(x),new e({...a,geometry:v,origin:d,faceIndex:f,normal:A,angle:r,meshMatrix:w})}updateMatrix(){if(!this.xyPlane)return super.updateMatrix();const{origin:e,normal:t,angle:n,xyPlaneMatrix:i}=this,[s,r]=oc,o=sc[0];o.set(0,0,1),s.setFromUnitVectors(o,t),r.setFromAxisAngle(o,n),s.multiply(r),i.makeRotationFromQuaternion(s),i.setPosition(e),this.matrix.copy(i).invert()}averageEqualVectors(e,t){const n=e[0].toArray().length;let i=[];for(let t=0;t{const t=n[e];void 0!==t&&a.push(t)}))}return uc(e,t,r)}getVerticesByReuse(e,t=!0,n){const i=[];if(this.appendVertex("a",e,i,!1,t),this.appendVertex("b",e,i,!1,t),this.traversalBFS((n=>{n.appendFace(e,i,t)})),t&&n){const{positions:t}=e;let n=[];for(let e=0;e{n.appendFaceVertices(e,s,t)})),t&&n){const{positions:t}=e;let n=[];for(let e=0;e{o[e]=[]})),o.indexMap=e?this.getVerticesByAll(o,t,n):this.getVerticesByReuse(o,t,n),o}createGeometry(e,t=!0){const{normal:n,uv:i}=this.geometry.attributes,{positions:s,normals:r,uvs:o,indexes:a,indexMap:l}=this.generateGeometryData(e,t),c=s.length,h=[],u=[],d=[];for(let e=0;e{const r=s.createFaceMesh(e);if(i.add(r),t){const e=s.createFaceFlatKeyframeTracks(r,t,0,!0);n.push(...e)}})),n.length){const e=new O("独立展开",t,n);i.animations.push(e)}return this.transformFlatObjectToWorld(i)}createFlatFaceMeshTree(e,t,n){const i=super.createFlatFaceMeshTree(e,t,n);return this.transformFlatObjectToWorld(i)}transformFlatObjectToWorld(e){const{meshMatrix:t,xyPlaneMatrix:n}=this;return t&&e.matrix.copy(t),e.matrix.multiply(n),e.matrix.decompose(e.position,e.quaternion,e.scale),e}};function Bc(e,t,n,i,s){const r=e.length;if(!s){s=[];for(let e=0;ee.length/o|0));for(let t=0;t0,m=l[0][n]-i>0,g=c[0][n]-i>0;switch(i<0&&(f=!f,m=!m,g=!g),f+m+g){case 0:for(let e=0;e(e[e.Projection=0]="Projection",e[e.Distance=1]="Distance",e[e.ContinuousDistance=2]="ContinuousDistance",e[e.UVIncrement=3]="UVIncrement",e[e.Mapping=4]="Mapping",e[e.Original=5]="Original",e))(Lc||{});class Rc extends v{constructor(){super(...arguments),nc(this,"isDecalGeometry",!0),nc(this,"originalUVs"),nc(this,"uvMap",1),nc(this,"offsetFactor",0),nc(this,"offsetUnits",0),nc(this,"epsilon",1e-8),nc(this,"relativeEpsilon",!1),nc(this,"_equalVertexIndexMap",null),nc(this,"_equalVertexIndexes",null),nc(this,"border",[])}get equalVertexIndexMap(){let{_equalVertexIndexMap:e}=this;if(!e){const{cutPositions:t,epsilon:n,relativeEpsilon:i}=this;this._equalVertexIndexMap=e=cc(t,{epsilon:n,relativeEpsilon:i}),this._equalVertexIndexes=null}return e}get equalVertexIndexes(){let{_equalVertexIndexes:e}=this;return e||(this._equalVertexIndexes=e=hc(this.equalVertexIndexMap)),e}empty(){const{normal:e,uv:t}=this.attributes;this.attributes={},this.setAttribute("position",new y([],3)),e&&this.setAttribute("normal",new y([],3)),t&&this.setAttribute("uv",new y([],3)),this.setIndex([])}clipGeometryData(e,t){return function(e,t,n){for(let i=0;i3){n=[0,0,0];const e=t.length;for(let i=0;i.5*e))}get meshMatrix(){return this.faceTree.meshMatrix}get geometry(){return this.faceTree.geometry}setOptions(e){let{object:t,origin:n,direction:i,angle:s,size:r,uvMap:o,offsetFactor:a,offsetUnits:l,epsilon:c,relativeEpsilon:h,branchFace:u}=e,d=!1;t&&(this.object=t,d=!0),r&&(this.size=r,d=!0),c&&(this.epsilon=c,d=!0),h&&(this.relativeEpsilon=h,d=!0),n&&(this.origin.copy(n),d=!0),i&&(this.direction.copy(i),d=!0),null!=s&&(this.angle=s,d=!0),null!=u&&(this.branchFace=u,d=!0);let p=!1;if(a&&(p=!0,this.offsetFactor=a),l&&(p=!0,this.offsetUnits=l),null!=o&&(this.uvMap=o,o===Lc.ContinuousDistance&&(d=!0)),d)return this.updateGeometry();p&&this.updatePosition(),null!=o&&this.updateUV()}updateGeometry(){const{object:e,origin:t,direction:n,angle:i,border:[s,r],branchFace:o,epsilon:a,relativeEpsilon:l}=this,c=this.faceTree=Oc.createFlatFaceTreeByRay({object:e,origin:t,direction:n,angle:i,flatRange:[new f(s,r),new f(-s,r),new f(-s,-r),new f(s,-r)],xyPlane:!0,branchFace:o,epsilon:a,relativeEpsilon:l});if(this._equalVertexIndexMap=this._equalVertexIndexes=null,!c)return this.empty();const{flatPositions:h,positions:u,normals:d,uvs:p,averagePositions:m}=this.generateDecalGeometryData(this.geometry);this.flatPositions=h,this.cutPositions=u,this.averageFlatPositions=m,this.originalUVs=p,d&&this.setAttribute("normal",new y(d,3)),this.updatePosition(),this.updateUV()}generateDecalGeometryData(e){const{faceTree:t}=this,{attributes:n}=e,i={positions:[]},s=["positions"];n.normal&&s.push("normals"),n.uv&&s.push("uvs");const r={},o=[i.positions];s.forEach((e=>o.push(r[e]=[])));const a=this.uvMap===Lc.ContinuousDistance;t.getVertices(i,r,!0,a);let l=[];const c=o.length,h=i.positions.length;for(let e=0;e{u[e]=l[t+1]})),u.normals&&function(e,t){const n=e.length/t|0;for(let i=0;i(((e,t,n)=>{t in e?jc(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);function Gc(e,n,i){const s=(i=i??0)+1;if(ms(e))return e;if(null!=e.x&&null!=e.y)return function(e){return null!=e.w?(new ve).copy(e):null!=e.z?(new t).copy(e):(new f).copy(e)}(e);if(Array.isArray(e))return e.map((e=>Gc(e,n,s)));if(e instanceof Map){const t=new Map;for(const i of e.keys()){const r=Gc(e.get(i),n,s);t.set(i,r)}return t}if(function(e){return e&&"function"==typeof e[Symbol.iterator]}(e)){const t=[];for(const i of e){const e=Gc(i,n,s);t.push(e)}return t}if((n||0===i)&&"object"==typeof e){const t={};for(const i of Object.keys(e))t[i]=Gc(e[i],n,s);return t}return e}function Hc(e,t,n){let i=function(e,t){const n=Math.sqrt(e.lengthSq()*t.lengthSq());if(0===n)return 0;let i=e.dot(t)/n;return i=Math.max(-1,Math.min(1,i)),Math.acos(i)}(e,t);return 0===i?i:e.clone().cross(t).dot(n)<0?-i:i}const Vc=180/Math.PI,_c={yaw:[{name:"前",range:[-15,15]},{name:"左",range:[15,165]},{name:"右",range:[-165,-15]},{name:"后",range:[-180.1,-165]},{name:"后",range:[165,180.1]}],pitch:[{name:"前",range:[-15,15]},{name:"上",range:[15,165]},{name:"下",range:[-165,-15]},{name:"后",range:[-180.1,-165]},{name:"后",range:[165,180.1]}],roll:[{name:"上",range:[-15,15]},{name:"左",range:[15,165]},{name:"右",range:[-165,-15]},{name:"下",range:[-180.1,-165]},{name:"下",range:[165,180.1]}]};const Qc={degrees:!0,map:_c,front:{x:0,y:0,z:1},up:{x:0,y:1,z:0}};class Wc{constructor(e){Nc(this,"_options"),Nc(this,"_listMap"),Nc(this,"_front"),Nc(this,"_up"),e&&(this.options=e)}static get options(){return this._options??(this.options=Qc)}static set options(e){this._options=Object.assign({},structuredClone(_c),e)}get defaultOptions(){return this.constructor.options}get options(){return this._options??(this.options=this.defaultOptions)}set options(e){this._options=Object.assign({},structuredClone(this.defaultOptions),e),this._listMap=null,this._front=null,this._up=null}get degrees(){return this.options.degrees??(this.options.degrees=this.defaultOptions.degrees??!0)}set degrees(e){this.options.degrees=e}get map(){return this.options.map||(this.map=this.defaultOptions.map),this.options.map}set map(e){const t=structuredClone(this.defaultOptions.map),n=structuredClone(_c);e=e?{yaw:e.yaw??t.yaw??n.yaw,pitch:e.pitch??t.pitch??n.pitch,roll:e.roll??t.roll??n.roll}:t,this.options.map=e,this._listMap=null}get listMap(){return this._listMap??(this._listMap=function(e){const t={};for(const[n,i]of Object.entries(e))t[n]=Array.isArray(i)?i:Object.entries(i).map((([e,t])=>({name:e,range:t})));return t}(this.map??{}))}get front(){return this._front||(this.front=this.options.front??this.defaultOptions.front??Qc.front),this._front}set front(e){this._front=(new t).copy(e)}get up(){return this._up||(this.up=this.options.up??this.defaultOptions.up??Qc.up),this._up}set up(e){this._up=(new t).copy(e)}computeAzimuth(e,n,i){const s=(new t).copy(e),r=(new t).copy(n??this.front),o=(new t).copy(i??this.up);let{yaw:a,pitch:l,roll:c}=function(e,t,n){const i=t.clone().negate(),s=n.clone().projectOnPlane(t),r=Hc(t,e.clone().projectOnPlane(s),s),o=t.clone().cross(s);return{yaw:r,pitch:Hc(t,e.clone().projectOnPlane(o),o),roll:Hc(s,e.clone().projectOnPlane(i),i)}}(s,r,o);return this.degrees&&(a*=Vc,l*=Vc,c*=Vc),{yaw:{angle:a,name:this.findAzimuthNames("yaw",a)},pitch:{angle:l,name:this.findAzimuthNames("pitch",l)},roll:{angle:c,name:this.findAzimuthNames("roll",c)}}}findAzimuthNames(e,t){const n=[],i=this.listMap[e];if(!i)return n;for(const{name:e,range:[s,r]}of i)(t>=s&&tr)&&n.push(e);return n}}function Yc(e){const n={};if(Array.isArray(e)){const i=e.map((e=>(new t).copy(e)));n.points=i}else if(e instanceof Xl){const i=e.nodes.map((e=>e.getWorldPosition(new t)));n.points=i}else n.curve=e;return n}Nc(Wc,"_options"),new Wc,new ze;var Kc={},Xc={},Zc=function(e,t){return Zc=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Zc(e,t)};function qc(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Zc(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var Jc=function(){return Jc=Object.assign||function(e){for(var t,n=1,i=arguments.length;n=0;a--)(s=e[a])&&(o=(r<3?s(o):r>3?s(t,n,o):s(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o}function th(e,t){return function(n,i){t(n,i,e)}}function nh(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function ih(e,t,n,i){return new(n||(n=Promise))((function(s,r){function o(e){try{l(i.next(e))}catch(e){r(e)}}function a(e){try{l(i.throw(e))}catch(e){r(e)}}function l(e){var t;e.done?s(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,a)}l((i=i.apply(e,t||[])).next())}))}function sh(e,t){var n,i,s,r,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]};return r={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;r&&(r=0,a[0]&&(o=0)),o;)try{if(n=1,i&&(s=2&a[0]?i.return:a[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,a[1])).done)return s;switch(i=0,s&&(a=[2&a[0],s.value]),a[0]){case 0:case 1:s=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!(s=o.trys,(s=s.length>0&&s[s.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!s||a[1]>s[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function lh(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,s,r=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(i=r.next()).done;)o.push(i.value)}catch(e){s={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(s)throw s.error}}return o}function ch(){for(var e=[],t=0;t1||a(e,t)}))})}function a(e,t){try{(n=s[e](t)).value instanceof dh?Promise.resolve(n.value.v).then(l,c):h(r[0][2],n)}catch(e){h(r[0][3],e)}var n}function l(e){a("next",e)}function c(e){a("throw",e)}function h(e,t){e(t),r.shift(),r.length&&a(r[0][0],r[0][1])}}function fh(e){var t,n;return t={},i("next"),i("throw",(function(e){throw e})),i("return"),t[Symbol.iterator]=function(){return this},t;function i(i,s){t[i]=e[i]?function(t){return(n=!n)?{value:dh(e[i](t)),done:!1}:s?s(t):t}:s}}function mh(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=ah(e),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(n){t[n]=e[n]&&function(t){return new Promise((function(i,s){(function(e,t,n,i){Promise.resolve(i).then((function(t){e({value:t,done:n})}),t)})(i,s,(t=e[n](t)).done,t.value)}))}}}function gh(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var vh=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function yh(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&rh(t,e,n);return vh(t,e),t}function wh(e){return e&&e.__esModule?e:{default:e}}function xh(e,t,n,i){if("a"===n&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?i:"a"===n?i.call(e):i?i.value:t.get(e)}function Ah(e,t,n,i,s){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!s:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?s.call(e,n):s?s.value=n:t.set(e,n),n}function bh(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function Th(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var i;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");i=t[Symbol.asyncDispose]}if(void 0===i){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");i=t[Symbol.dispose]}if("function"!=typeof i)throw new TypeError("Object not disposable.");e.stack.push({value:t,dispose:i,async:n})}else n&&e.stack.push({async:!0});return t}var Sh="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var i=new Error(n);return i.name="SuppressedError",i.error=e,i.suppressed=t,i};function Dh(e){function t(t){e.error=e.hasError?new Sh(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function n(){for(;e.stack.length;){var i=e.stack.pop();try{var s=i.dispose&&i.dispose.call(i.value);if(i.async)return Promise.resolve(s).then(n,(function(e){return t(e),n()}))}catch(e){t(e)}}if(e.hasError)throw e.error}()}var Eh={__extends:qc,__assign:Jc,__rest:$c,__decorate:eh,__param:th,__metadata:nh,__awaiter:ih,__generator:sh,__createBinding:rh,__exportStar:oh,__values:ah,__read:lh,__spread:ch,__spreadArrays:hh,__spreadArray:uh,__await:dh,__asyncGenerator:ph,__asyncDelegator:fh,__asyncValues:mh,__makeTemplateObject:gh,__importStar:yh,__importDefault:wh,__classPrivateFieldGet:xh,__classPrivateFieldSet:Ah,__classPrivateFieldIn:bh,__addDisposableResource:Th,__disposeResources:Dh},Ch=Object.freeze({__proto__:null,__addDisposableResource:Th,get __assign(){return Jc},__asyncDelegator:fh,__asyncGenerator:ph,__asyncValues:mh,__await:dh,__awaiter:ih,__classPrivateFieldGet:xh,__classPrivateFieldIn:bh,__classPrivateFieldSet:Ah,__createBinding:rh,__decorate:eh,__disposeResources:Dh,__esDecorate:function(e,t,n,i,s,r){function o(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var a,l=i.kind,c="getter"===l?"get":"setter"===l?"set":"value",h=!t&&e?i.static?e:e.prototype:null,u=t||(h?Object.getOwnPropertyDescriptor(h,i.name):{}),d=!1,p=n.length-1;p>=0;p--){var f={};for(var m in i)f[m]="access"===m?{}:i[m];for(var m in i.access)f.access[m]=i.access[m];f.addInitializer=function(e){if(d)throw new TypeError("Cannot add initializers after decoration has completed");r.push(o(e||null))};var g=(0,n[p])("accessor"===l?{get:u.get,set:u.set}:u[c],f);if("accessor"===l){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(a=o(g.get))&&(u.get=a),(a=o(g.set))&&(u.set=a),(a=o(g.init))&&s.unshift(a)}else(a=o(g))&&("field"===l?s.unshift(a):u[c]=a)}h&&Object.defineProperty(h,i.name,u),d=!0},__exportStar:oh,__extends:qc,__generator:sh,__importDefault:wh,__importStar:yh,__makeTemplateObject:gh,__metadata:nh,__param:th,__propKey:function(e){return"symbol"==typeof e?e:"".concat(e)},__read:lh,__rest:$c,__runInitializers:function(e,t,n){for(var i=arguments.length>2,s=0;sthis.head.priority)return this.prepend(t);for(var i=new e(this.head),s=i,r=this.tail;r.nonEmpty;){if(n>r.head.priority)return s.tail=r.prepend(t),i;s=s.tail=new e(r.head),r=r.tail}return s.tail=new e(t),i},e.prototype.filterNot=function(t){if(!this.nonEmpty||null==t)return this;if(t===this.head.listener)return this.tail;for(var n=new e(this.head),i=n,s=this.tail;s.nonEmpty;){if(s.head.listener===t)return i.tail=s.tail,n;i=i.tail=new e(s.head),s=s.tail}return this},e.prototype.contains=function(e){if(!this.nonEmpty)return!1;for(var t=this;t.nonEmpty;){if(t.head.listener===e)return!0;t=t.tail}return!1},e.prototype.find=function(e){if(!this.nonEmpty)return null;for(var t=this;t.nonEmpty;){if(t.head.listener===e)return t.head;t=t.tail}return null},e.prototype.toString=function(){for(var e="",t=this;t.nonEmpty;)e+=t.head+" -> ",t=t.tail;return"[List "+(e+="NIL")+"]"},e.NIL=new e(null,null),e}();Ih.SlotList=Lh;var Rh={};Object.defineProperty(Rh,"__esModule",{value:!0});var Fh=function(){function e(e,t,n,i){void 0===n&&(n=!1),void 0===i&&(i=0),this._enabled=!0,this._once=!1,this._priority=0,this._listener=e,this._once=n,this._signal=t,this._priority=i,this.verifyListener(e)}return e.prototype.execute0=function(){this._enabled&&(this._once&&this.remove(),this._params&&this._params.length?this._listener.apply(null,this._params):this._listener())},e.prototype.execute1=function(e){this._enabled&&(this._once&&this.remove(),this._params&&this._params.length?this._listener.apply(null,[e].concat(this._params)):this._listener(e))},e.prototype.execute=function(e){if(this._enabled){this._once&&this.remove(),this._params&&this._params.length&&(e=e.concat(this._params));var t=e.length;0===t?this._listener():1===t?this._listener(e[0]):2===t?this._listener(e[0],e[1]):3===t?this._listener(e[0],e[1],e[2]):this._listener.apply(null,e)}},Object.defineProperty(e.prototype,"listener",{get:function(){return this._listener},set:function(e){if(null==e)throw new Error("Given listener is null.\nDid you want to set enabled to false instead?");this.verifyListener(e),this._listener=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"once",{get:function(){return this._once},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"priority",{get:function(){return this._priority},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return"[Slot listener: "+this._listener+", once: "+this._once+", priority: "+this._priority+", enabled: "+this._enabled+"]"},Object.defineProperty(e.prototype,"enabled",{get:function(){return this._enabled},set:function(e){this._enabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"params",{get:function(){return this._params},set:function(e){this._params=e},enumerable:!0,configurable:!0}),e.prototype.remove=function(){this._signal.remove(this._listener)},e.prototype.verifyListener=function(e){if(null==e)throw new Error("Given listener is null.");if(null==this._signal)throw new Error("Internal signal reference has not been set yet.")},e}();Rh.Slot=Fh,Object.defineProperty(Bh,"__esModule",{value:!0});var Uh=Ih,zh=Rh,kh=function(){function e(){for(var e=[],t=0;t."+this._valueClasses[t])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numListeners",{get:function(){return this.slots.length},enumerable:!0,configurable:!0}),e.prototype.addOnce=function(e){return this.registerListener(e,!0)},e.prototype.remove=function(e){var t=this.slots.find(e);return t?(this.slots=this.slots.filterNot(e),t):null},e.prototype.removeAll=function(){this.slots=Uh.SlotList.NIL},e.prototype.dispatch=function(){for(var e=[],t=0;t is not an instance of <"+this._valueClasses[s]+">.");var r=this.slots;if(r.nonEmpty)for(;r.nonEmpty;)r.head.execute(e),r=r.tail},e.prototype.registerListener=function(e,t){if(void 0===t&&(t=!1),this.registrationPossible(e,t)){var n=new zh.Slot(e,this,t);return this.slots=this.slots.prepend(n),n}return this.slots.find(e)},e.prototype.registrationPossible=function(e,t){if(!this.slots.nonEmpty)return!0;var n=this.slots.find(e);if(!n)return!0;if(n.once!==t)throw new Error("You cannot addOnce() then add() the same listener without removing the relationship first.");return!1},e}();Bh.OnceSignal=kh,Object.defineProperty(Oh,"__esModule",{value:!0});var jh=Mh,Nh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return jh.__extends(t,e),t.prototype.add=function(e){return this.registerListener(e)},t}(Bh.OnceSignal);Oh.Signal=Nh,Object.defineProperty(Ph,"__esModule",{value:!0});var Gh=Mh,Hh=Rh,Vh=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Gh.__extends(t,e),t.prototype.addWithPriority=function(e,t){return void 0===t&&(t=0),this.registerListenerWithPriority(e,!1,t)},t.prototype.addOnceWithPriority=function(e,t){return void 0===t&&(t=0),this.registerListenerWithPriority(e,!0,t)},t.prototype.registerListener=function(e,t){return void 0===t&&(t=!1),this.registerListenerWithPriority(e,t)},t.prototype.registerListenerWithPriority=function(e,t,n){if(void 0===n&&(n=0),this.registrationPossible(e,t)){var i=new Hh.Slot(e,this,t,n);return this.slots=this.slots.insertWithPriority(i),i}return this.slots.find(e)},t}(Oh.Signal);Ph.PrioritySignal=Vh,Object.defineProperty(Xc,"__esModule",{value:!0});var _h=Mh,Qh=function(e){function t(t){void 0===t&&(t=null);for(var n=[],i=1;i is not an instance of <"+this._valueClasses[s]+">.");var r=e[0];r&&(r.target&&(r=r.clone(),e[0]=r),r.target=this.target,r.currentTarget=this.target,r.signal=this);for(var o=this.slots;o.nonEmpty;)o.head.execute(e),o=o.tail;if(r&&r.bubbles)for(var a=this.target;a&&a.hasOwnProperty("parent")&&(null===(a=a.parent).onEventBubbled||(r.currentTarget=a,a.onEventBubbled(r))););},t}(Ph.PrioritySignal);Xc.DeluxeSignal=Qh;var Wh={};Object.defineProperty(Wh,"__esModule",{value:!0});var Yh=function(){function e(e){void 0===e&&(e=!1),this._bubbles=e}return Object.defineProperty(e.prototype,"signal",{get:function(){return this._signal},set:function(e){this._signal=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"target",{get:function(){return this._target},set:function(e){this._target=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"currentTarget",{get:function(){return this._currentTarget},set:function(e){this._currentTarget=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"bubbles",{get:function(){return this._bubbles},set:function(e){this._bubbles=e},enumerable:!0,configurable:!0}),e.prototype.clone=function(){return new e(this._bubbles)},e}();Wh.GenericEvent=Yh;var Kh={};Object.defineProperty(Kh,"__esModule",{value:!0}),Kh.IOnceSignal=Symbol("IOnceSignal");var Xh={};Object.defineProperty(Xh,"__esModule",{value:!0}),Xh.IPrioritySignal=Symbol("IPrioritySignal");var Zh={};Object.defineProperty(Zh,"__esModule",{value:!0}),Zh.ISignal=Symbol("ISignal");var qh={};Object.defineProperty(qh,"__esModule",{value:!0}),qh.ISlot=Symbol("ISlot");var Jh={};Object.defineProperty(Jh,"__esModule",{value:!0});var $h=Rh,eu=function(){function e(){for(var e=[],t=0;t."+this._valueClasses[t])},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"numListeners",{get:function(){return this.slot?1:0},enumerable:!0,configurable:!0}),e.prototype.add=function(e){return this.registerListener(e)},e.prototype.addOnce=function(e){return this.registerListener(e,!0)},e.prototype.remove=function(e){if(this.slot&&this.slot.listener===e){var t=this.slot;return this.slot=null,t}return null},e.prototype.removeAll=function(){this.slot&&this.slot.remove()},e.prototype.dispatch=function(){for(var e=[],t=0;t is not an instance of <"+this._valueClasses[s]+">.");this.slot&&this.slot.execute(e)},e.prototype.registerListener=function(e,t){if(void 0===t&&(t=!1),this.slot)throw new Error("You cannot add or addOnce with a listener already added, remove the current listener first.");return this.slot=new $h.Slot(e,this,t)},e}();Jh.MonoSignal=eu;var tu={};Object.defineProperty(tu,"__esModule",{value:!0});var nu=Mh,iu=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return nu.__extends(t,e),t.prototype.addOnce=function(t){var n=e.prototype.addOnce.call(this,t);return this.isDispatched&&(n.execute(this.valueObjects),n.remove()),n},t.prototype.dispatch=function(){for(var t=[],n=0;n{this.viewport.scener.removeObject(e)}))}getAll(){return[...this.objectsCache]}hideAll(){this.getAll().forEach((e=>{e.hide?e.hide():e.visible=!1})),this.viewport.signals.objectChanged.dispatch()}showAll(){this.getAll().forEach((e=>{e.show?e.show():e.visible=!0})),this.viewport.signals.objectChanged.dispatch()}}class wu extends yu{constructor(e,t){super(hi.Light,e,t.classified.Light),this.viewport=e,this.cache=t,Jt.init()}createAmbientLight(e){const{id:t,name:n="",color:i=10132122,intensity:s=10}=e,r=new ut(i,s);return r.name=n,r.userData.sid=t,r.userData.stype="Light",this.viewport.scener.addObject(r,this.scene),r}setAmbientLight(e,t){const{name:n="",color:i=10132122,intensity:s=10}=t;return!!e&&(e.name=n,e.color=new u(i),e.intensity=s,this.viewport.signals.objectChanged.dispatch(),!0)}createDirectionalLight(e){const{id:t,name:n="",color:i=10132122,intensity:s=10,position:r={x:1e3,y:1e3,z:1e3},target:o={x:-1e3,y:-1e3,z:-1e3},openShadow:a=!1,shadowAutoUpdate:l=!1,mapSize:c=4096}=e,h=new dt(i,s);if(h.name=n,h.userData.sid=t,h.userData.stype="Light",h.position.set(r.x,r.y,r.z),h.target.name=`${n}-target`,h.target.position.set(o.x,o.y,o.z),h.castShadow=a,a){const e=h.position.distanceTo(h.target.position);h.shadow.bias=-.005,h.shadow.camera.left=-e,h.shadow.camera.right=e,h.shadow.camera.top=e,h.shadow.camera.bottom=-e,h.shadow.camera.far=e,h.shadow.autoUpdate=l,h.shadow.needsUpdate=!l,h.shadow.mapSize.width=c,h.shadow.mapSize.height=c,h.shadow.camera.updateProjectionMatrix()}return this.viewport.scener.addObject(h,this.scene),this.viewport.scener.addObject(h.target,this.scene),h}setDirectionalLight(e,t){const{name:n="",color:i=10132122,intensity:s=10,position:r={x:1e3,y:1e3,z:1e3},target:o={x:-1e3,y:-1e3,z:-1e3},openShadow:a=!1,shadowAutoUpdate:l=!1,mapSize:c=4096}=t;if(!e)return!1;if(e.name=n,e.color=new u(i),e.intensity=s,e.position.set(r.x,r.y,r.z),e.target.position.set(o.x,o.y,o.z),e.castShadow=a,a){const t=e.position.distanceTo(e.target.position);e.shadow.bias=-.005,e.shadow.camera.left=-t,e.shadow.camera.right=t,e.shadow.camera.top=t,e.shadow.camera.bottom=-t,e.shadow.camera.far=t,e.shadow.autoUpdate=l,e.shadow.needsUpdate=!l,e.shadow.mapSize.width=c,e.shadow.mapSize.height=c,e.shadow.camera.updateProjectionMatrix()}return this.viewport.signals.objectChanged.dispatch(),!0}createHemisphereLight(e){const{id:t,name:n="",skyColor:i=16777215,groundColor:s=14540253,intensity:r=10,position:o={x:0,y:0,z:0}}=e,a=new pt(i,s,r);return a.name=n,a.position.set(o.x,o.y,o.z),a.userData.sid=t,a.userData.stype="Light",this.viewport.scener.addObject(a,this.scene),a}setHemisphereLight(e,t){const{name:n="",skyColor:i=16777215,groundColor:s=14540253,intensity:r=10,position:o={x:0,y:0,z:0}}=t;return!!e&&(e.name=n,e.color=new u(i),e.groundColor=new u(s),e.intensity=r,e.position.set(o.x,o.y,o.z),this.viewport.signals.objectChanged.dispatch(),!0)}createSpotLight(e){const{id:t,name:n="",color:i=16777215,intensity:s=10,angle:r=45,position:o={x:0,y:500,z:0},target:a={x:0,y:0,z:0},openShadow:l=!1,shadowAutoUpdate:c=!1,mapSize:h=4096}=e,u=vi(o).distanceTo(vi(a)),d=new ft(i,s,u,Math.PI/360*r,0,0);if(d.name=n,d.position.set(o.x,o.y,o.z),d.userData.sid=t,d.userData.stype="Light",d.castShadow=l,d.target.position.set(a.x,a.y,a.z),d.target.castShadow=l,d.target.receiveShadow=!0,d.target.updateMatrixWorld(),l){const e=d.position.distanceTo(d.target.position);d.shadow.autoUpdate=c,d.shadow.needsUpdate=!c,d.shadow.mapSize.width=h,d.shadow.mapSize.height=h,d.shadow.bias=-.005,d.shadow.focus=.6,d.shadow.camera.far=e,d.shadow.camera.updateProjectionMatrix()}return this.viewport.scener.addObject(d,this.scene),d}setSpotLight(e,t){const{name:n="",color:i=16777215,intensity:s=10,angle:r=45,position:o={x:0,y:500,z:0},target:a={x:0,y:0,z:0},openShadow:l=!1,shadowAutoUpdate:c=!1,mapSize:h=4096}=t;if(!e)return!1;const d=vi(o).distanceTo(vi(a));if(e.name=n,e.color=new u(i),e.intensity=s,e.distance=d,e.angle=Math.PI/360*r,e.position.set(o.x,o.y,o.z),e.castShadow=l,e.target.position.set(a.x,a.y,a.z),e.target.castShadow=l,e.target.updateMatrixWorld(),l){const t=e.position.distanceTo(e.target.position);e.shadow.autoUpdate=c,e.shadow.needsUpdate=!c,e.shadow.mapSize.width=h,e.shadow.mapSize.height=h,e.shadow.bias=-.005,e.shadow.focus=.6,e.shadow.camera.far=t,e.shadow.camera.updateProjectionMatrix()}return this.viewport.signals.objectChanged.dispatch(),!0}createPointLight(e){const{id:t,name:n="",color:i=16777215,intensity:s=10,distance:r=5e3,position:o={x:0,y:500,z:0},openShadow:a=!1,shadowAutoUpdate:l=!1,mapSize:c=4096}=e,h=new mt(i,s,r);return h.name=n,h.userData.sid=t,h.userData.stype="Light",h.position.set(o.x,o.y,o.z),h.castShadow=a,a&&(h.shadow.bias=-.005,h.shadow.camera.far=r,h.shadow.autoUpdate=l,h.shadow.needsUpdate=!l,h.shadow.mapSize.width=c,h.shadow.mapSize.height=c,h.shadow.camera.updateProjectionMatrix()),this.viewport.scener.addObject(h,this.scene),h}setPointLight(e,t){const{name:n="",color:i=16777215,intensity:s=10,distance:r=5e3,position:o={x:0,y:500,z:0},openShadow:a=!1,shadowAutoUpdate:l=!1,mapSize:c=4096}=t;return!!e&&(e.name=n,e.color=new u(i),e.intensity=s,e.distance=r,e.position.set(o.x,o.y,o.z),e.castShadow=a,a&&(e.shadow.bias=-.005,e.shadow.camera.far=r,e.shadow.autoUpdate=l,e.shadow.needsUpdate=!l,e.shadow.mapSize.width=c,e.shadow.mapSize.height=c,e.shadow.camera.updateProjectionMatrix()),this.viewport.signals.objectChanged.dispatch(),!0)}createRectAreaLight(e){const{id:t,name:n="",color:i=16777215,intensity:s=10,width:r=10,height:o=10,position:a={x:0,y:0,z:0}}=e,l=new gt(i,s,r,o);return l.name=n,l.userData.sid=t,l.userData.stype="Light",l.position.set(a.x,a.y,a.z),this.viewport.scener.addObject(l,this.scene),l}setRectAreaLight(e,t){const{name:n="",color:i=16777215,intensity:s=10,width:r=10,height:o=10,position:a={x:0,y:0,z:0}}=t;return!!e&&(e.name=n,e.color=new u(i),e.intensity=s,e.width=r,e.height=o,e.position.set(a.x,a.y,a.z),this.viewport.signals.objectChanged.dispatch(),!0)}updateAllShadow(){this.getAll().forEach((e=>{var t;!1===(null===(t=e.shadow)||void 0===t?void 0:t.autoUpdate)&&(e.shadow.needsUpdate=!0)})),this.viewport.signals.objectChanged.dispatch()}dispose(){this.getAll().forEach((e=>{var t;null===(t=e.shadow)||void 0===t||t.dispose()}))}}let xu,Au,bu;class Tu extends vt{constructor(e){super(e)}load(e,t,n,i){const s=this,r=""===s.path?yt.extractUrlBase(e):s.path,o=new p(this.manager);o.setPath(s.path),o.setResponseType("arraybuffer"),o.setRequestHeader(s.requestHeader),o.setWithCredentials(s.withCredentials),o.load(e,(function(n){try{t(s.parse(n,r))}catch(t){i?i(t):console.error(t),s.manager.itemError(e)}}),n,i)}parse(e,t){if(function(e){const t="Kaydara FBX Binary \0";return e.byteLength>=t.length&&t===Nu(e,0,t.length)}(e))xu=(new Mu).parse(e);else{const t=Nu(e);if(!function(e){const t=["K","a","y","d","a","r","a","\\","F","B","X","\\","B","i","n","a","r","y","\\","\\"];let n=0;function i(t){const i=e[t-1];return e=e.slice(n+t),n++,i}for(let e=0;e0,r="string"==typeof s.Content&&""!==s.Content;if(e||r){const e=this.parseImage(n[i]);t[s.RelativeFilename||s.Filename]=e}}}}for(const n in e){const i=e[n];void 0!==t[i]?e[n]=t[i]:e[n]=e[n].split("\\").pop()}return e}parseImage(e){const t=e.Content,n=e.RelativeFilename||e.Filename,i=n.slice(n.lastIndexOf(".")+1).toLowerCase();let s;switch(i){case"bmp":s="image/bmp";break;case"jpg":case"jpeg":s="image/jpeg";break;case"png":s="image/png";break;case"tif":s="image/tiff";break;case"tga":null===this.manager.getHandler(".tga")&&console.warn("FBXLoader: TGA loader not found, skipping ",n),s="image/tga";break;default:return void console.warn('FBXLoader: Image type "'+i+'" is not supported.')}if("string"==typeof t)return"data:"+s+";base64,"+t;{const e=new Uint8Array(t);return window.URL.createObjectURL(new Blob([e],{type:s}))}}parseTextures(e){const t=new Map;if("Texture"in xu.Objects){const n=xu.Objects.Texture;for(const i in n){const s=this.parseTexture(n[i],e);t.set(parseInt(i),s)}}return t}parseTexture(e,t){const n=this.loadTexture(e,t);n.ID=e.id,n.name=e.attrName;const i=e.WrapModeU,s=e.WrapModeV,r=void 0!==i?i.value:0,o=void 0!==s?s.value:0;if(n.wrapS=0===r?q:wt,n.wrapT=0===o?q:wt,"Scaling"in e){const t=e.Scaling.value;n.repeat.x=t[0],n.repeat.y=t[1]}if("Translation"in e){const t=e.Translation.value;n.offset.x=t[0],n.offset.y=t[1]}return n}loadTexture(e,t){let n;const i=this.textureLoader.path,s=Au.get(e.id).children;let r;void 0!==s&&s.length>0&&void 0!==t[s[0].ID]&&(n=t[s[0].ID],0!==n.indexOf("blob:")&&0!==n.indexOf("data:")||this.textureLoader.setPath(void 0));const o=e.FileName.slice(-3).toLowerCase();if("tga"===o){const t=this.manager.getHandler(".tga");null===t?(console.warn("FBXLoader: TGA loader not found, creating placeholder texture for",e.RelativeFilename),r=new d):(t.setPath(this.textureLoader.path),r=t.load(n))}else"psd"===o?(console.warn("FBXLoader: PSD textures are not supported, creating placeholder texture for",e.RelativeFilename),r=new d):r=this.textureLoader.load(n);return this.textureLoader.setPath(i),r}parseMaterials(e){const t=new Map;if("Material"in xu.Objects){const n=xu.Objects.Material;for(const i in n){const s=this.parseMaterial(n[i],e);null!==s&&t.set(parseInt(i),s)}}return t}parseMaterial(e,t){const n=e.id,i=e.attrName;let s=e.ShadingModel;if("object"==typeof s&&(s=s.value),!Au.has(n))return null;const r=this.parseParameters(e,t,n);let o;return s.toLowerCase(),o=new Ae,o.setValues(r),o.name=i,o}parseParameters(e,t,n){const i={};e.BumpFactor&&(i.bumpScale=e.BumpFactor.value),e.Diffuse?i.color=(new u).fromArray(e.Diffuse.value).convertSRGBToLinear():!e.DiffuseColor||"Color"!==e.DiffuseColor.type&&"ColorRGB"!==e.DiffuseColor.type||(i.color=(new u).fromArray(e.DiffuseColor.value).convertSRGBToLinear()),e.DisplacementFactor&&(i.displacementScale=e.DisplacementFactor.value),e.Emissive?i.emissive=(new u).fromArray(e.Emissive.value).convertSRGBToLinear():!e.EmissiveColor||"Color"!==e.EmissiveColor.type&&"ColorRGB"!==e.EmissiveColor.type||(i.emissive=(new u).fromArray(e.EmissiveColor.value).convertSRGBToLinear()),e.EmissiveFactor&&(i.emissiveIntensity=parseFloat(e.EmissiveFactor.value)),e.Opacity&&(i.opacity=parseFloat(e.Opacity.value)),i.opacity<1&&(i.transparent=!0),e.ReflectionFactor,e.Shininess,e.Specular||e.SpecularColor&&e.SpecularColor.type;const s=this;return Au.get(n).children.forEach((function(e){const n=e.relationship;switch(n){case"Bump":i.bumpMap=s.getTexture(t,e.ID);break;case"Maya|TEX_ao_map":i.aoMap=s.getTexture(t,e.ID);break;case"DiffuseColor":case"Maya|TEX_color_map":i.map=s.getTexture(t,e.ID),void 0!==i.map&&(i.map.colorSpace=_);break;case"DisplacementColor":i.displacementMap=s.getTexture(t,e.ID);break;case"EmissiveColor":i.emissiveMap=s.getTexture(t,e.ID),void 0!==i.emissiveMap&&(i.emissiveMap.colorSpace=_);break;case"NormalMap":case"Maya|TEX_normal_map":i.normalMap=s.getTexture(t,e.ID);break;case"ReflectionColor":i.envMap=s.getTexture(t,e.ID),void 0!==i.envMap&&(i.envMap.mapping=c,i.envMap.colorSpace=_);break;case"SpecularColor":i.specularMap=s.getTexture(t,e.ID),void 0!==i.specularMap&&(i.specularMap.colorSpace=_);break;case"TransparentColor":case"TransparencyFactor":i.alphaMap=s.getTexture(t,e.ID),i.transparent=!0;break;default:console.warn("THREE.FBXLoader: %s map is not supported in three.js, skipping texture.",n)}})),i}getTexture(e,t){return"LayeredTexture"in xu.Objects&&t in xu.Objects.LayeredTexture&&(console.warn("THREE.FBXLoader: layered textures are not supported in three.js. Discarding all but first layer."),t=Au.get(t).children[0].ID),e.get(t)}parseDeformers(){const e={},t={};if("Deformer"in xu.Objects){const n=xu.Objects.Deformer;for(const i in n){const s=n[i],r=Au.get(parseInt(i));if("Skin"===s.attrType){const t=this.parseSkeleton(r,n);t.ID=i,r.parents.length>1&&console.warn("THREE.FBXLoader: skeleton attached to more than one geometry is not supported."),t.geometryID=r.parents[0].ID,e[i]=t}else if("BlendShape"===s.attrType){const e={id:i};e.rawTargets=this.parseMorphTargets(r,n),e.id=i,r.parents.length>1&&console.warn("THREE.FBXLoader: morph target attached to more than one geometry is not supported."),t[i]=e}}}return{skeletons:e,morphTargets:t}}parseSkeleton(e,t){const n=[];return e.children.forEach((function(e){const i=t[e.ID];if("Cluster"!==i.attrType)return;const s={ID:e.ID,indices:[],weights:[],transformLink:(new m).fromArray(i.TransformLink.a)};"Indexes"in i&&(s.indices=i.Indexes.a,s.weights=i.Weights.a),n.push(s)})),{rawBones:n,bones:[]}}parseMorphTargets(e,t){const n=[];for(let i=0;i1?r=o:o.length>0?r=o[0]:(r=new Ae({name:vt.DEFAULT_MATERIAL_NAME,color:13421772}),o.push(r)),"color"in s.attributes&&o.forEach((function(e){e.vertexColors=!0})),s.FBX_Deformer?(i=new M(s,r),i.normalizeSkinWeights()):(i=new se(s,r),i.castShadow=!0,i.receiveShadow=!0),i}createCurve(e,t){const n=e.children.reduce((function(e,n){return t.has(n.ID)&&(e=t.get(n.ID)),e}),null),i=new w({name:vt.DEFAULT_MATERIAL_NAME,color:3342591,linewidth:1});return new x(n,i)}getTransformData(e,t){const n={};"InheritType"in t&&(n.inheritType=parseInt(t.InheritType.value)),n.eulerOrder="RotationOrder"in t?ku(t.RotationOrder.value):"ZYX","Lcl_Translation"in t&&(n.translation=t.Lcl_Translation.value),"PreRotation"in t&&(n.preRotation=t.PreRotation.value),"Lcl_Rotation"in t&&(n.rotation=t.Lcl_Rotation.value),"PostRotation"in t&&(n.postRotation=t.PostRotation.value),"Lcl_Scaling"in t&&(n.scale=t.Lcl_Scaling.value),"ScalingOffset"in t&&(n.scalingOffset=t.ScalingOffset.value),"ScalingPivot"in t&&(n.scalingPivot=t.ScalingPivot.value),"RotationOffset"in t&&(n.rotationOffset=t.RotationOffset.value),"RotationPivot"in t&&(n.rotationPivot=t.RotationPivot.value),e.userData.transformData=n}setLookAtProperties(e,n){if("LookAtProperty"in n){Au.get(e.ID).children.forEach((function(n){if("LookAtProperty"===n.relationship){const i=xu.Objects.Model[n.ID];if("Lcl_Translation"in i){const n=i.Lcl_Translation.value;void 0!==e.target?(e.target.position.fromArray(n),bu.add(e.target)):e.lookAt((new t).fromArray(n))}}}))}}bindSkeleton(e,t,n){const i=this.parsePoseNodes();for(const s in e){const r=e[s];Au.get(parseInt(r.ID)).parents.forEach((function(e){if(t.has(e.ID)){const t=e.ID;Au.get(t).parents.forEach((function(e){if(n.has(e.ID)){n.get(e.ID).bind(new P(r.bones),i[e.ID])}}))}}))}}parsePoseNodes(){const e={};if("Pose"in xu.Objects){const t=xu.Objects.Pose;for(const n in t)if("BindPose"===t[n].attrType&&t[n].NbPoseNodes>0){const i=t[n].PoseNode;Array.isArray(i)?i.forEach((function(t){e[t.Node]=(new m).fromArray(t.Matrix.a)})):e[i.Node]=(new m).fromArray(i.Matrix.a)}}return e}createAmbientLight(){if("GlobalSettings"in xu&&"AmbientColor"in xu.GlobalSettings){const e=xu.GlobalSettings.AmbientColor.value,t=e[0],n=e[1],i=e[2];if(0!==t||0!==n||0!==i){const e=new u(t,n,i).convertSRGBToLinear();bu.add(new ut(e,1))}}}}class Du{constructor(){this.negativeMaterialIndices=!1}parse(e){const t=new Map;if("Geometry"in xu.Objects){const n=xu.Objects.Geometry;for(const i in n){const s=Au.get(parseInt(i)),r=this.parseGeometry(s,n[i],e);t.set(parseInt(i),r)}}return!0===this.negativeMaterialIndices&&console.warn("THREE.FBXLoader: The FBX file contains invalid (negative) material indices. The asset might not render as expected."),t}parseGeometry(e,t,n){switch(t.attrType){case"Mesh":return this.parseMeshGeometry(e,t,n);case"NurbsCurve":return this.parseNurbsGeometry(t)}}parseMeshGeometry(e,t,n){const i=n.skeletons,s=[],r=e.parents.map((function(e){return xu.Objects.Model[e.ID]}));if(0===r.length)return;const o=e.children.reduce((function(e,t){return void 0!==i[t.ID]&&(e=i[t.ID]),e}),null);e.children.forEach((function(e){void 0!==n.morphTargets[e.ID]&&s.push(n.morphTargets[e.ID])}));const a=r[0],l={};"RotationOrder"in a&&(l.eulerOrder=ku(a.RotationOrder.value)),"InheritType"in a&&(l.inheritType=parseInt(a.InheritType.value)),"GeometricTranslation"in a&&(l.translation=a.GeometricTranslation.value),"GeometricRotation"in a&&(l.rotation=a.GeometricRotation.value),"GeometricScaling"in a&&(l.scale=a.GeometricScaling.value);const c=zu(l);return this.genGeometry(t,o,s,c)}genGeometry(e,t,n,i){const s=new v;e.attrName&&(s.name=e.attrName);const r=this.parseGeoNode(e,t),o=this.genBuffers(r),a=new y(o.vertex,3);if(a.applyMatrix4(i),s.setAttribute("position",a),o.colors.length>0&&s.setAttribute("color",new y(o.colors,3)),t&&(s.setAttribute("skinIndex",new C(o.weightsIndices,4)),s.setAttribute("skinWeight",new y(o.vertexWeights,4)),s.FBX_Deformer=t),o.normal.length>0){const e=(new ze).getNormalMatrix(i),t=new y(o.normal,3);t.applyNormalMatrix(e),s.setAttribute("normal",t)}if(o.uvs.forEach((function(e,t){const n=0===t?"uv":`uv${t}`;s.setAttribute(n,new y(o.uvs[t],2))})),r.material&&"AllSame"!==r.material.mappingType){let e=o.materialIndex[0],t=0;if(o.materialIndex.forEach((function(n,i){n!==e&&(s.addGroup(t,i-t,e),e=n,t=i)})),s.groups.length>0){const t=s.groups[s.groups.length-1],n=t.start+t.count;n!==o.materialIndex.length&&s.addGroup(n,o.materialIndex.length-n,e)}0===s.groups.length&&s.addGroup(0,o.materialIndex.length,o.materialIndex[0])}return this.addMorphTargets(s,e,n,i),s}parseGeoNode(e,t){const n={};if(n.vertexPositions=void 0!==e.Vertices?e.Vertices.a:[],n.vertexIndices=void 0!==e.PolygonVertexIndex?e.PolygonVertexIndex.a:[],e.LayerElementColor&&(n.color=this.parseVertexColors(e.LayerElementColor[0])),e.LayerElementMaterial&&(n.material=this.parseMaterialIndices(e.LayerElementMaterial[0])),e.LayerElementNormal&&(n.normal=this.parseNormals(e.LayerElementNormal[0])),e.LayerElementUV){n.uv=[];let t=0;for(;e.LayerElementUV[t];)e.LayerElementUV[t].UV&&n.uv.push(this.parseUVs(e.LayerElementUV[t])),t++}return n.weightTable={},null!==t&&(n.skeleton=t,t.rawBones.forEach((function(e,t){e.indices.forEach((function(i,s){void 0===n.weightTable[i]&&(n.weightTable[i]=[]),n.weightTable[i].push({id:t,weight:e.weights[s]})}))}))),n}genBuffers(e){const t={vertex:[],normal:[],colors:[],uvs:[],materialIndex:[],vertexWeights:[],weightsIndices:[]};let n=0,i=0,s=!1,r=[],o=[],a=[],l=[],c=[],h=[];const u=this;return e.vertexIndices.forEach((function(d,p){let f,m=!1;d<0&&(d^=-1,m=!0);let g=[],v=[];if(r.push(3*d,3*d+1,3*d+2),e.color){const t=Ru(p,n,d,e.color);a.push(t[0],t[1],t[2])}if(e.skeleton){if(void 0!==e.weightTable[d]&&e.weightTable[d].forEach((function(e){v.push(e.weight),g.push(e.id)})),v.length>4){s||(console.warn("THREE.FBXLoader: Vertex has more than 4 skinning weights assigned to vertex. Deleting additional weights."),s=!0);const e=[0,0,0,0],t=[0,0,0,0];v.forEach((function(n,i){let s=n,r=g[i];t.forEach((function(t,n,i){if(s>t){i[n]=s,s=t;const o=e[n];e[n]=r,r=o}}))})),g=e,v=t}for(;v.length<4;)v.push(0),g.push(0);for(let e=0;e<4;++e)c.push(v[e]),h.push(g[e])}if(e.normal){const t=Ru(p,n,d,e.normal);o.push(t[0],t[1],t[2])}e.material&&"AllSame"!==e.material.mappingType&&(f=Ru(p,n,d,e.material)[0],f<0&&(u.negativeMaterialIndices=!0,f=0)),e.uv&&e.uv.forEach((function(e,t){const i=Ru(p,n,d,e);void 0===l[t]&&(l[t]=[]),l[t].push(i[0]),l[t].push(i[1])})),i++,m&&(u.genFace(t,e,r,f,o,a,l,c,h,i),n++,i=0,r=[],o=[],a=[],l=[],c=[],h=[])})),t}getNormalNewell(e){const n=new t(0,0,0);for(let t=0;t.5?new t(0,1,0):new t(0,0,1)).cross(n).normalize(),s=n.clone().cross(i).normalize();return{normal:n,tangent:i,bitangent:s}}flattenVertex(e,t,n){return new f(e.dot(t),e.dot(n))}genFace(e,n,i,s,r,o,a,l,c,h){let u;if(h>3){const e=[];for(let s=0;s1&&console.warn("THREE.FBXLoader: Encountered an animation stack with multiple layers, this is currently not supported. Ignoring subsequent layers.");const r=e.get(s[0].ID);n[i]={name:t[i].attrName,layer:r}}return n}addClip(e){let t=[];const n=this;return e.layer.forEach((function(e){t=t.concat(n.generateTracks(e))})),new O(e.name,-1,t)}generateTracks(e){const n=[];let i=new t,s=new t;if(e.transform&&e.transform.decompose(i,new r,s),i=i.toArray(),s=s.toArray(),void 0!==e.T&&Object.keys(e.T.curves).length>0){const t=this.generateVectorTrack(e.modelName,e.T.curves,i,"position");void 0!==t&&n.push(t)}if(void 0!==e.R&&Object.keys(e.R.curves).length>0){const t=this.generateRotationTrack(e.modelName,e.R.curves,e.preRotation,e.postRotation,e.eulerOrder);void 0!==t&&n.push(t)}if(void 0!==e.S&&Object.keys(e.S.curves).length>0){const t=this.generateVectorTrack(e.modelName,e.S.curves,s,"scale");void 0!==t&&n.push(t)}if(void 0!==e.DeformPercent){const t=this.generateMorphTrack(e);void 0!==t&&n.push(t)}return n}generateVectorTrack(e,t,n,i){const s=this.getTimesForAllAxes(t),r=this.getKeyframeTrackValues(s,t,n);return new B(e+"."+i,s,r)}generateRotationTrack(e,t,i,s,o){let a,l;if(void 0!==t.x&&void 0!==t.y&&void 0!==t.z){const e=this.interpolateRotations(t.x,t.y,t.z,o);a=e[0],l=e[1]}void 0!==i&&((i=i.map(b.degToRad)).push(o),i=(new n).fromArray(i),i=(new r).setFromEuler(i)),void 0!==s&&((s=s.map(b.degToRad)).push(o),s=(new n).fromArray(s),s=(new r).setFromEuler(s).invert());const c=new r,h=new n,u=[];if(!l||!a)return new I(e+".quaternion",[],[]);for(let e=0;e2){(new r).fromArray(u,(e-3)/3*4).dot(c)<0&&c.set(-c.x,-c.y,-c.z,-c.w)}c.toArray(u,e/3*4)}return new I(e+".quaternion",a,u)}generateMorphTrack(e){const t=e.DeformPercent.curves.morph,n=t.values.map((function(e){return e/100})),i=bu.getObjectByName(e.modelName).morphTargetDictionary[e.morphName];return new j(e.modelName+".morphTargetInfluences["+i+"]",t.times,n)}getTimesForAllAxes(e){let t=[];if(void 0!==e.x&&(t=t.concat(e.x.times)),void 0!==e.y&&(t=t.concat(e.y.times)),void 0!==e.z&&(t=t.concat(e.z.times)),t=t.sort((function(e,t){return e-t})),t.length>1){let e=1,n=t[0];for(let i=1;i=180||f[1]>=180||f[2]>=180){const t=Math.max(...f)/180,i=new n(...h,s),c=new n(...d,s),u=(new r).setFromEuler(i),p=(new r).setFromEuler(c);u.dot(p)&&p.set(-p.x,-p.y,-p.z,-p.w);const m=e.times[l-1],g=e.times[l]-m,v=new r,y=new n;for(let e=0;e<1;e+=1/t)v.copy(u.clone().slerp(p.clone(),e)),o.push(m+e*g),y.setFromQuaternion(v,s),a.push(y.x),a.push(y.y),a.push(y.z)}else o.push(e.times[l]),a.push(b.degToRad(e.values[l])),a.push(b.degToRad(t.values[l])),a.push(b.degToRad(i.values[l]))}return[o,a]}}class Cu{getPrevNode(){return this.nodeStack[this.currentIndent-2]}getCurrentNode(){return this.nodeStack[this.currentIndent-1]}getCurrentProp(){return this.currentProp}pushStack(e){this.nodeStack.push(e),this.currentIndent+=1}popStack(){this.nodeStack.pop(),this.currentIndent-=1}setCurrentProp(e,t){this.currentProp=e,this.currentPropName=t}parse(e){this.currentIndent=0,this.allNodes=new Ou,this.nodeStack=[],this.currentProp=[],this.currentPropName="";const t=this,n=e.split(/[\r\n]+/);return n.forEach((function(e,i){const s=e.match(/^[\s\t]*;/),r=e.match(/^[\s\t]*$/);if(s||r)return;const o=e.match("^\\t{"+t.currentIndent+"}(\\w+):(.*){",""),a=e.match("^\\t{"+t.currentIndent+"}(\\w+):[\\s\\t\\r\\n](.*)"),l=e.match("^\\t{"+(t.currentIndent-1)+"}}");o?t.parseNodeBegin(e,o):a?t.parseNodeProperty(e,a,n[++i]):l?t.popStack():e.match(/^[^\s\t}]/)&&t.parseNodePropertyContinued(e)})),this.allNodes}parseNodeBegin(e,t){const n=t[1].trim().replace(/^"/,"").replace(/"$/,""),i=t[2].split(",").map((function(e){return e.trim().replace(/^"/,"").replace(/"$/,"")})),s={name:n},r=this.parseNodeAttr(i),o=this.getCurrentNode();0===this.currentIndent?this.allNodes.add(n,s):n in o?("PoseNode"===n?o.PoseNode.push(s):void 0!==o[n].id&&(o[n]={},o[n][o[n].id]=o[n]),""!==r.id&&(o[n][r.id]=s)):"number"==typeof r.id?(o[n]={},o[n][r.id]=s):"Properties70"!==n&&(o[n]="PoseNode"===n?[s]:s),"number"==typeof r.id&&(s.id=r.id),""!==r.name&&(s.attrName=r.name),""!==r.type&&(s.attrType=r.type),this.pushStack(s)}parseNodeAttr(e){let t=e[0];""!==e[0]&&(t=parseInt(e[0]),isNaN(t)&&(t=e[0]));let n="",i="";return e.length>1&&(n=e[1].replace(/^(\w+)::/,""),i=e[2]),{id:t,name:n,type:i}}parseNodeProperty(e,t,n){let i=t[1].replace(/^"/,"").replace(/"$/,"").trim(),s=t[2].replace(/^"/,"").replace(/"$/,"").trim();"Content"===i&&","===s&&(s=n.replace(/"/g,"").replace(/,$/,"").trim());const r=this.getCurrentNode();if("Properties70"!==r.name){if("C"===i){const e=s.split(",").slice(1),t=parseInt(e[0]),n=parseInt(e[1]);let o=s.split(",").slice(3);o=o.map((function(e){return e.trim().replace(/^"/,"")})),i="connections",s=[t,n],function(e,t){for(let n=0,i=e.length,s=t.length;n=e.size():e.getOffset()+160+16>=e.size()}parseNode(e,t){const n={},i=t>=7500?e.getUint64():e.getUint32(),s=t>=7500?e.getUint64():e.getUint32();t>=7500?e.getUint64():e.getUint32();const r=e.getUint8(),o=e.getString(r);if(0===i)return null;const a=[];for(let t=0;t0?a[0]:"",c=a.length>1?a[1]:"",h=a.length>2?a[2]:"";for(n.singleProperty=1===s&&e.getOffset()===i;i>e.getOffset();){const i=this.parseNode(e,t);null!==i&&this.parseSubNode(o,n,i)}return n.propertyList=a,"number"==typeof l&&(n.id=l),""!==c&&(n.attrName=c),""!==h&&(n.attrType=h),""!==o&&(n.name=o),n}parseSubNode(e,t,n){if(!0===n.singleProperty){const e=n.propertyList[0];Array.isArray(e)?(t[n.name]=n,n.a=e):t[n.name]=e}else if("Connections"===e&&"C"===n.name){const e=[];n.propertyList.forEach((function(t,n){0!==n&&e.push(t)})),void 0===t.connections&&(t.connections=[]),t.connections.push(e)}else if("Properties70"===n.name){Object.keys(n).forEach((function(e){t[e]=n[e]}))}else if("Properties70"===e&&"P"===n.name){let e=n.propertyList[0],i=n.propertyList[1];const s=n.propertyList[2],r=n.propertyList[3];let o;0===e.indexOf("Lcl ")&&(e=e.replace("Lcl ","Lcl_")),0===i.indexOf("Lcl ")&&(i=i.replace("Lcl ","Lcl_")),o="Color"===i||"ColorRGB"===i||"Vector"===i||"Vector3D"===i||0===i.indexOf("Lcl_")?[n.propertyList[4],n.propertyList[5],n.propertyList[6]]:n.propertyList[4],t[e]={type:i,type2:s,flag:r,value:o}}else void 0===t[n.name]?"number"==typeof n.id?(t[n.name]={},t[n.name][n.id]=n):t[n.name]=n:"PoseNode"===n.name?(Array.isArray(t[n.name])||(t[n.name]=[t[n.name]]),t[n.name].push(n)):void 0===t[n.name][n.id]&&(t[n.name][n.id]=n)}parseProperty(e){const t=e.getString(1);let n;switch(t){case"C":return e.getBoolean();case"D":return e.getFloat64();case"F":return e.getFloat32();case"I":return e.getInt32();case"L":return e.getInt64();case"R":return n=e.getUint32(),e.getArrayBuffer(n);case"S":return n=e.getUint32(),e.getString(n);case"Y":return e.getInt16();case"b":case"c":case"d":case"f":case"i":case"l":const i=e.getUint32(),s=e.getUint32(),r=e.getUint32();if(0===s)switch(t){case"b":case"c":return e.getBooleanArray(i);case"d":return e.getFloat64Array(i);case"f":return e.getFloat32Array(i);case"i":return e.getInt32Array(i);case"l":return e.getInt64Array(i)}const o=an.unzlibSync(new Uint8Array(e.getArrayBuffer(r))),a=new Pu(o.buffer);switch(t){case"b":case"c":return a.getBooleanArray(i);case"d":return a.getFloat64Array(i);case"f":return a.getFloat32Array(i);case"i":return a.getInt32Array(i);case"l":return a.getInt64Array(i)}break;default:throw new Error("THREE.FBXLoader: Unknown property type "+t)}}}class Pu{constructor(e,t){this.dv=new DataView(e),this.offset=0,this.littleEndian=void 0===t||t,this._textDecoder=new TextDecoder}getOffset(){return this.offset}size(){return this.dv.buffer.byteLength}skip(e){this.offset+=e}getBoolean(){return 1==(1&this.getUint8())}getBooleanArray(e){const t=[];for(let n=0;n=0&&(n=new Uint8Array(this.dv.buffer,t,i)),this._textDecoder.decode(n)}}class Ou{add(e,t){this[e]=t}}function Bu(e){const t=e.match(/FBXVersion: (\d+)/);if(t){return parseInt(t[1])}throw new Error("THREE.FBXLoader: Cannot find the version number for the file given.")}function Iu(e){return e/46186158e3}const Lu=[];function Ru(e,t,n,i){let s;switch(i.mappingType){case"ByPolygonVertex":s=e;break;case"ByPolygon":s=t;break;case"ByVertice":s=n;break;case"AllSame":s=i.indices[0];break;default:console.warn("THREE.FBXLoader: unknown attribute mapping type "+i.mappingType)}"IndexToDirect"===i.referenceType&&(s=i.indices[s]);const r=s*i.dataSize,o=r+i.dataSize;return function(e,t,n,i){for(let s=n,r=0;s0?t[t.length-1]:"",smooth:void 0!==n?n.smooth:this.smooth,groupStart:void 0!==n?n.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(e){const t={index:"number"==typeof e?e:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return t.clone=this.clone.bind(t),t}};return this.materials.push(i),i},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(e){const t=this.currentMaterial();if(t&&-1===t.groupEnd&&(t.groupEnd=this.geometry.vertices.length/3,t.groupCount=t.groupEnd-t.groupStart,t.inherited=!1),e&&this.materials.length>1)for(let e=this.materials.length-1;e>=0;e--)this.materials[e].groupCount<=0&&this.materials.splice(e,1);return e&&0===this.materials.length&&this.materials.push({name:"",smooth:this.smooth}),t}},n&&n.name&&"function"==typeof n.clone){const e=n.clone(0);e.inherited=!0,this.object.materials.push(e)}this.objects.push(this.object)},finalize:function(){this.object&&"function"==typeof this.object._finalize&&this.object._finalize(!0)},parseVertexIndex:function(e,t){const n=parseInt(e,10);return 3*(n>=0?n-1:n+t/3)},parseNormalIndex:function(e,t){const n=parseInt(e,10);return 3*(n>=0?n-1:n+t/3)},parseUVIndex:function(e,t){const n=parseInt(e,10);return 2*(n>=0?n-1:n+t/2)},addVertex:function(e,t,n){const i=this.vertices,s=this.object.geometry.vertices;s.push(i[e+0],i[e+1],i[e+2]),s.push(i[t+0],i[t+1],i[t+2]),s.push(i[n+0],i[n+1],i[n+2])},addVertexPoint:function(e){const t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addVertexLine:function(e){const t=this.vertices;this.object.geometry.vertices.push(t[e+0],t[e+1],t[e+2])},addNormal:function(e,t,n){const i=this.normals,s=this.object.geometry.normals;s.push(i[e+0],i[e+1],i[e+2]),s.push(i[t+0],i[t+1],i[t+2]),s.push(i[n+0],i[n+1],i[n+2])},addFaceNormal:function(e,t,n){const i=this.vertices,s=this.object.geometry.normals;Wu.fromArray(i,e),Yu.fromArray(i,t),Ku.fromArray(i,n),Zu.subVectors(Ku,Yu),Xu.subVectors(Wu,Yu),Zu.cross(Xu),Zu.normalize(),s.push(Zu.x,Zu.y,Zu.z),s.push(Zu.x,Zu.y,Zu.z),s.push(Zu.x,Zu.y,Zu.z)},addColor:function(e,t,n){const i=this.colors,s=this.object.geometry.colors;void 0!==i[e]&&s.push(i[e+0],i[e+1],i[e+2]),void 0!==i[t]&&s.push(i[t+0],i[t+1],i[t+2]),void 0!==i[n]&&s.push(i[n+0],i[n+1],i[n+2])},addUV:function(e,t,n){const i=this.uvs,s=this.object.geometry.uvs;s.push(i[e+0],i[e+1]),s.push(i[t+0],i[t+1]),s.push(i[n+0],i[n+1])},addDefaultUV:function(){const e=this.object.geometry.uvs;e.push(0,0),e.push(0,0),e.push(0,0)},addUVLine:function(e){const t=this.uvs;this.object.geometry.uvs.push(t[e+0],t[e+1])},addFace:function(e,t,n,i,s,r,o,a,l){const c=this.vertices.length;let h=this.parseVertexIndex(e,c),u=this.parseVertexIndex(t,c),d=this.parseVertexIndex(n,c);if(this.addVertex(h,u,d),this.addColor(h,u,d),void 0!==o&&""!==o){const e=this.normals.length;h=this.parseNormalIndex(o,e),u=this.parseNormalIndex(a,e),d=this.parseNormalIndex(l,e),this.addNormal(h,u,d)}else this.addFaceNormal(h,u,d);if(void 0!==i&&""!==i){const e=this.uvs.length;h=this.parseUVIndex(i,e),u=this.parseUVIndex(s,e),d=this.parseUVIndex(r,e),this.addUV(h,u,d),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(e){this.object.geometry.type="Points";const t=this.vertices.length;for(let n=0,i=e.length;n=7?(qu.setRGB(parseFloat(e[4]),parseFloat(e[5]),parseFloat(e[6])).convertSRGBToLinear(),t.colors.push(qu.r,qu.g,qu.b)):t.colors.push(void 0,void 0,void 0);break;case"vn":t.normals.push(parseFloat(e[1]),parseFloat(e[2]),parseFloat(e[3]));break;case"vt":t.uvs.push(parseFloat(e[1]),parseFloat(e[2]))}}else if("f"===r){const e=s.slice(1).trim().split(Qu),n=[];for(let t=0,i=e.length;t0){const e=i.split("/");n.push(e)}}const i=n[0];for(let e=1,s=n.length-1;e1){const e=i[1].trim().toLowerCase();t.object.smooth="0"!==e&&"off"!==e}else t.object.smooth=!0;const e=t.object.currentMaterial();e&&(e.smooth=t.object.smooth)}else{if("\0"===s)continue;console.warn('THREE.OBJLoader: Unexpected line: "'+s+'"')}}t.finalize();const s=new lt;s.materialLibraries=[].concat(t.materialLibraries);if(!0===!(1===t.objects.length&&0===t.objects[0].geometry.vertices.length))for(let e=0,n=t.objects.length;e0&&c.setAttribute("normal",new y(i.normals,3)),i.colors.length>0&&(l=!0,c.setAttribute("color",new y(i.colors,3))),!0===i.hasUVIndices&&c.setAttribute("uv",new y(i.uvs,2));const h=[];for(let e=0,n=r.length;e1){for(let e=0,t=r.length;e0){const e=new bt({size:1,sizeAttenuation:!1}),n=new v;n.setAttribute("position",new y(t.vertices,3)),t.colors.length>0&&void 0!==t.colors[0]&&(n.setAttribute("color",new y(t.colors,3)),e.vertexColors=!0);const i=new Tt(n,e);s.add(i)}return s}}const ed=new Map,td=e=>{var t;return null!==(t=null==e?void 0:e.toLowerCase().endsWith(".png"))&&void 0!==t&&t},nd=new TextDecoder,id=(e,t,n)=>{const i=e.buffer.slice(n,n+t);return nd.decode(i).replace("\\","/")},sd=/^\w+:\/\//;const rd=(e,t)=>{let n=t;const i=t.lastIndexOf("/");-1!==i&&(n=t.substring(i+1));let s=[];const r="http://guo.bin.yong",o=!sd.test(e);let a;if(o){s=function(e){let t=e.match(/(^[./]*)\/(.*)$/);return t?t.shift():t=[e],t}(e);const t=s.pop();a=new URL(t,r)}else a=new URL(e);const l=a.searchParams;let c=l.get("path"),h="";if(c){if(c.includes(".sbm")){const e=c.lastIndexOf("/");-1!==e&&(c=c.substring(0,e))}c+=`/Maps/${n}`,l.set("path",c),h=a.href}else{const e=a.href;h=new URL(`./Maps/${n}`,e).href}return o&&(h=h.substring(20)),h=h.replaceAll("#","%23"),h.length>0&&s.push(h),h=s.join("/"),h},od=(e,t)=>{if(ed.has(t)){const n=ed.get(t);e.map=n,e.needsUpdate=!0,Pl.needsUpdate=!0}const n=new d;n.colorSpace=_,n.wrapS=q,n.wrapT=q,n.flipY=!1,n.anisotropy=16,n.mipmaps=[],n.generateMipmaps=!0,(new St).load(t,(i=>{n.image=i,n.needsUpdate=!0,ed.set(t,n),e.map=n,e.needsUpdate=!0,Pl.needsUpdate=!0}))},ad=(e,t,n)=>{const[i,s,r,o,a]=t,l=n||o<1;return new Ae({name:e,color:new u(i,s,r),opacity:o,transparent:l,alphaTest:.01,side:a})},ld=new TextDecoder,cd=new TextEncoder;function hd(e){let t=8;const n=new Uint8Array(e,0,t);if("SBK-----"!==ld.decode(n))return e;t+=130;const i=new Uint8Array(e,0,t);if(1===i[40]){const n=cd.encode("SBM-----"),s=new Uint8Array([i[41]]),r=function(e){const t=new Uint8Array(64);return t.set(e.slice(0,8),0),t.set(e.slice(24,32),8),t.set(e.slice(40,56),16),t.set(e.slice(64,88),32),t.set(e.slice(96,104),56),t}(function(e){const t=new Uint8Array(128);return t.set(e.slice(42,74),0),t.set(e.slice(74,138),32),t.set(e.slice(8,40),96),t}(i));let o=66%r.length;const a=new Uint8Array(e,t+66),l=new Uint8Array(a.length);for(let e=0;e0?id(e,l,n):"";if(n+=l,!this.materials.has(t)){const e=[i,s,r,o,a],n=ad(t,e,td(c));if(this.materials.set(t,n),h[t].materialInfo=e,c){const{url:e}=this.sbmInfo,i=rd(e,c);h[t].textureUrl=i,od(n,i)}}}const u={};for(let o=0;o0)for(let i=0;i0)for(let e=0;e0)for(let t=0;t0)for(let t=0;t0&&p.push([h[r[0]],h[r[1]],h[r[2]]])}const A=[],b=[];for(let e=0;e0&&D.setAttribute("position",new g(T,3)),S.length>0&&D.setAttribute("uv",new g(S,2)),D.computeVertexNormals();const E=D.getAttribute("normal").array.buffer;if(u[o].normal=E,this.materials.has(l)){const e=new se(D,this.materials.get(l));e.name=o,e.castShadow=!0,e.receiveShadow=!0,a.add(e)}r.loaded++,r.timeStamp=performance.now()-s,null==i||i(r)}const d={materialsCache:h,meshsCache:u};return Promise.resolve({model:o,caches:d})}_parseV3(e,n,i){const s=performance.now(),r={total:0,loaded:0,timeStamp:0};if(!this.sbmInfo)return Promise.reject("In soonspacejs: sbm 模型资源解析时 'sbmInfo' 缺失!");const o=new Nl(Object.assign(Object.assign({},this.sbmInfo),{format:ui.sbm})),a=new zl({id:os()});o.add(a);const l=e.getUint16(n,this.isLE);n+=2;const c=e.getUint16(n,this.isLE);n+=2,r.total=c;const h={};for(let t=0;t0?id(e,l,n):"";if(n+=l,!this.materials.has(t)){const e=[i,s,r,o,a],n=ad(t,e,td(c));if(this.materials.set(t,n),h[t].materialInfo=e,c){const{url:e}=this.sbmInfo,i=rd(e,c);h[t].textureUrl=i,od(n,i)}}}const u={};for(let o=0;o0){const t=new Uint8Array(e.buffer,n,l);c=ud.decode(t),n+=l}const h=e.getUint16(n,this.isLE).toString();n+=2,u[o]={meshName:c,materialId:h,position:new ArrayBuffer(0),uv:new ArrayBuffer(0)};const d=[],p=[],m=[],y=[],w=e.getUint32(n,this.isLE);if(n+=4,w>0)for(let i=0;i0)for(let i=0;i0)for(let t=0;t0)for(let t=0;t0&&y.push([p[r[0]],p[r[1]],p[r[2]]])}const T=[],S=[];for(let e=0;e0&&C.setAttribute("position",new g(D,3)),E.length>0&&C.setAttribute("uv",new g(E,2)),C.computeVertexNormals();const M=C.getAttribute("normal").array.buffer;if(u[o].normal=M,this.materials.has(h)){const e=new se(C,this.materials.get(h));e.name=c||o,e.castShadow=!0,e.receiveShadow=!0,a.add(e)}r.loaded++,r.timeStamp=performance.now()-s,null==i||i(r)}const d={materialsCache:h,meshsCache:u};return Promise.resolve({model:o,caches:d})}}const pd=new TextDecoder;class fd{parseBuffer(e,t){switch(pd.decode(e.slice(0,8))){case"SBK-----":case"SBM-----":return(new dd).parseBuffer(e,t);default:return Promise.reject(`In soonspacejs: sbm 资源模型(${t.url})格式或数据错误!`)}}}class md{constructor(){this.materials=new Map}parseObject(e,t){const n=new Nl(Object.assign(Object.assign({},t),{format:ui.sbm})),i=new zl({id:os()});n.add(i);const{materialsCache:s,meshsCache:r}=e;for(const[e,t]of Object.entries(s)){if(this.materials.has(e))continue;const{textureUrl:n,materialInfo:i}=t,s=ad(e,i,td(n));this.materials.set(e,s),n&&od(s,n)}for(const[e,t]of Object.entries(r)){const{meshName:n,materialId:s,position:r,uv:o,normal:a}=t,l=this.materials.get(s.toString());if(l){const t=new v,s=new Float32Array(r),c=new Float32Array(o),h=a&&new Float32Array(a);s.length>0&&t.setAttribute("position",new g(s,3)),c.length>0&&t.setAttribute("uv",new g(c,2)),h&&h.length>0?t.setAttribute("normal",new g(h,3)):t.computeVertexNormals();const u=new se(t,l);u.name=n||e,u.castShadow=!0,u.receiveShadow=!0,i.add(u)}}return n}}class gd extends yu{constructor(e,t){super(hi.Model,e,t.classified.Model),this.viewport=e,this.cache=t,this.isDisposed=!1,this.modelsPromiseMap=new Map,this.modelsMap=new Map,this._dbReady=!1,this.store=oa.createInstance({name:"soonspace",storeName:"modelData"}),this.cacheStore=oa.createInstance({name:"soonspace",storeName:"modelCache"}),this.loadingManager=new J,this.gltfLoader=new $t(this.loadingManager),this.fbxLoader=new Tu(this.loadingManager),this.objLoader=new $u(this.loadingManager),this.stlLoader=new en(this.loadingManager),this.gltfLoader.setMeshoptDecoder(rn),this._initLoadingManager(this.loadingManager)}setDracoDecoderPath(e){const t=(new nn).setDecoderPath(e);this.gltfLoader.setDRACOLoader(t)}setKtx2DecoderPath(e){const t=(new sn).setTranscoderPath(e).detectSupport(this.viewport.renderer).setWorkerLimit(2);this.gltfLoader.setKTX2Loader(t)}async load(e,t){const{url:n}=e,i=this.modelsPromiseMap.get(n);if(i){if(await i,this.isDisposed)return this.dispose(),null;const s=this.modelsMap.get(n);return s?this.clone(s,e,t):null}const s=this._innerLoad(e,t);return this.modelsPromiseMap.set(n,s),s}async parse(e){var t;const{url:n,id:i,format:s}=e;if(!n)return mi(`id: ${i} url: ${n} is empty`),null;await this._checkDbReady();switch(null===(t=null!=s?s:as(n))||void 0===t?void 0:t.toLocaleUpperCase()){case"SBM":return this._parseSbm(e);case"SBMX":return this._parseSbmx(e);case"GLB":case"GLTF":return this._parseGltf(e);case"FBX":return this._parseFbx(e);case"OBJ":return this._parseObj(e);case"STL":return this._parseStl(e);default:return gi(`模型资源( id: ${i}, url: ${n} )格式错误,当前格式支持 sbm、sbmx、fbx、gltf、glb !`),null}}clone(e,t,n){return new Promise(((i,s)=>{var r;"Model"!==e.stype&&s("In soonspacejs: 方法 cloneModel 参入对象类型错误!");const{id:o,name:a,level:l,visible:c,position:h,rotation:u,scale:d,onClick:p,onDblClick:f,onRightClick:m,onLoad:g,userData:v}=t,y=on.clone(e);y.animations=y.animations.map((e=>e.clone())),o&&(y.sid=o),a&&(y.name=a),l&&(y.level=l),!1===c?y.hide():!0===c&&y.show(),h&&y.position.set(h.x,h.y,h.z),u&&y.rotation.set(u.x,u.y,u.z),d&&y.scale.set(d.x,d.y,d.z),y.onClick=p?p.bind(y):null,y.onDblClick=f?f.bind(y):null,y.onRightClick=m?m.bind(y):null,y.onLoad=g?g.bind(y):null,null===(r=y.onLoad)||void 0===r||r.call(y,y),v&&(y.userData=v),null!==n&&this.viewport.scener.addObject(y,n||this.scene||e.parent),i(y)}))}async loadToGroup(e,t){const n=this.createGroup(e,null);return await Promise.allSettled(t.map((e=>this.load(e,null).then((e=>e&&n.add(e))).catch(console.error)))),this.viewport.scener.addObject(n,this.scene),n}async addForGroup(e,t){return e&&await Promise.allSettled(t.map((async t=>this.load(t,null).then((t=>t&&this.viewport.scener.addObject(t,e))).catch(console.error)))),e}async clearIdb(){await this._checkDbReady(),await this.store.clear(),await this.cacheStore.clear()}dispose(){var e,t;this.isDisposed=!0,this.modelsPromiseMap.clear(),this.modelsMap.clear(),null===(e=this.gltfLoader.dracoLoader)||void 0===e||e.dispose(),null===(t=this.gltfLoader.ktx2Loader)||void 0===t||t.dispose()}async _checkDbReady(){this._dbReady||(await Promise.all([this.store.ready(),this.cacheStore.ready()]),this._dbReady=!0)}_initLoadingManager(e){e.addHandler(/\.tga$/i,new tn)}_setModelsMap(e,t){this.modelsMap.has(e)||this.modelsMap.set(e,on.clone(t))}async _parseSbm(e){const{useIndexedDB:t}=this.viewport.options,{url:n}=e,i=async t=>{const i=await(new fd).parseBuffer(t,e),{model:s,caches:r}=i;return r&&Wi((()=>{this.cacheStore.setItem(n,r)})),s},s=e=>{var t;null===(t=e.onLoad)||void 0===t||t.call(e,e)};if(t){const t=await this.cacheStore.getItem(n);if(t){const n=(new md).parseObject(t,e);return s(n),n}{const e=await this.store.getItem(n)||await this._fetchBuffer(n),t=await i(e);return s(t),t}}{const e=await this._fetchBuffer(n),t=await i(e);return s(t),t}}async _parseSbmx(e){const{url:t}=e,n=await this._getBuffer(t);if("SBMG----"===rs(n.slice(0,8))){const t=Xi(n.slice(8));return this._parseGltf(e,t)}return this._parseGltf(e,n)}async _parseGltf(e,t){const{url:n}=e,i=Ri(n),s=t||await this._getBuffer(n),r=new Nl(Object.assign(Object.assign({},e),{format:ui.gltf}));try{const e=await this.gltfLoader.parseAsync(s,i),{animations:t}=e;t&&t.length>0&&(r.animations=t),e.scene.traverse((e=>{"AmbientLight"!==e.type&&"DirectionalLight"!==e.type||(e.visible=!1),e instanceof Dt&&(e.frustumCulled=!0),e.castShadow=!0,e.receiveShadow=!0})),r.add(e.scene)}catch(e){if(e.message.includes("No DRACOLoader"))throw new Error(`${di}请使用 setModelDracoDecoderPath 设置 draco 解压库路径`);if(e.message.includes("setKTX2Loader"))throw new Error(`${di}请使用 setModelKtx2DecoderPath 设置 ktx2 解压库路径`);throw e}return r}async _parseFbx(e){const{url:t}=e,n=Ri(t),i=await this._getBuffer(t);if("ssp"===rs(Xi(i.slice(0,3)))){const t=Xi(i.slice(3));return this._parseGltf(e,t)}const s=new Nl(Object.assign(Object.assign({},e),{format:ui.fbx})),r=this.fbxLoader.parse(i,n),{animations:o}=r;return o&&o.length>0&&(s.animations=o),s.add(r),s}async _parseObj(e){const{url:t}=e,n=await this._getBuffer(t),i=await new Blob([n]).text(),s=new Nl(Object.assign(Object.assign({},e),{format:ui.obj})),r=this.objLoader.parse(i);return s.add(r),s}async _parseStl(e){const{url:t}=e,n=await this._getBuffer(t),i=new Nl(Object.assign(Object.assign({},e),{format:ui.stl})),s=this.stlLoader.parse(n),r=new zl({id:os()}),o=new se(s,new Ae);return r.add(o),i.add(r),i}async _innerLoad(e,t){var n;const{url:i}=e,s=await this.parse(e);return s?(null===(n=s.onLoad)||void 0===n||n.call(s,s),this._setModelsMap(i,s),null!==t&&this.viewport.scener.addObject(s,t),s):null}async _fetchBuffer(e){const{useIndexedDB:t}=this.viewport.options,n=await Ni(e,"arraybuffer");return t&&this.store.setItem(e,n),n}async _getBuffer(e){const{useIndexedDB:t}=this.viewport.options;if(t){const t=await this.store.getItem(e);return t||this._fetchBuffer(e)}return this._fetchBuffer(e)}}const vd=new rt(1,1);class yd extends yu{constructor(e,t){super(hi.Poi,e,t.classified.Poi),this.viewport=e,this.cache=t,this.textures=new Map}_createIcon(e){const t=this._createIconMaterial(e),n={scale:e.iconScale};let i;return wd(e.type)?(i=new se,i.renderOrder=1,i.geometry=vd,i.material=t,e.iconScale&&i.scale.set(e.iconScale.x,e.iconScale.y,e.iconScale.z)):(i=new Vl(t,n),this._computeMaterialSizeAttenuation(t,e.type)),i.name="icon",i}_createIconMaterial({url:e,type:t}){if(!e)return;let n=this.textures.get(e);if(n||(n=(new h).load(e,(t=>{this.textures.set(e,t),Pl.needsUpdate=!0})),n.colorSpace=_,n.flipY=!0),wd(t)){return new We({map:n,transparent:!0,depthWrite:!1,side:oe})}return new Ke({map:n,depthWrite:!1})}_createText(e){const t=this._createTextMaterial(e),n={position:e.namePosition,scale:e.nameScale};let i;return wd(e.type)?(i=new se,i.renderOrder=1,i.geometry=vd,i.material=t,e.namePosition&&i.position.set(e.namePosition.x,e.namePosition.y,e.namePosition.z),e.nameScale&&i.scale.set(e.nameScale.x,e.nameScale.y,e.nameScale.z)):(i=new Vl(t,n),this._computeMaterialSizeAttenuation(t,e.type)),i.name="text",i}_createTextMaterial(e){const t=this._createTextTexture(e);if(wd(e.type)){return new We({map:t,transparent:!0,depthWrite:!1,side:oe})}return new Ke({map:t,depthWrite:!1})}_createTextTexture(e){const t=this._createTextCanvas(e.name||"",e.nameCanvasInfo),n=new Ye(t);return n.colorSpace=_,n}_createTextCanvas(e,t={}){const{canvasWidth:n=256,canvasHeight:i=256,font:s="32px Microsoft YaHei",fillStyle:r="#fff",strokeStyle:o="#000",textAlign:a="center",textBaseline:l="middle",backgroundStyle:c,borderStyle:h,borderWidth:u=3}=t,d=document.createElement("canvas");d.width=n,d.height=i;const p=d.getContext("2d"),f=.5*n,m=.5*i;return p&&(c&&(p.fillStyle=c,p.fillRect(0,0,n,i)),h&&(p.strokeStyle=h,p.lineWidth=u,p.strokeRect(0,0,n,i),p.lineWidth=1),p.font=s,p.fillStyle=r,p.strokeStyle=o,p.textAlign=a,p.textBaseline=l,p.strokeText(e,f,m,n),p.fillText(e,f,m,n)),d}_computeMaterialSizeAttenuation(e,t){return"2D"===t||"2d"===t?e.sizeAttenuation=!1:"2.5D"!==t&&"2.5d"!==t||(e.sizeAttenuation=!0),e}_create(e){e=Object.assign({type:"2.5d",namePosition:{x:0,y:10,z:0},nameScale:{x:16,y:16,z:1},iconScale:{x:16,y:16,z:1}},e);const t=new Gl(e),n=this._createText(e);if(t.text=n,t.add(n),e.url){const n=this._createIcon(e);t.icon=n,t.add(n)}return t}create(e){const t=this._create(e);return this.viewport.scener.addObject(t,this.scene),t}clone(e,t,n){var i,s,r;"Poi"!==e.stype&&console.error("In soonspacejs: 方法 clonePoi 参入对象类型错误!");const{id:o,name:a,level:l,namePosition:c,nameScale:h,iconScale:u,scaleFixed:d,visible:p,position:f,rotation:m,scale:g,onClick:v,onDblClick:y,onRightClick:w,userData:x}=t,A=e.clone();if(a!==A.name&&A.text){const e=A.text.material.clone();e.map=this._createTextTexture(t),A.text.material=e}return c&&(null===(i=A.text)||void 0===i||i.position.set(c.x,c.y,c.z)),h&&(null===(s=A.text)||void 0===s||s.scale.set(h.x,h.y,h.z)),u&&(null===(r=A.icon)||void 0===r||r.scale.set(u.x,u.y,u.z)),o&&(A.sid=o),a&&(A.name=a),l&&(A.level=l),d&&(A.scaleFixed=d),$i(p)&&(A.visible=p),f&&A.position.set(f.x,f.y,f.z),m&&A.rotation.set(m.x,m.y,m.z),g&&A.scale.set(g.x,g.y,g.z),A.onClick=v?v.bind(A):null,A.onDblClick=y?y.bind(A):null,A.onRightClick=w?w.bind(A):null,x&&(A.userData=x),null!==n&&this.viewport.scener.addObject(A,n||this.scene||e.parent),A}createToGroup(e,t){const n=this.createGroup(e,null);return t.forEach((e=>{const t=this._create(e);n.add(t)})),this.viewport.scener.addObject(n,this.scene),n}addForGroup(e,t){return e&&t.forEach((t=>{const n=this._create(t);this.viewport.scener.addObject(n,e)})),e}}function wd(e){return"3D"===e||"3d"===e}class xd extends yu{constructor(e,t){super(hi.PoiNode,e,t.classified.PoiNode),this.viewport=e,this.cache=t}create(e){this._openEnableRenderCss(e);const t=new jl(e);return this.viewport.scener.addObject(t,this.scene),t}createToGroup(e,t){const n=this.createGroup(e,null);return t.forEach((e=>{this._openEnableRenderCss(e);const t=new jl(e);n.add(t)})),this.viewport.scener.addObject(n,this.scene),n}addForGroup(e,t){return e&&t.forEach((t=>{this._openEnableRenderCss(t);const n=new jl(t);this.viewport.scener.addObject(n,e)})),e}_openEnableRenderCss(e){switch(e.type){case"2d":case"2D":this.viewport.rendererManager.setInternalState("enableRenderCss2D",!0);break;case"2.5d":case"2.5D":case"3d":case"3D":this.viewport.rendererManager.setInternalState("enableRenderCss3D",!0)}}}class Ad extends yu{constructor(e,t){super(hi.Canvas3D,e,t.classified.Canvas3D),this.viewport=e,this.cache=t}create(e,t){const n=new $l(e);return null!==t&&this.viewport.scener.addObject(n,t),n}createToGroup(e,t){const n=this.createGroup(e,null);return t.forEach((e=>{const t=new $l(e);n.add(t)})),this.viewport.scener.addObject(n,this.scene),n}addForGroup(e,t){return e&&t.forEach((t=>{const n=new $l(t);this.viewport.scener.addObject(n,e)})),e}}let bd=class Dijkstras{constructor(){this.graph=new Map,this.queue=null,this.previous=new Map}setGraph(e){if(!(e.length<1))for(const t of e){const[e,n]=t;this.graph.set(e,new Map);for(const t of n){const[n,i]=t,s=this.graph.get(e);null==s||s.set(n,i)}}}getPath(e,t){var n;if(e===t)return[];const i=this.queue=new Bi;i.add(e,0),this.previous.set(e,null);let s=null;for(;s=i.shift();){if(s===t){const e=[];for(;null!==s&&null!==this.previous.get(s);)e.unshift(s),s=null!==(n=this.previous.get(s))&&void 0!==n?n:null;return e}const e=i.getDistance(s);if(e===1/0)return[];const r=this.graph.get(s);r&&r.forEach(((t,n)=>{const r=i.getDistance(n),o=e+t;o{if(!this.workerSourceURL){const e=Td.toString(),t=["/* deps */",Bi.toString(),bd.toString(),"/* worker */",e.substring(e.indexOf("{")+1,e.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([t]))}return new Worker(this.workerSourceURL)}))}async getPath(e,t){await this.workerPool.postMessage({type:"setGraph",graph:this.dijkstra.graph});const{data:{pathIds:n}}=await this.workerPool.postMessage({type:"getPath",st:[e,t]});return n}dispose(){this.workerPool.dispose(),this.workerSourceURL&&URL.revokeObjectURL(this.workerSourceURL)}}class Dd extends yu{constructor(e,t){super(hi.Topology,e,t.classified.Topology),this.viewport=e,this.cache=t,this.dijkstra=new bd,this.dijkstraWorker=new Sd(this.dijkstra)}async createFromGml(e){const{url:t,linkWidth:n=20,linkColor:i=65280,renderNode:s=!0,nodeColor:r=255}=e;return Ki(t).then((t=>{if(!t||!t.MultiLayeredGraph)return Promise.reject('In soonspace: createTopologyFromGml "url" path error!');const o=[],a=new Map;let l=[],c=[];const h=t.MultiLayeredGraph.SpaceLayerMember.SpaceLayer.X_floor;ts(h)?h.forEach((e=>{l=[...l,...e.state],c=[...c,...e.transition]})):(l=[...l,...h.state],c=[...c,...h.transition]),l.forEach(((e,t)=>{const n=e.State._attributes["gml:id"],i=e.State.topoNode["gml:Node"].node_name;o.push({id:Ji(n)?n:"",name:Ji(i)?i:"",position:{x:Number(e.State.topoNode["gml:Node"].xcoord["#text"]),y:Number(e.State.topoNode["gml:Node"].zcoord["#text"]),z:-1*Number(e.State.topoNode["gml:Node"].ycoord["#text"])},graphs:[]}),a.set(n,t)})),c.forEach((e=>{const t=e.Transition.topoEdge["gml:Edge"]["gml:directedNode"][0]._attributes["xlink:href"],n=e.Transition.topoEdge["gml:Edge"]["gml:directedNode"][1]._attributes["xlink:href"],i=e.Transition.topoEdge["gml:Edge"].passable["#text"],s=a.get(t),r=a.get(n),l=e.Transition._attributes["gml:id"],c=e.Transition.topoEdge["gml:Edge"].link_name["#text"];void 0!==s&&void 0!==r&&("2"!==i&&"3"!==i&&o[s].graphs.push({targetNodeId:n,linkInfo:{id:l,name:c},passable:+i}),"1"!==i&&"3"!==i&&o[r].graphs.push({targetNodeId:t,linkInfo:{id:l,name:c},passable:+i}))}));const u=new Xl(Object.assign(Object.assign({},e),{type:"network",nodes:o,linkWidth:n,renderLink:!0,linkColor:i,renderNode:s,nodeColor:r}));return this.setDijkstraGraph(u.nodes),this.viewport.scener.addObject(u,this.scene),Promise.resolve(u)}))}create(e){const t=this.generateLineTopologyInfoNodeGraphs(e),n=new Xl(t);return this.setDijkstraGraph(n.nodes),this.viewport.scener.addObject(n,this.scene),n}setPassable(e,t){if("line"===e.topologyType)return void gi("只支持 network 类型");const n=Fi(e.info.nodes),i=n.reduce(((e,t)=>(e.set(t.id,t),e)),new Map),s=e.nodes.reduce(((e,t)=>(e.set(t.sid,t),e)),new Map);t.forEach((({sourceNodeId:e,targetNodeId:t,passable:n})=>{const s=i.get(e),r=i.get(t);if(!s||!r)return void mi(`sourceNodeId:${e} 或 targetNodeId:${t} 未找到对应节点`);const o=s.graphs.findIndex((e=>e.targetNodeId===r.id)),a=r.graphs.findIndex((e=>e.targetNodeId===s.id));switch(n){case 0:-1===o?s.graphs.push({targetNodeId:r.id,linkInfo:{id:os()},passable:n}):s.graphs[o].passable=n,-1===a?r.graphs.push({targetNodeId:s.id,linkInfo:{id:os()},passable:n}):r.graphs[a].passable=n;break;case 1:-1===o?s.graphs.push({targetNodeId:r.id,linkInfo:{id:os()},passable:n}):s.graphs[o].passable=n,-1!==a&&r.graphs.splice(a,1);break;case 2:-1!==o&&s.graphs.splice(o,1),-1===a?r.graphs.push({targetNodeId:s.id,linkInfo:{id:os()},passable:n}):r.graphs[a].passable=n;break;case 3:-1!==o&&s.graphs.splice(o,1),-1!==a&&r.graphs.splice(a,1)}})),e.info.nodes=n,n.forEach((e=>{const t=s.get(e.id);t&&(t.graphs=e.graphs)})),e.updateLinks(),this.setDijkstraGraph(e.nodes),this.viewport.signals.objectChanged.dispatch()}resetNodes(e,t){const n=this.generateLineTopologyInfoNodeGraphs(Object.assign(Object.assign({},e.info),{nodes:t}));return e.resetNodes(n.nodes),this.setDijkstraGraph(e.nodes),this.viewport.signals.objectChanged.dispatch(),e}createToGroup(e,t){const n=this.createGroup(e,null);return t.forEach((e=>{const t=this.generateLineTopologyInfoNodeGraphs(e),i=new Xl(t);this.setDijkstraGraph(i.nodes),n.add(i)})),this.viewport.scener.addObject(n,this.scene),n}addForGroup(e,t){return e&&t.forEach((t=>{const n=this.generateLineTopologyInfoNodeGraphs(t),i=new Xl(n);this.setDijkstraGraph(i.nodes),e.add(i)})),e}_getPath(e,n){const i=vi(n.start),s=vi(n.end);let r=null,o=1/0,a=null,l=1/0;const c=e.nodes.reduce(((e,t)=>(e.set(t.sid,t),e)),new Map);for(const[,e]of c){if(0===e.graphs.length)continue;const n=e.getWorldPosition(new t),c=n.distanceTo(i),h=n.distanceTo(s);c(e.set(t.sid,t),e)),new Map);for(const[,e]of c){if(0===e.graphs.length)continue;const n=e.getWorldPosition(new t),c=n.distanceTo(i),h=n.distanceTo(s);c{const t=e.position.clone();return t.y+=.01,{id:`${e.sid}_${os()}`,name:e.name,position:t,graphs:e.graphs}}))}getShortestPath(e,t){const n=this._getPath(e,{start:t.start,end:t.end});if(null===n||n.length<=1)return null;const i=this._generateNodesInfo(n),s=Object.assign(Object.assign(Object.assign(Object.assign({},e.info),e.getSpaceAttribute(!0)),t),{type:"line",nodes:i});this.generateLineTopologyInfoNodeGraphs(s);const r=new Xl(s);return this.viewport.scener.addObject(r,this.scene),r}async getShortestPathAsync(e,t){const n=await this._getPathAsync(e,{start:t.start,end:t.end});if(null===n||n.length<=1)return null;const i=this._generateNodesInfo(n),s=Object.assign(Object.assign(Object.assign(Object.assign({},e.info),e.getSpaceAttribute(!0)),t),{type:"line",nodes:i});this.generateLineTopologyInfoNodeGraphs(s);const r=new Xl(s);return this.viewport.scener.addObject(r,this.scene),r}_getShortestPathByMultiplePoints(e,n,i,s,r){const o=[];i.forEach((n=>{const i={start:"start"===r?n:s,end:"end"===r?n:s},a=this._getPath(e,i);if(null===a||a.length<=1)return;let l=0;a.forEach(((e,n)=>{const i=a[n+1];i&&(l+=e.getWorldPosition(new t).distanceTo(i.getWorldPosition(new t)))})),l>0&&o.push({nodes:a,pathLength:l})}));let a=[],l=1/0;if(o.forEach((({nodes:e,pathLength:t})=>{t0){const t=this._generateNodesInfo(a),i=Object.assign(Object.assign(Object.assign(Object.assign({},e.info),e.getSpaceAttribute(!0)),n),{type:"line",nodes:t});this.generateLineTopologyInfoNodeGraphs(i);const s=new Xl(i);return this.viewport.scener.addObject(s,this.scene),s}return null}async _getShortestPathByMultiplePointsAsync(e,n,i,s,r){const o=[];await Promise.all(i.map((async n=>{const i={start:"start"===r?n:s,end:"end"===r?n:s},a=await this._getPathAsync(e,i);if(null===a||a.length<=1)return;let l=0;a.forEach(((e,n)=>{const i=a[n+1];i&&(l+=e.getWorldPosition(new t).distanceTo(i.getWorldPosition(new t)))})),l>0&&o.push({nodes:a,pathLength:l})})));let a=[],l=1/0;if(o.forEach((({nodes:e,pathLength:t})=>{t0){const t=this._generateNodesInfo(a),i=Object.assign(Object.assign(Object.assign(Object.assign({},e.info),e.getSpaceAttribute(!0)),n),{type:"line",nodes:t});this.generateLineTopologyInfoNodeGraphs(i);const s=new Xl(i);return this.viewport.scener.addObject(s,this.scene),s}return null}getShortestPathByMultipleStartPoints(e,t){return this._getShortestPathByMultiplePoints(e,t,t.start,t.end,"start")}getShortestPathByMultipleEndPoints(e,t){return this._getShortestPathByMultiplePoints(e,t,t.end,t.start,"end")}getShortestPathByMultipleStartPointsAsync(e,t){return this._getShortestPathByMultiplePointsAsync(e,t,t.start,t.end,"start")}getShortestPathByMultipleEndPointsAsync(e,t){return this._getShortestPathByMultiplePointsAsync(e,t,t.end,t.start,"end")}setDijkstraGraph(e){const n=[];for(let i=0;i(e.set(t.sid,t),e)),new Map);for(let e=0;ethis.updateGeometry(t,e)))}updateGeometry(e,i={}){const{meshOfModelList:s}=this.viewport.scener.intersectsList,{snapping:o=!0,snappingDistance:a=1,snappingTargets:l=s,offsetUnits:c=.01}=i,{decalMesh:h}=e;if(h.geometry.dispose(),this.viewport.render(),o){h.updateWorldMatrix(!0,!1);const s=new t,o=new t,u=h.matrixWorld.elements,d={position:new t,quaternion:new r,scale:new t};h.matrixWorld.decompose(d.position,d.quaternion,d.scale),d.scale.multiply(e.textureAspect),h.getWorldPosition(s),o.set(-u[8],-u[9],-u[10]).normalize(),Pd.set(s,o),Pd.near=0,Pd.far=a;const[p]=Pd.intersectObjects(l).filter((({object:e})=>!(e instanceof zc)));if(p){const{object:t}=p,r=(new n).setFromRotationMatrix(h.matrixWorld,"XYZ"),a=new Fc(Object.assign(Object.assign({offsetUnits:c},i),{object:t,origin:s,direction:o,angle:r.z,size:(new f).copy(d.scale)})),l=h.matrixWorld.clone().invert();return a.meshMatrix&&l.multiply(a.meshMatrix),a.applyMatrix4(l),h.geometry=a,e}}const{x:u,y:d}=e.textureAspect;return h.geometry=new rt(u,d),e}}class Bd{constructor(e){this.viewport=e,this.scene=this.viewport.scene,this.cache={objects:new Map,classified:{Group:new Set,Light:new Set,Model:new Set,Poi:new Set,PoiNode:new Set,Canvas3D:new Set,Topology:new Set,Helper:new Set,Decal:new Set,PluginObject:new Set}},this.store={groupManager:new Md(this.viewport,this.cache),lightManager:new wu(this.viewport,this.cache),modelManager:new gd(this.viewport,this.cache),poiManager:new yd(this.viewport,this.cache),poiNodeManager:new xd(this.viewport,this.cache),canvas3DManager:new Ad(this.viewport,this.cache),topologyManager:new Dd(this.viewport,this.cache),helperManager:new Ed(this.viewport,this.cache),decalManager:new Od(this.viewport,this.cache),pluginObjectManager:new Cd(this.viewport,this.cache)},e.signals.beforeRender.add(this.update.bind(this)),e.signals.objectAdded.add(this.setObjectCache.bind(this)),e.signals.objectRemoved.add(this.deleteObjectCache.bind(this))}levelUpdate(){const e=(e,t)=>{e.visible!==t&&(e.visible=t,this.viewport.signals.objectChanged.dispatch())},n=n=>{const{level:i,handleHide:s}=n,{max:r=null,min:o=null}=i;if(!s&&(es(r)||es(o))){const i=new t;i.setFromMatrixPosition(n.matrixWorld);const s=this.viewport.camera.position.distanceTo(i);es(r)&&s>r||es(o)&&s{(e instanceof Fl||e instanceof Ul)&&n(e)}))}scaleFixedUpdate(){this.cache.objects.forEach((e=>{if(e instanceof Gl||e instanceof jl){const{scaleFixed:n}=e;if(n){const i=new t;if(i.setFromMatrixPosition(e.matrixWorld),i.distanceTo(this.viewport.camera.position)>n.distance){const t=Pi(i,n.fixedScale,this.viewport.camera,this.viewport.renderer.getSize(new f));e.scale.setScalar(t)}else e.scale.setScalar(n.originScale)}}}))}update(){this.viewport.options.levelEnabled&&this.levelUpdate(),this.viewport.options.scaleFixedEnabled&&this.scaleFixedUpdate()}isObjectInScene(e){let t=!1;return e.traverseAncestors((e=>{e===this.scene&&(t=!0)})),t}getObjectById(e){const t=this.getObjectCache(e);if(t){if(this.isObjectInScene(t))return t}return null}getObjectByName(e){return this._getObjectByProps("name",e)}getObjectByUserDataProperty(e,t){const n=[];return this.cache.objects.forEach((i=>{this.isObjectInScene(i)&&ns(i)&&(i instanceof Fl||i instanceof Ul||i.userData.stype)&&(is(e)&&e(i.userData)||Ji(e)&&i.userData[e]===t)&&n.push(i)})),n}removeObjectById(e){const t=this.getObjectById(e);return!!t&&(this.viewport.scener.removeObject(t),!0)}_getObjectByProps(e,t){const n=[];return this.cache.objects.forEach((i=>{this.isObjectInScene(i)&&((i instanceof Fl||i instanceof Ul)&&ns(i)&&i[e]===t||ns(i)&&i.userData.stype&&("name"===e&&i.name===t||"sid"===e&&i.userData.sid===t))&&n.push(i)})),n}getObjectCache(e){return this.cache.objects.get(e)}setObjectCache(e){const t=(e,t)=>{const n=this.cache.objects.get(t);n&&n!==e&&mi(`object id ${t} already exists in scene`)};null==e||e.traverse((n=>{if(n instanceof Fl||n instanceof Ul){if("string"==typeof n.sid&&n.sid.startsWith(ci))return;t(n,n.sid),this.cache.objects.set(n.sid,n);const e=n.stype;this.cache.classified[e]&&this.cache.classified[e].add(n)}else if(n.userData.sid&&e.userData.stype){t(n,n.userData.sid),this.cache.objects.set(n.userData.sid,n);const e=n.userData.stype;this.cache.classified[e]&&this.cache.classified[e].add(n)}}))}deleteObjectCache(e){null==e||e.traverse((t=>{if(t instanceof Fl||t instanceof Ul){this.cache.objects.delete(t.sid);const e=t.stype;this.cache.classified[e]&&this.cache.classified[e].delete(t)}else if(t.userData.sid&&e.userData.stype){this.cache.objects.delete(t.userData.sid);const e=t.userData.stype;this.cache.classified[e]&&this.cache.classified[e].delete(t)}}))}clearObject(){this.store.modelManager.clear(),this.store.poiManager.clear(),this.store.poiNodeManager.clear(),this.store.canvas3DManager.clear(),this.store.topologyManager.clear(),this.store.helperManager.clear(),this.store.decalManager.clear(),this.store.pluginObjectManager.clear()}clear(){this.clearObject(),this.store.lightManager.clear()}dispose(){this.store.modelManager.dispose(),this.store.topologyManager.dispose(),this.store.lightManager.dispose(),this.cache.objects.clear(),Object.values(this.cache.classified).forEach((e=>e.clear())),this.clear()}}function Id(e){const t=Ld(e),n=new m;n.setFromMatrix3(t);const i=e[0],s=n.clone();s.setPosition(i);const r=s.clone().invert(),o=e.map((e=>{const t=e.clone().applyMatrix4(r);return new f(t.x,t.y)})),a=new at(o),l=new Lt(a),c=new ct;c.setFromPoints(o);const h=Rd(c);return l.getAttribute("uv").applyMatrix3(h),l.applyMatrix4(n),{geometry:l,polygonBox:c,modelMatrix:n,planeMatrix:s,projectionMatrix:r,position:i}}function Ld(e){const[n,i,s]=e,r=new Rt;r.setFromCoplanarPoints(i,n,s);const o=r.normal,a=o.clone().cross(new t(0,0,1));a.equals(new t)&&a.set(1,0,0);const l=o.clone().cross(a);a.normalize(),l.normalize(),o.normalize();const c=new ze;return c.elements=[a.x,a.y,a.z,l.x,l.y,l.z,o.x,o.y,o.z],c}function Rd(e){const t=e.min,n=e.getSize(new f),i=new ze;return i.elements=[n.x,0,0,0,n.y,0,t.x,t.y,1],i.invert()}function Fd(e,t){const n=wi(t);return e.intersectsBox(n)}function Ud(e,t,n){if("string"==typeof e){let i=t?null==n?void 0:n.get(e):null;if(!i){i=(new h).load(e,(()=>{Pl.needsUpdate=!0})),null==n||n.set(e,i)}return i}return e instanceof HTMLImageElement?new d(e):e instanceof HTMLCanvasElement?new Ye(e):new Ne(e)}function zd(e,t,n,i){const s=e.map,r=Ud(t,n,i);if(s){const e=r.source;r.copy(s),r.source=e}return e.map=r,r}function kd(e,n){const{top:s,left:r,bottom:o,right:a,front:l,back:c}=e,h=new t(a,s,l),u=new t(r,o,c),d=new i;return function(e){return d.max.addVectors(e,h),d.min.subVectors(e,u),n.filter((e=>Fd(d,e)))}}function jd(e,n){const i=new Ee(new t,e);return function(e){return i.center.copy(e),n.filter((e=>Fd(i,e)))}}function Nd(e,n){const i=e.length-1,s=[];for(let t=0;t{const n=wi(e),i=new t;n.getCenter(i);const o=s.filter((e=>{const t=e.closestPointToPointParameter(i);return 0<=t||t>=1}));if(0===o.length)return!1;let a=1/0,l=i;for(const e of o){const n=e.closestPointToPoint(i,!0,new t),s=i.distanceToSquared(n);snew t(e.x,e.y,e.z))),m=s?Object.assign(Object.assign({transparent:!0},p),{map:Ud(s,null==d||d,n)}):p,g=o?new Ft(m):new We(m),{geometry:v,position:y}=Id(f),w=new Ul({id:a,name:l,userData:c,level:h,visible:u},v,g);return w.position.copy(y),w}v.prototype.computeBoundsTree=Xt,v.prototype.disposeBoundsTree=Zt,se.prototype.raycast=qt,Ve.prototype.firstHitOnly=!0,e.ColorManagement.enabled=!0;class Vd{constructor(t){var n;this.THREE=e,this.TWEEN=Ut,this.utils=us,this.animation=ps,this.library=kc,this.version=un,this.domElement=null,this.plugins={},this.textureCache=new Map;const{el:i,options:s={},events:r={}}=t;if(this.options=Object.assign(Object.assign({},{showInfo:!1,showStats:!1,showViewHelper:!1,showGrid:!1,background:{color:11459572,alpha:!1},fog:!1,hoverEnabled:!1,levelEnabled:!1,scaleFixedEnabled:!1,fileCacheEnabled:!0,closeInfoLog:!1,closeWarnLog:!1,useIndexedDB:!0}),s),this.signals={windowResize:new mu,cameraObjectChange:new mu,sceneChanged:new mu,backgroundChanged:new mu,beforeRender:new mu,sceneRendered:new mu,tweenUpdate:new mu,hover:new mu,click:new mu,dblClick:new mu,rightClick:new mu,mouseDown:new mu,mouseMove:new mu,mouseUp:new mu,mouseWheel:new mu,keyDown:new mu,keyUp:new mu,modelHover:new mu,modelUnHover:new mu,modelClick:new mu,modelDblClick:new mu,modelRightClick:new mu,poiHover:new mu,poiUnHover:new mu,poiClick:new mu,poiDblClick:new mu,poiRightClick:new mu,selectPosition:new mu,sceneClick:new mu,objectAdded:new mu,objectRemoved:new mu,objectChanged:new mu,geometryChanged:new mu,materialAdded:new mu,materialChanged:new mu,materialRemoved:new mu,cameraChange:new mu,outlineChange:new mu,modelAnimation:new mu,getSceneInfo:new mu},this.viewport=new Ll(this.options,this.signals),this.controls=this.viewport.controls,this.manager=new Bd(this.viewport),i&&(this.domElement=i instanceof HTMLElement?i:document.querySelector(i),null===(n=this.domElement)||void 0===n||n.appendChild(this.viewport.container)),!this.domElement)throw new Error("In SoonSpace: Can't find container!");this._init(),this._initEvents(r),this._initDefaultSettings()}_init(){const{showGrid:e,background:t,fog:n,controls:i,fileCacheEnabled:s,closeInfoLog:r,closeWarnLog:o,useIndexedDB:a}=this.options;if(!r){pi(" ____ ____ _ \n / ___| ___ ___ _ __ / ___| _ __ __ _ ___ ___ (_)___ \n \\___ \\ / _ \\ / _ \\| '_ \\\\___ \\| '_ \\ / _` |/ __/ _ \\ | / __| \n ___) | (_) | (_) | | | |___) | |_) | (_| | (_| __/_ | \\__ \\ \n |____/ \\___/ \\___/|_| |_|____/| .__/ \\__,_|\\___\\___(_)/ |___/ \n |_| |__/ \n",{color:"#3eaf7c"}),pi(hn,{color:"#3eaf7c","font-size":"24px"}),pi(`当前版本: ${this.version}`,{color:"#3eaf7c","font-size":"12px"}),pi("文档: https://www.xwbuilders.com/soonspacejs/",{color:"#3eaf7c","font-size":"12px"}),pi("样例: https://www.xwbuilders.com/soonspacejs/examples/",{color:"#3eaf7c","font-size":"12px"}),pi("GitHub: https://github.com/soonspacejs",{color:"#3eaf7c","font-size":"12px"})}e&&this.addGridHelper(!0===e?{id:"defaultGridHelper"}:e),(null==t?void 0:t.skyBox)?Ji(null==t?void 0:t.skyBox)?this.setSphereSkyBackground(null==t?void 0:t.skyBox):ns(null==t?void 0:t.skyBox)&&this.setSkyBackground(t.skyBox.dirPath,t.skyBox.fileNames):(null==t?void 0:t.img)?this.setBackgroundImage(t.img):(null==t?void 0:t.color)?this.setBackgroundColor(t.color):!0===(null==t?void 0:t.alpha)&&this.setBackgroundColorAlpha("#000",0),n&&this.openSceneFog(!0===n?void 0:n),i&&this.setControlsOptions(i),void 0!==s&&this.setFileCacheEnabled(s),o&&(window.console.warn=function(){}),a&&!window.indexedDB&&(this.options.useIndexedDB=!1,window.console.warn("Your browser doesn't support a stable version of IndexedDB. Such and such feature will not be available."))}_initEvents(e){const t={modelHover:this.signals.modelHover,modelUnHover:this.signals.modelUnHover,modelClick:this.signals.modelClick,modelRightClick:this.signals.modelRightClick,modelDblClick:this.signals.modelDblClick,poiHover:this.signals.poiHover,poiUnHover:this.signals.poiUnHover,poiClick:this.signals.poiClick,poiRightClick:this.signals.poiRightClick,poiDblClick:this.signals.poiDblClick,selectPosition:this.signals.selectPosition,sceneClick:this.signals.sceneClick};for(const[n,i]of Object.entries(t)){const t=e[n];t&&i.add(t)}}_initDefaultSettings(){this.setEnvironment(),this.setColorSpace("sRGB"),this.setToneMapping({type:"ACESFilmic",exposure:.8})}setHoverEnabled(e){this.options.hoverEnabled=e}setLevelEnabled(e){this.options.levelEnabled=e}setScaleFixedEnabled(e){this.options.scaleFixedEnabled=e}setFileCacheEnabled(t){e.Cache.enabled=t}registerPlugin(e,t,n){const i=new e(this,n);return this.plugins[t]=i,i}getPlugin(e){return this.plugins[e]?this.plugins[e]:null}createPluginObject(e,t){return this.manager.store.pluginObjectManager.createObject(e,t)}addToPluginObject(e,t){const n=this.getObjectById(e);return this.manager.store.pluginObjectManager.addToObject(n,t)}getPluginObjectById(e){return mi("getPluginObjectById is deprecated, use getObjectById instead"),this.getObjectById(e)}getPluginObjectByName(e){return mi("getPluginObjectByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}removePluginObjectById(e){return mi("removePluginObjectById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}setSSR(e){this.viewport.setSSR(e)}setBloom(e){this.viewport.setBloom(e)}setSSAO(e){this.viewport.setSSAO(e)}setColorSpace(e){this.viewport.setColorSpace(e)}setToneMapping(e){this.viewport.setToneMapping(e)}setBackgroundColor(e){this.viewport.setBackgroundColor(e)}setBackgroundColorAlpha(e,t){this.viewport.setBackgroundColorAlpha(e,t)}setBackgroundImage(e){return this.viewport.setBackgroundImage(e)}setSphereSkyBackground(e){return this.viewport.setSphereSkyBackground(e)}setSkyBackground(e,t){return this.viewport.setSkyBackground(e,t)}setEnvironment(e){return this.viewport.setEnvironment(e)}playModelAnimation(e,t){return this.viewport.playModelAnimation(e,t)}stopModelAnimation(e,t){this.viewport.stopModelAnimation(e,t)}getOffsetByPosition(e){return this.viewport.getOffsetByPosition(e)}getPositionByOffset(e,t,n){return this.viewport.getPositionByOffset(e,t,n)}render(e){return this.viewport.render(e)}clearSignals(){this.viewport.clearSignals()}dispose(){this.manager.dispose(),this.viewport.dispose()}async setCamera(e,t,n=!0){return this.viewport.cameraManager.setCamera(e,t,n)}getCameraViewpoint(){return this.viewport.cameraManager.getCameraViewpoint()}setCameraViewpoint(e,t=!1){return this.viewport.cameraManager.setCameraViewpoint(e,t)}flyTo(e,t="frontTop",n){return this.viewport.cameraManager.flyTo(e,t,n)}flyToBoundingBox(e,t="frontTop",n){return this.flyToObj(e,t,n)}flyToObj(e,t="frontTop",n){return this.viewport.cameraManager.flyToObj(e,t,n)}flyMainViewpoint(e="frontTop",t){return this.flyToObj(this.manager.scene,e,t)}surroundOnTarget(e,t){return this.viewport.cameraManager.surroundOnTarget(e,t)}surroundOnObject(e,t){return this.viewport.cameraManager.surroundOnObject(e,t)}getObjectLabelPos(e,t="frontTop",n){return this.viewport.cameraManager.getObjectLabelPos(e,t,n)}setControlsOptions(e){return this.controls.setOptions(e)}addObject(e,t){this.viewport.scener.addObject(e,t)}attachObject(e,t){this.viewport.scener.attachObject(e,t)}removeObject(e){this.viewport.scener.removeObject(e)}openSceneFog(e){this.viewport.scener.openSceneFog(e)}closeSceneFog(){this.viewport.scener.closeSceneFog()}setSky(e){return this.viewport.setSky(e)}getScreenshot(){return this.screenshot()}screenshot(){return this.viewport.screenshot()}edgeShow(e,t){return this.viewport.scener.edgeShow(e,t)}unEdgeShow(e){return this.viewport.scener.unEdgeShow(e)}strokeShow(e,t){return this.viewport.scener.strokeShow(e,t)}unStrokeShow(e){return this.viewport.scener.unStrokeShow(e)}opacityShow(e,t){return this.viewport.scener.opacityShow(e,t)}unOpacityShow(e){return this.viewport.scener.unOpacityShow(e)}highlightShow(e,t){return this.viewport.scener.highlightShow(e,t)}unHighlightShow(e){return this.viewport.scener.unHighlightShow(e)}emissiveShow(e,t){return this.viewport.scener.emissiveShow(e,t)}unEmissiveShow(e){return this.viewport.scener.unEmissiveShow(e)}clearObject(){this.manager.clearObject()}clear(){this.manager.clear()}createAmbientLight(e){return this.manager.store.lightManager.createAmbientLight(e)}setAmbientLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setAmbientLight(t,e)}createDirectionalLight(e){return this.manager.store.lightManager.createDirectionalLight(e)}setDirectionalLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setDirectionalLight(t,e)}createHemisphereLight(e){return this.manager.store.lightManager.createHemisphereLight(e)}setHemisphereLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setHemisphereLight(t,e)}createSpotLight(e){return this.manager.store.lightManager.createSpotLight(e)}setSpotLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setSpotLight(t,e)}createPointLight(e){return this.manager.store.lightManager.createPointLight(e)}setPointLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setPointLight(t,e)}createRectAreaLight(e){return this.manager.store.lightManager.createRectAreaLight(e)}setRectAreaLight(e){const t=this.getObjectById(e.id);return this.manager.store.lightManager.setRectAreaLight(t,e)}getLightById(e){return mi("getLightById is deprecated, use getObjectById instead"),this.getObjectById(e)}removeLightById(e){return mi("removeLightById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}getAllLight(){return this.manager.store.lightManager.getAll()}clearLight(){return this.manager.store.lightManager.clear()}showAllLight(){return this.manager.store.lightManager.showAll()}hideAllLight(){return this.manager.store.lightManager.hideAll()}updateAllShadow(){return this.manager.store.lightManager.updateAllShadow()}getObjectById(e){return this.manager.getObjectById(e)}getObjectByName(e){return this.manager.getObjectByName(e)}getObjectByUserDataProperty(e,t){return this.manager.getObjectByUserDataProperty(e,t)}removeObjectById(e){return this.manager.removeObjectById(e)}createGroup(e,t){return this.manager.store.groupManager.createGroup(e,t)}getGroupById(e){return mi("getGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getGroupByName(e){return mi("getGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllGroup(){return this.manager.store.groupManager.getAll()}showAllGroup(){return this.manager.store.groupManager.showAll()}hideAllGroup(){return this.manager.store.groupManager.hideAll()}removeGroupById(e){return mi("removeGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}loadSbm(e){return mi("loadSbm is deprecated, use loadModel instead"),this.loadModel(e)}parseSbm(){mi("parseSbm is deprecated!")}cloneSbm(e,t,n){return mi("cloneSbm is deprecated, use cloneModel instead"),this.cloneModel(e,t,n)}getSbmById(e){return mi("getSbmById is deprecated, use getObjectById instead"),this.getObjectById(e)}getSbmByName(e){return mi("getSbmByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getSbmByUserDataProperty(e,t){return mi("getSbmByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removeSbmById(e){return mi("removeSbmById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForSbm(e){return mi("createGroupForSbm is deprecated, use createGroup instead"),this.createGroup(e)}loadSbmToGroup(e,t){return mi("loadSbmToGroup is deprecated, use loadModelToGroup instead"),this.loadModelToGroup(e,t)}addSbmForGroup(e,t){return mi("addSbmForGroup is deprecated, use addModelForGroup instead"),this.addModelForGroup(e,t)}createSbmGroupFromXml(){mi("createGroupForSbm is deprecated!")}getSbmGroupById(e){return mi("getSbmGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getSbmGroupByName(e){return mi("getSbmGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllSbmGroup(){return mi("getAllSbmGroup is deprecated, use getAllGroup instead"),this.getAllGroup()}removeSbmGroupById(e){return mi("removeSbmGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearSbm(){return mi("clearSbm is deprecated, use clearModel instead"),this.clearModel()}getAllSbm(){return mi("getAllSbm is deprecated, use getAllModel instead"),this.getAllModel()}showAllSbm(){return mi("showAllSbm is deprecated, use showAllModel instead"),this.showAllModel()}hideAllSbm(){return mi("hideAllSbm is deprecated, use hideAllModel instead"),this.hideAllModel()}getSbmModelMaps(){return mi("getSbmModelMaps is deprecated, use getModelsMap instead"),this.getModelsMap()}setSbmModelMaps(e){return mi("setSbmModelMaps is deprecated, use setModelsMap instead"),this.setModelsMap(e)}setModelDracoDecoderPath(e){return this.manager.store.modelManager.setDracoDecoderPath(e)}setModelKtx2DecoderPath(e){return this.manager.store.modelManager.setKtx2DecoderPath(e)}loadModel(e,t){return this.manager.store.modelManager.load(e,t)}cloneModel(e,t,n){return this.manager.store.modelManager.clone(e,t,n)}getModelById(e){return mi("getModelById is deprecated, use getObjectById instead"),this.getObjectById(e)}getModelByName(e){return mi("getModelByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getModelByUserDataProperty(e,t){return mi("getModelByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removeModelById(e){return mi("removeModelById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForModel(e){return mi("createGroupForModel is deprecated, use createGroup instead"),this.createGroup(e)}loadModelToGroup(e,t){return this.manager.store.modelManager.loadToGroup(e,t)}addModelForGroup(e,t){const n=this.getObjectById(e);return this.manager.store.modelManager.addForGroup(n,t)}getModelGroupById(e){return mi("getModelGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getModelGroupByName(e){return mi("getModelGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllModelGroup(){return mi("getAllModelGroup is deprecated, use getAllGroup instead"),this.getAllGroup()}removeModelGroupById(e){return mi("removeModelGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearModel(){return this.manager.store.modelManager.clear()}getAllModel(){return this.manager.store.modelManager.getAll()}showAllModel(){return this.manager.store.modelManager.showAll()}hideAllModel(){return this.manager.store.modelManager.hideAll()}computeModelsBoundsTree(e){return this.viewport.bvh.computeModelsBoundsTree(e)}clearIdb(){return this.manager.store.modelManager.clearIdb()}getModelsMap(){return this.manager.store.modelManager.modelsMap}setModelsMap(e){this.manager.store.modelManager.modelsMap=e}createPoi(e){return this.manager.store.poiManager.create(e)}clonePoi(e,t,n){return this.manager.store.poiManager.clone(e,t,n)}getPoiById(e){return mi("getPoiById is deprecated, use getObjectById instead"),this.getObjectById(e)}getPoiByName(e){return mi("getPoiByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getPoiByUserDataProperty(e,t){return mi("getPoiByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removePoiById(e){return mi("removePoiById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForPoi(e){return mi("createGroupForPoi is deprecated, use createGroup instead"),this.createGroup(e)}createPoiToGroup(e,t){return this.manager.store.poiManager.createToGroup(e,t)}addPoiForGroup(e,t){const n=this.getObjectById(e);return this.manager.store.poiManager.addForGroup(n,t)}getPoiGroupById(e){return mi("getPoiGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getPoiGroupByName(e){return mi("getPoiGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllPoiGroup(){return mi("getAllPoiGroup is deprecated, use getAllGroup instead"),this.getAllGroup()}removePoiGroupById(e){return mi("removePoiGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearPoi(){return this.manager.store.poiManager.clear()}getAllPoi(){return this.manager.store.poiManager.getAll()}showAllPoi(){return this.manager.store.poiManager.showAll()}hideAllPoi(){return this.manager.store.poiManager.hideAll()}createPoiNode(e){return this.manager.store.poiNodeManager.create(e)}getPoiNodeById(e){return mi("getPoiNodeById is deprecated, use getObjectById instead"),this.getObjectById(e)}getPoiNodeByName(e){return mi("getPoiNodeByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getPoiNodeByUserDataProperty(e,t){return mi("getPoiNodeByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removePoiNodeById(e){return mi("removePoiNodeById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForPoiNode(e){return mi("createGroupForPoiNode is deprecated, use createGroup instead"),this.createGroup(e)}createPoiNodeToGroup(e,t){return this.manager.store.poiNodeManager.createToGroup(e,t)}addPoiNodeForGroup(e,t){const n=this.getObjectById(e);return this.manager.store.poiNodeManager.addForGroup(n,t)}getPoiNodeGroupById(e){return mi("getPoiNodeGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getPoiNodeGroupByName(e){return mi("getPoiNodeGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllPoiNodeGroup(){return mi("getAllPoiNodeGroup is deprecated, use getAllGroup instead"),this.getAllGroup()}removePoiNodeGroupById(e){return mi("removePoiNodeGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearPoiNode(){return this.manager.store.poiNodeManager.clear()}getAllPoiNode(){return this.manager.store.poiNodeManager.getAll()}showAllPoiNode(){return this.manager.store.poiNodeManager.showAll()}hideAllPoiNode(){return this.manager.store.poiNodeManager.hideAll()}createPoiMesh(e){const t=Gd(e,this.textureCache);return this.addObject(t),t}createPolygonPoiMesh(e){const t=Hd(e,this.textureCache);return this.addObject(t),t}setTexture(e,t,n={}){const{cache:i=!0,independ:s=!0}=n||{};let r=e.material;if(s&&(r=r.clone(),e.material=r),null===t)return r.map=null,this.render(),null;const o=zd(r,t,i,this.textureCache);return this.render(),o}createCanvas3D(e,t){return this.manager.store.canvas3DManager.create(e,t)}getCanvas3DById(e){return mi("getCanvas3DById is deprecated, use getObjectById instead"),this.getObjectById(e)}getCanvas3DByName(e){return mi("getCanvas3DByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getCanvas3DByUserDataProperty(e,t){return mi("getCanvas3DByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removeCanvas3DById(e){return mi("removeCanvas3DById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForCanvas3D(e){return mi("createGroupForCanvas3D is deprecated, use createGroup instead"),this.createGroup(e)}createCanvas3DToGroup(e,t){return this.manager.store.canvas3DManager.createToGroup(e,t)}addCanvas3DForGroup(e,t){const n=this.getObjectById(e);return this.manager.store.canvas3DManager.addForGroup(n,t)}getCanvas3DGroupById(e){return mi("getCanvas3DGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getCanvas3DGroupByName(e){return mi("getCanvas3DGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllCanvas3DGroup(){return mi("getAllCanvas3DGroup is deprecated, use getAllGroup instead"),this.getAllGroup()}removeCanvas3DGroupById(e){return mi("removeCanvas3DGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearCanvas3D(){return this.manager.store.canvas3DManager.clear()}getAllCanvas3D(){return this.manager.store.canvas3DManager.getAll()}showAllCanvas3D(){return this.manager.store.canvas3DManager.showAll()}hideAllCanvas3D(){return this.manager.store.canvas3DManager.hideAll()}getShortestPath(e,t){return this.manager.store.topologyManager.getShortestPath(e,t)}getShortestPathAsync(e,t){return this.manager.store.topologyManager.getShortestPathAsync(e,t)}getShortestPathByMultipleStartPoints(e,t){return this.manager.store.topologyManager.getShortestPathByMultipleStartPoints(e,t)}getShortestPathByMultipleStartPointsAsync(e,t){return this.manager.store.topologyManager.getShortestPathByMultipleStartPointsAsync(e,t)}getShortestPathByMultipleEndPoints(e,t){return this.manager.store.topologyManager.getShortestPathByMultipleEndPoints(e,t)}getShortestPathByMultipleEndPointsAsync(e,t){return this.manager.store.topologyManager.getShortestPathByMultipleEndPointsAsync(e,t)}createTopologyFromGml(e){return this.manager.store.topologyManager.createFromGml(e)}createTopology(e){return this.manager.store.topologyManager.create(e)}setTopologyPassable(e,t){this.manager.store.topologyManager.setPassable(e,t)}resetTopologyNodes(e,t){return this.manager.store.topologyManager.resetNodes(e,t)}getTopologyById(e){return mi("getTopologyById is deprecated, use getObjectById instead"),this.getObjectById(e)}getTopologyByName(e){return mi("getTopologyByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getTopologyByUserDataProperty(e,t){return mi("getTopologyByUserDataProperty is deprecated, use getObjectByUserDataProperty instead"),this.getObjectByUserDataProperty(e,t)}removeTopologyById(e){return mi("removeTopologyById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}createGroupForTopology(e){return mi("createGroupForTopology is deprecated, use createGroup instead"),this.createGroup(e)}createTopologyToGroup(e,t){return this.manager.store.topologyManager.createToGroup(e,t)}addTopologyForGroup(e,t){const n=this.getObjectById(e);return this.manager.store.topologyManager.addForGroup(n,t)}getTopologyGroupById(e){return mi("getTopologyGroupById is deprecated, use getObjectById instead"),this.getObjectById(e)}getTopologyGroupByName(e){return mi("getTopologyGroupByName is deprecated, use getObjectByName instead"),this.getObjectByName(e)}getAllTopologyGroup(){return mi("getAllTopologyGroup is deprecated, use getAllGroups instead"),this.getAllGroup()}removeTopologyGroupById(e){return mi("removeTopologyGroupById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearTopology(){return this.manager.store.topologyManager.clear()}getAllTopology(){return this.manager.store.topologyManager.getAll()}showAllTopology(){return this.manager.store.topologyManager.showAll()}hideAllTopology(){return this.manager.store.topologyManager.hideAll()}addGridHelper(e){return this.manager.store.helperManager.addGridHelper(e)}addAxesHelper(e){return this.manager.store.helperManager.addAxesHelper(e)}addBoxHelper(e){return this.manager.store.helperManager.addBoxHelper(e)}addPlaneHelper(e){return this.manager.store.helperManager.addPlaneHelper(e)}createGround(e){return mi("In soonspacejs: 'createGround' 已弃用,请使用 'addGroundHelper'!"),this.addGroundHelper(e)}addGroundHelper(e){return this.manager.store.helperManager.addGroundHelper(e)}addDirectionalLightHelper(e){return this.manager.store.helperManager.addDirectionalLightHelper(e)}addHemisphereLightHelper(e){return this.manager.store.helperManager.addHemisphereLightHelper(e)}addSpotLightHelper(e){return this.manager.store.helperManager.addSpotLightHelper(e)}addPointLightHelper(e){return this.manager.store.helperManager.addPointLightHelper(e)}addRectAreaLightHelper(e){return this.manager.store.helperManager.addRectAreaLightHelper(e)}getHelperById(e){return mi("getHelperById is deprecated, use getObjectById instead"),this.getObjectById(e)}removeHelperById(e){return mi("removeHelperById is deprecated, use removeObjectById instead"),this.removeObjectById(e)}clearHelper(){return this.manager.store.helperManager.clear()}showAllHelper(){return this.manager.store.helperManager.showAll()}hideAllHelper(){return this.manager.store.helperManager.hideAll()}createDecal(e,t){return this.manager.store.decalManager.create(e,t)}updateDecalGeometry(e,t={}){return this.manager.store.decalManager.updateGeometry(e,t)}updateAllDecalGeometry(e={}){return this.manager.store.decalManager.updateAllGeometry(e)}clearDecal(){return this.manager.store.decalManager.clear()}getAllDecal(){return this.manager.store.decalManager.getAll()}showAllDecal(){return this.manager.store.decalManager.showAll()}hideAllDecal(){return this.manager.store.decalManager.hideAll()}createFindObjectsInBoxNearPosition(e,t){return kd(e,t)}createFindObjectsInSphereNearPosition(e,t){return jd(e,t)}createFindObjectsNearPath(e,t){return Nd(e,t)}createPathAnimation(e,t,n){return new fs(e,t,n)}createTopologyAnimation(e,n,i){const s=n.nodes.map((e=>e.getWorldPosition(new t)));return new fs(e,s,i)}createPathAnimationAction(e,t,n){return function(e,t,n,i){const s=i?Gc(i,!1):null,r=Yc(t),{clip:o}=tr(Object.assign(Object.assign(Object.assign({},s),r),{target:e})),a=n.playModelAnimation(e,o),{points:l}=r;return l?(a.enableKeyframeEvent=!1,a.points=l):a.enablePointEvent=!1,a}(e,t,this,n)}createPathAnimationActionForCamera(e,t){}createBonePathAnimation(e,t,n){return function(e,t,n,i){const s=i?Gc(i,!1):null,r=Yc(t),o=ur(Object.assign(Object.assign(Object.assign({},s),r),{target:e})),{model:a,clip:l}=o,c=n.playModelAnimation(a,l);return Object.assign(Object.assign({},o),{action:c})}(e,t,this,n)}createChainSkeletalModel(e,t){return function(e,t){const n=Zs(Object.assign(Object.assign({},t),{target:e})),{model:i,skeleton:s}=n;return{skeletalModel:i,skeleton:s}}(e,t)}createPathAnimationForBones(e,t,n){const i=function(e,t,n,i){const s=dr(Object.assign(Object.assign({},i),{target:e,skeleton:t}));return n.playModelAnimation(t,s)}(e,t,this,n);return i}}Vd.THREE=e,Vd.TWEEN=Ut,Vd.utils=us,Vd.animation=ps,Vd.library=kc,Vd.ACTION=li.ACTION;export{Dr as AnimationActionController,Rr as AnimationActionCreator,Ar as AnimationActionKeyframe,Tr as AnimationActionOperate,Lr as AnimationClipCreator,yr as AnimationClipKeyframe,wr as AnimationEventBaseType,Ul as BaseMesh,Fl as BaseObject3D,$l as Canvas3D,Wl as Circle,zc as Decal,Lc as DecalUVMapType,Rs as DirectionSide,ec as Ground,zl as Group,Cr as GuiAnimationActionController,ci as INNER_ID,Vl as Icon,ql as Line,Kl as Link,Nl as Model,ui as ModelFormat,Ql as Node,hi as ObjecType,kl as PluginObject,Gl as Poi,jl as PoiNode,_l as Point,Jl as Polygon,Vd as SoonSpace,Xl as Topology,Pr as TrackProperty_Common,Or as ValueTypeNames,Fd as boundingIsIntersected,_s as configVertexWeightByEquallyDivided,Ws as configVertexWeightForChainBones,Qs as configVertexWeightForEqualChainBones,Sr as createAnimationOperate,ur as createBonePathAnimation,Ns as createChainBones,Gs as createChainBonesByAxials,Hs as createChainBonesByJoints,Zs as createChainSkeletalModel,Ys as createChainSkinnedMesh,Ks as createChainSkinnedMeshForMesh,tr as createCurveAnimationClip,nr as createCurveAnimationClipByCurve,lr as createCurveAnimationClipByPolyline,dr as createCurveAnimationClipForBones,mr as createCurveAnimationClipForBonesTarget,Ds as createCurveBufferGeometry,Vs as createEqualChainBones,kd as createFindObjectsInBoxNearPosition,jd as createFindObjectsInSphereNearPosition,Nd as createFindObjectsNearPath,Mr as createGuiAnimationController,pr as createKeyframeTracksForBones,gr as createKeyframeTracksForBonesTarget,ir as createKeyframeTracksOfCurveAnimation,cr as createKeyframeTracksOfCurveAnimationByPolyline,Cs as createLineSegmentsByCurve,Ps as createLines,Ld as createPlaneMatrix,Gd as createPoiMesh,Hd as createPolygonPoiMesh,Es as createPolylineBufferGeometry,Ls as createPolylineCurve,Ud as createTexture,Rd as createUVMatrix,Vd as default,Js as getAllRootBones,Ur as getClosestContinuousIndexes,Bs as getClosestDistanceInfoOfPointToLines,Fr as getContinuousNumsList,Ss as getCurveDivisionLength,Fs as getCurvePointAwayFrom,Us as getCurvePointAwayFromOrigin,As as getCurveULengths,Is as getDistanceInfoOfPointToLines,sr as getDurationOfPathAnimationOptions,$s as getFirstRootBone,rr as getKeyframeTransformDatas,hr as getKeyframeTransformDatasByPolyline,bs as getLengthsOfTs,Ms as getLinesInfo,Id as getPolygonGeometryInfo,Os as getProjectionLines,er as getRootBone,fr as getSampleDataForBones,vr as getSampleDataForBonesTarget,Ts as getSampleNum,or as getTS,ar as getTimes,br as requestAnimation,zd as setTexture}; diff --git a/libs/soonspacejs/plugins/cps-soonmanager.js b/libs/soonspacejs/plugins/cps-soonmanager.js index 3c1c2886..709a1e37 100644 --- a/libs/soonspacejs/plugins/cps-soonmanager.js +++ b/libs/soonspacejs/plugins/cps-soonmanager.js @@ -1,7 +1,7 @@ import t from"soonspacejs";import{Vector4 as e,TextureLoader as r,Object3D as i,Vector2 as n,OrthographicCamera as o,MeshBasicMaterial as s,Mesh as a,PlaneGeometry as h,RepeatWrapping as u,Box3 as f,Vector3 as l,Matrix4 as c}from"three";var d=function(t,e){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},d(t,e)};function p(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}d(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}var m=function(){return m=Object.assign||function(t){for(var e,r=1,i=arguments.length;r=0;a--)(n=t[a])&&(s=(o<3?n(s):o>3?n(e,r,s):n(e,r))||s);return o>3&&s&&Object.defineProperty(e,r,s),s}function b(t,e){return function(r,i){e(r,i,t)}}function v(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)}function w(t,e,r,i){return new(r||(r=Promise))((function(n,o){function s(t){try{h(i.next(t))}catch(t){o(t)}}function a(t){try{h(i.throw(t))}catch(t){o(t)}}function h(t){t.done?n(t.value):function(t){return t instanceof r?t:new r((function(e){e(t)}))}(t.value).then(s,a)}h((i=i.apply(t,e||[])).next())}))}function _(t,e){var r,i,n,o,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(h){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(r=1,i&&(n=2&a[0]?i.return:a[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,a[1])).done)return n;switch(i=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,i=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(n=s.trys,(n=n.length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function k(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var i,n,o=r.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)s.push(i.value)}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return s}function A(){for(var t=[],e=0;e1||a(t,e)}))})}function a(t,e){try{!function(t){t.value instanceof I?Promise.resolve(t.value.v).then(h,u):f(o[0][2],t)}(n[t](e))}catch(t){f(o[0][3],t)}}function h(t){a("next",t)}function u(t){a("throw",t)}function f(t,e){t(e),o.shift(),o.length&&a(o[0][0],o[0][1])}}function C(t){var e,r;return e={},i("next"),i("throw",(function(t){throw t})),i("return"),e[Symbol.iterator]=function(){return this},e;function i(i,n){e[i]=t[i]?function(e){return(r=!r)?{value:I(t[i](e)),done:!1}:n?n(e):e}:n}}function P(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,r=t[Symbol.asyncIterator];return r?r.call(t):(t=E(t),e={},i("next"),i("throw"),i("return"),e[Symbol.asyncIterator]=function(){return this},e);function i(r){e[r]=t[r]&&function(e){return new Promise((function(i,n){(function(t,e,r,i){Promise.resolve(i).then((function(e){t({value:e,done:r})}),e)})(i,n,(e=t[r](e)).done,e.value)}))}}}function x(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t}var N=Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e};function B(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)"default"!==r&&Object.prototype.hasOwnProperty.call(t,r)&&M(e,t,r);return N(e,t),e}function L(t){return t&&t.__esModule?t:{default:t}}function D(t,e,r,i){if("a"===r&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?i:"a"===r?i.call(t):i?i.value:e.get(t)}function j(t,e,r,i,n){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!n:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?n.call(t,r):n?n.value=r:e.set(t,r),r}function U(t,e){if(null===e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof t?e===t:t.has(e)}function q(t,e,r){if(null!=e){if("object"!=typeof e&&"function"!=typeof e)throw new TypeError("Object expected.");var i;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");i=e[Symbol.asyncDispose]}if(void 0===i){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");i=e[Symbol.dispose]}if("function"!=typeof i)throw new TypeError("Object not disposable.");t.stack.push({value:e,dispose:i,async:r})}else r&&t.stack.push({async:!0});return e}var F="function"==typeof SuppressedError?SuppressedError:function(t,e,r){var i=new Error(r);return i.name="SuppressedError",i.error=t,i.suppressed=e,i};function z(t){function e(e){t.error=t.hasError?new F(e,t.error,"An error was suppressed during disposal."):e,t.hasError=!0}return function r(){for(;t.stack.length;){var i=t.stack.pop();try{var n=i.dispose&&i.dispose.call(i.value);if(i.async)return Promise.resolve(n).then(r,(function(t){return e(t),r()}))}catch(t){e(t)}}if(t.hasError)throw t.error}()}var H={__extends:p,__assign:m,__rest:g,__decorate:y,__param:b,__metadata:v,__awaiter:w,__generator:_,__createBinding:M,__exportStar:S,__values:E,__read:k,__spread:A,__spreadArrays:O,__spreadArray:T,__await:I,__asyncGenerator:R,__asyncDelegator:C,__asyncValues:P,__makeTemplateObject:x,__importStar:B,__importDefault:L,__classPrivateFieldGet:D,__classPrivateFieldSet:j,__classPrivateFieldIn:U,__addDisposableResource:q,__disposeResources:z},K=Object.freeze({__proto__:null,__addDisposableResource:q,get __assign(){return m},__asyncDelegator:C,__asyncGenerator:R,__asyncValues:P,__await:I,__awaiter:w,__classPrivateFieldGet:D,__classPrivateFieldIn:U,__classPrivateFieldSet:j,__createBinding:M,__decorate:y,__disposeResources:z,__esDecorate:function(t,e,r,i,n,o){function s(t){if(void 0!==t&&"function"!=typeof t)throw new TypeError("Function expected");return t}for(var a,h=i.kind,u="getter"===h?"get":"setter"===h?"set":"value",f=!e&&t?i.static?t:t.prototype:null,l=e||(f?Object.getOwnPropertyDescriptor(f,i.name):{}),c=!1,d=r.length-1;d>=0;d--){var p={};for(var m in i)p[m]="access"===m?{}:i[m];for(var m in i.access)p.access[m]=i.access[m];p.addInitializer=function(t){if(c)throw new TypeError("Cannot add initializers after decoration has completed");o.push(s(t||null))};var g=(0,r[d])("accessor"===h?{get:l.get,set:l.set}:l[u],p);if("accessor"===h){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(a=s(g.get))&&(l.get=a),(a=s(g.set))&&(l.set=a),(a=s(g.init))&&n.unshift(a)}else(a=s(g))&&("field"===h?n.unshift(a):l[u]=a)}f&&Object.defineProperty(f,i.name,l),c=!0},__exportStar:S,__extends:p,__generator:_,__importDefault:L,__importStar:B,__makeTemplateObject:x,__metadata:v,__param:b,__propKey:function(t){return"symbol"==typeof t?t:"".concat(t)},__read:k,__rest:g,__runInitializers:function(t,e,r){for(var i=arguments.length>2,n=0;n`
\n${t.label}\n${t.value}\n
`)).join("");return this.renderCustom(Object.assign(Object.assign({tagName:"div"},t),{innerHTML:o}))}batchRender(t){const{dataSource:e}=t,r=t=>{const{id:e,pid:r,width:i,height:n,dataSource:o,fileUrl:s,style:a,visible:h}=t;let u=this.ssp.getObjectById(e),f=h;if(u&&(f=u.visible,this.ssp.removeObjectById(e)),t.contentType===G.VIDEO)u=this.renderVideo(Object.assign(Object.assign({},t),{src:s,visible:f,style:{width:i+"px",height:n+"px"}}));else if(t.contentType===G.PANEL){const{panel:{bodyStyle:e,rowStyle:r,labelStyle:h,valueStyle:l}}=JSON.parse(a);u=this.renderPanel(Object.assign(Object.assign({},t),{visible:f,style:Object.assign(Object.assign({width:i+"px",height:n+"px",backgroundImage:`url(${s})`,overflow:"auto"},e),{padding:e.padding+"px"}),rowStyle:Object.assign(Object.assign({},r),{gap:r.gap+"px"}),labelStyle:Object.assign(Object.assign({},h),{fontSize:h.fontSize+"px"}),valueStyle:Object.assign(Object.assign({},l),{fontSize:l.fontSize+"px"}),dataSource:o}))}if(u&&r){const t=this.ssp.getObjectById(r);t&&this.ssp.addObject(u,t)}};e.forEach((t=>{r(t)}))}}var Y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function Z(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function X(t){if(t.__esModule)return t;var e=t.default;if("function"==typeof e){var r=function t(){if(this instanceof t){var r=[null];return r.push.apply(r,arguments),new(Function.bind.apply(e,r))}return e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(r,e,i.get?i:{enumerable:!0,get:function(){return t[e]}})})),r}var Q={},J={},$=X(K),tt={},et={},rt={},it={};Object.defineProperty(it,"__esModule",{value:!0}),it.Slot=void 0;var nt=function(){function t(t,e,r,i){void 0===r&&(r=!1),void 0===i&&(i=0),this._enabled=!0,this._once=!1,this._priority=0,this._listener=t,this._once=r,this._signal=e,this._priority=i,this.verifyListener(t)}return t.prototype.execute0=function(){this._enabled&&(this._once&&this.remove(),this._params&&this._params.length?this._listener.apply(null,this._params):this._listener())},t.prototype.execute1=function(t){this._enabled&&(this._once&&this.remove(),this._params&&this._params.length?this._listener.apply(null,[t].concat(this._params)):this._listener(t))},t.prototype.execute=function(t){if(this._enabled){this._once&&this.remove(),this._params&&this._params.length&&(t=t.concat(this._params));var e=t.length;0===e?this._listener():1===e?this._listener(t[0]):2===e?this._listener(t[0],t[1]):3===e?this._listener(t[0],t[1],t[2]):this._listener.apply(null,t)}},Object.defineProperty(t.prototype,"listener",{get:function(){return this._listener},set:function(t){if(null==t)throw new Error("Given listener is null.\nDid you want to set enabled to false instead?");this.verifyListener(t),this._listener=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"once",{get:function(){return this._once},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"priority",{get:function(){return this._priority},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"[Slot listener: "+this._listener+", once: "+this._once+", priority: "+this._priority+", enabled: "+this._enabled+"]"},Object.defineProperty(t.prototype,"enabled",{get:function(){return this._enabled},set:function(t){this._enabled=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"params",{get:function(){return this._params},set:function(t){this._params=t},enumerable:!1,configurable:!0}),t.prototype.remove=function(){this._signal.remove(this._listener)},t.prototype.verifyListener=function(t){if(null==t)throw new Error("Given listener is null.");if(null==this._signal)throw new Error("Internal signal reference has not been set yet.")},t}();it.Slot=nt;var ot={};Object.defineProperty(ot,"__esModule",{value:!0}),ot.SlotList=void 0;var st=function(){function t(e,r){if(void 0===r&&(r=null),this.nonEmpty=!1,e||r){if(!e)throw new Error("Parameter head cannot be null.");this.head=e,this.tail=r||t.NIL,this.nonEmpty=!0}else{if(t.NIL)throw new Error("Parameters head and tail are null. Use the NIL element instead.");this.nonEmpty=!1}}return Object.defineProperty(t.prototype,"length",{get:function(){if(!this.nonEmpty)return 0;if(this.tail===t.NIL)return 1;for(var e=0,r=this;r.nonEmpty;)++e,r=r.tail;return e},enumerable:!1,configurable:!0}),t.prototype.prepend=function(e){return new t(e,this)},t.prototype.append=function(e){if(!e)return this;if(!this.nonEmpty)return new t(e);if(this.tail===t.NIL)return new t(e).prepend(this.head);for(var r=new t(this.head),i=r,n=this.tail;n.nonEmpty;)i=i.tail=new t(n.head),n=n.tail;return i.tail=new t(e),r},t.prototype.insertWithPriority=function(e){if(!this.nonEmpty)return new t(e);var r=e.priority;if(r>this.head.priority)return this.prepend(e);for(var i=new t(this.head),n=i,o=this.tail;o.nonEmpty;){if(r>o.head.priority)return n.tail=o.prepend(e),i;n=n.tail=new t(o.head),o=o.tail}return n.tail=new t(e),i},t.prototype.filterNot=function(e){if(!this.nonEmpty||null==e)return this;if(e===this.head.listener)return this.tail;for(var r=new t(this.head),i=r,n=this.tail;n.nonEmpty;){if(n.head.listener===e)return i.tail=n.tail,r;i=i.tail=new t(n.head),n=n.tail}return this},t.prototype.contains=function(t){if(!this.nonEmpty)return!1;for(var e=this;e.nonEmpty;){if(e.head.listener===t)return!0;e=e.tail}return!1},t.prototype.find=function(t){if(!this.nonEmpty)return null;for(var e=this;e.nonEmpty;){if(e.head.listener===t)return e.head;e=e.tail}return null},t.prototype.toString=function(){for(var t="",e=this;e.nonEmpty;)t+=e.head+" -> ",e=e.tail;return"[List "+(t+="NIL")+"]"},t.NIL=new t(null,null),t}();ot.SlotList=st,Object.defineProperty(rt,"__esModule",{value:!0}),rt.OnceSignal=void 0;var at=it,ht=ot,ut=function(){function t(){for(var t=[],e=0;e."+this._valueClasses[e])},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"numListeners",{get:function(){return this.slots.length},enumerable:!1,configurable:!0}),t.prototype.addOnce=function(t){return this.registerListener(t,!0)},t.prototype.remove=function(t){var e=this.slots.find(t);return e?(this.slots=this.slots.filterNot(t),e):null},t.prototype.removeAll=function(){this.slots=ht.SlotList.NIL},t.prototype.dispatch=function(){for(var t=[],e=0;e is not an instance of <"+this._valueClasses[n]+">.");var o=this.slots;if(o.nonEmpty)for(;o.nonEmpty;)o.head.execute(t),o=o.tail},t.prototype.registerListener=function(t,e){if(void 0===e&&(e=!1),this.registrationPossible(t,e)){var r=new at.Slot(t,this,e);return this.slots=this.slots.prepend(r),r}return this.slots.find(t)},t.prototype.registrationPossible=function(t,e){if(!this.slots.nonEmpty)return!0;var r=this.slots.find(t);if(!r)return!0;if(r.once!==e)throw new Error("You cannot addOnce() then add() the same listener without removing the relationship first.");return!1},t}();rt.OnceSignal=ut,Object.defineProperty(et,"__esModule",{value:!0}),et.Signal=void 0;var ft=$,lt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ft.__extends(e,t),e.prototype.add=function(t){return this.registerListener(t)},e}(rt.OnceSignal);et.Signal=lt,Object.defineProperty(tt,"__esModule",{value:!0}),tt.PrioritySignal=void 0;var ct=$,dt=it,pt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ct.__extends(e,t),e.prototype.addWithPriority=function(t,e){return void 0===e&&(e=0),this.registerListenerWithPriority(t,!1,e)},e.prototype.addOnceWithPriority=function(t,e){return void 0===e&&(e=0),this.registerListenerWithPriority(t,!0,e)},e.prototype.registerListener=function(t,e){return void 0===e&&(e=!1),this.registerListenerWithPriority(t,e)},e.prototype.registerListenerWithPriority=function(t,e,r){if(void 0===r&&(r=0),this.registrationPossible(t,e)){var i=new dt.Slot(t,this,e,r);return this.slots=this.slots.insertWithPriority(i),i}return this.slots.find(t)},e}(et.Signal);tt.PrioritySignal=pt,Object.defineProperty(J,"__esModule",{value:!0}),J.DeluxeSignal=void 0;var mt=$,gt=function(t){function e(e){void 0===e&&(e=null);for(var r=[],i=1;i is not an instance of <"+this._valueClasses[n]+">.");var o=t[0];o&&(o.target&&(o=o.clone(),t[0]=o),o.target=this.target,o.currentTarget=this.target,o.signal=this);for(var s=this.slots;s.nonEmpty;)s.head.execute(t),s=s.tail;if(o&&o.bubbles)for(var a=this.target;a&&a.hasOwnProperty("parent")&&(null===(a=a.parent).onEventBubbled||(o.currentTarget=a,a.onEventBubbled(o))););},e}(tt.PrioritySignal);J.DeluxeSignal=gt;var yt={};Object.defineProperty(yt,"__esModule",{value:!0}),yt.GenericEvent=void 0;var bt=function(){function t(t){void 0===t&&(t=!1),this._bubbles=t}return Object.defineProperty(t.prototype,"signal",{get:function(){return this._signal},set:function(t){this._signal=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"target",{get:function(){return this._target},set:function(t){this._target=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentTarget",{get:function(){return this._currentTarget},set:function(t){this._currentTarget=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bubbles",{get:function(){return this._bubbles},set:function(t){this._bubbles=t},enumerable:!1,configurable:!0}),t.prototype.clone=function(){return new t(this._bubbles)},t}();yt.GenericEvent=bt;var vt={};Object.defineProperty(vt,"__esModule",{value:!0}),vt.IOnceSignal=void 0,vt.IOnceSignal=Symbol("IOnceSignal");var wt={};Object.defineProperty(wt,"__esModule",{value:!0}),wt.IPrioritySignal=void 0,wt.IPrioritySignal=Symbol("IPrioritySignal");var _t={};Object.defineProperty(_t,"__esModule",{value:!0}),_t.ISignal=void 0,_t.ISignal=Symbol("ISignal");var Mt={};Object.defineProperty(Mt,"__esModule",{value:!0}),Mt.ISlot=void 0,Mt.ISlot=Symbol("ISlot");var St={};Object.defineProperty(St,"__esModule",{value:!0}),St.MonoSignal=void 0;var Et=it,kt=function(){function t(){for(var t=[],e=0;e."+this._valueClasses[e])},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"numListeners",{get:function(){return this.slot?1:0},enumerable:!1,configurable:!0}),t.prototype.add=function(t){return this.registerListener(t)},t.prototype.addOnce=function(t){return this.registerListener(t,!0)},t.prototype.remove=function(t){if(this.slot&&this.slot.listener===t){var e=this.slot;return this.slot=null,e}return null},t.prototype.removeAll=function(){this.slot&&this.slot.remove()},t.prototype.dispatch=function(){for(var t=[],e=0;e is not an instance of <"+this._valueClasses[n]+">.");this.slot&&this.slot.execute(t)},t.prototype.registerListener=function(t,e){if(void 0===e&&(e=!1),this.slot)throw new Error("You cannot add or addOnce with a listener already added, remove the current listener first.");return this.slot=new Et.Slot(t,this,e)},t}();St.MonoSignal=kt;var At={};Object.defineProperty(At,"__esModule",{value:!0}),At.Promise=void 0;var Ot=$,Tt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Ot.__extends(e,t),e.prototype.addOnce=function(e){var r=t.prototype.addOnce.call(this,e);return this._isDispatched&&(r.execute(this._valueObjects),r.remove()),r},e.prototype.dispatch=function(){for(var e=[],r=0;rr.sourceNodeId===t&&r.sourceNodeHandleId===e))}At.Promise=Tt,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.SlotList=t.Slot=t.Signal=t.Promise=t.PrioritySignal=t.OnceSignal=t.MonoSignal=t.ISlot=t.ISignal=t.IPrioritySignal=t.IOnceSignal=t.GenericEvent=t.DeluxeSignal=void 0;var e=J;Object.defineProperty(t,"DeluxeSignal",{enumerable:!0,get:function(){return e.DeluxeSignal}});var r=yt;Object.defineProperty(t,"GenericEvent",{enumerable:!0,get:function(){return r.GenericEvent}});var i=vt;Object.defineProperty(t,"IOnceSignal",{enumerable:!0,get:function(){return i.IOnceSignal}});var n=wt;Object.defineProperty(t,"IPrioritySignal",{enumerable:!0,get:function(){return n.IPrioritySignal}});var o=_t;Object.defineProperty(t,"ISignal",{enumerable:!0,get:function(){return o.ISignal}});var s=Mt;Object.defineProperty(t,"ISlot",{enumerable:!0,get:function(){return s.ISlot}});var a=St;Object.defineProperty(t,"MonoSignal",{enumerable:!0,get:function(){return a.MonoSignal}});var h=rt;Object.defineProperty(t,"OnceSignal",{enumerable:!0,get:function(){return h.OnceSignal}});var u=tt;Object.defineProperty(t,"PrioritySignal",{enumerable:!0,get:function(){return u.PrioritySignal}});var f=At;Object.defineProperty(t,"Promise",{enumerable:!0,get:function(){return f.Promise}});var l=et;Object.defineProperty(t,"Signal",{enumerable:!0,get:function(){return l.Signal}});var c=it;Object.defineProperty(t,"Slot",{enumerable:!0,get:function(){return c.Slot}});var d=ot;Object.defineProperty(t,"SlotList",{enumerable:!0,get:function(){return d.SlotList}})}(Q);let Rt=class{async _runFlowHandler(t){const e=this.nodes.filter((({isStartNode:t})=>t));if(0===e.length)return Promise.reject("In SoonFlow: CommonHandler _runFlowHandler not find startNode");for(let r=0;rt.targetNodeId));for(let i=0;it.id===o));if(!s)return Promise.reject("In SoonFlow: CommonHandler _operateFlowNode not find nextNode");const{type:a}=s,h=this.nodeTypeMethods[a];if(!h)return Promise.reject("In SoonFlow: CommonHandler _operateFlowNode not find nodeTypeMethod");h[t]?.call(this,{prevNode:e,node:s,inputData:r.data})}}},Ct=class extends Rt{nodes;edges;nodeTypeMethods;outInstances;#t=new Map;constructor(t,e,r,i){super(),this.nodes=t,this.edges=e,this.nodeTypeMethods=r,this.outInstances=i}getOutInstance(t){return this.outInstances[t]}getPrevNodeList(t){const e=this.edges.filter((e=>e.targetNodeHandleId===t)),r=[];return e.forEach((t=>{this.nodes.forEach((e=>{e.outputs.some((e=>e.id===t.sourceNodeHandleId))&&(r.find((t=>t.id===e.id))||r.push(e))}))})),r}async runParse(){return this._runFlowHandler(this.parseFlowNode)}async parseFlowNode(t,e){return this._operateFlowNode("parse",t,e)}addSignal(t,e){const r=new Q.Signal;r.add(e),this.#t.set(t,r)}dispatchSignal(t){this.#t.get(t)?.dispatch()}},Pt=class extends Rt{nodes;edges;nodeTypeMethods;outInstances;constructor(t,e,r,i){super(),this.nodes=t,this.edges=e,this.nodeTypeMethods=r,this.outInstances=i,this.#e()}#e(){this._runFlowHandler(this.unregisterFlowNode)}async unregisterFlowNode(t,e){return this._operateFlowNode("unregister",t,e)}};const xt=(t,...e)=>{console.error(`In SoonFlow: ${t}`,...e)};class Nt{path;constructor(t){this.path=t}setPath(t){this.path=t}async getFlowData(){return{flowList:(await(await this.fetchFileData("/db/flows.json")).json()).map((t=>{const{nodeData:e}=t,{nodeList:r,lineList:i}=e;return{...t,nodes:r.map((t=>({...t,inputs:t.handlerList.filter((({type:t})=>"target"===t)),outputs:t.handlerList.filter((({type:t})=>"source"===t)),isStartNode:"start"===t.type}))),edges:i.map((t=>({...t,sourceNodeHandleId:t.sourceHandlerId,targetNodeHandleId:t.targetHandlerId})))}}))}}fetchFileData(t){return fetch(`${this.path}${t}`)}}var Bt="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function Lt(t,e){return function(){return t.apply(e,arguments)}}const{toString:Dt}=Object.prototype,{getPrototypeOf:jt}=Object,Ut=(t=>e=>{const r=Dt.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),qt=t=>(t=t.toLowerCase(),e=>Ut(e)===t),Ft=t=>e=>typeof e===t,{isArray:zt}=Array,Ht=Ft("undefined");const Kt=qt("ArrayBuffer");const Vt=Ft("string"),Gt=Ft("function"),Wt=Ft("number"),Yt=t=>null!==t&&"object"==typeof t,Zt=t=>{if("object"!==Ut(t))return!1;const e=jt(t);return!(null!==e&&e!==Object.prototype&&null!==Object.getPrototypeOf(e)||Symbol.toStringTag in t||Symbol.iterator in t)},Xt=qt("Date"),Qt=qt("File"),Jt=qt("Blob"),$t=qt("FileList"),te=qt("URLSearchParams");function ee(t,e,{allOwnKeys:r=!1}={}){if(null==t)return;let i,n;if("object"!=typeof t&&(t=[t]),zt(t))for(i=0,n=t.length;i0;)if(i=r[n],e===i.toLowerCase())return i;return null}const ie="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:Bt,ne=t=>!Ht(t)&&t!==ie;const oe=(se="undefined"!=typeof Uint8Array&&jt(Uint8Array),t=>se&&t instanceof se);var se;const ae=qt("HTMLFormElement"),he=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),ue=qt("RegExp"),fe=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),i={};ee(r,((r,n)=>{let o;!1!==(o=e(r,n,t))&&(i[n]=o||r)})),Object.defineProperties(t,i)},le="abcdefghijklmnopqrstuvwxyz",ce="0123456789",de={DIGIT:ce,ALPHA:le,ALPHA_DIGIT:le+le.toUpperCase()+ce};const pe=qt("AsyncFunction");var me={isArray:zt,isArrayBuffer:Kt,isBuffer:function(t){return null!==t&&!Ht(t)&&null!==t.constructor&&!Ht(t.constructor)&&Gt(t.constructor.isBuffer)&&t.constructor.isBuffer(t)},isFormData:t=>{let e;return t&&("function"==typeof FormData&&t instanceof FormData||Gt(t.append)&&("formdata"===(e=Ut(t))||"object"===e&&Gt(t.toString)&&"[object FormData]"===t.toString()))},isArrayBufferView:function(t){let e;return e="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer&&Kt(t.buffer),e},isString:Vt,isNumber:Wt,isBoolean:t=>!0===t||!1===t,isObject:Yt,isPlainObject:Zt,isUndefined:Ht,isDate:Xt,isFile:Qt,isBlob:Jt,isRegExp:ue,isFunction:Gt,isStream:t=>Yt(t)&&Gt(t.pipe),isURLSearchParams:te,isTypedArray:oe,isFileList:$t,forEach:ee,merge:function t(){const{caseless:e}=ne(this)&&this||{},r={},i=(i,n)=>{const o=e&&re(r,n)||n;Zt(r[o])&&Zt(i)?r[o]=t(r[o],i):Zt(i)?r[o]=t({},i):zt(i)?r[o]=i.slice():r[o]=i};for(let t=0,e=arguments.length;t(ee(e,((e,i)=>{r&&Gt(e)?t[i]=Lt(e,r):t[i]=e}),{allOwnKeys:i}),t),trim:t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:t=>(65279===t.charCodeAt(0)&&(t=t.slice(1)),t),inherits:(t,e,r,i)=>{t.prototype=Object.create(e.prototype,i),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},toFlatObject:(t,e,r,i)=>{let n,o,s;const a={};if(e=e||{},null==t)return e;do{for(n=Object.getOwnPropertyNames(t),o=n.length;o-- >0;)s=n[o],i&&!i(s,t,e)||a[s]||(e[s]=t[s],a[s]=!0);t=!1!==r&&jt(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},kindOf:Ut,kindOfTest:qt,endsWith:(t,e,r)=>{t=String(t),(void 0===r||r>t.length)&&(r=t.length),r-=e.length;const i=t.indexOf(e,r);return-1!==i&&i===r},toArray:t=>{if(!t)return null;if(zt(t))return t;let e=t.length;if(!Wt(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},forEachEntry:(t,e)=>{const r=(t&&t[Symbol.iterator]).call(t);let i;for(;(i=r.next())&&!i.done;){const r=i.value;e.call(t,r[0],r[1])}},matchAll:(t,e)=>{let r;const i=[];for(;null!==(r=t.exec(e));)i.push(r);return i},isHTMLForm:ae,hasOwnProperty:he,hasOwnProp:he,reduceDescriptors:fe,freezeMethods:t=>{fe(t,((e,r)=>{if(Gt(t)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const i=t[r];Gt(i)&&(e.enumerable=!1,"writable"in e?e.writable=!1:e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))}))},toObjectSet:(t,e)=>{const r={},i=t=>{t.forEach((t=>{r[t]=!0}))};return zt(t)?i(t):i(String(t).split(e)),r},toCamelCase:t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,(function(t,e,r){return e.toUpperCase()+r})),noop:()=>{},toFiniteNumber:(t,e)=>(t=+t,Number.isFinite(t)?t:e),findKey:re,global:ie,isContextDefined:ne,ALPHABET:de,generateString:(t=16,e=de.ALPHA_DIGIT)=>{let r="";const{length:i}=e;for(;t--;)r+=e[Math.random()*i|0];return r},isSpecCompliantForm:function(t){return!!(t&&Gt(t.append)&&"FormData"===t[Symbol.toStringTag]&&t[Symbol.iterator])},toJSONObject:t=>{const e=new Array(10),r=(t,i)=>{if(Yt(t)){if(e.indexOf(t)>=0)return;if(!("toJSON"in t)){e[i]=t;const n=zt(t)?[]:{};return ee(t,((t,e)=>{const o=r(t,i+1);!Ht(o)&&(n[e]=o)})),e[i]=void 0,n}}return t};return r(t,0)},isAsyncFn:pe,isThenable:t=>t&&(Yt(t)||Gt(t))&&Gt(t.then)&&Gt(t.catch)},ge=[],ye=[],be="undefined"!=typeof Uint8Array?Uint8Array:Array,ve=!1;function we(){ve=!0;for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",e=0;e<64;++e)ge[e]=t[e],ye[t.charCodeAt(e)]=e;ye["-".charCodeAt(0)]=62,ye["_".charCodeAt(0)]=63}function _e(t,e,r){for(var i,n,o=[],s=e;s>18&63]+ge[n>>12&63]+ge[n>>6&63]+ge[63&n]);return o.join("")}function Me(t){var e;ve||we();for(var r=t.length,i=r%3,n="",o=[],s=16383,a=0,h=r-i;ah?h:a+s));return 1===i?(e=t[r-1],n+=ge[e>>2],n+=ge[e<<4&63],n+="=="):2===i&&(e=(t[r-2]<<8)+t[r-1],n+=ge[e>>10],n+=ge[e>>4&63],n+=ge[e<<2&63],n+="="),o.push(n),o.join("")}function Se(t,e,r,i,n){var o,s,a=8*n-i-1,h=(1<>1,f=-7,l=r?n-1:0,c=r?-1:1,d=t[e+l];for(l+=c,o=d&(1<<-f)-1,d>>=-f,f+=a;f>0;o=256*o+t[e+l],l+=c,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=i;f>0;s=256*s+t[e+l],l+=c,f-=8);if(0===o)o=1-u;else{if(o===h)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,i),o-=u}return(d?-1:1)*s*Math.pow(2,o-i)}function Ee(t,e,r,i,n,o){var s,a,h,u=8*o-n-1,f=(1<>1,c=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:o-1,p=i?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-s))<1&&(s--,h*=2),(e+=s+l>=1?c/h:c*Math.pow(2,1-l))*h>=2&&(s++,h/=2),s+l>=f?(a=0,s=f):s+l>=1?(a=(e*h-1)*Math.pow(2,n),s+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,n),s=0));n>=8;t[r+d]=255&a,d+=p,a/=256,n-=8);for(s=s<0;t[r+d]=255&s,d+=p,s/=256,u-=8);t[r+d-p]|=128*m}var ke={}.toString,Ae=Array.isArray||function(t){return"[object Array]"==ke.call(t)};Re.TYPED_ARRAY_SUPPORT=void 0===Bt.TYPED_ARRAY_SUPPORT||Bt.TYPED_ARRAY_SUPPORT;var Oe=Te();function Te(){return Re.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function Ie(t,e){if(Te()=Te())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+Te().toString(16)+" bytes");return 0|t}function Le(t){return!(null==t||!t._isBuffer)}function De(t,e){if(Le(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var r=t.length;if(0===r)return 0;for(var i=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return fr(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return lr(t).length;default:if(i)return fr(t).length;e=(""+e).toLowerCase(),i=!0}}function je(t,e,r){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return $e(this,e,r);case"utf8":case"utf-8":return Ze(this,e,r);case"ascii":return Qe(this,e,r);case"latin1":case"binary":return Je(this,e,r);case"base64":return Ye(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return tr(this,e,r);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function Ue(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function qe(t,e,r,i,n){if(0===t.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(n)return-1;r=t.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof e&&(e=Re.from(e,i)),Le(e))return 0===e.length?-1:Fe(t,e,r,i,n);if("number"==typeof e)return e&=255,Re.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):Fe(t,[e],r,i,n);throw new TypeError("val must be string, number or Buffer")}function Fe(t,e,r,i,n){var o,s=1,a=t.length,h=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;s=2,a/=2,h/=2,r/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(n){var f=-1;for(o=r;oa&&(r=a-h),o=r;o>=0;o--){for(var l=!0,c=0;cn&&(i=n):i=n;var o=e.length;if(o%2!=0)throw new TypeError("Invalid hex string");i>o/2&&(i=o/2);for(var s=0;s>8,n=r%256,o.push(n),o.push(i);return o}(e,t.length-r),t,r,i)}function Ye(t,e,r){return 0===e&&r===t.length?Me(t):Me(t.slice(e,r))}function Ze(t,e,r){r=Math.min(t.length,r);for(var i=[],n=e;n239?4:u>223?3:u>191?2:1;if(n+l<=r)switch(l){case 1:u<128&&(f=u);break;case 2:128==(192&(o=t[n+1]))&&(h=(31&u)<<6|63&o)>127&&(f=h);break;case 3:o=t[n+1],s=t[n+2],128==(192&o)&&128==(192&s)&&(h=(15&u)<<12|(63&o)<<6|63&s)>2047&&(h<55296||h>57343)&&(f=h);break;case 4:o=t[n+1],s=t[n+2],a=t[n+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(h=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&h<1114112&&(f=h)}null===f?(f=65533,l=1):f>65535&&(f-=65536,i.push(f>>>10&1023|55296),f=56320|1023&f),i.push(f),n+=l}return function(t){var e=t.length;if(e<=Xe)return String.fromCharCode.apply(String,t);var r="",i=0;for(;i0&&(t=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(t+=" ... ")),""},Re.prototype.compare=function(t,e,r,i,n){if(!Le(t))throw new TypeError("Argument must be a Buffer");if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),e<0||r>t.length||i<0||n>this.length)throw new RangeError("out of range index");if(i>=n&&e>=r)return 0;if(i>=n)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(n>>>=0)-(i>>>=0),s=(r>>>=0)-(e>>>=0),a=Math.min(o,s),h=this.slice(i,n),u=t.slice(e,r),f=0;fn)&&(r=n),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return ze(this,t,e,r);case"utf8":case"utf-8":return He(this,t,e,r);case"ascii":return Ke(this,t,e,r);case"latin1":case"binary":return Ve(this,t,e,r);case"base64":return Ge(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return We(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},Re.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Xe=4096;function Qe(t,e,r){var i="";r=Math.min(t.length,r);for(var n=e;ni)&&(r=i);for(var n="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function rr(t,e,r,i,n,o){if(!Le(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>n||et.length)throw new RangeError("Index out of range")}function ir(t,e,r,i){e<0&&(e=65535+e+1);for(var n=0,o=Math.min(t.length-r,2);n>>8*(i?n:1-n)}function nr(t,e,r,i){e<0&&(e=4294967295+e+1);for(var n=0,o=Math.min(t.length-r,4);n>>8*(i?n:3-n)&255}function or(t,e,r,i,n,o){if(r+i>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function sr(t,e,r,i,n){return n||or(t,0,r,4),Ee(t,e,r,i,23,4),r+4}function ar(t,e,r,i,n){return n||or(t,0,r,8),Ee(t,e,r,i,52,8),r+8}Re.prototype.slice=function(t,e){var r,i=this.length;if((t=~~t)<0?(t+=i)<0&&(t=0):t>i&&(t=i),(e=void 0===e?i:~~e)<0?(e+=i)<0&&(e=0):e>i&&(e=i),e0&&(n*=256);)i+=this[t+--e]*n;return i},Re.prototype.readUInt8=function(t,e){return e||er(t,1,this.length),this[t]},Re.prototype.readUInt16LE=function(t,e){return e||er(t,2,this.length),this[t]|this[t+1]<<8},Re.prototype.readUInt16BE=function(t,e){return e||er(t,2,this.length),this[t]<<8|this[t+1]},Re.prototype.readUInt32LE=function(t,e){return e||er(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},Re.prototype.readUInt32BE=function(t,e){return e||er(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},Re.prototype.readIntLE=function(t,e,r){t|=0,e|=0,r||er(t,e,this.length);for(var i=this[t],n=1,o=0;++o=(n*=128)&&(i-=Math.pow(2,8*e)),i},Re.prototype.readIntBE=function(t,e,r){t|=0,e|=0,r||er(t,e,this.length);for(var i=e,n=1,o=this[t+--i];i>0&&(n*=256);)o+=this[t+--i]*n;return o>=(n*=128)&&(o-=Math.pow(2,8*e)),o},Re.prototype.readInt8=function(t,e){return e||er(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},Re.prototype.readInt16LE=function(t,e){e||er(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},Re.prototype.readInt16BE=function(t,e){e||er(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},Re.prototype.readInt32LE=function(t,e){return e||er(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},Re.prototype.readInt32BE=function(t,e){return e||er(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},Re.prototype.readFloatLE=function(t,e){return e||er(t,4,this.length),Se(this,t,!0,23,4)},Re.prototype.readFloatBE=function(t,e){return e||er(t,4,this.length),Se(this,t,!1,23,4)},Re.prototype.readDoubleLE=function(t,e){return e||er(t,8,this.length),Se(this,t,!0,52,8)},Re.prototype.readDoubleBE=function(t,e){return e||er(t,8,this.length),Se(this,t,!1,52,8)},Re.prototype.writeUIntLE=function(t,e,r,i){(t=+t,e|=0,r|=0,i)||rr(this,t,e,r,Math.pow(2,8*r)-1,0);var n=1,o=0;for(this[e]=255&t;++o=0&&(o*=256);)this[e+n]=t/o&255;return e+r},Re.prototype.writeUInt8=function(t,e,r){return t=+t,e|=0,r||rr(this,t,e,1,255,0),Re.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[e]=255&t,e+1},Re.prototype.writeUInt16LE=function(t,e,r){return t=+t,e|=0,r||rr(this,t,e,2,65535,0),Re.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):ir(this,t,e,!0),e+2},Re.prototype.writeUInt16BE=function(t,e,r){return t=+t,e|=0,r||rr(this,t,e,2,65535,0),Re.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):ir(this,t,e,!1),e+2},Re.prototype.writeUInt32LE=function(t,e,r){return t=+t,e|=0,r||rr(this,t,e,4,4294967295,0),Re.TYPED_ARRAY_SUPPORT?(this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t):nr(this,t,e,!0),e+4},Re.prototype.writeUInt32BE=function(t,e,r){return t=+t,e|=0,r||rr(this,t,e,4,4294967295,0),Re.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):nr(this,t,e,!1),e+4},Re.prototype.writeIntLE=function(t,e,r,i){if(t=+t,e|=0,!i){var n=Math.pow(2,8*r-1);rr(this,t,e,r,n-1,-n)}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+r},Re.prototype.writeIntBE=function(t,e,r,i){if(t=+t,e|=0,!i){var n=Math.pow(2,8*r-1);rr(this,t,e,r,n-1,-n)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},Re.prototype.writeInt8=function(t,e,r){return t=+t,e|=0,r||rr(this,t,e,1,127,-128),Re.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[e]=255&t,e+1},Re.prototype.writeInt16LE=function(t,e,r){return t=+t,e|=0,r||rr(this,t,e,2,32767,-32768),Re.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8):ir(this,t,e,!0),e+2},Re.prototype.writeInt16BE=function(t,e,r){return t=+t,e|=0,r||rr(this,t,e,2,32767,-32768),Re.TYPED_ARRAY_SUPPORT?(this[e]=t>>>8,this[e+1]=255&t):ir(this,t,e,!1),e+2},Re.prototype.writeInt32LE=function(t,e,r){return t=+t,e|=0,r||rr(this,t,e,4,2147483647,-2147483648),Re.TYPED_ARRAY_SUPPORT?(this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24):nr(this,t,e,!0),e+4},Re.prototype.writeInt32BE=function(t,e,r){return t=+t,e|=0,r||rr(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),Re.TYPED_ARRAY_SUPPORT?(this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t):nr(this,t,e,!1),e+4},Re.prototype.writeFloatLE=function(t,e,r){return sr(this,t,e,!0,r)},Re.prototype.writeFloatBE=function(t,e,r){return sr(this,t,e,!1,r)},Re.prototype.writeDoubleLE=function(t,e,r){return ar(this,t,e,!0,r)},Re.prototype.writeDoubleBE=function(t,e,r){return ar(this,t,e,!1,r)},Re.prototype.copy=function(t,e,r,i){if(r||(r=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e=0;--n)t[n+e]=this[n+r];else if(o<1e3||!Re.TYPED_ARRAY_SUPPORT)for(n=0;n>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o55295&&r<57344){if(!n){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===i){(e-=3)>-1&&o.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(e-=3)>-1&&o.push(239,191,189);if(n=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function lr(t){return function(t){var e,r,i,n,o,s;ve||we();var a=t.length;if(a%4>0)throw new Error("Invalid string. Length must be a multiple of 4");o="="===t[a-2]?2:"="===t[a-1]?1:0,s=new be(3*a/4-o),i=o>0?a-4:a;var h=0;for(e=0,r=0;e>16&255,s[h++]=n>>8&255,s[h++]=255&n;return 2===o?(n=ye[t.charCodeAt(e)]<<2|ye[t.charCodeAt(e+1)]>>4,s[h++]=255&n):1===o&&(n=ye[t.charCodeAt(e)]<<10|ye[t.charCodeAt(e+1)]<<4|ye[t.charCodeAt(e+2)]>>2,s[h++]=n>>8&255,s[h++]=255&n),s}(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(hr,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function cr(t,e,r,i){for(var n=0;n=e.length||n>=t.length);++n)e[n+r]=t[n];return n}function dr(t){return null!=t&&(!!t._isBuffer||pr(t)||function(t){return"function"==typeof t.readFloatLE&&"function"==typeof t.slice&&pr(t.slice(0,0))}(t))}function pr(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}var mr=Object.freeze({__proto__:null,Buffer:Re,INSPECT_MAX_BYTES:50,SlowBuffer:function(t){return+t!=t&&(t=0),Re.alloc(+t)},isBuffer:dr,kMaxLength:Oe});function gr(t,e,r,i,n){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),i&&(this.request=i),n&&(this.response=n)}me.inherits(gr,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:me.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const yr=gr.prototype,br={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach((t=>{br[t]={value:t}})),Object.defineProperties(gr,br),Object.defineProperty(yr,"isAxiosError",{value:!0}),gr.from=(t,e,r,i,n,o)=>{const s=Object.create(yr);return me.toFlatObject(t,s,(function(t){return t!==Error.prototype}),(t=>"isAxiosError"!==t)),gr.call(s,t.message,e,r,i,n),s.cause=t,s.name=t.name,o&&Object.assign(s,o),s};function vr(t){return me.isPlainObject(t)||me.isArray(t)}function wr(t){return me.endsWith(t,"[]")?t.slice(0,-2):t}function _r(t,e,r){return t?t.concat(e).map((function(t,e){return t=wr(t),!r&&e?"["+t+"]":t})).join(r?".":""):e}const Mr=me.toFlatObject(me,{},null,(function(t){return/^is[A-Z]/.test(t)}));function Sr(t,e,r){if(!me.isObject(t))throw new TypeError("target must be an object");e=e||new FormData;const i=(r=me.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,(function(t,e){return!me.isUndefined(e[t])}))).metaTokens,n=r.visitor||u,o=r.dots,s=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&me.isSpecCompliantForm(e);if(!me.isFunction(n))throw new TypeError("visitor must be a function");function h(t){if(null===t)return"";if(me.isDate(t))return t.toISOString();if(!a&&me.isBlob(t))throw new gr("Blob is not supported. Use a Buffer instead.");return me.isArrayBuffer(t)||me.isTypedArray(t)?a&&"function"==typeof Blob?new Blob([t]):Re.from(t):t}function u(t,r,n){let a=t;if(t&&!n&&"object"==typeof t)if(me.endsWith(r,"{}"))r=i?r:r.slice(0,-2),t=JSON.stringify(t);else if(me.isArray(t)&&function(t){return me.isArray(t)&&!t.some(vr)}(t)||(me.isFileList(t)||me.endsWith(r,"[]"))&&(a=me.toArray(t)))return r=wr(r),a.forEach((function(t,i){!me.isUndefined(t)&&null!==t&&e.append(!0===s?_r([r],i,o):null===s?r:r+"[]",h(t))})),!1;return!!vr(t)||(e.append(_r(n,r,o),h(t)),!1)}const f=[],l=Object.assign(Mr,{defaultVisitor:u,convertValue:h,isVisitable:vr});if(!me.isObject(t))throw new TypeError("data must be an object");return function t(r,i){if(!me.isUndefined(r)){if(-1!==f.indexOf(r))throw Error("Circular reference detected in "+i.join("."));f.push(r),me.forEach(r,(function(r,o){!0===(!(me.isUndefined(r)||null===r)&&n.call(e,r,me.isString(o)?o.trim():o,i,l))&&t(r,i?i.concat(o):[o])})),f.pop()}}(t),e}function Er(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,(function(t){return e[t]}))}function kr(t,e){this._pairs=[],t&&Sr(t,this,e)}const Ar=kr.prototype;function Or(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Tr(t,e,r){if(!e)return t;const i=r&&r.encode||Or,n=r&&r.serialize;let o;if(o=n?n(e,r):me.isURLSearchParams(e)?e.toString():new kr(e,r).toString(i),o){const e=t.indexOf("#");-1!==e&&(t=t.slice(0,e)),t+=(-1===t.indexOf("?")?"?":"&")+o}return t}Ar.append=function(t,e){this._pairs.push([t,e])},Ar.toString=function(t){const e=t?function(e){return t.call(this,e,Er)}:Er;return this._pairs.map((function(t){return e(t[0])+"="+e(t[1])}),"").join("&")};var Ir=class{constructor(){this.handlers=[]}use(t,e,r){return this.handlers.push({fulfilled:t,rejected:e,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){me.forEach(this.handlers,(function(e){null!==e&&t(e)}))}},Rr={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Cr={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:kr,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const Pr="undefined"!=typeof window&&"undefined"!=typeof document,xr=(Nr="undefined"!=typeof navigator&&navigator.product,Pr&&["ReactNative","NativeScript","NS"].indexOf(Nr)<0);var Nr;const Br="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;var Lr={...Object.freeze({__proto__:null,hasBrowserEnv:Pr,hasStandardBrowserEnv:xr,hasStandardBrowserWebWorkerEnv:Br}),...Cr};function Dr(t){function e(t,r,i,n){let o=t[n++];const s=Number.isFinite(+o),a=n>=t.length;if(o=!o&&me.isArray(i)?i.length:o,a)return me.hasOwnProp(i,o)?i[o]=[i[o],r]:i[o]=r,!s;i[o]&&me.isObject(i[o])||(i[o]=[]);return e(t,r,i[o],n)&&me.isArray(i[o])&&(i[o]=function(t){const e={},r=Object.keys(t);let i;const n=r.length;let o;for(i=0;i{e(function(t){return me.matchAll(/\w+|\[(\w*)]/g,t).map((t=>"[]"===t[0]?"":t[1]||t[0]))}(t),i,r,0)})),r}return null}const jr={transitional:Rr,adapter:["xhr","http"],transformRequest:[function(t,e){const r=e.getContentType()||"",i=r.indexOf("application/json")>-1,n=me.isObject(t);n&&me.isHTMLForm(t)&&(t=new FormData(t));if(me.isFormData(t))return i&&i?JSON.stringify(Dr(t)):t;if(me.isArrayBuffer(t)||me.isBuffer(t)||me.isStream(t)||me.isFile(t)||me.isBlob(t))return t;if(me.isArrayBufferView(t))return t.buffer;if(me.isURLSearchParams(t))return e.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(n){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(t,e){return Sr(t,new Lr.classes.URLSearchParams,Object.assign({visitor:function(t,e,r,i){return Lr.isNode&&me.isBuffer(t)?(this.append(e,t.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},e))}(t,this.formSerializer).toString();if((o=me.isFileList(t))||r.indexOf("multipart/form-data")>-1){const e=this.env&&this.env.FormData;return Sr(o?{"files[]":t}:t,e&&new e,this.formSerializer)}}return n||i?(e.setContentType("application/json",!1),function(t,e,r){if(me.isString(t))try{return(e||JSON.parse)(t),me.trim(t)}catch(t){if("SyntaxError"!==t.name)throw t}return(r||JSON.stringify)(t)}(t)):t}],transformResponse:[function(t){const e=this.transitional||jr.transitional,r=e&&e.forcedJSONParsing,i="json"===this.responseType;if(t&&me.isString(t)&&(r&&!this.responseType||i)){const r=!(e&&e.silentJSONParsing)&&i;try{return JSON.parse(t)}catch(t){if(r){if("SyntaxError"===t.name)throw gr.from(t,gr.ERR_BAD_RESPONSE,this,null,this.response);throw t}}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Lr.classes.FormData,Blob:Lr.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};me.forEach(["delete","get","head","post","put","patch"],(t=>{jr.headers[t]={}}));var Ur=jr;const qr=me.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const Fr=Symbol("internals");function zr(t){return t&&String(t).trim().toLowerCase()}function Hr(t){return!1===t||null==t?t:me.isArray(t)?t.map(Hr):String(t)}function Kr(t,e,r,i,n){return me.isFunction(i)?i.call(this,e,r):(n&&(e=r),me.isString(e)?me.isString(i)?-1!==e.indexOf(i):me.isRegExp(i)?i.test(e):void 0:void 0)}class Vr{constructor(t){t&&this.set(t)}set(t,e,r){const i=this;function n(t,e,r){const n=zr(e);if(!n)throw new Error("header name must be a non-empty string");const o=me.findKey(i,n);(!o||void 0===i[o]||!0===r||void 0===r&&!1!==i[o])&&(i[o||e]=Hr(t))}const o=(t,e)=>me.forEach(t,((t,r)=>n(t,r,e)));return me.isPlainObject(t)||t instanceof this.constructor?o(t,e):me.isString(t)&&(t=t.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim())?o((t=>{const e={};let r,i,n;return t&&t.split("\n").forEach((function(t){n=t.indexOf(":"),r=t.substring(0,n).trim().toLowerCase(),i=t.substring(n+1).trim(),!r||e[r]&&qr[r]||("set-cookie"===r?e[r]?e[r].push(i):e[r]=[i]:e[r]=e[r]?e[r]+", "+i:i)})),e})(t),e):null!=t&&n(e,t,r),this}get(t,e){if(t=zr(t)){const r=me.findKey(this,t);if(r){const t=this[r];if(!e)return t;if(!0===e)return function(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=r.exec(t);)e[i[1]]=i[2];return e}(t);if(me.isFunction(e))return e.call(this,t,r);if(me.isRegExp(e))return e.exec(t);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,e){if(t=zr(t)){const r=me.findKey(this,t);return!(!r||void 0===this[r]||e&&!Kr(0,this[r],r,e))}return!1}delete(t,e){const r=this;let i=!1;function n(t){if(t=zr(t)){const n=me.findKey(r,t);!n||e&&!Kr(0,r[n],n,e)||(delete r[n],i=!0)}}return me.isArray(t)?t.forEach(n):n(t),i}clear(t){const e=Object.keys(this);let r=e.length,i=!1;for(;r--;){const n=e[r];t&&!Kr(0,this[n],n,t,!0)||(delete this[n],i=!0)}return i}normalize(t){const e=this,r={};return me.forEach(this,((i,n)=>{const o=me.findKey(r,n);if(o)return e[o]=Hr(i),void delete e[n];const s=t?function(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,((t,e,r)=>e.toUpperCase()+r))}(n):String(n).trim();s!==n&&delete e[n],e[s]=Hr(i),r[s]=!0})),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const e=Object.create(null);return me.forEach(this,((r,i)=>{null!=r&&!1!==r&&(e[i]=t&&me.isArray(r)?r.join(", "):r)})),e}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map((([t,e])=>t+": "+e)).join("\n")}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...e){const r=new this(t);return e.forEach((t=>r.set(t))),r}static accessor(t){const e=(this[Fr]=this[Fr]={accessors:{}}).accessors,r=this.prototype;function i(t){const i=zr(t);e[i]||(!function(t,e){const r=me.toCamelCase(" "+e);["get","set","has"].forEach((i=>{Object.defineProperty(t,i+r,{value:function(t,r,n){return this[i].call(this,e,t,r,n)},configurable:!0})}))}(r,t),e[i]=!0)}return me.isArray(t)?t.forEach(i):i(t),this}}Vr.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),me.reduceDescriptors(Vr.prototype,(({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(t){this[r]=t}}})),me.freezeMethods(Vr);var Gr=Vr;function Wr(t,e){const r=this||Ur,i=e||r,n=Gr.from(i.headers);let o=i.data;return me.forEach(t,(function(t){o=t.call(r,o,n.normalize(),e?e.status:void 0)})),n.normalize(),o}function Yr(t){return!(!t||!t.__CANCEL__)}function Zr(t,e,r){gr.call(this,null==t?"canceled":t,gr.ERR_CANCELED,e,r),this.name="CanceledError"}me.inherits(Zr,gr,{__CANCEL__:!0});var Xr=Lr.hasStandardBrowserEnv?{write(t,e,r,i,n,o){const s=[t+"="+encodeURIComponent(e)];me.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),me.isString(i)&&s.push("path="+i),me.isString(n)&&s.push("domain="+n),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read(t){const e=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return e?decodeURIComponent(e[3]):null},remove(t){this.write(t,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Qr(t,e){return t&&!function(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}(e)?function(t,e){return e?t.replace(/\/+$/,"")+"/"+e.replace(/^\/+/,""):t}(t,e):e}var Jr=Lr.hasStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),e=document.createElement("a");let r;function i(r){let i=r;return t&&(e.setAttribute("href",i),i=e.href),e.setAttribute("href",i),{href:e.href,protocol:e.protocol?e.protocol.replace(/:$/,""):"",host:e.host,search:e.search?e.search.replace(/^\?/,""):"",hash:e.hash?e.hash.replace(/^#/,""):"",hostname:e.hostname,port:e.port,pathname:"/"===e.pathname.charAt(0)?e.pathname:"/"+e.pathname}}return r=i(window.location.href),function(t){const e=me.isString(t)?i(t):t;return e.protocol===r.protocol&&e.host===r.host}}():function(){return!0};function $r(t,e){let r=0;const i=function(t,e){t=t||10;const r=new Array(t),i=new Array(t);let n,o=0,s=0;return e=void 0!==e?e:1e3,function(a){const h=Date.now(),u=i[s];n||(n=h),r[o]=a,i[o]=h;let f=s,l=0;for(;f!==o;)l+=r[f++],f%=t;if(o=(o+1)%t,o===s&&(s=(s+1)%t),h-n{const o=n.loaded,s=n.lengthComputable?n.total:void 0,a=o-r,h=i(a);r=o;const u={loaded:o,total:s,progress:s?o/s:void 0,bytes:a,rate:h||void 0,estimated:h&&s&&o<=s?(s-o)/h:void 0,event:n};u[e?"download":"upload"]=!0,t(u)}}var ti="undefined"!=typeof XMLHttpRequest&&function(t){return new Promise((function(e,r){let i=t.data;const n=Gr.from(t.headers).normalize();let o,s,{responseType:a,withXSRFToken:h}=t;function u(){t.cancelToken&&t.cancelToken.unsubscribe(o),t.signal&&t.signal.removeEventListener("abort",o)}if(me.isFormData(i))if(Lr.hasStandardBrowserEnv||Lr.hasStandardBrowserWebWorkerEnv)n.setContentType(!1);else if(!1!==(s=n.getContentType())){const[t,...e]=s?s.split(";").map((t=>t.trim())).filter(Boolean):[];n.setContentType([t||"multipart/form-data",...e].join("; "))}let f=new XMLHttpRequest;if(t.auth){const e=t.auth.username||"",r=t.auth.password?unescape(encodeURIComponent(t.auth.password)):"";n.set("Authorization","Basic "+btoa(e+":"+r))}const l=Qr(t.baseURL,t.url);function c(){if(!f)return;const i=Gr.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders());!function(t,e,r){const i=r.config.validateStatus;r.status&&i&&!i(r.status)?e(new gr("Request failed with status code "+r.status,[gr.ERR_BAD_REQUEST,gr.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):t(r)}((function(t){e(t),u()}),(function(t){r(t),u()}),{data:a&&"text"!==a&&"json"!==a?f.response:f.responseText,status:f.status,statusText:f.statusText,headers:i,config:t,request:f}),f=null}if(f.open(t.method.toUpperCase(),Tr(l,t.params,t.paramsSerializer),!0),f.timeout=t.timeout,"onloadend"in f?f.onloadend=c:f.onreadystatechange=function(){f&&4===f.readyState&&(0!==f.status||f.responseURL&&0===f.responseURL.indexOf("file:"))&&setTimeout(c)},f.onabort=function(){f&&(r(new gr("Request aborted",gr.ECONNABORTED,t,f)),f=null)},f.onerror=function(){r(new gr("Network Error",gr.ERR_NETWORK,t,f)),f=null},f.ontimeout=function(){let e=t.timeout?"timeout of "+t.timeout+"ms exceeded":"timeout exceeded";const i=t.transitional||Rr;t.timeoutErrorMessage&&(e=t.timeoutErrorMessage),r(new gr(e,i.clarifyTimeoutError?gr.ETIMEDOUT:gr.ECONNABORTED,t,f)),f=null},Lr.hasStandardBrowserEnv&&(h&&me.isFunction(h)&&(h=h(t)),h||!1!==h&&Jr(l))){const e=t.xsrfHeaderName&&t.xsrfCookieName&&Xr.read(t.xsrfCookieName);e&&n.set(t.xsrfHeaderName,e)}void 0===i&&n.setContentType(null),"setRequestHeader"in f&&me.forEach(n.toJSON(),(function(t,e){f.setRequestHeader(e,t)})),me.isUndefined(t.withCredentials)||(f.withCredentials=!!t.withCredentials),a&&"json"!==a&&(f.responseType=t.responseType),"function"==typeof t.onDownloadProgress&&f.addEventListener("progress",$r(t.onDownloadProgress,!0)),"function"==typeof t.onUploadProgress&&f.upload&&f.upload.addEventListener("progress",$r(t.onUploadProgress)),(t.cancelToken||t.signal)&&(o=e=>{f&&(r(!e||e.type?new Zr(null,t,f):e),f.abort(),f=null)},t.cancelToken&&t.cancelToken.subscribe(o),t.signal&&(t.signal.aborted?o():t.signal.addEventListener("abort",o)));const d=function(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}(l);d&&-1===Lr.protocols.indexOf(d)?r(new gr("Unsupported protocol "+d+":",gr.ERR_BAD_REQUEST,t)):f.send(i||null)}))};const ei={http:null,xhr:ti};me.forEach(ei,((t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch(t){}Object.defineProperty(t,"adapterName",{value:e})}}));const ri=t=>`- ${t}`,ii=t=>me.isFunction(t)||null===t||!1===t;var ni=t=>{t=me.isArray(t)?t:[t];const{length:e}=t;let r,i;const n={};for(let o=0;o`adapter ${t} `+(!1===e?"is not supported by the environment":"is not available in the build")));throw new gr("There is no suitable adapter to dispatch the request "+(e?t.length>1?"since :\n"+t.map(ri).join("\n"):" "+ri(t[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return i};function oi(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Zr(null,t)}function si(t){oi(t),t.headers=Gr.from(t.headers),t.data=Wr.call(t,t.transformRequest),-1!==["post","put","patch"].indexOf(t.method)&&t.headers.setContentType("application/x-www-form-urlencoded",!1);return ni(t.adapter||Ur.adapter)(t).then((function(e){return oi(t),e.data=Wr.call(t,t.transformResponse,e),e.headers=Gr.from(e.headers),e}),(function(e){return Yr(e)||(oi(t),e&&e.response&&(e.response.data=Wr.call(t,t.transformResponse,e.response),e.response.headers=Gr.from(e.response.headers))),Promise.reject(e)}))}const ai=t=>t instanceof Gr?t.toJSON():t;function hi(t,e){e=e||{};const r={};function i(t,e,r){return me.isPlainObject(t)&&me.isPlainObject(e)?me.merge.call({caseless:r},t,e):me.isPlainObject(e)?me.merge({},e):me.isArray(e)?e.slice():e}function n(t,e,r){return me.isUndefined(e)?me.isUndefined(t)?void 0:i(void 0,t,r):i(t,e,r)}function o(t,e){if(!me.isUndefined(e))return i(void 0,e)}function s(t,e){return me.isUndefined(e)?me.isUndefined(t)?void 0:i(void 0,t):i(void 0,e)}function a(r,n,o){return o in e?i(r,n):o in t?i(void 0,r):void 0}const h={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(t,e)=>n(ai(t),ai(e),!0)};return me.forEach(Object.keys(Object.assign({},t,e)),(function(i){const o=h[i]||n,s=o(t[i],e[i],i);me.isUndefined(s)&&o!==a||(r[i]=s)})),r}const ui="1.6.2",fi={};["object","boolean","number","function","string","symbol"].forEach(((t,e)=>{fi[t]=function(r){return typeof r===t||"a"+(e<1?"n ":" ")+t}}));const li={};fi.transitional=function(t,e,r){function i(t,e){return"[Axios v1.6.2] Transitional option '"+t+"'"+e+(r?". "+r:"")}return(r,n,o)=>{if(!1===t)throw new gr(i(n," has been removed"+(e?" in "+e:"")),gr.ERR_DEPRECATED);return e&&!li[n]&&(li[n]=!0,console.warn(i(n," has been deprecated since v"+e+" and will be removed in the near future"))),!t||t(r,n,o)}};var ci={assertOptions:function(t,e,r){if("object"!=typeof t)throw new gr("options must be an object",gr.ERR_BAD_OPTION_VALUE);const i=Object.keys(t);let n=i.length;for(;n-- >0;){const o=i[n],s=e[o];if(s){const e=t[o],r=void 0===e||s(e,o,t);if(!0!==r)throw new gr("option "+o+" must be "+r,gr.ERR_BAD_OPTION_VALUE)}else if(!0!==r)throw new gr("Unknown option "+o,gr.ERR_BAD_OPTION)}},validators:fi};const di=ci.validators;class pi{constructor(t){this.defaults=t,this.interceptors={request:new Ir,response:new Ir}}request(t,e){"string"==typeof t?(e=e||{}).url=t:e=t||{},e=hi(this.defaults,e);const{transitional:r,paramsSerializer:i,headers:n}=e;void 0!==r&&ci.assertOptions(r,{silentJSONParsing:di.transitional(di.boolean),forcedJSONParsing:di.transitional(di.boolean),clarifyTimeoutError:di.transitional(di.boolean)},!1),null!=i&&(me.isFunction(i)?e.paramsSerializer={serialize:i}:ci.assertOptions(i,{encode:di.function,serialize:di.function},!0)),e.method=(e.method||this.defaults.method||"get").toLowerCase();let o=n&&me.merge(n.common,n[e.method]);n&&me.forEach(["delete","get","head","post","put","patch","common"],(t=>{delete n[t]})),e.headers=Gr.concat(o,n);const s=[];let a=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(a=a&&t.synchronous,s.unshift(t.fulfilled,t.rejected))}));const h=[];let u;this.interceptors.response.forEach((function(t){h.push(t.fulfilled,t.rejected)}));let f,l=0;if(!a){const t=[si.bind(this),void 0];for(t.unshift.apply(t,s),t.push.apply(t,h),f=t.length,u=Promise.resolve(e);l{if(!r._listeners)return;let e=r._listeners.length;for(;e-- >0;)r._listeners[e](t);r._listeners=null})),this.promise.then=t=>{let e;const i=new Promise((t=>{r.subscribe(t),e=t})).then(t);return i.cancel=function(){r.unsubscribe(e)},i},t((function(t,i,n){r.reason||(r.reason=new Zr(t,i,n),e(r.reason))}))}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){this.reason?t(this.reason):this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const e=this._listeners.indexOf(t);-1!==e&&this._listeners.splice(e,1)}static source(){let t;const e=new gi((function(e){t=e}));return{token:e,cancel:t}}}var yi=gi;const bi={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(bi).forEach((([t,e])=>{bi[e]=t}));var vi=bi;const wi=function t(e){const r=new mi(e),i=Lt(mi.prototype.request,r);return me.extend(i,mi.prototype,r,{allOwnKeys:!0}),me.extend(i,r,null,{allOwnKeys:!0}),i.create=function(r){return t(hi(e,r))},i}(Ur);wi.Axios=mi,wi.CanceledError=Zr,wi.CancelToken=yi,wi.isCancel=Yr,wi.VERSION=ui,wi.toFormData=Sr,wi.AxiosError=gr,wi.Cancel=wi.CanceledError,wi.all=function(t){return Promise.all(t)},wi.spread=function(t){return function(e){return t.apply(null,e)}},wi.isAxiosError=function(t){return me.isObject(t)&&!0===t.isAxiosError},wi.mergeConfig=hi,wi.AxiosHeaders=Gr,wi.formToJSON=t=>Dr(me.isHTMLForm(t)?new FormData(t):t),wi.getAdapter=ni,wi.HttpStatusCode=vi,wi.default=wi;var _i=wi;const Mi={async parse({node:t}){const{refId:e}=t;for(let r=0;r{this.parseFlowNode(t,e)}))}},ki={async parse({node:t}){const e=this.getOutInstance("ssp");if(!e)return Promise.reject("In SoonFlow: path-element-node not have ssp!");const r=this.getOutInstance("cpsManager");if(r){const i=(await r.getTopologies()).find((e=>e.id===t.refId));i&&e.createTopology(i)}else{const{config:r}=t,{pathData:i}=JSON.parse(r);e.createTopology({type:"network",...i,imgUrl:i.imgUri?.path??void 0,animation:{duration:i.animation?.duration??0}})}for(let e=0;e{const t=r.getObjectById(n);if(!t)return Promise.reject(`In SoonFlow: object-animation-node 场景中未找到 modelId 为 "${n}" 的模型对象`);switch(a){case Oi.PLAY:r.playModelAnimation(t,s);break;case Oi.STOP:r.stopModelAnimation(t,s)}await r.utils.sleep(u)})();break;case Ai.CLIP:await(async()=>{switch(a){case Oi.PLAY:(async(t,e,r)=>{const{cilpAnimationKeyframes:i}=r,n=Ti.get(e),o=t.getObjectById(e);if(!o)return xt(`播放模型动画 -> 方法 playCilpAnimation 执行时 modelId 为 ${e} 场景对象未找到`);if(n){n.tween.stop();const{positionX:r,positionY:i,positionZ:s,rotationX:a,rotationY:h,rotationZ:u,scaleX:f,scaleY:l,scaleZ:c}=n.source;o.position.set(r,i,s),o.rotation.set(a,h,u),o.scale.set(f,l,c),t.render(),Ti.delete(e)}for(let r=0;r{o.position.set(t,e,r),o.rotation.set(i,n,s),o.scale.set(a,h,u)}),(t=>{Ti.set(e,{source:JSON.parse(JSON.stringify(n)),tween:t})})),Ti.delete(e)}})(r,n,i);break;case Oi.STOP:(async t=>{Ti.get(t)?.tween.stop(),Ti.delete(t)})(n)}await r.utils.sleep(u)})()}for(let r=0;r{if(!s)return Promise.reject("In SoonFlow: object-viewpoint-node 解析时缺少视角数据!");await r.flyTo(s.position,s.rotation,{duration:u})})();break;case Ci.FIXED:await(async()=>{const t=r.getObjectById(n);if(!t)return Promise.reject(`In SoonFlow: object-viewpoint-node 场景中未找到 modelId 为 "${n}" 的模型对象!`);await r.flyToObj(t,a,{duration:u})})()}for(let r=0;r{let r=t.defaultValue;switch(t.varType){case"boolean":r="boolean"==typeof t.defaultValue?t.defaultValue:"true"===t.defaultValue;break;case"number":r=Number(t.defaultValue)}e[t.parameterName]=r})),e}const Bi={async parse({node:t,inputData:e}){const r=this.getOutInstance("ssp");if(!r)return Promise.reject("In SoonFlow: action-node not have ssp!");const{type:i,refId:n,fromInteraction:o,eventKey:s,nodeId:a}=e,{behaviorType:h,actionCode:u,customCode:f,behaviorVars:l,delay:c,duration:d}=JSON.parse(t.config);await r.utils.sleep(c);const p=[];switch(i){case"model":case"path":{const t=r.getObjectById(n);t&&p.push(t)}break;case"material":p.push(...r.getObjectByUserDataProperty("familyId",n))}if(o)if("SYS"===h||"CUS"===h){const e=Ni(l);p.forEach((i=>{this.addSignal(`${a}_${i.sid}_${s}`,(async()=>{const n=new Function("{ssp, vars, _this}",`(async () => { ${u} })()`);await n({ssp:r,vars:e,_this:i}),await r.utils.sleep(d);for(let e=0;e{this.addSignal(`${a}_${i.sid}_${s}`,(async()=>{const n=new Function("{ ssp, object, inputData }",`(async () => { ${f} })()`);await n({ssp:r,object:i,inputData:e}),await r.utils.sleep(d);for(let e=0;e { ${u} })()`);await n({ssp:r,vars:t,_this:i})}}else if("CUSTOM"===h)for(let t=0;t { ${f} })()`);await n({ssp:r,object:i,inputData:e})}await r.utils.sleep(d);for(let e=0;e{if(!e)return;let i=null;switch(r){case"click":i=e.onClick,e.onClick=()=>{i?.(),this.dispatchSignal(`${t.id}_${e.sid}_${r}`)};break;case"dblClick":i=e.onDblClick,e.onDblClick=()=>{i?.(),this.dispatchSignal(`${t.id}_${e.sid}_${r}`)};break;case"rightClick":i=e.onRightClick,e.onRightClick=()=>{i?.(),this.dispatchSignal(`${t.id}_${e.sid}_${r}`)}}},s=[];switch(i){case"model":{const t=r.getObjectById(n);t&&s.push(t)}break;case"material":s.push(...r.getObjectByUserDataProperty("familyId",n))}const{eventKey:a}=JSON.parse(t.config);s.forEach((t=>o(t,a)));for(let r=0;rt.reduce(((t,e)=>(e.key&&(t[e.key]=e.value),t)),{}),Ui={async parse({node:t}){const e=JSON.parse(t.config),{address:r,bodies:i,bodyType:n,headers:o,params:s,type:a}=e.requestInfo;let h,u,f;if(s.length>0&&(h=ji(s)),i.length>0)if("multipart/form-data"===n){const t=new FormData;i.map((e=>{t.set(e.key,e.value)})),u=t}else u="application/x-www-form-urlencoded"===n?new URLSearchParams(i.map((t=>[t.key,t.value]))):ji(i);o.length>0&&(f=ji(o));try{const e=await _i({method:a,url:r,params:h,data:u,headers:f});for(let r=0;r1)for(var r=1;r */ -!function(t,e){var r=zn,i=r.Buffer;function n(t,e){for(var r in t)e[r]=t[r]}function o(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(n(r,e),e.Buffer=o),o.prototype=Object.create(i.prototype),n(i,o),o.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},o.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},o.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},o.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}}(Fn,qn);var Hn=65536,Kn=4294967295;var Vn=qn.Buffer,Gn=Y.crypto||Y.msCrypto;Gn&&Gn.getRandomValues?Un.exports=function(t,e){if(t>Kn)throw new RangeError("requested too many random bytes");var r=Vn.allocUnsafe(t);if(t>0)if(t>Hn)for(var i=0;i0&&s.length>n){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+e+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=t,a.type=e,a.count=s.length,function(t){"function"==typeof console.warn?console.warn(t):console.log(t)}(a)}}else s=o[e]=r,++t._eventsCount;return t}function eo(t,e,r){var i=!1;function n(){t.removeListener(e,n),i||(i=!0,r.apply(t,arguments))}return n.listener=r,n}function ro(t){var e=this._events;if(e){var r=e[t];if("function"==typeof r)return 1;if(r)return r.length}return 0}function io(t,e){for(var r=new Array(e);e--;)r[e]=t[e];return r}Qn.prototype=Object.create(null),Jn.EventEmitter=Jn,Jn.usingDomains=!1,Jn.prototype.domain=void 0,Jn.prototype._events=void 0,Jn.prototype._maxListeners=void 0,Jn.defaultMaxListeners=10,Jn.init=function(){this.domain=null,Jn.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new Qn,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Jn.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this},Jn.prototype.getMaxListeners=function(){return $n(this)},Jn.prototype.emit=function(t){var e,r,i,n,o,s,a,h="error"===t;if(s=this._events)h=h&&null==s.error;else if(!h)return!1;if(a=this.domain,h){if(e=arguments[1],!a){if(e instanceof Error)throw e;var u=new Error('Uncaught, unspecified "error" event. ('+e+")");throw u.context=e,u}return e||(e=new Error('Uncaught, unspecified "error" event')),e.domainEmitter=this,e.domain=a,e.domainThrown=!1,a.emit("error",e),!1}if(!(r=s[t]))return!1;var f="function"==typeof r;switch(i=arguments.length){case 1:!function(t,e,r){if(e)t.call(r);else for(var i=t.length,n=io(t,i),o=0;o0;)if(r[o]===e||r[o].listener&&r[o].listener===e){s=r[o].listener,n=o;break}if(n<0)return this;if(1===r.length){if(r[0]=void 0,0==--this._eventsCount)return this._events=new Qn,this;delete i[t]}else!function(t,e){for(var r=e,i=r+1,n=t.length;i0?Reflect.ownKeys(this._events):[]};var no=X(Object.freeze({__proto__:null,EventEmitter:Jn,default:Jn})),oo=no.EventEmitter,so="function"==typeof Object.create?function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t},ao=/%[sdj%]/g;function ho(t){if(!ko(t)){for(var e=[],r=0;r=n)return t;switch(t){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch(t){return"[Circular]"}default:return t}})),s=i[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),_o(e)?r.showHidden=e:e&&Uo(r,e),Oo(r.showHidden)&&(r.showHidden=!1),Oo(r.depth)&&(r.depth=2),Oo(r.colors)&&(r.colors=!1),Oo(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=mo),yo(r,t,r.depth)}function mo(t,e){var r=po.styles[e];return r?"["+po.colors[r][0]+"m"+t+"["+po.colors[r][1]+"m":t}function go(t,e){return t}function yo(t,e,r){if(t.customInspect&&e&&Po(e.inspect)&&e.inspect!==po&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(r,t);return ko(i)||(i=yo(t,i,r)),i}var n=function(t,e){if(Oo(e))return t.stylize("undefined","undefined");if(ko(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(Eo(e))return t.stylize(""+e,"number");if(_o(e))return t.stylize(""+e,"boolean");if(Mo(e))return t.stylize("null","null")}(t,e);if(n)return n;var o=Object.keys(e),s=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),Co(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return bo(e);if(0===o.length){if(Po(e)){var a=e.name?": "+e.name:"";return t.stylize("[Function"+a+"]","special")}if(To(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(Ro(e))return t.stylize(Date.prototype.toString.call(e),"date");if(Co(e))return bo(e)}var h,u="",f=!1,l=["{","}"];(wo(e)&&(f=!0,l=["[","]"]),Po(e))&&(u=" [Function"+(e.name?": "+e.name:"")+"]");return To(e)&&(u=" "+RegExp.prototype.toString.call(e)),Ro(e)&&(u=" "+Date.prototype.toUTCString.call(e)),Co(e)&&(u=" "+bo(e)),0!==o.length||f&&0!=e.length?r<0?To(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),h=f?function(t,e,r,i,n){for(var o=[],s=0,a=e.length;s60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(h,u,l)):l[0]+u+l[1]}function bo(t){return"["+Error.prototype.toString.call(t)+"]"}function vo(t,e,r,i,n,o){var s,a,h;if((h=Object.getOwnPropertyDescriptor(e,n)||{value:e[n]}).get?a=h.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):h.set&&(a=t.stylize("[Setter]","special")),qo(i,n)||(s="["+n+"]"),a||(t.seen.indexOf(h.value)<0?(a=Mo(r)?yo(t,h.value,null):yo(t,h.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+a.split("\n").map((function(t){return" "+t})).join("\n")):a=t.stylize("[Circular]","special")),Oo(s)){if(o&&n.match(/^\d+$/))return a;(s=JSON.stringify(""+n)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function wo(t){return Array.isArray(t)}function _o(t){return"boolean"==typeof t}function Mo(t){return null===t}function So(t){return null==t}function Eo(t){return"number"==typeof t}function ko(t){return"string"==typeof t}function Ao(t){return"symbol"==typeof t}function Oo(t){return void 0===t}function To(t){return Io(t)&&"[object RegExp]"===Bo(t)}function Io(t){return"object"==typeof t&&null!==t}function Ro(t){return Io(t)&&"[object Date]"===Bo(t)}function Co(t){return Io(t)&&("[object Error]"===Bo(t)||t instanceof Error)}function Po(t){return"function"==typeof t}function xo(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t}function No(t){return Re.isBuffer(t)}function Bo(t){return Object.prototype.toString.call(t)}function Lo(t){return t<10?"0"+t.toString(10):t.toString(10)}po.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},po.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};var Do=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function jo(){console.log("%s - %s",function(){var t=new Date,e=[Lo(t.getHours()),Lo(t.getMinutes()),Lo(t.getSeconds())].join(":");return[t.getDate(),Do[t.getMonth()],e].join(" ")}(),ho.apply(null,arguments))}function Uo(t,e){if(!e||!Io(e))return t;for(var r=Object.keys(e),i=r.length;i--;)t[r[i]]=e[r[i]];return t}function qo(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var Fo,zo,Ho={inherits:so,_extend:Uo,log:jo,isBuffer:No,isPrimitive:xo,isFunction:Po,isError:Co,isDate:Ro,isObject:Io,isRegExp:To,isUndefined:Oo,isSymbol:Ao,isString:ko,isNumber:Eo,isNullOrUndefined:So,isNull:Mo,isBoolean:_o,isArray:wo,inspect:po,deprecate:uo,format:ho,debuglog:co},Ko=X(Object.freeze({__proto__:null,_extend:Uo,debuglog:co,default:Ho,deprecate:uo,format:ho,inherits:so,inspect:po,isArray:wo,isBoolean:_o,isBuffer:No,isDate:Ro,isError:Co,isFunction:Po,isNull:Mo,isNullOrUndefined:So,isNumber:Eo,isObject:Io,isPrimitive:xo,isRegExp:To,isString:ko,isSymbol:Ao,isUndefined:Oo,log:jo}));function Vo(){if(zo)return Fo;function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function e(e){for(var i=1;i0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return o.alloc(0);for(var e,r,i,n=o.allocUnsafe(t>>>0),s=this.head,a=0;s;)e=s.data,r=n,i=a,o.prototype.copy.call(e,r,i),a+=s.data.length,s=s.next;return n}},{key:"consume",value:function(t,e){var r;return tn.length?n.length:t;if(o===n.length?i+=n:i+=n.slice(0,t),0==(t-=o)){o===n.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=n.slice(o));break}++r}return this.length-=r,i}},{key:"_getBuffer",value:function(t){var e=o.allocUnsafe(t),r=this.head,i=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var n=r.data,s=t>n.length?n.length:t;if(n.copy(e,e.length-t,0,s),0==(t-=s)){s===n.length?(++i,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=n.slice(s));break}++i}return this.length-=i,e}},{key:a,value:function(t,r){return s(this,e(e({},r),{},{depth:0,customInspect:!1}))}}],n&&i(r.prototype,n),h&&i(r,h),Object.defineProperty(r,"prototype",{writable:!1}),t}(),Fo}function Go(t,e){Yo(t,e),Wo(t)}function Wo(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function Yo(t,e){t.emit("error",e)}var Zo={destroy:function(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,Bn.nextTick(Yo,this,t)):Bn.nextTick(Yo,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?r._writableState?r._writableState.errorEmitted?Bn.nextTick(Wo,r):(r._writableState.errorEmitted=!0,Bn.nextTick(Go,r,t)):Bn.nextTick(Go,r,t):e?(Bn.nextTick(Wo,r),e(t)):Bn.nextTick(Wo,r)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}},Xo={};var Qo={};function Jo(t,e,r){r||(r=Error);var i=function(t){var r,i;function n(r,i,n){return t.call(this,function(t,r,i){return"string"==typeof e?e:e(t,r,i)}(r,i,n))||this}return i=t,(r=n).prototype=Object.create(i.prototype),r.prototype.constructor=r,r.__proto__=i,n}(r);i.prototype.name=r.name,i.prototype.code=t,Qo[t]=i}function $o(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}Jo("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),Jo("ERR_INVALID_ARG_TYPE",(function(t,e,r){var i,n,o,s;if("string"==typeof e&&(n="not ",e.substr(!o||o<0?0:+o,n.length)===n)?(i="must not be",e=e.replace(/^not /,"")):i="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))s="The ".concat(t," ").concat(i," ").concat($o(e,"type"));else{var a=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";s='The "'.concat(t,'" ').concat(a," ").concat(i," ").concat($o(e,"type"))}return s+=". Received type ".concat(typeof r)}),TypeError),Jo("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),Jo("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),Jo("ERR_STREAM_PREMATURE_CLOSE","Premature close"),Jo("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),Jo("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),Jo("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),Jo("ERR_STREAM_WRITE_AFTER_END","write after end"),Jo("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),Jo("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),Jo("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Xo.codes=Qo;var ts=Xo.codes.ERR_INVALID_OPT_VALUE;var es,rs,is,ns,os,ss,as={getHighWaterMark:function(t,e,r,i){var n=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=n){if(!isFinite(n)||Math.floor(n)!==n||n<0)throw new ts(i?r:"highWaterMark",n);return Math.floor(n)}return t.objectMode?16:16384}};function hs(){if(rs)return es;function t(t){try{if(!Y.localStorage)return!1}catch(t){return!1}var e=Y.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}return rs=1,es=function(e,r){if(t("noDeprecation"))return e;var i=!1;return function(){if(!i){if(t("throwDeprecation"))throw new Error(r);t("traceDeprecation")?console.trace(r):console.warn(r),i=!0}return e.apply(this,arguments)}},es}function us(){if(ns)return is;function t(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var i=t.entry;t.entry=null;for(;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}(e,t)}}var e;ns=1,is=_,_.WritableState=w;var r={deprecate:hs()},i=oo,n=zn.Buffer,o=(void 0!==Y?Y:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var s,a=Zo,h=as.getHighWaterMark,u=Xo.codes,f=u.ERR_INVALID_ARG_TYPE,l=u.ERR_METHOD_NOT_IMPLEMENTED,c=u.ERR_MULTIPLE_CALLBACK,d=u.ERR_STREAM_CANNOT_PIPE,p=u.ERR_STREAM_DESTROYED,m=u.ERR_STREAM_NULL_VALUES,g=u.ERR_STREAM_WRITE_AFTER_END,y=u.ERR_UNKNOWN_ENCODING,b=a.errorOrDestroy;function v(){}function w(r,i,n){e=e||fs(),r=r||{},"boolean"!=typeof n&&(n=i instanceof e),this.objectMode=!!r.objectMode,n&&(this.objectMode=this.objectMode||!!r.writableObjectMode),this.highWaterMark=h(this,r,"writableHighWaterMark",n),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===r.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=r.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if("function"!=typeof n)throw new c;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,i,n){--e.pendingcb,r?(Bn.nextTick(n,i),Bn.nextTick(O,t,e),t._writableState.errorEmitted=!0,b(t,i)):(n(i),t._writableState.errorEmitted=!0,b(t,i),O(t,e))}(t,r,i,e,n);else{var o=k(r)||t.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||E(t,r),i?Bn.nextTick(S,t,r,o,n):S(t,r,o,n)}}(i,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==r.emitClose,this.autoDestroy=!!r.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}function _(t){var r=this instanceof(e=e||fs());if(!r&&!s.call(_,this))return new _(t);this._writableState=new w(t,this,r),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),i.call(this)}function M(t,e,r,i,n,o,s){e.writelen=i,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new p("write")):r?t._writev(n,e.onwrite):t._write(n,o,e.onwrite),e.sync=!1}function S(t,e,r,i){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,i(),O(t,e)}function E(e,r){r.bufferProcessing=!0;var i=r.bufferedRequest;if(e._writev&&i&&i.next){var n=r.bufferedRequestCount,o=new Array(n),s=r.corkedRequestsFree;s.entry=i;for(var a=0,h=!0;i;)o[a]=i,i.isBuf||(h=!1),i=i.next,a+=1;o.allBuffers=h,M(e,r,!0,r.length,o,"",s.finish),r.pendingcb++,r.lastBufferedRequest=null,s.next?(r.corkedRequestsFree=s.next,s.next=null):r.corkedRequestsFree=new t(r),r.bufferedRequestCount=0}else{for(;i;){var u=i.chunk,f=i.encoding,l=i.callback;if(M(e,r,!1,r.objectMode?1:u.length,u,f,l),i=i.next,r.bufferedRequestCount--,r.writing)break}null===i&&(r.lastBufferedRequest=null)}r.bufferedRequest=i,r.bufferProcessing=!1}function k(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function A(t,e){t._final((function(r){e.pendingcb--,r&&b(t,r),e.prefinished=!0,t.emit("prefinish"),O(t,e)}))}function O(t,e){var r=k(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,Bn.nextTick(A,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}return Wn(_,i),w.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(w.prototype,"buffer",{get:r.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(_,Symbol.hasInstance,{value:function(t){return!!s.call(this,t)||this===_&&(t&&t._writableState instanceof w)}})):s=function(t){return t instanceof this},_.prototype.pipe=function(){b(this,new d)},_.prototype.write=function(t,e,r){var i,s=this._writableState,a=!1,h=!s.objectMode&&(i=t,n.isBuffer(i)||i instanceof o);return h&&!n.isBuffer(t)&&(t=function(t){return n.from(t)}(t)),"function"==typeof e&&(r=e,e=null),h?e="buffer":e||(e=s.defaultEncoding),"function"!=typeof r&&(r=v),s.ending?function(t,e){var r=new g;b(t,r),Bn.nextTick(e,r)}(this,r):(h||function(t,e,r,i){var n;return null===r?n=new m:"string"==typeof r||e.objectMode||(n=new f("chunk",["string","Buffer"],r)),!n||(b(t,n),Bn.nextTick(i,n),!1)}(this,s,t,r))&&(s.pendingcb++,a=function(t,e,r,i,o,s){if(!r){var a=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=n.from(e,r));return e}(e,i,o);i!==a&&(r=!0,o="buffer",i=a)}var h=e.objectMode?1:i.length;e.length+=h;var u=e.length-1))throw new y(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(_.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(_.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),_.prototype._write=function(t,e,r){r(new l("_write()"))},_.prototype._writev=null,_.prototype.end=function(t,e,r){var i=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,r){e.ending=!0,O(t,e),r&&(e.finished?Bn.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,i,r),this},Object.defineProperty(_.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(_.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),_.prototype.destroy=a.destroy,_.prototype._undestroy=a.undestroy,_.prototype._destroy=function(t,e){e(t)},is}function fs(){if(ss)return os;ss=1;var t=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};os=s;var e=Es(),r=us();Wn(s,e);for(var i=t(r.prototype),n=0;n>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function n(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function o(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function s(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function a(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function u(t){return t.toString(this.encoding)}function f(t){return t&&t.length?this.write(t):""}return cs.StringDecoder=r,r.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return o>0&&(t.lastNeed=o-1),o;if(--n=0)return o>0&&(t.lastNeed=o-2),o;if(--n=0)return o>0&&(2===o?o=0:t.lastNeed=o-3),o;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},r.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length},cs}var ps=Xo.codes.ERR_STREAM_PREMATURE_CLOSE;function ms(){}var gs,ys,bs,vs,ws,_s,Ms=function t(e,r,i){if("function"==typeof r)return t(e,null,r);r||(r={}),i=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n0)if("string"==typeof e||u.objectMode||Object.getPrototypeOf(e)===i.prototype||(e=function(t){return i.from(t)}(e)),s)u.endEmitted?b(t,new y):S(t,u,e,!0);else if(u.ended)b(t,new m);else{if(u.destroyed)return!1;u.reading=!1,u.decoder&&!r?(e=u.decoder.write(e),u.objectMode||0!==e.length?S(t,u,e,!1):T(t,u)):S(t,u,e,!1)}else s||(u.reading=!1,T(t,u));return!u.ended&&(u.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=E?t=E:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function A(t){var e=t._readableState;o("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(o("emitReadable",e.flowing),e.emittedReadable=!0,Bn.nextTick(O,t))}function O(t){var e=t._readableState;o("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,x(t)}function T(t,e){e.readingMore||(e.readingMore=!0,Bn.nextTick(I,t,e))}function I(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function C(t){o("readable nexttick read 0"),t.read(0)}function P(t,e){o("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),x(t),e.flowing&&!e.reading&&t.read(0)}function x(t){var e=t._readableState;for(o("flow",e.flowing);e.flowing&&null!==t.read(););}function N(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function B(t){var e=t._readableState;o("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,Bn.nextTick(L,e,t))}function L(t,e){if(o("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function D(t,e){for(var r=0,i=t.length;r=e.highWaterMark:e.length>0)||e.ended))return o("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?B(this):A(this),null;if(0===(t=k(t,e))&&e.ended)return 0===e.length&&B(this),null;var i,n=e.needReadable;return o("need readable",n),(0===e.length||e.length-t0?N(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&B(this)),null!==i&&this.emit("data",i),i},_.prototype._read=function(t){b(this,new g("_read()"))},_.prototype.pipe=function(t,r){var i=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t)}n.pipesCount+=1,o("pipe count=%d opts=%j",n.pipesCount,r);var s=(!r||!1!==r.end)&&t!==Bn.stdout&&t!==Bn.stderr?h:m;function a(e,r){o("onunpipe"),e===i&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,o("cleanup"),t.removeListener("close",d),t.removeListener("finish",p),t.removeListener("drain",u),t.removeListener("error",c),t.removeListener("unpipe",a),i.removeListener("end",h),i.removeListener("end",m),i.removeListener("data",l),f=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||u())}function h(){o("onend"),t.end()}n.endEmitted?Bn.nextTick(s):i.once("end",s),t.on("unpipe",a);var u=function(t){return function(){var r=t._readableState;o("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,0===r.awaitDrain&&e(t,"data")&&(r.flowing=!0,x(t))}}(i);t.on("drain",u);var f=!1;function l(e){o("ondata");var r=t.write(e);o("dest.write",r),!1===r&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==D(n.pipes,t))&&!f&&(o("false write response, pause",n.awaitDrain),n.awaitDrain++),i.pause())}function c(r){o("onerror",r),m(),t.removeListener("error",c),0===e(t,"error")&&b(t,r)}function d(){t.removeListener("finish",p),m()}function p(){o("onfinish"),t.removeListener("close",d),m()}function m(){o("unpipe"),i.unpipe(t)}return i.on("data",l),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",c),t.once("close",d),t.once("finish",p),t.emit("pipe",i),n.flowing||(o("pipe resume"),i.resume()),t},_.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o0,!1!==n.flowing&&this.resume()):"readable"===t&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,o("on readable",n.length,n.reading),n.length?A(this):n.reading||Bn.nextTick(C,this))),i},_.prototype.addListener=_.prototype.on,_.prototype.removeListener=function(t,e){var i=r.prototype.removeListener.call(this,t,e);return"readable"===t&&Bn.nextTick(R,this),i},_.prototype.removeAllListeners=function(t){var e=r.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||Bn.nextTick(R,this),e},_.prototype.resume=function(){var t=this._readableState;return t.flowing||(o("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,Bn.nextTick(P,t,e))}(this,t)),t.paused=!1,this},_.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},_.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;for(var n in t.on("end",(function(){if(o("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(n){(o("wrapped data"),r.decoder&&(n=r.decoder.write(n)),r.objectMode&&null==n)||(r.objectMode||n&&n.length)&&(e.push(n)||(i=!0,t.pause()))})),t)void 0===this[n]&&"function"==typeof t[n]&&(this[n]=function(e){return function(){return t[e].apply(t,arguments)}}(n));for(var s=0;s0,(function(t){i||(i=t),t&&o.forEach(Ks),s||(o.forEach(Ks),n(i))}))}));return e.reduce(Vs)};!function(t,e){(e=Xn.exports=Es()).Stream=e,e.Readable=e,e.Writable=us(),e.Duplex=fs(),e.Transform=ks,e.PassThrough=Ds,e.finished=Ms,e.pipeline=Gs}(0,Zn);var Ws=qn.Buffer,Ys=Zn.Transform;function Zs(t){Ys.call(this),this._block=Ws.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}Wn(Zs,Ys),Zs.prototype._transform=function(t,e,r){var i=null;try{this.update(t,e)}catch(t){i=t}r(i)},Zs.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},Zs.prototype.update=function(t,e){if(function(t,e){if(!Ws.isBuffer(t)&&"string"!=typeof t)throw new TypeError(e+" must be a string or a buffer")}(t,"Data"),this._finalized)throw new Error("Digest already called");Ws.isBuffer(t)||(t=Ws.from(t,e));for(var r=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var n=this._blockOffset;n0;++o)this._length[o]+=s,(s=this._length[o]/4294967296|0)>0&&(this._length[o]-=4294967296*s);return this},Zs.prototype._update=function(){throw new Error("_update is not implemented")},Zs.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},Zs.prototype._digest=function(){throw new Error("_digest is not implemented")};var Xs=Zs,Qs=Wn,Js=Xs,$s=qn.Buffer,ta=new Array(16);function ea(){Js.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function ra(t,e){return t<>>32-e}function ia(t,e,r,i,n,o,s){return ra(t+(e&r|~e&i)+n+o|0,s)+e|0}function na(t,e,r,i,n,o,s){return ra(t+(e&i|r&~i)+n+o|0,s)+e|0}function oa(t,e,r,i,n,o,s){return ra(t+(e^r^i)+n+o|0,s)+e|0}function sa(t,e,r,i,n,o,s){return ra(t+(r^(e|~i))+n+o|0,s)+e|0}Qs(ea,Js),ea.prototype._update=function(){for(var t=ta,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,i=this._b,n=this._c,o=this._d;r=ia(r,i,n,o,t[0],3614090360,7),o=ia(o,r,i,n,t[1],3905402710,12),n=ia(n,o,r,i,t[2],606105819,17),i=ia(i,n,o,r,t[3],3250441966,22),r=ia(r,i,n,o,t[4],4118548399,7),o=ia(o,r,i,n,t[5],1200080426,12),n=ia(n,o,r,i,t[6],2821735955,17),i=ia(i,n,o,r,t[7],4249261313,22),r=ia(r,i,n,o,t[8],1770035416,7),o=ia(o,r,i,n,t[9],2336552879,12),n=ia(n,o,r,i,t[10],4294925233,17),i=ia(i,n,o,r,t[11],2304563134,22),r=ia(r,i,n,o,t[12],1804603682,7),o=ia(o,r,i,n,t[13],4254626195,12),n=ia(n,o,r,i,t[14],2792965006,17),r=na(r,i=ia(i,n,o,r,t[15],1236535329,22),n,o,t[1],4129170786,5),o=na(o,r,i,n,t[6],3225465664,9),n=na(n,o,r,i,t[11],643717713,14),i=na(i,n,o,r,t[0],3921069994,20),r=na(r,i,n,o,t[5],3593408605,5),o=na(o,r,i,n,t[10],38016083,9),n=na(n,o,r,i,t[15],3634488961,14),i=na(i,n,o,r,t[4],3889429448,20),r=na(r,i,n,o,t[9],568446438,5),o=na(o,r,i,n,t[14],3275163606,9),n=na(n,o,r,i,t[3],4107603335,14),i=na(i,n,o,r,t[8],1163531501,20),r=na(r,i,n,o,t[13],2850285829,5),o=na(o,r,i,n,t[2],4243563512,9),n=na(n,o,r,i,t[7],1735328473,14),r=oa(r,i=na(i,n,o,r,t[12],2368359562,20),n,o,t[5],4294588738,4),o=oa(o,r,i,n,t[8],2272392833,11),n=oa(n,o,r,i,t[11],1839030562,16),i=oa(i,n,o,r,t[14],4259657740,23),r=oa(r,i,n,o,t[1],2763975236,4),o=oa(o,r,i,n,t[4],1272893353,11),n=oa(n,o,r,i,t[7],4139469664,16),i=oa(i,n,o,r,t[10],3200236656,23),r=oa(r,i,n,o,t[13],681279174,4),o=oa(o,r,i,n,t[0],3936430074,11),n=oa(n,o,r,i,t[3],3572445317,16),i=oa(i,n,o,r,t[6],76029189,23),r=oa(r,i,n,o,t[9],3654602809,4),o=oa(o,r,i,n,t[12],3873151461,11),n=oa(n,o,r,i,t[15],530742520,16),r=sa(r,i=oa(i,n,o,r,t[2],3299628645,23),n,o,t[0],4096336452,6),o=sa(o,r,i,n,t[7],1126891415,10),n=sa(n,o,r,i,t[14],2878612391,15),i=sa(i,n,o,r,t[5],4237533241,21),r=sa(r,i,n,o,t[12],1700485571,6),o=sa(o,r,i,n,t[3],2399980690,10),n=sa(n,o,r,i,t[10],4293915773,15),i=sa(i,n,o,r,t[1],2240044497,21),r=sa(r,i,n,o,t[8],1873313359,6),o=sa(o,r,i,n,t[15],4264355552,10),n=sa(n,o,r,i,t[6],2734768916,15),i=sa(i,n,o,r,t[13],1309151649,21),r=sa(r,i,n,o,t[4],4149444226,6),o=sa(o,r,i,n,t[11],3174756917,10),n=sa(n,o,r,i,t[2],718787259,15),i=sa(i,n,o,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+i|0,this._c=this._c+n|0,this._d=this._d+o|0},ea.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=$s.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t};var aa=ea,ha=zn.Buffer,ua=Wn,fa=Xs,la=new Array(16),ca=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],da=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],pa=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],ma=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],ga=[0,1518500249,1859775393,2400959708,2840853838],ya=[1352829926,1548603684,1836072691,2053994217,0];function ba(){fa.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function va(t,e){return t<>>32-e}function wa(t,e,r,i,n,o,s,a){return va(t+(e^r^i)+o+s|0,a)+n|0}function _a(t,e,r,i,n,o,s,a){return va(t+(e&r|~e&i)+o+s|0,a)+n|0}function Ma(t,e,r,i,n,o,s,a){return va(t+((e|~r)^i)+o+s|0,a)+n|0}function Sa(t,e,r,i,n,o,s,a){return va(t+(e&i|r&~i)+o+s|0,a)+n|0}function Ea(t,e,r,i,n,o,s,a){return va(t+(e^(r|~i))+o+s|0,a)+n|0}ua(ba,fa),ba.prototype._update=function(){for(var t=la,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var r=0|this._a,i=0|this._b,n=0|this._c,o=0|this._d,s=0|this._e,a=0|this._a,h=0|this._b,u=0|this._c,f=0|this._d,l=0|this._e,c=0;c<80;c+=1){var d,p;c<16?(d=wa(r,i,n,o,s,t[ca[c]],ga[0],pa[c]),p=Ea(a,h,u,f,l,t[da[c]],ya[0],ma[c])):c<32?(d=_a(r,i,n,o,s,t[ca[c]],ga[1],pa[c]),p=Sa(a,h,u,f,l,t[da[c]],ya[1],ma[c])):c<48?(d=Ma(r,i,n,o,s,t[ca[c]],ga[2],pa[c]),p=Ma(a,h,u,f,l,t[da[c]],ya[2],ma[c])):c<64?(d=Sa(r,i,n,o,s,t[ca[c]],ga[3],pa[c]),p=_a(a,h,u,f,l,t[da[c]],ya[3],ma[c])):(d=Ea(r,i,n,o,s,t[ca[c]],ga[4],pa[c]),p=wa(a,h,u,f,l,t[da[c]],ya[4],ma[c])),r=s,s=o,o=va(n,10),n=i,i=d,a=l,l=f,f=va(u,10),u=h,h=p}var m=this._b+n+f|0;this._b=this._c+o+l|0,this._c=this._d+s+a|0,this._d=this._e+r+h|0,this._e=this._a+i+u|0,this._a=m},ba.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=ha.alloc?ha.alloc(20):new ha(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t};var ka=ba,Aa={},Oa={get exports(){return Aa},set exports(t){Aa=t}},Ta=qn.Buffer;function Ia(t,e){this._block=Ta.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}Ia.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=Ta.from(t,e));for(var r=this._block,i=this._blockSize,n=t.length,o=this._len,s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var i=(4294967295&r)>>>0,n=(r-i)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(i,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},Ia.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var Ra=Ia,Ca=Wn,Pa=Ra,xa=qn.Buffer,Na=[1518500249,1859775393,-1894007588,-899497514],Ba=new Array(80);function La(){this.init(),this._w=Ba,Pa.call(this,64,56)}function Da(t){return t<<30|t>>>2}function ja(t,e,r,i){return 0===t?e&r|~e&i:2===t?e&r|e&i|r&i:e^r^i}Ca(La,Pa),La.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},La.prototype._update=function(t){for(var e,r=this._w,i=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,a=0|this._e,h=0;h<16;++h)r[h]=t.readInt32BE(4*h);for(;h<80;++h)r[h]=r[h-3]^r[h-8]^r[h-14]^r[h-16];for(var u=0;u<80;++u){var f=~~(u/20),l=0|((e=i)<<5|e>>>27)+ja(f,n,o,s)+a+r[u]+Na[f];a=s,s=o,o=Da(n),n=i,i=l}this._a=i+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=a+this._e|0},La.prototype._hash=function(){var t=xa.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t};var Ua=La,qa=Wn,Fa=Ra,za=qn.Buffer,Ha=[1518500249,1859775393,-1894007588,-899497514],Ka=new Array(80);function Va(){this.init(),this._w=Ka,Fa.call(this,64,56)}function Ga(t){return t<<5|t>>>27}function Wa(t){return t<<30|t>>>2}function Ya(t,e,r,i){return 0===t?e&r|~e&i:2===t?e&r|e&i|r&i:e^r^i}qa(Va,Fa),Va.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Va.prototype._update=function(t){for(var e,r=this._w,i=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,a=0|this._e,h=0;h<16;++h)r[h]=t.readInt32BE(4*h);for(;h<80;++h)r[h]=(e=r[h-3]^r[h-8]^r[h-14]^r[h-16])<<1|e>>>31;for(var u=0;u<80;++u){var f=~~(u/20),l=Ga(i)+Ya(f,n,o,s)+a+r[u]+Ha[f]|0;a=s,s=o,o=Wa(n),n=i,i=l}this._a=i+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=a+this._e|0},Va.prototype._hash=function(){var t=za.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t};var Za=Va,Xa=Wn,Qa=Ra,Ja=qn.Buffer,$a=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],th=new Array(64);function eh(){this.init(),this._w=th,Qa.call(this,64,56)}function rh(t,e,r){return r^t&(e^r)}function ih(t,e,r){return t&e|r&(t|e)}function nh(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function oh(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function sh(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}Xa(eh,Qa),eh.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},eh.prototype._update=function(t){for(var e,r=this._w,i=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,a=0|this._e,h=0|this._f,u=0|this._g,f=0|this._h,l=0;l<16;++l)r[l]=t.readInt32BE(4*l);for(;l<64;++l)r[l]=0|(((e=r[l-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+r[l-7]+sh(r[l-15])+r[l-16];for(var c=0;c<64;++c){var d=f+oh(a)+rh(a,h,u)+$a[c]+r[c]|0,p=nh(i)+ih(i,n,o)|0;f=u,u=h,h=a,a=s+d|0,s=o,o=n,n=i,i=d+p|0}this._a=i+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=a+this._e|0,this._f=h+this._f|0,this._g=u+this._g|0,this._h=f+this._h|0},eh.prototype._hash=function(){var t=Ja.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t};var ah=eh,hh=Wn,uh=ah,fh=Ra,lh=qn.Buffer,ch=new Array(64);function dh(){this.init(),this._w=ch,fh.call(this,64,56)}hh(dh,uh),dh.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},dh.prototype._hash=function(){var t=lh.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t};var ph=dh,mh=Wn,gh=Ra,yh=qn.Buffer,bh=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],vh=new Array(160);function wh(){this.init(),this._w=vh,gh.call(this,128,112)}function _h(t,e,r){return r^t&(e^r)}function Mh(t,e,r){return t&e|r&(t|e)}function Sh(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function Eh(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function kh(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function Ah(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function Oh(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function Th(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function Ih(t,e){return t>>>0>>0?1:0}mh(wh,gh),wh.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},wh.prototype._update=function(t){for(var e=this._w,r=0|this._ah,i=0|this._bh,n=0|this._ch,o=0|this._dh,s=0|this._eh,a=0|this._fh,h=0|this._gh,u=0|this._hh,f=0|this._al,l=0|this._bl,c=0|this._cl,d=0|this._dl,p=0|this._el,m=0|this._fl,g=0|this._gl,y=0|this._hl,b=0;b<32;b+=2)e[b]=t.readInt32BE(4*b),e[b+1]=t.readInt32BE(4*b+4);for(;b<160;b+=2){var v=e[b-30],w=e[b-30+1],_=kh(v,w),M=Ah(w,v),S=Oh(v=e[b-4],w=e[b-4+1]),E=Th(w,v),k=e[b-14],A=e[b-14+1],O=e[b-32],T=e[b-32+1],I=M+A|0,R=_+k+Ih(I,M)|0;R=(R=R+S+Ih(I=I+E|0,E)|0)+O+Ih(I=I+T|0,T)|0,e[b]=R,e[b+1]=I}for(var C=0;C<160;C+=2){R=e[C],I=e[C+1];var P=Mh(r,i,n),x=Mh(f,l,c),N=Sh(r,f),B=Sh(f,r),L=Eh(s,p),D=Eh(p,s),j=bh[C],U=bh[C+1],q=_h(s,a,h),F=_h(p,m,g),z=y+D|0,H=u+L+Ih(z,y)|0;H=(H=(H=H+q+Ih(z=z+F|0,F)|0)+j+Ih(z=z+U|0,U)|0)+R+Ih(z=z+I|0,I)|0;var K=B+x|0,V=N+P+Ih(K,B)|0;u=h,y=g,h=a,g=m,a=s,m=p,s=o+H+Ih(p=d+z|0,d)|0,o=n,d=c,n=i,c=l,i=r,l=f,r=H+V+Ih(f=z+K|0,z)|0}this._al=this._al+f|0,this._bl=this._bl+l|0,this._cl=this._cl+c|0,this._dl=this._dl+d|0,this._el=this._el+p|0,this._fl=this._fl+m|0,this._gl=this._gl+g|0,this._hl=this._hl+y|0,this._ah=this._ah+r+Ih(this._al,f)|0,this._bh=this._bh+i+Ih(this._bl,l)|0,this._ch=this._ch+n+Ih(this._cl,c)|0,this._dh=this._dh+o+Ih(this._dl,d)|0,this._eh=this._eh+s+Ih(this._el,p)|0,this._fh=this._fh+a+Ih(this._fl,m)|0,this._gh=this._gh+h+Ih(this._gl,g)|0,this._hh=this._hh+u+Ih(this._hl,y)|0},wh.prototype._hash=function(){var t=yh.allocUnsafe(64);function e(e,r,i){t.writeInt32BE(e,i),t.writeInt32BE(r,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t};var Rh=wh,Ch=Wn,Ph=Rh,xh=Ra,Nh=qn.Buffer,Bh=new Array(160);function Lh(){this.init(),this._w=Bh,xh.call(this,128,112)}Ch(Lh,Ph),Lh.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},Lh.prototype._hash=function(){var t=Nh.allocUnsafe(48);function e(e,r,i){t.writeInt32BE(e,i),t.writeInt32BE(r,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t};var Dh=Lh,jh=Oa.exports=function(t){t=t.toLowerCase();var e=jh[t];if(!e)throw new Error(t+" is not supported (we accept pull requests)");return new e};function Uh(){this.head=null,this.tail=null,this.length=0}jh.sha=Ua,jh.sha1=Za,jh.sha224=ph,jh.sha256=ah,jh.sha384=Dh,jh.sha512=Rh,Uh.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},Uh.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},Uh.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},Uh.prototype.clear=function(){this.head=this.tail=null,this.length=0},Uh.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},Uh.prototype.concat=function(t){if(0===this.length)return Re.alloc(0);if(1===this.length)return this.head.data;for(var e=Re.allocUnsafe(t>>>0),r=this.head,i=0;r;)r.data.copy(e,i),i+=r.data.length,r=r.next;return e};var qh=Re.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Fh(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),function(t){if(t&&!qh(t))throw new Error("Unknown encoding: "+t)}(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=Hh;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=Kh;break;default:return void(this.write=zh)}this.charBuffer=new Re(6),this.charReceived=0,this.charLength=0}function zh(t){return t.toString(this.encoding)}function Hh(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function Kh(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}Fh.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var i=t.length;this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,i),i-=this.charReceived);var n;i=(e+=t.toString(this.encoding,0,i)).length-1;if((n=e.charCodeAt(i))>=55296&&n<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),t.copy(this.charBuffer,0,0,o),e.substring(0,i)}return e},Fh.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var r=t[t.length-e];if(1==e&&r>>5==6){this.charLength=2;break}if(e<=2&&r>>4==14){this.charLength=3;break}if(e<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=e},Fh.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var r=this.charReceived,i=this.charBuffer,n=this.encoding;e+=i.slice(0,r).toString(n)}return e};var Vh=Object.freeze({__proto__:null,StringDecoder:Fh});Yh.ReadableState=Wh;var Gh=co("stream");function Wh(t,e){t=t||{},this.objectMode=!!t.objectMode,e instanceof Mu&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var r=t.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=~~this.highWaterMark,this.buffer=new Uh,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(this.decoder=new Fh(t.encoding),this.encoding=t.encoding)}function Yh(t){if(!(this instanceof Yh))return new Yh(t);this._readableState=new Wh(t,this),this.readable=!0,t&&"function"==typeof t.read&&(this._read=t.read),Jn.call(this)}function Zh(t,e,r,i,n){var o=function(t,e){var r=null;Re.isBuffer(e)||"string"==typeof e||null==e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));return r}(e,r);if(o)t.emit("error",o);else if(null===r)e.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,Jh(t)}(t,e);else if(e.objectMode||r&&r.length>0)if(e.ended&&!n){var s=new Error("stream.push() after EOF");t.emit("error",s)}else if(e.endEmitted&&n){var a=new Error("stream.unshift() after end event");t.emit("error",a)}else{var h;!e.decoder||n||i||(r=e.decoder.write(r),h=!e.objectMode&&0===r.length),n||(e.reading=!1),h||(e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Jh(t))),function(t,e){e.readingMore||(e.readingMore=!0,Mn(tu,t,e))}(t,e)}else n||(e.reading=!1);return function(t){return!t.ended&&(t.needReadable||t.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=Xh?t=Xh:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function Jh(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(Gh("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?Mn($h,t):$h(t))}function $h(t){Gh("emit readable"),t.emit("readable"),iu(t)}function tu(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var i;to.length?o.length:t;if(s===o.length?n+=o:n+=o.slice(0,t),0===(t-=s)){s===o.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++i}return e.length-=i,n}(t,e):function(t,e){var r=Re.allocUnsafe(t),i=e.head,n=1;i.data.copy(r),t-=i.data.length;for(;i=i.next;){var o=i.data,s=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,s),0===(t-=s)){s===o.length?(++n,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=o.slice(s));break}++n}return e.length-=n,r}(t,e);return i}(t,e.buffer,e.decoder),r);var r}function ou(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,Mn(su,e,t))}function su(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function au(t,e){for(var r=0,i=t.length;r=e.highWaterMark||e.ended))return Gh("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?ou(this):Jh(this),null;if(0===(t=Qh(t,e))&&e.ended)return 0===e.length&&ou(this),null;var i,n=e.needReadable;return Gh("need readable",n),(0===e.length||e.length-t0?nu(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&ou(this)),null!==i&&this.emit("data",i),i},Yh.prototype._read=function(t){this.emit("error",new Error("not implemented"))},Yh.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,Gh("pipe count=%d opts=%j",i.pipesCount,e);var n=!e||!1!==e.end?s:u;function o(t){Gh("onunpipe"),t===r&&u()}function s(){Gh("onend"),t.end()}i.endEmitted?Mn(n):r.once("end",n),t.on("unpipe",o);var a=function(t){return function(){var e=t._readableState;Gh("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&t.listeners("data").length&&(e.flowing=!0,iu(t))}}(r);t.on("drain",a);var h=!1;function u(){Gh("cleanup"),t.removeListener("close",d),t.removeListener("finish",p),t.removeListener("drain",a),t.removeListener("error",c),t.removeListener("unpipe",o),r.removeListener("end",s),r.removeListener("end",u),r.removeListener("data",l),h=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||a()}var f=!1;function l(e){Gh("ondata"),f=!1,!1!==t.write(e)||f||((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==au(i.pipes,t))&&!h&&(Gh("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,f=!0),r.pause())}function c(e){var r;Gh("onerror",e),m(),t.removeListener("error",c),0===(r="error",t.listeners(r).length)&&t.emit("error",e)}function d(){t.removeListener("finish",p),m()}function p(){Gh("onfinish"),t.removeListener("close",d),m()}function m(){Gh("unpipe"),r.unpipe(t)}return r.on("data",l),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",c),t.once("close",d),t.once("finish",p),t.emit("pipe",r),i.flowing||(Gh("pipe resume"),r.resume()),t},Yh.prototype.unpipe=function(t){var e=this._readableState;if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this)),this;if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var n=0;n-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},lu.prototype._write=function(t,e,r){r(new Error("not implemented"))},lu.prototype._writev=null,lu.prototype.end=function(t,e,r){var i=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||function(t,e,r){e.ending=!0,yu(t,e),r&&(e.finished?Mn(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,i,r)},so(Mu,Yh);for(var vu=Object.keys(lu.prototype),wu=0;wuWu?e=t(e):e.lengthr)?e=("rmd160"===t?new rf:nf(t)).update(e).digest():e.lengthdf||e!=e)throw new TypeError("Bad key length")};if(Y.process&&Y.process.browser)lf="utf-8";else if(Y.process&&Y.process.version){lf=parseInt(Bn.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else lf="utf-8";var mf=lf,gf=qn.Buffer,yf=function(t,e,r){if(gf.isBuffer(t))return t;if("string"==typeof t)return gf.from(t,e);if(ArrayBuffer.isView(t))return gf.from(t.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")},bf=Xu,vf=ka,wf=Aa,_f=qn.Buffer,Mf=pf,Sf=mf,Ef=yf,kf=_f.alloc(128),Af={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function Of(t,e,r){var i=function(t){function e(e){return wf(t).update(e).digest()}function r(t){return(new vf).update(t).digest()}return"rmd160"===t||"ripemd160"===t?r:"md5"===t?bf:e}(t),n="sha512"===t||"sha384"===t?128:64;e.length>n?e=i(e):e.length>>0},writeUInt32BE:function(t,e,r){t[0+r]=e>>>24,t[1+r]=e>>>16&255,t[2+r]=e>>>8&255,t[3+r]=255&e},ip:function(t,e,r,i){for(var n=0,o=0,s=6;s>=0;s-=2){for(var a=0;a<=24;a+=8)n<<=1,n|=e>>>a+s&1;for(a=0;a<=24;a+=8)n<<=1,n|=t>>>a+s&1}for(s=6;s>=0;s-=2){for(a=1;a<=25;a+=8)o<<=1,o|=e>>>a+s&1;for(a=1;a<=25;a+=8)o<<=1,o|=t>>>a+s&1}r[i+0]=n>>>0,r[i+1]=o>>>0},rip:function(t,e,r,i){for(var n=0,o=0,s=0;s<4;s++)for(var a=24;a>=0;a-=8)n<<=1,n|=e>>>a+s&1,n<<=1,n|=t>>>a+s&1;for(s=4;s<8;s++)for(a=24;a>=0;a-=8)o<<=1,o|=e>>>a+s&1,o<<=1,o|=t>>>a+s&1;r[i+0]=n>>>0,r[i+1]=o>>>0},pc1:function(t,e,r,i){for(var n=0,o=0,s=7;s>=5;s--){for(var a=0;a<=24;a+=8)n<<=1,n|=e>>a+s&1;for(a=0;a<=24;a+=8)n<<=1,n|=t>>a+s&1}for(a=0;a<=24;a+=8)n<<=1,n|=e>>a+s&1;for(s=1;s<=3;s++){for(a=0;a<=24;a+=8)o<<=1,o|=e>>a+s&1;for(a=0;a<=24;a+=8)o<<=1,o|=t>>a+s&1}for(a=0;a<=24;a+=8)o<<=1,o|=t>>a+s&1;r[i+0]=n>>>0,r[i+1]=o>>>0},r28shl:function(t,e){return t<>>28-e}},Kf=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];Hf.pc2=function(t,e,r,i){for(var n=0,o=0,s=Kf.length>>>1,a=0;a>>Kf[a]&1;for(a=s;a>>Kf[a]&1;r[i+0]=n>>>0,r[i+1]=o>>>0},Hf.expand=function(t,e,r){var i=0,n=0;i=(1&t)<<5|t>>>27;for(var o=23;o>=15;o-=4)i<<=6,i|=t>>>o&63;for(o=11;o>=3;o-=4)n|=t>>>o&63,n<<=6;n|=(31&t)<<1|t>>>31,e[r+0]=i>>>0,e[r+1]=n>>>0};var Vf=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];Hf.substitute=function(t,e){for(var r=0,i=0;i<4;i++){r<<=4,r|=Vf[64*i+(t>>>18-6*i&63)]}for(i=0;i<4;i++){r<<=4,r|=Vf[256+64*i+(e>>>18-6*i&63)]}return r>>>0};var Gf=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];Hf.permute=function(t){for(var e=0,r=0;r>>Gf[r]&1;return e>>>0},Hf.padSplit=function(t,e,r){for(var i=t.toString(2);i.length0;i--)e+=this._buffer(t,e),r+=this._flushBuffer(n,r);return e+=this._buffer(t,e),n},Xf.prototype.final=function(t){var e,r;return t&&(e=this.update(t)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(r):r},Xf.prototype._pad=function(t,e){if(0===e)return!1;for(;e>>1];r=$f.r28shl(r,o),i=$f.r28shl(i,o),$f.pc2(r,i,t.keys,n)}},rl.prototype._update=function(t,e,r,i){var n=this._desState,o=$f.readUInt32BE(t,e),s=$f.readUInt32BE(t,e+4);$f.ip(o,s,n.tmp,0),o=n.tmp[0],s=n.tmp[1],"encrypt"===this.type?this._encrypt(n,o,s,n.tmp,0):this._decrypt(n,o,s,n.tmp,0),o=n.tmp[0],s=n.tmp[1],$f.writeUInt32BE(r,o,i),$f.writeUInt32BE(r,s,i+4)},rl.prototype._pad=function(t,e){if(!1===this.padding)return!1;for(var r=t.length-e,i=e;i>>0,o=l}$f.rip(s,o,i,n)},rl.prototype._decrypt=function(t,e,r,i,n){for(var o=r,s=e,a=t.keys.length-2;a>=0;a-=2){var h=t.keys[a],u=t.keys[a+1];$f.expand(o,t.tmp,0),h^=t.tmp[0],u^=t.tmp[1];var f=$f.substitute(h,u),l=o;o=(s^$f.permute(f))>>>0,s=l}$f.rip(o,s,i,n)};var ol={},sl=Wf,al=Wn,hl={};function ul(t){sl.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e>o%8,t._prev=Ul(t._prev,r?i:n);return s}function Ul(t,e){var r=t.length,i=-1,n=Dl.allocUnsafe(t.length);for(t=Dl.concat([t,Dl.from([e])]);++i>7;return n}Ll.encrypt=function(t,e,r){for(var i=e.length,n=Dl.allocUnsafe(i),o=-1;++o>>24]^f[p>>>16&255]^l[m>>>8&255]^c[255&g]^e[y++],s=u[p>>>24]^f[m>>>16&255]^l[g>>>8&255]^c[255&d]^e[y++],a=u[m>>>24]^f[g>>>16&255]^l[d>>>8&255]^c[255&p]^e[y++],h=u[g>>>24]^f[d>>>16&255]^l[p>>>8&255]^c[255&m]^e[y++],d=o,p=s,m=a,g=h;return o=(i[d>>>24]<<24|i[p>>>16&255]<<16|i[m>>>8&255]<<8|i[255&g])^e[y++],s=(i[p>>>24]<<24|i[m>>>16&255]<<16|i[g>>>8&255]<<8|i[255&d])^e[y++],a=(i[m>>>24]<<24|i[g>>>16&255]<<16|i[d>>>8&255]<<8|i[255&p])^e[y++],h=(i[g>>>24]<<24|i[d>>>16&255]<<16|i[p>>>8&255]<<8|i[255&m])^e[y++],[o>>>=0,s>>>=0,a>>>=0,h>>>=0]}var oc=[0,1,2,4,8,16,32,64,128,27,54],sc=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var r=[],i=[],n=[[],[],[],[]],o=[[],[],[],[]],s=0,a=0,h=0;h<256;++h){var u=a^a<<1^a<<2^a<<3^a<<4;u=u>>>8^255&u^99,r[s]=u,i[u]=s;var f=t[s],l=t[f],c=t[l],d=257*t[u]^16843008*u;n[0][s]=d<<24|d>>>8,n[1][s]=d<<16|d>>>16,n[2][s]=d<<8|d>>>24,n[3][s]=d,d=16843009*c^65537*l^257*f^16843008*s,o[0][u]=d<<24|d>>>8,o[1][u]=d<<16|d>>>16,o[2][u]=d<<8|d>>>24,o[3][u]=d,0===s?s=a=1:(s=f^t[t[t[c^f]]],a^=t[t[a]])}return{SBOX:r,INV_SBOX:i,SUB_MIX:n,INV_SUB_MIX:o}}();function ac(t){this._key=rc(t),this._reset()}ac.blockSize=16,ac.keySize=32,ac.prototype.blockSize=ac.blockSize,ac.prototype.keySize=ac.keySize,ac.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,i=4*(r+1),n=[],o=0;o>>24,s=sc.SBOX[s>>>24]<<24|sc.SBOX[s>>>16&255]<<16|sc.SBOX[s>>>8&255]<<8|sc.SBOX[255&s],s^=oc[o/e|0]<<24):e>6&&o%e==4&&(s=sc.SBOX[s>>>24]<<24|sc.SBOX[s>>>16&255]<<16|sc.SBOX[s>>>8&255]<<8|sc.SBOX[255&s]),n[o]=n[o-e]^s}for(var a=[],h=0;h>>24]]^sc.INV_SUB_MIX[1][sc.SBOX[f>>>16&255]]^sc.INV_SUB_MIX[2][sc.SBOX[f>>>8&255]]^sc.INV_SUB_MIX[3][sc.SBOX[255&f]]}this._nRounds=r,this._keySchedule=n,this._invKeySchedule=a},ac.prototype.encryptBlockRaw=function(t){return nc(t=rc(t),this._keySchedule,sc.SUB_MIX,sc.SBOX,this._nRounds)},ac.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=ec.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r},ac.prototype.decryptBlock=function(t){var e=(t=rc(t))[1];t[1]=t[3],t[3]=e;var r=nc(t,this._invKeySchedule,sc.INV_SUB_MIX,sc.INV_SBOX,this._nRounds),i=ec.allocUnsafe(16);return i.writeUInt32BE(r[0],0),i.writeUInt32BE(r[3],4),i.writeUInt32BE(r[2],8),i.writeUInt32BE(r[1],12),i},ac.prototype.scrub=function(){ic(this._keySchedule),ic(this._invKeySchedule),ic(this._key)},tc.AES=ac;var hc=qn.Buffer,uc=hc.alloc(16,0);function fc(t){var e=hc.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function lc(t){this.h=t,this.state=hc.alloc(16,0),this.cache=hc.allocUnsafe(0)}lc.prototype.ghash=function(t){for(var e=-1;++e0;e--)i[e]=i[e]>>>1|(1&i[e-1])<<31;i[0]=i[0]>>>1,r&&(i[0]=i[0]^225<<24)}this.state=fc(n)},lc.prototype.update=function(t){var e;for(this.cache=hc.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},lc.prototype.final=function(t,e){return this.cache.length&&this.ghash(hc.concat([this.cache,uc],16)),this.ghash(fc([0,t,0,e])),this.state};var cc=lc,dc=tc,pc=qn.Buffer,mc=Lu,gc=cc,yc=Ol,bc=Kl;function vc(t,e,r,i){mc.call(this);var n=pc.alloc(4,0);this._cipher=new dc.AES(e);var o=this._cipher.encryptBlock(n);this._ghash=new gc(o),r=function(t,e,r){if(12===e.length)return t._finID=pc.concat([e,pc.from([0,0,0,1])]),pc.concat([e,pc.from([0,0,0,2])]);var i=new gc(r),n=e.length,o=n%16;i.update(e),o&&(o=16-o,i.update(pc.alloc(o,0))),i.update(pc.alloc(8,0));var s=8*n,a=pc.alloc(8);a.writeUIntBE(s,0,8),i.update(a),t._finID=i.state;var h=pc.from(t._finID);return bc(h),h}(this,r,o),this._prev=pc.from(r),this._cache=pc.allocUnsafe(0),this._secCache=pc.allocUnsafe(0),this._decrypt=i,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}Wn(vc,mc),vc.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=pc.alloc(e,0),this._ghash.update(e))}this._called=!0;var r=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(r),this._len+=t.length,r},vc.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=yc(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(t,e){var r=0;t.length!==e.length&&r++;for(var i=Math.min(t.length,e.length),n=0;n0||i>0;){var h=new Oc;h.update(a),h.update(t),e&&h.update(e),a=h.digest();var u=0;if(n>0){var f=o.length-n;u=Math.min(n,a.length),a.copy(o,f,0,u),n-=u}if(u0){var l=s.length-i,c=Math.min(i,a.length-u);a.copy(s,l,u,u+c),i-=c}}return a.fill(0),{key:o,iv:s}},Ic=$l,Rc=wc,Cc=qn.Buffer,Pc=kc,xc=Lu,Nc=tc,Bc=Tc;function Lc(t,e,r){xc.call(this),this._cache=new jc,this._cipher=new Nc.AES(e),this._prev=Cc.from(r),this._mode=t,this._autopadding=!0}Wn(Lc,xc),Lc.prototype._update=function(t){var e,r;this._cache.add(t);for(var i=[];e=this._cache.get();)r=this._mode.encrypt(this,e),i.push(r);return Cc.concat(i)};var Dc=Cc.alloc(16,16);function jc(){this.cache=Cc.allocUnsafe(0)}function Uc(t,e,r){var i=Ic[t.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=Cc.from(e)),e.length!==i.key/8)throw new TypeError("invalid key length "+e.length);if("string"==typeof r&&(r=Cc.from(r)),"GCM"!==i.mode&&r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===i.type?new Pc(i.module,e,r):"auth"===i.type?new Rc(i.module,e,r):new Lc(i.module,e,r)}Lc.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(Dc))throw this._cipher.scrub(),new Error("data not multiple of block length")},Lc.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},jc.prototype.add=function(t){this.cache=Cc.concat([this.cache,t])},jc.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},jc.prototype.flush=function(){for(var t=16-this.cache.length,e=Cc.allocUnsafe(t),r=-1;++r16)throw new Error("unable to decrypt data");var r=-1;for(;++r16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},Zc.prototype.flush=function(){if(this.cache.length)return this.cache},qc.createDecipher=function(t,e){var r=Hc[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=Wc(e,!1,r.key,r.iv);return Xc(t,i.key,i.iv)},qc.createDecipheriv=Xc;var Qc=El,Jc=qc,$c=Zl;Sl.createCipher=Sl.Cipher=Qc.createCipher,Sl.createCipheriv=Sl.Cipheriv=Qc.createCipheriv,Sl.createDecipher=Sl.Decipher=Jc.createDecipher,Sl.createDecipheriv=Sl.Decipheriv=Jc.createDecipheriv,Sl.listCiphers=Sl.getCiphers=function(){return Object.keys($c)};var td={};!function(t){t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}}(td);var ed=_l,rd=Sl,id=$l,nd=td,od=Tc;function sd(t,e,r){if(t=t.toLowerCase(),id[t])return rd.createCipheriv(t,e,r);if(nd[t])return new ed({key:e,iv:r,mode:t});throw new TypeError("invalid suite type")}function ad(t,e,r){if(t=t.toLowerCase(),id[t])return rd.createDecipheriv(t,e,r);if(nd[t])return new ed({key:e,iv:r,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}Ff.createCipher=Ff.Cipher=function(t,e){var r,i;if(t=t.toLowerCase(),id[t])r=id[t].key,i=id[t].iv;else{if(!nd[t])throw new TypeError("invalid suite type");r=8*nd[t].key,i=nd[t].iv}var n=od(e,!1,r,i);return sd(t,n.key,n.iv)},Ff.createCipheriv=Ff.Cipheriv=sd,Ff.createDecipher=Ff.Decipher=function(t,e){var r,i;if(t=t.toLowerCase(),id[t])r=id[t].key,i=id[t].iv;else{if(!nd[t])throw new TypeError("invalid suite type");r=8*nd[t].key,i=nd[t].iv}var n=od(e,!1,r,i);return ad(t,n.key,n.iv)},Ff.createDecipheriv=Ff.Decipheriv=ad,Ff.listCiphers=Ff.getCiphers=function(){return Object.keys(nd).concat(rd.getCiphers())};var hd={},ud={},fd={get exports(){return ud},set exports(t){ud=t}};!function(t,e){function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function n(t,e,r){if(n.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var o;"object"==typeof t?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:zn.Buffer}catch(t){}function s(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function a(t,e,r){var i=s(t,r);return r-1>=e&&(i|=s(t,r-1)<<4),i}function h(t,e,r,i){for(var n=0,o=Math.min(t.length,r),s=e;s=49?a-49+10:a>=17?a-17+10:a}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,i){if("number"==typeof t)return this._initNumber(t,e,i);if("object"==typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===i)for(n=0,o=0;n>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i=e;i-=2)n=a(t,e,i)<=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(t.length-e)%2==0?e+1:e;i=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var o=t.length-r,s=o%i,a=Math.min(o,o-s)+r,u=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function c(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,a=67108863&s,h=s/67108864|0;r.words[0]=a;for(var u=1;u>>26,l=67108863&h,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[u]=0|l,h=0|f}return 0!==h?r.words[u]=0|h:r.length--,r.strip()}n.prototype.toString=function(t,e){var i;if(e=0|e||1,16===(t=t||10)||"hex"===t){i="";for(var n=0,o=0,s=0;s>>24-n&16777215)||s!==this.length-1?u[6-h.length]+h+i:h+i,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(i=o.toString(16)+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var c=f[t],d=l[t];i="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);i=(p=p.idivn(d)).isZero()?m+i:u[c-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return r(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,i){var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,h="le"===e,u=new t(o),f=this.clone();if(h){for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),u[a]=s;for(;a=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},n.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;it.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var i=t/26|0,n=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<t.length?(r=this,i=t):(r=t,i=this);for(var n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},n.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,M=0|s[4],S=8191&M,E=M>>>13,k=0|s[5],A=8191&k,O=k>>>13,T=0|s[6],I=8191&T,R=T>>>13,C=0|s[7],P=8191&C,x=C>>>13,N=0|s[8],B=8191&N,L=N>>>13,D=0|s[9],j=8191&D,U=D>>>13,q=0|a[0],F=8191&q,z=q>>>13,H=0|a[1],K=8191&H,V=H>>>13,G=0|a[2],W=8191&G,Y=G>>>13,Z=0|a[3],X=8191&Z,Q=Z>>>13,J=0|a[4],$=8191&J,tt=J>>>13,et=0|a[5],rt=8191&et,it=et>>>13,nt=0|a[6],ot=8191&nt,st=nt>>>13,at=0|a[7],ht=8191&at,ut=at>>>13,ft=0|a[8],lt=8191&ft,ct=ft>>>13,dt=0|a[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(i=Math.imul(l,F))|0)+((8191&(n=(n=Math.imul(l,z))+Math.imul(c,F)|0))<<13)|0;u=((o=Math.imul(c,z))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,F),n=(n=Math.imul(p,z))+Math.imul(m,F)|0,o=Math.imul(m,z);var yt=(u+(i=i+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,V)|0)+Math.imul(c,K)|0))<<13)|0;u=((o=o+Math.imul(c,V)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(y,F),n=(n=Math.imul(y,z))+Math.imul(b,F)|0,o=Math.imul(b,z),i=i+Math.imul(p,K)|0,n=(n=n+Math.imul(p,V)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,V)|0;var bt=(u+(i=i+Math.imul(l,W)|0)|0)+((8191&(n=(n=n+Math.imul(l,Y)|0)+Math.imul(c,W)|0))<<13)|0;u=((o=o+Math.imul(c,Y)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(w,F),n=(n=Math.imul(w,z))+Math.imul(_,F)|0,o=Math.imul(_,z),i=i+Math.imul(y,K)|0,n=(n=n+Math.imul(y,V)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,V)|0,i=i+Math.imul(p,W)|0,n=(n=n+Math.imul(p,Y)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,Y)|0;var vt=(u+(i=i+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(c,X)|0))<<13)|0;u=((o=o+Math.imul(c,Q)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(S,F),n=(n=Math.imul(S,z))+Math.imul(E,F)|0,o=Math.imul(E,z),i=i+Math.imul(w,K)|0,n=(n=n+Math.imul(w,V)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,V)|0,i=i+Math.imul(y,W)|0,n=(n=n+Math.imul(y,Y)|0)+Math.imul(b,W)|0,o=o+Math.imul(b,Y)|0,i=i+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(i=i+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0))<<13)|0;u=((o=o+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(A,F),n=(n=Math.imul(A,z))+Math.imul(O,F)|0,o=Math.imul(O,z),i=i+Math.imul(S,K)|0,n=(n=n+Math.imul(S,V)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,V)|0,i=i+Math.imul(w,W)|0,n=(n=n+Math.imul(w,Y)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Y)|0,i=i+Math.imul(y,X)|0,n=(n=n+Math.imul(y,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var _t=(u+(i=i+Math.imul(l,rt)|0)|0)+((8191&(n=(n=n+Math.imul(l,it)|0)+Math.imul(c,rt)|0))<<13)|0;u=((o=o+Math.imul(c,it)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(I,F),n=(n=Math.imul(I,z))+Math.imul(R,F)|0,o=Math.imul(R,z),i=i+Math.imul(A,K)|0,n=(n=n+Math.imul(A,V)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,V)|0,i=i+Math.imul(S,W)|0,n=(n=n+Math.imul(S,Y)|0)+Math.imul(E,W)|0,o=o+Math.imul(E,Y)|0,i=i+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,Q)|0,i=i+Math.imul(y,$)|0,n=(n=n+Math.imul(y,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,it)|0;var Mt=(u+(i=i+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,ot)|0))<<13)|0;u=((o=o+Math.imul(c,st)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(P,F),n=(n=Math.imul(P,z))+Math.imul(x,F)|0,o=Math.imul(x,z),i=i+Math.imul(I,K)|0,n=(n=n+Math.imul(I,V)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,V)|0,i=i+Math.imul(A,W)|0,n=(n=n+Math.imul(A,Y)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,Y)|0,i=i+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,i=i+Math.imul(y,rt)|0,n=(n=n+Math.imul(y,it)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,it)|0,i=i+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(i=i+Math.imul(l,ht)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,ht)|0))<<13)|0;u=((o=o+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(B,F),n=(n=Math.imul(B,z))+Math.imul(L,F)|0,o=Math.imul(L,z),i=i+Math.imul(P,K)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,V)|0,i=i+Math.imul(I,W)|0,n=(n=n+Math.imul(I,Y)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,Y)|0,i=i+Math.imul(A,X)|0,n=(n=n+Math.imul(A,Q)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,Q)|0,i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,it)|0,i=i+Math.imul(y,ot)|0,n=(n=n+Math.imul(y,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,i=i+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(i=i+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((o=o+Math.imul(c,ct)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(j,F),n=(n=Math.imul(j,z))+Math.imul(U,F)|0,o=Math.imul(U,z),i=i+Math.imul(B,K)|0,n=(n=n+Math.imul(B,V)|0)+Math.imul(L,K)|0,o=o+Math.imul(L,V)|0,i=i+Math.imul(P,W)|0,n=(n=n+Math.imul(P,Y)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,Y)|0,i=i+Math.imul(I,X)|0,n=(n=n+Math.imul(I,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,tt)|0,i=i+Math.imul(S,rt)|0,n=(n=n+Math.imul(S,it)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,it)|0,i=i+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,i=i+Math.imul(y,ht)|0,n=(n=n+Math.imul(y,ut)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,ut)|0,i=i+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ct)|0;var kt=(u+(i=i+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((o=o+Math.imul(c,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(j,K),n=(n=Math.imul(j,V))+Math.imul(U,K)|0,o=Math.imul(U,V),i=i+Math.imul(B,W)|0,n=(n=n+Math.imul(B,Y)|0)+Math.imul(L,W)|0,o=o+Math.imul(L,Y)|0,i=i+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,Q)|0,i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,it)|0,i=i+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,i=i+Math.imul(w,ht)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,ut)|0,i=i+Math.imul(y,lt)|0,n=(n=n+Math.imul(y,ct)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,ct)|0;var At=(u+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(j,W),n=(n=Math.imul(j,Y))+Math.imul(U,W)|0,o=Math.imul(U,Y),i=i+Math.imul(B,X)|0,n=(n=n+Math.imul(B,Q)|0)+Math.imul(L,X)|0,o=o+Math.imul(L,Q)|0,i=i+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,tt)|0,i=i+Math.imul(I,rt)|0,n=(n=n+Math.imul(I,it)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,it)|0,i=i+Math.imul(A,ot)|0,n=(n=n+Math.imul(A,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,i=i+Math.imul(S,ht)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,ht)|0,o=o+Math.imul(E,ut)|0,i=i+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ct)|0;var Ot=(u+(i=i+Math.imul(y,pt)|0)|0)+((8191&(n=(n=n+Math.imul(y,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,i=Math.imul(j,X),n=(n=Math.imul(j,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),i=i+Math.imul(B,$)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,tt)|0,i=i+Math.imul(P,rt)|0,n=(n=n+Math.imul(P,it)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,it)|0,i=i+Math.imul(I,ot)|0,n=(n=n+Math.imul(I,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,i=i+Math.imul(A,ht)|0,n=(n=n+Math.imul(A,ut)|0)+Math.imul(O,ht)|0,o=o+Math.imul(O,ut)|0,i=i+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ct)|0;var Tt=(u+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;u=((o=o+Math.imul(_,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(j,$),n=(n=Math.imul(j,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),i=i+Math.imul(B,rt)|0,n=(n=n+Math.imul(B,it)|0)+Math.imul(L,rt)|0,o=o+Math.imul(L,it)|0,i=i+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,i=i+Math.imul(I,ht)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(R,ht)|0,o=o+Math.imul(R,ut)|0,i=i+Math.imul(A,lt)|0,n=(n=n+Math.imul(A,ct)|0)+Math.imul(O,lt)|0,o=o+Math.imul(O,ct)|0;var It=(u+(i=i+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(j,rt),n=(n=Math.imul(j,it))+Math.imul(U,rt)|0,o=Math.imul(U,it),i=i+Math.imul(B,ot)|0,n=(n=n+Math.imul(B,st)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,st)|0,i=i+Math.imul(P,ht)|0,n=(n=n+Math.imul(P,ut)|0)+Math.imul(x,ht)|0,o=o+Math.imul(x,ut)|0,i=i+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,ct)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,ct)|0;var Rt=(u+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(O,pt)|0))<<13)|0;u=((o=o+Math.imul(O,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,i=Math.imul(j,ot),n=(n=Math.imul(j,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),i=i+Math.imul(B,ht)|0,n=(n=n+Math.imul(B,ut)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,ut)|0,i=i+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,ct)|0)+Math.imul(x,lt)|0,o=o+Math.imul(x,ct)|0;var Ct=(u+(i=i+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(j,ht),n=(n=Math.imul(j,ut))+Math.imul(U,ht)|0,o=Math.imul(U,ut),i=i+Math.imul(B,lt)|0,n=(n=n+Math.imul(B,ct)|0)+Math.imul(L,lt)|0,o=o+Math.imul(L,ct)|0;var Pt=(u+(i=i+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(x,pt)|0))<<13)|0;u=((o=o+Math.imul(x,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(j,lt),n=(n=Math.imul(j,ct))+Math.imul(U,lt)|0,o=Math.imul(U,ct);var xt=(u+(i=i+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((o=o+Math.imul(L,mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863;var Nt=(u+(i=Math.imul(j,pt))|0)+((8191&(n=(n=Math.imul(j,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,h[0]=gt,h[1]=yt,h[2]=bt,h[3]=vt,h[4]=wt,h[5]=_t,h[6]=Mt,h[7]=St,h[8]=Et,h[9]=kt,h[10]=At,h[11]=Ot,h[12]=Tt,h[13]=It,h[14]=Rt,h[15]=Ct,h[16]=Pt,h[17]=xt,h[18]=Nt,0!==u&&(h[19]=u,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=c),n.prototype.mulTo=function(t,e){var r,i=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):i<63?c(this,t,e):i<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,i=s,s=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,t,e):p(this,t,e),r},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=n.prototype._countBits(t)-1,i=0;i>=1;return i},m.prototype.permute=function(t,e,r,i,n,o){for(var s=0;s>>=1)n++;return 1<>>=13,i[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,e+=n/67108864|0,e+=o>>>26,this.words[i]=67108863&o}return 0!==e&&(this.words[i]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>n}return e}(t);if(0===e.length)return new n(1);for(var r=this,i=0;i=0);var e,i=t%26,n=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(e=0;e>>26-i}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,u=0;u=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&a}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,i){return r(0===this.negative),this.iushrn(t,e,i)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26,n=1<=0);var e=t%26,i=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==e&&i++,this.length=Math.min(i,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(h/67108864|0),this.words[n+i]=67108863&o}for(;n>26,this.words[n+i]=67108863&o;if(0===a)return this.strip();for(r(-1===a),a=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),o=t,s=0|o.words[o.length-1];0!=(r=26-this._countBits(s))&&(o=o.ushln(r),i.iushln(r),s=0|o.words[o.length-1]);var a,h=i.length-o.length;if("mod"!==e){(a=new n(null)).length=h+1,a.words=new Array(a.length);for(var u=0;u=0;l--){var c=67108864*(0|i.words[o.length+l])+(0|i.words[o.length+l-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(o,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(o,1,l),i.isZero()||(i.negative^=1);a&&(a.words[l]=c)}return a&&a.strip(),i.strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:a||null,mod:i}},n.prototype.divmod=function(t,e,i){return r(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(o=a.div.neg()),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(o=a.div.neg()),{div:o,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,a},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,i=0,n=this.length-1;n>=0;n--)i=(e*i+(0|this.words[n]))%t;return i},n.prototype.idivn=function(t){r(t<=67108863);for(var e=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*e;this.words[i]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),a=new n(0),h=new n(1),u=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++u;for(var f=i.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;0==(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(a.isOdd()||h.isOdd())&&(a.iadd(f),h.isub(l)),a.iushrn(1),h.iushrn(1);e.cmp(i)>=0?(e.isub(i),o.isub(a),s.isub(h)):(i.isub(e),a.isub(o),h.isub(s))}return{a:a,b:h,gcd:i.iushln(u)}},n.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),a=new n(0),h=i.clone();e.cmpn(1)>0&&i.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);for(var l=0,c=1;0==(i.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(i.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(h),a.iushrn(1);e.cmp(i)>=0?(e.isub(i),s.isub(a)):(i.isub(e),a.isub(s))}return(o=0===e.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var o=e;e=r,r=o}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,i=(t-e)/26,n=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,i=t<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)e=1;else{i&&(t=-t),r(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:nt.length)return 1;if(this.length=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){in&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new M(t)},n.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},i(b,y),b.prototype.split=function(t,e){for(var r=4194303,i=Math.min(t.length,9),n=0;n>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new v;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},M.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var i=this.m.add(new n(1)).iushrn(2);return this.pow(t,i)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);r(!o.isZero());var a=new n(1).toRed(this),h=a.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(h);)f.redIAdd(h);for(var l=this.pow(f,o),c=this.pow(t,o.addn(1).iushrn(1)),d=this.pow(t,o),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g=0;i--){for(var u=e.words[i],f=h-1;f>=0;f--){var l=u>>f&1;o!==r[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++a||0===i&&0===f)&&(o=this.mul(o,r[s]),a=0,s=0)):a=0}h=26}return o},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},i(S,M),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(fd,Y);var ld={},cd={get exports(){return ld},set exports(t){ld=t}};!function(t,e){function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function n(t,e,r){if(n.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var o;"object"==typeof t?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:zn.Buffer}catch(t){}function s(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function a(t,e,r){var i=s(t,r);return r-1>=e&&(i|=s(t,r-1)<<4),i}function h(t,e,r,i){for(var n=0,o=Math.min(t.length,r),s=e;s=49?a-49+10:a>=17?a-17+10:a}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,i){if("number"==typeof t)return this._initNumber(t,e,i);if("object"==typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===i)for(n=0,o=0;n>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i=e;i-=2)n=a(t,e,i)<=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(t.length-e)%2==0?e+1:e;i=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var o=t.length-r,s=o%i,a=Math.min(o,o-s)+r,u=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function c(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,a=67108863&s,h=s/67108864|0;r.words[0]=a;for(var u=1;u>>26,l=67108863&h,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[u]=0|l,h=0|f}return 0!==h?r.words[u]=0|h:r.length--,r.strip()}n.prototype.toString=function(t,e){var i;if(e=0|e||1,16===(t=t||10)||"hex"===t){i="";for(var n=0,o=0,s=0;s>>24-n&16777215)||s!==this.length-1?u[6-h.length]+h+i:h+i,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(i=o.toString(16)+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var c=f[t],d=l[t];i="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);i=(p=p.idivn(d)).isZero()?m+i:u[c-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return r(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,i){var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,h="le"===e,u=new t(o),f=this.clone();if(h){for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),u[a]=s;for(;a=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},n.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;it.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var i=t/26|0,n=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<t.length?(r=this,i=t):(r=t,i=this);for(var n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},n.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,M=0|s[4],S=8191&M,E=M>>>13,k=0|s[5],A=8191&k,O=k>>>13,T=0|s[6],I=8191&T,R=T>>>13,C=0|s[7],P=8191&C,x=C>>>13,N=0|s[8],B=8191&N,L=N>>>13,D=0|s[9],j=8191&D,U=D>>>13,q=0|a[0],F=8191&q,z=q>>>13,H=0|a[1],K=8191&H,V=H>>>13,G=0|a[2],W=8191&G,Y=G>>>13,Z=0|a[3],X=8191&Z,Q=Z>>>13,J=0|a[4],$=8191&J,tt=J>>>13,et=0|a[5],rt=8191&et,it=et>>>13,nt=0|a[6],ot=8191&nt,st=nt>>>13,at=0|a[7],ht=8191&at,ut=at>>>13,ft=0|a[8],lt=8191&ft,ct=ft>>>13,dt=0|a[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(i=Math.imul(l,F))|0)+((8191&(n=(n=Math.imul(l,z))+Math.imul(c,F)|0))<<13)|0;u=((o=Math.imul(c,z))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,F),n=(n=Math.imul(p,z))+Math.imul(m,F)|0,o=Math.imul(m,z);var yt=(u+(i=i+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,V)|0)+Math.imul(c,K)|0))<<13)|0;u=((o=o+Math.imul(c,V)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(y,F),n=(n=Math.imul(y,z))+Math.imul(b,F)|0,o=Math.imul(b,z),i=i+Math.imul(p,K)|0,n=(n=n+Math.imul(p,V)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,V)|0;var bt=(u+(i=i+Math.imul(l,W)|0)|0)+((8191&(n=(n=n+Math.imul(l,Y)|0)+Math.imul(c,W)|0))<<13)|0;u=((o=o+Math.imul(c,Y)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(w,F),n=(n=Math.imul(w,z))+Math.imul(_,F)|0,o=Math.imul(_,z),i=i+Math.imul(y,K)|0,n=(n=n+Math.imul(y,V)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,V)|0,i=i+Math.imul(p,W)|0,n=(n=n+Math.imul(p,Y)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,Y)|0;var vt=(u+(i=i+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(c,X)|0))<<13)|0;u=((o=o+Math.imul(c,Q)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(S,F),n=(n=Math.imul(S,z))+Math.imul(E,F)|0,o=Math.imul(E,z),i=i+Math.imul(w,K)|0,n=(n=n+Math.imul(w,V)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,V)|0,i=i+Math.imul(y,W)|0,n=(n=n+Math.imul(y,Y)|0)+Math.imul(b,W)|0,o=o+Math.imul(b,Y)|0,i=i+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(i=i+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0))<<13)|0;u=((o=o+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(A,F),n=(n=Math.imul(A,z))+Math.imul(O,F)|0,o=Math.imul(O,z),i=i+Math.imul(S,K)|0,n=(n=n+Math.imul(S,V)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,V)|0,i=i+Math.imul(w,W)|0,n=(n=n+Math.imul(w,Y)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Y)|0,i=i+Math.imul(y,X)|0,n=(n=n+Math.imul(y,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var _t=(u+(i=i+Math.imul(l,rt)|0)|0)+((8191&(n=(n=n+Math.imul(l,it)|0)+Math.imul(c,rt)|0))<<13)|0;u=((o=o+Math.imul(c,it)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(I,F),n=(n=Math.imul(I,z))+Math.imul(R,F)|0,o=Math.imul(R,z),i=i+Math.imul(A,K)|0,n=(n=n+Math.imul(A,V)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,V)|0,i=i+Math.imul(S,W)|0,n=(n=n+Math.imul(S,Y)|0)+Math.imul(E,W)|0,o=o+Math.imul(E,Y)|0,i=i+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,Q)|0,i=i+Math.imul(y,$)|0,n=(n=n+Math.imul(y,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,it)|0;var Mt=(u+(i=i+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,ot)|0))<<13)|0;u=((o=o+Math.imul(c,st)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(P,F),n=(n=Math.imul(P,z))+Math.imul(x,F)|0,o=Math.imul(x,z),i=i+Math.imul(I,K)|0,n=(n=n+Math.imul(I,V)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,V)|0,i=i+Math.imul(A,W)|0,n=(n=n+Math.imul(A,Y)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,Y)|0,i=i+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,i=i+Math.imul(y,rt)|0,n=(n=n+Math.imul(y,it)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,it)|0,i=i+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(i=i+Math.imul(l,ht)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,ht)|0))<<13)|0;u=((o=o+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(B,F),n=(n=Math.imul(B,z))+Math.imul(L,F)|0,o=Math.imul(L,z),i=i+Math.imul(P,K)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,V)|0,i=i+Math.imul(I,W)|0,n=(n=n+Math.imul(I,Y)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,Y)|0,i=i+Math.imul(A,X)|0,n=(n=n+Math.imul(A,Q)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,Q)|0,i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,it)|0,i=i+Math.imul(y,ot)|0,n=(n=n+Math.imul(y,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,i=i+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(i=i+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((o=o+Math.imul(c,ct)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(j,F),n=(n=Math.imul(j,z))+Math.imul(U,F)|0,o=Math.imul(U,z),i=i+Math.imul(B,K)|0,n=(n=n+Math.imul(B,V)|0)+Math.imul(L,K)|0,o=o+Math.imul(L,V)|0,i=i+Math.imul(P,W)|0,n=(n=n+Math.imul(P,Y)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,Y)|0,i=i+Math.imul(I,X)|0,n=(n=n+Math.imul(I,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,tt)|0,i=i+Math.imul(S,rt)|0,n=(n=n+Math.imul(S,it)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,it)|0,i=i+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,i=i+Math.imul(y,ht)|0,n=(n=n+Math.imul(y,ut)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,ut)|0,i=i+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ct)|0;var kt=(u+(i=i+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((o=o+Math.imul(c,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(j,K),n=(n=Math.imul(j,V))+Math.imul(U,K)|0,o=Math.imul(U,V),i=i+Math.imul(B,W)|0,n=(n=n+Math.imul(B,Y)|0)+Math.imul(L,W)|0,o=o+Math.imul(L,Y)|0,i=i+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,Q)|0,i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,it)|0,i=i+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,i=i+Math.imul(w,ht)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,ut)|0,i=i+Math.imul(y,lt)|0,n=(n=n+Math.imul(y,ct)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,ct)|0;var At=(u+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(j,W),n=(n=Math.imul(j,Y))+Math.imul(U,W)|0,o=Math.imul(U,Y),i=i+Math.imul(B,X)|0,n=(n=n+Math.imul(B,Q)|0)+Math.imul(L,X)|0,o=o+Math.imul(L,Q)|0,i=i+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,tt)|0,i=i+Math.imul(I,rt)|0,n=(n=n+Math.imul(I,it)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,it)|0,i=i+Math.imul(A,ot)|0,n=(n=n+Math.imul(A,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,i=i+Math.imul(S,ht)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,ht)|0,o=o+Math.imul(E,ut)|0,i=i+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ct)|0;var Ot=(u+(i=i+Math.imul(y,pt)|0)|0)+((8191&(n=(n=n+Math.imul(y,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,i=Math.imul(j,X),n=(n=Math.imul(j,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),i=i+Math.imul(B,$)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,tt)|0,i=i+Math.imul(P,rt)|0,n=(n=n+Math.imul(P,it)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,it)|0,i=i+Math.imul(I,ot)|0,n=(n=n+Math.imul(I,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,i=i+Math.imul(A,ht)|0,n=(n=n+Math.imul(A,ut)|0)+Math.imul(O,ht)|0,o=o+Math.imul(O,ut)|0,i=i+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ct)|0;var Tt=(u+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;u=((o=o+Math.imul(_,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(j,$),n=(n=Math.imul(j,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),i=i+Math.imul(B,rt)|0,n=(n=n+Math.imul(B,it)|0)+Math.imul(L,rt)|0,o=o+Math.imul(L,it)|0,i=i+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,i=i+Math.imul(I,ht)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(R,ht)|0,o=o+Math.imul(R,ut)|0,i=i+Math.imul(A,lt)|0,n=(n=n+Math.imul(A,ct)|0)+Math.imul(O,lt)|0,o=o+Math.imul(O,ct)|0;var It=(u+(i=i+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(j,rt),n=(n=Math.imul(j,it))+Math.imul(U,rt)|0,o=Math.imul(U,it),i=i+Math.imul(B,ot)|0,n=(n=n+Math.imul(B,st)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,st)|0,i=i+Math.imul(P,ht)|0,n=(n=n+Math.imul(P,ut)|0)+Math.imul(x,ht)|0,o=o+Math.imul(x,ut)|0,i=i+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,ct)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,ct)|0;var Rt=(u+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(O,pt)|0))<<13)|0;u=((o=o+Math.imul(O,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,i=Math.imul(j,ot),n=(n=Math.imul(j,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),i=i+Math.imul(B,ht)|0,n=(n=n+Math.imul(B,ut)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,ut)|0,i=i+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,ct)|0)+Math.imul(x,lt)|0,o=o+Math.imul(x,ct)|0;var Ct=(u+(i=i+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(j,ht),n=(n=Math.imul(j,ut))+Math.imul(U,ht)|0,o=Math.imul(U,ut),i=i+Math.imul(B,lt)|0,n=(n=n+Math.imul(B,ct)|0)+Math.imul(L,lt)|0,o=o+Math.imul(L,ct)|0;var Pt=(u+(i=i+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(x,pt)|0))<<13)|0;u=((o=o+Math.imul(x,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(j,lt),n=(n=Math.imul(j,ct))+Math.imul(U,lt)|0,o=Math.imul(U,ct);var xt=(u+(i=i+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((o=o+Math.imul(L,mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863;var Nt=(u+(i=Math.imul(j,pt))|0)+((8191&(n=(n=Math.imul(j,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,h[0]=gt,h[1]=yt,h[2]=bt,h[3]=vt,h[4]=wt,h[5]=_t,h[6]=Mt,h[7]=St,h[8]=Et,h[9]=kt,h[10]=At,h[11]=Ot,h[12]=Tt,h[13]=It,h[14]=Rt,h[15]=Ct,h[16]=Pt,h[17]=xt,h[18]=Nt,0!==u&&(h[19]=u,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=c),n.prototype.mulTo=function(t,e){var r,i=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):i<63?c(this,t,e):i<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,i=s,s=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,t,e):p(this,t,e),r},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=n.prototype._countBits(t)-1,i=0;i>=1;return i},m.prototype.permute=function(t,e,r,i,n,o){for(var s=0;s>>=1)n++;return 1<>>=13,i[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,e+=n/67108864|0,e+=o>>>26,this.words[i]=67108863&o}return 0!==e&&(this.words[i]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>n}return e}(t);if(0===e.length)return new n(1);for(var r=this,i=0;i=0);var e,i=t%26,n=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(e=0;e>>26-i}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,u=0;u=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&a}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,i){return r(0===this.negative),this.iushrn(t,e,i)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26,n=1<=0);var e=t%26,i=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==e&&i++,this.length=Math.min(i,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(h/67108864|0),this.words[n+i]=67108863&o}for(;n>26,this.words[n+i]=67108863&o;if(0===a)return this.strip();for(r(-1===a),a=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),o=t,s=0|o.words[o.length-1];0!=(r=26-this._countBits(s))&&(o=o.ushln(r),i.iushln(r),s=0|o.words[o.length-1]);var a,h=i.length-o.length;if("mod"!==e){(a=new n(null)).length=h+1,a.words=new Array(a.length);for(var u=0;u=0;l--){var c=67108864*(0|i.words[o.length+l])+(0|i.words[o.length+l-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(o,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(o,1,l),i.isZero()||(i.negative^=1);a&&(a.words[l]=c)}return a&&a.strip(),i.strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:a||null,mod:i}},n.prototype.divmod=function(t,e,i){return r(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(o=a.div.neg()),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(o=a.div.neg()),{div:o,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,a},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,i=0,n=this.length-1;n>=0;n--)i=(e*i+(0|this.words[n]))%t;return i},n.prototype.idivn=function(t){r(t<=67108863);for(var e=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*e;this.words[i]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),a=new n(0),h=new n(1),u=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++u;for(var f=i.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;0==(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(a.isOdd()||h.isOdd())&&(a.iadd(f),h.isub(l)),a.iushrn(1),h.iushrn(1);e.cmp(i)>=0?(e.isub(i),o.isub(a),s.isub(h)):(i.isub(e),a.isub(o),h.isub(s))}return{a:a,b:h,gcd:i.iushln(u)}},n.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),a=new n(0),h=i.clone();e.cmpn(1)>0&&i.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);for(var l=0,c=1;0==(i.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(i.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(h),a.iushrn(1);e.cmp(i)>=0?(e.isub(i),s.isub(a)):(i.isub(e),a.isub(s))}return(o=0===e.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var o=e;e=r,r=o}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,i=(t-e)/26,n=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,i=t<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)e=1;else{i&&(t=-t),r(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:nt.length)return 1;if(this.length=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){in&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new M(t)},n.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},i(b,y),b.prototype.split=function(t,e){for(var r=4194303,i=Math.min(t.length,9),n=0;n>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new v;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},M.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var i=this.m.add(new n(1)).iushrn(2);return this.pow(t,i)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);r(!o.isZero());var a=new n(1).toRed(this),h=a.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(h);)f.redIAdd(h);for(var l=this.pow(f,o),c=this.pow(t,o.addn(1).iushrn(1)),d=this.pow(t,o),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g=0;i--){for(var u=e.words[i],f=h-1;f>=0;f--){var l=u>>f&1;o!==r[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++a||0===i&&0===f)&&(o=this.mul(o,r[s]),a=0,s=0)):a=0}h=26}return o},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},i(S,M),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(cd,Y);var dd,pd,md,gd,yd,bd={},vd={get exports(){return bd},set exports(t){bd=t}};function wd(){if(dd)return bd;var t;function e(t){this.rand=t}if(dd=1,vd.exports=function(r){return t||(t=new e(null)),t.generate(r)},bd.Rand=e,e.prototype.generate=function(t){return this._rand(t)},e.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),r=0;r=0);return n},r.prototype._randrange=function(t,e){var r=e.sub(t);return t.add(this._randbelow(r))},r.prototype.test=function(e,r,i){var n=e.bitLength(),o=t.mont(e),s=new t(1).toRed(o);r||(r=Math.max(1,n/48|0));for(var a=e.subn(1),h=0;!a.testn(h);h++);for(var u=e.shrn(h),f=a.toRed(o);r>0;r--){var l=this._randrange(new t(2),a);i&&i(l);var c=l.toRed(o).redPow(u);if(0!==c.cmp(s)&&0!==c.cmp(f)){for(var d=1;d0;r--){var f=this._randrange(new t(2),s),l=e.gcd(f);if(0!==l.cmpn(1))return l;var c=f.toRed(n).redPow(h);if(0!==c.cmp(o)&&0!==c.cmp(u)){for(var d=1;dl;)m.ishrn(1);if(m.isEven()&&m.iadd(n),m.testn(1)||m.iadd(o),c.cmp(o)){if(!c.cmp(s))for(;m.mod(a).cmp(h);)m.iadd(f)}else for(;m.mod(r).cmp(u);)m.iadd(f);if(d(g=m.shrn(1))&&d(m)&&p(g)&&p(m)&&i.test(g)&&i.test(m))return m}}return gd}var Sd,Ed,kd,Ad={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}};function Od(){if(Ed)return Sd;Ed=1;var t=ud,e=new(_d()),r=new t(24),i=new t(11),n=new t(10),o=new t(3),s=new t(7),a=Md(),h=jn;function u(e,r){return r=r||"utf8",Re.isBuffer(e)||(e=new Re(e,r)),this._pub=new t(e),this}function f(e,r){return r=r||"utf8",Re.isBuffer(e)||(e=new Re(e,r)),this._priv=new t(e),this}Sd=c;var l={};function c(e,r,i){this.setGenerator(r),this.__prime=new t(e),this._prime=t.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,i?(this.setPublicKey=u,this.setPrivateKey=f):this._primeCode=8}function d(t,e){var r=new Re(t.toArray());return e?r.toString(e):r}return Object.defineProperty(c.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(t,h){var u=h.toString("hex"),f=[u,t.toString(16)].join("_");if(f in l)return l[f];var c,d=0;if(t.isEven()||!a.simpleSieve||!a.fermatTest(t)||!e.test(t))return d+=1,d+="02"===u||"05"===u?8:4,l[f]=d,d;switch(e.test(t.shrn(1))||(d+=2),u){case"02":t.mod(r).cmp(i)&&(d+=8);break;case"05":(c=t.mod(n)).cmp(o)&&c.cmp(s)&&(d+=8);break;default:d+=4}return l[f]=d,d}(this.__prime,this.__gen)),this._primeCode}}),c.prototype.generateKeys=function(){return this._priv||(this._priv=new t(h(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},c.prototype.computeSecret=function(e){var r=new Re((e=(e=new t(e)).toRed(this._prime)).redPow(this._priv).fromRed().toArray()),i=this.getPrime();if(r.length=48&&i<=57?i-48:i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:void r(!1,"Invalid character in "+t)}function a(t,e,r){var i=s(t,r);return r-1>=e&&(i|=s(t,r-1)<<4),i}function h(t,e,i,n){for(var o=0,s=0,a=Math.min(t.length,i),h=e;h=49?u-49+10:u>=17?u-17+10:u,r(u>=0&&s0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,i){if("number"==typeof t)return this._initNumber(t,e,i);if("object"==typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===i)for(n=0,o=0;n>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},n.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i=e;i-=2)n=a(t,e,i)<=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(t.length-e)%2==0?e+1:e;i=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this._strip()},n.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var o=t.length-r,s=o%i,a=Math.min(o,o-s)+r,u=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{n.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch(t){n.prototype.inspect=f}else n.prototype.inspect=f;function f(){return(this.red?""}var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,a=67108863&s,h=s/67108864|0;r.words[0]=a;for(var u=1;u>>26,l=67108863&h,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[u]=0|l,h=0|f}return 0!==h?r.words[u]=0|h:r.length--,r._strip()}n.prototype.toString=function(t,e){var i;if(e=0|e||1,16===(t=t||10)||"hex"===t){i="";for(var n=0,o=0,s=0;s>>24-n&16777215,(n+=2)>=26&&(n-=26,s--),i=0!==o||s!==this.length-1?l[6-h.length]+h+i:h+i}for(0!==o&&(i=o.toString(16)+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var u=c[t],f=d[t];i="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modrn(f).toString(t);i=(p=p.idivn(f)).isZero()?m+i:l[u-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16,2)},o&&(n.prototype.toBuffer=function(t,e){return this.toArrayLike(o,t,e)}),n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,i){this._strip();var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");var s=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,n),s},n.prototype._toArrayLikeLE=function(t,e){for(var r=0,i=0,n=0,o=0;n>8&255),r>16&255),6===o?(r>24&255),i=0,o=0):(i=s>>>24,o+=2)}if(r=0&&(t[r--]=s>>8&255),r>=0&&(t[r--]=s>>16&255),6===o?(r>=0&&(t[r--]=s>>24&255),i=0,o=0):(i=s>>>24,o+=2)}if(r>=0)for(t[r--]=i;r>=0;)t[r--]=0},Math.clz32?n.prototype._countBits=function(t){return 32-Math.clz32(t)}:n.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},n.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;it.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-i),this._strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var i=t/26|0,n=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<t.length?(r=this,i=t):(r=t,i=this);for(var n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},n.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,M=0|s[4],S=8191&M,E=M>>>13,k=0|s[5],A=8191&k,O=k>>>13,T=0|s[6],I=8191&T,R=T>>>13,C=0|s[7],P=8191&C,x=C>>>13,N=0|s[8],B=8191&N,L=N>>>13,D=0|s[9],j=8191&D,U=D>>>13,q=0|a[0],F=8191&q,z=q>>>13,H=0|a[1],K=8191&H,V=H>>>13,G=0|a[2],W=8191&G,Y=G>>>13,Z=0|a[3],X=8191&Z,Q=Z>>>13,J=0|a[4],$=8191&J,tt=J>>>13,et=0|a[5],rt=8191&et,it=et>>>13,nt=0|a[6],ot=8191&nt,st=nt>>>13,at=0|a[7],ht=8191&at,ut=at>>>13,ft=0|a[8],lt=8191&ft,ct=ft>>>13,dt=0|a[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(i=Math.imul(l,F))|0)+((8191&(n=(n=Math.imul(l,z))+Math.imul(c,F)|0))<<13)|0;u=((o=Math.imul(c,z))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,F),n=(n=Math.imul(p,z))+Math.imul(m,F)|0,o=Math.imul(m,z);var yt=(u+(i=i+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,V)|0)+Math.imul(c,K)|0))<<13)|0;u=((o=o+Math.imul(c,V)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(y,F),n=(n=Math.imul(y,z))+Math.imul(b,F)|0,o=Math.imul(b,z),i=i+Math.imul(p,K)|0,n=(n=n+Math.imul(p,V)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,V)|0;var bt=(u+(i=i+Math.imul(l,W)|0)|0)+((8191&(n=(n=n+Math.imul(l,Y)|0)+Math.imul(c,W)|0))<<13)|0;u=((o=o+Math.imul(c,Y)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(w,F),n=(n=Math.imul(w,z))+Math.imul(_,F)|0,o=Math.imul(_,z),i=i+Math.imul(y,K)|0,n=(n=n+Math.imul(y,V)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,V)|0,i=i+Math.imul(p,W)|0,n=(n=n+Math.imul(p,Y)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,Y)|0;var vt=(u+(i=i+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(c,X)|0))<<13)|0;u=((o=o+Math.imul(c,Q)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(S,F),n=(n=Math.imul(S,z))+Math.imul(E,F)|0,o=Math.imul(E,z),i=i+Math.imul(w,K)|0,n=(n=n+Math.imul(w,V)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,V)|0,i=i+Math.imul(y,W)|0,n=(n=n+Math.imul(y,Y)|0)+Math.imul(b,W)|0,o=o+Math.imul(b,Y)|0,i=i+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(i=i+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0))<<13)|0;u=((o=o+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(A,F),n=(n=Math.imul(A,z))+Math.imul(O,F)|0,o=Math.imul(O,z),i=i+Math.imul(S,K)|0,n=(n=n+Math.imul(S,V)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,V)|0,i=i+Math.imul(w,W)|0,n=(n=n+Math.imul(w,Y)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Y)|0,i=i+Math.imul(y,X)|0,n=(n=n+Math.imul(y,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var _t=(u+(i=i+Math.imul(l,rt)|0)|0)+((8191&(n=(n=n+Math.imul(l,it)|0)+Math.imul(c,rt)|0))<<13)|0;u=((o=o+Math.imul(c,it)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(I,F),n=(n=Math.imul(I,z))+Math.imul(R,F)|0,o=Math.imul(R,z),i=i+Math.imul(A,K)|0,n=(n=n+Math.imul(A,V)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,V)|0,i=i+Math.imul(S,W)|0,n=(n=n+Math.imul(S,Y)|0)+Math.imul(E,W)|0,o=o+Math.imul(E,Y)|0,i=i+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,Q)|0,i=i+Math.imul(y,$)|0,n=(n=n+Math.imul(y,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,it)|0;var Mt=(u+(i=i+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,ot)|0))<<13)|0;u=((o=o+Math.imul(c,st)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(P,F),n=(n=Math.imul(P,z))+Math.imul(x,F)|0,o=Math.imul(x,z),i=i+Math.imul(I,K)|0,n=(n=n+Math.imul(I,V)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,V)|0,i=i+Math.imul(A,W)|0,n=(n=n+Math.imul(A,Y)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,Y)|0,i=i+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,i=i+Math.imul(y,rt)|0,n=(n=n+Math.imul(y,it)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,it)|0,i=i+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(i=i+Math.imul(l,ht)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,ht)|0))<<13)|0;u=((o=o+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(B,F),n=(n=Math.imul(B,z))+Math.imul(L,F)|0,o=Math.imul(L,z),i=i+Math.imul(P,K)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,V)|0,i=i+Math.imul(I,W)|0,n=(n=n+Math.imul(I,Y)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,Y)|0,i=i+Math.imul(A,X)|0,n=(n=n+Math.imul(A,Q)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,Q)|0,i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,it)|0,i=i+Math.imul(y,ot)|0,n=(n=n+Math.imul(y,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,i=i+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(i=i+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((o=o+Math.imul(c,ct)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(j,F),n=(n=Math.imul(j,z))+Math.imul(U,F)|0,o=Math.imul(U,z),i=i+Math.imul(B,K)|0,n=(n=n+Math.imul(B,V)|0)+Math.imul(L,K)|0,o=o+Math.imul(L,V)|0,i=i+Math.imul(P,W)|0,n=(n=n+Math.imul(P,Y)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,Y)|0,i=i+Math.imul(I,X)|0,n=(n=n+Math.imul(I,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,tt)|0,i=i+Math.imul(S,rt)|0,n=(n=n+Math.imul(S,it)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,it)|0,i=i+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,i=i+Math.imul(y,ht)|0,n=(n=n+Math.imul(y,ut)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,ut)|0,i=i+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ct)|0;var kt=(u+(i=i+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((o=o+Math.imul(c,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(j,K),n=(n=Math.imul(j,V))+Math.imul(U,K)|0,o=Math.imul(U,V),i=i+Math.imul(B,W)|0,n=(n=n+Math.imul(B,Y)|0)+Math.imul(L,W)|0,o=o+Math.imul(L,Y)|0,i=i+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,Q)|0,i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,it)|0,i=i+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,i=i+Math.imul(w,ht)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,ut)|0,i=i+Math.imul(y,lt)|0,n=(n=n+Math.imul(y,ct)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,ct)|0;var At=(u+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(j,W),n=(n=Math.imul(j,Y))+Math.imul(U,W)|0,o=Math.imul(U,Y),i=i+Math.imul(B,X)|0,n=(n=n+Math.imul(B,Q)|0)+Math.imul(L,X)|0,o=o+Math.imul(L,Q)|0,i=i+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,tt)|0,i=i+Math.imul(I,rt)|0,n=(n=n+Math.imul(I,it)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,it)|0,i=i+Math.imul(A,ot)|0,n=(n=n+Math.imul(A,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,i=i+Math.imul(S,ht)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,ht)|0,o=o+Math.imul(E,ut)|0,i=i+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ct)|0;var Ot=(u+(i=i+Math.imul(y,pt)|0)|0)+((8191&(n=(n=n+Math.imul(y,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,i=Math.imul(j,X),n=(n=Math.imul(j,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),i=i+Math.imul(B,$)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,tt)|0,i=i+Math.imul(P,rt)|0,n=(n=n+Math.imul(P,it)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,it)|0,i=i+Math.imul(I,ot)|0,n=(n=n+Math.imul(I,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,i=i+Math.imul(A,ht)|0,n=(n=n+Math.imul(A,ut)|0)+Math.imul(O,ht)|0,o=o+Math.imul(O,ut)|0,i=i+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ct)|0;var Tt=(u+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;u=((o=o+Math.imul(_,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(j,$),n=(n=Math.imul(j,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),i=i+Math.imul(B,rt)|0,n=(n=n+Math.imul(B,it)|0)+Math.imul(L,rt)|0,o=o+Math.imul(L,it)|0,i=i+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,i=i+Math.imul(I,ht)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(R,ht)|0,o=o+Math.imul(R,ut)|0,i=i+Math.imul(A,lt)|0,n=(n=n+Math.imul(A,ct)|0)+Math.imul(O,lt)|0,o=o+Math.imul(O,ct)|0;var It=(u+(i=i+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(j,rt),n=(n=Math.imul(j,it))+Math.imul(U,rt)|0,o=Math.imul(U,it),i=i+Math.imul(B,ot)|0,n=(n=n+Math.imul(B,st)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,st)|0,i=i+Math.imul(P,ht)|0,n=(n=n+Math.imul(P,ut)|0)+Math.imul(x,ht)|0,o=o+Math.imul(x,ut)|0,i=i+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,ct)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,ct)|0;var Rt=(u+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(O,pt)|0))<<13)|0;u=((o=o+Math.imul(O,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,i=Math.imul(j,ot),n=(n=Math.imul(j,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),i=i+Math.imul(B,ht)|0,n=(n=n+Math.imul(B,ut)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,ut)|0,i=i+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,ct)|0)+Math.imul(x,lt)|0,o=o+Math.imul(x,ct)|0;var Ct=(u+(i=i+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(j,ht),n=(n=Math.imul(j,ut))+Math.imul(U,ht)|0,o=Math.imul(U,ut),i=i+Math.imul(B,lt)|0,n=(n=n+Math.imul(B,ct)|0)+Math.imul(L,lt)|0,o=o+Math.imul(L,ct)|0;var Pt=(u+(i=i+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(x,pt)|0))<<13)|0;u=((o=o+Math.imul(x,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(j,lt),n=(n=Math.imul(j,ct))+Math.imul(U,lt)|0,o=Math.imul(U,ct);var xt=(u+(i=i+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((o=o+Math.imul(L,mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863;var Nt=(u+(i=Math.imul(j,pt))|0)+((8191&(n=(n=Math.imul(j,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,h[0]=gt,h[1]=yt,h[2]=bt,h[3]=vt,h[4]=wt,h[5]=_t,h[6]=Mt,h[7]=St,h[8]=Et,h[9]=kt,h[10]=At,h[11]=Ot,h[12]=Tt,h[13]=It,h[14]=Rt,h[15]=Ct,h[16]=Pt,h[17]=xt,h[18]=Nt,0!==u&&(h[19]=u,r.length++),r};function g(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,i=s,s=n}return 0!==i?r.words[o]=i:r.length--,r._strip()}function y(t,e,r){return g(t,e,r)}Math.imul||(m=p),n.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?m(this,t,e):r<63?p(this,t,e):r<1024?g(this,t,e):y(this,t,e)},n.prototype.mul=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},n.prototype.mulf=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),y(this,t,e)},n.prototype.imul=function(t){return this.clone().mulTo(t,this)},n.prototype.imuln=function(t){var e=t<0;e&&(t=-t),r("number"==typeof t),r(t<67108864);for(var i=0,n=0;n>=26,i+=o/67108864|0,i+=s>>>26,this.words[n]=67108863&s}return 0!==i&&(this.words[n]=i,this.length++),e?this.ineg():this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>n&1}return e}(t);if(0===e.length)return new n(1);for(var r=this,i=0;i=0);var e,i=t%26,n=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(e=0;e>>26-i}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,u=0;u=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&a}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.ishrn=function(t,e,i){return r(0===this.negative),this.iushrn(t,e,i)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26,n=1<=0);var e=t%26,i=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==e&&i++,this.length=Math.min(i,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(h/67108864|0),this.words[n+i]=67108863&o}for(;n>26,this.words[n+i]=67108863&o;if(0===a)return this._strip();for(r(-1===a),a=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this._strip()},n.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),o=t,s=0|o.words[o.length-1];0!=(r=26-this._countBits(s))&&(o=o.ushln(r),i.iushln(r),s=0|o.words[o.length-1]);var a,h=i.length-o.length;if("mod"!==e){(a=new n(null)).length=h+1,a.words=new Array(a.length);for(var u=0;u=0;l--){var c=67108864*(0|i.words[o.length+l])+(0|i.words[o.length+l-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(o,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(o,1,l),i.isZero()||(i.negative^=1);a&&(a.words[l]=c)}return a&&a._strip(),i._strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:a||null,mod:i}},n.prototype.divmod=function(t,e,i){return r(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(o=a.div.neg()),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(o=a.div.neg()),{div:o,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modrn(t.words[0]))}:this._wordDiv(t,e);var o,s,a},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modrn=function(t){var e=t<0;e&&(t=-t),r(t<=67108863);for(var i=(1<<26)%t,n=0,o=this.length-1;o>=0;o--)n=(i*n+(0|this.words[o]))%t;return e?-n:n},n.prototype.modn=function(t){return this.modrn(t)},n.prototype.idivn=function(t){var e=t<0;e&&(t=-t),r(t<=67108863);for(var i=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*i;this.words[n]=o/t|0,i=o%t}return this._strip(),e?this.ineg():this},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),a=new n(0),h=new n(1),u=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++u;for(var f=i.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;0==(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(a.isOdd()||h.isOdd())&&(a.iadd(f),h.isub(l)),a.iushrn(1),h.iushrn(1);e.cmp(i)>=0?(e.isub(i),o.isub(a),s.isub(h)):(i.isub(e),a.isub(o),h.isub(s))}return{a:a,b:h,gcd:i.iushln(u)}},n.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),a=new n(0),h=i.clone();e.cmpn(1)>0&&i.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);for(var l=0,c=1;0==(i.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(i.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(h),a.iushrn(1);e.cmp(i)>=0?(e.isub(i),s.isub(a)):(i.isub(e),a.isub(s))}return(o=0===e.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var o=e;e=r,r=o}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,i=(t-e)/26,n=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,i=t<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this._strip(),this.length>1)e=1;else{i&&(t=-t),r(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:nt.length)return 1;if(this.length=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){in&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new E(t)},n.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var b={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function M(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function k(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},i(w,v),w.prototype.split=function(t,e){for(var r=4194303,i=Math.min(t.length,9),n=0;n>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},w.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(b[t])return b[t];var e;if("k256"===t)e=new w;else if("p224"===t)e=new _;else if("p192"===t)e=new M;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new S}return b[t]=e,e},E.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},E.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(u(t,t.umod(this.m)._forceRed(this)),t)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var i=this.m.add(new n(1)).iushrn(2);return this.pow(t,i)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);r(!o.isZero());var a=new n(1).toRed(this),h=a.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(h);)f.redIAdd(h);for(var l=this.pow(f,o),c=this.pow(t,o.addn(1).iushrn(1)),d=this.pow(t,o),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g=0;i--){for(var u=e.words[i],f=h-1;f>=0;f--){var l=u>>f&1;o!==r[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++a||0===i&&0===f)&&(o=this.mul(o,r[s]),a=0,s=0)):a=0}h=26}return o},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new k(t)},i(k,E),k.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},k.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},k.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},k.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(Cd,Y);var Pd=Rd,xd=jn;function Nd(t){var e,r=t.modulus.byteLength();do{e=new Pd(xd(r))}while(e.cmp(t.modulus)>=0||!e.umod(t.prime1)||!e.umod(t.prime2));return e}function Bd(t,e){var r=function(t){var e=Nd(t);return{blinder:e.toRed(Pd.mont(t.modulus)).redPow(new Pd(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}(e),i=e.modulus.byteLength(),n=new Pd(t).mul(r.blinder).umod(e.modulus),o=n.toRed(Pd.mont(e.prime1)),s=n.toRed(Pd.mont(e.prime2)),a=e.coefficient,h=e.prime1,u=e.prime2,f=o.redPow(e.exponent1).fromRed(),l=s.redPow(e.exponent2).fromRed(),c=f.isub(l).imul(a).umod(h).imul(u);return l.iadd(c).imul(r.unblinder).umod(e.modulus).toArrayLike(Re,"be",i)}Bd.getr=Nd;var Ld=Bd,Dd={};var jd={name:"elliptic",version:"6.5.4",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny ",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}},Ud={},qd={},Fd={get exports(){return qd},set exports(t){qd=t}};!function(t,e){function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function n(t,e,r){if(n.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var o;"object"==typeof t?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:zn.Buffer}catch(t){}function s(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function a(t,e,r){var i=s(t,r);return r-1>=e&&(i|=s(t,r-1)<<4),i}function h(t,e,r,i){for(var n=0,o=Math.min(t.length,r),s=e;s=49?a-49+10:a>=17?a-17+10:a}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,i){if("number"==typeof t)return this._initNumber(t,e,i);if("object"==typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===i)for(n=0,o=0;n>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i=e;i-=2)n=a(t,e,i)<=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(t.length-e)%2==0?e+1:e;i=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var o=t.length-r,s=o%i,a=Math.min(o,o-s)+r,u=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function c(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,a=67108863&s,h=s/67108864|0;r.words[0]=a;for(var u=1;u>>26,l=67108863&h,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[u]=0|l,h=0|f}return 0!==h?r.words[u]=0|h:r.length--,r.strip()}n.prototype.toString=function(t,e){var i;if(e=0|e||1,16===(t=t||10)||"hex"===t){i="";for(var n=0,o=0,s=0;s>>24-n&16777215)||s!==this.length-1?u[6-h.length]+h+i:h+i,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(i=o.toString(16)+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var c=f[t],d=l[t];i="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);i=(p=p.idivn(d)).isZero()?m+i:u[c-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return r(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,i){var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,h="le"===e,u=new t(o),f=this.clone();if(h){for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),u[a]=s;for(;a=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},n.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;it.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var i=t/26|0,n=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<t.length?(r=this,i=t):(r=t,i=this);for(var n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},n.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,M=0|s[4],S=8191&M,E=M>>>13,k=0|s[5],A=8191&k,O=k>>>13,T=0|s[6],I=8191&T,R=T>>>13,C=0|s[7],P=8191&C,x=C>>>13,N=0|s[8],B=8191&N,L=N>>>13,D=0|s[9],j=8191&D,U=D>>>13,q=0|a[0],F=8191&q,z=q>>>13,H=0|a[1],K=8191&H,V=H>>>13,G=0|a[2],W=8191&G,Y=G>>>13,Z=0|a[3],X=8191&Z,Q=Z>>>13,J=0|a[4],$=8191&J,tt=J>>>13,et=0|a[5],rt=8191&et,it=et>>>13,nt=0|a[6],ot=8191&nt,st=nt>>>13,at=0|a[7],ht=8191&at,ut=at>>>13,ft=0|a[8],lt=8191&ft,ct=ft>>>13,dt=0|a[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(i=Math.imul(l,F))|0)+((8191&(n=(n=Math.imul(l,z))+Math.imul(c,F)|0))<<13)|0;u=((o=Math.imul(c,z))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,F),n=(n=Math.imul(p,z))+Math.imul(m,F)|0,o=Math.imul(m,z);var yt=(u+(i=i+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,V)|0)+Math.imul(c,K)|0))<<13)|0;u=((o=o+Math.imul(c,V)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(y,F),n=(n=Math.imul(y,z))+Math.imul(b,F)|0,o=Math.imul(b,z),i=i+Math.imul(p,K)|0,n=(n=n+Math.imul(p,V)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,V)|0;var bt=(u+(i=i+Math.imul(l,W)|0)|0)+((8191&(n=(n=n+Math.imul(l,Y)|0)+Math.imul(c,W)|0))<<13)|0;u=((o=o+Math.imul(c,Y)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(w,F),n=(n=Math.imul(w,z))+Math.imul(_,F)|0,o=Math.imul(_,z),i=i+Math.imul(y,K)|0,n=(n=n+Math.imul(y,V)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,V)|0,i=i+Math.imul(p,W)|0,n=(n=n+Math.imul(p,Y)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,Y)|0;var vt=(u+(i=i+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(c,X)|0))<<13)|0;u=((o=o+Math.imul(c,Q)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(S,F),n=(n=Math.imul(S,z))+Math.imul(E,F)|0,o=Math.imul(E,z),i=i+Math.imul(w,K)|0,n=(n=n+Math.imul(w,V)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,V)|0,i=i+Math.imul(y,W)|0,n=(n=n+Math.imul(y,Y)|0)+Math.imul(b,W)|0,o=o+Math.imul(b,Y)|0,i=i+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(i=i+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0))<<13)|0;u=((o=o+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(A,F),n=(n=Math.imul(A,z))+Math.imul(O,F)|0,o=Math.imul(O,z),i=i+Math.imul(S,K)|0,n=(n=n+Math.imul(S,V)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,V)|0,i=i+Math.imul(w,W)|0,n=(n=n+Math.imul(w,Y)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Y)|0,i=i+Math.imul(y,X)|0,n=(n=n+Math.imul(y,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var _t=(u+(i=i+Math.imul(l,rt)|0)|0)+((8191&(n=(n=n+Math.imul(l,it)|0)+Math.imul(c,rt)|0))<<13)|0;u=((o=o+Math.imul(c,it)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(I,F),n=(n=Math.imul(I,z))+Math.imul(R,F)|0,o=Math.imul(R,z),i=i+Math.imul(A,K)|0,n=(n=n+Math.imul(A,V)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,V)|0,i=i+Math.imul(S,W)|0,n=(n=n+Math.imul(S,Y)|0)+Math.imul(E,W)|0,o=o+Math.imul(E,Y)|0,i=i+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,Q)|0,i=i+Math.imul(y,$)|0,n=(n=n+Math.imul(y,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,it)|0;var Mt=(u+(i=i+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,ot)|0))<<13)|0;u=((o=o+Math.imul(c,st)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(P,F),n=(n=Math.imul(P,z))+Math.imul(x,F)|0,o=Math.imul(x,z),i=i+Math.imul(I,K)|0,n=(n=n+Math.imul(I,V)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,V)|0,i=i+Math.imul(A,W)|0,n=(n=n+Math.imul(A,Y)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,Y)|0,i=i+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,i=i+Math.imul(y,rt)|0,n=(n=n+Math.imul(y,it)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,it)|0,i=i+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(i=i+Math.imul(l,ht)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,ht)|0))<<13)|0;u=((o=o+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(B,F),n=(n=Math.imul(B,z))+Math.imul(L,F)|0,o=Math.imul(L,z),i=i+Math.imul(P,K)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,V)|0,i=i+Math.imul(I,W)|0,n=(n=n+Math.imul(I,Y)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,Y)|0,i=i+Math.imul(A,X)|0,n=(n=n+Math.imul(A,Q)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,Q)|0,i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,it)|0,i=i+Math.imul(y,ot)|0,n=(n=n+Math.imul(y,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,i=i+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(i=i+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((o=o+Math.imul(c,ct)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(j,F),n=(n=Math.imul(j,z))+Math.imul(U,F)|0,o=Math.imul(U,z),i=i+Math.imul(B,K)|0,n=(n=n+Math.imul(B,V)|0)+Math.imul(L,K)|0,o=o+Math.imul(L,V)|0,i=i+Math.imul(P,W)|0,n=(n=n+Math.imul(P,Y)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,Y)|0,i=i+Math.imul(I,X)|0,n=(n=n+Math.imul(I,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,tt)|0,i=i+Math.imul(S,rt)|0,n=(n=n+Math.imul(S,it)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,it)|0,i=i+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,i=i+Math.imul(y,ht)|0,n=(n=n+Math.imul(y,ut)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,ut)|0,i=i+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ct)|0;var kt=(u+(i=i+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((o=o+Math.imul(c,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(j,K),n=(n=Math.imul(j,V))+Math.imul(U,K)|0,o=Math.imul(U,V),i=i+Math.imul(B,W)|0,n=(n=n+Math.imul(B,Y)|0)+Math.imul(L,W)|0,o=o+Math.imul(L,Y)|0,i=i+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,Q)|0,i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,it)|0,i=i+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,i=i+Math.imul(w,ht)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,ut)|0,i=i+Math.imul(y,lt)|0,n=(n=n+Math.imul(y,ct)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,ct)|0;var At=(u+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(j,W),n=(n=Math.imul(j,Y))+Math.imul(U,W)|0,o=Math.imul(U,Y),i=i+Math.imul(B,X)|0,n=(n=n+Math.imul(B,Q)|0)+Math.imul(L,X)|0,o=o+Math.imul(L,Q)|0,i=i+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,tt)|0,i=i+Math.imul(I,rt)|0,n=(n=n+Math.imul(I,it)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,it)|0,i=i+Math.imul(A,ot)|0,n=(n=n+Math.imul(A,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,i=i+Math.imul(S,ht)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,ht)|0,o=o+Math.imul(E,ut)|0,i=i+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ct)|0;var Ot=(u+(i=i+Math.imul(y,pt)|0)|0)+((8191&(n=(n=n+Math.imul(y,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,i=Math.imul(j,X),n=(n=Math.imul(j,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),i=i+Math.imul(B,$)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,tt)|0,i=i+Math.imul(P,rt)|0,n=(n=n+Math.imul(P,it)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,it)|0,i=i+Math.imul(I,ot)|0,n=(n=n+Math.imul(I,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,i=i+Math.imul(A,ht)|0,n=(n=n+Math.imul(A,ut)|0)+Math.imul(O,ht)|0,o=o+Math.imul(O,ut)|0,i=i+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ct)|0;var Tt=(u+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;u=((o=o+Math.imul(_,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(j,$),n=(n=Math.imul(j,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),i=i+Math.imul(B,rt)|0,n=(n=n+Math.imul(B,it)|0)+Math.imul(L,rt)|0,o=o+Math.imul(L,it)|0,i=i+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,i=i+Math.imul(I,ht)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(R,ht)|0,o=o+Math.imul(R,ut)|0,i=i+Math.imul(A,lt)|0,n=(n=n+Math.imul(A,ct)|0)+Math.imul(O,lt)|0,o=o+Math.imul(O,ct)|0;var It=(u+(i=i+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(j,rt),n=(n=Math.imul(j,it))+Math.imul(U,rt)|0,o=Math.imul(U,it),i=i+Math.imul(B,ot)|0,n=(n=n+Math.imul(B,st)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,st)|0,i=i+Math.imul(P,ht)|0,n=(n=n+Math.imul(P,ut)|0)+Math.imul(x,ht)|0,o=o+Math.imul(x,ut)|0,i=i+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,ct)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,ct)|0;var Rt=(u+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(O,pt)|0))<<13)|0;u=((o=o+Math.imul(O,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,i=Math.imul(j,ot),n=(n=Math.imul(j,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),i=i+Math.imul(B,ht)|0,n=(n=n+Math.imul(B,ut)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,ut)|0,i=i+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,ct)|0)+Math.imul(x,lt)|0,o=o+Math.imul(x,ct)|0;var Ct=(u+(i=i+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(j,ht),n=(n=Math.imul(j,ut))+Math.imul(U,ht)|0,o=Math.imul(U,ut),i=i+Math.imul(B,lt)|0,n=(n=n+Math.imul(B,ct)|0)+Math.imul(L,lt)|0,o=o+Math.imul(L,ct)|0;var Pt=(u+(i=i+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(x,pt)|0))<<13)|0;u=((o=o+Math.imul(x,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(j,lt),n=(n=Math.imul(j,ct))+Math.imul(U,lt)|0,o=Math.imul(U,ct);var xt=(u+(i=i+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((o=o+Math.imul(L,mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863;var Nt=(u+(i=Math.imul(j,pt))|0)+((8191&(n=(n=Math.imul(j,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,h[0]=gt,h[1]=yt,h[2]=bt,h[3]=vt,h[4]=wt,h[5]=_t,h[6]=Mt,h[7]=St,h[8]=Et,h[9]=kt,h[10]=At,h[11]=Ot,h[12]=Tt,h[13]=It,h[14]=Rt,h[15]=Ct,h[16]=Pt,h[17]=xt,h[18]=Nt,0!==u&&(h[19]=u,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=c),n.prototype.mulTo=function(t,e){var r,i=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):i<63?c(this,t,e):i<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,i=s,s=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,t,e):p(this,t,e),r},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=n.prototype._countBits(t)-1,i=0;i>=1;return i},m.prototype.permute=function(t,e,r,i,n,o){for(var s=0;s>>=1)n++;return 1<>>=13,i[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,e+=n/67108864|0,e+=o>>>26,this.words[i]=67108863&o}return 0!==e&&(this.words[i]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>n}return e}(t);if(0===e.length)return new n(1);for(var r=this,i=0;i=0);var e,i=t%26,n=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(e=0;e>>26-i}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,u=0;u=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&a}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,i){return r(0===this.negative),this.iushrn(t,e,i)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26,n=1<=0);var e=t%26,i=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==e&&i++,this.length=Math.min(i,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(h/67108864|0),this.words[n+i]=67108863&o}for(;n>26,this.words[n+i]=67108863&o;if(0===a)return this.strip();for(r(-1===a),a=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),o=t,s=0|o.words[o.length-1];0!=(r=26-this._countBits(s))&&(o=o.ushln(r),i.iushln(r),s=0|o.words[o.length-1]);var a,h=i.length-o.length;if("mod"!==e){(a=new n(null)).length=h+1,a.words=new Array(a.length);for(var u=0;u=0;l--){var c=67108864*(0|i.words[o.length+l])+(0|i.words[o.length+l-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(o,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(o,1,l),i.isZero()||(i.negative^=1);a&&(a.words[l]=c)}return a&&a.strip(),i.strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:a||null,mod:i}},n.prototype.divmod=function(t,e,i){return r(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(o=a.div.neg()),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(o=a.div.neg()),{div:o,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,a},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,i=0,n=this.length-1;n>=0;n--)i=(e*i+(0|this.words[n]))%t;return i},n.prototype.idivn=function(t){r(t<=67108863);for(var e=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*e;this.words[i]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),a=new n(0),h=new n(1),u=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++u;for(var f=i.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;0==(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(a.isOdd()||h.isOdd())&&(a.iadd(f),h.isub(l)),a.iushrn(1),h.iushrn(1);e.cmp(i)>=0?(e.isub(i),o.isub(a),s.isub(h)):(i.isub(e),a.isub(o),h.isub(s))}return{a:a,b:h,gcd:i.iushln(u)}},n.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),a=new n(0),h=i.clone();e.cmpn(1)>0&&i.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);for(var l=0,c=1;0==(i.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(i.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(h),a.iushrn(1);e.cmp(i)>=0?(e.isub(i),s.isub(a)):(i.isub(e),a.isub(s))}return(o=0===e.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var o=e;e=r,r=o}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,i=(t-e)/26,n=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,i=t<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)e=1;else{i&&(t=-t),r(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:nt.length)return 1;if(this.length=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){in&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new M(t)},n.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},i(b,y),b.prototype.split=function(t,e){for(var r=4194303,i=Math.min(t.length,9),n=0;n>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new v;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},M.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var i=this.m.add(new n(1)).iushrn(2);return this.pow(t,i)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);r(!o.isZero());var a=new n(1).toRed(this),h=a.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(h);)f.redIAdd(h);for(var l=this.pow(f,o),c=this.pow(t,o.addn(1).iushrn(1)),d=this.pow(t,o),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g=0;i--){for(var u=e.words[i],f=h-1;f>=0;f--){var l=u>>f&1;o!==r[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++a||0===i&&0===f)&&(o=this.mul(o,r[s]),a=0,s=0)):a=0}h=26}return o},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},i(S,M),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(Fd,Y);var zd={};!function(t){var e=zd;function r(t){return 1===t.length?"0"+t:t}function i(t){for(var e="",i=0;i>8,s=255&n;o?r.push(o,s):r.push(s)}return r},e.zero2=r,e.toHex=i,e.encode=function(t,e){return"hex"===e?i(t):t}}(),function(t){var e=Ud,r=qd,i=Wf,n=zd;e.assert=i,e.toArray=n.toArray,e.zero2=n.zero2,e.toHex=n.toHex,e.encode=n.encode,e.getNAF=function(t,e,r){var i=new Array(Math.max(t.bitLength(),r)+1);i.fill(0);for(var n=1<(n>>1)-1?(n>>1)-h:h,o.isubn(a)):a=0,i[s]=a,o.iushrn(1)}return i},e.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var i,n=0,o=0;t.cmpn(-n)>0||e.cmpn(-o)>0;){var s,a,h=t.andln(3)+n&3,u=e.andln(3)+o&3;3===h&&(h=-1),3===u&&(u=-1),s=0==(1&h)?0:3!==(i=t.andln(7)+n&7)&&5!==i||2!==u?h:-h,r[0].push(s),a=0==(1&u)?0:3!==(i=e.andln(7)+o&7)&&5!==i||2!==h?u:-u,r[1].push(a),2*n===s+1&&(n=1-n),2*o===a+1&&(o=1-o),t.iushrn(1),e.iushrn(1)}return r},e.cachedProperty=function(t,e,r){var i="_"+e;t.prototype[e]=function(){return void 0!==this[i]?this[i]:this[i]=r.call(this)}},e.parseBytes=function(t){return"string"==typeof t?e.toArray(t,"hex"):t},e.intFromLE=function(t){return new r(t,"hex","le")}}();var Hd={},Kd=qd,Vd=Ud,Gd=Vd.getNAF,Wd=Vd.getJSF,Yd=Vd.assert;function Zd(t,e){this.type=t,this.p=new Kd(e.p,16),this.red=e.prime?Kd.red(e.prime):Kd.mont(this.p),this.zero=new Kd(0).toRed(this.red),this.one=new Kd(1).toRed(this.red),this.two=new Kd(2).toRed(this.red),this.n=e.n&&new Kd(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Xd=Zd;function Qd(t,e){this.curve=t,this.type=e,this.precomputed=null}Zd.prototype.point=function(){throw new Error("Not implemented")},Zd.prototype.validate=function(){throw new Error("Not implemented")},Zd.prototype._fixedNafMul=function(t,e){Yd(t.precomputed);var r=t._getDoubles(),i=Gd(e,1,this._bitLength),n=(1<=o;h--)s=(s<<1)+i[h];a.push(s)}for(var u=this.jpoint(null,null,null),f=this.jpoint(null,null,null),l=n;l>0;l--){for(o=0;o=0;a--){for(var h=0;a>=0&&0===o[a];a--)h++;if(a>=0&&h++,s=s.dblp(h),a<0)break;var u=o[a];Yd(0!==u),s="affine"===t.type?u>0?s.mixedAdd(n[u-1>>1]):s.mixedAdd(n[-u-1>>1].neg()):u>0?s.add(n[u-1>>1]):s.add(n[-u-1>>1].neg())}return"affine"===t.type?s.toP():s},Zd.prototype._wnafMulAdd=function(t,e,r,i,n){var o,s,a,h=this._wnafT1,u=this._wnafT2,f=this._wnafT3,l=0;for(o=0;o=1;o-=2){var d=o-1,p=o;if(1===h[d]&&1===h[p]){var m=[e[d],null,null,e[p]];0===e[d].y.cmp(e[p].y)?(m[1]=e[d].add(e[p]),m[2]=e[d].toJ().mixedAdd(e[p].neg())):0===e[d].y.cmp(e[p].y.redNeg())?(m[1]=e[d].toJ().mixedAdd(e[p]),m[2]=e[d].add(e[p].neg())):(m[1]=e[d].toJ().mixedAdd(e[p]),m[2]=e[d].toJ().mixedAdd(e[p].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],y=Wd(r[d],r[p]);for(l=Math.max(y[0].length,l),f[d]=new Array(l),f[p]=new Array(l),s=0;s=0;o--){for(var M=0;o>=0;){var S=!0;for(s=0;s=0&&M++,w=w.dblp(M),o<0)break;for(s=0;s0?a=u[s][E-1>>1]:E<0&&(a=u[s][-E-1>>1].neg()),w="affine"===a.type?w.mixedAdd(a):w.add(a))}}for(o=0;o=Math.ceil((t.bitLength()+1)/e.step)},Qd.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],i=this,n=0;n=0&&(o=e,s=r),i.negative&&(i=i.neg(),n=n.neg()),o.negative&&(o=o.neg(),s=s.neg()),[{a:i,b:n},{a:o,b:s}]},rp.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],i=e[1],n=i.b.mul(t).divRound(this.n),o=r.b.neg().mul(t).divRound(this.n),s=n.mul(r.a),a=o.mul(i.a),h=n.mul(r.b),u=o.mul(i.b);return{k1:t.sub(s).sub(a),k2:h.add(u).neg()}},rp.prototype.pointFromX=function(t,e){(t=new Jd(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),i=r.redSqrt();if(0!==i.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var n=i.fromRed().isOdd();return(e&&!n||!e&&n)&&(i=i.redNeg()),this.point(t,i)},rp.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,i=this.a.redMul(e),n=e.redSqr().redMul(e).redIAdd(i).redIAdd(this.b);return 0===r.redSqr().redISub(n).cmpn(0)},rp.prototype._endoWnafMulAdd=function(t,e,r){for(var i=this._endoWnafT1,n=this._endoWnafT2,o=0;o":""},np.prototype.isInfinity=function(){return this.inf},np.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),i=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,i)},np.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),i=t.redInvm(),n=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(i),o=n.redSqr().redISub(this.x.redAdd(this.x)),s=n.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},np.prototype.getX=function(){return this.x.fromRed()},np.prototype.getY=function(){return this.y.fromRed()},np.prototype.mul=function(t){return t=new Jd(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},np.prototype.mulAdd=function(t,e,r){var i=[this,e],n=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n):this.curve._wnafMulAdd(1,i,n,2)},np.prototype.jmulAdd=function(t,e,r){var i=[this,e],n=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n,!0):this.curve._wnafMulAdd(1,i,n,2,!0)},np.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},np.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,i=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(i)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(i)}}}return e},np.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},$d(op,tp.BasePoint),rp.prototype.jpoint=function(t,e,r){return new op(this,t,e,r)},op.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),i=this.y.redMul(e).redMul(t);return this.curve.point(r,i)},op.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},op.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),i=this.x.redMul(e),n=t.x.redMul(r),o=this.y.redMul(e.redMul(t.z)),s=t.y.redMul(r.redMul(this.z)),a=i.redSub(n),h=o.redSub(s);if(0===a.cmpn(0))return 0!==h.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),f=u.redMul(a),l=i.redMul(u),c=h.redSqr().redIAdd(f).redISub(l).redISub(l),d=h.redMul(l.redISub(c)).redISub(o.redMul(f)),p=this.z.redMul(t.z).redMul(a);return this.curve.jpoint(c,d,p)},op.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,i=t.x.redMul(e),n=this.y,o=t.y.redMul(e).redMul(this.z),s=r.redSub(i),a=n.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var h=s.redSqr(),u=h.redMul(s),f=r.redMul(h),l=a.redSqr().redIAdd(u).redISub(f).redISub(f),c=a.redMul(f.redISub(l)).redISub(n.redMul(u)),d=this.z.redMul(s);return this.curve.jpoint(l,c,d)},op.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var r=this;for(e=0;e=0)return!1;if(r.redIAdd(n),0===this.x.cmp(r))return!0}},op.prototype.inspect=function(){return this.isInfinity()?"":""},op.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var sp=qd,ap=Wn,hp=Xd,up=Ud;function fp(t){hp.call(this,"mont",t),this.a=new sp(t.a,16).toRed(this.red),this.b=new sp(t.b,16).toRed(this.red),this.i4=new sp(4).toRed(this.red).redInvm(),this.two=new sp(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}ap(fp,hp);var lp=fp;function cp(t,e,r){hp.BasePoint.call(this,t,"projective"),null===e&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new sp(e,16),this.z=new sp(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}fp.prototype.validate=function(t){var e=t.normalize().x,r=e.redSqr(),i=r.redMul(e).redAdd(r.redMul(this.a)).redAdd(e);return 0===i.redSqrt().redSqr().cmp(i)},ap(cp,hp.BasePoint),fp.prototype.decodePoint=function(t,e){return this.point(up.toArray(t,e),1)},fp.prototype.point=function(t,e){return new cp(this,t,e)},fp.prototype.pointFromJSON=function(t){return cp.fromJSON(this,t)},cp.prototype.precompute=function(){},cp.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},cp.fromJSON=function(t,e){return new cp(t,e[0],e[1]||t.one)},cp.prototype.inspect=function(){return this.isInfinity()?"":""},cp.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},cp.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),r=t.redSub(e),i=t.redMul(e),n=r.redMul(e.redAdd(this.curve.a24.redMul(r)));return this.curve.point(i,n)},cp.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},cp.prototype.diffAdd=function(t,e){var r=this.x.redAdd(this.z),i=this.x.redSub(this.z),n=t.x.redAdd(t.z),o=t.x.redSub(t.z).redMul(r),s=n.redMul(i),a=e.z.redMul(o.redAdd(s).redSqr()),h=e.x.redMul(o.redISub(s).redSqr());return this.curve.point(a,h)},cp.prototype.mul=function(t){for(var e=t.clone(),r=this,i=this.curve.point(null,null),n=[];0!==e.cmpn(0);e.iushrn(1))n.push(e.andln(1));for(var o=n.length-1;o>=0;o--)0===n[o]?(r=r.diffAdd(i,this),i=i.dbl()):(i=r.diffAdd(i,this),r=r.dbl());return i},cp.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},cp.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},cp.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},cp.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},cp.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var dp=qd,pp=Wn,mp=Xd,gp=Ud.assert;function yp(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,mp.call(this,"edwards",t),this.a=new dp(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new dp(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new dp(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),gp(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}pp(yp,mp);var bp=yp;function vp(t,e,r,i,n){mp.BasePoint.call(this,t,"projective"),null===e&&null===r&&null===i?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new dp(e,16),this.y=new dp(r,16),this.z=i?new dp(i,16):this.curve.one,this.t=n&&new dp(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}yp.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},yp.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},yp.prototype.jpoint=function(t,e,r,i){return this.point(t,e,r,i)},yp.prototype.pointFromX=function(t,e){(t=new dp(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),i=this.c2.redSub(this.a.redMul(r)),n=this.one.redSub(this.c2.redMul(this.d).redMul(r)),o=i.redMul(n.redInvm()),s=o.redSqrt();if(0!==s.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");var a=s.fromRed().isOdd();return(e&&!a||!e&&a)&&(s=s.redNeg()),this.point(t,s)},yp.prototype.pointFromY=function(t,e){(t=new dp(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),i=r.redSub(this.c2),n=r.redMul(this.d).redMul(this.c2).redSub(this.a),o=i.redMul(n.redInvm());if(0===o.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var s=o.redSqrt();if(0!==s.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==e&&(s=s.redNeg()),this.point(s,t)},yp.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),r=t.y.redSqr(),i=e.redMul(this.a).redAdd(r),n=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(r)));return 0===i.cmp(n)},pp(vp,mp.BasePoint),yp.prototype.pointFromJSON=function(t){return vp.fromJSON(this,t)},yp.prototype.point=function(t,e,r,i){return new vp(this,t,e,r,i)},vp.fromJSON=function(t,e){return new vp(t,e[0],e[1],e[2])},vp.prototype.inspect=function(){return this.isInfinity()?"":""},vp.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},vp.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var i=this.curve._mulA(t),n=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=i.redAdd(e),s=o.redSub(r),a=i.redSub(e),h=n.redMul(s),u=o.redMul(a),f=n.redMul(a),l=s.redMul(o);return this.curve.point(h,u,l,f)},vp.prototype._projDbl=function(){var t,e,r,i,n,o,s=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),h=this.y.redSqr();if(this.curve.twisted){var u=(i=this.curve._mulA(a)).redAdd(h);this.zOne?(t=s.redSub(a).redSub(h).redMul(u.redSub(this.curve.two)),e=u.redMul(i.redSub(h)),r=u.redSqr().redSub(u).redSub(u)):(n=this.z.redSqr(),o=u.redSub(n).redISub(n),t=s.redSub(a).redISub(h).redMul(o),e=u.redMul(i.redSub(h)),r=u.redMul(o))}else i=a.redAdd(h),n=this.curve._mulC(this.z).redSqr(),o=i.redSub(n).redSub(n),t=this.curve._mulC(s.redISub(i)).redMul(o),e=this.curve._mulC(i).redMul(a.redISub(h)),r=i.redMul(o);return this.curve.point(t,e,r)},vp.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},vp.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),r=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),i=this.t.redMul(this.curve.dd).redMul(t.t),n=this.z.redMul(t.z.redAdd(t.z)),o=r.redSub(e),s=n.redSub(i),a=n.redAdd(i),h=r.redAdd(e),u=o.redMul(s),f=a.redMul(h),l=o.redMul(h),c=s.redMul(a);return this.curve.point(u,f,c,l)},vp.prototype._projAdd=function(t){var e,r,i=this.z.redMul(t.z),n=i.redSqr(),o=this.x.redMul(t.x),s=this.y.redMul(t.y),a=this.curve.d.redMul(o).redMul(s),h=n.redSub(a),u=n.redAdd(a),f=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(s),l=i.redMul(h).redMul(f);return this.curve.twisted?(e=i.redMul(u).redMul(s.redSub(this.curve._mulA(o))),r=h.redMul(u)):(e=i.redMul(u).redMul(s.redSub(o)),r=this.curve._mulC(h).redMul(u)),this.curve.point(l,e,r)},vp.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},vp.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},vp.prototype.mulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!1)},vp.prototype.jmulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!0)},vp.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},vp.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},vp.prototype.getX=function(){return this.normalize(),this.x.fromRed()},vp.prototype.getY=function(){return this.normalize(),this.y.fromRed()},vp.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},vp.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var r=t.clone(),i=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(i),0===this.x.cmp(e))return!0}},vp.prototype.toP=vp.prototype.normalize,vp.prototype.mixedAdd=vp.prototype.add,function(t){var e=t;e.base=Xd,e.short=ip,e.mont=lp,e.edwards=bp}(Hd);var wp={},_p={},Mp={},Sp=Wf,Ep=Wn;function kp(t,e){return 55296==(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1)))}function Ap(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function Op(t){return 1===t.length?"0"+t:t}function Tp(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}Mp.inherits=Ep,Mp.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),n=0;n>6|192,r[i++]=63&o|128):kp(t,n)?(o=65536+((1023&o)<<10)+(1023&t.charCodeAt(++n)),r[i++]=o>>18|240,r[i++]=o>>12&63|128,r[i++]=o>>6&63|128,r[i++]=63&o|128):(r[i++]=o>>12|224,r[i++]=o>>6&63|128,r[i++]=63&o|128)}else for(n=0;n>>0}return o},Mp.split32=function(t,e){for(var r=new Array(4*t.length),i=0,n=0;i>>24,r[n+1]=o>>>16&255,r[n+2]=o>>>8&255,r[n+3]=255&o):(r[n+3]=o>>>24,r[n+2]=o>>>16&255,r[n+1]=o>>>8&255,r[n]=255&o)}return r},Mp.rotr32=function(t,e){return t>>>e|t<<32-e},Mp.rotl32=function(t,e){return t<>>32-e},Mp.sum32=function(t,e){return t+e>>>0},Mp.sum32_3=function(t,e,r){return t+e+r>>>0},Mp.sum32_4=function(t,e,r,i){return t+e+r+i>>>0},Mp.sum32_5=function(t,e,r,i,n){return t+e+r+i+n>>>0},Mp.sum64=function(t,e,r,i){var n=t[e],o=i+t[e+1]>>>0,s=(o>>0,t[e+1]=o},Mp.sum64_hi=function(t,e,r,i){return(e+i>>>0>>0},Mp.sum64_lo=function(t,e,r,i){return e+i>>>0},Mp.sum64_4_hi=function(t,e,r,i,n,o,s,a){var h=0,u=e;return h+=(u=u+i>>>0)>>0)>>0)>>0},Mp.sum64_4_lo=function(t,e,r,i,n,o,s,a){return e+i+o+a>>>0},Mp.sum64_5_hi=function(t,e,r,i,n,o,s,a,h,u){var f=0,l=e;return f+=(l=l+i>>>0)>>0)>>0)>>0)>>0},Mp.sum64_5_lo=function(t,e,r,i,n,o,s,a,h,u){return e+i+o+a+u>>>0},Mp.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},Mp.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},Mp.shr64_hi=function(t,e,r){return t>>>r},Mp.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0};var Ip={},Rp=Mp,Cp=Wf;function Pp(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}Ip.BlockHash=Pp,Pp.prototype.update=function(t,e){if(t=Rp.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=Rp.join32(t,0,t.length-r,this.endian);for(var i=0;i>>24&255,i[n++]=t>>>16&255,i[n++]=t>>>8&255,i[n++]=255&t}else for(i[n++]=255&t,i[n++]=t>>>8&255,i[n++]=t>>>16&255,i[n++]=t>>>24&255,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0,o=8;o>>3},Np.g1_256=function(t){return Bp(t,17)^Bp(t,19)^t>>>10};var Up=Mp,qp=Ip,Fp=Np,zp=Up.rotl32,Hp=Up.sum32,Kp=Up.sum32_5,Vp=Fp.ft_1,Gp=qp.BlockHash,Wp=[1518500249,1859775393,2400959708,3395469782];function Yp(){if(!(this instanceof Yp))return new Yp;Gp.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}Up.inherits(Yp,Gp);var Zp=Yp;Yp.blockSize=512,Yp.outSize=160,Yp.hmacStrength=80,Yp.padLength=64,Yp.prototype._update=function(t,e){for(var r=this.W,i=0;i<16;i++)r[i]=t[e+i];for(;ithis.blockSize&&(t=(new this.Hash).update(t).digest()),pg(t.length<=this.blockSize);for(var e=t.length;e=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,i)}var Sg=Mg;Mg.prototype._init=function(t,e,r){var i=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},Mg.prototype.generate=function(t,e,r,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(i=r,r=e,e=null),r&&(r=wg.toArray(r,i||"hex"),this._update(r));for(var n=[];n.length"};var Tg=qd,Ig=Ud,Rg=Ig.assert;function Cg(t,e){if(t instanceof Cg)return t;this._importDER(t,e)||(Rg(t.r&&t.s,"Signature without r or s"),this.r=new Tg(t.r,16),this.s=new Tg(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var Pg,xg,Ng=Cg;function Bg(){this.place=0}function Lg(t,e){var r=t[e.place++];if(!(128&r))return r;var i=15&r;if(0===i||i>4)return!1;for(var n=0,o=0,s=e.place;o>>=0;return!(n<=127)&&(e.place=s,n)}function Dg(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}Cg.prototype._importDER=function(t,e){t=Ig.toArray(t,e);var r=new Bg;if(48!==t[r.place++])return!1;var i=Lg(t,r);if(!1===i)return!1;if(i+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var n=Lg(t,r);if(!1===n)return!1;var o=t.slice(r.place,n+r.place);if(r.place+=n,2!==t[r.place++])return!1;var s=Lg(t,r);if(!1===s)return!1;if(t.length!==s+r.place)return!1;var a=t.slice(r.place,s+r.place);if(0===o[0]){if(!(128&o[1]))return!1;o=o.slice(1)}if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}return this.r=new Tg(o),this.s=new Tg(a),this.recoveryParam=null,!0},Cg.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=Dg(e),r=Dg(r);!(r[0]||128&r[1]);)r=r.slice(1);var i=[2];jg(i,e.length),(i=i.concat(e)).push(2),jg(i,r.length);var n=i.concat(r),o=[48];return jg(o,n.length),o=o.concat(n),Ig.encode(o,t)};var Ug=Ud,qg=Ug.assert,Fg=Ug.parseBytes,zg=Ug.cachedProperty;function Hg(t,e){this.eddsa=t,this._secret=Fg(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=Fg(e.pub)}Hg.fromPublic=function(t,e){return e instanceof Hg?e:new Hg(t,{pub:e})},Hg.fromSecret=function(t,e){return e instanceof Hg?e:new Hg(t,{secret:e})},Hg.prototype.secret=function(){return this._secret},zg(Hg,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),zg(Hg,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),zg(Hg,"privBytes",(function(){var t=this.eddsa,e=this.hash(),r=t.encodingLength-1,i=e.slice(0,t.encodingLength);return i[0]&=248,i[r]&=127,i[r]|=64,i})),zg(Hg,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),zg(Hg,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),zg(Hg,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),Hg.prototype.sign=function(t){return qg(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)},Hg.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},Hg.prototype.getSecret=function(t){return qg(this._secret,"KeyPair is public only"),Ug.encode(this.secret(),t)},Hg.prototype.getPublic=function(t){return Ug.encode(this.pubBytes(),t)};var Kg=Hg,Vg=qd,Gg=Ud,Wg=Gg.assert,Yg=Gg.cachedProperty,Zg=Gg.parseBytes;function Xg(t,e){this.eddsa=t,"object"!=typeof e&&(e=Zg(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),Wg(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof Vg&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}Yg(Xg,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),Yg(Xg,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),Yg(Xg,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),Yg(Xg,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),Xg.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},Xg.prototype.toHex=function(){return Gg.encode(this.toBytes(),"hex").toUpperCase()};var Qg=Xg,Jg=_p,$g=wp,ty=Ud,ey=ty.assert,ry=ty.parseBytes,iy=Kg,ny=Qg;function oy(t){if(ey("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof oy))return new oy(t);t=$g[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=Jg.sha512}var sy,ay=oy;function hy(){return sy||(sy=1,function(t){var e=t;e.version=jd.version,e.utils=Ud,e.rand=wd(),e.curve=Hd,e.curves=wp,e.ec=function(){if(xg)return Pg;xg=1;var t=qd,e=Sg,r=Ud,i=wp,n=wd(),o=r.assert,s=Og,a=Ng;function h(t){if(!(this instanceof h))return new h(t);"string"==typeof t&&(o(Object.prototype.hasOwnProperty.call(i,t),"Unknown curve "+t),t=i[t]),t instanceof i.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}return Pg=h,h.prototype.keyPair=function(t){return new s(this,t)},h.prototype.keyFromPrivate=function(t,e){return s.fromPrivate(this,t,e)},h.prototype.keyFromPublic=function(t,e){return s.fromPublic(this,t,e)},h.prototype.genKeyPair=function(r){r||(r={});for(var i=new e({hash:this.hash,pers:r.pers,persEnc:r.persEnc||"utf8",entropy:r.entropy||n(this.hash.hmacStrength),entropyEnc:r.entropy&&r.entropyEnc||"utf8",nonce:this.n.toArray()}),o=this.n.byteLength(),s=this.n.sub(new t(2));;){var a=new t(i.generate(o));if(!(a.cmp(s)>0))return a.iaddn(1),this.keyFromPrivate(a)}},h.prototype._truncateToN=function(t,e){var r=8*t.byteLength()-this.n.bitLength();return r>0&&(t=t.ushrn(r)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},h.prototype.sign=function(r,i,n,o){"object"==typeof n&&(o=n,n=null),o||(o={}),i=this.keyFromPrivate(i,n),r=this._truncateToN(new t(r,16));for(var s=this.n.byteLength(),h=i.getPrivate().toArray("be",s),u=r.toArray("be",s),f=new e({hash:this.hash,entropy:h,nonce:u,pers:o.pers,persEnc:o.persEnc||"utf8"}),l=this.n.sub(new t(1)),c=0;;c++){var d=o.k?o.k(c):new t(f.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(l)>=0)){var p=this.g.mul(d);if(!p.isInfinity()){var m=p.getX(),g=m.umod(this.n);if(0!==g.cmpn(0)){var y=d.invm(this.n).mul(g.mul(i.getPrivate()).iadd(r));if(0!==(y=y.umod(this.n)).cmpn(0)){var b=(p.getY().isOdd()?1:0)|(0!==m.cmp(g)?2:0);return o.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),b^=1),new a({r:g,s:y,recoveryParam:b})}}}}}},h.prototype.verify=function(e,r,i,n){e=this._truncateToN(new t(e,16)),i=this.keyFromPublic(i,n);var o=(r=new a(r,"hex")).r,s=r.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var h,u=s.invm(this.n),f=u.mul(e).umod(this.n),l=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(h=this.g.jmulAdd(f,i.getPublic(),l)).isInfinity()&&h.eqXToP(o):!(h=this.g.mulAdd(f,i.getPublic(),l)).isInfinity()&&0===h.getX().umod(this.n).cmp(o)},h.prototype.recoverPubKey=function(e,r,i,n){o((3&i)===i,"The recovery param is more than two bits"),r=new a(r,n);var s=this.n,h=new t(e),u=r.r,f=r.s,l=1&i,c=i>>1;if(u.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");u=c?this.curve.pointFromX(u.add(this.curve.n),l):this.curve.pointFromX(u,l);var d=r.r.invm(s),p=s.sub(h).mul(d).umod(s),m=f.mul(d).umod(s);return this.g.mulAdd(p,u,m)},h.prototype.getKeyRecoveryParam=function(t,e,r,i){if(null!==(e=new a(e,i)).recoveryParam)return e.recoveryParam;for(var n=0;n<4;n++){var o;try{o=this.recoverPubKey(t,e,n)}catch(t){continue}if(o.eq(r))return n}throw new Error("Unable to find valid recovery factor")},Pg}(),e.eddsa=ay}(Dd)),Dd}oy.prototype.sign=function(t,e){t=ry(t);var r=this.keyFromSecret(e),i=this.hashInt(r.messagePrefix(),t),n=this.g.mul(i),o=this.encodePoint(n),s=this.hashInt(o,r.pubBytes(),t).mul(r.priv()),a=i.add(s).umod(this.curve.n);return this.makeSignature({R:n,S:a,Rencoded:o})},oy.prototype.verify=function(t,e,r){t=ry(t),e=this.makeSignature(e);var i=this.keyFromPublic(r),n=this.hashInt(e.Rencoded(),i.pubBytes(),t),o=this.g.mul(e.S());return e.R().add(i.pub().mul(n)).eq(o)},oy.prototype.hashInt=function(){for(var t=this.hash(),e=0;e=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function a(t,e,r){var i=s(t,r);return r-1>=e&&(i|=s(t,r-1)<<4),i}function h(t,e,r,i){for(var n=0,o=Math.min(t.length,r),s=e;s=49?a-49+10:a>=17?a-17+10:a}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,i){if("number"==typeof t)return this._initNumber(t,e,i);if("object"==typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===i)for(n=0,o=0;n>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i=e;i-=2)n=a(t,e,i)<=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(t.length-e)%2==0?e+1:e;i=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var o=t.length-r,s=o%i,a=Math.min(o,o-s)+r,u=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function c(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,a=67108863&s,h=s/67108864|0;r.words[0]=a;for(var u=1;u>>26,l=67108863&h,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[u]=0|l,h=0|f}return 0!==h?r.words[u]=0|h:r.length--,r.strip()}n.prototype.toString=function(t,e){var i;if(e=0|e||1,16===(t=t||10)||"hex"===t){i="";for(var n=0,o=0,s=0;s>>24-n&16777215)||s!==this.length-1?u[6-h.length]+h+i:h+i,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(i=o.toString(16)+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var c=f[t],d=l[t];i="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);i=(p=p.idivn(d)).isZero()?m+i:u[c-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return r(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,i){var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,h="le"===e,u=new t(o),f=this.clone();if(h){for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),u[a]=s;for(;a=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},n.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;it.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var i=t/26|0,n=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<t.length?(r=this,i=t):(r=t,i=this);for(var n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},n.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,M=0|s[4],S=8191&M,E=M>>>13,k=0|s[5],A=8191&k,O=k>>>13,T=0|s[6],I=8191&T,R=T>>>13,C=0|s[7],P=8191&C,x=C>>>13,N=0|s[8],B=8191&N,L=N>>>13,D=0|s[9],j=8191&D,U=D>>>13,q=0|a[0],F=8191&q,z=q>>>13,H=0|a[1],K=8191&H,V=H>>>13,G=0|a[2],W=8191&G,Y=G>>>13,Z=0|a[3],X=8191&Z,Q=Z>>>13,J=0|a[4],$=8191&J,tt=J>>>13,et=0|a[5],rt=8191&et,it=et>>>13,nt=0|a[6],ot=8191&nt,st=nt>>>13,at=0|a[7],ht=8191&at,ut=at>>>13,ft=0|a[8],lt=8191&ft,ct=ft>>>13,dt=0|a[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(i=Math.imul(l,F))|0)+((8191&(n=(n=Math.imul(l,z))+Math.imul(c,F)|0))<<13)|0;u=((o=Math.imul(c,z))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,F),n=(n=Math.imul(p,z))+Math.imul(m,F)|0,o=Math.imul(m,z);var yt=(u+(i=i+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,V)|0)+Math.imul(c,K)|0))<<13)|0;u=((o=o+Math.imul(c,V)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(y,F),n=(n=Math.imul(y,z))+Math.imul(b,F)|0,o=Math.imul(b,z),i=i+Math.imul(p,K)|0,n=(n=n+Math.imul(p,V)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,V)|0;var bt=(u+(i=i+Math.imul(l,W)|0)|0)+((8191&(n=(n=n+Math.imul(l,Y)|0)+Math.imul(c,W)|0))<<13)|0;u=((o=o+Math.imul(c,Y)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(w,F),n=(n=Math.imul(w,z))+Math.imul(_,F)|0,o=Math.imul(_,z),i=i+Math.imul(y,K)|0,n=(n=n+Math.imul(y,V)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,V)|0,i=i+Math.imul(p,W)|0,n=(n=n+Math.imul(p,Y)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,Y)|0;var vt=(u+(i=i+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(c,X)|0))<<13)|0;u=((o=o+Math.imul(c,Q)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(S,F),n=(n=Math.imul(S,z))+Math.imul(E,F)|0,o=Math.imul(E,z),i=i+Math.imul(w,K)|0,n=(n=n+Math.imul(w,V)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,V)|0,i=i+Math.imul(y,W)|0,n=(n=n+Math.imul(y,Y)|0)+Math.imul(b,W)|0,o=o+Math.imul(b,Y)|0,i=i+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(i=i+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0))<<13)|0;u=((o=o+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(A,F),n=(n=Math.imul(A,z))+Math.imul(O,F)|0,o=Math.imul(O,z),i=i+Math.imul(S,K)|0,n=(n=n+Math.imul(S,V)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,V)|0,i=i+Math.imul(w,W)|0,n=(n=n+Math.imul(w,Y)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Y)|0,i=i+Math.imul(y,X)|0,n=(n=n+Math.imul(y,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var _t=(u+(i=i+Math.imul(l,rt)|0)|0)+((8191&(n=(n=n+Math.imul(l,it)|0)+Math.imul(c,rt)|0))<<13)|0;u=((o=o+Math.imul(c,it)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(I,F),n=(n=Math.imul(I,z))+Math.imul(R,F)|0,o=Math.imul(R,z),i=i+Math.imul(A,K)|0,n=(n=n+Math.imul(A,V)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,V)|0,i=i+Math.imul(S,W)|0,n=(n=n+Math.imul(S,Y)|0)+Math.imul(E,W)|0,o=o+Math.imul(E,Y)|0,i=i+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,Q)|0,i=i+Math.imul(y,$)|0,n=(n=n+Math.imul(y,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,it)|0;var Mt=(u+(i=i+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,ot)|0))<<13)|0;u=((o=o+Math.imul(c,st)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(P,F),n=(n=Math.imul(P,z))+Math.imul(x,F)|0,o=Math.imul(x,z),i=i+Math.imul(I,K)|0,n=(n=n+Math.imul(I,V)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,V)|0,i=i+Math.imul(A,W)|0,n=(n=n+Math.imul(A,Y)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,Y)|0,i=i+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,i=i+Math.imul(y,rt)|0,n=(n=n+Math.imul(y,it)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,it)|0,i=i+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(i=i+Math.imul(l,ht)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,ht)|0))<<13)|0;u=((o=o+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(B,F),n=(n=Math.imul(B,z))+Math.imul(L,F)|0,o=Math.imul(L,z),i=i+Math.imul(P,K)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,V)|0,i=i+Math.imul(I,W)|0,n=(n=n+Math.imul(I,Y)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,Y)|0,i=i+Math.imul(A,X)|0,n=(n=n+Math.imul(A,Q)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,Q)|0,i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,it)|0,i=i+Math.imul(y,ot)|0,n=(n=n+Math.imul(y,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,i=i+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(i=i+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((o=o+Math.imul(c,ct)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(j,F),n=(n=Math.imul(j,z))+Math.imul(U,F)|0,o=Math.imul(U,z),i=i+Math.imul(B,K)|0,n=(n=n+Math.imul(B,V)|0)+Math.imul(L,K)|0,o=o+Math.imul(L,V)|0,i=i+Math.imul(P,W)|0,n=(n=n+Math.imul(P,Y)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,Y)|0,i=i+Math.imul(I,X)|0,n=(n=n+Math.imul(I,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,tt)|0,i=i+Math.imul(S,rt)|0,n=(n=n+Math.imul(S,it)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,it)|0,i=i+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,i=i+Math.imul(y,ht)|0,n=(n=n+Math.imul(y,ut)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,ut)|0,i=i+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ct)|0;var kt=(u+(i=i+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((o=o+Math.imul(c,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(j,K),n=(n=Math.imul(j,V))+Math.imul(U,K)|0,o=Math.imul(U,V),i=i+Math.imul(B,W)|0,n=(n=n+Math.imul(B,Y)|0)+Math.imul(L,W)|0,o=o+Math.imul(L,Y)|0,i=i+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,Q)|0,i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,it)|0,i=i+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,i=i+Math.imul(w,ht)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,ut)|0,i=i+Math.imul(y,lt)|0,n=(n=n+Math.imul(y,ct)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,ct)|0;var At=(u+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(j,W),n=(n=Math.imul(j,Y))+Math.imul(U,W)|0,o=Math.imul(U,Y),i=i+Math.imul(B,X)|0,n=(n=n+Math.imul(B,Q)|0)+Math.imul(L,X)|0,o=o+Math.imul(L,Q)|0,i=i+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,tt)|0,i=i+Math.imul(I,rt)|0,n=(n=n+Math.imul(I,it)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,it)|0,i=i+Math.imul(A,ot)|0,n=(n=n+Math.imul(A,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,i=i+Math.imul(S,ht)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,ht)|0,o=o+Math.imul(E,ut)|0,i=i+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ct)|0;var Ot=(u+(i=i+Math.imul(y,pt)|0)|0)+((8191&(n=(n=n+Math.imul(y,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,i=Math.imul(j,X),n=(n=Math.imul(j,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),i=i+Math.imul(B,$)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,tt)|0,i=i+Math.imul(P,rt)|0,n=(n=n+Math.imul(P,it)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,it)|0,i=i+Math.imul(I,ot)|0,n=(n=n+Math.imul(I,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,i=i+Math.imul(A,ht)|0,n=(n=n+Math.imul(A,ut)|0)+Math.imul(O,ht)|0,o=o+Math.imul(O,ut)|0,i=i+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ct)|0;var Tt=(u+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;u=((o=o+Math.imul(_,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(j,$),n=(n=Math.imul(j,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),i=i+Math.imul(B,rt)|0,n=(n=n+Math.imul(B,it)|0)+Math.imul(L,rt)|0,o=o+Math.imul(L,it)|0,i=i+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,i=i+Math.imul(I,ht)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(R,ht)|0,o=o+Math.imul(R,ut)|0,i=i+Math.imul(A,lt)|0,n=(n=n+Math.imul(A,ct)|0)+Math.imul(O,lt)|0,o=o+Math.imul(O,ct)|0;var It=(u+(i=i+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(j,rt),n=(n=Math.imul(j,it))+Math.imul(U,rt)|0,o=Math.imul(U,it),i=i+Math.imul(B,ot)|0,n=(n=n+Math.imul(B,st)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,st)|0,i=i+Math.imul(P,ht)|0,n=(n=n+Math.imul(P,ut)|0)+Math.imul(x,ht)|0,o=o+Math.imul(x,ut)|0,i=i+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,ct)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,ct)|0;var Rt=(u+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(O,pt)|0))<<13)|0;u=((o=o+Math.imul(O,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,i=Math.imul(j,ot),n=(n=Math.imul(j,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),i=i+Math.imul(B,ht)|0,n=(n=n+Math.imul(B,ut)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,ut)|0,i=i+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,ct)|0)+Math.imul(x,lt)|0,o=o+Math.imul(x,ct)|0;var Ct=(u+(i=i+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(j,ht),n=(n=Math.imul(j,ut))+Math.imul(U,ht)|0,o=Math.imul(U,ut),i=i+Math.imul(B,lt)|0,n=(n=n+Math.imul(B,ct)|0)+Math.imul(L,lt)|0,o=o+Math.imul(L,ct)|0;var Pt=(u+(i=i+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(x,pt)|0))<<13)|0;u=((o=o+Math.imul(x,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(j,lt),n=(n=Math.imul(j,ct))+Math.imul(U,lt)|0,o=Math.imul(U,ct);var xt=(u+(i=i+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((o=o+Math.imul(L,mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863;var Nt=(u+(i=Math.imul(j,pt))|0)+((8191&(n=(n=Math.imul(j,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,h[0]=gt,h[1]=yt,h[2]=bt,h[3]=vt,h[4]=wt,h[5]=_t,h[6]=Mt,h[7]=St,h[8]=Et,h[9]=kt,h[10]=At,h[11]=Ot,h[12]=Tt,h[13]=It,h[14]=Rt,h[15]=Ct,h[16]=Pt,h[17]=xt,h[18]=Nt,0!==u&&(h[19]=u,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=c),n.prototype.mulTo=function(t,e){var r,i=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):i<63?c(this,t,e):i<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,i=s,s=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,t,e):p(this,t,e),r},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=n.prototype._countBits(t)-1,i=0;i>=1;return i},m.prototype.permute=function(t,e,r,i,n,o){for(var s=0;s>>=1)n++;return 1<>>=13,i[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,e+=n/67108864|0,e+=o>>>26,this.words[i]=67108863&o}return 0!==e&&(this.words[i]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>n}return e}(t);if(0===e.length)return new n(1);for(var r=this,i=0;i=0);var e,i=t%26,n=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(e=0;e>>26-i}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,u=0;u=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&a}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,i){return r(0===this.negative),this.iushrn(t,e,i)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26,n=1<=0);var e=t%26,i=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==e&&i++,this.length=Math.min(i,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(h/67108864|0),this.words[n+i]=67108863&o}for(;n>26,this.words[n+i]=67108863&o;if(0===a)return this.strip();for(r(-1===a),a=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),o=t,s=0|o.words[o.length-1];0!=(r=26-this._countBits(s))&&(o=o.ushln(r),i.iushln(r),s=0|o.words[o.length-1]);var a,h=i.length-o.length;if("mod"!==e){(a=new n(null)).length=h+1,a.words=new Array(a.length);for(var u=0;u=0;l--){var c=67108864*(0|i.words[o.length+l])+(0|i.words[o.length+l-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(o,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(o,1,l),i.isZero()||(i.negative^=1);a&&(a.words[l]=c)}return a&&a.strip(),i.strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:a||null,mod:i}},n.prototype.divmod=function(t,e,i){return r(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(o=a.div.neg()),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(o=a.div.neg()),{div:o,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,a},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,i=0,n=this.length-1;n>=0;n--)i=(e*i+(0|this.words[n]))%t;return i},n.prototype.idivn=function(t){r(t<=67108863);for(var e=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*e;this.words[i]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),a=new n(0),h=new n(1),u=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++u;for(var f=i.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;0==(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(a.isOdd()||h.isOdd())&&(a.iadd(f),h.isub(l)),a.iushrn(1),h.iushrn(1);e.cmp(i)>=0?(e.isub(i),o.isub(a),s.isub(h)):(i.isub(e),a.isub(o),h.isub(s))}return{a:a,b:h,gcd:i.iushln(u)}},n.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),a=new n(0),h=i.clone();e.cmpn(1)>0&&i.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);for(var l=0,c=1;0==(i.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(i.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(h),a.iushrn(1);e.cmp(i)>=0?(e.isub(i),s.isub(a)):(i.isub(e),a.isub(s))}return(o=0===e.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var o=e;e=r,r=o}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,i=(t-e)/26,n=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,i=t<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)e=1;else{i&&(t=-t),r(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:nt.length)return 1;if(this.length=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){in&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new M(t)},n.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},i(b,y),b.prototype.split=function(t,e){for(var r=4194303,i=Math.min(t.length,9),n=0;n>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new v;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},M.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var i=this.m.add(new n(1)).iushrn(2);return this.pow(t,i)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);r(!o.isZero());var a=new n(1).toRed(this),h=a.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(h);)f.redIAdd(h);for(var l=this.pow(f,o),c=this.pow(t,o.addn(1).iushrn(1)),d=this.pow(t,o),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g=0;i--){for(var u=e.words[i],f=h-1;f>=0;f--){var l=u>>f&1;o!==r[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++a||0===i&&0===f)&&(o=this.mul(o,r[s]),a=0,s=0)):a=0}h=26}return o},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},i(S,M),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(cy,Y);var dy,py={},my={},gy=zn,yy=gy.Buffer,by={};for(dy in gy)gy.hasOwnProperty(dy)&&"SlowBuffer"!==dy&&"Buffer"!==dy&&(by[dy]=gy[dy]);var vy=by.Buffer={};for(dy in yy)yy.hasOwnProperty(dy)&&"allocUnsafe"!==dy&&"allocUnsafeSlow"!==dy&&(vy[dy]=yy[dy]);if(by.Buffer.prototype=yy.prototype,vy.from&&vy.from!==Uint8Array.from||(vy.from=function(t,e,r){if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof t);if(t&&void 0===t.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);return yy(t,e,r)}),vy.alloc||(vy.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError('The "size" argument must be of type number. Received type '+typeof t);if(t<0||t>=2*(1<<30))throw new RangeError('The value "'+t+'" is invalid for option "size"');var i=yy(t);return e&&0!==e.length?"string"==typeof r?i.fill(e,r):i.fill(e):i.fill(0),i}),!by.kStringMaxLength)try{by.kStringMaxLength=Bn.binding("buffer").kStringMaxLength}catch(_i){}by.constants||(by.constants={MAX_LENGTH:by.kMaxLength},by.kStringMaxLength&&(by.constants.MAX_STRING_LENGTH=by.kStringMaxLength));var wy=by,_y={};const My=Wn;function Sy(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function Ey(t,e){this.path=t,this.rethrow(e)}_y.Reporter=Sy,Sy.prototype.isError=function(t){return t instanceof Ey},Sy.prototype.save=function(){const t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},Sy.prototype.restore=function(t){const e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},Sy.prototype.enterKey=function(t){return this._reporterState.path.push(t)},Sy.prototype.exitKey=function(t){const e=this._reporterState;e.path=e.path.slice(0,t-1)},Sy.prototype.leaveKey=function(t,e,r){const i=this._reporterState;this.exitKey(t),null!==i.obj&&(i.obj[e]=r)},Sy.prototype.path=function(){return this._reporterState.path.join("/")},Sy.prototype.enterObject=function(){const t=this._reporterState,e=t.obj;return t.obj={},e},Sy.prototype.leaveObject=function(t){const e=this._reporterState,r=e.obj;return e.obj=t,r},Sy.prototype.error=function(t){let e;const r=this._reporterState,i=t instanceof Ey;if(e=i?t:new Ey(r.path.map((function(t){return"["+JSON.stringify(t)+"]"})).join(""),t.message||t,t.stack),!r.options.partial)throw e;return i||r.errors.push(e),e},Sy.prototype.wrapResult=function(t){const e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},My(Ey,Error),Ey.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,Ey),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this};var ky={};const Ay=Wn,Oy=_y.Reporter,Ty=wy.Buffer;function Iy(t,e){Oy.call(this,e),Ty.isBuffer(t)?(this.base=t,this.offset=0,this.length=t.length):this.error("Input not Buffer")}function Ry(t,e){if(Array.isArray(t))this.length=0,this.value=t.map((function(t){return Ry.isEncoderBuffer(t)||(t=new Ry(t,e)),this.length+=t.length,t}),this);else if("number"==typeof t){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if("string"==typeof t)this.value=t,this.length=Ty.byteLength(t);else{if(!Ty.isBuffer(t))return e.error("Unsupported type: "+typeof t);this.value=t,this.length=t.length}}Ay(Iy,Oy),ky.DecoderBuffer=Iy,Iy.isDecoderBuffer=function(t){if(t instanceof Iy)return!0;return"object"==typeof t&&Ty.isBuffer(t.base)&&"DecoderBuffer"===t.constructor.name&&"number"==typeof t.offset&&"number"==typeof t.length&&"function"==typeof t.save&&"function"==typeof t.restore&&"function"==typeof t.isEmpty&&"function"==typeof t.readUInt8&&"function"==typeof t.skip&&"function"==typeof t.raw},Iy.prototype.save=function(){return{offset:this.offset,reporter:Oy.prototype.save.call(this)}},Iy.prototype.restore=function(t){const e=new Iy(this.base);return e.offset=t.offset,e.length=this.offset,this.offset=t.offset,Oy.prototype.restore.call(this,t.reporter),e},Iy.prototype.isEmpty=function(){return this.offset===this.length},Iy.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")},Iy.prototype.skip=function(t,e){if(!(this.offset+t<=this.length))return this.error(e||"DecoderBuffer overrun");const r=new Iy(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+t,this.offset+=t,r},Iy.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)},ky.EncoderBuffer=Ry,Ry.isEncoderBuffer=function(t){if(t instanceof Ry)return!0;return"object"==typeof t&&"EncoderBuffer"===t.constructor.name&&"number"==typeof t.length&&"function"==typeof t.join},Ry.prototype.join=function(t,e){return t||(t=Ty.alloc(this.length)),e||(e=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(t,e),e+=r.length})):("number"==typeof this.value?t[e]=this.value:"string"==typeof this.value?t.write(this.value,e):Ty.isBuffer(this.value)&&this.value.copy(t,e),e+=this.length)),t};const Cy=_y.Reporter,Py=ky.EncoderBuffer,xy=ky.DecoderBuffer,Ny=Wf,By=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],Ly=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(By);function Dy(t,e,r){const i={};this._baseState=i,i.name=r,i.enc=t,i.parent=e||null,i.children=null,i.tag=null,i.args=null,i.reverseArgs=null,i.choice=null,i.optional=!1,i.any=!1,i.obj=!1,i.use=null,i.useDecoder=null,i.key=null,i.default=null,i.explicit=null,i.implicit=null,i.contains=null,i.parent||(i.children=[],this._wrap())}var jy=Dy;const Uy=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];Dy.prototype.clone=function(){const t=this._baseState,e={};Uy.forEach((function(r){e[r]=t[r]}));const r=new this.constructor(e.parent);return r._baseState=e,r},Dy.prototype._wrap=function(){const t=this._baseState;Ly.forEach((function(e){this[e]=function(){const r=new this.constructor(this);return t.children.push(r),r[e].apply(r,arguments)}}),this)},Dy.prototype._init=function(t){const e=this._baseState;Ny(null===e.parent),t.call(this),e.children=e.children.filter((function(t){return t._baseState.parent===this}),this),Ny.equal(e.children.length,1,"Root node can have only one child")},Dy.prototype._useArgs=function(t){const e=this._baseState,r=t.filter((function(t){return t instanceof this.constructor}),this);t=t.filter((function(t){return!(t instanceof this.constructor)}),this),0!==r.length&&(Ny(null===e.children),e.children=r,r.forEach((function(t){t._baseState.parent=this}),this)),0!==t.length&&(Ny(null===e.args),e.args=t,e.reverseArgs=t.map((function(t){if("object"!=typeof t||t.constructor!==Object)return t;const e={};return Object.keys(t).forEach((function(r){r==(0|r)&&(r|=0);const i=t[r];e[i]=r})),e})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(t){Dy.prototype[t]=function(){const e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}})),By.forEach((function(t){Dy.prototype[t]=function(){const e=this._baseState,r=Array.prototype.slice.call(arguments);return Ny(null===e.tag),e.tag=t,this._useArgs(r),this}})),Dy.prototype.use=function(t){Ny(t);const e=this._baseState;return Ny(null===e.use),e.use=t,this},Dy.prototype.optional=function(){return this._baseState.optional=!0,this},Dy.prototype.def=function(t){const e=this._baseState;return Ny(null===e.default),e.default=t,e.optional=!0,this},Dy.prototype.explicit=function(t){const e=this._baseState;return Ny(null===e.explicit&&null===e.implicit),e.explicit=t,this},Dy.prototype.implicit=function(t){const e=this._baseState;return Ny(null===e.explicit&&null===e.implicit),e.implicit=t,this},Dy.prototype.obj=function(){const t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},Dy.prototype.key=function(t){const e=this._baseState;return Ny(null===e.key),e.key=t,this},Dy.prototype.any=function(){return this._baseState.any=!0,this},Dy.prototype.choice=function(t){const e=this._baseState;return Ny(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map((function(e){return t[e]}))),this},Dy.prototype.contains=function(t){const e=this._baseState;return Ny(null===e.use),e.contains=t,this},Dy.prototype._decode=function(t,e){const r=this._baseState;if(null===r.parent)return t.wrapResult(r.children[0]._decode(t,e));let i,n=r.default,o=!0,s=null;if(null!==r.key&&(s=t.enterKey(r.key)),r.optional){let i=null;if(null!==r.explicit?i=r.explicit:null!==r.implicit?i=r.implicit:null!==r.tag&&(i=r.tag),null!==i||r.any){if(o=this._peekTag(t,i,r.any),t.isError(o))return o}else{const i=t.save();try{null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e),o=!0}catch(t){o=!1}t.restore(i)}}if(r.obj&&o&&(i=t.enterObject()),o){if(null!==r.explicit){const e=this._decodeTag(t,r.explicit);if(t.isError(e))return e;t=e}const i=t.offset;if(null===r.use&&null===r.choice){let e;r.any&&(e=t.save());const i=this._decodeTag(t,null!==r.implicit?r.implicit:r.tag,r.any);if(t.isError(i))return i;r.any?n=t.raw(e):t=i}if(e&&e.track&&null!==r.tag&&e.track(t.path(),i,t.length,"tagged"),e&&e.track&&null!==r.tag&&e.track(t.path(),t.offset,t.length,"content"),r.any||(n=null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e)),t.isError(n))return n;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(t,e)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){const i=new xy(n);n=this._getUse(r.contains,t._reporterState.obj)._decode(i,e)}}return r.obj&&o&&(n=t.leaveObject(i)),null===r.key||null===n&&!0!==o?null!==s&&t.exitKey(s):t.leaveKey(s,r.key,n),n},Dy.prototype._decodeGeneric=function(t,e,r){const i=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,i.args[0],r):/str$/.test(t)?this._decodeStr(e,t,r):"objid"===t&&i.args?this._decodeObjid(e,i.args[0],i.args[1],r):"objid"===t?this._decodeObjid(e,null,null,r):"gentime"===t||"utctime"===t?this._decodeTime(e,t,r):"null_"===t?this._decodeNull(e,r):"bool"===t?this._decodeBool(e,r):"objDesc"===t?this._decodeStr(e,t,r):"int"===t||"enum"===t?this._decodeInt(e,i.args&&i.args[0],r):null!==i.use?this._getUse(i.use,e._reporterState.obj)._decode(e,r):e.error("unknown tag: "+t)},Dy.prototype._getUse=function(t,e){const r=this._baseState;return r.useDecoder=this._use(t,e),Ny(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},Dy.prototype._decodeChoice=function(t,e){const r=this._baseState;let i=null,n=!1;return Object.keys(r.choice).some((function(o){const s=t.save(),a=r.choice[o];try{const r=a._decode(t,e);if(t.isError(r))return!1;i={type:o,value:r},n=!0}catch(e){return t.restore(s),!1}return!0}),this),n?i:t.error("Choice not matched")},Dy.prototype._createEncoderBuffer=function(t){return new Py(t,this.reporter)},Dy.prototype._encode=function(t,e,r){const i=this._baseState;if(null!==i.default&&i.default===t)return;const n=this._encodeValue(t,e,r);return void 0===n||this._skipDefault(n,e,r)?void 0:n},Dy.prototype._encodeValue=function(t,e,r){const i=this._baseState;if(null===i.parent)return i.children[0]._encode(t,e||new Cy);let n=null;if(this.reporter=e,i.optional&&void 0===t){if(null===i.default)return;t=i.default}let o=null,s=!1;if(i.any)n=this._createEncoderBuffer(t);else if(i.choice)n=this._encodeChoice(t,e);else if(i.contains)o=this._getUse(i.contains,r)._encode(t,e),s=!0;else if(i.children)o=i.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,e,t);if(null===r._baseState.key)return e.error("Child should have a key");const i=e.enterKey(r._baseState.key);if("object"!=typeof t)return e.error("Child expected, but input is not object");const n=r._encode(t[r._baseState.key],e,t);return e.leaveKey(i),n}),this).filter((function(t){return t})),o=this._createEncoderBuffer(o);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return e.error("Too many args for : "+i.tag);if(!Array.isArray(t))return e.error("seqof/setof, but data is not Array");const r=this.clone();r._baseState.implicit=null,o=this._createEncoderBuffer(t.map((function(r){const i=this._baseState;return this._getUse(i.args[0],t)._encode(r,e)}),r))}else null!==i.use?n=this._getUse(i.use,r)._encode(t,e):(o=this._encodePrimitive(i.tag,t),s=!0);if(!i.any&&null===i.choice){const t=null!==i.implicit?i.implicit:i.tag,r=null===i.implicit?"universal":"context";null===t?null===i.use&&e.error("Tag could be omitted only for .use()"):null===i.use&&(n=this._encodeComposite(t,s,r,o))}return null!==i.explicit&&(n=this._encodeComposite(i.explicit,!1,"context",n)),n},Dy.prototype._encodeChoice=function(t,e){const r=this._baseState,i=r.choice[t.type];return i||Ny(!1,t.type+" not found in "+JSON.stringify(Object.keys(r.choice))),i._encode(t.value,e)},Dy.prototype._encodePrimitive=function(t,e){const r=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&r.args)return this._encodeObjid(e,r.reverseArgs[0],r.args[1]);if("objid"===t)return this._encodeObjid(e,null,null);if("gentime"===t||"utctime"===t)return this._encodeTime(e,t);if("null_"===t)return this._encodeNull();if("int"===t||"enum"===t)return this._encodeInt(e,r.args&&r.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},Dy.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},Dy.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(t)};var qy={};!function(t){function e(t){const e={};return Object.keys(t).forEach((function(r){(0|r)==r&&(r|=0);const i=t[r];e[i]=r})),e}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=e(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=e(t.tag)}(qy);const Fy=Wn,zy=wy.Buffer,Hy=jy,Ky=qy;function Vy(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new Wy,this.tree._init(t.body)}var Gy=Vy;function Wy(t){Hy.call(this,"der",t)}function Yy(t){return t<10?"0"+t:t}Vy.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},Fy(Wy,Hy),Wy.prototype._encodeComposite=function(t,e,r,i){const n=function(t,e,r,i){let n;"seqof"===t?t="seq":"setof"===t&&(t="set");if(Ky.tagByName.hasOwnProperty(t))n=Ky.tagByName[t];else{if("number"!=typeof t||(0|t)!==t)return i.error("Unknown tag: "+t);n=t}if(n>=31)return i.error("Multi-octet tag encoding unsupported");e||(n|=32);return n|=Ky.tagClassByName[r||"universal"]<<6,n}(t,e,r,this.reporter);if(i.length<128){const t=zy.alloc(2);return t[0]=n,t[1]=i.length,this._createEncoderBuffer([t,i])}let o=1;for(let t=i.length;t>=256;t>>=8)o++;const s=zy.alloc(2+o);s[0]=n,s[1]=128|o;for(let t=1+o,e=i.length;e>0;t--,e>>=8)s[t]=255&e;return this._createEncoderBuffer([s,i])},Wy.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){const e=zy.alloc(2*t.length);for(let r=0;r=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}let i=0;for(let e=0;e=128;r>>=7)i++}const n=zy.alloc(i);let o=n.length-1;for(let e=t.length-1;e>=0;e--){let r=t[e];for(n[o--]=127&r;(r>>=7)>0;)n[o--]=128|127&r}return this._createEncoderBuffer(n)},Wy.prototype._encodeTime=function(t,e){let r;const i=new Date(t);return"gentime"===e?r=[Yy(i.getUTCFullYear()),Yy(i.getUTCMonth()+1),Yy(i.getUTCDate()),Yy(i.getUTCHours()),Yy(i.getUTCMinutes()),Yy(i.getUTCSeconds()),"Z"].join(""):"utctime"===e?r=[Yy(i.getUTCFullYear()%100),Yy(i.getUTCMonth()+1),Yy(i.getUTCDate()),Yy(i.getUTCHours()),Yy(i.getUTCMinutes()),Yy(i.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(r,"octstr")},Wy.prototype._encodeNull=function(){return this._createEncoderBuffer("")},Wy.prototype._encodeInt=function(t,e){if("string"==typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!=typeof t&&!zy.isBuffer(t)){const e=t.toArray();!t.sign&&128&e[0]&&e.unshift(0),t=zy.from(e)}if(zy.isBuffer(t)){let e=t.length;0===t.length&&e++;const r=zy.alloc(e);return t.copy(r),0===t.length&&(r[0]=0),this._createEncoderBuffer(r)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);let r=1;for(let e=t;e>=256;e>>=8)r++;const i=new Array(r);for(let e=i.length-1;e>=0;e--)i[e]=255&t,t>>=8;return 128&i[0]&&i.unshift(0),this._createEncoderBuffer(zy.from(i))},Wy.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},Wy.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getEncoder("der").tree},Wy.prototype._skipDefault=function(t,e,r){const i=this._baseState;let n;if(null===i.default)return!1;const o=t.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,e,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n>6],n=0==(32&r);if(31==(31&r)){let i=r;for(r=0;128==(128&i);){if(i=t.readUInt8(e),t.isError(i))return i;r<<=7,r|=127&i}}else r&=31;return{cls:i,primitive:n,tag:r,tagStr:ib.tag[r]}}function hb(t,e,r){let i=t.readUInt8(r);if(t.isError(i))return i;if(!e&&128===i)return null;if(0==(128&i))return i;const n=127&i;if(n>4)return t.error("length octect is too long");i=0;for(let e=0;e0&&r.ishrn(i),r}function u(r,i,n){var o,s;do{for(o=t.alloc(0);8*o.length=0)throw new Error("invalid sig")}return $b=function(s,a,h,u,f){var l=i(h);if("ec"===l.type){if("ecdsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");return function(t,e,i){var o=n[i.data.algorithm.curve.join(".")];if(!o)throw new Error("unknown curve "+i.data.algorithm.curve.join("."));var s=new r(o),a=i.data.subjectPrivateKey.data;return s.verify(e,t,a)}(s,a,l)}if("dsa"===l.type){if("dsa"!==u)throw new Error("wrong public key type");return function(t,r,n){var s=n.data.p,a=n.data.q,h=n.data.g,u=n.data.pub_key,f=i.signature.decode(t,"der"),l=f.s,c=f.r;o(l,a),o(c,a);var d=e.mont(s),p=l.invm(a),m=h.toRed(d).redPow(new e(r).mul(p).mod(a)).fromRed().mul(u.toRed(d).redPow(c.mul(p).mod(a)).fromRed()).mod(s).mod(a);return 0===m.cmp(c)}(s,a,l)}if("rsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");a=t.concat([f,a]);for(var c=l.modulus.byteLength(),d=[1],p=0;a.length+d.length+2=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function a(t,e,r){var i=s(t,r);return r-1>=e&&(i|=s(t,r-1)<<4),i}function h(t,e,r,i){for(var n=0,o=Math.min(t.length,r),s=e;s=49?a-49+10:a>=17?a-17+10:a}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,i){if("number"==typeof t)return this._initNumber(t,e,i);if("object"==typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===i)for(n=0,o=0;n>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i=e;i-=2)n=a(t,e,i)<=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(t.length-e)%2==0?e+1:e;i=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var o=t.length-r,s=o%i,a=Math.min(o,o-s)+r,u=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function c(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,a=67108863&s,h=s/67108864|0;r.words[0]=a;for(var u=1;u>>26,l=67108863&h,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[u]=0|l,h=0|f}return 0!==h?r.words[u]=0|h:r.length--,r.strip()}n.prototype.toString=function(t,e){var i;if(e=0|e||1,16===(t=t||10)||"hex"===t){i="";for(var n=0,o=0,s=0;s>>24-n&16777215)||s!==this.length-1?u[6-h.length]+h+i:h+i,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(i=o.toString(16)+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var c=f[t],d=l[t];i="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);i=(p=p.idivn(d)).isZero()?m+i:u[c-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return r(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,i){var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,h="le"===e,u=new t(o),f=this.clone();if(h){for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),u[a]=s;for(;a=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},n.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;it.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var i=t/26|0,n=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<t.length?(r=this,i=t):(r=t,i=this);for(var n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},n.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,M=0|s[4],S=8191&M,E=M>>>13,k=0|s[5],A=8191&k,O=k>>>13,T=0|s[6],I=8191&T,R=T>>>13,C=0|s[7],P=8191&C,x=C>>>13,N=0|s[8],B=8191&N,L=N>>>13,D=0|s[9],j=8191&D,U=D>>>13,q=0|a[0],F=8191&q,z=q>>>13,H=0|a[1],K=8191&H,V=H>>>13,G=0|a[2],W=8191&G,Y=G>>>13,Z=0|a[3],X=8191&Z,Q=Z>>>13,J=0|a[4],$=8191&J,tt=J>>>13,et=0|a[5],rt=8191&et,it=et>>>13,nt=0|a[6],ot=8191&nt,st=nt>>>13,at=0|a[7],ht=8191&at,ut=at>>>13,ft=0|a[8],lt=8191&ft,ct=ft>>>13,dt=0|a[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(i=Math.imul(l,F))|0)+((8191&(n=(n=Math.imul(l,z))+Math.imul(c,F)|0))<<13)|0;u=((o=Math.imul(c,z))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,F),n=(n=Math.imul(p,z))+Math.imul(m,F)|0,o=Math.imul(m,z);var yt=(u+(i=i+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,V)|0)+Math.imul(c,K)|0))<<13)|0;u=((o=o+Math.imul(c,V)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(y,F),n=(n=Math.imul(y,z))+Math.imul(b,F)|0,o=Math.imul(b,z),i=i+Math.imul(p,K)|0,n=(n=n+Math.imul(p,V)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,V)|0;var bt=(u+(i=i+Math.imul(l,W)|0)|0)+((8191&(n=(n=n+Math.imul(l,Y)|0)+Math.imul(c,W)|0))<<13)|0;u=((o=o+Math.imul(c,Y)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(w,F),n=(n=Math.imul(w,z))+Math.imul(_,F)|0,o=Math.imul(_,z),i=i+Math.imul(y,K)|0,n=(n=n+Math.imul(y,V)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,V)|0,i=i+Math.imul(p,W)|0,n=(n=n+Math.imul(p,Y)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,Y)|0;var vt=(u+(i=i+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(c,X)|0))<<13)|0;u=((o=o+Math.imul(c,Q)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(S,F),n=(n=Math.imul(S,z))+Math.imul(E,F)|0,o=Math.imul(E,z),i=i+Math.imul(w,K)|0,n=(n=n+Math.imul(w,V)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,V)|0,i=i+Math.imul(y,W)|0,n=(n=n+Math.imul(y,Y)|0)+Math.imul(b,W)|0,o=o+Math.imul(b,Y)|0,i=i+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(i=i+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0))<<13)|0;u=((o=o+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(A,F),n=(n=Math.imul(A,z))+Math.imul(O,F)|0,o=Math.imul(O,z),i=i+Math.imul(S,K)|0,n=(n=n+Math.imul(S,V)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,V)|0,i=i+Math.imul(w,W)|0,n=(n=n+Math.imul(w,Y)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Y)|0,i=i+Math.imul(y,X)|0,n=(n=n+Math.imul(y,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var _t=(u+(i=i+Math.imul(l,rt)|0)|0)+((8191&(n=(n=n+Math.imul(l,it)|0)+Math.imul(c,rt)|0))<<13)|0;u=((o=o+Math.imul(c,it)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(I,F),n=(n=Math.imul(I,z))+Math.imul(R,F)|0,o=Math.imul(R,z),i=i+Math.imul(A,K)|0,n=(n=n+Math.imul(A,V)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,V)|0,i=i+Math.imul(S,W)|0,n=(n=n+Math.imul(S,Y)|0)+Math.imul(E,W)|0,o=o+Math.imul(E,Y)|0,i=i+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,Q)|0,i=i+Math.imul(y,$)|0,n=(n=n+Math.imul(y,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,it)|0;var Mt=(u+(i=i+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,ot)|0))<<13)|0;u=((o=o+Math.imul(c,st)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(P,F),n=(n=Math.imul(P,z))+Math.imul(x,F)|0,o=Math.imul(x,z),i=i+Math.imul(I,K)|0,n=(n=n+Math.imul(I,V)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,V)|0,i=i+Math.imul(A,W)|0,n=(n=n+Math.imul(A,Y)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,Y)|0,i=i+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,i=i+Math.imul(y,rt)|0,n=(n=n+Math.imul(y,it)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,it)|0,i=i+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(i=i+Math.imul(l,ht)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,ht)|0))<<13)|0;u=((o=o+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(B,F),n=(n=Math.imul(B,z))+Math.imul(L,F)|0,o=Math.imul(L,z),i=i+Math.imul(P,K)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,V)|0,i=i+Math.imul(I,W)|0,n=(n=n+Math.imul(I,Y)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,Y)|0,i=i+Math.imul(A,X)|0,n=(n=n+Math.imul(A,Q)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,Q)|0,i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,it)|0,i=i+Math.imul(y,ot)|0,n=(n=n+Math.imul(y,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,i=i+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(i=i+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((o=o+Math.imul(c,ct)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(j,F),n=(n=Math.imul(j,z))+Math.imul(U,F)|0,o=Math.imul(U,z),i=i+Math.imul(B,K)|0,n=(n=n+Math.imul(B,V)|0)+Math.imul(L,K)|0,o=o+Math.imul(L,V)|0,i=i+Math.imul(P,W)|0,n=(n=n+Math.imul(P,Y)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,Y)|0,i=i+Math.imul(I,X)|0,n=(n=n+Math.imul(I,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,tt)|0,i=i+Math.imul(S,rt)|0,n=(n=n+Math.imul(S,it)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,it)|0,i=i+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,i=i+Math.imul(y,ht)|0,n=(n=n+Math.imul(y,ut)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,ut)|0,i=i+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ct)|0;var kt=(u+(i=i+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((o=o+Math.imul(c,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(j,K),n=(n=Math.imul(j,V))+Math.imul(U,K)|0,o=Math.imul(U,V),i=i+Math.imul(B,W)|0,n=(n=n+Math.imul(B,Y)|0)+Math.imul(L,W)|0,o=o+Math.imul(L,Y)|0,i=i+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,Q)|0,i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,it)|0,i=i+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,i=i+Math.imul(w,ht)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,ut)|0,i=i+Math.imul(y,lt)|0,n=(n=n+Math.imul(y,ct)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,ct)|0;var At=(u+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(j,W),n=(n=Math.imul(j,Y))+Math.imul(U,W)|0,o=Math.imul(U,Y),i=i+Math.imul(B,X)|0,n=(n=n+Math.imul(B,Q)|0)+Math.imul(L,X)|0,o=o+Math.imul(L,Q)|0,i=i+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,tt)|0,i=i+Math.imul(I,rt)|0,n=(n=n+Math.imul(I,it)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,it)|0,i=i+Math.imul(A,ot)|0,n=(n=n+Math.imul(A,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,i=i+Math.imul(S,ht)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,ht)|0,o=o+Math.imul(E,ut)|0,i=i+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ct)|0;var Ot=(u+(i=i+Math.imul(y,pt)|0)|0)+((8191&(n=(n=n+Math.imul(y,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,i=Math.imul(j,X),n=(n=Math.imul(j,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),i=i+Math.imul(B,$)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,tt)|0,i=i+Math.imul(P,rt)|0,n=(n=n+Math.imul(P,it)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,it)|0,i=i+Math.imul(I,ot)|0,n=(n=n+Math.imul(I,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,i=i+Math.imul(A,ht)|0,n=(n=n+Math.imul(A,ut)|0)+Math.imul(O,ht)|0,o=o+Math.imul(O,ut)|0,i=i+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ct)|0;var Tt=(u+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;u=((o=o+Math.imul(_,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(j,$),n=(n=Math.imul(j,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),i=i+Math.imul(B,rt)|0,n=(n=n+Math.imul(B,it)|0)+Math.imul(L,rt)|0,o=o+Math.imul(L,it)|0,i=i+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,i=i+Math.imul(I,ht)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(R,ht)|0,o=o+Math.imul(R,ut)|0,i=i+Math.imul(A,lt)|0,n=(n=n+Math.imul(A,ct)|0)+Math.imul(O,lt)|0,o=o+Math.imul(O,ct)|0;var It=(u+(i=i+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(j,rt),n=(n=Math.imul(j,it))+Math.imul(U,rt)|0,o=Math.imul(U,it),i=i+Math.imul(B,ot)|0,n=(n=n+Math.imul(B,st)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,st)|0,i=i+Math.imul(P,ht)|0,n=(n=n+Math.imul(P,ut)|0)+Math.imul(x,ht)|0,o=o+Math.imul(x,ut)|0,i=i+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,ct)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,ct)|0;var Rt=(u+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(O,pt)|0))<<13)|0;u=((o=o+Math.imul(O,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,i=Math.imul(j,ot),n=(n=Math.imul(j,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),i=i+Math.imul(B,ht)|0,n=(n=n+Math.imul(B,ut)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,ut)|0,i=i+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,ct)|0)+Math.imul(x,lt)|0,o=o+Math.imul(x,ct)|0;var Ct=(u+(i=i+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(j,ht),n=(n=Math.imul(j,ut))+Math.imul(U,ht)|0,o=Math.imul(U,ut),i=i+Math.imul(B,lt)|0,n=(n=n+Math.imul(B,ct)|0)+Math.imul(L,lt)|0,o=o+Math.imul(L,ct)|0;var Pt=(u+(i=i+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(x,pt)|0))<<13)|0;u=((o=o+Math.imul(x,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(j,lt),n=(n=Math.imul(j,ct))+Math.imul(U,lt)|0,o=Math.imul(U,ct);var xt=(u+(i=i+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((o=o+Math.imul(L,mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863;var Nt=(u+(i=Math.imul(j,pt))|0)+((8191&(n=(n=Math.imul(j,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,h[0]=gt,h[1]=yt,h[2]=bt,h[3]=vt,h[4]=wt,h[5]=_t,h[6]=Mt,h[7]=St,h[8]=Et,h[9]=kt,h[10]=At,h[11]=Ot,h[12]=Tt,h[13]=It,h[14]=Rt,h[15]=Ct,h[16]=Pt,h[17]=xt,h[18]=Nt,0!==u&&(h[19]=u,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=c),n.prototype.mulTo=function(t,e){var r,i=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):i<63?c(this,t,e):i<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,i=s,s=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,t,e):p(this,t,e),r},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=n.prototype._countBits(t)-1,i=0;i>=1;return i},m.prototype.permute=function(t,e,r,i,n,o){for(var s=0;s>>=1)n++;return 1<>>=13,i[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,e+=n/67108864|0,e+=o>>>26,this.words[i]=67108863&o}return 0!==e&&(this.words[i]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>n}return e}(t);if(0===e.length)return new n(1);for(var r=this,i=0;i=0);var e,i=t%26,n=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(e=0;e>>26-i}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,u=0;u=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&a}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,i){return r(0===this.negative),this.iushrn(t,e,i)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26,n=1<=0);var e=t%26,i=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==e&&i++,this.length=Math.min(i,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(h/67108864|0),this.words[n+i]=67108863&o}for(;n>26,this.words[n+i]=67108863&o;if(0===a)return this.strip();for(r(-1===a),a=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),o=t,s=0|o.words[o.length-1];0!=(r=26-this._countBits(s))&&(o=o.ushln(r),i.iushln(r),s=0|o.words[o.length-1]);var a,h=i.length-o.length;if("mod"!==e){(a=new n(null)).length=h+1,a.words=new Array(a.length);for(var u=0;u=0;l--){var c=67108864*(0|i.words[o.length+l])+(0|i.words[o.length+l-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(o,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(o,1,l),i.isZero()||(i.negative^=1);a&&(a.words[l]=c)}return a&&a.strip(),i.strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:a||null,mod:i}},n.prototype.divmod=function(t,e,i){return r(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(o=a.div.neg()),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(o=a.div.neg()),{div:o,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,a},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,i=0,n=this.length-1;n>=0;n--)i=(e*i+(0|this.words[n]))%t;return i},n.prototype.idivn=function(t){r(t<=67108863);for(var e=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*e;this.words[i]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),a=new n(0),h=new n(1),u=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++u;for(var f=i.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;0==(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(a.isOdd()||h.isOdd())&&(a.iadd(f),h.isub(l)),a.iushrn(1),h.iushrn(1);e.cmp(i)>=0?(e.isub(i),o.isub(a),s.isub(h)):(i.isub(e),a.isub(o),h.isub(s))}return{a:a,b:h,gcd:i.iushln(u)}},n.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),a=new n(0),h=i.clone();e.cmpn(1)>0&&i.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);for(var l=0,c=1;0==(i.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(i.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(h),a.iushrn(1);e.cmp(i)>=0?(e.isub(i),s.isub(a)):(i.isub(e),a.isub(s))}return(o=0===e.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var o=e;e=r,r=o}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,i=(t-e)/26,n=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,i=t<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)e=1;else{i&&(t=-t),r(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:nt.length)return 1;if(this.length=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){in&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new M(t)},n.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},i(b,y),b.prototype.split=function(t,e){for(var r=4194303,i=Math.min(t.length,9),n=0;n>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new v;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},M.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var i=this.m.add(new n(1)).iushrn(2);return this.pow(t,i)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);r(!o.isZero());var a=new n(1).toRed(this),h=a.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(h);)f.redIAdd(h);for(var l=this.pow(f,o),c=this.pow(t,o.addn(1).iushrn(1)),d=this.pow(t,o),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g=0;i--){for(var u=e.words[i],f=h-1;f>=0;f--){var l=u>>f&1;o!==r[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++a||0===i&&0===f)&&(o=this.mul(o,r[s]),a=0,s=0)):a=0}h=26}return o},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},i(S,M),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(uv,Y);var fv={},lv=zu,cv=qn.Buffer,dv=function(t,e){for(var r,i=cv.alloc(0),n=0;i.length=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function a(t,e,r){var i=s(t,r);return r-1>=e&&(i|=s(t,r-1)<<4),i}function h(t,e,r,i){for(var n=0,o=Math.min(t.length,r),s=e;s=49?a-49+10:a>=17?a-17+10:a}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,i){if("number"==typeof t)return this._initNumber(t,e,i);if("object"==typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===i)for(n=0,o=0;n>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i=e;i-=2)n=a(t,e,i)<=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(t.length-e)%2==0?e+1:e;i=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var o=t.length-r,s=o%i,a=Math.min(o,o-s)+r,u=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function c(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,a=67108863&s,h=s/67108864|0;r.words[0]=a;for(var u=1;u>>26,l=67108863&h,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[u]=0|l,h=0|f}return 0!==h?r.words[u]=0|h:r.length--,r.strip()}n.prototype.toString=function(t,e){var i;if(e=0|e||1,16===(t=t||10)||"hex"===t){i="";for(var n=0,o=0,s=0;s>>24-n&16777215)||s!==this.length-1?u[6-h.length]+h+i:h+i,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(i=o.toString(16)+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var c=f[t],d=l[t];i="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);i=(p=p.idivn(d)).isZero()?m+i:u[c-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return r(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,i){var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,h="le"===e,u=new t(o),f=this.clone();if(h){for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),u[a]=s;for(;a=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},n.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;it.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var i=t/26|0,n=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<t.length?(r=this,i=t):(r=t,i=this);for(var n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},n.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,M=0|s[4],S=8191&M,E=M>>>13,k=0|s[5],A=8191&k,O=k>>>13,T=0|s[6],I=8191&T,R=T>>>13,C=0|s[7],P=8191&C,x=C>>>13,N=0|s[8],B=8191&N,L=N>>>13,D=0|s[9],j=8191&D,U=D>>>13,q=0|a[0],F=8191&q,z=q>>>13,H=0|a[1],K=8191&H,V=H>>>13,G=0|a[2],W=8191&G,Y=G>>>13,Z=0|a[3],X=8191&Z,Q=Z>>>13,J=0|a[4],$=8191&J,tt=J>>>13,et=0|a[5],rt=8191&et,it=et>>>13,nt=0|a[6],ot=8191&nt,st=nt>>>13,at=0|a[7],ht=8191&at,ut=at>>>13,ft=0|a[8],lt=8191&ft,ct=ft>>>13,dt=0|a[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(i=Math.imul(l,F))|0)+((8191&(n=(n=Math.imul(l,z))+Math.imul(c,F)|0))<<13)|0;u=((o=Math.imul(c,z))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,F),n=(n=Math.imul(p,z))+Math.imul(m,F)|0,o=Math.imul(m,z);var yt=(u+(i=i+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,V)|0)+Math.imul(c,K)|0))<<13)|0;u=((o=o+Math.imul(c,V)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(y,F),n=(n=Math.imul(y,z))+Math.imul(b,F)|0,o=Math.imul(b,z),i=i+Math.imul(p,K)|0,n=(n=n+Math.imul(p,V)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,V)|0;var bt=(u+(i=i+Math.imul(l,W)|0)|0)+((8191&(n=(n=n+Math.imul(l,Y)|0)+Math.imul(c,W)|0))<<13)|0;u=((o=o+Math.imul(c,Y)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(w,F),n=(n=Math.imul(w,z))+Math.imul(_,F)|0,o=Math.imul(_,z),i=i+Math.imul(y,K)|0,n=(n=n+Math.imul(y,V)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,V)|0,i=i+Math.imul(p,W)|0,n=(n=n+Math.imul(p,Y)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,Y)|0;var vt=(u+(i=i+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(c,X)|0))<<13)|0;u=((o=o+Math.imul(c,Q)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(S,F),n=(n=Math.imul(S,z))+Math.imul(E,F)|0,o=Math.imul(E,z),i=i+Math.imul(w,K)|0,n=(n=n+Math.imul(w,V)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,V)|0,i=i+Math.imul(y,W)|0,n=(n=n+Math.imul(y,Y)|0)+Math.imul(b,W)|0,o=o+Math.imul(b,Y)|0,i=i+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(i=i+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0))<<13)|0;u=((o=o+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(A,F),n=(n=Math.imul(A,z))+Math.imul(O,F)|0,o=Math.imul(O,z),i=i+Math.imul(S,K)|0,n=(n=n+Math.imul(S,V)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,V)|0,i=i+Math.imul(w,W)|0,n=(n=n+Math.imul(w,Y)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Y)|0,i=i+Math.imul(y,X)|0,n=(n=n+Math.imul(y,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var _t=(u+(i=i+Math.imul(l,rt)|0)|0)+((8191&(n=(n=n+Math.imul(l,it)|0)+Math.imul(c,rt)|0))<<13)|0;u=((o=o+Math.imul(c,it)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(I,F),n=(n=Math.imul(I,z))+Math.imul(R,F)|0,o=Math.imul(R,z),i=i+Math.imul(A,K)|0,n=(n=n+Math.imul(A,V)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,V)|0,i=i+Math.imul(S,W)|0,n=(n=n+Math.imul(S,Y)|0)+Math.imul(E,W)|0,o=o+Math.imul(E,Y)|0,i=i+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,Q)|0,i=i+Math.imul(y,$)|0,n=(n=n+Math.imul(y,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,it)|0;var Mt=(u+(i=i+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,ot)|0))<<13)|0;u=((o=o+Math.imul(c,st)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(P,F),n=(n=Math.imul(P,z))+Math.imul(x,F)|0,o=Math.imul(x,z),i=i+Math.imul(I,K)|0,n=(n=n+Math.imul(I,V)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,V)|0,i=i+Math.imul(A,W)|0,n=(n=n+Math.imul(A,Y)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,Y)|0,i=i+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,i=i+Math.imul(y,rt)|0,n=(n=n+Math.imul(y,it)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,it)|0,i=i+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(i=i+Math.imul(l,ht)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,ht)|0))<<13)|0;u=((o=o+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(B,F),n=(n=Math.imul(B,z))+Math.imul(L,F)|0,o=Math.imul(L,z),i=i+Math.imul(P,K)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,V)|0,i=i+Math.imul(I,W)|0,n=(n=n+Math.imul(I,Y)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,Y)|0,i=i+Math.imul(A,X)|0,n=(n=n+Math.imul(A,Q)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,Q)|0,i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,it)|0,i=i+Math.imul(y,ot)|0,n=(n=n+Math.imul(y,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,i=i+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(i=i+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((o=o+Math.imul(c,ct)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(j,F),n=(n=Math.imul(j,z))+Math.imul(U,F)|0,o=Math.imul(U,z),i=i+Math.imul(B,K)|0,n=(n=n+Math.imul(B,V)|0)+Math.imul(L,K)|0,o=o+Math.imul(L,V)|0,i=i+Math.imul(P,W)|0,n=(n=n+Math.imul(P,Y)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,Y)|0,i=i+Math.imul(I,X)|0,n=(n=n+Math.imul(I,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,tt)|0,i=i+Math.imul(S,rt)|0,n=(n=n+Math.imul(S,it)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,it)|0,i=i+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,i=i+Math.imul(y,ht)|0,n=(n=n+Math.imul(y,ut)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,ut)|0,i=i+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ct)|0;var kt=(u+(i=i+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((o=o+Math.imul(c,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(j,K),n=(n=Math.imul(j,V))+Math.imul(U,K)|0,o=Math.imul(U,V),i=i+Math.imul(B,W)|0,n=(n=n+Math.imul(B,Y)|0)+Math.imul(L,W)|0,o=o+Math.imul(L,Y)|0,i=i+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,Q)|0,i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,it)|0,i=i+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,i=i+Math.imul(w,ht)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,ut)|0,i=i+Math.imul(y,lt)|0,n=(n=n+Math.imul(y,ct)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,ct)|0;var At=(u+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(j,W),n=(n=Math.imul(j,Y))+Math.imul(U,W)|0,o=Math.imul(U,Y),i=i+Math.imul(B,X)|0,n=(n=n+Math.imul(B,Q)|0)+Math.imul(L,X)|0,o=o+Math.imul(L,Q)|0,i=i+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,tt)|0,i=i+Math.imul(I,rt)|0,n=(n=n+Math.imul(I,it)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,it)|0,i=i+Math.imul(A,ot)|0,n=(n=n+Math.imul(A,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,i=i+Math.imul(S,ht)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,ht)|0,o=o+Math.imul(E,ut)|0,i=i+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ct)|0;var Ot=(u+(i=i+Math.imul(y,pt)|0)|0)+((8191&(n=(n=n+Math.imul(y,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,i=Math.imul(j,X),n=(n=Math.imul(j,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),i=i+Math.imul(B,$)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,tt)|0,i=i+Math.imul(P,rt)|0,n=(n=n+Math.imul(P,it)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,it)|0,i=i+Math.imul(I,ot)|0,n=(n=n+Math.imul(I,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,i=i+Math.imul(A,ht)|0,n=(n=n+Math.imul(A,ut)|0)+Math.imul(O,ht)|0,o=o+Math.imul(O,ut)|0,i=i+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ct)|0;var Tt=(u+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;u=((o=o+Math.imul(_,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(j,$),n=(n=Math.imul(j,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),i=i+Math.imul(B,rt)|0,n=(n=n+Math.imul(B,it)|0)+Math.imul(L,rt)|0,o=o+Math.imul(L,it)|0,i=i+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,i=i+Math.imul(I,ht)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(R,ht)|0,o=o+Math.imul(R,ut)|0,i=i+Math.imul(A,lt)|0,n=(n=n+Math.imul(A,ct)|0)+Math.imul(O,lt)|0,o=o+Math.imul(O,ct)|0;var It=(u+(i=i+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(j,rt),n=(n=Math.imul(j,it))+Math.imul(U,rt)|0,o=Math.imul(U,it),i=i+Math.imul(B,ot)|0,n=(n=n+Math.imul(B,st)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,st)|0,i=i+Math.imul(P,ht)|0,n=(n=n+Math.imul(P,ut)|0)+Math.imul(x,ht)|0,o=o+Math.imul(x,ut)|0,i=i+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,ct)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,ct)|0;var Rt=(u+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(O,pt)|0))<<13)|0;u=((o=o+Math.imul(O,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,i=Math.imul(j,ot),n=(n=Math.imul(j,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),i=i+Math.imul(B,ht)|0,n=(n=n+Math.imul(B,ut)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,ut)|0,i=i+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,ct)|0)+Math.imul(x,lt)|0,o=o+Math.imul(x,ct)|0;var Ct=(u+(i=i+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(j,ht),n=(n=Math.imul(j,ut))+Math.imul(U,ht)|0,o=Math.imul(U,ut),i=i+Math.imul(B,lt)|0,n=(n=n+Math.imul(B,ct)|0)+Math.imul(L,lt)|0,o=o+Math.imul(L,ct)|0;var Pt=(u+(i=i+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(x,pt)|0))<<13)|0;u=((o=o+Math.imul(x,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(j,lt),n=(n=Math.imul(j,ct))+Math.imul(U,lt)|0,o=Math.imul(U,ct);var xt=(u+(i=i+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((o=o+Math.imul(L,mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863;var Nt=(u+(i=Math.imul(j,pt))|0)+((8191&(n=(n=Math.imul(j,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,h[0]=gt,h[1]=yt,h[2]=bt,h[3]=vt,h[4]=wt,h[5]=_t,h[6]=Mt,h[7]=St,h[8]=Et,h[9]=kt,h[10]=At,h[11]=Ot,h[12]=Tt,h[13]=It,h[14]=Rt,h[15]=Ct,h[16]=Pt,h[17]=xt,h[18]=Nt,0!==u&&(h[19]=u,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=c),n.prototype.mulTo=function(t,e){var r,i=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):i<63?c(this,t,e):i<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,i=s,s=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,t,e):p(this,t,e),r},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=n.prototype._countBits(t)-1,i=0;i>=1;return i},m.prototype.permute=function(t,e,r,i,n,o){for(var s=0;s>>=1)n++;return 1<>>=13,i[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,e+=n/67108864|0,e+=o>>>26,this.words[i]=67108863&o}return 0!==e&&(this.words[i]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>n}return e}(t);if(0===e.length)return new n(1);for(var r=this,i=0;i=0);var e,i=t%26,n=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(e=0;e>>26-i}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,u=0;u=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&a}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,i){return r(0===this.negative),this.iushrn(t,e,i)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26,n=1<=0);var e=t%26,i=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==e&&i++,this.length=Math.min(i,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(h/67108864|0),this.words[n+i]=67108863&o}for(;n>26,this.words[n+i]=67108863&o;if(0===a)return this.strip();for(r(-1===a),a=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),o=t,s=0|o.words[o.length-1];0!=(r=26-this._countBits(s))&&(o=o.ushln(r),i.iushln(r),s=0|o.words[o.length-1]);var a,h=i.length-o.length;if("mod"!==e){(a=new n(null)).length=h+1,a.words=new Array(a.length);for(var u=0;u=0;l--){var c=67108864*(0|i.words[o.length+l])+(0|i.words[o.length+l-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(o,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(o,1,l),i.isZero()||(i.negative^=1);a&&(a.words[l]=c)}return a&&a.strip(),i.strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:a||null,mod:i}},n.prototype.divmod=function(t,e,i){return r(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(o=a.div.neg()),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(o=a.div.neg()),{div:o,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,a},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,i=0,n=this.length-1;n>=0;n--)i=(e*i+(0|this.words[n]))%t;return i},n.prototype.idivn=function(t){r(t<=67108863);for(var e=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*e;this.words[i]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),a=new n(0),h=new n(1),u=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++u;for(var f=i.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;0==(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(a.isOdd()||h.isOdd())&&(a.iadd(f),h.isub(l)),a.iushrn(1),h.iushrn(1);e.cmp(i)>=0?(e.isub(i),o.isub(a),s.isub(h)):(i.isub(e),a.isub(o),h.isub(s))}return{a:a,b:h,gcd:i.iushln(u)}},n.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),a=new n(0),h=i.clone();e.cmpn(1)>0&&i.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);for(var l=0,c=1;0==(i.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(i.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(h),a.iushrn(1);e.cmp(i)>=0?(e.isub(i),s.isub(a)):(i.isub(e),a.isub(s))}return(o=0===e.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var o=e;e=r,r=o}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,i=(t-e)/26,n=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,i=t<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)e=1;else{i&&(t=-t),r(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:nt.length)return 1;if(this.length=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){in&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new M(t)},n.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},i(b,y),b.prototype.split=function(t,e){for(var r=4194303,i=Math.min(t.length,9),n=0;n>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new v;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},M.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var i=this.m.add(new n(1)).iushrn(2);return this.pow(t,i)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);r(!o.isZero());var a=new n(1).toRed(this),h=a.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(h);)f.redIAdd(h);for(var l=this.pow(f,o),c=this.pow(t,o.addn(1).iushrn(1)),d=this.pow(t,o),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g=0;i--){for(var u=e.words[i],f=h-1;f>=0;f--){var l=u>>f&1;o!==r[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++a||0===i&&0===f)&&(o=this.mul(o,r[s]),a=0,s=0)):a=0}h=26}return o},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},i(S,M),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(yv,Y);var bv=gv,vv=qn.Buffer;var wv=function(t,e){return vv.from(t.toRed(bv.mont(e.modulus)).redPow(new bv(e.publicExponent)).fromRed().toArray())},_v=Xb,Mv=jn,Sv=zu,Ev=dv,kv=mv,Av=gv,Ov=wv,Tv=Ld,Iv=qn.Buffer,Rv=function(t,e,r){var i;i=t.padding?t.padding:r?1:4;var n,o=_v(t);if(4===i)n=function(t,e){var r=t.modulus.byteLength(),i=e.length,n=Sv("sha1").update(Iv.alloc(0)).digest(),o=n.length,s=2*o;if(i>r-s-2)throw new Error("message too long");var a=Iv.alloc(r-i-s-2),h=r-o-1,u=Mv(o),f=kv(Iv.concat([n,a,Iv.alloc(1,1),e],h),Ev(u,h)),l=kv(u,Ev(f,o));return new Av(Iv.concat([Iv.alloc(1),l,f],r))}(o,e);else if(1===i)n=function(t,e,r){var i,n=e.length,o=t.modulus.byteLength();if(n>o-11)throw new Error("message too long");i=r?Iv.alloc(o-n-3,255):function(t){var e,r=Iv.allocUnsafe(t),i=0,n=Mv(2*t),o=0;for(;i=0)throw new Error("data too long for modulus")}return r?Tv(n,o):Ov(n,o)};var Cv=Xb,Pv=dv,xv=mv,Nv=gv,Bv=Ld,Lv=zu,Dv=wv,jv=qn.Buffer,Uv=function(t,e,r){var i;i=t.padding?t.padding:r?1:4;var n,o=Cv(t),s=o.modulus.byteLength();if(e.length>s||new Nv(e).cmp(o.modulus)>=0)throw new Error("decryption error");n=r?Dv(new Nv(e),o):Bv(e,o);var a=jv.alloc(s-n.length);if(n=jv.concat([a,n],s),4===i)return function(t,e){var r=t.modulus.byteLength(),i=Lv("sha1").update(jv.alloc(0)).digest(),n=i.length;if(0!==e[0])throw new Error("decryption error");var o=e.slice(1,n+1),s=e.slice(n+1),a=xv(o,Pv(s,n)),h=xv(s,Pv(a,r-n-1));if(function(t,e){t=jv.from(t),e=jv.from(e);var r=0,i=t.length;t.length!==e.length&&(r++,i=Math.min(t.length,e.length));var n=-1;for(;++n=e.length){o++;break}var s=e.slice(2,n-1);("0002"!==i.toString("hex")&&!r||"0001"!==i.toString("hex")&&r)&&o++;s.length<8&&o++;if(o)throw new Error("decryption error");return e.slice(n)}(0,n,r);if(3===i)return n;throw new Error("unknown padding")};!function(t){t.publicEncrypt=Rv,t.privateDecrypt=Uv,t.privateEncrypt=function(e,r){return t.publicEncrypt(e,r,!0)},t.publicDecrypt=function(e,r){return t.privateDecrypt(e,r,!0)}}(fv);var qv={};function Fv(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var zv,Hv=qn,Kv=jn,Vv=Hv.Buffer,Gv=Hv.kMaxLength,Wv=Y.crypto||Y.msCrypto,Yv=Math.pow(2,32)-1;function Zv(t,e){if("number"!=typeof t||t!=t)throw new TypeError("offset must be a number");if(t>Yv||t<0)throw new TypeError("offset must be a uint32");if(t>Gv||t>e)throw new RangeError("offset out of range")}function Xv(t,e,r){if("number"!=typeof t||t!=t)throw new TypeError("size must be a number");if(t>Yv||t<0)throw new TypeError("size must be a uint32");if(t+e>r||t>Gv)throw new RangeError("buffer too small")}function Qv(t,e,r,i){if(Bn.browser){var n=t.buffer,o=new Uint8Array(n,e,r);return Wv.getRandomValues(o),i?void Bn.nextTick((function(){i(null,t)})):t}if(!i)return Kv(r).copy(t,e),t;Kv(r,(function(r,n){if(r)return i(r);n.copy(t,e),i(null,t)}))}function Jv(){if(zv)return Dn;zv=1,Dn.randomBytes=Dn.rng=Dn.pseudoRandomBytes=Dn.prng=jn,Dn.createHash=Dn.Hash=zu,Dn.createHmac=Dn.Hmac=af;var t=hf,e=Object.keys(t),r=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(e);Dn.getHashes=function(){return r};var i=cf;Dn.pbkdf2=i.pbkdf2,Dn.pbkdf2Sync=i.pbkdf2Sync;var n=Ff;Dn.Cipher=n.Cipher,Dn.createCipher=n.createCipher,Dn.Cipheriv=n.Cipheriv,Dn.createCipheriv=n.createCipheriv,Dn.Decipher=n.Decipher,Dn.createDecipher=n.createDecipher,Dn.Decipheriv=n.Decipheriv,Dn.createDecipheriv=n.createDecipheriv,Dn.getCiphers=n.getCiphers,Dn.listCiphers=n.listCiphers;var o=function(){if(kd)return hd;kd=1;var t=Md(),e=Ad,r=Od(),i={binary:!0,hex:!0,base64:!0};return hd.DiffieHellmanGroup=hd.createDiffieHellmanGroup=hd.getDiffieHellman=function(t){var i=new Re(e[t].prime,"hex"),n=new Re(e[t].gen,"hex");return new r(i,n)},hd.createDiffieHellman=hd.DiffieHellman=function e(n,o,s,a){return Re.isBuffer(o)||void 0===i[o]?e(n,"binary",o,s):(o=o||"binary",a=a||"binary",s=s||new Re([2]),Re.isBuffer(s)||(s=new Re(s,a)),"number"==typeof n?new r(t(n,s),s,!0):(Re.isBuffer(n)||(n=new Re(n,o)),new r(n,s,!0)))},hd}();Dn.DiffieHellmanGroup=o.DiffieHellmanGroup,Dn.createDiffieHellmanGroup=o.createDiffieHellmanGroup,Dn.getDiffieHellman=o.getDiffieHellman,Dn.createDiffieHellman=o.createDiffieHellman,Dn.DiffieHellman=o.DiffieHellman;var s=function(){if(rv)return ev;rv=1;var t=qn.Buffer,e=zu,r=Zn,i=Wn,n=nv(),o=ov(),s=ff;function a(t){r.Writable.call(this);var i=s[t];if(!i)throw new Error("Unknown message digest");this._hashType=i.hash,this._hash=e(i.hash),this._tag=i.id,this._signType=i.sign}function h(t){r.Writable.call(this);var i=s[t];if(!i)throw new Error("Unknown message digest");this._hash=e(i.hash),this._tag=i.id,this._signType=i.sign}function u(t){return new a(t)}function f(t){return new h(t)}return Object.keys(s).forEach((function(e){s[e].id=t.from(s[e].id,"hex"),s[e.toLowerCase()]=s[e]})),i(a,r.Writable),a.prototype._write=function(t,e,r){this._hash.update(t),r()},a.prototype.update=function(e,r){return this._hash.update("string"==typeof e?t.from(e,r):e),this},a.prototype.sign=function(t,e){this.end();var r=this._hash.digest(),i=n(r,t,this._hashType,this._signType,this._tag);return e?i.toString(e):i},i(h,r.Writable),h.prototype._write=function(t,e,r){this._hash.update(t),r()},h.prototype.update=function(e,r){return this._hash.update("string"==typeof e?t.from(e,r):e),this},h.prototype.verify=function(e,r,i){var n="string"==typeof r?t.from(r,i):r;this.end();var s=this._hash.digest();return o(n,s,e,this._signType,this._tag)},ev={Sign:u,Verify:f,createSign:u,createVerify:f}}();Dn.createSign=s.createSign,Dn.Sign=s.Sign,Dn.createVerify=s.createVerify,Dn.Verify=s.Verify,Dn.createECDH=function(){if(av)return sv;av=1;var t=hy(),e=hv;sv=function(t){return new i(t)};var r={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function i(e){this.curveType=r[e],this.curveType||(this.curveType={name:e}),this.curve=new t.ec(this.curveType.name),this.keys=void 0}function n(t,e,r){Array.isArray(t)||(t=t.toArray());var i=new Re(t);if(r&&i.length0){if(r>=4)return t.readUIntBE(e,r);for(var i=0,n=e+r,o=0;n>e;n--,o+=2)i+=t[n-1]*Math.pow(16,o);return i}return NaN},Ln._={isObject:function(t){var e=typeof t;return!!t&&("object"==e||"function"==e)},isString:function(t){return"string"==typeof t||t instanceof String},isNumber:function(t){return"number"==typeof t||!isNaN(parseFloat(t))&&isFinite(t)},omit:function(t,e){var r={};for(var i in t)t.hasOwnProperty(i)&&i!==e&&(r[i]=t[i]);return r}},Ln.trimSurroundingText=function(t,e,r){var i=0,n=t.length,o=t.indexOf(e);o>=0&&(i=o+e.length);var s=t.indexOf(r,o);return s>=0&&(n=s),t.substring(i,n)};var $v=Jv(),tw=Ln._;function ew(t,e){null!=t&&("number"==typeof t?this.fromNumber(t,e):Re.isBuffer(t)?this.fromBuffer(t):null==e&&"string"!=typeof t?this.fromByteArray(t):this.fromString(t,e))}function rw(){return new ew(null)}ew.prototype.am=function(t,e,r,i,n,o){for(var s=16383&e,a=e>>14;--o>=0;){var h=16383&this[t],u=this[t++]>>14,f=a*h+u*s;n=((h=s*h+((16383&f)<<14)+r[i]+n)>>28)+(f>>14)+a*u,r[i++]=268435455&h}return n},ew.prototype.DB=28,ew.prototype.DM=268435455,ew.prototype.DV=1<<28;ew.prototype.FV=Math.pow(2,52),ew.prototype.F1=24,ew.prototype.F2=4;var iw,nw,ow="0123456789abcdefghijklmnopqrstuvwxyz",sw=new Array;for(iw="0".charCodeAt(0),nw=0;nw<=9;++nw)sw[iw++]=nw;for(iw="a".charCodeAt(0),nw=10;nw<36;++nw)sw[iw++]=nw;for(iw="A".charCodeAt(0),nw=10;nw<36;++nw)sw[iw++]=nw;function aw(t){return ow.charAt(t)}function hw(t,e){var r=sw[t.charCodeAt(e)];return null==r?-1:r}function uw(t){var e=rw();return e.fromInt(t),e}function fw(t){var e,r=1;return 0!=(e=t>>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}function lw(t){this.m=t}function cw(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function bw(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function vw(){}function ww(t){return t}function _w(t){this.r2=rw(),this.q3=rw(),ew.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}lw.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},lw.prototype.revert=function(t){return t},lw.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},lw.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},lw.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},cw.prototype.convert=function(t){var e=rw();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(ew.ZERO)>0&&this.m.subTo(e,e),e},cw.prototype.revert=function(t){var e=rw();return t.copyTo(e),this.reduce(e),e},cw.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&t.DM;for(t[r=e+this.m.t]+=this.m.am(0,i,t,e,0,this.m.t);t[r]>=t.DV;)t[r]-=t.DV,t[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},cw.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},cw.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},vw.prototype.convert=ww,vw.prototype.revert=ww,vw.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r)},vw.prototype.sqrTo=function(t,e){t.squareTo(e)},_w.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=rw();return t.copyTo(e),this.reduce(e),e},_w.prototype.revert=function(t){return t},_w.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},_w.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},_w.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var Mw=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],Sw=(1<<26)/Mw[Mw.length-1];ew.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},ew.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+DV:this.t=0},ew.prototype.fromString=function(t,e,r){var i;switch(e){case 2:i=1;break;case 4:i=2;break;case 8:i=3;break;case 16:i=4;break;case 32:i=5;break;case 256:i=8;break;default:return void this.fromRadix(t,e)}this.t=0,this.s=0;for(var n=t.length,o=!1,s=0;--n>=0;){var a=8==i?255&t[n]:hw(t,n);a<0?"-"==t.charAt(n)&&(o=!0):(o=!1,0===s?this[this.t++]=a:s+i>this.DB?(this[this.t-1]|=(a&(1<>this.DB-s):this[this.t-1]|=a<=this.DB&&(s-=this.DB))}r||8!=i||0==(128&t[0])||(this.s=-1,s>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==t;)--this.t},ew.prototype.dlShiftTo=function(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t,e.s=this.s},ew.prototype.drShiftTo=function(t,e){for(var r=t;r=0;--r)e[r+s+1]=this[r]>>n|a,a=(this[r]&o)<=0;--r)e[r]=0;e[s]=a,e.t=this.t+s+1,e.s=this.s,e.clamp()},ew.prototype.rShiftTo=function(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)e.t=0;else{var i=t%this.DB,n=this.DB-i,o=(1<>i;for(var s=r+1;s>i;i>0&&(e[this.t-r-1]|=(this.s&o)<>=this.DB;if(t.t>=this.DB;i+=this.s}else{for(i+=this.s;r>=this.DB;i-=t.s}e.s=i<0?-1:0,i<-1?e[r++]=this.DV+i:i>0&&(e[r++]=i),e.t=r,e.clamp()},ew.prototype.multiplyTo=function(t,e){var r=this.abs(),i=t.abs(),n=r.t;for(e.t=n+i.t;--n>=0;)e[n]=0;for(n=0;n=0;)t[r]=0;for(r=0;r=e.DV&&(t[r+e.t]-=e.DV,t[r+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(r,e[r],t,2*r,0,1)),t.s=0,t.clamp()},ew.prototype.divRemTo=function(t,e,r){var i=t.abs();if(!(i.t<=0)){var n=this.abs();if(n.t0?(i.lShiftTo(h,o),n.lShiftTo(h,r)):(i.copyTo(o),n.copyTo(r));var u=o.t,f=o[u-1];if(0!==f){var l=f*(1<1?o[u-2]>>this.F2:0),c=this.FV/l,d=(1<=0&&(r[r.t++]=1,r.subTo(y,r)),ew.ONE.dlShiftTo(u,y),y.subTo(o,o);o.t=0;){var b=r[--m]==f?this.DM:Math.floor(r[m]*c+(r[m-1]+p)*d);if((r[m]+=o.am(0,b,r,g,0,u))0&&r.rShiftTo(h,r),s<0&&ew.ZERO.subTo(r,r)}}},ew.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},ew.prototype.isEven=function(){return 0===(this.t>0?1&this[0]:this.s)},ew.prototype.exp=function(t,e){if(t>4294967295||t<1)return ew.ONE;var r=rw(),i=rw(),n=e.convert(this),o=fw(t)-1;for(n.copyTo(r);--o>=0;)if(e.sqrTo(r,i),(t&1<0)e.mulTo(i,n,r);else{var s=r;r=i,i=s}return e.revert(r)},ew.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},ew.prototype.toRadix=function(t){if(null==t&&(t=10),0===this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),i=uw(r),n=rw(),o=rw(),s="";for(this.divRemTo(i,n,o);n.signum()>0;)s=(r+o.intValue()).toString(t).substr(1)+s,n.divRemTo(i,n,o);return o.intValue().toString(t)+s},ew.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var r=this.chunkSize(e),i=Math.pow(e,r),n=!1,o=0,s=0,a=0;a=r&&(this.dMultiply(i),this.dAddOffset(s,0),o=0,s=0))}o>0&&(this.dMultiply(Math.pow(e,o)),this.dAddOffset(s,0)),n&&ew.ZERO.subTo(this,this)},ew.prototype.fromNumber=function(t,e){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t),this.testBit(t-1)||this.bitwiseTo(ew.ONE.shiftLeft(t-1),pw,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(ew.ONE.shiftLeft(t-1),this);else{var r=$v.randomBytes(1+(t>>3)),i=7&t;i>0?r[0]&=(1<>=this.DB;if(t.t>=this.DB;i+=this.s}else{for(i+=this.s;r>=this.DB;i+=t.s}e.s=i<0?-1:0,i>0?e[r++]=i:i<-1&&(e[r++]=this.DV+i),e.t=r,e.clamp()},ew.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},ew.prototype.dAddOffset=function(t,e){if(0!==t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},ew.prototype.multiplyLowerTo=function(t,e,r){var i,n=Math.min(this.t+t.t,e);for(r.s=0,r.t=n;n>0;)r[--n]=0;for(i=r.t-this.t;n=0;)r[i]=0;for(i=Math.max(e-this.t,0);i0)if(0===e)r=this[0]%t;else for(var i=this.t-1;i>=0;--i)r=(e*r+this[i])%t;return r},ew.prototype.millerRabin=function(t){var e=this.subtract(ew.ONE),r=e.getLowestSetBit();if(r<=0)return!1;var i=e.shiftRight(r);(t=t+1>>1)>Mw.length&&(t=Mw.length);for(var n=rw(),o=0;o0)for(a>a)>0&&(n=!0,o=aw(r));s>=0;)a>(a+=this.DB-e)):(r=this[s]>>(a-=e)&i,a<=0&&(a+=this.DB,--s)),r>0&&(n=!0),n&&(o+=aw(r));return n?o:"0"},ew.prototype.negate=function(){var t=rw();return ew.ZERO.subTo(this,t),t},ew.prototype.abs=function(){return this.s<0?this.negate():this},ew.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(0!=(e=r-t.t))return this.s<0?-e:e;for(;--r>=0;)if(0!=(e=this[r]-t[r]))return e;return 0},ew.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+fw(this[this.t-1]^this.s&this.DM)},ew.prototype.mod=function(t){var e=rw();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(ew.ZERO)>0&&t.subTo(e,e),e},ew.prototype.modPowInt=function(t,e){var r;return r=t<256||e.isEven()?new lw(e):new cw(e),this.exp(t,r)},ew.prototype.clone=function(){var t=rw();return this.copyTo(t),t},ew.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0===this.t)return-1}else{if(1==this.t)return this[0];if(0===this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<>24},ew.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},ew.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},ew.prototype.toByteArray=function(){var t=this.t,e=new Array;e[0]=this.s;var r,i=this.DB-t*this.DB%8,n=0;if(t-- >0)for(i>i)!=(this.s&this.DM)>>i&&(e[n++]=r|this.s<=0;)i<8?(r=(this[t]&(1<>(i+=this.DB-8)):(r=this[t]>>(i-=8)&255,i<=0&&(i+=this.DB,--t)),0!=(128&r)&&(r|=-256),0===n&&(128&this.s)!=(128&r)&&++n,(n>0||r!=this.s)&&(e[n++]=r);return e},ew.prototype.toBuffer=function(t){var e=Re.from(this.toByteArray());if(!0===t&&0===e[0])e=e.slice(1);else if(tw.isNumber(t)){if(e.length>t){for(var r=0;r0?this:t},ew.prototype.and=function(t){var e=rw();return this.bitwiseTo(t,dw,e),e},ew.prototype.or=function(t){var e=rw();return this.bitwiseTo(t,pw,e),e},ew.prototype.xor=function(t){var e=rw();return this.bitwiseTo(t,mw,e),e},ew.prototype.andNot=function(t){var e=rw();return this.bitwiseTo(t,gw,e),e},ew.prototype.not=function(){for(var t=rw(),e=0;e=this.t?0!=this.s:0!=(this[e]&1<1){var f=rw();for(i.sqrTo(s[1],f);a<=u;)s[a]=rw(),i.mulTo(f,s[a-2],s[a]),a+=2}var l,c,d=t.t-1,p=!0,m=rw();for(n=fw(t[d])-1;d>=0;){for(n>=h?l=t[d]>>n-h&u:(l=(t[d]&(1<0&&(l|=t[d-1]>>this.DB+n-h)),a=r;0==(1&l);)l>>=1,--a;if((n-=a)<0&&(n+=this.DB,--d),p)s[l].copyTo(o),p=!1;else{for(;a>1;)i.sqrTo(o,m),i.sqrTo(m,o),a-=2;a>0?i.sqrTo(o,m):(c=o,o=m,m=c),i.mulTo(m,s[l],o)}for(;d>=0&&0==(t[d]&1<=0?(r.subTo(i,r),e&&n.subTo(s,n),o.subTo(a,o)):(i.subTo(r,i),e&&s.subTo(n,s),a.subTo(o,a))}return 0!=i.compareTo(ew.ONE)?ew.ZERO:a.compareTo(t)>=0?a.subtract(t):a.signum()<0?(a.addTo(t,a),a.signum()<0?a.add(t):a):a},ew.prototype.pow=function(t){return this.exp(t,new vw)},ew.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var i=e;e=r,r=i}var n=e.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return e;for(n0&&(e.rShiftTo(o,e),r.rShiftTo(o,r));e.signum()>0;)(n=e.getLowestSetBit())>0&&e.rShiftTo(n,e),(n=r.getLowestSetBit())>0&&r.rShiftTo(n,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r},ew.prototype.isProbablePrime=function(t){var e,r=this.abs();if(1==r.t&&r[0]<=Mw[Mw.length-1]){for(e=0;ethis.key.maxMessageLength)throw new Error("Message too long for RSA (n="+this.key.encryptedDataLength+", l="+t.length+")");if(this.options.encryptionSchemeOptions&&this.options.encryptionSchemeOptions.padding==Cw.RSA_NO_PADDING)return(r=Re.alloc(this.key.maxMessageLength-t.length)).fill(0),Re.concat([r,t]);if(1===e.type)return(r=Re.alloc(this.key.encryptedDataLength-t.length-1)).fill(255,0,r.length-1),r[0]=1,r[r.length-1]=0,Re.concat([r,t]);(r=Re.alloc(this.key.encryptedDataLength-t.length))[0]=0,r[1]=2;for(var i=Rw.randomBytes(r.length-3),n=0;n=t.length)return null}else{if(0!==t[0]||2!==t[1])return null;for(r=3;0!==t[r];)if(++r>=t.length)return null}return t.slice(r+1,t.length)},r.prototype.sign=function(t){var e=this.options.signingSchemeOptions.hash||Nw;if("browser"===this.options.environment){e=xw[e]||e;var r=Rw.createHash(e);r.update(t);var i=this.pkcs1pad(r.digest(),e);return this.key.$doPrivate(new Iw(i)).toBuffer(this.key.encryptedDataLength)}var n=Rw.createSign("RSA-"+e.toUpperCase());return n.update(t),n.sign(this.options.rsaUtils.exportKey("private"))},r.prototype.verify=function(t,e,r){if(this.options.encryptionSchemeOptions&&this.options.encryptionSchemeOptions.padding==Cw.RSA_NO_PADDING)return!1;var i=this.options.signingSchemeOptions.hash||Nw;if("browser"===this.options.environment){i=xw[i]||i,r&&(e=Re.from(e,r));var n=Rw.createHash(i);n.update(t);var o=this.pkcs1pad(n.digest(),i);return this.key.$doPublic(new Iw(e)).toBuffer().toString("hex")==o.toString("hex")}var s=Rw.createVerify("RSA-"+i.toUpperCase());return s.update(t),s.verify(this.options.rsaUtils.exportKey("public"),e,r)},r.prototype.pkcs0pad=function(t){var e=Re.alloc(this.key.maxMessageLength-t.length);return e.fill(0),Re.concat([e,t])},r.prototype.pkcs0unpad=function(t){return"function"==typeof t.lastIndexOf?t.slice(t.lastIndexOf("\0")+1,t.length):t.slice(String.prototype.lastIndexOf.call(t,"\0")+1,t.length)},r.prototype.pkcs1pad=function(t,e){var r=Pw[e];if(!r)throw Error("Unsupported hash algorithm");var i=Re.concat([r,t]);if(i.length+10>this.key.encryptedDataLength)throw Error("Key is too short for signing algorithm ("+e+")");var n=Re.alloc(this.key.encryptedDataLength-i.length-1);return n.fill(255,0,n.length-1),n[0]=1,n[n.length-1]=0,Re.concat([n,i])},new r(t,e)};var Bw={},Lw={get exports(){return Bw},set exports(t){Bw=t}};!function(t){var e=Jv();t.exports={isEncryption:!0,isSignature:!1},t.exports.digestLength={md4:16,md5:16,ripemd160:20,rmd160:20,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64};var r="sha1";t.exports.eme_oaep_mgf1=function(i,n,o){o=o||r;for(var s=t.exports.digestLength[o],a=Math.ceil(n/s),h=Re.alloc(s*a),u=Re.alloc(4),f=0;fa-2*h-2)throw new Error("Message is too long to encode into an encoded message with a length of "+a+" bytes, increaseemLen to fix this error (minimum value for given parameters and options: "+(a-2*h-2)+")");var u=e.createHash(n);u.update(s),u=u.digest();var f=Re.alloc(a-i.length-2*h-1);f.fill(0),f[f.length-1]=1;for(var l=Re.concat([u,f,i]),c=e.randomBytes(h),d=o(c,l.length,n),p=0;p>8-b<<8-b;g[0]=g[0]&v;var w=Re.alloc(g.length+c.length+1);return g.copy(w,0),c.copy(w,g.length),w[w.length-1]=188,w},s.prototype.emsa_pss_verify=function(t,i,n){var s=this.options.signingSchemeOptions.hash||r,a=this.options.signingSchemeOptions.mgf||o.eme_oaep_mgf1,h=this.options.signingSchemeOptions.saltLength||20,u=o.digestLength[s],f=Math.ceil(n/8);if(f>8-(p=8*f-n)<<8-p,l[0]=l[0]&c,d=0;0===l[d]&&d>1;this.e=parseInt(e,16);for(var i=new $w(e,16);;){for(;this.p=new $w(t-r,1),0!==this.p.subtract($w.ONE).gcd(i).compareTo($w.ONE)||!this.p.isProbablePrime(10););for(;this.q=new $w(r,1),0!==this.q.subtract($w.ONE).gcd(i).compareTo($w.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var n=this.p;this.p=this.q,this.q=n}var o=this.p.subtract($w.ONE),s=this.q.subtract($w.ONE),a=o.multiply(s);if(0===a.gcd(i).compareTo($w.ONE)){if(this.n=this.p.multiply(this.q),this.n.bitLength()0&&(Jw.isNumber(e)||e.length>0)&&r.length>0))throw Error("Invalid RSA private key");this.n=new $w(t),this.e=Jw.isNumber(e)?e:t_.get32IntFromBuffer(e,0),this.d=new $w(r),i&&n&&o&&s&&a&&(this.p=new $w(i),this.q=new $w(n),this.dmp1=new $w(o),this.dmq1=new $w(s),this.coeff=new $w(a)),this.$$recalculateCache()},t.prototype.setPublic=function(t,e){if(!(t&&e&&t.length>0&&(Jw.isNumber(e)||e.length>0)))throw Error("Invalid RSA public key");this.n=new $w(t),this.e=Jw.isNumber(e)?e:t_.get32IntFromBuffer(e,0),this.$$recalculateCache()},t.prototype.$doPrivate=function(t){if(this.p||this.q)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),r=t.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(r)<0;)e=e.add(this.p);return e.subtract(r).multiply(this.coeff).mod(this.p).multiply(this.q).add(r)},t.prototype.$doPublic=function(t){return t.modPowInt(this.e,this.n)},t.prototype.encrypt=function(t,e){var r=[],i=[],n=t.length,o=Math.ceil(n/this.maxMessageLength)||1,s=Math.ceil(n/o||1);if(1==o)r.push(t);else for(var a=0;a0)throw Error("Incorrect data or key");for(var r=[],i=0,n=0,o=t.length/this.encryptedDataLength,s=0;s>3},t}();var i_={},n_={get exports(){return i_},set exports(t){i_=t}},o_={newInvalidAsn1Error:function(t){var e=new Error;return e.name="InvalidAsn1Error",e.message=t||"",e}},s_={EOC:0,Boolean:1,Integer:2,BitString:3,OctetString:4,Null:5,OID:6,ObjectDescriptor:7,External:8,Real:9,Enumeration:10,PDV:11,Utf8String:12,RelativeOID:13,Sequence:16,Set:17,NumericString:18,PrintableString:19,T61String:20,VideotexString:21,IA5String:22,UTCTime:23,GeneralizedTime:24,GraphicString:25,VisibleString:26,GeneralString:28,UniversalString:29,CharacterString:30,BMPString:31,Constructor:32,Context:128};function a_(t,e){if(t===e)return 0;for(var r=t.length,i=e.length,n=0,o=Math.min(r,i);n=0){var s=i.indexOf("\n",o+1);i=i.substring(s+1)}this.stack=i}}}function v_(t,e){return"string"==typeof t?t.length=0;a--)if(h[a]!==u[a])return!1;for(a=h.length-1;a>=0;a--)if(!O_(t[s=h[a]],e[s],r,i))return!1;return!0}(t,e,r,i))}return r?t===e:t==e}function T_(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function I_(t,e,r){O_(t,e,!1)&&__(t,e,r,"notDeepEqual",I_)}function R_(t,e,r){O_(t,e,!0)&&__(t,e,r,"notDeepStrictEqual",R_)}function C_(t,e,r){t!==e&&__(t,e,r,"===",C_)}function P_(t,e,r){t===e&&__(t,e,r,"!==",P_)}function x_(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function N_(t,e,r,i){var n;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(i=r,r=null),n=function(t){var e;try{t()}catch(t){e=t}return e}(e),i=(r&&r.name?" ("+r.name+").":".")+(i?" "+i:"."),t&&!n&&__(n,r,"Missing expected exception"+i);var o="string"==typeof i,s=!t&&n&&!r;if((!t&&Co(n)&&o&&x_(n,r)||s)&&__(n,r,"Got unwanted exception"+i),t&&n&&r&&!x_(n,r)||!t&&n)throw n}function B_(t,e,r){N_(!0,t,e,r)}function L_(t,e,r){N_(!1,t,e,r)}function D_(t){if(t)throw t}m_.AssertionError=b_,so(b_,Error),m_.fail=__,m_.ok=M_,m_.equal=S_,m_.notEqual=E_,m_.deepEqual=k_,m_.deepStrictEqual=A_,m_.notDeepEqual=I_,m_.notDeepStrictEqual=R_,m_.strictEqual=C_,m_.notStrictEqual=P_,m_.throws=B_,m_.doesNotThrow=L_,m_.ifError=D_;var j_=X(Object.freeze({__proto__:null,AssertionError:b_,assert:M_,deepEqual:k_,deepStrictEqual:A_,default:m_,doesNotThrow:L_,equal:S_,fail:__,ifError:D_,notDeepEqual:I_,notDeepStrictEqual:R_,notEqual:E_,notStrictEqual:P_,ok:M_,strictEqual:C_,throws:B_})),U_=j_,q_=wy.Buffer,F_=s_,z_=o_.newInvalidAsn1Error;function H_(t){if(!t||!q_.isBuffer(t))throw new TypeError("data must be a node Buffer");this._buf=t,this._size=t.length,this._len=0,this._offset=0}Object.defineProperty(H_.prototype,"length",{enumerable:!0,get:function(){return this._len}}),Object.defineProperty(H_.prototype,"offset",{enumerable:!0,get:function(){return this._offset}}),Object.defineProperty(H_.prototype,"remain",{get:function(){return this._size-this._offset}}),Object.defineProperty(H_.prototype,"buffer",{get:function(){return this._buf.slice(this._offset)}}),H_.prototype.readByte=function(t){if(this._size-this._offset<1)return null;var e=255&this._buf[this._offset];return t||(this._offset+=1),e},H_.prototype.peek=function(){return this.readByte(!0)},H_.prototype.readLength=function(t){if(void 0===t&&(t=this._offset),t>=this._size)return null;var e=255&this._buf[t++];if(null===e)return null;if(128==(128&e)){if(0===(e&=127))throw z_("Indefinite length not supported");if(e>4)throw z_("encoding too long");if(this._size-tthis._size-i)return null;if(this._offset=i,0===this.length)return e?q_.alloc(0):"";var n=this._buf.slice(this._offset,this._offset+this.length);return this._offset+=this.length,e?n:n.toString("utf8")},H_.prototype.readOID=function(t){t||(t=F_.OID);var e=this.readString(t,!0);if(null===e)return null;for(var r=[],i=0,n=0;n>0),r.join(".")},H_.prototype._readTag=function(t){U_.ok(void 0!==t);var e=this.peek();if(null===e)return null;if(e!==t)throw z_("Expected 0x"+t.toString(16)+": got 0x"+e.toString(16));var r=this.readLength(this._offset+1);if(null===r)return null;if(this.length>4)throw z_("Integer too long: "+this.length);if(this.length>this._size-r)return null;this._offset=r;for(var i=this._buf[this._offset],n=0,o=0;o>0};var K_=H_,V_=j_,G_=wy.Buffer,W_=s_,Y_=o_.newInvalidAsn1Error,Z_={size:1024,growthFactor:8};function X_(t){t=function(t,e){return V_.ok(t),V_.equal(typeof t,"object"),V_.ok(e),V_.equal(typeof e,"object"),Object.getOwnPropertyNames(t).forEach((function(r){if(!e[r]){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,i)}})),e}(Z_,t||{}),this._buf=G_.alloc(t.size||1024),this._size=this._buf.length,this._offset=0,this._options=t,this._seq=[]}Object.defineProperty(X_.prototype,"buffer",{get:function(){if(this._seq.length)throw Y_(this._seq.length+" unended sequence(s)");return this._buf.slice(0,this._offset)}}),X_.prototype.writeByte=function(t){if("number"!=typeof t)throw new TypeError("argument must be a Number");this._ensure(1),this._buf[this._offset++]=t},X_.prototype.writeInt=function(t,e){if("number"!=typeof t)throw new TypeError("argument must be a Number");"number"!=typeof e&&(e=W_.Integer);for(var r=4;(0==(4286578688&t)||-8388608==(4286578688&t))&&r>1;)r--,t<<=8;if(r>4)throw Y_("BER ints cannot be > 0xffffffff");for(this._ensure(2+r),this._buf[this._offset++]=e,this._buf[this._offset++]=r;r-- >0;)this._buf[this._offset++]=(4278190080&t)>>>24,t<<=8},X_.prototype.writeNull=function(){this.writeByte(W_.Null),this.writeByte(0)},X_.prototype.writeEnumeration=function(t,e){if("number"!=typeof t)throw new TypeError("argument must be a Number");return"number"!=typeof e&&(e=W_.Enumeration),this.writeInt(t,e)},X_.prototype.writeBoolean=function(t,e){if("boolean"!=typeof t)throw new TypeError("argument must be a Boolean");"number"!=typeof e&&(e=W_.Boolean),this._ensure(3),this._buf[this._offset++]=e,this._buf[this._offset++]=1,this._buf[this._offset++]=t?255:0},X_.prototype.writeString=function(t,e){if("string"!=typeof t)throw new TypeError("argument must be a string (was: "+typeof t+")");"number"!=typeof e&&(e=W_.OctetString);var r=G_.byteLength(t);this.writeByte(e),this.writeLength(r),r&&(this._ensure(r),this._buf.write(t,this._offset),this._offset+=r)},X_.prototype.writeBuffer=function(t,e){if("number"!=typeof e)throw new TypeError("tag must be a number");if(!G_.isBuffer(t))throw new TypeError("argument must be a buffer");this.writeByte(e),this.writeLength(t.length),this._ensure(t.length),t.copy(this._buf,this._offset,0,t.length),this._offset+=t.length},X_.prototype.writeStringArray=function(t){if(!t instanceof Array)throw new TypeError("argument must be an Array[String]");var e=this;t.forEach((function(t){e.writeString(t)}))},X_.prototype.writeOID=function(t,e){if("string"!=typeof t)throw new TypeError("argument must be a string");if("number"!=typeof e&&(e=W_.OID),!/^([0-9]+\.){3,}[0-9]+$/.test(t))throw new Error("argument is not a valid OID string");var r=t.split("."),i=[];i.push(40*parseInt(r[0],10)+parseInt(r[1],10)),r.slice(2).forEach((function(t){!function(t,e){e<128?t.push(e):e<16384?(t.push(e>>>7|128),t.push(127&e)):e<2097152?(t.push(e>>>14|128),t.push(255&(e>>>7|128)),t.push(127&e)):e<268435456?(t.push(e>>>21|128),t.push(255&(e>>>14|128)),t.push(255&(e>>>7|128)),t.push(127&e)):(t.push(255&(e>>>28|128)),t.push(255&(e>>>21|128)),t.push(255&(e>>>14|128)),t.push(255&(e>>>7|128)),t.push(127&e))}(i,parseInt(t,10))}));var n=this;this._ensure(2+i.length),this.writeByte(e),this.writeLength(i.length),i.forEach((function(t){n.writeByte(t)}))},X_.prototype.writeLength=function(t){if("number"!=typeof t)throw new TypeError("argument must be a Number");if(this._ensure(4),t<=127)this._buf[this._offset++]=t;else if(t<=255)this._buf[this._offset++]=129,this._buf[this._offset++]=t;else if(t<=65535)this._buf[this._offset++]=130,this._buf[this._offset++]=t>>8,this._buf[this._offset++]=t;else{if(!(t<=16777215))throw Y_("Length too long (> 4 bytes)");this._buf[this._offset++]=131,this._buf[this._offset++]=t>>16,this._buf[this._offset++]=t>>8,this._buf[this._offset++]=t}},X_.prototype.startSequence=function(t){"number"!=typeof t&&(t=W_.Sequence|W_.Constructor),this.writeByte(t),this._seq.push(this._offset),this._ensure(3),this._offset+=3},X_.prototype.endSequence=function(){var t=this._seq.pop(),e=t+3,r=this._offset-e;if(r<=127)this._shift(e,r,-2),this._buf[t]=r;else if(r<=255)this._shift(e,r,-1),this._buf[t]=129,this._buf[t+1]=r;else if(r<=65535)this._buf[t]=130,this._buf[t+1]=r>>8,this._buf[t+2]=r;else{if(!(r<=16777215))throw Y_("Sequence too long");this._shift(e,r,1),this._buf[t]=131,this._buf[t+1]=r>>16,this._buf[t+2]=r>>8,this._buf[t+3]=r}},X_.prototype._shift=function(t,e,r){V_.ok(void 0!==t),V_.ok(void 0!==e),V_.ok(r),this._buf.copy(this._buf,t+r,t,t+e),this._offset+=r},X_.prototype._ensure=function(t){if(V_.ok(t),this._size-this._offset-1?(this.$options.signingSchemeOptions={hash:n[0]},this.$options.signingScheme=r):(this.$options.signingScheme=n[0],this.$options.signingSchemeOptions={hash:null}):(this.$options.signingSchemeOptions={hash:n[1]},this.$options.signingScheme=n[0])}else cM.isObject(i.signingScheme)&&(this.$options.signingScheme=i.signingScheme.scheme||r,this.$options.signingSchemeOptions=cM.omit(i.signingScheme,"scheme"));if(!pM.isSignature(this.$options.signingScheme))throw Error("Unsupported signing scheme");if(this.$options.signingSchemeOptions.hash&&-1===t[this.$options.environment].indexOf(this.$options.signingSchemeOptions.hash))throw Error("Unsupported hashing algorithm for "+this.$options.environment+" environment")}if(i.encryptionScheme){if(cM.isString(i.encryptionScheme)?(this.$options.encryptionScheme=i.encryptionScheme.toLowerCase(),this.$options.encryptionSchemeOptions={}):cM.isObject(i.encryptionScheme)&&(this.$options.encryptionScheme=i.encryptionScheme.scheme||e,this.$options.encryptionSchemeOptions=cM.omit(i.encryptionScheme,"scheme")),!pM.isEncryption(this.$options.encryptionScheme))throw Error("Unsupported encryption scheme");if(this.$options.encryptionSchemeOptions.hash&&-1===t[this.$options.environment].indexOf(this.$options.encryptionSchemeOptions.hash))throw Error("Unsupported hashing algorithm for "+this.$options.environment+" environment")}this.keyPair.setOptions(this.$options)},n.prototype.generateKeyPair=function(t,e){if(e=e||65537,(t=t||2048)%8!=0)throw Error("Key size must be a multiple of 8.");return this.keyPair.generate(t,e.toString(16)),this.$cache={},this},n.prototype.importKey=function(t,e){if(!t)throw Error("Empty key given");if(e&&(e=i[e]||e),!mM.detectAndImport(this.keyPair,t,e)&&void 0===e)throw Error("Key format must be specified");return this.$cache={},this},n.prototype.exportKey=function(t){return t=i[t=t||"private"]||t,this.$cache[t]||(this.$cache[t]=mM.detectAndExport(this.keyPair,t)),this.$cache[t]},n.prototype.isPrivate=function(){return this.keyPair.isPrivate()},n.prototype.isPublic=function(t){return this.keyPair.isPublic(t)},n.prototype.isEmpty=function(t){return!(this.keyPair.n||this.keyPair.e||this.keyPair.d)},n.prototype.encrypt=function(t,e,r){return this.$$encryptKey(!1,t,e,r)},n.prototype.decrypt=function(t,e){return this.$$decryptKey(!1,t,e)},n.prototype.encryptPrivate=function(t,e,r){return this.$$encryptKey(!0,t,e,r)},n.prototype.decryptPublic=function(t,e){return this.$$decryptKey(!0,t,e)},n.prototype.$$encryptKey=function(t,e,r,i){try{var n=this.keyPair.encrypt(this.$getDataForEncrypt(e,i),t);return"buffer"!=r&&r?n.toString(r):n}catch(t){throw Error("Error during encryption. Original error: "+t)}},n.prototype.$$decryptKey=function(t,e,r){try{e=cM.isString(e)?Re.from(e,"base64"):e;var i=this.keyPair.decrypt(e,t);if(null===i)throw Error("Key decrypt method returns null.");return this.$getDecryptedData(i,r)}catch(t){throw Error("Error during decryption (probably incorrect key). Original error: "+t)}},n.prototype.sign=function(t,e,r){if(!this.isPrivate())throw Error("This is not private key");var i=this.keyPair.sign(this.$getDataForEncrypt(t,r));return e&&"buffer"!=e&&(i=i.toString(e)),i},n.prototype.verify=function(t,e,r,i){if(!this.isPublic())throw Error("This is not public key");return i=i&&"buffer"!=i?i:null,this.keyPair.verify(this.$getDataForEncrypt(t,r),e,i)},n.prototype.getKeySize=function(){return this.keyPair.keySize},n.prototype.getMaxMessageSize=function(){return this.keyPair.maxMessageLength},n.prototype.$getDataForEncrypt=function(t,e){if(cM.isString(t)||cM.isNumber(t))return Re.from(""+t,e||"utf8");if(Re.isBuffer(t))return t;if(cM.isObject(t))return Re.from(JSON.stringify(t));throw Error("Unexpected data type")},n.prototype.$getDecryptedData=function(t,e){return"buffer"==(e=e||"buffer")?t:"json"==e?JSON.parse(t.toString()):t.toString(e)},n}(),yM="object"==typeof Bt&&Bt&&Bt.Object===Object&&Bt,bM="object"==typeof self&&self&&self.Object===Object&&self,vM=yM||bM||Function("return this")(),wM=vM.Symbol,_M=Object.prototype,MM=_M.hasOwnProperty,SM=_M.toString,EM=wM?wM.toStringTag:void 0;var kM=Object.prototype.toString;var AM="[object Null]",OM="[object Undefined]",TM=wM?wM.toStringTag:void 0;function IM(t){return null==t?void 0===t?OM:AM:TM&&TM in Object(t)?function(t){var e=MM.call(t,EM),r=t[EM];try{t[EM]=void 0;var i=!0}catch(t){}var n=SM.call(t);return i&&(e?t[EM]=r:delete t[EM]),n}(t):function(t){return kM.call(t)}(t)}function RM(t){return null!=t&&"object"==typeof t}var CM="[object Symbol]";function PM(t){return"symbol"==typeof t||RM(t)&&IM(t)==CM}function xM(t,e){for(var r=-1,i=null==t?0:t.length,n=Array(i);++r-1&&t%1==0&&t-1&&t%1==0&&t<=_S}function SS(t){return null!=t&&MS(t.length)&&!rS(t)}var ES=Object.prototype;function kS(t){return RM(t)&&"[object Arguments]"==IM(t)}var AS=Object.prototype,OS=AS.hasOwnProperty,TS=AS.propertyIsEnumerable,IS=kS(function(){return arguments}())?kS:function(t){return RM(t)&&OS.call(t,"callee")&&!TS.call(t,"callee")},RS=IS;var CS="object"==typeof exports&&exports&&!exports.nodeType&&exports,PS=CS&&"object"==typeof module&&module&&!module.nodeType&&module,xS=PS&&PS.exports===CS?vM.Buffer:void 0,NS=(xS?xS.isBuffer:void 0)||function(){return!1},BS={};BS["[object Float32Array]"]=BS["[object Float64Array]"]=BS["[object Int8Array]"]=BS["[object Int16Array]"]=BS["[object Int32Array]"]=BS["[object Uint8Array]"]=BS["[object Uint8ClampedArray]"]=BS["[object Uint16Array]"]=BS["[object Uint32Array]"]=!0,BS["[object Arguments]"]=BS["[object Array]"]=BS["[object ArrayBuffer]"]=BS["[object Boolean]"]=BS["[object DataView]"]=BS["[object Date]"]=BS["[object Error]"]=BS["[object Function]"]=BS["[object Map]"]=BS["[object Number]"]=BS["[object Object]"]=BS["[object RegExp]"]=BS["[object Set]"]=BS["[object String]"]=BS["[object WeakMap]"]=!1;var LS,DS="object"==typeof exports&&exports&&!exports.nodeType&&exports,jS=DS&&"object"==typeof module&&module&&!module.nodeType&&module,US=jS&&jS.exports===DS&&yM.process,qS=function(){try{var t=jS&&jS.require&&jS.require("util").types;return t||US&&US.binding&&US.binding("util")}catch(t){}}(),FS=qS&&qS.isTypedArray,zS=FS?(LS=FS,function(t){return LS(t)}):function(t){return RM(t)&&MS(t.length)&&!!BS[IM(t)]},HS=zS,KS=Object.prototype.hasOwnProperty;function VS(t,e){var r=NM(t),i=!r&&RS(t),n=!r&&!i&&NS(t),o=!r&&!i&&!n&&HS(t),s=r||i||n||o,a=s?function(t,e){for(var r=-1,i=Array(t);++r-1},sE.prototype.set=function(t,e){var r=this.__data__,i=nE(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this};var aE=mS(vM,"Map");function hE(t,e){var r=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?r["string"==typeof e?"string":"hash"]:r.map}function uE(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e0&&r(a)?e>1?SE(a,e-1,r,i,n):wE(n,a):i||(n[n.length]=a)}return n}function EE(t){var e=this.__data__=new sE(t);this.size=e.size}EE.prototype.clear=function(){this.__data__=new sE,this.size=0},EE.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},EE.prototype.get=function(t){return this.__data__.get(t)},EE.prototype.has=function(t){return this.__data__.has(t)},EE.prototype.set=function(t,e){var r=this.__data__;if(r instanceof sE){var i=r.__data__;if(!aE||i.length<199)return i.push([t,e]),this.size=++r.size,this;r=this.__data__=new uE(i)}return r.set(t,e),this.size=r.size,this};var kE=Object.prototype.propertyIsEnumerable,AE=Object.getOwnPropertySymbols,OE=AE?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var r=-1,i=null==t?0:t.length,n=0,o=[];++ra))return!1;var u=o.get(t),f=o.get(e);if(u&&f)return u==e&&f==t;var l=-1,c=!0,d=r&XE?new GE:void 0;for(o.set(t,e),o.set(e,t);++l{t-this.lastRenderTime>30&&this.render(),requestAnimationFrame(this.autoRender)},this.camera.position.z=2,this._generateMarkForImage()}_generateMark(t=[28145,22323,36805,32500,25968,23383,23402,29983,25216,26415,26377,38480,20844,21496]){}_generateMarkForString(t=[28145,22323,36805,32500,25968,23383,23402,29983,25216,26415,26377,38480,20844,21496]){const e=Array.isArray(t)?String.fromCodePoint(...t):t,r=e.length,{fontSize:i}=this,o=i/4,u=2*o,{x:f,y:l}=this.size=new n(i*r+u,i+u),c=document.createElement("canvas");c.width=f,c.height=l;const d=c.getContext("2d");if(!d)return;const p=d.createLinearGradient(0,0,f,l);p.addColorStop(0,"#ff3653"),p.addColorStop(.5,"#8adb00"),p.addColorStop(1,"#2c8fff"),d.fillStyle=p,d.font=`bold ${i}px/1 serif`,d.fillText(e,o,l-1.5*o);const m=hA.load(c.toDataURL()),g=new s({map:m,toneMapped:!1,transparent:!0}),y=new a(new h(f,l),g);this.add(y)}_generateMarkForImage(t=nA,e=oA,r=sA){const{renderer:i}=this.viewport,{width:o,height:f}=i.domElement,{renderWidth:l,renderHeight:c}=this._calculateImageSize(o,f,e,r);this.size=new n(i.domElement.width,i.domElement.height);const d=hA.load(t);d.wrapS=u,d.wrapT=u,d.repeat.set(l/e,c/r);const p=new s({map:d,toneMapped:!1,transparent:!0}),m=new a(new h(l,c),p);this.add(m)}_calculateImageSize(t,e,r,i){let n=0,o=0;return n=t,o=n*(i/r),othis.render()))}removeFromViewport(){this.viewport.postRender.delete("cps-water-mark")}}const{approxEquals:fA,warn:lA}=t.utils;function cA(t){let e="";for(let r=0;r{const i=t.get(r[e]);return i?i.push(r):t.set(r[e],[r]),t}),r),r}const pA=(t,e)=>{const{content:r,sign:i}=t;if(!e.verify(r,i,"utf8","base64"))throw new Error("v2 error");const n=function(t,e){const r=t.charCodeAt(0),i=t.substring(1,r),n=t.substring(r),o=function(t){const e=function(t){const e=[];let r,i,n,o,s,a,h,u=0;t=t.replace(/[^A-Za-z0-9+/=]/g,"");for(;u>4,i=(15&s)<<4|a>>2,n=(3&a)<<6|h,e.push(r),64!==a&&e.push(i),64!==h&&e.push(n);return new Int8Array(e)}(t),r=new DataView(e.buffer).getInt16(0);if(1===r)return function(t){const e=new DataView(t);let r=2;const i=e.getInt16(r);r+=2;const n=[];for(let t=0;t0,start:o,end:s};n.push(a)}return n.sort(((t,e)=>t.index<=e.index?-1:1)),n}(e.buffer);throw new Error(`解析信息头失败,版本错误: version=${r}`)}(i);let s="";for(const t of o){const r=n.substring(t.start,t.end);let i;i=t.encrypt?e.decryptPublic(r,"utf8"):cA(r),s+=i}return s}(r,e);return JSON.parse(n)};const mA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function gA(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var yA={},bA={get exports(){return yA},set exports(t){yA=t}};bA.exports=function(){function t(e,r,i){function n(s,a){if(!r[s]){if(!e[s]){if(!a&&gA)return gA(s);if(o)return o(s,!0);var h=new Error("Cannot find module '"+s+"'");throw h.code="MODULE_NOT_FOUND",h}var u=r[s]={exports:{}};e[s][0].call(u.exports,(function(t){return n(e[s][1][t]||t)}),u,u.exports,t,e,r,i)}return r[s].exports}for(var o=gA,s=0;s0&&(e.topicAliasMaximum>65535?g("MqttClient :: options.topicAliasMaximum is out of range"):this.topicAliasRecv=new s(e.topicAliasMaximum)),this.on("connect",(function(){const t=this.queue;function e(){const r=t.shift();g("deliver :: entry %o",r);let n=null;if(!r)return void i._resubscribe();n=r.packet,g("deliver :: call _sendPacket for %o",n);let o=!0;n.messageId&&0!==n.messageId&&(i.messageIdProvider.register(n.messageId)||(o=!1)),o?i._sendPacket(n,(function(t){r.cb&&r.cb(t),e()})):(g("messageId: %d has already used. The message is skipped and removed.",n.messageId),e())}g("connect :: sending queued packets"),e()})),this.on("close",(function(){g("close :: connected set to `false`"),this.connected=!1,g("close :: clearing connackTimer"),clearTimeout(this.connackTimer),g("close :: clearing ping timer"),null!==i.pingTimer&&(i.pingTimer.clear(),i.pingTimer=null),this.topicAliasRecv&&this.topicAliasRecv.clear(),g("close :: calling _setupReconnect"),this._setupReconnect()})),n.call(this),g("MqttClient :: setting up stream"),this._setupStream()}l(R,n),R.prototype._setupStream=function(){const t=this,e=new f,r=h.parser(this.options);let i=null;const n=[];function o(){if(n.length)y(s);else{const t=i;i=null,t()}}function s(){g("work :: getting next packet in queue");const e=n.shift();if(e)g("work :: packet pulled from queue"),t._handlePacket(e,o);else{g("work :: no packets in queue");const t=i;i=null,g("work :: done flag is %s",!!t),t&&t()}}function a(e){g("streamErrorHandler :: error",e.message),w.includes(e.code)?(g("streamErrorHandler :: emitting error"),t.emit("error",e)):I(e)}g("_setupStream :: calling method to clear reconnect"),this._clearReconnect(),g("_setupStream :: using streamBuilder provided to client to create stream"),this.stream=this.streamBuilder(this),r.on("packet",(function(t){g("parser :: on packet push to packets array."),n.push(t)})),e._write=function(t,e,n){i=n,g("writable stream :: parsing buffer"),r.parse(t),s()},g("_setupStream :: pipe stream to writable stream"),this.stream.pipe(e),this.stream.on("error",a),this.stream.on("close",(function(){g("(%s)stream :: on close",t.options.clientId),O(t.outgoing),g("stream: emit close to MqttClient"),t.emit("close")})),g("_setupStream: sending packet `connect`");const u=Object.create(this.options);if(u.cmd="connect",this.topicAliasRecv&&(u.properties||(u.properties={}),this.topicAliasRecv&&(u.properties.topicAliasMaximum=this.topicAliasRecv.max)),k(this,u),r.on("error",this.emit.bind(this,"error")),this.options.properties){if(!this.options.properties.authenticationMethod&&this.options.properties.authenticationData)return t.end((()=>this.emit("error",new Error("Packet has no Authentication Method")))),this;this.options.properties.authenticationMethod&&this.options.authPacket&&"object"==typeof this.options.authPacket&&k(this,m({cmd:"auth",reasonCode:0},this.options.authPacket))}this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout((function(){g("!!connectTimeout hit!! Calling _cleanUp with force `true`"),t._cleanUp(!0)}),this.options.connectTimeout)},R.prototype._handlePacket=function(t,e){const r=this.options;if(5===r.protocolVersion&&r.properties&&r.properties.maximumPacketSize&&r.properties.maximumPacketSize0||!s())&&this._storeProcessingQueue.push({invoke:s,cbStorePut:r.cbStorePut,callback:i}),this},R.prototype.subscribe=function(){const t=this,e=new Array(arguments.length);for(let t=0;t0){const i={qos:r.qos};5===a&&(i.nl=r.nl||!1,i.rap=r.rap||!1,i.rh=r.rh||0,i.properties=r.properties),t._resubscribeTopics[r.topic]=i,e.push(r.topic)}})),t.messageIdToTopic[i.messageId]=e}return t.outgoing[i.messageId]={volatile:!0,cb:function(t,e){if(!t){const t=e.granted;for(let e=0;e0||!f())&&this._storeProcessingQueue.push({invoke:f,callback:o}),this},R.prototype.unsubscribe=function(){const t=this,e=new Array(arguments.length);for(let t=0;t0||!s())&&this._storeProcessingQueue.push({invoke:s,callback:i}),this},R.prototype.end=function(t,e,r){const i=this;function n(){g("end :: closeStores: closing incoming and outgoing stores"),i.disconnected=!0,i.incomingStore.close((function(t){i.outgoingStore.close((function(e){if(g("end :: closeStores: emitting end"),i.emit("end"),r){const i=t||e;g("end :: closeStores: invoking callback with args"),r(i)}}))})),i._deferredReconnect&&i._deferredReconnect()}function o(){g("end :: (%s) :: finish :: calling _cleanUp with force %s",i.options.clientId,t),i._cleanUp(t,(()=>{g("end :: finish :: calling process.nextTick on closeStores"),y(n.bind(i))}),e)}return g("end :: (%s)",this.options.clientId),null!=t&&"boolean"==typeof t||(r=e||I,e=t,t=!1,"object"!=typeof e&&(r=e,e=null,"function"!=typeof r&&(r=I))),"object"!=typeof e&&(r=e,e=null),g("end :: cb? %s",!!r),r=r||I,this.disconnecting?(r(),this):(this._clearReconnect(),this.disconnecting=!0,!t&&Object.keys(this.outgoing).length>0?(g("end :: (%s) :: calling finish in 10ms once outgoing is empty",i.options.clientId),this.once("outgoingEmpty",setTimeout.bind(null,o,10))):(g("end :: (%s) :: immediately calling finish",i.options.clientId),o()),this)},R.prototype.removeOutgoingMessage=function(t){const e=this.outgoing[t]?this.outgoing[t].cb:null;return delete this.outgoing[t],this.outgoingStore.del({messageId:t},(function(){e(new Error("Message removed"))})),this},R.prototype.reconnect=function(t){g("client reconnect");const e=this,r=function(){t?(e.options.incomingStore=t.incomingStore,e.options.outgoingStore=t.outgoingStore):(e.options.incomingStore=null,e.options.outgoingStore=null),e.incomingStore=e.options.incomingStore||new o,e.outgoingStore=e.options.outgoingStore||new o,e.disconnecting=!1,e.disconnected=!1,e._deferredReconnect=null,e._reconnect()};return this.disconnecting&&!this.disconnected?this._deferredReconnect=r:r(),this},R.prototype._reconnect=function(){g("_reconnect: emitting reconnect to client"),this.emit("reconnect"),this.connected?(this.end((()=>{this._setupStream()})),g("client already connected. disconnecting first.")):(g("_reconnect: calling _setupStream"),this._setupStream())},R.prototype._setupReconnect=function(){const t=this;!t.disconnecting&&!t.reconnectTimer&&t.options.reconnectPeriod>0?(this.reconnecting||(g("_setupReconnect :: emit `offline` state"),this.emit("offline"),g("_setupReconnect :: set `reconnecting` to `true`"),this.reconnecting=!0),g("_setupReconnect :: setting reconnectTimer for %d ms",t.options.reconnectPeriod),t.reconnectTimer=setInterval((function(){g("reconnectTimer :: reconnect triggered!"),t._reconnect()}),t.options.reconnectPeriod)):g("_setupReconnect :: doing nothing...")},R.prototype._clearReconnect=function(){g("_clearReconnect : clearing reconnect timer"),this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null)},R.prototype._cleanUp=function(t,e){const r=arguments[2];if(e&&(g("_cleanUp :: done callback provided for on stream close"),this.stream.on("close",e)),g("_cleanUp :: forced? %s",t),t)0===this.options.reconnectPeriod&&this.options.clean&&A(this.outgoing),g("_cleanUp :: (%s) :: destroying stream",this.options.clientId),this.stream.destroy();else{const t=m({cmd:"disconnect"},r);g("_cleanUp :: (%s) :: call _sendPacket with disconnect packet",this.options.clientId),this._sendPacket(t,b.bind(null,this.stream.end.bind(this.stream)))}this.disconnecting||(g("_cleanUp :: client not disconnecting. Clearing and resetting reconnect."),this._clearReconnect(),this._setupReconnect()),null!==this.pingTimer&&(g("_cleanUp :: clearing pingTimer"),this.pingTimer.clear(),this.pingTimer=null),e&&!this.connected&&(g("_cleanUp :: (%s) :: removing stream `done` callback `close` listener",this.options.clientId),this.stream.removeListener("close",e),e())},R.prototype._sendPacket=function(t,e,r){g("_sendPacket :: (%s) :: start",this.options.clientId),r=r||I,e=e||I;const i=S(this,t);if(i)e(i);else{if(!this.connected)return"auth"===t.cmd?(this._shiftPingInterval(),void k(this,t,e)):(g("_sendPacket :: client not connected. Storing packet offline."),void this._storePacket(t,e,r));switch(this._shiftPingInterval(),t.cmd){case"publish":break;case"pubrel":return void T(this,t,e,r);default:return void k(this,t,e)}switch(t.qos){case 2:case 1:T(this,t,e,r);break;default:k(this,t,e)}g("_sendPacket :: (%s) :: end",this.options.clientId)}},R.prototype._storePacket=function(t,e,r){g("_storePacket :: packet: %o",t),g("_storePacket :: cb? %s",!!e),r=r||I;let i=t;if("publish"===i.cmd){i=d(t);const r=E(this,i);if(r)return e&&e(r)}0===(i.qos||0)&&this.queueQoSZero||"publish"!==i.cmd?this.queue.push({packet:i,cb:e}):i.qos>0?(e=this.outgoing[i.messageId]?this.outgoing[i.messageId].cb:null,this.outgoingStore.put(i,(function(t){if(t)return e&&e(t);r()}))):e&&e(new Error("No connection to broker"))},R.prototype._setupPingTimer=function(){g("_setupPingTimer :: keepalive %d (seconds)",this.options.keepalive);const t=this;!this.pingTimer&&this.options.keepalive&&(this.pingResp=!0,this.pingTimer=c((function(){t._checkPing()}),1e3*this.options.keepalive))},R.prototype._shiftPingInterval=function(){this.pingTimer&&this.options.keepalive&&this.options.reschedulePings&&this.pingTimer.reschedule(1e3*this.options.keepalive)},R.prototype._checkPing=function(){g("_checkPing :: checking ping..."),this.pingResp?(g("_checkPing :: ping response received. Clearing flag and sending `pingreq`"),this.pingResp=!1,this._sendPacket({cmd:"pingreq"})):(g("_checkPing :: calling _cleanUp with force true"),this._cleanUp(!0))},R.prototype._handlePingresp=function(){this.pingResp=!0},R.prototype._handleConnack=function(t){g("_handleConnack");const e=this.options,r=5===e.protocolVersion?t.reasonCode:t.returnCode;if(clearTimeout(this.connackTimer),delete this.topicAliasSend,t.properties){if(t.properties.topicAliasMaximum){if(t.properties.topicAliasMaximum>65535)return void this.emit("error",new Error("topicAliasMaximum from broker is out of range"));t.properties.topicAliasMaximum>0&&(this.topicAliasSend=new a(t.properties.topicAliasMaximum))}t.properties.serverKeepAlive&&e.keepalive&&(e.keepalive=t.properties.serverKeepAlive,this._shiftPingInterval()),t.properties.maximumPacketSize&&(e.properties||(e.properties={}),e.properties.maximumPacketSize=t.properties.maximumPacketSize)}if(0===r)this.reconnecting=!1,this._onConnect(t);else if(r>0){const t=new Error("Connection refused: "+_[r]);t.code=r,this.emit("error",t)}},R.prototype._handleAuth=function(t){const e=this.options.protocolVersion,r=5===e?t.reasonCode:t.returnCode;if(5!==e){const t=new Error("Protocol error: Auth packets are only supported in MQTT 5. Your version:"+e);return t.code=r,void this.emit("error",t)}const i=this;this.handleAuth(t,(function(t,e){if(t)i.emit("error",t);else if(24===r)i.reconnecting=!1,i._sendPacket(e);else{const e=new Error("Connection refused: "+_[r]);t.code=r,i.emit("error",e)}}))},R.prototype.handleAuth=function(t,e){e()},R.prototype._handlePublish=function(t,e){g("_handlePublish: packet %o",t),e=void 0!==e?e:I;let r=t.topic.toString();const i=t.payload,n=t.qos,o=t.messageId,s=this,a=this.options,h=[0,16,128,131,135,144,145,151,153];if(5===this.options.protocolVersion){let e;if(t.properties&&(e=t.properties.topicAlias),void 0!==e)if(0===r.length){if(!(e>0&&e<=65535))return g("_handlePublish :: topic alias out of range. alias: %d",e),void this.emit("error",new Error("Received Topic Alias is out of range"));{const t=this.topicAliasRecv.getTopicByAlias(e);if(!t)return g("_handlePublish :: unregistered topic alias. alias: %d",e),void this.emit("error",new Error("Received unregistered Topic Alias"));r=t,g("_handlePublish :: topic complemented by alias. topic: %s - alias: %d",r,e)}}else{if(!this.topicAliasRecv.put(r,e))return g("_handlePublish :: topic alias out of range. alias: %d",e),void this.emit("error",new Error("Received Topic Alias is out of range"));g("_handlePublish :: registered topic: %s - alias: %d",r,e)}}switch(g("_handlePublish: qos %d",n),n){case 2:a.customHandleAcks(r,i,t,(function(r,i){return r instanceof Error||(i=r,r=null),r?s.emit("error",r):-1===h.indexOf(i)?s.emit("error",new Error("Wrong reason code for pubrec")):void(i?s._sendPacket({cmd:"pubrec",messageId:o,reasonCode:i},e):s.incomingStore.put(t,(function(){s._sendPacket({cmd:"pubrec",messageId:o},e)})))}));break;case 1:a.customHandleAcks(r,i,t,(function(n,a){return n instanceof Error||(a=n,n=null),n?s.emit("error",n):-1===h.indexOf(a)?s.emit("error",new Error("Wrong reason code for puback")):(a||s.emit("message",r,i,t),void s.handleMessage(t,(function(t){if(t)return e&&e(t);s._sendPacket({cmd:"puback",messageId:o,reasonCode:a},e)})))}));break;case 0:this.emit("message",r,i,t),this.handleMessage(t,e);break;default:g("_handlePublish: unknown QoS. Doing nothing.")}},R.prototype.handleMessage=function(t,e){e()},R.prototype._handleAck=function(t){const e=t.messageId,r=t.cmd;let i=null;const n=this.outgoing[e]?this.outgoing[e].cb:null,o=this;let s;if(n){switch(g("_handleAck :: packet type",r),r){case"pubcomp":case"puback":{const r=t.reasonCode;r&&r>0&&16!==r&&(s=new Error("Publish error: "+_[r]),s.code=r,n(s,t)),delete this.outgoing[e],this.outgoingStore.del(t,n),this.messageIdProvider.deallocate(e),this._invokeStoreProcessingQueue();break}case"pubrec":{i={cmd:"pubrel",qos:2,messageId:e};const r=t.reasonCode;r&&r>0&&16!==r?(s=new Error("Publish error: "+_[r]),s.code=r,n(s,t)):this._sendPacket(i);break}case"suback":delete this.outgoing[e],this.messageIdProvider.deallocate(e);for(let r=0;r0)if(this.options.resubscribe)if(5===this.options.protocolVersion){g("_resubscribe: protocolVersion 5");for(let e=0;e0){const t=this._storeProcessingQueue[0];if(t&&t.invoke())return this._storeProcessingQueue.shift(),!0}return!1},R.prototype._invokeAllStoreProcessingQueue=function(){for(;this._invokeStoreProcessingQueue(););},R.prototype._flushStoreProcessingQueue=function(){for(const t of this._storeProcessingQueue)t.cbStorePut&&t.cbStorePut(new Error("Connection closed")),t.callback&&t.callback(new Error("Connection closed"));this._storeProcessingQueue.splice(0)},e.exports=R}).call(this)}).call(this,t("_process"),void 0!==Y?Y:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./default-message-id-provider":7,"./store":8,"./topic-alias-recv":9,"./topic-alias-send":10,"./validations":11,_process:50,debug:18,events:22,inherits:24,"mqtt-packet":40,"readable-stream":69,reinterval:70,"rfdc/default":71,xtend:81}],2:[function(t,e,r){const{Buffer:i}=t("buffer"),n=t("readable-stream").Transform,o=t("duplexify");let s,a,h,u=!1;function f(){const t=new n;return t._write=function(t,e,r){s.sendSocketMessage({data:t.buffer,success:function(){r()},fail:function(){r(new Error)}})},t._flush=function(t){s.closeSocket({success:function(){t()}})},t}function l(t){t.hostname||(t.hostname="localhost"),t.path||(t.path="/"),t.wsOptions||(t.wsOptions={})}function c(t,e){const r="alis"===t.protocol?"wss":"ws";let i=r+"://"+t.hostname+t.path;return t.port&&80!==t.port&&443!==t.port&&(i=r+"://"+t.hostname+":"+t.port+t.path),"function"==typeof t.transformWsUrl&&(i=t.transformWsUrl(i,t,e)),i}function d(){u||(u=!0,s.onSocketOpen((function(){h.setReadable(a),h.setWritable(a),h.emit("connect")})),s.onSocketMessage((function(t){if("string"==typeof t.data){const e=i.from(t.data,"base64");a.push(e)}else{const e=new FileReader;e.addEventListener("load",(function(){let t=e.result;t=t instanceof ArrayBuffer?i.from(t):i.from(t,"utf8"),a.push(t)})),e.readAsArrayBuffer(t.data)}})),s.onSocketClose((function(){h.end(),h.destroy()})),s.onSocketError((function(t){h.destroy(t)})))}function p(t,e){if(e.hostname=e.hostname||e.host,!e.hostname)throw new Error("Could not determine host. Specify host manually.");const r="MQIsdp"===e.protocolId&&3===e.protocolVersion?"mqttv3.1":"mqtt";l(e);const i=c(e,t);return s=e.my,s.connectSocket({url:i,protocols:r}),a=f(),h=o.obj(),d(),h}e.exports=p},{buffer:17,duplexify:20,"readable-stream":69}],3:[function(t,e,r){const i=t("net"),n=t("debug")("mqttjs:tcp");function o(t,e){e.port=e.port||1883,e.hostname=e.hostname||e.host||"localhost";const r=e.port,o=e.hostname;return n("port %d and host %s",r,o),i.createConnection(r,o)}e.exports=o},{debug:18,net:16}],4:[function(t,e,r){const i=t("tls"),n=t("net"),o=t("debug")("mqttjs:tls");function s(t,e){e.port=e.port||8883,e.host=e.hostname||e.host||"localhost",0===n.isIP(e.host)&&(e.servername=e.host),e.rejectUnauthorized=!1!==e.rejectUnauthorized,delete e.path,o("port %d host %s rejectUnauthorized %b",e.port,e.host,e.rejectUnauthorized);const r=i.connect(e);function s(i){e.rejectUnauthorized&&t.emit("error",i),r.end()}return r.on("secureConnect",(function(){e.rejectUnauthorized&&!r.authorized?r.emit("error",new Error("TLS not authorized")):r.removeListener("error",s)})),r.on("error",s),r}e.exports=s},{debug:18,net:16,tls:16}],5:[function(t,e,r){(function(r){(function(){const{Buffer:i}=t("buffer"),n=t("ws"),o=t("debug")("mqttjs:ws"),s=t("duplexify"),a=t("readable-stream").Transform,h=["rejectUnauthorized","ca","cert","key","pfx","passphrase"],u=void 0!==r&&"browser"===r.title||"function"==typeof __webpack_require__;function f(t,e){let r=t.protocol+"://"+t.hostname+":"+t.port+t.path;return"function"==typeof t.transformWsUrl&&(r=t.transformWsUrl(r,t,e)),r}function l(t){const e=t;return t.hostname||(e.hostname="localhost"),t.port||("wss"===t.protocol?e.port=443:e.port=80),t.path||(e.path="/"),t.wsOptions||(e.wsOptions={}),u||"wss"!==t.protocol||h.forEach((function(r){Object.prototype.hasOwnProperty.call(t,r)&&!Object.prototype.hasOwnProperty.call(t.wsOptions,r)&&(e.wsOptions[r]=t[r])})),e}function c(t){const e=l(t);if(e.hostname||(e.hostname=e.host),!e.hostname){if("undefined"==typeof document)throw new Error("Could not determine host. Specify host manually.");const t=new URL(document.URL);e.hostname=t.hostname,e.port||(e.port=t.port)}return void 0===e.objectMode&&(e.objectMode=!(!0===e.binary||void 0===e.binary)),e}function d(t,e,r){o("createWebSocket"),o("protocol: "+r.protocolId+" "+r.protocolVersion);const i="MQIsdp"===r.protocolId&&3===r.protocolVersion?"mqttv3.1":"mqtt";return o("creating new Websocket for url: "+e+" and protocol: "+i),new n(e,[i],r.wsOptions)}function p(t,e){const r="MQIsdp"===e.protocolId&&3===e.protocolVersion?"mqttv3.1":"mqtt",i=f(e,t),n=new WebSocket(i,[r]);return n.binaryType="arraybuffer",n}function m(t,e){o("streamBuilder");const r=l(e),i=f(r,t),s=d(t,i,r),a=n.createWebSocketStream(s,r.wsOptions);return a.url=i,s.on("close",(()=>{a.destroy()})),a}function g(t,e){let r;o("browserStreamBuilder");const n=c(e).browserBufferSize||524288,h=e.browserBufferTimeout||1e3,u=!e.objectMode,f=p(t,e),l=m(e,_,M);e.objectMode||(l._writev=w),l.on("close",(()=>{f.close()}));const d=void 0!==f.addEventListener;function m(t,e,r){const i=new a({objectModeMode:t.objectMode});return i._write=e,i._flush=r,i}function g(){r.setReadable(l),r.setWritable(l),r.emit("connect")}function y(){r.end(),r.destroy()}function b(t){r.destroy(t)}function v(t){let e=t.data;e=e instanceof ArrayBuffer?i.from(e):i.from(e,"utf8"),l.push(e)}function w(t,e){const r=new Array(t.length);for(let e=0;en&&setTimeout(_,h,t,e,r),u&&"string"==typeof t&&(t=i.from(t,"utf8"));try{f.send(t)}catch(t){return r(t)}r()}function M(t){f.close(),t()}return f.readyState===f.OPEN?r=l:(r=r=s(void 0,void 0,e),e.objectMode||(r._writev=w),d?f.addEventListener("open",g):f.onopen=g),r.socket=f,d?(f.addEventListener("close",y),f.addEventListener("error",b),f.addEventListener("message",v)):(f.onclose=y,f.onerror=b,f.onmessage=v),r}e.exports=u?g:m}).call(this)}).call(this,t("_process"))},{_process:50,buffer:17,debug:18,duplexify:20,"readable-stream":69,ws:80}],6:[function(t,e,r){const{Buffer:i}=t("buffer"),n=t("readable-stream").Transform,o=t("duplexify");let s,a,h;function u(){const t=new n;return t._write=function(t,e,r){s.send({data:t.buffer,success:function(){r()},fail:function(t){r(new Error(t))}})},t._flush=function(t){s.close({success:function(){t()}})},t}function f(t){t.hostname||(t.hostname="localhost"),t.path||(t.path="/"),t.wsOptions||(t.wsOptions={})}function l(t,e){const r="wxs"===t.protocol?"wss":"ws";let i=r+"://"+t.hostname+t.path;return t.port&&80!==t.port&&443!==t.port&&(i=r+"://"+t.hostname+":"+t.port+t.path),"function"==typeof t.transformWsUrl&&(i=t.transformWsUrl(i,t,e)),i}function c(){s.onOpen((function(){h.setReadable(a),h.setWritable(a),h.emit("connect")})),s.onMessage((function(t){let e=t.data;e=e instanceof ArrayBuffer?i.from(e):i.from(e,"utf8"),a.push(e)})),s.onClose((function(){h.end(),h.destroy()})),s.onError((function(t){h.destroy(new Error(t.errMsg))}))}function d(t,e){if(e.hostname=e.hostname||e.host,!e.hostname)throw new Error("Could not determine host. Specify host manually.");const r="MQIsdp"===e.protocolId&&3===e.protocolVersion?"mqttv3.1":"mqtt";f(e);const i=l(e,t);s=wx.connectSocket({url:i,protocols:[r]}),a=u(),h=o.obj(),h._destroy=function(t,e){s.close({success:function(){e&&e(t)}})};const n=h.destroy;return h.destroy=function(){h.destroy=n;const t=this;setTimeout((function(){s.close({fail:function(){t._destroy(new Error)}})}),0)}.bind(h),c(),h}e.exports=d},{buffer:17,duplexify:20,"readable-stream":69}],7:[function(t,e,r){function i(){if(!(this instanceof i))return new i;this.nextId=Math.max(1,Math.floor(65535*Math.random()))}i.prototype.allocate=function(){const t=this.nextId++;return 65536===this.nextId&&(this.nextId=1),t},i.prototype.getLastAllocated=function(){return 1===this.nextId?65535:this.nextId-1},i.prototype.register=function(t){return!0},i.prototype.deallocate=function(t){},i.prototype.clear=function(){},e.exports=i},{}],8:[function(t,e,r){const i=t("xtend"),n=t("readable-stream").Readable,o={objectMode:!0},s={clean:!0};function a(t){if(!(this instanceof a))return new a(t);this.options=t||{},this.options=i(s,t),this._inflights=new Map}a.prototype.put=function(t,e){return this._inflights.set(t.messageId,t),e&&e(),this},a.prototype.createStream=function(){const t=new n(o),e=[];let r=!1,i=0;return this._inflights.forEach((function(t,r){e.push(t)})),t._read=function(){!r&&ithis.max||(this.aliasToTopic[e]=t,this.length=Object.keys(this.aliasToTopic).length,0))},i.prototype.getTopicByAlias=function(t){return this.aliasToTopic[t]},i.prototype.clear=function(){this.aliasToTopic={}},e.exports=i},{}],10:[function(t,e,r){const i=t("lru-cache"),n=t("number-allocator").NumberAllocator;function o(t){if(!(this instanceof o))return new o(t);t>0&&(this.aliasToTopic=new i({max:t}),this.topicToAlias={},this.numberAllocator=new n(1,t),this.max=t,this.length=0)}o.prototype.put=function(t,e){if(0===e||e>this.max)return!1;const r=this.aliasToTopic.get(e);return r&&delete this.topicToAlias[r],this.aliasToTopic.set(e,t),this.topicToAlias[t]=e,this.numberAllocator.use(e),this.length=this.aliasToTopic.length,!0},o.prototype.getTopicByAlias=function(t){return this.aliasToTopic.get(t)},o.prototype.getAliasByTopic=function(t){const e=this.topicToAlias[t];return void 0!==e&&this.aliasToTopic.get(e),e},o.prototype.clear=function(){this.aliasToTopic.reset(),this.topicToAlias={},this.numberAllocator.clear(),this.length=0},o.prototype.getLruAlias=function(){const t=this.numberAllocator.firstVacant();return t||this.aliasToTopic.keys()[this.aliasToTopic.length-1]},e.exports=o},{"lru-cache":37,"number-allocator":46}],11:[function(t,e,r){function i(t){const e=t.split("/");for(let t=0;t0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function f(t){var e=u(t),r=e[0],i=e[1];return 3*(r+i)/4-i}function l(t,e,r){return 3*(e+r)/4-r}function c(t){var e,r,i=u(t),s=i[0],a=i[1],h=new o(l(t,s,a)),f=0,c=a>0?s-4:s;for(r=0;r>16&255,h[f++]=e>>8&255,h[f++]=255&e;return 2===a&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,h[f++]=255&e),1===a&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,h[f++]=e>>8&255,h[f++]=255&e),h}function d(t){return i[t>>18&63]+i[t>>12&63]+i[t>>6&63]+i[63&t]}function p(t,e,r){for(var i,n=[],o=e;oh?h:a+s));return 1===n?(e=t[r-1],o.push(i[e>>2]+i[e<<4&63]+"==")):2===n&&(e=(t[r-2]<<8)+t[r-1],o.push(i[e>>10]+i[e>>4&63]+i[e<<2&63]+"=")),o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},{}],14:[function(t,e,r){const{Buffer:i}=t("buffer"),n=Symbol.for("BufferList");function o(t){if(!(this instanceof o))return new o(t);o._init.call(this,t)}o._init=function(t){Object.defineProperty(this,n,{value:!0}),this._bufs=[],this.length=0,t&&this.append(t)},o.prototype._new=function(t){return new o(t)},o.prototype._offset=function(t){if(0===t)return[0,0];let e=0;for(let r=0;rthis.length||t<0)return;const e=this._offset(t);return this._bufs[e[0]][e[1]]},o.prototype.slice=function(t,e){return"number"==typeof t&&t<0&&(t+=this.length),"number"==typeof e&&e<0&&(e+=this.length),this.copy(null,0,t,e)},o.prototype.copy=function(t,e,r,n){if(("number"!=typeof r||r<0)&&(r=0),("number"!=typeof n||n>this.length)&&(n=this.length),r>=this.length)return t||i.alloc(0);if(n<=0)return t||i.alloc(0);const o=!!t,s=this._offset(r),a=n-r;let h=a,u=o&&e||0,f=s[1];if(0===r&&n===this.length){if(!o)return 1===this._bufs.length?this._bufs[0]:i.concat(this._bufs,this.length);for(let e=0;er)){this._bufs[e].copy(t,u,f,f+h),u+=r;break}this._bufs[e].copy(t,u,f),u+=r,h-=r,f&&(f=0)}return t.length>u?t.slice(0,u):t},o.prototype.shallowSlice=function(t,e){if(t=t||0,e="number"!=typeof e?this.length:e,t<0&&(t+=this.length),e<0&&(e+=this.length),t===e)return this._new();const r=this._offset(t),i=this._offset(e),n=this._bufs.slice(r[0],i[0]+1);return 0===i[1]?n.pop():n[n.length-1]=n[n.length-1].slice(0,i[1]),0!==r[1]&&(n[0]=n[0].slice(r[1])),this._new(n)},o.prototype.toString=function(t,e,r){return this.slice(e,r).toString(t)},o.prototype.consume=function(t){if(t=Math.trunc(t),Number.isNaN(t)||t<=0)return this;for(;this._bufs.length;){if(!(t>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},o.prototype.duplicate=function(){const t=this._new();for(let e=0;ethis.length?this.length:e;const n=this._offset(e);let o=n[0],s=n[1];for(;o=t.length){const r=e.indexOf(t,s);if(-1!==r)return this._reverseOffset([o,r]);s=e.length-t.length+1}else{const e=this._reverseOffset([o,s]);if(this._match(e,t))return e;s++}s=0}return-1},o.prototype._match=function(t,e){if(this.length-tn)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return e.__proto__=a.prototype,e}function a(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return l(t)}return h(t,e,r)}function h(t,e,r){if("string"==typeof t)return c(t,e);if(ArrayBuffer.isView(t))return d(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(X(t,ArrayBuffer)||t&&X(t.buffer,ArrayBuffer))return p(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var i=t.valueOf&&t.valueOf();if(null!=i&&i!==t)return a.from(i,e,r);var n=m(t);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return a.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function f(t,e,r){return u(t),t<=0?s(t):void 0!==e?"string"==typeof r?s(t).fill(e,r):s(t).fill(e):s(t)}function l(t){return u(t),s(t<0?0:0|g(t))}function c(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!a.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|b(t,e),i=s(r),n=i.write(t,e);return n!==r&&(i=i.slice(0,n)),i}function d(t){for(var e=t.length<0?0:0|g(t.length),r=s(e),i=0;i=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return 0|t}function y(t){return+t!=t&&(t=0),a.alloc(+t)}function b(t,e){if(a.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||X(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return V(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Y(t).length;default:if(n)return i?-1:V(t).length;e=(""+e).toLowerCase(),n=!0}}function v(t,e,r){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return B(this,e,r);case"utf8":case"utf-8":return R(this,e,r);case"ascii":return x(this,e,r);case"latin1":case"binary":return N(this,e,r);case"base64":return I(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,e,r);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function w(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function _(t,e,r,i,n){if(0===t.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Q(r=+r)&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(n)return-1;r=t.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof e&&(e=a.from(e,i)),a.isBuffer(e))return 0===e.length?-1:M(t,e,r,i,n);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):M(t,[e],r,i,n);throw new TypeError("val must be string, number or Buffer")}function M(t,e,r,i,n){var o,s=1,a=t.length,h=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;s=2,a/=2,h/=2,r/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(n){var f=-1;for(o=r;oa&&(r=a-h),o=r;o>=0;o--){for(var l=!0,c=0;cn&&(i=n):i=n;var o=e.length;i>o/2&&(i=o/2);for(var s=0;s239?4:u>223?3:u>191?2:1;if(n+l<=r)switch(l){case 1:u<128&&(f=u);break;case 2:128==(192&(o=t[n+1]))&&(h=(31&u)<<6|63&o)>127&&(f=h);break;case 3:o=t[n+1],s=t[n+2],128==(192&o)&&128==(192&s)&&(h=(15&u)<<12|(63&o)<<6|63&s)>2047&&(h<55296||h>57343)&&(f=h);break;case 4:o=t[n+1],s=t[n+2],a=t[n+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(h=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&h<1114112&&(f=h)}null===f?(f=65533,l=1):f>65535&&(f-=65536,i.push(f>>>10&1023|55296),f=56320|1023&f),i.push(f),n+=l}return P(i)}r.kMaxLength=n,a.TYPED_ARRAY_SUPPORT=o(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),a.poolSize=8192,a.from=function(t,e,r){return h(t,e,r)},a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,a.alloc=function(t,e,r){return f(t,e,r)},a.allocUnsafe=function(t){return l(t)},a.allocUnsafeSlow=function(t){return l(t)},a.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==a.prototype},a.compare=function(t,e){if(X(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),X(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(t)||!a.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,i=e.length,n=0,o=Math.min(r,i);ne&&(t+=" ... "),""},a.prototype.compare=function(t,e,r,i,n){if(X(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),e<0||r>t.length||i<0||n>this.length)throw new RangeError("out of range index");if(i>=n&&e>=r)return 0;if(i>=n)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(n>>>=0)-(i>>>=0),s=(r>>>=0)-(e>>>=0),h=Math.min(o,s),u=this.slice(i,n),f=t.slice(e,r),l=0;l>>=0,isFinite(r)?(r>>>=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}var n=this.length-e;if((void 0===r||r>n)&&(r=n),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return S(this,t,e,r);case"utf8":case"utf-8":return E(this,t,e,r);case"ascii":return k(this,t,e,r);case"latin1":case"binary":return A(this,t,e,r);case"base64":return O(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;function P(t){var e=t.length;if(e<=C)return String.fromCharCode.apply(String,t);for(var r="",i=0;ii)&&(r=i);for(var n="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function j(t,e,r,i,n,o){if(!a.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>n||et.length)throw new RangeError("Index out of range")}function U(t,e,r,i,n,o){if(r+i>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function q(t,e,r,n,o){return e=+e,r>>>=0,o||U(t,e,r,4),i.write(t,e,r,n,23,4),r+4}function F(t,e,r,n,o){return e=+e,r>>>=0,o||U(t,e,r,8),i.write(t,e,r,n,52,8),r+8}a.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||D(t,e,this.length);for(var i=this[t],n=1,o=0;++o>>=0,e>>>=0,r||D(t,e,this.length);for(var i=this[t+--e],n=1;e>0&&(n*=256);)i+=this[t+--e]*n;return i},a.prototype.readUInt8=function(t,e){return t>>>=0,e||D(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return t>>>=0,e||D(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return t>>>=0,e||D(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return t>>>=0,e||D(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,e){return t>>>=0,e||D(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||D(t,e,this.length);for(var i=this[t],n=1,o=0;++o=(n*=128)&&(i-=Math.pow(2,8*e)),i},a.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||D(t,e,this.length);for(var i=e,n=1,o=this[t+--i];i>0&&(n*=256);)o+=this[t+--i]*n;return o>=(n*=128)&&(o-=Math.pow(2,8*e)),o},a.prototype.readInt8=function(t,e){return t>>>=0,e||D(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,e){t>>>=0,e||D(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(t,e){t>>>=0,e||D(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(t,e){return t>>>=0,e||D(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return t>>>=0,e||D(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return t>>>=0,e||D(t,4,this.length),i.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return t>>>=0,e||D(t,4,this.length),i.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return t>>>=0,e||D(t,8,this.length),i.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return t>>>=0,e||D(t,8,this.length),i.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,e,r,i){t=+t,e>>>=0,r>>>=0,i||j(this,t,e,r,Math.pow(2,8*r)-1,0);var n=1,o=0;for(this[e]=255&t;++o>>=0,r>>>=0,i||j(this,t,e,r,Math.pow(2,8*r)-1,0);var n=r-1,o=1;for(this[e+n]=255&t;--n>=0&&(o*=256);)this[e+n]=t/o&255;return e+r},a.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,1,255,0),this[e]=255&t,e+1},a.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},a.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeIntLE=function(t,e,r,i){if(t=+t,e>>>=0,!i){var n=Math.pow(2,8*r-1);j(this,t,e,r,n-1,-n)}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+r},a.prototype.writeIntBE=function(t,e,r,i){if(t=+t,e>>>=0,!i){var n=Math.pow(2,8*r-1);j(this,t,e,r,n-1,-n)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},a.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},a.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeFloatLE=function(t,e,r){return q(this,t,e,!0,r)},a.prototype.writeFloatBE=function(t,e,r){return q(this,t,e,!1,r)},a.prototype.writeDoubleLE=function(t,e,r){return F(this,t,e,!0,r)},a.prototype.writeDoubleBE=function(t,e,r){return F(this,t,e,!1,r)},a.prototype.copy=function(t,e,r,i){if(!a.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e=0;--o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,i),e);return n},a.prototype.fill=function(t,e,r,i){if("string"==typeof t){if("string"==typeof e?(i=e,e=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!a.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===t.length){var n=t.charCodeAt(0);("utf8"===i&&n<128||"latin1"===i)&&(t=n)}}else"number"==typeof t&&(t&=255);if(e<0||this.length>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o55295&&r<57344){if(!n){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===i){(e-=3)>-1&&o.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(e-=3)>-1&&o.push(239,191,189);if(n=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function G(t){for(var e=[],r=0;r>8,n=r%256,o.push(n),o.push(i);return o}function Y(t){return e.toByteArray(H(t))}function Z(t,e,r,i){for(var n=0;n=e.length||n>=t.length);++n)e[n+r]=t[n];return n}function X(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function Q(t){return t!=t}}).call(this)}).call(this,t("buffer").Buffer)},{"base64-js":13,buffer:17,ieee754:23}],18:[function(t,e,r){(function(i){(function(){function n(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function o(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let i=0,n=0;t[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(i++,"%c"===t&&(n=i))})),t.splice(n,0,r)}function s(t){try{t?r.storage.setItem("debug",t):r.storage.removeItem("debug")}catch(t){}}function a(){let t;try{t=r.storage.getItem("debug")}catch(t){}return!t&&void 0!==i&&"env"in i&&(t=i.env.DEBUG),t}function h(){try{return localStorage}catch(t){}}r.formatArgs=o,r.save=s,r.load=a,r.useColors=n,r.storage=h(),r.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),r.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],r.log=console.debug||console.log||(()=>{}),e.exports=t("./common")(r);const{formatters:u}=e.exports;u.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}).call(this)}).call(this,t("_process"))},{"./common":19,_process:50}],19:[function(t,e,r){function i(e){function r(t){let e=0;for(let r=0;r{if("%%"===e)return"%";s++;const o=i.formatters[n];if("function"==typeof o){const i=t[s];e=o.call(r,i),t.splice(s,1),s--}return e})),i.formatArgs.call(r,t),(r.log||i.log).apply(r,t)}return a.namespace=t,a.useColors=i.useColors(),a.color=i.selectColor(t),a.extend=n,a.destroy=i.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(r!==i.namespaces&&(r=i.namespaces,o=i.enabled(t)),o),set:t=>{s=t}}),"function"==typeof i.init&&i.init(a),a}function n(t,e){const r=i(this.namespace+(void 0===e?":":e)+t);return r.log=this.log,r}function o(t){let e;i.save(t),i.namespaces=t,i.names=[],i.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),n=r.length;for(e=0;e"-"+t))].join(",");return i.enable(""),t}function a(t){if("*"===t[t.length-1])return!0;let e,r;for(e=0,r=i.skips.length;e{i[t]=e[t]})),i.names=[],i.skips=[],i.formatters={},i.selectColor=r,i.enable(i.load()),i}e.exports=i},{ms:45}],20:[function(t,e,r){(function(r,i){(function(){var n=t("readable-stream"),o=t("end-of-stream"),s=t("inherits"),a=t("stream-shift"),h=i.from&&i.from!==Uint8Array.from?i.from([0]):new i([0]),u=function(t,e){t._corked?t.once("uncork",e):e()},f=function(t,e){t._autoDestroy&&t.destroy(e)},l=function(t,e){return function(r){r?f(t,"premature close"===r.message?null:r):e&&!t._ended&&t.end()}},c=function(t,e){return t?t._writableState&&t._writableState.finished?e():t._writableState?t.end(e):(t.end(),void e()):e()},d=function(){},p=function(t){return new n.Readable({objectMode:!0,highWaterMark:16}).wrap(t)},m=function(t,e,r){if(!(this instanceof m))return new m(t,e,r);n.Duplex.call(this,r),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!r||!1!==r.autoDestroy,this._forwardDestroy=!r||!1!==r.destroy,this._forwardEnd=!r||!1!==r.end,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,t&&this.setWritable(t),e&&this.setReadable(e)};s(m,n.Duplex),m.obj=function(t,e,r){return r||(r={}),r.objectMode=!0,r.highWaterMark=16,new m(t,e,r)},m.prototype.cork=function(){1==++this._corked&&this.emit("cork")},m.prototype.uncork=function(){this._corked&&0==--this._corked&&this.emit("uncork")},m.prototype.setWritable=function(t){if(this._unwrite&&this._unwrite(),this.destroyed)t&&t.destroy&&t.destroy();else if(null!==t&&!1!==t){var e=this,i=o(t,{writable:!0,readable:!1},l(this,this._forwardEnd)),n=function(){var t=e._ondrain;e._ondrain=null,t&&t()},s=function(){e._writable.removeListener("drain",n),i()};this._unwrite&&r.nextTick(n),this._writable=t,this._writable.on("drain",n),this._unwrite=s,this.uncork()}else this.end()},m.prototype.setReadable=function(t){if(this._unread&&this._unread(),this.destroyed)t&&t.destroy&&t.destroy();else{if(null===t||!1===t)return this.push(null),void this.resume();var e=this,r=o(t,{writable:!1,readable:!0},l(this)),i=function(){e._forward()},n=function(){e.push(null)},s=function(){e._readable2.removeListener("readable",i),e._readable2.removeListener("end",n),r()};this._drained=!0,this._readable=t,this._readable2=t._readableState?t:p(t),this._readable2.on("readable",i),this._readable2.on("end",n),this._unread=s,this._forward()}},m.prototype._read=function(){this._drained=!0,this._forward()},m.prototype._forward=function(){if(!this._forwarding&&this._readable2&&this._drained){var t;for(this._forwarding=!0;this._drained&&null!==(t=a(this._readable2));)this.destroyed||(this._drained=this.push(t));this._forwarding=!1}},m.prototype.destroy=function(t,e){if(e||(e=d),this.destroyed)return e(null);this.destroyed=!0;var i=this;r.nextTick((function(){i._destroy(t),e(null)}))},m.prototype._destroy=function(t){if(t){var e=this._ondrain;this._ondrain=null,e?e(t):this.emit("error",t)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")},m.prototype._write=function(t,e,r){if(!this.destroyed)return this._corked?u(this,this._write.bind(this,t,e,r)):t===h?this._finish(r):this._writable?void(!1===this._writable.write(t)?this._ondrain=r:this.destroyed||r()):r()},m.prototype._finish=function(t){var e=this;this.emit("preend"),u(this,(function(){c(e._forwardEnd&&e._writable,(function(){!1===e._writableState.prefinished&&(e._writableState.prefinished=!0),e.emit("prefinish"),u(e,t)}))}))},m.prototype.end=function(t,e,r){return"function"==typeof t?this.end(null,null,t):"function"==typeof e?this.end(t,null,e):(this._ended=!0,t&&this.write(t),this._writableState.ending||this._writableState.destroyed||this.write(h),n.Writable.prototype.end.call(this,r))},e.exports=m}).call(this)}).call(this,t("_process"),t("buffer").Buffer)},{_process:50,buffer:17,"end-of-stream":21,inherits:24,"readable-stream":69,"stream-shift":74}],21:[function(t,e,r){(function(r){(function(){var i=t("once"),n=function(){},o=function(t){return t.setHeader&&"function"==typeof t.abort},s=function(t){return t.stdio&&Array.isArray(t.stdio)&&3===t.stdio.length},a=function(t,e,h){if("function"==typeof e)return a(t,null,e);e||(e={}),h=i(h||n);var u=t._writableState,f=t._readableState,l=e.readable||!1!==e.readable&&t.readable,c=e.writable||!1!==e.writable&&t.writable,d=!1,p=function(){t.writable||m()},m=function(){c=!1,l||h.call(t)},g=function(){l=!1,c||h.call(t)},y=function(e){h.call(t,e?new Error("exited with error code: "+e):null)},b=function(e){h.call(t,e)},v=function(){r.nextTick(w)},w=function(){if(!d)return(!l||f&&f.ended&&!f.destroyed)&&(!c||u&&u.ended&&!u.destroyed)?void 0:h.call(t,new Error("premature close"))},_=function(){t.req.on("finish",m)};return o(t)?(t.on("complete",m),t.on("abort",v),t.req?_():t.on("request",_)):c&&!u&&(t.on("end",p),t.on("close",p)),s(t)&&t.on("exit",y),t.on("end",g),t.on("finish",m),!1!==e.error&&t.on("error",b),t.on("close",v),function(){d=!0,t.removeListener("complete",m),t.removeListener("abort",v),t.removeListener("request",_),t.req&&t.req.removeListener("finish",m),t.removeListener("end",p),t.removeListener("close",p),t.removeListener("finish",m),t.removeListener("exit",y),t.removeListener("end",g),t.removeListener("error",b),t.removeListener("close",v)}};e.exports=a}).call(this)}).call(this,t("_process"))},{_process:50,once:48}],22:[function(t,e,r){var i=Object.create||E,n=Object.keys||k,o=Function.prototype.bind||A;function s(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=i(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}e.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._maxListeners=void 0;var a,h=10;try{var u={};Object.defineProperty&&Object.defineProperty(u,"x",{value:0}),a=0===u.x}catch(t){a=!1}function f(t){return void 0===t._maxListeners?s.defaultMaxListeners:t._maxListeners}function l(t,e,r){if(e)t.call(r);else for(var i=t.length,n=M(t,i),o=0;o0&&a.length>o){a.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+a.length+' "'+String(e)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');h.name="MaxListenersExceededWarning",h.emitter=t,h.type=e,h.count=a.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",h.name,h.message)}}else a=s[e]=r,++t._eventsCount;return t}function y(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var t=new Array(arguments.length),e=0;e1&&(e=arguments[1]),e instanceof Error)throw e;var h=new Error('Unhandled "error" event. ('+e+")");throw h.context=e,h}if(!(r=s[t]))return!1;var u="function"==typeof r;switch(i=arguments.length){case 1:l(r,u,this);break;case 2:c(r,u,this,arguments[1]);break;case 3:d(r,u,this,arguments[1],arguments[2]);break;case 4:p(r,u,this,arguments[1],arguments[2],arguments[3]);break;default:for(n=new Array(i-1),o=1;o=0;s--)if(r[s]===e||r[s].listener===e){a=r[s].listener,o=s;break}if(o<0)return this;0===o?r.shift():_(r,o),1===r.length&&(n[t]=r[0]),n.removeListener&&this.emit("removeListener",t,a||e)}return this},s.prototype.removeAllListeners=function(t){var e,r,o;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=i(null),this._eventsCount=0):r[t]&&(0==--this._eventsCount?this._events=i(null):delete r[t]),this;if(0===arguments.length){var s,a=n(r);for(o=0;o=0;o--)this.removeListener(t,e[o]);return this},s.prototype.listeners=function(t){return v(this,t,!0)},s.prototype.rawListeners=function(t){return v(this,t,!1)},s.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):w.call(t,e)},s.prototype.listenerCount=w,s.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],23:[function(t,e,r){ +!function(t,e){var r=zn,i=r.Buffer;function n(t,e){for(var r in t)e[r]=t[r]}function o(t,e,r){return i(t,e,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?t.exports=r:(n(r,e),e.Buffer=o),o.prototype=Object.create(i.prototype),n(i,o),o.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return i(t,e,r)},o.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var n=i(t);return void 0!==e?"string"==typeof r?n.fill(e,r):n.fill(e):n.fill(0),n},o.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i(t)},o.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return r.SlowBuffer(t)}}(Fn,qn);var Hn=65536,Kn=4294967295;var Vn=qn.Buffer,Gn=Y.crypto||Y.msCrypto;Gn&&Gn.getRandomValues?Un.exports=function(t,e){if(t>Kn)throw new RangeError("requested too many random bytes");var r=Vn.allocUnsafe(t);if(t>0)if(t>Hn)for(var i=0;i0&&s.length>n){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+e+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=t,a.type=e,a.count=s.length,function(t){"function"==typeof console.warn?console.warn(t):console.log(t)}(a)}}else s=o[e]=r,++t._eventsCount;return t}function eo(t,e,r){var i=!1;function n(){t.removeListener(e,n),i||(i=!0,r.apply(t,arguments))}return n.listener=r,n}function ro(t){var e=this._events;if(e){var r=e[t];if("function"==typeof r)return 1;if(r)return r.length}return 0}function io(t,e){for(var r=new Array(e);e--;)r[e]=t[e];return r}Qn.prototype=Object.create(null),Jn.EventEmitter=Jn,Jn.usingDomains=!1,Jn.prototype.domain=void 0,Jn.prototype._events=void 0,Jn.prototype._maxListeners=void 0,Jn.defaultMaxListeners=10,Jn.init=function(){this.domain=null,Jn.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new Qn,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},Jn.prototype.setMaxListeners=function(t){if("number"!=typeof t||t<0||isNaN(t))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=t,this},Jn.prototype.getMaxListeners=function(){return $n(this)},Jn.prototype.emit=function(t){var e,r,i,n,o,s,a,h="error"===t;if(s=this._events)h=h&&null==s.error;else if(!h)return!1;if(a=this.domain,h){if(e=arguments[1],!a){if(e instanceof Error)throw e;var u=new Error('Uncaught, unspecified "error" event. ('+e+")");throw u.context=e,u}return e||(e=new Error('Uncaught, unspecified "error" event')),e.domainEmitter=this,e.domain=a,e.domainThrown=!1,a.emit("error",e),!1}if(!(r=s[t]))return!1;var f="function"==typeof r;switch(i=arguments.length){case 1:!function(t,e,r){if(e)t.call(r);else for(var i=t.length,n=io(t,i),o=0;o0;)if(r[o]===e||r[o].listener&&r[o].listener===e){s=r[o].listener,n=o;break}if(n<0)return this;if(1===r.length){if(r[0]=void 0,0==--this._eventsCount)return this._events=new Qn,this;delete i[t]}else!function(t,e){for(var r=e,i=r+1,n=t.length;i0?Reflect.ownKeys(this._events):[]};var no=X(Object.freeze({__proto__:null,EventEmitter:Jn,default:Jn})),oo=no.EventEmitter,so="function"==typeof Object.create?function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:function(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t},ao=/%[sdj%]/g;function ho(t){if(!ko(t)){for(var e=[],r=0;r=n)return t;switch(t){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":try{return JSON.stringify(i[r++])}catch(t){return"[Circular]"}default:return t}})),s=i[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),_o(e)?r.showHidden=e:e&&Uo(r,e),Oo(r.showHidden)&&(r.showHidden=!1),Oo(r.depth)&&(r.depth=2),Oo(r.colors)&&(r.colors=!1),Oo(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=mo),yo(r,t,r.depth)}function mo(t,e){var r=po.styles[e];return r?"["+po.colors[r][0]+"m"+t+"["+po.colors[r][1]+"m":t}function go(t,e){return t}function yo(t,e,r){if(t.customInspect&&e&&Po(e.inspect)&&e.inspect!==po&&(!e.constructor||e.constructor.prototype!==e)){var i=e.inspect(r,t);return ko(i)||(i=yo(t,i,r)),i}var n=function(t,e){if(Oo(e))return t.stylize("undefined","undefined");if(ko(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"string")}if(Eo(e))return t.stylize(""+e,"number");if(_o(e))return t.stylize(""+e,"boolean");if(Mo(e))return t.stylize("null","null")}(t,e);if(n)return n;var o=Object.keys(e),s=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(o);if(t.showHidden&&(o=Object.getOwnPropertyNames(e)),Co(e)&&(o.indexOf("message")>=0||o.indexOf("description")>=0))return bo(e);if(0===o.length){if(Po(e)){var a=e.name?": "+e.name:"";return t.stylize("[Function"+a+"]","special")}if(To(e))return t.stylize(RegExp.prototype.toString.call(e),"regexp");if(Ro(e))return t.stylize(Date.prototype.toString.call(e),"date");if(Co(e))return bo(e)}var h,u="",f=!1,l=["{","}"];(wo(e)&&(f=!0,l=["[","]"]),Po(e))&&(u=" [Function"+(e.name?": "+e.name:"")+"]");return To(e)&&(u=" "+RegExp.prototype.toString.call(e)),Ro(e)&&(u=" "+Date.prototype.toUTCString.call(e)),Co(e)&&(u=" "+bo(e)),0!==o.length||f&&0!=e.length?r<0?To(e)?t.stylize(RegExp.prototype.toString.call(e),"regexp"):t.stylize("[Object]","special"):(t.seen.push(e),h=f?function(t,e,r,i,n){for(var o=[],s=0,a=e.length;s60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(h,u,l)):l[0]+u+l[1]}function bo(t){return"["+Error.prototype.toString.call(t)+"]"}function vo(t,e,r,i,n,o){var s,a,h;if((h=Object.getOwnPropertyDescriptor(e,n)||{value:e[n]}).get?a=h.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):h.set&&(a=t.stylize("[Setter]","special")),qo(i,n)||(s="["+n+"]"),a||(t.seen.indexOf(h.value)<0?(a=Mo(r)?yo(t,h.value,null):yo(t,h.value,r-1)).indexOf("\n")>-1&&(a=o?a.split("\n").map((function(t){return" "+t})).join("\n").substr(2):"\n"+a.split("\n").map((function(t){return" "+t})).join("\n")):a=t.stylize("[Circular]","special")),Oo(s)){if(o&&n.match(/^\d+$/))return a;(s=JSON.stringify(""+n)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.substr(1,s.length-2),s=t.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=t.stylize(s,"string"))}return s+": "+a}function wo(t){return Array.isArray(t)}function _o(t){return"boolean"==typeof t}function Mo(t){return null===t}function So(t){return null==t}function Eo(t){return"number"==typeof t}function ko(t){return"string"==typeof t}function Ao(t){return"symbol"==typeof t}function Oo(t){return void 0===t}function To(t){return Io(t)&&"[object RegExp]"===Bo(t)}function Io(t){return"object"==typeof t&&null!==t}function Ro(t){return Io(t)&&"[object Date]"===Bo(t)}function Co(t){return Io(t)&&("[object Error]"===Bo(t)||t instanceof Error)}function Po(t){return"function"==typeof t}function xo(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t}function No(t){return Re.isBuffer(t)}function Bo(t){return Object.prototype.toString.call(t)}function Lo(t){return t<10?"0"+t.toString(10):t.toString(10)}po.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},po.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};var Do=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function jo(){console.log("%s - %s",function(){var t=new Date,e=[Lo(t.getHours()),Lo(t.getMinutes()),Lo(t.getSeconds())].join(":");return[t.getDate(),Do[t.getMonth()],e].join(" ")}(),ho.apply(null,arguments))}function Uo(t,e){if(!e||!Io(e))return t;for(var r=Object.keys(e),i=r.length;i--;)t[r[i]]=e[r[i]];return t}function qo(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var Fo,zo,Ho={inherits:so,_extend:Uo,log:jo,isBuffer:No,isPrimitive:xo,isFunction:Po,isError:Co,isDate:Ro,isObject:Io,isRegExp:To,isUndefined:Oo,isSymbol:Ao,isString:ko,isNumber:Eo,isNullOrUndefined:So,isNull:Mo,isBoolean:_o,isArray:wo,inspect:po,deprecate:uo,format:ho,debuglog:co},Ko=X(Object.freeze({__proto__:null,_extend:Uo,debuglog:co,default:Ho,deprecate:uo,format:ho,inherits:so,inspect:po,isArray:wo,isBoolean:_o,isBuffer:No,isDate:Ro,isError:Co,isFunction:Po,isNull:Mo,isNullOrUndefined:So,isNumber:Eo,isObject:Io,isPrimitive:xo,isRegExp:To,isString:ko,isSymbol:Ao,isUndefined:Oo,log:jo}));function Vo(){if(zo)return Fo;function t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function e(e){for(var i=1;i0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return o.alloc(0);for(var e,r,i,n=o.allocUnsafe(t>>>0),s=this.head,a=0;s;)e=s.data,r=n,i=a,o.prototype.copy.call(e,r,i),a+=s.data.length,s=s.next;return n}},{key:"consume",value:function(t,e){var r;return tn.length?n.length:t;if(o===n.length?i+=n:i+=n.slice(0,t),0==(t-=o)){o===n.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=n.slice(o));break}++r}return this.length-=r,i}},{key:"_getBuffer",value:function(t){var e=o.allocUnsafe(t),r=this.head,i=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var n=r.data,s=t>n.length?n.length:t;if(n.copy(e,e.length-t,0,s),0==(t-=s)){s===n.length?(++i,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=n.slice(s));break}++i}return this.length-=i,e}},{key:a,value:function(t,r){return s(this,e(e({},r),{},{depth:0,customInspect:!1}))}}],n&&i(r.prototype,n),h&&i(r,h),Object.defineProperty(r,"prototype",{writable:!1}),t}(),Fo}function Go(t,e){Yo(t,e),Wo(t)}function Wo(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function Yo(t,e){t.emit("error",e)}var Zo={destroy:function(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,n=this._writableState&&this._writableState.destroyed;return i||n?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,Bn.nextTick(Yo,this,t)):Bn.nextTick(Yo,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,(function(t){!e&&t?r._writableState?r._writableState.errorEmitted?Bn.nextTick(Wo,r):(r._writableState.errorEmitted=!0,Bn.nextTick(Go,r,t)):Bn.nextTick(Go,r,t):e?(Bn.nextTick(Wo,r),e(t)):Bn.nextTick(Wo,r)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}},Xo={};var Qo={};function Jo(t,e,r){r||(r=Error);var i=function(t){var r,i;function n(r,i,n){return t.call(this,function(t,r,i){return"string"==typeof e?e:e(t,r,i)}(r,i,n))||this}return i=t,(r=n).prototype=Object.create(i.prototype),r.prototype.constructor=r,r.__proto__=i,n}(r);i.prototype.name=r.name,i.prototype.code=t,Qo[t]=i}function $o(t,e){if(Array.isArray(t)){var r=t.length;return t=t.map((function(t){return String(t)})),r>2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}Jo("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),Jo("ERR_INVALID_ARG_TYPE",(function(t,e,r){var i,n,o,s;if("string"==typeof e&&(n="not ",e.substr(!o||o<0?0:+o,n.length)===n)?(i="must not be",e=e.replace(/^not /,"")):i="must be",function(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}(t," argument"))s="The ".concat(t," ").concat(i," ").concat($o(e,"type"));else{var a=function(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}(t,".")?"property":"argument";s='The "'.concat(t,'" ').concat(a," ").concat(i," ").concat($o(e,"type"))}return s+=". Received type ".concat(typeof r)}),TypeError),Jo("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),Jo("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),Jo("ERR_STREAM_PREMATURE_CLOSE","Premature close"),Jo("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),Jo("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),Jo("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),Jo("ERR_STREAM_WRITE_AFTER_END","write after end"),Jo("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),Jo("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),Jo("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Xo.codes=Qo;var ts=Xo.codes.ERR_INVALID_OPT_VALUE;var es,rs,is,ns,os={getHighWaterMark:function(t,e,r,i){var n=function(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}(e,i,r);if(null!=n){if(!isFinite(n)||Math.floor(n)!==n||n<0)throw new ts(i?r:"highWaterMark",n);return Math.floor(n)}return t.objectMode?16:16384}},ss=function(t,e){if(as("noDeprecation"))return t;var r=!1;return function(){if(!r){if(as("throwDeprecation"))throw new Error(e);as("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}};function as(t){try{if(!Y.localStorage)return!1}catch(t){return!1}var e=Y.localStorage[t];return null!=e&&"true"===String(e).toLowerCase()}function hs(){if(rs)return es;function t(t){var e=this;this.next=null,this.entry=null,this.finish=function(){!function(t,e,r){var i=t.entry;t.entry=null;for(;i;){var n=i.callback;e.pendingcb--,n(r),i=i.next}e.corkedRequestsFree.next=t}(e,t)}}var e;rs=1,es=_,_.WritableState=w;var r={deprecate:ss},i=oo,n=zn.Buffer,o=(void 0!==Y?Y:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){};var s,a=Zo,h=os.getHighWaterMark,u=Xo.codes,f=u.ERR_INVALID_ARG_TYPE,l=u.ERR_METHOD_NOT_IMPLEMENTED,c=u.ERR_MULTIPLE_CALLBACK,d=u.ERR_STREAM_CANNOT_PIPE,p=u.ERR_STREAM_DESTROYED,m=u.ERR_STREAM_NULL_VALUES,g=u.ERR_STREAM_WRITE_AFTER_END,y=u.ERR_UNKNOWN_ENCODING,b=a.errorOrDestroy;function v(){}function w(r,i,n){e=e||us(),r=r||{},"boolean"!=typeof n&&(n=i instanceof e),this.objectMode=!!r.objectMode,n&&(this.objectMode=this.objectMode||!!r.writableObjectMode),this.highWaterMark=h(this,r,"writableHighWaterMark",n),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=!1===r.decodeStrings;this.decodeStrings=!o,this.defaultEncoding=r.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(t){!function(t,e){var r=t._writableState,i=r.sync,n=r.writecb;if("function"!=typeof n)throw new c;if(function(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0}(r),e)!function(t,e,r,i,n){--e.pendingcb,r?(Bn.nextTick(n,i),Bn.nextTick(O,t,e),t._writableState.errorEmitted=!0,b(t,i)):(n(i),t._writableState.errorEmitted=!0,b(t,i),O(t,e))}(t,r,i,e,n);else{var o=k(r)||t.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||E(t,r),i?Bn.nextTick(S,t,r,o,n):S(t,r,o,n)}}(i,t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==r.emitClose,this.autoDestroy=!!r.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new t(this)}function _(t){var r=this instanceof(e=e||us());if(!r&&!s.call(_,this))return new _(t);this._writableState=new w(t,this,r),this.writable=!0,t&&("function"==typeof t.write&&(this._write=t.write),"function"==typeof t.writev&&(this._writev=t.writev),"function"==typeof t.destroy&&(this._destroy=t.destroy),"function"==typeof t.final&&(this._final=t.final)),i.call(this)}function M(t,e,r,i,n,o,s){e.writelen=i,e.writecb=s,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new p("write")):r?t._writev(n,e.onwrite):t._write(n,o,e.onwrite),e.sync=!1}function S(t,e,r,i){r||function(t,e){0===e.length&&e.needDrain&&(e.needDrain=!1,t.emit("drain"))}(t,e),e.pendingcb--,i(),O(t,e)}function E(e,r){r.bufferProcessing=!0;var i=r.bufferedRequest;if(e._writev&&i&&i.next){var n=r.bufferedRequestCount,o=new Array(n),s=r.corkedRequestsFree;s.entry=i;for(var a=0,h=!0;i;)o[a]=i,i.isBuf||(h=!1),i=i.next,a+=1;o.allBuffers=h,M(e,r,!0,r.length,o,"",s.finish),r.pendingcb++,r.lastBufferedRequest=null,s.next?(r.corkedRequestsFree=s.next,s.next=null):r.corkedRequestsFree=new t(r),r.bufferedRequestCount=0}else{for(;i;){var u=i.chunk,f=i.encoding,l=i.callback;if(M(e,r,!1,r.objectMode?1:u.length,u,f,l),i=i.next,r.bufferedRequestCount--,r.writing)break}null===i&&(r.lastBufferedRequest=null)}r.bufferedRequest=i,r.bufferProcessing=!1}function k(t){return t.ending&&0===t.length&&null===t.bufferedRequest&&!t.finished&&!t.writing}function A(t,e){t._final((function(r){e.pendingcb--,r&&b(t,r),e.prefinished=!0,t.emit("prefinish"),O(t,e)}))}function O(t,e){var r=k(e);if(r&&(function(t,e){e.prefinished||e.finalCalled||("function"!=typeof t._final||e.destroyed?(e.prefinished=!0,t.emit("prefinish")):(e.pendingcb++,e.finalCalled=!0,Bn.nextTick(A,t,e)))}(t,e),0===e.pendingcb&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy()}return r}return Wn(_,i),w.prototype.getBuffer=function(){for(var t=this.bufferedRequest,e=[];t;)e.push(t),t=t.next;return e},function(){try{Object.defineProperty(w.prototype,"buffer",{get:r.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(t){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(_,Symbol.hasInstance,{value:function(t){return!!s.call(this,t)||this===_&&(t&&t._writableState instanceof w)}})):s=function(t){return t instanceof this},_.prototype.pipe=function(){b(this,new d)},_.prototype.write=function(t,e,r){var i,s=this._writableState,a=!1,h=!s.objectMode&&(i=t,n.isBuffer(i)||i instanceof o);return h&&!n.isBuffer(t)&&(t=function(t){return n.from(t)}(t)),"function"==typeof e&&(r=e,e=null),h?e="buffer":e||(e=s.defaultEncoding),"function"!=typeof r&&(r=v),s.ending?function(t,e){var r=new g;b(t,r),Bn.nextTick(e,r)}(this,r):(h||function(t,e,r,i){var n;return null===r?n=new m:"string"==typeof r||e.objectMode||(n=new f("chunk",["string","Buffer"],r)),!n||(b(t,n),Bn.nextTick(i,n),!1)}(this,s,t,r))&&(s.pendingcb++,a=function(t,e,r,i,o,s){if(!r){var a=function(t,e,r){t.objectMode||!1===t.decodeStrings||"string"!=typeof e||(e=n.from(e,r));return e}(e,i,o);i!==a&&(r=!0,o="buffer",i=a)}var h=e.objectMode?1:i.length;e.length+=h;var u=e.length-1))throw new y(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(_.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(_.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),_.prototype._write=function(t,e,r){r(new l("_write()"))},_.prototype._writev=null,_.prototype.end=function(t,e,r){var i=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||function(t,e,r){e.ending=!0,O(t,e),r&&(e.finished?Bn.nextTick(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,i,r),this},Object.defineProperty(_.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(_.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),_.prototype.destroy=a.destroy,_.prototype._undestroy=a.undestroy,_.prototype._destroy=function(t,e){e(t)},es}function us(){if(ns)return is;ns=1;var t=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};is=s;var e=Ss(),r=hs();Wn(s,e);for(var i=t(r.prototype),n=0;n>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function n(t){var e=this.lastTotal-this.lastNeed,r=function(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function o(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function s(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function a(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function h(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function u(t){return t.toString(this.encoding)}function f(t){return t&&t.length?this.write(t):""}return ls.StringDecoder=r,r.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0)return o>0&&(t.lastNeed=o-1),o;if(--n=0)return o>0&&(t.lastNeed=o-2),o;if(--n=0)return o>0&&(2===o?o=0:t.lastNeed=o-3),o;return 0}(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var n=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,n),t.toString("utf8",e,n)},r.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length},ls}var ds=Xo.codes.ERR_STREAM_PREMATURE_CLOSE;function ps(){}var ms,gs,ys,bs,vs,ws,_s=function t(e,r,i){if("function"==typeof r)return t(e,null,r);r||(r={}),i=function(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n0)if("string"==typeof e||u.objectMode||Object.getPrototypeOf(e)===i.prototype||(e=function(t){return i.from(t)}(e)),s)u.endEmitted?b(t,new y):S(t,u,e,!0);else if(u.ended)b(t,new m);else{if(u.destroyed)return!1;u.reading=!1,u.decoder&&!r?(e=u.decoder.write(e),u.objectMode||0!==e.length?S(t,u,e,!1):T(t,u)):S(t,u,e,!1)}else s||(u.reading=!1,T(t,u));return!u.ended&&(u.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=E?t=E:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function A(t){var e=t._readableState;o("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(o("emitReadable",e.flowing),e.emittedReadable=!0,Bn.nextTick(O,t))}function O(t){var e=t._readableState;o("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,x(t)}function T(t,e){e.readingMore||(e.readingMore=!0,Bn.nextTick(I,t,e))}function I(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function C(t){o("readable nexttick read 0"),t.read(0)}function P(t,e){o("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),x(t),e.flowing&&!e.reading&&t.read(0)}function x(t){var e=t._readableState;for(o("flow",e.flowing);e.flowing&&null!==t.read(););}function N(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function B(t){var e=t._readableState;o("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,Bn.nextTick(L,e,t))}function L(t,e){if(o("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function D(t,e){for(var r=0,i=t.length;r=e.highWaterMark:e.length>0)||e.ended))return o("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?B(this):A(this),null;if(0===(t=k(t,e))&&e.ended)return 0===e.length&&B(this),null;var i,n=e.needReadable;return o("need readable",n),(0===e.length||e.length-t0?N(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&B(this)),null!==i&&this.emit("data",i),i},_.prototype._read=function(t){b(this,new g("_read()"))},_.prototype.pipe=function(t,r){var i=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t)}n.pipesCount+=1,o("pipe count=%d opts=%j",n.pipesCount,r);var s=(!r||!1!==r.end)&&t!==Bn.stdout&&t!==Bn.stderr?h:m;function a(e,r){o("onunpipe"),e===i&&r&&!1===r.hasUnpiped&&(r.hasUnpiped=!0,o("cleanup"),t.removeListener("close",d),t.removeListener("finish",p),t.removeListener("drain",u),t.removeListener("error",c),t.removeListener("unpipe",a),i.removeListener("end",h),i.removeListener("end",m),i.removeListener("data",l),f=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||u())}function h(){o("onend"),t.end()}n.endEmitted?Bn.nextTick(s):i.once("end",s),t.on("unpipe",a);var u=function(t){return function(){var r=t._readableState;o("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,0===r.awaitDrain&&e(t,"data")&&(r.flowing=!0,x(t))}}(i);t.on("drain",u);var f=!1;function l(e){o("ondata");var r=t.write(e);o("dest.write",r),!1===r&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==D(n.pipes,t))&&!f&&(o("false write response, pause",n.awaitDrain),n.awaitDrain++),i.pause())}function c(r){o("onerror",r),m(),t.removeListener("error",c),0===e(t,"error")&&b(t,r)}function d(){t.removeListener("finish",p),m()}function p(){o("onfinish"),t.removeListener("close",d),m()}function m(){o("unpipe"),i.unpipe(t)}return i.on("data",l),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",c),t.once("close",d),t.once("finish",p),t.emit("pipe",i),n.flowing||(o("pipe resume"),i.resume()),t},_.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o0,!1!==n.flowing&&this.resume()):"readable"===t&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,o("on readable",n.length,n.reading),n.length?A(this):n.reading||Bn.nextTick(C,this))),i},_.prototype.addListener=_.prototype.on,_.prototype.removeListener=function(t,e){var i=r.prototype.removeListener.call(this,t,e);return"readable"===t&&Bn.nextTick(R,this),i},_.prototype.removeAllListeners=function(t){var e=r.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||Bn.nextTick(R,this),e},_.prototype.resume=function(){var t=this._readableState;return t.flowing||(o("resume"),t.flowing=!t.readableListening,function(t,e){e.resumeScheduled||(e.resumeScheduled=!0,Bn.nextTick(P,t,e))}(this,t)),t.paused=!1,this},_.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},_.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;for(var n in t.on("end",(function(){if(o("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(n){(o("wrapped data"),r.decoder&&(n=r.decoder.write(n)),r.objectMode&&null==n)||(r.objectMode||n&&n.length)&&(e.push(n)||(i=!0,t.pause()))})),t)void 0===this[n]&&"function"==typeof t[n]&&(this[n]=function(e){return function(){return t[e].apply(t,arguments)}}(n));for(var s=0;s0,(function(t){i||(i=t),t&&o.forEach(Hs),s||(o.forEach(Hs),n(i))}))}));return e.reduce(Ks)};!function(t,e){(e=Xn.exports=Ss()).Stream=e,e.Readable=e,e.Writable=hs(),e.Duplex=us(),e.Transform=Es,e.PassThrough=Ls,e.finished=_s,e.pipeline=Vs}(0,Zn);var Gs=qn.Buffer,Ws=Zn.Transform;function Ys(t){Ws.call(this),this._block=Gs.allocUnsafe(t),this._blockSize=t,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}Wn(Ys,Ws),Ys.prototype._transform=function(t,e,r){var i=null;try{this.update(t,e)}catch(t){i=t}r(i)},Ys.prototype._flush=function(t){var e=null;try{this.push(this.digest())}catch(t){e=t}t(e)},Ys.prototype.update=function(t,e){if(function(t,e){if(!Gs.isBuffer(t)&&"string"!=typeof t)throw new TypeError(e+" must be a string or a buffer")}(t,"Data"),this._finalized)throw new Error("Digest already called");Gs.isBuffer(t)||(t=Gs.from(t,e));for(var r=this._block,i=0;this._blockOffset+t.length-i>=this._blockSize;){for(var n=this._blockOffset;n0;++o)this._length[o]+=s,(s=this._length[o]/4294967296|0)>0&&(this._length[o]-=4294967296*s);return this},Ys.prototype._update=function(){throw new Error("_update is not implemented")},Ys.prototype.digest=function(t){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var e=this._digest();void 0!==t&&(e=e.toString(t)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return e},Ys.prototype._digest=function(){throw new Error("_digest is not implemented")};var Zs=Ys,Xs=Wn,Qs=Zs,Js=qn.Buffer,$s=new Array(16);function ta(){Qs.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function ea(t,e){return t<>>32-e}function ra(t,e,r,i,n,o,s){return ea(t+(e&r|~e&i)+n+o|0,s)+e|0}function ia(t,e,r,i,n,o,s){return ea(t+(e&i|r&~i)+n+o|0,s)+e|0}function na(t,e,r,i,n,o,s){return ea(t+(e^r^i)+n+o|0,s)+e|0}function oa(t,e,r,i,n,o,s){return ea(t+(r^(e|~i))+n+o|0,s)+e|0}Xs(ta,Qs),ta.prototype._update=function(){for(var t=$s,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);var r=this._a,i=this._b,n=this._c,o=this._d;r=ra(r,i,n,o,t[0],3614090360,7),o=ra(o,r,i,n,t[1],3905402710,12),n=ra(n,o,r,i,t[2],606105819,17),i=ra(i,n,o,r,t[3],3250441966,22),r=ra(r,i,n,o,t[4],4118548399,7),o=ra(o,r,i,n,t[5],1200080426,12),n=ra(n,o,r,i,t[6],2821735955,17),i=ra(i,n,o,r,t[7],4249261313,22),r=ra(r,i,n,o,t[8],1770035416,7),o=ra(o,r,i,n,t[9],2336552879,12),n=ra(n,o,r,i,t[10],4294925233,17),i=ra(i,n,o,r,t[11],2304563134,22),r=ra(r,i,n,o,t[12],1804603682,7),o=ra(o,r,i,n,t[13],4254626195,12),n=ra(n,o,r,i,t[14],2792965006,17),r=ia(r,i=ra(i,n,o,r,t[15],1236535329,22),n,o,t[1],4129170786,5),o=ia(o,r,i,n,t[6],3225465664,9),n=ia(n,o,r,i,t[11],643717713,14),i=ia(i,n,o,r,t[0],3921069994,20),r=ia(r,i,n,o,t[5],3593408605,5),o=ia(o,r,i,n,t[10],38016083,9),n=ia(n,o,r,i,t[15],3634488961,14),i=ia(i,n,o,r,t[4],3889429448,20),r=ia(r,i,n,o,t[9],568446438,5),o=ia(o,r,i,n,t[14],3275163606,9),n=ia(n,o,r,i,t[3],4107603335,14),i=ia(i,n,o,r,t[8],1163531501,20),r=ia(r,i,n,o,t[13],2850285829,5),o=ia(o,r,i,n,t[2],4243563512,9),n=ia(n,o,r,i,t[7],1735328473,14),r=na(r,i=ia(i,n,o,r,t[12],2368359562,20),n,o,t[5],4294588738,4),o=na(o,r,i,n,t[8],2272392833,11),n=na(n,o,r,i,t[11],1839030562,16),i=na(i,n,o,r,t[14],4259657740,23),r=na(r,i,n,o,t[1],2763975236,4),o=na(o,r,i,n,t[4],1272893353,11),n=na(n,o,r,i,t[7],4139469664,16),i=na(i,n,o,r,t[10],3200236656,23),r=na(r,i,n,o,t[13],681279174,4),o=na(o,r,i,n,t[0],3936430074,11),n=na(n,o,r,i,t[3],3572445317,16),i=na(i,n,o,r,t[6],76029189,23),r=na(r,i,n,o,t[9],3654602809,4),o=na(o,r,i,n,t[12],3873151461,11),n=na(n,o,r,i,t[15],530742520,16),r=oa(r,i=na(i,n,o,r,t[2],3299628645,23),n,o,t[0],4096336452,6),o=oa(o,r,i,n,t[7],1126891415,10),n=oa(n,o,r,i,t[14],2878612391,15),i=oa(i,n,o,r,t[5],4237533241,21),r=oa(r,i,n,o,t[12],1700485571,6),o=oa(o,r,i,n,t[3],2399980690,10),n=oa(n,o,r,i,t[10],4293915773,15),i=oa(i,n,o,r,t[1],2240044497,21),r=oa(r,i,n,o,t[8],1873313359,6),o=oa(o,r,i,n,t[15],4264355552,10),n=oa(n,o,r,i,t[6],2734768916,15),i=oa(i,n,o,r,t[13],1309151649,21),r=oa(r,i,n,o,t[4],4149444226,6),o=oa(o,r,i,n,t[11],3174756917,10),n=oa(n,o,r,i,t[2],718787259,15),i=oa(i,n,o,r,t[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+i|0,this._c=this._c+n|0,this._d=this._d+o|0},ta.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=Js.allocUnsafe(16);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t};var sa=ta,aa=zn.Buffer,ha=Wn,ua=Zs,fa=new Array(16),la=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],ca=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],da=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],pa=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],ma=[0,1518500249,1859775393,2400959708,2840853838],ga=[1352829926,1548603684,1836072691,2053994217,0];function ya(){ua.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function ba(t,e){return t<>>32-e}function va(t,e,r,i,n,o,s,a){return ba(t+(e^r^i)+o+s|0,a)+n|0}function wa(t,e,r,i,n,o,s,a){return ba(t+(e&r|~e&i)+o+s|0,a)+n|0}function _a(t,e,r,i,n,o,s,a){return ba(t+((e|~r)^i)+o+s|0,a)+n|0}function Ma(t,e,r,i,n,o,s,a){return ba(t+(e&i|r&~i)+o+s|0,a)+n|0}function Sa(t,e,r,i,n,o,s,a){return ba(t+(e^(r|~i))+o+s|0,a)+n|0}ha(ya,ua),ya.prototype._update=function(){for(var t=fa,e=0;e<16;++e)t[e]=this._block.readInt32LE(4*e);for(var r=0|this._a,i=0|this._b,n=0|this._c,o=0|this._d,s=0|this._e,a=0|this._a,h=0|this._b,u=0|this._c,f=0|this._d,l=0|this._e,c=0;c<80;c+=1){var d,p;c<16?(d=va(r,i,n,o,s,t[la[c]],ma[0],da[c]),p=Sa(a,h,u,f,l,t[ca[c]],ga[0],pa[c])):c<32?(d=wa(r,i,n,o,s,t[la[c]],ma[1],da[c]),p=Ma(a,h,u,f,l,t[ca[c]],ga[1],pa[c])):c<48?(d=_a(r,i,n,o,s,t[la[c]],ma[2],da[c]),p=_a(a,h,u,f,l,t[ca[c]],ga[2],pa[c])):c<64?(d=Ma(r,i,n,o,s,t[la[c]],ma[3],da[c]),p=wa(a,h,u,f,l,t[ca[c]],ga[3],pa[c])):(d=Sa(r,i,n,o,s,t[la[c]],ma[4],da[c]),p=va(a,h,u,f,l,t[ca[c]],ga[4],pa[c])),r=s,s=o,o=ba(n,10),n=i,i=d,a=l,l=f,f=ba(u,10),u=h,h=p}var m=this._b+n+f|0;this._b=this._c+o+l|0,this._c=this._d+s+a|0,this._d=this._e+r+h|0,this._e=this._a+i+u|0,this._a=m},ya.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var t=aa.alloc?aa.alloc(20):new aa(20);return t.writeInt32LE(this._a,0),t.writeInt32LE(this._b,4),t.writeInt32LE(this._c,8),t.writeInt32LE(this._d,12),t.writeInt32LE(this._e,16),t};var Ea=ya,ka={},Aa={get exports(){return ka},set exports(t){ka=t}},Oa=qn.Buffer;function Ta(t,e){this._block=Oa.alloc(t),this._finalSize=e,this._blockSize=t,this._len=0}Ta.prototype.update=function(t,e){"string"==typeof t&&(e=e||"utf8",t=Oa.from(t,e));for(var r=this._block,i=this._blockSize,n=t.length,o=this._len,s=0;s=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var i=(4294967295&r)>>>0,n=(r-i)/4294967296;this._block.writeUInt32BE(n,this._blockSize-8),this._block.writeUInt32BE(i,this._blockSize-4)}this._update(this._block);var o=this._hash();return t?o.toString(t):o},Ta.prototype._update=function(){throw new Error("_update must be implemented by subclass")};var Ia=Ta,Ra=Wn,Ca=Ia,Pa=qn.Buffer,xa=[1518500249,1859775393,-1894007588,-899497514],Na=new Array(80);function Ba(){this.init(),this._w=Na,Ca.call(this,64,56)}function La(t){return t<<30|t>>>2}function Da(t,e,r,i){return 0===t?e&r|~e&i:2===t?e&r|e&i|r&i:e^r^i}Ra(Ba,Ca),Ba.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Ba.prototype._update=function(t){for(var e,r=this._w,i=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,a=0|this._e,h=0;h<16;++h)r[h]=t.readInt32BE(4*h);for(;h<80;++h)r[h]=r[h-3]^r[h-8]^r[h-14]^r[h-16];for(var u=0;u<80;++u){var f=~~(u/20),l=0|((e=i)<<5|e>>>27)+Da(f,n,o,s)+a+r[u]+xa[f];a=s,s=o,o=La(n),n=i,i=l}this._a=i+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=a+this._e|0},Ba.prototype._hash=function(){var t=Pa.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t};var ja=Ba,Ua=Wn,qa=Ia,Fa=qn.Buffer,za=[1518500249,1859775393,-1894007588,-899497514],Ha=new Array(80);function Ka(){this.init(),this._w=Ha,qa.call(this,64,56)}function Va(t){return t<<5|t>>>27}function Ga(t){return t<<30|t>>>2}function Wa(t,e,r,i){return 0===t?e&r|~e&i:2===t?e&r|e&i|r&i:e^r^i}Ua(Ka,qa),Ka.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},Ka.prototype._update=function(t){for(var e,r=this._w,i=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,a=0|this._e,h=0;h<16;++h)r[h]=t.readInt32BE(4*h);for(;h<80;++h)r[h]=(e=r[h-3]^r[h-8]^r[h-14]^r[h-16])<<1|e>>>31;for(var u=0;u<80;++u){var f=~~(u/20),l=Va(i)+Wa(f,n,o,s)+a+r[u]+za[f]|0;a=s,s=o,o=Ga(n),n=i,i=l}this._a=i+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=a+this._e|0},Ka.prototype._hash=function(){var t=Fa.allocUnsafe(20);return t.writeInt32BE(0|this._a,0),t.writeInt32BE(0|this._b,4),t.writeInt32BE(0|this._c,8),t.writeInt32BE(0|this._d,12),t.writeInt32BE(0|this._e,16),t};var Ya=Ka,Za=Wn,Xa=Ia,Qa=qn.Buffer,Ja=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],$a=new Array(64);function th(){this.init(),this._w=$a,Xa.call(this,64,56)}function eh(t,e,r){return r^t&(e^r)}function rh(t,e,r){return t&e|r&(t|e)}function ih(t){return(t>>>2|t<<30)^(t>>>13|t<<19)^(t>>>22|t<<10)}function nh(t){return(t>>>6|t<<26)^(t>>>11|t<<21)^(t>>>25|t<<7)}function oh(t){return(t>>>7|t<<25)^(t>>>18|t<<14)^t>>>3}Za(th,Xa),th.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},th.prototype._update=function(t){for(var e,r=this._w,i=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,a=0|this._e,h=0|this._f,u=0|this._g,f=0|this._h,l=0;l<16;++l)r[l]=t.readInt32BE(4*l);for(;l<64;++l)r[l]=0|(((e=r[l-2])>>>17|e<<15)^(e>>>19|e<<13)^e>>>10)+r[l-7]+oh(r[l-15])+r[l-16];for(var c=0;c<64;++c){var d=f+nh(a)+eh(a,h,u)+Ja[c]+r[c]|0,p=ih(i)+rh(i,n,o)|0;f=u,u=h,h=a,a=s+d|0,s=o,o=n,n=i,i=d+p|0}this._a=i+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=s+this._d|0,this._e=a+this._e|0,this._f=h+this._f|0,this._g=u+this._g|0,this._h=f+this._h|0},th.prototype._hash=function(){var t=Qa.allocUnsafe(32);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t.writeInt32BE(this._h,28),t};var sh=th,ah=Wn,hh=sh,uh=Ia,fh=qn.Buffer,lh=new Array(64);function ch(){this.init(),this._w=lh,uh.call(this,64,56)}ah(ch,hh),ch.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},ch.prototype._hash=function(){var t=fh.allocUnsafe(28);return t.writeInt32BE(this._a,0),t.writeInt32BE(this._b,4),t.writeInt32BE(this._c,8),t.writeInt32BE(this._d,12),t.writeInt32BE(this._e,16),t.writeInt32BE(this._f,20),t.writeInt32BE(this._g,24),t};var dh=ch,ph=Wn,mh=Ia,gh=qn.Buffer,yh=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],bh=new Array(160);function vh(){this.init(),this._w=bh,mh.call(this,128,112)}function wh(t,e,r){return r^t&(e^r)}function _h(t,e,r){return t&e|r&(t|e)}function Mh(t,e){return(t>>>28|e<<4)^(e>>>2|t<<30)^(e>>>7|t<<25)}function Sh(t,e){return(t>>>14|e<<18)^(t>>>18|e<<14)^(e>>>9|t<<23)}function Eh(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^t>>>7}function kh(t,e){return(t>>>1|e<<31)^(t>>>8|e<<24)^(t>>>7|e<<25)}function Ah(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^t>>>6}function Oh(t,e){return(t>>>19|e<<13)^(e>>>29|t<<3)^(t>>>6|e<<26)}function Th(t,e){return t>>>0>>0?1:0}ph(vh,mh),vh.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},vh.prototype._update=function(t){for(var e=this._w,r=0|this._ah,i=0|this._bh,n=0|this._ch,o=0|this._dh,s=0|this._eh,a=0|this._fh,h=0|this._gh,u=0|this._hh,f=0|this._al,l=0|this._bl,c=0|this._cl,d=0|this._dl,p=0|this._el,m=0|this._fl,g=0|this._gl,y=0|this._hl,b=0;b<32;b+=2)e[b]=t.readInt32BE(4*b),e[b+1]=t.readInt32BE(4*b+4);for(;b<160;b+=2){var v=e[b-30],w=e[b-30+1],_=Eh(v,w),M=kh(w,v),S=Ah(v=e[b-4],w=e[b-4+1]),E=Oh(w,v),k=e[b-14],A=e[b-14+1],O=e[b-32],T=e[b-32+1],I=M+A|0,R=_+k+Th(I,M)|0;R=(R=R+S+Th(I=I+E|0,E)|0)+O+Th(I=I+T|0,T)|0,e[b]=R,e[b+1]=I}for(var C=0;C<160;C+=2){R=e[C],I=e[C+1];var P=_h(r,i,n),x=_h(f,l,c),N=Mh(r,f),B=Mh(f,r),L=Sh(s,p),D=Sh(p,s),j=yh[C],U=yh[C+1],q=wh(s,a,h),F=wh(p,m,g),z=y+D|0,H=u+L+Th(z,y)|0;H=(H=(H=H+q+Th(z=z+F|0,F)|0)+j+Th(z=z+U|0,U)|0)+R+Th(z=z+I|0,I)|0;var K=B+x|0,V=N+P+Th(K,B)|0;u=h,y=g,h=a,g=m,a=s,m=p,s=o+H+Th(p=d+z|0,d)|0,o=n,d=c,n=i,c=l,i=r,l=f,r=H+V+Th(f=z+K|0,z)|0}this._al=this._al+f|0,this._bl=this._bl+l|0,this._cl=this._cl+c|0,this._dl=this._dl+d|0,this._el=this._el+p|0,this._fl=this._fl+m|0,this._gl=this._gl+g|0,this._hl=this._hl+y|0,this._ah=this._ah+r+Th(this._al,f)|0,this._bh=this._bh+i+Th(this._bl,l)|0,this._ch=this._ch+n+Th(this._cl,c)|0,this._dh=this._dh+o+Th(this._dl,d)|0,this._eh=this._eh+s+Th(this._el,p)|0,this._fh=this._fh+a+Th(this._fl,m)|0,this._gh=this._gh+h+Th(this._gl,g)|0,this._hh=this._hh+u+Th(this._hl,y)|0},vh.prototype._hash=function(){var t=gh.allocUnsafe(64);function e(e,r,i){t.writeInt32BE(e,i),t.writeInt32BE(r,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),e(this._gh,this._gl,48),e(this._hh,this._hl,56),t};var Ih=vh,Rh=Wn,Ch=Ih,Ph=Ia,xh=qn.Buffer,Nh=new Array(160);function Bh(){this.init(),this._w=Nh,Ph.call(this,128,112)}Rh(Bh,Ch),Bh.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},Bh.prototype._hash=function(){var t=xh.allocUnsafe(48);function e(e,r,i){t.writeInt32BE(e,i),t.writeInt32BE(r,i+4)}return e(this._ah,this._al,0),e(this._bh,this._bl,8),e(this._ch,this._cl,16),e(this._dh,this._dl,24),e(this._eh,this._el,32),e(this._fh,this._fl,40),t};var Lh=Bh,Dh=Aa.exports=function(t){t=t.toLowerCase();var e=Dh[t];if(!e)throw new Error(t+" is not supported (we accept pull requests)");return new e};function jh(){this.head=null,this.tail=null,this.length=0}Dh.sha=ja,Dh.sha1=Ya,Dh.sha224=dh,Dh.sha256=sh,Dh.sha384=Lh,Dh.sha512=Ih,jh.prototype.push=function(t){var e={data:t,next:null};this.length>0?this.tail.next=e:this.head=e,this.tail=e,++this.length},jh.prototype.unshift=function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length},jh.prototype.shift=function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}},jh.prototype.clear=function(){this.head=this.tail=null,this.length=0},jh.prototype.join=function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r},jh.prototype.concat=function(t){if(0===this.length)return Re.alloc(0);if(1===this.length)return this.head.data;for(var e=Re.allocUnsafe(t>>>0),r=this.head,i=0;r;)r.data.copy(e,i),i+=r.data.length,r=r.next;return e};var Uh=Re.isEncoding||function(t){switch(t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function qh(t){switch(this.encoding=(t||"utf8").toLowerCase().replace(/[-_]/,""),function(t){if(t&&!Uh(t))throw new Error("Unknown encoding: "+t)}(t),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=zh;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=Hh;break;default:return void(this.write=Fh)}this.charBuffer=new Re(6),this.charReceived=0,this.charLength=0}function Fh(t){return t.toString(this.encoding)}function zh(t){this.charReceived=t.length%2,this.charLength=this.charReceived?2:0}function Hh(t){this.charReceived=t.length%3,this.charLength=this.charReceived?3:0}qh.prototype.write=function(t){for(var e="";this.charLength;){var r=t.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:t.length;if(t.copy(this.charBuffer,this.charReceived,0,r),this.charReceived+=r,this.charReceived=55296&&n<=56319)){if(this.charReceived=this.charLength=0,0===t.length)return e;break}this.charLength+=this.surrogateSize,e=""}this.detectIncompleteChar(t);var i=t.length;this.charLength&&(t.copy(this.charBuffer,0,t.length-this.charReceived,i),i-=this.charReceived);var n;i=(e+=t.toString(this.encoding,0,i)).length-1;if((n=e.charCodeAt(i))>=55296&&n<=56319){var o=this.surrogateSize;return this.charLength+=o,this.charReceived+=o,this.charBuffer.copy(this.charBuffer,o,0,o),t.copy(this.charBuffer,0,0,o),e.substring(0,i)}return e},qh.prototype.detectIncompleteChar=function(t){for(var e=t.length>=3?3:t.length;e>0;e--){var r=t[t.length-e];if(1==e&&r>>5==6){this.charLength=2;break}if(e<=2&&r>>4==14){this.charLength=3;break}if(e<=3&&r>>3==30){this.charLength=4;break}}this.charReceived=e},qh.prototype.end=function(t){var e="";if(t&&t.length&&(e=this.write(t)),this.charReceived){var r=this.charReceived,i=this.charBuffer,n=this.encoding;e+=i.slice(0,r).toString(n)}return e};var Kh=Object.freeze({__proto__:null,StringDecoder:qh});Wh.ReadableState=Gh;var Vh=co("stream");function Gh(t,e){t=t||{},this.objectMode=!!t.objectMode,e instanceof _u&&(this.objectMode=this.objectMode||!!t.readableObjectMode);var r=t.highWaterMark,i=this.objectMode?16:16384;this.highWaterMark=r||0===r?r:i,this.highWaterMark=~~this.highWaterMark,this.buffer=new jh,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.ranOut=!1,this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(this.decoder=new qh(t.encoding),this.encoding=t.encoding)}function Wh(t){if(!(this instanceof Wh))return new Wh(t);this._readableState=new Gh(t,this),this.readable=!0,t&&"function"==typeof t.read&&(this._read=t.read),Jn.call(this)}function Yh(t,e,r,i,n){var o=function(t,e){var r=null;Re.isBuffer(e)||"string"==typeof e||null==e||t.objectMode||(r=new TypeError("Invalid non-string/buffer chunk"));return r}(e,r);if(o)t.emit("error",o);else if(null===r)e.reading=!1,function(t,e){if(e.ended)return;if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,Qh(t)}(t,e);else if(e.objectMode||r&&r.length>0)if(e.ended&&!n){var s=new Error("stream.push() after EOF");t.emit("error",s)}else if(e.endEmitted&&n){var a=new Error("stream.unshift() after end event");t.emit("error",a)}else{var h;!e.decoder||n||i||(r=e.decoder.write(r),h=!e.objectMode&&0===r.length),n||(e.reading=!1),h||(e.flowing&&0===e.length&&!e.sync?(t.emit("data",r),t.read(0)):(e.length+=e.objectMode?1:r.length,n?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Qh(t))),function(t,e){e.readingMore||(e.readingMore=!0,Mn($h,t,e))}(t,e)}else n||(e.reading=!1);return function(t){return!t.ended&&(t.needReadable||t.lengthe.highWaterMark&&(e.highWaterMark=function(t){return t>=Zh?t=Zh:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function Qh(t){var e=t._readableState;e.needReadable=!1,e.emittedReadable||(Vh("emitReadable",e.flowing),e.emittedReadable=!0,e.sync?Mn(Jh,t):Jh(t))}function Jh(t){Vh("emit readable"),t.emit("readable"),ru(t)}function $h(t,e){for(var r=e.length;!e.reading&&!e.flowing&&!e.ended&&e.length=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.head.data:e.buffer.concat(e.length),e.buffer.clear()):r=function(t,e,r){var i;to.length?o.length:t;if(s===o.length?n+=o:n+=o.slice(0,t),0===(t-=s)){s===o.length?(++i,r.next?e.head=r.next:e.head=e.tail=null):(e.head=r,r.data=o.slice(s));break}++i}return e.length-=i,n}(t,e):function(t,e){var r=Re.allocUnsafe(t),i=e.head,n=1;i.data.copy(r),t-=i.data.length;for(;i=i.next;){var o=i.data,s=t>o.length?o.length:t;if(o.copy(r,r.length-t,0,s),0===(t-=s)){s===o.length?(++n,i.next?e.head=i.next:e.head=e.tail=null):(e.head=i,i.data=o.slice(s));break}++n}return e.length-=n,r}(t,e);return i}(t,e.buffer,e.decoder),r);var r}function nu(t){var e=t._readableState;if(e.length>0)throw new Error('"endReadable()" called on non-empty stream');e.endEmitted||(e.ended=!0,Mn(ou,e,t))}function ou(t,e){t.endEmitted||0!==t.length||(t.endEmitted=!0,e.readable=!1,e.emit("end"))}function su(t,e){for(var r=0,i=t.length;r=e.highWaterMark||e.ended))return Vh("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?nu(this):Qh(this),null;if(0===(t=Xh(t,e))&&e.ended)return 0===e.length&&nu(this),null;var i,n=e.needReadable;return Vh("need readable",n),(0===e.length||e.length-t0?iu(t,e):null)?(e.needReadable=!0,t=0):e.length-=t,0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&nu(this)),null!==i&&this.emit("data",i),i},Wh.prototype._read=function(t){this.emit("error",new Error("not implemented"))},Wh.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t)}i.pipesCount+=1,Vh("pipe count=%d opts=%j",i.pipesCount,e);var n=!e||!1!==e.end?s:u;function o(t){Vh("onunpipe"),t===r&&u()}function s(){Vh("onend"),t.end()}i.endEmitted?Mn(n):r.once("end",n),t.on("unpipe",o);var a=function(t){return function(){var e=t._readableState;Vh("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&t.listeners("data").length&&(e.flowing=!0,ru(t))}}(r);t.on("drain",a);var h=!1;function u(){Vh("cleanup"),t.removeListener("close",d),t.removeListener("finish",p),t.removeListener("drain",a),t.removeListener("error",c),t.removeListener("unpipe",o),r.removeListener("end",s),r.removeListener("end",u),r.removeListener("data",l),h=!0,!i.awaitDrain||t._writableState&&!t._writableState.needDrain||a()}var f=!1;function l(e){Vh("ondata"),f=!1,!1!==t.write(e)||f||((1===i.pipesCount&&i.pipes===t||i.pipesCount>1&&-1!==su(i.pipes,t))&&!h&&(Vh("false write response, pause",r._readableState.awaitDrain),r._readableState.awaitDrain++,f=!0),r.pause())}function c(e){var r;Vh("onerror",e),m(),t.removeListener("error",c),0===(r="error",t.listeners(r).length)&&t.emit("error",e)}function d(){t.removeListener("finish",p),m()}function p(){Vh("onfinish"),t.removeListener("close",d),m()}function m(){Vh("unpipe"),r.unpipe(t)}return r.on("data",l),function(t,e,r){if("function"==typeof t.prependListener)return t.prependListener(e,r);t._events&&t._events[e]?Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]:t.on(e,r)}(t,"error",c),t.once("close",d),t.once("finish",p),t.emit("pipe",r),i.flowing||(Vh("pipe resume"),r.resume()),t},Wh.prototype.unpipe=function(t){var e=this._readableState;if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this)),this;if(!t){var r=e.pipes,i=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var n=0;n-1))throw new TypeError("Unknown encoding: "+t);return this._writableState.defaultEncoding=t,this},fu.prototype._write=function(t,e,r){r(new Error("not implemented"))},fu.prototype._writev=null,fu.prototype.end=function(t,e,r){var i=this._writableState;"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||i.finished||function(t,e,r){e.ending=!0,gu(t,e),r&&(e.finished?Mn(r):t.once("finish",r));e.ended=!0,t.writable=!1}(this,i,r)},so(_u,Wh);for(var bu=Object.keys(fu.prototype),vu=0;vuGu?e=t(e):e.lengthr)?e=("rmd160"===t?new ef:rf(t)).update(e).digest():e.lengthcf||e!=e)throw new TypeError("Bad key length")};if(Y.process&&Y.process.browser)ff="utf-8";else if(Y.process&&Y.process.version){ff=parseInt(Bn.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary"}else ff="utf-8";var pf=ff,mf=qn.Buffer,gf=function(t,e,r){if(mf.isBuffer(t))return t;if("string"==typeof t)return mf.from(t,e);if(ArrayBuffer.isView(t))return mf.from(t.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")},yf=Zu,bf=Ea,vf=ka,wf=qn.Buffer,_f=df,Mf=pf,Sf=gf,Ef=wf.alloc(128),kf={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function Af(t,e,r){var i=function(t){function e(e){return vf(t).update(e).digest()}function r(t){return(new bf).update(t).digest()}return"rmd160"===t||"ripemd160"===t?r:"md5"===t?yf:e}(t),n="sha512"===t||"sha384"===t?128:64;e.length>n?e=i(e):e.length>>0},writeUInt32BE:function(t,e,r){t[0+r]=e>>>24,t[1+r]=e>>>16&255,t[2+r]=e>>>8&255,t[3+r]=255&e},ip:function(t,e,r,i){for(var n=0,o=0,s=6;s>=0;s-=2){for(var a=0;a<=24;a+=8)n<<=1,n|=e>>>a+s&1;for(a=0;a<=24;a+=8)n<<=1,n|=t>>>a+s&1}for(s=6;s>=0;s-=2){for(a=1;a<=25;a+=8)o<<=1,o|=e>>>a+s&1;for(a=1;a<=25;a+=8)o<<=1,o|=t>>>a+s&1}r[i+0]=n>>>0,r[i+1]=o>>>0},rip:function(t,e,r,i){for(var n=0,o=0,s=0;s<4;s++)for(var a=24;a>=0;a-=8)n<<=1,n|=e>>>a+s&1,n<<=1,n|=t>>>a+s&1;for(s=4;s<8;s++)for(a=24;a>=0;a-=8)o<<=1,o|=e>>>a+s&1,o<<=1,o|=t>>>a+s&1;r[i+0]=n>>>0,r[i+1]=o>>>0},pc1:function(t,e,r,i){for(var n=0,o=0,s=7;s>=5;s--){for(var a=0;a<=24;a+=8)n<<=1,n|=e>>a+s&1;for(a=0;a<=24;a+=8)n<<=1,n|=t>>a+s&1}for(a=0;a<=24;a+=8)n<<=1,n|=e>>a+s&1;for(s=1;s<=3;s++){for(a=0;a<=24;a+=8)o<<=1,o|=e>>a+s&1;for(a=0;a<=24;a+=8)o<<=1,o|=t>>a+s&1}for(a=0;a<=24;a+=8)o<<=1,o|=t>>a+s&1;r[i+0]=n>>>0,r[i+1]=o>>>0},r28shl:function(t,e){return t<>>28-e}},Hf=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];zf.pc2=function(t,e,r,i){for(var n=0,o=0,s=Hf.length>>>1,a=0;a>>Hf[a]&1;for(a=s;a>>Hf[a]&1;r[i+0]=n>>>0,r[i+1]=o>>>0},zf.expand=function(t,e,r){var i=0,n=0;i=(1&t)<<5|t>>>27;for(var o=23;o>=15;o-=4)i<<=6,i|=t>>>o&63;for(o=11;o>=3;o-=4)n|=t>>>o&63,n<<=6;n|=(31&t)<<1|t>>>31,e[r+0]=i>>>0,e[r+1]=n>>>0};var Kf=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];zf.substitute=function(t,e){for(var r=0,i=0;i<4;i++){r<<=4,r|=Kf[64*i+(t>>>18-6*i&63)]}for(i=0;i<4;i++){r<<=4,r|=Kf[256+64*i+(e>>>18-6*i&63)]}return r>>>0};var Vf=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];zf.permute=function(t){for(var e=0,r=0;r>>Vf[r]&1;return e>>>0},zf.padSplit=function(t,e,r){for(var i=t.toString(2);i.length0;i--)e+=this._buffer(t,e),r+=this._flushBuffer(n,r);return e+=this._buffer(t,e),n},Zf.prototype.final=function(t){var e,r;return t&&(e=this.update(t)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),e?e.concat(r):r},Zf.prototype._pad=function(t,e){if(0===e)return!1;for(;e>>1];r=Jf.r28shl(r,o),i=Jf.r28shl(i,o),Jf.pc2(r,i,t.keys,n)}},el.prototype._update=function(t,e,r,i){var n=this._desState,o=Jf.readUInt32BE(t,e),s=Jf.readUInt32BE(t,e+4);Jf.ip(o,s,n.tmp,0),o=n.tmp[0],s=n.tmp[1],"encrypt"===this.type?this._encrypt(n,o,s,n.tmp,0):this._decrypt(n,o,s,n.tmp,0),o=n.tmp[0],s=n.tmp[1],Jf.writeUInt32BE(r,o,i),Jf.writeUInt32BE(r,s,i+4)},el.prototype._pad=function(t,e){if(!1===this.padding)return!1;for(var r=t.length-e,i=e;i>>0,o=l}Jf.rip(s,o,i,n)},el.prototype._decrypt=function(t,e,r,i,n){for(var o=r,s=e,a=t.keys.length-2;a>=0;a-=2){var h=t.keys[a],u=t.keys[a+1];Jf.expand(o,t.tmp,0),h^=t.tmp[0],u^=t.tmp[1];var f=Jf.substitute(h,u),l=o;o=(s^Jf.permute(f))>>>0,s=l}Jf.rip(o,s,i,n)};var nl={},ol=Gf,sl=Wn,al={};function hl(t){ol.equal(t.length,8,"Invalid IV length"),this.iv=new Array(8);for(var e=0;e>o%8,t._prev=jl(t._prev,r?i:n);return s}function jl(t,e){var r=t.length,i=-1,n=Ll.allocUnsafe(t.length);for(t=Ll.concat([t,Ll.from([e])]);++i>7;return n}Bl.encrypt=function(t,e,r){for(var i=e.length,n=Ll.allocUnsafe(i),o=-1;++o>>24]^f[p>>>16&255]^l[m>>>8&255]^c[255&g]^e[y++],s=u[p>>>24]^f[m>>>16&255]^l[g>>>8&255]^c[255&d]^e[y++],a=u[m>>>24]^f[g>>>16&255]^l[d>>>8&255]^c[255&p]^e[y++],h=u[g>>>24]^f[d>>>16&255]^l[p>>>8&255]^c[255&m]^e[y++],d=o,p=s,m=a,g=h;return o=(i[d>>>24]<<24|i[p>>>16&255]<<16|i[m>>>8&255]<<8|i[255&g])^e[y++],s=(i[p>>>24]<<24|i[m>>>16&255]<<16|i[g>>>8&255]<<8|i[255&d])^e[y++],a=(i[m>>>24]<<24|i[g>>>16&255]<<16|i[d>>>8&255]<<8|i[255&p])^e[y++],h=(i[g>>>24]<<24|i[d>>>16&255]<<16|i[p>>>8&255]<<8|i[255&m])^e[y++],[o>>>=0,s>>>=0,a>>>=0,h>>>=0]}var nc=[0,1,2,4,8,16,32,64,128,27,54],oc=function(){for(var t=new Array(256),e=0;e<256;e++)t[e]=e<128?e<<1:e<<1^283;for(var r=[],i=[],n=[[],[],[],[]],o=[[],[],[],[]],s=0,a=0,h=0;h<256;++h){var u=a^a<<1^a<<2^a<<3^a<<4;u=u>>>8^255&u^99,r[s]=u,i[u]=s;var f=t[s],l=t[f],c=t[l],d=257*t[u]^16843008*u;n[0][s]=d<<24|d>>>8,n[1][s]=d<<16|d>>>16,n[2][s]=d<<8|d>>>24,n[3][s]=d,d=16843009*c^65537*l^257*f^16843008*s,o[0][u]=d<<24|d>>>8,o[1][u]=d<<16|d>>>16,o[2][u]=d<<8|d>>>24,o[3][u]=d,0===s?s=a=1:(s=f^t[t[t[c^f]]],a^=t[t[a]])}return{SBOX:r,INV_SBOX:i,SUB_MIX:n,INV_SUB_MIX:o}}();function sc(t){this._key=ec(t),this._reset()}sc.blockSize=16,sc.keySize=32,sc.prototype.blockSize=sc.blockSize,sc.prototype.keySize=sc.keySize,sc.prototype._reset=function(){for(var t=this._key,e=t.length,r=e+6,i=4*(r+1),n=[],o=0;o>>24,s=oc.SBOX[s>>>24]<<24|oc.SBOX[s>>>16&255]<<16|oc.SBOX[s>>>8&255]<<8|oc.SBOX[255&s],s^=nc[o/e|0]<<24):e>6&&o%e==4&&(s=oc.SBOX[s>>>24]<<24|oc.SBOX[s>>>16&255]<<16|oc.SBOX[s>>>8&255]<<8|oc.SBOX[255&s]),n[o]=n[o-e]^s}for(var a=[],h=0;h>>24]]^oc.INV_SUB_MIX[1][oc.SBOX[f>>>16&255]]^oc.INV_SUB_MIX[2][oc.SBOX[f>>>8&255]]^oc.INV_SUB_MIX[3][oc.SBOX[255&f]]}this._nRounds=r,this._keySchedule=n,this._invKeySchedule=a},sc.prototype.encryptBlockRaw=function(t){return ic(t=ec(t),this._keySchedule,oc.SUB_MIX,oc.SBOX,this._nRounds)},sc.prototype.encryptBlock=function(t){var e=this.encryptBlockRaw(t),r=tc.allocUnsafe(16);return r.writeUInt32BE(e[0],0),r.writeUInt32BE(e[1],4),r.writeUInt32BE(e[2],8),r.writeUInt32BE(e[3],12),r},sc.prototype.decryptBlock=function(t){var e=(t=ec(t))[1];t[1]=t[3],t[3]=e;var r=ic(t,this._invKeySchedule,oc.INV_SUB_MIX,oc.INV_SBOX,this._nRounds),i=tc.allocUnsafe(16);return i.writeUInt32BE(r[0],0),i.writeUInt32BE(r[3],4),i.writeUInt32BE(r[2],8),i.writeUInt32BE(r[1],12),i},sc.prototype.scrub=function(){rc(this._keySchedule),rc(this._invKeySchedule),rc(this._key)},$l.AES=sc;var ac=qn.Buffer,hc=ac.alloc(16,0);function uc(t){var e=ac.allocUnsafe(16);return e.writeUInt32BE(t[0]>>>0,0),e.writeUInt32BE(t[1]>>>0,4),e.writeUInt32BE(t[2]>>>0,8),e.writeUInt32BE(t[3]>>>0,12),e}function fc(t){this.h=t,this.state=ac.alloc(16,0),this.cache=ac.allocUnsafe(0)}fc.prototype.ghash=function(t){for(var e=-1;++e0;e--)i[e]=i[e]>>>1|(1&i[e-1])<<31;i[0]=i[0]>>>1,r&&(i[0]=i[0]^225<<24)}this.state=uc(n)},fc.prototype.update=function(t){var e;for(this.cache=ac.concat([this.cache,t]);this.cache.length>=16;)e=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(e)},fc.prototype.final=function(t,e){return this.cache.length&&this.ghash(ac.concat([this.cache,hc],16)),this.ghash(uc([0,t,0,e])),this.state};var lc=fc,cc=$l,dc=qn.Buffer,pc=Bu,mc=lc,gc=Al,yc=Hl;function bc(t,e,r,i){pc.call(this);var n=dc.alloc(4,0);this._cipher=new cc.AES(e);var o=this._cipher.encryptBlock(n);this._ghash=new mc(o),r=function(t,e,r){if(12===e.length)return t._finID=dc.concat([e,dc.from([0,0,0,1])]),dc.concat([e,dc.from([0,0,0,2])]);var i=new mc(r),n=e.length,o=n%16;i.update(e),o&&(o=16-o,i.update(dc.alloc(o,0))),i.update(dc.alloc(8,0));var s=8*n,a=dc.alloc(8);a.writeUIntBE(s,0,8),i.update(a),t._finID=i.state;var h=dc.from(t._finID);return yc(h),h}(this,r,o),this._prev=dc.from(r),this._cache=dc.allocUnsafe(0),this._secCache=dc.allocUnsafe(0),this._decrypt=i,this._alen=0,this._len=0,this._mode=t,this._authTag=null,this._called=!1}Wn(bc,pc),bc.prototype._update=function(t){if(!this._called&&this._alen){var e=16-this._alen%16;e<16&&(e=dc.alloc(e,0),this._ghash.update(e))}this._called=!0;var r=this._mode.encrypt(this,t);return this._decrypt?this._ghash.update(t):this._ghash.update(r),this._len+=t.length,r},bc.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var t=gc(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(t,e){var r=0;t.length!==e.length&&r++;for(var i=Math.min(t.length,e.length),n=0;n0||i>0;){var h=new Ac;h.update(a),h.update(t),e&&h.update(e),a=h.digest();var u=0;if(n>0){var f=o.length-n;u=Math.min(n,a.length),a.copy(o,f,0,u),n-=u}if(u0){var l=s.length-i,c=Math.min(i,a.length-u);a.copy(s,l,u,u+c),i-=c}}return a.fill(0),{key:o,iv:s}},Tc=Jl,Ic=vc,Rc=qn.Buffer,Cc=Ec,Pc=Bu,xc=$l,Nc=Oc;function Bc(t,e,r){Pc.call(this),this._cache=new Dc,this._cipher=new xc.AES(e),this._prev=Rc.from(r),this._mode=t,this._autopadding=!0}Wn(Bc,Pc),Bc.prototype._update=function(t){var e,r;this._cache.add(t);for(var i=[];e=this._cache.get();)r=this._mode.encrypt(this,e),i.push(r);return Rc.concat(i)};var Lc=Rc.alloc(16,16);function Dc(){this.cache=Rc.allocUnsafe(0)}function jc(t,e,r){var i=Tc[t.toLowerCase()];if(!i)throw new TypeError("invalid suite type");if("string"==typeof e&&(e=Rc.from(e)),e.length!==i.key/8)throw new TypeError("invalid key length "+e.length);if("string"==typeof r&&(r=Rc.from(r)),"GCM"!==i.mode&&r.length!==i.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===i.type?new Cc(i.module,e,r):"auth"===i.type?new Ic(i.module,e,r):new Bc(i.module,e,r)}Bc.prototype._final=function(){var t=this._cache.flush();if(this._autopadding)return t=this._mode.encrypt(this,t),this._cipher.scrub(),t;if(!t.equals(Lc))throw this._cipher.scrub(),new Error("data not multiple of block length")},Bc.prototype.setAutoPadding=function(t){return this._autopadding=!!t,this},Dc.prototype.add=function(t){this.cache=Rc.concat([this.cache,t])},Dc.prototype.get=function(){if(this.cache.length>15){var t=this.cache.slice(0,16);return this.cache=this.cache.slice(16),t}return null},Dc.prototype.flush=function(){for(var t=16-this.cache.length,e=Rc.allocUnsafe(t),r=-1;++r16)throw new Error("unable to decrypt data");var r=-1;for(;++r16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e}else if(this.cache.length>=16)return e=this.cache.slice(0,16),this.cache=this.cache.slice(16),e;return null},Yc.prototype.flush=function(){if(this.cache.length)return this.cache},Uc.createDecipher=function(t,e){var r=zc[t.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=Gc(e,!1,r.key,r.iv);return Zc(t,i.key,i.iv)},Uc.createDecipheriv=Zc;var Xc=Sl,Qc=Uc,Jc=Yl;Ml.createCipher=Ml.Cipher=Xc.createCipher,Ml.createCipheriv=Ml.Cipheriv=Xc.createCipheriv,Ml.createDecipher=Ml.Decipher=Qc.createDecipher,Ml.createDecipheriv=Ml.Decipheriv=Qc.createDecipheriv,Ml.listCiphers=Ml.getCiphers=function(){return Object.keys(Jc)};var $c={};!function(t){t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}}($c);var td=wl,ed=Ml,rd=Jl,id=$c,nd=Oc;function od(t,e,r){if(t=t.toLowerCase(),rd[t])return ed.createCipheriv(t,e,r);if(id[t])return new td({key:e,iv:r,mode:t});throw new TypeError("invalid suite type")}function sd(t,e,r){if(t=t.toLowerCase(),rd[t])return ed.createDecipheriv(t,e,r);if(id[t])return new td({key:e,iv:r,mode:t,decrypt:!0});throw new TypeError("invalid suite type")}qf.createCipher=qf.Cipher=function(t,e){var r,i;if(t=t.toLowerCase(),rd[t])r=rd[t].key,i=rd[t].iv;else{if(!id[t])throw new TypeError("invalid suite type");r=8*id[t].key,i=id[t].iv}var n=nd(e,!1,r,i);return od(t,n.key,n.iv)},qf.createCipheriv=qf.Cipheriv=od,qf.createDecipher=qf.Decipher=function(t,e){var r,i;if(t=t.toLowerCase(),rd[t])r=rd[t].key,i=rd[t].iv;else{if(!id[t])throw new TypeError("invalid suite type");r=8*id[t].key,i=id[t].iv}var n=nd(e,!1,r,i);return sd(t,n.key,n.iv)},qf.createDecipheriv=qf.Decipheriv=sd,qf.listCiphers=qf.getCiphers=function(){return Object.keys(id).concat(ed.getCiphers())};var ad={},hd={},ud={get exports(){return hd},set exports(t){hd=t}};!function(t,e){function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function n(t,e,r){if(n.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var o;"object"==typeof t?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:zn.Buffer}catch(t){}function s(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function a(t,e,r){var i=s(t,r);return r-1>=e&&(i|=s(t,r-1)<<4),i}function h(t,e,r,i){for(var n=0,o=Math.min(t.length,r),s=e;s=49?a-49+10:a>=17?a-17+10:a}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,i){if("number"==typeof t)return this._initNumber(t,e,i);if("object"==typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===i)for(n=0,o=0;n>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i=e;i-=2)n=a(t,e,i)<=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(t.length-e)%2==0?e+1:e;i=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var o=t.length-r,s=o%i,a=Math.min(o,o-s)+r,u=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function c(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,a=67108863&s,h=s/67108864|0;r.words[0]=a;for(var u=1;u>>26,l=67108863&h,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[u]=0|l,h=0|f}return 0!==h?r.words[u]=0|h:r.length--,r.strip()}n.prototype.toString=function(t,e){var i;if(e=0|e||1,16===(t=t||10)||"hex"===t){i="";for(var n=0,o=0,s=0;s>>24-n&16777215)||s!==this.length-1?u[6-h.length]+h+i:h+i,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(i=o.toString(16)+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var c=f[t],d=l[t];i="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);i=(p=p.idivn(d)).isZero()?m+i:u[c-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return r(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,i){var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,h="le"===e,u=new t(o),f=this.clone();if(h){for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),u[a]=s;for(;a=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},n.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;it.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var i=t/26|0,n=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<t.length?(r=this,i=t):(r=t,i=this);for(var n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},n.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,M=0|s[4],S=8191&M,E=M>>>13,k=0|s[5],A=8191&k,O=k>>>13,T=0|s[6],I=8191&T,R=T>>>13,C=0|s[7],P=8191&C,x=C>>>13,N=0|s[8],B=8191&N,L=N>>>13,D=0|s[9],j=8191&D,U=D>>>13,q=0|a[0],F=8191&q,z=q>>>13,H=0|a[1],K=8191&H,V=H>>>13,G=0|a[2],W=8191&G,Y=G>>>13,Z=0|a[3],X=8191&Z,Q=Z>>>13,J=0|a[4],$=8191&J,tt=J>>>13,et=0|a[5],rt=8191&et,it=et>>>13,nt=0|a[6],ot=8191&nt,st=nt>>>13,at=0|a[7],ht=8191&at,ut=at>>>13,ft=0|a[8],lt=8191&ft,ct=ft>>>13,dt=0|a[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(i=Math.imul(l,F))|0)+((8191&(n=(n=Math.imul(l,z))+Math.imul(c,F)|0))<<13)|0;u=((o=Math.imul(c,z))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,F),n=(n=Math.imul(p,z))+Math.imul(m,F)|0,o=Math.imul(m,z);var yt=(u+(i=i+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,V)|0)+Math.imul(c,K)|0))<<13)|0;u=((o=o+Math.imul(c,V)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(y,F),n=(n=Math.imul(y,z))+Math.imul(b,F)|0,o=Math.imul(b,z),i=i+Math.imul(p,K)|0,n=(n=n+Math.imul(p,V)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,V)|0;var bt=(u+(i=i+Math.imul(l,W)|0)|0)+((8191&(n=(n=n+Math.imul(l,Y)|0)+Math.imul(c,W)|0))<<13)|0;u=((o=o+Math.imul(c,Y)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(w,F),n=(n=Math.imul(w,z))+Math.imul(_,F)|0,o=Math.imul(_,z),i=i+Math.imul(y,K)|0,n=(n=n+Math.imul(y,V)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,V)|0,i=i+Math.imul(p,W)|0,n=(n=n+Math.imul(p,Y)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,Y)|0;var vt=(u+(i=i+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(c,X)|0))<<13)|0;u=((o=o+Math.imul(c,Q)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(S,F),n=(n=Math.imul(S,z))+Math.imul(E,F)|0,o=Math.imul(E,z),i=i+Math.imul(w,K)|0,n=(n=n+Math.imul(w,V)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,V)|0,i=i+Math.imul(y,W)|0,n=(n=n+Math.imul(y,Y)|0)+Math.imul(b,W)|0,o=o+Math.imul(b,Y)|0,i=i+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(i=i+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0))<<13)|0;u=((o=o+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(A,F),n=(n=Math.imul(A,z))+Math.imul(O,F)|0,o=Math.imul(O,z),i=i+Math.imul(S,K)|0,n=(n=n+Math.imul(S,V)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,V)|0,i=i+Math.imul(w,W)|0,n=(n=n+Math.imul(w,Y)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Y)|0,i=i+Math.imul(y,X)|0,n=(n=n+Math.imul(y,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var _t=(u+(i=i+Math.imul(l,rt)|0)|0)+((8191&(n=(n=n+Math.imul(l,it)|0)+Math.imul(c,rt)|0))<<13)|0;u=((o=o+Math.imul(c,it)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(I,F),n=(n=Math.imul(I,z))+Math.imul(R,F)|0,o=Math.imul(R,z),i=i+Math.imul(A,K)|0,n=(n=n+Math.imul(A,V)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,V)|0,i=i+Math.imul(S,W)|0,n=(n=n+Math.imul(S,Y)|0)+Math.imul(E,W)|0,o=o+Math.imul(E,Y)|0,i=i+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,Q)|0,i=i+Math.imul(y,$)|0,n=(n=n+Math.imul(y,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,it)|0;var Mt=(u+(i=i+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,ot)|0))<<13)|0;u=((o=o+Math.imul(c,st)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(P,F),n=(n=Math.imul(P,z))+Math.imul(x,F)|0,o=Math.imul(x,z),i=i+Math.imul(I,K)|0,n=(n=n+Math.imul(I,V)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,V)|0,i=i+Math.imul(A,W)|0,n=(n=n+Math.imul(A,Y)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,Y)|0,i=i+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,i=i+Math.imul(y,rt)|0,n=(n=n+Math.imul(y,it)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,it)|0,i=i+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(i=i+Math.imul(l,ht)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,ht)|0))<<13)|0;u=((o=o+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(B,F),n=(n=Math.imul(B,z))+Math.imul(L,F)|0,o=Math.imul(L,z),i=i+Math.imul(P,K)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,V)|0,i=i+Math.imul(I,W)|0,n=(n=n+Math.imul(I,Y)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,Y)|0,i=i+Math.imul(A,X)|0,n=(n=n+Math.imul(A,Q)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,Q)|0,i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,it)|0,i=i+Math.imul(y,ot)|0,n=(n=n+Math.imul(y,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,i=i+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(i=i+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((o=o+Math.imul(c,ct)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(j,F),n=(n=Math.imul(j,z))+Math.imul(U,F)|0,o=Math.imul(U,z),i=i+Math.imul(B,K)|0,n=(n=n+Math.imul(B,V)|0)+Math.imul(L,K)|0,o=o+Math.imul(L,V)|0,i=i+Math.imul(P,W)|0,n=(n=n+Math.imul(P,Y)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,Y)|0,i=i+Math.imul(I,X)|0,n=(n=n+Math.imul(I,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,tt)|0,i=i+Math.imul(S,rt)|0,n=(n=n+Math.imul(S,it)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,it)|0,i=i+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,i=i+Math.imul(y,ht)|0,n=(n=n+Math.imul(y,ut)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,ut)|0,i=i+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ct)|0;var kt=(u+(i=i+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((o=o+Math.imul(c,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(j,K),n=(n=Math.imul(j,V))+Math.imul(U,K)|0,o=Math.imul(U,V),i=i+Math.imul(B,W)|0,n=(n=n+Math.imul(B,Y)|0)+Math.imul(L,W)|0,o=o+Math.imul(L,Y)|0,i=i+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,Q)|0,i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,it)|0,i=i+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,i=i+Math.imul(w,ht)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,ut)|0,i=i+Math.imul(y,lt)|0,n=(n=n+Math.imul(y,ct)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,ct)|0;var At=(u+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(j,W),n=(n=Math.imul(j,Y))+Math.imul(U,W)|0,o=Math.imul(U,Y),i=i+Math.imul(B,X)|0,n=(n=n+Math.imul(B,Q)|0)+Math.imul(L,X)|0,o=o+Math.imul(L,Q)|0,i=i+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,tt)|0,i=i+Math.imul(I,rt)|0,n=(n=n+Math.imul(I,it)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,it)|0,i=i+Math.imul(A,ot)|0,n=(n=n+Math.imul(A,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,i=i+Math.imul(S,ht)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,ht)|0,o=o+Math.imul(E,ut)|0,i=i+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ct)|0;var Ot=(u+(i=i+Math.imul(y,pt)|0)|0)+((8191&(n=(n=n+Math.imul(y,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,i=Math.imul(j,X),n=(n=Math.imul(j,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),i=i+Math.imul(B,$)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,tt)|0,i=i+Math.imul(P,rt)|0,n=(n=n+Math.imul(P,it)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,it)|0,i=i+Math.imul(I,ot)|0,n=(n=n+Math.imul(I,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,i=i+Math.imul(A,ht)|0,n=(n=n+Math.imul(A,ut)|0)+Math.imul(O,ht)|0,o=o+Math.imul(O,ut)|0,i=i+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ct)|0;var Tt=(u+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;u=((o=o+Math.imul(_,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(j,$),n=(n=Math.imul(j,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),i=i+Math.imul(B,rt)|0,n=(n=n+Math.imul(B,it)|0)+Math.imul(L,rt)|0,o=o+Math.imul(L,it)|0,i=i+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,i=i+Math.imul(I,ht)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(R,ht)|0,o=o+Math.imul(R,ut)|0,i=i+Math.imul(A,lt)|0,n=(n=n+Math.imul(A,ct)|0)+Math.imul(O,lt)|0,o=o+Math.imul(O,ct)|0;var It=(u+(i=i+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(j,rt),n=(n=Math.imul(j,it))+Math.imul(U,rt)|0,o=Math.imul(U,it),i=i+Math.imul(B,ot)|0,n=(n=n+Math.imul(B,st)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,st)|0,i=i+Math.imul(P,ht)|0,n=(n=n+Math.imul(P,ut)|0)+Math.imul(x,ht)|0,o=o+Math.imul(x,ut)|0,i=i+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,ct)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,ct)|0;var Rt=(u+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(O,pt)|0))<<13)|0;u=((o=o+Math.imul(O,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,i=Math.imul(j,ot),n=(n=Math.imul(j,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),i=i+Math.imul(B,ht)|0,n=(n=n+Math.imul(B,ut)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,ut)|0,i=i+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,ct)|0)+Math.imul(x,lt)|0,o=o+Math.imul(x,ct)|0;var Ct=(u+(i=i+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(j,ht),n=(n=Math.imul(j,ut))+Math.imul(U,ht)|0,o=Math.imul(U,ut),i=i+Math.imul(B,lt)|0,n=(n=n+Math.imul(B,ct)|0)+Math.imul(L,lt)|0,o=o+Math.imul(L,ct)|0;var Pt=(u+(i=i+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(x,pt)|0))<<13)|0;u=((o=o+Math.imul(x,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(j,lt),n=(n=Math.imul(j,ct))+Math.imul(U,lt)|0,o=Math.imul(U,ct);var xt=(u+(i=i+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((o=o+Math.imul(L,mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863;var Nt=(u+(i=Math.imul(j,pt))|0)+((8191&(n=(n=Math.imul(j,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,h[0]=gt,h[1]=yt,h[2]=bt,h[3]=vt,h[4]=wt,h[5]=_t,h[6]=Mt,h[7]=St,h[8]=Et,h[9]=kt,h[10]=At,h[11]=Ot,h[12]=Tt,h[13]=It,h[14]=Rt,h[15]=Ct,h[16]=Pt,h[17]=xt,h[18]=Nt,0!==u&&(h[19]=u,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=c),n.prototype.mulTo=function(t,e){var r,i=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):i<63?c(this,t,e):i<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,i=s,s=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,t,e):p(this,t,e),r},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=n.prototype._countBits(t)-1,i=0;i>=1;return i},m.prototype.permute=function(t,e,r,i,n,o){for(var s=0;s>>=1)n++;return 1<>>=13,i[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,e+=n/67108864|0,e+=o>>>26,this.words[i]=67108863&o}return 0!==e&&(this.words[i]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>n}return e}(t);if(0===e.length)return new n(1);for(var r=this,i=0;i=0);var e,i=t%26,n=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(e=0;e>>26-i}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,u=0;u=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&a}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,i){return r(0===this.negative),this.iushrn(t,e,i)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26,n=1<=0);var e=t%26,i=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==e&&i++,this.length=Math.min(i,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(h/67108864|0),this.words[n+i]=67108863&o}for(;n>26,this.words[n+i]=67108863&o;if(0===a)return this.strip();for(r(-1===a),a=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),o=t,s=0|o.words[o.length-1];0!=(r=26-this._countBits(s))&&(o=o.ushln(r),i.iushln(r),s=0|o.words[o.length-1]);var a,h=i.length-o.length;if("mod"!==e){(a=new n(null)).length=h+1,a.words=new Array(a.length);for(var u=0;u=0;l--){var c=67108864*(0|i.words[o.length+l])+(0|i.words[o.length+l-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(o,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(o,1,l),i.isZero()||(i.negative^=1);a&&(a.words[l]=c)}return a&&a.strip(),i.strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:a||null,mod:i}},n.prototype.divmod=function(t,e,i){return r(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(o=a.div.neg()),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(o=a.div.neg()),{div:o,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,a},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,i=0,n=this.length-1;n>=0;n--)i=(e*i+(0|this.words[n]))%t;return i},n.prototype.idivn=function(t){r(t<=67108863);for(var e=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*e;this.words[i]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),a=new n(0),h=new n(1),u=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++u;for(var f=i.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;0==(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(a.isOdd()||h.isOdd())&&(a.iadd(f),h.isub(l)),a.iushrn(1),h.iushrn(1);e.cmp(i)>=0?(e.isub(i),o.isub(a),s.isub(h)):(i.isub(e),a.isub(o),h.isub(s))}return{a:a,b:h,gcd:i.iushln(u)}},n.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),a=new n(0),h=i.clone();e.cmpn(1)>0&&i.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);for(var l=0,c=1;0==(i.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(i.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(h),a.iushrn(1);e.cmp(i)>=0?(e.isub(i),s.isub(a)):(i.isub(e),a.isub(s))}return(o=0===e.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var o=e;e=r,r=o}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,i=(t-e)/26,n=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,i=t<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)e=1;else{i&&(t=-t),r(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:nt.length)return 1;if(this.length=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){in&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new M(t)},n.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},i(b,y),b.prototype.split=function(t,e){for(var r=4194303,i=Math.min(t.length,9),n=0;n>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new v;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},M.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var i=this.m.add(new n(1)).iushrn(2);return this.pow(t,i)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);r(!o.isZero());var a=new n(1).toRed(this),h=a.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(h);)f.redIAdd(h);for(var l=this.pow(f,o),c=this.pow(t,o.addn(1).iushrn(1)),d=this.pow(t,o),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g=0;i--){for(var u=e.words[i],f=h-1;f>=0;f--){var l=u>>f&1;o!==r[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++a||0===i&&0===f)&&(o=this.mul(o,r[s]),a=0,s=0)):a=0}h=26}return o},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},i(S,M),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(ud,Y);var fd={},ld={get exports(){return fd},set exports(t){fd=t}};!function(t,e){function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function n(t,e,r){if(n.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var o;"object"==typeof t?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:zn.Buffer}catch(t){}function s(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function a(t,e,r){var i=s(t,r);return r-1>=e&&(i|=s(t,r-1)<<4),i}function h(t,e,r,i){for(var n=0,o=Math.min(t.length,r),s=e;s=49?a-49+10:a>=17?a-17+10:a}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,i){if("number"==typeof t)return this._initNumber(t,e,i);if("object"==typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===i)for(n=0,o=0;n>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i=e;i-=2)n=a(t,e,i)<=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(t.length-e)%2==0?e+1:e;i=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var o=t.length-r,s=o%i,a=Math.min(o,o-s)+r,u=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function c(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,a=67108863&s,h=s/67108864|0;r.words[0]=a;for(var u=1;u>>26,l=67108863&h,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[u]=0|l,h=0|f}return 0!==h?r.words[u]=0|h:r.length--,r.strip()}n.prototype.toString=function(t,e){var i;if(e=0|e||1,16===(t=t||10)||"hex"===t){i="";for(var n=0,o=0,s=0;s>>24-n&16777215)||s!==this.length-1?u[6-h.length]+h+i:h+i,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(i=o.toString(16)+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var c=f[t],d=l[t];i="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);i=(p=p.idivn(d)).isZero()?m+i:u[c-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return r(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,i){var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,h="le"===e,u=new t(o),f=this.clone();if(h){for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),u[a]=s;for(;a=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},n.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;it.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var i=t/26|0,n=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<t.length?(r=this,i=t):(r=t,i=this);for(var n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},n.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,M=0|s[4],S=8191&M,E=M>>>13,k=0|s[5],A=8191&k,O=k>>>13,T=0|s[6],I=8191&T,R=T>>>13,C=0|s[7],P=8191&C,x=C>>>13,N=0|s[8],B=8191&N,L=N>>>13,D=0|s[9],j=8191&D,U=D>>>13,q=0|a[0],F=8191&q,z=q>>>13,H=0|a[1],K=8191&H,V=H>>>13,G=0|a[2],W=8191&G,Y=G>>>13,Z=0|a[3],X=8191&Z,Q=Z>>>13,J=0|a[4],$=8191&J,tt=J>>>13,et=0|a[5],rt=8191&et,it=et>>>13,nt=0|a[6],ot=8191&nt,st=nt>>>13,at=0|a[7],ht=8191&at,ut=at>>>13,ft=0|a[8],lt=8191&ft,ct=ft>>>13,dt=0|a[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(i=Math.imul(l,F))|0)+((8191&(n=(n=Math.imul(l,z))+Math.imul(c,F)|0))<<13)|0;u=((o=Math.imul(c,z))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,F),n=(n=Math.imul(p,z))+Math.imul(m,F)|0,o=Math.imul(m,z);var yt=(u+(i=i+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,V)|0)+Math.imul(c,K)|0))<<13)|0;u=((o=o+Math.imul(c,V)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(y,F),n=(n=Math.imul(y,z))+Math.imul(b,F)|0,o=Math.imul(b,z),i=i+Math.imul(p,K)|0,n=(n=n+Math.imul(p,V)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,V)|0;var bt=(u+(i=i+Math.imul(l,W)|0)|0)+((8191&(n=(n=n+Math.imul(l,Y)|0)+Math.imul(c,W)|0))<<13)|0;u=((o=o+Math.imul(c,Y)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(w,F),n=(n=Math.imul(w,z))+Math.imul(_,F)|0,o=Math.imul(_,z),i=i+Math.imul(y,K)|0,n=(n=n+Math.imul(y,V)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,V)|0,i=i+Math.imul(p,W)|0,n=(n=n+Math.imul(p,Y)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,Y)|0;var vt=(u+(i=i+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(c,X)|0))<<13)|0;u=((o=o+Math.imul(c,Q)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(S,F),n=(n=Math.imul(S,z))+Math.imul(E,F)|0,o=Math.imul(E,z),i=i+Math.imul(w,K)|0,n=(n=n+Math.imul(w,V)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,V)|0,i=i+Math.imul(y,W)|0,n=(n=n+Math.imul(y,Y)|0)+Math.imul(b,W)|0,o=o+Math.imul(b,Y)|0,i=i+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(i=i+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0))<<13)|0;u=((o=o+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(A,F),n=(n=Math.imul(A,z))+Math.imul(O,F)|0,o=Math.imul(O,z),i=i+Math.imul(S,K)|0,n=(n=n+Math.imul(S,V)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,V)|0,i=i+Math.imul(w,W)|0,n=(n=n+Math.imul(w,Y)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Y)|0,i=i+Math.imul(y,X)|0,n=(n=n+Math.imul(y,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var _t=(u+(i=i+Math.imul(l,rt)|0)|0)+((8191&(n=(n=n+Math.imul(l,it)|0)+Math.imul(c,rt)|0))<<13)|0;u=((o=o+Math.imul(c,it)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(I,F),n=(n=Math.imul(I,z))+Math.imul(R,F)|0,o=Math.imul(R,z),i=i+Math.imul(A,K)|0,n=(n=n+Math.imul(A,V)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,V)|0,i=i+Math.imul(S,W)|0,n=(n=n+Math.imul(S,Y)|0)+Math.imul(E,W)|0,o=o+Math.imul(E,Y)|0,i=i+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,Q)|0,i=i+Math.imul(y,$)|0,n=(n=n+Math.imul(y,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,it)|0;var Mt=(u+(i=i+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,ot)|0))<<13)|0;u=((o=o+Math.imul(c,st)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(P,F),n=(n=Math.imul(P,z))+Math.imul(x,F)|0,o=Math.imul(x,z),i=i+Math.imul(I,K)|0,n=(n=n+Math.imul(I,V)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,V)|0,i=i+Math.imul(A,W)|0,n=(n=n+Math.imul(A,Y)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,Y)|0,i=i+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,i=i+Math.imul(y,rt)|0,n=(n=n+Math.imul(y,it)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,it)|0,i=i+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(i=i+Math.imul(l,ht)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,ht)|0))<<13)|0;u=((o=o+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(B,F),n=(n=Math.imul(B,z))+Math.imul(L,F)|0,o=Math.imul(L,z),i=i+Math.imul(P,K)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,V)|0,i=i+Math.imul(I,W)|0,n=(n=n+Math.imul(I,Y)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,Y)|0,i=i+Math.imul(A,X)|0,n=(n=n+Math.imul(A,Q)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,Q)|0,i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,it)|0,i=i+Math.imul(y,ot)|0,n=(n=n+Math.imul(y,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,i=i+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(i=i+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((o=o+Math.imul(c,ct)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(j,F),n=(n=Math.imul(j,z))+Math.imul(U,F)|0,o=Math.imul(U,z),i=i+Math.imul(B,K)|0,n=(n=n+Math.imul(B,V)|0)+Math.imul(L,K)|0,o=o+Math.imul(L,V)|0,i=i+Math.imul(P,W)|0,n=(n=n+Math.imul(P,Y)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,Y)|0,i=i+Math.imul(I,X)|0,n=(n=n+Math.imul(I,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,tt)|0,i=i+Math.imul(S,rt)|0,n=(n=n+Math.imul(S,it)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,it)|0,i=i+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,i=i+Math.imul(y,ht)|0,n=(n=n+Math.imul(y,ut)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,ut)|0,i=i+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ct)|0;var kt=(u+(i=i+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((o=o+Math.imul(c,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(j,K),n=(n=Math.imul(j,V))+Math.imul(U,K)|0,o=Math.imul(U,V),i=i+Math.imul(B,W)|0,n=(n=n+Math.imul(B,Y)|0)+Math.imul(L,W)|0,o=o+Math.imul(L,Y)|0,i=i+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,Q)|0,i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,it)|0,i=i+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,i=i+Math.imul(w,ht)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,ut)|0,i=i+Math.imul(y,lt)|0,n=(n=n+Math.imul(y,ct)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,ct)|0;var At=(u+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(j,W),n=(n=Math.imul(j,Y))+Math.imul(U,W)|0,o=Math.imul(U,Y),i=i+Math.imul(B,X)|0,n=(n=n+Math.imul(B,Q)|0)+Math.imul(L,X)|0,o=o+Math.imul(L,Q)|0,i=i+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,tt)|0,i=i+Math.imul(I,rt)|0,n=(n=n+Math.imul(I,it)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,it)|0,i=i+Math.imul(A,ot)|0,n=(n=n+Math.imul(A,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,i=i+Math.imul(S,ht)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,ht)|0,o=o+Math.imul(E,ut)|0,i=i+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ct)|0;var Ot=(u+(i=i+Math.imul(y,pt)|0)|0)+((8191&(n=(n=n+Math.imul(y,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,i=Math.imul(j,X),n=(n=Math.imul(j,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),i=i+Math.imul(B,$)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,tt)|0,i=i+Math.imul(P,rt)|0,n=(n=n+Math.imul(P,it)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,it)|0,i=i+Math.imul(I,ot)|0,n=(n=n+Math.imul(I,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,i=i+Math.imul(A,ht)|0,n=(n=n+Math.imul(A,ut)|0)+Math.imul(O,ht)|0,o=o+Math.imul(O,ut)|0,i=i+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ct)|0;var Tt=(u+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;u=((o=o+Math.imul(_,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(j,$),n=(n=Math.imul(j,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),i=i+Math.imul(B,rt)|0,n=(n=n+Math.imul(B,it)|0)+Math.imul(L,rt)|0,o=o+Math.imul(L,it)|0,i=i+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,i=i+Math.imul(I,ht)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(R,ht)|0,o=o+Math.imul(R,ut)|0,i=i+Math.imul(A,lt)|0,n=(n=n+Math.imul(A,ct)|0)+Math.imul(O,lt)|0,o=o+Math.imul(O,ct)|0;var It=(u+(i=i+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(j,rt),n=(n=Math.imul(j,it))+Math.imul(U,rt)|0,o=Math.imul(U,it),i=i+Math.imul(B,ot)|0,n=(n=n+Math.imul(B,st)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,st)|0,i=i+Math.imul(P,ht)|0,n=(n=n+Math.imul(P,ut)|0)+Math.imul(x,ht)|0,o=o+Math.imul(x,ut)|0,i=i+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,ct)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,ct)|0;var Rt=(u+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(O,pt)|0))<<13)|0;u=((o=o+Math.imul(O,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,i=Math.imul(j,ot),n=(n=Math.imul(j,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),i=i+Math.imul(B,ht)|0,n=(n=n+Math.imul(B,ut)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,ut)|0,i=i+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,ct)|0)+Math.imul(x,lt)|0,o=o+Math.imul(x,ct)|0;var Ct=(u+(i=i+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(j,ht),n=(n=Math.imul(j,ut))+Math.imul(U,ht)|0,o=Math.imul(U,ut),i=i+Math.imul(B,lt)|0,n=(n=n+Math.imul(B,ct)|0)+Math.imul(L,lt)|0,o=o+Math.imul(L,ct)|0;var Pt=(u+(i=i+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(x,pt)|0))<<13)|0;u=((o=o+Math.imul(x,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(j,lt),n=(n=Math.imul(j,ct))+Math.imul(U,lt)|0,o=Math.imul(U,ct);var xt=(u+(i=i+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((o=o+Math.imul(L,mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863;var Nt=(u+(i=Math.imul(j,pt))|0)+((8191&(n=(n=Math.imul(j,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,h[0]=gt,h[1]=yt,h[2]=bt,h[3]=vt,h[4]=wt,h[5]=_t,h[6]=Mt,h[7]=St,h[8]=Et,h[9]=kt,h[10]=At,h[11]=Ot,h[12]=Tt,h[13]=It,h[14]=Rt,h[15]=Ct,h[16]=Pt,h[17]=xt,h[18]=Nt,0!==u&&(h[19]=u,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=c),n.prototype.mulTo=function(t,e){var r,i=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):i<63?c(this,t,e):i<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,i=s,s=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,t,e):p(this,t,e),r},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=n.prototype._countBits(t)-1,i=0;i>=1;return i},m.prototype.permute=function(t,e,r,i,n,o){for(var s=0;s>>=1)n++;return 1<>>=13,i[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,e+=n/67108864|0,e+=o>>>26,this.words[i]=67108863&o}return 0!==e&&(this.words[i]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>n}return e}(t);if(0===e.length)return new n(1);for(var r=this,i=0;i=0);var e,i=t%26,n=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(e=0;e>>26-i}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,u=0;u=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&a}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,i){return r(0===this.negative),this.iushrn(t,e,i)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26,n=1<=0);var e=t%26,i=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==e&&i++,this.length=Math.min(i,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(h/67108864|0),this.words[n+i]=67108863&o}for(;n>26,this.words[n+i]=67108863&o;if(0===a)return this.strip();for(r(-1===a),a=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),o=t,s=0|o.words[o.length-1];0!=(r=26-this._countBits(s))&&(o=o.ushln(r),i.iushln(r),s=0|o.words[o.length-1]);var a,h=i.length-o.length;if("mod"!==e){(a=new n(null)).length=h+1,a.words=new Array(a.length);for(var u=0;u=0;l--){var c=67108864*(0|i.words[o.length+l])+(0|i.words[o.length+l-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(o,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(o,1,l),i.isZero()||(i.negative^=1);a&&(a.words[l]=c)}return a&&a.strip(),i.strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:a||null,mod:i}},n.prototype.divmod=function(t,e,i){return r(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(o=a.div.neg()),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(o=a.div.neg()),{div:o,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,a},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,i=0,n=this.length-1;n>=0;n--)i=(e*i+(0|this.words[n]))%t;return i},n.prototype.idivn=function(t){r(t<=67108863);for(var e=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*e;this.words[i]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),a=new n(0),h=new n(1),u=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++u;for(var f=i.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;0==(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(a.isOdd()||h.isOdd())&&(a.iadd(f),h.isub(l)),a.iushrn(1),h.iushrn(1);e.cmp(i)>=0?(e.isub(i),o.isub(a),s.isub(h)):(i.isub(e),a.isub(o),h.isub(s))}return{a:a,b:h,gcd:i.iushln(u)}},n.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),a=new n(0),h=i.clone();e.cmpn(1)>0&&i.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);for(var l=0,c=1;0==(i.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(i.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(h),a.iushrn(1);e.cmp(i)>=0?(e.isub(i),s.isub(a)):(i.isub(e),a.isub(s))}return(o=0===e.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var o=e;e=r,r=o}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,i=(t-e)/26,n=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,i=t<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)e=1;else{i&&(t=-t),r(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:nt.length)return 1;if(this.length=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){in&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new M(t)},n.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},i(b,y),b.prototype.split=function(t,e){for(var r=4194303,i=Math.min(t.length,9),n=0;n>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new v;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},M.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var i=this.m.add(new n(1)).iushrn(2);return this.pow(t,i)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);r(!o.isZero());var a=new n(1).toRed(this),h=a.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(h);)f.redIAdd(h);for(var l=this.pow(f,o),c=this.pow(t,o.addn(1).iushrn(1)),d=this.pow(t,o),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g=0;i--){for(var u=e.words[i],f=h-1;f>=0;f--){var l=u>>f&1;o!==r[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++a||0===i&&0===f)&&(o=this.mul(o,r[s]),a=0,s=0)):a=0}h=26}return o},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},i(S,M),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(ld,Y);var cd,dd,pd,md,gd,yd={},bd={get exports(){return yd},set exports(t){yd=t}};function vd(){if(cd)return yd;var t;function e(t){this.rand=t}if(cd=1,bd.exports=function(r){return t||(t=new e(null)),t.generate(r)},yd.Rand=e,e.prototype.generate=function(t){return this._rand(t)},e.prototype._rand=function(t){if(this.rand.getBytes)return this.rand.getBytes(t);for(var e=new Uint8Array(t),r=0;r=0);return n},r.prototype._randrange=function(t,e){var r=e.sub(t);return t.add(this._randbelow(r))},r.prototype.test=function(e,r,i){var n=e.bitLength(),o=t.mont(e),s=new t(1).toRed(o);r||(r=Math.max(1,n/48|0));for(var a=e.subn(1),h=0;!a.testn(h);h++);for(var u=e.shrn(h),f=a.toRed(o);r>0;r--){var l=this._randrange(new t(2),a);i&&i(l);var c=l.toRed(o).redPow(u);if(0!==c.cmp(s)&&0!==c.cmp(f)){for(var d=1;d0;r--){var f=this._randrange(new t(2),s),l=e.gcd(f);if(0!==l.cmpn(1))return l;var c=f.toRed(n).redPow(h);if(0!==c.cmp(o)&&0!==c.cmp(u)){for(var d=1;dl;)m.ishrn(1);if(m.isEven()&&m.iadd(n),m.testn(1)||m.iadd(o),c.cmp(o)){if(!c.cmp(s))for(;m.mod(a).cmp(h);)m.iadd(f)}else for(;m.mod(r).cmp(u);)m.iadd(f);if(d(g=m.shrn(1))&&d(m)&&p(g)&&p(m)&&i.test(g)&&i.test(m))return m}}return md}var Md,Sd,Ed,kd={modp1:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},modp2:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},modp5:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},modp14:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},modp15:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},modp16:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},modp17:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},modp18:{gen:"02",prime:"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}};function Ad(){if(Sd)return Md;Sd=1;var t=hd,e=new(wd()),r=new t(24),i=new t(11),n=new t(10),o=new t(3),s=new t(7),a=_d(),h=jn;function u(e,r){return r=r||"utf8",Re.isBuffer(e)||(e=new Re(e,r)),this._pub=new t(e),this}function f(e,r){return r=r||"utf8",Re.isBuffer(e)||(e=new Re(e,r)),this._priv=new t(e),this}Md=c;var l={};function c(e,r,i){this.setGenerator(r),this.__prime=new t(e),this._prime=t.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,i?(this.setPublicKey=u,this.setPrivateKey=f):this._primeCode=8}function d(t,e){var r=new Re(t.toArray());return e?r.toString(e):r}return Object.defineProperty(c.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(t,h){var u=h.toString("hex"),f=[u,t.toString(16)].join("_");if(f in l)return l[f];var c,d=0;if(t.isEven()||!a.simpleSieve||!a.fermatTest(t)||!e.test(t))return d+=1,d+="02"===u||"05"===u?8:4,l[f]=d,d;switch(e.test(t.shrn(1))||(d+=2),u){case"02":t.mod(r).cmp(i)&&(d+=8);break;case"05":(c=t.mod(n)).cmp(o)&&c.cmp(s)&&(d+=8);break;default:d+=4}return l[f]=d,d}(this.__prime,this.__gen)),this._primeCode}}),c.prototype.generateKeys=function(){return this._priv||(this._priv=new t(h(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},c.prototype.computeSecret=function(e){var r=new Re((e=(e=new t(e)).toRed(this._prime)).redPow(this._priv).fromRed().toArray()),i=this.getPrime();if(r.length=48&&i<=57?i-48:i>=65&&i<=70?i-55:i>=97&&i<=102?i-87:void r(!1,"Invalid character in "+t)}function a(t,e,r){var i=s(t,r);return r-1>=e&&(i|=s(t,r-1)<<4),i}function h(t,e,i,n){for(var o=0,s=0,a=Math.min(t.length,i),h=e;h=49?u-49+10:u>=17?u-17+10:u,r(u>=0&&s0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,i){if("number"==typeof t)return this._initNumber(t,e,i);if("object"==typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===i)for(n=0,o=0;n>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},n.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i=e;i-=2)n=a(t,e,i)<=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(t.length-e)%2==0?e+1:e;i=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this._strip()},n.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var o=t.length-r,s=o%i,a=Math.min(o,o-s)+r,u=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{n.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch(t){n.prototype.inspect=f}else n.prototype.inspect=f;function f(){return(this.red?""}var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],c=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],d=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,a=67108863&s,h=s/67108864|0;r.words[0]=a;for(var u=1;u>>26,l=67108863&h,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[u]=0|l,h=0|f}return 0!==h?r.words[u]=0|h:r.length--,r._strip()}n.prototype.toString=function(t,e){var i;if(e=0|e||1,16===(t=t||10)||"hex"===t){i="";for(var n=0,o=0,s=0;s>>24-n&16777215,(n+=2)>=26&&(n-=26,s--),i=0!==o||s!==this.length-1?l[6-h.length]+h+i:h+i}for(0!==o&&(i=o.toString(16)+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var u=c[t],f=d[t];i="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modrn(f).toString(t);i=(p=p.idivn(f)).isZero()?m+i:l[u-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16,2)},o&&(n.prototype.toBuffer=function(t,e){return this.toArrayLike(o,t,e)}),n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,i){this._strip();var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0");var s=function(t,e){return t.allocUnsafe?t.allocUnsafe(e):new t(e)}(t,o);return this["_toArrayLike"+("le"===e?"LE":"BE")](s,n),s},n.prototype._toArrayLikeLE=function(t,e){for(var r=0,i=0,n=0,o=0;n>8&255),r>16&255),6===o?(r>24&255),i=0,o=0):(i=s>>>24,o+=2)}if(r=0&&(t[r--]=s>>8&255),r>=0&&(t[r--]=s>>16&255),6===o?(r>=0&&(t[r--]=s>>24&255),i=0,o=0):(i=s>>>24,o+=2)}if(r>=0)for(t[r--]=i;r>=0;)t[r--]=0},Math.clz32?n.prototype._countBits=function(t){return 32-Math.clz32(t)}:n.prototype._countBits=function(t){var e=t,r=0;return e>=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},n.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;it.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-i),this._strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var i=t/26|0,n=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<t.length?(r=this,i=t):(r=t,i=this);for(var n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},n.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,M=0|s[4],S=8191&M,E=M>>>13,k=0|s[5],A=8191&k,O=k>>>13,T=0|s[6],I=8191&T,R=T>>>13,C=0|s[7],P=8191&C,x=C>>>13,N=0|s[8],B=8191&N,L=N>>>13,D=0|s[9],j=8191&D,U=D>>>13,q=0|a[0],F=8191&q,z=q>>>13,H=0|a[1],K=8191&H,V=H>>>13,G=0|a[2],W=8191&G,Y=G>>>13,Z=0|a[3],X=8191&Z,Q=Z>>>13,J=0|a[4],$=8191&J,tt=J>>>13,et=0|a[5],rt=8191&et,it=et>>>13,nt=0|a[6],ot=8191&nt,st=nt>>>13,at=0|a[7],ht=8191&at,ut=at>>>13,ft=0|a[8],lt=8191&ft,ct=ft>>>13,dt=0|a[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(i=Math.imul(l,F))|0)+((8191&(n=(n=Math.imul(l,z))+Math.imul(c,F)|0))<<13)|0;u=((o=Math.imul(c,z))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,F),n=(n=Math.imul(p,z))+Math.imul(m,F)|0,o=Math.imul(m,z);var yt=(u+(i=i+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,V)|0)+Math.imul(c,K)|0))<<13)|0;u=((o=o+Math.imul(c,V)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(y,F),n=(n=Math.imul(y,z))+Math.imul(b,F)|0,o=Math.imul(b,z),i=i+Math.imul(p,K)|0,n=(n=n+Math.imul(p,V)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,V)|0;var bt=(u+(i=i+Math.imul(l,W)|0)|0)+((8191&(n=(n=n+Math.imul(l,Y)|0)+Math.imul(c,W)|0))<<13)|0;u=((o=o+Math.imul(c,Y)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(w,F),n=(n=Math.imul(w,z))+Math.imul(_,F)|0,o=Math.imul(_,z),i=i+Math.imul(y,K)|0,n=(n=n+Math.imul(y,V)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,V)|0,i=i+Math.imul(p,W)|0,n=(n=n+Math.imul(p,Y)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,Y)|0;var vt=(u+(i=i+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(c,X)|0))<<13)|0;u=((o=o+Math.imul(c,Q)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(S,F),n=(n=Math.imul(S,z))+Math.imul(E,F)|0,o=Math.imul(E,z),i=i+Math.imul(w,K)|0,n=(n=n+Math.imul(w,V)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,V)|0,i=i+Math.imul(y,W)|0,n=(n=n+Math.imul(y,Y)|0)+Math.imul(b,W)|0,o=o+Math.imul(b,Y)|0,i=i+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(i=i+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0))<<13)|0;u=((o=o+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(A,F),n=(n=Math.imul(A,z))+Math.imul(O,F)|0,o=Math.imul(O,z),i=i+Math.imul(S,K)|0,n=(n=n+Math.imul(S,V)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,V)|0,i=i+Math.imul(w,W)|0,n=(n=n+Math.imul(w,Y)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Y)|0,i=i+Math.imul(y,X)|0,n=(n=n+Math.imul(y,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var _t=(u+(i=i+Math.imul(l,rt)|0)|0)+((8191&(n=(n=n+Math.imul(l,it)|0)+Math.imul(c,rt)|0))<<13)|0;u=((o=o+Math.imul(c,it)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(I,F),n=(n=Math.imul(I,z))+Math.imul(R,F)|0,o=Math.imul(R,z),i=i+Math.imul(A,K)|0,n=(n=n+Math.imul(A,V)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,V)|0,i=i+Math.imul(S,W)|0,n=(n=n+Math.imul(S,Y)|0)+Math.imul(E,W)|0,o=o+Math.imul(E,Y)|0,i=i+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,Q)|0,i=i+Math.imul(y,$)|0,n=(n=n+Math.imul(y,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,it)|0;var Mt=(u+(i=i+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,ot)|0))<<13)|0;u=((o=o+Math.imul(c,st)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(P,F),n=(n=Math.imul(P,z))+Math.imul(x,F)|0,o=Math.imul(x,z),i=i+Math.imul(I,K)|0,n=(n=n+Math.imul(I,V)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,V)|0,i=i+Math.imul(A,W)|0,n=(n=n+Math.imul(A,Y)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,Y)|0,i=i+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,i=i+Math.imul(y,rt)|0,n=(n=n+Math.imul(y,it)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,it)|0,i=i+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(i=i+Math.imul(l,ht)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,ht)|0))<<13)|0;u=((o=o+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(B,F),n=(n=Math.imul(B,z))+Math.imul(L,F)|0,o=Math.imul(L,z),i=i+Math.imul(P,K)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,V)|0,i=i+Math.imul(I,W)|0,n=(n=n+Math.imul(I,Y)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,Y)|0,i=i+Math.imul(A,X)|0,n=(n=n+Math.imul(A,Q)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,Q)|0,i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,it)|0,i=i+Math.imul(y,ot)|0,n=(n=n+Math.imul(y,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,i=i+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(i=i+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((o=o+Math.imul(c,ct)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(j,F),n=(n=Math.imul(j,z))+Math.imul(U,F)|0,o=Math.imul(U,z),i=i+Math.imul(B,K)|0,n=(n=n+Math.imul(B,V)|0)+Math.imul(L,K)|0,o=o+Math.imul(L,V)|0,i=i+Math.imul(P,W)|0,n=(n=n+Math.imul(P,Y)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,Y)|0,i=i+Math.imul(I,X)|0,n=(n=n+Math.imul(I,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,tt)|0,i=i+Math.imul(S,rt)|0,n=(n=n+Math.imul(S,it)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,it)|0,i=i+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,i=i+Math.imul(y,ht)|0,n=(n=n+Math.imul(y,ut)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,ut)|0,i=i+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ct)|0;var kt=(u+(i=i+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((o=o+Math.imul(c,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(j,K),n=(n=Math.imul(j,V))+Math.imul(U,K)|0,o=Math.imul(U,V),i=i+Math.imul(B,W)|0,n=(n=n+Math.imul(B,Y)|0)+Math.imul(L,W)|0,o=o+Math.imul(L,Y)|0,i=i+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,Q)|0,i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,it)|0,i=i+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,i=i+Math.imul(w,ht)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,ut)|0,i=i+Math.imul(y,lt)|0,n=(n=n+Math.imul(y,ct)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,ct)|0;var At=(u+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(j,W),n=(n=Math.imul(j,Y))+Math.imul(U,W)|0,o=Math.imul(U,Y),i=i+Math.imul(B,X)|0,n=(n=n+Math.imul(B,Q)|0)+Math.imul(L,X)|0,o=o+Math.imul(L,Q)|0,i=i+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,tt)|0,i=i+Math.imul(I,rt)|0,n=(n=n+Math.imul(I,it)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,it)|0,i=i+Math.imul(A,ot)|0,n=(n=n+Math.imul(A,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,i=i+Math.imul(S,ht)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,ht)|0,o=o+Math.imul(E,ut)|0,i=i+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ct)|0;var Ot=(u+(i=i+Math.imul(y,pt)|0)|0)+((8191&(n=(n=n+Math.imul(y,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,i=Math.imul(j,X),n=(n=Math.imul(j,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),i=i+Math.imul(B,$)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,tt)|0,i=i+Math.imul(P,rt)|0,n=(n=n+Math.imul(P,it)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,it)|0,i=i+Math.imul(I,ot)|0,n=(n=n+Math.imul(I,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,i=i+Math.imul(A,ht)|0,n=(n=n+Math.imul(A,ut)|0)+Math.imul(O,ht)|0,o=o+Math.imul(O,ut)|0,i=i+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ct)|0;var Tt=(u+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;u=((o=o+Math.imul(_,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(j,$),n=(n=Math.imul(j,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),i=i+Math.imul(B,rt)|0,n=(n=n+Math.imul(B,it)|0)+Math.imul(L,rt)|0,o=o+Math.imul(L,it)|0,i=i+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,i=i+Math.imul(I,ht)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(R,ht)|0,o=o+Math.imul(R,ut)|0,i=i+Math.imul(A,lt)|0,n=(n=n+Math.imul(A,ct)|0)+Math.imul(O,lt)|0,o=o+Math.imul(O,ct)|0;var It=(u+(i=i+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(j,rt),n=(n=Math.imul(j,it))+Math.imul(U,rt)|0,o=Math.imul(U,it),i=i+Math.imul(B,ot)|0,n=(n=n+Math.imul(B,st)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,st)|0,i=i+Math.imul(P,ht)|0,n=(n=n+Math.imul(P,ut)|0)+Math.imul(x,ht)|0,o=o+Math.imul(x,ut)|0,i=i+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,ct)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,ct)|0;var Rt=(u+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(O,pt)|0))<<13)|0;u=((o=o+Math.imul(O,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,i=Math.imul(j,ot),n=(n=Math.imul(j,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),i=i+Math.imul(B,ht)|0,n=(n=n+Math.imul(B,ut)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,ut)|0,i=i+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,ct)|0)+Math.imul(x,lt)|0,o=o+Math.imul(x,ct)|0;var Ct=(u+(i=i+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(j,ht),n=(n=Math.imul(j,ut))+Math.imul(U,ht)|0,o=Math.imul(U,ut),i=i+Math.imul(B,lt)|0,n=(n=n+Math.imul(B,ct)|0)+Math.imul(L,lt)|0,o=o+Math.imul(L,ct)|0;var Pt=(u+(i=i+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(x,pt)|0))<<13)|0;u=((o=o+Math.imul(x,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(j,lt),n=(n=Math.imul(j,ct))+Math.imul(U,lt)|0,o=Math.imul(U,ct);var xt=(u+(i=i+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((o=o+Math.imul(L,mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863;var Nt=(u+(i=Math.imul(j,pt))|0)+((8191&(n=(n=Math.imul(j,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,h[0]=gt,h[1]=yt,h[2]=bt,h[3]=vt,h[4]=wt,h[5]=_t,h[6]=Mt,h[7]=St,h[8]=Et,h[9]=kt,h[10]=At,h[11]=Ot,h[12]=Tt,h[13]=It,h[14]=Rt,h[15]=Ct,h[16]=Pt,h[17]=xt,h[18]=Nt,0!==u&&(h[19]=u,r.length++),r};function g(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,i=s,s=n}return 0!==i?r.words[o]=i:r.length--,r._strip()}function y(t,e,r){return g(t,e,r)}Math.imul||(m=p),n.prototype.mulTo=function(t,e){var r=this.length+t.length;return 10===this.length&&10===t.length?m(this,t,e):r<63?p(this,t,e):r<1024?g(this,t,e):y(this,t,e)},n.prototype.mul=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),this.mulTo(t,e)},n.prototype.mulf=function(t){var e=new n(null);return e.words=new Array(this.length+t.length),y(this,t,e)},n.prototype.imul=function(t){return this.clone().mulTo(t,this)},n.prototype.imuln=function(t){var e=t<0;e&&(t=-t),r("number"==typeof t),r(t<67108864);for(var i=0,n=0;n>=26,i+=o/67108864|0,i+=s>>>26,this.words[n]=67108863&s}return 0!==i&&(this.words[n]=i,this.length++),e?this.ineg():this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>n&1}return e}(t);if(0===e.length)return new n(1);for(var r=this,i=0;i=0);var e,i=t%26,n=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(e=0;e>>26-i}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,u=0;u=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&a}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},n.prototype.ishrn=function(t,e,i){return r(0===this.negative),this.iushrn(t,e,i)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26,n=1<=0);var e=t%26,i=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==e&&i++,this.length=Math.min(i,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(h/67108864|0),this.words[n+i]=67108863&o}for(;n>26,this.words[n+i]=67108863&o;if(0===a)return this._strip();for(r(-1===a),a=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this._strip()},n.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),o=t,s=0|o.words[o.length-1];0!=(r=26-this._countBits(s))&&(o=o.ushln(r),i.iushln(r),s=0|o.words[o.length-1]);var a,h=i.length-o.length;if("mod"!==e){(a=new n(null)).length=h+1,a.words=new Array(a.length);for(var u=0;u=0;l--){var c=67108864*(0|i.words[o.length+l])+(0|i.words[o.length+l-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(o,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(o,1,l),i.isZero()||(i.negative^=1);a&&(a.words[l]=c)}return a&&a._strip(),i._strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:a||null,mod:i}},n.prototype.divmod=function(t,e,i){return r(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(o=a.div.neg()),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(o=a.div.neg()),{div:o,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modrn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modrn(t.words[0]))}:this._wordDiv(t,e);var o,s,a},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modrn=function(t){var e=t<0;e&&(t=-t),r(t<=67108863);for(var i=(1<<26)%t,n=0,o=this.length-1;o>=0;o--)n=(i*n+(0|this.words[o]))%t;return e?-n:n},n.prototype.modn=function(t){return this.modrn(t)},n.prototype.idivn=function(t){var e=t<0;e&&(t=-t),r(t<=67108863);for(var i=0,n=this.length-1;n>=0;n--){var o=(0|this.words[n])+67108864*i;this.words[n]=o/t|0,i=o%t}return this._strip(),e?this.ineg():this},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),a=new n(0),h=new n(1),u=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++u;for(var f=i.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;0==(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(a.isOdd()||h.isOdd())&&(a.iadd(f),h.isub(l)),a.iushrn(1),h.iushrn(1);e.cmp(i)>=0?(e.isub(i),o.isub(a),s.isub(h)):(i.isub(e),a.isub(o),h.isub(s))}return{a:a,b:h,gcd:i.iushln(u)}},n.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),a=new n(0),h=i.clone();e.cmpn(1)>0&&i.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);for(var l=0,c=1;0==(i.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(i.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(h),a.iushrn(1);e.cmp(i)>=0?(e.isub(i),s.isub(a)):(i.isub(e),a.isub(s))}return(o=0===e.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var o=e;e=r,r=o}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,i=(t-e)/26,n=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,i=t<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this._strip(),this.length>1)e=1;else{i&&(t=-t),r(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:nt.length)return 1;if(this.length=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){in&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new E(t)},n.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var b={k256:null,p224:null,p192:null,p25519:null};function v(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function w(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function M(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function S(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function E(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function k(t){E.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},v.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(t,e){t.iushrn(this.n,0,e)},v.prototype.imulK=function(t){return t.imul(this.k)},i(w,v),w.prototype.split=function(t,e){for(var r=4194303,i=Math.min(t.length,9),n=0;n>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},w.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(b[t])return b[t];var e;if("k256"===t)e=new w;else if("p224"===t)e=new _;else if("p192"===t)e=new M;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new S}return b[t]=e,e},E.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},E.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},E.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):(u(t,t.umod(this.m)._forceRed(this)),t)},E.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},E.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},E.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},E.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},E.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},E.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},E.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},E.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},E.prototype.isqr=function(t){return this.imul(t,t.clone())},E.prototype.sqr=function(t){return this.mul(t,t)},E.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var i=this.m.add(new n(1)).iushrn(2);return this.pow(t,i)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);r(!o.isZero());var a=new n(1).toRed(this),h=a.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(h);)f.redIAdd(h);for(var l=this.pow(f,o),c=this.pow(t,o.addn(1).iushrn(1)),d=this.pow(t,o),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g=0;i--){for(var u=e.words[i],f=h-1;f>=0;f--){var l=u>>f&1;o!==r[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++a||0===i&&0===f)&&(o=this.mul(o,r[s]),a=0,s=0)):a=0}h=26}return o},E.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},E.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new k(t)},i(k,E),k.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},k.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},k.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},k.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},k.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(Rd,Y);var Cd=Id,Pd=jn;function xd(t){var e,r=t.modulus.byteLength();do{e=new Cd(Pd(r))}while(e.cmp(t.modulus)>=0||!e.umod(t.prime1)||!e.umod(t.prime2));return e}function Nd(t,e){var r=function(t){var e=xd(t);return{blinder:e.toRed(Cd.mont(t.modulus)).redPow(new Cd(t.publicExponent)).fromRed(),unblinder:e.invm(t.modulus)}}(e),i=e.modulus.byteLength(),n=new Cd(t).mul(r.blinder).umod(e.modulus),o=n.toRed(Cd.mont(e.prime1)),s=n.toRed(Cd.mont(e.prime2)),a=e.coefficient,h=e.prime1,u=e.prime2,f=o.redPow(e.exponent1).fromRed(),l=s.redPow(e.exponent2).fromRed(),c=f.isub(l).imul(a).umod(h).imul(u);return l.iadd(c).imul(r.unblinder).umod(e.modulus).toArrayLike(Re,"be",i)}Nd.getr=xd;var Bd=Nd,Ld={};var Dd={name:"elliptic",version:"6.5.4",description:"EC cryptography",main:"lib/elliptic.js",files:["lib"],scripts:{lint:"eslint lib test","lint:fix":"npm run lint -- --fix",unit:"istanbul test _mocha --reporter=spec test/index.js",test:"npm run lint && npm run unit",version:"grunt dist && git add dist/"},repository:{type:"git",url:"git@github.com:indutny/elliptic"},keywords:["EC","Elliptic","curve","Cryptography"],author:"Fedor Indutny ",license:"MIT",bugs:{url:"https://github.com/indutny/elliptic/issues"},homepage:"https://github.com/indutny/elliptic",devDependencies:{brfs:"^2.0.2",coveralls:"^3.1.0",eslint:"^7.6.0",grunt:"^1.2.1","grunt-browserify":"^5.3.0","grunt-cli":"^1.3.2","grunt-contrib-connect":"^3.0.0","grunt-contrib-copy":"^1.0.0","grunt-contrib-uglify":"^5.0.0","grunt-mocha-istanbul":"^5.0.2","grunt-saucelabs":"^9.0.1",istanbul:"^0.4.5",mocha:"^8.0.1"},dependencies:{"bn.js":"^4.11.9",brorand:"^1.1.0","hash.js":"^1.0.0","hmac-drbg":"^1.0.1",inherits:"^2.0.4","minimalistic-assert":"^1.0.1","minimalistic-crypto-utils":"^1.0.1"}},jd={},Ud={},qd={get exports(){return Ud},set exports(t){Ud=t}};!function(t,e){function r(t,e){if(!t)throw new Error(e||"Assertion failed")}function i(t,e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}function n(t,e,r){if(n.isBN(t))return t;this.negative=0,this.words=null,this.length=0,this.red=null,null!==t&&("le"!==e&&"be"!==e||(r=e,e=10),this._init(t||0,e||10,r||"be"))}var o;"object"==typeof t?t.exports=n:e.BN=n,n.BN=n,n.wordSize=26;try{o="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:zn.Buffer}catch(t){}function s(t,e){var r=t.charCodeAt(e);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function a(t,e,r){var i=s(t,r);return r-1>=e&&(i|=s(t,r-1)<<4),i}function h(t,e,r,i){for(var n=0,o=Math.min(t.length,r),s=e;s=49?a-49+10:a>=17?a-17+10:a}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,i){if("number"==typeof t)return this._initNumber(t,e,i);if("object"==typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===i)for(n=0,o=0;n>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i=e;i-=2)n=a(t,e,i)<=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(t.length-e)%2==0?e+1:e;i=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var o=t.length-r,s=o%i,a=Math.min(o,o-s)+r,u=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function c(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,a=67108863&s,h=s/67108864|0;r.words[0]=a;for(var u=1;u>>26,l=67108863&h,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[u]=0|l,h=0|f}return 0!==h?r.words[u]=0|h:r.length--,r.strip()}n.prototype.toString=function(t,e){var i;if(e=0|e||1,16===(t=t||10)||"hex"===t){i="";for(var n=0,o=0,s=0;s>>24-n&16777215)||s!==this.length-1?u[6-h.length]+h+i:h+i,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(i=o.toString(16)+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var c=f[t],d=l[t];i="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);i=(p=p.idivn(d)).isZero()?m+i:u[c-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return r(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,i){var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,h="le"===e,u=new t(o),f=this.clone();if(h){for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),u[a]=s;for(;a=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},n.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;it.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var i=t/26|0,n=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<t.length?(r=this,i=t):(r=t,i=this);for(var n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},n.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,M=0|s[4],S=8191&M,E=M>>>13,k=0|s[5],A=8191&k,O=k>>>13,T=0|s[6],I=8191&T,R=T>>>13,C=0|s[7],P=8191&C,x=C>>>13,N=0|s[8],B=8191&N,L=N>>>13,D=0|s[9],j=8191&D,U=D>>>13,q=0|a[0],F=8191&q,z=q>>>13,H=0|a[1],K=8191&H,V=H>>>13,G=0|a[2],W=8191&G,Y=G>>>13,Z=0|a[3],X=8191&Z,Q=Z>>>13,J=0|a[4],$=8191&J,tt=J>>>13,et=0|a[5],rt=8191&et,it=et>>>13,nt=0|a[6],ot=8191&nt,st=nt>>>13,at=0|a[7],ht=8191&at,ut=at>>>13,ft=0|a[8],lt=8191&ft,ct=ft>>>13,dt=0|a[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(i=Math.imul(l,F))|0)+((8191&(n=(n=Math.imul(l,z))+Math.imul(c,F)|0))<<13)|0;u=((o=Math.imul(c,z))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,F),n=(n=Math.imul(p,z))+Math.imul(m,F)|0,o=Math.imul(m,z);var yt=(u+(i=i+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,V)|0)+Math.imul(c,K)|0))<<13)|0;u=((o=o+Math.imul(c,V)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(y,F),n=(n=Math.imul(y,z))+Math.imul(b,F)|0,o=Math.imul(b,z),i=i+Math.imul(p,K)|0,n=(n=n+Math.imul(p,V)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,V)|0;var bt=(u+(i=i+Math.imul(l,W)|0)|0)+((8191&(n=(n=n+Math.imul(l,Y)|0)+Math.imul(c,W)|0))<<13)|0;u=((o=o+Math.imul(c,Y)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(w,F),n=(n=Math.imul(w,z))+Math.imul(_,F)|0,o=Math.imul(_,z),i=i+Math.imul(y,K)|0,n=(n=n+Math.imul(y,V)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,V)|0,i=i+Math.imul(p,W)|0,n=(n=n+Math.imul(p,Y)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,Y)|0;var vt=(u+(i=i+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(c,X)|0))<<13)|0;u=((o=o+Math.imul(c,Q)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(S,F),n=(n=Math.imul(S,z))+Math.imul(E,F)|0,o=Math.imul(E,z),i=i+Math.imul(w,K)|0,n=(n=n+Math.imul(w,V)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,V)|0,i=i+Math.imul(y,W)|0,n=(n=n+Math.imul(y,Y)|0)+Math.imul(b,W)|0,o=o+Math.imul(b,Y)|0,i=i+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(i=i+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0))<<13)|0;u=((o=o+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(A,F),n=(n=Math.imul(A,z))+Math.imul(O,F)|0,o=Math.imul(O,z),i=i+Math.imul(S,K)|0,n=(n=n+Math.imul(S,V)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,V)|0,i=i+Math.imul(w,W)|0,n=(n=n+Math.imul(w,Y)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Y)|0,i=i+Math.imul(y,X)|0,n=(n=n+Math.imul(y,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var _t=(u+(i=i+Math.imul(l,rt)|0)|0)+((8191&(n=(n=n+Math.imul(l,it)|0)+Math.imul(c,rt)|0))<<13)|0;u=((o=o+Math.imul(c,it)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(I,F),n=(n=Math.imul(I,z))+Math.imul(R,F)|0,o=Math.imul(R,z),i=i+Math.imul(A,K)|0,n=(n=n+Math.imul(A,V)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,V)|0,i=i+Math.imul(S,W)|0,n=(n=n+Math.imul(S,Y)|0)+Math.imul(E,W)|0,o=o+Math.imul(E,Y)|0,i=i+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,Q)|0,i=i+Math.imul(y,$)|0,n=(n=n+Math.imul(y,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,it)|0;var Mt=(u+(i=i+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,ot)|0))<<13)|0;u=((o=o+Math.imul(c,st)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(P,F),n=(n=Math.imul(P,z))+Math.imul(x,F)|0,o=Math.imul(x,z),i=i+Math.imul(I,K)|0,n=(n=n+Math.imul(I,V)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,V)|0,i=i+Math.imul(A,W)|0,n=(n=n+Math.imul(A,Y)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,Y)|0,i=i+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,i=i+Math.imul(y,rt)|0,n=(n=n+Math.imul(y,it)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,it)|0,i=i+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(i=i+Math.imul(l,ht)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,ht)|0))<<13)|0;u=((o=o+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(B,F),n=(n=Math.imul(B,z))+Math.imul(L,F)|0,o=Math.imul(L,z),i=i+Math.imul(P,K)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,V)|0,i=i+Math.imul(I,W)|0,n=(n=n+Math.imul(I,Y)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,Y)|0,i=i+Math.imul(A,X)|0,n=(n=n+Math.imul(A,Q)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,Q)|0,i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,it)|0,i=i+Math.imul(y,ot)|0,n=(n=n+Math.imul(y,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,i=i+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(i=i+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((o=o+Math.imul(c,ct)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(j,F),n=(n=Math.imul(j,z))+Math.imul(U,F)|0,o=Math.imul(U,z),i=i+Math.imul(B,K)|0,n=(n=n+Math.imul(B,V)|0)+Math.imul(L,K)|0,o=o+Math.imul(L,V)|0,i=i+Math.imul(P,W)|0,n=(n=n+Math.imul(P,Y)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,Y)|0,i=i+Math.imul(I,X)|0,n=(n=n+Math.imul(I,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,tt)|0,i=i+Math.imul(S,rt)|0,n=(n=n+Math.imul(S,it)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,it)|0,i=i+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,i=i+Math.imul(y,ht)|0,n=(n=n+Math.imul(y,ut)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,ut)|0,i=i+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ct)|0;var kt=(u+(i=i+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((o=o+Math.imul(c,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(j,K),n=(n=Math.imul(j,V))+Math.imul(U,K)|0,o=Math.imul(U,V),i=i+Math.imul(B,W)|0,n=(n=n+Math.imul(B,Y)|0)+Math.imul(L,W)|0,o=o+Math.imul(L,Y)|0,i=i+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,Q)|0,i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,it)|0,i=i+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,i=i+Math.imul(w,ht)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,ut)|0,i=i+Math.imul(y,lt)|0,n=(n=n+Math.imul(y,ct)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,ct)|0;var At=(u+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(j,W),n=(n=Math.imul(j,Y))+Math.imul(U,W)|0,o=Math.imul(U,Y),i=i+Math.imul(B,X)|0,n=(n=n+Math.imul(B,Q)|0)+Math.imul(L,X)|0,o=o+Math.imul(L,Q)|0,i=i+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,tt)|0,i=i+Math.imul(I,rt)|0,n=(n=n+Math.imul(I,it)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,it)|0,i=i+Math.imul(A,ot)|0,n=(n=n+Math.imul(A,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,i=i+Math.imul(S,ht)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,ht)|0,o=o+Math.imul(E,ut)|0,i=i+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ct)|0;var Ot=(u+(i=i+Math.imul(y,pt)|0)|0)+((8191&(n=(n=n+Math.imul(y,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,i=Math.imul(j,X),n=(n=Math.imul(j,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),i=i+Math.imul(B,$)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,tt)|0,i=i+Math.imul(P,rt)|0,n=(n=n+Math.imul(P,it)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,it)|0,i=i+Math.imul(I,ot)|0,n=(n=n+Math.imul(I,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,i=i+Math.imul(A,ht)|0,n=(n=n+Math.imul(A,ut)|0)+Math.imul(O,ht)|0,o=o+Math.imul(O,ut)|0,i=i+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ct)|0;var Tt=(u+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;u=((o=o+Math.imul(_,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(j,$),n=(n=Math.imul(j,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),i=i+Math.imul(B,rt)|0,n=(n=n+Math.imul(B,it)|0)+Math.imul(L,rt)|0,o=o+Math.imul(L,it)|0,i=i+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,i=i+Math.imul(I,ht)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(R,ht)|0,o=o+Math.imul(R,ut)|0,i=i+Math.imul(A,lt)|0,n=(n=n+Math.imul(A,ct)|0)+Math.imul(O,lt)|0,o=o+Math.imul(O,ct)|0;var It=(u+(i=i+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(j,rt),n=(n=Math.imul(j,it))+Math.imul(U,rt)|0,o=Math.imul(U,it),i=i+Math.imul(B,ot)|0,n=(n=n+Math.imul(B,st)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,st)|0,i=i+Math.imul(P,ht)|0,n=(n=n+Math.imul(P,ut)|0)+Math.imul(x,ht)|0,o=o+Math.imul(x,ut)|0,i=i+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,ct)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,ct)|0;var Rt=(u+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(O,pt)|0))<<13)|0;u=((o=o+Math.imul(O,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,i=Math.imul(j,ot),n=(n=Math.imul(j,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),i=i+Math.imul(B,ht)|0,n=(n=n+Math.imul(B,ut)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,ut)|0,i=i+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,ct)|0)+Math.imul(x,lt)|0,o=o+Math.imul(x,ct)|0;var Ct=(u+(i=i+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(j,ht),n=(n=Math.imul(j,ut))+Math.imul(U,ht)|0,o=Math.imul(U,ut),i=i+Math.imul(B,lt)|0,n=(n=n+Math.imul(B,ct)|0)+Math.imul(L,lt)|0,o=o+Math.imul(L,ct)|0;var Pt=(u+(i=i+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(x,pt)|0))<<13)|0;u=((o=o+Math.imul(x,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(j,lt),n=(n=Math.imul(j,ct))+Math.imul(U,lt)|0,o=Math.imul(U,ct);var xt=(u+(i=i+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((o=o+Math.imul(L,mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863;var Nt=(u+(i=Math.imul(j,pt))|0)+((8191&(n=(n=Math.imul(j,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,h[0]=gt,h[1]=yt,h[2]=bt,h[3]=vt,h[4]=wt,h[5]=_t,h[6]=Mt,h[7]=St,h[8]=Et,h[9]=kt,h[10]=At,h[11]=Ot,h[12]=Tt,h[13]=It,h[14]=Rt,h[15]=Ct,h[16]=Pt,h[17]=xt,h[18]=Nt,0!==u&&(h[19]=u,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=c),n.prototype.mulTo=function(t,e){var r,i=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):i<63?c(this,t,e):i<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,i=s,s=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,t,e):p(this,t,e),r},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=n.prototype._countBits(t)-1,i=0;i>=1;return i},m.prototype.permute=function(t,e,r,i,n,o){for(var s=0;s>>=1)n++;return 1<>>=13,i[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,e+=n/67108864|0,e+=o>>>26,this.words[i]=67108863&o}return 0!==e&&(this.words[i]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>n}return e}(t);if(0===e.length)return new n(1);for(var r=this,i=0;i=0);var e,i=t%26,n=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(e=0;e>>26-i}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,u=0;u=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&a}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,i){return r(0===this.negative),this.iushrn(t,e,i)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26,n=1<=0);var e=t%26,i=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==e&&i++,this.length=Math.min(i,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(h/67108864|0),this.words[n+i]=67108863&o}for(;n>26,this.words[n+i]=67108863&o;if(0===a)return this.strip();for(r(-1===a),a=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),o=t,s=0|o.words[o.length-1];0!=(r=26-this._countBits(s))&&(o=o.ushln(r),i.iushln(r),s=0|o.words[o.length-1]);var a,h=i.length-o.length;if("mod"!==e){(a=new n(null)).length=h+1,a.words=new Array(a.length);for(var u=0;u=0;l--){var c=67108864*(0|i.words[o.length+l])+(0|i.words[o.length+l-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(o,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(o,1,l),i.isZero()||(i.negative^=1);a&&(a.words[l]=c)}return a&&a.strip(),i.strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:a||null,mod:i}},n.prototype.divmod=function(t,e,i){return r(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(o=a.div.neg()),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(o=a.div.neg()),{div:o,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,a},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,i=0,n=this.length-1;n>=0;n--)i=(e*i+(0|this.words[n]))%t;return i},n.prototype.idivn=function(t){r(t<=67108863);for(var e=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*e;this.words[i]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),a=new n(0),h=new n(1),u=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++u;for(var f=i.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;0==(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(a.isOdd()||h.isOdd())&&(a.iadd(f),h.isub(l)),a.iushrn(1),h.iushrn(1);e.cmp(i)>=0?(e.isub(i),o.isub(a),s.isub(h)):(i.isub(e),a.isub(o),h.isub(s))}return{a:a,b:h,gcd:i.iushln(u)}},n.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),a=new n(0),h=i.clone();e.cmpn(1)>0&&i.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);for(var l=0,c=1;0==(i.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(i.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(h),a.iushrn(1);e.cmp(i)>=0?(e.isub(i),s.isub(a)):(i.isub(e),a.isub(s))}return(o=0===e.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var o=e;e=r,r=o}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,i=(t-e)/26,n=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,i=t<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)e=1;else{i&&(t=-t),r(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:nt.length)return 1;if(this.length=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){in&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new M(t)},n.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},i(b,y),b.prototype.split=function(t,e){for(var r=4194303,i=Math.min(t.length,9),n=0;n>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new v;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},M.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var i=this.m.add(new n(1)).iushrn(2);return this.pow(t,i)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);r(!o.isZero());var a=new n(1).toRed(this),h=a.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(h);)f.redIAdd(h);for(var l=this.pow(f,o),c=this.pow(t,o.addn(1).iushrn(1)),d=this.pow(t,o),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g=0;i--){for(var u=e.words[i],f=h-1;f>=0;f--){var l=u>>f&1;o!==r[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++a||0===i&&0===f)&&(o=this.mul(o,r[s]),a=0,s=0)):a=0}h=26}return o},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},i(S,M),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(qd,Y);var Fd={};!function(t){var e=Fd;function r(t){return 1===t.length?"0"+t:t}function i(t){for(var e="",i=0;i>8,s=255&n;o?r.push(o,s):r.push(s)}return r},e.zero2=r,e.toHex=i,e.encode=function(t,e){return"hex"===e?i(t):t}}(),function(t){var e=jd,r=Ud,i=Gf,n=Fd;e.assert=i,e.toArray=n.toArray,e.zero2=n.zero2,e.toHex=n.toHex,e.encode=n.encode,e.getNAF=function(t,e,r){var i=new Array(Math.max(t.bitLength(),r)+1);i.fill(0);for(var n=1<(n>>1)-1?(n>>1)-h:h,o.isubn(a)):a=0,i[s]=a,o.iushrn(1)}return i},e.getJSF=function(t,e){var r=[[],[]];t=t.clone(),e=e.clone();for(var i,n=0,o=0;t.cmpn(-n)>0||e.cmpn(-o)>0;){var s,a,h=t.andln(3)+n&3,u=e.andln(3)+o&3;3===h&&(h=-1),3===u&&(u=-1),s=0==(1&h)?0:3!==(i=t.andln(7)+n&7)&&5!==i||2!==u?h:-h,r[0].push(s),a=0==(1&u)?0:3!==(i=e.andln(7)+o&7)&&5!==i||2!==h?u:-u,r[1].push(a),2*n===s+1&&(n=1-n),2*o===a+1&&(o=1-o),t.iushrn(1),e.iushrn(1)}return r},e.cachedProperty=function(t,e,r){var i="_"+e;t.prototype[e]=function(){return void 0!==this[i]?this[i]:this[i]=r.call(this)}},e.parseBytes=function(t){return"string"==typeof t?e.toArray(t,"hex"):t},e.intFromLE=function(t){return new r(t,"hex","le")}}();var zd={},Hd=Ud,Kd=jd,Vd=Kd.getNAF,Gd=Kd.getJSF,Wd=Kd.assert;function Yd(t,e){this.type=t,this.p=new Hd(e.p,16),this.red=e.prime?Hd.red(e.prime):Hd.mont(this.p),this.zero=new Hd(0).toRed(this.red),this.one=new Hd(1).toRed(this.red),this.two=new Hd(2).toRed(this.red),this.n=e.n&&new Hd(e.n,16),this.g=e.g&&this.pointFromJSON(e.g,e.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var Zd=Yd;function Xd(t,e){this.curve=t,this.type=e,this.precomputed=null}Yd.prototype.point=function(){throw new Error("Not implemented")},Yd.prototype.validate=function(){throw new Error("Not implemented")},Yd.prototype._fixedNafMul=function(t,e){Wd(t.precomputed);var r=t._getDoubles(),i=Vd(e,1,this._bitLength),n=(1<=o;h--)s=(s<<1)+i[h];a.push(s)}for(var u=this.jpoint(null,null,null),f=this.jpoint(null,null,null),l=n;l>0;l--){for(o=0;o=0;a--){for(var h=0;a>=0&&0===o[a];a--)h++;if(a>=0&&h++,s=s.dblp(h),a<0)break;var u=o[a];Wd(0!==u),s="affine"===t.type?u>0?s.mixedAdd(n[u-1>>1]):s.mixedAdd(n[-u-1>>1].neg()):u>0?s.add(n[u-1>>1]):s.add(n[-u-1>>1].neg())}return"affine"===t.type?s.toP():s},Yd.prototype._wnafMulAdd=function(t,e,r,i,n){var o,s,a,h=this._wnafT1,u=this._wnafT2,f=this._wnafT3,l=0;for(o=0;o=1;o-=2){var d=o-1,p=o;if(1===h[d]&&1===h[p]){var m=[e[d],null,null,e[p]];0===e[d].y.cmp(e[p].y)?(m[1]=e[d].add(e[p]),m[2]=e[d].toJ().mixedAdd(e[p].neg())):0===e[d].y.cmp(e[p].y.redNeg())?(m[1]=e[d].toJ().mixedAdd(e[p]),m[2]=e[d].add(e[p].neg())):(m[1]=e[d].toJ().mixedAdd(e[p]),m[2]=e[d].toJ().mixedAdd(e[p].neg()));var g=[-3,-1,-5,-7,0,7,5,1,3],y=Gd(r[d],r[p]);for(l=Math.max(y[0].length,l),f[d]=new Array(l),f[p]=new Array(l),s=0;s=0;o--){for(var M=0;o>=0;){var S=!0;for(s=0;s=0&&M++,w=w.dblp(M),o<0)break;for(s=0;s0?a=u[s][E-1>>1]:E<0&&(a=u[s][-E-1>>1].neg()),w="affine"===a.type?w.mixedAdd(a):w.add(a))}}for(o=0;o=Math.ceil((t.bitLength()+1)/e.step)},Xd.prototype._getDoubles=function(t,e){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],i=this,n=0;n=0&&(o=e,s=r),i.negative&&(i=i.neg(),n=n.neg()),o.negative&&(o=o.neg(),s=s.neg()),[{a:i,b:n},{a:o,b:s}]},ep.prototype._endoSplit=function(t){var e=this.endo.basis,r=e[0],i=e[1],n=i.b.mul(t).divRound(this.n),o=r.b.neg().mul(t).divRound(this.n),s=n.mul(r.a),a=o.mul(i.a),h=n.mul(r.b),u=o.mul(i.b);return{k1:t.sub(s).sub(a),k2:h.add(u).neg()}},ep.prototype.pointFromX=function(t,e){(t=new Qd(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr().redMul(t).redIAdd(t.redMul(this.a)).redIAdd(this.b),i=r.redSqrt();if(0!==i.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var n=i.fromRed().isOdd();return(e&&!n||!e&&n)&&(i=i.redNeg()),this.point(t,i)},ep.prototype.validate=function(t){if(t.inf)return!0;var e=t.x,r=t.y,i=this.a.redMul(e),n=e.redSqr().redMul(e).redIAdd(i).redIAdd(this.b);return 0===r.redSqr().redISub(n).cmpn(0)},ep.prototype._endoWnafMulAdd=function(t,e,r){for(var i=this._endoWnafT1,n=this._endoWnafT2,o=0;o":""},ip.prototype.isInfinity=function(){return this.inf},ip.prototype.add=function(t){if(this.inf)return t;if(t.inf)return this;if(this.eq(t))return this.dbl();if(this.neg().eq(t))return this.curve.point(null,null);if(0===this.x.cmp(t.x))return this.curve.point(null,null);var e=this.y.redSub(t.y);0!==e.cmpn(0)&&(e=e.redMul(this.x.redSub(t.x).redInvm()));var r=e.redSqr().redISub(this.x).redISub(t.x),i=e.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,i)},ip.prototype.dbl=function(){if(this.inf)return this;var t=this.y.redAdd(this.y);if(0===t.cmpn(0))return this.curve.point(null,null);var e=this.curve.a,r=this.x.redSqr(),i=t.redInvm(),n=r.redAdd(r).redIAdd(r).redIAdd(e).redMul(i),o=n.redSqr().redISub(this.x.redAdd(this.x)),s=n.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},ip.prototype.getX=function(){return this.x.fromRed()},ip.prototype.getY=function(){return this.y.fromRed()},ip.prototype.mul=function(t){return t=new Qd(t,16),this.isInfinity()?this:this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve.endo?this.curve._endoWnafMulAdd([this],[t]):this.curve._wnafMul(this,t)},ip.prototype.mulAdd=function(t,e,r){var i=[this,e],n=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n):this.curve._wnafMulAdd(1,i,n,2)},ip.prototype.jmulAdd=function(t,e,r){var i=[this,e],n=[t,r];return this.curve.endo?this.curve._endoWnafMulAdd(i,n,!0):this.curve._wnafMulAdd(1,i,n,2,!0)},ip.prototype.eq=function(t){return this===t||this.inf===t.inf&&(this.inf||0===this.x.cmp(t.x)&&0===this.y.cmp(t.y))},ip.prototype.neg=function(t){if(this.inf)return this;var e=this.curve.point(this.x,this.y.redNeg());if(t&&this.precomputed){var r=this.precomputed,i=function(t){return t.neg()};e.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(i)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(i)}}}return e},ip.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},Jd(np,$d.BasePoint),ep.prototype.jpoint=function(t,e,r){return new np(this,t,e,r)},np.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var t=this.z.redInvm(),e=t.redSqr(),r=this.x.redMul(e),i=this.y.redMul(e).redMul(t);return this.curve.point(r,i)},np.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},np.prototype.add=function(t){if(this.isInfinity())return t;if(t.isInfinity())return this;var e=t.z.redSqr(),r=this.z.redSqr(),i=this.x.redMul(e),n=t.x.redMul(r),o=this.y.redMul(e.redMul(t.z)),s=t.y.redMul(r.redMul(this.z)),a=i.redSub(n),h=o.redSub(s);if(0===a.cmpn(0))return 0!==h.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=a.redSqr(),f=u.redMul(a),l=i.redMul(u),c=h.redSqr().redIAdd(f).redISub(l).redISub(l),d=h.redMul(l.redISub(c)).redISub(o.redMul(f)),p=this.z.redMul(t.z).redMul(a);return this.curve.jpoint(c,d,p)},np.prototype.mixedAdd=function(t){if(this.isInfinity())return t.toJ();if(t.isInfinity())return this;var e=this.z.redSqr(),r=this.x,i=t.x.redMul(e),n=this.y,o=t.y.redMul(e).redMul(this.z),s=r.redSub(i),a=n.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var h=s.redSqr(),u=h.redMul(s),f=r.redMul(h),l=a.redSqr().redIAdd(u).redISub(f).redISub(f),c=a.redMul(f.redISub(l)).redISub(n.redMul(u)),d=this.z.redMul(s);return this.curve.jpoint(l,c,d)},np.prototype.dblp=function(t){if(0===t)return this;if(this.isInfinity())return this;if(!t)return this.dbl();var e;if(this.curve.zeroA||this.curve.threeA){var r=this;for(e=0;e=0)return!1;if(r.redIAdd(n),0===this.x.cmp(r))return!0}},np.prototype.inspect=function(){return this.isInfinity()?"":""},np.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var op=Ud,sp=Wn,ap=Zd,hp=jd;function up(t){ap.call(this,"mont",t),this.a=new op(t.a,16).toRed(this.red),this.b=new op(t.b,16).toRed(this.red),this.i4=new op(4).toRed(this.red).redInvm(),this.two=new op(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}sp(up,ap);var fp=up;function lp(t,e,r){ap.BasePoint.call(this,t,"projective"),null===e&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new op(e,16),this.z=new op(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}up.prototype.validate=function(t){var e=t.normalize().x,r=e.redSqr(),i=r.redMul(e).redAdd(r.redMul(this.a)).redAdd(e);return 0===i.redSqrt().redSqr().cmp(i)},sp(lp,ap.BasePoint),up.prototype.decodePoint=function(t,e){return this.point(hp.toArray(t,e),1)},up.prototype.point=function(t,e){return new lp(this,t,e)},up.prototype.pointFromJSON=function(t){return lp.fromJSON(this,t)},lp.prototype.precompute=function(){},lp.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},lp.fromJSON=function(t,e){return new lp(t,e[0],e[1]||t.one)},lp.prototype.inspect=function(){return this.isInfinity()?"":""},lp.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},lp.prototype.dbl=function(){var t=this.x.redAdd(this.z).redSqr(),e=this.x.redSub(this.z).redSqr(),r=t.redSub(e),i=t.redMul(e),n=r.redMul(e.redAdd(this.curve.a24.redMul(r)));return this.curve.point(i,n)},lp.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},lp.prototype.diffAdd=function(t,e){var r=this.x.redAdd(this.z),i=this.x.redSub(this.z),n=t.x.redAdd(t.z),o=t.x.redSub(t.z).redMul(r),s=n.redMul(i),a=e.z.redMul(o.redAdd(s).redSqr()),h=e.x.redMul(o.redISub(s).redSqr());return this.curve.point(a,h)},lp.prototype.mul=function(t){for(var e=t.clone(),r=this,i=this.curve.point(null,null),n=[];0!==e.cmpn(0);e.iushrn(1))n.push(e.andln(1));for(var o=n.length-1;o>=0;o--)0===n[o]?(r=r.diffAdd(i,this),i=i.dbl()):(i=r.diffAdd(i,this),r=r.dbl());return i},lp.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},lp.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},lp.prototype.eq=function(t){return 0===this.getX().cmp(t.getX())},lp.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},lp.prototype.getX=function(){return this.normalize(),this.x.fromRed()};var cp=Ud,dp=Wn,pp=Zd,mp=jd.assert;function gp(t){this.twisted=1!=(0|t.a),this.mOneA=this.twisted&&-1==(0|t.a),this.extended=this.mOneA,pp.call(this,"edwards",t),this.a=new cp(t.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new cp(t.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new cp(t.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),mp(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|t.c)}dp(gp,pp);var yp=gp;function bp(t,e,r,i,n){pp.BasePoint.call(this,t,"projective"),null===e&&null===r&&null===i?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new cp(e,16),this.y=new cp(r,16),this.z=i?new cp(i,16):this.curve.one,this.t=n&&new cp(n,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}gp.prototype._mulA=function(t){return this.mOneA?t.redNeg():this.a.redMul(t)},gp.prototype._mulC=function(t){return this.oneC?t:this.c.redMul(t)},gp.prototype.jpoint=function(t,e,r,i){return this.point(t,e,r,i)},gp.prototype.pointFromX=function(t,e){(t=new cp(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),i=this.c2.redSub(this.a.redMul(r)),n=this.one.redSub(this.c2.redMul(this.d).redMul(r)),o=i.redMul(n.redInvm()),s=o.redSqrt();if(0!==s.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");var a=s.fromRed().isOdd();return(e&&!a||!e&&a)&&(s=s.redNeg()),this.point(t,s)},gp.prototype.pointFromY=function(t,e){(t=new cp(t,16)).red||(t=t.toRed(this.red));var r=t.redSqr(),i=r.redSub(this.c2),n=r.redMul(this.d).redMul(this.c2).redSub(this.a),o=i.redMul(n.redInvm());if(0===o.cmp(this.zero)){if(e)throw new Error("invalid point");return this.point(this.zero,t)}var s=o.redSqrt();if(0!==s.redSqr().redSub(o).cmp(this.zero))throw new Error("invalid point");return s.fromRed().isOdd()!==e&&(s=s.redNeg()),this.point(s,t)},gp.prototype.validate=function(t){if(t.isInfinity())return!0;t.normalize();var e=t.x.redSqr(),r=t.y.redSqr(),i=e.redMul(this.a).redAdd(r),n=this.c2.redMul(this.one.redAdd(this.d.redMul(e).redMul(r)));return 0===i.cmp(n)},dp(bp,pp.BasePoint),gp.prototype.pointFromJSON=function(t){return bp.fromJSON(this,t)},gp.prototype.point=function(t,e,r,i){return new bp(this,t,e,r,i)},bp.fromJSON=function(t,e){return new bp(t,e[0],e[1],e[2])},bp.prototype.inspect=function(){return this.isInfinity()?"":""},bp.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},bp.prototype._extDbl=function(){var t=this.x.redSqr(),e=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var i=this.curve._mulA(t),n=this.x.redAdd(this.y).redSqr().redISub(t).redISub(e),o=i.redAdd(e),s=o.redSub(r),a=i.redSub(e),h=n.redMul(s),u=o.redMul(a),f=n.redMul(a),l=s.redMul(o);return this.curve.point(h,u,l,f)},bp.prototype._projDbl=function(){var t,e,r,i,n,o,s=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),h=this.y.redSqr();if(this.curve.twisted){var u=(i=this.curve._mulA(a)).redAdd(h);this.zOne?(t=s.redSub(a).redSub(h).redMul(u.redSub(this.curve.two)),e=u.redMul(i.redSub(h)),r=u.redSqr().redSub(u).redSub(u)):(n=this.z.redSqr(),o=u.redSub(n).redISub(n),t=s.redSub(a).redISub(h).redMul(o),e=u.redMul(i.redSub(h)),r=u.redMul(o))}else i=a.redAdd(h),n=this.curve._mulC(this.z).redSqr(),o=i.redSub(n).redSub(n),t=this.curve._mulC(s.redISub(i)).redMul(o),e=this.curve._mulC(i).redMul(a.redISub(h)),r=i.redMul(o);return this.curve.point(t,e,r)},bp.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},bp.prototype._extAdd=function(t){var e=this.y.redSub(this.x).redMul(t.y.redSub(t.x)),r=this.y.redAdd(this.x).redMul(t.y.redAdd(t.x)),i=this.t.redMul(this.curve.dd).redMul(t.t),n=this.z.redMul(t.z.redAdd(t.z)),o=r.redSub(e),s=n.redSub(i),a=n.redAdd(i),h=r.redAdd(e),u=o.redMul(s),f=a.redMul(h),l=o.redMul(h),c=s.redMul(a);return this.curve.point(u,f,c,l)},bp.prototype._projAdd=function(t){var e,r,i=this.z.redMul(t.z),n=i.redSqr(),o=this.x.redMul(t.x),s=this.y.redMul(t.y),a=this.curve.d.redMul(o).redMul(s),h=n.redSub(a),u=n.redAdd(a),f=this.x.redAdd(this.y).redMul(t.x.redAdd(t.y)).redISub(o).redISub(s),l=i.redMul(h).redMul(f);return this.curve.twisted?(e=i.redMul(u).redMul(s.redSub(this.curve._mulA(o))),r=h.redMul(u)):(e=i.redMul(u).redMul(s.redSub(o)),r=this.curve._mulC(h).redMul(u)),this.curve.point(l,e,r)},bp.prototype.add=function(t){return this.isInfinity()?t:t.isInfinity()?this:this.curve.extended?this._extAdd(t):this._projAdd(t)},bp.prototype.mul=function(t){return this._hasDoubles(t)?this.curve._fixedNafMul(this,t):this.curve._wnafMul(this,t)},bp.prototype.mulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!1)},bp.prototype.jmulAdd=function(t,e,r){return this.curve._wnafMulAdd(1,[this,e],[t,r],2,!0)},bp.prototype.normalize=function(){if(this.zOne)return this;var t=this.z.redInvm();return this.x=this.x.redMul(t),this.y=this.y.redMul(t),this.t&&(this.t=this.t.redMul(t)),this.z=this.curve.one,this.zOne=!0,this},bp.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},bp.prototype.getX=function(){return this.normalize(),this.x.fromRed()},bp.prototype.getY=function(){return this.normalize(),this.y.fromRed()},bp.prototype.eq=function(t){return this===t||0===this.getX().cmp(t.getX())&&0===this.getY().cmp(t.getY())},bp.prototype.eqXToP=function(t){var e=t.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(e))return!0;for(var r=t.clone(),i=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(e.redIAdd(i),0===this.x.cmp(e))return!0}},bp.prototype.toP=bp.prototype.normalize,bp.prototype.mixedAdd=bp.prototype.add,function(t){var e=t;e.base=Zd,e.short=rp,e.mont=fp,e.edwards=yp}(zd);var vp={},wp={},_p={},Mp=Gf,Sp=Wn;function Ep(t,e){return 55296==(64512&t.charCodeAt(e))&&(!(e<0||e+1>=t.length)&&56320==(64512&t.charCodeAt(e+1)))}function kp(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function Ap(t){return 1===t.length?"0"+t:t}function Op(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}_p.inherits=Sp,_p.toArray=function(t,e){if(Array.isArray(t))return t.slice();if(!t)return[];var r=[];if("string"==typeof t)if(e){if("hex"===e)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),n=0;n>6|192,r[i++]=63&o|128):Ep(t,n)?(o=65536+((1023&o)<<10)+(1023&t.charCodeAt(++n)),r[i++]=o>>18|240,r[i++]=o>>12&63|128,r[i++]=o>>6&63|128,r[i++]=63&o|128):(r[i++]=o>>12|224,r[i++]=o>>6&63|128,r[i++]=63&o|128)}else for(n=0;n>>0}return o},_p.split32=function(t,e){for(var r=new Array(4*t.length),i=0,n=0;i>>24,r[n+1]=o>>>16&255,r[n+2]=o>>>8&255,r[n+3]=255&o):(r[n+3]=o>>>24,r[n+2]=o>>>16&255,r[n+1]=o>>>8&255,r[n]=255&o)}return r},_p.rotr32=function(t,e){return t>>>e|t<<32-e},_p.rotl32=function(t,e){return t<>>32-e},_p.sum32=function(t,e){return t+e>>>0},_p.sum32_3=function(t,e,r){return t+e+r>>>0},_p.sum32_4=function(t,e,r,i){return t+e+r+i>>>0},_p.sum32_5=function(t,e,r,i,n){return t+e+r+i+n>>>0},_p.sum64=function(t,e,r,i){var n=t[e],o=i+t[e+1]>>>0,s=(o>>0,t[e+1]=o},_p.sum64_hi=function(t,e,r,i){return(e+i>>>0>>0},_p.sum64_lo=function(t,e,r,i){return e+i>>>0},_p.sum64_4_hi=function(t,e,r,i,n,o,s,a){var h=0,u=e;return h+=(u=u+i>>>0)>>0)>>0)>>0},_p.sum64_4_lo=function(t,e,r,i,n,o,s,a){return e+i+o+a>>>0},_p.sum64_5_hi=function(t,e,r,i,n,o,s,a,h,u){var f=0,l=e;return f+=(l=l+i>>>0)>>0)>>0)>>0)>>0},_p.sum64_5_lo=function(t,e,r,i,n,o,s,a,h,u){return e+i+o+a+u>>>0},_p.rotr64_hi=function(t,e,r){return(e<<32-r|t>>>r)>>>0},_p.rotr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0},_p.shr64_hi=function(t,e,r){return t>>>r},_p.shr64_lo=function(t,e,r){return(t<<32-r|e>>>r)>>>0};var Tp={},Ip=_p,Rp=Gf;function Cp(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}Tp.BlockHash=Cp,Cp.prototype.update=function(t,e){if(t=Ip.toArray(t,e),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var r=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-r,t.length),0===this.pending.length&&(this.pending=null),t=Ip.join32(t,0,t.length-r,this.endian);for(var i=0;i>>24&255,i[n++]=t>>>16&255,i[n++]=t>>>8&255,i[n++]=255&t}else for(i[n++]=255&t,i[n++]=t>>>8&255,i[n++]=t>>>16&255,i[n++]=t>>>24&255,i[n++]=0,i[n++]=0,i[n++]=0,i[n++]=0,o=8;o>>3},xp.g1_256=function(t){return Np(t,17)^Np(t,19)^t>>>10};var jp=_p,Up=Tp,qp=xp,Fp=jp.rotl32,zp=jp.sum32,Hp=jp.sum32_5,Kp=qp.ft_1,Vp=Up.BlockHash,Gp=[1518500249,1859775393,2400959708,3395469782];function Wp(){if(!(this instanceof Wp))return new Wp;Vp.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}jp.inherits(Wp,Vp);var Yp=Wp;Wp.blockSize=512,Wp.outSize=160,Wp.hmacStrength=80,Wp.padLength=64,Wp.prototype._update=function(t,e){for(var r=this.W,i=0;i<16;i++)r[i]=t[e+i];for(;ithis.blockSize&&(t=(new this.Hash).update(t).digest()),dg(t.length<=this.blockSize);for(var e=t.length;e=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(e,r,i)}var Mg=_g;_g.prototype._init=function(t,e,r){var i=t.concat(e).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var n=0;n=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(t.concat(r||[])),this._reseed=1},_g.prototype.generate=function(t,e,r,i){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof e&&(i=r,r=e,e=null),r&&(r=vg.toArray(r,i||"hex"),this._update(r));for(var n=[];n.length"};var Og=Ud,Tg=jd,Ig=Tg.assert;function Rg(t,e){if(t instanceof Rg)return t;this._importDER(t,e)||(Ig(t.r&&t.s,"Signature without r or s"),this.r=new Og(t.r,16),this.s=new Og(t.s,16),void 0===t.recoveryParam?this.recoveryParam=null:this.recoveryParam=t.recoveryParam)}var Cg,Pg,xg=Rg;function Ng(){this.place=0}function Bg(t,e){var r=t[e.place++];if(!(128&r))return r;var i=15&r;if(0===i||i>4)return!1;for(var n=0,o=0,s=e.place;o>>=0;return!(n<=127)&&(e.place=s,n)}function Lg(t){for(var e=0,r=t.length-1;!t[e]&&!(128&t[e+1])&&e>>3);for(t.push(128|r);--r;)t.push(e>>>(r<<3)&255);t.push(e)}}Rg.prototype._importDER=function(t,e){t=Tg.toArray(t,e);var r=new Ng;if(48!==t[r.place++])return!1;var i=Bg(t,r);if(!1===i)return!1;if(i+r.place!==t.length)return!1;if(2!==t[r.place++])return!1;var n=Bg(t,r);if(!1===n)return!1;var o=t.slice(r.place,n+r.place);if(r.place+=n,2!==t[r.place++])return!1;var s=Bg(t,r);if(!1===s)return!1;if(t.length!==s+r.place)return!1;var a=t.slice(r.place,s+r.place);if(0===o[0]){if(!(128&o[1]))return!1;o=o.slice(1)}if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}return this.r=new Og(o),this.s=new Og(a),this.recoveryParam=null,!0},Rg.prototype.toDER=function(t){var e=this.r.toArray(),r=this.s.toArray();for(128&e[0]&&(e=[0].concat(e)),128&r[0]&&(r=[0].concat(r)),e=Lg(e),r=Lg(r);!(r[0]||128&r[1]);)r=r.slice(1);var i=[2];Dg(i,e.length),(i=i.concat(e)).push(2),Dg(i,r.length);var n=i.concat(r),o=[48];return Dg(o,n.length),o=o.concat(n),Tg.encode(o,t)};var jg=jd,Ug=jg.assert,qg=jg.parseBytes,Fg=jg.cachedProperty;function zg(t,e){this.eddsa=t,this._secret=qg(e.secret),t.isPoint(e.pub)?this._pub=e.pub:this._pubBytes=qg(e.pub)}zg.fromPublic=function(t,e){return e instanceof zg?e:new zg(t,{pub:e})},zg.fromSecret=function(t,e){return e instanceof zg?e:new zg(t,{secret:e})},zg.prototype.secret=function(){return this._secret},Fg(zg,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),Fg(zg,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),Fg(zg,"privBytes",(function(){var t=this.eddsa,e=this.hash(),r=t.encodingLength-1,i=e.slice(0,t.encodingLength);return i[0]&=248,i[r]&=127,i[r]|=64,i})),Fg(zg,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),Fg(zg,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),Fg(zg,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),zg.prototype.sign=function(t){return Ug(this._secret,"KeyPair can only verify"),this.eddsa.sign(t,this)},zg.prototype.verify=function(t,e){return this.eddsa.verify(t,e,this)},zg.prototype.getSecret=function(t){return Ug(this._secret,"KeyPair is public only"),jg.encode(this.secret(),t)},zg.prototype.getPublic=function(t){return jg.encode(this.pubBytes(),t)};var Hg=zg,Kg=Ud,Vg=jd,Gg=Vg.assert,Wg=Vg.cachedProperty,Yg=Vg.parseBytes;function Zg(t,e){this.eddsa=t,"object"!=typeof e&&(e=Yg(e)),Array.isArray(e)&&(e={R:e.slice(0,t.encodingLength),S:e.slice(t.encodingLength)}),Gg(e.R&&e.S,"Signature without R or S"),t.isPoint(e.R)&&(this._R=e.R),e.S instanceof Kg&&(this._S=e.S),this._Rencoded=Array.isArray(e.R)?e.R:e.Rencoded,this._Sencoded=Array.isArray(e.S)?e.S:e.Sencoded}Wg(Zg,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),Wg(Zg,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),Wg(Zg,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),Wg(Zg,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),Zg.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},Zg.prototype.toHex=function(){return Vg.encode(this.toBytes(),"hex").toUpperCase()};var Xg=Zg,Qg=wp,Jg=vp,$g=jd,ty=$g.assert,ey=$g.parseBytes,ry=Hg,iy=Xg;function ny(t){if(ty("ed25519"===t,"only tested with ed25519 so far"),!(this instanceof ny))return new ny(t);t=Jg[t].curve,this.curve=t,this.g=t.g,this.g.precompute(t.n.bitLength()+1),this.pointClass=t.point().constructor,this.encodingLength=Math.ceil(t.n.bitLength()/8),this.hash=Qg.sha512}var oy,sy=ny;function ay(){return oy||(oy=1,function(t){var e=t;e.version=Dd.version,e.utils=jd,e.rand=vd(),e.curve=zd,e.curves=vp,e.ec=function(){if(Pg)return Cg;Pg=1;var t=Ud,e=Mg,r=jd,i=vp,n=vd(),o=r.assert,s=Ag,a=xg;function h(t){if(!(this instanceof h))return new h(t);"string"==typeof t&&(o(Object.prototype.hasOwnProperty.call(i,t),"Unknown curve "+t),t=i[t]),t instanceof i.PresetCurve&&(t={curve:t}),this.curve=t.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=t.curve.g,this.g.precompute(t.curve.n.bitLength()+1),this.hash=t.hash||t.curve.hash}return Cg=h,h.prototype.keyPair=function(t){return new s(this,t)},h.prototype.keyFromPrivate=function(t,e){return s.fromPrivate(this,t,e)},h.prototype.keyFromPublic=function(t,e){return s.fromPublic(this,t,e)},h.prototype.genKeyPair=function(r){r||(r={});for(var i=new e({hash:this.hash,pers:r.pers,persEnc:r.persEnc||"utf8",entropy:r.entropy||n(this.hash.hmacStrength),entropyEnc:r.entropy&&r.entropyEnc||"utf8",nonce:this.n.toArray()}),o=this.n.byteLength(),s=this.n.sub(new t(2));;){var a=new t(i.generate(o));if(!(a.cmp(s)>0))return a.iaddn(1),this.keyFromPrivate(a)}},h.prototype._truncateToN=function(t,e){var r=8*t.byteLength()-this.n.bitLength();return r>0&&(t=t.ushrn(r)),!e&&t.cmp(this.n)>=0?t.sub(this.n):t},h.prototype.sign=function(r,i,n,o){"object"==typeof n&&(o=n,n=null),o||(o={}),i=this.keyFromPrivate(i,n),r=this._truncateToN(new t(r,16));for(var s=this.n.byteLength(),h=i.getPrivate().toArray("be",s),u=r.toArray("be",s),f=new e({hash:this.hash,entropy:h,nonce:u,pers:o.pers,persEnc:o.persEnc||"utf8"}),l=this.n.sub(new t(1)),c=0;;c++){var d=o.k?o.k(c):new t(f.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(l)>=0)){var p=this.g.mul(d);if(!p.isInfinity()){var m=p.getX(),g=m.umod(this.n);if(0!==g.cmpn(0)){var y=d.invm(this.n).mul(g.mul(i.getPrivate()).iadd(r));if(0!==(y=y.umod(this.n)).cmpn(0)){var b=(p.getY().isOdd()?1:0)|(0!==m.cmp(g)?2:0);return o.canonical&&y.cmp(this.nh)>0&&(y=this.n.sub(y),b^=1),new a({r:g,s:y,recoveryParam:b})}}}}}},h.prototype.verify=function(e,r,i,n){e=this._truncateToN(new t(e,16)),i=this.keyFromPublic(i,n);var o=(r=new a(r,"hex")).r,s=r.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var h,u=s.invm(this.n),f=u.mul(e).umod(this.n),l=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(h=this.g.jmulAdd(f,i.getPublic(),l)).isInfinity()&&h.eqXToP(o):!(h=this.g.mulAdd(f,i.getPublic(),l)).isInfinity()&&0===h.getX().umod(this.n).cmp(o)},h.prototype.recoverPubKey=function(e,r,i,n){o((3&i)===i,"The recovery param is more than two bits"),r=new a(r,n);var s=this.n,h=new t(e),u=r.r,f=r.s,l=1&i,c=i>>1;if(u.cmp(this.curve.p.umod(this.curve.n))>=0&&c)throw new Error("Unable to find sencond key candinate");u=c?this.curve.pointFromX(u.add(this.curve.n),l):this.curve.pointFromX(u,l);var d=r.r.invm(s),p=s.sub(h).mul(d).umod(s),m=f.mul(d).umod(s);return this.g.mulAdd(p,u,m)},h.prototype.getKeyRecoveryParam=function(t,e,r,i){if(null!==(e=new a(e,i)).recoveryParam)return e.recoveryParam;for(var n=0;n<4;n++){var o;try{o=this.recoverPubKey(t,e,n)}catch(t){continue}if(o.eq(r))return n}throw new Error("Unable to find valid recovery factor")},Cg}(),e.eddsa=sy}(Ld)),Ld}ny.prototype.sign=function(t,e){t=ey(t);var r=this.keyFromSecret(e),i=this.hashInt(r.messagePrefix(),t),n=this.g.mul(i),o=this.encodePoint(n),s=this.hashInt(o,r.pubBytes(),t).mul(r.priv()),a=i.add(s).umod(this.curve.n);return this.makeSignature({R:n,S:a,Rencoded:o})},ny.prototype.verify=function(t,e,r){t=ey(t),e=this.makeSignature(e);var i=this.keyFromPublic(r),n=this.hashInt(e.Rencoded(),i.pubBytes(),t),o=this.g.mul(e.S());return e.R().add(i.pub().mul(n)).eq(o)},ny.prototype.hashInt=function(){for(var t=this.hash(),e=0;e=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function a(t,e,r){var i=s(t,r);return r-1>=e&&(i|=s(t,r-1)<<4),i}function h(t,e,r,i){for(var n=0,o=Math.min(t.length,r),s=e;s=49?a-49+10:a>=17?a-17+10:a}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,i){if("number"==typeof t)return this._initNumber(t,e,i);if("object"==typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===i)for(n=0,o=0;n>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i=e;i-=2)n=a(t,e,i)<=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(t.length-e)%2==0?e+1:e;i=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var o=t.length-r,s=o%i,a=Math.min(o,o-s)+r,u=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function c(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,a=67108863&s,h=s/67108864|0;r.words[0]=a;for(var u=1;u>>26,l=67108863&h,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[u]=0|l,h=0|f}return 0!==h?r.words[u]=0|h:r.length--,r.strip()}n.prototype.toString=function(t,e){var i;if(e=0|e||1,16===(t=t||10)||"hex"===t){i="";for(var n=0,o=0,s=0;s>>24-n&16777215)||s!==this.length-1?u[6-h.length]+h+i:h+i,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(i=o.toString(16)+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var c=f[t],d=l[t];i="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);i=(p=p.idivn(d)).isZero()?m+i:u[c-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return r(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,i){var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,h="le"===e,u=new t(o),f=this.clone();if(h){for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),u[a]=s;for(;a=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},n.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;it.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var i=t/26|0,n=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<t.length?(r=this,i=t):(r=t,i=this);for(var n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},n.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,M=0|s[4],S=8191&M,E=M>>>13,k=0|s[5],A=8191&k,O=k>>>13,T=0|s[6],I=8191&T,R=T>>>13,C=0|s[7],P=8191&C,x=C>>>13,N=0|s[8],B=8191&N,L=N>>>13,D=0|s[9],j=8191&D,U=D>>>13,q=0|a[0],F=8191&q,z=q>>>13,H=0|a[1],K=8191&H,V=H>>>13,G=0|a[2],W=8191&G,Y=G>>>13,Z=0|a[3],X=8191&Z,Q=Z>>>13,J=0|a[4],$=8191&J,tt=J>>>13,et=0|a[5],rt=8191&et,it=et>>>13,nt=0|a[6],ot=8191&nt,st=nt>>>13,at=0|a[7],ht=8191&at,ut=at>>>13,ft=0|a[8],lt=8191&ft,ct=ft>>>13,dt=0|a[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(i=Math.imul(l,F))|0)+((8191&(n=(n=Math.imul(l,z))+Math.imul(c,F)|0))<<13)|0;u=((o=Math.imul(c,z))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,F),n=(n=Math.imul(p,z))+Math.imul(m,F)|0,o=Math.imul(m,z);var yt=(u+(i=i+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,V)|0)+Math.imul(c,K)|0))<<13)|0;u=((o=o+Math.imul(c,V)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(y,F),n=(n=Math.imul(y,z))+Math.imul(b,F)|0,o=Math.imul(b,z),i=i+Math.imul(p,K)|0,n=(n=n+Math.imul(p,V)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,V)|0;var bt=(u+(i=i+Math.imul(l,W)|0)|0)+((8191&(n=(n=n+Math.imul(l,Y)|0)+Math.imul(c,W)|0))<<13)|0;u=((o=o+Math.imul(c,Y)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(w,F),n=(n=Math.imul(w,z))+Math.imul(_,F)|0,o=Math.imul(_,z),i=i+Math.imul(y,K)|0,n=(n=n+Math.imul(y,V)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,V)|0,i=i+Math.imul(p,W)|0,n=(n=n+Math.imul(p,Y)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,Y)|0;var vt=(u+(i=i+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(c,X)|0))<<13)|0;u=((o=o+Math.imul(c,Q)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(S,F),n=(n=Math.imul(S,z))+Math.imul(E,F)|0,o=Math.imul(E,z),i=i+Math.imul(w,K)|0,n=(n=n+Math.imul(w,V)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,V)|0,i=i+Math.imul(y,W)|0,n=(n=n+Math.imul(y,Y)|0)+Math.imul(b,W)|0,o=o+Math.imul(b,Y)|0,i=i+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(i=i+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0))<<13)|0;u=((o=o+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(A,F),n=(n=Math.imul(A,z))+Math.imul(O,F)|0,o=Math.imul(O,z),i=i+Math.imul(S,K)|0,n=(n=n+Math.imul(S,V)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,V)|0,i=i+Math.imul(w,W)|0,n=(n=n+Math.imul(w,Y)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Y)|0,i=i+Math.imul(y,X)|0,n=(n=n+Math.imul(y,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var _t=(u+(i=i+Math.imul(l,rt)|0)|0)+((8191&(n=(n=n+Math.imul(l,it)|0)+Math.imul(c,rt)|0))<<13)|0;u=((o=o+Math.imul(c,it)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(I,F),n=(n=Math.imul(I,z))+Math.imul(R,F)|0,o=Math.imul(R,z),i=i+Math.imul(A,K)|0,n=(n=n+Math.imul(A,V)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,V)|0,i=i+Math.imul(S,W)|0,n=(n=n+Math.imul(S,Y)|0)+Math.imul(E,W)|0,o=o+Math.imul(E,Y)|0,i=i+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,Q)|0,i=i+Math.imul(y,$)|0,n=(n=n+Math.imul(y,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,it)|0;var Mt=(u+(i=i+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,ot)|0))<<13)|0;u=((o=o+Math.imul(c,st)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(P,F),n=(n=Math.imul(P,z))+Math.imul(x,F)|0,o=Math.imul(x,z),i=i+Math.imul(I,K)|0,n=(n=n+Math.imul(I,V)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,V)|0,i=i+Math.imul(A,W)|0,n=(n=n+Math.imul(A,Y)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,Y)|0,i=i+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,i=i+Math.imul(y,rt)|0,n=(n=n+Math.imul(y,it)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,it)|0,i=i+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(i=i+Math.imul(l,ht)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,ht)|0))<<13)|0;u=((o=o+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(B,F),n=(n=Math.imul(B,z))+Math.imul(L,F)|0,o=Math.imul(L,z),i=i+Math.imul(P,K)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,V)|0,i=i+Math.imul(I,W)|0,n=(n=n+Math.imul(I,Y)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,Y)|0,i=i+Math.imul(A,X)|0,n=(n=n+Math.imul(A,Q)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,Q)|0,i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,it)|0,i=i+Math.imul(y,ot)|0,n=(n=n+Math.imul(y,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,i=i+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(i=i+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((o=o+Math.imul(c,ct)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(j,F),n=(n=Math.imul(j,z))+Math.imul(U,F)|0,o=Math.imul(U,z),i=i+Math.imul(B,K)|0,n=(n=n+Math.imul(B,V)|0)+Math.imul(L,K)|0,o=o+Math.imul(L,V)|0,i=i+Math.imul(P,W)|0,n=(n=n+Math.imul(P,Y)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,Y)|0,i=i+Math.imul(I,X)|0,n=(n=n+Math.imul(I,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,tt)|0,i=i+Math.imul(S,rt)|0,n=(n=n+Math.imul(S,it)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,it)|0,i=i+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,i=i+Math.imul(y,ht)|0,n=(n=n+Math.imul(y,ut)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,ut)|0,i=i+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ct)|0;var kt=(u+(i=i+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((o=o+Math.imul(c,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(j,K),n=(n=Math.imul(j,V))+Math.imul(U,K)|0,o=Math.imul(U,V),i=i+Math.imul(B,W)|0,n=(n=n+Math.imul(B,Y)|0)+Math.imul(L,W)|0,o=o+Math.imul(L,Y)|0,i=i+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,Q)|0,i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,it)|0,i=i+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,i=i+Math.imul(w,ht)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,ut)|0,i=i+Math.imul(y,lt)|0,n=(n=n+Math.imul(y,ct)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,ct)|0;var At=(u+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(j,W),n=(n=Math.imul(j,Y))+Math.imul(U,W)|0,o=Math.imul(U,Y),i=i+Math.imul(B,X)|0,n=(n=n+Math.imul(B,Q)|0)+Math.imul(L,X)|0,o=o+Math.imul(L,Q)|0,i=i+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,tt)|0,i=i+Math.imul(I,rt)|0,n=(n=n+Math.imul(I,it)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,it)|0,i=i+Math.imul(A,ot)|0,n=(n=n+Math.imul(A,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,i=i+Math.imul(S,ht)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,ht)|0,o=o+Math.imul(E,ut)|0,i=i+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ct)|0;var Ot=(u+(i=i+Math.imul(y,pt)|0)|0)+((8191&(n=(n=n+Math.imul(y,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,i=Math.imul(j,X),n=(n=Math.imul(j,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),i=i+Math.imul(B,$)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,tt)|0,i=i+Math.imul(P,rt)|0,n=(n=n+Math.imul(P,it)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,it)|0,i=i+Math.imul(I,ot)|0,n=(n=n+Math.imul(I,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,i=i+Math.imul(A,ht)|0,n=(n=n+Math.imul(A,ut)|0)+Math.imul(O,ht)|0,o=o+Math.imul(O,ut)|0,i=i+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ct)|0;var Tt=(u+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;u=((o=o+Math.imul(_,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(j,$),n=(n=Math.imul(j,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),i=i+Math.imul(B,rt)|0,n=(n=n+Math.imul(B,it)|0)+Math.imul(L,rt)|0,o=o+Math.imul(L,it)|0,i=i+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,i=i+Math.imul(I,ht)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(R,ht)|0,o=o+Math.imul(R,ut)|0,i=i+Math.imul(A,lt)|0,n=(n=n+Math.imul(A,ct)|0)+Math.imul(O,lt)|0,o=o+Math.imul(O,ct)|0;var It=(u+(i=i+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(j,rt),n=(n=Math.imul(j,it))+Math.imul(U,rt)|0,o=Math.imul(U,it),i=i+Math.imul(B,ot)|0,n=(n=n+Math.imul(B,st)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,st)|0,i=i+Math.imul(P,ht)|0,n=(n=n+Math.imul(P,ut)|0)+Math.imul(x,ht)|0,o=o+Math.imul(x,ut)|0,i=i+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,ct)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,ct)|0;var Rt=(u+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(O,pt)|0))<<13)|0;u=((o=o+Math.imul(O,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,i=Math.imul(j,ot),n=(n=Math.imul(j,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),i=i+Math.imul(B,ht)|0,n=(n=n+Math.imul(B,ut)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,ut)|0,i=i+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,ct)|0)+Math.imul(x,lt)|0,o=o+Math.imul(x,ct)|0;var Ct=(u+(i=i+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(j,ht),n=(n=Math.imul(j,ut))+Math.imul(U,ht)|0,o=Math.imul(U,ut),i=i+Math.imul(B,lt)|0,n=(n=n+Math.imul(B,ct)|0)+Math.imul(L,lt)|0,o=o+Math.imul(L,ct)|0;var Pt=(u+(i=i+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(x,pt)|0))<<13)|0;u=((o=o+Math.imul(x,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(j,lt),n=(n=Math.imul(j,ct))+Math.imul(U,lt)|0,o=Math.imul(U,ct);var xt=(u+(i=i+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((o=o+Math.imul(L,mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863;var Nt=(u+(i=Math.imul(j,pt))|0)+((8191&(n=(n=Math.imul(j,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,h[0]=gt,h[1]=yt,h[2]=bt,h[3]=vt,h[4]=wt,h[5]=_t,h[6]=Mt,h[7]=St,h[8]=Et,h[9]=kt,h[10]=At,h[11]=Ot,h[12]=Tt,h[13]=It,h[14]=Rt,h[15]=Ct,h[16]=Pt,h[17]=xt,h[18]=Nt,0!==u&&(h[19]=u,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=c),n.prototype.mulTo=function(t,e){var r,i=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):i<63?c(this,t,e):i<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,i=s,s=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,t,e):p(this,t,e),r},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=n.prototype._countBits(t)-1,i=0;i>=1;return i},m.prototype.permute=function(t,e,r,i,n,o){for(var s=0;s>>=1)n++;return 1<>>=13,i[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,e+=n/67108864|0,e+=o>>>26,this.words[i]=67108863&o}return 0!==e&&(this.words[i]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>n}return e}(t);if(0===e.length)return new n(1);for(var r=this,i=0;i=0);var e,i=t%26,n=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(e=0;e>>26-i}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,u=0;u=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&a}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,i){return r(0===this.negative),this.iushrn(t,e,i)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26,n=1<=0);var e=t%26,i=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==e&&i++,this.length=Math.min(i,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(h/67108864|0),this.words[n+i]=67108863&o}for(;n>26,this.words[n+i]=67108863&o;if(0===a)return this.strip();for(r(-1===a),a=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),o=t,s=0|o.words[o.length-1];0!=(r=26-this._countBits(s))&&(o=o.ushln(r),i.iushln(r),s=0|o.words[o.length-1]);var a,h=i.length-o.length;if("mod"!==e){(a=new n(null)).length=h+1,a.words=new Array(a.length);for(var u=0;u=0;l--){var c=67108864*(0|i.words[o.length+l])+(0|i.words[o.length+l-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(o,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(o,1,l),i.isZero()||(i.negative^=1);a&&(a.words[l]=c)}return a&&a.strip(),i.strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:a||null,mod:i}},n.prototype.divmod=function(t,e,i){return r(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(o=a.div.neg()),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(o=a.div.neg()),{div:o,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,a},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,i=0,n=this.length-1;n>=0;n--)i=(e*i+(0|this.words[n]))%t;return i},n.prototype.idivn=function(t){r(t<=67108863);for(var e=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*e;this.words[i]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),a=new n(0),h=new n(1),u=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++u;for(var f=i.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;0==(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(a.isOdd()||h.isOdd())&&(a.iadd(f),h.isub(l)),a.iushrn(1),h.iushrn(1);e.cmp(i)>=0?(e.isub(i),o.isub(a),s.isub(h)):(i.isub(e),a.isub(o),h.isub(s))}return{a:a,b:h,gcd:i.iushln(u)}},n.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),a=new n(0),h=i.clone();e.cmpn(1)>0&&i.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);for(var l=0,c=1;0==(i.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(i.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(h),a.iushrn(1);e.cmp(i)>=0?(e.isub(i),s.isub(a)):(i.isub(e),a.isub(s))}return(o=0===e.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var o=e;e=r,r=o}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,i=(t-e)/26,n=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,i=t<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)e=1;else{i&&(t=-t),r(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:nt.length)return 1;if(this.length=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){in&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new M(t)},n.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},i(b,y),b.prototype.split=function(t,e){for(var r=4194303,i=Math.min(t.length,9),n=0;n>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new v;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},M.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var i=this.m.add(new n(1)).iushrn(2);return this.pow(t,i)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);r(!o.isZero());var a=new n(1).toRed(this),h=a.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(h);)f.redIAdd(h);for(var l=this.pow(f,o),c=this.pow(t,o.addn(1).iushrn(1)),d=this.pow(t,o),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g=0;i--){for(var u=e.words[i],f=h-1;f>=0;f--){var l=u>>f&1;o!==r[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++a||0===i&&0===f)&&(o=this.mul(o,r[s]),a=0,s=0)):a=0}h=26}return o},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},i(S,M),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(ly,Y);var cy,dy={},py={},my=zn,gy=my.Buffer,yy={};for(cy in my)my.hasOwnProperty(cy)&&"SlowBuffer"!==cy&&"Buffer"!==cy&&(yy[cy]=my[cy]);var by=yy.Buffer={};for(cy in gy)gy.hasOwnProperty(cy)&&"allocUnsafe"!==cy&&"allocUnsafeSlow"!==cy&&(by[cy]=gy[cy]);if(yy.Buffer.prototype=gy.prototype,by.from&&by.from!==Uint8Array.from||(by.from=function(t,e,r){if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type '+typeof t);if(t&&void 0===t.length)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);return gy(t,e,r)}),by.alloc||(by.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError('The "size" argument must be of type number. Received type '+typeof t);if(t<0||t>=2*(1<<30))throw new RangeError('The value "'+t+'" is invalid for option "size"');var i=gy(t);return e&&0!==e.length?"string"==typeof r?i.fill(e,r):i.fill(e):i.fill(0),i}),!yy.kStringMaxLength)try{yy.kStringMaxLength=Bn.binding("buffer").kStringMaxLength}catch(_i){}yy.constants||(yy.constants={MAX_LENGTH:yy.kMaxLength},yy.kStringMaxLength&&(yy.constants.MAX_STRING_LENGTH=yy.kStringMaxLength));var vy=yy,wy={};const _y=Wn;function My(t){this._reporterState={obj:null,path:[],options:t||{},errors:[]}}function Sy(t,e){this.path=t,this.rethrow(e)}wy.Reporter=My,My.prototype.isError=function(t){return t instanceof Sy},My.prototype.save=function(){const t=this._reporterState;return{obj:t.obj,pathLen:t.path.length}},My.prototype.restore=function(t){const e=this._reporterState;e.obj=t.obj,e.path=e.path.slice(0,t.pathLen)},My.prototype.enterKey=function(t){return this._reporterState.path.push(t)},My.prototype.exitKey=function(t){const e=this._reporterState;e.path=e.path.slice(0,t-1)},My.prototype.leaveKey=function(t,e,r){const i=this._reporterState;this.exitKey(t),null!==i.obj&&(i.obj[e]=r)},My.prototype.path=function(){return this._reporterState.path.join("/")},My.prototype.enterObject=function(){const t=this._reporterState,e=t.obj;return t.obj={},e},My.prototype.leaveObject=function(t){const e=this._reporterState,r=e.obj;return e.obj=t,r},My.prototype.error=function(t){let e;const r=this._reporterState,i=t instanceof Sy;if(e=i?t:new Sy(r.path.map((function(t){return"["+JSON.stringify(t)+"]"})).join(""),t.message||t,t.stack),!r.options.partial)throw e;return i||r.errors.push(e),e},My.prototype.wrapResult=function(t){const e=this._reporterState;return e.options.partial?{result:this.isError(t)?null:t,errors:e.errors}:t},_y(Sy,Error),Sy.prototype.rethrow=function(t){if(this.message=t+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,Sy),!this.stack)try{throw new Error(this.message)}catch(t){this.stack=t.stack}return this};var Ey={};const ky=Wn,Ay=wy.Reporter,Oy=vy.Buffer;function Ty(t,e){Ay.call(this,e),Oy.isBuffer(t)?(this.base=t,this.offset=0,this.length=t.length):this.error("Input not Buffer")}function Iy(t,e){if(Array.isArray(t))this.length=0,this.value=t.map((function(t){return Iy.isEncoderBuffer(t)||(t=new Iy(t,e)),this.length+=t.length,t}),this);else if("number"==typeof t){if(!(0<=t&&t<=255))return e.error("non-byte EncoderBuffer value");this.value=t,this.length=1}else if("string"==typeof t)this.value=t,this.length=Oy.byteLength(t);else{if(!Oy.isBuffer(t))return e.error("Unsupported type: "+typeof t);this.value=t,this.length=t.length}}ky(Ty,Ay),Ey.DecoderBuffer=Ty,Ty.isDecoderBuffer=function(t){if(t instanceof Ty)return!0;return"object"==typeof t&&Oy.isBuffer(t.base)&&"DecoderBuffer"===t.constructor.name&&"number"==typeof t.offset&&"number"==typeof t.length&&"function"==typeof t.save&&"function"==typeof t.restore&&"function"==typeof t.isEmpty&&"function"==typeof t.readUInt8&&"function"==typeof t.skip&&"function"==typeof t.raw},Ty.prototype.save=function(){return{offset:this.offset,reporter:Ay.prototype.save.call(this)}},Ty.prototype.restore=function(t){const e=new Ty(this.base);return e.offset=t.offset,e.length=this.offset,this.offset=t.offset,Ay.prototype.restore.call(this,t.reporter),e},Ty.prototype.isEmpty=function(){return this.offset===this.length},Ty.prototype.readUInt8=function(t){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(t||"DecoderBuffer overrun")},Ty.prototype.skip=function(t,e){if(!(this.offset+t<=this.length))return this.error(e||"DecoderBuffer overrun");const r=new Ty(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+t,this.offset+=t,r},Ty.prototype.raw=function(t){return this.base.slice(t?t.offset:this.offset,this.length)},Ey.EncoderBuffer=Iy,Iy.isEncoderBuffer=function(t){if(t instanceof Iy)return!0;return"object"==typeof t&&"EncoderBuffer"===t.constructor.name&&"number"==typeof t.length&&"function"==typeof t.join},Iy.prototype.join=function(t,e){return t||(t=Oy.alloc(this.length)),e||(e=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(t,e),e+=r.length})):("number"==typeof this.value?t[e]=this.value:"string"==typeof this.value?t.write(this.value,e):Oy.isBuffer(this.value)&&this.value.copy(t,e),e+=this.length)),t};const Ry=wy.Reporter,Cy=Ey.EncoderBuffer,Py=Ey.DecoderBuffer,xy=Gf,Ny=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],By=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(Ny);function Ly(t,e,r){const i={};this._baseState=i,i.name=r,i.enc=t,i.parent=e||null,i.children=null,i.tag=null,i.args=null,i.reverseArgs=null,i.choice=null,i.optional=!1,i.any=!1,i.obj=!1,i.use=null,i.useDecoder=null,i.key=null,i.default=null,i.explicit=null,i.implicit=null,i.contains=null,i.parent||(i.children=[],this._wrap())}var Dy=Ly;const jy=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];Ly.prototype.clone=function(){const t=this._baseState,e={};jy.forEach((function(r){e[r]=t[r]}));const r=new this.constructor(e.parent);return r._baseState=e,r},Ly.prototype._wrap=function(){const t=this._baseState;By.forEach((function(e){this[e]=function(){const r=new this.constructor(this);return t.children.push(r),r[e].apply(r,arguments)}}),this)},Ly.prototype._init=function(t){const e=this._baseState;xy(null===e.parent),t.call(this),e.children=e.children.filter((function(t){return t._baseState.parent===this}),this),xy.equal(e.children.length,1,"Root node can have only one child")},Ly.prototype._useArgs=function(t){const e=this._baseState,r=t.filter((function(t){return t instanceof this.constructor}),this);t=t.filter((function(t){return!(t instanceof this.constructor)}),this),0!==r.length&&(xy(null===e.children),e.children=r,r.forEach((function(t){t._baseState.parent=this}),this)),0!==t.length&&(xy(null===e.args),e.args=t,e.reverseArgs=t.map((function(t){if("object"!=typeof t||t.constructor!==Object)return t;const e={};return Object.keys(t).forEach((function(r){r==(0|r)&&(r|=0);const i=t[r];e[i]=r})),e})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(t){Ly.prototype[t]=function(){const e=this._baseState;throw new Error(t+" not implemented for encoding: "+e.enc)}})),Ny.forEach((function(t){Ly.prototype[t]=function(){const e=this._baseState,r=Array.prototype.slice.call(arguments);return xy(null===e.tag),e.tag=t,this._useArgs(r),this}})),Ly.prototype.use=function(t){xy(t);const e=this._baseState;return xy(null===e.use),e.use=t,this},Ly.prototype.optional=function(){return this._baseState.optional=!0,this},Ly.prototype.def=function(t){const e=this._baseState;return xy(null===e.default),e.default=t,e.optional=!0,this},Ly.prototype.explicit=function(t){const e=this._baseState;return xy(null===e.explicit&&null===e.implicit),e.explicit=t,this},Ly.prototype.implicit=function(t){const e=this._baseState;return xy(null===e.explicit&&null===e.implicit),e.implicit=t,this},Ly.prototype.obj=function(){const t=this._baseState,e=Array.prototype.slice.call(arguments);return t.obj=!0,0!==e.length&&this._useArgs(e),this},Ly.prototype.key=function(t){const e=this._baseState;return xy(null===e.key),e.key=t,this},Ly.prototype.any=function(){return this._baseState.any=!0,this},Ly.prototype.choice=function(t){const e=this._baseState;return xy(null===e.choice),e.choice=t,this._useArgs(Object.keys(t).map((function(e){return t[e]}))),this},Ly.prototype.contains=function(t){const e=this._baseState;return xy(null===e.use),e.contains=t,this},Ly.prototype._decode=function(t,e){const r=this._baseState;if(null===r.parent)return t.wrapResult(r.children[0]._decode(t,e));let i,n=r.default,o=!0,s=null;if(null!==r.key&&(s=t.enterKey(r.key)),r.optional){let i=null;if(null!==r.explicit?i=r.explicit:null!==r.implicit?i=r.implicit:null!==r.tag&&(i=r.tag),null!==i||r.any){if(o=this._peekTag(t,i,r.any),t.isError(o))return o}else{const i=t.save();try{null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e),o=!0}catch(t){o=!1}t.restore(i)}}if(r.obj&&o&&(i=t.enterObject()),o){if(null!==r.explicit){const e=this._decodeTag(t,r.explicit);if(t.isError(e))return e;t=e}const i=t.offset;if(null===r.use&&null===r.choice){let e;r.any&&(e=t.save());const i=this._decodeTag(t,null!==r.implicit?r.implicit:r.tag,r.any);if(t.isError(i))return i;r.any?n=t.raw(e):t=i}if(e&&e.track&&null!==r.tag&&e.track(t.path(),i,t.length,"tagged"),e&&e.track&&null!==r.tag&&e.track(t.path(),t.offset,t.length,"content"),r.any||(n=null===r.choice?this._decodeGeneric(r.tag,t,e):this._decodeChoice(t,e)),t.isError(n))return n;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(t,e)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){const i=new Py(n);n=this._getUse(r.contains,t._reporterState.obj)._decode(i,e)}}return r.obj&&o&&(n=t.leaveObject(i)),null===r.key||null===n&&!0!==o?null!==s&&t.exitKey(s):t.leaveKey(s,r.key,n),n},Ly.prototype._decodeGeneric=function(t,e,r){const i=this._baseState;return"seq"===t||"set"===t?null:"seqof"===t||"setof"===t?this._decodeList(e,t,i.args[0],r):/str$/.test(t)?this._decodeStr(e,t,r):"objid"===t&&i.args?this._decodeObjid(e,i.args[0],i.args[1],r):"objid"===t?this._decodeObjid(e,null,null,r):"gentime"===t||"utctime"===t?this._decodeTime(e,t,r):"null_"===t?this._decodeNull(e,r):"bool"===t?this._decodeBool(e,r):"objDesc"===t?this._decodeStr(e,t,r):"int"===t||"enum"===t?this._decodeInt(e,i.args&&i.args[0],r):null!==i.use?this._getUse(i.use,e._reporterState.obj)._decode(e,r):e.error("unknown tag: "+t)},Ly.prototype._getUse=function(t,e){const r=this._baseState;return r.useDecoder=this._use(t,e),xy(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},Ly.prototype._decodeChoice=function(t,e){const r=this._baseState;let i=null,n=!1;return Object.keys(r.choice).some((function(o){const s=t.save(),a=r.choice[o];try{const r=a._decode(t,e);if(t.isError(r))return!1;i={type:o,value:r},n=!0}catch(e){return t.restore(s),!1}return!0}),this),n?i:t.error("Choice not matched")},Ly.prototype._createEncoderBuffer=function(t){return new Cy(t,this.reporter)},Ly.prototype._encode=function(t,e,r){const i=this._baseState;if(null!==i.default&&i.default===t)return;const n=this._encodeValue(t,e,r);return void 0===n||this._skipDefault(n,e,r)?void 0:n},Ly.prototype._encodeValue=function(t,e,r){const i=this._baseState;if(null===i.parent)return i.children[0]._encode(t,e||new Ry);let n=null;if(this.reporter=e,i.optional&&void 0===t){if(null===i.default)return;t=i.default}let o=null,s=!1;if(i.any)n=this._createEncoderBuffer(t);else if(i.choice)n=this._encodeChoice(t,e);else if(i.contains)o=this._getUse(i.contains,r)._encode(t,e),s=!0;else if(i.children)o=i.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,e,t);if(null===r._baseState.key)return e.error("Child should have a key");const i=e.enterKey(r._baseState.key);if("object"!=typeof t)return e.error("Child expected, but input is not object");const n=r._encode(t[r._baseState.key],e,t);return e.leaveKey(i),n}),this).filter((function(t){return t})),o=this._createEncoderBuffer(o);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return e.error("Too many args for : "+i.tag);if(!Array.isArray(t))return e.error("seqof/setof, but data is not Array");const r=this.clone();r._baseState.implicit=null,o=this._createEncoderBuffer(t.map((function(r){const i=this._baseState;return this._getUse(i.args[0],t)._encode(r,e)}),r))}else null!==i.use?n=this._getUse(i.use,r)._encode(t,e):(o=this._encodePrimitive(i.tag,t),s=!0);if(!i.any&&null===i.choice){const t=null!==i.implicit?i.implicit:i.tag,r=null===i.implicit?"universal":"context";null===t?null===i.use&&e.error("Tag could be omitted only for .use()"):null===i.use&&(n=this._encodeComposite(t,s,r,o))}return null!==i.explicit&&(n=this._encodeComposite(i.explicit,!1,"context",n)),n},Ly.prototype._encodeChoice=function(t,e){const r=this._baseState,i=r.choice[t.type];return i||xy(!1,t.type+" not found in "+JSON.stringify(Object.keys(r.choice))),i._encode(t.value,e)},Ly.prototype._encodePrimitive=function(t,e){const r=this._baseState;if(/str$/.test(t))return this._encodeStr(e,t);if("objid"===t&&r.args)return this._encodeObjid(e,r.reverseArgs[0],r.args[1]);if("objid"===t)return this._encodeObjid(e,null,null);if("gentime"===t||"utctime"===t)return this._encodeTime(e,t);if("null_"===t)return this._encodeNull();if("int"===t||"enum"===t)return this._encodeInt(e,r.args&&r.reverseArgs[0]);if("bool"===t)return this._encodeBool(e);if("objDesc"===t)return this._encodeStr(e,t);throw new Error("Unsupported tag: "+t)},Ly.prototype._isNumstr=function(t){return/^[0-9 ]*$/.test(t)},Ly.prototype._isPrintstr=function(t){return/^[A-Za-z0-9 '()+,-./:=?]*$/.test(t)};var Uy={};!function(t){function e(t){const e={};return Object.keys(t).forEach((function(r){(0|r)==r&&(r|=0);const i=t[r];e[i]=r})),e}t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=e(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=e(t.tag)}(Uy);const qy=Wn,Fy=vy.Buffer,zy=Dy,Hy=Uy;function Ky(t){this.enc="der",this.name=t.name,this.entity=t,this.tree=new Gy,this.tree._init(t.body)}var Vy=Ky;function Gy(t){zy.call(this,"der",t)}function Wy(t){return t<10?"0"+t:t}Ky.prototype.encode=function(t,e){return this.tree._encode(t,e).join()},qy(Gy,zy),Gy.prototype._encodeComposite=function(t,e,r,i){const n=function(t,e,r,i){let n;"seqof"===t?t="seq":"setof"===t&&(t="set");if(Hy.tagByName.hasOwnProperty(t))n=Hy.tagByName[t];else{if("number"!=typeof t||(0|t)!==t)return i.error("Unknown tag: "+t);n=t}if(n>=31)return i.error("Multi-octet tag encoding unsupported");e||(n|=32);return n|=Hy.tagClassByName[r||"universal"]<<6,n}(t,e,r,this.reporter);if(i.length<128){const t=Fy.alloc(2);return t[0]=n,t[1]=i.length,this._createEncoderBuffer([t,i])}let o=1;for(let t=i.length;t>=256;t>>=8)o++;const s=Fy.alloc(2+o);s[0]=n,s[1]=128|o;for(let t=1+o,e=i.length;e>0;t--,e>>=8)s[t]=255&e;return this._createEncoderBuffer([s,i])},Gy.prototype._encodeStr=function(t,e){if("bitstr"===e)return this._createEncoderBuffer([0|t.unused,t.data]);if("bmpstr"===e){const e=Fy.alloc(2*t.length);for(let r=0;r=40)return this.reporter.error("Second objid identifier OOB");t.splice(0,2,40*t[0]+t[1])}let i=0;for(let e=0;e=128;r>>=7)i++}const n=Fy.alloc(i);let o=n.length-1;for(let e=t.length-1;e>=0;e--){let r=t[e];for(n[o--]=127&r;(r>>=7)>0;)n[o--]=128|127&r}return this._createEncoderBuffer(n)},Gy.prototype._encodeTime=function(t,e){let r;const i=new Date(t);return"gentime"===e?r=[Wy(i.getUTCFullYear()),Wy(i.getUTCMonth()+1),Wy(i.getUTCDate()),Wy(i.getUTCHours()),Wy(i.getUTCMinutes()),Wy(i.getUTCSeconds()),"Z"].join(""):"utctime"===e?r=[Wy(i.getUTCFullYear()%100),Wy(i.getUTCMonth()+1),Wy(i.getUTCDate()),Wy(i.getUTCHours()),Wy(i.getUTCMinutes()),Wy(i.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+e+" time is not supported yet"),this._encodeStr(r,"octstr")},Gy.prototype._encodeNull=function(){return this._createEncoderBuffer("")},Gy.prototype._encodeInt=function(t,e){if("string"==typeof t){if(!e)return this.reporter.error("String int or enum given, but no values map");if(!e.hasOwnProperty(t))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(t));t=e[t]}if("number"!=typeof t&&!Fy.isBuffer(t)){const e=t.toArray();!t.sign&&128&e[0]&&e.unshift(0),t=Fy.from(e)}if(Fy.isBuffer(t)){let e=t.length;0===t.length&&e++;const r=Fy.alloc(e);return t.copy(r),0===t.length&&(r[0]=0),this._createEncoderBuffer(r)}if(t<128)return this._createEncoderBuffer(t);if(t<256)return this._createEncoderBuffer([0,t]);let r=1;for(let e=t;e>=256;e>>=8)r++;const i=new Array(r);for(let e=i.length-1;e>=0;e--)i[e]=255&t,t>>=8;return 128&i[0]&&i.unshift(0),this._createEncoderBuffer(Fy.from(i))},Gy.prototype._encodeBool=function(t){return this._createEncoderBuffer(t?255:0)},Gy.prototype._use=function(t,e){return"function"==typeof t&&(t=t(e)),t._getEncoder("der").tree},Gy.prototype._skipDefault=function(t,e,r){const i=this._baseState;let n;if(null===i.default)return!1;const o=t.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,e,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n>6],n=0==(32&r);if(31==(31&r)){let i=r;for(r=0;128==(128&i);){if(i=t.readUInt8(e),t.isError(i))return i;r<<=7,r|=127&i}}else r&=31;return{cls:i,primitive:n,tag:r,tagStr:rb.tag[r]}}function ab(t,e,r){let i=t.readUInt8(r);if(t.isError(i))return i;if(!e&&128===i)return null;if(0==(128&i))return i;const n=127&i;if(n>4)return t.error("length octect is too long");i=0;for(let e=0;e0&&r.ishrn(i),r}function u(r,i,n){var o,s;do{for(o=t.alloc(0);8*o.length=0)throw new Error("invalid sig")}return Jb=function(s,a,h,u,f){var l=i(h);if("ec"===l.type){if("ecdsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");return function(t,e,i){var o=n[i.data.algorithm.curve.join(".")];if(!o)throw new Error("unknown curve "+i.data.algorithm.curve.join("."));var s=new r(o),a=i.data.subjectPrivateKey.data;return s.verify(e,t,a)}(s,a,l)}if("dsa"===l.type){if("dsa"!==u)throw new Error("wrong public key type");return function(t,r,n){var s=n.data.p,a=n.data.q,h=n.data.g,u=n.data.pub_key,f=i.signature.decode(t,"der"),l=f.s,c=f.r;o(l,a),o(c,a);var d=e.mont(s),p=l.invm(a),m=h.toRed(d).redPow(new e(r).mul(p).mod(a)).fromRed().mul(u.toRed(d).redPow(c.mul(p).mod(a)).fromRed()).mod(s).mod(a);return 0===m.cmp(c)}(s,a,l)}if("rsa"!==u&&"ecdsa/rsa"!==u)throw new Error("wrong public key type");a=t.concat([f,a]);for(var c=l.modulus.byteLength(),d=[1],p=0;a.length+d.length+2=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function a(t,e,r){var i=s(t,r);return r-1>=e&&(i|=s(t,r-1)<<4),i}function h(t,e,r,i){for(var n=0,o=Math.min(t.length,r),s=e;s=49?a-49+10:a>=17?a-17+10:a}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,i){if("number"==typeof t)return this._initNumber(t,e,i);if("object"==typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===i)for(n=0,o=0;n>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i=e;i-=2)n=a(t,e,i)<=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(t.length-e)%2==0?e+1:e;i=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var o=t.length-r,s=o%i,a=Math.min(o,o-s)+r,u=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function c(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,a=67108863&s,h=s/67108864|0;r.words[0]=a;for(var u=1;u>>26,l=67108863&h,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[u]=0|l,h=0|f}return 0!==h?r.words[u]=0|h:r.length--,r.strip()}n.prototype.toString=function(t,e){var i;if(e=0|e||1,16===(t=t||10)||"hex"===t){i="";for(var n=0,o=0,s=0;s>>24-n&16777215)||s!==this.length-1?u[6-h.length]+h+i:h+i,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(i=o.toString(16)+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var c=f[t],d=l[t];i="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);i=(p=p.idivn(d)).isZero()?m+i:u[c-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return r(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,i){var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,h="le"===e,u=new t(o),f=this.clone();if(h){for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),u[a]=s;for(;a=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},n.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;it.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var i=t/26|0,n=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<t.length?(r=this,i=t):(r=t,i=this);for(var n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},n.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,M=0|s[4],S=8191&M,E=M>>>13,k=0|s[5],A=8191&k,O=k>>>13,T=0|s[6],I=8191&T,R=T>>>13,C=0|s[7],P=8191&C,x=C>>>13,N=0|s[8],B=8191&N,L=N>>>13,D=0|s[9],j=8191&D,U=D>>>13,q=0|a[0],F=8191&q,z=q>>>13,H=0|a[1],K=8191&H,V=H>>>13,G=0|a[2],W=8191&G,Y=G>>>13,Z=0|a[3],X=8191&Z,Q=Z>>>13,J=0|a[4],$=8191&J,tt=J>>>13,et=0|a[5],rt=8191&et,it=et>>>13,nt=0|a[6],ot=8191&nt,st=nt>>>13,at=0|a[7],ht=8191&at,ut=at>>>13,ft=0|a[8],lt=8191&ft,ct=ft>>>13,dt=0|a[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(i=Math.imul(l,F))|0)+((8191&(n=(n=Math.imul(l,z))+Math.imul(c,F)|0))<<13)|0;u=((o=Math.imul(c,z))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,F),n=(n=Math.imul(p,z))+Math.imul(m,F)|0,o=Math.imul(m,z);var yt=(u+(i=i+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,V)|0)+Math.imul(c,K)|0))<<13)|0;u=((o=o+Math.imul(c,V)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(y,F),n=(n=Math.imul(y,z))+Math.imul(b,F)|0,o=Math.imul(b,z),i=i+Math.imul(p,K)|0,n=(n=n+Math.imul(p,V)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,V)|0;var bt=(u+(i=i+Math.imul(l,W)|0)|0)+((8191&(n=(n=n+Math.imul(l,Y)|0)+Math.imul(c,W)|0))<<13)|0;u=((o=o+Math.imul(c,Y)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(w,F),n=(n=Math.imul(w,z))+Math.imul(_,F)|0,o=Math.imul(_,z),i=i+Math.imul(y,K)|0,n=(n=n+Math.imul(y,V)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,V)|0,i=i+Math.imul(p,W)|0,n=(n=n+Math.imul(p,Y)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,Y)|0;var vt=(u+(i=i+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(c,X)|0))<<13)|0;u=((o=o+Math.imul(c,Q)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(S,F),n=(n=Math.imul(S,z))+Math.imul(E,F)|0,o=Math.imul(E,z),i=i+Math.imul(w,K)|0,n=(n=n+Math.imul(w,V)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,V)|0,i=i+Math.imul(y,W)|0,n=(n=n+Math.imul(y,Y)|0)+Math.imul(b,W)|0,o=o+Math.imul(b,Y)|0,i=i+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(i=i+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0))<<13)|0;u=((o=o+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(A,F),n=(n=Math.imul(A,z))+Math.imul(O,F)|0,o=Math.imul(O,z),i=i+Math.imul(S,K)|0,n=(n=n+Math.imul(S,V)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,V)|0,i=i+Math.imul(w,W)|0,n=(n=n+Math.imul(w,Y)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Y)|0,i=i+Math.imul(y,X)|0,n=(n=n+Math.imul(y,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var _t=(u+(i=i+Math.imul(l,rt)|0)|0)+((8191&(n=(n=n+Math.imul(l,it)|0)+Math.imul(c,rt)|0))<<13)|0;u=((o=o+Math.imul(c,it)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(I,F),n=(n=Math.imul(I,z))+Math.imul(R,F)|0,o=Math.imul(R,z),i=i+Math.imul(A,K)|0,n=(n=n+Math.imul(A,V)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,V)|0,i=i+Math.imul(S,W)|0,n=(n=n+Math.imul(S,Y)|0)+Math.imul(E,W)|0,o=o+Math.imul(E,Y)|0,i=i+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,Q)|0,i=i+Math.imul(y,$)|0,n=(n=n+Math.imul(y,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,it)|0;var Mt=(u+(i=i+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,ot)|0))<<13)|0;u=((o=o+Math.imul(c,st)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(P,F),n=(n=Math.imul(P,z))+Math.imul(x,F)|0,o=Math.imul(x,z),i=i+Math.imul(I,K)|0,n=(n=n+Math.imul(I,V)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,V)|0,i=i+Math.imul(A,W)|0,n=(n=n+Math.imul(A,Y)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,Y)|0,i=i+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,i=i+Math.imul(y,rt)|0,n=(n=n+Math.imul(y,it)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,it)|0,i=i+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(i=i+Math.imul(l,ht)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,ht)|0))<<13)|0;u=((o=o+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(B,F),n=(n=Math.imul(B,z))+Math.imul(L,F)|0,o=Math.imul(L,z),i=i+Math.imul(P,K)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,V)|0,i=i+Math.imul(I,W)|0,n=(n=n+Math.imul(I,Y)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,Y)|0,i=i+Math.imul(A,X)|0,n=(n=n+Math.imul(A,Q)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,Q)|0,i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,it)|0,i=i+Math.imul(y,ot)|0,n=(n=n+Math.imul(y,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,i=i+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(i=i+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((o=o+Math.imul(c,ct)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(j,F),n=(n=Math.imul(j,z))+Math.imul(U,F)|0,o=Math.imul(U,z),i=i+Math.imul(B,K)|0,n=(n=n+Math.imul(B,V)|0)+Math.imul(L,K)|0,o=o+Math.imul(L,V)|0,i=i+Math.imul(P,W)|0,n=(n=n+Math.imul(P,Y)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,Y)|0,i=i+Math.imul(I,X)|0,n=(n=n+Math.imul(I,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,tt)|0,i=i+Math.imul(S,rt)|0,n=(n=n+Math.imul(S,it)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,it)|0,i=i+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,i=i+Math.imul(y,ht)|0,n=(n=n+Math.imul(y,ut)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,ut)|0,i=i+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ct)|0;var kt=(u+(i=i+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((o=o+Math.imul(c,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(j,K),n=(n=Math.imul(j,V))+Math.imul(U,K)|0,o=Math.imul(U,V),i=i+Math.imul(B,W)|0,n=(n=n+Math.imul(B,Y)|0)+Math.imul(L,W)|0,o=o+Math.imul(L,Y)|0,i=i+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,Q)|0,i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,it)|0,i=i+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,i=i+Math.imul(w,ht)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,ut)|0,i=i+Math.imul(y,lt)|0,n=(n=n+Math.imul(y,ct)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,ct)|0;var At=(u+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(j,W),n=(n=Math.imul(j,Y))+Math.imul(U,W)|0,o=Math.imul(U,Y),i=i+Math.imul(B,X)|0,n=(n=n+Math.imul(B,Q)|0)+Math.imul(L,X)|0,o=o+Math.imul(L,Q)|0,i=i+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,tt)|0,i=i+Math.imul(I,rt)|0,n=(n=n+Math.imul(I,it)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,it)|0,i=i+Math.imul(A,ot)|0,n=(n=n+Math.imul(A,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,i=i+Math.imul(S,ht)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,ht)|0,o=o+Math.imul(E,ut)|0,i=i+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ct)|0;var Ot=(u+(i=i+Math.imul(y,pt)|0)|0)+((8191&(n=(n=n+Math.imul(y,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,i=Math.imul(j,X),n=(n=Math.imul(j,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),i=i+Math.imul(B,$)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,tt)|0,i=i+Math.imul(P,rt)|0,n=(n=n+Math.imul(P,it)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,it)|0,i=i+Math.imul(I,ot)|0,n=(n=n+Math.imul(I,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,i=i+Math.imul(A,ht)|0,n=(n=n+Math.imul(A,ut)|0)+Math.imul(O,ht)|0,o=o+Math.imul(O,ut)|0,i=i+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ct)|0;var Tt=(u+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;u=((o=o+Math.imul(_,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(j,$),n=(n=Math.imul(j,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),i=i+Math.imul(B,rt)|0,n=(n=n+Math.imul(B,it)|0)+Math.imul(L,rt)|0,o=o+Math.imul(L,it)|0,i=i+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,i=i+Math.imul(I,ht)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(R,ht)|0,o=o+Math.imul(R,ut)|0,i=i+Math.imul(A,lt)|0,n=(n=n+Math.imul(A,ct)|0)+Math.imul(O,lt)|0,o=o+Math.imul(O,ct)|0;var It=(u+(i=i+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(j,rt),n=(n=Math.imul(j,it))+Math.imul(U,rt)|0,o=Math.imul(U,it),i=i+Math.imul(B,ot)|0,n=(n=n+Math.imul(B,st)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,st)|0,i=i+Math.imul(P,ht)|0,n=(n=n+Math.imul(P,ut)|0)+Math.imul(x,ht)|0,o=o+Math.imul(x,ut)|0,i=i+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,ct)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,ct)|0;var Rt=(u+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(O,pt)|0))<<13)|0;u=((o=o+Math.imul(O,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,i=Math.imul(j,ot),n=(n=Math.imul(j,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),i=i+Math.imul(B,ht)|0,n=(n=n+Math.imul(B,ut)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,ut)|0,i=i+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,ct)|0)+Math.imul(x,lt)|0,o=o+Math.imul(x,ct)|0;var Ct=(u+(i=i+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(j,ht),n=(n=Math.imul(j,ut))+Math.imul(U,ht)|0,o=Math.imul(U,ut),i=i+Math.imul(B,lt)|0,n=(n=n+Math.imul(B,ct)|0)+Math.imul(L,lt)|0,o=o+Math.imul(L,ct)|0;var Pt=(u+(i=i+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(x,pt)|0))<<13)|0;u=((o=o+Math.imul(x,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(j,lt),n=(n=Math.imul(j,ct))+Math.imul(U,lt)|0,o=Math.imul(U,ct);var xt=(u+(i=i+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((o=o+Math.imul(L,mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863;var Nt=(u+(i=Math.imul(j,pt))|0)+((8191&(n=(n=Math.imul(j,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,h[0]=gt,h[1]=yt,h[2]=bt,h[3]=vt,h[4]=wt,h[5]=_t,h[6]=Mt,h[7]=St,h[8]=Et,h[9]=kt,h[10]=At,h[11]=Ot,h[12]=Tt,h[13]=It,h[14]=Rt,h[15]=Ct,h[16]=Pt,h[17]=xt,h[18]=Nt,0!==u&&(h[19]=u,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=c),n.prototype.mulTo=function(t,e){var r,i=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):i<63?c(this,t,e):i<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,i=s,s=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,t,e):p(this,t,e),r},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=n.prototype._countBits(t)-1,i=0;i>=1;return i},m.prototype.permute=function(t,e,r,i,n,o){for(var s=0;s>>=1)n++;return 1<>>=13,i[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,e+=n/67108864|0,e+=o>>>26,this.words[i]=67108863&o}return 0!==e&&(this.words[i]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>n}return e}(t);if(0===e.length)return new n(1);for(var r=this,i=0;i=0);var e,i=t%26,n=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(e=0;e>>26-i}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,u=0;u=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&a}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,i){return r(0===this.negative),this.iushrn(t,e,i)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26,n=1<=0);var e=t%26,i=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==e&&i++,this.length=Math.min(i,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(h/67108864|0),this.words[n+i]=67108863&o}for(;n>26,this.words[n+i]=67108863&o;if(0===a)return this.strip();for(r(-1===a),a=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),o=t,s=0|o.words[o.length-1];0!=(r=26-this._countBits(s))&&(o=o.ushln(r),i.iushln(r),s=0|o.words[o.length-1]);var a,h=i.length-o.length;if("mod"!==e){(a=new n(null)).length=h+1,a.words=new Array(a.length);for(var u=0;u=0;l--){var c=67108864*(0|i.words[o.length+l])+(0|i.words[o.length+l-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(o,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(o,1,l),i.isZero()||(i.negative^=1);a&&(a.words[l]=c)}return a&&a.strip(),i.strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:a||null,mod:i}},n.prototype.divmod=function(t,e,i){return r(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(o=a.div.neg()),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(o=a.div.neg()),{div:o,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,a},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,i=0,n=this.length-1;n>=0;n--)i=(e*i+(0|this.words[n]))%t;return i},n.prototype.idivn=function(t){r(t<=67108863);for(var e=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*e;this.words[i]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),a=new n(0),h=new n(1),u=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++u;for(var f=i.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;0==(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(a.isOdd()||h.isOdd())&&(a.iadd(f),h.isub(l)),a.iushrn(1),h.iushrn(1);e.cmp(i)>=0?(e.isub(i),o.isub(a),s.isub(h)):(i.isub(e),a.isub(o),h.isub(s))}return{a:a,b:h,gcd:i.iushln(u)}},n.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),a=new n(0),h=i.clone();e.cmpn(1)>0&&i.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);for(var l=0,c=1;0==(i.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(i.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(h),a.iushrn(1);e.cmp(i)>=0?(e.isub(i),s.isub(a)):(i.isub(e),a.isub(s))}return(o=0===e.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var o=e;e=r,r=o}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,i=(t-e)/26,n=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,i=t<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)e=1;else{i&&(t=-t),r(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:nt.length)return 1;if(this.length=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){in&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new M(t)},n.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},i(b,y),b.prototype.split=function(t,e){for(var r=4194303,i=Math.min(t.length,9),n=0;n>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new v;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},M.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var i=this.m.add(new n(1)).iushrn(2);return this.pow(t,i)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);r(!o.isZero());var a=new n(1).toRed(this),h=a.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(h);)f.redIAdd(h);for(var l=this.pow(f,o),c=this.pow(t,o.addn(1).iushrn(1)),d=this.pow(t,o),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g=0;i--){for(var u=e.words[i],f=h-1;f>=0;f--){var l=u>>f&1;o!==r[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++a||0===i&&0===f)&&(o=this.mul(o,r[s]),a=0,s=0)):a=0}h=26}return o},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},i(S,M),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(hv,Y);var uv={},fv=Fu,lv=qn.Buffer,cv=function(t,e){for(var r,i=lv.alloc(0),n=0;i.length=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function a(t,e,r){var i=s(t,r);return r-1>=e&&(i|=s(t,r-1)<<4),i}function h(t,e,r,i){for(var n=0,o=Math.min(t.length,r),s=e;s=49?a-49+10:a>=17?a-17+10:a}return n}n.isBN=function(t){return t instanceof n||null!==t&&"object"==typeof t&&t.constructor.wordSize===n.wordSize&&Array.isArray(t.words)},n.max=function(t,e){return t.cmp(e)>0?t:e},n.min=function(t,e){return t.cmp(e)<0?t:e},n.prototype._init=function(t,e,i){if("number"==typeof t)return this._initNumber(t,e,i);if("object"==typeof t)return this._initArray(t,e,i);"hex"===e&&(e=16),r(e===(0|e)&&e>=2&&e<=36);var n=0;"-"===(t=t.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)s=t[n]|t[n-1]<<8|t[n-2]<<16,this.words[o]|=s<>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===i)for(n=0,o=0;n>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},n.prototype._parseHex=function(t,e,r){this.length=Math.ceil((t.length-e)/6),this.words=new Array(this.length);for(var i=0;i=e;i-=2)n=a(t,e,i)<=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;else for(i=(t.length-e)%2==0?e+1:e;i=18?(o-=18,s+=1,this.words[s]|=n>>>26):o+=8;this.strip()},n.prototype._parseBase=function(t,e,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=67108863;n*=e)i++;i--,n=n/e|0;for(var o=t.length-r,s=o%i,a=Math.min(o,o-s)+r,u=0,f=r;f1&&0===this.words[this.length-1];)this.length--;return this._normSign()},n.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},n.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],l=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function c(t,e,r){r.negative=e.negative^t.negative;var i=t.length+e.length|0;r.length=i,i=i-1|0;var n=0|t.words[0],o=0|e.words[0],s=n*o,a=67108863&s,h=s/67108864|0;r.words[0]=a;for(var u=1;u>>26,l=67108863&h,c=Math.min(u,e.length-1),d=Math.max(0,u-t.length+1);d<=c;d++){var p=u-d|0;f+=(s=(n=0|t.words[p])*(o=0|e.words[d])+l)/67108864|0,l=67108863&s}r.words[u]=0|l,h=0|f}return 0!==h?r.words[u]=0|h:r.length--,r.strip()}n.prototype.toString=function(t,e){var i;if(e=0|e||1,16===(t=t||10)||"hex"===t){i="";for(var n=0,o=0,s=0;s>>24-n&16777215)||s!==this.length-1?u[6-h.length]+h+i:h+i,(n+=2)>=26&&(n-=26,s--)}for(0!==o&&(i=o.toString(16)+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}if(t===(0|t)&&t>=2&&t<=36){var c=f[t],d=l[t];i="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(t);i=(p=p.idivn(d)).isZero()?m+i:u[c-m.length]+m+i}for(this.isZero()&&(i="0"+i);i.length%e!=0;)i="0"+i;return 0!==this.negative&&(i="-"+i),i}r(!1,"Base should be between 2 and 36")},n.prototype.toNumber=function(){var t=this.words[0];return 2===this.length?t+=67108864*this.words[1]:3===this.length&&1===this.words[2]?t+=4503599627370496+67108864*this.words[1]:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-t:t},n.prototype.toJSON=function(){return this.toString(16)},n.prototype.toBuffer=function(t,e){return r(void 0!==o),this.toArrayLike(o,t,e)},n.prototype.toArray=function(t,e){return this.toArrayLike(Array,t,e)},n.prototype.toArrayLike=function(t,e,i){var n=this.byteLength(),o=i||Math.max(1,n);r(n<=o,"byte array longer than desired length"),r(o>0,"Requested array length <= 0"),this.strip();var s,a,h="le"===e,u=new t(o),f=this.clone();if(h){for(a=0;!f.isZero();a++)s=f.andln(255),f.iushrn(8),u[a]=s;for(;a=4096&&(r+=13,e>>>=13),e>=64&&(r+=7,e>>>=7),e>=8&&(r+=4,e>>>=4),e>=2&&(r+=2,e>>>=2),r+e},n.prototype._zeroBits=function(t){if(0===t)return 26;var e=t,r=0;return 0==(8191&e)&&(r+=13,e>>>=13),0==(127&e)&&(r+=7,e>>>=7),0==(15&e)&&(r+=4,e>>>=4),0==(3&e)&&(r+=2,e>>>=2),0==(1&e)&&r++,r},n.prototype.bitLength=function(){var t=this.words[this.length-1],e=this._countBits(t);return 26*(this.length-1)+e},n.prototype.zeroBits=function(){if(this.isZero())return 0;for(var t=0,e=0;et.length?this.clone().ior(t):t.clone().ior(this)},n.prototype.uor=function(t){return this.length>t.length?this.clone().iuor(t):t.clone().iuor(this)},n.prototype.iuand=function(t){var e;e=this.length>t.length?t:this;for(var r=0;rt.length?this.clone().iand(t):t.clone().iand(this)},n.prototype.uand=function(t){return this.length>t.length?this.clone().iuand(t):t.clone().iuand(this)},n.prototype.iuxor=function(t){var e,r;this.length>t.length?(e=this,r=t):(e=t,r=this);for(var i=0;it.length?this.clone().ixor(t):t.clone().ixor(this)},n.prototype.uxor=function(t){return this.length>t.length?this.clone().iuxor(t):t.clone().iuxor(this)},n.prototype.inotn=function(t){r("number"==typeof t&&t>=0);var e=0|Math.ceil(t/26),i=t%26;this._expand(e),i>0&&e--;for(var n=0;n0&&(this.words[n]=~this.words[n]&67108863>>26-i),this.strip()},n.prototype.notn=function(t){return this.clone().inotn(t)},n.prototype.setn=function(t,e){r("number"==typeof t&&t>=0);var i=t/26|0,n=t%26;return this._expand(i+1),this.words[i]=e?this.words[i]|1<t.length?(r=this,i=t):(r=t,i=this);for(var n=0,o=0;o>>26;for(;0!==n&&o>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;ot.length?this.clone().iadd(t):t.clone().iadd(this)},n.prototype.isub=function(t){if(0!==t.negative){t.negative=0;var e=this.iadd(t);return t.negative=1,e._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(t),this.negative=1,this._normSign();var r,i,n=this.cmp(t);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(r=this,i=t):(r=t,i=this);for(var o=0,s=0;s>26,this.words[s]=67108863&e;for(;0!==o&&s>26,this.words[s]=67108863&e;if(0===o&&s>>13,d=0|s[1],p=8191&d,m=d>>>13,g=0|s[2],y=8191&g,b=g>>>13,v=0|s[3],w=8191&v,_=v>>>13,M=0|s[4],S=8191&M,E=M>>>13,k=0|s[5],A=8191&k,O=k>>>13,T=0|s[6],I=8191&T,R=T>>>13,C=0|s[7],P=8191&C,x=C>>>13,N=0|s[8],B=8191&N,L=N>>>13,D=0|s[9],j=8191&D,U=D>>>13,q=0|a[0],F=8191&q,z=q>>>13,H=0|a[1],K=8191&H,V=H>>>13,G=0|a[2],W=8191&G,Y=G>>>13,Z=0|a[3],X=8191&Z,Q=Z>>>13,J=0|a[4],$=8191&J,tt=J>>>13,et=0|a[5],rt=8191&et,it=et>>>13,nt=0|a[6],ot=8191&nt,st=nt>>>13,at=0|a[7],ht=8191&at,ut=at>>>13,ft=0|a[8],lt=8191&ft,ct=ft>>>13,dt=0|a[9],pt=8191&dt,mt=dt>>>13;r.negative=t.negative^e.negative,r.length=19;var gt=(u+(i=Math.imul(l,F))|0)+((8191&(n=(n=Math.imul(l,z))+Math.imul(c,F)|0))<<13)|0;u=((o=Math.imul(c,z))+(n>>>13)|0)+(gt>>>26)|0,gt&=67108863,i=Math.imul(p,F),n=(n=Math.imul(p,z))+Math.imul(m,F)|0,o=Math.imul(m,z);var yt=(u+(i=i+Math.imul(l,K)|0)|0)+((8191&(n=(n=n+Math.imul(l,V)|0)+Math.imul(c,K)|0))<<13)|0;u=((o=o+Math.imul(c,V)|0)+(n>>>13)|0)+(yt>>>26)|0,yt&=67108863,i=Math.imul(y,F),n=(n=Math.imul(y,z))+Math.imul(b,F)|0,o=Math.imul(b,z),i=i+Math.imul(p,K)|0,n=(n=n+Math.imul(p,V)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,V)|0;var bt=(u+(i=i+Math.imul(l,W)|0)|0)+((8191&(n=(n=n+Math.imul(l,Y)|0)+Math.imul(c,W)|0))<<13)|0;u=((o=o+Math.imul(c,Y)|0)+(n>>>13)|0)+(bt>>>26)|0,bt&=67108863,i=Math.imul(w,F),n=(n=Math.imul(w,z))+Math.imul(_,F)|0,o=Math.imul(_,z),i=i+Math.imul(y,K)|0,n=(n=n+Math.imul(y,V)|0)+Math.imul(b,K)|0,o=o+Math.imul(b,V)|0,i=i+Math.imul(p,W)|0,n=(n=n+Math.imul(p,Y)|0)+Math.imul(m,W)|0,o=o+Math.imul(m,Y)|0;var vt=(u+(i=i+Math.imul(l,X)|0)|0)+((8191&(n=(n=n+Math.imul(l,Q)|0)+Math.imul(c,X)|0))<<13)|0;u=((o=o+Math.imul(c,Q)|0)+(n>>>13)|0)+(vt>>>26)|0,vt&=67108863,i=Math.imul(S,F),n=(n=Math.imul(S,z))+Math.imul(E,F)|0,o=Math.imul(E,z),i=i+Math.imul(w,K)|0,n=(n=n+Math.imul(w,V)|0)+Math.imul(_,K)|0,o=o+Math.imul(_,V)|0,i=i+Math.imul(y,W)|0,n=(n=n+Math.imul(y,Y)|0)+Math.imul(b,W)|0,o=o+Math.imul(b,Y)|0,i=i+Math.imul(p,X)|0,n=(n=n+Math.imul(p,Q)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,Q)|0;var wt=(u+(i=i+Math.imul(l,$)|0)|0)+((8191&(n=(n=n+Math.imul(l,tt)|0)+Math.imul(c,$)|0))<<13)|0;u=((o=o+Math.imul(c,tt)|0)+(n>>>13)|0)+(wt>>>26)|0,wt&=67108863,i=Math.imul(A,F),n=(n=Math.imul(A,z))+Math.imul(O,F)|0,o=Math.imul(O,z),i=i+Math.imul(S,K)|0,n=(n=n+Math.imul(S,V)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,V)|0,i=i+Math.imul(w,W)|0,n=(n=n+Math.imul(w,Y)|0)+Math.imul(_,W)|0,o=o+Math.imul(_,Y)|0,i=i+Math.imul(y,X)|0,n=(n=n+Math.imul(y,Q)|0)+Math.imul(b,X)|0,o=o+Math.imul(b,Q)|0,i=i+Math.imul(p,$)|0,n=(n=n+Math.imul(p,tt)|0)+Math.imul(m,$)|0,o=o+Math.imul(m,tt)|0;var _t=(u+(i=i+Math.imul(l,rt)|0)|0)+((8191&(n=(n=n+Math.imul(l,it)|0)+Math.imul(c,rt)|0))<<13)|0;u=((o=o+Math.imul(c,it)|0)+(n>>>13)|0)+(_t>>>26)|0,_t&=67108863,i=Math.imul(I,F),n=(n=Math.imul(I,z))+Math.imul(R,F)|0,o=Math.imul(R,z),i=i+Math.imul(A,K)|0,n=(n=n+Math.imul(A,V)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,V)|0,i=i+Math.imul(S,W)|0,n=(n=n+Math.imul(S,Y)|0)+Math.imul(E,W)|0,o=o+Math.imul(E,Y)|0,i=i+Math.imul(w,X)|0,n=(n=n+Math.imul(w,Q)|0)+Math.imul(_,X)|0,o=o+Math.imul(_,Q)|0,i=i+Math.imul(y,$)|0,n=(n=n+Math.imul(y,tt)|0)+Math.imul(b,$)|0,o=o+Math.imul(b,tt)|0,i=i+Math.imul(p,rt)|0,n=(n=n+Math.imul(p,it)|0)+Math.imul(m,rt)|0,o=o+Math.imul(m,it)|0;var Mt=(u+(i=i+Math.imul(l,ot)|0)|0)+((8191&(n=(n=n+Math.imul(l,st)|0)+Math.imul(c,ot)|0))<<13)|0;u=((o=o+Math.imul(c,st)|0)+(n>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,i=Math.imul(P,F),n=(n=Math.imul(P,z))+Math.imul(x,F)|0,o=Math.imul(x,z),i=i+Math.imul(I,K)|0,n=(n=n+Math.imul(I,V)|0)+Math.imul(R,K)|0,o=o+Math.imul(R,V)|0,i=i+Math.imul(A,W)|0,n=(n=n+Math.imul(A,Y)|0)+Math.imul(O,W)|0,o=o+Math.imul(O,Y)|0,i=i+Math.imul(S,X)|0,n=(n=n+Math.imul(S,Q)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,Q)|0,i=i+Math.imul(w,$)|0,n=(n=n+Math.imul(w,tt)|0)+Math.imul(_,$)|0,o=o+Math.imul(_,tt)|0,i=i+Math.imul(y,rt)|0,n=(n=n+Math.imul(y,it)|0)+Math.imul(b,rt)|0,o=o+Math.imul(b,it)|0,i=i+Math.imul(p,ot)|0,n=(n=n+Math.imul(p,st)|0)+Math.imul(m,ot)|0,o=o+Math.imul(m,st)|0;var St=(u+(i=i+Math.imul(l,ht)|0)|0)+((8191&(n=(n=n+Math.imul(l,ut)|0)+Math.imul(c,ht)|0))<<13)|0;u=((o=o+Math.imul(c,ut)|0)+(n>>>13)|0)+(St>>>26)|0,St&=67108863,i=Math.imul(B,F),n=(n=Math.imul(B,z))+Math.imul(L,F)|0,o=Math.imul(L,z),i=i+Math.imul(P,K)|0,n=(n=n+Math.imul(P,V)|0)+Math.imul(x,K)|0,o=o+Math.imul(x,V)|0,i=i+Math.imul(I,W)|0,n=(n=n+Math.imul(I,Y)|0)+Math.imul(R,W)|0,o=o+Math.imul(R,Y)|0,i=i+Math.imul(A,X)|0,n=(n=n+Math.imul(A,Q)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,Q)|0,i=i+Math.imul(S,$)|0,n=(n=n+Math.imul(S,tt)|0)+Math.imul(E,$)|0,o=o+Math.imul(E,tt)|0,i=i+Math.imul(w,rt)|0,n=(n=n+Math.imul(w,it)|0)+Math.imul(_,rt)|0,o=o+Math.imul(_,it)|0,i=i+Math.imul(y,ot)|0,n=(n=n+Math.imul(y,st)|0)+Math.imul(b,ot)|0,o=o+Math.imul(b,st)|0,i=i+Math.imul(p,ht)|0,n=(n=n+Math.imul(p,ut)|0)+Math.imul(m,ht)|0,o=o+Math.imul(m,ut)|0;var Et=(u+(i=i+Math.imul(l,lt)|0)|0)+((8191&(n=(n=n+Math.imul(l,ct)|0)+Math.imul(c,lt)|0))<<13)|0;u=((o=o+Math.imul(c,ct)|0)+(n>>>13)|0)+(Et>>>26)|0,Et&=67108863,i=Math.imul(j,F),n=(n=Math.imul(j,z))+Math.imul(U,F)|0,o=Math.imul(U,z),i=i+Math.imul(B,K)|0,n=(n=n+Math.imul(B,V)|0)+Math.imul(L,K)|0,o=o+Math.imul(L,V)|0,i=i+Math.imul(P,W)|0,n=(n=n+Math.imul(P,Y)|0)+Math.imul(x,W)|0,o=o+Math.imul(x,Y)|0,i=i+Math.imul(I,X)|0,n=(n=n+Math.imul(I,Q)|0)+Math.imul(R,X)|0,o=o+Math.imul(R,Q)|0,i=i+Math.imul(A,$)|0,n=(n=n+Math.imul(A,tt)|0)+Math.imul(O,$)|0,o=o+Math.imul(O,tt)|0,i=i+Math.imul(S,rt)|0,n=(n=n+Math.imul(S,it)|0)+Math.imul(E,rt)|0,o=o+Math.imul(E,it)|0,i=i+Math.imul(w,ot)|0,n=(n=n+Math.imul(w,st)|0)+Math.imul(_,ot)|0,o=o+Math.imul(_,st)|0,i=i+Math.imul(y,ht)|0,n=(n=n+Math.imul(y,ut)|0)+Math.imul(b,ht)|0,o=o+Math.imul(b,ut)|0,i=i+Math.imul(p,lt)|0,n=(n=n+Math.imul(p,ct)|0)+Math.imul(m,lt)|0,o=o+Math.imul(m,ct)|0;var kt=(u+(i=i+Math.imul(l,pt)|0)|0)+((8191&(n=(n=n+Math.imul(l,mt)|0)+Math.imul(c,pt)|0))<<13)|0;u=((o=o+Math.imul(c,mt)|0)+(n>>>13)|0)+(kt>>>26)|0,kt&=67108863,i=Math.imul(j,K),n=(n=Math.imul(j,V))+Math.imul(U,K)|0,o=Math.imul(U,V),i=i+Math.imul(B,W)|0,n=(n=n+Math.imul(B,Y)|0)+Math.imul(L,W)|0,o=o+Math.imul(L,Y)|0,i=i+Math.imul(P,X)|0,n=(n=n+Math.imul(P,Q)|0)+Math.imul(x,X)|0,o=o+Math.imul(x,Q)|0,i=i+Math.imul(I,$)|0,n=(n=n+Math.imul(I,tt)|0)+Math.imul(R,$)|0,o=o+Math.imul(R,tt)|0,i=i+Math.imul(A,rt)|0,n=(n=n+Math.imul(A,it)|0)+Math.imul(O,rt)|0,o=o+Math.imul(O,it)|0,i=i+Math.imul(S,ot)|0,n=(n=n+Math.imul(S,st)|0)+Math.imul(E,ot)|0,o=o+Math.imul(E,st)|0,i=i+Math.imul(w,ht)|0,n=(n=n+Math.imul(w,ut)|0)+Math.imul(_,ht)|0,o=o+Math.imul(_,ut)|0,i=i+Math.imul(y,lt)|0,n=(n=n+Math.imul(y,ct)|0)+Math.imul(b,lt)|0,o=o+Math.imul(b,ct)|0;var At=(u+(i=i+Math.imul(p,pt)|0)|0)+((8191&(n=(n=n+Math.imul(p,mt)|0)+Math.imul(m,pt)|0))<<13)|0;u=((o=o+Math.imul(m,mt)|0)+(n>>>13)|0)+(At>>>26)|0,At&=67108863,i=Math.imul(j,W),n=(n=Math.imul(j,Y))+Math.imul(U,W)|0,o=Math.imul(U,Y),i=i+Math.imul(B,X)|0,n=(n=n+Math.imul(B,Q)|0)+Math.imul(L,X)|0,o=o+Math.imul(L,Q)|0,i=i+Math.imul(P,$)|0,n=(n=n+Math.imul(P,tt)|0)+Math.imul(x,$)|0,o=o+Math.imul(x,tt)|0,i=i+Math.imul(I,rt)|0,n=(n=n+Math.imul(I,it)|0)+Math.imul(R,rt)|0,o=o+Math.imul(R,it)|0,i=i+Math.imul(A,ot)|0,n=(n=n+Math.imul(A,st)|0)+Math.imul(O,ot)|0,o=o+Math.imul(O,st)|0,i=i+Math.imul(S,ht)|0,n=(n=n+Math.imul(S,ut)|0)+Math.imul(E,ht)|0,o=o+Math.imul(E,ut)|0,i=i+Math.imul(w,lt)|0,n=(n=n+Math.imul(w,ct)|0)+Math.imul(_,lt)|0,o=o+Math.imul(_,ct)|0;var Ot=(u+(i=i+Math.imul(y,pt)|0)|0)+((8191&(n=(n=n+Math.imul(y,mt)|0)+Math.imul(b,pt)|0))<<13)|0;u=((o=o+Math.imul(b,mt)|0)+(n>>>13)|0)+(Ot>>>26)|0,Ot&=67108863,i=Math.imul(j,X),n=(n=Math.imul(j,Q))+Math.imul(U,X)|0,o=Math.imul(U,Q),i=i+Math.imul(B,$)|0,n=(n=n+Math.imul(B,tt)|0)+Math.imul(L,$)|0,o=o+Math.imul(L,tt)|0,i=i+Math.imul(P,rt)|0,n=(n=n+Math.imul(P,it)|0)+Math.imul(x,rt)|0,o=o+Math.imul(x,it)|0,i=i+Math.imul(I,ot)|0,n=(n=n+Math.imul(I,st)|0)+Math.imul(R,ot)|0,o=o+Math.imul(R,st)|0,i=i+Math.imul(A,ht)|0,n=(n=n+Math.imul(A,ut)|0)+Math.imul(O,ht)|0,o=o+Math.imul(O,ut)|0,i=i+Math.imul(S,lt)|0,n=(n=n+Math.imul(S,ct)|0)+Math.imul(E,lt)|0,o=o+Math.imul(E,ct)|0;var Tt=(u+(i=i+Math.imul(w,pt)|0)|0)+((8191&(n=(n=n+Math.imul(w,mt)|0)+Math.imul(_,pt)|0))<<13)|0;u=((o=o+Math.imul(_,mt)|0)+(n>>>13)|0)+(Tt>>>26)|0,Tt&=67108863,i=Math.imul(j,$),n=(n=Math.imul(j,tt))+Math.imul(U,$)|0,o=Math.imul(U,tt),i=i+Math.imul(B,rt)|0,n=(n=n+Math.imul(B,it)|0)+Math.imul(L,rt)|0,o=o+Math.imul(L,it)|0,i=i+Math.imul(P,ot)|0,n=(n=n+Math.imul(P,st)|0)+Math.imul(x,ot)|0,o=o+Math.imul(x,st)|0,i=i+Math.imul(I,ht)|0,n=(n=n+Math.imul(I,ut)|0)+Math.imul(R,ht)|0,o=o+Math.imul(R,ut)|0,i=i+Math.imul(A,lt)|0,n=(n=n+Math.imul(A,ct)|0)+Math.imul(O,lt)|0,o=o+Math.imul(O,ct)|0;var It=(u+(i=i+Math.imul(S,pt)|0)|0)+((8191&(n=(n=n+Math.imul(S,mt)|0)+Math.imul(E,pt)|0))<<13)|0;u=((o=o+Math.imul(E,mt)|0)+(n>>>13)|0)+(It>>>26)|0,It&=67108863,i=Math.imul(j,rt),n=(n=Math.imul(j,it))+Math.imul(U,rt)|0,o=Math.imul(U,it),i=i+Math.imul(B,ot)|0,n=(n=n+Math.imul(B,st)|0)+Math.imul(L,ot)|0,o=o+Math.imul(L,st)|0,i=i+Math.imul(P,ht)|0,n=(n=n+Math.imul(P,ut)|0)+Math.imul(x,ht)|0,o=o+Math.imul(x,ut)|0,i=i+Math.imul(I,lt)|0,n=(n=n+Math.imul(I,ct)|0)+Math.imul(R,lt)|0,o=o+Math.imul(R,ct)|0;var Rt=(u+(i=i+Math.imul(A,pt)|0)|0)+((8191&(n=(n=n+Math.imul(A,mt)|0)+Math.imul(O,pt)|0))<<13)|0;u=((o=o+Math.imul(O,mt)|0)+(n>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,i=Math.imul(j,ot),n=(n=Math.imul(j,st))+Math.imul(U,ot)|0,o=Math.imul(U,st),i=i+Math.imul(B,ht)|0,n=(n=n+Math.imul(B,ut)|0)+Math.imul(L,ht)|0,o=o+Math.imul(L,ut)|0,i=i+Math.imul(P,lt)|0,n=(n=n+Math.imul(P,ct)|0)+Math.imul(x,lt)|0,o=o+Math.imul(x,ct)|0;var Ct=(u+(i=i+Math.imul(I,pt)|0)|0)+((8191&(n=(n=n+Math.imul(I,mt)|0)+Math.imul(R,pt)|0))<<13)|0;u=((o=o+Math.imul(R,mt)|0)+(n>>>13)|0)+(Ct>>>26)|0,Ct&=67108863,i=Math.imul(j,ht),n=(n=Math.imul(j,ut))+Math.imul(U,ht)|0,o=Math.imul(U,ut),i=i+Math.imul(B,lt)|0,n=(n=n+Math.imul(B,ct)|0)+Math.imul(L,lt)|0,o=o+Math.imul(L,ct)|0;var Pt=(u+(i=i+Math.imul(P,pt)|0)|0)+((8191&(n=(n=n+Math.imul(P,mt)|0)+Math.imul(x,pt)|0))<<13)|0;u=((o=o+Math.imul(x,mt)|0)+(n>>>13)|0)+(Pt>>>26)|0,Pt&=67108863,i=Math.imul(j,lt),n=(n=Math.imul(j,ct))+Math.imul(U,lt)|0,o=Math.imul(U,ct);var xt=(u+(i=i+Math.imul(B,pt)|0)|0)+((8191&(n=(n=n+Math.imul(B,mt)|0)+Math.imul(L,pt)|0))<<13)|0;u=((o=o+Math.imul(L,mt)|0)+(n>>>13)|0)+(xt>>>26)|0,xt&=67108863;var Nt=(u+(i=Math.imul(j,pt))|0)+((8191&(n=(n=Math.imul(j,mt))+Math.imul(U,pt)|0))<<13)|0;return u=((o=Math.imul(U,mt))+(n>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,h[0]=gt,h[1]=yt,h[2]=bt,h[3]=vt,h[4]=wt,h[5]=_t,h[6]=Mt,h[7]=St,h[8]=Et,h[9]=kt,h[10]=At,h[11]=Ot,h[12]=Tt,h[13]=It,h[14]=Rt,h[15]=Ct,h[16]=Pt,h[17]=xt,h[18]=Nt,0!==u&&(h[19]=u,r.length++),r};function p(t,e,r){return(new m).mulp(t,e,r)}function m(t,e){this.x=t,this.y=e}Math.imul||(d=c),n.prototype.mulTo=function(t,e){var r,i=this.length+t.length;return r=10===this.length&&10===t.length?d(this,t,e):i<63?c(this,t,e):i<1024?function(t,e,r){r.negative=e.negative^t.negative,r.length=t.length+e.length;for(var i=0,n=0,o=0;o>>26)|0)>>>26,s&=67108863}r.words[o]=a,i=s,s=n}return 0!==i?r.words[o]=i:r.length--,r.strip()}(this,t,e):p(this,t,e),r},m.prototype.makeRBT=function(t){for(var e=new Array(t),r=n.prototype._countBits(t)-1,i=0;i>=1;return i},m.prototype.permute=function(t,e,r,i,n,o){for(var s=0;s>>=1)n++;return 1<>>=13,i[2*s+1]=8191&o,o>>>=13;for(s=2*e;s>=26,e+=n/67108864|0,e+=o>>>26,this.words[i]=67108863&o}return 0!==e&&(this.words[i]=e,this.length++),this},n.prototype.muln=function(t){return this.clone().imuln(t)},n.prototype.sqr=function(){return this.mul(this)},n.prototype.isqr=function(){return this.imul(this.clone())},n.prototype.pow=function(t){var e=function(t){for(var e=new Array(t.bitLength()),r=0;r>>n}return e}(t);if(0===e.length)return new n(1);for(var r=this,i=0;i=0);var e,i=t%26,n=(t-i)/26,o=67108863>>>26-i<<26-i;if(0!==i){var s=0;for(e=0;e>>26-i}s&&(this.words[e]=s,this.length++)}if(0!==n){for(e=this.length-1;e>=0;e--)this.words[e+n]=this.words[e];for(e=0;e=0),n=e?(e-e%26)/26:0;var o=t%26,s=Math.min((t-o)/26,this.length),a=67108863^67108863>>>o<s)for(this.length-=s,u=0;u=0&&(0!==f||u>=n);u--){var l=0|this.words[u];this.words[u]=f<<26-o|l>>>o,f=l&a}return h&&0!==f&&(h.words[h.length++]=f),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},n.prototype.ishrn=function(t,e,i){return r(0===this.negative),this.iushrn(t,e,i)},n.prototype.shln=function(t){return this.clone().ishln(t)},n.prototype.ushln=function(t){return this.clone().iushln(t)},n.prototype.shrn=function(t){return this.clone().ishrn(t)},n.prototype.ushrn=function(t){return this.clone().iushrn(t)},n.prototype.testn=function(t){r("number"==typeof t&&t>=0);var e=t%26,i=(t-e)/26,n=1<=0);var e=t%26,i=(t-e)/26;if(r(0===this.negative,"imaskn works only with positive numbers"),this.length<=i)return this;if(0!==e&&i++,this.length=Math.min(i,this.length),0!==e){var n=67108863^67108863>>>e<=67108864;e++)this.words[e]-=67108864,e===this.length-1?this.words[e+1]=1:this.words[e+1]++;return this.length=Math.max(this.length,e+1),this},n.prototype.isubn=function(t){if(r("number"==typeof t),r(t<67108864),t<0)return this.iaddn(-t);if(0!==this.negative)return this.negative=0,this.iaddn(t),this.negative=1,this;if(this.words[0]-=t,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var e=0;e>26)-(h/67108864|0),this.words[n+i]=67108863&o}for(;n>26,this.words[n+i]=67108863&o;if(0===a)return this.strip();for(r(-1===a),a=0,n=0;n>26,this.words[n]=67108863&o;return this.negative=1,this.strip()},n.prototype._wordDiv=function(t,e){var r=(this.length,t.length),i=this.clone(),o=t,s=0|o.words[o.length-1];0!=(r=26-this._countBits(s))&&(o=o.ushln(r),i.iushln(r),s=0|o.words[o.length-1]);var a,h=i.length-o.length;if("mod"!==e){(a=new n(null)).length=h+1,a.words=new Array(a.length);for(var u=0;u=0;l--){var c=67108864*(0|i.words[o.length+l])+(0|i.words[o.length+l-1]);for(c=Math.min(c/s|0,67108863),i._ishlnsubmul(o,c,l);0!==i.negative;)c--,i.negative=0,i._ishlnsubmul(o,1,l),i.isZero()||(i.negative^=1);a&&(a.words[l]=c)}return a&&a.strip(),i.strip(),"div"!==e&&0!==r&&i.iushrn(r),{div:a||null,mod:i}},n.prototype.divmod=function(t,e,i){return r(!t.isZero()),this.isZero()?{div:new n(0),mod:new n(0)}:0!==this.negative&&0===t.negative?(a=this.neg().divmod(t,e),"mod"!==e&&(o=a.div.neg()),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.iadd(t)),{div:o,mod:s}):0===this.negative&&0!==t.negative?(a=this.divmod(t.neg(),e),"mod"!==e&&(o=a.div.neg()),{div:o,mod:a.mod}):0!=(this.negative&t.negative)?(a=this.neg().divmod(t.neg(),e),"div"!==e&&(s=a.mod.neg(),i&&0!==s.negative&&s.isub(t)),{div:a.div,mod:s}):t.length>this.length||this.cmp(t)<0?{div:new n(0),mod:this}:1===t.length?"div"===e?{div:this.divn(t.words[0]),mod:null}:"mod"===e?{div:null,mod:new n(this.modn(t.words[0]))}:{div:this.divn(t.words[0]),mod:new n(this.modn(t.words[0]))}:this._wordDiv(t,e);var o,s,a},n.prototype.div=function(t){return this.divmod(t,"div",!1).div},n.prototype.mod=function(t){return this.divmod(t,"mod",!1).mod},n.prototype.umod=function(t){return this.divmod(t,"mod",!0).mod},n.prototype.divRound=function(t){var e=this.divmod(t);if(e.mod.isZero())return e.div;var r=0!==e.div.negative?e.mod.isub(t):e.mod,i=t.ushrn(1),n=t.andln(1),o=r.cmp(i);return o<0||1===n&&0===o?e.div:0!==e.div.negative?e.div.isubn(1):e.div.iaddn(1)},n.prototype.modn=function(t){r(t<=67108863);for(var e=(1<<26)%t,i=0,n=this.length-1;n>=0;n--)i=(e*i+(0|this.words[n]))%t;return i},n.prototype.idivn=function(t){r(t<=67108863);for(var e=0,i=this.length-1;i>=0;i--){var n=(0|this.words[i])+67108864*e;this.words[i]=n/t|0,e=n%t}return this.strip()},n.prototype.divn=function(t){return this.clone().idivn(t)},n.prototype.egcd=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o=new n(1),s=new n(0),a=new n(0),h=new n(1),u=0;e.isEven()&&i.isEven();)e.iushrn(1),i.iushrn(1),++u;for(var f=i.clone(),l=e.clone();!e.isZero();){for(var c=0,d=1;0==(e.words[0]&d)&&c<26;++c,d<<=1);if(c>0)for(e.iushrn(c);c-- >0;)(o.isOdd()||s.isOdd())&&(o.iadd(f),s.isub(l)),o.iushrn(1),s.iushrn(1);for(var p=0,m=1;0==(i.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(i.iushrn(p);p-- >0;)(a.isOdd()||h.isOdd())&&(a.iadd(f),h.isub(l)),a.iushrn(1),h.iushrn(1);e.cmp(i)>=0?(e.isub(i),o.isub(a),s.isub(h)):(i.isub(e),a.isub(o),h.isub(s))}return{a:a,b:h,gcd:i.iushln(u)}},n.prototype._invmp=function(t){r(0===t.negative),r(!t.isZero());var e=this,i=t.clone();e=0!==e.negative?e.umod(t):e.clone();for(var o,s=new n(1),a=new n(0),h=i.clone();e.cmpn(1)>0&&i.cmpn(1)>0;){for(var u=0,f=1;0==(e.words[0]&f)&&u<26;++u,f<<=1);if(u>0)for(e.iushrn(u);u-- >0;)s.isOdd()&&s.iadd(h),s.iushrn(1);for(var l=0,c=1;0==(i.words[0]&c)&&l<26;++l,c<<=1);if(l>0)for(i.iushrn(l);l-- >0;)a.isOdd()&&a.iadd(h),a.iushrn(1);e.cmp(i)>=0?(e.isub(i),s.isub(a)):(i.isub(e),a.isub(s))}return(o=0===e.cmpn(1)?s:a).cmpn(0)<0&&o.iadd(t),o},n.prototype.gcd=function(t){if(this.isZero())return t.abs();if(t.isZero())return this.abs();var e=this.clone(),r=t.clone();e.negative=0,r.negative=0;for(var i=0;e.isEven()&&r.isEven();i++)e.iushrn(1),r.iushrn(1);for(;;){for(;e.isEven();)e.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=e.cmp(r);if(n<0){var o=e;e=r,r=o}else if(0===n||0===r.cmpn(1))break;e.isub(r)}return r.iushln(i)},n.prototype.invm=function(t){return this.egcd(t).a.umod(t)},n.prototype.isEven=function(){return 0==(1&this.words[0])},n.prototype.isOdd=function(){return 1==(1&this.words[0])},n.prototype.andln=function(t){return this.words[0]&t},n.prototype.bincn=function(t){r("number"==typeof t);var e=t%26,i=(t-e)/26,n=1<>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},n.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},n.prototype.cmpn=function(t){var e,i=t<0;if(0!==this.negative&&!i)return-1;if(0===this.negative&&i)return 1;if(this.strip(),this.length>1)e=1;else{i&&(t=-t),r(t<=67108863,"Number is too big");var n=0|this.words[0];e=n===t?0:nt.length)return 1;if(this.length=0;r--){var i=0|this.words[r],n=0|t.words[r];if(i!==n){in&&(e=1);break}}return e},n.prototype.gtn=function(t){return 1===this.cmpn(t)},n.prototype.gt=function(t){return 1===this.cmp(t)},n.prototype.gten=function(t){return this.cmpn(t)>=0},n.prototype.gte=function(t){return this.cmp(t)>=0},n.prototype.ltn=function(t){return-1===this.cmpn(t)},n.prototype.lt=function(t){return-1===this.cmp(t)},n.prototype.lten=function(t){return this.cmpn(t)<=0},n.prototype.lte=function(t){return this.cmp(t)<=0},n.prototype.eqn=function(t){return 0===this.cmpn(t)},n.prototype.eq=function(t){return 0===this.cmp(t)},n.red=function(t){return new M(t)},n.prototype.toRed=function(t){return r(!this.red,"Already a number in reduction context"),r(0===this.negative,"red works only with positives"),t.convertTo(this)._forceRed(t)},n.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},n.prototype._forceRed=function(t){return this.red=t,this},n.prototype.forceRed=function(t){return r(!this.red,"Already a number in reduction context"),this._forceRed(t)},n.prototype.redAdd=function(t){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,t)},n.prototype.redIAdd=function(t){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,t)},n.prototype.redSub=function(t){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,t)},n.prototype.redISub=function(t){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,t)},n.prototype.redShl=function(t){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,t)},n.prototype.redMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.mul(this,t)},n.prototype.redIMul=function(t){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,t),this.red.imul(this,t)},n.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},n.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},n.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},n.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},n.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},n.prototype.redPow=function(t){return r(this.red&&!t.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,t)};var g={k256:null,p224:null,p192:null,p25519:null};function y(t,e){this.name=t,this.p=new n(e,16),this.n=this.p.bitLength(),this.k=new n(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function b(){y.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function v(){y.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function w(){y.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){y.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function M(t){if("string"==typeof t){var e=n._prime(t);this.m=e.p,this.prime=e}else r(t.gtn(1),"modulus must be greater than 1"),this.m=t,this.prime=null}function S(t){M.call(this,t),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new n(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}y.prototype._tmp=function(){var t=new n(null);return t.words=new Array(Math.ceil(this.n/13)),t},y.prototype.ireduce=function(t){var e,r=t;do{this.split(r,this.tmp),e=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(e>this.n);var i=e0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},y.prototype.split=function(t,e){t.iushrn(this.n,0,e)},y.prototype.imulK=function(t){return t.imul(this.k)},i(b,y),b.prototype.split=function(t,e){for(var r=4194303,i=Math.min(t.length,9),n=0;n>>22,o=s}o>>>=22,t.words[n-10]=o,0===o&&t.length>10?t.length-=10:t.length-=9},b.prototype.imulK=function(t){t.words[t.length]=0,t.words[t.length+1]=0,t.length+=2;for(var e=0,r=0;r>>=26,t.words[r]=n,e=i}return 0!==e&&(t.words[t.length++]=e),t},n._prime=function(t){if(g[t])return g[t];var e;if("k256"===t)e=new b;else if("p224"===t)e=new v;else if("p192"===t)e=new w;else{if("p25519"!==t)throw new Error("Unknown prime "+t);e=new _}return g[t]=e,e},M.prototype._verify1=function(t){r(0===t.negative,"red works only with positives"),r(t.red,"red works only with red numbers")},M.prototype._verify2=function(t,e){r(0==(t.negative|e.negative),"red works only with positives"),r(t.red&&t.red===e.red,"red works only with red numbers")},M.prototype.imod=function(t){return this.prime?this.prime.ireduce(t)._forceRed(this):t.umod(this.m)._forceRed(this)},M.prototype.neg=function(t){return t.isZero()?t.clone():this.m.sub(t)._forceRed(this)},M.prototype.add=function(t,e){this._verify2(t,e);var r=t.add(e);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},M.prototype.iadd=function(t,e){this._verify2(t,e);var r=t.iadd(e);return r.cmp(this.m)>=0&&r.isub(this.m),r},M.prototype.sub=function(t,e){this._verify2(t,e);var r=t.sub(e);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},M.prototype.isub=function(t,e){this._verify2(t,e);var r=t.isub(e);return r.cmpn(0)<0&&r.iadd(this.m),r},M.prototype.shl=function(t,e){return this._verify1(t),this.imod(t.ushln(e))},M.prototype.imul=function(t,e){return this._verify2(t,e),this.imod(t.imul(e))},M.prototype.mul=function(t,e){return this._verify2(t,e),this.imod(t.mul(e))},M.prototype.isqr=function(t){return this.imul(t,t.clone())},M.prototype.sqr=function(t){return this.mul(t,t)},M.prototype.sqrt=function(t){if(t.isZero())return t.clone();var e=this.m.andln(3);if(r(e%2==1),3===e){var i=this.m.add(new n(1)).iushrn(2);return this.pow(t,i)}for(var o=this.m.subn(1),s=0;!o.isZero()&&0===o.andln(1);)s++,o.iushrn(1);r(!o.isZero());var a=new n(1).toRed(this),h=a.redNeg(),u=this.m.subn(1).iushrn(1),f=this.m.bitLength();for(f=new n(2*f*f).toRed(this);0!==this.pow(f,u).cmp(h);)f.redIAdd(h);for(var l=this.pow(f,o),c=this.pow(t,o.addn(1).iushrn(1)),d=this.pow(t,o),p=s;0!==d.cmp(a);){for(var m=d,g=0;0!==m.cmp(a);g++)m=m.redSqr();r(g=0;i--){for(var u=e.words[i],f=h-1;f>=0;f--){var l=u>>f&1;o!==r[0]&&(o=this.sqr(o)),0!==l||0!==s?(s<<=1,s|=l,(4==++a||0===i&&0===f)&&(o=this.mul(o,r[s]),a=0,s=0)):a=0}h=26}return o},M.prototype.convertTo=function(t){var e=t.umod(this.m);return e===t?e.clone():e},M.prototype.convertFrom=function(t){var e=t.clone();return e.red=null,e},n.mont=function(t){return new S(t)},i(S,M),S.prototype.convertTo=function(t){return this.imod(t.ushln(this.shift))},S.prototype.convertFrom=function(t){var e=this.imod(t.mul(this.rinv));return e.red=null,e},S.prototype.imul=function(t,e){if(t.isZero()||e.isZero())return t.words[0]=0,t.length=1,t;var r=t.imul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):n.cmpn(0)<0&&(o=n.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(t,e){if(t.isZero()||e.isZero())return new n(0)._forceRed(this);var r=t.mul(e),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(i).iushrn(this.shift),s=o;return o.cmp(this.m)>=0?s=o.isub(this.m):o.cmpn(0)<0&&(s=o.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(t){return this.imod(t._invmp(this.m).mul(this.r2))._forceRed(this)}}(gv,Y);var yv=mv,bv=qn.Buffer;var vv=function(t,e){return bv.from(t.toRed(yv.mont(e.modulus)).redPow(new yv(e.publicExponent)).fromRed().toArray())},wv=Zb,_v=jn,Mv=Fu,Sv=cv,Ev=pv,kv=mv,Av=vv,Ov=Bd,Tv=qn.Buffer,Iv=function(t,e,r){var i;i=t.padding?t.padding:r?1:4;var n,o=wv(t);if(4===i)n=function(t,e){var r=t.modulus.byteLength(),i=e.length,n=Mv("sha1").update(Tv.alloc(0)).digest(),o=n.length,s=2*o;if(i>r-s-2)throw new Error("message too long");var a=Tv.alloc(r-i-s-2),h=r-o-1,u=_v(o),f=Ev(Tv.concat([n,a,Tv.alloc(1,1),e],h),Sv(u,h)),l=Ev(u,Sv(f,o));return new kv(Tv.concat([Tv.alloc(1),l,f],r))}(o,e);else if(1===i)n=function(t,e,r){var i,n=e.length,o=t.modulus.byteLength();if(n>o-11)throw new Error("message too long");i=r?Tv.alloc(o-n-3,255):function(t){var e,r=Tv.allocUnsafe(t),i=0,n=_v(2*t),o=0;for(;i=0)throw new Error("data too long for modulus")}return r?Ov(n,o):Av(n,o)};var Rv=Zb,Cv=cv,Pv=pv,xv=mv,Nv=Bd,Bv=Fu,Lv=vv,Dv=qn.Buffer,jv=function(t,e,r){var i;i=t.padding?t.padding:r?1:4;var n,o=Rv(t),s=o.modulus.byteLength();if(e.length>s||new xv(e).cmp(o.modulus)>=0)throw new Error("decryption error");n=r?Lv(new xv(e),o):Nv(e,o);var a=Dv.alloc(s-n.length);if(n=Dv.concat([a,n],s),4===i)return function(t,e){var r=t.modulus.byteLength(),i=Bv("sha1").update(Dv.alloc(0)).digest(),n=i.length;if(0!==e[0])throw new Error("decryption error");var o=e.slice(1,n+1),s=e.slice(n+1),a=Pv(o,Cv(s,n)),h=Pv(s,Cv(a,r-n-1));if(function(t,e){t=Dv.from(t),e=Dv.from(e);var r=0,i=t.length;t.length!==e.length&&(r++,i=Math.min(t.length,e.length));var n=-1;for(;++n=e.length){o++;break}var s=e.slice(2,n-1);("0002"!==i.toString("hex")&&!r||"0001"!==i.toString("hex")&&r)&&o++;s.length<8&&o++;if(o)throw new Error("decryption error");return e.slice(n)}(0,n,r);if(3===i)return n;throw new Error("unknown padding")};!function(t){t.publicEncrypt=Iv,t.privateDecrypt=jv,t.privateEncrypt=function(e,r){return t.publicEncrypt(e,r,!0)},t.publicDecrypt=function(e,r){return t.privateDecrypt(e,r,!0)}}(uv);var Uv={};function qv(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var Fv,zv=qn,Hv=jn,Kv=zv.Buffer,Vv=zv.kMaxLength,Gv=Y.crypto||Y.msCrypto,Wv=Math.pow(2,32)-1;function Yv(t,e){if("number"!=typeof t||t!=t)throw new TypeError("offset must be a number");if(t>Wv||t<0)throw new TypeError("offset must be a uint32");if(t>Vv||t>e)throw new RangeError("offset out of range")}function Zv(t,e,r){if("number"!=typeof t||t!=t)throw new TypeError("size must be a number");if(t>Wv||t<0)throw new TypeError("size must be a uint32");if(t+e>r||t>Vv)throw new RangeError("buffer too small")}function Xv(t,e,r,i){if(Bn.browser){var n=t.buffer,o=new Uint8Array(n,e,r);return Gv.getRandomValues(o),i?void Bn.nextTick((function(){i(null,t)})):t}if(!i)return Hv(r).copy(t,e),t;Hv(r,(function(r,n){if(r)return i(r);n.copy(t,e),i(null,t)}))}function Qv(){if(Fv)return Dn;Fv=1,Dn.randomBytes=Dn.rng=Dn.pseudoRandomBytes=Dn.prng=jn,Dn.createHash=Dn.Hash=Fu,Dn.createHmac=Dn.Hmac=sf;var t=af,e=Object.keys(t),r=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(e);Dn.getHashes=function(){return r};var i=lf;Dn.pbkdf2=i.pbkdf2,Dn.pbkdf2Sync=i.pbkdf2Sync;var n=qf;Dn.Cipher=n.Cipher,Dn.createCipher=n.createCipher,Dn.Cipheriv=n.Cipheriv,Dn.createCipheriv=n.createCipheriv,Dn.Decipher=n.Decipher,Dn.createDecipher=n.createDecipher,Dn.Decipheriv=n.Decipheriv,Dn.createDecipheriv=n.createDecipheriv,Dn.getCiphers=n.getCiphers,Dn.listCiphers=n.listCiphers;var o=function(){if(Ed)return ad;Ed=1;var t=_d(),e=kd,r=Ad(),i={binary:!0,hex:!0,base64:!0};return ad.DiffieHellmanGroup=ad.createDiffieHellmanGroup=ad.getDiffieHellman=function(t){var i=new Re(e[t].prime,"hex"),n=new Re(e[t].gen,"hex");return new r(i,n)},ad.createDiffieHellman=ad.DiffieHellman=function e(n,o,s,a){return Re.isBuffer(o)||void 0===i[o]?e(n,"binary",o,s):(o=o||"binary",a=a||"binary",s=s||new Re([2]),Re.isBuffer(s)||(s=new Re(s,a)),"number"==typeof n?new r(t(n,s),s,!0):(Re.isBuffer(n)||(n=new Re(n,o)),new r(n,s,!0)))},ad}();Dn.DiffieHellmanGroup=o.DiffieHellmanGroup,Dn.createDiffieHellmanGroup=o.createDiffieHellmanGroup,Dn.getDiffieHellman=o.getDiffieHellman,Dn.createDiffieHellman=o.createDiffieHellman,Dn.DiffieHellman=o.DiffieHellman;var s=function(){if(ev)return tv;ev=1;var t=qn.Buffer,e=Fu,r=Zn,i=Wn,n=iv(),o=nv(),s=uf;function a(t){r.Writable.call(this);var i=s[t];if(!i)throw new Error("Unknown message digest");this._hashType=i.hash,this._hash=e(i.hash),this._tag=i.id,this._signType=i.sign}function h(t){r.Writable.call(this);var i=s[t];if(!i)throw new Error("Unknown message digest");this._hash=e(i.hash),this._tag=i.id,this._signType=i.sign}function u(t){return new a(t)}function f(t){return new h(t)}return Object.keys(s).forEach((function(e){s[e].id=t.from(s[e].id,"hex"),s[e.toLowerCase()]=s[e]})),i(a,r.Writable),a.prototype._write=function(t,e,r){this._hash.update(t),r()},a.prototype.update=function(e,r){return this._hash.update("string"==typeof e?t.from(e,r):e),this},a.prototype.sign=function(t,e){this.end();var r=this._hash.digest(),i=n(r,t,this._hashType,this._signType,this._tag);return e?i.toString(e):i},i(h,r.Writable),h.prototype._write=function(t,e,r){this._hash.update(t),r()},h.prototype.update=function(e,r){return this._hash.update("string"==typeof e?t.from(e,r):e),this},h.prototype.verify=function(e,r,i){var n="string"==typeof r?t.from(r,i):r;this.end();var s=this._hash.digest();return o(n,s,e,this._signType,this._tag)},tv={Sign:u,Verify:f,createSign:u,createVerify:f}}();Dn.createSign=s.createSign,Dn.Sign=s.Sign,Dn.createVerify=s.createVerify,Dn.Verify=s.Verify,Dn.createECDH=function(){if(sv)return ov;sv=1;var t=ay(),e=av;ov=function(t){return new i(t)};var r={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function i(e){this.curveType=r[e],this.curveType||(this.curveType={name:e}),this.curve=new t.ec(this.curveType.name),this.keys=void 0}function n(t,e,r){Array.isArray(t)||(t=t.toArray());var i=new Re(t);if(r&&i.length0){if(r>=4)return t.readUIntBE(e,r);for(var i=0,n=e+r,o=0;n>e;n--,o+=2)i+=t[n-1]*Math.pow(16,o);return i}return NaN},Ln._={isObject:function(t){var e=typeof t;return!!t&&("object"==e||"function"==e)},isString:function(t){return"string"==typeof t||t instanceof String},isNumber:function(t){return"number"==typeof t||!isNaN(parseFloat(t))&&isFinite(t)},omit:function(t,e){var r={};for(var i in t)t.hasOwnProperty(i)&&i!==e&&(r[i]=t[i]);return r}},Ln.trimSurroundingText=function(t,e,r){var i=0,n=t.length,o=t.indexOf(e);o>=0&&(i=o+e.length);var s=t.indexOf(r,o);return s>=0&&(n=s),t.substring(i,n)};var Jv=Qv(),$v=Ln._;function tw(t,e){null!=t&&("number"==typeof t?this.fromNumber(t,e):Re.isBuffer(t)?this.fromBuffer(t):null==e&&"string"!=typeof t?this.fromByteArray(t):this.fromString(t,e))}function ew(){return new tw(null)}tw.prototype.am=function(t,e,r,i,n,o){for(var s=16383&e,a=e>>14;--o>=0;){var h=16383&this[t],u=this[t++]>>14,f=a*h+u*s;n=((h=s*h+((16383&f)<<14)+r[i]+n)>>28)+(f>>14)+a*u,r[i++]=268435455&h}return n},tw.prototype.DB=28,tw.prototype.DM=268435455,tw.prototype.DV=1<<28;tw.prototype.FV=Math.pow(2,52),tw.prototype.F1=24,tw.prototype.F2=4;var rw,iw,nw="0123456789abcdefghijklmnopqrstuvwxyz",ow=new Array;for(rw="0".charCodeAt(0),iw=0;iw<=9;++iw)ow[rw++]=iw;for(rw="a".charCodeAt(0),iw=10;iw<36;++iw)ow[rw++]=iw;for(rw="A".charCodeAt(0),iw=10;iw<36;++iw)ow[rw++]=iw;function sw(t){return nw.charAt(t)}function aw(t,e){var r=ow[t.charCodeAt(e)];return null==r?-1:r}function hw(t){var e=ew();return e.fromInt(t),e}function uw(t){var e,r=1;return 0!=(e=t>>>16)&&(t=e,r+=16),0!=(e=t>>8)&&(t=e,r+=8),0!=(e=t>>4)&&(t=e,r+=4),0!=(e=t>>2)&&(t=e,r+=2),0!=(e=t>>1)&&(t=e,r+=1),r}function fw(t){this.m=t}function lw(t){this.m=t,this.mp=t.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>=16,e+=16),0==(255&t)&&(t>>=8,e+=8),0==(15&t)&&(t>>=4,e+=4),0==(3&t)&&(t>>=2,e+=2),0==(1&t)&&++e,e}function yw(t){for(var e=0;0!=t;)t&=t-1,++e;return e}function bw(){}function vw(t){return t}function ww(t){this.r2=ew(),this.q3=ew(),tw.ONE.dlShiftTo(2*t.t,this.r2),this.mu=this.r2.divide(t),this.m=t}fw.prototype.convert=function(t){return t.s<0||t.compareTo(this.m)>=0?t.mod(this.m):t},fw.prototype.revert=function(t){return t},fw.prototype.reduce=function(t){t.divRemTo(this.m,null,t)},fw.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},fw.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},lw.prototype.convert=function(t){var e=ew();return t.abs().dlShiftTo(this.m.t,e),e.divRemTo(this.m,null,e),t.s<0&&e.compareTo(tw.ZERO)>0&&this.m.subTo(e,e),e},lw.prototype.revert=function(t){var e=ew();return t.copyTo(e),this.reduce(e),e},lw.prototype.reduce=function(t){for(;t.t<=this.mt2;)t[t.t++]=0;for(var e=0;e>15)*this.mpl&this.um)<<15)&t.DM;for(t[r=e+this.m.t]+=this.m.am(0,i,t,e,0,this.m.t);t[r]>=t.DV;)t[r]-=t.DV,t[++r]++}t.clamp(),t.drShiftTo(this.m.t,t),t.compareTo(this.m)>=0&&t.subTo(this.m,t)},lw.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},lw.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)},bw.prototype.convert=vw,bw.prototype.revert=vw,bw.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r)},bw.prototype.sqrTo=function(t,e){t.squareTo(e)},ww.prototype.convert=function(t){if(t.s<0||t.t>2*this.m.t)return t.mod(this.m);if(t.compareTo(this.m)<0)return t;var e=ew();return t.copyTo(e),this.reduce(e),e},ww.prototype.revert=function(t){return t},ww.prototype.reduce=function(t){for(t.drShiftTo(this.m.t-1,this.r2),t.t>this.m.t+1&&(t.t=this.m.t+1,t.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);t.compareTo(this.r2)<0;)t.dAddOffset(1,this.m.t+1);for(t.subTo(this.r2,t);t.compareTo(this.m)>=0;)t.subTo(this.m,t)},ww.prototype.mulTo=function(t,e,r){t.multiplyTo(e,r),this.reduce(r)},ww.prototype.sqrTo=function(t,e){t.squareTo(e),this.reduce(e)};var _w=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997],Mw=(1<<26)/_w[_w.length-1];tw.prototype.copyTo=function(t){for(var e=this.t-1;e>=0;--e)t[e]=this[e];t.t=this.t,t.s=this.s},tw.prototype.fromInt=function(t){this.t=1,this.s=t<0?-1:0,t>0?this[0]=t:t<-1?this[0]=t+DV:this.t=0},tw.prototype.fromString=function(t,e,r){var i;switch(e){case 2:i=1;break;case 4:i=2;break;case 8:i=3;break;case 16:i=4;break;case 32:i=5;break;case 256:i=8;break;default:return void this.fromRadix(t,e)}this.t=0,this.s=0;for(var n=t.length,o=!1,s=0;--n>=0;){var a=8==i?255&t[n]:aw(t,n);a<0?"-"==t.charAt(n)&&(o=!0):(o=!1,0===s?this[this.t++]=a:s+i>this.DB?(this[this.t-1]|=(a&(1<>this.DB-s):this[this.t-1]|=a<=this.DB&&(s-=this.DB))}r||8!=i||0==(128&t[0])||(this.s=-1,s>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==t;)--this.t},tw.prototype.dlShiftTo=function(t,e){var r;for(r=this.t-1;r>=0;--r)e[r+t]=this[r];for(r=t-1;r>=0;--r)e[r]=0;e.t=this.t+t,e.s=this.s},tw.prototype.drShiftTo=function(t,e){for(var r=t;r=0;--r)e[r+s+1]=this[r]>>n|a,a=(this[r]&o)<=0;--r)e[r]=0;e[s]=a,e.t=this.t+s+1,e.s=this.s,e.clamp()},tw.prototype.rShiftTo=function(t,e){e.s=this.s;var r=Math.floor(t/this.DB);if(r>=this.t)e.t=0;else{var i=t%this.DB,n=this.DB-i,o=(1<>i;for(var s=r+1;s>i;i>0&&(e[this.t-r-1]|=(this.s&o)<>=this.DB;if(t.t>=this.DB;i+=this.s}else{for(i+=this.s;r>=this.DB;i-=t.s}e.s=i<0?-1:0,i<-1?e[r++]=this.DV+i:i>0&&(e[r++]=i),e.t=r,e.clamp()},tw.prototype.multiplyTo=function(t,e){var r=this.abs(),i=t.abs(),n=r.t;for(e.t=n+i.t;--n>=0;)e[n]=0;for(n=0;n=0;)t[r]=0;for(r=0;r=e.DV&&(t[r+e.t]-=e.DV,t[r+e.t+1]=1)}t.t>0&&(t[t.t-1]+=e.am(r,e[r],t,2*r,0,1)),t.s=0,t.clamp()},tw.prototype.divRemTo=function(t,e,r){var i=t.abs();if(!(i.t<=0)){var n=this.abs();if(n.t0?(i.lShiftTo(h,o),n.lShiftTo(h,r)):(i.copyTo(o),n.copyTo(r));var u=o.t,f=o[u-1];if(0!==f){var l=f*(1<1?o[u-2]>>this.F2:0),c=this.FV/l,d=(1<=0&&(r[r.t++]=1,r.subTo(y,r)),tw.ONE.dlShiftTo(u,y),y.subTo(o,o);o.t=0;){var b=r[--m]==f?this.DM:Math.floor(r[m]*c+(r[m-1]+p)*d);if((r[m]+=o.am(0,b,r,g,0,u))0&&r.rShiftTo(h,r),s<0&&tw.ZERO.subTo(r,r)}}},tw.prototype.invDigit=function(){if(this.t<1)return 0;var t=this[0];if(0==(1&t))return 0;var e=3&t;return(e=(e=(e=(e=e*(2-(15&t)*e)&15)*(2-(255&t)*e)&255)*(2-((65535&t)*e&65535))&65535)*(2-t*e%this.DV)%this.DV)>0?this.DV-e:-e},tw.prototype.isEven=function(){return 0===(this.t>0?1&this[0]:this.s)},tw.prototype.exp=function(t,e){if(t>4294967295||t<1)return tw.ONE;var r=ew(),i=ew(),n=e.convert(this),o=uw(t)-1;for(n.copyTo(r);--o>=0;)if(e.sqrTo(r,i),(t&1<0)e.mulTo(i,n,r);else{var s=r;r=i,i=s}return e.revert(r)},tw.prototype.chunkSize=function(t){return Math.floor(Math.LN2*this.DB/Math.log(t))},tw.prototype.toRadix=function(t){if(null==t&&(t=10),0===this.signum()||t<2||t>36)return"0";var e=this.chunkSize(t),r=Math.pow(t,e),i=hw(r),n=ew(),o=ew(),s="";for(this.divRemTo(i,n,o);n.signum()>0;)s=(r+o.intValue()).toString(t).substr(1)+s,n.divRemTo(i,n,o);return o.intValue().toString(t)+s},tw.prototype.fromRadix=function(t,e){this.fromInt(0),null==e&&(e=10);for(var r=this.chunkSize(e),i=Math.pow(e,r),n=!1,o=0,s=0,a=0;a=r&&(this.dMultiply(i),this.dAddOffset(s,0),o=0,s=0))}o>0&&(this.dMultiply(Math.pow(e,o)),this.dAddOffset(s,0)),n&&tw.ZERO.subTo(this,this)},tw.prototype.fromNumber=function(t,e){if("number"==typeof e)if(t<2)this.fromInt(1);else for(this.fromNumber(t),this.testBit(t-1)||this.bitwiseTo(tw.ONE.shiftLeft(t-1),dw,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(e);)this.dAddOffset(2,0),this.bitLength()>t&&this.subTo(tw.ONE.shiftLeft(t-1),this);else{var r=Jv.randomBytes(1+(t>>3)),i=7&t;i>0?r[0]&=(1<>=this.DB;if(t.t>=this.DB;i+=this.s}else{for(i+=this.s;r>=this.DB;i+=t.s}e.s=i<0?-1:0,i>0?e[r++]=i:i<-1&&(e[r++]=this.DV+i),e.t=r,e.clamp()},tw.prototype.dMultiply=function(t){this[this.t]=this.am(0,t-1,this,0,0,this.t),++this.t,this.clamp()},tw.prototype.dAddOffset=function(t,e){if(0!==t){for(;this.t<=e;)this[this.t++]=0;for(this[e]+=t;this[e]>=this.DV;)this[e]-=this.DV,++e>=this.t&&(this[this.t++]=0),++this[e]}},tw.prototype.multiplyLowerTo=function(t,e,r){var i,n=Math.min(this.t+t.t,e);for(r.s=0,r.t=n;n>0;)r[--n]=0;for(i=r.t-this.t;n=0;)r[i]=0;for(i=Math.max(e-this.t,0);i0)if(0===e)r=this[0]%t;else for(var i=this.t-1;i>=0;--i)r=(e*r+this[i])%t;return r},tw.prototype.millerRabin=function(t){var e=this.subtract(tw.ONE),r=e.getLowestSetBit();if(r<=0)return!1;var i=e.shiftRight(r);(t=t+1>>1)>_w.length&&(t=_w.length);for(var n=ew(),o=0;o0)for(a>a)>0&&(n=!0,o=sw(r));s>=0;)a>(a+=this.DB-e)):(r=this[s]>>(a-=e)&i,a<=0&&(a+=this.DB,--s)),r>0&&(n=!0),n&&(o+=sw(r));return n?o:"0"},tw.prototype.negate=function(){var t=ew();return tw.ZERO.subTo(this,t),t},tw.prototype.abs=function(){return this.s<0?this.negate():this},tw.prototype.compareTo=function(t){var e=this.s-t.s;if(0!=e)return e;var r=this.t;if(0!=(e=r-t.t))return this.s<0?-e:e;for(;--r>=0;)if(0!=(e=this[r]-t[r]))return e;return 0},tw.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+uw(this[this.t-1]^this.s&this.DM)},tw.prototype.mod=function(t){var e=ew();return this.abs().divRemTo(t,null,e),this.s<0&&e.compareTo(tw.ZERO)>0&&t.subTo(e,e),e},tw.prototype.modPowInt=function(t,e){var r;return r=t<256||e.isEven()?new fw(e):new lw(e),this.exp(t,r)},tw.prototype.clone=function(){var t=ew();return this.copyTo(t),t},tw.prototype.intValue=function(){if(this.s<0){if(1==this.t)return this[0]-this.DV;if(0===this.t)return-1}else{if(1==this.t)return this[0];if(0===this.t)return 0}return(this[1]&(1<<32-this.DB)-1)<>24},tw.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},tw.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},tw.prototype.toByteArray=function(){var t=this.t,e=new Array;e[0]=this.s;var r,i=this.DB-t*this.DB%8,n=0;if(t-- >0)for(i>i)!=(this.s&this.DM)>>i&&(e[n++]=r|this.s<=0;)i<8?(r=(this[t]&(1<>(i+=this.DB-8)):(r=this[t]>>(i-=8)&255,i<=0&&(i+=this.DB,--t)),0!=(128&r)&&(r|=-256),0===n&&(128&this.s)!=(128&r)&&++n,(n>0||r!=this.s)&&(e[n++]=r);return e},tw.prototype.toBuffer=function(t){var e=Re.from(this.toByteArray());if(!0===t&&0===e[0])e=e.slice(1);else if($v.isNumber(t)){if(e.length>t){for(var r=0;r0?this:t},tw.prototype.and=function(t){var e=ew();return this.bitwiseTo(t,cw,e),e},tw.prototype.or=function(t){var e=ew();return this.bitwiseTo(t,dw,e),e},tw.prototype.xor=function(t){var e=ew();return this.bitwiseTo(t,pw,e),e},tw.prototype.andNot=function(t){var e=ew();return this.bitwiseTo(t,mw,e),e},tw.prototype.not=function(){for(var t=ew(),e=0;e=this.t?0!=this.s:0!=(this[e]&1<1){var f=ew();for(i.sqrTo(s[1],f);a<=u;)s[a]=ew(),i.mulTo(f,s[a-2],s[a]),a+=2}var l,c,d=t.t-1,p=!0,m=ew();for(n=uw(t[d])-1;d>=0;){for(n>=h?l=t[d]>>n-h&u:(l=(t[d]&(1<0&&(l|=t[d-1]>>this.DB+n-h)),a=r;0==(1&l);)l>>=1,--a;if((n-=a)<0&&(n+=this.DB,--d),p)s[l].copyTo(o),p=!1;else{for(;a>1;)i.sqrTo(o,m),i.sqrTo(m,o),a-=2;a>0?i.sqrTo(o,m):(c=o,o=m,m=c),i.mulTo(m,s[l],o)}for(;d>=0&&0==(t[d]&1<=0?(r.subTo(i,r),e&&n.subTo(s,n),o.subTo(a,o)):(i.subTo(r,i),e&&s.subTo(n,s),a.subTo(o,a))}return 0!=i.compareTo(tw.ONE)?tw.ZERO:a.compareTo(t)>=0?a.subtract(t):a.signum()<0?(a.addTo(t,a),a.signum()<0?a.add(t):a):a},tw.prototype.pow=function(t){return this.exp(t,new bw)},tw.prototype.gcd=function(t){var e=this.s<0?this.negate():this.clone(),r=t.s<0?t.negate():t.clone();if(e.compareTo(r)<0){var i=e;e=r,r=i}var n=e.getLowestSetBit(),o=r.getLowestSetBit();if(o<0)return e;for(n0&&(e.rShiftTo(o,e),r.rShiftTo(o,r));e.signum()>0;)(n=e.getLowestSetBit())>0&&e.rShiftTo(n,e),(n=r.getLowestSetBit())>0&&r.rShiftTo(n,r),e.compareTo(r)>=0?(e.subTo(r,e),e.rShiftTo(1,e)):(r.subTo(e,r),r.rShiftTo(1,r));return o>0&&r.lShiftTo(o,r),r},tw.prototype.isProbablePrime=function(t){var e,r=this.abs();if(1==r.t&&r[0]<=_w[_w.length-1]){for(e=0;e<_w.length;++e)if(r[0]==_w[e])return!0;return!1}if(r.isEven())return!1;for(e=1;e<_w.length;){for(var i=_w[e],n=e+1;n<_w.length&&ithis.key.maxMessageLength)throw new Error("Message too long for RSA (n="+this.key.encryptedDataLength+", l="+t.length+")");if(this.options.encryptionSchemeOptions&&this.options.encryptionSchemeOptions.padding==Rw.RSA_NO_PADDING)return(r=Re.alloc(this.key.maxMessageLength-t.length)).fill(0),Re.concat([r,t]);if(1===e.type)return(r=Re.alloc(this.key.encryptedDataLength-t.length-1)).fill(255,0,r.length-1),r[0]=1,r[r.length-1]=0,Re.concat([r,t]);(r=Re.alloc(this.key.encryptedDataLength-t.length))[0]=0,r[1]=2;for(var i=Iw.randomBytes(r.length-3),n=0;n=t.length)return null}else{if(0!==t[0]||2!==t[1])return null;for(r=3;0!==t[r];)if(++r>=t.length)return null}return t.slice(r+1,t.length)},r.prototype.sign=function(t){var e=this.options.signingSchemeOptions.hash||xw;if("browser"===this.options.environment){e=Pw[e]||e;var r=Iw.createHash(e);r.update(t);var i=this.pkcs1pad(r.digest(),e);return this.key.$doPrivate(new Tw(i)).toBuffer(this.key.encryptedDataLength)}var n=Iw.createSign("RSA-"+e.toUpperCase());return n.update(t),n.sign(this.options.rsaUtils.exportKey("private"))},r.prototype.verify=function(t,e,r){if(this.options.encryptionSchemeOptions&&this.options.encryptionSchemeOptions.padding==Rw.RSA_NO_PADDING)return!1;var i=this.options.signingSchemeOptions.hash||xw;if("browser"===this.options.environment){i=Pw[i]||i,r&&(e=Re.from(e,r));var n=Iw.createHash(i);n.update(t);var o=this.pkcs1pad(n.digest(),i);return this.key.$doPublic(new Tw(e)).toBuffer().toString("hex")==o.toString("hex")}var s=Iw.createVerify("RSA-"+i.toUpperCase());return s.update(t),s.verify(this.options.rsaUtils.exportKey("public"),e,r)},r.prototype.pkcs0pad=function(t){var e=Re.alloc(this.key.maxMessageLength-t.length);return e.fill(0),Re.concat([e,t])},r.prototype.pkcs0unpad=function(t){return"function"==typeof t.lastIndexOf?t.slice(t.lastIndexOf("\0")+1,t.length):t.slice(String.prototype.lastIndexOf.call(t,"\0")+1,t.length)},r.prototype.pkcs1pad=function(t,e){var r=Cw[e];if(!r)throw Error("Unsupported hash algorithm");var i=Re.concat([r,t]);if(i.length+10>this.key.encryptedDataLength)throw Error("Key is too short for signing algorithm ("+e+")");var n=Re.alloc(this.key.encryptedDataLength-i.length-1);return n.fill(255,0,n.length-1),n[0]=1,n[n.length-1]=0,Re.concat([n,i])},new r(t,e)};var Nw={},Bw={get exports(){return Nw},set exports(t){Nw=t}};!function(t){var e=Qv();t.exports={isEncryption:!0,isSignature:!1},t.exports.digestLength={md4:16,md5:16,ripemd160:20,rmd160:20,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64};var r="sha1";t.exports.eme_oaep_mgf1=function(i,n,o){o=o||r;for(var s=t.exports.digestLength[o],a=Math.ceil(n/s),h=Re.alloc(s*a),u=Re.alloc(4),f=0;fa-2*h-2)throw new Error("Message is too long to encode into an encoded message with a length of "+a+" bytes, increaseemLen to fix this error (minimum value for given parameters and options: "+(a-2*h-2)+")");var u=e.createHash(n);u.update(s),u=u.digest();var f=Re.alloc(a-i.length-2*h-1);f.fill(0),f[f.length-1]=1;for(var l=Re.concat([u,f,i]),c=e.randomBytes(h),d=o(c,l.length,n),p=0;p>8-b<<8-b;g[0]=g[0]&v;var w=Re.alloc(g.length+c.length+1);return g.copy(w,0),c.copy(w,g.length),w[w.length-1]=188,w},s.prototype.emsa_pss_verify=function(t,i,n){var s=this.options.signingSchemeOptions.hash||r,a=this.options.signingSchemeOptions.mgf||o.eme_oaep_mgf1,h=this.options.signingSchemeOptions.saltLength||20,u=o.digestLength[s],f=Math.ceil(n/8);if(f>8-(p=8*f-n)<<8-p,l[0]=l[0]&c,d=0;0===l[d]&&d>1;this.e=parseInt(e,16);for(var i=new Jw(e,16);;){for(;this.p=new Jw(t-r,1),0!==this.p.subtract(Jw.ONE).gcd(i).compareTo(Jw.ONE)||!this.p.isProbablePrime(10););for(;this.q=new Jw(r,1),0!==this.q.subtract(Jw.ONE).gcd(i).compareTo(Jw.ONE)||!this.q.isProbablePrime(10););if(this.p.compareTo(this.q)<=0){var n=this.p;this.p=this.q,this.q=n}var o=this.p.subtract(Jw.ONE),s=this.q.subtract(Jw.ONE),a=o.multiply(s);if(0===a.gcd(i).compareTo(Jw.ONE)){if(this.n=this.p.multiply(this.q),this.n.bitLength()0&&(Qw.isNumber(e)||e.length>0)&&r.length>0))throw Error("Invalid RSA private key");this.n=new Jw(t),this.e=Qw.isNumber(e)?e:$w.get32IntFromBuffer(e,0),this.d=new Jw(r),i&&n&&o&&s&&a&&(this.p=new Jw(i),this.q=new Jw(n),this.dmp1=new Jw(o),this.dmq1=new Jw(s),this.coeff=new Jw(a)),this.$$recalculateCache()},t.prototype.setPublic=function(t,e){if(!(t&&e&&t.length>0&&(Qw.isNumber(e)||e.length>0)))throw Error("Invalid RSA public key");this.n=new Jw(t),this.e=Qw.isNumber(e)?e:$w.get32IntFromBuffer(e,0),this.$$recalculateCache()},t.prototype.$doPrivate=function(t){if(this.p||this.q)return t.modPow(this.d,this.n);for(var e=t.mod(this.p).modPow(this.dmp1,this.p),r=t.mod(this.q).modPow(this.dmq1,this.q);e.compareTo(r)<0;)e=e.add(this.p);return e.subtract(r).multiply(this.coeff).mod(this.p).multiply(this.q).add(r)},t.prototype.$doPublic=function(t){return t.modPowInt(this.e,this.n)},t.prototype.encrypt=function(t,e){var r=[],i=[],n=t.length,o=Math.ceil(n/this.maxMessageLength)||1,s=Math.ceil(n/o||1);if(1==o)r.push(t);else for(var a=0;a0)throw Error("Incorrect data or key");for(var r=[],i=0,n=0,o=t.length/this.encryptedDataLength,s=0;s>3},t}();var r_={},i_={get exports(){return r_},set exports(t){r_=t}},n_={newInvalidAsn1Error:function(t){var e=new Error;return e.name="InvalidAsn1Error",e.message=t||"",e}},o_={EOC:0,Boolean:1,Integer:2,BitString:3,OctetString:4,Null:5,OID:6,ObjectDescriptor:7,External:8,Real:9,Enumeration:10,PDV:11,Utf8String:12,RelativeOID:13,Sequence:16,Set:17,NumericString:18,PrintableString:19,T61String:20,VideotexString:21,IA5String:22,UTCTime:23,GeneralizedTime:24,GraphicString:25,VisibleString:26,GeneralString:28,UniversalString:29,CharacterString:30,BMPString:31,Constructor:32,Context:128};function s_(t,e){if(t===e)return 0;for(var r=t.length,i=e.length,n=0,o=Math.min(r,i);n=0){var s=i.indexOf("\n",o+1);i=i.substring(s+1)}this.stack=i}}}function b_(t,e){return"string"==typeof t?t.length=0;a--)if(h[a]!==u[a])return!1;for(a=h.length-1;a>=0;a--)if(!A_(t[s=h[a]],e[s],r,i))return!1;return!0}(t,e,r,i))}return r?t===e:t==e}function O_(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function T_(t,e,r){A_(t,e,!1)&&w_(t,e,r,"notDeepEqual",T_)}function I_(t,e,r){A_(t,e,!0)&&w_(t,e,r,"notDeepStrictEqual",I_)}function R_(t,e,r){t!==e&&w_(t,e,r,"===",R_)}function C_(t,e,r){t===e&&w_(t,e,r,"!==",C_)}function P_(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function x_(t,e,r,i){var n;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(i=r,r=null),n=function(t){var e;try{t()}catch(t){e=t}return e}(e),i=(r&&r.name?" ("+r.name+").":".")+(i?" "+i:"."),t&&!n&&w_(n,r,"Missing expected exception"+i);var o="string"==typeof i,s=!t&&n&&!r;if((!t&&Co(n)&&o&&P_(n,r)||s)&&w_(n,r,"Got unwanted exception"+i),t&&n&&r&&!P_(n,r)||!t&&n)throw n}function N_(t,e,r){x_(!0,t,e,r)}function B_(t,e,r){x_(!1,t,e,r)}function L_(t){if(t)throw t}p_.AssertionError=y_,so(y_,Error),p_.fail=w_,p_.ok=__,p_.equal=M_,p_.notEqual=S_,p_.deepEqual=E_,p_.deepStrictEqual=k_,p_.notDeepEqual=T_,p_.notDeepStrictEqual=I_,p_.strictEqual=R_,p_.notStrictEqual=C_,p_.throws=N_,p_.doesNotThrow=B_,p_.ifError=L_;var D_=X(Object.freeze({__proto__:null,AssertionError:y_,assert:__,deepEqual:E_,deepStrictEqual:k_,default:p_,doesNotThrow:B_,equal:M_,fail:w_,ifError:L_,notDeepEqual:T_,notDeepStrictEqual:I_,notEqual:S_,notStrictEqual:C_,ok:__,strictEqual:R_,throws:N_})),j_=D_,U_=vy.Buffer,q_=o_,F_=n_.newInvalidAsn1Error;function z_(t){if(!t||!U_.isBuffer(t))throw new TypeError("data must be a node Buffer");this._buf=t,this._size=t.length,this._len=0,this._offset=0}Object.defineProperty(z_.prototype,"length",{enumerable:!0,get:function(){return this._len}}),Object.defineProperty(z_.prototype,"offset",{enumerable:!0,get:function(){return this._offset}}),Object.defineProperty(z_.prototype,"remain",{get:function(){return this._size-this._offset}}),Object.defineProperty(z_.prototype,"buffer",{get:function(){return this._buf.slice(this._offset)}}),z_.prototype.readByte=function(t){if(this._size-this._offset<1)return null;var e=255&this._buf[this._offset];return t||(this._offset+=1),e},z_.prototype.peek=function(){return this.readByte(!0)},z_.prototype.readLength=function(t){if(void 0===t&&(t=this._offset),t>=this._size)return null;var e=255&this._buf[t++];if(null===e)return null;if(128==(128&e)){if(0===(e&=127))throw F_("Indefinite length not supported");if(e>4)throw F_("encoding too long");if(this._size-tthis._size-i)return null;if(this._offset=i,0===this.length)return e?U_.alloc(0):"";var n=this._buf.slice(this._offset,this._offset+this.length);return this._offset+=this.length,e?n:n.toString("utf8")},z_.prototype.readOID=function(t){t||(t=q_.OID);var e=this.readString(t,!0);if(null===e)return null;for(var r=[],i=0,n=0;n>0),r.join(".")},z_.prototype._readTag=function(t){j_.ok(void 0!==t);var e=this.peek();if(null===e)return null;if(e!==t)throw F_("Expected 0x"+t.toString(16)+": got 0x"+e.toString(16));var r=this.readLength(this._offset+1);if(null===r)return null;if(this.length>4)throw F_("Integer too long: "+this.length);if(this.length>this._size-r)return null;this._offset=r;for(var i=this._buf[this._offset],n=0,o=0;o>0};var H_=z_,K_=D_,V_=vy.Buffer,G_=o_,W_=n_.newInvalidAsn1Error,Y_={size:1024,growthFactor:8};function Z_(t){t=function(t,e){return K_.ok(t),K_.equal(typeof t,"object"),K_.ok(e),K_.equal(typeof e,"object"),Object.getOwnPropertyNames(t).forEach((function(r){if(!e[r]){var i=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,i)}})),e}(Y_,t||{}),this._buf=V_.alloc(t.size||1024),this._size=this._buf.length,this._offset=0,this._options=t,this._seq=[]}Object.defineProperty(Z_.prototype,"buffer",{get:function(){if(this._seq.length)throw W_(this._seq.length+" unended sequence(s)");return this._buf.slice(0,this._offset)}}),Z_.prototype.writeByte=function(t){if("number"!=typeof t)throw new TypeError("argument must be a Number");this._ensure(1),this._buf[this._offset++]=t},Z_.prototype.writeInt=function(t,e){if("number"!=typeof t)throw new TypeError("argument must be a Number");"number"!=typeof e&&(e=G_.Integer);for(var r=4;(0==(4286578688&t)||-8388608==(4286578688&t))&&r>1;)r--,t<<=8;if(r>4)throw W_("BER ints cannot be > 0xffffffff");for(this._ensure(2+r),this._buf[this._offset++]=e,this._buf[this._offset++]=r;r-- >0;)this._buf[this._offset++]=(4278190080&t)>>>24,t<<=8},Z_.prototype.writeNull=function(){this.writeByte(G_.Null),this.writeByte(0)},Z_.prototype.writeEnumeration=function(t,e){if("number"!=typeof t)throw new TypeError("argument must be a Number");return"number"!=typeof e&&(e=G_.Enumeration),this.writeInt(t,e)},Z_.prototype.writeBoolean=function(t,e){if("boolean"!=typeof t)throw new TypeError("argument must be a Boolean");"number"!=typeof e&&(e=G_.Boolean),this._ensure(3),this._buf[this._offset++]=e,this._buf[this._offset++]=1,this._buf[this._offset++]=t?255:0},Z_.prototype.writeString=function(t,e){if("string"!=typeof t)throw new TypeError("argument must be a string (was: "+typeof t+")");"number"!=typeof e&&(e=G_.OctetString);var r=V_.byteLength(t);this.writeByte(e),this.writeLength(r),r&&(this._ensure(r),this._buf.write(t,this._offset),this._offset+=r)},Z_.prototype.writeBuffer=function(t,e){if("number"!=typeof e)throw new TypeError("tag must be a number");if(!V_.isBuffer(t))throw new TypeError("argument must be a buffer");this.writeByte(e),this.writeLength(t.length),this._ensure(t.length),t.copy(this._buf,this._offset,0,t.length),this._offset+=t.length},Z_.prototype.writeStringArray=function(t){if(!t instanceof Array)throw new TypeError("argument must be an Array[String]");var e=this;t.forEach((function(t){e.writeString(t)}))},Z_.prototype.writeOID=function(t,e){if("string"!=typeof t)throw new TypeError("argument must be a string");if("number"!=typeof e&&(e=G_.OID),!/^([0-9]+\.){3,}[0-9]+$/.test(t))throw new Error("argument is not a valid OID string");var r=t.split("."),i=[];i.push(40*parseInt(r[0],10)+parseInt(r[1],10)),r.slice(2).forEach((function(t){!function(t,e){e<128?t.push(e):e<16384?(t.push(e>>>7|128),t.push(127&e)):e<2097152?(t.push(e>>>14|128),t.push(255&(e>>>7|128)),t.push(127&e)):e<268435456?(t.push(e>>>21|128),t.push(255&(e>>>14|128)),t.push(255&(e>>>7|128)),t.push(127&e)):(t.push(255&(e>>>28|128)),t.push(255&(e>>>21|128)),t.push(255&(e>>>14|128)),t.push(255&(e>>>7|128)),t.push(127&e))}(i,parseInt(t,10))}));var n=this;this._ensure(2+i.length),this.writeByte(e),this.writeLength(i.length),i.forEach((function(t){n.writeByte(t)}))},Z_.prototype.writeLength=function(t){if("number"!=typeof t)throw new TypeError("argument must be a Number");if(this._ensure(4),t<=127)this._buf[this._offset++]=t;else if(t<=255)this._buf[this._offset++]=129,this._buf[this._offset++]=t;else if(t<=65535)this._buf[this._offset++]=130,this._buf[this._offset++]=t>>8,this._buf[this._offset++]=t;else{if(!(t<=16777215))throw W_("Length too long (> 4 bytes)");this._buf[this._offset++]=131,this._buf[this._offset++]=t>>16,this._buf[this._offset++]=t>>8,this._buf[this._offset++]=t}},Z_.prototype.startSequence=function(t){"number"!=typeof t&&(t=G_.Sequence|G_.Constructor),this.writeByte(t),this._seq.push(this._offset),this._ensure(3),this._offset+=3},Z_.prototype.endSequence=function(){var t=this._seq.pop(),e=t+3,r=this._offset-e;if(r<=127)this._shift(e,r,-2),this._buf[t]=r;else if(r<=255)this._shift(e,r,-1),this._buf[t]=129,this._buf[t+1]=r;else if(r<=65535)this._buf[t]=130,this._buf[t+1]=r>>8,this._buf[t+2]=r;else{if(!(r<=16777215))throw W_("Sequence too long");this._shift(e,r,1),this._buf[t]=131,this._buf[t+1]=r>>16,this._buf[t+2]=r>>8,this._buf[t+3]=r}},Z_.prototype._shift=function(t,e,r){K_.ok(void 0!==t),K_.ok(void 0!==e),K_.ok(r),this._buf.copy(this._buf,t+r,t,t+e),this._offset+=r},Z_.prototype._ensure=function(t){if(K_.ok(t),this._size-this._offset-1?(this.$options.signingSchemeOptions={hash:n[0]},this.$options.signingScheme=r):(this.$options.signingScheme=n[0],this.$options.signingSchemeOptions={hash:null}):(this.$options.signingSchemeOptions={hash:n[1]},this.$options.signingScheme=n[0])}else lM.isObject(i.signingScheme)&&(this.$options.signingScheme=i.signingScheme.scheme||r,this.$options.signingSchemeOptions=lM.omit(i.signingScheme,"scheme"));if(!dM.isSignature(this.$options.signingScheme))throw Error("Unsupported signing scheme");if(this.$options.signingSchemeOptions.hash&&-1===t[this.$options.environment].indexOf(this.$options.signingSchemeOptions.hash))throw Error("Unsupported hashing algorithm for "+this.$options.environment+" environment")}if(i.encryptionScheme){if(lM.isString(i.encryptionScheme)?(this.$options.encryptionScheme=i.encryptionScheme.toLowerCase(),this.$options.encryptionSchemeOptions={}):lM.isObject(i.encryptionScheme)&&(this.$options.encryptionScheme=i.encryptionScheme.scheme||e,this.$options.encryptionSchemeOptions=lM.omit(i.encryptionScheme,"scheme")),!dM.isEncryption(this.$options.encryptionScheme))throw Error("Unsupported encryption scheme");if(this.$options.encryptionSchemeOptions.hash&&-1===t[this.$options.environment].indexOf(this.$options.encryptionSchemeOptions.hash))throw Error("Unsupported hashing algorithm for "+this.$options.environment+" environment")}this.keyPair.setOptions(this.$options)},n.prototype.generateKeyPair=function(t,e){if(e=e||65537,(t=t||2048)%8!=0)throw Error("Key size must be a multiple of 8.");return this.keyPair.generate(t,e.toString(16)),this.$cache={},this},n.prototype.importKey=function(t,e){if(!t)throw Error("Empty key given");if(e&&(e=i[e]||e),!pM.detectAndImport(this.keyPair,t,e)&&void 0===e)throw Error("Key format must be specified");return this.$cache={},this},n.prototype.exportKey=function(t){return t=i[t=t||"private"]||t,this.$cache[t]||(this.$cache[t]=pM.detectAndExport(this.keyPair,t)),this.$cache[t]},n.prototype.isPrivate=function(){return this.keyPair.isPrivate()},n.prototype.isPublic=function(t){return this.keyPair.isPublic(t)},n.prototype.isEmpty=function(t){return!(this.keyPair.n||this.keyPair.e||this.keyPair.d)},n.prototype.encrypt=function(t,e,r){return this.$$encryptKey(!1,t,e,r)},n.prototype.decrypt=function(t,e){return this.$$decryptKey(!1,t,e)},n.prototype.encryptPrivate=function(t,e,r){return this.$$encryptKey(!0,t,e,r)},n.prototype.decryptPublic=function(t,e){return this.$$decryptKey(!0,t,e)},n.prototype.$$encryptKey=function(t,e,r,i){try{var n=this.keyPair.encrypt(this.$getDataForEncrypt(e,i),t);return"buffer"!=r&&r?n.toString(r):n}catch(t){throw Error("Error during encryption. Original error: "+t)}},n.prototype.$$decryptKey=function(t,e,r){try{e=lM.isString(e)?Re.from(e,"base64"):e;var i=this.keyPair.decrypt(e,t);if(null===i)throw Error("Key decrypt method returns null.");return this.$getDecryptedData(i,r)}catch(t){throw Error("Error during decryption (probably incorrect key). Original error: "+t)}},n.prototype.sign=function(t,e,r){if(!this.isPrivate())throw Error("This is not private key");var i=this.keyPair.sign(this.$getDataForEncrypt(t,r));return e&&"buffer"!=e&&(i=i.toString(e)),i},n.prototype.verify=function(t,e,r,i){if(!this.isPublic())throw Error("This is not public key");return i=i&&"buffer"!=i?i:null,this.keyPair.verify(this.$getDataForEncrypt(t,r),e,i)},n.prototype.getKeySize=function(){return this.keyPair.keySize},n.prototype.getMaxMessageSize=function(){return this.keyPair.maxMessageLength},n.prototype.$getDataForEncrypt=function(t,e){if(lM.isString(t)||lM.isNumber(t))return Re.from(""+t,e||"utf8");if(Re.isBuffer(t))return t;if(lM.isObject(t))return Re.from(JSON.stringify(t));throw Error("Unexpected data type")},n.prototype.$getDecryptedData=function(t,e){return"buffer"==(e=e||"buffer")?t:"json"==e?JSON.parse(t.toString()):t.toString(e)},n}(),gM="object"==typeof Bt&&Bt&&Bt.Object===Object&&Bt,yM="object"==typeof self&&self&&self.Object===Object&&self,bM=gM||yM||Function("return this")(),vM=bM.Symbol,wM=Object.prototype,_M=wM.hasOwnProperty,MM=wM.toString,SM=vM?vM.toStringTag:void 0;var EM=Object.prototype.toString;var kM="[object Null]",AM="[object Undefined]",OM=vM?vM.toStringTag:void 0;function TM(t){return null==t?void 0===t?AM:kM:OM&&OM in Object(t)?function(t){var e=_M.call(t,SM),r=t[SM];try{t[SM]=void 0;var i=!0}catch(t){}var n=MM.call(t);return i&&(e?t[SM]=r:delete t[SM]),n}(t):function(t){return EM.call(t)}(t)}function IM(t){return null!=t&&"object"==typeof t}var RM="[object Symbol]";function CM(t){return"symbol"==typeof t||IM(t)&&TM(t)==RM}function PM(t,e){for(var r=-1,i=null==t?0:t.length,n=Array(i);++r-1&&t%1==0&&t-1&&t%1==0&&t<=wS}function MS(t){return null!=t&&_S(t.length)&&!eS(t)}var SS=Object.prototype;function ES(t){return IM(t)&&"[object Arguments]"==TM(t)}var kS=Object.prototype,AS=kS.hasOwnProperty,OS=kS.propertyIsEnumerable,TS=ES(function(){return arguments}())?ES:function(t){return IM(t)&&AS.call(t,"callee")&&!OS.call(t,"callee")},IS=TS;var RS="object"==typeof exports&&exports&&!exports.nodeType&&exports,CS=RS&&"object"==typeof module&&module&&!module.nodeType&&module,PS=CS&&CS.exports===RS?bM.Buffer:void 0,xS=(PS?PS.isBuffer:void 0)||function(){return!1},NS={};NS["[object Float32Array]"]=NS["[object Float64Array]"]=NS["[object Int8Array]"]=NS["[object Int16Array]"]=NS["[object Int32Array]"]=NS["[object Uint8Array]"]=NS["[object Uint8ClampedArray]"]=NS["[object Uint16Array]"]=NS["[object Uint32Array]"]=!0,NS["[object Arguments]"]=NS["[object Array]"]=NS["[object ArrayBuffer]"]=NS["[object Boolean]"]=NS["[object DataView]"]=NS["[object Date]"]=NS["[object Error]"]=NS["[object Function]"]=NS["[object Map]"]=NS["[object Number]"]=NS["[object Object]"]=NS["[object RegExp]"]=NS["[object Set]"]=NS["[object String]"]=NS["[object WeakMap]"]=!1;var BS,LS="object"==typeof exports&&exports&&!exports.nodeType&&exports,DS=LS&&"object"==typeof module&&module&&!module.nodeType&&module,jS=DS&&DS.exports===LS&&gM.process,US=function(){try{var t=DS&&DS.require&&DS.require("util").types;return t||jS&&jS.binding&&jS.binding("util")}catch(t){}}(),qS=US&&US.isTypedArray,FS=qS?(BS=qS,function(t){return BS(t)}):function(t){return IM(t)&&_S(t.length)&&!!NS[TM(t)]},zS=FS,HS=Object.prototype.hasOwnProperty;function KS(t,e){var r=xM(t),i=!r&&IS(t),n=!r&&!i&&xS(t),o=!r&&!i&&!n&&zS(t),s=r||i||n||o,a=s?function(t,e){for(var r=-1,i=Array(t);++r-1},oE.prototype.set=function(t,e){var r=this.__data__,i=iE(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this};var sE=pS(bM,"Map");function aE(t,e){var r=t.__data__;return function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}(e)?r["string"==typeof e?"string":"hash"]:r.map}function hE(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e0&&r(a)?e>1?ME(a,e-1,r,i,n):vE(n,a):i||(n[n.length]=a)}return n}function SE(t){var e=this.__data__=new oE(t);this.size=e.size}SE.prototype.clear=function(){this.__data__=new oE,this.size=0},SE.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},SE.prototype.get=function(t){return this.__data__.get(t)},SE.prototype.has=function(t){return this.__data__.has(t)},SE.prototype.set=function(t,e){var r=this.__data__;if(r instanceof oE){var i=r.__data__;if(!sE||i.length<199)return i.push([t,e]),this.size=++r.size,this;r=this.__data__=new hE(i)}return r.set(t,e),this.size=r.size,this};var EE=Object.prototype.propertyIsEnumerable,kE=Object.getOwnPropertySymbols,AE=kE?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var r=-1,i=null==t?0:t.length,n=0,o=[];++ra))return!1;var u=o.get(t),f=o.get(e);if(u&&f)return u==e&&f==t;var l=-1,c=!0,d=r&ZE?new VE:void 0;for(o.set(t,e),o.set(e,t);++l{t-this.lastRenderTime>30&&this.render(),requestAnimationFrame(this.autoRender)},this.camera.position.z=2,this._generateMarkForImage()}_generateMark(t=[28145,22323,36805,32500,25968,23383,23402,29983,25216,26415,26377,38480,20844,21496]){}_generateMarkForString(t=[28145,22323,36805,32500,25968,23383,23402,29983,25216,26415,26377,38480,20844,21496]){const e=Array.isArray(t)?String.fromCodePoint(...t):t,r=e.length,{fontSize:i}=this,o=i/4,u=2*o,{x:f,y:l}=this.size=new n(i*r+u,i+u),c=document.createElement("canvas");c.width=f,c.height=l;const d=c.getContext("2d");if(!d)return;const p=d.createLinearGradient(0,0,f,l);p.addColorStop(0,"#ff3653"),p.addColorStop(.5,"#8adb00"),p.addColorStop(1,"#2c8fff"),d.fillStyle=p,d.font=`bold ${i}px/1 serif`,d.fillText(e,o,l-1.5*o);const m=aA.load(c.toDataURL()),g=new s({map:m,toneMapped:!1,transparent:!0}),y=new a(new h(f,l),g);this.add(y)}_generateMarkForImage(t=iA,e=nA,r=oA){const{renderer:i}=this.viewport,{width:o,height:f}=i.domElement,{renderWidth:l,renderHeight:c}=this._calculateImageSize(o,f,e,r);this.size=new n(i.domElement.width,i.domElement.height);const d=aA.load(t);d.wrapS=u,d.wrapT=u,d.repeat.set(l/e,c/r);const p=new s({map:d,toneMapped:!1,transparent:!0}),m=new a(new h(l,c),p);this.add(m)}_calculateImageSize(t,e,r,i){let n=0,o=0;return n=t,o=n*(i/r),othis.render()))}removeFromViewport(){this.viewport.postRender.delete("cps-water-mark")}}const{approxEquals:uA,warn:fA}=t.utils;function lA(t){let e="";for(let r=0;r{const i=t.get(r[e]);return i?i.push(r):t.set(r[e],[r]),t}),r),r}const dA=(t,e)=>{const{content:r,sign:i}=t;if(!e.verify(r,i,"utf8","base64"))throw new Error("v2 error");const n=function(t,e){const r=t.charCodeAt(0),i=t.substring(1,r),n=t.substring(r),o=function(t){const e=function(t){const e=[];let r,i,n,o,s,a,h,u=0;t=t.replace(/[^A-Za-z0-9+/=]/g,"");for(;u>4,i=(15&s)<<4|a>>2,n=(3&a)<<6|h,e.push(r),64!==a&&e.push(i),64!==h&&e.push(n);return new Int8Array(e)}(t),r=new DataView(e.buffer).getInt16(0);if(1===r)return function(t){const e=new DataView(t);let r=2;const i=e.getInt16(r);r+=2;const n=[];for(let t=0;t0,start:o,end:s};n.push(a)}return n.sort(((t,e)=>t.index<=e.index?-1:1)),n}(e.buffer);throw new Error(`解析信息头失败,版本错误: version=${r}`)}(i);let s="";for(const t of o){const r=n.substring(t.start,t.end);let i;i=t.encrypt?e.decryptPublic(r,"utf8"):lA(r),s+=i}return s}(r,e);return JSON.parse(n)};const pA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function mA(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var gA={},yA={get exports(){return gA},set exports(t){gA=t}};yA.exports=function(){function t(e,r,i){function n(s,a){if(!r[s]){if(!e[s]){if(!a&&mA)return mA(s);if(o)return o(s,!0);var h=new Error("Cannot find module '"+s+"'");throw h.code="MODULE_NOT_FOUND",h}var u=r[s]={exports:{}};e[s][0].call(u.exports,(function(t){return n(e[s][1][t]||t)}),u,u.exports,t,e,r,i)}return r[s].exports}for(var o=mA,s=0;s0&&(e.topicAliasMaximum>65535?g("MqttClient :: options.topicAliasMaximum is out of range"):this.topicAliasRecv=new s(e.topicAliasMaximum)),this.on("connect",(function(){const t=this.queue;function e(){const r=t.shift();g("deliver :: entry %o",r);let n=null;if(!r)return void i._resubscribe();n=r.packet,g("deliver :: call _sendPacket for %o",n);let o=!0;n.messageId&&0!==n.messageId&&(i.messageIdProvider.register(n.messageId)||(o=!1)),o?i._sendPacket(n,(function(t){r.cb&&r.cb(t),e()})):(g("messageId: %d has already used. The message is skipped and removed.",n.messageId),e())}g("connect :: sending queued packets"),e()})),this.on("close",(function(){g("close :: connected set to `false`"),this.connected=!1,g("close :: clearing connackTimer"),clearTimeout(this.connackTimer),g("close :: clearing ping timer"),null!==i.pingTimer&&(i.pingTimer.clear(),i.pingTimer=null),this.topicAliasRecv&&this.topicAliasRecv.clear(),g("close :: calling _setupReconnect"),this._setupReconnect()})),n.call(this),g("MqttClient :: setting up stream"),this._setupStream()}l(R,n),R.prototype._setupStream=function(){const t=this,e=new f,r=h.parser(this.options);let i=null;const n=[];function o(){if(n.length)y(s);else{const t=i;i=null,t()}}function s(){g("work :: getting next packet in queue");const e=n.shift();if(e)g("work :: packet pulled from queue"),t._handlePacket(e,o);else{g("work :: no packets in queue");const t=i;i=null,g("work :: done flag is %s",!!t),t&&t()}}function a(e){g("streamErrorHandler :: error",e.message),w.includes(e.code)?(g("streamErrorHandler :: emitting error"),t.emit("error",e)):I(e)}g("_setupStream :: calling method to clear reconnect"),this._clearReconnect(),g("_setupStream :: using streamBuilder provided to client to create stream"),this.stream=this.streamBuilder(this),r.on("packet",(function(t){g("parser :: on packet push to packets array."),n.push(t)})),e._write=function(t,e,n){i=n,g("writable stream :: parsing buffer"),r.parse(t),s()},g("_setupStream :: pipe stream to writable stream"),this.stream.pipe(e),this.stream.on("error",a),this.stream.on("close",(function(){g("(%s)stream :: on close",t.options.clientId),O(t.outgoing),g("stream: emit close to MqttClient"),t.emit("close")})),g("_setupStream: sending packet `connect`");const u=Object.create(this.options);if(u.cmd="connect",this.topicAliasRecv&&(u.properties||(u.properties={}),this.topicAliasRecv&&(u.properties.topicAliasMaximum=this.topicAliasRecv.max)),k(this,u),r.on("error",this.emit.bind(this,"error")),this.options.properties){if(!this.options.properties.authenticationMethod&&this.options.properties.authenticationData)return t.end((()=>this.emit("error",new Error("Packet has no Authentication Method")))),this;this.options.properties.authenticationMethod&&this.options.authPacket&&"object"==typeof this.options.authPacket&&k(this,m({cmd:"auth",reasonCode:0},this.options.authPacket))}this.stream.setMaxListeners(1e3),clearTimeout(this.connackTimer),this.connackTimer=setTimeout((function(){g("!!connectTimeout hit!! Calling _cleanUp with force `true`"),t._cleanUp(!0)}),this.options.connectTimeout)},R.prototype._handlePacket=function(t,e){const r=this.options;if(5===r.protocolVersion&&r.properties&&r.properties.maximumPacketSize&&r.properties.maximumPacketSize0||!s())&&this._storeProcessingQueue.push({invoke:s,cbStorePut:r.cbStorePut,callback:i}),this},R.prototype.subscribe=function(){const t=this,e=new Array(arguments.length);for(let t=0;t0){const i={qos:r.qos};5===a&&(i.nl=r.nl||!1,i.rap=r.rap||!1,i.rh=r.rh||0,i.properties=r.properties),t._resubscribeTopics[r.topic]=i,e.push(r.topic)}})),t.messageIdToTopic[i.messageId]=e}return t.outgoing[i.messageId]={volatile:!0,cb:function(t,e){if(!t){const t=e.granted;for(let e=0;e0||!f())&&this._storeProcessingQueue.push({invoke:f,callback:o}),this},R.prototype.unsubscribe=function(){const t=this,e=new Array(arguments.length);for(let t=0;t0||!s())&&this._storeProcessingQueue.push({invoke:s,callback:i}),this},R.prototype.end=function(t,e,r){const i=this;function n(){g("end :: closeStores: closing incoming and outgoing stores"),i.disconnected=!0,i.incomingStore.close((function(t){i.outgoingStore.close((function(e){if(g("end :: closeStores: emitting end"),i.emit("end"),r){const i=t||e;g("end :: closeStores: invoking callback with args"),r(i)}}))})),i._deferredReconnect&&i._deferredReconnect()}function o(){g("end :: (%s) :: finish :: calling _cleanUp with force %s",i.options.clientId,t),i._cleanUp(t,(()=>{g("end :: finish :: calling process.nextTick on closeStores"),y(n.bind(i))}),e)}return g("end :: (%s)",this.options.clientId),null!=t&&"boolean"==typeof t||(r=e||I,e=t,t=!1,"object"!=typeof e&&(r=e,e=null,"function"!=typeof r&&(r=I))),"object"!=typeof e&&(r=e,e=null),g("end :: cb? %s",!!r),r=r||I,this.disconnecting?(r(),this):(this._clearReconnect(),this.disconnecting=!0,!t&&Object.keys(this.outgoing).length>0?(g("end :: (%s) :: calling finish in 10ms once outgoing is empty",i.options.clientId),this.once("outgoingEmpty",setTimeout.bind(null,o,10))):(g("end :: (%s) :: immediately calling finish",i.options.clientId),o()),this)},R.prototype.removeOutgoingMessage=function(t){const e=this.outgoing[t]?this.outgoing[t].cb:null;return delete this.outgoing[t],this.outgoingStore.del({messageId:t},(function(){e(new Error("Message removed"))})),this},R.prototype.reconnect=function(t){g("client reconnect");const e=this,r=function(){t?(e.options.incomingStore=t.incomingStore,e.options.outgoingStore=t.outgoingStore):(e.options.incomingStore=null,e.options.outgoingStore=null),e.incomingStore=e.options.incomingStore||new o,e.outgoingStore=e.options.outgoingStore||new o,e.disconnecting=!1,e.disconnected=!1,e._deferredReconnect=null,e._reconnect()};return this.disconnecting&&!this.disconnected?this._deferredReconnect=r:r(),this},R.prototype._reconnect=function(){g("_reconnect: emitting reconnect to client"),this.emit("reconnect"),this.connected?(this.end((()=>{this._setupStream()})),g("client already connected. disconnecting first.")):(g("_reconnect: calling _setupStream"),this._setupStream())},R.prototype._setupReconnect=function(){const t=this;!t.disconnecting&&!t.reconnectTimer&&t.options.reconnectPeriod>0?(this.reconnecting||(g("_setupReconnect :: emit `offline` state"),this.emit("offline"),g("_setupReconnect :: set `reconnecting` to `true`"),this.reconnecting=!0),g("_setupReconnect :: setting reconnectTimer for %d ms",t.options.reconnectPeriod),t.reconnectTimer=setInterval((function(){g("reconnectTimer :: reconnect triggered!"),t._reconnect()}),t.options.reconnectPeriod)):g("_setupReconnect :: doing nothing...")},R.prototype._clearReconnect=function(){g("_clearReconnect : clearing reconnect timer"),this.reconnectTimer&&(clearInterval(this.reconnectTimer),this.reconnectTimer=null)},R.prototype._cleanUp=function(t,e){const r=arguments[2];if(e&&(g("_cleanUp :: done callback provided for on stream close"),this.stream.on("close",e)),g("_cleanUp :: forced? %s",t),t)0===this.options.reconnectPeriod&&this.options.clean&&A(this.outgoing),g("_cleanUp :: (%s) :: destroying stream",this.options.clientId),this.stream.destroy();else{const t=m({cmd:"disconnect"},r);g("_cleanUp :: (%s) :: call _sendPacket with disconnect packet",this.options.clientId),this._sendPacket(t,b.bind(null,this.stream.end.bind(this.stream)))}this.disconnecting||(g("_cleanUp :: client not disconnecting. Clearing and resetting reconnect."),this._clearReconnect(),this._setupReconnect()),null!==this.pingTimer&&(g("_cleanUp :: clearing pingTimer"),this.pingTimer.clear(),this.pingTimer=null),e&&!this.connected&&(g("_cleanUp :: (%s) :: removing stream `done` callback `close` listener",this.options.clientId),this.stream.removeListener("close",e),e())},R.prototype._sendPacket=function(t,e,r){g("_sendPacket :: (%s) :: start",this.options.clientId),r=r||I,e=e||I;const i=S(this,t);if(i)e(i);else{if(!this.connected)return"auth"===t.cmd?(this._shiftPingInterval(),void k(this,t,e)):(g("_sendPacket :: client not connected. Storing packet offline."),void this._storePacket(t,e,r));switch(this._shiftPingInterval(),t.cmd){case"publish":break;case"pubrel":return void T(this,t,e,r);default:return void k(this,t,e)}switch(t.qos){case 2:case 1:T(this,t,e,r);break;default:k(this,t,e)}g("_sendPacket :: (%s) :: end",this.options.clientId)}},R.prototype._storePacket=function(t,e,r){g("_storePacket :: packet: %o",t),g("_storePacket :: cb? %s",!!e),r=r||I;let i=t;if("publish"===i.cmd){i=d(t);const r=E(this,i);if(r)return e&&e(r)}0===(i.qos||0)&&this.queueQoSZero||"publish"!==i.cmd?this.queue.push({packet:i,cb:e}):i.qos>0?(e=this.outgoing[i.messageId]?this.outgoing[i.messageId].cb:null,this.outgoingStore.put(i,(function(t){if(t)return e&&e(t);r()}))):e&&e(new Error("No connection to broker"))},R.prototype._setupPingTimer=function(){g("_setupPingTimer :: keepalive %d (seconds)",this.options.keepalive);const t=this;!this.pingTimer&&this.options.keepalive&&(this.pingResp=!0,this.pingTimer=c((function(){t._checkPing()}),1e3*this.options.keepalive))},R.prototype._shiftPingInterval=function(){this.pingTimer&&this.options.keepalive&&this.options.reschedulePings&&this.pingTimer.reschedule(1e3*this.options.keepalive)},R.prototype._checkPing=function(){g("_checkPing :: checking ping..."),this.pingResp?(g("_checkPing :: ping response received. Clearing flag and sending `pingreq`"),this.pingResp=!1,this._sendPacket({cmd:"pingreq"})):(g("_checkPing :: calling _cleanUp with force true"),this._cleanUp(!0))},R.prototype._handlePingresp=function(){this.pingResp=!0},R.prototype._handleConnack=function(t){g("_handleConnack");const e=this.options,r=5===e.protocolVersion?t.reasonCode:t.returnCode;if(clearTimeout(this.connackTimer),delete this.topicAliasSend,t.properties){if(t.properties.topicAliasMaximum){if(t.properties.topicAliasMaximum>65535)return void this.emit("error",new Error("topicAliasMaximum from broker is out of range"));t.properties.topicAliasMaximum>0&&(this.topicAliasSend=new a(t.properties.topicAliasMaximum))}t.properties.serverKeepAlive&&e.keepalive&&(e.keepalive=t.properties.serverKeepAlive,this._shiftPingInterval()),t.properties.maximumPacketSize&&(e.properties||(e.properties={}),e.properties.maximumPacketSize=t.properties.maximumPacketSize)}if(0===r)this.reconnecting=!1,this._onConnect(t);else if(r>0){const t=new Error("Connection refused: "+_[r]);t.code=r,this.emit("error",t)}},R.prototype._handleAuth=function(t){const e=this.options.protocolVersion,r=5===e?t.reasonCode:t.returnCode;if(5!==e){const t=new Error("Protocol error: Auth packets are only supported in MQTT 5. Your version:"+e);return t.code=r,void this.emit("error",t)}const i=this;this.handleAuth(t,(function(t,e){if(t)i.emit("error",t);else if(24===r)i.reconnecting=!1,i._sendPacket(e);else{const e=new Error("Connection refused: "+_[r]);t.code=r,i.emit("error",e)}}))},R.prototype.handleAuth=function(t,e){e()},R.prototype._handlePublish=function(t,e){g("_handlePublish: packet %o",t),e=void 0!==e?e:I;let r=t.topic.toString();const i=t.payload,n=t.qos,o=t.messageId,s=this,a=this.options,h=[0,16,128,131,135,144,145,151,153];if(5===this.options.protocolVersion){let e;if(t.properties&&(e=t.properties.topicAlias),void 0!==e)if(0===r.length){if(!(e>0&&e<=65535))return g("_handlePublish :: topic alias out of range. alias: %d",e),void this.emit("error",new Error("Received Topic Alias is out of range"));{const t=this.topicAliasRecv.getTopicByAlias(e);if(!t)return g("_handlePublish :: unregistered topic alias. alias: %d",e),void this.emit("error",new Error("Received unregistered Topic Alias"));r=t,g("_handlePublish :: topic complemented by alias. topic: %s - alias: %d",r,e)}}else{if(!this.topicAliasRecv.put(r,e))return g("_handlePublish :: topic alias out of range. alias: %d",e),void this.emit("error",new Error("Received Topic Alias is out of range"));g("_handlePublish :: registered topic: %s - alias: %d",r,e)}}switch(g("_handlePublish: qos %d",n),n){case 2:a.customHandleAcks(r,i,t,(function(r,i){return r instanceof Error||(i=r,r=null),r?s.emit("error",r):-1===h.indexOf(i)?s.emit("error",new Error("Wrong reason code for pubrec")):void(i?s._sendPacket({cmd:"pubrec",messageId:o,reasonCode:i},e):s.incomingStore.put(t,(function(){s._sendPacket({cmd:"pubrec",messageId:o},e)})))}));break;case 1:a.customHandleAcks(r,i,t,(function(n,a){return n instanceof Error||(a=n,n=null),n?s.emit("error",n):-1===h.indexOf(a)?s.emit("error",new Error("Wrong reason code for puback")):(a||s.emit("message",r,i,t),void s.handleMessage(t,(function(t){if(t)return e&&e(t);s._sendPacket({cmd:"puback",messageId:o,reasonCode:a},e)})))}));break;case 0:this.emit("message",r,i,t),this.handleMessage(t,e);break;default:g("_handlePublish: unknown QoS. Doing nothing.")}},R.prototype.handleMessage=function(t,e){e()},R.prototype._handleAck=function(t){const e=t.messageId,r=t.cmd;let i=null;const n=this.outgoing[e]?this.outgoing[e].cb:null,o=this;let s;if(n){switch(g("_handleAck :: packet type",r),r){case"pubcomp":case"puback":{const r=t.reasonCode;r&&r>0&&16!==r&&(s=new Error("Publish error: "+_[r]),s.code=r,n(s,t)),delete this.outgoing[e],this.outgoingStore.del(t,n),this.messageIdProvider.deallocate(e),this._invokeStoreProcessingQueue();break}case"pubrec":{i={cmd:"pubrel",qos:2,messageId:e};const r=t.reasonCode;r&&r>0&&16!==r?(s=new Error("Publish error: "+_[r]),s.code=r,n(s,t)):this._sendPacket(i);break}case"suback":delete this.outgoing[e],this.messageIdProvider.deallocate(e);for(let r=0;r0)if(this.options.resubscribe)if(5===this.options.protocolVersion){g("_resubscribe: protocolVersion 5");for(let e=0;e0){const t=this._storeProcessingQueue[0];if(t&&t.invoke())return this._storeProcessingQueue.shift(),!0}return!1},R.prototype._invokeAllStoreProcessingQueue=function(){for(;this._invokeStoreProcessingQueue(););},R.prototype._flushStoreProcessingQueue=function(){for(const t of this._storeProcessingQueue)t.cbStorePut&&t.cbStorePut(new Error("Connection closed")),t.callback&&t.callback(new Error("Connection closed"));this._storeProcessingQueue.splice(0)},e.exports=R}).call(this)}).call(this,t("_process"),void 0!==Y?Y:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./default-message-id-provider":7,"./store":8,"./topic-alias-recv":9,"./topic-alias-send":10,"./validations":11,_process:50,debug:18,events:22,inherits:24,"mqtt-packet":40,"readable-stream":69,reinterval:70,"rfdc/default":71,xtend:81}],2:[function(t,e,r){const{Buffer:i}=t("buffer"),n=t("readable-stream").Transform,o=t("duplexify");let s,a,h,u=!1;function f(){const t=new n;return t._write=function(t,e,r){s.sendSocketMessage({data:t.buffer,success:function(){r()},fail:function(){r(new Error)}})},t._flush=function(t){s.closeSocket({success:function(){t()}})},t}function l(t){t.hostname||(t.hostname="localhost"),t.path||(t.path="/"),t.wsOptions||(t.wsOptions={})}function c(t,e){const r="alis"===t.protocol?"wss":"ws";let i=r+"://"+t.hostname+t.path;return t.port&&80!==t.port&&443!==t.port&&(i=r+"://"+t.hostname+":"+t.port+t.path),"function"==typeof t.transformWsUrl&&(i=t.transformWsUrl(i,t,e)),i}function d(){u||(u=!0,s.onSocketOpen((function(){h.setReadable(a),h.setWritable(a),h.emit("connect")})),s.onSocketMessage((function(t){if("string"==typeof t.data){const e=i.from(t.data,"base64");a.push(e)}else{const e=new FileReader;e.addEventListener("load",(function(){let t=e.result;t=t instanceof ArrayBuffer?i.from(t):i.from(t,"utf8"),a.push(t)})),e.readAsArrayBuffer(t.data)}})),s.onSocketClose((function(){h.end(),h.destroy()})),s.onSocketError((function(t){h.destroy(t)})))}function p(t,e){if(e.hostname=e.hostname||e.host,!e.hostname)throw new Error("Could not determine host. Specify host manually.");const r="MQIsdp"===e.protocolId&&3===e.protocolVersion?"mqttv3.1":"mqtt";l(e);const i=c(e,t);return s=e.my,s.connectSocket({url:i,protocols:r}),a=f(),h=o.obj(),d(),h}e.exports=p},{buffer:17,duplexify:20,"readable-stream":69}],3:[function(t,e,r){const i=t("net"),n=t("debug")("mqttjs:tcp");function o(t,e){e.port=e.port||1883,e.hostname=e.hostname||e.host||"localhost";const r=e.port,o=e.hostname;return n("port %d and host %s",r,o),i.createConnection(r,o)}e.exports=o},{debug:18,net:16}],4:[function(t,e,r){const i=t("tls"),n=t("net"),o=t("debug")("mqttjs:tls");function s(t,e){e.port=e.port||8883,e.host=e.hostname||e.host||"localhost",0===n.isIP(e.host)&&(e.servername=e.host),e.rejectUnauthorized=!1!==e.rejectUnauthorized,delete e.path,o("port %d host %s rejectUnauthorized %b",e.port,e.host,e.rejectUnauthorized);const r=i.connect(e);function s(i){e.rejectUnauthorized&&t.emit("error",i),r.end()}return r.on("secureConnect",(function(){e.rejectUnauthorized&&!r.authorized?r.emit("error",new Error("TLS not authorized")):r.removeListener("error",s)})),r.on("error",s),r}e.exports=s},{debug:18,net:16,tls:16}],5:[function(t,e,r){(function(r){(function(){const{Buffer:i}=t("buffer"),n=t("ws"),o=t("debug")("mqttjs:ws"),s=t("duplexify"),a=t("readable-stream").Transform,h=["rejectUnauthorized","ca","cert","key","pfx","passphrase"],u=void 0!==r&&"browser"===r.title||"function"==typeof __webpack_require__;function f(t,e){let r=t.protocol+"://"+t.hostname+":"+t.port+t.path;return"function"==typeof t.transformWsUrl&&(r=t.transformWsUrl(r,t,e)),r}function l(t){const e=t;return t.hostname||(e.hostname="localhost"),t.port||("wss"===t.protocol?e.port=443:e.port=80),t.path||(e.path="/"),t.wsOptions||(e.wsOptions={}),u||"wss"!==t.protocol||h.forEach((function(r){Object.prototype.hasOwnProperty.call(t,r)&&!Object.prototype.hasOwnProperty.call(t.wsOptions,r)&&(e.wsOptions[r]=t[r])})),e}function c(t){const e=l(t);if(e.hostname||(e.hostname=e.host),!e.hostname){if("undefined"==typeof document)throw new Error("Could not determine host. Specify host manually.");const t=new URL(document.URL);e.hostname=t.hostname,e.port||(e.port=t.port)}return void 0===e.objectMode&&(e.objectMode=!(!0===e.binary||void 0===e.binary)),e}function d(t,e,r){o("createWebSocket"),o("protocol: "+r.protocolId+" "+r.protocolVersion);const i="MQIsdp"===r.protocolId&&3===r.protocolVersion?"mqttv3.1":"mqtt";return o("creating new Websocket for url: "+e+" and protocol: "+i),new n(e,[i],r.wsOptions)}function p(t,e){const r="MQIsdp"===e.protocolId&&3===e.protocolVersion?"mqttv3.1":"mqtt",i=f(e,t),n=new WebSocket(i,[r]);return n.binaryType="arraybuffer",n}function m(t,e){o("streamBuilder");const r=l(e),i=f(r,t),s=d(t,i,r),a=n.createWebSocketStream(s,r.wsOptions);return a.url=i,s.on("close",(()=>{a.destroy()})),a}function g(t,e){let r;o("browserStreamBuilder");const n=c(e).browserBufferSize||524288,h=e.browserBufferTimeout||1e3,u=!e.objectMode,f=p(t,e),l=m(e,_,M);e.objectMode||(l._writev=w),l.on("close",(()=>{f.close()}));const d=void 0!==f.addEventListener;function m(t,e,r){const i=new a({objectModeMode:t.objectMode});return i._write=e,i._flush=r,i}function g(){r.setReadable(l),r.setWritable(l),r.emit("connect")}function y(){r.end(),r.destroy()}function b(t){r.destroy(t)}function v(t){let e=t.data;e=e instanceof ArrayBuffer?i.from(e):i.from(e,"utf8"),l.push(e)}function w(t,e){const r=new Array(t.length);for(let e=0;en&&setTimeout(_,h,t,e,r),u&&"string"==typeof t&&(t=i.from(t,"utf8"));try{f.send(t)}catch(t){return r(t)}r()}function M(t){f.close(),t()}return f.readyState===f.OPEN?r=l:(r=r=s(void 0,void 0,e),e.objectMode||(r._writev=w),d?f.addEventListener("open",g):f.onopen=g),r.socket=f,d?(f.addEventListener("close",y),f.addEventListener("error",b),f.addEventListener("message",v)):(f.onclose=y,f.onerror=b,f.onmessage=v),r}e.exports=u?g:m}).call(this)}).call(this,t("_process"))},{_process:50,buffer:17,debug:18,duplexify:20,"readable-stream":69,ws:80}],6:[function(t,e,r){const{Buffer:i}=t("buffer"),n=t("readable-stream").Transform,o=t("duplexify");let s,a,h;function u(){const t=new n;return t._write=function(t,e,r){s.send({data:t.buffer,success:function(){r()},fail:function(t){r(new Error(t))}})},t._flush=function(t){s.close({success:function(){t()}})},t}function f(t){t.hostname||(t.hostname="localhost"),t.path||(t.path="/"),t.wsOptions||(t.wsOptions={})}function l(t,e){const r="wxs"===t.protocol?"wss":"ws";let i=r+"://"+t.hostname+t.path;return t.port&&80!==t.port&&443!==t.port&&(i=r+"://"+t.hostname+":"+t.port+t.path),"function"==typeof t.transformWsUrl&&(i=t.transformWsUrl(i,t,e)),i}function c(){s.onOpen((function(){h.setReadable(a),h.setWritable(a),h.emit("connect")})),s.onMessage((function(t){let e=t.data;e=e instanceof ArrayBuffer?i.from(e):i.from(e,"utf8"),a.push(e)})),s.onClose((function(){h.end(),h.destroy()})),s.onError((function(t){h.destroy(new Error(t.errMsg))}))}function d(t,e){if(e.hostname=e.hostname||e.host,!e.hostname)throw new Error("Could not determine host. Specify host manually.");const r="MQIsdp"===e.protocolId&&3===e.protocolVersion?"mqttv3.1":"mqtt";f(e);const i=l(e,t);s=wx.connectSocket({url:i,protocols:[r]}),a=u(),h=o.obj(),h._destroy=function(t,e){s.close({success:function(){e&&e(t)}})};const n=h.destroy;return h.destroy=function(){h.destroy=n;const t=this;setTimeout((function(){s.close({fail:function(){t._destroy(new Error)}})}),0)}.bind(h),c(),h}e.exports=d},{buffer:17,duplexify:20,"readable-stream":69}],7:[function(t,e,r){function i(){if(!(this instanceof i))return new i;this.nextId=Math.max(1,Math.floor(65535*Math.random()))}i.prototype.allocate=function(){const t=this.nextId++;return 65536===this.nextId&&(this.nextId=1),t},i.prototype.getLastAllocated=function(){return 1===this.nextId?65535:this.nextId-1},i.prototype.register=function(t){return!0},i.prototype.deallocate=function(t){},i.prototype.clear=function(){},e.exports=i},{}],8:[function(t,e,r){const i=t("xtend"),n=t("readable-stream").Readable,o={objectMode:!0},s={clean:!0};function a(t){if(!(this instanceof a))return new a(t);this.options=t||{},this.options=i(s,t),this._inflights=new Map}a.prototype.put=function(t,e){return this._inflights.set(t.messageId,t),e&&e(),this},a.prototype.createStream=function(){const t=new n(o),e=[];let r=!1,i=0;return this._inflights.forEach((function(t,r){e.push(t)})),t._read=function(){!r&&ithis.max||(this.aliasToTopic[e]=t,this.length=Object.keys(this.aliasToTopic).length,0))},i.prototype.getTopicByAlias=function(t){return this.aliasToTopic[t]},i.prototype.clear=function(){this.aliasToTopic={}},e.exports=i},{}],10:[function(t,e,r){const i=t("lru-cache"),n=t("number-allocator").NumberAllocator;function o(t){if(!(this instanceof o))return new o(t);t>0&&(this.aliasToTopic=new i({max:t}),this.topicToAlias={},this.numberAllocator=new n(1,t),this.max=t,this.length=0)}o.prototype.put=function(t,e){if(0===e||e>this.max)return!1;const r=this.aliasToTopic.get(e);return r&&delete this.topicToAlias[r],this.aliasToTopic.set(e,t),this.topicToAlias[t]=e,this.numberAllocator.use(e),this.length=this.aliasToTopic.length,!0},o.prototype.getTopicByAlias=function(t){return this.aliasToTopic.get(t)},o.prototype.getAliasByTopic=function(t){const e=this.topicToAlias[t];return void 0!==e&&this.aliasToTopic.get(e),e},o.prototype.clear=function(){this.aliasToTopic.reset(),this.topicToAlias={},this.numberAllocator.clear(),this.length=0},o.prototype.getLruAlias=function(){const t=this.numberAllocator.firstVacant();return t||this.aliasToTopic.keys()[this.aliasToTopic.length-1]},e.exports=o},{"lru-cache":37,"number-allocator":46}],11:[function(t,e,r){function i(t){const e=t.split("/");for(let t=0;t0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=e),[r,r===e?0:4-r%4]}function f(t){var e=u(t),r=e[0],i=e[1];return 3*(r+i)/4-i}function l(t,e,r){return 3*(e+r)/4-r}function c(t){var e,r,i=u(t),s=i[0],a=i[1],h=new o(l(t,s,a)),f=0,c=a>0?s-4:s;for(r=0;r>16&255,h[f++]=e>>8&255,h[f++]=255&e;return 2===a&&(e=n[t.charCodeAt(r)]<<2|n[t.charCodeAt(r+1)]>>4,h[f++]=255&e),1===a&&(e=n[t.charCodeAt(r)]<<10|n[t.charCodeAt(r+1)]<<4|n[t.charCodeAt(r+2)]>>2,h[f++]=e>>8&255,h[f++]=255&e),h}function d(t){return i[t>>18&63]+i[t>>12&63]+i[t>>6&63]+i[63&t]}function p(t,e,r){for(var i,n=[],o=e;oh?h:a+s));return 1===n?(e=t[r-1],o.push(i[e>>2]+i[e<<4&63]+"==")):2===n&&(e=(t[r-2]<<8)+t[r-1],o.push(i[e>>10]+i[e>>4&63]+i[e<<2&63]+"=")),o.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},{}],14:[function(t,e,r){const{Buffer:i}=t("buffer"),n=Symbol.for("BufferList");function o(t){if(!(this instanceof o))return new o(t);o._init.call(this,t)}o._init=function(t){Object.defineProperty(this,n,{value:!0}),this._bufs=[],this.length=0,t&&this.append(t)},o.prototype._new=function(t){return new o(t)},o.prototype._offset=function(t){if(0===t)return[0,0];let e=0;for(let r=0;rthis.length||t<0)return;const e=this._offset(t);return this._bufs[e[0]][e[1]]},o.prototype.slice=function(t,e){return"number"==typeof t&&t<0&&(t+=this.length),"number"==typeof e&&e<0&&(e+=this.length),this.copy(null,0,t,e)},o.prototype.copy=function(t,e,r,n){if(("number"!=typeof r||r<0)&&(r=0),("number"!=typeof n||n>this.length)&&(n=this.length),r>=this.length)return t||i.alloc(0);if(n<=0)return t||i.alloc(0);const o=!!t,s=this._offset(r),a=n-r;let h=a,u=o&&e||0,f=s[1];if(0===r&&n===this.length){if(!o)return 1===this._bufs.length?this._bufs[0]:i.concat(this._bufs,this.length);for(let e=0;er)){this._bufs[e].copy(t,u,f,f+h),u+=r;break}this._bufs[e].copy(t,u,f),u+=r,h-=r,f&&(f=0)}return t.length>u?t.slice(0,u):t},o.prototype.shallowSlice=function(t,e){if(t=t||0,e="number"!=typeof e?this.length:e,t<0&&(t+=this.length),e<0&&(e+=this.length),t===e)return this._new();const r=this._offset(t),i=this._offset(e),n=this._bufs.slice(r[0],i[0]+1);return 0===i[1]?n.pop():n[n.length-1]=n[n.length-1].slice(0,i[1]),0!==r[1]&&(n[0]=n[0].slice(r[1])),this._new(n)},o.prototype.toString=function(t,e,r){return this.slice(e,r).toString(t)},o.prototype.consume=function(t){if(t=Math.trunc(t),Number.isNaN(t)||t<=0)return this;for(;this._bufs.length;){if(!(t>=this._bufs[0].length)){this._bufs[0]=this._bufs[0].slice(t),this.length-=t;break}t-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift()}return this},o.prototype.duplicate=function(){const t=this._new();for(let e=0;ethis.length?this.length:e;const n=this._offset(e);let o=n[0],s=n[1];for(;o=t.length){const r=e.indexOf(t,s);if(-1!==r)return this._reverseOffset([o,r]);s=e.length-t.length+1}else{const e=this._reverseOffset([o,s]);if(this._match(e,t))return e;s++}s=0}return-1},o.prototype._match=function(t,e){if(this.length-tn)throw new RangeError('The value "'+t+'" is invalid for option "size"');var e=new Uint8Array(t);return e.__proto__=a.prototype,e}function a(t,e,r){if("number"==typeof t){if("string"==typeof e)throw new TypeError('The "string" argument must be of type string. Received type number');return l(t)}return h(t,e,r)}function h(t,e,r){if("string"==typeof t)return c(t,e);if(ArrayBuffer.isView(t))return d(t);if(null==t)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t);if(X(t,ArrayBuffer)||t&&X(t.buffer,ArrayBuffer))return p(t,e,r);if("number"==typeof t)throw new TypeError('The "value" argument must not be of type number. Received type number');var i=t.valueOf&&t.valueOf();if(null!=i&&i!==t)return a.from(i,e,r);var n=m(t);if(n)return n;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof t[Symbol.toPrimitive])return a.from(t[Symbol.toPrimitive]("string"),e,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof t)}function u(t){if("number"!=typeof t)throw new TypeError('"size" argument must be of type number');if(t<0)throw new RangeError('The value "'+t+'" is invalid for option "size"')}function f(t,e,r){return u(t),t<=0?s(t):void 0!==e?"string"==typeof r?s(t).fill(e,r):s(t).fill(e):s(t)}function l(t){return u(t),s(t<0?0:0|g(t))}function c(t,e){if("string"==typeof e&&""!==e||(e="utf8"),!a.isEncoding(e))throw new TypeError("Unknown encoding: "+e);var r=0|b(t,e),i=s(r),n=i.write(t,e);return n!==r&&(i=i.slice(0,n)),i}function d(t){for(var e=t.length<0?0:0|g(t.length),r=s(e),i=0;i=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return 0|t}function y(t){return+t!=t&&(t=0),a.alloc(+t)}function b(t,e){if(a.isBuffer(t))return t.length;if(ArrayBuffer.isView(t)||X(t,ArrayBuffer))return t.byteLength;if("string"!=typeof t)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof t);var r=t.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===r)return 0;for(var n=!1;;)switch(e){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return V(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return Y(t).length;default:if(n)return i?-1:V(t).length;e=(""+e).toLowerCase(),n=!0}}function v(t,e,r){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(e>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return B(this,e,r);case"utf8":case"utf-8":return R(this,e,r);case"ascii":return x(this,e,r);case"latin1":case"binary":return N(this,e,r);case"base64":return I(this,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,e,r);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function w(t,e,r){var i=t[e];t[e]=t[r],t[r]=i}function _(t,e,r,i,n){if(0===t.length)return-1;if("string"==typeof r?(i=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Q(r=+r)&&(r=n?0:t.length-1),r<0&&(r=t.length+r),r>=t.length){if(n)return-1;r=t.length-1}else if(r<0){if(!n)return-1;r=0}if("string"==typeof e&&(e=a.from(e,i)),a.isBuffer(e))return 0===e.length?-1:M(t,e,r,i,n);if("number"==typeof e)return e&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(t,e,r):Uint8Array.prototype.lastIndexOf.call(t,e,r):M(t,[e],r,i,n);throw new TypeError("val must be string, number or Buffer")}function M(t,e,r,i,n){var o,s=1,a=t.length,h=e.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;s=2,a/=2,h/=2,r/=2}function u(t,e){return 1===s?t[e]:t.readUInt16BE(e*s)}if(n){var f=-1;for(o=r;oa&&(r=a-h),o=r;o>=0;o--){for(var l=!0,c=0;cn&&(i=n):i=n;var o=e.length;i>o/2&&(i=o/2);for(var s=0;s239?4:u>223?3:u>191?2:1;if(n+l<=r)switch(l){case 1:u<128&&(f=u);break;case 2:128==(192&(o=t[n+1]))&&(h=(31&u)<<6|63&o)>127&&(f=h);break;case 3:o=t[n+1],s=t[n+2],128==(192&o)&&128==(192&s)&&(h=(15&u)<<12|(63&o)<<6|63&s)>2047&&(h<55296||h>57343)&&(f=h);break;case 4:o=t[n+1],s=t[n+2],a=t[n+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(h=(15&u)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&h<1114112&&(f=h)}null===f?(f=65533,l=1):f>65535&&(f-=65536,i.push(f>>>10&1023|55296),f=56320|1023&f),i.push(f),n+=l}return P(i)}r.kMaxLength=n,a.TYPED_ARRAY_SUPPORT=o(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),"undefined"!=typeof Symbol&&null!=Symbol.species&&a[Symbol.species]===a&&Object.defineProperty(a,Symbol.species,{value:null,configurable:!0,enumerable:!1,writable:!1}),a.poolSize=8192,a.from=function(t,e,r){return h(t,e,r)},a.prototype.__proto__=Uint8Array.prototype,a.__proto__=Uint8Array,a.alloc=function(t,e,r){return f(t,e,r)},a.allocUnsafe=function(t){return l(t)},a.allocUnsafeSlow=function(t){return l(t)},a.isBuffer=function(t){return null!=t&&!0===t._isBuffer&&t!==a.prototype},a.compare=function(t,e){if(X(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),X(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(t)||!a.isBuffer(e))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===e)return 0;for(var r=t.length,i=e.length,n=0,o=Math.min(r,i);ne&&(t+=" ... "),""},a.prototype.compare=function(t,e,r,i,n){if(X(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(void 0===e&&(e=0),void 0===r&&(r=t?t.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),e<0||r>t.length||i<0||n>this.length)throw new RangeError("out of range index");if(i>=n&&e>=r)return 0;if(i>=n)return-1;if(e>=r)return 1;if(this===t)return 0;for(var o=(n>>>=0)-(i>>>=0),s=(r>>>=0)-(e>>>=0),h=Math.min(o,s),u=this.slice(i,n),f=t.slice(e,r),l=0;l>>=0,isFinite(r)?(r>>>=0,void 0===i&&(i="utf8")):(i=r,r=void 0)}var n=this.length-e;if((void 0===r||r>n)&&(r=n),t.length>0&&(r<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var o=!1;;)switch(i){case"hex":return S(this,t,e,r);case"utf8":case"utf-8":return E(this,t,e,r);case"ascii":return k(this,t,e,r);case"latin1":case"binary":return A(this,t,e,r);case"base64":return O(this,t,e,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,e,r);default:if(o)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),o=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var C=4096;function P(t){var e=t.length;if(e<=C)return String.fromCharCode.apply(String,t);for(var r="",i=0;ii)&&(r=i);for(var n="",o=e;or)throw new RangeError("Trying to access beyond buffer length")}function j(t,e,r,i,n,o){if(!a.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(e>n||et.length)throw new RangeError("Index out of range")}function U(t,e,r,i,n,o){if(r+i>t.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function q(t,e,r,n,o){return e=+e,r>>>=0,o||U(t,e,r,4),i.write(t,e,r,n,23,4),r+4}function F(t,e,r,n,o){return e=+e,r>>>=0,o||U(t,e,r,8),i.write(t,e,r,n,52,8),r+8}a.prototype.slice=function(t,e){var r=this.length;(t=~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),(e=void 0===e?r:~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),e>>=0,e>>>=0,r||D(t,e,this.length);for(var i=this[t],n=1,o=0;++o>>=0,e>>>=0,r||D(t,e,this.length);for(var i=this[t+--e],n=1;e>0&&(n*=256);)i+=this[t+--e]*n;return i},a.prototype.readUInt8=function(t,e){return t>>>=0,e||D(t,1,this.length),this[t]},a.prototype.readUInt16LE=function(t,e){return t>>>=0,e||D(t,2,this.length),this[t]|this[t+1]<<8},a.prototype.readUInt16BE=function(t,e){return t>>>=0,e||D(t,2,this.length),this[t]<<8|this[t+1]},a.prototype.readUInt32LE=function(t,e){return t>>>=0,e||D(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},a.prototype.readUInt32BE=function(t,e){return t>>>=0,e||D(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},a.prototype.readIntLE=function(t,e,r){t>>>=0,e>>>=0,r||D(t,e,this.length);for(var i=this[t],n=1,o=0;++o=(n*=128)&&(i-=Math.pow(2,8*e)),i},a.prototype.readIntBE=function(t,e,r){t>>>=0,e>>>=0,r||D(t,e,this.length);for(var i=e,n=1,o=this[t+--i];i>0&&(n*=256);)o+=this[t+--i]*n;return o>=(n*=128)&&(o-=Math.pow(2,8*e)),o},a.prototype.readInt8=function(t,e){return t>>>=0,e||D(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},a.prototype.readInt16LE=function(t,e){t>>>=0,e||D(t,2,this.length);var r=this[t]|this[t+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(t,e){t>>>=0,e||D(t,2,this.length);var r=this[t+1]|this[t]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(t,e){return t>>>=0,e||D(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},a.prototype.readInt32BE=function(t,e){return t>>>=0,e||D(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},a.prototype.readFloatLE=function(t,e){return t>>>=0,e||D(t,4,this.length),i.read(this,t,!0,23,4)},a.prototype.readFloatBE=function(t,e){return t>>>=0,e||D(t,4,this.length),i.read(this,t,!1,23,4)},a.prototype.readDoubleLE=function(t,e){return t>>>=0,e||D(t,8,this.length),i.read(this,t,!0,52,8)},a.prototype.readDoubleBE=function(t,e){return t>>>=0,e||D(t,8,this.length),i.read(this,t,!1,52,8)},a.prototype.writeUIntLE=function(t,e,r,i){t=+t,e>>>=0,r>>>=0,i||j(this,t,e,r,Math.pow(2,8*r)-1,0);var n=1,o=0;for(this[e]=255&t;++o>>=0,r>>>=0,i||j(this,t,e,r,Math.pow(2,8*r)-1,0);var n=r-1,o=1;for(this[e+n]=255&t;--n>=0&&(o*=256);)this[e+n]=t/o&255;return e+r},a.prototype.writeUInt8=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,1,255,0),this[e]=255&t,e+1},a.prototype.writeUInt16LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,65535,0),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeUInt16BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,65535,0),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeUInt32LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,4294967295,0),this[e+3]=t>>>24,this[e+2]=t>>>16,this[e+1]=t>>>8,this[e]=255&t,e+4},a.prototype.writeUInt32BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,4294967295,0),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeIntLE=function(t,e,r,i){if(t=+t,e>>>=0,!i){var n=Math.pow(2,8*r-1);j(this,t,e,r,n-1,-n)}var o=0,s=1,a=0;for(this[e]=255&t;++o>0)-a&255;return e+r},a.prototype.writeIntBE=function(t,e,r,i){if(t=+t,e>>>=0,!i){var n=Math.pow(2,8*r-1);j(this,t,e,r,n-1,-n)}var o=r-1,s=1,a=0;for(this[e+o]=255&t;--o>=0&&(s*=256);)t<0&&0===a&&0!==this[e+o+1]&&(a=1),this[e+o]=(t/s>>0)-a&255;return e+r},a.prototype.writeInt8=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,1,127,-128),t<0&&(t=255+t+1),this[e]=255&t,e+1},a.prototype.writeInt16LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,32767,-32768),this[e]=255&t,this[e+1]=t>>>8,e+2},a.prototype.writeInt16BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,2,32767,-32768),this[e]=t>>>8,this[e+1]=255&t,e+2},a.prototype.writeInt32LE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,2147483647,-2147483648),this[e]=255&t,this[e+1]=t>>>8,this[e+2]=t>>>16,this[e+3]=t>>>24,e+4},a.prototype.writeInt32BE=function(t,e,r){return t=+t,e>>>=0,r||j(this,t,e,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[e]=t>>>24,this[e+1]=t>>>16,this[e+2]=t>>>8,this[e+3]=255&t,e+4},a.prototype.writeFloatLE=function(t,e,r){return q(this,t,e,!0,r)},a.prototype.writeFloatBE=function(t,e,r){return q(this,t,e,!1,r)},a.prototype.writeDoubleLE=function(t,e,r){return F(this,t,e,!0,r)},a.prototype.writeDoubleBE=function(t,e,r){return F(this,t,e,!1,r)},a.prototype.copy=function(t,e,r,i){if(!a.isBuffer(t))throw new TypeError("argument should be a Buffer");if(r||(r=0),i||0===i||(i=this.length),e>=t.length&&(e=t.length),e||(e=0),i>0&&i=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),t.length-e=0;--o)t[o+e]=this[o+r];else Uint8Array.prototype.set.call(t,this.subarray(r,i),e);return n},a.prototype.fill=function(t,e,r,i){if("string"==typeof t){if("string"==typeof e?(i=e,e=0,r=this.length):"string"==typeof r&&(i=r,r=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!a.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===t.length){var n=t.charCodeAt(0);("utf8"===i&&n<128||"latin1"===i)&&(t=n)}}else"number"==typeof t&&(t&=255);if(e<0||this.length>>=0,r=void 0===r?this.length:r>>>0,t||(t=0),"number"==typeof t)for(o=e;o55295&&r<57344){if(!n){if(r>56319){(e-=3)>-1&&o.push(239,191,189);continue}if(s+1===i){(e-=3)>-1&&o.push(239,191,189);continue}n=r;continue}if(r<56320){(e-=3)>-1&&o.push(239,191,189),n=r;continue}r=65536+(n-55296<<10|r-56320)}else n&&(e-=3)>-1&&o.push(239,191,189);if(n=null,r<128){if((e-=1)<0)break;o.push(r)}else if(r<2048){if((e-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((e-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function G(t){for(var e=[],r=0;r>8,n=r%256,o.push(n),o.push(i);return o}function Y(t){return e.toByteArray(H(t))}function Z(t,e,r,i){for(var n=0;n=e.length||n>=t.length);++n)e[n+r]=t[n];return n}function X(t,e){return t instanceof e||null!=t&&null!=t.constructor&&null!=t.constructor.name&&t.constructor.name===e.name}function Q(t){return t!=t}}).call(this)}).call(this,t("buffer").Buffer)},{"base64-js":13,buffer:17,ieee754:23}],18:[function(t,e,r){(function(i){(function(){function n(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function o(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let i=0,n=0;t[0].replace(/%[a-zA-Z%]/g,(t=>{"%%"!==t&&(i++,"%c"===t&&(n=i))})),t.splice(n,0,r)}function s(t){try{t?r.storage.setItem("debug",t):r.storage.removeItem("debug")}catch(t){}}function a(){let t;try{t=r.storage.getItem("debug")}catch(t){}return!t&&void 0!==i&&"env"in i&&(t=i.env.DEBUG),t}function h(){try{return localStorage}catch(t){}}r.formatArgs=o,r.save=s,r.load=a,r.useColors=n,r.storage=h(),r.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),r.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],r.log=console.debug||console.log||(()=>{}),e.exports=t("./common")(r);const{formatters:u}=e.exports;u.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}).call(this)}).call(this,t("_process"))},{"./common":19,_process:50}],19:[function(t,e,r){function i(e){function r(t){let e=0;for(let r=0;r{if("%%"===e)return"%";s++;const o=i.formatters[n];if("function"==typeof o){const i=t[s];e=o.call(r,i),t.splice(s,1),s--}return e})),i.formatArgs.call(r,t),(r.log||i.log).apply(r,t)}return a.namespace=t,a.useColors=i.useColors(),a.color=i.selectColor(t),a.extend=n,a.destroy=i.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(r!==i.namespaces&&(r=i.namespaces,o=i.enabled(t)),o),set:t=>{s=t}}),"function"==typeof i.init&&i.init(a),a}function n(t,e){const r=i(this.namespace+(void 0===e?":":e)+t);return r.log=this.log,r}function o(t){let e;i.save(t),i.namespaces=t,i.names=[],i.skips=[];const r=("string"==typeof t?t:"").split(/[\s,]+/),n=r.length;for(e=0;e"-"+t))].join(",");return i.enable(""),t}function a(t){if("*"===t[t.length-1])return!0;let e,r;for(e=0,r=i.skips.length;e{i[t]=e[t]})),i.names=[],i.skips=[],i.formatters={},i.selectColor=r,i.enable(i.load()),i}e.exports=i},{ms:45}],20:[function(t,e,r){(function(r,i){(function(){var n=t("readable-stream"),o=t("end-of-stream"),s=t("inherits"),a=t("stream-shift"),h=i.from&&i.from!==Uint8Array.from?i.from([0]):new i([0]),u=function(t,e){t._corked?t.once("uncork",e):e()},f=function(t,e){t._autoDestroy&&t.destroy(e)},l=function(t,e){return function(r){r?f(t,"premature close"===r.message?null:r):e&&!t._ended&&t.end()}},c=function(t,e){return t?t._writableState&&t._writableState.finished?e():t._writableState?t.end(e):(t.end(),void e()):e()},d=function(){},p=function(t){return new n.Readable({objectMode:!0,highWaterMark:16}).wrap(t)},m=function(t,e,r){if(!(this instanceof m))return new m(t,e,r);n.Duplex.call(this,r),this._writable=null,this._readable=null,this._readable2=null,this._autoDestroy=!r||!1!==r.autoDestroy,this._forwardDestroy=!r||!1!==r.destroy,this._forwardEnd=!r||!1!==r.end,this._corked=1,this._ondrain=null,this._drained=!1,this._forwarding=!1,this._unwrite=null,this._unread=null,this._ended=!1,this.destroyed=!1,t&&this.setWritable(t),e&&this.setReadable(e)};s(m,n.Duplex),m.obj=function(t,e,r){return r||(r={}),r.objectMode=!0,r.highWaterMark=16,new m(t,e,r)},m.prototype.cork=function(){1==++this._corked&&this.emit("cork")},m.prototype.uncork=function(){this._corked&&0==--this._corked&&this.emit("uncork")},m.prototype.setWritable=function(t){if(this._unwrite&&this._unwrite(),this.destroyed)t&&t.destroy&&t.destroy();else if(null!==t&&!1!==t){var e=this,i=o(t,{writable:!0,readable:!1},l(this,this._forwardEnd)),n=function(){var t=e._ondrain;e._ondrain=null,t&&t()},s=function(){e._writable.removeListener("drain",n),i()};this._unwrite&&r.nextTick(n),this._writable=t,this._writable.on("drain",n),this._unwrite=s,this.uncork()}else this.end()},m.prototype.setReadable=function(t){if(this._unread&&this._unread(),this.destroyed)t&&t.destroy&&t.destroy();else{if(null===t||!1===t)return this.push(null),void this.resume();var e=this,r=o(t,{writable:!1,readable:!0},l(this)),i=function(){e._forward()},n=function(){e.push(null)},s=function(){e._readable2.removeListener("readable",i),e._readable2.removeListener("end",n),r()};this._drained=!0,this._readable=t,this._readable2=t._readableState?t:p(t),this._readable2.on("readable",i),this._readable2.on("end",n),this._unread=s,this._forward()}},m.prototype._read=function(){this._drained=!0,this._forward()},m.prototype._forward=function(){if(!this._forwarding&&this._readable2&&this._drained){var t;for(this._forwarding=!0;this._drained&&null!==(t=a(this._readable2));)this.destroyed||(this._drained=this.push(t));this._forwarding=!1}},m.prototype.destroy=function(t,e){if(e||(e=d),this.destroyed)return e(null);this.destroyed=!0;var i=this;r.nextTick((function(){i._destroy(t),e(null)}))},m.prototype._destroy=function(t){if(t){var e=this._ondrain;this._ondrain=null,e?e(t):this.emit("error",t)}this._forwardDestroy&&(this._readable&&this._readable.destroy&&this._readable.destroy(),this._writable&&this._writable.destroy&&this._writable.destroy()),this.emit("close")},m.prototype._write=function(t,e,r){if(!this.destroyed)return this._corked?u(this,this._write.bind(this,t,e,r)):t===h?this._finish(r):this._writable?void(!1===this._writable.write(t)?this._ondrain=r:this.destroyed||r()):r()},m.prototype._finish=function(t){var e=this;this.emit("preend"),u(this,(function(){c(e._forwardEnd&&e._writable,(function(){!1===e._writableState.prefinished&&(e._writableState.prefinished=!0),e.emit("prefinish"),u(e,t)}))}))},m.prototype.end=function(t,e,r){return"function"==typeof t?this.end(null,null,t):"function"==typeof e?this.end(t,null,e):(this._ended=!0,t&&this.write(t),this._writableState.ending||this._writableState.destroyed||this.write(h),n.Writable.prototype.end.call(this,r))},e.exports=m}).call(this)}).call(this,t("_process"),t("buffer").Buffer)},{_process:50,buffer:17,"end-of-stream":21,inherits:24,"readable-stream":69,"stream-shift":74}],21:[function(t,e,r){(function(r){(function(){var i=t("once"),n=function(){},o=function(t){return t.setHeader&&"function"==typeof t.abort},s=function(t){return t.stdio&&Array.isArray(t.stdio)&&3===t.stdio.length},a=function(t,e,h){if("function"==typeof e)return a(t,null,e);e||(e={}),h=i(h||n);var u=t._writableState,f=t._readableState,l=e.readable||!1!==e.readable&&t.readable,c=e.writable||!1!==e.writable&&t.writable,d=!1,p=function(){t.writable||m()},m=function(){c=!1,l||h.call(t)},g=function(){l=!1,c||h.call(t)},y=function(e){h.call(t,e?new Error("exited with error code: "+e):null)},b=function(e){h.call(t,e)},v=function(){r.nextTick(w)},w=function(){if(!d)return(!l||f&&f.ended&&!f.destroyed)&&(!c||u&&u.ended&&!u.destroyed)?void 0:h.call(t,new Error("premature close"))},_=function(){t.req.on("finish",m)};return o(t)?(t.on("complete",m),t.on("abort",v),t.req?_():t.on("request",_)):c&&!u&&(t.on("end",p),t.on("close",p)),s(t)&&t.on("exit",y),t.on("end",g),t.on("finish",m),!1!==e.error&&t.on("error",b),t.on("close",v),function(){d=!0,t.removeListener("complete",m),t.removeListener("abort",v),t.removeListener("request",_),t.req&&t.req.removeListener("finish",m),t.removeListener("end",p),t.removeListener("close",p),t.removeListener("finish",m),t.removeListener("exit",y),t.removeListener("end",g),t.removeListener("error",b),t.removeListener("close",v)}};e.exports=a}).call(this)}).call(this,t("_process"))},{_process:50,once:48}],22:[function(t,e,r){var i=Object.create||E,n=Object.keys||k,o=Function.prototype.bind||A;function s(){this._events&&Object.prototype.hasOwnProperty.call(this,"_events")||(this._events=i(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0}e.exports=s,s.EventEmitter=s,s.prototype._events=void 0,s.prototype._maxListeners=void 0;var a,h=10;try{var u={};Object.defineProperty&&Object.defineProperty(u,"x",{value:0}),a=0===u.x}catch(t){a=!1}function f(t){return void 0===t._maxListeners?s.defaultMaxListeners:t._maxListeners}function l(t,e,r){if(e)t.call(r);else for(var i=t.length,n=M(t,i),o=0;o0&&a.length>o){a.warned=!0;var h=new Error("Possible EventEmitter memory leak detected. "+a.length+' "'+String(e)+'" listeners added. Use emitter.setMaxListeners() to increase limit.');h.name="MaxListenersExceededWarning",h.emitter=t,h.type=e,h.count=a.length,"object"==typeof console&&console.warn&&console.warn("%s: %s",h.name,h.message)}}else a=s[e]=r,++t._eventsCount;return t}function y(){if(!this.fired)switch(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length){case 0:return this.listener.call(this.target);case 1:return this.listener.call(this.target,arguments[0]);case 2:return this.listener.call(this.target,arguments[0],arguments[1]);case 3:return this.listener.call(this.target,arguments[0],arguments[1],arguments[2]);default:for(var t=new Array(arguments.length),e=0;e1&&(e=arguments[1]),e instanceof Error)throw e;var h=new Error('Unhandled "error" event. ('+e+")");throw h.context=e,h}if(!(r=s[t]))return!1;var u="function"==typeof r;switch(i=arguments.length){case 1:l(r,u,this);break;case 2:c(r,u,this,arguments[1]);break;case 3:d(r,u,this,arguments[1],arguments[2]);break;case 4:p(r,u,this,arguments[1],arguments[2],arguments[3]);break;default:for(n=new Array(i-1),o=1;o=0;s--)if(r[s]===e||r[s].listener===e){a=r[s].listener,o=s;break}if(o<0)return this;0===o?r.shift():_(r,o),1===r.length&&(n[t]=r[0]),n.removeListener&&this.emit("removeListener",t,a||e)}return this},s.prototype.removeAllListeners=function(t){var e,r,o;if(!(r=this._events))return this;if(!r.removeListener)return 0===arguments.length?(this._events=i(null),this._eventsCount=0):r[t]&&(0==--this._eventsCount?this._events=i(null):delete r[t]),this;if(0===arguments.length){var s,a=n(r);for(o=0;o=0;o--)this.removeListener(t,e[o]);return this},s.prototype.listeners=function(t){return v(this,t,!0)},s.prototype.rawListeners=function(t){return v(this,t,!1)},s.listenerCount=function(t,e){return"function"==typeof t.listenerCount?t.listenerCount(e):w.call(t,e)},s.prototype.listenerCount=w,s.prototype.eventNames=function(){return this._eventsCount>0?Reflect.ownKeys(this._events):[]}},{}],23:[function(t,e,r){ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ r.read=function(t,e,r,i,n){var o,s,a=8*n-i-1,h=(1<>1,f=-7,l=r?n-1:0,c=r?-1:1,d=t[e+l];for(l+=c,o=d&(1<<-f)-1,d>>=-f,f+=a;f>0;o=256*o+t[e+l],l+=c,f-=8);for(s=o&(1<<-f)-1,o>>=-f,f+=i;f>0;s=256*s+t[e+l],l+=c,f-=8);if(0===o)o=1-u;else{if(o===h)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,i),o-=u}return(d?-1:1)*s*Math.pow(2,o-i)},r.write=function(t,e,r,i,n,o){var s,a,h,u=8*o-n-1,f=(1<>1,c=23===n?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:o-1,p=i?1:-1,m=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,s=f):(s=Math.floor(Math.log(e)/Math.LN2),e*(h=Math.pow(2,-s))<1&&(s--,h*=2),(e+=s+l>=1?c/h:c*Math.pow(2,1-l))*h>=2&&(s++,h/=2),s+l>=f?(a=0,s=f):s+l>=1?(a=(e*h-1)*Math.pow(2,n),s+=l):(a=e*Math.pow(2,l-1)*Math.pow(2,n),s=0));n>=8;t[r+d]=255&a,d+=p,a/=256,n-=8);for(s=s<0;t[r+d]=255&s,d+=p,s/=256,u-=8);t[r+d-p]|=128*m}},{}],24:[function(t,e,r){"function"==typeof Object.create?e.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}},{}],25:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0});var i=function(){function t(t,e){this.color=!0,this.key=void 0,this.value=void 0,this.parent=void 0,this.brother=void 0,this.leftChild=void 0,this.rightChild=void 0,this.key=t,this.value=e}return t.prototype.rotateLeft=function(){var t=this.parent,e=this.brother,r=this.leftChild,i=this.rightChild;if(!i)throw new Error("unknown error");var n=i.leftChild,o=i.rightChild;return t&&(t.leftChild===this?t.leftChild=i:t.rightChild===this&&(t.rightChild=i)),i.parent=t,i.brother=e,i.leftChild=this,i.rightChild=o,e&&(e.brother=i),this.parent=i,this.brother=o,this.leftChild=r,this.rightChild=n,o&&(o.parent=i,o.brother=this),r&&(r.parent=this,r.brother=n),n&&(n.parent=this,n.brother=r),i},t.prototype.rotateRight=function(){var t=this.parent,e=this.brother,r=this.leftChild;if(!r)throw new Error("unknown error");var i=this.rightChild,n=r.leftChild,o=r.rightChild;return t&&(t.leftChild===this?t.leftChild=r:t.rightChild===this&&(t.rightChild=r)),r.parent=t,r.brother=e,r.leftChild=n,r.rightChild=this,e&&(e.brother=r),n&&(n.parent=r,n.brother=this),this.parent=r,this.brother=n,this.leftChild=o,this.rightChild=i,o&&(o.parent=this,o.brother=i),i&&(i.parent=this,i.brother=o),r},t.prototype.remove=function(){if(this.leftChild||this.rightChild)throw new Error("can only remove leaf node");this.parent&&(this===this.parent.leftChild?this.parent.leftChild=void 0:this===this.parent.rightChild&&(this.parent.rightChild=void 0)),this.brother&&(this.brother.brother=void 0),this.key=void 0,this.value=void 0,this.parent=void 0,this.brother=void 0},t.TreeNodeColorType={red:!0,black:!1},t}();Object.freeze(i),r.default=i},{}],26:[function(t,e,r){var i=this&&this.__generator||function(t,e){var r,i,n,o,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(t){return function(e){return h([t,e])}}function h(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,i&&(n=2&o[0]?i.return:o[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,o[1])).done)return n;switch(i=0,n&&(o=[2&o[0],n.value]),o[0]){case 0:case 1:n=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((n=(n=s.trys).length>0&&n[n.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!n||o[1]>n[0]&&o[1]i)throw new Error("pos should more than 0 and less than queue's size");return{curNodeBucketIndex:Math.floor(r/n.bucketSize),curNodePointerIndex:r%n.bucketSize}};this.getElementByPos=function(t){var e=l(t),i=e.curNodeBucketIndex,n=e.curNodePointerIndex;return r[i][n]},this.eraseElementByPos=function(t){var e=this;if(t<0||t>f)throw new Error("pos should more than 0 and less than queue's size");if(0===t)this.popFront();else if(t===this.size())this.popBack();else{for(var r=[],i=t+1;i0?--h:o0&&--f)},this.setElementByPos=function(t,e){var i=l(t),n=i.curNodeBucketIndex,o=i.curNodePointerIndex;r[n][o]=e},this.insert=function(t,e,r){var i=this;if(void 0===r&&(r=1),0===t)for(;r--;)this.pushFront(e);else if(t===this.size())for(;r--;)this.pushBack(e);else{for(var n=[],o=t;o0?--s:o>0&&(--o,s=n.bucketSize-1)),++f,r[o][s]=t},this.popFront=function(){this.empty()||(1!==this.size()&&(s0&&--f)},this.shrinkToFit=function(){var t=this,e=[];this.forEach((function(t){e.push(t)}));var i=e.length;r=[];for(var o=Math.ceil(i/n.bucketSize),s=0;s0&&n[n.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!n||o[1]>n[0]&&o[1]=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(r,"__esModule",{value:!0});var o=t("../LinkList/LinkList"),s=t("../Map/Map");function a(t,e,r){var h=this;if(void 0===t&&(t=[]),void 0===e&&(e=a.initSize),r=r||function(t){var e,r,i=0,o="";if("number"==typeof t)i=((i=Math.floor(t))<<5)-i,i&=i;else{o="string"!=typeof t?JSON.stringify(t):t;try{for(var s=n(o),a=s.next();!a.done;a=s.next())i=(i<<5)-i+a.value.charCodeAt(0),i&=i}catch(t){e={error:t}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}}return i^=i>>>16},0!=(e&e-1))throw new Error("initBucketNum must be 2 to the power of n");var u=0,f=[],l=Math.max(a.initSize,Math.min(a.maxSize,e));this.size=function(){return u},this.empty=function(){return 0===u},this.clear=function(){u=0,l=e,f=[]},this.forEach=function(t){var e=0;f.forEach((function(r){r.forEach((function(r){t(r,e++)}))}))};var c=function(t){if(!(t>=a.maxSize)){l=2*t;var e=[];f.forEach((function(i,n){if(!i.empty()){if(i instanceof o.default&&1===i.size()){var h=i.front(),u=h.key,c=h.value;e[r(u)&l-1]=new o.default([{key:u,value:c}])}else if(i instanceof s.default){var d=new o.default,p=new o.default;i.forEach((function(e){0==(r(e.key)&t)?d.pushBack(e):p.pushBack(e)})),d.size()>a.untreeifyThreshold?e[n]=new s.default(d):d.size()&&(e[n]=d),p.size()>a.untreeifyThreshold?e[n+t]=new s.default(p):p.size()&&(e[n+t]=p)}else{var m=new o.default,g=new o.default;i.forEach((function(e){0==(r(e.key)&t)?m.pushBack(e):g.pushBack(e)})),m.size()&&(e[n]=m),g.size()&&(e[n+t]=g)}f[n].clear()}})),f=e}};this.setElement=function(t,e){var i,h;if(null==t)throw new Error("to avoid some unnecessary errors, we don't suggest you insert null or undefined here");if(null!=e){var d=r(t)&l-1;if(f[d]){var p=f[d].size();if(f[d]instanceof o.default){try{for(var m=n(f[d]),g=m.next();!g.done;g=m.next()){var y=g.value;if(y.key===t)return void(y.value=e)}}catch(t){i={error:t}}finally{try{g&&!g.done&&(h=m.return)&&h.call(m)}finally{if(i)throw i.error}}f[d].pushBack({key:t,value:e}),f[d].size()>=a.treeifyThreshold&&(f[d]=new s.default(f[d]))}else f[d].setElement(t,e);var b=f[d].size();u+=b-p}else++u,f[d]=new o.default([{key:t,value:e}]);u>l*a.sigma&&c.call(this,l)}else this.eraseElementByKey(t)},this.getElementByKey=function(t){var e,i,o=r(t)&l-1;if(f[o]){if(f[o]instanceof s.default)return f[o].getElementByKey(t);try{for(var a=n(f[o]),h=a.next();!h.done;h=a.next()){var u=h.value;if(u.key===t)return u.value}}catch(t){e={error:t}}finally{try{h&&!h.done&&(i=a.return)&&i.call(a)}finally{if(e)throw e.error}}}},this.eraseElementByKey=function(t){var e,i,h=r(t)&l-1;if(f[h]){var c=f[h].size();if(f[h]instanceof s.default)f[h].eraseElementByKey(t),f[h].size()<=a.untreeifyThreshold&&(f[h]=new o.default(f[h]));else{var d=-1;try{for(var p=n(f[h]),m=p.next();!m.done;m=p.next()){var g=m.value;if(++d,g.key===t){f[h].eraseElementByPos(d);break}}}catch(t){e={error:t}}finally{try{m&&!m.done&&(i=p.return)&&i.call(p)}finally{if(e)throw e.error}}}var y=f[h].size();u+=y-c}},this.find=function(t){var e,i,o=r(t)&l-1;if(!f[o])return!1;if(f[o]instanceof s.default)return f[o].find(t);try{for(var a=n(f[o]),h=a.next();!h.done;h=a.next())if(h.value.key===t)return!0}catch(t){e={error:t}}finally{try{h&&!h.done&&(i=a.return)&&i.call(a)}finally{if(e)throw e.error}}return!1},this[Symbol.iterator]=function(){return function(){var t,e,r,o,s,a;return i(this,(function(i){switch(i.label){case 0:t=0,i.label=1;case 1:if(!(t=l)return[3,10];i.label=2;case 2:i.trys.push([2,7,8,9]),s=void 0,e=n(f[t]),r=e.next(),i.label=3;case 3:return r.done?[3,6]:[4,r.value];case 4:i.sent(),i.label=5;case 5:return r=e.next(),[3,3];case 6:return[3,9];case 7:return o=i.sent(),s={error:o},[3,9];case 8:try{r&&!r.done&&(a=e.return)&&a.call(e)}finally{if(s)throw s.error}return[7];case 9:return++t,[3,1];case 10:return[2]}}))}()},t.forEach((function(t){var e=t.key,r=t.value;return h.setElement(e,r)})),Object.freeze(this)}a.initSize=16,a.maxSize=1<<30,a.sigma=.75,a.treeifyThreshold=8,a.untreeifyThreshold=6,a.minTreeifySize=64,Object.freeze(a),r.default=a},{"../LinkList/LinkList":29,"../Map/Map":30}],28:[function(t,e,r){var i=this&&this.__generator||function(t,e){var r,i,n,o,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(t){return function(e){return h([t,e])}}function h(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,i&&(n=2&o[0]?i.return:o[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,o[1])).done)return n;switch(i=0,n&&(o=[2&o[0],n.value]),o[0]){case 0:case 1:n=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((n=(n=s.trys).length>0&&n[n.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!n||o[1]>n[0]&&o[1]=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(r,"__esModule",{value:!0});var o=t("../Set/Set"),s=t("../LinkList/LinkList");function a(t,e,r){var h=this;if(void 0===t&&(t=[]),void 0===e&&(e=a.initSize),r=r||function(t){var e=0,r="";if("number"==typeof t)e=((e=Math.floor(t))<<5)-e,e&=e;else{r="string"!=typeof t?JSON.stringify(t):t;for(var i=0;i>>16},0!=(e&e-1))throw new Error("initBucketNum must be 2 to the power of n");var u=0,f=[],l=Math.max(a.initSize,Math.min(a.maxSize,e));this.size=function(){return u},this.empty=function(){return 0===u},this.clear=function(){u=0,l=e,f=[]},this.forEach=function(t){var e=0;f.forEach((function(r){r.forEach((function(r){t(r,e++)}))}))};var c=function(t){if(!(t>=a.maxSize)){l=2*t;var e=[];f.forEach((function(i,n){if(!i.empty()){if(i instanceof s.default&&1===i.size()){var h=i.front();if(void 0===h)throw new Error("unknown error");e[r(h)&l-1]=new s.default([h])}else if(i instanceof o.default){var u=new s.default,c=new s.default;i.forEach((function(e){0==(r(e)&t)?u.pushBack(e):c.pushBack(e)})),u.size()>a.untreeifyThreshold?e[n]=new o.default(u):u.size()&&(e[n]=u),c.size()>a.untreeifyThreshold?e[n+t]=new o.default(c):c.size()&&(e[n+t]=c)}else{var d=new s.default,p=new s.default;i.forEach((function(e){0==(r(e)&t)?d.pushBack(e):p.pushBack(e)})),d.size()&&(e[n]=d),p.size()&&(e[n+t]=p)}f[n].clear()}})),f=e}};this.insert=function(t){if(null==t)throw new Error("to avoid some unnecessary errors, we don't suggest you insert null or undefined here");var e=r(t)&l-1;if(f[e]){var i=f[e].size();if(f[e]instanceof s.default){if(f[e].find(t))return;f[e].pushBack(t),f[e].size()>=a.treeifyThreshold&&(f[e]=new o.default(f[e]))}else f[e].insert(t);var n=f[e].size();u+=n-i}else f[e]=new s.default([t]),++u;u>l*a.sigma&&c.call(this,l)},this.eraseElementByValue=function(t){var e=r(t)&l-1;if(f[e]){var i=f[e].size();f[e].eraseElementByValue(t),f[e]instanceof o.default&&f[e].size()<=a.untreeifyThreshold&&(f[e]=new s.default(f[e]));var n=f[e].size();u+=n-i}},this.find=function(t){var e=r(t)&l-1;return!!f[e]&&f[e].find(t)},this[Symbol.iterator]=function(){return function(){var t,e,r,o,s,a;return i(this,(function(i){switch(i.label){case 0:t=0,i.label=1;case 1:if(!(t=l)return[3,10];i.label=2;case 2:i.trys.push([2,7,8,9]),s=void 0,e=n(f[t]),r=e.next(),i.label=3;case 3:return r.done?[3,6]:[4,r.value];case 4:i.sent(),i.label=5;case 5:return r=e.next(),[3,3];case 6:return[3,9];case 7:return o=i.sent(),s={error:o},[3,9];case 8:try{r&&!r.done&&(a=e.return)&&a.call(e)}finally{if(s)throw s.error}return[7];case 9:return++t,[3,1];case 10:return[2]}}))}()},t.forEach((function(t){return h.insert(t)})),Object.freeze(this)}a.initSize=16,a.maxSize=1<<30,a.sigma=.75,a.treeifyThreshold=8,a.untreeifyThreshold=6,a.minTreeifySize=64,Object.freeze(a),r.default=a},{"../LinkList/LinkList":29,"../Set/Set":33}],29:[function(t,e,r){var i=this&&this.__generator||function(t,e){var r,i,n,o,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(t){return function(e){return h([t,e])}}function h(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,i&&(n=2&o[0]?i.return:o[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,o[1])).done)return n;switch(i=0,n&&(o=[2&o[0],n.value]),o[0]){case 0:case 1:n=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((n=(n=s.trys).length>0&&n[n.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!n||o[1]>n[0]&&o[1]=r)throw new Error("pos must more then 0 and less then the list length");for(var e=o;t--&&e;)e=e.next;if(!e||void 0===e.value)throw new Error("unknown error");return e.value},this.eraseElementByPos=function(t){if(t<0||t>=r)throw new Error("erase pos must more then 0 and less then the list length");if(0===t)this.popFront();else if(t===r-1)this.popBack();else{for(var e=o;t--;){if(!(null==e?void 0:e.next))throw new Error("unknown error");e=e.next}if(!e||!e.pre||!e.next)throw new Error("unknown error");var i=e.pre,n=e.next;n.pre=i,i.next=n,r>0&&--r}},this.eraseElementByValue=function(t){for(;o&&o.value===t;)this.popFront();for(;s&&s.value===t;)this.popBack();if(o)for(var e=o;e;){if(e.value===t){var i=e.pre,n=e.next;n&&(n.pre=i),i&&(i.next=n),r>0&&--r}e=e.next}},this.pushBack=function(t){if(null==t)throw new Error("you can't push null or undefined here");++r;var e=new n(t);s?(s.next=e,e.pre=s,s=e):o=s=e},this.popBack=function(){s&&(r>0&&--r,s&&(o===s?o=s=void 0:(s=s.pre)&&(s.next=void 0)))},this.setElementByPos=function(t,e){if(null==e)throw new Error("you can't set null or undefined here");if(t<0||t>=r)throw new Error("pos must more then 0 and less then the list length");for(var i=o;t--;){if(!i)throw new Error("unknown error");i=i.next}i&&(i.value=e)},this.insert=function(t,e,i){if(void 0===i&&(i=1),null==e)throw new Error("you can't insert null or undefined here");if(t<0||t>r)throw new Error("insert pos must more then 0 and less then or equal to the list length");if(i<0)throw new Error("insert size must more than 0");if(0===t)for(;i--;)this.pushFront(e);else if(t===r)for(;i--;)this.pushBack(e);else{for(var s=o,a=1;a0&&--r;t.next=e.next,t.next&&(t.next.pre=t),t=t.next}},this.sort=function(t){var e=[];this.forEach((function(t){e.push(t)})),e.sort(t);var r=o;e.forEach((function(t){r&&(r.value=t,r=r.next)}))},this.pushFront=function(t){if(null==t)throw new Error("you can't push null or undefined here");++r;var e=new n(t);o?(e.next=o,o.pre=e,o=e):o=s=e},this.popFront=function(){o&&(r>0&&--r,o&&(o===s?o=s=void 0:(o=o.next)&&(o.pre=void 0)))},this.merge=function(t){var e=this,i=o;t.forEach((function(t){for(;i&&void 0!==i.value&&i.value<=t;)i=i.next;if(void 0===i)e.pushBack(t),i=s;else if(i===o)e.pushFront(t),i=o;else{++r;var a=i.pre;a&&(a.next=new n(t),a.next.pre=a,a.next.next=i,i&&(i.pre=a.next))}}))},this[Symbol.iterator]=function(){return function(){var t;return i(this,(function(e){switch(e.label){case 0:t=o,e.label=1;case 1:if(void 0===t)return[3,3];if(!t.value)throw new Error("unknown error");return[4,t.value];case 2:return e.sent(),t=t.next,[3,1];case 3:return[2]}}))}()},t.forEach((function(t){return e.pushBack(t)})),Object.freeze(this)}Object.freeze(o),r.default=o},{}],30:[function(t,e,r){var i=this&&this.__generator||function(t,e){var r,i,n,o,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(t){return function(e){return h([t,e])}}function h(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,i&&(n=2&o[0]?i.return:o[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,o[1])).done)return n;switch(i=0,n&&(o=[2&o[0],n.value]),o[0]){case 0:case 1:n=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((n=(n=s.trys).length>0&&n[n.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!n||o[1]>n[0]&&o[1]=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(r,"__esModule",{value:!0});var o=t("../Base/TreeNode");function s(t,e){var r=this;void 0===t&&(t=[]),e=e||function(t,e){return te?1:0};var s=0,a=new o.default;a.color=o.default.TreeNodeColorType.black,this.size=function(){return s},this.empty=function(){return 0===s},this.clear=function(){s=0,a.key=a.value=void 0,a.leftChild=a.rightChild=a.brother=void 0};var h=function(t){if(!t||void 0===t.key)throw new Error("unknown error");return t.leftChild?h(t.leftChild):t},u=function(t){if(!t||void 0===t.key)throw new Error("unknown error");return t.rightChild?u(t.rightChild):t};this.front=function(){if(!this.empty()){var t=h(a);if(void 0===t.key||void 0===t.value)throw new Error("unknown error");return{key:t.key,value:t.value}}},this.back=function(){if(!this.empty()){var t=u(a);if(void 0===t.key||void 0===t.value)throw new Error("unknown error");return{key:t.key,value:t.value}}},this.forEach=function(t){var e,r,i=0;try{for(var o=n(this),s=o.next();!s.done;s=o.next())t(s.value,i++)}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}},this.getElementByPos=function(t){var e,r;if(t<0||t>=this.size())throw new Error("pos must more than 0 and less than set's size");var i=0;try{for(var o=n(this),s=o.next();!s.done;s=o.next()){var a=s.value;if(i===t)return a;++i}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}throw new Error("unknown Error")};var f=function(t,r){if(t&&void 0!==t.key&&void 0!==t.value){var i=e(t.key,r);return 0===i?{key:t.key,value:t.value}:i<0?f(t.rightChild,r):f(t.leftChild,r)||{key:t.key,value:t.value}}};this.lowerBound=function(t){return f(a,t)};var l=function(t,r){if(t&&void 0!==t.key&&void 0!==t.value)return e(t.key,r)<=0?l(t.rightChild,r):l(t.leftChild,r)||{key:t.key,value:t.value}};this.upperBound=function(t){return l(a,t)};var c=function(t,r){if(t&&void 0!==t.key&&void 0!==t.value){var i=e(t.key,r);return 0===i?{key:t.key,value:t.value}:i>0?c(t.leftChild,r):c(t.rightChild,r)||{key:t.key,value:t.value}}};this.reverseLowerBound=function(t){return c(a,t)};var d=function(t,r){if(t&&void 0!==t.key&&void 0!==t.value)return e(t.key,r)>=0?d(t.leftChild,r):d(t.rightChild,r)||{key:t.key,value:t.value}};this.reverseUpperBound=function(t){return d(a,t)};var p=function(t){var e=t.parent;if(!e){if(t===a)return;throw new Error("unknown error")}if(t.color!==o.default.TreeNodeColorType.red){var r=t.brother;if(!r)throw new Error("unknown error");if(t===e.leftChild)if(r.color===o.default.TreeNodeColorType.red){r.color=o.default.TreeNodeColorType.black,e.color=o.default.TreeNodeColorType.red;var i=e.rotateLeft();a===e&&(a=i),p(t)}else r.color===o.default.TreeNodeColorType.black&&(r.rightChild&&r.rightChild.color===o.default.TreeNodeColorType.red?(r.color=e.color,e.color=o.default.TreeNodeColorType.black,r.rightChild&&(r.rightChild.color=o.default.TreeNodeColorType.black),i=e.rotateLeft(),a===e&&(a=i),t.color=o.default.TreeNodeColorType.black):r.rightChild&&r.rightChild.color!==o.default.TreeNodeColorType.black||!r.leftChild||r.leftChild.color!==o.default.TreeNodeColorType.red?r.leftChild&&r.leftChild.color!==o.default.TreeNodeColorType.black||r.rightChild&&r.rightChild.color!==o.default.TreeNodeColorType.black||(r.color=o.default.TreeNodeColorType.red,p(e)):(r.color=o.default.TreeNodeColorType.red,r.leftChild&&(r.leftChild.color=o.default.TreeNodeColorType.black),i=r.rotateRight(),a===r&&(a=i),p(t)));else t===e.rightChild&&(r.color===o.default.TreeNodeColorType.red?(r.color=o.default.TreeNodeColorType.black,e.color=o.default.TreeNodeColorType.red,i=e.rotateRight(),a===e&&(a=i),p(t)):r.color===o.default.TreeNodeColorType.black&&(r.leftChild&&r.leftChild.color===o.default.TreeNodeColorType.red?(r.color=e.color,e.color=o.default.TreeNodeColorType.black,r.leftChild&&(r.leftChild.color=o.default.TreeNodeColorType.black),i=e.rotateRight(),a===e&&(a=i),t.color=o.default.TreeNodeColorType.black):r.leftChild&&r.leftChild.color!==o.default.TreeNodeColorType.black||!r.rightChild||r.rightChild.color!==o.default.TreeNodeColorType.red?r.leftChild&&r.leftChild.color!==o.default.TreeNodeColorType.black||r.rightChild&&r.rightChild.color!==o.default.TreeNodeColorType.black||(r.color=o.default.TreeNodeColorType.red,p(e)):(r.color=o.default.TreeNodeColorType.red,r.rightChild&&(r.rightChild.color=o.default.TreeNodeColorType.black),i=r.rotateLeft(),a===r&&(a=i),p(t))))}else t.color=o.default.TreeNodeColorType.black},m=function(t){for(var e=t;e.leftChild||e.rightChild;){if(e.rightChild){e=h(e.rightChild);var r=t.key;t.key=e.key,e.key=r;var i=t.value;t.value=e.value,e.value=i,t=e}e.leftChild&&(e=u(e.leftChild),r=t.key,t.key=e.key,e.key=r,i=t.value,t.value=e.value,e.value=i,t=e)}p(e),e&&e.remove(),--s,a.color=o.default.TreeNodeColorType.black},g=function(t,e){return!(!t||void 0===t.key)&&(!!g(t.leftChild,e)||!!e(t)||g(t.rightChild,e))};this.eraseElementByPos=function(t){if(t<0||t>=s)throw new Error("pos must more than 0 and less than set's size");var e=0;g(a,(function(r){return t===e?(m(r),!0):(++e,!1)}))},this.eraseElementByKey=function(t){if(!this.empty()){var r=v(a,t);void 0!==r&&void 0!==r.key&&0===e(r.key,t)&&m(r)}};var y=function(t,r){if(!t||void 0===t.key)throw new Error("unknown error");var i=e(r,t.key);return i<0?t.leftChild?y(t.leftChild,r):(t.leftChild=new o.default,t.leftChild.parent=t,t.leftChild.brother=t.rightChild,t.rightChild&&(t.rightChild.brother=t.leftChild),t.leftChild):i>0?t.rightChild?y(t.rightChild,r):(t.rightChild=new o.default,t.rightChild.parent=t,t.rightChild.brother=t.leftChild,t.leftChild&&(t.leftChild.brother=t.rightChild),t.rightChild):t},b=function(t){var e=t.parent;if(!e){if(t===a)return;throw new Error("unknown error")}if(e.color!==o.default.TreeNodeColorType.black&&e.color===o.default.TreeNodeColorType.red){var r=e.brother,i=e.parent;if(!i)throw new Error("unknown error");if(r&&r.color===o.default.TreeNodeColorType.red)r.color=e.color=o.default.TreeNodeColorType.black,i.color=o.default.TreeNodeColorType.red,b(i);else if(!r||r.color===o.default.TreeNodeColorType.black)if(e===i.leftChild)if(t===e.leftChild){e.color=o.default.TreeNodeColorType.black,i.color=o.default.TreeNodeColorType.red;var n=i.rotateRight();i===a&&(a=n)}else t===e.rightChild&&(n=e.rotateLeft(),i===a&&(a=n),b(e));else e===i.rightChild&&(t===e.leftChild?(n=e.rotateRight(),i===a&&(a=n),b(e)):t===e.rightChild&&(e.color=o.default.TreeNodeColorType.black,i.color=o.default.TreeNodeColorType.red,n=i.rotateLeft(),i===a&&(a=n)))}};this.setElement=function(t,r){if(null==t)throw new Error("to avoid some unnecessary errors, we don't suggest you insert null or undefined here");if(null!=r){if(this.empty())return++s,a.key=t,a.value=r,void(a.color=o.default.TreeNodeColorType.black);var i=y(a,t);void 0===i.key||0!==e(i.key,t)?(++s,i.key=t,i.value=r,b(i),a.color=o.default.TreeNodeColorType.black):i.value=r}else this.eraseElementByKey(t)};var v=function(t,r){if(t&&void 0!==t.key){var i=e(r,t.key);return i<0?v(t.leftChild,r):i>0?v(t.rightChild,r):t}};this.find=function(t){return!!v(a,t)},this.getElementByKey=function(t){var e=v(a,t);if(void 0===(null==e?void 0:e.key)||void 0===(null==e?void 0:e.value))throw new Error("unknown error");return e.value},this.union=function(t){var e=this;t.forEach((function(t){var r=t.key,i=t.value;return e.setElement(r,i)}))},this.getHeight=function(){if(this.empty())return 0;var t=function(e){return e?Math.max(t(e.leftChild),t(e.rightChild))+1:1};return t(a)};var w=function(t){return i(this,(function(e){switch(e.label){case 0:return t&&void 0!==t.key&&void 0!==t.value?[5,n(w(t.leftChild))]:[2];case 1:return e.sent(),[4,{key:t.key,value:t.value}];case 2:return e.sent(),[5,n(w(t.rightChild))];case 3:return e.sent(),[2]}}))};this[Symbol.iterator]=function(){return w(a)},t.forEach((function(t){var e=t.key,i=t.value;return r.setElement(e,i)})),Object.freeze(this)}Object.freeze(s),r.default=s},{"../Base/TreeNode":25}],31:[function(t,e,r){function i(t,e){void 0===t&&(t=[]),e=e||function(t,e){return t>e?-1:t=i)throw new Error("unknown error");if(e<0||e>=i)throw new Error("unknown error");var n=r[t];r[t]=r[e],r[e]=n},o=function(t){if(t<0||t>=i)throw new Error("unknown error");var o=2*t+1,s=2*t+2;o0&&n(t,o),s0&&n(t,s)};!function(){for(var t=Math.floor((i-1)/2);t>=0;--t)for(var o=t,s=2*o+1;s0&&(h=a),e(r[o],r[h])<=0)break;n(o,h),s=2*(o=h)+1}}(),this.size=function(){return i},this.empty=function(){return 0===i},this.clear=function(){i=0,r.length=0},this.push=function(t){if(r.push(t),1!=++i)for(var n=i-1;n>0;){var s=Math.floor((n-1)/2);if(e(r[s],t)<=0)break;o(s),n=s}},this.pop=function(){if(!this.empty())if(1!==this.size()){var t=r[i-1];--i;for(var n=0;n=this.size())break;var a=o;if(s0&&(a=s),e(r[a],t)>=0)break;r[n]=r[a],n=a}r[n]=t}else--i},this.top=function(){return r[0]},Object.freeze(this)}Object.defineProperty(r,"__esModule",{value:!0}),Object.freeze(i),r.default=i},{}],32:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0});var i=t("../LinkList/LinkList");function n(t){void 0===t&&(t=[]);var e=new i.default(t);this.size=function(){return e.size()},this.empty=function(){return e.empty()},this.clear=function(){e.clear()},this.push=function(t){e.pushBack(t)},this.pop=function(){e.popFront()},this.front=function(){return e.front()},Object.freeze(this)}Object.freeze(n),r.default=n},{"../LinkList/LinkList":29}],33:[function(t,e,r){var i=this&&this.__generator||function(t,e){var r,i,n,o,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(t){return function(e){return h([t,e])}}function h(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,i&&(n=2&o[0]?i.return:o[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,o[1])).done)return n;switch(i=0,n&&(o=[2&o[0],n.value]),o[0]){case 0:case 1:n=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((n=(n=s.trys).length>0&&n[n.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!n||o[1]>n[0]&&o[1]=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(r,"__esModule",{value:!0});var o=t("../Base/TreeNode");function s(t,e){var r=this;void 0===t&&(t=[]),e=e||function(t,e){return te?1:0};var s=0,a=new o.default;a.color=o.default.TreeNodeColorType.black,this.size=function(){return s},this.empty=function(){return 0===s},this.clear=function(){s=0,a.key=void 0,a.leftChild=a.rightChild=a.brother=a.parent=void 0,a.color=o.default.TreeNodeColorType.black};var h=function(t){if(!t||void 0===t.key)throw new Error("unknown error");return t.leftChild?h(t.leftChild):t},u=function(t){if(!t||void 0===t.key)throw new Error("unknown error");return t.rightChild?u(t.rightChild):t};this.front=function(){if(!this.empty())return h(a).key},this.back=function(){if(!this.empty())return u(a).key},this.forEach=function(t){var e,r,i=0;try{for(var o=n(this),s=o.next();!s.done;s=o.next())t(s.value,i++)}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}},this.getElementByPos=function(t){var e,r;if(t<0||t>=this.size())throw new Error("pos must more than 0 and less than set's size");var i=0;try{for(var o=n(this),s=o.next();!s.done;s=o.next()){var a=s.value;if(i===t)return a;++i}}catch(t){e={error:t}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(e)throw e.error}}throw new Error("unknown error")};var f=function(t){var e=t.parent;if(!e){if(t===a)return;throw new Error("unknown error")}if(t.color!==o.default.TreeNodeColorType.red){var r=t.brother;if(!r)throw new Error("unknown error");if(t===e.leftChild)if(r.color===o.default.TreeNodeColorType.red){r.color=o.default.TreeNodeColorType.black,e.color=o.default.TreeNodeColorType.red;var i=e.rotateLeft();a===e&&(a=i),f(t)}else r.color===o.default.TreeNodeColorType.black&&(r.rightChild&&r.rightChild.color===o.default.TreeNodeColorType.red?(r.color=e.color,e.color=o.default.TreeNodeColorType.black,r.rightChild&&(r.rightChild.color=o.default.TreeNodeColorType.black),i=e.rotateLeft(),a===e&&(a=i),t.color=o.default.TreeNodeColorType.black):r.rightChild&&r.rightChild.color!==o.default.TreeNodeColorType.black||!r.leftChild||r.leftChild.color!==o.default.TreeNodeColorType.red?r.leftChild&&r.leftChild.color!==o.default.TreeNodeColorType.black||r.rightChild&&r.rightChild.color!==o.default.TreeNodeColorType.black||(r.color=o.default.TreeNodeColorType.red,f(e)):(r.color=o.default.TreeNodeColorType.red,r.leftChild&&(r.leftChild.color=o.default.TreeNodeColorType.black),i=r.rotateRight(),a===r&&(a=i),f(t)));else t===e.rightChild&&(r.color===o.default.TreeNodeColorType.red?(r.color=o.default.TreeNodeColorType.black,e.color=o.default.TreeNodeColorType.red,i=e.rotateRight(),a===e&&(a=i),f(t)):r.color===o.default.TreeNodeColorType.black&&(r.leftChild&&r.leftChild.color===o.default.TreeNodeColorType.red?(r.color=e.color,e.color=o.default.TreeNodeColorType.black,r.leftChild&&(r.leftChild.color=o.default.TreeNodeColorType.black),i=e.rotateRight(),a===e&&(a=i),t.color=o.default.TreeNodeColorType.black):r.leftChild&&r.leftChild.color!==o.default.TreeNodeColorType.black||!r.rightChild||r.rightChild.color!==o.default.TreeNodeColorType.red?r.leftChild&&r.leftChild.color!==o.default.TreeNodeColorType.black||r.rightChild&&r.rightChild.color!==o.default.TreeNodeColorType.black||(r.color=o.default.TreeNodeColorType.red,f(e)):(r.color=o.default.TreeNodeColorType.red,r.rightChild&&(r.rightChild.color=o.default.TreeNodeColorType.black),i=r.rotateLeft(),a===r&&(a=i),f(t))))}else t.color=o.default.TreeNodeColorType.black},l=function(t){for(var e=t;e.leftChild||e.rightChild;){if(e.rightChild){e=h(e.rightChild);var r=t.key;t.key=e.key,e.key=r,t=e}e.leftChild&&(e=u(e.leftChild),r=t.key,t.key=e.key,e.key=r,t=e)}f(e),e&&e.remove(),--s,a.color=o.default.TreeNodeColorType.black},c=function(t,e){return!(!t||void 0===t.key)&&(!!c(t.leftChild,e)||!!e(t)||c(t.rightChild,e))};this.eraseElementByPos=function(t){if(t<0||t>=s)throw new Error("pos must more than 0 and less than set's size");var e=0;c(a,(function(r){return t===e?(l(r),!0):(++e,!1)}))},this.eraseElementByValue=function(t){if(!this.empty()){var r=m(a,t);void 0!==r&&void 0!==r.key&&0===e(r.key,t)&&l(r)}};var d=function(t,r){if(!t||void 0===t.key)throw new Error("unknown error");var i=e(r,t.key);return i<0?t.leftChild?d(t.leftChild,r):(t.leftChild=new o.default,t.leftChild.parent=t,t.leftChild.brother=t.rightChild,t.rightChild&&(t.rightChild.brother=t.leftChild),t.leftChild):i>0?t.rightChild?d(t.rightChild,r):(t.rightChild=new o.default,t.rightChild.parent=t,t.rightChild.brother=t.leftChild,t.leftChild&&(t.leftChild.brother=t.rightChild),t.rightChild):t},p=function(t){var e=t.parent;if(!e){if(t===a)return;throw new Error("unknown error")}if(e.color!==o.default.TreeNodeColorType.black&&e.color===o.default.TreeNodeColorType.red){var r=e.brother,i=e.parent;if(!i)throw new Error("unknown error");if(r&&r.color===o.default.TreeNodeColorType.red)r.color=e.color=o.default.TreeNodeColorType.black,i.color=o.default.TreeNodeColorType.red,p(i);else if(!r||r.color===o.default.TreeNodeColorType.black)if(e===i.leftChild)if(t===e.leftChild){e.color=o.default.TreeNodeColorType.black,i.color=o.default.TreeNodeColorType.red;var n=i.rotateRight();i===a&&(a=n)}else t===e.rightChild&&(n=e.rotateLeft(),i===a&&(a=n),p(e));else e===i.rightChild&&(t===e.leftChild?(n=e.rotateRight(),i===a&&(a=n),p(e)):t===e.rightChild&&(e.color=o.default.TreeNodeColorType.black,i.color=o.default.TreeNodeColorType.red,n=i.rotateLeft(),i===a&&(a=n)))}};this.insert=function(t){if(null==t)throw new Error("to avoid some unnecessary errors, we don't suggest you insert null or undefined here");if(this.empty())return++s,a.key=t,void(a.color=o.default.TreeNodeColorType.black);var r=d(a,t);void 0!==r.key&&0===e(r.key,t)||(++s,r.key=t,p(r),a.color=o.default.TreeNodeColorType.black)};var m=function(t,r){if(t&&void 0!==t.key){var i=e(r,t.key);return i<0?m(t.leftChild,r):i>0?m(t.rightChild,r):t}};this.find=function(t){var r=m(a,t);return void 0!==r&&void 0!==r.key&&0===e(r.key,t)};var g=function(t,r){if(t&&void 0!==t.key){var i=e(t.key,r);if(0===i)return t.key;if(i<0)return g(t.rightChild,r);var n=g(t.leftChild,r);return void 0!==n?n:t.key}};this.lowerBound=function(t){return g(a,t)};var y=function(t,r){if(t&&void 0!==t.key){if(e(t.key,r)<=0)return y(t.rightChild,r);var i=y(t.leftChild,r);return void 0!==i?i:t.key}};this.upperBound=function(t){return y(a,t)};var b=function(t,r){if(t&&void 0!==t.key){var i=e(t.key,r);if(0===i)return t.key;if(i>0)return b(t.leftChild,r);var n=b(t.rightChild,r);return void 0!==n?n:t.key}};this.reverseLowerBound=function(t){return b(a,t)};var v=function(t,r){if(t&&void 0!==t.key){if(e(t.key,r)>=0)return v(t.leftChild,r);var i=v(t.rightChild,r);return void 0!==i?i:t.key}};this.reverseUpperBound=function(t){return v(a,t)},this.union=function(t){var e=this;t.forEach((function(t){return e.insert(t)}))},this.getHeight=function(){if(this.empty())return 0;var t=function(e){return e?Math.max(t(e.leftChild),t(e.rightChild))+1:1};return t(a)};var w=function(t){return i(this,(function(e){switch(e.label){case 0:return t&&void 0!==t.key?[5,n(w(t.leftChild))]:[2];case 1:return e.sent(),[4,t.key];case 2:return e.sent(),[5,n(w(t.rightChild))];case 3:return e.sent(),[2]}}))};this[Symbol.iterator]=function(){return w(a)},t.forEach((function(t){return r.insert(t)})),Object.freeze(this)}Object.freeze(s),r.default=s},{"../Base/TreeNode":25}],34:[function(t,e,r){function i(t){var e=this;void 0===t&&(t=[]);var r=0,i=[];this.size=function(){return r},this.empty=function(){return 0===r},this.clear=function(){r=0,i.length=0},this.push=function(t){i.push(t),++r},this.pop=function(){i.pop(),r>0&&--r},this.top=function(){return i[r-1]},t.forEach((function(t){return e.push(t)})),Object.freeze(this)}Object.defineProperty(r,"__esModule",{value:!0}),Object.freeze(i),r.default=i},{}],35:[function(t,e,r){var i=this&&this.__generator||function(t,e){var r,i,n,o,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(t){return function(e){return h([t,e])}}function h(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,i&&(n=2&o[0]?i.return:o[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,o[1])).done)return n;switch(i=0,n&&(o=[2&o[0],n.value]),o[0]){case 0:case 1:n=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((n=(n=s.trys).length>0&&n[n.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!n||o[1]>n[0]&&o[1]0)&&!(i=o.next()).done;)s.push(i.value)}catch(t){n={error:t}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return s},o=this&&this.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var i,n=0,o=e.length;n=t.length&&(t=void 0),{value:t&&t[i++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function a(t){var e=this;void 0===t&&(t=[]);var r=0,a=[];this.size=function(){return r},this.empty=function(){return 0===r},this.clear=function(){r=0,a.length=0},this.front=function(){if(!this.empty())return a[0]},this.back=function(){if(!this.empty())return a[r-1]},this.forEach=function(t){a.forEach(t)},this.getElementByPos=function(t){if(t<0||t>=r)throw new Error("pos must more than 0 and less than vector's size");return a[t]},this.eraseElementByPos=function(t){if(t<0||t>=r)throw new Error("pos must more than 0 and less than vector's size");for(var e=t;ei;)this.popBack()},this.pushBack=function(t){a.push(t),++r},this.popBack=function(){a.pop(),r>0&&--r},this.setElementByPos=function(t,e){if(t<0||t>=r)throw new Error("pos must more than 0 and less than vector's size");a[t]=e},this.insert=function(t,e,i){if(void 0===i&&(i=1),t<0||t>r)throw new Error("pos must more than 0 and less than or equal to vector's size");a.splice.apply(a,o([t,0],n(new Array(i).fill(e)),!1)),r+=i},this.find=function(t){return a.includes(t)},this.reverse=function(){a.reverse()},this.unique=function(){var t,e=[];this.forEach((function(r,i){0!==i&&r===t||(e.push(r),t=r)})),e.forEach((function(t,e){a[e]=t}));for(var i=e.length;r>i;)this.popBack()},this.sort=function(t){a.sort(t)},this[Symbol.iterator]=function(){return function(){return i(this,(function(t){switch(t.label){case 0:return[5,s(a)];case 1:return[2,t.sent()]}}))}()},t.forEach((function(t){return e.pushBack(t)})),Object.freeze(this)}Object.defineProperty(r,"__esModule",{value:!0}),Object.freeze(a),r.default=a},{}],36:[function(t,e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.HashMap=r.HashSet=r.Map=r.Set=r.PriorityQueue=r.Deque=r.LinkList=r.Queue=r.Stack=r.Vector=void 0;var i=t("./Vector/Vector");r.Vector=i.default;var n=t("./Stack/Stack");r.Stack=n.default;var o=t("./Queue/Queue");r.Queue=o.default;var s=t("./LinkList/LinkList");r.LinkList=s.default;var a=t("./Deque/Deque");r.Deque=a.default;var h=t("./PriorityQueue/PriorityQueue");r.PriorityQueue=h.default;var u=t("./Set/Set");r.Set=u.default;var f=t("./Map/Map");r.Map=f.default;var l=t("./HashSet/HashSet");r.HashSet=l.default;var c=t("./HashMap/HashMap");r.HashMap=c.default},{"./Deque/Deque":26,"./HashMap/HashMap":27,"./HashSet/HashSet":28,"./LinkList/LinkList":29,"./Map/Map":30,"./PriorityQueue/PriorityQueue":31,"./Queue/Queue":32,"./Set/Set":33,"./Stack/Stack":34,"./Vector/Vector":35}],37:[function(t,e,r){const i=t("yallist"),n=Symbol("max"),o=Symbol("length"),s=Symbol("lengthCalculator"),a=Symbol("allowStale"),h=Symbol("maxAge"),u=Symbol("dispose"),f=Symbol("noDisposeOnSet"),l=Symbol("lruList"),c=Symbol("cache"),d=Symbol("updateAgeOnGet"),p=()=>1;class m{constructor(t){if("number"==typeof t&&(t={max:t}),t||(t={}),t.max&&("number"!=typeof t.max||t.max<0))throw new TypeError("max must be a non-negative number");this[n]=t.max||1/0;const e=t.length||p;if(this[s]="function"!=typeof e?p:e,this[a]=t.stale||!1,t.maxAge&&"number"!=typeof t.maxAge)throw new TypeError("maxAge must be a number");this[h]=t.maxAge||0,this[u]=t.dispose,this[f]=t.noDisposeOnSet||!1,this[d]=t.updateAgeOnGet||!1,this.reset()}set max(t){if("number"!=typeof t||t<0)throw new TypeError("max must be a non-negative number");this[n]=t||1/0,b(this)}get max(){return this[n]}set allowStale(t){this[a]=!!t}get allowStale(){return this[a]}set maxAge(t){if("number"!=typeof t)throw new TypeError("maxAge must be a non-negative number");this[h]=t,b(this)}get maxAge(){return this[h]}set lengthCalculator(t){"function"!=typeof t&&(t=p),t!==this[s]&&(this[s]=t,this[o]=0,this[l].forEach((t=>{t.length=this[s](t.value,t.key),this[o]+=t.length}))),b(this)}get lengthCalculator(){return this[s]}get length(){return this[o]}get itemCount(){return this[l].length}rforEach(t,e){e=e||this;for(let r=this[l].tail;null!==r;){const i=r.prev;_(this,t,r,e),r=i}}forEach(t,e){e=e||this;for(let r=this[l].head;null!==r;){const i=r.next;_(this,t,r,e),r=i}}keys(){return this[l].toArray().map((t=>t.key))}values(){return this[l].toArray().map((t=>t.value))}reset(){this[u]&&this[l]&&this[l].length&&this[l].forEach((t=>this[u](t.key,t.value))),this[c]=new Map,this[l]=new i,this[o]=0}dump(){return this[l].map((t=>!y(this,t)&&{k:t.key,v:t.value,e:t.now+(t.maxAge||0)})).toArray().filter((t=>t))}dumpLru(){return this[l]}set(t,e,r){if((r=r||this[h])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const i=r?Date.now():0,a=this[s](e,t);if(this[c].has(t)){if(a>this[n])return v(this,this[c].get(t)),!1;const s=this[c].get(t).value;return this[u]&&(this[f]||this[u](t,s.value)),s.now=i,s.maxAge=r,s.value=e,this[o]+=a-s.length,s.length=a,this.get(t),b(this),!0}const d=new w(t,e,a,i,r);return d.length>this[n]?(this[u]&&this[u](t,e),!1):(this[o]+=d.length,this[l].unshift(d),this[c].set(t,this[l].head),b(this),!0)}has(t){if(!this[c].has(t))return!1;const e=this[c].get(t).value;return!y(this,e)}get(t){return g(this,t,!0)}peek(t){return g(this,t,!1)}pop(){const t=this[l].tail;return t?(v(this,t),t.value):null}del(t){v(this,this[c].get(t))}load(t){this.reset();const e=Date.now();for(let r=t.length-1;r>=0;r--){const i=t[r],n=i.e||0;if(0===n)this.set(i.k,i.v);else{const t=n-e;t>0&&this.set(i.k,i.v,t)}}}prune(){this[c].forEach(((t,e)=>g(this,e,!1)))}}const g=(t,e,r)=>{const i=t[c].get(e);if(i){const e=i.value;if(y(t,e)){if(v(t,i),!t[a])return}else r&&(t[d]&&(i.value.now=Date.now()),t[l].unshiftNode(i));return e.value}},y=(t,e)=>{if(!e||!e.maxAge&&!t[h])return!1;const r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[h]&&r>t[h]},b=t=>{if(t[o]>t[n])for(let e=t[l].tail;t[o]>t[n]&&null!==e;){const r=e.prev;v(t,e),e=r}},v=(t,e)=>{if(e){const r=e.value;t[u]&&t[u](r.key,r.value),t[o]-=r.length,t[c].delete(r.key),t[l].removeNode(e)}};class w{constructor(t,e,r,i,n){this.key=t,this.value=e,this.length=r,this.now=i,this.maxAge=n||0}}const _=(t,e,r,i)=>{let n=r.value;y(t,n)&&(v(t,r),t[a]||(n=void 0)),n&&e.call(i,n.value,n.key,t)};e.exports=m},{yallist:83}],38:[function(t,e,r){(function(t){(function(){const r=e.exports;r.types={0:"reserved",1:"connect",2:"connack",3:"publish",4:"puback",5:"pubrec",6:"pubrel",7:"pubcomp",8:"subscribe",9:"suback",10:"unsubscribe",11:"unsuback",12:"pingreq",13:"pingresp",14:"disconnect",15:"auth"},r.codes={};for(const t in r.types){const e=r.types[t];r.codes[e]=t}r.CMD_SHIFT=4,r.CMD_MASK=240,r.DUP_MASK=8,r.QOS_MASK=3,r.QOS_SHIFT=1,r.RETAIN_MASK=1,r.VARBYTEINT_MASK=127,r.VARBYTEINT_FIN_MASK=128,r.VARBYTEINT_MAX=268435455,r.SESSIONPRESENT_MASK=1,r.SESSIONPRESENT_HEADER=t.from([r.SESSIONPRESENT_MASK]),r.CONNACK_HEADER=t.from([r.codes.connack<[0,1].map((n=>[0,1].map((o=>{const s=t.alloc(1);return s.writeUInt8(r.codes[e]<t.from([e]))),r.EMPTY={pingreq:t.from([r.codes.pingreq<<4,0]),pingresp:t.from([r.codes.pingresp<<4,0]),disconnect:t.from([r.codes.disconnect<<4,0])}}).call(this)}).call(this,t("buffer").Buffer)},{buffer:17}],39:[function(t,e,r){(function(r){(function(){const i=t("./writeToStream"),n=t("events");function o(t,e){const r=new s;return i(t,r,e),r.concat()}class s extends n{constructor(){super(),this._array=new Array(20),this._i=0}write(t){return this._array[this._i++]=t,!0}concat(){let t=0;const e=new Array(this._array.length),i=this._array;let n,o=0;for(n=0;n>8,0),r.writeUInt8(255&e,1),r}function s(){for(let t=0;t0&&(i|=128),s.writeUInt8(i,o++)}while(e>0&&o0&&(o=0),n?s.subarray(0,o):s.slice(0,o)}function h(e){const r=t.allocUnsafe(4);return r.writeUInt32BE(e,0),r}e.exports={cache:i,generateCache:s,generateNumber:o,genBufVariableByteInt:a,generate4ByteBuffer:h}}).call(this)}).call(this,t("buffer").Buffer)},{buffer:17}],42:[function(t,e,r){class i{constructor(){this.cmd=null,this.retain=!1,this.qos=0,this.dup=!1,this.length=-1,this.topic=null,this.payload=null}}e.exports=i},{}],43:[function(t,e,r){const i=t("bl"),n=t("events"),o=t("./packet"),s=t("./constants"),a=t("debug")("mqtt-packet:parser");class h extends n{constructor(){super(),this.parser=this.constructor.parser}static parser(t){return this instanceof h?(this.settings=t||{},this._states=["_parseHeader","_parseLength","_parsePayload","_newPacket"],this._resetState(),this):(new h).parser(t)}_resetState(){a("_resetState: resetting packet, error, _list, and _stateCounter"),this.packet=new o,this.error=null,this._list=i(),this._stateCounter=0}parse(t){for(this.error&&this._resetState(),this._list.append(t),a("parse: current state: %s",this._states[this._stateCounter]);(-1!==this.packet.length||this._list.length>0)&&this[this._states[this._stateCounter]]()&&!this.error;)this._stateCounter++,a("parse: state complete. _stateCounter is now: %d",this._stateCounter),a("parse: packet.length: %d, buffer list length: %d",this.packet.length,this._list.length),this._stateCounter>=this._states.length&&(this._stateCounter=0);return a("parse: exited while loop. packet: %d, buffer list length: %d",this.packet.length,this._list.length),this._list.length}_parseHeader(){const t=this._list.readUInt8(0);return this.packet.cmd=s.types[t>>s.CMD_SHIFT],this.packet.retain=0!=(t&s.RETAIN_MASK),this.packet.qos=t>>s.QOS_SHIFT&s.QOS_MASK,this.packet.dup=0!=(t&s.DUP_MASK),a("_parseHeader: packet: %o",this.packet),this._list.consume(1),!0}_parseLength(){const t=this._parseVarByteNum(!0);return t&&(this.packet.length=t.value,this._list.consume(t.bytes)),a("_parseLength %d",t.value),!!t}_parsePayload(){a("_parsePayload: payload %O",this._list);let t=!1;if(0===this.packet.length||this._list.length>=this.packet.length){switch(this._pos=0,this.packet.cmd){case"connect":this._parseConnect();break;case"connack":this._parseConnack();break;case"publish":this._parsePublish();break;case"puback":case"pubrec":case"pubrel":case"pubcomp":this._parseConfirmation();break;case"subscribe":this._parseSubscribe();break;case"suback":this._parseSuback();break;case"unsubscribe":this._parseUnsubscribe();break;case"unsuback":this._parseUnsuback();break;case"pingreq":case"pingresp":break;case"disconnect":this._parseDisconnect();break;case"auth":this._parseAuth();break;default:this._emitError(new Error("Not supported"))}t=!0}return a("_parsePayload complete result: %s",t),t}_parseConnect(){let t,e,r,i;a("_parseConnect");const n={},o=this.packet,h=this._parseString();if(null===h)return this._emitError(new Error("Cannot parse protocolId"));if("MQTT"!==h&&"MQIsdp"!==h)return this._emitError(new Error("Invalid protocolId"));if(o.protocolId=h,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(o.protocolVersion=this._list.readUInt8(this._pos),o.protocolVersion>=128&&(o.bridgeMode=!0,o.protocolVersion=o.protocolVersion-128),3!==o.protocolVersion&&4!==o.protocolVersion&&5!==o.protocolVersion)return this._emitError(new Error("Invalid protocol version"));if(this._pos++,this._pos>=this._list.length)return this._emitError(new Error("Packet too short"));if(n.username=this._list.readUInt8(this._pos)&s.USERNAME_MASK,n.password=this._list.readUInt8(this._pos)&s.PASSWORD_MASK,n.will=this._list.readUInt8(this._pos)&s.WILL_FLAG_MASK,n.will&&(o.will={},o.will.retain=0!=(this._list.readUInt8(this._pos)&s.WILL_RETAIN_MASK),o.will.qos=(this._list.readUInt8(this._pos)&s.WILL_QOS_MASK)>>s.WILL_QOS_SHIFT),o.clean=0!=(this._list.readUInt8(this._pos)&s.CLEAN_SESSION_MASK),this._pos++,o.keepalive=this._parseNum(),-1===o.keepalive)return this._emitError(new Error("Packet too short"));if(5===o.protocolVersion){const t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(o.properties=t)}const u=this._parseString();if(null===u)return this._emitError(new Error("Packet too short"));if(o.clientId=u,a("_parseConnect: packet.clientId: %s",o.clientId),n.will){if(5===o.protocolVersion){const t=this._parseProperties();Object.getOwnPropertyNames(t).length&&(o.will.properties=t)}if(t=this._parseString(),null===t)return this._emitError(new Error("Cannot parse will topic"));if(o.will.topic=t,a("_parseConnect: packet.will.topic: %s",o.will.topic),e=this._parseBuffer(),null===e)return this._emitError(new Error("Cannot parse will payload"));o.will.payload=e,a("_parseConnect: packet.will.paylaod: %s",o.will.payload)}if(n.username){if(i=this._parseString(),null===i)return this._emitError(new Error("Cannot parse username"));o.username=i,a("_parseConnect: packet.username: %s",o.username)}if(n.password){if(r=this._parseBuffer(),null===r)return this._emitError(new Error("Cannot parse password"));o.password=r}return this.settings=o,a("_parseConnect: complete"),o}_parseConnack(){a("_parseConnack");const t=this.packet;if(this._list.length<1)return null;if(t.sessionPresent=!!(this._list.readUInt8(this._pos++)&s.SESSIONPRESENT_MASK),5===this.settings.protocolVersion)this._list.length>=2?t.reasonCode=this._list.readUInt8(this._pos++):t.reasonCode=0;else{if(this._list.length<2)return null;t.returnCode=this._list.readUInt8(this._pos++)}if(-1===t.returnCode||-1===t.reasonCode)return this._emitError(new Error("Cannot parse return code"));if(5===this.settings.protocolVersion){const e=this._parseProperties();Object.getOwnPropertyNames(e).length&&(t.properties=e)}a("_parseConnack: complete")}_parsePublish(){a("_parsePublish");const t=this.packet;if(t.topic=this._parseString(),null===t.topic)return this._emitError(new Error("Cannot parse topic"));if(!(t.qos>0)||this._parseMessageId()){if(5===this.settings.protocolVersion){const e=this._parseProperties();Object.getOwnPropertyNames(e).length&&(t.properties=e)}t.payload=this._list.slice(this._pos,t.length),a("_parsePublish: payload from buffer list: %o",t.payload)}}_parseSubscribe(){a("_parseSubscribe");const t=this.packet;let e,r,i,n,o,h,u;if(1!==t.qos)return this._emitError(new Error("Wrong subscribe header"));if(t.subscriptions=[],this._parseMessageId()){if(5===this.settings.protocolVersion){const e=this._parseProperties();Object.getOwnPropertyNames(e).length&&(t.properties=e)}for(;this._pos=t.length)return this._emitError(new Error("Malformed Subscribe Payload"));r=this._parseByte(),i=r&s.SUBSCRIBE_OPTIONS_QOS_MASK,h=0!=(r>>s.SUBSCRIBE_OPTIONS_NL_SHIFT&s.SUBSCRIBE_OPTIONS_NL_MASK),o=0!=(r>>s.SUBSCRIBE_OPTIONS_RAP_SHIFT&s.SUBSCRIBE_OPTIONS_RAP_MASK),n=r>>s.SUBSCRIBE_OPTIONS_RH_SHIFT&s.SUBSCRIBE_OPTIONS_RH_MASK,u={topic:e,qos:i},5===this.settings.protocolVersion?(u.nl=h,u.rap=o,u.rh=n):this.settings.bridgeMode&&(u.rh=0,u.rap=!0,u.nl=!0),a("_parseSubscribe: push subscription `%s` to subscription",u),t.subscriptions.push(u)}}}_parseSuback(){a("_parseSuback");const t=this.packet;if(this.packet.granted=[],this._parseMessageId()){if(5===this.settings.protocolVersion){const e=this._parseProperties();Object.getOwnPropertyNames(e).length&&(t.properties=e)}for(;this._pos2?(t.reasonCode=this._parseByte(),a("_parseConfirmation: packet.reasonCode `%d`",t.reasonCode)):t.reasonCode=0,t.length>3)){const e=this._parseProperties();Object.getOwnPropertyNames(e).length&&(t.properties=e)}return!0}_parseDisconnect(){const t=this.packet;if(a("_parseDisconnect"),5===this.settings.protocolVersion){this._list.length>0?t.reasonCode=this._parseByte():t.reasonCode=0;const e=this._parseProperties();Object.getOwnPropertyNames(e).length&&(t.properties=e)}return a("_parseDisconnect result: true"),!0}_parseAuth(){a("_parseAuth");const t=this.packet;if(5!==this.settings.protocolVersion)return this._emitError(new Error("Not supported auth packet for this version MQTT"));t.reasonCode=this._parseByte();const e=this._parseProperties();return Object.getOwnPropertyNames(e).length&&(t.properties=e),a("_parseAuth: result: true"),!0}_parseMessageId(){const t=this.packet;return t.messageId=this._parseNum(),null===t.messageId?(this._emitError(new Error("Cannot parse messageId")),!1):(a("_parseMessageId: packet.messageId %d",t.messageId),!0)}_parseString(t){const e=this._parseNum(),r=e+this._pos;if(-1===e||r>this._list.length||r>this.packet.length)return null;const i=this._list.toString("utf8",this._pos,r);return this._pos+=e,a("_parseString: result: %s",i),i}_parseStringPair(){return a("_parseStringPair"),{name:this._parseString(),value:this._parseString()}}_parseBuffer(){const t=this._parseNum(),e=t+this._pos;if(-1===t||e>this._list.length||e>this.packet.length)return null;const r=this._list.slice(this._pos,e);return this._pos+=t,a("_parseBuffer: result: %o",r),r}_parseNum(){if(this._list.length-this._pos<2)return-1;const t=this._list.readUInt16BE(this._pos);return this._pos+=2,a("_parseNum: result: %s",t),t}_parse4ByteNum(){if(this._list.length-this._pos<4)return-1;const t=this._list.readUInt32BE(this._pos);return this._pos+=4,a("_parse4ByteNum: result: %s",t),t}_parseVarByteNum(t){a("_parseVarByteNum");const e=4;let r,i=0,n=1,o=0,h=!1;const u=this._pos?this._pos:0;for(;i=i&&this._emitError(new Error("Invalid variable byte integer")),u&&(this._pos+=i),h=!!h&&(t?{bytes:i,value:o}:o),a("_parseVarByteNum: result: %o",h),h}_parseByte(){let t;return this._pos=4)&&(l||u))g+=r.byteLength(l)+2;else{if(a<4)return e.emit("error",new Error("clientId must be supplied before 3.1.1")),!1;if(1*u==0)return e.emit("error",new Error("clientId must be given if cleanSession set to 0")),!1}if("number"!=typeof f||f<0||f>65535||f%1!=0)return e.emit("error",new Error("Invalid keepalive")),!1;if(g+=2,g+=1,5===a){var y=D(e,m);if(!y)return!1;g+=y.length}if(h){if("object"!=typeof h)return e.emit("error",new Error("Invalid will")),!1;if(!h.topic||"string"!=typeof h.topic)return e.emit("error",new Error("Invalid will topic")),!1;if(g+=r.byteLength(h.topic)+2,g+=2,h.payload){if(!(h.payload.length>=0))return e.emit("error",new Error("Invalid will payload")),!1;"string"==typeof h.payload?g+=r.byteLength(h.payload):g+=h.payload.length}var b={};if(5===a){if(!(b=D(e,h.properties)))return!1;g+=b.length}}let v=!1;if(null!=c){if(!z(c))return e.emit("error",new Error("Invalid username")),!1;v=!0,g+=r.byteLength(c)+2}if(null!=d){if(!v)return e.emit("error",new Error("Username is required to use password")),!1;if(!z(d))return e.emit("error",new Error("Invalid password")),!1;g+=F(d)+2}e.write(i.CONNECT_HEADER),R(e,g),L(e,s),o.bridgeMode&&(a+=128),e.write(131===a?i.VERSION131:132===a?i.VERSION132:4===a?i.VERSION4:5===a?i.VERSION5:i.VERSION3);let w=0;return w|=null!=c?i.USERNAME_MASK:0,w|=null!=d?i.PASSWORD_MASK:0,w|=h&&h.retain?i.WILL_RETAIN_MASK:0,w|=h&&h.qos?h.qos<0&&p(e,d),null!=y&&y.write(),h("publish: payload: %o",c),e.write(c)}function _(t,e,n){const o=n?n.protocolVersion:4,s=t||{},a=s.cmd||"puback",h=s.messageId,u=s.dup&&"pubrel"===a?i.DUP_MASK:0;let f=0;const l=s.reasonCode,c=s.properties;let d=5===o?3:2;if("pubrel"===a&&(f=1),"number"!=typeof h)return e.emit("error",new Error("Invalid messageId")),!1;let m=null;if(5===o&&"object"==typeof c){if(m=j(e,c,n,d),!m)return!1;d+=m.length}return e.write(i.ACKS[a][f][u][0]),R(e,d),p(e,h),5===o&&e.write(r.from([l])),null!==m&&m.write(),!0}function M(t,e,n){h("subscribe: packet: ");const o=n?n.protocolVersion:4,s=t||{},a=s.dup?i.DUP_MASK:0,u=s.messageId,f=s.subscriptions,l=s.properties;let c=0;if("number"!=typeof u)return e.emit("error",new Error("Invalid messageId")),!1;c+=2;let d=null;if(5===o){if(d=D(e,l),!d)return!1;c+=d.length}if("object"!=typeof f||!f.length)return e.emit("error",new Error("Invalid subscriptions")),!1;for(let t=0;t2)return e.emit("error",new Error("Invalid subscriptions - invalid Retain Handling")),!1}c+=r.byteLength(i)+2+1}h("subscribe: writing to stream: %o",i.SUBSCRIBE_HEADER),e.write(i.SUBSCRIBE_HEADER[1][a?1:0][0]),R(e,c),p(e,u),null!==d&&d.write();let m=!0;for(const t of f){const n=t.topic,s=t.qos,a=+t.nl,h=+t.rap,u=t.rh;let f;C(e,n),f=i.SUBSCRIBE_OPTIONS_QOS[s],5===o&&(f|=a?i.SUBSCRIBE_OPTIONS_NL:0,f|=h?i.SUBSCRIBE_OPTIONS_RAP:0,f|=u?i.SUBSCRIBE_OPTIONS_RH[u]:0),m=e.write(r.from([f]))}return m}function S(t,e,n){const o=n?n.protocolVersion:4,s=t||{},a=s.messageId,h=s.granted,u=s.properties;let f=0;if("number"!=typeof a)return e.emit("error",new Error("Invalid messageId")),!1;if(f+=2,"object"!=typeof h||!h.length)return e.emit("error",new Error("Invalid qos vector")),!1;for(let t=0;tp===x,set(t){t?(u&&0!==Object.keys(u).length||(m=!0),p=x):(m=!1,p=N)}});const I={};function R(t,e){if(e>i.VARBYTEINT_MAX)return t.emit("error",new Error(`Invalid variable byte integer: ${e}`)),!1;let r=I[e];return r||(r=c(e),e<16384&&(I[e]=r)),h("writeVarByteInt: writing to stream: %o",r),t.write(r)}function C(t,e){const i=r.byteLength(e);return p(t,i),h("writeString: %s",e),t.write(e,"utf8")}function P(t,e,r){C(t,e),C(t,r)}function x(t,e){return h("writeNumberCached: number: %d",e),h("writeNumberCached: %o",u[e]),t.write(u[e])}function N(t,e){const r=f(e);return h("writeNumberGenerated: %o",r),t.write(r)}function B(t,e){const r=d(e);return h("write4ByteNumber: %o",r),t.write(r)}function L(t,e){"string"==typeof e?C(t,e):e?(p(t,e.length),t.write(e)):p(t,0)}function D(t,e){if("object"!=typeof e||null!=e.length)return{length:1,write(){q(t,{},0)}};let n=0;function o(e,n){let o=0;switch(i.propertiesTypes[e]){case"byte":if("boolean"!=typeof n)return t.emit("error",new Error(`Invalid ${e}: ${n}`)),!1;o+=2;break;case"int8":if("number"!=typeof n||n<0||n>255)return t.emit("error",new Error(`Invalid ${e}: ${n}`)),!1;o+=2;break;case"binary":if(n&&null===n)return t.emit("error",new Error(`Invalid ${e}: ${n}`)),!1;o+=1+r.byteLength(n)+2;break;case"int16":if("number"!=typeof n||n<0||n>65535)return t.emit("error",new Error(`Invalid ${e}: ${n}`)),!1;o+=3;break;case"int32":if("number"!=typeof n||n<0||n>4294967295)return t.emit("error",new Error(`Invalid ${e}: ${n}`)),!1;o+=5;break;case"var":if("number"!=typeof n||n<0||n>268435455)return t.emit("error",new Error(`Invalid ${e}: ${n}`)),!1;o+=1+r.byteLength(c(n));break;case"string":if("string"!=typeof n)return t.emit("error",new Error(`Invalid ${e}: ${n}`)),!1;o+=3+r.byteLength(n.toString());break;case"pair":if("object"!=typeof n)return t.emit("error",new Error(`Invalid ${e}: ${n}`)),!1;o+=Object.getOwnPropertyNames(n).reduce(((t,e)=>{const i=n[e];return Array.isArray(i)?t+=i.reduce(((t,i)=>t+=3+r.byteLength(e.toString())+2+r.byteLength(i.toString())),0):t+=3+r.byteLength(e.toString())+2+r.byteLength(n[e].toString()),t}),0);break;default:return t.emit("error",new Error(`Invalid property ${e}: ${n}`)),!1}return o}if(e)for(const t in e){let r=0,i=0;const s=e[t];if(Array.isArray(s))for(let e=0;eo;){const r=n.shift();if(!r||!e[r])return!1;delete e[r],s=D(t,e)}return s}function U(t,e,n){switch(i.propertiesTypes[e]){case"byte":t.write(r.from([i.properties[e]])),t.write(r.from([+n]));break;case"int8":t.write(r.from([i.properties[e]])),t.write(r.from([n]));break;case"binary":t.write(r.from([i.properties[e]])),L(t,n);break;case"int16":t.write(r.from([i.properties[e]])),p(t,n);break;case"int32":t.write(r.from([i.properties[e]])),B(t,n);break;case"var":t.write(r.from([i.properties[e]])),R(t,n);break;case"string":t.write(r.from([i.properties[e]])),C(t,n);break;case"pair":Object.getOwnPropertyNames(n).forEach((o=>{const s=n[o];Array.isArray(s)?s.forEach((n=>{t.write(r.from([i.properties[e]])),P(t,o.toString(),n.toString())})):(t.write(r.from([i.properties[e]])),P(t,o.toString(),s.toString()))}));break;default:return t.emit("error",new Error(`Invalid property ${e} value: ${n}`)),!1}}function q(t,e,r){R(t,r);for(const r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&null!==e[r]){const i=e[r];if(Array.isArray(i))for(let e=0;e100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return r*h;case"weeks":case"week":case"w":return r*a;case"days":case"day":case"d":return r*s;case"hours":case"hour":case"hrs":case"hr":case"h":return r*o;case"minutes":case"minute":case"mins":case"min":case"m":return r*n;case"seconds":case"second":case"secs":case"sec":case"s":return r*i;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function f(t){var e=Math.abs(t);return e>=s?Math.round(t/s)+"d":e>=o?Math.round(t/o)+"h":e>=n?Math.round(t/n)+"m":e>=i?Math.round(t/i)+"s":t+"ms"}function l(t){var e=Math.abs(t);return e>=s?c(t,e,s,"day"):e>=o?c(t,e,o,"hour"):e>=n?c(t,e,n,"minute"):e>=i?c(t,e,i,"second"):t+" ms"}function c(t,e,r,i){var n=e>=1.5*r;return Math.round(t/r)+" "+i+(n?"s":"")}e.exports=function(t,e){e=e||{};var r=typeof t;if("string"===r&&t.length>0)return u(t);if("number"===r&&isFinite(t))return e.long?l(t):f(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},{}],46:[function(t,e,r){const i=t("./lib/number-allocator.js");e.exports.NumberAllocator=i},{"./lib/number-allocator.js":47}],47:[function(t,e,r){const i=t("js-sdsl").Set,n=t("debug")("number-allocator:trace"),o=t("debug")("number-allocator:error");function s(t,e){this.low=t,this.high=e}function a(t,e){if(!(this instanceof a))return new a(t,e);this.min=t,this.max=e,this.ss=new i([],((t,e)=>t.compare(e))),n("Create"),this.clear()}s.prototype.equals=function(t){return this.low===t.low&&this.high===t.high},s.prototype.compare=function(t){return this.lowt)return!1;if(r.low===t)return++r.low,n("use():"+t),!0;if(r.high===t)return--r.high,n("use():"+t),!0;const i=r.low;return r.low=t+1,this.ss.insert(new s(i,t-1)),n("use():"+t),!0}return n("use():failed"),!1},a.prototype.free=function(t){if(tthis.max)return void o("free():"+t+" is out of range");const e=new s(t,t),r=this.ss.lowerBound(e);if(r){if(r.low<=t&&t<=r.high)return void o("free():"+t+" has already been vacant");if(r===this.ss.front())t+1===r.low?--r.low:this.ss.insert(e);else{const i=this.ss.reverseLowerBound(e);i.high+1===t?t+1===r.low?(this.ss.eraseElementByValue(i),r.low=i.low):i.high=t:t+1===r.low?r.low=t:this.ss.insert(e)}}else{if(r===this.ss.front())return void this.ss.insert(e);const i=this.ss.reverseLowerBound(e);i.high+1===t?i.high=t:this.ss.insert(e)}n("free():"+t)},a.prototype.clear=function(){n("clear()"),this.ss.clear(),this.ss.insert(new s(this.min,this.max))},a.prototype.intervalCount=function(){return this.ss.size()},a.prototype.dump=function(){console.log("length:"+this.ss.size());for(const t of this.ss)console.log(t)},e.exports=a},{debug:18,"js-sdsl":36}],48:[function(t,e,r){var i=t("wrappy");function n(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function o(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},r=t.name||"Function wrapped with `once`";return e.onceError=r+" shouldn't be called more than once",e.called=!1,e}e.exports=i(n),e.exports.strict=i(o),n.proto=n((function(){Object.defineProperty(Function.prototype,"once",{value:function(){return n(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return o(this)},configurable:!0})}))},{wrappy:79}],49:[function(t,e,r){(function(t){(function(){function r(e,r,i,n){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return t.nextTick(e);case 2:return t.nextTick((function(){e.call(null,r)}));case 3:return t.nextTick((function(){e.call(null,r,i)}));case 4:return t.nextTick((function(){e.call(null,r,i,n)}));default:for(o=new Array(a-1),s=0;s1)for(var r=1;r= 0x80 (not a basic code point)","invalid-input":"Invalid input"},M=f-l,S=Math.floor,E=String.fromCharCode;function k(t){throw new RangeError(_[t])}function A(t,e){for(var r=t.length,i=[];r--;)i[r]=e(t[r]);return i}function O(t,e){var r=t.split("@"),i="";return r.length>1&&(i=r[0]+"@",t=r[1]),i+A((t=t.replace(w,".")).split("."),e).join(".")}function T(t){for(var e,r,i=[],n=0,o=t.length;n=55296&&e<=56319&&n65535&&(e+=E((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=E(t)})).join("")}function R(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:f}function C(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function P(t,e,r){var i=0;for(t=r?S(t/p):t>>1,t+=S(t/e);t>M*c>>1;i+=f)t=S(t/M);return S(i+(M+1)*t/(t+d))}function x(t){var e,r,i,n,o,s,a,h,d,p,b=[],v=t.length,w=0,_=g,M=m;for((r=t.lastIndexOf(y))<0&&(r=0),i=0;i=128&&k("not-basic"),b.push(t.charCodeAt(i));for(n=r>0?r+1:0;n=v&&k("invalid-input"),((h=R(t.charCodeAt(n++)))>=f||h>S((u-w)/s))&&k("overflow"),w+=h*s,!(h<(d=a<=M?l:a>=M+c?c:a-M));a+=f)s>S(u/(p=f-d))&&k("overflow"),s*=p;M=P(w-o,e=b.length+1,0==o),S(w/e)>u-_&&k("overflow"),_+=S(w/e),w%=e,b.splice(w++,0,_)}return I(b)}function N(t){var e,r,i,n,o,s,a,h,d,p,b,v,w,_,M,A=[];for(v=(t=T(t)).length,e=g,r=0,o=m,s=0;s=e&&bS((u-r)/(w=i+1))&&k("overflow"),r+=(a-e)*w,e=a,s=0;su&&k("overflow"),b==e){for(h=r,d=f;!(h<(p=d<=o?l:d>=o+c?c:d-o));d+=f)M=h-p,_=f-p,A.push(E(C(p+M%_,0))),h=S(M/_);A.push(E(C(h,0))),o=P(r,w,i==n),r=0,++i}++r,++e}return A.join("")}function B(t){return O(t,(function(t){return b.test(t)?x(t.slice(4).toLowerCase()):t}))}function L(t){return O(t,(function(t){return v.test(t)?"xn--"+N(t):t}))}if(a={version:"1.4.1",ucs2:{decode:T,encode:I},decode:x,encode:N,toASCII:L,toUnicode:B},n&&o)if(e.exports==n)o.exports=a;else for(h in a)a.hasOwnProperty(h)&&(n[h]=a[h]);else i.punycode=a}(this)}).call(this)}).call(this,void 0!==Y?Y:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],52:[function(t,e,r){function i(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.exports=function(t,e,r,o){e=e||"&",r=r||"=";var s={};if("string"!=typeof t||0===t.length)return s;var a=/\+/g;t=t.split(e);var h=1e3;o&&"number"==typeof o.maxKeys&&(h=o.maxKeys);var u=t.length;h>0&&u>h&&(u=h);for(var f=0;f=0?(l=m.substr(0,g),c=m.substr(g+1)):(l=m,c=""),d=decodeURIComponent(l),p=decodeURIComponent(c),i(s,d)?n(s[d])?s[d].push(p):s[d]=[s[d],p]:s[d]=p}return s};var n=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)}},{}],53:[function(t,e,r){var i=function(t){switch(typeof t){case"string":return t;case"boolean":return t?"true":"false";case"number":return isFinite(t)?t:"";default:return""}};e.exports=function(t,e,r,a){return e=e||"&",r=r||"=",null===t&&(t=void 0),"object"==typeof t?o(s(t),(function(s){var a=encodeURIComponent(i(s))+r;return n(t[s])?o(t[s],(function(t){return a+encodeURIComponent(i(t))})).join(e):a+encodeURIComponent(i(t[s]))})).join(e):a?encodeURIComponent(i(a))+r+encodeURIComponent(i(t)):""};var n=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function o(t,e){if(t.map)return t.map(e);for(var r=[],i=0;i2?"one of ".concat(e," ").concat(t.slice(0,r-1).join(", "),", or ")+t[r-1]:2===r?"one of ".concat(e," ").concat(t[0]," or ").concat(t[1]):"of ".concat(e," ").concat(t[0])}return"of ".concat(e," ").concat(String(t))}function a(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function h(t,e,r){return(void 0===r||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function u(t,e,r){return"number"!=typeof r&&(r=0),!(r+e.length>t.length)&&-1!==t.indexOf(e,r)}o("ERR_INVALID_OPT_VALUE",(function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'}),TypeError),o("ERR_INVALID_ARG_TYPE",(function(t,e,r){var i,n;if("string"==typeof e&&a(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be",h(t," argument"))n="The ".concat(t," ").concat(i," ").concat(s(e,"type"));else{var o=u(t,".")?"property":"argument";n='The "'.concat(t,'" ').concat(o," ").concat(i," ").concat(s(e,"type"))}return n+=". Received type ".concat(typeof r)}),TypeError),o("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),o("ERR_METHOD_NOT_IMPLEMENTED",(function(t){return"The "+t+" method is not implemented"})),o("ERR_STREAM_PREMATURE_CLOSE","Premature close"),o("ERR_STREAM_DESTROYED",(function(t){return"Cannot call "+t+" after a stream was destroyed"})),o("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),o("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),o("ERR_STREAM_WRITE_AFTER_END","write after end"),o("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),o("ERR_UNKNOWN_ENCODING",(function(t){return"Unknown encoding: "+t}),TypeError),o("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.codes=n},{}],56:[function(t,e,r){(function(r){(function(){var i=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};e.exports=u;var n=t("./_stream_readable"),o=t("./_stream_writable");t("inherits")(u,n);for(var s=i(o.prototype),a=0;a0)if("string"==typeof e||s.objectMode||Object.getPrototypeOf(e)===a.prototype||(e=u(e)),i)s.endEmitted?E(t,new S):R(t,s,e,!0);else if(s.ended)E(t,new _);else{if(s.destroyed)return!1;s.reading=!1,s.decoder&&!r?(e=s.decoder.write(e),s.objectMode||0!==e.length?R(t,s,e,!1):j(t,s)):R(t,s,e,!1)}else i||(s.reading=!1,j(t,s));return!s.ended&&(s.length=P?t=P:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function N(t,e){return t<=0||0===e.length&&e.ended?0:e.objectMode?1:t!=t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=x(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}function B(t,e){if(l("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?L(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,D(t)))}}function L(t){var e=t._readableState;l("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(l("emitReadable",e.flowing),e.emittedReadable=!0,r.nextTick(D,t))}function D(t){var e=t._readableState;l("emitReadable_",e.destroyed,e.length,e.ended),e.destroyed||!e.length&&!e.ended||(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,V(t)}function j(t,e){e.readingMore||(e.readingMore=!0,r.nextTick(U,t,e))}function U(t,e){for(;!e.reading&&!e.ended&&(e.length0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function z(t){l("readable nexttick read 0"),t.read(0)}function H(t,e){e.resumeScheduled||(e.resumeScheduled=!0,r.nextTick(K,t,e))}function K(t,e){l("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),V(t),e.flowing&&!e.reading&&t.read(0)}function V(t){var e=t._readableState;for(l("flow",e.flowing);e.flowing&&null!==t.read(););}function G(t,e){return 0===e.length?null:(e.objectMode?r=e.buffer.shift():!t||t>=e.length?(r=e.decoder?e.buffer.join(""):1===e.buffer.length?e.buffer.first():e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r);var r}function W(t){var e=t._readableState;l("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,r.nextTick(Y,e,t))}function Y(t,e){if(l("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&0===t.length&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}function Z(t,e){for(var r=0,i=t.length;r=e.highWaterMark:e.length>0)||e.ended))return l("read: emitReadable",e.length,e.ended),0===e.length&&e.ended?W(this):L(this),null;if(0===(t=N(t,e))&&e.ended)return 0===e.length&&W(this),null;var i,n=e.needReadable;return l("need readable",n),(0===e.length||e.length-t0?G(t,e):null)?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),0===e.length&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&W(this)),null!==i&&this.emit("data",i),i},T.prototype._read=function(t){E(this,new M("_read()"))},T.prototype.pipe=function(t,e){var i=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=t;break;case 1:n.pipes=[n.pipes,t];break;default:n.pipes.push(t)}n.pipesCount+=1,l("pipe count=%d opts=%j",n.pipesCount,e);var s=e&&!1===e.end||t===r.stdout||t===r.stderr?y:h;function a(t,e){l("onunpipe"),t===i&&e&&!1===e.hasUnpiped&&(e.hasUnpiped=!0,c())}function h(){l("onend"),t.end()}n.endEmitted?r.nextTick(s):i.once("end",s),t.on("unpipe",a);var u=q(i);t.on("drain",u);var f=!1;function c(){l("cleanup"),t.removeListener("close",m),t.removeListener("finish",g),t.removeListener("drain",u),t.removeListener("error",p),t.removeListener("unpipe",a),i.removeListener("end",h),i.removeListener("end",y),i.removeListener("data",d),f=!0,!n.awaitDrain||t._writableState&&!t._writableState.needDrain||u()}function d(e){l("ondata");var r=t.write(e);l("dest.write",r),!1===r&&((1===n.pipesCount&&n.pipes===t||n.pipesCount>1&&-1!==Z(n.pipes,t))&&!f&&(l("false write response, pause",n.awaitDrain),n.awaitDrain++),i.pause())}function p(e){l("onerror",e),y(),t.removeListener("error",p),0===o(t,"error")&&E(t,e)}function m(){t.removeListener("finish",g),y()}function g(){l("onfinish"),t.removeListener("close",m),y()}function y(){l("unpipe"),i.unpipe(t)}return i.on("data",d),A(t,"error",p),t.once("close",m),t.once("finish",g),t.emit("pipe",i),n.flowing||(l("pipe resume"),i.resume()),t},T.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(0===e.pipesCount)return this;if(1===e.pipesCount)return t&&t!==e.pipes||(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r)),this;if(!t){var i=e.pipes,n=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var o=0;o0,!1!==n.flowing&&this.resume()):"readable"===t&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,l("on readable",n.length,n.reading),n.length?L(this):n.reading||r.nextTick(z,this))),i},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(t,e){var i=s.prototype.removeListener.call(this,t,e);return"readable"===t&&r.nextTick(F,this),i},T.prototype.removeAllListeners=function(t){var e=s.prototype.removeAllListeners.apply(this,arguments);return"readable"!==t&&void 0!==t||r.nextTick(F,this),e},T.prototype.resume=function(){var t=this._readableState;return t.flowing||(l("resume"),t.flowing=!t.readableListening,H(this,t)),t.paused=!1,this},T.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},T.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;for(var n in t.on("end",(function(){if(l("wrapped end"),r.decoder&&!r.ended){var t=r.decoder.end();t&&t.length&&e.push(t)}e.push(null)})),t.on("data",(function(n){l("wrapped data"),r.decoder&&(n=r.decoder.write(n)),r.objectMode&&null==n||(r.objectMode||n&&n.length)&&(e.push(n)||(i=!0,t.pause()))})),t)void 0===this[n]&&"function"==typeof t[n]&&(this[n]=function(e){return function(){return t[e].apply(t,arguments)}}(n));for(var o=0;o-1))throw new S(t);return this._writableState.defaultEncoding=t,this},Object.defineProperty(O.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(O.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),O.prototype._write=function(t,e,r){r(new y("_write()"))},O.prototype._writev=null,O.prototype.end=function(t,e,r){var i=this._writableState;return"function"==typeof t?(r=t,t=null,e=null):"function"==typeof e&&(r=e,e=null),null!=t&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||H(this,i,r),this},Object.defineProperty(O.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(O.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(t){this._writableState&&(this._writableState.destroyed=t)}}),O.prototype.destroy=d.destroy,O.prototype._undestroy=d.undestroy,O.prototype._destroy=function(t,e){e(t)}}).call(this)}).call(this,t("_process"),void 0!==Y?Y:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"../errors":55,"./_stream_duplex":56,"./internal/streams/destroy":63,"./internal/streams/state":67,"./internal/streams/stream":68,_process:50,buffer:17,inherits:24,"util-deprecate":78}],61:[function(t,e,r){(function(r){(function(){var i;function n(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var o=t("./end-of-stream"),s=Symbol("lastResolve"),a=Symbol("lastReject"),h=Symbol("error"),u=Symbol("ended"),f=Symbol("lastPromise"),l=Symbol("handlePromise"),c=Symbol("stream");function d(t,e){return{value:t,done:e}}function p(t){var e=t[s];if(null!==e){var r=t[c].read();null!==r&&(t[f]=null,t[s]=null,t[a]=null,e(d(r,!1)))}}function m(t){r.nextTick(p,t)}function g(t,e){return function(r,i){t.then((function(){e[u]?r(d(void 0,!0)):e[l](r,i)}),i)}}var y=Object.getPrototypeOf((function(){})),b=Object.setPrototypeOf((n(i={get stream(){return this[c]},next:function(){var t=this,e=this[h];if(null!==e)return Promise.reject(e);if(this[u])return Promise.resolve(d(void 0,!0));if(this[c].destroyed)return new Promise((function(e,i){r.nextTick((function(){t[h]?i(t[h]):e(d(void 0,!0))}))}));var i,n=this[f];if(n)i=new Promise(g(n,this));else{var o=this[c].read();if(null!==o)return Promise.resolve(d(o,!1));i=new Promise(this[l])}return this[f]=i,i}},Symbol.asyncIterator,(function(){return this})),n(i,"return",(function(){var t=this;return new Promise((function(e,r){t[c].destroy(null,(function(t){t?r(t):e(d(void 0,!0))}))}))})),i),y),v=function(t){var e,r=Object.create(b,(n(e={},c,{value:t,writable:!0}),n(e,s,{value:null,writable:!0}),n(e,a,{value:null,writable:!0}),n(e,h,{value:null,writable:!0}),n(e,u,{value:t._readableState.endEmitted,writable:!0}),n(e,l,{value:function(t,e){var i=r[c].read();i?(r[f]=null,r[s]=null,r[a]=null,t(d(i,!1))):(r[s]=t,r[a]=e)},writable:!0}),e));return r[f]=null,o(t,(function(t){if(t&&"ERR_STREAM_PREMATURE_CLOSE"!==t.code){var e=r[a];return null!==e&&(r[f]=null,r[s]=null,r[a]=null,e(t)),void(r[h]=t)}var i=r[s];null!==i&&(r[f]=null,r[s]=null,r[a]=null,i(d(void 0,!0))),r[u]=!0})),t.on("readable",m.bind(null,r)),r};e.exports=v}).call(this)}).call(this,t("_process"))},{"./end-of-stream":64,_process:50}],62:[function(t,e,r){function i(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,i)}return r}function n(t){for(var e=1;e0?this.tail.next=e:this.head=e,this.tail=e,++this.length}},{key:"unshift",value:function(t){var e={data:t,next:this.head};0===this.length&&(this.tail=e),this.head=e,++this.length}},{key:"shift",value:function(){if(0!==this.length){var t=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,t}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(t){if(0===this.length)return"";for(var e=this.head,r=""+e.data;e=e.next;)r+=t+e.data;return r}},{key:"concat",value:function(t){if(0===this.length)return u.alloc(0);for(var e=u.allocUnsafe(t>>>0),r=this.head,i=0;r;)c(r.data,e,i),i+=r.data.length,r=r.next;return e}},{key:"consume",value:function(t,e){var r;return tn.length?n.length:t;if(o===n.length?i+=n:i+=n.slice(0,t),0==(t-=o)){o===n.length?(++r,e.next?this.head=e.next:this.head=this.tail=null):(this.head=e,e.data=n.slice(o));break}++r}return this.length-=r,i}},{key:"_getBuffer",value:function(t){var e=u.allocUnsafe(t),r=this.head,i=1;for(r.data.copy(e),t-=r.data.length;r=r.next;){var n=r.data,o=t>n.length?n.length:t;if(n.copy(e,e.length-t,0,o),0==(t-=o)){o===n.length?(++i,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=n.slice(o));break}++i}return this.length-=i,e}},{key:l,value:function(t,e){return f(this,n({},e,{depth:0,customInspect:!1}))}}]),t}()},{buffer:17,util:16}],63:[function(t,e,r){(function(t){(function(){function r(e,r){var o=this,a=this._readableState&&this._readableState.destroyed,h=this._writableState&&this._writableState.destroyed;return a||h?(r?r(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,t.nextTick(s,this,e)):t.nextTick(s,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!r&&e?o._writableState?o._writableState.errorEmitted?t.nextTick(n,o):(o._writableState.errorEmitted=!0,t.nextTick(i,o,e)):t.nextTick(i,o,e):r?(t.nextTick(n,o),r(e)):t.nextTick(n,o)})),this)}function i(t,e){s(t,e),n(t)}function n(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function o(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function s(t,e){t.emit("error",e)}function a(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e)}e.exports={destroy:r,undestroy:o,errorOrDestroy:a}}).call(this)}).call(this,t("_process"))},{_process:50}],64:[function(t,e,r){var i=t("../../../errors").codes.ERR_STREAM_PREMATURE_CLOSE;function n(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),n=0;n0,(function(t){i||(i=t),t&&o.forEach(l),s||(o.forEach(l),n(i))}))}));return e.reduce(c)}e.exports=p},{"../../../errors":55,"./end-of-stream":64}],67:[function(t,e,r){var i=t("../../../errors").codes.ERR_INVALID_OPT_VALUE;function n(t,e,r){return null!=t.highWaterMark?t.highWaterMark:e?t[r]:null}function o(t,e,r,o){var s=n(e,o,r);if(null!=s){if(!isFinite(s)||Math.floor(s)!==s||s<0)throw new i(o?r:"highWaterMark",s);return Math.floor(s)}return t.objectMode?16:16384}e.exports={getHighWaterMark:o}},{"../../../errors":55}],68:[function(t,e,r){e.exports=t("events").EventEmitter},{events:22}],69:[function(t,e,r){(r=e.exports=t("./lib/_stream_readable.js")).Stream=r,r.Readable=r,r.Writable=t("./lib/_stream_writable.js"),r.Duplex=t("./lib/_stream_duplex.js"),r.Transform=t("./lib/_stream_transform.js"),r.PassThrough=t("./lib/_stream_passthrough.js"),r.finished=t("./lib/internal/streams/end-of-stream.js"),r.pipeline=t("./lib/internal/streams/pipeline.js")},{"./lib/_stream_duplex.js":56,"./lib/_stream_passthrough.js":57,"./lib/_stream_readable.js":58,"./lib/_stream_transform.js":59,"./lib/_stream_writable.js":60,"./lib/internal/streams/end-of-stream.js":64,"./lib/internal/streams/pipeline.js":66}],70:[function(t,e,r){function i(t,e,r){var i=this;this._callback=t,this._args=r,this._interval=setInterval(t,e,this._args),this.reschedule=function(t){t||(t=i._interval),i._interval&&clearInterval(i._interval),i._interval=setInterval(i._callback,t,i._args)},this.clear=function(){i._interval&&(clearInterval(i._interval),i._interval=void 0)},this.destroy=function(){i._interval&&clearInterval(i._interval),i._callback=void 0,i._interval=void 0,i._args=void 0}}function n(){if("function"!=typeof arguments[0])throw new Error("callback needed");if("number"!=typeof arguments[1])throw new Error("interval needed");var t;if(arguments.length>0){t=new Array(arguments.length-2);for(var e=0;e */ -var i=t("buffer"),n=i.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return n(t,e,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=i:(o(i,r),r.Buffer=s),s.prototype=Object.create(n.prototype),o(n,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return n(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var i=n(t);return void 0!==e?"string"==typeof r?i.fill(e,r):i.fill(e):i.fill(0),i},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i.SlowBuffer(t)}},{buffer:17}],74:[function(t,e,r){function i(t){var e=t._readableState;return e?e.objectMode||"number"==typeof t._duplexState?t.read():t.read(n(e)):null}function n(t){return t.buffer.length?t.buffer.head?t.buffer.head.data.length:t.buffer[0].length:t.length}e.exports=i},{}],75:[function(t,e,r){var i=t("safe-buffer").Buffer,n=i.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function s(t){var e=o(t);if("string"!=typeof e&&(i.isEncoding===n||!n(t)))throw new Error("Unknown encoding: "+t);return e||t}function a(t){var e;switch(this.encoding=s(t),this.encoding){case"utf16le":this.text=p,this.end=m,e=4;break;case"utf8":this.fillLast=l,e=4;break;case"base64":this.text=g,this.end=y,e=3;break;default:return this.write=b,void(this.end=v)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(e)}function h(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function u(t,e,r){var i=e.length-1;if(i=0?(n>0&&(t.lastNeed=n-1),n):--i=0?(n>0&&(t.lastNeed=n-2),n):--i=0?(n>0&&(2===n?n=0:t.lastNeed=n-3),n):0}function f(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}function l(t){var e=this.lastTotal-this.lastNeed,r=f(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function c(t,e){var r=u(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function d(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e}function p(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function m(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function g(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function y(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function b(t){return t.toString(this.encoding)}function v(t){return t&&t.length?this.write(t):""}r.StringDecoder=a,a.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r",'"',"`"," ","\r","\n","\t"]),f=["'"].concat(u),l=["%","/","?",";","#"].concat(f),c=["/","?","#"],d=255,p=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},b={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=t("querystring");function w(t,e,r){if(t&&n.isObject(t)&&t instanceof o)return t;var i=new o;return i.parse(t,e,r),i}function _(t){return n.isString(t)&&(t=w(t)),t instanceof o?t.format():o.prototype.format.call(t)}function M(t,e){return w(t,!1,!0).resolve(e)}function S(t,e){return t?w(t,!1,!0).resolveObject(e):e}o.prototype.parse=function(t,e,r){if(!n.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),a=-1!==o&&o127?B+="x":B+=N[L];if(!B.match(p)){var j=P.slice(0,I),U=P.slice(I+1),q=N.match(m);q&&(j.push(q[1]),U.unshift(q[2])),U.length&&(_="/"+U.join(".")+_),this.hostname=j.join(".");break}}}this.hostname.length>d?this.hostname="":this.hostname=this.hostname.toLowerCase(),C||(this.hostname=i.toASCII(this.hostname));var F=this.port?":"+this.port:"",z=this.hostname||"";this.host=z+F,this.href+=this.host,C&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==_[0]&&(_="/"+_))}if(!g[E])for(I=0,x=f.length;I0)&&r.host.split("@"))&&(r.auth=I.shift(),r.host=r.hostname=I.shift())),r.search=t.search,r.query=t.query,n.isNull(r.pathname)&&n.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!S.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var k=S.slice(-1)[0],A=(r.host||t.host||S.length>1)&&("."===k||".."===k)||""===k,O=0,T=S.length;T>=0;T--)"."===(k=S[T])?S.splice(T,1):".."===k?(S.splice(T,1),O++):O&&(S.splice(T,1),O--);if(!_&&!M)for(;O--;O)S.unshift("..");!_||""===S[0]||S[0]&&"/"===S[0].charAt(0)||S.unshift(""),A&&"/"!==S.join("/").substr(-1)&&S.push("");var I,R=""===S[0]||S[0]&&"/"===S[0].charAt(0);return E&&(r.hostname=r.host=R?"":S.length?S.shift():"",(I=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=I.shift(),r.host=r.hostname=I.shift())),(_=_||r.host&&S.length)&&!R&&S.unshift(""),S.length?r.pathname=S.join("/"):(r.pathname=null,r.path=null),n.isNull(r.pathname)&&n.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var t=this.host,e=a.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{"./util":77,punycode:51,querystring:54}],77:[function(t,e,r){e.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},{}],78:[function(t,e,r){(function(t){(function(){function r(t,e){if(i("noDeprecation"))return t;var r=!1;function n(){if(!r){if(i("throwDeprecation"))throw new Error(e);i("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}return n}function i(e){try{if(!t.localStorage)return!1}catch(t){return!1}var r=t.localStorage[e];return null!=r&&"true"===String(r).toLowerCase()}e.exports=r}).call(this)}).call(this,void 0!==Y?Y:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],79:[function(t,e,r){function i(t,e){if(t&&e)return i(t)(e);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){r[e]=t[e]})),r;function r(){for(var e=new Array(arguments.length),r=0;r0)for(var r=0,n=arguments.length;r1)r=e;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");i=this.head.next,r=this.head.value}for(var n=0;null!==i;n++)r=t(r,i.value,n),i=i.next;return r},i.prototype.reduceReverse=function(t,e){var r,i=this.tail;if(arguments.length>1)r=e;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");i=this.tail.prev,r=this.tail.value}for(var n=this.length-1;null!==i;n--)r=t(r,i.value,n),i=i.prev;return r},i.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;null!==r;e++)t[e]=r.value,r=r.next;return t},i.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;null!==r;e++)t[e]=r.value,r=r.prev;return t},i.prototype.slice=function(t,e){(e=e||this.length)<0&&(e+=this.length),(t=t||0)<0&&(t+=this.length);var r=new i;if(ethis.length&&(e=this.length);for(var n=0,o=this.head;null!==o&&nthis.length&&(e=this.length);for(var n=this.length,o=this.tail;null!==o&&n>e;n--)o=o.prev;for(;null!==o&&n>t;n--,o=o.prev)r.push(o.value);return r},i.prototype.splice=function(t,e,...r){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var i=0,o=this.head;null!==o&&i{_A[wA[t]]=t}));const MA={type:"error",data:"parser error"},SA="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),EA="function"==typeof ArrayBuffer,kA=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,AA=({type:t,data:e},r,i)=>SA&&e instanceof Blob?r?i(e):OA(e,i):EA&&(e instanceof ArrayBuffer||kA(e))?r?i(e):OA(new Blob([e]),i):i(wA[t]+(e||"")),OA=(t,e)=>{const r=new FileReader;return r.onload=function(){const t=r.result.split(",")[1];e("b"+(t||""))},r.readAsDataURL(t)};function TA(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let IA;const RA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",CA="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<64;t++)CA[RA.charCodeAt(t)]=t;const PA="function"==typeof ArrayBuffer,xA=(t,e)=>{if("string"!=typeof t)return{type:"message",data:BA(t,e)};const r=t.charAt(0);if("b"===r)return{type:"message",data:NA(t.substring(1),e)};return _A[r]?t.length>1?{type:_A[r],data:t.substring(1)}:{type:_A[r]}:MA},NA=(t,e)=>{if(PA){const r=(t=>{let e,r,i,n,o,s=.75*t.length,a=t.length,h=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);const u=new ArrayBuffer(s),f=new Uint8Array(u);for(e=0;e>4,f[h++]=(15&i)<<4|n>>2,f[h++]=(3&n)<<6|63&o;return u})(t);return BA(r,e)}return{base64:!0,data:t}},BA=(t,e)=>"blob"===e?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer,LA=String.fromCharCode(30);function DA(){return new TransformStream({transform(t,e){!function(t,e){SA&&t.data instanceof Blob?t.data.arrayBuffer().then(TA).then(e):EA&&(t.data instanceof ArrayBuffer||kA(t.data))?e(TA(t.data)):AA(t,!1,(t=>{IA||(IA=new TextEncoder),e(IA.encode(t))}))}(t,(r=>{const i=r.length;let n;if(i<126)n=new Uint8Array(1),new DataView(n.buffer).setUint8(0,i);else if(i<65536){n=new Uint8Array(3);const t=new DataView(n.buffer);t.setUint8(0,126),t.setUint16(1,i)}else{n=new Uint8Array(9);const t=new DataView(n.buffer);t.setUint8(0,127),t.setBigUint64(1,BigInt(i))}t.data&&"string"!=typeof t.data&&(n[0]|=128),e.enqueue(n),e.enqueue(r)}))}})}let jA;function UA(t){return t.reduce(((t,e)=>t+e.length),0)}function qA(t,e){if(t[0].length===e)return t.shift();const r=new Uint8Array(e);let i=0;for(let n=0;n(t.hasOwnProperty(r)&&(e[r]=t[r]),e)),{})}const KA=zA.setTimeout,VA=zA.clearTimeout;function GA(t,e){e.useNativeTimers?(t.setTimeoutFn=KA.bind(zA),t.clearTimeoutFn=VA.bind(zA)):(t.setTimeoutFn=zA.setTimeout.bind(zA),t.clearTimeoutFn=zA.clearTimeout.bind(zA))}class WA extends Error{constructor(t,e,r){super(t),this.description=e,this.context=r,this.type="TransportError"}}class YA extends FA{constructor(t){super(),this.writable=!1,GA(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,e,r){return super.emitReserved("error",new WA(t,e,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(t){"open"===this.readyState&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const e=xA(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,e={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(e)}_hostname(){const t=this.opts.hostname;return-1===t.indexOf(":")?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(t){const e=function(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}(t);return e.length?"?"+e:""}}const ZA="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),XA=64,QA={};let JA,$A=0,tO=0;function eO(t){let e="";do{e=ZA[t%XA]+e,t=Math.floor(t/XA)}while(t>0);return e}function rO(){const t=eO(+new Date);return t!==JA?($A=0,JA=t):t+"."+eO($A++)}for(;tO{var t;3===r.readyState&&(null===(t=this.opts.cookieJar)||void 0===t||t.parseCookies(r)),4===r.readyState&&(200===r.status||1223===r.status?this.onLoad():this.setTimeoutFn((()=>{this.onError("number"==typeof r.status?r.status:0)}),0))},r.send(this.data)}catch(t){return void this.setTimeoutFn((()=>{this.onError(t)}),0)}"undefined"!=typeof document&&(this.index=hO.requestsCount++,hO.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=sO,t)try{this.xhr.abort()}catch(t){}"undefined"!=typeof document&&delete hO.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(hO.requestsCount=0,hO.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",uO);else if("function"==typeof addEventListener){addEventListener("onpagehide"in zA?"pagehide":"unload",uO,!1)}function uO(){for(let t in hO.requests)hO.requests.hasOwnProperty(t)&&hO.requests[t].abort()}const fO="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,e)=>e(t,0),lO=zA.WebSocket||zA.MozWebSocket,cO="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();const dO={websocket:class extends YA{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),e=this.opts.protocols,r=cO?{}:HA(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=cO?new lO(t,e,r):e?new lO(t,e):new lO(t)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let e=0;e{try{this.ws.send(t)}catch(t){}i&&fO((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",e=this.query||{};return this.opts.timestampRequests&&(e[this.opts.timestampParam]=rO()),this.supportsBinary||(e.b64=1),this.createUri(t,e)}check(){return!!lO}},webtransport:class extends YA{get name(){return"webtransport"}doOpen(){"function"==typeof WebTransport&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then((()=>{this.onClose()})).catch((t=>{this.onError("webtransport error",t)})),this.transport.ready.then((()=>{this.transport.createBidirectionalStream().then((t=>{const e=function(t,e){jA||(jA=new TextDecoder);const r=[];let i=0,n=-1,o=!1;return new TransformStream({transform(s,a){for(r.push(s);;){if(0===i){if(UA(r)<1)break;const t=qA(r,1);o=128==(128&t[0]),n=127&t[0],i=n<126?3:126===n?1:2}else if(1===i){if(UA(r)<2)break;const t=qA(r,2);n=new DataView(t.buffer,t.byteOffset,t.length).getUint16(0),i=3}else if(2===i){if(UA(r)<8)break;const t=qA(r,8),e=new DataView(t.buffer,t.byteOffset,t.length),o=e.getUint32(0);if(o>Math.pow(2,21)-1){a.enqueue(MA);break}n=o*Math.pow(2,32)+e.getUint32(4),i=3}else{if(UA(r)t){a.enqueue(MA);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(e).getReader(),i=DA();i.readable.pipeTo(t.writable),this.writer=i.writable.getWriter();const n=()=>{r.read().then((({done:t,value:e})=>{t||(this.onPacket(e),n())})).catch((t=>{}))};n();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this.writer.write(o).then((()=>this.onOpen()))}))})))}write(t){this.writable=!1;for(let e=0;e{i&&fO((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){var t;null===(t=this.transport)||void 0===t||t.close()}},polling:class extends YA{constructor(t){if(super(t),this.polling=!1,"undefined"!=typeof location){const e="https:"===location.protocol;let r=location.port;r||(r=e?"443":"80"),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||r!==t.port}const e=t&&t.forceBase64;this.supportsBinary=aO&&!e,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const e=()=>{this.readyState="paused",t()};if(this.polling||!this.writable){let t=0;this.polling&&(t++,this.once("pollComplete",(function(){--t||e()}))),this.writable||(t++,this.once("drain",(function(){--t||e()})))}else e()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){((t,e)=>{const r=t.split(LA),i=[];for(let t=0;t{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(t)})),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};"open"===this.readyState?t():this.once("open",t)}write(t){this.writable=!1,((t,e)=>{const r=t.length,i=new Array(r);let n=0;t.forEach(((t,o)=>{AA(t,!1,(t=>{i[o]=t,++n===r&&e(i.join(LA))}))}))})(t,(t=>{this.doWrite(t,(()=>{this.writable=!0,this.emitReserved("drain")}))}))}uri(){const t=this.opts.secure?"https":"http",e=this.query||{};return!1!==this.opts.timestampRequests&&(e[this.opts.timestampParam]=rO()),this.supportsBinary||e.sid||(e.b64=1),this.createUri(t,e)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new hO(this.uri(),t)}doWrite(t,e){const r=this.request({method:"POST",data:t});r.on("success",e),r.on("error",((t,e)=>{this.onError("xhr post error",t,e)}))}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",((t,e)=>{this.onError("xhr poll error",t,e)})),this.pollXhr=t}}},pO=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,mO=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function gO(t){const e=t,r=t.indexOf("["),i=t.indexOf("]");-1!=r&&-1!=i&&(t=t.substring(0,r)+t.substring(r,i).replace(/:/g,";")+t.substring(i,t.length));let n=pO.exec(t||""),o={},s=14;for(;s--;)o[mO[s]]=n[s]||"";return-1!=r&&-1!=i&&(o.source=e,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=function(t,e){const r=/\/{2,9}/g,i=e.replace(r,"/").split("/");"/"!=e.slice(0,1)&&0!==e.length||i.splice(0,1);"/"==e.slice(-1)&&i.splice(i.length-1,1);return i}(0,o.path),o.queryKey=function(t,e){const r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(t,e,i){e&&(r[e]=i)})),r}(0,o.query),o}let yO=class t extends FA{constructor(t,e={}){super(),this.binaryType="arraybuffer",this.writeBuffer=[],t&&"object"==typeof t&&(e=t,t=null),t?(t=gO(t),e.hostname=t.host,e.secure="https"===t.protocol||"wss"===t.protocol,e.port=t.port,t.query&&(e.query=t.query)):e.host&&(e.hostname=gO(e.host).host),GA(this,e),this.secure=null!=e.secure?e.secure:"undefined"!=typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=e.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},e),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(t){let e={},r=t.split("&");for(let t=0,i=r.length;t{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const e=Object.assign({},this.opts.query);e.EIO=4,e.transport=t,this.id&&(e.sid=this.id);const r=Object.assign({},this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new dO[t](r)}open(){let e;if(this.opts.rememberUpgrade&&t.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(t){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(t=>this.onClose("transport close",t)))}probe(e){let r=this.createTransport(e),i=!1;t.priorWebsocketSuccess=!1;const n=()=>{i||(r.send([{type:"ping",data:"probe"}]),r.once("packet",(e=>{if(!i)if("pong"===e.type&&"probe"===e.data){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;t.priorWebsocketSuccess="websocket"===r.name,this.transport.pause((()=>{i||"closed"!==this.readyState&&(f(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())}))}else{const t=new Error("probe error");t.transport=r.name,this.emitReserved("upgradeError",t)}})))};function o(){i||(i=!0,f(),r.close(),r=null)}const s=t=>{const e=new Error("probe error: "+t);e.transport=r.name,o(),this.emitReserved("upgradeError",e)};function a(){s("transport closed")}function h(){s("socket closed")}function u(t){r&&t.name!==r.name&&o()}const f=()=>{r.removeListener("open",n),r.removeListener("error",s),r.removeListener("close",a),this.off("close",h),this.off("upgrading",u)};r.once("open",n),r.once("error",s),r.once("close",a),this.once("close",h),this.once("upgrading",u),-1!==this.upgrades.indexOf("webtransport")&&"webtransport"!==e?this.setTimeoutFn((()=>{i||r.open()}),200):r.open()}onOpen(){if(this.readyState="open",t.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade){let t=0;const e=this.upgrades.length;for(;t{this.onClose("ping timeout")}),this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let r=0;r=57344?r+=3:(i++,r+=4);return r}(e):Math.ceil(1.33*(e.byteLength||e.size))),r>0&&t>this.maxPayload)return this.writeBuffer.slice(0,r);t+=2}var e;return this.writeBuffer}write(t,e,r){return this.sendPacket("message",t,e,r),this}send(t,e,r){return this.sendPacket("message",t,e,r),this}sendPacket(t,e,r,i){if("function"==typeof e&&(i=e,e=void 0),"function"==typeof r&&(i=r,r=null),"closing"===this.readyState||"closed"===this.readyState)return;(r=r||{}).compress=!1!==r.compress;const n={type:t,data:e,options:r};this.emitReserved("packetCreate",n),this.writeBuffer.push(n),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},r=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?r():t()})):this.upgrading?r():t()),this}onError(e){t.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(t,e){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const e=[];let r=0;const i=t.length;for(;r"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,wO=Object.prototype.toString,_O="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===wO.call(Blob),MO="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===wO.call(File);function SO(t){return bO&&(t instanceof ArrayBuffer||vO(t))||_O&&t instanceof Blob||MO&&t instanceof File}function EO(t,e){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t)){for(let e=0,r=t.length;e=0&&t.num{delete this.acks[t];for(let e=0;e{this.io.clearTimeoutFn(n),e.apply(this,[null,...t])}}emitWithAck(t,...e){const r=void 0!==this.flags.timeout||void 0!==this._opts.ackTimeout;return new Promise(((i,n)=>{e.push(((t,e)=>r?t?n(t):i(e):i(t))),this.emit(t,...e)}))}_addToQueue(t){let e;"function"==typeof t[t.length-1]&&(e=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push(((t,...i)=>{if(r!==this._queue[0])return;return null!==t?r.tryCount>this._opts.retries&&(this._queue.shift(),e&&e(t)):(this._queue.shift(),e&&e(null,...i)),r.pending=!1,this._drainQueue()})),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||0===this._queue.length)return;const e=this._queue[0];e.pending&&!t||(e.pending=!0,e.tryCount++,this.flags=e.flags,this.emit.apply(this,e.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){"function"==typeof this.auth?this.auth((t=>{this._sendConnectPacket(t)})):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:RO.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,e){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case RO.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case RO.EVENT:case RO.BINARY_EVENT:this.onevent(t);break;case RO.ACK:case RO.BINARY_ACK:this.onack(t);break;case RO.DISCONNECT:this.ondisconnect();break;case RO.CONNECT_ERROR:this.destroy();const e=new Error(t.data.message);e.data=t.data.data,this.emitReserved("connect_error",e)}}onevent(t){const e=t.data||[];null!=t.id&&e.push(this.ack(t.id)),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const e=this._anyListeners.slice();for(const r of e)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&"string"==typeof t[t.length-1]&&(this._lastOffset=t[t.length-1])}ack(t){const e=this;let r=!1;return function(...i){r||(r=!0,e.packet({type:RO.ACK,id:t,data:i}))}}onack(t){const e=this.acks[t.id];"function"==typeof e&&(e.apply(this,t.data),delete this.acks[t.id])}onconnect(t,e){this.id=t,this.recovered=e&&this._pid===e,this._pid=e,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach((t=>this.emitEvent(t))),this.receiveBuffer=[],this.sendBuffer.forEach((t=>{this.notifyOutgoingListeners(t),this.packet(t)})),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach((t=>t())),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:RO.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const e=this._anyListeners;for(let r=0;r0&&t.jitter<=1?t.jitter:0,this.attempts=0}jO.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),r=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-r:t+r}return 0|Math.min(t,this.max)},jO.prototype.reset=function(){this.attempts=0},jO.prototype.setMin=function(t){this.ms=t},jO.prototype.setMax=function(t){this.max=t},jO.prototype.setJitter=function(t){this.jitter=t};class UO extends FA{constructor(t,e){var r;super(),this.nsps={},this.subs=[],t&&"object"==typeof t&&(e=t,t=void 0),(e=e||{}).path=e.path||"/socket.io",this.opts=e,GA(this,e),this.reconnection(!1!==e.reconnection),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(r=e.randomizationFactor)&&void 0!==r?r:.5),this.backoff=new jO({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this._readyState="closed",this.uri=t;const i=e.parser||NO;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=!1!==e.autoConnect,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return void 0===t?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var e;return void 0===t?this._reconnectionDelay:(this._reconnectionDelay=t,null===(e=this.backoff)||void 0===e||e.setMin(t),this)}randomizationFactor(t){var e;return void 0===t?this._randomizationFactor:(this._randomizationFactor=t,null===(e=this.backoff)||void 0===e||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return void 0===t?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,null===(e=this.backoff)||void 0===e||e.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new yO(this.uri,this.opts);const e=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=BO(e,"open",(function(){r.onopen(),t&&t()})),n=e=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",e),t?t(e):this.maybeReconnectOnOpen()},o=BO(e,"error",n);if(!1!==this._timeout){const t=this._timeout,r=this.setTimeoutFn((()=>{i(),n(new Error("timeout")),e.close()}),t);this.opts.autoUnref&&r.unref(),this.subs.push((()=>{this.clearTimeoutFn(r)}))}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(BO(t,"ping",this.onping.bind(this)),BO(t,"data",this.ondata.bind(this)),BO(t,"error",this.onerror.bind(this)),BO(t,"close",this.onclose.bind(this)),BO(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}}ondecoded(t){fO((()=>{this.emitReserved("packet",t)}),this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,e){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new DO(this,t,e),this.nsps[t]=r),r}_destroy(t){const e=Object.keys(this.nsps);for(const t of e){if(this.nsps[t].active)return}this._close()}_packet(t){const e=this.encoder.encode(t);for(let r=0;rt())),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,e){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,e),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const e=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn((()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect||t.open((e=>{e?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",e)):t.onreconnect()})))}),e);this.opts.autoUnref&&r.unref(),this.subs.push((()=>{this.clearTimeoutFn(r)}))}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const qO={};function FO(t,e){"object"==typeof t&&(e=t,t=void 0);const r=function(t,e="",r){let i=t;r=r||"undefined"!=typeof location&&location,null==t&&(t=r.protocol+"//"+r.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?r.protocol+t:r.host+t),/^(https?|wss?):\/\//.test(t)||(t=void 0!==r?r.protocol+"//"+t:"https://"+t),i=gO(t)),i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443")),i.path=i.path||"/";const n=-1!==i.host.indexOf(":")?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+n+":"+i.port+e,i.href=i.protocol+"://"+n+(r&&r.port===i.port?"":":"+i.port),i}(t,(e=e||{}).path||"/socket.io"),i=r.source,n=r.id,o=r.path,s=qO[n]&&o in qO[n].nsps;let a;return e.forceNew||e["force new connection"]||!1===e.multiplex||s?a=new UO(i,e):(qO[n]||(qO[n]=new UO(i,e)),a=qO[n]),r.query&&!e.query&&(e.query=r.queryKey),a.socket(r.path,e)}Object.assign(FO,{Manager:UO,Socket:DO,io:FO,connect:FO});class zO{constructor(t,e){this.method="GET",this.protocol="HTTPS",this.body=null,this.interval=0,this.timeout=1e4,this.responseType="",this.filteredData=null,this.XHR=void 0,this.isInterval=!1,this.successCallback=void 0,this.errorCallback=void 0,this.statusCallback=void 0,this.onTimeout=()=>{this.XHR&&(this.onErrorCallback(new Error("Error: timeout")),this.circulateRequest())},this.onLoad=()=>{if(this.XHR){if(this.responseData=this.toObject(this.XHR.response),4!==this.XHR.readyState||200!=this.XHR.status&&304!=this.XHR.status)this.onErrorCallback(new Error(this.XHR.statusText));else{try{this.filteredData=this.filter?this.filter(this.responseData):this.responseData}catch(t){this.filteredData=void 0,console.error(t)}this.onSuccessCallback(this.responseData,this.filteredData)}this.circulateRequest()}},this.onError=()=>{this.XHR&&this.onErrorCallback(new Error(this.XHR.statusText))},this.url=t,e&&(this.option=e,this.method=e.method?e.method.toUpperCase():"GET",this.protocol=e.protocol?e.protocol.toUpperCase():"HTTPS",this.headers=e.headers?e.headers:void 0,this.params=e.params?e.params:void 0,this.body=e.body?e.body:null,this.interval=void 0!==e.interval?e.interval:0,this.timeout=e.timeout?e.timeout:1e4,this.responseType=void 0!==e.responseType?e.responseType:"",e.filter&&(this.filter="function"==typeof e.filter?e.filter:new Function("response",e.filter)))}get getUrl(){return this.url}get getOption(){return Object.assign(Object.assign({},this.option),{url:this.url})}get getStatus(){var t;return null===(t=this.XHR)||void 0===t?void 0:t.status}get getRequesting(){return this.isInterval&&0!==this.interval}get getResponseData(){return this.responseData}get getFilterData(){return this.filteredData}send(){this.isInterval=!0,this.request()}abort(){this.isInterval=!1}onceSend(){this.request()}listen(t,e){this.successCallback=t,e&&(this.errorCallback=e)}on(t,e){switch(t){case"onSuccess":this.successCallback=e;break;case"onError":this.errorCallback=e;break;case"onStatus":this.statusCallback=e}}onStatusCallback(t,e){this.statusCallback&&this.statusCallback(t,e)}onErrorCallback(t){this.errorCallback&&this.errorCallback(t),this.onStatusCallback("error",t)}onSuccessCallback(t,e){this.successCallback&&this.successCallback(t,e),this.onStatusCallback("success")}request(){try{if(this.onStatusCallback("connect"),this.XHR||(this.XHR=new XMLHttpRequest),this.XHR.open(this.method,this.paramsUrl()),this.XHR.responseType=this.responseType,this.XHR.timeout=this.timeout,this.XHR.onload=this.onLoad,this.XHR.onerror=this.onError,this.XHR.ontimeout=this.onTimeout,this.headers)for(const t in this.headers)Object.prototype.hasOwnProperty.call(this.headers,t)&&"multipart/form-data"!==this.headers[t]&&this.XHR.setRequestHeader(t,this.headers[t]);this.XHR.send(this.body)}catch(t){console.error(t),this.onErrorCallback(t)}}circulateRequest(){if(this.getRequesting){const t=setTimeout((()=>{this.request(),clearTimeout(t)}),this.interval)}else this.isInterval&&(this.isInterval=!1)}paramsUrl(){let t=this.url+"?";if(this.params)for(const e in this.params)Object.prototype.hasOwnProperty.call(this.params,e)&&(t+=encodeURIComponent(e)+"="+encodeURIComponent(this.params[e])+"&");return t.slice(0,-1)}toObject(t){if("string"!=typeof t)return t;try{return JSON.parse(t)}catch(e){return t}}}var HO,KO,VO,GO,WO,YO,ZO,XO,QO,JO,$O,tT,eT,rT,iT,nT,oT,sT,aT,hT,uT;function fT(t){const e=typeof t;return null!=t&&("object"===e||"function"===e)}function lT(t){let e=t.protocolValue+t.url;return t.port&&(e+=":"+t.port),e}function cT(t,e,r=!1,i,n,o){try{if(!e)return t;let n="";r&&fT(t)&&(n=`const { ${Object.keys(t).join(",")} } = response;`);const a=new Function("response",n+e)(t),h=i?function(t){return"number"==typeof t}(s=a)?`${s}`:fT(s)?JSON.stringify(s,null,2):s:a;return o&&o(h),h}catch(t){return n&&n(t),t}var s}function dT(t,e){if(t.protocol!==KO.HTTP)return;const r=t.configureJson,i=function(t,e){switch(e){case YO.SECOND:return 1e3*t;case YO.MINUTE:return 1e3*t*60;case YO.HOUR:return 1e3*t*60*60;case YO.DAY:return 1e3*t*60*60*24;default:return 1e3*t}}(r.interval,r.unit),n=Object.assign(e[HO.HEADERS],t[HO.HEADERS]);let o=null;const s=r.params,a=new FormData;switch(a.set("default","defaultData"),r.bodyType){case GO.NONE:break;case GO.JSON:n["Content-Type"]=ZO.JSON,o=r.body.json;break;case GO.XML:n["Content-Type"]=ZO.XML,o=r.body.xml;break;case GO.X_WWW_FORM_URLENCODED:n["Content-Type"]=ZO.FORM_URLENCODED;o=function(t){const e=new URLSearchParams;for(const r in t)Object.prototype.hasOwnProperty.call(t,"key")&&e.append(r,t[r]);return e.toString()}(r.body["x-www-form-urlencoded"]);break;case GO.FORM_DATA:{n["Content-Type"]=ZO.FORM_DATA;const t=r.body["form-data"];for(const e in t)a.set(e,t[e]);o=a;break}}return{params:s,headers:n,interval:i,body:o,method:r.method,filter:r.filter,protocol:e.protocol}}function pT(t,e,r,i){const n=(t,e)=>{r({status:t,message:e})};e.on("reconnect",(()=>{n(XO.CONNECT)})),e.on("close",(t=>{const e=t||new Error("连接关闭");n(XO.CLOSE,e)})),e.on("error",(t=>{n(XO.ERROR,t)})),e.on("message",((r,n,o)=>{i({api:t,client:e,data:{topic:r,payload:n,packet:o}})})),e.on("connect",(r=>{if(0===r.returnCode)n(XO.SUCCESS,r),function(t,e){const r=t.configureJson,i=r.subscription;if(0==i.length)return;const n={};i.forEach((t=>{t.topic&&(n[t.topic]={qos:t.qos})})),Object.keys(n).length>0&&e.subscribe(n,(t=>{t&&console.error(t)}))}(t,e);else{const t=void 0!==r.returnCode?String(r.returnCode):r.cmd;e.emit("close",new Error(t))}}))}function mT(t,e,r,i){const n=lT(e),o=function(t){if(t.protocol!==KO.MQTT)return;const e=t.configureJson,{baseConfig:r,willMessage:i}=e,n={clientId:r.clientId,keepalive:r.keepAlive,protocolVersion:Number(r.version),protocolId:"MQTT",reconnectPeriod:0};return i&&i.topic&&(n.will={topic:i.topic,payload:i.message||"",qos:i.qos,retain:i.retain}),r.username&&(n.username=r.username),r.password&&(n.password=r.password),n}(t),s=vA.connect(n+(t.url||""),o),a=t.configureJson,{successCallback:h,errorCallback:u}=a;return pT(t,s,(({status:e,message:i})=>{const n=e!==XO.CONNECT?i:void 0;r({api:t,client:s,status:e,message:n}),e===XO.CONNECT&&h?cT({connect:i,client:s},h,!0):e!==XO.ERROR&&e!==XO.CLOSE||!u||cT({error:i,client:s},u,!0)}),i),s}function gT(t,e,r,i){let n=lT(e);const o=function(t,e){if(t.protocol!==KO.WEBSOCKET)return;const r=t.configureJson,i=Object.assign(e[HO.HEADERS],t[HO.HEADERS]),{subProtocols:n,query:o}=r,s=n?n.split(","):["websocket","polling"];return{reconnection:!1,reconnectionAttempts:0,path:t.url,query:o,transports:s,extraHeaders:i,withCredentials:!0}}(t,e),s=t.configureJson,{successCallback:a,errorCallback:h,nameSpace:u}=s;u&&(n+=(/^\/.*/.test(u)?"":"/")+u);const f=FO(n,o);return function(t,e,r,i){const n=t.configureJson,{eventList:o}=n;e.on("connect",(()=>{r(XO.SUCCESS)})),e.on("disconnect",(t=>{r(XO.CLOSE,new Error(t))})),e.on("connect_error",(t=>{r(XO.ERROR,t)})),e.on("reconnect",(()=>{r(XO.CONNECT)})),e.on("reconnect_error",(t=>{r(XO.ERROR,t)})),e.on("reconnect_failed",(t=>{r(XO.ERROR,t||new Error("reconnect_failed"))}));for(let r=0;r{i({api:t,client:e,data:{message:r,event:n.event}})}))}}(t,f,((e,i)=>{r({status:e,api:t,client:f,message:i}),e===XO.SUCCESS&&a?cT({socket:f},a,!0):e!==XO.ERROR&&e!==XO.CLOSE||!h||cT({error:i,socket:f},h,!0)}),i),f.connect(),f}!function(t){t.PARAMS="params",t.BODY="body",t.HEADERS="headers"}(HO||(HO={})),function(t){t.HTTP="HTTP",t.MQTT="MQTT",t.WEBSOCKET="WebSocket"}(KO||(KO={})),function(t){t.HTTPS="https://",t.HTTP="http://",t.MQTTS="wss://",t.MQTT="ws://",t.WSS="wss://",t.WS="ws://"}(VO||(VO={})),function(t){t.NONE="none",t.FORM_DATA="form-data",t.X_WWW_FORM_URLENCODED="x-www-form-urlencoded",t.JSON="json",t.XML="xml"}(GO||(GO={})),function(t){t.GET="GET",t.POST="POST",t.PATCH="PATCH",t.PUT="PUT",t.OPTIONS="OPTIONS",t.DELETE="DELETE"}(WO||(WO={})),function(t){t.SECOND="second",t.MINUTE="minute",t.HOUR="hour",t.DAY="day"}(YO||(YO={})),KO.HTTP,KO.HTTP,KO.MQTT,KO.MQTT,KO.WEBSOCKET,KO.WEBSOCKET,function(t){t.JSON="application/json;charset=UTF-8",t.TEXT="text/plain;charset=UTF-8",t.XML="application/xml;charset=UTF-8",t.FORM_URLENCODED="application/x-www-form-urlencoded;charset=UTF-8",t.FORM_DATA="multipart/form-data"}(ZO||(ZO={})),function(t){t.SUCCESS="success",t.ERROR="error",t.CONNECT="connect",t.CLOSE="close"}(XO||(XO={}));class yT{constructor(t,e){this.sourceEnv=t,this.sourceApi=e,QO.add(this),JO.set(this,{}),$O.set(this,void 0),tT.set(this,void 0),D(this,QO,"m",eT).call(this)}on(t,e){"onStatus"===t?j(this,$O,e,"f"):"onMessage"===t&&j(this,tT,e,"f")}getClientById(t){return D(this,JO,"f")[t]}requestAll(){const t=this.sourceApi;t&&t.length>0&&D(this,QO,"m",oT).call(this,t)}requestById(t){const e=this.sourceApi.filter((e=>t.some((t=>t===e.id))));e&&e.length>0&&D(this,QO,"m",oT).call(this,e)}closeAll(){for(const t in D(this,JO,"f"))if(Object.prototype.hasOwnProperty.call(D(this,JO,"f"),t)){const e=D(this,JO,"f")[t];D(this,QO,"m",nT).call(this,e)}}closeById(t){for(let e=0;e0&&i)switch(r.protocol){case KO.HTTP:D(this,QO,"m",sT).call(this,r,i);break;case KO.MQTT:D(this,QO,"m",aT).call(this,r,i);break;case KO.WEBSOCKET:D(this,QO,"m",hT).call(this,r,i)}}},sT=function(t,e){let r=D(this,JO,"f")[t.id];if(r)return r.send();r=function(t,e,r,i){const n=lT(e),o=dT(t,e),s=new zO(n+t.url,o);return s.on("onSuccess",((e,r)=>{i({api:t,client:s,data:r||e})})),s.on("onError",(e=>{i({api:t,client:s,data:e})})),s.on("onStatus",((e,i)=>{r({api:t,client:s,status:e,message:i})})),s.send(),s}(t,e,D(this,QO,"m",rT).bind(this),D(this,QO,"m",iT).bind(this)),D(this,JO,"f")[t.id]=r},aT=function(t,e){let r=D(this,JO,"f")[t.id];if(r)return r.reconnect();r=mT(t,e,D(this,QO,"m",rT).bind(this),D(this,QO,"m",iT).bind(this)),D(this,JO,"f")[t.id]=r},hT=function(t,e){let r=D(this,JO,"f")[t.id];if(r)return r.connect();r=gT(t,e,D(this,QO,"m",rT).bind(this),D(this,QO,"m",iT).bind(this)),D(this,JO,"f")[t.id]=r},uT=function(t){return this.sourceEnv.find((e=>e.id===t))};const bT=(t,e)=>e.filter((e=>e.nodeId===t&&"PANEL"===e.contentType)),vT=t=>{try{return JSON.parse(t)}catch(t){return null}};var wT,_T,MT,ST,ET,kT,AT,OT,TT,IT,RT,CT,PT,xT,NT,BT,LT,DT,jT,UT,qT,FT,zT,HT,KT,VT,GT;class WT{constructor(t,e,r,i){this.treeList=t,this.poiList=e,this.plugin=r,this.cpsPlugin=i,wT.add(this),_T.set(this,{}),D(this,wT,"m",MT).call(this)}batchPoi(t,e){t.nodeArray&&0!==t.nodeArray.length&&("HTTP"===t.protocol?D(this,wT,"m",kT).call(this,t.nodeArray,e):"MQTT"===t.protocol?D(this,wT,"m",ST).call(this,t.nodeArray,e):"WebSocket"===t.protocol&&D(this,wT,"m",ET).call(this,t.nodeArray,e))}}_T=new WeakMap,wT=new WeakSet,MT=function(){if(this.treeList){const t=(t=>{const e=[],r={},i=(t,e)=>{for(const n of t){const{id:t,pid:o,familyId:s,name:a,renderType:h,path:u,children:f,deviceCode:l}=n,c=Object.assign(Object.assign({},n),{id:t,pid:o,familyId:s,name:a,renderType:h,path:u,children:[],deviceCode:l});e.push(c),r[t]=c,f.length>0&&i(f,c.children)}};return i(t,e),{treeNodes:e,flatNodes:r}})(this.treeList);j(this,_T,t.flatNodes,"f")}},ST=function(t,e){const{payload:r,topic:i}=e,n=vT(r.toString()),o=null==t?void 0:t.filter((t=>{var e;return null===(e=t.eventList)||void 0===e?void 0:e.some((t=>((t,e)=>{if(t===e)return!0;const r=t.split("/"),i=e.split("/"),n=r.indexOf("#"),o=r.indexOf("+");if(-1!==n){if(-1!==o&&o"+"===t||t===i[e]||void 0));{const r=t.indexOf("#");if(t.slice(0,r)===e.slice(0,r))return!0}}else if(-1!==o&&r.length===i.length)return r.every(((t,e)=>"+"===t||t===i[e]||void 0));return!1})(t,i)))}));o&&D(this,wT,"m",kT).call(this,o,n)},ET=function(t,e){const{event:r,message:i}=e,n=t.filter((t=>{var e;return null===(e=t.eventList)||void 0===e?void 0:e.some((t=>t===r))}));n&&D(this,wT,"m",kT).call(this,n,i)},kT=function(t,e){if(!this.poiList)return;const r=[];for(let i=0;i{if(t.contentData){const e=t.contentData.ds_user["接口数据"];if(!e)return;for(const t in s)if(Object.prototype.hasOwnProperty.call(s,t)){const r=s[t];e.hasOwnProperty(t)&&(e[t].value=r)}}})),r.push(...o))}r.length>0&&D(this,wT,"m",OT).call(this,r)},AT=function(t,e,r){const i=D(this,_T,"f")[r],n=null==i?void 0:i.deviceCode;if(i&&n)return"[object Array]"===Object.prototype.toString.call(t)?t.find((t=>String(t[e])===n)):"[object Object]"===Object.prototype.toString.call(t)?t:void 0},OT=function(t){this.plugin&&this.plugin.batchRender({dataSource:t.map(this.cpsPlugin.formatPoiData)})};class YT{get path(){return D(this,IT,"f")}set path(t){D(this,IT,"f")!==t&&j(this,RT,!0,"f"),j(this,IT,t,"f")}constructor(t,e){this.ssp=t,TT.add(this),IT.set(this,""),RT.set(this,!0),this.sceneGroup=null,this.metaData=null,this.treeData=null,this.poiData=null,this.dataSourceData=null,this.topologyData=null,this.propertiesData=null,this.objectsAnimations=new Map,this.animationsData=null,this.modelVisionsData=null,this.effectPlugin=null,this.soonflow=new class{nodeTypeMethods;outInstances;constructor(t,e){this.nodeTypeMethods=t,this.outInstances=e}async parseFlow(t,e){return new Ct(t,e,this.nodeTypeMethods,this.outInstances).runParse()}unregisterFlow(t,e){new Pt(t,e,this.nodeTypeMethods,this.outInstances)}}(Hi,{ssp:this.ssp,cpsManager:this}),this.flowData=null,CT.set(this,iA),PT.set(this,new uA(this.ssp.viewport)),xT.set(this,!1),NT.set(this,!1),BT.set(this,!1),this.formatPoiData=t=>{const{dimensional:e,poiId:r,media:i,display:n,scale:o,x:s,y:a,z:h,rotationX:u,rotationY:f,rotationZ:l,width:c,height:d,nodeId:p,contentType:m,style:g,contentData:y}=t;return{id:r,pid:p,visible:n,width:c,height:d,type:e,contentType:m,position:{x:s,y:a,z:h},rotation:{x:Math.PI/180*u,y:Math.PI/180*f,z:Math.PI/180*l},scale:{x:o/100,y:o/100,z:o/100},style:g,dataSource:(b=y,null==b?[]:zk(b,((t,e)=>zk(t,((t,r)=>zk(t,((t,i)=>({index:t.index,value:t.value||"",group:r,key:i,label:t.label||i,customId:[e,r,i].join("/"),dataOrigin:e})))),2)))),fileUrl:(null==i?void 0:i.assetId)||(null==i?void 0:i.fileId)?(null==i?void 0:i.url)?D(this,TT,"m",zT).call(this,i.url):void 0:null==i?void 0:i.url};var b},(null==e?void 0:e.key)&&this.setKey(e.key),(null==e?void 0:e.path)&&this.setPath(e.path)}setKey(t){t!==cA(D(this,CT,"f").debugKey)&&(D(this,CT,"f").key=t)}async fetchMetaData(){const t=await D(this,TT,"m",HT).call(this,Hk);return this.metaData=t,t}async fetchTreeData(){const t=await D(this,TT,"m",HT).call(this,Vk);return this.treeData=t,t}async fetchPoiData(){const t=await D(this,TT,"m",HT).call(this,Gk);return this.poiData=t.map((t=>Object.assign(Object.assign({},t),{contentData:JSON.parse(t.content||"{}")}))),this.poiData}async fetchDataSourceData(){const t=await D(this,TT,"m",HT).call(this,Wk);return this.dataSourceData=t,t}async fetchTopologyData(){const t=await D(this,TT,"m",HT).call(this,Yk).then((t=>{const e={linkWidth:.1,linkColor:["#00ff00"],nodeRadius:.05,nodeColor:"#0000ff"};return t.map((t=>{const r=Object.assign(Object.assign({},e),t);return r.imgUrl&&(r.imgUrl=`${this.path}${r.imgUrl}`),r}))}));return this.topologyData=t,t}async fetchPropertiesData(){const t=await D(this,TT,"m",HT).call(this,Zk).then((t=>dA(t,"modelId")));return this.propertiesData=t,t}async fetchAnimationsData(){const t=await D(this,TT,"m",HT).call(this,Xk).then((t=>dA(t,"modelId")));return this.animationsData=t,t}async fetchModelVisionsData(){const t=await D(this,TT,"m",HT).call(this,Qk).then((t=>new Map(Object.entries(t))));return this.modelVisionsData=t,t}async loadPoi(t=!1){var e,r;const i=this.ssp.getPlugin($k)||this.ssp.registerPlugin(W,$k);try{await this.fetchPoiData(),i.batchRender({dataSource:null!==(r=null===(e=this.poiData)||void 0===e?void 0:e.map(this.formatPoiData))&&void 0!==r?r:[]}),t&&this.refreshPoiByDataSource()}catch(t){}}async refreshPoiByDataSource(){const t=this.ssp.getPlugin($k)||this.ssp.registerPlugin(W,$k);try{const{dataSources:e,dataSourceApis:r}=await this.fetchDataSourceData(),i=new WT(this.treeData,this.poiData,t,this);if(e&&r){const t=new yT(e,r);t.requestAll(),t.on("onMessage",(({api:t,data:e})=>{i.batchPoi(t,e)}))}}catch(t){}}getTreeNodeById(t,e=this.treeData){if(!e)return;const r=e.find((e=>e.id===t));if(r)return r;for(let r=0;r=1.2&&D(this,RT,"f")){if(await D(this,TT,"m",LT).call(this),!D(this,xT,"f")&&!D(this,NT,"f"))return Promise.reject(`未授权的场景包:${this.path}`);!D(this,xT,"f")&&D(this,NT,"f")&&(D(this,BT,"f")||D(this,PT,"f").addToViewport()),j(this,RT,!1,"f")}else i<1.2&&(this.treeData=await this.fetchTreeData());const n=Object.assign({syncProperties:!0,syncModelVisions:!0,needsModelsBoundsTree:!0,applyPresetEffects:!1,loadSceneAlgorithm:rA.DFS,loadLevel:1/0,loadPoi:!1,refreshPoiByDataSource:!1,loadFlowData:!1,objectPrefixId:"",asId:"id"},t);this.sceneGroup||(this.sceneGroup=this.ssp.createGroup(Object.assign({name:"root",id:this.path},n.sceneGroupInfo)));const o=[];n.syncProperties&&o.push(this.fetchPropertiesData()),n.syncModelVisions&&o.push(this.fetchModelVisionsData()),await Promise.allSettled(o),n.loadSceneAlgorithm===rA.BFS?await D(this,TT,"m",GT).call(this,n):n.loadSceneAlgorithm===rA.DFS&&await D(this,TT,"m",VT).call(this,n),this.ssp.updateAllDecalGeometry({snapping:!0,snappingDistance:1,uvMap:0});const s=[];n.applyPresetEffects&&s.push(this.presetEffects()),n.loadPoi&&s.push(this.loadPoi(n.refreshPoiByDataSource)),n.loadFlowData&&s.push(this.loadFlowData()),await Promise.allSettled(s),n.needsModelsBoundsTree&&this.ssp.computeModelsBoundsTree()}async presetEffects(t={}){var e,r,i,n,o,s,a;const{hdr:h=!0,ssao:u=!0,directionalLightShadow:c=!0,toneMappping:d=!0}=t;await this.ssp.render();const{environment:p,previewSettings:m}=await this.fetchMetaData(),g=null!==(e=vT(null!=m?m:""))&&void 0!==e?e:{};if(h&&p&&"default"!==(null===(r=g.environment)||void 0===r?void 0:r.HDR)&&this.ssp.setEnvironment({file:`${this.path}${p}`,background:null===(i=g.environment)||void 0===i?void 0:i.background}),u&&this.ssp.setSSAO(Object.assign({enabled:u},g.ssao)),c){const t=`${this.path}_directionalLight`;this.ssp.removeObjectById(t);const e=this.ssp.getAllModel().reduce(((t,e)=>t.union(this.ssp.utils.getBoundingBox(e.children[0]))),new f),{min:r,max:i}=e,h=new l;e.getSize(h);let u=null!==(o=null===(n=g.directionalLight)||void 0===n?void 0:n.degree)&&void 0!==o?o:45;this.ssp.utils.isObject(c)&&"number"==typeof c.angle&&(u=c.angle);const d=Math.tan(Math.PI/180*u)*h.x;this.ssp.createDirectionalLight({id:t,name:"directionalLight",position:{x:i.x,y:d,z:i.z},target:{x:r.x,y:r.y,z:r.z},openShadow:!0,shadowAutoUpdate:!1,intensity:null!==(a=null===(s=g.directionalLight)||void 0===s?void 0:s.intensity)&&void 0!==a?a:10,mapSize:this.ssp.viewport.renderer.capabilities.maxTextureSize/2})}d&&this.ssp.setToneMapping(Object.assign({},g.toneMappping))}async getTopologies(){return this.fetchTopologyData()}sortTopologyNodes(t,e){var r;const i=t.nodes.reduce(((t,e)=>(t.set(e.id,e),t)),new Map);if(e&&!i.has(e))return void this.ssp.utils.error(`startNodeId ${e} 未找到对应 node`);let n=e?i.get(e):t.nodes[0];if(!n)return;const o=new Set;o.add(n);for(let e=0;e{t.position.set(e.x,e.y,e.z),t.rotation.set(e.rotationX,e.rotationY,e.rotationZ),t.scale.set(e.scaleX,e.scaleY,e.scaleZ),null==h||h(e,r)}),(t=>{var e;this.objectsAnimations.has(f)||this.objectsAnimations.set(f,new Set),null===(e=this.objectsAnimations.get(f))||void 0===e||e.add(t),null==a||a(t)}))}return!0}catch(t){}else n(`id: ${f} 未找到索引为 ${e} 的动画`)}else n(`id: ${f} 未找到动画`);return!1}async stopObjectAnimation(t){var e,r;const i=t.sid;return!!this.objectsAnimations.has(i)&&(null===(e=this.objectsAnimations.get(i))||void 0===e||e.forEach((t=>t.stop())),null===(r=this.objectsAnimations.get(i))||void 0===r||r.clear(),!0)}async flyToSceneFromVisionsData(t=0){const{utils:{error:e}}=this.ssp;if(this.modelVisionsData||await this.fetchModelVisionsData(),this.modelVisionsData){const r=this.modelVisionsData.get(""),i=null==r?void 0:r[t];if(i){const{camera:t,position:e,target:r,zoom:n=1}=i;return await this.ssp.setCamera("O"===t?"orthographic":"perspective",{position:e,target:r,zoom:n},!0),!0}e("场景视角数据未找到")}return!1}async flyToMainSceneFromVisionsData(t=!0){if(this.modelVisionsData||await this.fetchModelVisionsData(),this.modelVisionsData){const t=this.modelVisionsData.get("");if(t){const e=t.findIndex((t=>t.primary));if(e>-1)return this.flyToSceneFromVisionsData(e)}}return t&&this.ssp.flyMainViewpoint(),!1}async flyToObjectFromVisionsData(t,e=0){const{utils:{error:r}}=this.ssp;if(this.modelVisionsData||await this.fetchModelVisionsData(),this.modelVisionsData){const i=this.modelVisionsData.get(t.sid),n=null==i?void 0:i[e];if(n){const{camera:t,position:e,target:r,zoom:i=1}=n;return await this.ssp.setCamera("O"===t?"orthographic":"perspective",{position:e,target:r,zoom:i},!0),!0}r("对象视角数据未找到")}return!1}async flyToMainObjectFromVisionsData(t,e=!0){if(this.modelVisionsData||await this.fetchModelVisionsData(),this.modelVisionsData){const e=this.modelVisionsData.get(t.sid);if(e){const r=e.findIndex((t=>t.primary));if(r>-1)return this.flyToObjectFromVisionsData(t,r)}}return e&&this.ssp.flyToObj(t),!1}async loadFlowData(){const t=new Nt(this.path),{flowList:e}=await t.getFlowData();return this.flowData=e,e}async runFlowById(t){if(!this.flowData)return Promise.reject("CpsManagerPlugin.runFlowById(): 请先调用 loadFlowData 获取 flowData");const e=this.flowData.find((e=>e.id===t));if(!e)return Promise.reject(`CpsManagerPlugin.runFlowById() flowData not found by flowId(${t})`);const{nodes:r,edges:i}=e;return this.soonflow.parseFlow(r,i)}}IT=new WeakMap,RT=new WeakMap,CT=new WeakMap,PT=new WeakMap,xT=new WeakMap,NT=new WeakMap,BT=new WeakMap,TT=new WeakSet,LT=async function(){let e;const{resource:r}=await this.fetchMetaData();if(D(this,CT,"f").verifyKey){if(e=await D(this,TT,"m",DT).call(this,r),"forbid"===e)return void j(this,xT,!1,"f");if("noServerEnc"===e)await D(this,TT,"m",qT).call(this,r);else{const t=D(this,CT,"f").verifyKey,{verifiedRes:r,dec:i}=D(this,TT,"m",UT).call(this,e,t);j(this,xT,r,"f"),D(this,xT,"f")&&(this.treeData=i)}}else if(D(this,CT,"f").key){const{verifiedRes:t}=await D(this,TT,"m",FT).call(this,r);t||await D(this,TT,"m",qT).call(this,r)}else D(this,CT,"f").debugKey?await D(this,TT,"m",qT).call(this,r):t.utils.error("许可证密钥不存在")},DT=async function(t){const e=Math.random().toString(36).substring(2),{verifyKey:r}=D(this,CT,"f"),i=new gM(r,"pkcs8-public",{signingScheme:"pkcs1-md5",encryptionScheme:"pkcs1"}),n=i.encrypt(e,"base64"),o=await D(this,TT,"m",jT).call(this,D(this,TT,"m",zT).call(this,t),n),{license:s,serverEnc:a}=o;if(!a)return"noServerEnc";return i.decryptPublic(a,"utf8")!==e?"forbid":s},jT=async function(t,e=""){try{const r=await fetch(t,{headers:{token:e}}),i=r.headers,n=await r.json();return{license:n,serverEnc:i.get("token")}}catch(t){return{license:{content:"",sign:""},serverEnc:""}}},UT=function(t,e){let r=null,i=!0;try{const i=new gM(e,"pkcs8-public",{signingScheme:"pkcs1-md5",encryptionScheme:"pkcs1"});if(2===t.version)r=pA(t,i);else r=((t,e)=>{const{content:r,sign:i}=t;if(!e.verify(r,i,"base64","base64"))throw new Error("v1 error");return e.decryptPublic(r,"json")})(t,i)}catch(t){i=!1,this.ssp.utils.error("秘钥 key 验证失败")}return{verifiedRes:i,dec:r}},qT=async function(t){const e=await D(this,TT,"m",HT).call(this,t),r=cA(D(this,CT,"f").debugKey),{verifiedRes:i,dec:n}=D(this,TT,"m",UT).call(this,e,r);j(this,NT,i,"f"),D(this,NT,"f")&&(this.treeData=n)},FT=async function(t){const e=await D(this,TT,"m",HT).call(this,t),r=D(this,CT,"f").key,{verifiedRes:i,dec:n}=D(this,TT,"m",UT).call(this,e,r);return j(this,BT,i,"f"),j(this,NT,i,"f"),D(this,BT,"f")&&(this.treeData=n),{verifiedRes:i,dec:n}},zT=function(t){const e=D(this,IT,"f");if(e){t=(t=/\?([^/?&#:]+=[^?&]+&)*[^/?&#:]+=.*$/.test(e)?encodeURIComponent(t):encodeURI(t)).replaceAll(/#/g,"%23")}return`${e}${t}`},HT=async function(t){const{utils:e}=this.ssp;return e.fetchFile(D(this,TT,"m",zT).call(this,t),"json")},KT=async function(t,e){var r,i;const{syncProperties:n,hiddenObjects:o,objectPrefixId:s}=e,{name:a,renderType:h,path:u,matrix:f,shape:l,visible:d}=t,p=null!==(i=t[null!==(r=e.asId)&&void 0!==r?r:"id"])&&void 0!==i?i:t.id,m=`${s}${p}`,{ssp:g}=this,y=(new c).fromArray(f),b=this.ssp.getObjectById(m);if(b)return b;let v=null,w=d;if((null==o?void 0:o.has(p))&&(w=!1),"3D"===h)if(u)try{v=await g.loadModel({id:m,url:D(this,TT,"m",zT).call(this,u)})}catch(t){console.error(t)}else g.utils.warn(`id: ${p} path 为空`);else if("GROUP"===h||"STUB"===h)v=g.createGroup({id:m});else if("POLYGON"===h||"CIRCLE"===h){const t=g.createCanvas3D({id:m});l&&("POLYGON"===h&&l.points?t.createPolygon({id:`polygon/${m}`,yHeight:l.height,points:l.points,color:"blue",opacity:.5}):"CIRCLE"===h&&t.createCircle({id:`circle/${m}`,radius:l.radius,color:"blue",opacity:.5})),v=t}else"AREA"===h||"FLOOR"===h||"ROOM"===h?v=function(t,e){const{id:r,name:i,shape:n,extra:o}=e;if((null==n?void 0:n.points)&&n.points.length>0){const{points:e}=n;return t.createCanvas3D({id:r,name:i,polygons:[{id:`${r}/polygon`,points:e,depth:(null==n?void 0:n.depth)||0,yHeight:(null==n?void 0:n.height)||0,color:(null==o?void 0:o.color)||"#00f",opacity:(null==o?void 0:o.alpha)||.5}]})}return null}(this.ssp,t):"WATER_SURFACE"===h?v=function(t,e){var r,i,n,o,s;const{effectPlugin:a}=t;if(!a)return lA("无法创建水面,请设置 CpsSoonmanagerPlugin.effectPlugin 属性"),null;const{id:h,name:u,shape:f,extra:l={}}=e;return f&&f.points&&f.points.length>0?a.createWater({id:h,name:u,polygon:f.points,sunColor:null!==(r=l.sunColor)&&void 0!==r?r:"#ffffff",waterColor:null!==(i=l.waterColor)&&void 0!==i?i:"#7F7F7F",distortionScale:null!==(n=l.distortionScale)&&void 0!==n?n:20,alpha:null!==(o=l.alpha)&&void 0!==o?o:1,speed:null!==(s=l.speed)&&void 0!==s?s:1}):null}(this,t):"DECAL"===h&&(v=await async function(t,e){const{id:r,name:i,path:n}=e;return n?await t.createDecal({id:r,name:i,url:n,snapping:!1}):null}(this.ssp,t));if(v){!1===w&&v.hide(),v.name=a,y.decompose(v.position,v.quaternion,v.scale);const e=Object.assign({},t);if(Reflect.deleteProperty(e,"children"),v.userData=e,n&&this.propertiesData){const t=this.propertiesData.get(p);t&&(v.userData[Jk]=t)}}return v},VT=async function(e){const{loadLevel:r,loadTargetId:i}=e;let n=null;if(i){const e=this.getTreeNodeById(i);e?n=[e]:t.utils.error("根据 loadTargetId 未找到对应树节点")}else n=this.treeData;if(!n)return t.utils.error("treeData is null");const o=async(t,i,n=0)=>{if(n++,r&&n>r)return;const{ssp:s}=this,a=await D(this,TT,"m",KT).call(this,t,e);a&&s.addObject(a,null!=i?i:this.sceneGroup),await Promise.allSettled(t.children.map((t=>o(t,a,n))))};await Promise.allSettled(n.map((t=>o(t,t.pid?this.ssp.getObjectById(t.pid):null,0))))},GT=async function(e){if(!this.treeData)return void t.utils.error("treeData is null");const r=[],i=Object.create(null),n=[],{ssp:o}=this;for(r.push(...this.treeData);r.length>0;){r.splice(0,r.length).forEach((t=>{n.push(t),r.push(...t.children.map((e=>(i[e.id]=t.id,e))))}))}await Promise.allSettled(n.map((t=>D(this,TT,"m",KT).call(this,t,e)))),Object.entries(i).forEach((([t,e])=>{const r=o.getObjectById(t),i=o.getObjectById(e);r&&o.addObject(r,null!=i?i:this.sceneGroup)}))};export{Xk as ANIMATIONS_DATA_FILE_PATH,Wk as DATA_SOURCE_FILE_PATH,rA as LoadSceneAlgorithm,Hk as META_DATA_FILE_PATH,Qk as MODEL_VISIONS_DATA_FILE_PATH,Gk as POI_DATA_FILE_PATH,$k as POI_PLUGIN_NAME,Zk as PROPERTIES_DATA_FLEE_PATH,Jk as PROPERTIES_KEY,tA as PoiContentTypeEnum,Kk as SIGN_PATH,Yk as TOPOLOGY_DATA_FILE_PATH,Vk as TREE_DATA_FILE_PATH,YT as default}; +var i=t("buffer"),n=i.Buffer;function o(t,e){for(var r in t)e[r]=t[r]}function s(t,e,r){return n(t,e,r)}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=i:(o(i,r),r.Buffer=s),s.prototype=Object.create(n.prototype),o(n,s),s.from=function(t,e,r){if("number"==typeof t)throw new TypeError("Argument must not be a number");return n(t,e,r)},s.alloc=function(t,e,r){if("number"!=typeof t)throw new TypeError("Argument must be a number");var i=n(t);return void 0!==e?"string"==typeof r?i.fill(e,r):i.fill(e):i.fill(0),i},s.allocUnsafe=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return n(t)},s.allocUnsafeSlow=function(t){if("number"!=typeof t)throw new TypeError("Argument must be a number");return i.SlowBuffer(t)}},{buffer:17}],74:[function(t,e,r){function i(t){var e=t._readableState;return e?e.objectMode||"number"==typeof t._duplexState?t.read():t.read(n(e)):null}function n(t){return t.buffer.length?t.buffer.head?t.buffer.head.data.length:t.buffer[0].length:t.length}e.exports=i},{}],75:[function(t,e,r){var i=t("safe-buffer").Buffer,n=i.isEncoding||function(t){switch((t=""+t)&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function s(t){var e=o(t);if("string"!=typeof e&&(i.isEncoding===n||!n(t)))throw new Error("Unknown encoding: "+t);return e||t}function a(t){var e;switch(this.encoding=s(t),this.encoding){case"utf16le":this.text=p,this.end=m,e=4;break;case"utf8":this.fillLast=l,e=4;break;case"base64":this.text=g,this.end=y,e=3;break;default:return this.write=b,void(this.end=v)}this.lastNeed=0,this.lastTotal=0,this.lastChar=i.allocUnsafe(e)}function h(t){return t<=127?0:t>>5==6?2:t>>4==14?3:t>>3==30?4:t>>6==2?-1:-2}function u(t,e,r){var i=e.length-1;if(i=0?(n>0&&(t.lastNeed=n-1),n):--i=0?(n>0&&(t.lastNeed=n-2),n):--i=0?(n>0&&(2===n?n=0:t.lastNeed=n-3),n):0}function f(t,e,r){if(128!=(192&e[0]))return t.lastNeed=0,"�";if(t.lastNeed>1&&e.length>1){if(128!=(192&e[1]))return t.lastNeed=1,"�";if(t.lastNeed>2&&e.length>2&&128!=(192&e[2]))return t.lastNeed=2,"�"}}function l(t){var e=this.lastTotal-this.lastNeed,r=f(this,t);return void 0!==r?r:this.lastNeed<=t.length?(t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(t.copy(this.lastChar,e,0,t.length),void(this.lastNeed-=t.length))}function c(t,e){var r=u(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function d(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"�":e}function p(t,e){if((t.length-e)%2==0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function m(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function g(t,e){var r=(t.length-e)%3;return 0===r?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function y(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function b(t){return t.toString(this.encoding)}function v(t){return t&&t.length?this.write(t):""}r.StringDecoder=a,a.prototype.write=function(t){if(0===t.length)return"";var e,r;if(this.lastNeed){if(void 0===(e=this.fillLast(t)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r",'"',"`"," ","\r","\n","\t"]),f=["'"].concat(u),l=["%","/","?",";","#"].concat(f),c=["/","?","#"],d=255,p=/^[+a-z0-9A-Z_-]{0,63}$/,m=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,g={javascript:!0,"javascript:":!0},y={javascript:!0,"javascript:":!0},b={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=t("querystring");function w(t,e,r){if(t&&n.isObject(t)&&t instanceof o)return t;var i=new o;return i.parse(t,e,r),i}function _(t){return n.isString(t)&&(t=w(t)),t instanceof o?t.format():o.prototype.format.call(t)}function M(t,e){return w(t,!1,!0).resolve(e)}function S(t,e){return t?w(t,!1,!0).resolveObject(e):e}o.prototype.parse=function(t,e,r){if(!n.isString(t))throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var o=t.indexOf("?"),a=-1!==o&&o127?B+="x":B+=N[L];if(!B.match(p)){var j=P.slice(0,I),U=P.slice(I+1),q=N.match(m);q&&(j.push(q[1]),U.unshift(q[2])),U.length&&(_="/"+U.join(".")+_),this.hostname=j.join(".");break}}}this.hostname.length>d?this.hostname="":this.hostname=this.hostname.toLowerCase(),C||(this.hostname=i.toASCII(this.hostname));var F=this.port?":"+this.port:"",z=this.hostname||"";this.host=z+F,this.href+=this.host,C&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==_[0]&&(_="/"+_))}if(!g[E])for(I=0,x=f.length;I0)&&r.host.split("@"))&&(r.auth=I.shift(),r.host=r.hostname=I.shift())),r.search=t.search,r.query=t.query,n.isNull(r.pathname)&&n.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.href=r.format(),r;if(!S.length)return r.pathname=null,r.search?r.path="/"+r.search:r.path=null,r.href=r.format(),r;for(var k=S.slice(-1)[0],A=(r.host||t.host||S.length>1)&&("."===k||".."===k)||""===k,O=0,T=S.length;T>=0;T--)"."===(k=S[T])?S.splice(T,1):".."===k?(S.splice(T,1),O++):O&&(S.splice(T,1),O--);if(!_&&!M)for(;O--;O)S.unshift("..");!_||""===S[0]||S[0]&&"/"===S[0].charAt(0)||S.unshift(""),A&&"/"!==S.join("/").substr(-1)&&S.push("");var I,R=""===S[0]||S[0]&&"/"===S[0].charAt(0);return E&&(r.hostname=r.host=R?"":S.length?S.shift():"",(I=!!(r.host&&r.host.indexOf("@")>0)&&r.host.split("@"))&&(r.auth=I.shift(),r.host=r.hostname=I.shift())),(_=_||r.host&&S.length)&&!R&&S.unshift(""),S.length?r.pathname=S.join("/"):(r.pathname=null,r.path=null),n.isNull(r.pathname)&&n.isNull(r.search)||(r.path=(r.pathname?r.pathname:"")+(r.search?r.search:"")),r.auth=t.auth||r.auth,r.slashes=r.slashes||t.slashes,r.href=r.format(),r},o.prototype.parseHost=function(){var t=this.host,e=a.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)}},{"./util":77,punycode:51,querystring:54}],77:[function(t,e,r){e.exports={isString:function(t){return"string"==typeof t},isObject:function(t){return"object"==typeof t&&null!==t},isNull:function(t){return null===t},isNullOrUndefined:function(t){return null==t}}},{}],78:[function(t,e,r){(function(t){(function(){function r(t,e){if(i("noDeprecation"))return t;var r=!1;function n(){if(!r){if(i("throwDeprecation"))throw new Error(e);i("traceDeprecation")?console.trace(e):console.warn(e),r=!0}return t.apply(this,arguments)}return n}function i(e){try{if(!t.localStorage)return!1}catch(t){return!1}var r=t.localStorage[e];return null!=r&&"true"===String(r).toLowerCase()}e.exports=r}).call(this)}).call(this,void 0!==Y?Y:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],79:[function(t,e,r){function i(t,e){if(t&&e)return i(t)(e);if("function"!=typeof t)throw new TypeError("need wrapper function");return Object.keys(t).forEach((function(e){r[e]=t[e]})),r;function r(){for(var e=new Array(arguments.length),r=0;r0)for(var r=0,n=arguments.length;r1)r=e;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");i=this.head.next,r=this.head.value}for(var n=0;null!==i;n++)r=t(r,i.value,n),i=i.next;return r},i.prototype.reduceReverse=function(t,e){var r,i=this.tail;if(arguments.length>1)r=e;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");i=this.tail.prev,r=this.tail.value}for(var n=this.length-1;null!==i;n--)r=t(r,i.value,n),i=i.prev;return r},i.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;null!==r;e++)t[e]=r.value,r=r.next;return t},i.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;null!==r;e++)t[e]=r.value,r=r.prev;return t},i.prototype.slice=function(t,e){(e=e||this.length)<0&&(e+=this.length),(t=t||0)<0&&(t+=this.length);var r=new i;if(ethis.length&&(e=this.length);for(var n=0,o=this.head;null!==o&&nthis.length&&(e=this.length);for(var n=this.length,o=this.tail;null!==o&&n>e;n--)o=o.prev;for(;null!==o&&n>t;n--,o=o.prev)r.push(o.value);return r},i.prototype.splice=function(t,e,...r){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var i=0,o=this.head;null!==o&&i{wA[vA[t]]=t}));const _A={type:"error",data:"parser error"},MA="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),SA="function"==typeof ArrayBuffer,EA=t=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,kA=({type:t,data:e},r,i)=>MA&&e instanceof Blob?r?i(e):AA(e,i):SA&&(e instanceof ArrayBuffer||EA(e))?r?i(e):AA(new Blob([e]),i):i(vA[t]+(e||"")),AA=(t,e)=>{const r=new FileReader;return r.onload=function(){const t=r.result.split(",")[1];e("b"+(t||""))},r.readAsDataURL(t)};function OA(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let TA;const IA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",RA="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let t=0;t<64;t++)RA[IA.charCodeAt(t)]=t;const CA="function"==typeof ArrayBuffer,PA=(t,e)=>{if("string"!=typeof t)return{type:"message",data:NA(t,e)};const r=t.charAt(0);if("b"===r)return{type:"message",data:xA(t.substring(1),e)};return wA[r]?t.length>1?{type:wA[r],data:t.substring(1)}:{type:wA[r]}:_A},xA=(t,e)=>{if(CA){const r=(t=>{let e,r,i,n,o,s=.75*t.length,a=t.length,h=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);const u=new ArrayBuffer(s),f=new Uint8Array(u);for(e=0;e>4,f[h++]=(15&i)<<4|n>>2,f[h++]=(3&n)<<6|63&o;return u})(t);return NA(r,e)}return{base64:!0,data:t}},NA=(t,e)=>"blob"===e?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer,BA=String.fromCharCode(30);function LA(){return new TransformStream({transform(t,e){!function(t,e){MA&&t.data instanceof Blob?t.data.arrayBuffer().then(OA).then(e):SA&&(t.data instanceof ArrayBuffer||EA(t.data))?e(OA(t.data)):kA(t,!1,(t=>{TA||(TA=new TextEncoder),e(TA.encode(t))}))}(t,(r=>{const i=r.length;let n;if(i<126)n=new Uint8Array(1),new DataView(n.buffer).setUint8(0,i);else if(i<65536){n=new Uint8Array(3);const t=new DataView(n.buffer);t.setUint8(0,126),t.setUint16(1,i)}else{n=new Uint8Array(9);const t=new DataView(n.buffer);t.setUint8(0,127),t.setBigUint64(1,BigInt(i))}t.data&&"string"!=typeof t.data&&(n[0]|=128),e.enqueue(n),e.enqueue(r)}))}})}let DA;function jA(t){return t.reduce(((t,e)=>t+e.length),0)}function UA(t,e){if(t[0].length===e)return t.shift();const r=new Uint8Array(e);let i=0;for(let n=0;n(t.hasOwnProperty(r)&&(e[r]=t[r]),e)),{})}const HA=FA.setTimeout,KA=FA.clearTimeout;function VA(t,e){e.useNativeTimers?(t.setTimeoutFn=HA.bind(FA),t.clearTimeoutFn=KA.bind(FA)):(t.setTimeoutFn=FA.setTimeout.bind(FA),t.clearTimeoutFn=FA.clearTimeout.bind(FA))}class GA extends Error{constructor(t,e,r){super(t),this.description=e,this.context=r,this.type="TransportError"}}class WA extends qA{constructor(t){super(),this.writable=!1,VA(this,t),this.opts=t,this.query=t.query,this.socket=t.socket}onError(t,e,r){return super.emitReserved("error",new GA(t,e,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(t){"open"===this.readyState&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const e=PA(t,this.socket.binaryType);this.onPacket(e)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,e={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(e)}_hostname(){const t=this.opts.hostname;return-1===t.indexOf(":")?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(t){const e=function(t){let e="";for(let r in t)t.hasOwnProperty(r)&&(e.length&&(e+="&"),e+=encodeURIComponent(r)+"="+encodeURIComponent(t[r]));return e}(t);return e.length?"?"+e:""}}const YA="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),ZA=64,XA={};let QA,JA=0,$A=0;function tO(t){let e="";do{e=YA[t%ZA]+e,t=Math.floor(t/ZA)}while(t>0);return e}function eO(){const t=tO(+new Date);return t!==QA?(JA=0,QA=t):t+"."+tO(JA++)}for(;$A{var t;3===r.readyState&&(null===(t=this.opts.cookieJar)||void 0===t||t.parseCookies(r)),4===r.readyState&&(200===r.status||1223===r.status?this.onLoad():this.setTimeoutFn((()=>{this.onError("number"==typeof r.status?r.status:0)}),0))},r.send(this.data)}catch(t){return void this.setTimeoutFn((()=>{this.onError(t)}),0)}"undefined"!=typeof document&&(this.index=aO.requestsCount++,aO.requests[this.index]=this)}onError(t){this.emitReserved("error",t,this.xhr),this.cleanup(!0)}cleanup(t){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=oO,t)try{this.xhr.abort()}catch(t){}"undefined"!=typeof document&&delete aO.requests[this.index],this.xhr=null}}onLoad(){const t=this.xhr.responseText;null!==t&&(this.emitReserved("data",t),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}if(aO.requestsCount=0,aO.requests={},"undefined"!=typeof document)if("function"==typeof attachEvent)attachEvent("onunload",hO);else if("function"==typeof addEventListener){addEventListener("onpagehide"in FA?"pagehide":"unload",hO,!1)}function hO(){for(let t in aO.requests)aO.requests.hasOwnProperty(t)&&aO.requests[t].abort()}const uO="function"==typeof Promise&&"function"==typeof Promise.resolve?t=>Promise.resolve().then(t):(t,e)=>e(t,0),fO=FA.WebSocket||FA.MozWebSocket,lO="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase();const cO={websocket:class extends WA{constructor(t){super(t),this.supportsBinary=!t.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const t=this.uri(),e=this.opts.protocols,r=lO?{}:zA(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=lO?new fO(t,e,r):e?new fO(t,e):new fO(t)}catch(t){return this.emitReserved("error",t)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let e=0;e{try{this.ws.send(t)}catch(t){}i&&uO((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",e=this.query||{};return this.opts.timestampRequests&&(e[this.opts.timestampParam]=eO()),this.supportsBinary||(e.b64=1),this.createUri(t,e)}check(){return!!fO}},webtransport:class extends WA{get name(){return"webtransport"}doOpen(){"function"==typeof WebTransport&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then((()=>{this.onClose()})).catch((t=>{this.onError("webtransport error",t)})),this.transport.ready.then((()=>{this.transport.createBidirectionalStream().then((t=>{const e=function(t,e){DA||(DA=new TextDecoder);const r=[];let i=0,n=-1,o=!1;return new TransformStream({transform(s,a){for(r.push(s);;){if(0===i){if(jA(r)<1)break;const t=UA(r,1);o=128==(128&t[0]),n=127&t[0],i=n<126?3:126===n?1:2}else if(1===i){if(jA(r)<2)break;const t=UA(r,2);n=new DataView(t.buffer,t.byteOffset,t.length).getUint16(0),i=3}else if(2===i){if(jA(r)<8)break;const t=UA(r,8),e=new DataView(t.buffer,t.byteOffset,t.length),o=e.getUint32(0);if(o>Math.pow(2,21)-1){a.enqueue(_A);break}n=o*Math.pow(2,32)+e.getUint32(4),i=3}else{if(jA(r)t){a.enqueue(_A);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(e).getReader(),i=LA();i.readable.pipeTo(t.writable),this.writer=i.writable.getWriter();const n=()=>{r.read().then((({done:t,value:e})=>{t||(this.onPacket(e),n())})).catch((t=>{}))};n();const o={type:"open"};this.query.sid&&(o.data=`{"sid":"${this.query.sid}"}`),this.writer.write(o).then((()=>this.onOpen()))}))})))}write(t){this.writable=!1;for(let e=0;e{i&&uO((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){var t;null===(t=this.transport)||void 0===t||t.close()}},polling:class extends WA{constructor(t){if(super(t),this.polling=!1,"undefined"!=typeof location){const e="https:"===location.protocol;let r=location.port;r||(r=e?"443":"80"),this.xd="undefined"!=typeof location&&t.hostname!==location.hostname||r!==t.port}const e=t&&t.forceBase64;this.supportsBinary=sO&&!e,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(t){this.readyState="pausing";const e=()=>{this.readyState="paused",t()};if(this.polling||!this.writable){let t=0;this.polling&&(t++,this.once("pollComplete",(function(){--t||e()}))),this.writable||(t++,this.once("drain",(function(){--t||e()})))}else e()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){((t,e)=>{const r=t.split(BA),i=[];for(let t=0;t{if("opening"===this.readyState&&"open"===t.type&&this.onOpen(),"close"===t.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(t)})),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.poll())}doClose(){const t=()=>{this.write([{type:"close"}])};"open"===this.readyState?t():this.once("open",t)}write(t){this.writable=!1,((t,e)=>{const r=t.length,i=new Array(r);let n=0;t.forEach(((t,o)=>{kA(t,!1,(t=>{i[o]=t,++n===r&&e(i.join(BA))}))}))})(t,(t=>{this.doWrite(t,(()=>{this.writable=!0,this.emitReserved("drain")}))}))}uri(){const t=this.opts.secure?"https":"http",e=this.query||{};return!1!==this.opts.timestampRequests&&(e[this.opts.timestampParam]=eO()),this.supportsBinary||e.sid||(e.b64=1),this.createUri(t,e)}request(t={}){return Object.assign(t,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new aO(this.uri(),t)}doWrite(t,e){const r=this.request({method:"POST",data:t});r.on("success",e),r.on("error",((t,e)=>{this.onError("xhr post error",t,e)}))}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",((t,e)=>{this.onError("xhr poll error",t,e)})),this.pollXhr=t}}},dO=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,pO=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function mO(t){const e=t,r=t.indexOf("["),i=t.indexOf("]");-1!=r&&-1!=i&&(t=t.substring(0,r)+t.substring(r,i).replace(/:/g,";")+t.substring(i,t.length));let n=dO.exec(t||""),o={},s=14;for(;s--;)o[pO[s]]=n[s]||"";return-1!=r&&-1!=i&&(o.source=e,o.host=o.host.substring(1,o.host.length-1).replace(/;/g,":"),o.authority=o.authority.replace("[","").replace("]","").replace(/;/g,":"),o.ipv6uri=!0),o.pathNames=function(t,e){const r=/\/{2,9}/g,i=e.replace(r,"/").split("/");"/"!=e.slice(0,1)&&0!==e.length||i.splice(0,1);"/"==e.slice(-1)&&i.splice(i.length-1,1);return i}(0,o.path),o.queryKey=function(t,e){const r={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(t,e,i){e&&(r[e]=i)})),r}(0,o.query),o}let gO=class t extends qA{constructor(t,e={}){super(),this.binaryType="arraybuffer",this.writeBuffer=[],t&&"object"==typeof t&&(e=t,t=null),t?(t=mO(t),e.hostname=t.host,e.secure="https"===t.protocol||"wss"===t.protocol,e.port=t.port,t.query&&(e.query=t.query)):e.host&&(e.hostname=mO(e.host).host),VA(this,e),this.secure=null!=e.secure?e.secure:"undefined"!=typeof location&&"https:"===location.protocol,e.hostname&&!e.port&&(e.port=this.secure?"443":"80"),this.hostname=e.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=e.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=e.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},e),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(t){let e={},r=t.split("&");for(let t=0,i=r.length;t{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(t){const e=Object.assign({},this.opts.query);e.EIO=4,e.transport=t,this.id&&(e.sid=this.id);const r=Object.assign({},this.opts,{query:e,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new cO[t](r)}open(){let e;if(this.opts.rememberUpgrade&&t.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(t){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(t=>this.onClose("transport close",t)))}probe(e){let r=this.createTransport(e),i=!1;t.priorWebsocketSuccess=!1;const n=()=>{i||(r.send([{type:"ping",data:"probe"}]),r.once("packet",(e=>{if(!i)if("pong"===e.type&&"probe"===e.data){if(this.upgrading=!0,this.emitReserved("upgrading",r),!r)return;t.priorWebsocketSuccess="websocket"===r.name,this.transport.pause((()=>{i||"closed"!==this.readyState&&(f(),this.setTransport(r),r.send([{type:"upgrade"}]),this.emitReserved("upgrade",r),r=null,this.upgrading=!1,this.flush())}))}else{const t=new Error("probe error");t.transport=r.name,this.emitReserved("upgradeError",t)}})))};function o(){i||(i=!0,f(),r.close(),r=null)}const s=t=>{const e=new Error("probe error: "+t);e.transport=r.name,o(),this.emitReserved("upgradeError",e)};function a(){s("transport closed")}function h(){s("socket closed")}function u(t){r&&t.name!==r.name&&o()}const f=()=>{r.removeListener("open",n),r.removeListener("error",s),r.removeListener("close",a),this.off("close",h),this.off("upgrading",u)};r.once("open",n),r.once("error",s),r.once("close",a),this.once("close",h),this.once("upgrading",u),-1!==this.upgrades.indexOf("webtransport")&&"webtransport"!==e?this.setTimeoutFn((()=>{i||r.open()}),200):r.open()}onOpen(){if(this.readyState="open",t.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade){let t=0;const e=this.upgrades.length;for(;t{this.onClose("ping timeout")}),this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this.getWritablePackets();this.transport.send(t),this.prevBufferLen=t.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let t=1;for(let r=0;r=57344?r+=3:(i++,r+=4);return r}(e):Math.ceil(1.33*(e.byteLength||e.size))),r>0&&t>this.maxPayload)return this.writeBuffer.slice(0,r);t+=2}var e;return this.writeBuffer}write(t,e,r){return this.sendPacket("message",t,e,r),this}send(t,e,r){return this.sendPacket("message",t,e,r),this}sendPacket(t,e,r,i){if("function"==typeof e&&(i=e,e=void 0),"function"==typeof r&&(i=r,r=null),"closing"===this.readyState||"closed"===this.readyState)return;(r=r||{}).compress=!1!==r.compress;const n={type:t,data:e,options:r};this.emitReserved("packetCreate",n),this.writeBuffer.push(n),i&&this.once("flush",i),this.flush()}close(){const t=()=>{this.onClose("forced close"),this.transport.close()},e=()=>{this.off("upgrade",e),this.off("upgradeError",e),t()},r=()=>{this.once("upgrade",e),this.once("upgradeError",e)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?r():t()})):this.upgrading?r():t()),this}onError(e){t.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(t,e){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",t,e),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(t){const e=[];let r=0;const i=t.length;for(;r"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,vO=Object.prototype.toString,wO="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===vO.call(Blob),_O="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===vO.call(File);function MO(t){return yO&&(t instanceof ArrayBuffer||bO(t))||wO&&t instanceof Blob||_O&&t instanceof File}function SO(t,e){if(!t||"object"!=typeof t)return!1;if(Array.isArray(t)){for(let e=0,r=t.length;e=0&&t.num{delete this.acks[t];for(let e=0;e{this.io.clearTimeoutFn(n),e.apply(this,[null,...t])}}emitWithAck(t,...e){const r=void 0!==this.flags.timeout||void 0!==this._opts.ackTimeout;return new Promise(((i,n)=>{e.push(((t,e)=>r?t?n(t):i(e):i(t))),this.emit(t,...e)}))}_addToQueue(t){let e;"function"==typeof t[t.length-1]&&(e=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push(((t,...i)=>{if(r!==this._queue[0])return;return null!==t?r.tryCount>this._opts.retries&&(this._queue.shift(),e&&e(t)):(this._queue.shift(),e&&e(null,...i)),r.pending=!1,this._drainQueue()})),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||0===this._queue.length)return;const e=this._queue[0];e.pending&&!t||(e.pending=!0,e.tryCount++,this.flags=e.flags,this.emit.apply(this,e.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){"function"==typeof this.auth?this.auth((t=>{this._sendConnectPacket(t)})):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:IO.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,e){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,e)}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case IO.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case IO.EVENT:case IO.BINARY_EVENT:this.onevent(t);break;case IO.ACK:case IO.BINARY_ACK:this.onack(t);break;case IO.DISCONNECT:this.ondisconnect();break;case IO.CONNECT_ERROR:this.destroy();const e=new Error(t.data.message);e.data=t.data.data,this.emitReserved("connect_error",e)}}onevent(t){const e=t.data||[];null!=t.id&&e.push(this.ack(t.id)),this.connected?this.emitEvent(e):this.receiveBuffer.push(Object.freeze(e))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const e=this._anyListeners.slice();for(const r of e)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&"string"==typeof t[t.length-1]&&(this._lastOffset=t[t.length-1])}ack(t){const e=this;let r=!1;return function(...i){r||(r=!0,e.packet({type:IO.ACK,id:t,data:i}))}}onack(t){const e=this.acks[t.id];"function"==typeof e&&(e.apply(this,t.data),delete this.acks[t.id])}onconnect(t,e){this.id=t,this.recovered=e&&this._pid===e,this._pid=e,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach((t=>this.emitEvent(t))),this.receiveBuffer=[],this.sendBuffer.forEach((t=>{this.notifyOutgoingListeners(t),this.packet(t)})),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach((t=>t())),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:IO.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const e=this._anyListeners;for(let r=0;r0&&t.jitter<=1?t.jitter:0,this.attempts=0}DO.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),r=Math.floor(e*this.jitter*t);t=0==(1&Math.floor(10*e))?t-r:t+r}return 0|Math.min(t,this.max)},DO.prototype.reset=function(){this.attempts=0},DO.prototype.setMin=function(t){this.ms=t},DO.prototype.setMax=function(t){this.max=t},DO.prototype.setJitter=function(t){this.jitter=t};class jO extends qA{constructor(t,e){var r;super(),this.nsps={},this.subs=[],t&&"object"==typeof t&&(e=t,t=void 0),(e=e||{}).path=e.path||"/socket.io",this.opts=e,VA(this,e),this.reconnection(!1!==e.reconnection),this.reconnectionAttempts(e.reconnectionAttempts||1/0),this.reconnectionDelay(e.reconnectionDelay||1e3),this.reconnectionDelayMax(e.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(r=e.randomizationFactor)&&void 0!==r?r:.5),this.backoff=new DO({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==e.timeout?2e4:e.timeout),this._readyState="closed",this.uri=t;const i=e.parser||xO;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=!1!==e.autoConnect,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,this):this._reconnection}reconnectionAttempts(t){return void 0===t?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var e;return void 0===t?this._reconnectionDelay:(this._reconnectionDelay=t,null===(e=this.backoff)||void 0===e||e.setMin(t),this)}randomizationFactor(t){var e;return void 0===t?this._randomizationFactor:(this._randomizationFactor=t,null===(e=this.backoff)||void 0===e||e.setJitter(t),this)}reconnectionDelayMax(t){var e;return void 0===t?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,null===(e=this.backoff)||void 0===e||e.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new gO(this.uri,this.opts);const e=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=NO(e,"open",(function(){r.onopen(),t&&t()})),n=e=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",e),t?t(e):this.maybeReconnectOnOpen()},o=NO(e,"error",n);if(!1!==this._timeout){const t=this._timeout,r=this.setTimeoutFn((()=>{i(),n(new Error("timeout")),e.close()}),t);this.opts.autoUnref&&r.unref(),this.subs.push((()=>{this.clearTimeoutFn(r)}))}return this.subs.push(i),this.subs.push(o),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(NO(t,"ping",this.onping.bind(this)),NO(t,"data",this.ondata.bind(this)),NO(t,"error",this.onerror.bind(this)),NO(t,"close",this.onclose.bind(this)),NO(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(t){this.onclose("parse error",t)}}ondecoded(t){uO((()=>{this.emitReserved("packet",t)}),this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,e){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new LO(this,t,e),this.nsps[t]=r),r}_destroy(t){const e=Object.keys(this.nsps);for(const t of e){if(this.nsps[t].active)return}this._close()}_packet(t){const e=this.encoder.encode(t);for(let r=0;rt())),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(t,e){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,e),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const e=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn((()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),t.skipReconnect||t.open((e=>{e?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",e)):t.onreconnect()})))}),e);this.opts.autoUnref&&r.unref(),this.subs.push((()=>{this.clearTimeoutFn(r)}))}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const UO={};function qO(t,e){"object"==typeof t&&(e=t,t=void 0);const r=function(t,e="",r){let i=t;r=r||"undefined"!=typeof location&&location,null==t&&(t=r.protocol+"//"+r.host),"string"==typeof t&&("/"===t.charAt(0)&&(t="/"===t.charAt(1)?r.protocol+t:r.host+t),/^(https?|wss?):\/\//.test(t)||(t=void 0!==r?r.protocol+"//"+t:"https://"+t),i=mO(t)),i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443")),i.path=i.path||"/";const n=-1!==i.host.indexOf(":")?"["+i.host+"]":i.host;return i.id=i.protocol+"://"+n+":"+i.port+e,i.href=i.protocol+"://"+n+(r&&r.port===i.port?"":":"+i.port),i}(t,(e=e||{}).path||"/socket.io"),i=r.source,n=r.id,o=r.path,s=UO[n]&&o in UO[n].nsps;let a;return e.forceNew||e["force new connection"]||!1===e.multiplex||s?a=new jO(i,e):(UO[n]||(UO[n]=new jO(i,e)),a=UO[n]),r.query&&!e.query&&(e.query=r.queryKey),a.socket(r.path,e)}Object.assign(qO,{Manager:jO,Socket:LO,io:qO,connect:qO});class FO{constructor(t,e){this.method="GET",this.protocol="HTTPS",this.body=null,this.interval=0,this.timeout=1e4,this.responseType="",this.filteredData=null,this.XHR=void 0,this.isInterval=!1,this.successCallback=void 0,this.errorCallback=void 0,this.statusCallback=void 0,this.onTimeout=()=>{this.XHR&&(this.onErrorCallback(new Error("Error: timeout")),this.circulateRequest())},this.onLoad=()=>{if(this.XHR){if(this.responseData=this.toObject(this.XHR.response),4!==this.XHR.readyState||200!=this.XHR.status&&304!=this.XHR.status)this.onErrorCallback(new Error(this.XHR.statusText));else{try{this.filteredData=this.filter?this.filter(this.responseData):this.responseData}catch(t){this.filteredData=void 0,console.error(t)}this.onSuccessCallback(this.responseData,this.filteredData)}this.circulateRequest()}},this.onError=()=>{this.XHR&&this.onErrorCallback(new Error(this.XHR.statusText))},this.url=t,e&&(this.option=e,this.method=e.method?e.method.toUpperCase():"GET",this.protocol=e.protocol?e.protocol.toUpperCase():"HTTPS",this.headers=e.headers?e.headers:void 0,this.params=e.params?e.params:void 0,this.body=e.body?e.body:null,this.interval=void 0!==e.interval?e.interval:0,this.timeout=e.timeout?e.timeout:1e4,this.responseType=void 0!==e.responseType?e.responseType:"",e.filter&&(this.filter="function"==typeof e.filter?e.filter:new Function("response",e.filter)))}get getUrl(){return this.url}get getOption(){return Object.assign(Object.assign({},this.option),{url:this.url})}get getStatus(){var t;return null===(t=this.XHR)||void 0===t?void 0:t.status}get getRequesting(){return this.isInterval&&0!==this.interval}get getResponseData(){return this.responseData}get getFilterData(){return this.filteredData}send(){this.isInterval=!0,this.request()}abort(){this.isInterval=!1}onceSend(){this.request()}listen(t,e){this.successCallback=t,e&&(this.errorCallback=e)}on(t,e){switch(t){case"onSuccess":this.successCallback=e;break;case"onError":this.errorCallback=e;break;case"onStatus":this.statusCallback=e}}onStatusCallback(t,e){this.statusCallback&&this.statusCallback(t,e)}onErrorCallback(t){this.errorCallback&&this.errorCallback(t),this.onStatusCallback("error",t)}onSuccessCallback(t,e){this.successCallback&&this.successCallback(t,e),this.onStatusCallback("success")}request(){try{if(this.onStatusCallback("connect"),this.XHR||(this.XHR=new XMLHttpRequest),this.XHR.open(this.method,this.paramsUrl()),this.XHR.responseType=this.responseType,this.XHR.timeout=this.timeout,this.XHR.onload=this.onLoad,this.XHR.onerror=this.onError,this.XHR.ontimeout=this.onTimeout,this.headers)for(const t in this.headers)Object.prototype.hasOwnProperty.call(this.headers,t)&&"multipart/form-data"!==this.headers[t]&&this.XHR.setRequestHeader(t,this.headers[t]);this.XHR.send(this.body)}catch(t){console.error(t),this.onErrorCallback(t)}}circulateRequest(){if(this.getRequesting){const t=setTimeout((()=>{this.request(),clearTimeout(t)}),this.interval)}else this.isInterval&&(this.isInterval=!1)}paramsUrl(){let t=this.url+"?";if(this.params)for(const e in this.params)Object.prototype.hasOwnProperty.call(this.params,e)&&(t+=encodeURIComponent(e)+"="+encodeURIComponent(this.params[e])+"&");return t.slice(0,-1)}toObject(t){if("string"!=typeof t)return t;try{return JSON.parse(t)}catch(e){return t}}}var zO,HO,KO,VO,GO,WO,YO,ZO,XO,QO,JO,$O,tT,eT,rT,iT,nT,oT,sT,aT,hT;function uT(t){const e=typeof t;return null!=t&&("object"===e||"function"===e)}function fT(t){let e=t.protocolValue+t.url;return t.port&&(e+=":"+t.port),e}function lT(t,e,r=!1,i,n,o){try{if(!e)return t;let n="";r&&uT(t)&&(n=`const { ${Object.keys(t).join(",")} } = response;`);const a=new Function("response",n+e)(t),h=i?function(t){return"number"==typeof t}(s=a)?`${s}`:uT(s)?JSON.stringify(s,null,2):s:a;return o&&o(h),h}catch(t){return n&&n(t),t}var s}function cT(t,e){if(t.protocol!==HO.HTTP)return;const r=t.configureJson,i=function(t,e){switch(e){case WO.SECOND:return 1e3*t;case WO.MINUTE:return 1e3*t*60;case WO.HOUR:return 1e3*t*60*60;case WO.DAY:return 1e3*t*60*60*24;default:return 1e3*t}}(r.interval,r.unit),n=Object.assign(e[zO.HEADERS],t[zO.HEADERS]);let o=null;const s=r.params,a=new FormData;switch(a.set("default","defaultData"),r.bodyType){case VO.NONE:break;case VO.JSON:n["Content-Type"]=YO.JSON,o=r.body.json;break;case VO.XML:n["Content-Type"]=YO.XML,o=r.body.xml;break;case VO.X_WWW_FORM_URLENCODED:n["Content-Type"]=YO.FORM_URLENCODED;o=function(t){const e=new URLSearchParams;for(const r in t)Object.prototype.hasOwnProperty.call(t,"key")&&e.append(r,t[r]);return e.toString()}(r.body["x-www-form-urlencoded"]);break;case VO.FORM_DATA:{n["Content-Type"]=YO.FORM_DATA;const t=r.body["form-data"];for(const e in t)a.set(e,t[e]);o=a;break}}return{params:s,headers:n,interval:i,body:o,method:r.method,filter:r.filter,protocol:e.protocol}}function dT(t,e,r,i){const n=(t,e)=>{r({status:t,message:e})};e.on("reconnect",(()=>{n(ZO.CONNECT)})),e.on("close",(t=>{const e=t||new Error("连接关闭");n(ZO.CLOSE,e)})),e.on("error",(t=>{n(ZO.ERROR,t)})),e.on("message",((r,n,o)=>{i({api:t,client:e,data:{topic:r,payload:n,packet:o}})})),e.on("connect",(r=>{if(0===r.returnCode)n(ZO.SUCCESS,r),function(t,e){const r=t.configureJson,i=r.subscription;if(0==i.length)return;const n={};i.forEach((t=>{t.topic&&(n[t.topic]={qos:t.qos})})),Object.keys(n).length>0&&e.subscribe(n,(t=>{t&&console.error(t)}))}(t,e);else{const t=void 0!==r.returnCode?String(r.returnCode):r.cmd;e.emit("close",new Error(t))}}))}function pT(t,e,r,i){const n=fT(e),o=function(t){if(t.protocol!==HO.MQTT)return;const e=t.configureJson,{baseConfig:r,willMessage:i}=e,n={clientId:r.clientId,keepalive:r.keepAlive,protocolVersion:Number(r.version),protocolId:"MQTT",reconnectPeriod:0};return i&&i.topic&&(n.will={topic:i.topic,payload:i.message||"",qos:i.qos,retain:i.retain}),r.username&&(n.username=r.username),r.password&&(n.password=r.password),n}(t),s=bA.connect(n+(t.url||""),o),a=t.configureJson,{successCallback:h,errorCallback:u}=a;return dT(t,s,(({status:e,message:i})=>{const n=e!==ZO.CONNECT?i:void 0;r({api:t,client:s,status:e,message:n}),e===ZO.CONNECT&&h?lT({connect:i,client:s},h,!0):e!==ZO.ERROR&&e!==ZO.CLOSE||!u||lT({error:i,client:s},u,!0)}),i),s}function mT(t,e,r,i){let n=fT(e);const o=function(t,e){if(t.protocol!==HO.WEBSOCKET)return;const r=t.configureJson,i=Object.assign(e[zO.HEADERS],t[zO.HEADERS]),{subProtocols:n,query:o}=r,s=n?n.split(","):["websocket","polling"];return{reconnection:!1,reconnectionAttempts:0,path:t.url,query:o,transports:s,extraHeaders:i,withCredentials:!0}}(t,e),s=t.configureJson,{successCallback:a,errorCallback:h,nameSpace:u}=s;u&&(n+=(/^\/.*/.test(u)?"":"/")+u);const f=qO(n,o);return function(t,e,r,i){const n=t.configureJson,{eventList:o}=n;e.on("connect",(()=>{r(ZO.SUCCESS)})),e.on("disconnect",(t=>{r(ZO.CLOSE,new Error(t))})),e.on("connect_error",(t=>{r(ZO.ERROR,t)})),e.on("reconnect",(()=>{r(ZO.CONNECT)})),e.on("reconnect_error",(t=>{r(ZO.ERROR,t)})),e.on("reconnect_failed",(t=>{r(ZO.ERROR,t||new Error("reconnect_failed"))}));for(let r=0;r{i({api:t,client:e,data:{message:r,event:n.event}})}))}}(t,f,((e,i)=>{r({status:e,api:t,client:f,message:i}),e===ZO.SUCCESS&&a?lT({socket:f},a,!0):e!==ZO.ERROR&&e!==ZO.CLOSE||!h||lT({error:i,socket:f},h,!0)}),i),f.connect(),f}!function(t){t.PARAMS="params",t.BODY="body",t.HEADERS="headers"}(zO||(zO={})),function(t){t.HTTP="HTTP",t.MQTT="MQTT",t.WEBSOCKET="WebSocket"}(HO||(HO={})),function(t){t.HTTPS="https://",t.HTTP="http://",t.MQTTS="wss://",t.MQTT="ws://",t.WSS="wss://",t.WS="ws://"}(KO||(KO={})),function(t){t.NONE="none",t.FORM_DATA="form-data",t.X_WWW_FORM_URLENCODED="x-www-form-urlencoded",t.JSON="json",t.XML="xml"}(VO||(VO={})),function(t){t.GET="GET",t.POST="POST",t.PATCH="PATCH",t.PUT="PUT",t.OPTIONS="OPTIONS",t.DELETE="DELETE"}(GO||(GO={})),function(t){t.SECOND="second",t.MINUTE="minute",t.HOUR="hour",t.DAY="day"}(WO||(WO={})),HO.HTTP,HO.HTTP,HO.MQTT,HO.MQTT,HO.WEBSOCKET,HO.WEBSOCKET,function(t){t.JSON="application/json;charset=UTF-8",t.TEXT="text/plain;charset=UTF-8",t.XML="application/xml;charset=UTF-8",t.FORM_URLENCODED="application/x-www-form-urlencoded;charset=UTF-8",t.FORM_DATA="multipart/form-data"}(YO||(YO={})),function(t){t.SUCCESS="success",t.ERROR="error",t.CONNECT="connect",t.CLOSE="close"}(ZO||(ZO={}));class gT{constructor(t,e){this.sourceEnv=t,this.sourceApi=e,XO.add(this),QO.set(this,{}),JO.set(this,void 0),$O.set(this,void 0),D(this,XO,"m",tT).call(this)}on(t,e){"onStatus"===t?j(this,JO,e,"f"):"onMessage"===t&&j(this,$O,e,"f")}getClientById(t){return D(this,QO,"f")[t]}requestAll(){const t=this.sourceApi;t&&t.length>0&&D(this,XO,"m",nT).call(this,t)}requestById(t){const e=this.sourceApi.filter((e=>t.some((t=>t===e.id))));e&&e.length>0&&D(this,XO,"m",nT).call(this,e)}closeAll(){for(const t in D(this,QO,"f"))if(Object.prototype.hasOwnProperty.call(D(this,QO,"f"),t)){const e=D(this,QO,"f")[t];D(this,XO,"m",iT).call(this,e)}}closeById(t){for(let e=0;e0&&i)switch(r.protocol){case HO.HTTP:D(this,XO,"m",oT).call(this,r,i);break;case HO.MQTT:D(this,XO,"m",sT).call(this,r,i);break;case HO.WEBSOCKET:D(this,XO,"m",aT).call(this,r,i)}}},oT=function(t,e){let r=D(this,QO,"f")[t.id];if(r)return r.send();r=function(t,e,r,i){const n=fT(e),o=cT(t,e),s=new FO(n+t.url,o);return s.on("onSuccess",((e,r)=>{i({api:t,client:s,data:r||e})})),s.on("onError",(e=>{i({api:t,client:s,data:e})})),s.on("onStatus",((e,i)=>{r({api:t,client:s,status:e,message:i})})),s.send(),s}(t,e,D(this,XO,"m",eT).bind(this),D(this,XO,"m",rT).bind(this)),D(this,QO,"f")[t.id]=r},sT=function(t,e){let r=D(this,QO,"f")[t.id];if(r)return r.reconnect();r=pT(t,e,D(this,XO,"m",eT).bind(this),D(this,XO,"m",rT).bind(this)),D(this,QO,"f")[t.id]=r},aT=function(t,e){let r=D(this,QO,"f")[t.id];if(r)return r.connect();r=mT(t,e,D(this,XO,"m",eT).bind(this),D(this,XO,"m",rT).bind(this)),D(this,QO,"f")[t.id]=r},hT=function(t){return this.sourceEnv.find((e=>e.id===t))};const yT=(t,e)=>e.filter((e=>e.nodeId===t&&"PANEL"===e.contentType)),bT=t=>{try{return JSON.parse(t)}catch(t){return null}};var vT,wT,_T,MT,ST,ET,kT,AT,OT,TT,IT,RT,CT,PT,xT,NT,BT,LT,DT,jT,UT,qT,FT,zT,HT,KT,VT;class GT{constructor(t,e,r,i){this.treeList=t,this.poiList=e,this.plugin=r,this.cpsPlugin=i,vT.add(this),wT.set(this,{}),D(this,vT,"m",_T).call(this)}batchPoi(t,e){t.nodeArray&&0!==t.nodeArray.length&&("HTTP"===t.protocol?D(this,vT,"m",ET).call(this,t.nodeArray,e):"MQTT"===t.protocol?D(this,vT,"m",MT).call(this,t.nodeArray,e):"WebSocket"===t.protocol&&D(this,vT,"m",ST).call(this,t.nodeArray,e))}}wT=new WeakMap,vT=new WeakSet,_T=function(){if(this.treeList){const t=(t=>{const e=[],r={},i=(t,e)=>{for(const n of t){const{id:t,pid:o,familyId:s,name:a,renderType:h,path:u,children:f,deviceCode:l}=n,c=Object.assign(Object.assign({},n),{id:t,pid:o,familyId:s,name:a,renderType:h,path:u,children:[],deviceCode:l});e.push(c),r[t]=c,f.length>0&&i(f,c.children)}};return i(t,e),{treeNodes:e,flatNodes:r}})(this.treeList);j(this,wT,t.flatNodes,"f")}},MT=function(t,e){const{payload:r,topic:i}=e,n=bT(r.toString()),o=null==t?void 0:t.filter((t=>{var e;return null===(e=t.eventList)||void 0===e?void 0:e.some((t=>((t,e)=>{if(t===e)return!0;const r=t.split("/"),i=e.split("/"),n=r.indexOf("#"),o=r.indexOf("+");if(-1!==n){if(-1!==o&&o"+"===t||t===i[e]||void 0));{const r=t.indexOf("#");if(t.slice(0,r)===e.slice(0,r))return!0}}else if(-1!==o&&r.length===i.length)return r.every(((t,e)=>"+"===t||t===i[e]||void 0));return!1})(t,i)))}));o&&D(this,vT,"m",ET).call(this,o,n)},ST=function(t,e){const{event:r,message:i}=e,n=t.filter((t=>{var e;return null===(e=t.eventList)||void 0===e?void 0:e.some((t=>t===r))}));n&&D(this,vT,"m",ET).call(this,n,i)},ET=function(t,e){if(!this.poiList)return;const r=[];for(let i=0;i{if(t.contentData){const e=t.contentData.ds_user["接口数据"];if(!e)return;for(const t in s)if(Object.prototype.hasOwnProperty.call(s,t)){const r=s[t];e.hasOwnProperty(t)&&(e[t].value=r)}}})),r.push(...o))}r.length>0&&D(this,vT,"m",AT).call(this,r)},kT=function(t,e,r){const i=D(this,wT,"f")[r],n=null==i?void 0:i.deviceCode;if(i&&n)return"[object Array]"===Object.prototype.toString.call(t)?t.find((t=>String(t[e])===n)):"[object Object]"===Object.prototype.toString.call(t)?t:void 0},AT=function(t){this.plugin&&this.plugin.batchRender({dataSource:t.map(this.cpsPlugin.formatPoiData)})};class WT{get path(){return D(this,TT,"f")}set path(t){D(this,TT,"f")!==t&&j(this,IT,!0,"f"),j(this,TT,t,"f")}constructor(t,e){this.ssp=t,OT.add(this),TT.set(this,""),IT.set(this,!0),this.sceneGroup=null,this.metaData=null,this.treeData=null,this.poiData=null,this.dataSourceData=null,this.topologyData=null,this.propertiesData=null,this.objectsAnimations=new Map,this.animationsData=null,this.modelVisionsData=null,this.effectPlugin=null,this.soonflow=new class{nodeTypeMethods;outInstances;constructor(t,e){this.nodeTypeMethods=t,this.outInstances=e}async parseFlow(t,e){return new Ct(t,e,this.nodeTypeMethods,this.outInstances).runParse()}unregisterFlow(t,e){new Pt(t,e,this.nodeTypeMethods,this.outInstances)}}(Hi,{ssp:this.ssp,cpsManager:this}),this.flowData=null,RT.set(this,rA),CT.set(this,new hA(this.ssp.viewport)),PT.set(this,!1),xT.set(this,!1),NT.set(this,!1),this.formatPoiData=t=>{const{dimensional:e,poiId:r,media:i,display:n,scale:o,x:s,y:a,z:h,rotationX:u,rotationY:f,rotationZ:l,width:c,height:d,nodeId:p,contentType:m,style:g,contentData:y}=t;return{id:r,pid:p,visible:n,width:c,height:d,type:e,contentType:m,position:{x:s,y:a,z:h},rotation:{x:Math.PI/180*u,y:Math.PI/180*f,z:Math.PI/180*l},scale:{x:o/100,y:o/100,z:o/100},style:g,dataSource:(b=y,null==b?[]:Fk(b,((t,e)=>Fk(t,((t,r)=>Fk(t,((t,i)=>({index:t.index,value:t.value||"",group:r,key:i,label:t.label||i,customId:[e,r,i].join("/"),dataOrigin:e})))),2)))),fileUrl:(null==i?void 0:i.assetId)||(null==i?void 0:i.fileId)?(null==i?void 0:i.url)?D(this,OT,"m",FT).call(this,i.url):void 0:null==i?void 0:i.url};var b},(null==e?void 0:e.key)&&this.setKey(e.key),(null==e?void 0:e.path)&&this.setPath(e.path)}setKey(t){t!==lA(D(this,RT,"f").debugKey)&&(D(this,RT,"f").key=t)}async fetchMetaData(){const t=await D(this,OT,"m",zT).call(this,zk);return this.metaData=t,t}async fetchTreeData(){const t=await D(this,OT,"m",zT).call(this,Kk);return this.treeData=t,t}async fetchPoiData(){const t=await D(this,OT,"m",zT).call(this,Vk);return this.poiData=t.map((t=>Object.assign(Object.assign({},t),{contentData:JSON.parse(t.content||"{}")}))),this.poiData}async fetchDataSourceData(){const t=await D(this,OT,"m",zT).call(this,Gk);return this.dataSourceData=t,t}async fetchTopologyData(){const t=await D(this,OT,"m",zT).call(this,Wk).then((t=>{const e={linkWidth:.1,linkColor:["#00ff00"],nodeRadius:.05,nodeColor:"#0000ff"};return t.map((t=>{const r=Object.assign(Object.assign({},e),t);return r.imgUrl&&(r.imgUrl=`${this.path}${r.imgUrl}`),r}))}));return this.topologyData=t,t}async fetchPropertiesData(){const t=await D(this,OT,"m",zT).call(this,Yk).then((t=>cA(t,"modelId")));return this.propertiesData=t,t}async fetchAnimationsData(){const t=await D(this,OT,"m",zT).call(this,Zk).then((t=>cA(t,"modelId")));return this.animationsData=t,t}async fetchModelVisionsData(){const t=await D(this,OT,"m",zT).call(this,Xk).then((t=>new Map(Object.entries(t))));return this.modelVisionsData=t,t}async loadPoi(t=!1){var e,r;const i=this.ssp.getPlugin(Jk)||this.ssp.registerPlugin(W,Jk);try{await this.fetchPoiData(),i.batchRender({dataSource:null!==(r=null===(e=this.poiData)||void 0===e?void 0:e.map(this.formatPoiData))&&void 0!==r?r:[]}),t&&this.refreshPoiByDataSource()}catch(t){}}async refreshPoiByDataSource(){const t=this.ssp.getPlugin(Jk)||this.ssp.registerPlugin(W,Jk);try{const{dataSources:e,dataSourceApis:r}=await this.fetchDataSourceData(),i=new GT(this.treeData,this.poiData,t,this);if(e&&r){const t=new gT(e,r);t.requestAll(),t.on("onMessage",(({api:t,data:e})=>{i.batchPoi(t,e)}))}}catch(t){}}getTreeNodeById(t,e=this.treeData){if(!e)return;const r=e.find((e=>e.id===t));if(r)return r;for(let r=0;r=1.2&&D(this,IT,"f")){if(await D(this,OT,"m",BT).call(this),!D(this,PT,"f")&&!D(this,xT,"f"))return Promise.reject(`未授权的场景包:${this.path}`);!D(this,PT,"f")&&D(this,xT,"f")&&(D(this,NT,"f")||D(this,CT,"f").addToViewport()),j(this,IT,!1,"f")}else i<1.2&&(this.treeData=await this.fetchTreeData());const n=Object.assign({syncProperties:!0,syncModelVisions:!0,needsModelsBoundsTree:!0,applyPresetEffects:!1,loadSceneAlgorithm:eA.DFS,loadLevel:1/0,loadPoi:!1,refreshPoiByDataSource:!1,loadFlowData:!1,objectPrefixId:"",asId:"sid"},t);this.sceneGroup||(this.sceneGroup=this.ssp.createGroup(Object.assign({name:"root",id:this.path},n.sceneGroupInfo)));const o=[];n.syncProperties&&o.push(this.fetchPropertiesData()),n.syncModelVisions&&o.push(this.fetchModelVisionsData()),await Promise.allSettled(o),n.loadSceneAlgorithm===eA.BFS?await D(this,OT,"m",VT).call(this,n):n.loadSceneAlgorithm===eA.DFS&&await D(this,OT,"m",KT).call(this,n),this.ssp.updateAllDecalGeometry({snapping:!0,snappingDistance:1,uvMap:0});const s=[];n.applyPresetEffects&&s.push(this.presetEffects()),n.loadPoi&&s.push(this.loadPoi(n.refreshPoiByDataSource)),n.loadFlowData&&s.push(this.loadFlowData()),await Promise.allSettled(s),n.needsModelsBoundsTree&&this.ssp.computeModelsBoundsTree()}async presetEffects(t={}){var e,r,i,n,o,s,a;const{hdr:h=!0,ssao:u=!0,directionalLightShadow:c=!0,toneMappping:d=!0}=t;await this.ssp.render();const{environment:p,previewSettings:m}=await this.fetchMetaData(),g=null!==(e=bT(null!=m?m:""))&&void 0!==e?e:{};if(h&&p&&"default"!==(null===(r=g.environment)||void 0===r?void 0:r.HDR)&&this.ssp.setEnvironment({file:`${this.path}${p}`,background:null===(i=g.environment)||void 0===i?void 0:i.background}),u&&this.ssp.setSSAO(Object.assign({enabled:u},g.ssao)),c){const t=`${this.path}_directionalLight`;this.ssp.removeObjectById(t);const e=this.ssp.getAllModel().reduce(((t,e)=>t.union(this.ssp.utils.getBoundingBox(e.children[0]))),new f),{min:r,max:i}=e,h=new l;e.getSize(h);let u=null!==(o=null===(n=g.directionalLight)||void 0===n?void 0:n.degree)&&void 0!==o?o:45;this.ssp.utils.isObject(c)&&"number"==typeof c.angle&&(u=c.angle);const d=Math.tan(Math.PI/180*u)*h.x;this.ssp.createDirectionalLight({id:t,name:"directionalLight",position:{x:i.x,y:d,z:i.z},target:{x:r.x,y:r.y,z:r.z},openShadow:!0,shadowAutoUpdate:!1,intensity:null!==(a=null===(s=g.directionalLight)||void 0===s?void 0:s.intensity)&&void 0!==a?a:10,mapSize:this.ssp.viewport.renderer.capabilities.maxTextureSize/2})}d&&this.ssp.setToneMapping(Object.assign({},g.toneMappping))}async getTopologies(){return this.fetchTopologyData()}sortTopologyNodes(t,e){var r;const i=t.nodes.reduce(((t,e)=>(t.set(e.id,e),t)),new Map);if(e&&!i.has(e))return void this.ssp.utils.error(`startNodeId ${e} 未找到对应 node`);let n=e?i.get(e):t.nodes[0];if(!n)return;const o=new Set;o.add(n);for(let e=0;e{t.position.set(e.x,e.y,e.z),t.rotation.set(e.rotationX,e.rotationY,e.rotationZ),t.scale.set(e.scaleX,e.scaleY,e.scaleZ),null==h||h(e,r)}),(t=>{var e;this.objectsAnimations.has(f)||this.objectsAnimations.set(f,new Set),null===(e=this.objectsAnimations.get(f))||void 0===e||e.add(t),null==a||a(t)}))}return!0}catch(t){}else n(`id: ${f} 未找到索引为 ${e} 的动画`)}else n(`id: ${f} 未找到动画`);return!1}async stopObjectAnimation(t){var e,r;const i=t.sid;return!!this.objectsAnimations.has(i)&&(null===(e=this.objectsAnimations.get(i))||void 0===e||e.forEach((t=>t.stop())),null===(r=this.objectsAnimations.get(i))||void 0===r||r.clear(),!0)}async flyToSceneFromVisionsData(t=0){const{utils:{error:e}}=this.ssp;if(this.modelVisionsData||await this.fetchModelVisionsData(),this.modelVisionsData){const r=this.modelVisionsData.get(""),i=null==r?void 0:r[t];if(i){const{camera:t,position:e,target:r,zoom:n=1}=i;return await this.ssp.setCamera("O"===t?"orthographic":"perspective",{position:e,target:r,zoom:n},!0),!0}e("场景视角数据未找到")}return!1}async flyToMainSceneFromVisionsData(t=!0){if(this.modelVisionsData||await this.fetchModelVisionsData(),this.modelVisionsData){const t=this.modelVisionsData.get("");if(t){const e=t.findIndex((t=>t.primary));if(e>-1)return this.flyToSceneFromVisionsData(e)}}return t&&this.ssp.flyMainViewpoint(),!1}async flyToObjectFromVisionsData(t,e=0){const{utils:{error:r}}=this.ssp;if(this.modelVisionsData||await this.fetchModelVisionsData(),this.modelVisionsData){const i=this.modelVisionsData.get(t.sid),n=null==i?void 0:i[e];if(n){const{camera:t,position:e,target:r,zoom:i=1}=n;return await this.ssp.setCamera("O"===t?"orthographic":"perspective",{position:e,target:r,zoom:i},!0),!0}r("对象视角数据未找到")}return!1}async flyToMainObjectFromVisionsData(t,e=!0){if(this.modelVisionsData||await this.fetchModelVisionsData(),this.modelVisionsData){const e=this.modelVisionsData.get(t.sid);if(e){const r=e.findIndex((t=>t.primary));if(r>-1)return this.flyToObjectFromVisionsData(t,r)}}return e&&this.ssp.flyToObj(t),!1}async loadFlowData(){const t=new Nt(this.path),{flowList:e}=await t.getFlowData();return this.flowData=e,e}async runFlowById(t){if(!this.flowData)return Promise.reject("CpsManagerPlugin.runFlowById(): 请先调用 loadFlowData 获取 flowData");const e=this.flowData.find((e=>e.id===t));if(!e)return Promise.reject(`CpsManagerPlugin.runFlowById() flowData not found by flowId(${t})`);const{nodes:r,edges:i}=e;return this.soonflow.parseFlow(r,i)}}TT=new WeakMap,IT=new WeakMap,RT=new WeakMap,CT=new WeakMap,PT=new WeakMap,xT=new WeakMap,NT=new WeakMap,OT=new WeakSet,BT=async function(){let e;const{resource:r}=await this.fetchMetaData();if(D(this,RT,"f").verifyKey){if(e=await D(this,OT,"m",LT).call(this,r),"forbid"===e)return void j(this,PT,!1,"f");if("noServerEnc"===e)await D(this,OT,"m",UT).call(this,r);else{const t=D(this,RT,"f").verifyKey,{verifiedRes:r,dec:i}=D(this,OT,"m",jT).call(this,e,t);j(this,PT,r,"f"),D(this,PT,"f")&&(this.treeData=i)}}else if(D(this,RT,"f").key){const{verifiedRes:t}=await D(this,OT,"m",qT).call(this,r);t||await D(this,OT,"m",UT).call(this,r)}else D(this,RT,"f").debugKey?await D(this,OT,"m",UT).call(this,r):t.utils.error("许可证密钥不存在")},LT=async function(t){const e=Math.random().toString(36).substring(2),{verifyKey:r}=D(this,RT,"f"),i=new mM(r,"pkcs8-public",{signingScheme:"pkcs1-md5",encryptionScheme:"pkcs1"}),n=i.encrypt(e,"base64"),o=await D(this,OT,"m",DT).call(this,D(this,OT,"m",FT).call(this,t),n),{license:s,serverEnc:a}=o;if(!a)return"noServerEnc";return i.decryptPublic(a,"utf8")!==e?"forbid":s},DT=async function(t,e=""){try{const r=await fetch(t,{headers:{token:e}}),i=r.headers,n=await r.json();return{license:n,serverEnc:i.get("token")}}catch(t){return{license:{content:"",sign:""},serverEnc:""}}},jT=function(t,e){let r=null,i=!0;try{const i=new mM(e,"pkcs8-public",{signingScheme:"pkcs1-md5",encryptionScheme:"pkcs1"});if(2===t.version)r=dA(t,i);else r=((t,e)=>{const{content:r,sign:i}=t;if(!e.verify(r,i,"base64","base64"))throw new Error("v1 error");return e.decryptPublic(r,"json")})(t,i)}catch(t){i=!1,this.ssp.utils.error("秘钥 key 验证失败")}return{verifiedRes:i,dec:r}},UT=async function(t){const e=await D(this,OT,"m",zT).call(this,t),r=lA(D(this,RT,"f").debugKey),{verifiedRes:i,dec:n}=D(this,OT,"m",jT).call(this,e,r);j(this,xT,i,"f"),D(this,xT,"f")&&(this.treeData=n)},qT=async function(t){const e=await D(this,OT,"m",zT).call(this,t),r=D(this,RT,"f").key,{verifiedRes:i,dec:n}=D(this,OT,"m",jT).call(this,e,r);return j(this,NT,i,"f"),j(this,xT,i,"f"),D(this,NT,"f")&&(this.treeData=n),{verifiedRes:i,dec:n}},FT=function(t){const e=D(this,TT,"f");if(e){t=(t=/\?([^/?&#:]+=[^?&]+&)*[^/?&#:]+=.*$/.test(e)?encodeURIComponent(t):encodeURI(t)).replaceAll(/#/g,"%23")}return`${e}${t}`},zT=async function(t){const{utils:e}=this.ssp;return e.fetchFile(D(this,OT,"m",FT).call(this,t),"json")},HT=async function(t,e){var r,i;const{syncProperties:n,hiddenObjects:o,objectPrefixId:s}=e,{name:a,renderType:h,path:u,matrix:f,shape:l,visible:d}=t,p=null!==(i=t[null!==(r=e.asId)&&void 0!==r?r:"sid"])&&void 0!==i?i:t.sid,m=`${s}${p}`,{ssp:g}=this,y=(new c).fromArray(f),b=this.ssp.getObjectById(m);if(b)return b;let v=null,w=d;if((null==o?void 0:o.has(p))&&(w=!1),"3D"===h)if(u)try{v=await g.loadModel({id:m,url:D(this,OT,"m",FT).call(this,u)})}catch(t){console.error(t)}else g.utils.warn(`id: ${p} path 为空`);else if("GROUP"===h||"STUB"===h)v=g.createGroup({id:m});else if("POLYGON"===h||"CIRCLE"===h){const t=g.createCanvas3D({id:m});l&&("POLYGON"===h&&l.points?t.createPolygon({id:`polygon/${m}`,yHeight:l.height,points:l.points,color:"blue",opacity:.5}):"CIRCLE"===h&&t.createCircle({id:`circle/${m}`,radius:l.radius,color:"blue",opacity:.5})),v=t}else"AREA"===h||"FLOOR"===h||"ROOM"===h?v=function(t,e){const{id:r,name:i,shape:n,extra:o}=e;if((null==n?void 0:n.points)&&n.points.length>0){const{points:e}=n;return t.createCanvas3D({id:r,name:i,polygons:[{id:`${r}/polygon`,points:e,depth:(null==n?void 0:n.depth)||0,yHeight:(null==n?void 0:n.height)||0,color:(null==o?void 0:o.color)||"#00f",opacity:(null==o?void 0:o.alpha)||.5}]})}return null}(this.ssp,t):"WATER_SURFACE"===h?v=function(t,e){var r,i,n,o,s;const{effectPlugin:a}=t;if(!a)return fA("无法创建水面,请设置 CpsSoonmanagerPlugin.effectPlugin 属性"),null;const{id:h,name:u,shape:f,extra:l={}}=e;return f&&f.points&&f.points.length>0?a.createWater({id:h,name:u,polygon:f.points,sunColor:null!==(r=l.sunColor)&&void 0!==r?r:"#ffffff",waterColor:null!==(i=l.waterColor)&&void 0!==i?i:"#7F7F7F",distortionScale:null!==(n=l.distortionScale)&&void 0!==n?n:20,alpha:null!==(o=l.alpha)&&void 0!==o?o:1,speed:null!==(s=l.speed)&&void 0!==s?s:1}):null}(this,t):"DECAL"===h&&(v=await async function(t,e){const{id:r,name:i,path:n}=e;return n?await t.createDecal({id:r,name:i,url:n,snapping:!1}):null}(this.ssp,t));if(v){!1===w&&v.hide(),v.name=a,y.decompose(v.position,v.quaternion,v.scale);const e=Object.assign({},t);if(Reflect.deleteProperty(e,"children"),v.userData=e,n&&this.propertiesData){const t=this.propertiesData.get(p);t&&(v.userData[Qk]=t)}}return v},KT=async function(e){const{loadLevel:r,loadTargetId:i}=e;let n=null;if(i){const e=this.getTreeNodeById(i);e?n=[e]:t.utils.error("根据 loadTargetId 未找到对应树节点")}else n=this.treeData;if(!n)return t.utils.error("treeData is null");const o=async(t,i,n=0)=>{if(n++,r&&n>r)return;const{ssp:s}=this,a=await D(this,OT,"m",HT).call(this,t,e);a&&s.addObject(a,null!=i?i:this.sceneGroup),await Promise.allSettled(t.children.map((t=>o(t,a,n))))};await Promise.allSettled(n.map((t=>o(t,t.pid?this.ssp.getObjectById(t.pid):null,0))))},VT=async function(e){if(!this.treeData)return void t.utils.error("treeData is null");const r=[],i=Object.create(null),n=[],{ssp:o}=this;for(r.push(...this.treeData);r.length>0;){r.splice(0,r.length).forEach((t=>{n.push(t),r.push(...t.children.map((e=>(i[e.id]=t.id,e))))}))}await Promise.allSettled(n.map((t=>D(this,OT,"m",HT).call(this,t,e)))),Object.entries(i).forEach((([t,e])=>{const r=o.getObjectById(t),i=o.getObjectById(e);r&&o.addObject(r,null!=i?i:this.sceneGroup)}))};export{Zk as ANIMATIONS_DATA_FILE_PATH,Gk as DATA_SOURCE_FILE_PATH,eA as LoadSceneAlgorithm,zk as META_DATA_FILE_PATH,Xk as MODEL_VISIONS_DATA_FILE_PATH,Vk as POI_DATA_FILE_PATH,Jk as POI_PLUGIN_NAME,Yk as PROPERTIES_DATA_FLEE_PATH,Qk as PROPERTIES_KEY,$k as PoiContentTypeEnum,Hk as SIGN_PATH,Wk as TOPOLOGY_DATA_FILE_PATH,Kk as TREE_DATA_FILE_PATH,WT as default}; diff --git a/page/plugin/cpsScheme.html b/page/plugin/cpsScheme.html index a8fa0b5c..fa01496f 100644 --- a/page/plugin/cpsScheme.html +++ b/page/plugin/cpsScheme.html @@ -97,6 +97,7 @@ cpsSoonmanagerPlugin.setPath(path); await cpsSoonmanagerPlugin.loadScene({ loadFlowData: true, + asId: 'id' }); await ssp.flyMainViewpoint(undefined, { duration: 0 }); diff --git a/page/plugin/cpsSoonmanager.html b/page/plugin/cpsSoonmanager.html index 5542b694..41f2b1c4 100644 --- a/page/plugin/cpsSoonmanager.html +++ b/page/plugin/cpsSoonmanager.html @@ -72,6 +72,7 @@ */ await cpsSoonmanagerPlugin.loadScene({ loadSceneAlgorithm: LoadSceneAlgorithm.DFS, + asId: 'id' }); /** diff --git a/page/plugin/cpsSoonmanagerLevel.html b/page/plugin/cpsSoonmanagerLevel.html index 11a51c10..0295ba2c 100644 --- a/page/plugin/cpsSoonmanagerLevel.html +++ b/page/plugin/cpsSoonmanagerLevel.html @@ -54,8 +54,10 @@ }, }); - const cpsSoonmanagerPlugin = (window.cpsSoonmanagerPlugin = - ssp.registerPlugin(CpsSoonmanagerPlugin, 'cpsSoonmanagerPlugin')); + const cpsSoonmanagerPlugin = (window.cpsSoonmanagerPlugin = ssp.registerPlugin( + CpsSoonmanagerPlugin, + 'cpsSoonmanagerPlugin' + )); cpsSoonmanagerPlugin.setPath('../../assets/sceneData/cps/智慧园区'); @@ -68,34 +70,39 @@ cpsSoonmanagerPlugin.loadScene({ loadTargetId: '8M626VCDV6N6', loadLevel: 1, + asId: 'id', }); }, '2F': () => { cpsSoonmanagerPlugin.loadScene({ loadTargetId: '8M626VCDV6N8', loadLevel: 1, + asId: 'id', }); }, '3F': () => { cpsSoonmanagerPlugin.loadScene({ loadTargetId: '8M626VCDV6NA', loadLevel: 1, + asId: 'id', }); }, '4F': () => { cpsSoonmanagerPlugin.loadScene({ loadTargetId: '8M626VCDV6N9', loadLevel: 1, + asId: 'id', }); }, '5F': () => { cpsSoonmanagerPlugin.loadScene({ loadTargetId: '8M626VCDV6N7', loadLevel: 1, + asId: 'id', }); }, 加载全部: () => { - cpsSoonmanagerPlugin.loadScene(); + cpsSoonmanagerPlugin.loadScene({ asId: 'id' }); }, 清空: () => { ssp.getAllModel().forEach((model) => ssp.removeObject(model)); diff --git a/page/plugin/firstPersonControls.html b/page/plugin/firstPersonControls.html index f9942f77..934342c6 100644 --- a/page/plugin/firstPersonControls.html +++ b/page/plugin/firstPersonControls.html @@ -60,20 +60,21 @@ /** * load scene */ - const cpsSoonmanagerPlugin = (window.cpsSoonmanagerPlugin = - ssp.registerPlugin(CpsSoonmanagerPlugin, 'cpsSoonmanagerPlugin')); + const cpsSoonmanagerPlugin = (window.cpsSoonmanagerPlugin = ssp.registerPlugin( + CpsSoonmanagerPlugin, + 'cpsSoonmanagerPlugin' + )); cpsSoonmanagerPlugin.setPath('../../assets/sceneData/2.0/东方之门0525'); - await cpsSoonmanagerPlugin.loadScene(); + await cpsSoonmanagerPlugin.loadScene({ + asId: 'id', + }); /** * 第一人称 */ - const firstPersonControls = ssp.registerPlugin( - FirstPersonControlsPlugin, - 'firstPersonControls' - ); + const firstPersonControls = ssp.registerPlugin(FirstPersonControlsPlugin, 'firstPersonControls'); firstPersonControls.start({ position: { x: 37, y: 5, z: 4 }, diff --git a/page/plugin/tiles-demo.html b/page/plugin/tiles-demo.html index 298efec7..be0cd8c9 100644 --- a/page/plugin/tiles-demo.html +++ b/page/plugin/tiles-demo.html @@ -58,18 +58,11 @@ const tilesPlugin = ssp.registerPlugin(TilesPlugin, 'tilesPlugin'); - const baseUrl = - 'https://xunwweiresource.oss-cn-shenzhen.aliyuncs.com/3dtiles/杭州交规院'; + const baseUrl = 'https://xunwweiresource.oss-cn-shenzhen.aliyuncs.com/3dtiles/杭州交规院'; - const tiles = await tilesPlugin.loadTiles( - baseUrl + '/交规院1101块/tileset.json' - ); - const tiles1 = await tilesPlugin.loadTiles( - baseUrl + '/交规院1022块/tileset.json' - ); - const tiles2 = await tilesPlugin.loadTiles( - baseUrl + '/交规院1027块/tileset.json' - ); + const tiles = await tilesPlugin.loadTiles(baseUrl + '/交规院1101块/tileset.json'); + const tiles1 = await tilesPlugin.loadTiles(baseUrl + '/交规院1022块/tileset.json'); + const tiles2 = await tilesPlugin.loadTiles(baseUrl + '/交规院1027块/tileset.json'); window.tilesArr = [tiles, tiles1, tiles2]; @@ -110,14 +103,16 @@ controls.camera.up.copy(up); controls.updateCameraUp(); - const cpsSoonmanagerPlugin = (window.cpsSoonmanagerPlugin = - ssp.registerPlugin(CpsSoonmanagerPlugin, 'cpsSoonmanagerPlugin')); + const cpsSoonmanagerPlugin = (window.cpsSoonmanagerPlugin = ssp.registerPlugin( + CpsSoonmanagerPlugin, + 'cpsSoonmanagerPlugin' + )); cpsSoonmanagerPlugin.setPath(baseUrl + '/杭州交规院Scene'); cpsSoonmanagerPlugin.setKey( 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCOcXDr8lcaQcg5b6XSK4ov9//GTEynWkfalnawqQK5ngATR5sFastfaVQK7ISRNlsZ/trggyXZPTmBD3m+Uy2e6PtELOIhusie8n4xGjno2ZhRu5dB8IuzFyEDM05WwHNlUFJPKInVikyLzmW1wKO/j69PAnsULsHwcMVLb6pKmQIDAQAB' ); - await cpsSoonmanagerPlugin.loadScene({ needsModelsBoundsTree: false }); + await cpsSoonmanagerPlugin.loadScene({ needsModelsBoundsTree: false, asId: 'id' }); // await ssp.computeModelsBoundsTree(); // const modelGroup = await ssp.loadModel({ // id: 'test-opt', @@ -126,17 +121,8 @@ const [modelGroup] = ssp.getObjectByName('编组1'); - modelGroup.position.set( - ...[-2763238.779194681, 4758145.7093269, 3214945.9224052825] - ); - modelGroup.rotation.set( - ...[ - -2.6640808767967856, - -0.25157887271232854, - 2.6848083784246044, - 'XYZ', - ] - ); + modelGroup.position.set(...[-2763238.779194681, 4758145.7093269, 3214945.9224052825]); + modelGroup.rotation.set(...[-2.6640808767967856, -0.25157887271232854, 2.6848083784246044, 'XYZ']); // 重置中心点 // ssp.signals.click.add((event) => { @@ -178,9 +164,7 @@ ssp.signals.sceneRendered.add(() => { const totalLoaded = - tiles.lruCache.itemList.length - - tiles.parseQueue.items.length - - tiles.downloadQueue.items.length; + tiles.lruCache.itemList.length - tiles.parseQueue.items.length - tiles.downloadQueue.items.length; const { calls, triangles } = ssp.viewport.renderer.info.render; infoEl.innerText = diff --git a/page/sceneTool/sky-ocean-1.html b/page/sceneTool/sky-ocean-1.html index d8efe946..71d16aa9 100644 --- a/page/sceneTool/sky-ocean-1.html +++ b/page/sceneTool/sky-ocean-1.html @@ -75,7 +75,7 @@ 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDO0R1vcfWt4v2SoWDdODBA6NoMhRW1jBXta5AJNCRcIhdipCDni/ef23Vnqop2Cjbb8G3iMm62tuZn47RXeKRs1/41kuQL2/Vhra2kdenJIQ5txNxUReRtrsih/seOnU/vpNmSZcX8l/iWPmwp5ERFHosYXqnpEsyMaw/8Z7npSQIDAQAB' ); cpsSoonmanagerPlugin.setPath('../../assets/sceneData/上海长江大桥demo_导入'); - await cpsSoonmanagerPlugin.loadScene(); + await cpsSoonmanagerPlugin.loadScene({ asId: 'id' }); // 动画播放 const animationsData = await cpsSoonmanagerPlugin.fetchAnimationsData(); diff --git a/page/topology/topologyPassable.html b/page/topology/topologyPassable.html index 0fc0952f..d1a4ef29 100644 --- a/page/topology/topologyPassable.html +++ b/page/topology/topologyPassable.html @@ -44,17 +44,17 @@ ssp.setModelDracoDecoderPath('../../libs/soonspacejs/draco/'); - const cpsSoonmanagerPlugin = (window.cpsSoonmanagerPlugin = - ssp.registerPlugin(CpsSoonmanagerPlugin, 'cpsSoonmanagerPlugin')); + const cpsSoonmanagerPlugin = (window.cpsSoonmanagerPlugin = ssp.registerPlugin( + CpsSoonmanagerPlugin, + 'cpsSoonmanagerPlugin' + )); - cpsSoonmanagerPlugin.setPath( - '../../assets/sceneData/cps/养正-建模-首层平面图讯维视图' - ); + cpsSoonmanagerPlugin.setPath('../../assets/sceneData/cps/养正-建模-首层平面图讯维视图'); /** * 加载场景 */ - await cpsSoonmanagerPlugin.loadScene(); + await cpsSoonmanagerPlugin.loadScene({ asId: 'id' }); /** * 加载拓扑路径数据