From d7112b77e3fa9ffc3012c0c566824c7891cf73c7 Mon Sep 17 00:00:00 2001 From: Eve Martin Date: Mon, 22 Jul 2024 16:05:16 +0000 Subject: [PATCH 01/22] add python den game pages --- game/migrations/0095_level_ideenabled.py | 18 ++ game/models.py | 1 + game/static/game/css/game.css | 24 ++ game/static/game/image/python_den_header.svg | 21 ++ game/static/game/js/game.js | 6 + game/static/game/js/web-component.js | 324 +++++++++++++++++++ game/templates/game/game.html | 44 ++- 7 files changed, 422 insertions(+), 16 deletions(-) create mode 100644 game/migrations/0095_level_ideenabled.py create mode 100644 game/static/game/image/python_den_header.svg create mode 100644 game/static/game/js/web-component.js diff --git a/game/migrations/0095_level_ideenabled.py b/game/migrations/0095_level_ideenabled.py new file mode 100644 index 000000000..9161e5e15 --- /dev/null +++ b/game/migrations/0095_level_ideenabled.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.25 on 2024-07-19 16:18 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('game', '0094_add_hint_lesson_subtitle_to_levels'), + ] + + operations = [ + migrations.AddField( + model_name='level', + name='ideEnabled', + field=models.BooleanField(default=False), + ), + ] diff --git a/game/models.py b/game/models.py index 8e047dfe3..d1d286fa5 100644 --- a/game/models.py +++ b/game/models.py @@ -150,6 +150,7 @@ class Level(models.Model): blocklyEnabled = models.BooleanField(default=True) pythonEnabled = models.BooleanField(default=True) pythonViewEnabled = models.BooleanField(default=False) + ideEnabled = models.BooleanField(default=False) theme_name = models.CharField( max_length=10, choices=theme_choices(), blank=True, null=True, default=None ) diff --git a/game/static/game/css/game.css b/game/static/game/css/game.css index 55405ac83..dbe6708f1 100644 --- a/game/static/game/css/game.css +++ b/game/static/game/css/game.css @@ -393,3 +393,27 @@ div > .navigation_button_kurono { bottom: 0px; background-image : url('/static/game/image/actions/btn_zoom_in.svg'); } + +/**************/ +/* Python den */ +/**************/ + +.game-header { + width: 100%; +} + +.game-background { + background-color: #1E30A6; +} + +.header-exit-button { + position: absolute; + left: 0px; + height: 50px; + width: 120px; + opacity: 0; +} + +::part(editor-root) { + height: 1000px; +} \ No newline at end of file diff --git a/game/static/game/image/python_den_header.svg b/game/static/game/image/python_den_header.svg new file mode 100644 index 000000000..bc58666f1 --- /dev/null +++ b/game/static/game/image/python_den_header.svg @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/game/static/game/js/game.js b/game/static/game/js/game.js index de61d6755..92d4876ef 100644 --- a/game/static/game/js/game.js +++ b/game/static/game/js/game.js @@ -906,6 +906,12 @@ ocargo.Game.prototype._setupPythonTab = function () { }.bind(this) ) + $('#header_exit_button').click( + function (e) { + window.location.href = RETURN_URL + }.bind(this) + ) + $('#convert_from_blockly').click( function (e) { ocargo.pythonControl.appendCode( diff --git a/game/static/game/js/web-component.js b/game/static/game/js/web-component.js new file mode 100644 index 000000000..d07d4f298 --- /dev/null +++ b/game/static/game/js/web-component.js @@ -0,0 +1,324 @@ +!function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=430)}([function(e,t,n){"use strict";e.exports=n(204)},function(e,t,n){"use strict";n.r(t),n.d(t,"ACESFilmicToneMapping",(function(){return ne})),n.d(t,"AddEquation",(function(){return O})),n.d(t,"AddOperation",(function(){return Z})),n.d(t,"AdditiveAnimationBlendMode",(function(){return Tt})),n.d(t,"AdditiveBlending",(function(){return S})),n.d(t,"AlphaFormat",(function(){return Ie})),n.d(t,"AlwaysDepth",(function(){return U})),n.d(t,"AlwaysStencilFunc",(function(){return nn})),n.d(t,"AmbientLight",(function(){return Bd})),n.d(t,"AmbientLightProbe",(function(){return nh})),n.d(t,"AnimationClip",(function(){return ud})),n.d(t,"AnimationLoader",(function(){return vd})),n.d(t,"AnimationMixer",(function(){return Rh})),n.d(t,"AnimationObjectGroup",(function(){return Ph})),n.d(t,"AnimationUtils",(function(){return Zu})),n.d(t,"ArcCurve",(function(){return yc})),n.d(t,"ArrayCamera",(function(){return Ja})),n.d(t,"ArrowHelper",(function(){return Sp})),n.d(t,"Audio",(function(){return fh})),n.d(t,"AudioAnalyser",(function(){return _h})),n.d(t,"AudioContext",(function(){return Kd})),n.d(t,"AudioListener",(function(){return ph})),n.d(t,"AudioLoader",(function(){return eh})),n.d(t,"AxesHelper",(function(){return xp})),n.d(t,"AxisHelper",(function(){return rf})),n.d(t,"BackSide",(function(){return m})),n.d(t,"BasicDepthPacking",(function(){return It})),n.d(t,"BasicShadowMap",(function(){return u})),n.d(t,"BinaryTextureLoader",(function(){return cf})),n.d(t,"Bone",(function(){return Ll})),n.d(t,"BooleanKeyframeTrack",(function(){return rd})),n.d(t,"BoundingBoxHelper",(function(){return of})),n.d(t,"Box2",(function(){return Qh})),n.d(t,"Box3",(function(){return cr})),n.d(t,"Box3Helper",(function(){return gp})),n.d(t,"BoxBufferGeometry",(function(){return co})),n.d(t,"BoxGeometry",(function(){return co})),n.d(t,"BoxHelper",(function(){return mp})),n.d(t,"BufferAttribute",(function(){return Oi})),n.d(t,"BufferGeometry",(function(){return Qi})),n.d(t,"BufferGeometryLoader",(function(){return Gd})),n.d(t,"ByteType",(function(){return ke})),n.d(t,"Cache",(function(){return hd})),n.d(t,"Camera",(function(){return mo})),n.d(t,"CameraHelper",(function(){return hp})),n.d(t,"CanvasRenderer",(function(){return df})),n.d(t,"CanvasTexture",(function(){return gc})),n.d(t,"CapsuleBufferGeometry",(function(){return Fc})),n.d(t,"CapsuleGeometry",(function(){return Fc})),n.d(t,"CatmullRomCurve3",(function(){return Oc})),n.d(t,"CineonToneMapping",(function(){return te})),n.d(t,"CircleBufferGeometry",(function(){return zc})),n.d(t,"CircleGeometry",(function(){return zc})),n.d(t,"ClampToEdgeWrapping",(function(){return de})),n.d(t,"Clock",(function(){return ah})),n.d(t,"Color",(function(){return Hn})),n.d(t,"ColorKeyframeTrack",(function(){return id})),n.d(t,"ColorManagement",(function(){return Ln})),n.d(t,"CompressedTexture",(function(){return mc})),n.d(t,"CompressedTextureLoader",(function(){return yd})),n.d(t,"ConeBufferGeometry",(function(){return Qc})),n.d(t,"ConeGeometry",(function(){return Qc})),n.d(t,"CubeCamera",(function(){return bo})),n.d(t,"CubeReflectionMapping",(function(){return oe})),n.d(t,"CubeRefractionMapping",(function(){return se})),n.d(t,"CubeTexture",(function(){return vo})),n.d(t,"CubeTextureLoader",(function(){return Sd})),n.d(t,"CubeUVReflectionMapping",(function(){return ce})),n.d(t,"CubicBezierCurve",(function(){return Cc})),n.d(t,"CubicBezierCurve3",(function(){return Mc})),n.d(t,"CubicInterpolant",(function(){return Ku})),n.d(t,"CullFaceBack",(function(){return a})),n.d(t,"CullFaceFront",(function(){return l})),n.d(t,"CullFaceFrontBack",(function(){return c})),n.d(t,"CullFaceNone",(function(){return s})),n.d(t,"Curve",(function(){return bc})),n.d(t,"CurvePath",(function(){return jc})),n.d(t,"CustomBlending",(function(){return k})),n.d(t,"CustomToneMapping",(function(){return re})),n.d(t,"CylinderBufferGeometry",(function(){return Uc})),n.d(t,"CylinderGeometry",(function(){return Uc})),n.d(t,"Cylindrical",(function(){return zh})),n.d(t,"Data3DTexture",(function(){return nr})),n.d(t,"DataArrayTexture",(function(){return er})),n.d(t,"DataTexture",(function(){return Bl})),n.d(t,"DataTexture2DArray",(function(){return Sf})),n.d(t,"DataTexture3D",(function(){return xf})),n.d(t,"DataTextureLoader",(function(){return xd})),n.d(t,"DataUtils",(function(){return kp})),n.d(t,"DecrementStencilOp",(function(){return Ht})),n.d(t,"DecrementWrapStencilOp",(function(){return Vt})),n.d(t,"DefaultLoadingManager",(function(){return fd})),n.d(t,"DepthFormat",(function(){return Be})),n.d(t,"DepthStencilFormat",(function(){return Fe})),n.d(t,"DepthTexture",(function(){return nl})),n.d(t,"DirectionalLight",(function(){return Ld})),n.d(t,"DirectionalLightHelper",(function(){return cp})),n.d(t,"DiscreteInterpolant",(function(){return td})),n.d(t,"DodecahedronBufferGeometry",(function(){return Hc})),n.d(t,"DodecahedronGeometry",(function(){return Hc})),n.d(t,"DoubleSide",(function(){return g})),n.d(t,"DstAlphaFactor",(function(){return N})),n.d(t,"DstColorFactor",(function(){return L})),n.d(t,"DynamicBufferAttribute",(function(){return Vp})),n.d(t,"DynamicCopyUsage",(function(){return dn})),n.d(t,"DynamicDrawUsage",(function(){return on})),n.d(t,"DynamicReadUsage",(function(){return ln})),n.d(t,"EdgesGeometry",(function(){return Yc})),n.d(t,"EdgesHelper",(function(){return sf})),n.d(t,"EllipseCurve",(function(){return vc})),n.d(t,"EqualDepth",(function(){return H})),n.d(t,"EqualStencilFunc",(function(){return Zt})),n.d(t,"EquirectangularReflectionMapping",(function(){return ae})),n.d(t,"EquirectangularRefractionMapping",(function(){return le})),n.d(t,"Euler",(function(){return Vr})),n.d(t,"EventDispatcher",(function(){return gn})),n.d(t,"ExtrudeBufferGeometry",(function(){return Eu})),n.d(t,"ExtrudeGeometry",(function(){return Eu})),n.d(t,"FaceColors",(function(){return Np})),n.d(t,"FileLoader",(function(){return bd})),n.d(t,"FlatShading",(function(){return b})),n.d(t,"Float16BufferAttribute",(function(){return Ri})),n.d(t,"Float32Attribute",(function(){return tf})),n.d(t,"Float32BufferAttribute",(function(){return Ii})),n.d(t,"Float64Attribute",(function(){return nf})),n.d(t,"Float64BufferAttribute",(function(){return Di})),n.d(t,"FloatType",(function(){return Ce})),n.d(t,"Fog",(function(){return ll})),n.d(t,"FogExp2",(function(){return al})),n.d(t,"Font",(function(){return vf})),n.d(t,"FontLoader",(function(){return bf})),n.d(t,"FramebufferTexture",(function(){return fc})),n.d(t,"FrontSide",(function(){return f})),n.d(t,"Frustum",(function(){return Eo})),n.d(t,"GLBufferAttribute",(function(){return Nh})),n.d(t,"GLSL1",(function(){return pn})),n.d(t,"GLSL3",(function(){return fn})),n.d(t,"GreaterDepth",(function(){return V})),n.d(t,"GreaterEqualDepth",(function(){return G})),n.d(t,"GreaterEqualStencilFunc",(function(){return tn})),n.d(t,"GreaterStencilFunc",(function(){return Kt})),n.d(t,"GridHelper",(function(){return ip})),n.d(t,"Group",(function(){return Ka})),n.d(t,"HalfFloatType",(function(){return Me})),n.d(t,"HemisphereLight",(function(){return Od})),n.d(t,"HemisphereLightHelper",(function(){return rp})),n.d(t,"HemisphereLightProbe",(function(){return th})),n.d(t,"IcosahedronBufferGeometry",(function(){return Tu})),n.d(t,"IcosahedronGeometry",(function(){return Tu})),n.d(t,"ImageBitmapLoader",(function(){return Zd})),n.d(t,"ImageLoader",(function(){return _d})),n.d(t,"ImageUtils",(function(){return Vn})),n.d(t,"ImmediateRenderObject",(function(){return yf})),n.d(t,"IncrementStencilOp",(function(){return qt})),n.d(t,"IncrementWrapStencilOp",(function(){return Gt})),n.d(t,"InstancedBufferAttribute",(function(){return Ql})),n.d(t,"InstancedBufferGeometry",(function(){return Hd})),n.d(t,"InstancedInterleavedBuffer",(function(){return Dh})),n.d(t,"InstancedMesh",(function(){return Wl})),n.d(t,"Int16Attribute",(function(){return Zp})),n.d(t,"Int16BufferAttribute",(function(){return Ci})),n.d(t,"Int32Attribute",(function(){return Kp})),n.d(t,"Int32BufferAttribute",(function(){return Pi})),n.d(t,"Int8Attribute",(function(){return Wp})),n.d(t,"Int8BufferAttribute",(function(){return Ei})),n.d(t,"IntType",(function(){return Ae})),n.d(t,"InterleavedBuffer",(function(){return ul})),n.d(t,"InterleavedBufferAttribute",(function(){return hl})),n.d(t,"Interpolant",(function(){return Ju})),n.d(t,"InterpolateDiscrete",(function(){return St})),n.d(t,"InterpolateLinear",(function(){return xt})),n.d(t,"InterpolateSmooth",(function(){return wt})),n.d(t,"InvertStencilOp",(function(){return Wt})),n.d(t,"JSONLoader",(function(){return hf})),n.d(t,"KeepStencilOp",(function(){return Ut})),n.d(t,"KeyframeTrack",(function(){return nd})),n.d(t,"LOD",(function(){return Pl})),n.d(t,"LatheBufferGeometry",(function(){return Bc})),n.d(t,"LatheGeometry",(function(){return Bc})),n.d(t,"Layers",(function(){return Wr})),n.d(t,"LensFlare",(function(){return ff})),n.d(t,"LessDepth",(function(){return Q})),n.d(t,"LessEqualDepth",(function(){return q})),n.d(t,"LessEqualStencilFunc",(function(){return Jt})),n.d(t,"LessStencilFunc",(function(){return Yt})),n.d(t,"Light",(function(){return kd})),n.d(t,"LightProbe",(function(){return Ud})),n.d(t,"Line",(function(){return tc})),n.d(t,"Line3",(function(){return Gh})),n.d(t,"LineBasicMaterial",(function(){return Xl})),n.d(t,"LineCurve",(function(){return Pc})),n.d(t,"LineCurve3",(function(){return $c})),n.d(t,"LineDashedMaterial",(function(){return Xu})),n.d(t,"LineLoop",(function(){return oc})),n.d(t,"LinePieces",(function(){return Ip})),n.d(t,"LineSegments",(function(){return ic})),n.d(t,"LineStrip",(function(){return Rp})),n.d(t,"LinearEncoding",(function(){return $t})),n.d(t,"LinearFilter",(function(){return ve})),n.d(t,"LinearInterpolant",(function(){return ed})),n.d(t,"LinearMipMapLinearFilter",(function(){return xe})),n.d(t,"LinearMipMapNearestFilter",(function(){return _e})),n.d(t,"LinearMipmapLinearFilter",(function(){return Se})),n.d(t,"LinearMipmapNearestFilter",(function(){return ye})),n.d(t,"LinearSRGBColorSpace",(function(){return Ft})),n.d(t,"LinearToneMapping",(function(){return K})),n.d(t,"Loader",(function(){return md})),n.d(t,"LoaderUtils",(function(){return qd})),n.d(t,"LoadingManager",(function(){return pd})),n.d(t,"LoopOnce",(function(){return vt})),n.d(t,"LoopPingPong",(function(){return _t})),n.d(t,"LoopRepeat",(function(){return yt})),n.d(t,"LuminanceAlphaFormat",(function(){return Le})),n.d(t,"LuminanceFormat",(function(){return je})),n.d(t,"MOUSE",(function(){return i})),n.d(t,"Material",(function(){return Si})),n.d(t,"MaterialLoader",(function(){return Qd})),n.d(t,"Math",(function(){return Tn})),n.d(t,"MathUtils",(function(){return Tn})),n.d(t,"Matrix3",(function(){return Mn})),n.d(t,"Matrix4",(function(){return jr})),n.d(t,"MaxEquation",(function(){return C})),n.d(t,"Mesh",(function(){return ao})),n.d(t,"MeshBasicMaterial",(function(){return xi})),n.d(t,"MeshDepthMaterial",(function(){return Ga})),n.d(t,"MeshDistanceMaterial",(function(){return Va})),n.d(t,"MeshFaceMaterial",(function(){return Lp})),n.d(t,"MeshLambertMaterial",(function(){return Vu})),n.d(t,"MeshMatcapMaterial",(function(){return Wu})),n.d(t,"MeshNormalMaterial",(function(){return Gu})),n.d(t,"MeshPhongMaterial",(function(){return qu})),n.d(t,"MeshPhysicalMaterial",(function(){return Qu})),n.d(t,"MeshStandardMaterial",(function(){return Uu})),n.d(t,"MeshToonMaterial",(function(){return Hu})),n.d(t,"MinEquation",(function(){return T})),n.d(t,"MirroredRepeatWrapping",(function(){return he})),n.d(t,"MixOperation",(function(){return Y})),n.d(t,"MultiMaterial",(function(){return Bp})),n.d(t,"MultiplyBlending",(function(){return w})),n.d(t,"MultiplyOperation",(function(){return X})),n.d(t,"NearestFilter",(function(){return pe})),n.d(t,"NearestMipMapLinearFilter",(function(){return be})),n.d(t,"NearestMipMapNearestFilter",(function(){return me})),n.d(t,"NearestMipmapLinearFilter",(function(){return ge})),n.d(t,"NearestMipmapNearestFilter",(function(){return fe})),n.d(t,"NeverDepth",(function(){return z})),n.d(t,"NeverStencilFunc",(function(){return Xt})),n.d(t,"NoBlending",(function(){return y})),n.d(t,"NoColorSpace",(function(){return Lt})),n.d(t,"NoColors",(function(){return Dp})),n.d(t,"NoToneMapping",(function(){return J})),n.d(t,"NormalAnimationBlendMode",(function(){return At})),n.d(t,"NormalBlending",(function(){return _})),n.d(t,"NotEqualDepth",(function(){return W})),n.d(t,"NotEqualStencilFunc",(function(){return en})),n.d(t,"NumberKeyframeTrack",(function(){return od})),n.d(t,"Object3D",(function(){return li})),n.d(t,"ObjectLoader",(function(){return Vd})),n.d(t,"ObjectSpaceNormalMap",(function(){return jt})),n.d(t,"OctahedronBufferGeometry",(function(){return Cu})),n.d(t,"OctahedronGeometry",(function(){return Cu})),n.d(t,"OneFactor",(function(){return P})),n.d(t,"OneMinusDstAlphaFactor",(function(){return j})),n.d(t,"OneMinusDstColorFactor",(function(){return B})),n.d(t,"OneMinusSrcAlphaFactor",(function(){return D})),n.d(t,"OneMinusSrcColorFactor",(function(){return R})),n.d(t,"OrthographicCamera",(function(){return Bo})),n.d(t,"PCFShadowMap",(function(){return d})),n.d(t,"PCFSoftShadowMap",(function(){return h})),n.d(t,"PMREMGenerator",(function(){return Vo})),n.d(t,"ParametricGeometry",(function(){return mf})),n.d(t,"Particle",(function(){return zp})),n.d(t,"ParticleBasicMaterial",(function(){return qp})),n.d(t,"ParticleSystem",(function(){return Up})),n.d(t,"ParticleSystemMaterial",(function(){return Hp})),n.d(t,"Path",(function(){return Lc})),n.d(t,"PerspectiveCamera",(function(){return go})),n.d(t,"Plane",(function(){return wo})),n.d(t,"PlaneBufferGeometry",(function(){return Co})),n.d(t,"PlaneGeometry",(function(){return Co})),n.d(t,"PlaneHelper",(function(){return bp})),n.d(t,"PointCloud",(function(){return Fp})),n.d(t,"PointCloudMaterial",(function(){return Qp})),n.d(t,"PointLight",(function(){return Nd})),n.d(t,"PointLightHelper",(function(){return Kh})),n.d(t,"Points",(function(){return dc})),n.d(t,"PointsMaterial",(function(){return sc})),n.d(t,"PolarGridHelper",(function(){return op})),n.d(t,"PolyhedronBufferGeometry",(function(){return qc})),n.d(t,"PolyhedronGeometry",(function(){return qc})),n.d(t,"PositionalAudio",(function(){return yh})),n.d(t,"PropertyBinding",(function(){return Mh})),n.d(t,"PropertyMixer",(function(){return Sh})),n.d(t,"QuadraticBezierCurve",(function(){return Rc})),n.d(t,"QuadraticBezierCurve3",(function(){return Ic})),n.d(t,"Quaternion",(function(){return or})),n.d(t,"QuaternionKeyframeTrack",(function(){return ad})),n.d(t,"QuaternionLinearInterpolant",(function(){return sd})),n.d(t,"REVISION",(function(){return r})),n.d(t,"RGBADepthPacking",(function(){return Dt})),n.d(t,"RGBAFormat",(function(){return Ne})),n.d(t,"RGBAIntegerFormat",(function(){return He})),n.d(t,"RGBA_ASTC_10x10_Format",(function(){return ft})),n.d(t,"RGBA_ASTC_10x5_Format",(function(){return dt})),n.d(t,"RGBA_ASTC_10x6_Format",(function(){return ht})),n.d(t,"RGBA_ASTC_10x8_Format",(function(){return pt})),n.d(t,"RGBA_ASTC_12x10_Format",(function(){return mt})),n.d(t,"RGBA_ASTC_12x12_Format",(function(){return gt})),n.d(t,"RGBA_ASTC_4x4_Format",(function(){return rt})),n.d(t,"RGBA_ASTC_5x4_Format",(function(){return it})),n.d(t,"RGBA_ASTC_5x5_Format",(function(){return ot})),n.d(t,"RGBA_ASTC_6x5_Format",(function(){return st})),n.d(t,"RGBA_ASTC_6x6_Format",(function(){return at})),n.d(t,"RGBA_ASTC_8x5_Format",(function(){return lt})),n.d(t,"RGBA_ASTC_8x6_Format",(function(){return ct})),n.d(t,"RGBA_ASTC_8x8_Format",(function(){return ut})),n.d(t,"RGBA_BPTC_Format",(function(){return bt})),n.d(t,"RGBA_ETC2_EAC_Format",(function(){return nt})),n.d(t,"RGBA_PVRTC_2BPPV1_Format",(function(){return Ke})),n.d(t,"RGBA_PVRTC_4BPPV1_Format",(function(){return Je})),n.d(t,"RGBA_S3TC_DXT1_Format",(function(){return Ve})),n.d(t,"RGBA_S3TC_DXT3_Format",(function(){return We})),n.d(t,"RGBA_S3TC_DXT5_Format",(function(){return Xe})),n.d(t,"RGBFormat",(function(){return De})),n.d(t,"RGB_ETC1_Format",(function(){return et})),n.d(t,"RGB_ETC2_Format",(function(){return tt})),n.d(t,"RGB_PVRTC_2BPPV1_Format",(function(){return Ze})),n.d(t,"RGB_PVRTC_4BPPV1_Format",(function(){return Ye})),n.d(t,"RGB_S3TC_DXT1_Format",(function(){return Ge})),n.d(t,"RGFormat",(function(){return Qe})),n.d(t,"RGIntegerFormat",(function(){return qe})),n.d(t,"RawShaderMaterial",(function(){return zu})),n.d(t,"Ray",(function(){return Nr})),n.d(t,"Raycaster",(function(){return jh})),n.d(t,"RectAreaLight",(function(){return Fd})),n.d(t,"RedFormat",(function(){return ze})),n.d(t,"RedIntegerFormat",(function(){return Ue})),n.d(t,"ReinhardToneMapping",(function(){return ee})),n.d(t,"RepeatWrapping",(function(){return ue})),n.d(t,"ReplaceStencilOp",(function(){return Qt})),n.d(t,"ReverseSubtractEquation",(function(){return A})),n.d(t,"RingBufferGeometry",(function(){return Mu})),n.d(t,"RingGeometry",(function(){return Mu})),n.d(t,"SRGBColorSpace",(function(){return Bt})),n.d(t,"Scene",(function(){return cl})),n.d(t,"SceneUtils",(function(){return pf})),n.d(t,"ShaderChunk",(function(){return Mo})),n.d(t,"ShaderLib",(function(){return $o})),n.d(t,"ShaderMaterial",(function(){return fo})),n.d(t,"ShadowMaterial",(function(){return Fu})),n.d(t,"Shape",(function(){return Zc})),n.d(t,"ShapeBufferGeometry",(function(){return Pu})),n.d(t,"ShapeGeometry",(function(){return Pu})),n.d(t,"ShapePath",(function(){return wp})),n.d(t,"ShapeUtils",(function(){return wu})),n.d(t,"ShortType",(function(){return Oe})),n.d(t,"Skeleton",(function(){return Ul})),n.d(t,"SkeletonHelper",(function(){return Jh})),n.d(t,"SkinnedMesh",(function(){return jl})),n.d(t,"SmoothShading",(function(){return v})),n.d(t,"Source",(function(){return Wn})),n.d(t,"Sphere",(function(){return Tr})),n.d(t,"SphereBufferGeometry",(function(){return $u})),n.d(t,"SphereGeometry",(function(){return $u})),n.d(t,"Spherical",(function(){return Fh})),n.d(t,"SphericalHarmonics3",(function(){return zd})),n.d(t,"SplineCurve",(function(){return Dc})),n.d(t,"SpotLight",(function(){return Pd})),n.d(t,"SpotLightHelper",(function(){return Wh})),n.d(t,"Sprite",(function(){return Al})),n.d(t,"SpriteMaterial",(function(){return pl})),n.d(t,"SrcAlphaFactor",(function(){return I})),n.d(t,"SrcAlphaSaturateFactor",(function(){return F})),n.d(t,"SrcColorFactor",(function(){return $})),n.d(t,"StaticCopyUsage",(function(){return un})),n.d(t,"StaticDrawUsage",(function(){return rn})),n.d(t,"StaticReadUsage",(function(){return an})),n.d(t,"StereoCamera",(function(){return sh})),n.d(t,"StreamCopyUsage",(function(){return hn})),n.d(t,"StreamDrawUsage",(function(){return sn})),n.d(t,"StreamReadUsage",(function(){return cn})),n.d(t,"StringKeyframeTrack",(function(){return ld})),n.d(t,"SubtractEquation",(function(){return E})),n.d(t,"SubtractiveBlending",(function(){return x})),n.d(t,"TOUCH",(function(){return o})),n.d(t,"TangentSpaceNormalMap",(function(){return Nt})),n.d(t,"TetrahedronBufferGeometry",(function(){return Ru})),n.d(t,"TetrahedronGeometry",(function(){return Ru})),n.d(t,"TextGeometry",(function(){return gf})),n.d(t,"Texture",(function(){return Zn})),n.d(t,"TextureLoader",(function(){return wd})),n.d(t,"TorusBufferGeometry",(function(){return Iu})),n.d(t,"TorusGeometry",(function(){return Iu})),n.d(t,"TorusKnotBufferGeometry",(function(){return Du})),n.d(t,"TorusKnotGeometry",(function(){return Du})),n.d(t,"Triangle",(function(){return yi})),n.d(t,"TriangleFanDrawMode",(function(){return Pt})),n.d(t,"TriangleStripDrawMode",(function(){return Mt})),n.d(t,"TrianglesDrawMode",(function(){return Ct})),n.d(t,"TubeBufferGeometry",(function(){return Nu})),n.d(t,"TubeGeometry",(function(){return Nu})),n.d(t,"UVMapping",(function(){return ie})),n.d(t,"Uint16Attribute",(function(){return Jp})),n.d(t,"Uint16BufferAttribute",(function(){return Mi})),n.d(t,"Uint32Attribute",(function(){return ef})),n.d(t,"Uint32BufferAttribute",(function(){return $i})),n.d(t,"Uint8Attribute",(function(){return Xp})),n.d(t,"Uint8BufferAttribute",(function(){return Ai})),n.d(t,"Uint8ClampedAttribute",(function(){return Yp})),n.d(t,"Uint8ClampedBufferAttribute",(function(){return Ti})),n.d(t,"Uniform",(function(){return Ih})),n.d(t,"UniformsLib",(function(){return Po})),n.d(t,"UniformsUtils",(function(){return po})),n.d(t,"UnsignedByteType",(function(){return we})),n.d(t,"UnsignedInt248Type",(function(){return Re})),n.d(t,"UnsignedIntType",(function(){return Te})),n.d(t,"UnsignedShort4444Type",(function(){return Pe})),n.d(t,"UnsignedShort5551Type",(function(){return $e})),n.d(t,"UnsignedShortType",(function(){return Ee})),n.d(t,"VSMShadowMap",(function(){return p})),n.d(t,"Vector2",(function(){return Cn})),n.d(t,"Vector3",(function(){return sr})),n.d(t,"Vector4",(function(){return Jn})),n.d(t,"VectorKeyframeTrack",(function(){return cd})),n.d(t,"Vertex",(function(){return Gp})),n.d(t,"VertexColors",(function(){return jp})),n.d(t,"VideoTexture",(function(){return pc})),n.d(t,"WebGL1Renderer",(function(){return sl})),n.d(t,"WebGL3DRenderTarget",(function(){return rr})),n.d(t,"WebGLArrayRenderTarget",(function(){return tr})),n.d(t,"WebGLCubeRenderTarget",(function(){return yo})),n.d(t,"WebGLMultipleRenderTargets",(function(){return ir})),n.d(t,"WebGLMultisampleRenderTarget",(function(){return _f})),n.d(t,"WebGLRenderTarget",(function(){return Kn})),n.d(t,"WebGLRenderTargetCube",(function(){return uf})),n.d(t,"WebGLRenderer",(function(){return ol})),n.d(t,"WebGLUtils",(function(){return Za})),n.d(t,"WireframeGeometry",(function(){return ju})),n.d(t,"WireframeHelper",(function(){return af})),n.d(t,"WrapAroundEnding",(function(){return Et})),n.d(t,"XHRLoader",(function(){return lf})),n.d(t,"ZeroCurvatureEnding",(function(){return kt})),n.d(t,"ZeroFactor",(function(){return M})),n.d(t,"ZeroSlopeEnding",(function(){return Ot})),n.d(t,"ZeroStencilOp",(function(){return zt})),n.d(t,"_SRGBAFormat",(function(){return mn})),n.d(t,"sRGBEncoding",(function(){return Rt})); +/** + * @license + * Copyright 2010-2022 Three.js Authors + * SPDX-License-Identifier: MIT + */ +const r="140",i={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},o={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},s=0,a=1,l=2,c=3,u=0,d=1,h=2,p=3,f=0,m=1,g=2,b=1,v=2,y=0,_=1,S=2,x=3,w=4,k=5,O=100,E=101,A=102,T=103,C=104,M=200,P=201,$=202,R=203,I=204,D=205,N=206,j=207,L=208,B=209,F=210,z=0,U=1,Q=2,q=3,H=4,G=5,V=6,W=7,X=0,Y=1,Z=2,J=0,K=1,ee=2,te=3,ne=4,re=5,ie=300,oe=301,se=302,ae=303,le=304,ce=306,ue=1e3,de=1001,he=1002,pe=1003,fe=1004,me=1004,ge=1005,be=1005,ve=1006,ye=1007,_e=1007,Se=1008,xe=1008,we=1009,ke=1010,Oe=1011,Ee=1012,Ae=1013,Te=1014,Ce=1015,Me=1016,Pe=1017,$e=1018,Re=1020,Ie=1021,De=1022,Ne=1023,je=1024,Le=1025,Be=1026,Fe=1027,ze=1028,Ue=1029,Qe=1030,qe=1031,He=1033,Ge=33776,Ve=33777,We=33778,Xe=33779,Ye=35840,Ze=35841,Je=35842,Ke=35843,et=36196,tt=37492,nt=37496,rt=37808,it=37809,ot=37810,st=37811,at=37812,lt=37813,ct=37814,ut=37815,dt=37816,ht=37817,pt=37818,ft=37819,mt=37820,gt=37821,bt=36492,vt=2200,yt=2201,_t=2202,St=2300,xt=2301,wt=2302,kt=2400,Ot=2401,Et=2402,At=2500,Tt=2501,Ct=0,Mt=1,Pt=2,$t=3e3,Rt=3001,It=3200,Dt=3201,Nt=0,jt=1,Lt="",Bt="srgb",Ft="srgb-linear",zt=0,Ut=7680,Qt=7681,qt=7682,Ht=7683,Gt=34055,Vt=34056,Wt=5386,Xt=512,Yt=513,Zt=514,Jt=515,Kt=516,en=517,tn=518,nn=519,rn=35044,on=35048,sn=35040,an=35045,ln=35049,cn=35041,un=35046,dn=35050,hn=35042,pn="100",fn="300 es",mn=1035;class gn{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});const n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)}hasEventListener(e,t){if(void 0===this._listeners)return!1;const n=this._listeners;return void 0!==n[e]&&-1!==n[e].indexOf(t)}removeEventListener(e,t){if(void 0===this._listeners)return;const n=this._listeners[e];if(void 0!==n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}dispatchEvent(e){if(void 0===this._listeners)return;const t=this._listeners[e.type];if(void 0!==t){e.target=this;const n=t.slice(0);for(let t=0,r=n.length;t>8&255]+bn[e>>16&255]+bn[e>>24&255]+"-"+bn[255&t]+bn[t>>8&255]+"-"+bn[t>>16&15|64]+bn[t>>24&255]+"-"+bn[63&n|128]+bn[n>>8&255]+"-"+bn[n>>16&255]+bn[n>>24&255]+bn[255&r]+bn[r>>8&255]+bn[r>>16&255]+bn[r>>24&255]).toLowerCase()}function xn(e,t,n){return Math.max(t,Math.min(n,e))}function wn(e,t){return(e%t+t)%t}function kn(e,t,n){return(1-n)*e+n*t}function On(e){return 0==(e&e-1)&&0!==e}function En(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))}function An(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}var Tn=Object.freeze({__proto__:null,DEG2RAD:yn,RAD2DEG:_n,generateUUID:Sn,clamp:xn,euclideanModulo:wn,mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},inverseLerp:function(e,t,n){return e!==t?(n-e)/(t-e):0},lerp:kn,damp:function(e,t,n,r){return kn(e,t,1-Math.exp(-n*r))},pingpong:function(e,t=1){return t-Math.abs(wn(e,2*t)-t)},smoothstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)},smootherstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},seededRandom:function(e){void 0!==e&&(vn=e);let t=vn+=1831565813;return t=Math.imul(t^t>>>15,1|t),t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296},degToRad:function(e){return e*yn},radToDeg:function(e){return e*_n},isPowerOfTwo:On,ceilPowerOfTwo:En,floorPowerOfTwo:An,setQuaternionFromProperEuler:function(e,t,n,r,i){const o=Math.cos,s=Math.sin,a=o(n/2),l=s(n/2),c=o((t+r)/2),u=s((t+r)/2),d=o((t-r)/2),h=s((t-r)/2),p=o((r-t)/2),f=s((r-t)/2);switch(i){case"XYX":e.set(a*u,l*d,l*h,a*c);break;case"YZY":e.set(l*h,a*u,l*d,a*c);break;case"ZXZ":e.set(l*d,l*h,a*u,a*c);break;case"XZX":e.set(a*u,l*f,l*p,a*c);break;case"YXY":e.set(l*p,a*u,l*f,a*c);break;case"ZYZ":e.set(l*f,l*p,a*u,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}},normalize:function(e,t){switch(t.constructor){case Float32Array:return e;case Uint16Array:return Math.round(65535*e);case Uint8Array:return Math.round(255*e);case Int16Array:return Math.round(32767*e);case Int8Array:return Math.round(127*e);default:throw new Error("Invalid component type.")}},denormalize:function(e,t){switch(t.constructor){case Float32Array:return e;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw new Error("Invalid component type.")}}});class Cn{constructor(e=0,t=0){this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e,t){return void 0!==t?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this)}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e,t){return void 0!==t?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this)}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t,n){return void 0!==n&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,o=this.y-e.y;return this.x=i*n-o*r+e.x,this.y=i*r+o*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}Cn.prototype.isVector2=!0;class Mn{constructor(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}set(e,t,n,r,i,o,s,a,l){const c=this.elements;return c[0]=e,c[1]=r,c[2]=s,c[3]=t,c[4]=i,c[5]=a,c[6]=n,c[7]=o,c[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,o=n[0],s=n[3],a=n[6],l=n[1],c=n[4],u=n[7],d=n[2],h=n[5],p=n[8],f=r[0],m=r[3],g=r[6],b=r[1],v=r[4],y=r[7],_=r[2],S=r[5],x=r[8];return i[0]=o*f+s*b+a*_,i[3]=o*m+s*v+a*S,i[6]=o*g+s*y+a*x,i[1]=l*f+c*b+u*_,i[4]=l*m+c*v+u*S,i[7]=l*g+c*y+u*x,i[2]=d*f+h*b+p*_,i[5]=d*m+h*v+p*S,i[8]=d*g+h*y+p*x,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],s=e[5],a=e[6],l=e[7],c=e[8];return t*o*c-t*s*l-n*i*c+n*s*a+r*i*l-r*o*a}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],s=e[5],a=e[6],l=e[7],c=e[8],u=c*o-s*l,d=s*a-c*i,h=l*i-o*a,p=t*u+n*d+r*h;if(0===p)return this.set(0,0,0,0,0,0,0,0,0);const f=1/p;return e[0]=u*f,e[1]=(r*l-c*n)*f,e[2]=(s*n-r*o)*f,e[3]=d*f,e[4]=(c*t-r*a)*f,e[5]=(r*i-s*t)*f,e[6]=h*f,e[7]=(n*a-l*t)*f,e[8]=(o*t-n*i)*f,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,i,o,s){const a=Math.cos(i),l=Math.sin(i);return this.set(n*a,n*l,-n*(a*o+l*s)+o+e,-r*l,r*a,-r*(-l*o+a*s)+s+t,0,0,1),this}scale(e,t){const n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=t,n[4]*=t,n[7]*=t,this}rotate(e){const t=Math.cos(e),n=Math.sin(e),r=this.elements,i=r[0],o=r[3],s=r[6],a=r[1],l=r[4],c=r[7];return r[0]=t*i+n*a,r[3]=t*o+n*l,r[6]=t*s+n*c,r[1]=-n*i+t*a,r[4]=-n*o+t*l,r[7]=-n*s+t*c,this}translate(e,t){const n=this.elements;return n[0]+=e*n[2],n[3]+=e*n[5],n[6]+=e*n[8],n[1]+=t*n[2],n[4]+=t*n[5],n[7]+=t*n[8],this}equals(e){const t=this.elements,n=e.elements;for(let e=0;e<9;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return(new this.constructor).fromArray(this.elements)}}function Pn(e){for(let t=e.length-1;t>=0;--t)if(e[t]>65535)return!0;return!1}Mn.prototype.isMatrix3=!0;const $n={Int8Array:Int8Array,Uint8Array:Uint8Array,Uint8ClampedArray:Uint8ClampedArray,Int16Array:Int16Array,Uint16Array:Uint16Array,Int32Array:Int32Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array};function Rn(e,t){return new $n[e](t)}function In(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}function Dn(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function Nn(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}const jn={[Bt]:{[Ft]:Dn},[Ft]:{[Bt]:Nn}},Ln={legacyMode:!0,get workingColorSpace(){return Ft},set workingColorSpace(e){console.warn("THREE.ColorManagement: .workingColorSpace is readonly.")},convert:function(e,t,n){if(this.legacyMode||t===n||!t||!n)return e;if(jn[t]&&void 0!==jn[t][n]){const r=jn[t][n];return e.r=r(e.r),e.g=r(e.g),e.b=r(e.b),e}throw new Error("Unsupported color space conversion.")},fromWorkingColorSpace:function(e,t){return this.convert(e,this.workingColorSpace,t)},toWorkingColorSpace:function(e,t){return this.convert(e,t,this.workingColorSpace)}},Bn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Fn={r:0,g:0,b:0},zn={h:0,s:0,l:0},Un={h:0,s:0,l:0};function Qn(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+6*(t-e)*(2/3-n):e}function qn(e,t){return t.r=e.r,t.g=e.g,t.b=e.b,t}class Hn{constructor(e,t,n){return void 0===t&&void 0===n?this.set(e):this.setRGB(e,t,n)}set(e){return e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Bt){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,Ln.toWorkingColorSpace(this,t),this}setRGB(e,t,n,r=Ft){return this.r=e,this.g=t,this.b=n,Ln.toWorkingColorSpace(this,r),this}setHSL(e,t,n,r=Ft){if(e=wn(e,1),t=xn(t,0,1),n=xn(n,0,1),0===t)this.r=this.g=this.b=n;else{const r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=Qn(i,r,e+1/3),this.g=Qn(i,r,e),this.b=Qn(i,r,e-1/3)}return Ln.toWorkingColorSpace(this,r),this}setStyle(e,t=Bt){function n(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(e)){let e;const i=r[1],o=r[2];switch(i){case"rgb":case"rgba":if(e=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return this.r=Math.min(255,parseInt(e[1],10))/255,this.g=Math.min(255,parseInt(e[2],10))/255,this.b=Math.min(255,parseInt(e[3],10))/255,Ln.toWorkingColorSpace(this,t),n(e[4]),this;if(e=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o))return this.r=Math.min(100,parseInt(e[1],10))/100,this.g=Math.min(100,parseInt(e[2],10))/100,this.b=Math.min(100,parseInt(e[3],10))/100,Ln.toWorkingColorSpace(this,t),n(e[4]),this;break;case"hsl":case"hsla":if(e=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(o)){const r=parseFloat(e[1])/360,i=parseInt(e[2],10)/100,o=parseInt(e[3],10)/100;return n(e[4]),this.setHSL(r,i,o,t)}}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){const e=r[1],n=e.length;if(3===n)return this.r=parseInt(e.charAt(0)+e.charAt(0),16)/255,this.g=parseInt(e.charAt(1)+e.charAt(1),16)/255,this.b=parseInt(e.charAt(2)+e.charAt(2),16)/255,Ln.toWorkingColorSpace(this,t),this;if(6===n)return this.r=parseInt(e.charAt(0)+e.charAt(1),16)/255,this.g=parseInt(e.charAt(2)+e.charAt(3),16)/255,this.b=parseInt(e.charAt(4)+e.charAt(5),16)/255,Ln.toWorkingColorSpace(this,t),this}return e&&e.length>0?this.setColorName(e,t):this}setColorName(e,t=Bt){const n=Bn[e.toLowerCase()];return void 0!==n?this.setHex(n,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Dn(e.r),this.g=Dn(e.g),this.b=Dn(e.b),this}copyLinearToSRGB(e){return this.r=Nn(e.r),this.g=Nn(e.g),this.b=Nn(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Bt){return Ln.fromWorkingColorSpace(qn(this,Fn),e),xn(255*Fn.r,0,255)<<16^xn(255*Fn.g,0,255)<<8^xn(255*Fn.b,0,255)<<0}getHexString(e=Bt){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Ft){Ln.fromWorkingColorSpace(qn(this,Fn),t);const n=Fn.r,r=Fn.g,i=Fn.b,o=Math.max(n,r,i),s=Math.min(n,r,i);let a,l;const c=(s+o)/2;if(s===o)a=0,l=0;else{const e=o-s;switch(l=c<=.5?e/(o+s):e/(2-o-s),o){case n:a=(r-i)/e+(r2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const t=In("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const r=n.getImageData(0,0,e.width,e.height),i=r.data;for(let e=0;e1)switch(this.wrapS){case ue:e.x=e.x-Math.floor(e.x);break;case de:e.x=e.x<0?0:1;break;case he:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case ue:e.y=e.y-Math.floor(e.y);break;case de:e.y=e.y<0?0:1;break;case he:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){!0===e&&(this.version++,this.source.needsUpdate=!0)}}Zn.DEFAULT_IMAGE=null,Zn.DEFAULT_MAPPING=ie,Zn.prototype.isTexture=!0;class Jn{constructor(e=0,t=0,n=0,r=1){this.x=e,this.y=t,this.z=n,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this}add(e,t){return void 0!==t?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e,t){return void 0!==t?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,i=this.w,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*t+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*t+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*t+o[7]*n+o[11]*r+o[15]*i,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,i;const o=e.elements,s=o[0],a=o[4],l=o[8],c=o[1],u=o[5],d=o[9],h=o[2],p=o[6],f=o[10];if(Math.abs(a-c)<.01&&Math.abs(l-h)<.01&&Math.abs(d-p)<.01){if(Math.abs(a+c)<.1&&Math.abs(l+h)<.1&&Math.abs(d+p)<.1&&Math.abs(s+u+f-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const e=(s+1)/2,o=(u+1)/2,m=(f+1)/2,g=(a+c)/4,b=(l+h)/4,v=(d+p)/4;return e>o&&e>m?e<.01?(n=0,r=.707106781,i=.707106781):(n=Math.sqrt(e),r=g/n,i=b/n):o>m?o<.01?(n=.707106781,r=0,i=.707106781):(r=Math.sqrt(o),n=g/r,i=v/r):m<.01?(n=.707106781,r=.707106781,i=0):(i=Math.sqrt(m),n=b/i,r=v/i),this.set(n,r,i,t),this}let m=Math.sqrt((p-d)*(p-d)+(l-h)*(l-h)+(c-a)*(c-a));return Math.abs(m)<.001&&(m=1),this.x=(p-d)/m,this.y=(l-h)/m,this.z=(c-a)/m,this.w=Math.acos((s+u+f-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t,n){return void 0!==n&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}Jn.prototype.isVector4=!0;class Kn extends gn{constructor(e,t,n={}){super(),this.width=e,this.height=t,this.depth=1,this.scissor=new Jn(0,0,e,t),this.scissorTest=!1,this.viewport=new Jn(0,0,e,t);const r={width:e,height:t,depth:1};this.texture=new Zn(r,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=void 0!==n.generateMipmaps&&n.generateMipmaps,this.texture.internalFormat=void 0!==n.internalFormat?n.internalFormat:null,this.texture.minFilter=void 0!==n.minFilter?n.minFilter:ve,this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0!==n.stencilBuffer&&n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null,this.samples=void 0!==n.samples?n.samples:0}setSize(e,t,n=1){this.width===e&&this.height===t&&this.depth===n||(this.width=e,this.height=t,this.depth=n,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return(new this.constructor).copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const t=Object.assign({},e.texture.image);return this.texture.source=new Wn(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,null!==e.depthTexture&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}Kn.prototype.isWebGLRenderTarget=!0;class er extends Zn{constructor(e=null,t=1,n=1,r=1){super(null),this.image={data:e,width:t,height:n,depth:r},this.magFilter=pe,this.minFilter=pe,this.wrapR=de,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}er.prototype.isDataArrayTexture=!0;class tr extends Kn{constructor(e,t,n){super(e,t),this.depth=n,this.texture=new er(null,e,t,n),this.texture.isRenderTargetTexture=!0}}tr.prototype.isWebGLArrayRenderTarget=!0;class nr extends Zn{constructor(e=null,t=1,n=1,r=1){super(null),this.image={data:e,width:t,height:n,depth:r},this.magFilter=pe,this.minFilter=pe,this.wrapR=de,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}nr.prototype.isData3DTexture=!0;class rr extends Kn{constructor(e,t,n){super(e,t),this.depth=n,this.texture=new nr(null,e,t,n),this.texture.isRenderTargetTexture=!0}}rr.prototype.isWebGL3DRenderTarget=!0;class ir extends Kn{constructor(e,t,n,r={}){super(e,t,r);const i=this.texture;this.texture=[];for(let e=0;e=0?1:-1,r=1-t*t;if(r>Number.EPSILON){const i=Math.sqrt(r),o=Math.atan2(i,t*n);e=Math.sin(e*o)/i,s=Math.sin(s*o)/i}const i=s*n;if(a=a*e+d*i,l=l*e+h*i,c=c*e+p*i,u=u*e+f*i,e===1-s){const e=1/Math.sqrt(a*a+l*l+c*c+u*u);a*=e,l*=e,c*=e,u*=e}}e[t]=a,e[t+1]=l,e[t+2]=c,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,r,i,o){const s=n[r],a=n[r+1],l=n[r+2],c=n[r+3],u=i[o],d=i[o+1],h=i[o+2],p=i[o+3];return e[t]=s*p+c*u+a*h-l*d,e[t+1]=a*p+c*d+l*u-s*h,e[t+2]=l*p+c*h+s*d-a*u,e[t+3]=c*p-s*u-a*d-l*h,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){if(!e||!e.isEuler)throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");const n=e._x,r=e._y,i=e._z,o=e._order,s=Math.cos,a=Math.sin,l=s(n/2),c=s(r/2),u=s(i/2),d=a(n/2),h=a(r/2),p=a(i/2);switch(o){case"XYZ":this._x=d*c*u+l*h*p,this._y=l*h*u-d*c*p,this._z=l*c*p+d*h*u,this._w=l*c*u-d*h*p;break;case"YXZ":this._x=d*c*u+l*h*p,this._y=l*h*u-d*c*p,this._z=l*c*p-d*h*u,this._w=l*c*u+d*h*p;break;case"ZXY":this._x=d*c*u-l*h*p,this._y=l*h*u+d*c*p,this._z=l*c*p+d*h*u,this._w=l*c*u-d*h*p;break;case"ZYX":this._x=d*c*u-l*h*p,this._y=l*h*u+d*c*p,this._z=l*c*p-d*h*u,this._w=l*c*u+d*h*p;break;case"YZX":this._x=d*c*u+l*h*p,this._y=l*h*u+d*c*p,this._z=l*c*p-d*h*u,this._w=l*c*u-d*h*p;break;case"XZY":this._x=d*c*u-l*h*p,this._y=l*h*u-d*c*p,this._z=l*c*p+d*h*u,this._w=l*c*u+d*h*p;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return!1!==t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],r=t[4],i=t[8],o=t[1],s=t[5],a=t[9],l=t[2],c=t[6],u=t[10],d=n+s+u;if(d>0){const e=.5/Math.sqrt(d+1);this._w=.25/e,this._x=(c-a)*e,this._y=(i-l)*e,this._z=(o-r)*e}else if(n>s&&n>u){const e=2*Math.sqrt(1+n-s-u);this._w=(c-a)/e,this._x=.25*e,this._y=(r+o)/e,this._z=(i+l)/e}else if(s>u){const e=2*Math.sqrt(1+s-n-u);this._w=(i-l)/e,this._x=(r+o)/e,this._y=.25*e,this._z=(a+c)/e}else{const e=2*Math.sqrt(1+u-n-s);this._w=(o-r)/e,this._x=(i+l)/e,this._y=(a+c)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return nMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(xn(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(0===n)return this;const r=Math.min(1,t/n);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return 0===e?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e,t){return void 0!==t?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const n=e._x,r=e._y,i=e._z,o=e._w,s=t._x,a=t._y,l=t._z,c=t._w;return this._x=n*c+o*s+r*l-i*a,this._y=r*c+o*a+i*s-n*l,this._z=i*c+o*l+n*a-r*s,this._w=o*c-n*s-r*a-i*l,this._onChangeCallback(),this}slerp(e,t){if(0===t)return this;if(1===t)return this.copy(e);const n=this._x,r=this._y,i=this._z,o=this._w;let s=o*e._w+n*e._x+r*e._y+i*e._z;if(s<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,s=-s):this.copy(e),s>=1)return this._w=o,this._x=n,this._y=r,this._z=i,this;const a=1-s*s;if(a<=Number.EPSILON){const e=1-t;return this._w=e*o+t*this._w,this._x=e*n+t*this._x,this._y=e*r+t*this._y,this._z=e*i+t*this._z,this.normalize(),this._onChangeCallback(),this}const l=Math.sqrt(a),c=Math.atan2(l,s),u=Math.sin((1-t)*c)/l,d=Math.sin(t*c)/l;return this._w=o*u+this._w*d,this._x=n*u+this._x*d,this._y=r*u+this._y*d,this._z=i*u+this._z*d,this._onChangeCallback(),this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){const e=Math.random(),t=Math.sqrt(1-e),n=Math.sqrt(e),r=2*Math.PI*Math.random(),i=2*Math.PI*Math.random();return this.set(t*Math.cos(r),n*Math.sin(i),n*Math.cos(i),t*Math.sin(r))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}or.prototype.isQuaternion=!0;class sr{constructor(e=0,t=0,n=0){this.x=e,this.y=t,this.z=n}set(e,t,n){return void 0===n&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e,t){return void 0!==t?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(this.x+=e.x,this.y+=e.y,this.z+=e.z,this)}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e,t){return void 0!==t?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(this.x-=e.x,this.y-=e.y,this.z-=e.z,this)}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e,t){return void 0!==t?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(this.x*=e.x,this.y*=e.y,this.z*=e.z,this)}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(lr.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(lr.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,i=e.elements,o=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*o,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*o,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*o,this}applyQuaternion(e){const t=this.x,n=this.y,r=this.z,i=e.x,o=e.y,s=e.z,a=e.w,l=a*t+o*r-s*n,c=a*n+s*t-i*r,u=a*r+i*n-o*t,d=-i*t-o*n-s*r;return this.x=l*a+d*-i+c*-s-u*-o,this.y=c*a+d*-o+u*-i-l*-s,this.z=u*a+d*-s+l*-o-c*-i,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e,t){return void 0!==t?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,r=e.y,i=e.z,o=t.x,s=t.y,a=t.z;return this.x=r*a-i*s,this.y=i*o-n*a,this.z=n*s-r*o,this}projectOnVector(e){const t=e.lengthSq();if(0===t)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return ar.copy(this).projectOnVector(e),this.sub(ar)}reflect(e){return this.sub(ar.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(xn(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){const r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t,n){return void 0!==n&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=2*(Math.random()-.5),t=Math.random()*Math.PI*2,n=Math.sqrt(1-e**2);return this.x=n*Math.cos(t),this.y=n*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}sr.prototype.isVector3=!0;const ar=new sr,lr=new or;class cr{constructor(e=new sr(1/0,1/0,1/0),t=new sr(-1/0,-1/0,-1/0)){this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){let t=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,s=-1/0;for(let a=0,l=e.length;ai&&(i=l),c>o&&(o=c),u>s&&(s=u)}return this.min.set(t,n,r),this.max.set(i,o,s),this}setFromBufferAttribute(e){let t=1/0,n=1/0,r=1/0,i=-1/0,o=-1/0,s=-1/0;for(let a=0,l=e.count;ai&&(i=l),c>o&&(o=c),u>s&&(s=u)}return this.min.set(t,n,r),this.max.set(i,o,s),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;tthis.max.x||e.ythis.max.y||e.zthis.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,dr),dr.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(yr),_r.subVectors(this.max,yr),pr.subVectors(e.a,yr),fr.subVectors(e.b,yr),mr.subVectors(e.c,yr),gr.subVectors(fr,pr),br.subVectors(mr,fr),vr.subVectors(pr,mr);let t=[0,-gr.z,gr.y,0,-br.z,br.y,0,-vr.z,vr.y,gr.z,0,-gr.x,br.z,0,-br.x,vr.z,0,-vr.x,-gr.y,gr.x,0,-br.y,br.x,0,-vr.y,vr.x,0];return!!wr(t,pr,fr,mr,_r)&&(t=[1,0,0,0,1,0,0,0,1],!!wr(t,pr,fr,mr,_r)&&(Sr.crossVectors(gr,br),t=[Sr.x,Sr.y,Sr.z],wr(t,pr,fr,mr,_r)))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return dr.copy(e).clamp(this.min,this.max).sub(e).length()}getBoundingSphere(e){return this.getCenter(e.center),e.radius=.5*this.getSize(dr).length(),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()||(ur[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),ur[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),ur[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),ur[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),ur[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),ur[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),ur[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),ur[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(ur)),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}cr.prototype.isBox3=!0;const ur=[new sr,new sr,new sr,new sr,new sr,new sr,new sr,new sr],dr=new sr,hr=new cr,pr=new sr,fr=new sr,mr=new sr,gr=new sr,br=new sr,vr=new sr,yr=new sr,_r=new sr,Sr=new sr,xr=new sr;function wr(e,t,n,r,i){for(let o=0,s=e.length-3;o<=s;o+=3){xr.fromArray(e,o);const s=i.x*Math.abs(xr.x)+i.y*Math.abs(xr.y)+i.z*Math.abs(xr.z),a=t.dot(xr),l=n.dot(xr),c=r.dot(xr);if(Math.max(-Math.max(a,l,c),Math.min(a,l,c))>s)return!1}return!0}const kr=new cr,Or=new sr,Er=new sr,Ar=new sr;class Tr{constructor(e=new sr,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;void 0!==t?n.copy(t):kr.setFromPoints(e).getCenter(n);let r=0;for(let t=0,i=e.length;tthis.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){Ar.subVectors(e,this.center);const t=Ar.lengthSq();if(t>this.radius*this.radius){const e=Math.sqrt(t),n=.5*(e-this.radius);this.center.add(Ar.multiplyScalar(n/e)),this.radius+=n}return this}union(e){return!0===this.center.equals(e.center)?Er.set(0,0,1).multiplyScalar(e.radius):Er.subVectors(e.center,this.center).normalize().multiplyScalar(e.radius),this.expandByPoint(Or.copy(e.center).add(Er)),this.expandByPoint(Or.copy(e.center).sub(Er)),this}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const Cr=new sr,Mr=new sr,Pr=new sr,$r=new sr,Rr=new sr,Ir=new sr,Dr=new sr;class Nr{constructor(e=new sr,t=new sr(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.direction).multiplyScalar(e).add(this.origin)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,Cr)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=Cr.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Cr.copy(this.direction).multiplyScalar(t).add(this.origin),Cr.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){Mr.copy(e).add(t).multiplyScalar(.5),Pr.copy(t).sub(e).normalize(),$r.copy(this.origin).sub(Mr);const i=.5*e.distanceTo(t),o=-this.direction.dot(Pr),s=$r.dot(this.direction),a=-$r.dot(Pr),l=$r.lengthSq(),c=Math.abs(1-o*o);let u,d,h,p;if(c>0)if(u=o*a-s,d=o*s-a,p=i*c,u>=0)if(d>=-p)if(d<=p){const e=1/c;u*=e,d*=e,h=u*(u+o*d+2*s)+d*(o*u+d+2*a)+l}else d=i,u=Math.max(0,-(o*d+s)),h=-u*u+d*(d+2*a)+l;else d=-i,u=Math.max(0,-(o*d+s)),h=-u*u+d*(d+2*a)+l;else d<=-p?(u=Math.max(0,-(-o*i+s)),d=u>0?-i:Math.min(Math.max(-i,-a),i),h=-u*u+d*(d+2*a)+l):d<=p?(u=0,d=Math.min(Math.max(-i,-a),i),h=d*(d+2*a)+l):(u=Math.max(0,-(o*i+s)),d=u>0?i:Math.min(Math.max(-i,-a),i),h=-u*u+d*(d+2*a)+l);else d=o>0?-i:i,u=Math.max(0,-(o*d+s)),h=-u*u+d*(d+2*a)+l;return n&&n.copy(this.direction).multiplyScalar(u).add(this.origin),r&&r.copy(Pr).multiplyScalar(d).add(Mr),h}intersectSphere(e,t){Cr.subVectors(e.center,this.origin);const n=Cr.dot(this.direction),r=Cr.dot(Cr)-n*n,i=e.radius*e.radius;if(r>i)return null;const o=Math.sqrt(i-r),s=n-o,a=n+o;return s<0&&a<0?null:s<0?this.at(a,t):this.at(s,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return null===n?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);if(0===t)return!0;return e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,i,o,s,a;const l=1/this.direction.x,c=1/this.direction.y,u=1/this.direction.z,d=this.origin;return l>=0?(n=(e.min.x-d.x)*l,r=(e.max.x-d.x)*l):(n=(e.max.x-d.x)*l,r=(e.min.x-d.x)*l),c>=0?(i=(e.min.y-d.y)*c,o=(e.max.y-d.y)*c):(i=(e.max.y-d.y)*c,o=(e.min.y-d.y)*c),n>o||i>r?null:((i>n||n!=n)&&(n=i),(o=0?(s=(e.min.z-d.z)*u,a=(e.max.z-d.z)*u):(s=(e.max.z-d.z)*u,a=(e.min.z-d.z)*u),n>a||s>r?null:((s>n||n!=n)&&(n=s),(a=0?n:r,t)))}intersectsBox(e){return null!==this.intersectBox(e,Cr)}intersectTriangle(e,t,n,r,i){Rr.subVectors(t,e),Ir.subVectors(n,e),Dr.crossVectors(Rr,Ir);let o,s=this.direction.dot(Dr);if(s>0){if(r)return null;o=1}else{if(!(s<0))return null;o=-1,s=-s}$r.subVectors(this.origin,e);const a=o*this.direction.dot(Ir.crossVectors($r,Ir));if(a<0)return null;const l=o*this.direction.dot(Rr.cross($r));if(l<0)return null;if(a+l>s)return null;const c=-o*$r.dot(Dr);return c<0?null:this.at(c/s,i)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class jr{constructor(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}set(e,t,n,r,i,o,s,a,l,c,u,d,h,p,f,m){const g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=r,g[1]=i,g[5]=o,g[9]=s,g[13]=a,g[2]=l,g[6]=c,g[10]=u,g[14]=d,g[3]=h,g[7]=p,g[11]=f,g[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new jr).fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,n=e.elements,r=1/Lr.setFromMatrixColumn(e,0).length(),i=1/Lr.setFromMatrixColumn(e,1).length(),o=1/Lr.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*o,t[9]=n[9]*o,t[10]=n[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");const t=this.elements,n=e.x,r=e.y,i=e.z,o=Math.cos(n),s=Math.sin(n),a=Math.cos(r),l=Math.sin(r),c=Math.cos(i),u=Math.sin(i);if("XYZ"===e.order){const e=o*c,n=o*u,r=s*c,i=s*u;t[0]=a*c,t[4]=-a*u,t[8]=l,t[1]=n+r*l,t[5]=e-i*l,t[9]=-s*a,t[2]=i-e*l,t[6]=r+n*l,t[10]=o*a}else if("YXZ"===e.order){const e=a*c,n=a*u,r=l*c,i=l*u;t[0]=e+i*s,t[4]=r*s-n,t[8]=o*l,t[1]=o*u,t[5]=o*c,t[9]=-s,t[2]=n*s-r,t[6]=i+e*s,t[10]=o*a}else if("ZXY"===e.order){const e=a*c,n=a*u,r=l*c,i=l*u;t[0]=e-i*s,t[4]=-o*u,t[8]=r+n*s,t[1]=n+r*s,t[5]=o*c,t[9]=i-e*s,t[2]=-o*l,t[6]=s,t[10]=o*a}else if("ZYX"===e.order){const e=o*c,n=o*u,r=s*c,i=s*u;t[0]=a*c,t[4]=r*l-n,t[8]=e*l+i,t[1]=a*u,t[5]=i*l+e,t[9]=n*l-r,t[2]=-l,t[6]=s*a,t[10]=o*a}else if("YZX"===e.order){const e=o*a,n=o*l,r=s*a,i=s*l;t[0]=a*c,t[4]=i-e*u,t[8]=r*u+n,t[1]=u,t[5]=o*c,t[9]=-s*c,t[2]=-l*c,t[6]=n*u+r,t[10]=e-i*u}else if("XZY"===e.order){const e=o*a,n=o*l,r=s*a,i=s*l;t[0]=a*c,t[4]=-u,t[8]=l*c,t[1]=e*u+i,t[5]=o*c,t[9]=n*u-r,t[2]=r*u-n,t[6]=s*c,t[10]=i*u+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(Fr,e,zr)}lookAt(e,t,n){const r=this.elements;return qr.subVectors(e,t),0===qr.lengthSq()&&(qr.z=1),qr.normalize(),Ur.crossVectors(n,qr),0===Ur.lengthSq()&&(1===Math.abs(n.z)?qr.x+=1e-4:qr.z+=1e-4,qr.normalize(),Ur.crossVectors(n,qr)),Ur.normalize(),Qr.crossVectors(qr,Ur),r[0]=Ur.x,r[4]=Qr.x,r[8]=qr.x,r[1]=Ur.y,r[5]=Qr.y,r[9]=qr.y,r[2]=Ur.z,r[6]=Qr.z,r[10]=qr.z,this}multiply(e,t){return void 0!==t?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(e,t)):this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,o=n[0],s=n[4],a=n[8],l=n[12],c=n[1],u=n[5],d=n[9],h=n[13],p=n[2],f=n[6],m=n[10],g=n[14],b=n[3],v=n[7],y=n[11],_=n[15],S=r[0],x=r[4],w=r[8],k=r[12],O=r[1],E=r[5],A=r[9],T=r[13],C=r[2],M=r[6],P=r[10],$=r[14],R=r[3],I=r[7],D=r[11],N=r[15];return i[0]=o*S+s*O+a*C+l*R,i[4]=o*x+s*E+a*M+l*I,i[8]=o*w+s*A+a*P+l*D,i[12]=o*k+s*T+a*$+l*N,i[1]=c*S+u*O+d*C+h*R,i[5]=c*x+u*E+d*M+h*I,i[9]=c*w+u*A+d*P+h*D,i[13]=c*k+u*T+d*$+h*N,i[2]=p*S+f*O+m*C+g*R,i[6]=p*x+f*E+m*M+g*I,i[10]=p*w+f*A+m*P+g*D,i[14]=p*k+f*T+m*$+g*N,i[3]=b*S+v*O+y*C+_*R,i[7]=b*x+v*E+y*M+_*I,i[11]=b*w+v*A+y*P+_*D,i[15]=b*k+v*T+y*$+_*N,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],o=e[1],s=e[5],a=e[9],l=e[13],c=e[2],u=e[6],d=e[10],h=e[14];return e[3]*(+i*a*u-r*l*u-i*s*d+n*l*d+r*s*h-n*a*h)+e[7]*(+t*a*h-t*l*d+i*o*d-r*o*h+r*l*c-i*a*c)+e[11]*(+t*l*u-t*s*h-i*o*u+n*o*h+i*s*c-n*l*c)+e[15]*(-r*s*c-t*a*u+t*s*d+r*o*u-n*o*d+n*a*c)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],s=e[5],a=e[6],l=e[7],c=e[8],u=e[9],d=e[10],h=e[11],p=e[12],f=e[13],m=e[14],g=e[15],b=u*m*l-f*d*l+f*a*h-s*m*h-u*a*g+s*d*g,v=p*d*l-c*m*l-p*a*h+o*m*h+c*a*g-o*d*g,y=c*f*l-p*u*l+p*s*h-o*f*h-c*s*g+o*u*g,_=p*u*a-c*f*a-p*s*d+o*f*d+c*s*m-o*u*m,S=t*b+n*v+r*y+i*_;if(0===S)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const x=1/S;return e[0]=b*x,e[1]=(f*d*i-u*m*i-f*r*h+n*m*h+u*r*g-n*d*g)*x,e[2]=(s*m*i-f*a*i+f*r*l-n*m*l-s*r*g+n*a*g)*x,e[3]=(u*a*i-s*d*i-u*r*l+n*d*l+s*r*h-n*a*h)*x,e[4]=v*x,e[5]=(c*m*i-p*d*i+p*r*h-t*m*h-c*r*g+t*d*g)*x,e[6]=(p*a*i-o*m*i-p*r*l+t*m*l+o*r*g-t*a*g)*x,e[7]=(o*d*i-c*a*i+c*r*l-t*d*l-o*r*h+t*a*h)*x,e[8]=y*x,e[9]=(p*u*i-c*f*i-p*n*h+t*f*h+c*n*g-t*u*g)*x,e[10]=(o*f*i-p*s*i+p*n*l-t*f*l-o*n*g+t*s*g)*x,e[11]=(c*s*i-o*u*i-c*n*l+t*u*l+o*n*h-t*s*h)*x,e[12]=_*x,e[13]=(c*f*r-p*u*r+p*n*d-t*f*d-c*n*m+t*u*m)*x,e[14]=(p*s*r-o*f*r-p*n*a+t*f*a+o*n*m-t*s*m)*x,e[15]=(o*u*r-c*s*r+c*n*a-t*u*a-o*n*d+t*s*d)*x,this}scale(e){const t=this.elements,n=e.x,r=e.y,i=e.z;return t[0]*=n,t[4]*=r,t[8]*=i,t[1]*=n,t[5]*=r,t[9]*=i,t[2]*=n,t[6]*=r,t[10]*=i,t[3]*=n,t[7]*=r,t[11]*=i,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}makeTranslation(e,t,n){return this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),r=Math.sin(t),i=1-n,o=e.x,s=e.y,a=e.z,l=i*o,c=i*s;return this.set(l*o+n,l*s-r*a,l*a+r*s,0,l*s+r*a,c*s+n,c*a-r*o,0,l*a-r*s,c*a+r*o,i*a*a+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,i,o){return this.set(1,n,i,0,e,1,o,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){const r=this.elements,i=t._x,o=t._y,s=t._z,a=t._w,l=i+i,c=o+o,u=s+s,d=i*l,h=i*c,p=i*u,f=o*c,m=o*u,g=s*u,b=a*l,v=a*c,y=a*u,_=n.x,S=n.y,x=n.z;return r[0]=(1-(f+g))*_,r[1]=(h+y)*_,r[2]=(p-v)*_,r[3]=0,r[4]=(h-y)*S,r[5]=(1-(d+g))*S,r[6]=(m+b)*S,r[7]=0,r[8]=(p+v)*x,r[9]=(m-b)*x,r[10]=(1-(d+f))*x,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){const r=this.elements;let i=Lr.set(r[0],r[1],r[2]).length();const o=Lr.set(r[4],r[5],r[6]).length(),s=Lr.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),e.x=r[12],e.y=r[13],e.z=r[14],Br.copy(this);const a=1/i,l=1/o,c=1/s;return Br.elements[0]*=a,Br.elements[1]*=a,Br.elements[2]*=a,Br.elements[4]*=l,Br.elements[5]*=l,Br.elements[6]*=l,Br.elements[8]*=c,Br.elements[9]*=c,Br.elements[10]*=c,t.setFromRotationMatrix(Br),n.x=i,n.y=o,n.z=s,this}makePerspective(e,t,n,r,i,o){void 0===o&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");const s=this.elements,a=2*i/(t-e),l=2*i/(n-r),c=(t+e)/(t-e),u=(n+r)/(n-r),d=-(o+i)/(o-i),h=-2*o*i/(o-i);return s[0]=a,s[4]=0,s[8]=c,s[12]=0,s[1]=0,s[5]=l,s[9]=u,s[13]=0,s[2]=0,s[6]=0,s[10]=d,s[14]=h,s[3]=0,s[7]=0,s[11]=-1,s[15]=0,this}makeOrthographic(e,t,n,r,i,o){const s=this.elements,a=1/(t-e),l=1/(n-r),c=1/(o-i),u=(t+e)*a,d=(n+r)*l,h=(o+i)*c;return s[0]=2*a,s[4]=0,s[8]=0,s[12]=-u,s[1]=0,s[5]=2*l,s[9]=0,s[13]=-d,s[2]=0,s[6]=0,s[10]=-2*c,s[14]=-h,s[3]=0,s[7]=0,s[11]=0,s[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let e=0;e<16;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}jr.prototype.isMatrix4=!0;const Lr=new sr,Br=new jr,Fr=new sr(0,0,0),zr=new sr(1,1,1),Ur=new sr,Qr=new sr,qr=new sr,Hr=new jr,Gr=new or;class Vr{constructor(e=0,t=0,n=0,r=Vr.DefaultOrder){this._x=e,this._y=t,this._z=n,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,r=this._order){return this._x=e,this._y=t,this._z=n,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){const r=e.elements,i=r[0],o=r[4],s=r[8],a=r[1],l=r[5],c=r[9],u=r[2],d=r[6],h=r[10];switch(t){case"XYZ":this._y=Math.asin(xn(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-c,h),this._z=Math.atan2(-o,i)):(this._x=Math.atan2(d,l),this._z=0);break;case"YXZ":this._x=Math.asin(-xn(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(s,h),this._z=Math.atan2(a,l)):(this._y=Math.atan2(-u,i),this._z=0);break;case"ZXY":this._x=Math.asin(xn(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(-u,h),this._z=Math.atan2(-o,l)):(this._y=0,this._z=Math.atan2(a,i));break;case"ZYX":this._y=Math.asin(-xn(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(d,h),this._z=Math.atan2(a,i)):(this._x=0,this._z=Math.atan2(-o,l));break;case"YZX":this._z=Math.asin(xn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-c,l),this._y=Math.atan2(-u,i)):(this._x=0,this._y=Math.atan2(s,h));break;case"XZY":this._z=Math.asin(-xn(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(d,l),this._y=Math.atan2(s,i)):(this._x=Math.atan2(-c,h),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!0===n&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return Hr.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Hr,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return Gr.setFromEuler(this),this.setFromQuaternion(Gr,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}Vr.prototype.isEuler=!0,Vr.DefaultOrder="XYZ",Vr.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];class Wr{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let e=0;e1){for(let e=0;e0){r.children=[];for(let t=0;t0){r.animations=[];for(let t=0;t0&&(n.geometries=t),r.length>0&&(n.materials=r),i.length>0&&(n.textures=i),s.length>0&&(n.images=s),a.length>0&&(n.shapes=a),l.length>0&&(n.skeletons=l),c.length>0&&(n.animations=c),u.length>0&&(n.nodes=u)}return n.object=r,n;function o(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}}clone(e){return(new this.constructor).copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(let t=0;t0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}static getBarycoord(e,t,n,r,i){ci.subVectors(r,t),ui.subVectors(n,t),di.subVectors(e,t);const o=ci.dot(ci),s=ci.dot(ui),a=ci.dot(di),l=ui.dot(ui),c=ui.dot(di),u=o*l-s*s;if(0===u)return i.set(-2,-1,-1);const d=1/u,h=(l*a-s*c)*d,p=(o*c-s*a)*d;return i.set(1-h-p,p,h)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,hi),hi.x>=0&&hi.y>=0&&hi.x+hi.y<=1}static getUV(e,t,n,r,i,o,s,a){return this.getBarycoord(e,t,n,r,hi),a.set(0,0),a.addScaledVector(i,hi.x),a.addScaledVector(o,hi.y),a.addScaledVector(s,hi.z),a}static isFrontFacing(e,t,n,r){return ci.subVectors(n,t),ui.subVectors(e,t),ci.cross(ui).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return ci.subVectors(this.c,this.b),ui.subVectors(this.a,this.b),.5*ci.cross(ui).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return yi.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return yi.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,n,r,i){return yi.getUV(e,this.a,this.b,this.c,t,n,r,i)}containsPoint(e){return yi.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return yi.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,r=this.b,i=this.c;let o,s;pi.subVectors(r,n),fi.subVectors(i,n),gi.subVectors(e,n);const a=pi.dot(gi),l=fi.dot(gi);if(a<=0&&l<=0)return t.copy(n);bi.subVectors(e,r);const c=pi.dot(bi),u=fi.dot(bi);if(c>=0&&u<=c)return t.copy(r);const d=a*u-c*l;if(d<=0&&a>=0&&c<=0)return o=a/(a-c),t.copy(n).addScaledVector(pi,o);vi.subVectors(e,i);const h=pi.dot(vi),p=fi.dot(vi);if(p>=0&&h<=p)return t.copy(i);const f=h*l-a*p;if(f<=0&&l>=0&&p<=0)return s=l/(l-p),t.copy(n).addScaledVector(fi,s);const m=c*p-h*u;if(m<=0&&u-c>=0&&h-p>=0)return mi.subVectors(i,r),s=(u-c)/(u-c+(h-p)),t.copy(r).addScaledVector(mi,s);const g=1/(m+f+d);return o=f*g,s=d*g,t.copy(n).addScaledVector(pi,o).addScaledVector(fi,s)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let _i=0;class Si extends gn{constructor(){super(),Object.defineProperty(this,"id",{value:_i++}),this.uuid=Sn(),this.name="",this.type="Material",this.blending=_,this.side=f,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=I,this.blendDst=D,this.blendEquation=O,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=q,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=nn,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Ut,this.stencilZFail=Ut,this.stencilZPass=Ut,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(void 0!==e)for(const t in e){const n=e[t];if(void 0===n){console.warn("THREE.Material: '"+t+"' parameter is undefined.");continue}if("shading"===t){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=n===b;continue}const r=this[t];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n:console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.")}}toJSON(e){const t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});const n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),void 0!==this.sheen&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==_&&(n.blending=this.blending),this.side!==f&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,void 0!==this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaToCoverage&&(n.alphaToCoverage=this.alphaToCoverage),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(n.flatShading=this.flatShading),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),!1===this.fog&&(n.fog=!1),"{}"!==JSON.stringify(this.userData)&&(n.userData=this.userData),t){const t=r(e.textures),i=r(e.images);t.length>0&&(n.textures=t),i.length>0&&(n.images=i)}return n}clone(){return(new this.constructor).copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(null!==t){const e=t.length;n=new Array(e);for(let r=0;r!==e;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){!0===e&&this.version++}}Si.prototype.isMaterial=!0,Si.fromType=function(){return null};class xi extends Si{constructor(e){super(),this.type="MeshBasicMaterial",this.color=new Hn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=X,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}xi.prototype.isMeshBasicMaterial=!0;const wi=new sr,ki=new Cn;class Oi{constructor(e,t,n){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=!0===n,this.usage=rn,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,i=this.itemSize;r0&&(e.userData=this.userData),void 0!==this.parameters){const t=this.parameters;for(const n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};const t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const t in n){const r=n[t];e.data.attributes[t]=r.toJSON(e.data)}const r={};let i=!1;for(const t in this.morphAttributes){const n=this.morphAttributes[t],o=[];for(let t=0,r=n.length;t0&&(r[t]=o,i=!0)}i&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const s=this.boundingSphere;return null!==s&&(e.data.boundingSphere={center:s.center.toArray(),radius:s.radius}),e}clone(){return(new this.constructor).copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const n=e.index;null!==n&&this.setIndex(n.clone(t));const r=e.attributes;for(const e in r){const n=r[e];this.setAttribute(e,n.clone(t))}const i=e.morphAttributes;for(const e in i){const n=[],r=i[e];for(let e=0,i=r.length;e0){const e=t[n[0]];if(void 0!==e){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;t0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}raycast(e,t){const n=this.geometry,r=this.material,i=this.matrixWorld;if(void 0===r)return;if(null===n.boundingSphere&&n.computeBoundingSphere(),Gi.copy(n.boundingSphere),Gi.applyMatrix4(i),!1===e.ray.intersectsSphere(Gi))return;if(qi.copy(i).invert(),Hi.copy(e.ray).applyMatrix4(qi),null!==n.boundingBox&&!1===Hi.intersectsBox(n.boundingBox))return;let o;if(n.isBufferGeometry){const i=n.index,s=n.attributes.position,a=n.morphAttributes.position,l=n.morphTargetsRelative,c=n.attributes.uv,u=n.attributes.uv2,d=n.groups,h=n.drawRange;if(null!==i)if(Array.isArray(r))for(let n=0,p=d.length;nn.far?null:{distance:c,point:so.clone(),object:e}}(e,t,n,r,Vi,Wi,Xi,oo);if(p){a&&(no.fromBufferAttribute(a,c),ro.fromBufferAttribute(a,u),io.fromBufferAttribute(a,d),p.uv=yi.getUV(oo,Vi,Wi,Xi,no,ro,io,new Cn)),l&&(no.fromBufferAttribute(l,c),ro.fromBufferAttribute(l,u),io.fromBufferAttribute(l,d),p.uv2=yi.getUV(oo,Vi,Wi,Xi,no,ro,io,new Cn));const e={a:c,b:u,c:d,normal:new sr,materialIndex:0};yi.getNormal(Vi,Wi,Xi,e.normal),p.face=e}return p}ao.prototype.isMesh=!0;class co extends Qi{constructor(e=1,t=1,n=1,r=1,i=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:o};const s=this;r=Math.floor(r),i=Math.floor(i),o=Math.floor(o);const a=[],l=[],c=[],u=[];let d=0,h=0;function p(e,t,n,r,i,o,p,f,m,g,b){const v=o/m,y=p/g,_=o/2,S=p/2,x=f/2,w=m+1,k=g+1;let O=0,E=0;const A=new sr;for(let o=0;o0?1:-1,c.push(A.x,A.y,A.z),u.push(a/m),u.push(1-o/g),O+=1}}for(let e=0;e0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;const n={};for(const e in this.extensions)!0===this.extensions[e]&&(n[e]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}fo.prototype.isShaderMaterial=!0;class mo extends li{constructor(){super(),this.type="Camera",this.matrixWorldInverse=new jr,this.projectionMatrix=new jr,this.projectionMatrixInverse=new jr}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}mo.prototype.isCamera=!0;class go extends mo{constructor(e=50,t=1,n=.1,r=2e3){super(),this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=2*_n*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(.5*yn*this.fov);return.5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*_n*Math.atan(Math.tan(.5*yn*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,n,r,i,o){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(.5*yn*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r;const o=this.view;if(null!==this.view&&this.view.enabled){const e=o.fullWidth,s=o.fullHeight;i+=o.offsetX*r/e,t-=o.offsetY*n/s,r*=o.width/e,n*=o.height/s}const s=this.filmOffset;0!==s&&(i+=e*s/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}go.prototype.isPerspectiveCamera=!0;class bo extends li{constructor(e,t,n){if(super(),this.type="CubeCamera",!0!==n.isWebGLCubeRenderTarget)return void console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.");this.renderTarget=n;const r=new go(90,1,e,t);r.layers=this.layers,r.up.set(0,-1,0),r.lookAt(new sr(1,0,0)),this.add(r);const i=new go(90,1,e,t);i.layers=this.layers,i.up.set(0,-1,0),i.lookAt(new sr(-1,0,0)),this.add(i);const o=new go(90,1,e,t);o.layers=this.layers,o.up.set(0,0,1),o.lookAt(new sr(0,1,0)),this.add(o);const s=new go(90,1,e,t);s.layers=this.layers,s.up.set(0,0,-1),s.lookAt(new sr(0,-1,0)),this.add(s);const a=new go(90,1,e,t);a.layers=this.layers,a.up.set(0,-1,0),a.lookAt(new sr(0,0,1)),this.add(a);const l=new go(90,1,e,t);l.layers=this.layers,l.up.set(0,-1,0),l.lookAt(new sr(0,0,-1)),this.add(l)}update(e,t){null===this.parent&&this.updateMatrixWorld();const n=this.renderTarget,[r,i,o,s,a,l]=this.children,c=e.getRenderTarget(),u=e.toneMapping,d=e.xr.enabled;e.toneMapping=J,e.xr.enabled=!1;const h=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0),e.render(t,r),e.setRenderTarget(n,1),e.render(t,i),e.setRenderTarget(n,2),e.render(t,o),e.setRenderTarget(n,3),e.render(t,s),e.setRenderTarget(n,4),e.render(t,a),n.texture.generateMipmaps=h,e.setRenderTarget(n,5),e.render(t,l),e.setRenderTarget(c),e.toneMapping=u,e.xr.enabled=d,n.texture.needsPMREMUpdate=!0}}class vo extends Zn{constructor(e,t,n,r,i,o,s,a,l,c){super(e=void 0!==e?e:[],t=void 0!==t?t:oe,n,r,i,o,s,a,l,c),this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}vo.prototype.isCubeTexture=!0;class yo extends Kn{constructor(e,t={}){super(e,e,t);const n={width:e,height:e,depth:1},r=[n,n,n,n,n,n];this.texture=new vo(r,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==t.generateMipmaps&&t.generateMipmaps,this.texture.minFilter=void 0!==t.minFilter?t.minFilter:ve}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.encoding=t.encoding,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const n={uniforms:{tEquirect:{value:null}},vertexShader:"\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include \n\t\t\t\t\t#include \n\n\t\t\t\t}\n\t\t\t",fragmentShader:"\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include \n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t"},r=new co(5,5,5),i=new fo({name:"CubemapFromEquirect",uniforms:uo(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:m,blending:y});i.uniforms.tEquirect.value=t;const o=new ao(r,i),s=t.minFilter;t.minFilter===Se&&(t.minFilter=ve);return new bo(1,10,this).update(e,o),t.minFilter=s,o.geometry.dispose(),o.material.dispose(),this}clear(e,t,n,r){const i=e.getRenderTarget();for(let i=0;i<6;i++)e.setRenderTarget(this,i),e.clear(t,n,r);e.setRenderTarget(i)}}yo.prototype.isWebGLCubeRenderTarget=!0;const _o=new sr,So=new sr,xo=new Mn;class wo{constructor(e=new sr(1,0,0),t=0){this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const r=_o.subVectors(n,t).cross(So.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)}intersectLine(e,t){const n=e.delta(_o),r=this.normal.dot(n);if(0===r)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;const i=-(e.start.dot(this.normal)+this.constant)/r;return i<0||i>1?null:t.copy(n).multiplyScalar(i).add(e.start)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const n=t||xo.getNormalMatrix(e),r=this.coplanarPoint(_o).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return(new this.constructor).copy(this)}}wo.prototype.isPlane=!0;const ko=new Tr,Oo=new sr;class Eo{constructor(e=new wo,t=new wo,n=new wo,r=new wo,i=new wo,o=new wo){this.planes=[e,t,n,r,i,o]}set(e,t,n,r,i,o){const s=this.planes;return s[0].copy(e),s[1].copy(t),s[2].copy(n),s[3].copy(r),s[4].copy(i),s[5].copy(o),this}copy(e){const t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e){const t=this.planes,n=e.elements,r=n[0],i=n[1],o=n[2],s=n[3],a=n[4],l=n[5],c=n[6],u=n[7],d=n[8],h=n[9],p=n[10],f=n[11],m=n[12],g=n[13],b=n[14],v=n[15];return t[0].setComponents(s-r,u-a,f-d,v-m).normalize(),t[1].setComponents(s+r,u+a,f+d,v+m).normalize(),t[2].setComponents(s+i,u+l,f+h,v+g).normalize(),t[3].setComponents(s-i,u-l,f-h,v-g).normalize(),t[4].setComponents(s-o,u-c,f-p,v-b).normalize(),t[5].setComponents(s+o,u+c,f+p,v+b).normalize(),this}intersectsObject(e){const t=e.geometry;return null===t.boundingSphere&&t.computeBoundingSphere(),ko.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(ko)}intersectsSprite(e){return ko.center.set(0,0,0),ko.radius=.7071067811865476,ko.applyMatrix4(e.matrixWorld),this.intersectsSphere(ko)}intersectsSphere(e){const t=this.planes,n=e.center,r=-e.radius;for(let e=0;e<6;e++){if(t[e].distanceToPoint(n)0?e.max.x:e.min.x,Oo.y=r.normal.y>0?e.max.y:e.min.y,Oo.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(Oo)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function Ao(){let e=null,t=!1,n=null,r=null;function i(t,o){n(t,o),r=e.requestAnimationFrame(i)}return{start:function(){!0!==t&&null!==n&&(r=e.requestAnimationFrame(i),t=!0)},stop:function(){e.cancelAnimationFrame(r),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function To(e,t){const n=t.isWebGL2,r=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),r.get(e)},remove:function(t){t.isInterleavedBufferAttribute&&(t=t.data);const n=r.get(t);n&&(e.deleteBuffer(n.buffer),r.delete(t))},update:function(t,i){if(t.isGLBufferAttribute){const e=r.get(t);return void((!e||e.version 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) );\n\t\tvec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat linearToRelativeLuminance( const in vec3 color ) {\n\tvec3 weights = vec3( 0.2126, 0.7152, 0.0722 );\n\treturn dot( weights, color.rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\tvec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define r0 1.0\n\t#define v0 0.339\n\t#define m0 - 2.0\n\t#define r1 0.8\n\t#define v1 0.276\n\t#define m1 - 1.0\n\t#define r4 0.4\n\t#define v4 0.046\n\t#define m4 2.0\n\t#define r5 0.305\n\t#define v5 0.016\n\t#define m5 3.0\n\t#define r6 0.21\n\t#define v6 0.0038\n\t#define m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= r1 ) {\n\t\t\tmip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0;\n\t\t} else if ( roughness >= r4 ) {\n\t\t\tmip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1;\n\t\t} else if ( roughness >= r5 ) {\n\t\t\tmip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4;\n\t\t} else if ( roughness >= r6 ) {\n\t\t\tmip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:"vec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP )\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\treturn ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_vertex:"vec3 diffuse = vec3( 1.0 );\nGeometricContext geometry;\ngeometry.position = mvPosition.xyz;\ngeometry.normal = normalize( transformedNormal );\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz );\nGeometricContext backGeometry;\nbackGeometry.position = geometry.position;\nbackGeometry.normal = -geometry.normal;\nbackGeometry.viewDir = geometry.viewDir;\nvLightFront = vec3( 0.0 );\nvIndirectFront = vec3( 0.0 );\n#ifdef DOUBLE_SIDED\n\tvLightBack = vec3( 0.0 );\n\tvIndirectBack = vec3( 0.0 );\n#endif\nIncidentLight directLight;\nfloat dotNL;\nvec3 directLightColor_Diffuse;\nvIndirectFront += getAmbientLightIrradiance( ambientLightColor );\nvIndirectFront += getLightProbeIrradiance( lightProbe, geometry.normal );\n#ifdef DOUBLE_SIDED\n\tvIndirectBack += getAmbientLightIrradiance( ambientLightColor );\n\tvIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry.normal );\n#endif\n#if NUM_POINT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tgetPointLightInfo( pointLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( - dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tgetSpotLightInfo( spotLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( - dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_DIR_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tgetDirectionalLightInfo( directionalLights[ i ], geometry, directLight );\n\t\tdotNL = dot( geometry.normal, directLight.direction );\n\t\tdirectLightColor_Diffuse = directLight.color;\n\t\tvLightFront += saturate( dotNL ) * directLightColor_Diffuse;\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvLightBack += saturate( - dotNL ) * directLightColor_Diffuse;\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\tvIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\tvIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry.normal );\n\t\t#endif\n\t}\n\t#pragma unroll_loop_end\n#endif",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#else\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon\n#define Material_LightProbeLOD( material )\t(0)",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong\n#define Material_LightProbeLOD( material )\t(0)",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\t#ifdef SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULARINTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vUv ).a;\n\t\t#endif\n\t\t#ifdef USE_SPECULARCOLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vUv ).rgb;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( ior - 1.0 ) / ( ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEENCOLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEENROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vUv ).a;\n\t#endif\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n};\nvec3 clearcoatSpecular = vec3( 0.0 );\nvec3 sheenSpecular = vec3( 0.0 );\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\tvec3 FssEss = specularColor * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecular += ccIrradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometry.normal, geometry.viewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\tcomputeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef USE_CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry.normal );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometry.normal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) );\n\tvec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * faceDirection;\n\t\t\tbitangent = bitangent * faceDirection;\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( - vViewPosition, normal, mapN, faceDirection );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {\n\t\tvec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) );\n\t\tvec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );\n\t\treturn normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );\n\t#endif\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif",output_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= transmissionAlpha + 0.1;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 );\n\t\tbool inFrustum = all( inFrustumVec );\n\t\tbvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 );\n\t\tbool frustumTest = all( frustumTestVec );\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), \n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\n\t\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\tvec4 shadowWorldPosition;\n\t#endif\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tuniform int boneTextureSize;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tfloat j = i * 4.0;\n\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\ty = dy * ( y + 0.5 );\n\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\treturn bone;\n\t}\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tfloat transmissionAlpha = 1.0;\n\tfloat transmissionFactor = transmission;\n\tfloat thicknessFactor = thickness;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\ttransmissionFactor *= texture2D( transmissionMap, vUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tthicknessFactor *= texture2D( thicknessMap, vUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmission = getIBLVolumeRefraction(\n\t\tn, v, roughnessFactor, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, ior, thicknessFactor,\n\t\tattenuationColor, attenuationDistance );\n\ttotalDiffuse = mix( totalDiffuse, transmission.rgb, transmissionFactor );\n\ttransmissionAlpha = mix( transmissionAlpha, transmission.a, transmissionFactor );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat framebufferLod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\t#ifdef texture2DLodEXT\n\t\t\treturn texture2DLodEXT( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#else\n\t\t\treturn texture2D( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#endif\n\t}\n\tvec3 applyVolumeAttenuation( const in vec3 radiance, const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( attenuationDistance == 0.0 ) {\n\t\t\treturn radiance;\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance * radiance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 attenuatedColor = applyVolumeAttenuation( transmittedLight.rgb, length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a );\n\t}\n#endif",uv_pars_fragment:"#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#ifdef USE_UV\n\t#ifdef UVS_VERTEX_ONLY\n\t\tvec2 vUv;\n\t#else\n\t\tvarying vec2 vUv;\n\t#endif\n\tuniform mat3 uvTransform;\n#endif",uv_vertex:"#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n\tuniform mat3 uv2Transform;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION )\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nvarying vec2 vUv;\nvoid main() {\n\tgl_FragColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tgl_FragColor = vec4( mix( pow( gl_FragColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), gl_FragColor.rgb * 0.0773993808, vec3( lessThanEqual( gl_FragColor.rgb, vec3( 0.04045 ) ) ) ), gl_FragColor.w );\n\t#endif\n\t#include \n\t#include \n}",cube_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"#include \nuniform float opacity;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 vReflect = vWorldDirection;\n\t#include \n\tgl_FragColor = envColor;\n\tgl_FragColor.a *= opacity;\n\t#include \n\t#include \n}",depth_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main () {\n\t#include \n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include \n\t#include \n\t#include \n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include \n\t#include \n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include \nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include \n\t#include \n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_vert:"#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t\t#include \n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\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#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\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 \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshlambert_frag:"uniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\nvarying vec3 vLightFront;\nvarying vec3 vIndirectFront;\n#ifdef DOUBLE_SIDED\n\tvarying vec3 vLightBack;\n\tvarying vec3 vIndirectBack;\n#endif\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#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack;\n\t#else\n\t\treflectedLight.indirectDiffuse += vIndirectFront;\n\t#endif\n\t#include \n\treflectedLight.indirectDiffuse *= BRDF_Lambert( diffuseColor.rgb );\n\t#ifdef DOUBLE_SIDED\n\t\treflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack;\n\t#else\n\t\treflectedLight.directDiffuse = vLightFront;\n\t#endif\n\treflectedLight.directDiffuse *= BRDF_Lambert( diffuseColor.rgb ) * getShadowMask();\n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\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 \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\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 \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\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#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULARINTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n\t#ifdef USE_SPECULARCOLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEENCOLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEENROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\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#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#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include \n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecular;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + clearcoatSpecular * material.clearcoat;\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvViewPosition = - mvPosition.xyz;\n\t#include \n\t#include \n\t#include \n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\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#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",points_vert:"uniform float size;\nuniform float scale;\n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include \n\t#include \n\t#include \n\t#include \n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_vert:"#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n\t#include \n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include \n\t#include \n\t#include \n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include \n\t#include \n\t#include \n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \nvoid main() {\n\t#include \n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include \n\t#include \n\t#include \n\t#include \n\toutgoingLight = diffuseColor.rgb;\n\t#include \n\t#include \n\t#include \n\t#include \n}"},Po={common:{diffuse:{value:new Hn(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new Mn},uv2Transform:{value:new Mn},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new Cn(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Hn(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Hn(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Mn}},sprite:{diffuse:{value:new Hn(16777215)},opacity:{value:1},center:{value:new Cn(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Mn}}},$o={basic:{uniforms:ho([Po.common,Po.specularmap,Po.envmap,Po.aomap,Po.lightmap,Po.fog]),vertexShader:Mo.meshbasic_vert,fragmentShader:Mo.meshbasic_frag},lambert:{uniforms:ho([Po.common,Po.specularmap,Po.envmap,Po.aomap,Po.lightmap,Po.emissivemap,Po.fog,Po.lights,{emissive:{value:new Hn(0)}}]),vertexShader:Mo.meshlambert_vert,fragmentShader:Mo.meshlambert_frag},phong:{uniforms:ho([Po.common,Po.specularmap,Po.envmap,Po.aomap,Po.lightmap,Po.emissivemap,Po.bumpmap,Po.normalmap,Po.displacementmap,Po.fog,Po.lights,{emissive:{value:new Hn(0)},specular:{value:new Hn(1118481)},shininess:{value:30}}]),vertexShader:Mo.meshphong_vert,fragmentShader:Mo.meshphong_frag},standard:{uniforms:ho([Po.common,Po.envmap,Po.aomap,Po.lightmap,Po.emissivemap,Po.bumpmap,Po.normalmap,Po.displacementmap,Po.roughnessmap,Po.metalnessmap,Po.fog,Po.lights,{emissive:{value:new Hn(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Mo.meshphysical_vert,fragmentShader:Mo.meshphysical_frag},toon:{uniforms:ho([Po.common,Po.aomap,Po.lightmap,Po.emissivemap,Po.bumpmap,Po.normalmap,Po.displacementmap,Po.gradientmap,Po.fog,Po.lights,{emissive:{value:new Hn(0)}}]),vertexShader:Mo.meshtoon_vert,fragmentShader:Mo.meshtoon_frag},matcap:{uniforms:ho([Po.common,Po.bumpmap,Po.normalmap,Po.displacementmap,Po.fog,{matcap:{value:null}}]),vertexShader:Mo.meshmatcap_vert,fragmentShader:Mo.meshmatcap_frag},points:{uniforms:ho([Po.points,Po.fog]),vertexShader:Mo.points_vert,fragmentShader:Mo.points_frag},dashed:{uniforms:ho([Po.common,Po.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Mo.linedashed_vert,fragmentShader:Mo.linedashed_frag},depth:{uniforms:ho([Po.common,Po.displacementmap]),vertexShader:Mo.depth_vert,fragmentShader:Mo.depth_frag},normal:{uniforms:ho([Po.common,Po.bumpmap,Po.normalmap,Po.displacementmap,{opacity:{value:1}}]),vertexShader:Mo.meshnormal_vert,fragmentShader:Mo.meshnormal_frag},sprite:{uniforms:ho([Po.sprite,Po.fog]),vertexShader:Mo.sprite_vert,fragmentShader:Mo.sprite_frag},background:{uniforms:{uvTransform:{value:new Mn},t2D:{value:null}},vertexShader:Mo.background_vert,fragmentShader:Mo.background_frag},cube:{uniforms:ho([Po.envmap,{opacity:{value:1}}]),vertexShader:Mo.cube_vert,fragmentShader:Mo.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Mo.equirect_vert,fragmentShader:Mo.equirect_frag},distanceRGBA:{uniforms:ho([Po.common,Po.displacementmap,{referencePosition:{value:new sr},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Mo.distanceRGBA_vert,fragmentShader:Mo.distanceRGBA_frag},shadow:{uniforms:ho([Po.lights,Po.fog,{color:{value:new Hn(0)},opacity:{value:1}}]),vertexShader:Mo.shadow_vert,fragmentShader:Mo.shadow_frag}};function Ro(e,t,n,r,i,o){const s=new Hn(0);let a,l,c=!0===i?0:1,u=null,d=0,h=null;function p(e,t){n.buffers.color.setClear(e.r,e.g,e.b,t,o)}return{getClearColor:function(){return s},setClearColor:function(e,t=1){s.set(e),c=t,p(s,c)},getClearAlpha:function(){return c},setClearAlpha:function(e){c=e,p(s,c)},render:function(n,i){let o=!1,g=!0===i.isScene?i.background:null;g&&g.isTexture&&(g=t.get(g));const b=e.xr,v=b.getSession&&b.getSession();v&&"additive"===v.environmentBlendMode&&(g=null),null===g?p(s,c):g&&g.isColor&&(p(g,1),o=!0),(e.autoClear||o)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),g&&(g.isCubeTexture||g.mapping===ce)?(void 0===l&&(l=new ao(new co(1,1,1),new fo({name:"BackgroundCubeMaterial",uniforms:uo($o.cube.uniforms),vertexShader:$o.cube.vertexShader,fragmentShader:$o.cube.fragmentShader,side:m,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),l.geometry.deleteAttribute("uv"),l.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(l.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(l)),l.material.uniforms.envMap.value=g,l.material.uniforms.flipEnvMap.value=g.isCubeTexture&&!1===g.isRenderTargetTexture?-1:1,u===g&&d===g.version&&h===e.toneMapping||(l.material.needsUpdate=!0,u=g,d=g.version,h=e.toneMapping),l.layers.enableAll(),n.unshift(l,l.geometry,l.material,0,0,null)):g&&g.isTexture&&(void 0===a&&(a=new ao(new Co(2,2),new fo({name:"BackgroundMaterial",uniforms:uo($o.background.uniforms),vertexShader:$o.background.vertexShader,fragmentShader:$o.background.fragmentShader,side:f,depthTest:!1,depthWrite:!1,fog:!1})),a.geometry.deleteAttribute("normal"),Object.defineProperty(a.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(a)),a.material.uniforms.t2D.value=g,!0===g.matrixAutoUpdate&&g.updateMatrix(),a.material.uniforms.uvTransform.value.copy(g.matrix),u===g&&d===g.version&&h===e.toneMapping||(a.material.needsUpdate=!0,u=g,d=g.version,h=e.toneMapping),a.layers.enableAll(),n.unshift(a,a.geometry,a.material,0,0,null))}}}function Io(e,t,n,r){const i=e.getParameter(34921),o=r.isWebGL2?null:t.get("OES_vertex_array_object"),s=r.isWebGL2||null!==o,a={},l=p(null);let c=l,u=!1;function d(t){return r.isWebGL2?e.bindVertexArray(t):o.bindVertexArrayOES(t)}function h(t){return r.isWebGL2?e.deleteVertexArray(t):o.deleteVertexArrayOES(t)}function p(e){const t=[],n=[],r=[];for(let e=0;e=0){const n=i[t];let r=o[t];if(void 0===r&&("instanceMatrix"===t&&e.instanceMatrix&&(r=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(r=e.instanceColor)),void 0===n)return!0;if(n.attribute!==r)return!0;if(r&&n.data!==r.data)return!0;s++}}return c.attributesNum!==s||c.index!==r}(i,y,h,_),S&&function(e,t,n,r){const i={},o=t.attributes;let s=0;const a=n.getAttributes();for(const t in a){if(a[t].location>=0){let n=o[t];void 0===n&&("instanceMatrix"===t&&e.instanceMatrix&&(n=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(n=e.instanceColor));const r={};r.attribute=n,n&&n.data&&(r.data=n.data),i[t]=r,s++}}c.attributes=i,c.attributesNum=s,c.index=r}(i,y,h,_)}else{const e=!0===l.wireframe;c.geometry===y.id&&c.program===h.id&&c.wireframe===e||(c.geometry=y.id,c.program=h.id,c.wireframe=e,S=!0)}null!==_&&n.update(_,34963),(S||u)&&(u=!1,function(i,o,s,a){if(!1===r.isWebGL2&&(i.isInstancedMesh||a.isInstancedBufferGeometry)&&null===t.get("ANGLE_instanced_arrays"))return;f();const l=a.attributes,c=s.getAttributes(),u=o.defaultAttributeValues;for(const t in c){const r=c[t];if(r.location>=0){let o=l[t];if(void 0===o&&("instanceMatrix"===t&&i.instanceMatrix&&(o=i.instanceMatrix),"instanceColor"===t&&i.instanceColor&&(o=i.instanceColor)),void 0!==o){const t=o.normalized,s=o.itemSize,l=n.get(o);if(void 0===l)continue;const c=l.buffer,u=l.type,d=l.bytesPerElement;if(o.isInterleavedBufferAttribute){const n=o.data,l=n.stride,h=o.offset;if(n.isInstancedInterleavedBuffer){for(let e=0;e0&&e.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(35633,36337).precision>0&&e.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}const o="undefined"!=typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||"undefined"!=typeof WebGL2ComputeRenderingContext&&e instanceof WebGL2ComputeRenderingContext;let s=void 0!==n.precision?n.precision:"highp";const a=i(s);a!==s&&(console.warn("THREE.WebGLRenderer:",s,"not supported, using",a,"instead."),s=a);const l=o||t.has("WEBGL_draw_buffers"),c=!0===n.logarithmicDepthBuffer,u=e.getParameter(34930),d=e.getParameter(35660),h=e.getParameter(3379),p=e.getParameter(34076),f=e.getParameter(34921),m=e.getParameter(36347),g=e.getParameter(36348),b=e.getParameter(36349),v=d>0,y=o||t.has("OES_texture_float");return{isWebGL2:o,drawBuffers:l,getMaxAnisotropy:function(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const n=t.get("EXT_texture_filter_anisotropic");r=e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:i,precision:s,logarithmicDepthBuffer:c,maxTextures:u,maxVertexTextures:d,maxTextureSize:h,maxCubemapSize:p,maxAttributes:f,maxVertexUniforms:m,maxVaryings:g,maxFragmentUniforms:b,vertexTextures:v,floatFragmentTextures:y,floatVertexTextures:v&&y,maxSamples:o?e.getParameter(36183):0}}function jo(e){const t=this;let n=null,r=0,i=!1,o=!1;const s=new wo,a=new Mn,l={value:null,needsUpdate:!1};function c(){l.value!==n&&(l.value=n,l.needsUpdate=r>0),t.numPlanes=r,t.numIntersection=0}function u(e,n,r,i){const o=null!==e?e.length:0;let c=null;if(0!==o){if(c=l.value,!0!==i||null===c){const t=r+4*o,i=n.matrixWorldInverse;a.getNormalMatrix(i),(null===c||c.length0){const s=new yo(o.height/2);return s.fromEquirectangularTexture(e,i),t.set(i,s),i.addEventListener("dispose",r),n(s.texture,i.mapping)}return null}}}return i},dispose:function(){t=new WeakMap}}}$o.physical={uniforms:ho([$o.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new Cn(1,1)},clearcoatNormalMap:{value:null},sheen:{value:0},sheenColor:{value:new Hn(0)},sheenColorMap:{value:null},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new Cn},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new Hn(0)},specularIntensity:{value:1},specularIntensityMap:{value:null},specularColor:{value:new Hn(1,1,1)},specularColorMap:{value:null}}]),vertexShader:Mo.meshphysical_vert,fragmentShader:Mo.meshphysical_frag};class Bo extends mo{constructor(e=-1,t=1,n=1,r=-1,i=.1,o=2e3){super(),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=i,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,n,r,i,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let i=n-e,o=n+e,s=r+t,a=r-t;if(null!==this.view&&this.view.enabled){const e=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom;i+=e*this.view.offsetX,o=i+e*this.view.width,s-=t*this.view.offsetY,a=s-t*this.view.height}this.projectionMatrix.makeOrthographic(i,o,s,a,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}Bo.prototype.isOrthographicCamera=!0;const Fo=[.125,.215,.35,.446,.526,.582],zo=new Bo,Uo=new Hn;let Qo=null;const qo=(1+Math.sqrt(5))/2,Ho=1/qo,Go=[new sr(1,1,1),new sr(-1,1,1),new sr(1,1,-1),new sr(-1,1,-1),new sr(0,qo,Ho),new sr(0,qo,-Ho),new sr(Ho,0,qo),new sr(-Ho,0,qo),new sr(qo,Ho,0),new sr(-qo,Ho,0)];class Vo{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,n=.1,r=100){Qo=this._renderer.getRenderTarget(),this._setSize(256);const i=this._allocateTargets();return i.depthBuffer=!0,this._sceneToCubeUV(e,n,r,i),t>0&&this._blur(i,0,0,t),this._applyPMREM(i),this._cleanup(i),i}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=Zo(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=Yo(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let e=0;ee-4?a=Fo[s-e+4-1]:0===s&&(a=0),r.push(a);const l=1/(o-2),c=-l,u=1+l,d=[c,c,u,c,u,u,c,c,u,u,c,u],h=6,p=6,f=3,m=2,g=1,b=new Float32Array(f*p*h),v=new Float32Array(m*p*h),y=new Float32Array(g*p*h);for(let e=0;e2?0:-1,r=[t,n,0,t+2/3,n,0,t+2/3,n+1,0,t,n,0,t+2/3,n+1,0,t,n+1,0];b.set(r,f*p*e),v.set(d,m*p*e);const i=[e,e,e,e,e,e];y.set(i,g*p*e)}const _=new Qi;_.setAttribute("position",new Oi(b,f)),_.setAttribute("uv",new Oi(v,m)),_.setAttribute("faceIndex",new Oi(y,g)),t.push(_),i>4&&i--}return{lodPlanes:t,sizeLods:n,sigmas:r}}(r)),this._blurMaterial=function(e,t,n){const r=new Float32Array(20),i=new sr(0,1,0);return new fo({name:"SphericalGaussianBlur",defines:{n:20,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:e+".0"},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:Jo(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include \n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",blending:y,depthTest:!1,depthWrite:!1})}(r,e,t)}return r}_compileMaterial(e){const t=new ao(this._lodPlanes[0],e);this._renderer.compile(t,zo)}_sceneToCubeUV(e,t,n,r){const i=new go(90,1,t,n),o=[1,-1,1,1,1,1],s=[1,1,1,-1,-1,-1],a=this._renderer,l=a.autoClear,c=a.toneMapping;a.getClearColor(Uo),a.toneMapping=J,a.autoClear=!1;const u=new xi({name:"PMREM.Background",side:m,depthWrite:!1,depthTest:!1}),d=new ao(new co,u);let h=!1;const p=e.background;p?p.isColor&&(u.color.copy(p),e.background=null,h=!0):(u.color.copy(Uo),h=!0);for(let t=0;t<6;t++){const n=t%3;0===n?(i.up.set(0,o[t],0),i.lookAt(s[t],0,0)):1===n?(i.up.set(0,0,o[t]),i.lookAt(0,s[t],0)):(i.up.set(0,o[t],0),i.lookAt(0,0,s[t]));const l=this._cubeSize;Xo(r,n*l,t>2?l:0,l,l),a.setRenderTarget(r),h&&a.render(d,i),a.render(e,i)}d.geometry.dispose(),d.material.dispose(),a.toneMapping=c,a.autoClear=l,e.background=p}_textureToCubeUV(e,t){const n=this._renderer,r=e.mapping===oe||e.mapping===se;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=Zo()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===e.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=Yo());const i=r?this._cubemapMaterial:this._equirectMaterial,o=new ao(this._lodPlanes[0],i);i.uniforms.envMap.value=e;const s=this._cubeSize;Xo(t,0,0,3*s,2*s),n.setRenderTarget(t),n.render(o,zo)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;for(let t=1;t20&&console.warn(`sigmaRadians, ${i}, is too large and will clip, as it requested ${f} samples when the maximum is set to 20`);const m=[];let g=0;for(let e=0;e<20;++e){const t=e/p,n=Math.exp(-t*t/2);m.push(n),0===e?g+=n:eb-4?r-b+4:0),4*(this._cubeSize-v),3*v,2*v),a.setRenderTarget(t),a.render(c,zo)}}function Wo(e,t,n){const r=new Kn(e,t,n);return r.texture.mapping=ce,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function Xo(e,t,n,r,i){e.viewport.set(t,n,r,i),e.scissor.set(t,n,r,i)}function Yo(){return new fo({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:Jo(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include \n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t",blending:y,depthTest:!1,depthWrite:!1})}function Zo(){return new fo({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:Jo(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",blending:y,depthTest:!1,depthWrite:!1})}function Jo(){return"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t"}function Ko(e){let t=new WeakMap,n=null;function r(e){const n=e.target;n.removeEventListener("dispose",r);const i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture){const o=i.mapping,s=o===ae||o===le,a=o===oe||o===se;if(s||a){if(i.isRenderTargetTexture&&!0===i.needsPMREMUpdate){i.needsPMREMUpdate=!1;let r=t.get(i);return null===n&&(n=new Vo(e)),r=s?n.fromEquirectangular(i,r):n.fromCubemap(i,r),t.set(i,r),r.texture}if(t.has(i))return t.get(i).texture;{const o=i.image;if(s&&o&&o.height>0||a&&o&&function(e){let t=0;for(let n=0;n<6;n++)void 0!==e[n]&&t++;return 6===t}(o)){null===n&&(n=new Vo(e));const o=s?n.fromEquirectangular(i):n.fromCubemap(i);return t.set(i,o),i.addEventListener("dispose",r),o.texture}return null}}}return i},dispose:function(){t=new WeakMap,null!==n&&(n.dispose(),n=null)}}}function es(e){const t={};function n(n){if(void 0!==t[n])return t[n];let r;switch(n){case"WEBGL_depth_texture":r=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=e.getExtension(n)}return t[n]=r,r}return{has:function(e){return null!==n(e)},init:function(e){e.isWebGL2?n("EXT_color_buffer_float"):(n("WEBGL_depth_texture"),n("OES_texture_float"),n("OES_texture_half_float"),n("OES_texture_half_float_linear"),n("OES_standard_derivatives"),n("OES_element_index_uint"),n("OES_vertex_array_object"),n("ANGLE_instanced_arrays")),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float"),n("WEBGL_multisampled_render_to_texture")},get:function(e){const t=n(e);return null===t&&console.warn("THREE.WebGLRenderer: "+e+" extension not supported."),t}}}function ts(e,t,n,r){const i={},o=new WeakMap;function s(e){const a=e.target;null!==a.index&&t.remove(a.index);for(const e in a.attributes)t.remove(a.attributes[e]);a.removeEventListener("dispose",s),delete i[a.id];const l=o.get(a);l&&(t.remove(l),o.delete(a)),r.releaseStatesOfGeometry(a),!0===a.isInstancedBufferGeometry&&delete a._maxInstanceCount,n.memory.geometries--}function a(e){const n=[],r=e.index,i=e.attributes.position;let s=0;if(null!==r){const e=r.array;s=r.version;for(let t=0,r=e.length;tt.maxTextureSize&&(f=Math.ceil(p/t.maxTextureSize),p=t.maxTextureSize);const m=new Float32Array(p*f*4*i),g=new er(m,p,f,i);g.type=Ce,g.needsUpdate=!0;const b=4*h;for(let t=0;t0)return e;const i=t*n;let o=ps[i];if(void 0===o&&(o=new Float32Array(i),ps[i]=o),0!==t){r.toArray(o,0);for(let r=1,i=0;r!==t;++r)i+=n,e[r].toArray(o,i)}return o}function ys(e,t){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n/gm;function xa(e){return e.replace(Sa,wa)}function wa(e,t){const n=Mo[t];if(void 0===n)throw new Error("Can not resolve #include <"+t+">");return xa(n)}const ka=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,Oa=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function Ea(e){return e.replace(Oa,Ta).replace(ka,Aa)}function Aa(e,t,n,r){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),Ta(e,t,n,r)}function Ta(e,t,n,r){let i="";for(let e=parseInt(t);e0&&(y+="\n"),_=[g,b].filter(va).join("\n"),_.length>0&&(_+="\n")):(y=[Ca(n),"#define SHADER_NAME "+n.shaderName,b,n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.supportsVertexTextures?"#define VERTEX_TEXTURES":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+u:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.displacementMap&&n.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",n.specularColorMap?"#define USE_SPECULARCOLORMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEENCOLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.morphColors&&n.isWebGL2?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(va).join("\n"),_=[g,Ca(n),"#define SHADER_NAME "+n.shaderName,b,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+u:"",n.envMap?"#define "+f:"",m?"#define CUBEUV_TEXEL_WIDTH "+m.texelWidth:"",m?"#define CUBEUV_TEXEL_HEIGHT "+m.texelHeight:"",m?"#define CUBEUV_MAX_MIP "+m.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",n.specularColorMap?"#define USE_SPECULARCOLORMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEENCOLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==J?"#define TONE_MAPPING":"",n.toneMapping!==J?Mo.tonemapping_pars_fragment:"",n.toneMapping!==J?ba("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",Mo.encodings_pars_fragment,ga("linearToOutputTexel",n.outputEncoding),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(va).join("\n")),s=xa(s),s=ya(s,n),s=_a(s,n),a=xa(a),a=ya(a,n),a=_a(a,n),s=Ea(s),a=Ea(a),n.isWebGL2&&!0!==n.isRawShaderMaterial&&(S="#version 300 es\n",y=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+y,_=["#define varying in",n.glslVersion===fn?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===fn?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+_);const x=S+_+a,w=pa(i,35633,S+y+s),k=pa(i,35632,x);if(i.attachShader(v,w),i.attachShader(v,k),void 0!==n.index0AttributeName?i.bindAttribLocation(v,0,n.index0AttributeName):!0===n.morphTargets&&i.bindAttribLocation(v,0,"position"),i.linkProgram(v),e.debug.checkShaderErrors){const e=i.getProgramInfoLog(v).trim(),t=i.getShaderInfoLog(w).trim(),n=i.getShaderInfoLog(k).trim();let r=!0,o=!0;if(!1===i.getProgramParameter(v,35714)){r=!1;const t=ma(i,w,"vertex"),n=ma(i,k,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(v,35715)+"\n\nProgram Info Log: "+e+"\n"+t+"\n"+n)}else""!==e?console.warn("THREE.WebGLProgram: Program Info Log:",e):""!==t&&""!==n||(o=!1);o&&(this.diagnostics={runnable:r,programLog:e,vertexShader:{log:t,prefix:y},fragmentShader:{log:n,prefix:_}})}let O,E;return i.deleteShader(w),i.deleteShader(k),this.getUniforms=function(){return void 0===O&&(O=new ha(i,v)),O},this.getAttributes=function(){return void 0===E&&(E=function(e,t){const n={},r=e.getProgramParameter(t,35721);for(let i=0;i0,D=o.clearcoat>0;return{isWebGL2:u,shaderID:O,shaderName:o.type,vertexShader:T,fragmentShader:C,defines:o.defines,customVertexShaderID:M,customFragmentShaderID:P,isRawShaderMaterial:!0===o.isRawShaderMaterial,glslVersion:o.glslVersion,precision:p,instancing:!0===v.isInstancedMesh,instancingColor:!0===v.isInstancedMesh&&null!==v.instanceColor,supportsVertexTextures:h,outputEncoding:null===R?e.outputEncoding:!0===R.isXRRenderTarget?R.texture.encoding:$t,map:!!o.map,matcap:!!o.matcap,envMap:!!w,envMapMode:w&&w.mapping,envMapCubeUVHeight:k,lightMap:!!o.lightMap,aoMap:!!o.aoMap,emissiveMap:!!o.emissiveMap,bumpMap:!!o.bumpMap,normalMap:!!o.normalMap,objectSpaceNormalMap:o.normalMapType===jt,tangentSpaceNormalMap:o.normalMapType===Nt,decodeVideoTexture:!!o.map&&!0===o.map.isVideoTexture&&o.map.encoding===Rt,clearcoat:D,clearcoatMap:D&&!!o.clearcoatMap,clearcoatRoughnessMap:D&&!!o.clearcoatRoughnessMap,clearcoatNormalMap:D&&!!o.clearcoatNormalMap,displacementMap:!!o.displacementMap,roughnessMap:!!o.roughnessMap,metalnessMap:!!o.metalnessMap,specularMap:!!o.specularMap,specularIntensityMap:!!o.specularIntensityMap,specularColorMap:!!o.specularColorMap,opaque:!1===o.transparent&&o.blending===_,alphaMap:!!o.alphaMap,alphaTest:I,gradientMap:!!o.gradientMap,sheen:o.sheen>0,sheenColorMap:!!o.sheenColorMap,sheenRoughnessMap:!!o.sheenRoughnessMap,transmission:o.transmission>0,transmissionMap:!!o.transmissionMap,thicknessMap:!!o.thicknessMap,combine:o.combine,vertexTangents:!!o.normalMap&&!!S.attributes.tangent,vertexColors:o.vertexColors,vertexAlphas:!0===o.vertexColors&&!!S.attributes.color&&4===S.attributes.color.itemSize,vertexUvs:!!(o.map||o.bumpMap||o.normalMap||o.specularMap||o.alphaMap||o.emissiveMap||o.roughnessMap||o.metalnessMap||o.clearcoatMap||o.clearcoatRoughnessMap||o.clearcoatNormalMap||o.displacementMap||o.transmissionMap||o.thicknessMap||o.specularIntensityMap||o.specularColorMap||o.sheenColorMap||o.sheenRoughnessMap),uvsVertexOnly:!(o.map||o.bumpMap||o.normalMap||o.specularMap||o.alphaMap||o.emissiveMap||o.roughnessMap||o.metalnessMap||o.clearcoatNormalMap||o.transmission>0||o.transmissionMap||o.thicknessMap||o.specularIntensityMap||o.specularColorMap||o.sheen>0||o.sheenColorMap||o.sheenRoughnessMap||!o.displacementMap),fog:!!y,useFog:!0===o.fog,fogExp2:y&&y.isFogExp2,flatShading:!!o.flatShading,sizeAttenuation:o.sizeAttenuation,logarithmicDepthBuffer:d,skinning:!0===v.isSkinnedMesh,morphTargets:void 0!==S.morphAttributes.position,morphNormals:void 0!==S.morphAttributes.normal,morphColors:void 0!==S.morphAttributes.color,morphTargetsCount:A,morphTextureStride:$,numDirLights:a.directional.length,numPointLights:a.point.length,numSpotLights:a.spot.length,numRectAreaLights:a.rectArea.length,numHemiLights:a.hemi.length,numDirLightShadows:a.directionalShadowMap.length,numPointLightShadows:a.pointShadowMap.length,numSpotLightShadows:a.spotShadowMap.length,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,dithering:o.dithering,shadowMapEnabled:e.shadowMap.enabled&&c.length>0,shadowMapType:e.shadowMap.type,toneMapping:o.toneMapped?e.toneMapping:J,physicallyCorrectLights:e.physicallyCorrectLights,premultipliedAlpha:o.premultipliedAlpha,doubleSided:o.side===g,flipSided:o.side===m,useDepthPacking:!!o.depthPacking,depthPacking:o.depthPacking||0,index0AttributeName:o.index0AttributeName,extensionDerivatives:o.extensions&&o.extensions.derivatives,extensionFragDepth:o.extensions&&o.extensions.fragDepth,extensionDrawBuffers:o.extensions&&o.extensions.drawBuffers,extensionShaderTextureLOD:o.extensions&&o.extensions.shaderTextureLOD,rendererExtensionFragDepth:u||r.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||r.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||r.has("EXT_shader_texture_lod"),customProgramCacheKey:o.customProgramCacheKey()}},getProgramCacheKey:function(t){const n=[];if(t.shaderID?n.push(t.shaderID):(n.push(t.customVertexShaderID),n.push(t.customFragmentShaderID)),void 0!==t.defines)for(const e in t.defines)n.push(e),n.push(t.defines[e]);return!1===t.isRawShaderMaterial&&(!function(e,t){e.push(t.precision),e.push(t.outputEncoding),e.push(t.envMapMode),e.push(t.envMapCubeUVHeight),e.push(t.combine),e.push(t.vertexUvs),e.push(t.fogExp2),e.push(t.sizeAttenuation),e.push(t.morphTargetsCount),e.push(t.morphAttributeCount),e.push(t.numDirLights),e.push(t.numPointLights),e.push(t.numSpotLights),e.push(t.numHemiLights),e.push(t.numRectAreaLights),e.push(t.numDirLightShadows),e.push(t.numPointLightShadows),e.push(t.numSpotLightShadows),e.push(t.shadowMapType),e.push(t.toneMapping),e.push(t.numClippingPlanes),e.push(t.numClipIntersection),e.push(t.depthPacking)}(n,t),function(e,t){a.disableAll(),t.isWebGL2&&a.enable(0);t.supportsVertexTextures&&a.enable(1);t.instancing&&a.enable(2);t.instancingColor&&a.enable(3);t.map&&a.enable(4);t.matcap&&a.enable(5);t.envMap&&a.enable(6);t.lightMap&&a.enable(7);t.aoMap&&a.enable(8);t.emissiveMap&&a.enable(9);t.bumpMap&&a.enable(10);t.normalMap&&a.enable(11);t.objectSpaceNormalMap&&a.enable(12);t.tangentSpaceNormalMap&&a.enable(13);t.clearcoat&&a.enable(14);t.clearcoatMap&&a.enable(15);t.clearcoatRoughnessMap&&a.enable(16);t.clearcoatNormalMap&&a.enable(17);t.displacementMap&&a.enable(18);t.specularMap&&a.enable(19);t.roughnessMap&&a.enable(20);t.metalnessMap&&a.enable(21);t.gradientMap&&a.enable(22);t.alphaMap&&a.enable(23);t.alphaTest&&a.enable(24);t.vertexColors&&a.enable(25);t.vertexAlphas&&a.enable(26);t.vertexUvs&&a.enable(27);t.vertexTangents&&a.enable(28);t.uvsVertexOnly&&a.enable(29);t.fog&&a.enable(30);e.push(a.mask),a.disableAll(),t.useFog&&a.enable(0);t.flatShading&&a.enable(1);t.logarithmicDepthBuffer&&a.enable(2);t.skinning&&a.enable(3);t.morphTargets&&a.enable(4);t.morphNormals&&a.enable(5);t.morphColors&&a.enable(6);t.premultipliedAlpha&&a.enable(7);t.shadowMapEnabled&&a.enable(8);t.physicallyCorrectLights&&a.enable(9);t.doubleSided&&a.enable(10);t.flipSided&&a.enable(11);t.useDepthPacking&&a.enable(12);t.dithering&&a.enable(13);t.specularIntensityMap&&a.enable(14);t.specularColorMap&&a.enable(15);t.transmission&&a.enable(16);t.transmissionMap&&a.enable(17);t.thicknessMap&&a.enable(18);t.sheen&&a.enable(19);t.sheenColorMap&&a.enable(20);t.sheenRoughnessMap&&a.enable(21);t.decodeVideoTexture&&a.enable(22);t.opaque&&a.enable(23);e.push(a.mask)}(n,t),n.push(e.outputEncoding)),n.push(t.customProgramCacheKey),n.join()},getUniforms:function(e){const t=f[e.type];let n;if(t){const e=$o[t];n=po.clone(e.uniforms)}else n=e.uniforms;return n},acquireProgram:function(t,n){let r;for(let e=0,t=c.length;e0?r.push(u):!0===s.transparent?i.push(u):n.push(u)},unshift:function(e,t,s,a,l,c){const u=o(e,t,s,a,l,c);s.transmission>0?r.unshift(u):!0===s.transparent?i.unshift(u):n.unshift(u)},finish:function(){for(let n=t,r=e.length;n1&&n.sort(e||Na),r.length>1&&r.sort(t||ja),i.length>1&&i.sort(t||ja)}}}function Ba(){let e=new WeakMap;return{get:function(t,n){let r;return!1===e.has(t)?(r=new La,e.set(t,[r])):n>=e.get(t).length?(r=new La,e.get(t).push(r)):r=e.get(t)[n],r},dispose:function(){e=new WeakMap}}}function Fa(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":n={direction:new sr,color:new Hn};break;case"SpotLight":n={position:new sr,direction:new sr,color:new Hn,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new sr,color:new Hn,distance:0,decay:0};break;case"HemisphereLight":n={direction:new sr,skyColor:new Hn,groundColor:new Hn};break;case"RectAreaLight":n={color:new Hn,position:new sr,halfWidth:new sr,halfHeight:new sr}}return e[t.id]=n,n}}}let za=0;function Ua(e,t){return(t.castShadow?1:0)-(e.castShadow?1:0)}function Qa(e,t){const n=new Fa,r=function(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Cn};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Cn,shadowCameraNear:1,shadowCameraFar:1e3}}return e[t.id]=n,n}}}(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]};for(let e=0;e<9;e++)i.probe.push(new sr);const o=new sr,s=new jr,a=new jr;return{setup:function(o,s){let a=0,l=0,c=0;for(let e=0;e<9;e++)i.probe[e].set(0,0,0);let u=0,d=0,h=0,p=0,f=0,m=0,g=0,b=0;o.sort(Ua);const v=!0!==s?Math.PI:1;for(let e=0,t=o.length;e0&&(t.isWebGL2||!0===e.has("OES_texture_float_linear")?(i.rectAreaLTC1=Po.LTC_FLOAT_1,i.rectAreaLTC2=Po.LTC_FLOAT_2):!0===e.has("OES_texture_half_float_linear")?(i.rectAreaLTC1=Po.LTC_HALF_1,i.rectAreaLTC2=Po.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=a,i.ambient[1]=l,i.ambient[2]=c;const y=i.hash;y.directionalLength===u&&y.pointLength===d&&y.spotLength===h&&y.rectAreaLength===p&&y.hemiLength===f&&y.numDirectionalShadows===m&&y.numPointShadows===g&&y.numSpotShadows===b||(i.directional.length=u,i.spot.length=h,i.rectArea.length=p,i.point.length=d,i.hemi.length=f,i.directionalShadow.length=m,i.directionalShadowMap.length=m,i.pointShadow.length=g,i.pointShadowMap.length=g,i.spotShadow.length=b,i.spotShadowMap.length=b,i.directionalShadowMatrix.length=m,i.pointShadowMatrix.length=g,i.spotShadowMatrix.length=b,y.directionalLength=u,y.pointLength=d,y.spotLength=h,y.rectAreaLength=p,y.hemiLength=f,y.numDirectionalShadows=m,y.numPointShadows=g,y.numSpotShadows=b,i.version=za++)},setupView:function(e,t){let n=0,r=0,l=0,c=0,u=0;const d=t.matrixWorldInverse;for(let t=0,h=e.length;t=n.get(r).length?(o=new qa(e,t),n.get(r).push(o)):o=n.get(r)[i],o},dispose:function(){n=new WeakMap}}}class Ga extends Si{constructor(e){super(),this.type="MeshDepthMaterial",this.depthPacking=It,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}Ga.prototype.isMeshDepthMaterial=!0;class Va extends Si{constructor(e){super(),this.type="MeshDistanceMaterial",this.referencePosition=new sr,this.nearDistance=1,this.farDistance=1e3,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}Va.prototype.isMeshDistanceMaterial=!0;function Wa(e,t,n){let r=new Eo;const i=new Cn,o=new Cn,s=new Jn,a=new Ga({depthPacking:Dt}),l=new Va,c={},u=n.maxTextureSize,h={0:m,1:f,2:g},b=new fo({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Cn},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include \nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),v=b.clone();v.defines.HORIZONTAL_PASS=1;const _=new Qi;_.setAttribute("position",new Oi(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const S=new ao(_,b),x=this;function w(n,r){const i=t.update(S);b.defines.VSM_SAMPLES!==n.blurSamples&&(b.defines.VSM_SAMPLES=n.blurSamples,v.defines.VSM_SAMPLES=n.blurSamples,b.needsUpdate=!0,v.needsUpdate=!0),b.uniforms.shadow_pass.value=n.map.texture,b.uniforms.resolution.value=n.mapSize,b.uniforms.radius.value=n.radius,e.setRenderTarget(n.mapPass),e.clear(),e.renderBufferDirect(r,null,i,b,S,null),v.uniforms.shadow_pass.value=n.mapPass.texture,v.uniforms.resolution.value=n.mapSize,v.uniforms.radius.value=n.radius,e.setRenderTarget(n.map),e.clear(),e.renderBufferDirect(r,null,i,v,S,null)}function k(t,n,r,i,o,s){let u=null;const d=!0===r.isPointLight?t.customDistanceMaterial:t.customDepthMaterial;if(u=void 0!==d?d:!0===r.isPointLight?l:a,e.localClippingEnabled&&!0===n.clipShadows&&0!==n.clippingPlanes.length||n.displacementMap&&0!==n.displacementScale||n.alphaMap&&n.alphaTest>0){const e=u.uuid,t=n.uuid;let r=c[e];void 0===r&&(r={},c[e]=r);let i=r[t];void 0===i&&(i=u.clone(),r[t]=i),u=i}return u.visible=n.visible,u.wireframe=n.wireframe,u.side=s===p?null!==n.shadowSide?n.shadowSide:n.side:null!==n.shadowSide?n.shadowSide:h[n.side],u.alphaMap=n.alphaMap,u.alphaTest=n.alphaTest,u.clipShadows=n.clipShadows,u.clippingPlanes=n.clippingPlanes,u.clipIntersection=n.clipIntersection,u.displacementMap=n.displacementMap,u.displacementScale=n.displacementScale,u.displacementBias=n.displacementBias,u.wireframeLinewidth=n.wireframeLinewidth,u.linewidth=n.linewidth,!0===r.isPointLight&&!0===u.isMeshDistanceMaterial&&(u.referencePosition.setFromMatrixPosition(r.matrixWorld),u.nearDistance=i,u.farDistance=o),u}function O(n,i,o,s,a){if(!1===n.visible)return;if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&a===p)&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);const r=t.update(n),i=n.material;if(Array.isArray(i)){const t=r.groups;for(let l=0,c=t.length;lu||i.y>u)&&(i.x>u&&(o.x=Math.floor(u/f.x),i.x=o.x*f.x,d.mapSize.x=o.x),i.y>u&&(o.y=Math.floor(u/f.y),i.y=o.y*f.y,d.mapSize.y=o.y)),null!==d.map||d.isPointLightShadow||this.type!==p||(d.map=new Kn(i.x,i.y),d.map.texture.name=c.name+".shadowMap",d.mapPass=new Kn(i.x,i.y),d.camera.updateProjectionMatrix()),null===d.map){const e={minFilter:pe,magFilter:pe,format:Ne};d.map=new Kn(i.x,i.y,e),d.map.texture.name=c.name+".shadowMap",d.camera.updateProjectionMatrix()}e.setRenderTarget(d.map),e.clear();const m=d.getViewportCount();for(let e=0;e=1):-1!==ue.indexOf("OpenGL ES")&&(ce=parseFloat(/^OpenGL ES (\d)/.exec(ue)[1]),le=ce>=2);let de=null,he={};const pe=e.getParameter(3088),fe=e.getParameter(2978),me=(new Jn).fromArray(pe),ge=(new Jn).fromArray(fe);function be(t,n,r){const i=new Uint8Array(4),o=e.createTexture();e.bindTexture(t,o),e.texParameteri(t,10241,9728),e.texParameteri(t,10240,9728);for(let t=0;tr||e.height>r)&&(i=r/Math.max(e.width,e.height)),i<1||!0===t){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const r=t?An:Math.floor,o=r(i*e.width),s=r(i*e.height);void 0===m&&(m=v(o,s));const a=n?v(o,s):m;a.width=o,a.height=s;return a.getContext("2d").drawImage(e,0,0,o,s),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+o+"x"+s+")."),a}return"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e}return e}function _(e){return On(e.width)&&On(e.height)}function S(e,t){return e.generateMipmaps&&t&&e.minFilter!==pe&&e.minFilter!==ve}function x(t){e.generateMipmap(t)}function w(n,r,i,o,s=!1){if(!1===a)return r;if(null!==n){if(void 0!==e[n])return e[n];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}let l=r;return 6403===r&&(5126===i&&(l=33326),5131===i&&(l=33325),5121===i&&(l=33321)),33319===r&&(5126===i&&(l=33328),5131===i&&(l=33327),5121===i&&(l=33323)),6408===r&&(5126===i&&(l=34836),5131===i&&(l=34842),5121===i&&(l=o===Rt&&!1===s?35907:32856),32819===i&&(l=32854),32820===i&&(l=32855)),33325!==l&&33326!==l&&33327!==l&&33328!==l&&34842!==l&&34836!==l||t.get("EXT_color_buffer_float"),l}function k(e,t,n){return!0===S(e,n)||e.isFramebufferTexture&&e.minFilter!==pe&&e.minFilter!==ve?Math.log2(Math.max(t.width,t.height))+1:void 0!==e.mipmaps&&e.mipmaps.length>0?e.mipmaps.length:e.isCompressedTexture&&Array.isArray(e.image)?t.mipmaps.length:1}function O(e){return e===pe||e===fe||e===ge?9728:9729}function E(e){const t=e.target;t.removeEventListener("dispose",E),function(e){const t=r.get(e);if(void 0===t.__webglInit)return;const n=e.source,i=g.get(n);if(i){const r=i[t.__cacheKey];r.usedTimes--,0===r.usedTimes&&T(e),0===Object.keys(i).length&&g.delete(n)}r.remove(e)}(t),t.isVideoTexture&&f.delete(t)}function A(t){const n=t.target;n.removeEventListener("dispose",A),function(t){const n=t.texture,i=r.get(t),o=r.get(n);void 0!==o.__webglTexture&&(e.deleteTexture(o.__webglTexture),s.memory.textures--);t.depthTexture&&t.depthTexture.dispose();if(t.isWebGLCubeRenderTarget)for(let t=0;t<6;t++)e.deleteFramebuffer(i.__webglFramebuffer[t]),i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer[t]);else e.deleteFramebuffer(i.__webglFramebuffer),i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer),i.__webglMultisampledFramebuffer&&e.deleteFramebuffer(i.__webglMultisampledFramebuffer),i.__webglColorRenderbuffer&&e.deleteRenderbuffer(i.__webglColorRenderbuffer),i.__webglDepthRenderbuffer&&e.deleteRenderbuffer(i.__webglDepthRenderbuffer);if(t.isWebGLMultipleRenderTargets)for(let t=0,i=n.length;t0&&i.__version!==e.version){const n=e.image;if(null===n)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==n.complete)return void D(i,e,t);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.activeTexture(33984+t),n.bindTexture(3553,i.__webglTexture)}const P={[ue]:10497,[de]:33071,[he]:33648},$={[pe]:9728,[fe]:9984,[ge]:9986,[ve]:9729,[ye]:9985,[Se]:9987};function R(n,o,s){if(s?(e.texParameteri(n,10242,P[o.wrapS]),e.texParameteri(n,10243,P[o.wrapT]),32879!==n&&35866!==n||e.texParameteri(n,32882,P[o.wrapR]),e.texParameteri(n,10240,$[o.magFilter]),e.texParameteri(n,10241,$[o.minFilter])):(e.texParameteri(n,10242,33071),e.texParameteri(n,10243,33071),32879!==n&&35866!==n||e.texParameteri(n,32882,33071),o.wrapS===de&&o.wrapT===de||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),e.texParameteri(n,10240,O(o.magFilter)),e.texParameteri(n,10241,O(o.minFilter)),o.minFilter!==pe&&o.minFilter!==ve&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),!0===t.has("EXT_texture_filter_anisotropic")){const s=t.get("EXT_texture_filter_anisotropic");if(o.type===Ce&&!1===t.has("OES_texture_float_linear"))return;if(!1===a&&o.type===Me&&!1===t.has("OES_texture_half_float_linear"))return;(o.anisotropy>1||r.get(o).__currentAnisotropy)&&(e.texParameterf(n,s.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(o.anisotropy,i.getMaxAnisotropy())),r.get(o).__currentAnisotropy=o.anisotropy)}}function I(t,n){let r=!1;void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",E));const i=n.source;let o=g.get(i);void 0===o&&(o={},g.set(i,o));const a=function(e){const t=[];return t.push(e.wrapS),t.push(e.wrapT),t.push(e.magFilter),t.push(e.minFilter),t.push(e.anisotropy),t.push(e.internalFormat),t.push(e.format),t.push(e.type),t.push(e.generateMipmaps),t.push(e.premultiplyAlpha),t.push(e.flipY),t.push(e.unpackAlignment),t.push(e.encoding),t.join()}(n);if(a!==t.__cacheKey){void 0===o[a]&&(o[a]={texture:e.createTexture(),usedTimes:0},s.memory.textures++,r=!0),o[a].usedTimes++;const i=o[t.__cacheKey];void 0!==i&&(o[t.__cacheKey].usedTimes--,0===i.usedTimes&&T(n)),t.__cacheKey=a,t.__webglTexture=o[a].texture}return r}function D(t,r,i){let s=3553;r.isDataArrayTexture&&(s=35866),r.isData3DTexture&&(s=32879);const l=I(t,r),c=r.source;if(n.activeTexture(33984+i),n.bindTexture(s,t.__webglTexture),c.version!==c.__currentVersion||!0===l){e.pixelStorei(37440,r.flipY),e.pixelStorei(37441,r.premultiplyAlpha),e.pixelStorei(3317,r.unpackAlignment),e.pixelStorei(37443,0);const i=function(e){return!a&&(e.wrapS!==de||e.wrapT!==de||e.minFilter!==pe&&e.minFilter!==ve)}(r)&&!1===_(r.image);let d=y(r.image,i,!1,u);d=z(r,d);const h=_(d)||a,p=o.convert(r.format,r.encoding);let f,m=o.convert(r.type),g=w(r.internalFormat,p,m,r.encoding,r.isVideoTexture);R(s,r,h);const b=r.mipmaps,v=a&&!0!==r.isVideoTexture,O=void 0===t.__version||!0===l,E=k(r,d,h);if(r.isDepthTexture)g=6402,a?g=r.type===Ce?36012:r.type===Te?33190:r.type===Re?35056:33189:r.type===Ce&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),r.format===Be&&6402===g&&r.type!==Ee&&r.type!==Te&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),r.type=Ee,m=o.convert(r.type)),r.format===Fe&&6402===g&&(g=34041,r.type!==Re&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),r.type=Re,m=o.convert(r.type))),O&&(v?n.texStorage2D(3553,1,g,d.width,d.height):n.texImage2D(3553,0,g,d.width,d.height,0,p,m,null));else if(r.isDataTexture)if(b.length>0&&h){v&&O&&n.texStorage2D(3553,E,g,b[0].width,b[0].height);for(let e=0,t=b.length;e>=1,t>>=1}}else if(b.length>0&&h){v&&O&&n.texStorage2D(3553,E,g,b[0].width,b[0].height);for(let e=0,t=b.length;e0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==n.__useRenderToTexture}function z(e,n){const r=e.encoding,i=e.format,o=e.type;return!0===e.isCompressedTexture||!0===e.isVideoTexture||e.format===mn||r!==$t&&(r===Rt?!1===a?!0===t.has("EXT_sRGB")&&i===Ne?(e.format=mn,e.minFilter=ve,e.generateMipmaps=!1):n=Vn.sRGBToLinear(n):i===Ne&&o===we||console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture encoding:",r)),n}this.allocateTextureUnit=function(){const e=C;return e>=l&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+l),C+=1,e},this.resetTextureUnits=function(){C=0},this.setTexture2D=M,this.setTexture2DArray=function(e,t){const i=r.get(e);e.version>0&&i.__version!==e.version?D(i,e,t):(n.activeTexture(33984+t),n.bindTexture(35866,i.__webglTexture))},this.setTexture3D=function(e,t){const i=r.get(e);e.version>0&&i.__version!==e.version?D(i,e,t):(n.activeTexture(33984+t),n.bindTexture(32879,i.__webglTexture))},this.setTextureCube=function(t,i){const s=r.get(t);t.version>0&&s.__version!==t.version?function(t,r,i){if(6!==r.image.length)return;const s=I(t,r),l=r.source;if(n.activeTexture(33984+i),n.bindTexture(34067,t.__webglTexture),l.version!==l.__currentVersion||!0===s){e.pixelStorei(37440,r.flipY),e.pixelStorei(37441,r.premultiplyAlpha),e.pixelStorei(3317,r.unpackAlignment),e.pixelStorei(37443,0);const i=r.isCompressedTexture||r.image[0].isCompressedTexture,s=r.image[0]&&r.image[0].isDataTexture,u=[];for(let e=0;e<6;e++)u[e]=i||s?s?r.image[e].image:r.image[e]:y(r.image[e],!1,!0,c),u[e]=z(r,u[e]);const d=u[0],h=_(d)||a,p=o.convert(r.format,r.encoding),f=o.convert(r.type),m=w(r.internalFormat,p,f,r.encoding),g=a&&!0!==r.isVideoTexture,b=void 0===t.__version;let v,O=k(r,d,h);if(R(34067,r,h),i){g&&b&&n.texStorage2D(34067,O,m,d.width,d.height);for(let e=0;e<6;e++){v=u[e].mipmaps;for(let t=0;t0&&O++,n.texStorage2D(34067,O,m,u[0].width,u[0].height));for(let e=0;e<6;e++)if(s){g?n.texSubImage2D(34069+e,0,0,0,u[e].width,u[e].height,p,f,u[e].data):n.texImage2D(34069+e,0,m,u[e].width,u[e].height,0,p,f,u[e].data);for(let t=0;t0&&!1===F(t)){c.__webglMultisampledFramebuffer=e.createFramebuffer(),c.__webglColorRenderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(36161,c.__webglColorRenderbuffer);const r=o.convert(l.format,l.encoding),i=o.convert(l.type),s=w(l.internalFormat,r,i,l.encoding),a=B(t);e.renderbufferStorageMultisample(36161,a,s,t.width,t.height),n.bindFramebuffer(36160,c.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(36160,36064,36161,c.__webglColorRenderbuffer),e.bindRenderbuffer(36161,null),t.depthBuffer&&(c.__webglDepthRenderbuffer=e.createRenderbuffer(),j(c.__webglDepthRenderbuffer,t,!0)),n.bindFramebuffer(36160,null)}if(d){n.bindTexture(34067,u.__webglTexture),R(34067,l,p);for(let e=0;e<6;e++)N(c.__webglFramebuffer[e],t,l,36064,34069+e);S(l,p)&&x(34067),n.unbindTexture()}else if(h){const e=t.texture;for(let i=0,o=e.length;i0&&!1===F(t)){const i=t.width,o=t.height;let s=16384;const a=[36064],l=t.stencilBuffer?33306:36096;t.depthBuffer&&a.push(l);const c=r.get(t),u=void 0!==c.__ignoreDepthValues&&c.__ignoreDepthValues;!1===u&&(t.depthBuffer&&(s|=256),t.stencilBuffer&&(s|=1024)),n.bindFramebuffer(36008,c.__webglMultisampledFramebuffer),n.bindFramebuffer(36009,c.__webglFramebuffer),!0===u&&(e.invalidateFramebuffer(36008,[l]),e.invalidateFramebuffer(36009,[l])),e.blitFramebuffer(0,0,i,o,0,0,i,o,s,9728),p&&e.invalidateFramebuffer(36008,a),n.bindFramebuffer(36008,null),n.bindFramebuffer(36009,c.__webglMultisampledFramebuffer)}},this.setupDepthRenderbuffer=L,this.setupFrameBufferTexture=N,this.useMultisampledRTT=F}function Za(e,t,n){const r=n.isWebGL2;return{convert:function(n,i=null){let o;if(n===we)return 5121;if(n===Pe)return 32819;if(n===$e)return 32820;if(n===ke)return 5120;if(n===Oe)return 5122;if(n===Ee)return 5123;if(n===Ae)return 5124;if(n===Te)return 5125;if(n===Ce)return 5126;if(n===Me)return r?5131:(o=t.get("OES_texture_half_float"),null!==o?o.HALF_FLOAT_OES:null);if(n===Ie)return 6406;if(n===Ne)return 6408;if(n===je)return 6409;if(n===Le)return 6410;if(n===Be)return 6402;if(n===Fe)return 34041;if(n===ze)return 6403;if(n===De)return console.warn("THREE.WebGLRenderer: THREE.RGBFormat has been removed. Use THREE.RGBAFormat instead. https://github.com/mrdoob/three.js/pull/23228"),6408;if(n===mn)return o=t.get("EXT_sRGB"),null!==o?o.SRGB_ALPHA_EXT:null;if(n===Ue)return 36244;if(n===Qe)return 33319;if(n===qe)return 33320;if(n===He)return 36249;if(n===Ge||n===Ve||n===We||n===Xe)if(i===Rt){if(o=t.get("WEBGL_compressed_texture_s3tc_srgb"),null===o)return null;if(n===Ge)return o.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===Ve)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===We)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===Xe)return o.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else{if(o=t.get("WEBGL_compressed_texture_s3tc"),null===o)return null;if(n===Ge)return o.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===Ve)return o.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===We)return o.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===Xe)return o.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(n===Ye||n===Ze||n===Je||n===Ke){if(o=t.get("WEBGL_compressed_texture_pvrtc"),null===o)return null;if(n===Ye)return o.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===Ze)return o.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===Je)return o.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===Ke)return o.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(n===et)return o=t.get("WEBGL_compressed_texture_etc1"),null!==o?o.COMPRESSED_RGB_ETC1_WEBGL:null;if(n===tt||n===nt){if(o=t.get("WEBGL_compressed_texture_etc"),null===o)return null;if(n===tt)return i===Rt?o.COMPRESSED_SRGB8_ETC2:o.COMPRESSED_RGB8_ETC2;if(n===nt)return i===Rt?o.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:o.COMPRESSED_RGBA8_ETC2_EAC}if(n===rt||n===it||n===ot||n===st||n===at||n===lt||n===ct||n===ut||n===dt||n===ht||n===pt||n===ft||n===mt||n===gt){if(o=t.get("WEBGL_compressed_texture_astc"),null===o)return null;if(n===rt)return i===Rt?o.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:o.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===it)return i===Rt?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:o.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===ot)return i===Rt?o.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:o.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===st)return i===Rt?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:o.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===at)return i===Rt?o.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:o.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===lt)return i===Rt?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:o.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===ct)return i===Rt?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:o.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===ut)return i===Rt?o.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:o.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===dt)return i===Rt?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:o.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===ht)return i===Rt?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:o.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===pt)return i===Rt?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:o.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===ft)return i===Rt?o.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:o.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===mt)return i===Rt?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:o.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===gt)return i===Rt?o.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:o.COMPRESSED_RGBA_ASTC_12x12_KHR}if(n===bt){if(o=t.get("EXT_texture_compression_bptc"),null===o)return null;if(n===bt)return i===Rt?o.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:o.COMPRESSED_RGBA_BPTC_UNORM_EXT}return n===Re?r?34042:(o=t.get("WEBGL_depth_texture"),null!==o?o.UNSIGNED_INT_24_8_WEBGL:null):void 0!==e[n]?e[n]:null}}}class Ja extends go{constructor(e=[]){super(),this.cameras=e}}Ja.prototype.isArrayCamera=!0;class Ka extends li{constructor(){super(),this.type="Group"}}Ka.prototype.isGroup=!0;const el={type:"move"};class tl{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return null===this._hand&&(this._hand=new Ka,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return null===this._targetRay&&(this._targetRay=new Ka,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new sr,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new sr),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new Ka,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new sr,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new sr),this._grip}dispatchEvent(e){return null!==this._targetRay&&this._targetRay.dispatchEvent(e),null!==this._grip&&this._grip.dispatchEvent(e),null!==this._hand&&this._hand.dispatchEvent(e),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this}update(e,t,n){let r=null,i=null,o=null;const s=this._targetRay,a=this._grip,l=this._hand;if(e&&"visible-blurred"!==t.session.visibilityState)if(null!==s&&(r=t.getPose(e.targetRaySpace,n),null!==r&&(s.matrix.fromArray(r.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),r.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(r.linearVelocity)):s.hasLinearVelocity=!1,r.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(r.angularVelocity)):s.hasAngularVelocity=!1,this.dispatchEvent(el))),l&&e.hand){o=!0;for(const r of e.hand.values()){const e=t.getJointPose(r,n);if(void 0===l.joints[r.jointName]){const e=new Ka;e.matrixAutoUpdate=!1,e.visible=!1,l.joints[r.jointName]=e,l.add(e)}const i=l.joints[r.jointName];null!==e&&(i.matrix.fromArray(e.transform.matrix),i.matrix.decompose(i.position,i.rotation,i.scale),i.jointRadius=e.radius),i.visible=null!==e}const r=l.joints["index-finger-tip"],i=l.joints["thumb-tip"],s=r.position.distanceTo(i.position),a=.02,c=.005;l.inputState.pinching&&s>a+c?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&s<=a-c&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==a&&e.gripSpace&&(i=t.getPose(e.gripSpace,n),null!==i&&(a.matrix.fromArray(i.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),i.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(i.linearVelocity)):a.hasLinearVelocity=!1,i.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(i.angularVelocity)):a.hasAngularVelocity=!1));return null!==s&&(s.visible=null!==r),null!==a&&(a.visible=null!==i),null!==l&&(l.visible=null!==o),this}}class nl extends Zn{constructor(e,t,n,r,i,o,s,a,l,c){if((c=void 0!==c?c:Be)!==Be&&c!==Fe)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&c===Be&&(n=Ee),void 0===n&&c===Fe&&(n=Re),super(null,r,i,o,s,a,c,n,l),this.image={width:e,height:t},this.magFilter=void 0!==s?s:pe,this.minFilter=void 0!==a?a:pe,this.flipY=!1,this.generateMipmaps=!1}}nl.prototype.isDepthTexture=!0;class rl extends gn{constructor(e,t){super();const n=this;let r=null,i=1,o=null,s="local-floor",a=null,l=null,c=null,u=null,d=null,h=null;const p=t.getContextAttributes();let f=null,m=null;const g=[],b=new Map,v=new go;v.layers.enable(1),v.viewport=new Jn;const y=new go;y.layers.enable(2),y.viewport=new Jn;const _=[v,y],S=new Ja;S.layers.enable(1),S.layers.enable(2);let x=null,w=null;function k(e){const t=b.get(e.inputSource);t&&t.dispatchEvent({type:e.type,data:e.inputSource})}function O(){b.forEach((function(e,t){e.disconnect(t)})),b.clear(),x=null,w=null,e.setRenderTarget(f),d=null,u=null,c=null,r=null,m=null,P.stop(),n.isPresenting=!1,n.dispatchEvent({type:"sessionend"})}function E(e){const t=r.inputSources;for(let e=0;e0&&(n.alphaTest.value=r.alphaTest);const i=t.get(r).envMap;if(i&&(n.envMap.value=i,n.flipEnvMap.value=i.isCubeTexture&&!1===i.isRenderTargetTexture?-1:1,n.reflectivity.value=r.reflectivity,n.ior.value=r.ior,n.refractionRatio.value=r.refractionRatio),r.lightMap){n.lightMap.value=r.lightMap;const t=!0!==e.physicallyCorrectLights?Math.PI:1;n.lightMapIntensity.value=r.lightMapIntensity*t}let o,s;r.aoMap&&(n.aoMap.value=r.aoMap,n.aoMapIntensity.value=r.aoMapIntensity),r.map?o=r.map:r.specularMap?o=r.specularMap:r.displacementMap?o=r.displacementMap:r.normalMap?o=r.normalMap:r.bumpMap?o=r.bumpMap:r.roughnessMap?o=r.roughnessMap:r.metalnessMap?o=r.metalnessMap:r.alphaMap?o=r.alphaMap:r.emissiveMap?o=r.emissiveMap:r.clearcoatMap?o=r.clearcoatMap:r.clearcoatNormalMap?o=r.clearcoatNormalMap:r.clearcoatRoughnessMap?o=r.clearcoatRoughnessMap:r.specularIntensityMap?o=r.specularIntensityMap:r.specularColorMap?o=r.specularColorMap:r.transmissionMap?o=r.transmissionMap:r.thicknessMap?o=r.thicknessMap:r.sheenColorMap?o=r.sheenColorMap:r.sheenRoughnessMap&&(o=r.sheenRoughnessMap),void 0!==o&&(o.isWebGLRenderTarget&&(o=o.texture),!0===o.matrixAutoUpdate&&o.updateMatrix(),n.uvTransform.value.copy(o.matrix)),r.aoMap?s=r.aoMap:r.lightMap&&(s=r.lightMap),void 0!==s&&(s.isWebGLRenderTarget&&(s=s.texture),!0===s.matrixAutoUpdate&&s.updateMatrix(),n.uv2Transform.value.copy(s.matrix))}return{refreshFogUniforms:function(e,t){e.fogColor.value.copy(t.color),t.isFog?(e.fogNear.value=t.near,e.fogFar.value=t.far):t.isFogExp2&&(e.fogDensity.value=t.density)},refreshMaterialUniforms:function(e,r,i,o,s){r.isMeshBasicMaterial||r.isMeshLambertMaterial?n(e,r):r.isMeshToonMaterial?(n(e,r),function(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap)}(e,r)):r.isMeshPhongMaterial?(n(e,r),function(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4)}(e,r)):r.isMeshStandardMaterial?(n(e,r),function(e,n){e.roughness.value=n.roughness,e.metalness.value=n.metalness,n.roughnessMap&&(e.roughnessMap.value=n.roughnessMap);n.metalnessMap&&(e.metalnessMap.value=n.metalnessMap);t.get(n).envMap&&(e.envMapIntensity.value=n.envMapIntensity)}(e,r),r.isMeshPhysicalMaterial&&function(e,t,n){e.ior.value=t.ior,t.sheen>0&&(e.sheenColor.value.copy(t.sheenColor).multiplyScalar(t.sheen),e.sheenRoughness.value=t.sheenRoughness,t.sheenColorMap&&(e.sheenColorMap.value=t.sheenColorMap),t.sheenRoughnessMap&&(e.sheenRoughnessMap.value=t.sheenRoughnessMap));t.clearcoat>0&&(e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap),t.clearcoatNormalMap&&(e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),e.clearcoatNormalMap.value=t.clearcoatNormalMap,t.side===m&&e.clearcoatNormalScale.value.negate()));t.transmission>0&&(e.transmission.value=t.transmission,e.transmissionSamplerMap.value=n.texture,e.transmissionSamplerSize.value.set(n.width,n.height),t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap),e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap),e.attenuationDistance.value=t.attenuationDistance,e.attenuationColor.value.copy(t.attenuationColor));e.specularIntensity.value=t.specularIntensity,e.specularColor.value.copy(t.specularColor),t.specularIntensityMap&&(e.specularIntensityMap.value=t.specularIntensityMap);t.specularColorMap&&(e.specularColorMap.value=t.specularColorMap)}(e,r,s)):r.isMeshMatcapMaterial?(n(e,r),function(e,t){t.matcap&&(e.matcap.value=t.matcap)}(e,r)):r.isMeshDepthMaterial?n(e,r):r.isMeshDistanceMaterial?(n(e,r),function(e,t){e.referencePosition.value.copy(t.referencePosition),e.nearDistance.value=t.nearDistance,e.farDistance.value=t.farDistance}(e,r)):r.isMeshNormalMaterial?n(e,r):r.isLineBasicMaterial?(function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity}(e,r),r.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(e,r)):r.isPointsMaterial?function(e,t,n,r){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*n,e.scale.value=.5*r,t.map&&(e.map.value=t.map);t.alphaMap&&(e.alphaMap.value=t.alphaMap);t.alphaTest>0&&(e.alphaTest.value=t.alphaTest);let i;t.map?i=t.map:t.alphaMap&&(i=t.alphaMap);void 0!==i&&(!0===i.matrixAutoUpdate&&i.updateMatrix(),e.uvTransform.value.copy(i.matrix))}(e,r,i,o):r.isSpriteMaterial?function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map);t.alphaMap&&(e.alphaMap.value=t.alphaMap);t.alphaTest>0&&(e.alphaTest.value=t.alphaTest);let n;t.map?n=t.map:t.alphaMap&&(n=t.alphaMap);void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),e.uvTransform.value.copy(n.matrix))}(e,r):r.isShadowMaterial?(e.color.value.copy(r.color),e.opacity.value=r.opacity):r.isShaderMaterial&&(r.uniformsNeedUpdate=!1)}}}function ol(e={}){const t=void 0!==e.canvas?e.canvas:function(){const e=In("canvas");return e.style.display="block",e}(),n=void 0!==e.context?e.context:null,i=void 0===e.depth||e.depth,o=void 0===e.stencil||e.stencil,s=void 0!==e.antialias&&e.antialias,a=void 0===e.premultipliedAlpha||e.premultipliedAlpha,l=void 0!==e.preserveDrawingBuffer&&e.preserveDrawingBuffer,c=void 0!==e.powerPreference?e.powerPreference:"default",u=void 0!==e.failIfMajorPerformanceCaveat&&e.failIfMajorPerformanceCaveat;let d;d=null!==n?n.getContextAttributes().alpha:void 0!==e.alpha&&e.alpha;let h=null,p=null;const b=[],v=[];this.domElement=t,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputEncoding=$t,this.physicallyCorrectLights=!1,this.toneMapping=J,this.toneMappingExposure=1;const y=this;let _=!1,S=0,x=0,w=null,k=-1,O=null;const E=new Jn,A=new Jn;let T=null,C=t.width,M=t.height,P=1,$=null,R=null;const I=new Jn(0,0,C,M),D=new Jn(0,0,C,M);let N=!1;const j=new Eo;let L=!1,B=!1,F=null;const z=new jr,U=new Cn,Q=new sr,q={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function H(){return null===w?P:1}let G,V,W,X,Y,Z,K,ee,te,ne,re,ie,oe,se,ae,le,ce,ue,de,he,pe,fe,me,ge=n;function be(e,n){for(let r=0;r0&&function(e,t,n){const r=V.isWebGL2;null===F&&(F=new Kn(1,1,{generateMipmaps:!0,type:G.has("EXT_color_buffer_half_float")?Me:we,minFilter:Se,samples:r&&!0===s?4:0}));y.getDrawingBufferSize(U),r?F.setSize(U.x,U.y):F.setSize(An(U.x),An(U.y));const i=y.getRenderTarget();y.setRenderTarget(F),y.clear();const o=y.toneMapping;y.toneMapping=J,$e(e,t,n),y.toneMapping=o,Z.updateMultisampleRenderTarget(F),Z.updateRenderTargetMipmap(F),y.setRenderTarget(i)}(i,t,n),r&&W.viewport(E.copy(r)),i.length>0&&$e(i,t,n),o.length>0&&$e(o,t,n),a.length>0&&$e(a,t,n),W.buffers.depth.setTest(!0),W.buffers.depth.setMask(!0),W.buffers.color.setMask(!0),W.setPolygonOffset(!1)}function $e(e,t,n){const r=!0===t.isScene?t.overrideMaterial:null;for(let i=0,o=e.length;i0?v[v.length-1]:null,b.pop(),h=b.length>0?b[b.length-1]:null},this.getActiveCubeFace=function(){return S},this.getActiveMipmapLevel=function(){return x},this.getRenderTarget=function(){return w},this.setRenderTargetTextures=function(e,t,n){Y.get(e.texture).__webglTexture=t,Y.get(e.depthTexture).__webglTexture=n;const r=Y.get(e);r.__hasExternalTextures=!0,r.__hasExternalTextures&&(r.__autoAllocateDepthBuffer=void 0===n,r.__autoAllocateDepthBuffer||!0===G.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),r.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(e,t){const n=Y.get(e);n.__webglFramebuffer=t,n.__useDefaultFramebuffer=void 0===t},this.setRenderTarget=function(e,t=0,n=0){w=e,S=t,x=n;let r=!0;if(e){const t=Y.get(e);void 0!==t.__useDefaultFramebuffer?(W.bindFramebuffer(36160,null),r=!1):void 0===t.__webglFramebuffer?Z.setupRenderTarget(e):t.__hasExternalTextures&&Z.rebindTextures(e,Y.get(e.texture).__webglTexture,Y.get(e.depthTexture).__webglTexture)}let i=null,o=!1,s=!1;if(e){const n=e.texture;(n.isData3DTexture||n.isDataArrayTexture)&&(s=!0);const r=Y.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(i=r[t],o=!0):i=V.isWebGL2&&e.samples>0&&!1===Z.useMultisampledRTT(e)?Y.get(e).__webglMultisampledFramebuffer:r,E.copy(e.viewport),A.copy(e.scissor),T=e.scissorTest}else E.copy(I).multiplyScalar(P).floor(),A.copy(D).multiplyScalar(P).floor(),T=N;if(W.bindFramebuffer(36160,i)&&V.drawBuffers&&r&&W.drawBuffers(e,i),W.viewport(E),W.scissor(A),W.setScissorTest(T),o){const r=Y.get(e.texture);ge.framebufferTexture2D(36160,36064,34069+t,r.__webglTexture,n)}else if(s){const r=Y.get(e.texture),i=t||0;ge.framebufferTextureLayer(36160,36064,r.__webglTexture,n||0,i)}k=-1},this.readRenderTargetPixels=function(e,t,n,r,i,o,s){if(!e||!e.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let a=Y.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==s&&(a=a[s]),a){W.bindFramebuffer(36160,a);try{const s=e.texture,a=s.format,l=s.type;if(a!==Ne&&fe.convert(a)!==ge.getParameter(35739))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const c=l===Me&&(G.has("EXT_color_buffer_half_float")||V.isWebGL2&&G.has("EXT_color_buffer_float"));if(!(l===we||fe.convert(l)===ge.getParameter(35738)||l===Ce&&(V.isWebGL2||G.has("OES_texture_float")||G.has("WEBGL_color_buffer_float"))||c))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&ge.readPixels(t,n,r,i,fe.convert(a),fe.convert(l),o)}finally{const e=null!==w?Y.get(w).__webglFramebuffer:null;W.bindFramebuffer(36160,e)}}},this.copyFramebufferToTexture=function(e,t,n=0){if(!0!==t.isFramebufferTexture)return void console.error("THREE.WebGLRenderer: copyFramebufferToTexture() can only be used with FramebufferTexture.");const r=Math.pow(2,-n),i=Math.floor(t.image.width*r),o=Math.floor(t.image.height*r);Z.setTexture2D(t,0),ge.copyTexSubImage2D(3553,n,0,0,e.x,e.y,i,o),W.unbindTexture()},this.copyTextureToTexture=function(e,t,n,r=0){const i=t.image.width,o=t.image.height,s=fe.convert(n.format),a=fe.convert(n.type);Z.setTexture2D(n,0),ge.pixelStorei(37440,n.flipY),ge.pixelStorei(37441,n.premultiplyAlpha),ge.pixelStorei(3317,n.unpackAlignment),t.isDataTexture?ge.texSubImage2D(3553,r,e.x,e.y,i,o,s,a,t.image.data):t.isCompressedTexture?ge.compressedTexSubImage2D(3553,r,e.x,e.y,t.mipmaps[0].width,t.mipmaps[0].height,s,t.mipmaps[0].data):ge.texSubImage2D(3553,r,e.x,e.y,s,a,t.image),0===r&&n.generateMipmaps&&ge.generateMipmap(3553),W.unbindTexture()},this.copyTextureToTexture3D=function(e,t,n,r,i=0){if(y.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const o=e.max.x-e.min.x+1,s=e.max.y-e.min.y+1,a=e.max.z-e.min.z+1,l=fe.convert(r.format),c=fe.convert(r.type);let u;if(r.isData3DTexture)Z.setTexture3D(r,0),u=32879;else{if(!r.isDataArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");Z.setTexture2DArray(r,0),u=35866}ge.pixelStorei(37440,r.flipY),ge.pixelStorei(37441,r.premultiplyAlpha),ge.pixelStorei(3317,r.unpackAlignment);const d=ge.getParameter(3314),h=ge.getParameter(32878),p=ge.getParameter(3316),f=ge.getParameter(3315),m=ge.getParameter(32877),g=n.isCompressedTexture?n.mipmaps[0]:n.image;ge.pixelStorei(3314,g.width),ge.pixelStorei(32878,g.height),ge.pixelStorei(3316,e.min.x),ge.pixelStorei(3315,e.min.y),ge.pixelStorei(32877,e.min.z),n.isDataTexture||n.isData3DTexture?ge.texSubImage3D(u,i,t.x,t.y,t.z,o,s,a,l,c,g.data):n.isCompressedTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),ge.compressedTexSubImage3D(u,i,t.x,t.y,t.z,o,s,a,l,g.data)):ge.texSubImage3D(u,i,t.x,t.y,t.z,o,s,a,l,c,g),ge.pixelStorei(3314,d),ge.pixelStorei(32878,h),ge.pixelStorei(3316,p),ge.pixelStorei(3315,f),ge.pixelStorei(32877,m),0===i&&r.generateMipmaps&&ge.generateMipmap(u),W.unbindTexture()},this.initTexture=function(e){Z.setTexture2D(e,0),W.unbindTexture()},this.resetState=function(){S=0,x=0,w=null,W.reset(),me.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}ol.prototype.isWebGLRenderer=!0;class sl extends ol{}sl.prototype.isWebGL1Renderer=!0;class al{constructor(e,t=25e-5){this.name="",this.color=new Hn(e),this.density=t}clone(){return new al(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}al.prototype.isFogExp2=!0;class ll{constructor(e,t=1,n=1e3){this.name="",this.color=new Hn(e),this.near=t,this.far=n}clone(){return new ll(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}ll.prototype.isFog=!0;class cl extends li{constructor(){super(),this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.autoUpdate=e.autoUpdate,this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return null!==this.fog&&(t.object.fog=this.fog.toJSON()),t}}cl.prototype.isScene=!0;class ul{constructor(e,t){this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=rn,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=Sn()}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let r=0,i=this.stride;re.far||t.push({distance:a,point:ml.clone(),uv:yi.getUV(ml,Sl,xl,wl,kl,Ol,El,new Cn),face:null,object:this})}copy(e){return super.copy(e),void 0!==e.center&&this.center.copy(e.center),this.material=e.material,this}}function Tl(e,t,n,r,i,o){vl.subVectors(e,n).addScalar(.5).multiply(r),void 0!==i?(yl.x=o*vl.x-i*vl.y,yl.y=i*vl.x+o*vl.y):yl.copy(vl),e.copy(t),e.x+=yl.x,e.y+=yl.y,e.applyMatrix4(_l)}Al.prototype.isSprite=!0;const Cl=new sr,Ml=new sr;class Pl extends li{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let e=0,n=t.length;e0){let n,r;for(n=1,r=t.length;n0){Cl.setFromMatrixPosition(this.matrixWorld);const n=e.ray.origin.distanceTo(Cl);this.getObjectForDistance(n).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){Cl.setFromMatrixPosition(e.matrixWorld),Ml.setFromMatrixPosition(this.matrixWorld);const n=Cl.distanceTo(Ml)/e.zoom;let r,i;for(t[0].object.visible=!0,r=1,i=t.length;r=t[r].distance;r++)t[r-1].object.visible=!1,t[r].object.visible=!0;for(this._currentLevel=r-1;ra)continue;d.applyMatrix4(this.matrixWorld);const h=e.ray.origin.distanceTo(d);he.far||t.push({distance:h,point:u.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}else{for(let n=Math.max(0,o.start),r=Math.min(i.count,o.start+o.count)-1;na)continue;d.applyMatrix4(this.matrixWorld);const r=e.ray.origin.distanceTo(d);re.far||t.push({distance:r,point:u.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}}else n.isGeometry&&console.error("THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){const e=this.geometry;if(e.isBufferGeometry){const t=e.morphAttributes,n=Object.keys(t);if(n.length>0){const e=t[n[0]];if(void 0!==e){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;t0&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}tc.prototype.isLine=!0;const nc=new sr,rc=new sr;class ic extends tc{constructor(e,t){super(e,t),this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.isBufferGeometry)if(null===e.index){const t=e.attributes.position,n=[];for(let e=0,r=t.count;e0){const e=t[n[0]];if(void 0!==e){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,n=e.length;t0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}}function hc(e,t,n,r,i,o,s){const a=lc.distanceSqToPoint(e);if(ai.far)return;o.push({distance:l,distanceToRay:Math.sqrt(a),point:n,index:t,face:null,object:s})}}dc.prototype.isPoints=!0;class pc extends Zn{constructor(e,t,n,r,i,o,s,a,l){super(e,t,n,r,i,o,s,a,l),this.minFilter=void 0!==o?o:ve,this.magFilter=void 0!==i?i:ve,this.generateMipmaps=!1;const c=this;"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback((function t(){c.needsUpdate=!0,e.requestVideoFrameCallback(t)}))}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;!1==="requestVideoFrameCallback"in e&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}pc.prototype.isVideoTexture=!0;class fc extends Zn{constructor(e,t,n){super({width:e,height:t}),this.format=n,this.magFilter=pe,this.minFilter=pe,this.generateMipmaps=!1,this.needsUpdate=!0}}fc.prototype.isFramebufferTexture=!0;class mc extends Zn{constructor(e,t,n,r,i,o,s,a,l,c,u,d){super(null,o,s,a,l,c,r,i,u,d),this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}mc.prototype.isCompressedTexture=!0;class gc extends Zn{constructor(e,t,n,r,i,o,s,a,l){super(e,t,n,r,i,o,s,a,l),this.needsUpdate=!0}}gc.prototype.isCanvasTexture=!0;class bc{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let n,r=this.getPoint(0),i=0;t.push(0);for(let o=1;o<=e;o++)n=this.getPoint(o/e),i+=n.distanceTo(r),t.push(i),r=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const n=this.getLengths();let r=0;const i=n.length;let o;o=t||e*n[i-1];let s,a=0,l=i-1;for(;a<=l;)if(r=Math.floor(a+(l-a)/2),s=n[r]-o,s<0)a=r+1;else{if(!(s>0)){l=r;break}l=r-1}if(r=l,n[r]===o)return r/(i-1);const c=n[r];return(r+(o-c)/(n[r+1]-c))/(i-1)}getTangent(e,t){let n=e-1e-4,r=e+1e-4;n<0&&(n=0),r>1&&(r=1);const i=this.getPoint(n),o=this.getPoint(r),s=t||(i.isVector2?new Cn:new sr);return s.copy(o).sub(i).normalize(),s}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t){const n=new sr,r=[],i=[],o=[],s=new sr,a=new jr;for(let t=0;t<=e;t++){const n=t/e;r[t]=this.getTangentAt(n,new sr)}i[0]=new sr,o[0]=new sr;let l=Number.MAX_VALUE;const c=Math.abs(r[0].x),u=Math.abs(r[0].y),d=Math.abs(r[0].z);c<=l&&(l=c,n.set(1,0,0)),u<=l&&(l=u,n.set(0,1,0)),d<=l&&n.set(0,0,1),s.crossVectors(r[0],n).normalize(),i[0].crossVectors(r[0],s),o[0].crossVectors(r[0],i[0]);for(let t=1;t<=e;t++){if(i[t]=i[t-1].clone(),o[t]=o[t-1].clone(),s.crossVectors(r[t-1],r[t]),s.length()>Number.EPSILON){s.normalize();const e=Math.acos(xn(r[t-1].dot(r[t]),-1,1));i[t].applyMatrix4(a.makeRotationAxis(s,e))}o[t].crossVectors(r[t],i[t])}if(!0===t){let t=Math.acos(xn(i[0].dot(i[e]),-1,1));t/=e,r[0].dot(s.crossVectors(i[0],i[e]))>0&&(t=-t);for(let n=1;n<=e;n++)i[n].applyMatrix4(a.makeRotationAxis(r[n],t*n)),o[n].crossVectors(r[n],i[n])}return{tangents:r,normals:i,binormals:o}}clone(){return(new this.constructor).copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class vc extends bc{constructor(e=0,t=0,n=1,r=1,i=0,o=2*Math.PI,s=!1,a=0){super(),this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=r,this.aStartAngle=i,this.aEndAngle=o,this.aClockwise=s,this.aRotation=a}getPoint(e,t){const n=t||new Cn,r=2*Math.PI;let i=this.aEndAngle-this.aStartAngle;const o=Math.abs(i)r;)i-=r;i0?0:(Math.floor(Math.abs(l)/i)+1)*i:0===c&&l===i-1&&(l=i-2,c=1),this.closed||l>0?s=r[(l-1)%i]:(Sc.subVectors(r[0],r[1]).add(r[0]),s=Sc);const u=r[l%i],d=r[(l+1)%i];if(this.closed||l+2r.length-2?r.length-1:o+1],u=r[o>r.length-3?r.length-1:o+2];return n.set(Ec(s,a.x,l.x,c.x,u.x),Ec(s,a.y,l.y,c.y,u.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t=n){const e=r[i]-n,o=this.curves[i],s=o.getLength(),a=0===s?0:1-e/s;return o.getPointAt(a,t)}i++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let n=0,r=this.curves.length;n1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t0){const e=l.getPoint(0);e.equals(this.currentPoint)||this.lineTo(e.x,e.y)}this.curves.push(l);const c=l.getPoint(1);return this.currentPoint.copy(c),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class Bc extends Qi{constructor(e=[new Cn(0,.5),new Cn(.5,0),new Cn(0,-.5)],t=12,n=0,r=2*Math.PI){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:n,phiLength:r},t=Math.floor(t),r=xn(r,0,2*Math.PI);const i=[],o=[],s=[],a=[],l=[],c=1/t,u=new sr,d=new Cn,h=new sr,p=new sr,f=new sr;let m=0,g=0;for(let t=0;t<=e.length-1;t++)switch(t){case 0:m=e[t+1].x-e[t].x,g=e[t+1].y-e[t].y,h.x=1*g,h.y=-m,h.z=0*g,f.copy(h),h.normalize(),a.push(h.x,h.y,h.z);break;case e.length-1:a.push(f.x,f.y,f.z);break;default:m=e[t+1].x-e[t].x,g=e[t+1].y-e[t].y,h.x=1*g,h.y=-m,h.z=0*g,p.copy(h),h.x+=f.x,h.y+=f.y,h.z+=f.z,h.normalize(),a.push(h.x,h.y,h.z),f.copy(p)}for(let i=0;i<=t;i++){const h=n+i*c*r,p=Math.sin(h),f=Math.cos(h);for(let n=0;n<=e.length-1;n++){u.x=e[n].x*p,u.y=e[n].y,u.z=e[n].x*f,o.push(u.x,u.y,u.z),d.x=i/t,d.y=n/(e.length-1),s.push(d.x,d.y);const r=a[3*n+0]*p,c=a[3*n+1],h=a[3*n+0]*f;l.push(r,c,h)}}for(let n=0;n0&&b(!0),t>0&&b(!1)),this.setIndex(c),this.setAttribute("position",new Ii(u,3)),this.setAttribute("normal",new Ii(d,3)),this.setAttribute("uv",new Ii(h,2))}static fromJSON(e){return new Uc(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class Qc extends Uc{constructor(e=1,t=1,n=8,r=1,i=!1,o=0,s=2*Math.PI){super(0,e,t,n,r,i,o,s),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:o,thetaLength:s}}static fromJSON(e){return new Qc(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class qc extends Qi{constructor(e=[],t=[],n=1,r=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:n,detail:r};const i=[],o=[];function s(e,t,n,r){const i=r+1,o=[];for(let r=0;r<=i;r++){o[r]=[];const s=e.clone().lerp(n,r/i),a=t.clone().lerp(n,r/i),l=i-r;for(let e=0;e<=l;e++)o[r][e]=0===e&&r===i?s:s.clone().lerp(a,e/l)}for(let e=0;e.9&&s<.1&&(t<.2&&(o[e+0]+=1),n<.2&&(o[e+2]+=1),r<.2&&(o[e+4]+=1))}}()}(),this.setAttribute("position",new Ii(i,3)),this.setAttribute("normal",new Ii(i.slice(),3)),this.setAttribute("uv",new Ii(o,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}static fromJSON(e){return new qc(e.vertices,e.indices,e.radius,e.details)}}class Hc extends qc{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2,r=1/n;super([-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],e,t),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Hc(e.radius,e.detail)}}const Gc=new sr,Vc=new sr,Wc=new sr,Xc=new yi;class Yc extends Qi{constructor(e=null,t=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:e,thresholdAngle:t},null!==e){const n=4,r=Math.pow(10,n),i=Math.cos(yn*t),o=e.getIndex(),s=e.getAttribute("position"),a=o?o.count:s.count,l=[0,0,0],c=["a","b","c"],u=new Array(3),d={},h=[];for(let e=0;e80*n){a=c=e[0],l=u=e[1];for(let t=n;tc&&(c=d),h>u&&(u=h);p=Math.max(c-a,u-l),p=0!==p?1/p:0}return tu(o,s,n,a,l,p),s};function Kc(e,t,n,r,i){let o,s;if(i===function(e,t,n,r){let i=0;for(let o=t,s=n-r;o0)for(o=t;o=t;o-=r)s=_u(o,e[o],e[o+1],s);return s&&fu(s,s.next)&&(Su(s),s=s.next),s}function eu(e,t){if(!e)return e;t||(t=e);let n,r=e;do{if(n=!1,r.steiner||!fu(r,r.next)&&0!==pu(r.prev,r,r.next))r=r.next;else{if(Su(r),r=t=r.prev,r===r.next)break;n=!0}}while(n||r!==t);return t}function tu(e,t,n,r,i,o,s){if(!e)return;!s&&o&&function(e,t,n,r){let i=e;do{null===i.z&&(i.z=cu(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){let t,n,r,i,o,s,a,l,c=1;do{for(n=e,e=null,o=null,s=0;n;){for(s++,r=n,a=0,t=0;t0||l>0&&r;)0!==a&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,a--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,c*=2}while(s>1)}(i)}(e,r,i,o);let a,l,c=e;for(;e.prev!==e.next;)if(a=e.prev,l=e.next,o?ru(e,r,i,o):nu(e))t.push(a.i/n),t.push(e.i/n),t.push(l.i/n),Su(e),e=l.next,c=l.next;else if((e=l)===c){s?1===s?tu(e=iu(eu(e),t,n),t,n,r,i,o,2):2===s&&ou(e,t,n,r,i,o):tu(eu(e),t,n,r,i,o,1);break}}function nu(e){const t=e.prev,n=e,r=e.next;if(pu(t,n,r)>=0)return!1;let i=e.next.next;for(;i!==e.prev;){if(du(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&pu(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function ru(e,t,n,r){const i=e.prev,o=e,s=e.next;if(pu(i,o,s)>=0)return!1;const a=i.xo.x?i.x>s.x?i.x:s.x:o.x>s.x?o.x:s.x,u=i.y>o.y?i.y>s.y?i.y:s.y:o.y>s.y?o.y:s.y,d=cu(a,l,t,n,r),h=cu(c,u,t,n,r);let p=e.prevZ,f=e.nextZ;for(;p&&p.z>=d&&f&&f.z<=h;){if(p!==e.prev&&p!==e.next&&du(i.x,i.y,o.x,o.y,s.x,s.y,p.x,p.y)&&pu(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,f!==e.prev&&f!==e.next&&du(i.x,i.y,o.x,o.y,s.x,s.y,f.x,f.y)&&pu(f.prev,f,f.next)>=0)return!1;f=f.nextZ}for(;p&&p.z>=d;){if(p!==e.prev&&p!==e.next&&du(i.x,i.y,o.x,o.y,s.x,s.y,p.x,p.y)&&pu(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;f&&f.z<=h;){if(f!==e.prev&&f!==e.next&&du(i.x,i.y,o.x,o.y,s.x,s.y,f.x,f.y)&&pu(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function iu(e,t,n){let r=e;do{const i=r.prev,o=r.next.next;!fu(i,o)&&mu(i,r,r.next,o)&&vu(i,o)&&vu(o,i)&&(t.push(i.i/n),t.push(r.i/n),t.push(o.i/n),Su(r),Su(r.next),r=e=o),r=r.next}while(r!==e);return eu(r)}function ou(e,t,n,r,i,o){let s=e;do{let e=s.next.next;for(;e!==s.prev;){if(s.i!==e.i&&hu(s,e)){let a=yu(s,e);return s=eu(s,s.next),a=eu(a,a.next),tu(s,t,n,r,i,o),void tu(a,t,n,r,i,o)}e=e.next}s=s.next}while(s!==e)}function su(e,t){return e.x-t.x}function au(e,t){if(t=function(e,t){let n=t;const r=e.x,i=e.y;let o,s=-1/0;do{if(i<=n.y&&i>=n.next.y&&n.next.y!==n.y){const e=n.x+(i-n.y)*(n.next.x-n.x)/(n.next.y-n.y);if(e<=r&&e>s){if(s=e,e===r){if(i===n.y)return n;if(i===n.next.y)return n.next}o=n.x=n.x&&n.x>=l&&r!==n.x&&du(io.x||n.x===o.x&&lu(o,n)))&&(o=n,d=u)),n=n.next}while(n!==a);return o}(e,t)){const n=yu(t,e);eu(t,t.next),eu(n,n.next)}}function lu(e,t){return pu(e.prev,e,t.prev)<0&&pu(t.next,e,e.next)<0}function cu(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function uu(e){let t=e,n=e;do{(t.x=0&&(e-s)*(r-a)-(n-s)*(t-a)>=0&&(n-s)*(o-a)-(i-s)*(r-a)>=0}function hu(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){let n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&mu(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(vu(e,t)&&vu(t,e)&&function(e,t){let n=e,r=!1;const i=(e.x+t.x)/2,o=(e.y+t.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(pu(e.prev,e,t.prev)||pu(e,t.prev,t))||fu(e,t)&&pu(e.prev,e,e.next)>0&&pu(t.prev,t,t.next)>0)}function pu(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function fu(e,t){return e.x===t.x&&e.y===t.y}function mu(e,t,n,r){const i=bu(pu(e,t,n)),o=bu(pu(e,t,r)),s=bu(pu(n,r,e)),a=bu(pu(n,r,t));return i!==o&&s!==a||(!(0!==i||!gu(e,n,t))||(!(0!==o||!gu(e,r,t))||(!(0!==s||!gu(n,e,r))||!(0!==a||!gu(n,t,r)))))}function gu(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function bu(e){return e>0?1:e<0?-1:0}function vu(e,t){return pu(e.prev,e,e.next)<0?pu(e,t,e.next)>=0&&pu(e,e.prev,t)>=0:pu(e,t,e.prev)<0||pu(e,e.next,t)<0}function yu(e,t){const n=new xu(e.i,e.x,e.y),r=new xu(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function _u(e,t,n,r){const i=new xu(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function Su(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function xu(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}class wu{static area(e){const t=e.length;let n=0;for(let r=t-1,i=0;i2&&e[t-1].equals(e[0])&&e.pop()}function Ou(e,t){for(let n=0;nNumber.EPSILON){const d=Math.sqrt(u),h=Math.sqrt(l*l+c*c),p=t.x-a/d,f=t.y+s/d,m=((n.x-c/h-p)*c-(n.y+l/h-f)*l)/(s*c-a*l);r=p+s*m-e.x,i=f+a*m-e.y;const g=r*r+i*i;if(g<=2)return new Cn(r,i);o=Math.sqrt(g/2)}else{let e=!1;s>Number.EPSILON?l>Number.EPSILON&&(e=!0):s<-Number.EPSILON?l<-Number.EPSILON&&(e=!0):Math.sign(a)===Math.sign(c)&&(e=!0),e?(r=-a,i=s,o=Math.sqrt(u)):(r=s,i=a,o=Math.sqrt(u/2))}return new Cn(r/o,i/o)}const P=[];for(let e=0,t=E.length,n=t-1,r=e+1;e=0;e--){const t=e/p,n=u*Math.cos(t*Math.PI/2),r=d*Math.sin(t*Math.PI/2)+h;for(let e=0,t=E.length;e=0;){const r=n;let i=n-1;i<0&&(i=e.length-1);for(let e=0,n=a+2*p;e0)&&h.push(t,i,l),(e!==n-1||a0!=e>0&&this.version++,this._sheen=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}Qu.prototype.isMeshPhysicalMaterial=!0;class qu extends Si{constructor(e){super(),this.type="MeshPhongMaterial",this.color=new Hn(16777215),this.specular=new Hn(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Hn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Nt,this.normalScale=new Cn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=X,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}qu.prototype.isMeshPhongMaterial=!0;class Hu extends Si{constructor(e){super(),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Hn(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Hn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Nt,this.normalScale=new Cn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}Hu.prototype.isMeshToonMaterial=!0;class Gu extends Si{constructor(e){super(),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Nt,this.normalScale=new Cn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}Gu.prototype.isMeshNormalMaterial=!0;class Vu extends Si{constructor(e){super(),this.type="MeshLambertMaterial",this.color=new Hn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Hn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=X,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}Vu.prototype.isMeshLambertMaterial=!0;class Wu extends Si{constructor(e){super(),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Hn(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Nt,this.normalScale=new Cn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}Wu.prototype.isMeshMatcapMaterial=!0;class Xu extends Xl{constructor(e){super(),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}Xu.prototype.isLineDashedMaterial=!0;const Yu={ShadowMaterial:Fu,SpriteMaterial:pl,RawShaderMaterial:zu,ShaderMaterial:fo,PointsMaterial:sc,MeshPhysicalMaterial:Qu,MeshStandardMaterial:Uu,MeshPhongMaterial:qu,MeshToonMaterial:Hu,MeshNormalMaterial:Gu,MeshLambertMaterial:Vu,MeshDepthMaterial:Ga,MeshDistanceMaterial:Va,MeshBasicMaterial:xi,MeshMatcapMaterial:Wu,LineDashedMaterial:Xu,LineBasicMaterial:Xl,Material:Si};Si.fromType=function(e){return new Yu[e]};const Zu={arraySlice:function(e,t,n){return Zu.isTypedArray(e)?new e.constructor(e.subarray(t,void 0!==n?n:e.length)):e.slice(t,n)},convertArray:function(e,t,n){return!e||!n&&e.constructor===t?e:"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)},isTypedArray:function(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)},getKeyframeOrder:function(e){const t=e.length,n=new Array(t);for(let e=0;e!==t;++e)n[e]=e;return n.sort((function(t,n){return e[t]-e[n]})),n},sortedArray:function(e,t,n){const r=e.length,i=new e.constructor(r);for(let o=0,s=0;s!==r;++o){const r=n[o]*t;for(let n=0;n!==t;++n)i[s++]=e[r+n]}return i},flattenJSON:function(e,t,n,r){let i=1,o=e[0];for(;void 0!==o&&void 0===o[r];)o=e[i++];if(void 0===o)return;let s=o[r];if(void 0!==s)if(Array.isArray(s))do{s=o[r],void 0!==s&&(t.push(o.time),n.push.apply(n,s)),o=e[i++]}while(void 0!==o);else if(void 0!==s.toArray)do{s=o[r],void 0!==s&&(t.push(o.time),s.toArray(n,n.length)),o=e[i++]}while(void 0!==o);else do{s=o[r],void 0!==s&&(t.push(o.time),n.push(s)),o=e[i++]}while(void 0!==o)},subclip:function(e,t,n,r,i=30){const o=e.clone();o.name=t;const s=[];for(let e=0;e=r)){l.push(t.times[e]);for(let n=0;no.tracks[e].times[0]&&(a=o.tracks[e].times[0]);for(let e=0;e=r.times[d]){const e=d*l+a,t=e+l-a;h=Zu.arraySlice(r.values,e,t)}else{const e=r.createInterpolant(),t=a,n=l-a;e.evaluate(o),h=Zu.arraySlice(e.resultBuffer,t,n)}if("quaternion"===i){(new or).fromArray(h).normalize().conjugate().toArray(h)}const p=s.times.length;for(let e=0;e=i)break e;{const s=t[1];e=i)break t}o=n,n=0}}for(;n>>1;et;)--o;if(++o,0!==i||o!==r){i>=o&&(o=Math.max(o,1),i=o-1);const e=this.getValueSize();this.times=Zu.arraySlice(n,i,o),this.values=Zu.arraySlice(this.values,i*e,o*e)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let t=0;t!==i;t++){const r=n[t];if("number"==typeof r&&isNaN(r)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,t,r),e=!1;break}if(null!==o&&o>r){console.error("THREE.KeyframeTrack: Out of order keys.",this,t,r,o),e=!1;break}o=r}if(void 0!==r&&Zu.isTypedArray(r))for(let t=0,n=r.length;t!==n;++t){const n=r[t];if(isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,t,n),e=!1;break}}return e}optimize(){const e=Zu.arraySlice(this.times),t=Zu.arraySlice(this.values),n=this.getValueSize(),r=this.getInterpolation()===wt,i=e.length-1;let o=1;for(let s=1;s0){e[o]=e[i];for(let e=i*n,r=o*n,s=0;s!==n;++s)t[r+s]=t[e+s];++o}return o!==e.length?(this.times=Zu.arraySlice(e,0,o),this.values=Zu.arraySlice(t,0,o*n)):(this.times=e,this.values=t),this}clone(){const e=Zu.arraySlice(this.times,0),t=Zu.arraySlice(this.values,0),n=new(0,this.constructor)(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}nd.prototype.TimeBufferType=Float32Array,nd.prototype.ValueBufferType=Float32Array,nd.prototype.DefaultInterpolation=xt;class rd extends nd{}rd.prototype.ValueTypeName="bool",rd.prototype.ValueBufferType=Array,rd.prototype.DefaultInterpolation=St,rd.prototype.InterpolantFactoryMethodLinear=void 0,rd.prototype.InterpolantFactoryMethodSmooth=void 0;class id extends nd{}id.prototype.ValueTypeName="color";class od extends nd{}od.prototype.ValueTypeName="number";class sd extends Ju{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const i=this.resultBuffer,o=this.sampleValues,s=this.valueSize,a=(n-t)/(r-t);let l=e*s;for(let e=l+s;l!==e;l+=4)or.slerpFlat(i,0,o,l-s,o,l,a);return i}}class ad extends nd{InterpolantFactoryMethodLinear(e){return new sd(this.times,this.values,this.getValueSize(),e)}}ad.prototype.ValueTypeName="quaternion",ad.prototype.DefaultInterpolation=xt,ad.prototype.InterpolantFactoryMethodSmooth=void 0;class ld extends nd{}ld.prototype.ValueTypeName="string",ld.prototype.ValueBufferType=Array,ld.prototype.DefaultInterpolation=St,ld.prototype.InterpolantFactoryMethodLinear=void 0,ld.prototype.InterpolantFactoryMethodSmooth=void 0;class cd extends nd{}cd.prototype.ValueTypeName="vector";class ud{constructor(e,t=-1,n,r=At){this.name=e,this.tracks=n,this.duration=t,this.blendMode=r,this.uuid=Sn(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,r=1/(e.fps||1);for(let e=0,i=n.length;e!==i;++e)t.push(dd(n[e]).scale(r));const i=new this(e.name,e.duration,t,e.blendMode);return i.uuid=e.uuid,i}static toJSON(e){const t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let e=0,r=n.length;e!==r;++e)t.push(nd.toJSON(n[e]));return r}static CreateFromMorphTargetSequence(e,t,n,r){const i=t.length,o=[];for(let e=0;e1){const e=o[1];let t=r[e];t||(r[e]=t=[]),t.push(n)}}const o=[];for(const e in r)o.push(this.CreateFromMorphTargetSequence(e,r[e],t,n));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(e,t,n,r,i){if(0!==n.length){const o=[],s=[];Zu.flattenJSON(n,o,s,r),0!==o.length&&i.push(new e(t,o,s))}},r=[],i=e.name||"default",o=e.fps||30,s=e.blendMode;let a=e.length||-1;const l=e.hierarchy||[];for(let e=0;e{t&&t(i),this.manager.itemEnd(e)},0),i;if(void 0!==gd[e])return void gd[e].push({onLoad:t,onProgress:n,onError:r});gd[e]=[],gd[e].push({onLoad:t,onProgress:n,onError:r});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),s=this.mimeType,a=this.responseType;fetch(o).then(t=>{if(200===t.status||0===t.status){if(0===t.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===t.body||void 0===t.body.getReader)return t;const n=gd[e],r=t.body.getReader(),i=t.headers.get("Content-Length"),o=i?parseInt(i):0,s=0!==o;let a=0;const l=new ReadableStream({start(e){!function t(){r.read().then(({done:r,value:i})=>{if(r)e.close();else{a+=i.byteLength;const r=new ProgressEvent("progress",{lengthComputable:s,loaded:a,total:o});for(let e=0,t=n.length;e{switch(a){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"document":return e.text().then(e=>(new DOMParser).parseFromString(e,s));case"json":return e.json();default:if(void 0===s)return e.text();{const t=/charset="?([^;"\s]*)"?/i.exec(s),n=t&&t[1]?t[1].toLowerCase():void 0,r=new TextDecoder(n);return e.arrayBuffer().then(e=>r.decode(e))}}}).then(t=>{hd.add(e,t);const n=gd[e];delete gd[e];for(let e=0,r=n.length;e{const n=gd[e];if(void 0===n)throw this.manager.itemError(e),t;delete gd[e];for(let e=0,r=n.length;e{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class vd extends md{constructor(e){super(e)}load(e,t,n,r){const i=this,o=new bd(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,(function(n){try{t(i.parse(JSON.parse(n)))}catch(t){r?r(t):console.error(t),i.manager.itemError(e)}}),n,r)}parse(e){const t=[];for(let n=0;n0:r.vertexColors=e.vertexColors),void 0!==e.uniforms)for(const t in e.uniforms){const i=e.uniforms[t];switch(r.uniforms[t]={},i.type){case"t":r.uniforms[t].value=n(i.value);break;case"c":r.uniforms[t].value=(new Hn).setHex(i.value);break;case"v2":r.uniforms[t].value=(new Cn).fromArray(i.value);break;case"v3":r.uniforms[t].value=(new sr).fromArray(i.value);break;case"v4":r.uniforms[t].value=(new Jn).fromArray(i.value);break;case"m3":r.uniforms[t].value=(new Mn).fromArray(i.value);break;case"m4":r.uniforms[t].value=(new jr).fromArray(i.value);break;default:r.uniforms[t].value=i.value}}if(void 0!==e.defines&&(r.defines=e.defines),void 0!==e.vertexShader&&(r.vertexShader=e.vertexShader),void 0!==e.fragmentShader&&(r.fragmentShader=e.fragmentShader),void 0!==e.extensions)for(const t in e.extensions)r.extensions[t]=e.extensions[t];if(void 0!==e.shading&&(r.flatShading=1===e.shading),void 0!==e.size&&(r.size=e.size),void 0!==e.sizeAttenuation&&(r.sizeAttenuation=e.sizeAttenuation),void 0!==e.map&&(r.map=n(e.map)),void 0!==e.matcap&&(r.matcap=n(e.matcap)),void 0!==e.alphaMap&&(r.alphaMap=n(e.alphaMap)),void 0!==e.bumpMap&&(r.bumpMap=n(e.bumpMap)),void 0!==e.bumpScale&&(r.bumpScale=e.bumpScale),void 0!==e.normalMap&&(r.normalMap=n(e.normalMap)),void 0!==e.normalMapType&&(r.normalMapType=e.normalMapType),void 0!==e.normalScale){let t=e.normalScale;!1===Array.isArray(t)&&(t=[t,t]),r.normalScale=(new Cn).fromArray(t)}return void 0!==e.displacementMap&&(r.displacementMap=n(e.displacementMap)),void 0!==e.displacementScale&&(r.displacementScale=e.displacementScale),void 0!==e.displacementBias&&(r.displacementBias=e.displacementBias),void 0!==e.roughnessMap&&(r.roughnessMap=n(e.roughnessMap)),void 0!==e.metalnessMap&&(r.metalnessMap=n(e.metalnessMap)),void 0!==e.emissiveMap&&(r.emissiveMap=n(e.emissiveMap)),void 0!==e.emissiveIntensity&&(r.emissiveIntensity=e.emissiveIntensity),void 0!==e.specularMap&&(r.specularMap=n(e.specularMap)),void 0!==e.specularIntensityMap&&(r.specularIntensityMap=n(e.specularIntensityMap)),void 0!==e.specularColorMap&&(r.specularColorMap=n(e.specularColorMap)),void 0!==e.envMap&&(r.envMap=n(e.envMap)),void 0!==e.envMapIntensity&&(r.envMapIntensity=e.envMapIntensity),void 0!==e.reflectivity&&(r.reflectivity=e.reflectivity),void 0!==e.refractionRatio&&(r.refractionRatio=e.refractionRatio),void 0!==e.lightMap&&(r.lightMap=n(e.lightMap)),void 0!==e.lightMapIntensity&&(r.lightMapIntensity=e.lightMapIntensity),void 0!==e.aoMap&&(r.aoMap=n(e.aoMap)),void 0!==e.aoMapIntensity&&(r.aoMapIntensity=e.aoMapIntensity),void 0!==e.gradientMap&&(r.gradientMap=n(e.gradientMap)),void 0!==e.clearcoatMap&&(r.clearcoatMap=n(e.clearcoatMap)),void 0!==e.clearcoatRoughnessMap&&(r.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),void 0!==e.clearcoatNormalMap&&(r.clearcoatNormalMap=n(e.clearcoatNormalMap)),void 0!==e.clearcoatNormalScale&&(r.clearcoatNormalScale=(new Cn).fromArray(e.clearcoatNormalScale)),void 0!==e.transmissionMap&&(r.transmissionMap=n(e.transmissionMap)),void 0!==e.thicknessMap&&(r.thicknessMap=n(e.thicknessMap)),void 0!==e.sheenColorMap&&(r.sheenColorMap=n(e.sheenColorMap)),void 0!==e.sheenRoughnessMap&&(r.sheenRoughnessMap=n(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}}class qd{static decodeText(e){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);let t="";for(let n=0,r=e.length;n0){const n=new pd(t);i=new _d(n),i.setCrossOrigin(this.crossOrigin);for(let t=0,n=e.length;t0){r=new _d(this.manager),r.setCrossOrigin(this.crossOrigin);for(let t=0,r=e.length;t0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e0&&this._mixBufferRegionAdditive(n,r,this._addIndex*t,1,t);for(let e=t,i=t+t;e!==i;++e)if(n[e]!==n[e+t]){s.setValue(n,r);break}}saveOriginalState(){const e=this.binding,t=this.buffer,n=this.valueSize,r=n*this._origIndex;e.getValue(t,r);for(let e=n,i=r;e!==i;++e)t[e]=t[r+e%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=3*this.valueSize;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n=.5)for(let r=0;r!==i;++r)e[t+r]=e[n+r]}_slerp(e,t,n,r){or.slerpFlat(e,t,e,t,e,n,r)}_slerpAdditive(e,t,n,r,i){const o=this._workIndex*i;or.multiplyQuaternionsFlat(e,o,e,t,e,n),or.slerpFlat(e,t,e,t,e,o,r)}_lerp(e,t,n,r,i){const o=1-r;for(let s=0;s!==i;++s){const i=t+s;e[i]=e[i]*o+e[n+s]*r}}_lerpAdditive(e,t,n,r,i){for(let o=0;o!==i;++o){const i=t+o;e[i]=e[i]+e[n+o]*r}}}const xh=new RegExp("[\\[\\]\\.:\\/]","g"),wh="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",kh=/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]"),Oh=/(WCOD+)?/.source.replace("WCOD",wh),Eh=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]"),Ah=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]"),Th=new RegExp("^"+kh+Oh+Eh+Ah+"$"),Ch=["material","materials","bones"];class Mh{constructor(e,t,n){this.path=t,this.parsedPath=n||Mh.parseTrackName(t),this.node=Mh.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new Mh.Composite(e,t,n):new Mh(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(xh,"")}static parseTrackName(e){const t=Th.exec(e);if(null===t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){const e=n.nodeName.substring(r+1);-1!==Ch.indexOf(e)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=e)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(void 0===t||""===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(t);if(void 0!==n)return n}if(e.children){const n=function(e){for(let r=0;r=i){const o=i++,c=e[o];t[c.uuid]=l,e[l]=c,t[a]=o,e[o]=s;for(let e=0,t=r;e!==t;++e){const t=n[e],r=t[o],i=t[l];t[l]=r,t[o]=i}}}this.nCachedObjects_=i}uncache(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length;let i=this.nCachedObjects_,o=e.length;for(let s=0,a=arguments.length;s!==a;++s){const a=arguments[s].uuid,l=t[a];if(void 0!==l)if(delete t[a],l0&&(t[s.uuid]=l),e[l]=s,e.pop();for(let e=0,t=r;e!==t;++e){const t=n[e];t[l]=t[i],t.pop()}}}this.nCachedObjects_=i}subscribe_(e,t){const n=this._bindingsIndicesByPath;let r=n[e];const i=this._bindings;if(void 0!==r)return i[r];const o=this._paths,s=this._parsedPaths,a=this._objects,l=a.length,c=this.nCachedObjects_,u=new Array(l);r=i.length,n[e]=r,o.push(e),s.push(t),i.push(u);for(let n=c,r=a.length;n!==r;++n){const r=a[n];u[n]=new Mh(r,e,t)}return u}unsubscribe_(e){const t=this._bindingsIndicesByPath,n=t[e];if(void 0!==n){const r=this._paths,i=this._parsedPaths,o=this._bindings,s=o.length-1,a=o[s];t[e[s]]=n,o[n]=a,o.pop(),i[n]=i[s],i.pop(),r[n]=r[s],r.pop()}}}Ph.prototype.isAnimationObjectGroup=!0;class $h{constructor(e,t,n=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=r;const i=t.tracks,o=i.length,s=new Array(o),a={endingStart:kt,endingEnd:kt};for(let e=0;e!==o;++e){const t=i[e].createInterpolant(null);s[e]=t,t.settings=a}this._interpolantSettings=a,this._interpolants=s,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=yt,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,n){if(e.fadeOut(t),this.fadeIn(t),n){const n=this._clip.duration,r=e._clip.duration,i=r/n,o=n/r;e.warp(1,i,t),this.warp(o,1,t)}return this}crossFadeTo(e,t,n){return e.crossFadeFrom(this,t,n)}stopFading(){const e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,n){const r=this._mixer,i=r.time,o=this.timeScale;let s=this._timeScaleInterpolant;null===s&&(s=r._lendControlInterpolant(),this._timeScaleInterpolant=s);const a=s.parameterPositions,l=s.sampleValues;return a[0]=i,a[1]=i+n,l[0]=e/o,l[1]=t/o,this}stopWarping(){const e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,r){if(!this.enabled)return void this._updateWeight(e);const i=this._startTime;if(null!==i){const r=(e-i)*n;if(r<0||0===n)return;this._startTime=null,t=n*r}t*=this._updateTimeScale(e);const o=this._updateTime(t),s=this._updateWeight(e);if(s>0){const e=this._interpolants,t=this._propertyBindings;switch(this.blendMode){case Tt:for(let n=0,r=e.length;n!==r;++n)e[n].evaluate(o),t[n].accumulateAdditive(s);break;case At:default:for(let n=0,i=e.length;n!==i;++n)e[n].evaluate(o),t[n].accumulate(r,s)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const n=this._weightInterpolant;if(null!==n){const r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const n=this._timeScaleInterpolant;if(null!==n){t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,n=this.loop;let r=this.time+e,i=this._loopCount;const o=n===_t;if(0===e)return-1===i?r:o&&1==(1&i)?t-r:r;if(n===vt){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else{if(!(r<0)){this.time=r;break e}r=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===i&&(e>=0?(i=0,this._setEndings(!0,0===this.repetitions,o)):this._setEndings(0===this.repetitions,!0,o)),r>=t||r<0){const n=Math.floor(r/t);r-=t*n,i+=Math.abs(n);const s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===s){const t=e<0;this._setEndings(t,!t,o)}else this._setEndings(!1,!1,o);this._loopCount=i,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n})}}else this.time=r;if(o&&1==(1&i))return t-r}return r}_setEndings(e,t,n){const r=this._interpolantSettings;n?(r.endingStart=Ot,r.endingEnd=Ot):(r.endingStart=e?this.zeroSlopeAtStart?Ot:kt:Et,r.endingEnd=t?this.zeroSlopeAtEnd?Ot:kt:Et)}_scheduleFading(e,t,n){const r=this._mixer,i=r.time;let o=this._weightInterpolant;null===o&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);const s=o.parameterPositions,a=o.sampleValues;return s[0]=i,a[0]=t,s[1]=i+e,a[1]=n,this}}class Rh extends gn{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const n=e._localRoot||this._root,r=e._clip.tracks,i=r.length,o=e._propertyBindings,s=e._interpolants,a=n.uuid,l=this._bindingsByRootAndName;let c=l[a];void 0===c&&(c={},l[a]=c);for(let e=0;e!==i;++e){const i=r[e],l=i.name;let u=c[l];if(void 0!==u)++u.referenceCount,o[e]=u;else{if(u=o[e],void 0!==u){null===u._cacheIndex&&(++u.referenceCount,this._addInactiveBinding(u,a,l));continue}const r=t&&t._propertyBindings[e].binding.parsedPath;u=new Sh(Mh.create(n,l,r),i.ValueTypeName,i.getValueSize()),++u.referenceCount,this._addInactiveBinding(u,a,l),o[e]=u}s[e].resultBuffer=u.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){const t=(e._localRoot||this._root).uuid,n=e._clip.uuid,r=this._actionsByClip[n];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,n,t)}const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0==n.useCount++&&(this._lendBinding(n),n.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0==--n.useCount&&(n.restoreOriginalState(),this._takeBackBinding(n))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return null!==t&&t=0;--t)e[t].stop();return this}update(e){e*=this.timeScale;const t=this._actions,n=this._nActiveActions,r=this.time+=e,i=Math.sign(e),o=this._accuIndex^=1;for(let s=0;s!==n;++s){t[s]._update(r,e,i,o)}const s=this._bindings,a=this._nActiveBindings;for(let e=0;e!==a;++e)s[e].apply(o);return this}setTime(e){this.time=0;for(let e=0;ethis.max.x||e.ythis.max.y)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y)}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return Uh.copy(e).clamp(this.min,this.max).sub(e).length()}intersect(e){return this.min.max(e.min),this.max.min(e.max),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}Qh.prototype.isBox2=!0;const qh=new sr,Hh=new sr;class Gh{constructor(e=new sr,t=new sr){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){qh.subVectors(e,this.start),Hh.subVectors(this.end,this.start);const n=Hh.dot(Hh);let r=Hh.dot(qh)/n;return t&&(r=xn(r,0,1)),r}closestPointToPoint(e,t,n){const r=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(r).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return(new this.constructor).copy(this)}}const Vh=new sr;class Wh extends li{constructor(e,t){super(),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t;const n=new Qi,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let e=0,t=1,n=32;e.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{vp.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(vp,t)}}setLength(e,t=.2*e,n=.2*t){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}}class xp extends ic{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],n=new Qi;n.setAttribute("position",new Ii(t,3)),n.setAttribute("color",new Ii([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3));super(n,new Xl({vertexColors:!0,toneMapped:!1})),this.type="AxesHelper"}setColors(e,t,n){const r=new Hn,i=this.geometry.attributes.color.array;return r.set(e),r.toArray(i,0),r.toArray(i,3),r.set(t),r.toArray(i,6),r.toArray(i,9),r.set(n),r.toArray(i,12),r.toArray(i,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class wp{constructor(){this.type="ShapePath",this.color=new Hn,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new Lc,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,n,r){return this.currentPath.quadraticCurveTo(e,t,n,r),this}bezierCurveTo(e,t,n,r,i,o){return this.currentPath.bezierCurveTo(e,t,n,r,i,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e,t){function n(e){const t=[];for(let n=0,r=e.length;nNumber.EPSILON){if(l<0&&(n=t[o],a=-a,s=t[i],l=-l),e.ys.y)continue;if(e.y===n.y){if(e.x===n.x)return!0}else{const t=l*(e.x-n.x)-a*(e.y-n.y);if(0===t)return!0;if(t<0)continue;r=!r}}else{if(e.y!==n.y)continue;if(s.x<=e.x&&e.x<=n.x||n.x<=e.x&&e.x<=s.x)return!0}}return r}const i=wu.isClockWise,o=this.subPaths;if(0===o.length)return[];if(!0===t)return n(o);let s,a,l;const c=[];if(1===o.length)return a=o[0],l=new Zc,l.curves=a.curves,c.push(l),c;let u=!i(o[0].getPoints());u=e?!u:u;const d=[],h=[];let p,f,m=[],g=0;h[g]=void 0,m[g]=[];for(let t=0,n=o.length;t1){let e=!1,t=0;for(let e=0,t=h.length;e0&&!1===e&&(m=d)}for(let e=0,t=h.length;e65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),e=xn(e,-65504,65504),Ep[0]=e;const t=Ap[0],n=t>>23&511;return Tp[n]+((8388607&t)>>Cp[n])}static fromHalfFloat(e){const t=e>>10;return Ap[0]=Mp[$p[t]+(1023&e)]+Pp[t],Ep[0]}}const Op=new ArrayBuffer(4),Ep=new Float32Array(Op),Ap=new Uint32Array(Op),Tp=new Uint32Array(512),Cp=new Uint32Array(512);for(let e=0;e<256;++e){const t=e-127;t<-27?(Tp[e]=0,Tp[256|e]=32768,Cp[e]=24,Cp[256|e]=24):t<-14?(Tp[e]=1024>>-t-14,Tp[256|e]=1024>>-t-14|32768,Cp[e]=-t-1,Cp[256|e]=-t-1):t<=15?(Tp[e]=t+15<<10,Tp[256|e]=t+15<<10|32768,Cp[e]=13,Cp[256|e]=13):t<128?(Tp[e]=31744,Tp[256|e]=64512,Cp[e]=24,Cp[256|e]=24):(Tp[e]=31744,Tp[256|e]=64512,Cp[e]=13,Cp[256|e]=13)}const Mp=new Uint32Array(2048),Pp=new Uint32Array(64),$p=new Uint32Array(64);for(let e=1;e<1024;++e){let t=e<<13,n=0;for(;0==(8388608&t);)t<<=1,n-=8388608;t&=-8388609,n+=947912704,Mp[e]=t|n}for(let e=1024;e<2048;++e)Mp[e]=939524096+(e-1024<<13);for(let e=1;e<31;++e)Pp[e]=e<<23;Pp[31]=1199570944,Pp[32]=2147483648;for(let e=33;e<63;++e)Pp[e]=2147483648+(e-32<<23);Pp[63]=3347054592;for(let e=1;e<64;++e)32!==e&&($p[e]=1024);const Rp=0,Ip=1,Dp=0,Np=1,jp=2;function Lp(e){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),e}function Bp(e=[]){return console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),e.isMultiMaterial=!0,e.materials=e,e.clone=function(){return e.slice()},e}class Fp extends dc{constructor(e,t){console.warn("THREE.PointCloud has been renamed to THREE.Points."),super(e,t)}}class zp extends Al{constructor(e){console.warn("THREE.Particle has been renamed to THREE.Sprite."),super(e)}}class Up extends dc{constructor(e,t){console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),super(e,t)}}class Qp extends sc{constructor(e){console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),super(e)}}class qp extends sc{constructor(e){console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),super(e)}}class Hp extends sc{constructor(e){console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),super(e)}}class Gp extends sr{constructor(e,t,n){console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),super(e,t,n)}}class Vp extends Oi{constructor(e,t){console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setUsage( THREE.DynamicDrawUsage ) instead."),super(e,t),this.setUsage(on)}}class Wp extends Ei{constructor(e,t){console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),super(e,t)}}class Xp extends Ai{constructor(e,t){console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),super(e,t)}}class Yp extends Ti{constructor(e,t){console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),super(e,t)}}class Zp extends Ci{constructor(e,t){console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),super(e,t)}}class Jp extends Mi{constructor(e,t){console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),super(e,t)}}class Kp extends Pi{constructor(e,t){console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),super(e,t)}}class ef extends $i{constructor(e,t){console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),super(e,t)}}class tf extends Ii{constructor(e,t){console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),super(e,t)}}class nf extends Di{constructor(e,t){console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),super(e,t)}}bc.create=function(e,t){return console.log("THREE.Curve.create() has been deprecated"),e.prototype=Object.create(bc.prototype),e.prototype.constructor=e,e.prototype.getPoint=t,e},Lc.prototype.fromPoints=function(e){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(e)};class rf extends xp{constructor(e){console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),super(e)}}class of extends mp{constructor(e,t){console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),super(e,t)}}class sf extends ic{constructor(e,t){console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),super(new Yc(e.geometry),new Xl({color:void 0!==t?t:16777215}))}}ip.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")},Jh.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")};class af extends ic{constructor(e,t){console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),super(new ju(e.geometry),new Xl({color:void 0!==t?t:16777215}))}}md.prototype.extractUrlBase=function(e){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),qd.extractUrlBase(e)},md.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}};class lf extends bd{constructor(e){console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),super(e)}}class cf extends xd{constructor(e){console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),super(e)}}Qh.prototype.center=function(e){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(e)},Qh.prototype.empty=function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()},Qh.prototype.isIntersectionBox=function(e){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},Qh.prototype.size=function(e){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(e)},cr.prototype.center=function(e){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(e)},cr.prototype.empty=function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()},cr.prototype.isIntersectionBox=function(e){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},cr.prototype.isIntersectionSphere=function(e){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)},cr.prototype.size=function(e){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(e)},Vr.prototype.toVector3=function(){console.error("THREE.Euler: .toVector3() has been removed. Use Vector3.setFromEuler() instead")},Tr.prototype.empty=function(){return console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty()."),this.isEmpty()},Eo.prototype.setFromMatrix=function(e){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(e)},Gh.prototype.center=function(e){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(e)},Mn.prototype.flattenToArrayOffset=function(e,t){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},Mn.prototype.multiplyVector3=function(e){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},Mn.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")},Mn.prototype.applyToBufferAttribute=function(e){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),e.applyMatrix3(this)},Mn.prototype.applyToVector3Array=function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")},Mn.prototype.getInverse=function(e){return console.warn("THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(e).invert()},jr.prototype.extractPosition=function(e){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(e)},jr.prototype.flattenToArrayOffset=function(e,t){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(e,t)},jr.prototype.getPosition=function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),(new sr).setFromMatrixColumn(this,3)},jr.prototype.setRotationFromQuaternion=function(e){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(e)},jr.prototype.multiplyToArray=function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")},jr.prototype.multiplyVector3=function(e){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},jr.prototype.multiplyVector4=function(e){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},jr.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")},jr.prototype.rotateAxis=function(e){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),e.transformDirection(this)},jr.prototype.crossVector=function(e){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},jr.prototype.translate=function(){console.error("THREE.Matrix4: .translate() has been removed.")},jr.prototype.rotateX=function(){console.error("THREE.Matrix4: .rotateX() has been removed.")},jr.prototype.rotateY=function(){console.error("THREE.Matrix4: .rotateY() has been removed.")},jr.prototype.rotateZ=function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")},jr.prototype.rotateByAxis=function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")},jr.prototype.applyToBufferAttribute=function(e){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),e.applyMatrix4(this)},jr.prototype.applyToVector3Array=function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")},jr.prototype.makeFrustum=function(e,t,n,r,i,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(e,t,r,n,i,o)},jr.prototype.getInverse=function(e){return console.warn("THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(e).invert()},wo.prototype.isIntersectionLine=function(e){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(e)},or.prototype.multiplyVector3=function(e){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),e.applyQuaternion(this)},or.prototype.inverse=function(){return console.warn("THREE.Quaternion: .inverse() has been renamed to invert()."),this.invert()},Nr.prototype.isIntersectionBox=function(e){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(e)},Nr.prototype.isIntersectionPlane=function(e){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(e)},Nr.prototype.isIntersectionSphere=function(e){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(e)},yi.prototype.area=function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()},yi.prototype.barycoordFromPoint=function(e,t){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(e,t)},yi.prototype.midpoint=function(e){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(e)},yi.prototypenormal=function(e){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(e)},yi.prototype.plane=function(e){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(e)},yi.barycoordFromPoint=function(e,t,n,r,i){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),yi.getBarycoord(e,t,n,r,i)},yi.normal=function(e,t,n,r){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),yi.getNormal(e,t,n,r)},Zc.prototype.extractAllPoints=function(e){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(e)},Zc.prototype.extrude=function(e){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new Eu(this,e)},Zc.prototype.makeGeometry=function(e){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new Pu(this,e)},Cn.prototype.fromAttribute=function(e,t,n){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},Cn.prototype.distanceToManhattan=function(e){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},Cn.prototype.lengthManhattan=function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},sr.prototype.setEulerFromRotationMatrix=function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")},sr.prototype.setEulerFromQuaternion=function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")},sr.prototype.getPositionFromMatrix=function(e){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(e)},sr.prototype.getScaleFromMatrix=function(e){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(e)},sr.prototype.getColumnFromMatrix=function(e,t){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(t,e)},sr.prototype.applyProjection=function(e){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(e)},sr.prototype.fromAttribute=function(e,t,n){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},sr.prototype.distanceToManhattan=function(e){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(e)},sr.prototype.lengthManhattan=function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},Jn.prototype.fromAttribute=function(e,t,n){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(e,t,n)},Jn.prototype.lengthManhattan=function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()},li.prototype.getChildByName=function(e){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(e)},li.prototype.renderDepth=function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")},li.prototype.translate=function(e,t){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(t,e)},li.prototype.getWorldRotation=function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")},li.prototype.applyMatrix=function(e){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)},Object.defineProperties(li.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(e){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=e}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}}),ao.prototype.setDrawMode=function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")},Object.defineProperties(ao.prototype,{drawMode:{get:function(){return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."),Ct},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}}),jl.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")},go.prototype.setLens=function(e,t){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),void 0!==t&&(this.filmGauge=t),this.setFocalLength(e)},Object.defineProperties(kd.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(e){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=e}},shadowCameraLeft:{set:function(e){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=e}},shadowCameraRight:{set:function(e){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=e}},shadowCameraTop:{set:function(e){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=e}},shadowCameraBottom:{set:function(e){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=e}},shadowCameraNear:{set:function(e){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=e}},shadowCameraFar:{set:function(e){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=e}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(e){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=e}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(e){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=e}},shadowMapHeight:{set:function(e){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=e}}}),Object.defineProperties(Oi.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},dynamic:{get:function(){return console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.usage===on},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage(on)}}}),Oi.prototype.setDynamic=function(e){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===e?on:rn),this},Oi.prototype.copyIndicesArray=function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},Oi.prototype.setArray=function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},Qi.prototype.addIndex=function(e){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(e)},Qi.prototype.addAttribute=function(e,t){return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."),t&&t.isBufferAttribute||t&&t.isInterleavedBufferAttribute?"index"===e?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(t),this):this.setAttribute(e,t):(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.setAttribute(e,new Oi(arguments[1],arguments[2])))},Qi.prototype.addDrawCall=function(e,t,n){void 0!==n&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(e,t)},Qi.prototype.clearDrawCalls=function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()},Qi.prototype.computeOffsets=function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")},Qi.prototype.removeAttribute=function(e){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(e)},Qi.prototype.applyMatrix=function(e){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(e)},Object.defineProperties(Qi.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}}),ul.prototype.setDynamic=function(e){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(!0===e?on:rn),this},ul.prototype.setArray=function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")},Eu.prototype.getArrays=function(){console.error("THREE.ExtrudeGeometry: .getArrays() has been removed.")},Eu.prototype.addShapeList=function(){console.error("THREE.ExtrudeGeometry: .addShapeList() has been removed.")},Eu.prototype.addShape=function(){console.error("THREE.ExtrudeGeometry: .addShape() has been removed.")},cl.prototype.dispose=function(){console.error("THREE.Scene: .dispose() has been removed.")},Ih.prototype.onUpdate=function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this},Object.defineProperties(Si.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new Hn}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(e){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=e===b}},stencilMask:{get:function(){return console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask},set:function(e){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask=e}},vertexTangents:{get:function(){console.warn("THREE."+this.type+": .vertexTangents has been removed.")},set:function(){console.warn("THREE."+this.type+": .vertexTangents has been removed.")}}}),Object.defineProperties(fo.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(e){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=e}}}),ol.prototype.clearTarget=function(e,t,n,r){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(e),this.clear(t,n,r)},ol.prototype.animate=function(e){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(e)},ol.prototype.getCurrentRenderTarget=function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()},ol.prototype.getMaxAnisotropy=function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()},ol.prototype.getPrecision=function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision},ol.prototype.resetGLState=function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()},ol.prototype.supportsFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")},ol.prototype.supportsHalfFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")},ol.prototype.supportsStandardDerivatives=function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")},ol.prototype.supportsCompressedTextureS3TC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")},ol.prototype.supportsCompressedTexturePVRTC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")},ol.prototype.supportsBlendMinMax=function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")},ol.prototype.supportsVertexTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures},ol.prototype.supportsInstancedArrays=function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")},ol.prototype.enableScissorTest=function(e){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(e)},ol.prototype.initMaterial=function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")},ol.prototype.addPrePlugin=function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")},ol.prototype.addPostPlugin=function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")},ol.prototype.updateShadowMap=function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")},ol.prototype.setFaceCulling=function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")},ol.prototype.allocTextureUnit=function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")},ol.prototype.setTexture=function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")},ol.prototype.setTexture2D=function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")},ol.prototype.setTextureCube=function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")},ol.prototype.getActiveMipMapLevel=function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()},Object.defineProperties(ol.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=e}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(e){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=e}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}},context:{get:function(){return console.warn("THREE.WebGLRenderer: .context has been removed. Use .getContext() instead."),this.getContext()}},vr:{get:function(){return console.warn("THREE.WebGLRenderer: .vr has been renamed to .xr"),this.xr}},gammaInput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."),!1},set:function(){console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.")}},gammaOutput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),!1},set:function(e){console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),this.outputEncoding=!0===e?Rt:$t}},toneMappingWhitePoint:{get:function(){return console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed."),1},set:function(){console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.")}},gammaFactor:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaFactor has been removed."),2},set:function(){console.warn("THREE.WebGLRenderer: .gammaFactor has been removed.")}}}),Object.defineProperties(Wa.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}});class uf extends yo{constructor(e,t,n){console.warn("THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options )."),super(e,n)}}function df(){console.error("THREE.CanvasRenderer has been removed")}function hf(){console.error("THREE.JSONLoader has been removed.")}Object.defineProperties(Kn.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=e}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(e){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=e}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=e}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(e){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=e}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(e){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=e}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(e){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=e}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(e){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=e}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(e){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=e}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(e){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=e}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(e){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=e}}}),fh.prototype.load=function(e){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");const t=this;return(new eh).load(e,(function(e){t.setBuffer(e)})),this},_h.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()},bo.prototype.updateCubeMap=function(e,t){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(e,t)},bo.prototype.clear=function(e,t,n,r){return console.warn("THREE.CubeCamera: .clear() is now .renderTarget.clear()."),this.renderTarget.clear(e,t,n,r)},Vn.crossOrigin=void 0,Vn.loadTexture=function(e,t,n,r){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");const i=new wd;i.setCrossOrigin(this.crossOrigin);const o=i.load(e,n,void 0,r);return t&&(o.mapping=t),o},Vn.loadTextureCube=function(e,t,n,r){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");const i=new Sd;i.setCrossOrigin(this.crossOrigin);const o=i.load(e,n,void 0,r);return t&&(o.mapping=t),o},Vn.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")},Vn.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};const pf={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")}};function ff(){console.error("THREE.LensFlare has been moved to /examples/jsm/objects/Lensflare.js")}class mf extends Qi{constructor(){console.error("THREE.ParametricGeometry has been moved to /examples/jsm/geometries/ParametricGeometry.js"),super()}}class gf extends Qi{constructor(){console.error("THREE.TextGeometry has been moved to /examples/jsm/geometries/TextGeometry.js"),super()}}function bf(){console.error("THREE.FontLoader has been moved to /examples/jsm/loaders/FontLoader.js")}function vf(){console.error("THREE.Font has been moved to /examples/jsm/loaders/FontLoader.js")}function yf(){console.error("THREE.ImmediateRenderObject has been removed.")}class _f extends Kn{constructor(e,t,n){console.error('THREE.WebGLMultisampleRenderTarget has been removed. Use a normal render target and set the "samples" property to greater 0 to enable multisampling.'),super(e,t,n),this.samples=4}}class Sf extends er{constructor(e,t,n,r){console.warn("THREE.DataTexture2DArray has been renamed to DataArrayTexture."),super(e,t,n,r)}}class xf extends nr{constructor(e,t,n,r){console.warn("THREE.DataTexture3D has been renamed to Data3DTexture."),super(e,t,n,r)}}"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:r}})),"undefined"!=typeof window&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=r)},function(e,t,n){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var i=(s=r,a=btoa(unescape(encodeURIComponent(JSON.stringify(s)))),l="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(a),"/*# ".concat(l," */")),o=r.sources.map((function(e){return"/*# sourceURL=".concat(r.sourceRoot||"").concat(e," */")}));return[n].concat(o).concat([i]).join("\n")}var s,a,l;return[n].join("\n")}(t,e);return t[2]?"@media ".concat(t[2]," {").concat(n,"}"):n})).join("")},t.i=function(e,n,r){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(r)for(var o=0;o{throw new Error("This node type doesn't define a deserialize function")})}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return"function"!=typeof e&&(e=c.match(e)),t=>{let n=e(t);return void 0===n?null:[this,n]}}}s.closedBy=new s({deserialize:e=>e.split(" ")}),s.openedBy=new s({deserialize:e=>e.split(" ")}),s.group=new s({deserialize:e=>e.split(" ")}),s.contextHash=new s({perNode:!0}),s.lookAhead=new s({perNode:!0}),s.mounted=new s({perNode:!0});class a{constructor(e,t,n){this.tree=e,this.overlay=t,this.parser=n}}const l=Object.create(null);class c{constructor(e,t,n,r=0){this.name=e,this.props=t,this.id=n,this.flags=r}static define(e){let t=e.props&&e.props.length?Object.create(null):l,n=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(null==e.name?8:0),r=new c(e.name||"",t,e.id,n);if(e.props)for(let n of e.props)if(Array.isArray(n)||(n=n(r)),n){if(n[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");t[n[0].id]=n[1]}return r}prop(e){return this.props[e.id]}get isTop(){return(1&this.flags)>0}get isSkipped(){return(2&this.flags)>0}get isError(){return(4&this.flags)>0}get isAnonymous(){return(8&this.flags)>0}is(e){if("string"==typeof e){if(this.name==e)return!0;let t=this.prop(s.group);return!!t&&t.indexOf(e)>-1}return this.id==e}static match(e){let t=Object.create(null);for(let n in e)for(let r of n.split(" "))t[r]=e[n];return e=>{for(let n=e.prop(s.group),r=-1;r<(n?n.length:0);r++){let i=t[r<0?e.name:n[r]];if(i)return i}}}}c.none=new c("",Object.create(null),0,8);class u{constructor(e){this.types=e;for(let t=0;t=r&&(o.type.isAnonymous||!1!==t(o))){if(o.firstChild())continue;e=!0}for(;e&&n&&!o.type.isAnonymous&&n(o),!o.nextSibling();){if(!o.parent())return;e=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let t in this.props)e.push([+t,this.props[t]]);return e}balance(e={}){return this.children.length<=8?this:C(c.none,this.children,this.positions,0,this.children.length,0,this.length,(e,t,n)=>new f(this.type,e,t,n,this.propValues),e.makeTree||((e,t,n)=>new f(c.none,e,t,n)))}static build(e){return function(e){var t;let{buffer:n,nodeSet:i,maxBufferLength:o=r,reused:a=[],minRepeatType:l=i.types.length}=e,c=Array.isArray(n)?new m(n,n.length):n,u=i.types,d=0,h=0;function p(e,t,n,r,m){let{id:_,start:S,end:x,size:w}=c,k=h;for(;w<0;){if(c.next(),-1==w){let t=a[_];return n.push(t),void r.push(S-e)}if(-3==w)return void(d=_);if(-4==w)return void(h=_);throw new RangeError("Unrecognized record size: "+w)}let O,E,A=u[_],T=S-e;if(x-S<=o&&(E=function(e,t){let n=c.fork(),r=0,i=0,s=0,a=n.end-o,u={size:0,start:0,skip:0};e:for(let o=n.pos-e;n.pos>o;){let e=n.size;if(n.id==t&&e>=0){u.size=r,u.start=i,u.skip=s,s+=4,r+=4,n.next();continue}let c=n.pos-e;if(e<0||c=l?4:0,h=n.start;for(n.next();n.pos>c;){if(n.size<0){if(-3!=n.size)break e;d+=4}else n.id>=l&&(d+=4);n.next()}i=h,r+=e,s+=d}(t<0||r==e)&&(u.size=r,u.start=i,u.skip=s);return u.size>4?u:void 0}(c.pos-t,m))){let t=new Uint16Array(E.size-E.skip),n=c.pos-E.size,r=t.length;for(;c.pos>n;)r=y(E.start,t,r);O=new g(t,x-E.start,i),T=E.start-e}else{let e=c.pos-w;c.next();let t=[],n=[],r=_>=l?_:-1,i=0,a=x;for(;c.pos>e;)r>=0&&c.id==r&&c.size>=0?(c.end<=a-o&&(b(t,n,S,i,c.end,a,r,k),i=t.length,a=c.end),c.next()):p(S,e,t,n,r);if(r>=0&&i>0&&i-1&&i>0){let e=function(e){return(t,n,r)=>{let i,o,a=0,l=t.length-1;if(l>=0&&(i=t[l])instanceof f){if(!l&&i.type==e&&i.length==r)return i;(o=i.prop(s.lookAhead))&&(a=n[l]+i.length+o)}return v(e,t,n,r,a)}}(A);O=C(A,t,n,0,t.length,0,x-S,e,e)}else O=v(A,t,n,x-S,k-x)}n.push(O),r.push(T)}function b(e,t,n,r,o,s,a,l){let c=[],u=[];for(;e.length>r;)c.push(e.pop()),u.push(t.pop()+n-o);e.push(v(i.types[a],c,u,s-o,l-s)),t.push(o-n)}function v(e,t,n,r,i=0,o){if(d){let e=[s.contextHash,d];o=o?[e].concat(o):[e]}if(i>25){let e=[s.lookAhead,i];o=o?[e].concat(o):[e]}return new f(e,t,n,r,o)}function y(e,t,n){let{id:r,start:i,end:o,size:s}=c;if(c.next(),s>=0&&r4){let r=c.pos-(s-4);for(;c.pos>r;)n=y(e,t,n)}t[--n]=a,t[--n]=o-e,t[--n]=i-e,t[--n]=r}else-3==s?d=r:-4==s&&(h=r);return n}let _=[],S=[];for(;c.pos>0;)p(e.start||0,e.bufferStart||0,_,S,-1);let x=null!==(t=e.length)&&void 0!==t?t:_.length?S[0]+_[0].length:0;return new f(u[e.topID],_.reverse(),S.reverse(),x)}(e)}}f.empty=new f(c.none,[],[],0);class m{constructor(e,t){this.buffer=e,this.index=t}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new m(this.buffer,this.index)}}class g{constructor(e,t,n){this.buffer=e,this.length=t,this.set=n}get type(){return c.none}toString(){let e=[];for(let t=0;t0));a=o[a+3]);return s}slice(e,t,n){let r=this.buffer,i=new Uint16Array(t-e),o=0;for(let s=e,a=0;s=t&&nt;case 1:return n<=t&&r>t;case 2:return r>t;case 4:return!0}}function v(e,t){let n=e.childBefore(t);for(;n;){let t=n.lastChild;if(!t||t.to!=n.to)break;t.type.isError&&t.from==t.to?(e=n,n=t.prevSibling):n=t}return e}function y(e,t,n,r){for(var i;e.from==e.to||(n<1?e.from>=t:e.from>t)||(n>-1?e.to<=t:e.to0?a.length:-1;e!=c;e+=t){let c=a[e],u=l[e]+o.from;if(b(r,n,u,u+c.length))if(c instanceof g){if(i&p.ExcludeBuffers)continue;let s=c.findChild(0,c.buffer.length,t,n-u,r);if(s>-1)return new k(new w(o,c,e,u),null,s)}else if(i&p.IncludeAnonymous||!c.type.isAnonymous||E(c)){let a;if(!(i&p.IgnoreMounts)&&c.props&&(a=c.prop(s.mounted))&&!a.overlay)return new _(a.tree,u,e,o);let l=new _(c,u,e,o);return i&p.IncludeAnonymous||!l.type.isAnonymous?l:l.nextChild(t<0?c.children.length-1:0,t,n,r)}}if(i&p.IncludeAnonymous||!o.type.isAnonymous)return null;if(e=o.index>=0?o.index+t:t<0?-1:o._parent._tree.children.length,o=o._parent,!o)return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}enter(e,t,n=0){let r;if(!(n&p.IgnoreOverlays)&&(r=this._tree.prop(s.mounted))&&r.overlay){let n=e-this.from;for(let{from:e,to:i}of r.overlay)if((t>0?e<=n:e=n:i>n))return new _(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,t,n)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}cursor(e=0){return new O(this,e)}get tree(){return this._tree}toTree(){return this._tree}resolve(e,t=0){return y(this,e,t,!1)}resolveInner(e,t=0){return y(this,e,t,!0)}enterUnfinishedNodesBefore(e){return v(this,e)}getChild(e,t=null,n=null){let r=S(this,e,t,n);return r.length?r[0]:null}getChildren(e,t=null,n=null){return S(this,e,t,n)}toString(){return this._tree.toString()}get node(){return this}matchContext(e){return x(this,e)}}function S(e,t,n,r){let i=e.cursor(),o=[];if(!i.firstChild())return o;if(null!=n)for(;!i.type.is(n);)if(!i.nextSibling())return o;for(;;){if(null!=r&&i.type.is(r))return o;if(i.type.is(t)&&o.push(i.node),!i.nextSibling())return null==r?o:[]}}function x(e,t,n=t.length-1){for(let r=e.parent;n>=0;r=r.parent){if(!r)return!1;if(!r.type.isAnonymous){if(t[n]&&t[n]!=r.name)return!1;n--}}return!0}class w{constructor(e,t,n,r){this.parent=e,this.buffer=t,this.index=n,this.start=r}}class k{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,t,n){this.context=e,this._parent=t,this.index=n,this.type=e.buffer.set.types[e.buffer.buffer[n]]}child(e,t,n){let{buffer:r}=this.context,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.context.start,n);return i<0?null:new k(this.context,this,i)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}enter(e,t,n=0){if(n&p.ExcludeBuffers)return null;let{buffer:r}=this.context,i=r.findChild(this.index+4,r.buffer[this.index+3],t>0?1:-1,e-this.context.start,t);return i<0?null:new k(this.context,this,i)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,t=e.buffer[this.index+3];return t<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new k(this.context,this._parent,t):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,t=this._parent?this._parent.index+4:0;return this.index==t?this.externalSibling(-1):new k(this.context,this._parent,e.findChild(t,this.index,-1,0,4))}cursor(e=0){return new O(this,e)}get tree(){return null}toTree(){let e=[],t=[],{buffer:n}=this.context,r=this.index+4,i=n.buffer[this.index+3];if(i>r){let o=n.buffer[this.index+1];e.push(n.slice(r,i,o)),t.push(0)}return new f(this.type,e,t,this.to-this.from)}resolve(e,t=0){return y(this,e,t,!1)}resolveInner(e,t=0){return y(this,e,t,!0)}enterUnfinishedNodesBefore(e){return v(this,e)}toString(){return this.context.buffer.childString(this.index)}getChild(e,t=null,n=null){let r=S(this,e,t,n);return r.length?r[0]:null}getChildren(e,t=null,n=null){return S(this,e,t,n)}get node(){return this}matchContext(e){return x(this,e)}}class O{get name(){return this.type.name}constructor(e,t=0){if(this.mode=t,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof _)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let t=e._parent;t;t=t._parent)this.stack.unshift(t.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return!!e&&(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0)}yieldBuf(e,t){this.index=e;let{start:n,buffer:r}=this.buffer;return this.type=t||r.set.types[r.buffer[e]],this.from=n+r.buffer[e+1],this.to=n+r.buffer[e+2],!0}yield(e){return!!e&&(e instanceof _?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)))}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,t,n){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,t,n,this.mode));let{buffer:r}=this.buffer,i=r.findChild(this.index+4,r.buffer[this.index+3],e,t-this.buffer.start,n);return!(i<0)&&(this.stack.push(this.index),this.yieldBuf(i))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,t,n=this.mode){return this.buffer?!(n&p.ExcludeBuffers)&&this.enterChild(1,e,t):this.yield(this._tree.enter(e,t,n))}parent(){if(!this.buffer)return this.yieldNode(this.mode&p.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&p.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return!!this._tree._parent&&this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode));let{buffer:t}=this.buffer,n=this.stack.length-1;if(e<0){let e=n<0?0:this.stack[n]+4;if(this.index!=e)return this.yieldBuf(t.findChild(e,this.index,-1,0,4))}else{let e=t.buffer[this.index+3];if(e<(n<0?t.buffer.length:t.buffer[this.stack[n]+3]))return this.yieldBuf(e)}return n<0&&this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode))}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let t,n,{buffer:r}=this;if(r){if(e>0){if(this.index-1)for(let r=t+e,i=e<0?-1:n._tree.children.length;r!=i;r+=e){let e=n._tree.children[r];if(this.mode&p.IncludeAnonymous||e instanceof g||!e.type.isAnonymous||E(e))return!1}return!0}move(e,t){if(t&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,t=0){for(;(this.from==this.to||(t<1?this.from>=e:this.from>e)||(t>-1?this.to<=e:this.to=0;){for(let o=e;o;o=o._parent)if(o.index==r){if(r==this.index)return o;t=o,n=i+1;break e}r=this.stack[--i]}for(let e=n;e=0;i--){if(i<0)return x(this.node,e,r);let o=n[t.buffer[this.stack[i]]];if(!o.isAnonymous){if(e[r]&&e[r]!=o.name)return!1;r--}}return!0}}function E(e){return e.children.some(e=>e instanceof g||!e.type.isAnonymous||E(e))}const A=new WeakMap;function T(e,t){if(!e.isAnonymous||t instanceof g||t.type!=e)return 1;let n=A.get(t);if(null==n){n=1;for(let r of t.children){if(r.type!=e||!(r instanceof f)){n=1;break}n+=T(e,r)}A.set(t,n)}return n}function C(e,t,n,r,i,o,s,a,l){let c=0;for(let n=r;n=u)break;f+=t}if(c==i+1){if(f>u){let e=n[i];t(e.children,e.positions,0,e.children.length,r[i]+a);continue}d.push(n[i])}else{let t=r[c-1]+n[c-1].length-p;d.push(C(e,n,r,i,c,p,t,null,l))}h.push(p+a-o)}}(t,n,r,i,0),(a||l)(d,h,s)}class M{constructor(){this.map=new WeakMap}setBuffer(e,t,n){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(t,n)}getBuffer(e,t){let n=this.map.get(e);return n&&n.get(t)}set(e,t){e instanceof k?this.setBuffer(e.context.buffer,e.index,t):e instanceof _&&this.map.set(e.tree,t)}get(e){return e instanceof k?this.getBuffer(e.context.buffer,e.index):e instanceof _?this.map.get(e.tree):void 0}cursorSet(e,t){e.buffer?this.setBuffer(e.buffer.buffer,e.index,t):this.map.set(e.tree,t)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class P{constructor(e,t,n,r,i=!1,o=!1){this.from=e,this.to=t,this.tree=n,this.offset=r,this.open=(i?1:0)|(o?2:0)}get openStart(){return(1&this.open)>0}get openEnd(){return(2&this.open)>0}static addTree(e,t=[],n=!1){let r=[new P(0,e.length,e,0,!1,n)];for(let n of t)n.to>e.length&&r.push(n);return r}static applyChanges(e,t,n=128){if(!t.length)return e;let r=[],i=1,o=e.length?e[0]:null;for(let s=0,a=0,l=0;;s++){let c=s=n)for(;o&&o.from=t.from||u<=t.to||l){let e=Math.max(t.from,a)-l,n=Math.min(t.to,u)-l;t=e>=n?null:new P(e,n,t.tree,t.offset+l,s>0,!!c)}if(t&&r.push(t),o.to>u)break;o=inew o(e.from,e.to)):[new o(0,0)]:[new o(0,e.length)],this.createParse(e,t||[],n)}parse(e,t,n){let r=this.startParse(e,t,n);for(;;){let e=r.advance();if(e)return e}}}class R{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,t){return this.string.slice(e,t)}}function I(e){return(t,n,r,i)=>new L(t,e,n,r,i)}class D{constructor(e,t,n,r,i){this.parser=e,this.parse=t,this.overlay=n,this.target=r,this.ranges=i}}class N{constructor(e,t,n,r,i,o,s){this.parser=e,this.predicate=t,this.mounts=n,this.index=r,this.start=i,this.target=o,this.prev=s,this.depth=0,this.ranges=[]}}const j=new s({perNode:!0});class L{constructor(e,t,n,r,i){this.nest=t,this.input=n,this.fragments=r,this.ranges=i,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let e=this.baseParse.advance();if(!e)return null;if(this.baseParse=null,this.baseTree=e,this.startInner(),null!=this.stoppedAt)for(let e of this.inner)e.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let e=this.baseTree;return null!=this.stoppedAt&&(e=new f(e.type,e.children,e.positions,e.length,e.propValues.concat([[j,this.stoppedAt]]))),e}let e=this.inner[this.innerDone],t=e.parse.advance();if(t){this.innerDone++;let n=Object.assign(Object.create(null),e.target.props);n[s.mounted.id]=new a(t,e.overlay,e.parser),e.target.props=n}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let t=this.innerDone;te.frag.from<=r.from&&e.frag.to>=r.to&&e.mount.overlay);if(e)for(let n of e.mount.overlay){let i=n.from+e.pos,o=n.to+e.pos;i>=r.from&&o<=r.to&&!t.ranges.some(e=>e.fromi)&&t.ranges.push({from:i,to:o})}}l=!1}else if(n&&(s=B(n.ranges,r.from,r.to)))l=2!=s;else if(!r.type.isAnonymous&&r.fromnew o(e.from-r.from,e.to-r.from)):null,r.tree,e)),i.overlay?e.length&&(n={ranges:e,depth:0,prev:n}):l=!1}}else t&&(a=t.predicate(r))&&(!0===a&&(a=new o(r.from,r.to)),a.fromnew o(e.from-t.start,e.to-t.start)),t.target,e)),t=t.prev}n&&!--n.depth&&(n=n.prev)}}}}function B(e,t,n){for(let r of e){if(r.from>=n)break;if(r.to>t)return r.from<=t&&r.to>=n?2:1}return 0}function F(e,t,n,r,i,o){if(t=t.to);r++);let s=i.children[r],a=s.buffer;i.children[r]=function e(n,r,i,l,c){let u=n;for(;a[u+2]+o<=t.from;)u=a[u+3];let d=[],h=[];F(s,n,u,d,h,l);let p=a[u+1],m=a[u+2],g=p+o==t.from&&m+o==t.to&&a[u]==t.type.id;return d.push(g?t.toTree():e(u+4,a[u+3],s.set.types[a[u]],p,m-p)),h.push(p-l),F(s,a[u+3],r,d,h,l),new f(i,d,h,c)}(0,a.length,c.none,0,s.length);for(let r=0;r<=n;r++)e.childAfter(t.from)}class U{constructor(e,t){this.offset=t,this.done=!1,this.cursor=e.cursor(p.IncludeAnonymous|p.IgnoreMounts)}moveTo(e){let{cursor:t}=this,n=e-this.offset;for(;!this.done&&t.from=e&&t.enter(n,1,p.IgnoreOverlays|p.ExcludeBuffers)||t.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let t=this.cursor.tree;;){if(t==e.tree)return!0;if(!(t.children.length&&0==t.positions[0]&&t.children[0]instanceof f))break;t=t.children[0]}return!1}}class Q{constructor(e){var t;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let n=this.curFrag=e[0];this.curTo=null!==(t=n.tree.prop(j))&&void 0!==t?t:n.to,this.inner=new U(n.tree,-n.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let t=this.curFrag=this.fragments[this.fragI];this.curTo=null!==(e=t.tree.prop(j))&&void 0!==e?e:t.to,this.inner=new U(t.tree,-t.offset)}}findMounts(e,t){var n;let r=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let e=this.inner.cursor.node;e;e=e.parent){let i=null===(n=e.tree)||void 0===n?void 0:n.prop(s.mounted);if(i&&i.parser==t)for(let t=this.fragI;t=e.to)break;n.tree==this.curFrag.tree&&r.push({frag:n,pos:e.from-n.offset,mount:i})}}}return r}}function q(e,t){let n=null,r=t;for(let i=1,s=0;i=l)break;e.to<=a||(n||(r=n=t.slice()),e.froml&&n.splice(s+1,0,new o(l,e.to))):e.to>l?n[s--]=new o(l,e.to):n.splice(s--,1))}}return r}function H(e,t,n,r){let i=0,s=0,a=!1,l=!1,c=-1e9,u=[];for(;;){let d=i==e.length?1e9:a?e[i].to:e[i].from,h=s==t.length?1e9:l?t[s].to:t[s].from;if(a!=l){let e=Math.max(c,n),t=Math.min(d,h,r);enew o(e.from+r,e.to+r)),l,c);for(let t=0,r=l;;t++){let o=t==a.length,l=o?c:a[t].from;if(l>r&&n.push(new P(r,l,i.tree,-e,s.from>=r||s.openStart,s.to<=l||s.openEnd)),o)break;r=a[t].to}}else n.push(new P(l,c,i.tree,-e,s.from>=e||s.openStart,s.to<=a||s.openEnd))}return n}},function(e,t,n){n(348),n(349),e.exports=Sk},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(87);function i(e,t,n){return(t=Object(r.a)(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}},function(e,t){e.exports={trueFunc:function(){return!0},falseFunc:function(){return!1}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return o}));var r=n(17);const i=n(38).a;function o(e,t){try{let n=e;const r=5,i=80,o=[];let a=0,l=0;const c=" > ",u=c.length;let d;for(;n&&a++1&&l+o.length*u+d.length>=i));)o.push(d),l+=d.length,n=n.parentNode;return o.reverse().join(c)}catch(e){return""}}function s(e,t){const n=e,i=[];let o,s,a,l,c;if(!n||!n.tagName)return"";i.push(n.tagName.toLowerCase());const u=t&&t.length?t.filter(e=>n.getAttribute(e)).map(e=>[e,n.getAttribute(e)]):null;if(u&&u.length)u.forEach(e=>{i.push(`[${e[0]}="${e[1]}"]`)});else if(n.id&&i.push("#"+n.id),o=n.className,o&&Object(r.i)(o))for(s=o.split(/\s+/),c=0;c1&&l+o.length*u+d.length>=i));)o.push(d),l+=d.length,n=n.parentNode;return o.reverse().join(c)}catch(e){return""}}function s(e,t){const n=e,i=[];let o,s,a,l,c;if(!n||!n.tagName)return"";i.push(n.tagName.toLowerCase());const u=t&&t.length?t.filter(e=>n.getAttribute(e)).map(e=>[e,n.getAttribute(e)]):null;if(u&&u.length)u.forEach(e=>{i.push(`[${e[0]}="${e[1]}"]`)});else if(n.id&&i.push("#"+n.id),o=n.className,o&&Object(r.l)(o))for(s=o.split(/\s+/),c=0;c{Object.assign(h,e)};var f,m;const g=e=>"colorSpace"in e||"outputColorSpace"in e,b=()=>{var e;return null!=(e=h.ColorManagement)?e:null},v=e=>e&&e.isOrthographicCamera,y=e=>e&&e.hasOwnProperty("current"),_="undefined"!=typeof window&&(null!=(f=window.document)&&f.createElement||"ReactNative"===(null==(m=window.navigator)?void 0:m.product))?i.useLayoutEffect:i.useEffect;function S(e){const t=i.useRef(e);return _(()=>{t.current=e},[e]),t}function x({set:e}){return _(()=>(e(new Promise(()=>null)),()=>e(!1)),[e]),null}class w extends i.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}w.getDerivedStateFromError=()=>({error:!0});const k=new Map;function O(e){var t;const n="undefined"!=typeof window?null!=(t=window.devicePixelRatio)?t:2:1;return Array.isArray(e)?Math.min(Math.max(e[0],n),e[1]):e}const E=e=>{var t;return null==(t=e.__r3f)?void 0:t.root.getState()},A={obj:e=>e===Object(e)&&!A.arr(e)&&"function"!=typeof e,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,boo:e=>"boolean"==typeof e,und:e=>void 0===e,arr:e=>Array.isArray(e),equ(e,t,{arrays:n="shallow",objects:r="reference",strict:i=!0}={}){if(typeof e!=typeof t||!!e!=!!t)return!1;if(A.str(e)||A.num(e))return e===t;const o=A.obj(e);if(o&&"reference"===r)return e===t;const s=A.arr(e);if(s&&"reference"===n)return e===t;if((s||o)&&e===t)return!0;let a;for(a in e)if(!(a in t))return!1;if(o&&"shallow"===n&&"shallow"===r){for(a in i?t:e)if(!A.equ(e[a],t[a],{strict:i,objects:"reference"}))return!1}else for(a in i?t:e)if(e[a]!==t[a])return!1;if(A.und(a)){if(s&&0===e.length&&0===t.length)return!0;if(o&&0===Object.keys(e).length&&0===Object.keys(t).length)return!0;if(e!==t)return!1}return!0}};function T(e){const t={nodes:{},materials:{}};return e&&e.traverse(e=>{e.name&&(t.nodes[e.name]=e),e.material&&!t.materials[e.material.name]&&(t.materials[e.material.name]=e.material)}),t}function C(e,t){const n=e;return(null!=t&&t.primitive||!n.__r3f)&&(n.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...t}),e}function M(e,t){let n=e;if(t.includes("-")){const r=t.split("-"),i=r.pop();return n=r.reduce((e,t)=>e[t],e),{target:n,key:i}}return{target:n,key:t}}const P=/-\d+$/;function $(e,t,n){if(A.str(n)){if(P.test(n)){const t=n.replace(P,""),{target:r,key:i}=M(e,t);Array.isArray(r[i])||(r[i]=[])}const{target:r,key:i}=M(e,n);t.__r3f.previousAttach=r[i],r[i]=t}else t.__r3f.previousAttach=n(e,t)}function R(e,t,n){var r,i;if(A.str(n)){const{target:r,key:i}=M(e,n),o=t.__r3f.previousAttach;void 0===o?delete r[i]:r[i]=o}else null==(r=t.__r3f)||null==r.previousAttach||r.previousAttach(e,t);null==(i=t.__r3f)||delete i.previousAttach}function I(e,{children:t,key:n,ref:r,...i},{children:o,key:s,ref:a,...l}={},c=!1){var u;const d=null!=(u=null==e?void 0:e.__r3f)?u:{},h=Object.entries(i),p=[];if(c){const e=Object.keys(l);for(let t=0;t{var r;if(null!=(r=e.__r3f)&&r.primitive&&"object"===t)return;if(A.equ(n,l[t]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(t))return p.push([t,n,!0,[]]);let o=[];t.includes("-")&&(o=t.split("-")),p.push([t,n,!1,o]);for(const e in i){const n=i[e];e.startsWith(t+"-")&&p.push([e,n,!1,e.split("-")])}});const f={...i};return d.memoizedProps&&d.memoizedProps.args&&(f.args=d.memoizedProps.args),d.memoizedProps&&d.memoizedProps.attach&&(f.attach=d.memoizedProps.attach),{memoized:f,changes:p}}function D(e,t){var n,i,o;const s=null!=(n=e.__r3f)?n:{},a=s.root,l=null!=(i=null==a||null==a.getState?void 0:a.getState())?i:{},{memoized:c,changes:u}=(d=t)&&d.memoized&&d.changes?t:I(e,t);var d;const h=s.eventCount;e.__r3f&&(e.__r3f.memoizedProps=c);for(let t=0;te[t],e),!d||!d.set)){const[t,...r]=a.reverse();c=r.reverse().reduce((e,t)=>e[t],e),n=t}if("__defaultremove"===i)if(c.constructor){let e=k.get(c.constructor);e||(e=new c.constructor,k.set(c.constructor,e)),i=e[n]}else i=0;if(o)i?s.handlers[n]=i:delete s.handlers[n],s.eventCount=Object.keys(s.handlers).length;else if(d&&d.set&&(d.copy||d instanceof r.Layers)){if(Array.isArray(i))d.fromArray?d.fromArray(i):d.set(...i);else if(d.copy&&i&&i.constructor&&d.constructor===i.constructor)d.copy(i);else if(void 0!==i){const e=d instanceof r.Color;!e&&d.setScalar?d.setScalar(i):d instanceof r.Layers&&i instanceof r.Layers?d.mask=i.mask:d.set(i),b()||l.linear||!e||d.convertSRGBToLinear()}}else if(c[n]=i,c[n]instanceof r.Texture&&c[n].format===r.RGBAFormat&&c[n].type===r.UnsignedByteType){const e=c[n];g(e)&&g(l.gl)?e.colorSpace=l.gl.outputColorSpace:e.encoding=l.gl.outputEncoding}N(e)}if(s.parent&&l.internal&&e.raycast&&h!==s.eventCount){const t=l.internal.interaction.indexOf(e);t>-1&&l.internal.interaction.splice(t,1),s.eventCount&&l.internal.interaction.push(e)}return!(1===u.length&&"onUpdate"===u[0][0])&&u.length&&null!=(o=e.__r3f)&&o.parent&&j(e),e}function N(e){var t,n;const r=null==(t=e.__r3f)||null==(n=t.root)||null==n.getState?void 0:n.getState();r&&0===r.internal.frames&&r.invalidate()}function j(e){null==e.onUpdate||e.onUpdate(e)}function L(e,t){e.manual||(v(e)?(e.left=t.width/-2,e.right=t.width/2,e.top=t.height/2,e.bottom=t.height/-2):e.aspect=t.width/t.height,e.updateProjectionMatrix(),e.updateMatrixWorld())}function B(e){return(e.eventObject||e.object).uuid+"/"+e.index+e.instanceId}function F(e,t,n,r){const i=n.get(t);i&&(n.delete(t),0===n.size&&(e.delete(r),i.target.releasePointerCapture(r)))}function z(e){function t(e){return e.filter(e=>["Move","Over","Enter","Out","Leave"].some(t=>{var n;return null==(n=e.__r3f)?void 0:n.handlers["onPointer"+t]}))}function n(t){const{internal:n}=e.getState();for(const e of n.hovered.values())if(!t.length||!t.find(t=>t.object===e.object&&t.index===e.index&&t.instanceId===e.instanceId)){const r=e.eventObject.__r3f,i=null==r?void 0:r.handlers;if(n.hovered.delete(B(e)),null!=r&&r.eventCount){const n={...e,intersections:t};null==i.onPointerOut||i.onPointerOut(n),null==i.onPointerLeave||i.onPointerLeave(n)}}}function i(e,t){for(let n=0;nn([]);case"onLostPointerCapture":return t=>{const{internal:r}=e.getState();"pointerId"in t&&r.capturedMap.has(t.pointerId)&&requestAnimationFrame(()=>{r.capturedMap.has(t.pointerId)&&(r.capturedMap.delete(t.pointerId),n([]))})}}return function(s){const{onPointerMissed:a,internal:l}=e.getState();l.lastEvent.current=s;const c="onPointerMove"===o,u="onClick"===o||"onContextMenu"===o||"onDoubleClick"===o,d=function(t,n){const r=e.getState(),i=new Set,o=[],s=n?n(r.internal.interaction):r.internal.interaction;for(let e=0;e{const n=E(e.object),r=E(t.object);return n&&r&&r.events.priority-n.events.priority||e.distance-t.distance}).filter(e=>{const t=B(e);return!i.has(t)&&(i.add(t),!0)});r.events.filter&&(a=r.events.filter(a,r));for(const e of a){let t=e.object;for(;t;){var l;null!=(l=t.__r3f)&&l.eventCount&&o.push({...e,eventObject:t}),t=t.parent}}if("pointerId"in t&&r.internal.capturedMap.has(t.pointerId))for(let e of r.internal.capturedMap.get(t.pointerId).values())i.has(B(e.intersection))||o.push(e.intersection);return o}(s,c?t:void 0),h=u?function(t){const{internal:n}=e.getState(),r=t.offsetX-n.initialClick[0],i=t.offsetY-n.initialClick[1];return Math.round(Math.sqrt(r*r+i*i))}(s):0;"onPointerDown"===o&&(l.initialClick=[s.offsetX,s.offsetY],l.initialHits=d.map(e=>e.eventObject)),u&&!d.length&&h<=2&&(i(s,l.interaction),a&&a(s)),c&&n(d),function(t,i,o,s){const a=e.getState();if(t.length){const e={stopped:!1};for(const l of t){const c=E(l.object)||a,{raycaster:u,pointer:d,camera:h,internal:p}=c,f=new r.Vector3(d.x,d.y,0).unproject(h),m=e=>{var t,n;return null!=(t=null==(n=p.capturedMap.get(e))?void 0:n.has(l.eventObject))&&t},g=e=>{const t={intersection:l,target:i.target};p.capturedMap.has(e)?p.capturedMap.get(e).set(l.eventObject,t):p.capturedMap.set(e,new Map([[l.eventObject,t]])),i.target.setPointerCapture(e)},b=e=>{const t=p.capturedMap.get(e);t&&F(p.capturedMap,l.eventObject,t,e)};let v={};for(let e in i){let t=i[e];"function"!=typeof t&&(v[e]=t)}let y={...l,...v,pointer:d,intersections:t,stopped:e.stopped,delta:o,unprojectedPoint:f,ray:u.ray,camera:h,stopPropagation(){const r="pointerId"in i&&p.capturedMap.get(i.pointerId);if((!r||r.has(l.eventObject))&&(y.stopped=e.stopped=!0,p.hovered.size&&Array.from(p.hovered.values()).find(e=>e.eventObject===l.eventObject))){n([...t.slice(0,t.indexOf(l)),l])}},target:{hasPointerCapture:m,setPointerCapture:g,releasePointerCapture:b},currentTarget:{hasPointerCapture:m,setPointerCapture:g,releasePointerCapture:b},nativeEvent:i};if(s(y),!0===e.stopped)break}}}(d,s,h,(function(e){const t=e.eventObject,n=t.__r3f,r=null==n?void 0:n.handlers;if(null!=n&&n.eventCount)if(c){if(r.onPointerOver||r.onPointerEnter||r.onPointerOut||r.onPointerLeave){const t=B(e),n=l.hovered.get(t);n?n.stopped&&e.stopPropagation():(l.hovered.set(t,e),null==r.onPointerOver||r.onPointerOver(e),null==r.onPointerEnter||r.onPointerEnter(e))}null==r.onPointerMove||r.onPointerMove(e)}else{const n=r[o];n?u&&!l.initialHits.includes(t)||(i(s,l.interaction.filter(e=>!l.initialHits.includes(e))),n(e)):u&&l.initialHits.includes(t)&&i(s,l.interaction.filter(e=>!l.initialHits.includes(e)))}}))}}}}const U=e=>!(null==e||!e.render),Q=i.createContext(null);let q,H=new Set,G=new Set,V=new Set;function W(e,t){if(e.size)for(const{callback:n}of e.values())n(t)}function X(e,t){switch(e){case"before":return W(H,t);case"after":return W(G,t);case"tail":return W(V,t)}}let Y,Z;function J(e,t,n){let r=t.clock.getDelta();for("never"===t.frameloop&&"number"==typeof e&&(r=e-t.clock.elapsedTime,t.clock.oldTime=t.clock.elapsedTime,t.clock.elapsedTime=e),Y=t.internal.subscribers,q=0;qe),t){return K()(e,t)}function te(e,t=0){const n=K(),r=n.getState().internal.subscribe,i=S(e);return _(()=>r(i,t,n),[t,r,n]),null}function ne(e,t){return function(n,...r){const i=new n;return e&&e(i),Promise.all(r.map(e=>new Promise((n,r)=>i.load(e,e=>{e.scene&&Object.assign(e,T(e.scene)),n(e)},t,t=>r(new Error(`Could not load ${e}: ${t.message})`))))))}}function re(e,t,n,r){const i=Array.isArray(t)?t:[t],o=Object(d.c)(ne(n,r),[e,...i],{equal:A.equ});return Array.isArray(t)?o:o[0]}re.preload=function(e,t,n){const r=Array.isArray(t)?t:[t];return Object(d.b)(ne(n),[e,...r])},re.clear=function(e,t){const n=Array.isArray(t)?t:[t];return Object(d.a)([e,...n])};const ie=new Map,{invalidate:oe,advance:se}=function(e){let t,n,r,i=!1;function o(s){n=requestAnimationFrame(o),i=!0,t=0,X("before",s);for(const n of e.values()){var a;r=n.store.getState(),!r.internal.active||!("always"===r.frameloop||r.internal.frames>0)||null!=(a=r.gl.xr)&&a.isPresenting||(t+=J(s,r))}if(X("after",s),0===t)return X("tail",s),i=!1,cancelAnimationFrame(n)}return{loop:o,invalidate:function t(n,r=1){var s;if(!n)return e.forEach(e=>t(e.store.getState()),r);null!=(s=n.gl.xr)&&s.isPresenting||!n.internal.active||"never"===n.frameloop||(n.internal.frames=Math.min(60,n.internal.frames+r),i||(i=!0,requestAnimationFrame(o)))},advance:function(t,n=!0,r,i){if(n&&X("before",t),r)J(t,r,i);else for(const n of e.values())J(t,n.store.getState());n&&X("after",t)}}}(ie),{reconciler:ae,applyProps:le}=function(e,t){function n(e,{args:t=[],attach:n,...i},o){let s,a=`${e[0].toUpperCase()}${e.slice(1)}`;if("primitive"===e){if(void 0===i.object)throw new Error("R3F: Primitives without 'object' are invalid!");s=C(i.object,{type:e,root:o,attach:n,primitive:!0})}else{const r=h[a];if(!r)throw new Error(`R3F: ${a} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(!Array.isArray(t))throw new Error("R3F: The args prop must be an array!");s=C(new r(...t),{type:e,root:o,attach:n,memoizedProps:{args:t}})}return void 0===s.__r3f.attach&&(s instanceof r.BufferGeometry?s.__r3f.attach="geometry":s instanceof r.Material&&(s.__r3f.attach="material")),"inject"!==a&&D(s,i),s}function i(e,t){let n=!1;var r,i;t&&(null!=(r=t.__r3f)&&r.attach?$(e,t,t.__r3f.attach):t.isObject3D&&e.isObject3D&&(e.add(t),n=!0),n||null==(i=e.__r3f)||i.objects.push(t),t.__r3f||C(t,{}),t.__r3f.parent=e,j(t),N(t))}function s(e,t,n){let r=!1;if(t){var i,o;if(null!=(i=t.__r3f)&&i.attach)$(e,t,t.__r3f.attach);else if(t.isObject3D&&e.isObject3D){t.parent=e,t.dispatchEvent({type:"added"});const i=e.children.filter(e=>e!==t),o=i.indexOf(n);e.children=[...i.slice(0,o),t,...i.slice(o)],r=!0}r||null==(o=e.__r3f)||o.objects.push(t),t.__r3f||C(t,{}),t.__r3f.parent=e,j(t),N(t)}}function a(e,t,n=!1){e&&[...e].forEach(e=>l(t,e,n))}function l(e,t,n){if(t){var r,i,o;if(t.__r3f&&(t.__r3f.parent=null),null!=(r=e.__r3f)&&r.objects&&(e.__r3f.objects=e.__r3f.objects.filter(e=>e!==t)),null!=(i=t.__r3f)&&i.attach)R(e,t,t.__r3f.attach);else if(t.isObject3D&&e.isObject3D){var s;e.remove(t),null!=(s=t.__r3f)&&s.root&&function(e,t){const{internal:n}=e.getState();n.interaction=n.interaction.filter(e=>e!==t),n.initialHits=n.initialHits.filter(e=>e!==t),n.hovered.forEach((e,r)=>{e.eventObject!==t&&e.object!==t||n.hovered.delete(r)}),n.capturedMap.forEach((e,r)=>{F(n.capturedMap,t,e,r)})}(t.__r3f.root,t)}const c=null==(o=t.__r3f)?void 0:o.primitive,d=void 0===n?null!==t.dispose&&!c:n;var l;if(!c)a(null==(l=t.__r3f)?void 0:l.objects,t,d),a(t.children,t,d);t.__r3f&&(delete t.__r3f.root,delete t.__r3f.objects,delete t.__r3f.handlers,delete t.__r3f.memoizedProps,c||delete t.__r3f),d&&t.dispose&&"Scene"!==t.type&&Object(u.unstable_scheduleCallback)(u.unstable_IdlePriority,()=>{try{t.dispose()}catch(e){}}),N(e)}}const d=()=>console.warn("Text is not allowed in the R3F tree! This could be stray whitespace or characters.");return{reconciler:c()({createInstance:n,removeChild:l,appendChild:i,appendInitialChild:i,insertBefore:s,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(e,t)=>{if(!t)return;const n=e.getState().scene;n.__r3f&&(n.__r3f.root=e,i(n,t))},removeChildFromContainer:(e,t)=>{t&&l(e.getState().scene,t)},insertInContainerBefore:(e,t,n)=>{if(!t||!n)return;const r=e.getState().scene;r.__r3f&&s(r,t,n)},getRootHostContext:()=>null,getChildHostContext:e=>e,finalizeInitialChildren(e){var t;const n=null!=(t=null==e?void 0:e.__r3f)?t:{};return Boolean(n.handlers)},prepareUpdate(e,t,n,r){if(e.__r3f.primitive&&r.object&&r.object!==e)return[!0];{const{args:t=[],children:i,...o}=r,{args:s=[],children:a,...l}=n;if(!Array.isArray(t))throw new Error("R3F: the args prop must be an array!");if(t.some((e,t)=>e!==s[t]))return[!0];const c=I(e,o,l,!0);return c.changes.length?[!1,c]:null}},commitUpdate(e,[t,r],o,s,a,c){t?function(e,t,r,o){var s;const a=null==(s=e.__r3f)?void 0:s.parent;if(!a)return;const c=n(t,r,e.__r3f.root);if(e.children){for(const t of e.children)t.__r3f&&i(c,t);e.children=e.children.filter(e=>!e.__r3f)}if(e.__r3f.objects.forEach(e=>i(c,e)),e.__r3f.objects=[],e.__r3f.autoRemovedBeforeAppend||l(a,e),c.parent&&(c.__r3f.autoRemovedBeforeAppend=!0),i(a,c),c.raycast&&c.__r3f.eventCount){c.__r3f.root.getState().internal.interaction.push(c)}[o,o.alternate].forEach(e=>{null!==e&&(e.stateNode=c,e.ref&&("function"==typeof e.ref?e.ref(c):e.ref.current=c))})}(e,o,a,c):D(e,r)},commitMount(e,t,n,r){var i;const o=null!=(i=e.__r3f)?i:{};e.raycast&&o.handlers&&o.eventCount&&e.__r3f.root.getState().internal.interaction.push(e)},getPublicInstance:e=>e,prepareForCommit:()=>null,preparePortalMount:e=>C(e.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(e){var t;const{attach:n,parent:r}=null!=(t=e.__r3f)?t:{};n&&r&&R(r,e,n),e.isObject3D&&(e.visible=!1),N(e)},unhideInstance(e,t){var n;const{attach:r,parent:i}=null!=(n=e.__r3f)?n:{};r&&i&&$(i,e,r),(e.isObject3D&&null==t.visible||t.visible)&&(e.visible=!0),N(e)},createTextInstance:d,hideTextInstance:d,unhideTextInstance:d,getCurrentEventPriority:()=>t?t():o.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:"undefined"!=typeof performance&&A.fun(performance.now)?performance.now:A.fun(Date.now)?Date.now:()=>0,scheduleTimeout:A.fun(setTimeout)?setTimeout:void 0,cancelTimeout:A.fun(clearTimeout)?clearTimeout:void 0}),applyProps:D}}(0,(function(){var e;const t="undefined"!=typeof self&&self||"undefined"!=typeof window&&window;if(!t)return o.DefaultEventPriority;switch(null==(e=t.event)?void 0:e.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return o.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return o.ContinuousEventPriority;default:return o.DefaultEventPriority}})),ce={objects:"shallow",strict:!1},ue=(e,t)=>{const n="function"==typeof e?e(t):e;return U(n)?n:new r.WebGLRenderer({powerPreference:"high-performance",canvas:t,antialias:!0,alpha:!0,...e})};function de(e){const t=ie.get(e),n=null==t?void 0:t.fiber,s=null==t?void 0:t.store;t&&console.warn("R3F.createRoot should only be called once!");const l="function"==typeof reportError?reportError:console.error,c=s||((e,t)=>{const n=a()((n,o)=>{const s=new r.Vector3,a=new r.Vector3,l=new r.Vector3;function c(e=o().camera,t=a,n=o().size){const{width:i,height:c,top:u,left:d}=n,h=i/c;t instanceof r.Vector3?l.copy(t):l.set(...t);const p=e.getWorldPosition(s).distanceTo(l);if(v(e))return{width:i/e.zoom,height:c/e.zoom,top:u,left:d,factor:1,distance:p,aspect:h};{const t=e.fov*Math.PI/180,n=2*Math.tan(t/2)*p,r=n*(i/c);return{width:r,height:n,top:u,left:d,factor:i/r,distance:p,aspect:h}}}let u=void 0;const d=e=>n(t=>({performance:{...t.performance,current:e}})),h=new r.Vector2;return{set:n,get:o,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,scene:null,invalidate:(t=1)=>e(o(),t),advance:(e,n)=>t(e,n,o()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new r.Clock,pointer:h,mouse:h,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const e=o();u&&clearTimeout(u),e.performance.current!==e.performance.min&&d(e.performance.min),u=setTimeout(()=>d(o().performance.max),e.performance.debounce)}},size:{width:0,height:0,top:0,left:0,updateStyle:!1},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:c},setEvents:e=>n(t=>({...t,events:{...t.events,...e}})),setSize:(e,t,r,i,s)=>{const l=o().camera,u={width:e,height:t,top:i||0,left:s||0,updateStyle:r};n(e=>({size:u,viewport:{...e.viewport,...c(l,a,u)}}))},setDpr:e=>n(t=>{const n=O(e);return{viewport:{...t.viewport,dpr:n,initialDpr:t.viewport.initialDpr||n}}}),setFrameloop:(e="always")=>{const t=o().clock;t.stop(),t.elapsedTime=0,"never"!==e&&(t.start(),t.elapsedTime=0),n(()=>({frameloop:e}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:i.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(e,t,n)=>{const r=o().internal;return r.priority=r.priority+(t>0?1:0),r.subscribers.push({ref:e,priority:t,store:n}),r.subscribers=r.subscribers.sort((e,t)=>e.priority-t.priority),()=>{const n=o().internal;null!=n&&n.subscribers&&(n.priority=n.priority-(t>0?1:0),n.subscribers=n.subscribers.filter(t=>t.ref!==e))}}}}}),o=n.getState();let s=o.size,l=o.viewport.dpr,c=o.camera;return n.subscribe(()=>{const{camera:e,size:t,viewport:r,gl:i,set:o}=n.getState();if(t!==s||r.dpr!==l){var a;s=t,l=r.dpr,L(e,t),i.setPixelRatio(r.dpr);const n=null!=(a=t.updateStyle)?a:"undefined"!=typeof HTMLCanvasElement&&i.domElement instanceof HTMLCanvasElement;i.setSize(t.width,t.height,n)}e!==c&&(c=e,o(t=>({viewport:{...t.viewport,...t.viewport.getCurrentViewport(e)}})))}),n.subscribe(t=>e(t)),n})(oe,se),u=n||ae.createContainer(c,o.ConcurrentRoot,null,!1,null,"",l,null);let d;t||ie.set(e,{fiber:u,store:c});let h,p=!1;return{configure(t={}){let{gl:n,size:i,scene:o,events:s,onCreated:a,shadows:l=!1,linear:u=!1,flat:f=!1,legacy:m=!1,orthographic:g=!1,frameloop:v="always",dpr:y=[1,2],performance:_,raycaster:S,camera:x,onPointerMissed:w}=t,k=c.getState(),E=k.gl;k.gl||k.set({gl:E=ue(n,e)});let T=k.raycaster;T||k.set({raycaster:T=new r.Raycaster});const{params:M,...P}=S||{};if(A.equ(P,T,ce)||le(T,{...P}),A.equ(M,T.params,ce)||le(T,{params:{...T.params,...M}}),!k.camera||k.camera===h&&!A.equ(h,x,ce)){h=x;const e=x instanceof r.Camera,t=e?x:g?new r.OrthographicCamera(0,0,0,0,.1,1e3):new r.PerspectiveCamera(75,0,.1,1e3);e||(t.position.z=5,x&&le(t,x),k.camera||null!=x&&x.rotation||t.lookAt(0,0,0)),k.set({camera:t})}if(!k.scene){let e;o instanceof r.Scene?e=o:(e=new r.Scene,o&&le(e,o)),k.set({scene:C(e)})}if(!k.xr){const e=(e,t)=>{const n=c.getState();"never"!==n.frameloop&&se(e,!0,n,t)},t=()=>{const t=c.getState();t.gl.xr.enabled=t.gl.xr.isPresenting,t.gl.xr.setAnimationLoop(t.gl.xr.isPresenting?e:null),t.gl.xr.isPresenting||oe(t)},n={connect(){const e=c.getState().gl;e.xr.addEventListener("sessionstart",t),e.xr.addEventListener("sessionend",t)},disconnect(){const e=c.getState().gl;e.xr.removeEventListener("sessionstart",t),e.xr.removeEventListener("sessionend",t)}};E.xr&&n.connect(),k.set({xr:n})}if(E.shadowMap){const e=E.shadowMap.enabled,t=E.shadowMap.type;if(E.shadowMap.enabled=!!l,A.boo(l))E.shadowMap.type=r.PCFSoftShadowMap;else if(A.str(l)){var $;const e={basic:r.BasicShadowMap,percentage:r.PCFShadowMap,soft:r.PCFSoftShadowMap,variance:r.VSMShadowMap};E.shadowMap.type=null!=($=e[l])?$:r.PCFSoftShadowMap}else A.obj(l)&&Object.assign(E.shadowMap,l);e===E.shadowMap.enabled&&t===E.shadowMap.type||(E.shadowMap.needsUpdate=!0)}const R=b();R&&("enabled"in R?R.enabled=!m:"legacyMode"in R&&(R.legacyMode=m));le(E,{outputEncoding:u?3e3:3001,toneMapping:f?r.NoToneMapping:r.ACESFilmicToneMapping}),k.legacy!==m&&k.set(()=>({legacy:m})),k.linear!==u&&k.set(()=>({linear:u})),k.flat!==f&&k.set(()=>({flat:f})),!n||A.fun(n)||U(n)||A.equ(n,E,ce)||le(E,n),s&&!k.events.handlers&&k.set({events:s(c)});const I=function(e,t){if(t)return t;if("undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement&&e.parentElement){const{width:t,height:n,top:r,left:i}=e.parentElement.getBoundingClientRect();return{width:t,height:n,top:r,left:i}}return"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas?{width:e.width,height:e.height,top:0,left:0}:{width:0,height:0,top:0,left:0}}(e,i);return A.equ(I,k.size,ce)||k.setSize(I.width,I.height,I.updateStyle,I.top,I.left),y&&k.viewport.dpr!==O(y)&&k.setDpr(y),k.frameloop!==v&&k.setFrameloop(v),k.onPointerMissed||k.set({onPointerMissed:w}),_&&!A.equ(_,k.performance,ce)&&k.set(e=>({performance:{...e.performance,..._}})),d=a,p=!0,this},render(t){return p||this.configure(),ae.updateContainer(i.createElement(he,{store:c,children:t,onCreated:d,rootElement:e}),u,null,()=>{}),c},unmount(){pe(e)}}}function he({store:e,children:t,onCreated:n,rootElement:r}){return _(()=>{const t=e.getState();t.set(e=>({internal:{...e.internal,active:!0}})),n&&n(t),e.getState().events.connected||null==t.events.connect||t.events.connect(r)},[]),i.createElement(Q.Provider,{value:e},t)}function pe(e,t){const n=ie.get(e),r=null==n?void 0:n.fiber;if(r){const i=null==n?void 0:n.store.getState();i&&(i.internal.active=!1),ae.updateContainer(null,r,null,()=>{i&&setTimeout(()=>{try{var n,r,o,s;null==i.events.disconnect||i.events.disconnect(),null==(n=i.gl)||null==(r=n.renderLists)||null==r.dispose||r.dispose(),null==(o=i.gl)||null==o.forceContextLoss||o.forceContextLoss(),null!=(s=i.gl)&&s.xr&&i.xr.disconnect(),function(e){e.dispose&&"Scene"!==e.type&&e.dispose();for(const t in e)null==t.dispose||t.dispose(),delete e[t]}(i),ie.delete(e),t&&t(e)}catch(e){}},500)})}}ae.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:i.version});i.unstable_act},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return s}));var r=n(62);function i(e){const t=Object(r.a)().getClient(),n=e||t&&t.getOptions();return!!n&&("tracesSampleRate"in n||"tracesSampler"in n)}function o(e){const t=(e||Object(r.a)()).getScope();return t&&t.getTransaction()}function s(e){return e/1e3}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return a}));var r=n(38);const i=["debug","info","warn","error","log","assert","trace"];function o(e){if(!("console"in r.a))return e();const t=r.a.console,n={};i.forEach(e=>{const r=t[e]&&t[e].__sentry_original__;e in t&&r&&(n[e]=t[e],t[e]=r)});try{return e()}finally{Object.keys(n).forEach(e=>{t[e]=n[e]})}}function s(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1}};return"undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?i.forEach(n=>{t[n]=(...t)=>{e&&o(()=>{r.a.console[n](`Sentry Logger [${n}]:`,...t)})}}):i.forEach(e=>{t[e]=()=>{}}),t}let a;a="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?Object(r.b)("logger",s):s()},function(e,t,n){var r; +/*! + Copyright (c) 2018 Jed Watson. + Licensed under the MIT License (MIT), see + http://jedwatson.github.io/classnames +*/!function(){"use strict";var n={}.hasOwnProperty;function i(){for(var e=[],t=0;tt%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,t,n=0){let r=e.parser.context;return new o(e,[],t,n,n,0,[],0,r?new s(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,t){this.stack.push(this.state,t,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var t;let n=e>>19,r=65535&e,{parser:i}=this.p,o=i.dynamicPrecedence(r);if(o&&(this.score+=o),0==n)return this.pushState(i.getGoto(this.state,r,!0),this.reducePos),r=2e3&&!(null===(t=this.p.parser.nodeSet.types[r])||void 0===t?void 0:t.isAnonymous)&&(a==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=l):this.p.lastBigReductionSizes;)this.stack.pop();this.reduceContext(r,a)}storeNode(e,t,n,r=4,i=!1){if(0==e&&(!this.stack.length||this.stack[this.stack.length-1]0&&0==e.buffer[r-4]&&e.buffer[r-1]>-1){if(t==n)return;if(e.buffer[r-2]>=t)return void(e.buffer[r-2]=n)}}if(i&&this.pos!=n){let i=this.buffer.length;if(i>0&&0!=this.buffer[i-4])for(;i>0&&this.buffer[i-2]>n;)this.buffer[i]=this.buffer[i-4],this.buffer[i+1]=this.buffer[i-3],this.buffer[i+2]=this.buffer[i-2],this.buffer[i+3]=this.buffer[i-1],i-=4,r>4&&(r-=4);this.buffer[i]=e,this.buffer[i+1]=t,this.buffer[i+2]=n,this.buffer[i+3]=r}else this.buffer.push(e,t,n,r)}shift(e,t,n){let r=this.pos;if(131072&e)this.pushState(65535&e,this.pos);else if(0==(262144&e)){let i=e,{parser:o}=this.p;(n>this.pos||t<=o.maxNode)&&(this.pos=n,o.stateFlag(i,1)||(this.reducePos=n)),this.pushState(i,r),this.shiftContext(t,r),t<=o.maxNode&&this.buffer.push(t,r,n,4)}else this.pos=n,this.shiftContext(t,r),t<=this.p.parser.maxNode&&this.buffer.push(t,r,n,4)}apply(e,t,n){65536&e?this.reduce(e):this.shift(e,t,n)}useNode(e,t){let n=this.p.reused.length-1;(n<0||this.p.reused[n]!=e)&&(this.p.reused.push(e),n++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(t,r),this.buffer.push(n,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,t=e.buffer.length;for(;t>0&&e.buffer[t-2]>e.reducePos;)t-=4;let n=e.buffer.slice(t),r=e.bufferBase+t;for(;e&&r==e.bufferBase;)e=e.parent;return new o(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,n,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,t){let n=e<=this.p.parser.maxNode;n&&this.storeNode(e,this.pos,t,4),this.storeNode(0,this.pos,t,n?8:4),this.pos=this.reducePos=t,this.score-=190}canShift(e){for(let t=new a(this);;){let n=this.p.parser.stateSlot(t.state,4)||this.p.parser.hasAction(t.state,e);if(0==n)return!1;if(0==(65536&n))return!0;t.reduce(n)}}recoverByInsert(e){if(this.stack.length>=300)return[];let t=this.p.parser.nextStates(this.state);if(t.length>8||this.stack.length>=120){let n=[];for(let r,i=0;i1&t&&e==r)||n.push(t[e],r)}t=n}let n=[];for(let e=0;e>19,r=65535&e,i=this.stack.length-3*n;if(i<0||t.getGoto(this.stack[i],r,!1)<0)return!1;this.storeNode(0,this.reducePos,this.reducePos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(e),!0}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(3!=this.stack.length)return!1;let{parser:e}=this.p;return 65535==e.data[e.stateSlot(this.state,1)]&&!e.stateSlot(this.state,4)}restart(){this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let t=0;tthis.lookAhead&&(this.emitLookAhead(),this.lookAhead=e)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class s{constructor(e,t){this.tracker=e,this.context=t,this.hash=e.strict?e.hash(t):0}}!function(e){e[e.Insert=200]="Insert",e[e.Delete=190]="Delete",e[e.Reduce=100]="Reduce",e[e.MaxNext=4]="MaxNext",e[e.MaxInsertStackDepth=300]="MaxInsertStackDepth",e[e.DampenInsertStackDepth=120]="DampenInsertStackDepth",e[e.MinBigReduction=2e3]="MinBigReduction"}(r||(r={}));class a{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let t=65535&e,n=e>>19;0==n?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=3*(n-1);let r=this.start.p.parser.getGoto(this.stack[this.base-3],t,!0);this.state=r}}class l{constructor(e,t,n){this.stack=e,this.pos=t,this.index=n,this.buffer=e.buffer,0==this.index&&this.maybeNext()}static create(e,t=e.bufferBase+e.buffer.length){return new l(e,t,t-e.bufferBase)}maybeNext(){let e=this.stack.parent;null!=e&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,0==this.index&&this.maybeNext()}fork(){return new l(this.stack,this.pos,this.index)}}function c(e,t=Uint16Array){if("string"!=typeof e)return e;let n=null;for(let r=0,i=0;r=92&&t--,t>=34&&t--;let i=t-32;if(i>=46&&(i-=46,n=!0),o+=i,n)break;o*=46}n?n[i++]=o:n=new t(o)}return n}class u{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const d=new u;class h{constructor(e,t){this.input=e,this.ranges=t,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=d,this.rangeIndex=0,this.pos=this.chunkPos=t[0].from,this.range=t[0],this.end=t[t.length-1].to,this.readNext()}resolveOffset(e,t){let n=this.range,r=this.rangeIndex,i=this.pos+e;for(;in.to:i>=n.to;){if(r==this.ranges.length-1)return null;let e=this.ranges[++r];i+=e.from-n.to,n=e}return i}clipPos(e){if(e>=this.range.from&&ee)return Math.max(e,t.from);return this.end}peek(e){let t,n,r=this.chunkOff+e;if(r>=0&&r=this.chunk2Pos&&tr.to&&(this.chunk2=this.chunk2.slice(0,r.to-t)),n=this.chunk2.charCodeAt(0)}}return t>=this.token.lookAhead&&(this.token.lookAhead=t+1),n}acceptToken(e,t=0){let n=t?this.resolveOffset(t,-1):this.pos;if(null==n||n=this.chunk2Pos&&this.posthis.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,t){if(t?(this.token=t,t.start=e,t.lookAhead=e+1,t.value=t.extended=-1):this.token=d,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e=this.chunkPos&&t<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,t-this.chunkPos);if(e>=this.chunk2Pos&&t<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,t-this.chunk2Pos);if(e>=this.range.from&&t<=this.range.to)return this.input.read(e,t);let n="";for(let r of this.ranges){if(r.from>=t)break;r.to>e&&(n+=this.input.read(Math.max(r.from,e),Math.min(r.to,t)))}return n}}class p{constructor(e,t){this.data=e,this.id=t}token(e,t){let{parser:n}=t.p;g(this.data,e,t,this.id,n.data,n.tokenPrecTable)}}p.prototype.contextual=p.prototype.fallback=p.prototype.extend=!1;class f{constructor(e,t,n){this.precTable=t,this.elseToken=n,this.data="string"==typeof e?c(e):e}token(e,t){let n=e.pos,r=0;for(;g(this.data,e,t,0,this.data,this.precTable),!(e.token.value>-1);){if(null==this.elseToken)return;if(e.next<0)break;e.advance(),e.reset(e.pos,e.token),r++}r&&(e.reset(n,e.token),e.acceptToken(this.elseToken,r))}}f.prototype.contextual=p.prototype.fallback=p.prototype.extend=!1;class m{constructor(e,t={}){this.token=e,this.contextual=!!t.contextual,this.fallback=!!t.fallback,this.extend=!!t.extend}}function g(e,t,n,r,i,o){let s=0,a=1<0){let n=e[r];if(l.allows(n)&&(-1==t.token.value||t.token.value==n||v(n,t.token.value,i,o))){t.acceptToken(n);break}}let r=t.next,c=0,u=e[s+2];if(!(t.next<0&&u>c&&65535==e[n+3*u-3]&&65535==e[n+3*u-3])){for(;c>1,o=n+i+(i<<1),a=e[o],l=e[o+1]||65536;if(r=l)){s=e[o+2],t.advance();continue e}c=i+1}}break}s=e[n+3*u-1]}}function b(e,t,n){for(let r,i=t;65535!=(r=e[i]);i++)if(r==n)return i-t;return-1}function v(e,t,n,r){let i=b(n,r,t);return i<0||b(n,r,e)t)&&!r.type.isError)return n<0?Math.max(0,Math.min(r.to-1,t-25)):Math.min(e.length,Math.max(r.from+1,t+25));if(n<0?r.prevSibling():r.nextSibling())break;if(!r.parent())return n<0?0:e.length}}!function(e){e[e.Margin=25]="Margin"}(S||(S={}));class k{constructor(e,t){this.fragments=e,this.nodeSet=t,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?w(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?w(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(ee)return this.nextStart=s,null;if(o instanceof i.h){if(s==e){if(s=Math.max(this.safeFrom,e)&&(this.trees.push(o),this.start.push(s),this.index.push(0))}else this.index[t]++,this.nextStart=s+o.length}}}class O{constructor(e,t){this.stream=t,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(e=>new u)}getActions(e){let t=0,n=null,{parser:r}=e.p,{tokenizers:i}=r,o=r.stateSlot(e.state,3),s=e.curContext?e.curContext.hash:0,a=0;for(let r=0;rc.end+25&&(a=Math.max(c.lookAhead,a)),0!=c.value)){let r=t;if(c.extended>-1&&(t=this.addActions(e,c.extended,c.end,t)),t=this.addActions(e,c.value,c.end,t),!l.extend&&(n=c,t>r))break}}for(;this.actions.length>t;)this.actions.pop();return a&&e.setLookAhead(a),n||e.pos!=this.stream.end||(n=new u,n.value=e.p.parser.eofTerm,n.start=n.end=e.pos,t=this.addActions(e,n.value,n.end,t)),this.mainToken=n,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let t=new u,{pos:n,p:r}=e;return t.start=n,t.end=Math.min(n+1,r.stream.end),t.value=n==r.stream.end?r.parser.eofTerm:0,t}updateCachedToken(e,t,n){let r=this.stream.clipPos(n.pos);if(t.token(this.stream.reset(r,e),n),e.value>-1){let{parser:t}=n.p;for(let r=0;r=0&&n.p.parser.dialect.allows(i>>1)){0==(1&i)?e.value=i>>1:e.extended=i>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,t,n,r){for(let t=0;t4*e.bufferLength?new k(n,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e,t,n=this.stacks,r=this.minStackPos,i=this.stacks=[];if(this.bigReductionCount>300&&1==n.length){let[e]=n;for(;e.forceReduce()&&e.stack.length&&e.stack[e.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;or)i.push(s);else{if(this.advanceStack(s,i,n))continue;{e||(e=[],t=[]),e.push(s);let n=this.tokens.getMainToken(s);t.push(n.value,n.end)}}break}}if(!i.length){let t=e&&function(e){let t=null;for(let n of e){let e=n.p.stoppedAt;(n.pos==n.p.stream.end||null!=e&&n.pos>e)&&n.p.parser.stateFlag(n.state,2)&&(!t||t.scorethis.stoppedAt?e[0]:this.runRecovery(e,t,i);if(n)return this.stackToTree(n.forceAll())}if(this.recovering){let e=1==this.recovering?1:3*this.recovering;if(i.length>e)for(i.sort((e,t)=>t.score-e.score);i.length>e;)i.pop();i.some(e=>e.reducePos>r)&&this.recovering--}else if(i.length>1){e:for(let e=0;e500&&r.buffer.length>500){if(!((t.score-r.score||t.buffer.length-r.buffer.length)>0)){i.splice(e--,1);continue e}i.splice(n--,1)}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let e=1;e ":"";if(null!=this.stoppedAt&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let t=e.curContext&&e.curContext.tracker.strict,n=t?e.curContext.hash:0;for(let a=this.fragments.nodeAt(r);a;){let r=this.parser.nodeSet.types[a.type.id]==a.type?o.getGoto(e.state,a.type.id):-1;if(r>-1&&a.length&&(!t||(a.prop(i.c.contextHash)||0)==n))return e.useNode(a,r),y&&console.log(s+this.stackID(e)+` (via reuse of ${o.getName(a.type.id)})`),!0;if(!(a instanceof i.h)||0==a.children.length||a.positions[0]>0)break;let l=a.children[0];if(!(l instanceof i.h&&0==a.positions[0]))break;a=l}}let a=o.stateSlot(e.state,4);if(a>0)return e.reduce(a),y&&console.log(s+this.stackID(e)+` (via always-reduce ${o.getName(65535&a)})`),!0;if(e.stack.length>=15e3)for(;e.stack.length>9e3&&e.forceReduce(););let l=this.tokens.getActions(e);for(let i=0;ir?t.push(h):n.push(h)}return!1}advanceFully(e,t){let n=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>n)return A(e,t),!0}}runRecovery(e,t,n){let r=null,i=!1;for(let o=0;o ":"";if(s.deadEnd){if(i)continue;if(i=!0,s.restart(),y&&console.log(c+this.stackID(s)+" (restarted)"),this.advanceFully(s,n))continue}let u=s.split(),d=c;for(let e=0;u.forceReduce()&&e<10;e++){if(y&&console.log(d+this.stackID(u)+" (via force-reduce)"),this.advanceFully(u,n))break;y&&(d=this.stackID(u)+" -> ")}for(let e of s.recoverByInsert(a))y&&console.log(c+this.stackID(e)+" (via recover-insert)"),this.advanceFully(e,n);this.stream.end>s.pos?(l==s.pos&&(l++,a=0),s.recoverByDelete(a,l),y&&console.log(c+this.stackID(s)+` (via recover-delete ${this.parser.getName(a)})`),A(s,n)):(!r||r.scoree;class M{constructor(e){this.start=e.start,this.shift=e.shift||C,this.reduce=e.reduce||C,this.reuse=e.reuse||C,this.hash=e.hash||(()=>0),this.strict=!1!==e.strict}}class P extends i.g{constructor(e){if(super(),this.wrappers=[],14!=e.version)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let t=e.nodeNames.split(" ");this.minRepeatTerm=t.length;for(let n=0;ne.topRules[t][1]),r=[];for(let e=0;e=0)o(r,e,t[n++]);else{let i=t[n+-r];for(let s=-r;s>0;s--)o(t[n++],e,i);n++}}}this.nodeSet=new i.d(t.map((t,o)=>i.e.define({name:o>=this.minRepeatTerm?void 0:t,id:o,props:r[o],top:n.indexOf(o)>-1,error:0==o,skipped:e.skippedNodes&&e.skippedNodes.indexOf(o)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=i.a;let s=c(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let e=0;e"number"==typeof e?new p(s,e):e),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,t,n){let r=new E(this,e,t,n);for(let i of this.wrappers)r=i(r,e,t,n);return r}getGoto(e,t,n=!1){let r=this.goto;if(t>=r[0])return-1;for(let i=r[t+1];;){let t=r[i++],o=1&t,s=r[i++];if(o&&n)return s;for(let n=i+(t>>1);i0}validAction(e,t){if(t==this.stateSlot(e,4))return!0;for(let n=this.stateSlot(e,1);;n+=3){if(65535==this.data[n]){if(1!=this.data[n+1])return!1;n=$(this.data,n+2)}if(t==$(this.data,n+1))return!0}}nextStates(e){let t=[];for(let n=this.stateSlot(e,1);;n+=3){if(65535==this.data[n]){if(1!=this.data[n+1])break;n=$(this.data,n+2)}if(0==(1&this.data[n+2])){let e=this.data[n+1];t.some((t,n)=>1&n&&t==e)||t.push(this.data[n],e)}}return t}configure(e){let t=Object.assign(Object.create(P.prototype),this);if(e.props&&(t.nodeSet=this.nodeSet.extend(...e.props)),e.top){let n=this.topRules[e.top];if(!n)throw new RangeError("Invalid top rule name "+e.top);t.top=n}return e.tokenizers&&(t.tokenizers=this.tokenizers.map(t=>{let n=e.tokenizers.find(e=>e.from==t);return n?n.to:t})),e.specializers&&(t.specializers=this.specializers.slice(),t.specializerSpecs=this.specializerSpecs.map((n,r)=>{let i=e.specializers.find(e=>e.from==n.external);if(!i)return n;let o=Object.assign(Object.assign({},n),{external:i.to});return t.specializers[r]=R(o),o})),e.contextTracker&&(t.context=e.contextTracker),e.dialect&&(t.dialect=this.parseDialect(e.dialect)),null!=e.strict&&(t.strict=e.strict),e.wrap&&(t.wrappers=t.wrappers.concat(e.wrap)),null!=e.bufferLength&&(t.bufferLength=e.bufferLength),t}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let t=this.dynamicPrecedences;return null==t?0:t[e]||0}parseDialect(e){let t=Object.keys(this.dialects),n=t.map(()=>!1);if(e)for(let r of e.split(" ")){let e=t.indexOf(r);e>=0&&(n[e]=!0)}let r=null;for(let e=0;ee.external(n,r)<<1|t}return e.get}}).call(this,n(36))},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=n(205)},function(e,t,n){"use strict";function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:h(e)?2:p(e)?3:0}function l(e,t){return 2===a(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function c(e,t){return 2===a(e)?e.get(t):e[t]}function u(e,t,n){var r=a(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function d(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function h(e){return U&&e instanceof Map}function p(e){return Q&&e instanceof Set}function f(e){return e.o||e.t}function m(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Y(e);delete t[V];for(var n=X(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=b),Object.freeze(e),t&&s(e,(function(e,t){return g(t,!0)}),!0)),e}function b(){r(2)}function v(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function y(e){var t=Z[e];return t||r(18,e),t}function _(e,t){Z[e]||(Z[e]=t)}function S(){return F}function x(e,t){t&&(y("Patches"),e.u=[],e.s=[],e.v=t)}function w(e){k(e),e.p.forEach(E),e.p=null}function k(e){e===F&&(F=e.l)}function O(e){return F={p:[],l:F,h:e,m:!0,_:0}}function E(e){var t=e[V];0===t.i||1===t.i?t.j():t.g=!0}function A(e,t){t._=t.p.length;var n=t.p[0],i=void 0!==e&&e!==n;return t.h.O||y("ES5").S(t,e,i),i?(n[V].P&&(w(t),r(4)),o(e)&&(e=T(t,e),t.l||M(t,e)),t.u&&y("Patches").M(n[V].t,e,t.u,t.s)):e=T(t,n,[]),w(t),t.u&&t.v(t.u,t.s),e!==H?e:void 0}function T(e,t,n){if(v(t))return t;var r=t[V];if(!r)return s(t,(function(i,o){return C(e,r,t,i,o,n)}),!0),t;if(r.A!==e)return t;if(!r.P)return M(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=m(r.k):r.o,o=i,a=!1;3===r.i&&(o=new Set(i),i.clear(),a=!0),s(o,(function(t,o){return C(e,r,i,t,o,n,a)})),M(e,i,!1),n&&e.u&&y("Patches").N(r,n,e.u,e.s)}return r.o}function C(e,t,n,r,s,a,c){if(i(s)){var d=T(e,s,a&&t&&3!==t.i&&!l(t.R,r)?a.concat(r):void 0);if(u(n,r,d),!i(d))return;e.m=!1}else c&&n.add(s);if(o(s)&&!v(s)){if(!e.h.D&&e._<1)return;T(e,s),t&&t.A.l||M(e,s)}}function M(e,t,n){void 0===n&&(n=!1),!e.l&&e.h.D&&e.m&&g(t,n)}function P(e,t){var n=e[V];return(n?f(n):e)[t]}function $(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function R(e){e.P||(e.P=!0,e.l&&R(e.l))}function I(e){e.o||(e.o=m(e.t))}function D(e,t,n){var r=h(t)?y("MapSet").F(t,n):p(t)?y("MapSet").T(t,n):e.O?function(e,t){var n=Array.isArray(e),r={i:n?1:0,A:t?t.A:S(),P:!1,I:!1,R:{},l:t,t:e,k:null,o:null,j:null,C:!1},i=r,o=J;n&&(i=[r],o=K);var s=Proxy.revocable(i,o),a=s.revoke,l=s.proxy;return r.k=l,r.j=a,l}(t,n):y("ES5").J(t,n);return(n?n.A:S()).p.push(r),r}function N(e){return i(e)||r(22,e),function e(t){if(!o(t))return t;var n,r=t[V],i=a(t);if(r){if(!r.P&&(r.i<4||!y("ES5").K(r)))return r.t;r.I=!0,n=j(t,i),r.I=!1}else n=j(t,i);return s(n,(function(t,i){r&&c(r.t,t)===i||u(n,t,e(i))})),3===i?new Set(n):n}(e)}function j(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return m(e)}function L(){function e(e,t){var n=o[e];return n?n.enumerable=t:o[e]=n={configurable:!0,enumerable:t,get:function(){var t=this[V];return J.get(t,e)},set:function(t){var n=this[V];J.set(n,e,t)}},n}function t(e){for(var t=e.length-1;t>=0;t--){var i=e[t][V];if(!i.P)switch(i.i){case 5:r(i)&&R(i);break;case 4:n(i)&&R(i)}}}function n(e){for(var t=e.t,n=e.k,r=X(n),i=r.length-1;i>=0;i--){var o=r[i];if(o!==V){var s=t[o];if(void 0===s&&!l(t,o))return!0;var a=n[o],c=a&&a[V];if(c?c.t!==s:!d(a,s))return!0}}var u=!!t[V];return r.length!==X(t).length+(u?0:1)}function r(e){var t=e.k;if(t.length!==e.t.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);if(n&&!n.get)return!0;for(var r=0;r1?r-1:0),o=1;o1?r-1:0),o=1;o=0;n--){var r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));var o=y("Patches").$;return i(e)?o(e,t):this.produce(e,(function(e){return o(e,t)}))},e}()),te=ee.produce;ee.produceWithPatches.bind(ee),ee.setAutoFreeze.bind(ee),ee.setUseProxies.bind(ee),ee.applyPatches.bind(ee),ee.createDraft.bind(ee),ee.finishDraft.bind(ee);t.b=te},function(e,t,n){var r;r=e=>(()=>{var t={"./node_modules/css-mediaquery/index.js": +/*!**********************************************!*\ + !*** ./node_modules/css-mediaquery/index.js ***! + \**********************************************/(e,t)=>{"use strict";t.match=function(e,t){return a(e).some((function(e){var n=e.inverse,r="all"===e.type||t.type===e.type;if(r&&n||!r&&!n)return!1;var i=e.expressions.every((function(e){var n=e.feature,r=e.modifier,i=e.value,o=t[n];if(!o)return!1;switch(n){case"orientation":case"scan":return o.toLowerCase()===i.toLowerCase();case"width":case"height":case"device-width":case"device-height":i=u(i),o=u(o);break;case"resolution":i=c(i),o=c(o);break;case"aspect-ratio":case"device-aspect-ratio":case"device-pixel-ratio":i=l(i),o=l(o);break;case"grid":case"color":case"color-index":case"monochrome":i=parseInt(i,10)||1,o=parseInt(o,10)||0}switch(r){case"min":return o>=i;case"max":return o<=i;default:return o===i}}));return i&&!n||!i&&n}))},t.parse=a;var n=/(?:(only|not)?\s*([^\s\(\)]+)(?:\s*and)?\s*)?(.+)?/i,r=/\(\s*([^\s\:\)]+)\s*(?:\:\s*([^\s\)]+))?\s*\)/,i=/^(?:(min|max)-)?(.+)/,o=/(em|rem|px|cm|mm|in|pt|pc)?$/,s=/(dpi|dpcm|dppx)?$/;function a(e){return e.split(",").map((function(e){var t=(e=e.trim()).match(n),o=t[1],s=t[2],a=t[3]||"",l={};return l.inverse=!!o&&"not"===o.toLowerCase(),l.type=s?s.toLowerCase():"all",a=a.match(/\([^\)]+\)/g)||[],l.expressions=a.map((function(e){var t=e.match(r),n=t[1].toLowerCase().match(i);return{modifier:n[1],feature:n[2],value:t[2]}})),l}))}function l(e){var t,n=Number(e);return n||(n=(t=e.match(/^(\d+)\s*\/\s*(\d+)$/))[1]/t[2]),n}function c(e){var t=parseFloat(e);switch(String(e).match(s)[1]){case"dpcm":return t/2.54;case"dppx":return 96*t;default:return t}}function u(e){var t=parseFloat(e);switch(String(e).match(o)[1]){case"em":case"rem":return 16*t;case"cm":return 96*t/2.54;case"mm":return 96*t/2.54/10;case"in":return 96*t;case"pt":return 72*t;case"pc":return 72*t/12;default:return t}}},"./node_modules/hyphenate-style-name/index.js": +/*!****************************************************!*\ + !*** ./node_modules/hyphenate-style-name/index.js ***! + \****************************************************/(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>a});var r=/[A-Z]/g,i=/^ms-/,o={};function s(e){return"-"+e.toLowerCase()}const a=function(e){if(o.hasOwnProperty(e))return o[e];var t=e.replace(r,s);return o[e]=i.test(t)?"-"+t:t}},"./node_modules/matchmediaquery/index.js": +/*!***********************************************!*\ + !*** ./node_modules/matchmediaquery/index.js ***! + \***********************************************/(e,t,n)=>{"use strict";var r=n(/*! css-mediaquery */"./node_modules/css-mediaquery/index.js").match,i="undefined"!=typeof window?window.matchMedia:null;function o(e,t,n){var o=this;if(i&&!n){var s=i.call(window,e);this.matches=s.matches,this.media=s.media,s.addListener(a)}else this.matches=r(e,t),this.media=e;function a(e){o.matches=e.matches,o.media=e.media}this.addListener=function(e){s&&s.addListener(e)},this.removeListener=function(e){s&&s.removeListener(e)},this.dispose=function(){s&&s.removeListener(a)}}e.exports=function(e,t,n){return new o(e,t,n)}},"./node_modules/object-assign/index.js": +/*!*********************************************!*\ + !*** ./node_modules/object-assign/index.js ***! + \*********************************************/e=>{"use strict"; +/* +object-assign +(c) Sindre Sorhus +@license MIT +*/var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function i(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,o){for(var s,a,l=i(e),c=1;c{"use strict";var r=function(){},i=n(/*! ./lib/ReactPropTypesSecret */"./node_modules/prop-types/lib/ReactPropTypesSecret.js"),o={},s=n(/*! ./lib/has */"./node_modules/prop-types/lib/has.js");function a(e,t,n,a,l){for(var c in e)if(s(e,c)){var u;try{if("function"!=typeof e[c]){var d=Error((a||"React class")+": "+n+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw d.name="Invariant Violation",d}u=e[c](t,c,a,n,null,i)}catch(e){u=e}if(!u||u instanceof Error||r((a||"React class")+": type specification of "+n+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof u+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),u instanceof Error&&!(u.message in o)){o[u.message]=!0;var h=l?l():"";r("Failed "+n+" type: "+u.message+(null!=h?h:""))}}}r=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}},a.resetWarningCache=function(){o={}},e.exports=a},"./node_modules/prop-types/factoryWithTypeCheckers.js": +/*!************************************************************!*\ + !*** ./node_modules/prop-types/factoryWithTypeCheckers.js ***! + \************************************************************/(e,t,n)=>{"use strict";var r=n(/*! react-is */"./node_modules/react-is/index.js"),i=n(/*! object-assign */"./node_modules/object-assign/index.js"),o=n(/*! ./lib/ReactPropTypesSecret */"./node_modules/prop-types/lib/ReactPropTypesSecret.js"),s=n(/*! ./lib/has */"./node_modules/prop-types/lib/has.js"),a=n(/*! ./checkPropTypes */"./node_modules/prop-types/checkPropTypes.js"),l=function(){};function c(){return null}l=function(e){var t="Warning: "+e;"undefined"!=typeof console&&console.error(t);try{throw new Error(t)}catch(e){}},e.exports=function(e,t){var n="function"==typeof Symbol&&Symbol.iterator,u={array:f("array"),bigint:f("bigint"),bool:f("boolean"),func:f("function"),number:f("number"),object:f("object"),string:f("string"),symbol:f("symbol"),any:p(c),arrayOf:function(e){return p((function(t,n,r,i,s){if("function"!=typeof e)return new h("Property `"+s+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var a=t[n];if(!Array.isArray(a))return new h("Invalid "+i+" `"+s+"` of type `"+b(a)+"` supplied to `"+r+"`, expected an array.");for(var l=0;l>";return new h("Invalid "+i+" `"+o+"` of type `"+(((a=t[n]).constructor&&a.constructor.name?a.constructor.name:"<>")+"` supplied to `")+r+"`, expected instance of `"+s+"`.")}var a;return null}))},node:p((function(e,t,n,r,i){return g(e[t])?null:new h("Invalid "+r+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return p((function(t,n,r,i,a){if("function"!=typeof e)return new h("Property `"+a+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var l=t[n],c=b(l);if("object"!==c)return new h("Invalid "+i+" `"+a+"` of type `"+c+"` supplied to `"+r+"`, expected an object.");for(var u in l)if(s(l,u)){var d=e(l,u,r,i,a+"."+u,o);if(d instanceof Error)return d}return null}))},oneOf:function(e){if(!Array.isArray(e))return l(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),c;function t(t,n,r,i,o){for(var s=t[n],a=0;a0?", expected one of type ["+l.join(", ")+"]":"")+".")}))},shape:function(e){return p((function(t,n,r,i,s){var a=t[n],l=b(a);if("object"!==l)return new h("Invalid "+i+" `"+s+"` of type `"+l+"` supplied to `"+r+"`, expected `object`.");for(var c in e){var u=e[c];if("function"!=typeof u)return m(r,i,s,c,v(u));var d=u(a,c,r,i,s+"."+c,o);if(d)return d}return null}))},exact:function(e){return p((function(t,n,r,a,l){var c=t[n],u=b(c);if("object"!==u)return new h("Invalid "+a+" `"+l+"` of type `"+u+"` supplied to `"+r+"`, expected `object`.");var d=i({},t[n],e);for(var p in d){var f=e[p];if(s(e,p)&&"function"!=typeof f)return m(r,a,l,p,v(f));if(!f)return new h("Invalid "+a+" `"+l+"` key `"+p+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var g=f(c,p,r,a,l+"."+p,o);if(g)return g}return null}))}};function d(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function h(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function p(e){var n={},r=0;function i(i,s,a,c,u,d,p){if(c=c||"<>",d=d||a,p!==o){if(t){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}if("undefined"!=typeof console){var m=c+":"+a;!n[m]&&r<3&&(l("You are manually calling a React.PropTypes validation function for the `"+d+"` prop on `"+c+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),n[m]=!0,r++)}}return null==s[a]?i?null===s[a]?new h("The "+u+" `"+d+"` is marked as required in `"+c+"`, but its value is `null`."):new h("The "+u+" `"+d+"` is marked as required in `"+c+"`, but its value is `undefined`."):null:e(s,a,c,u,d)}var s=i.bind(null,!1);return s.isRequired=i.bind(null,!0),s}function f(e){return p((function(t,n,r,i,o,s){var a=t[n];return b(a)!==e?new h("Invalid "+i+" `"+o+"` of type `"+v(a)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function m(e,t,n,r,i){return new h((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+i+"`.")}function g(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(g);if(null===t||e(t))return!0;var r=function(e){var t=e&&(n&&e[n]||e["@@iterator"]);if("function"==typeof t)return t}(t);if(!r)return!1;var i,o=r.call(t);if(r!==t.entries){for(;!(i=o.next()).done;)if(!g(i.value))return!1}else for(;!(i=o.next()).done;){var s=i.value;if(s&&!g(s[1]))return!1}return!0;default:return!1}}function b(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function v(e){if(null==e)return""+e;var t=b(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function y(e){var t=v(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return h.prototype=Error.prototype,u.checkPropTypes=a,u.resetWarningCache=a.resetWarningCache,u.PropTypes=u,u}},"./node_modules/prop-types/index.js": +/*!******************************************!*\ + !*** ./node_modules/prop-types/index.js ***! + \******************************************/(e,t,n)=>{var r=n(/*! react-is */"./node_modules/react-is/index.js");e.exports=n(/*! ./factoryWithTypeCheckers */"./node_modules/prop-types/factoryWithTypeCheckers.js")(r.isElement,!0)},"./node_modules/prop-types/lib/ReactPropTypesSecret.js": +/*!*************************************************************!*\ + !*** ./node_modules/prop-types/lib/ReactPropTypesSecret.js ***! + \*************************************************************/e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},"./node_modules/prop-types/lib/has.js": +/*!********************************************!*\ + !*** ./node_modules/prop-types/lib/has.js ***! + \********************************************/e=>{e.exports=Function.call.bind(Object.prototype.hasOwnProperty)},"./node_modules/react-is/cjs/react-is.development.js": +/*!***********************************************************!*\ + !*** ./node_modules/react-is/cjs/react-is.development.js ***! + \***********************************************************/(e,t)=>{"use strict"; +/** @license React v16.13.1 + * react-is.development.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */!function(){var e="function"==typeof Symbol&&Symbol.for,n=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,i=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,s=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,l=e?Symbol.for("react.context"):60110,c=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,d=e?Symbol.for("react.forward_ref"):60112,h=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,f=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,g=e?Symbol.for("react.block"):60121,b=e?Symbol.for("react.fundamental"):60117,v=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function _(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:var p=e.type;switch(p){case c:case u:case i:case s:case o:case h:return p;default:var g=p&&p.$$typeof;switch(g){case l:case d:case m:case f:case a:return g;default:return t}}case r:return t}}}var S=c,x=u,w=l,k=a,O=n,E=d,A=i,T=m,C=f,M=r,P=s,$=o,R=h,I=!1;function D(e){return _(e)===u}t.AsyncMode=S,t.ConcurrentMode=x,t.ContextConsumer=w,t.ContextProvider=k,t.Element=O,t.ForwardRef=E,t.Fragment=A,t.Lazy=T,t.Memo=C,t.Portal=M,t.Profiler=P,t.StrictMode=$,t.Suspense=R,t.isAsyncMode=function(e){return I||(I=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),D(e)||_(e)===c},t.isConcurrentMode=D,t.isContextConsumer=function(e){return _(e)===l},t.isContextProvider=function(e){return _(e)===a},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return _(e)===d},t.isFragment=function(e){return _(e)===i},t.isLazy=function(e){return _(e)===m},t.isMemo=function(e){return _(e)===f},t.isPortal=function(e){return _(e)===r},t.isProfiler=function(e){return _(e)===s},t.isStrictMode=function(e){return _(e)===o},t.isSuspense=function(e){return _(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===i||e===u||e===s||e===o||e===h||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===f||e.$$typeof===a||e.$$typeof===l||e.$$typeof===d||e.$$typeof===b||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},t.typeOf=_}()},"./node_modules/react-is/index.js": +/*!****************************************!*\ + !*** ./node_modules/react-is/index.js ***! + \****************************************/(e,t,n)=>{"use strict";e.exports=n(/*! ./cjs/react-is.development.js */"./node_modules/react-is/cjs/react-is.development.js")},"./node_modules/shallow-equal/dist/index.esm.js": +/*!******************************************************!*\ + !*** ./node_modules/shallow-equal/dist/index.esm.js ***! + \******************************************************/(e,t,n)=>{"use strict";function r(e,t){if(e===t)return!0;if(!e||!t)return!1;var n=Object.keys(e),r=Object.keys(t),i=n.length;if(r.length!==i)return!1;for(var o=0;oi,shallowEqualObjects:()=>r})},"./src/Component.ts": +/*!**************************!*\ + !*** ./src/Component.ts ***! + \**************************/function(e,t,n){"use strict";var r=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(0,n(/*! react */"react").createContext)(void 0);t.default=r},"./src/index.ts": +/*!**********************!*\ + !*** ./src/index.ts ***! + \**********************/function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Context=t.toQuery=t.useMediaQuery=t.default=void 0;var i=r(n(/*! ./useMediaQuery */"./src/useMediaQuery.ts"));t.useMediaQuery=i.default;var o=r(n(/*! ./Component */"./src/Component.ts"));t.default=o.default;var s=r(n(/*! ./toQuery */"./src/toQuery.ts"));t.toQuery=s.default;var a=r(n(/*! ./Context */"./src/Context.ts"));t.Context=a.default},"./src/mediaQuery.ts": +/*!***************************!*\ + !*** ./src/mediaQuery.ts ***! + \***************************/function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n{"use strict";t.exports=e}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var o=n[e]={exports:{}};return t[e].call(o.exports,o,o.exports,r),o.exports}return r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r("./src/index.ts")})(),e.exports=r(n(0))},function(e,t,n){"use strict";e.exports=n(394)},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return s})),n.d(t,"c",(function(){return i}));n(7);var r=n(17);n(50);function i(e,t,n){if(!(t in e))return;const r=e[t],i=n(r);if("function"==typeof i)try{!function(e,t){const n=t.prototype||{};e.prototype=t.prototype=n,o(e,"__sentry_original__",t)}(i,r)}catch(e){}e[t]=i}function o(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}function s(e){return function e(t,n){if(Object(r.f)(t)){const r=n.get(t);if(void 0!==r)return r;const i={};n.set(t,i);for(const r of Object.keys(t))void 0!==t[r]&&(i[r]=e(t[r],n));return i}if(Array.isArray(t)){const r=n.get(t);if(void 0!==r)return r;const i=[];return n.set(t,i),t.forEach(t=>{i.push(e(t,n))}),i}return t}(e,new Map)}},,function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return g})),n.d(t,"b",(function(){return f})),n.d(t,"c",(function(){return h})),n.d(t,"d",(function(){return m})),n.d(t,"e",(function(){return d}));var r=n(5);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function d(e){if(Object(i.d)(e))return{message:e.message,name:e.name,stack:e.stack,...p(e)};if(Object(i.f)(e)){const t={type:e.type,target:h(e.target),currentTarget:h(e.currentTarget),...p(e)};return"undefined"!=typeof CustomEvent&&Object(i.g)(e,CustomEvent)&&(t.detail=e.detail),t}return e}function h(e){try{return Object(i.c)(e)?Object(r.c)(e):Object.prototype.toString.call(e)}catch(e){return""}}function p(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function f(e,t=40){const n=Object.keys(d(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return Object(o.d)(n[0],t);for(let e=n.length;e>0;e--){const r=n.slice(0,e).join(", ");if(!(r.length>t))return e===n.length?r:Object(o.d)(r,t)}return""}function m(e){return function e(t,n){if(Object(i.i)(t)){const r=n.get(t);if(void 0!==r)return r;const i={};n.set(t,i);for(const r of Object.keys(t))void 0!==t[r]&&(i[r]=e(t[r],n));return i}if(Array.isArray(t)){const r=n.get(t);if(void 0!==r)return r;const i=[];return n.set(t,i),t.forEach(t=>{i.push(e(t,n))}),i}return t}(e,new Map)}},function(e,t,n){e.exports=n(353)()},function(e,t,n){var r=n(153);e.exports=function(e,t,n){return(t=r(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";var r=n(119),i=Object.prototype.toString;function o(e){return"[object Array]"===i.call(e)}function s(e){return void 0===e}function a(e){return null!==e&&"object"==typeof e}function l(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function c(e){return"[object Function]"===i.call(e)}function u(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),o(e))for(var n=0,r=e.length;n0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var r=n(130),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},function(e,t){function n(t){return e.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t){var n,r,i=e.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var l,c=[],u=!1,d=-1;function h(){u&&l&&(u=!1,l.length?c=l.concat(c):d=-1,c.length&&p())}function p(){if(!u){var e=a(h);u=!0;for(var t=c.length;t;){for(l=c,c=[];++d1)for(var n=1;nthis._maxlen?e.spanRecorder=void 0:this.spans.push(e)}}class c{__init2(){this.traceId=Object(i.b)()}__init3(){this.spanId=Object(i.b)().substring(16)}__init4(){this.startTimestamp=Object(o.d)()}__init5(){this.tags={}}__init6(){this.data={}}constructor(e){if(c.prototype.__init2.call(this),c.prototype.__init3.call(this),c.prototype.__init4.call(this),c.prototype.__init5.call(this),c.prototype.__init6.call(this),!e)return this;e.traceId&&(this.traceId=e.traceId),e.spanId&&(this.spanId=e.spanId),e.parentSpanId&&(this.parentSpanId=e.parentSpanId),"sampled"in e&&(this.sampled=e.sampled),e.op&&(this.op=e.op),e.description&&(this.description=e.description),e.data&&(this.data=e.data),e.tags&&(this.tags=e.tags),e.status&&(this.status=e.status),e.startTimestamp&&(this.startTimestamp=e.startTimestamp),e.endTimestamp&&(this.endTimestamp=e.endTimestamp)}startChild(e){const t=new c({...e,parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId});if(t.spanRecorder=this.spanRecorder,t.spanRecorder&&t.spanRecorder.add(t),t.transaction=this.transaction,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&t.transaction){const n=`[Tracing] Starting '${e&&e.op||"< unknown op >"}' span on transaction '${t.transaction.name||"< unknown name >"}' (${t.transaction.spanId}).`;t.transaction.metadata.spanMetadata[t.spanId]={logMessage:n},s.c.log(n)}return t}setTag(e,t){return this.tags={...this.tags,[e]:t},this}setData(e,t){return this.data={...this.data,[e]:t},this}setStatus(e){return this.status=e,this}setHttpStatus(e){this.setTag("http.status_code",String(e));const t=function(e){if(e<400&&e>=100)return"ok";if(e>=400&&e<500)switch(e){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(e>=500&&e<600)switch(e){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}(e);return"unknown_error"!==t&&this.setStatus(t),this}isSuccess(){return"ok"===this.status}finish(e){if(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&this.transaction&&this.transaction.spanId!==this.spanId){const{logMessage:e}=this.transaction.metadata.spanMetadata[this.spanId];e&&s.c.log(e.replace("Starting","Finishing"))}this.endTimestamp="number"==typeof e?e:Object(o.d)()}toTraceparent(){let e="";return void 0!==this.sampled&&(e=this.sampled?"-1":"-0"),`${this.traceId}-${this.spanId}${e}`}toContext(){return Object(a.b)({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})}updateWithContext(e){return this.data=Object(r.a)(e.data,()=>({})),this.description=e.description,this.endTimestamp=e.endTimestamp,this.op=e.op,this.parentSpanId=e.parentSpanId,this.sampled=e.sampled,this.spanId=Object(r.a)(e.spanId,()=>this.spanId),this.startTimestamp=Object(r.a)(e.startTimestamp,()=>this.startTimestamp),this.status=e.status,this.tags=Object(r.a)(e.tags,()=>({})),this.traceId=Object(r.a)(e.traceId,()=>this.traceId),this}getTraceContext(){return Object(a.b)({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})}toJSON(){return Object(a.b)({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId})}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return c})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return d}));var r=n(60),i=n(11),o=n(42),s=n(54);const a=1e3,l=3e4,c=5e3;class u extends o.b{constructor(e,t,n,r){super(r),this._pushActivity=e,this._popActivity=t,this.transactionSpanId=n}add(e){e.spanId!==this.transactionSpanId&&(e.finish=t=>{e.endTimestamp="number"==typeof t?t:Object(r.d)(),this._popActivity(e.spanId)},void 0===e.endTimestamp&&this._pushActivity(e.spanId)),super.add(e)}}class d extends s.a{__init(){this.activities={}}__init2(){this._heartbeatCounter=0}__init3(){this._finished=!1}__init4(){this._beforeFinishCallbacks=[]}constructor(e,t,n=a,r=l,o=c,s=!1){super(e,t),this._idleHub=t,this._idleTimeout=n,this._finalTimeout=r,this._heartbeatInterval=o,this._onScope=s,d.prototype.__init.call(this),d.prototype.__init2.call(this),d.prototype.__init3.call(this),d.prototype.__init4.call(this),s&&(h(t),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.c.log("Setting idle transaction on scope. Span ID: "+this.spanId),t.configureScope(e=>e.setSpan(this))),this._startIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this.finish())},this._finalTimeout)}finish(e=Object(r.d)()){if(this._finished=!0,this.activities={},this.spanRecorder){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.c.log("[Tracing] finishing IdleTransaction",new Date(1e3*e).toISOString(),this.op);for(const t of this._beforeFinishCallbacks)t(this,e);this.spanRecorder.spans=this.spanRecorder.spans.filter(t=>{if(t.spanId===this.spanId)return!0;t.endTimestamp||(t.endTimestamp=e,t.setStatus("cancelled"),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.c.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(t,void 0,2)));const n=t.startTimestamp{this._finished||this._pushActivity(e)},n=e=>{this._finished||this._popActivity(e)};this.spanRecorder=new u(t,n,this.spanId,e),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.c.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}_cancelIdleTimeout(){this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0)}_startIdleTimeout(e){this._cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{this._finished||0!==Object.keys(this.activities).length||this.finish(e)},this._idleTimeout)}_pushActivity(e){this._cancelIdleTimeout(),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.c.log("[Tracing] pushActivity: "+e),this.activities[e]=!0,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.c.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(e){if(this.activities[e]&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.c.log("[Tracing] popActivity "+e),delete this.activities[e],("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.c.log("[Tracing] new activities count",Object.keys(this.activities).length)),0===Object.keys(this.activities).length){const e=Object(r.d)()+this._idleTimeout/1e3;this._startIdleTimeout(e)}}_beat(){if(this._finished)return;const e=Object.keys(this.activities).join("");e===this._prevHeartbeatString?this._heartbeatCounter+=1:this._heartbeatCounter=1,this._prevHeartbeatString=e,this._heartbeatCounter>=3?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.c.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this.finish()):this._pingHeartbeat()}_pingHeartbeat(){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.c.log("pinging Heartbeat -> current counter: "+this._heartbeatCounter),setTimeout(()=>{this._beat()},this._heartbeatInterval)}}function h(e){const t=e.getScope();if(t){t.getTransaction()&&t.setSpan(void 0)}}},function(e,t,n){"use strict";e.exports=n(350)},function(e,t,n){var r=n(247),i=n(252);e.exports=function(e,t){var n=i(e,t);return r(n)?n:void 0}},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";n.d(t,"a",(function(){return P}));var r=n(9),i=n(15),o=n(0),s=n(1),a=n(112),l=n.n(a);function c(e){let{debounce:t,scroll:n,polyfill:r,offsetSize:i}=void 0===e?{debounce:0,scroll:!1,offsetSize:!1}:e;const s=r||("undefined"==typeof window?class{}:window.ResizeObserver);if(!s)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[a,c]=Object(o.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),u=Object(o.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a}),h=t?"number"==typeof t?t:t.scroll:null,p=t?"number"==typeof t?t:t.resize:null,f=Object(o.useRef)(!1);Object(o.useEffect)(()=>(f.current=!0,()=>{f.current=!1}));const[m,g,b]=Object(o.useMemo)(()=>{const e=()=>{if(!u.current.element)return;const{left:e,top:t,width:n,height:r,bottom:o,right:s,x:a,y:l}=u.current.element.getBoundingClientRect(),h={left:e,top:t,width:n,height:r,bottom:o,right:s,x:a,y:l};u.current.element instanceof HTMLElement&&i&&(h.height=u.current.element.offsetHeight,h.width=u.current.element.offsetWidth),Object.freeze(h),f.current&&!d(u.current.lastBounds,h)&&c(u.current.lastBounds=h)};return[e,p?l()(e,p):e,h?l()(e,h):e]},[c,i,h,p]);function v(){u.current.scrollContainers&&(u.current.scrollContainers.forEach(e=>e.removeEventListener("scroll",b,!0)),u.current.scrollContainers=null),u.current.resizeObserver&&(u.current.resizeObserver.disconnect(),u.current.resizeObserver=null)}function y(){u.current.element&&(u.current.resizeObserver=new s(b),u.current.resizeObserver.observe(u.current.element),n&&u.current.scrollContainers&&u.current.scrollContainers.forEach(e=>e.addEventListener("scroll",b,{capture:!0,passive:!0})))}var _,S,x;return _=b,S=Boolean(n),Object(o.useEffect)(()=>{if(S){const e=_;return window.addEventListener("scroll",e,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",e,!0)}}},[_,S]),x=g,Object(o.useEffect)(()=>{const e=x;return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[x]),Object(o.useEffect)(()=>{v(),y()},[n,b,g]),Object(o.useEffect)(()=>v,[]),[e=>{e&&e!==u.current.element&&(v(),u.current.element=e,u.current.scrollContainers=function e(t){const n=[];if(!t||t===document.body)return n;const{overflow:r,overflowX:i,overflowY:o}=window.getComputedStyle(t);[r,i,o].some(e=>"auto"===e||"scroll"===e)&&n.push(t);return[...n,...e(t.parentElement)]}(e),y())},a,m]}const u=["x","y","top","bottom","left","right","width","height"],d=(e,t)=>u.every(n=>e[n]===t[n]);var h=Object.defineProperty,p=Object.defineProperties,f=Object.getOwnPropertyDescriptors,m=Object.getOwnPropertySymbols,g=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable,v=(e,t,n)=>t in e?h(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,y=(e,t)=>{for(var n in t||(t={}))g.call(t,n)&&v(e,n,t[n]);if(m)for(var n of m(t))b.call(t,n)&&v(e,n,t[n]);return e};function _(e,t,n){if(!e)return;if(!0===n(e))return e;let r=t?e.return:e.child;for(;r;){const e=_(r,t,n);if(e)return e;r=t?null:r.sibling}}function S(e){try{return Object.defineProperties(e,{_currentRenderer:{get:()=>null,set(){}},_currentRenderer2:{get:()=>null,set(){}}})}catch(t){return e}}const x=S(o.createContext(null));class w extends o.Component{render(){return o.createElement(x.Provider,{value:this._reactInternals},this.props.children)}}const{ReactCurrentOwner:k,ReactCurrentDispatcher:O}=o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function E(){const e=o.useContext(x);if(null===e)throw new Error("its-fine: useFiber must be called within a !");const t=o.useId();return o.useMemo(()=>{for(const n of[null==k?void 0:k.current,e,null==e?void 0:e.alternate]){if(!n)continue;const e=_(n,!1,e=>{let n=e.memoizedState;for(;n;){if(n.memoizedState===t)return!0;n=n.next}});if(e)return e}},[e,t])}function A(){const e=function(){var e,t;const n=E(),[r]=o.useState(()=>new Map);r.clear();let i=n;for(;i;){const n=null==(e=i.type)?void 0:e._context;n&&n!==x&&!r.has(n)&&r.set(n,null==(t=null==O?void 0:O.current)?void 0:t.readContext(S(n))),i=i.return}return r}();return o.useMemo(()=>Array.from(e.keys()).reduce((t,n)=>r=>{return o.createElement(t,null,o.createElement(n.Provider,(i=y({},r),s={value:e.get(n)},p(i,f(s)))));var i,s},e=>o.createElement(w,y({},e))),[e])}n(44),n(109),n(70);const T={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function C(e){const{handlePointer:t}=Object(r.g)(e);return{priority:1,enabled:!0,compute(e,t,n){t.pointer.set(e.offsetX/t.size.width*2-1,-e.offsetY/t.size.height*2+1),t.raycaster.setFromCamera(t.pointer,t.camera)},connected:void 0,handlers:Object.keys(T).reduce((e,n)=>({...e,[n]:t(n)}),{}),update:()=>{var t;const{events:n,internal:r}=e.getState();null!=(t=r.lastEvent)&&t.current&&n.handlers&&n.handlers.onPointerMove(r.lastEvent.current)},connect:t=>{var n;const{set:r,events:i}=e.getState();null==i.disconnect||i.disconnect(),r(e=>({events:{...e.events,connected:t}})),Object.entries(null!=(n=i.handlers)?n:[]).forEach(([e,n])=>{const[r,i]=T[e];t.addEventListener(r,n,{passive:i})})},disconnect:()=>{const{set:t,events:n}=e.getState();var r;n.connected&&(Object.entries(null!=(r=n.handlers)?r:[]).forEach(([e,t])=>{if(n&&n.connected instanceof HTMLElement){const[r]=T[e];n.connected.removeEventListener(r,t)}}),t(e=>({events:{...e.events,connected:void 0}})))}}}const M=o.forwardRef((function({children:e,fallback:t,resize:n,style:a,gl:l,events:u=C,eventSource:d,eventPrefix:h,shadows:p,linear:f,flat:m,legacy:g,orthographic:b,frameloop:v,dpr:y,performance:_,raycaster:S,camera:x,onPointerMissed:w,onCreated:k,...O},E){o.useMemo(()=>Object(r.i)(s),[]);const T=A(),[M,P]=c({scroll:!0,debounce:{scroll:50,resize:0},...n}),$=o.useRef(null),R=o.useRef(null);o.useImperativeHandle(E,()=>$.current);const I=Object(r.l)(w),[D,N]=o.useState(!1),[j,L]=o.useState(!1);if(D)throw D;if(j)throw j;const B=o.useRef(null);Object(r.e)(()=>{const t=$.current;P.width>0&&P.height>0&&t&&(B.current||(B.current=Object(r.f)(t)),B.current.configure({gl:l,events:u,shadows:p,linear:f,flat:m,legacy:g,orthographic:b,frameloop:v,dpr:y,performance:_,raycaster:S,camera:x,size:P,onPointerMissed:(...e)=>null==I.current?void 0:I.current(...e),onCreated:e=>{null==e.events.connect||e.events.connect(d?Object(r.j)(d)?d.current:d:R.current),h&&e.setEvents({compute:(e,t)=>{const n=e[h+"X"],r=e[h+"Y"];t.pointer.set(n/t.size.width*2-1,-r/t.size.height*2+1),t.raycaster.setFromCamera(t.pointer,t.camera)}}),null==k||k(e)}}),B.current.render(o.createElement(T,null,o.createElement(r.d,{set:L},o.createElement(o.Suspense,{fallback:o.createElement(r.b,{set:N})},e)))))}),o.useEffect(()=>{const e=$.current;if(e)return()=>Object(r.h)(e)},[]);const F=d?"none":"auto";return o.createElement("div",Object(i.a)({ref:R,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:F,...a}},O),o.createElement("div",{ref:M,style:{width:"100%",height:"100%"}},o.createElement("canvas",{ref:$,style:{display:"block"}},t)))})),P=o.forwardRef((function(e,t){return o.createElement(w,null,o.createElement(M,Object(i.a)({},e,{ref:t})))}))},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return m})),n.d(t,"b",(function(){return f}));var r=n(62),i=n(11),o=n(17),s=n(40),a=n(168),l=n(43),c=n(54),u=n(10);function d(){const e=this.getScope();if(e){const t=e.getSpan();if(t)return{"sentry-trace":t.toTraceparent()}}return{}}function h(e,t,n){if(!Object(u.b)(t))return e.sampled=!1,e;if(void 0!==e.sampled)return e.setMetadata({sampleRate:Number(e.sampled)}),e;let r;return"function"==typeof t.tracesSampler?(r=t.tracesSampler(n),e.setMetadata({sampleRate:Number(r)})):void 0!==n.parentSampled?r=n.parentSampled:(r=t.tracesSampleRate,e.setMetadata({sampleRate:Number(r)})),function(e){if(Object(o.e)(e)||"number"!=typeof e&&"boolean"!=typeof e)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.c.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1;if(e<0||e>1)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.c.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${e}.`),!1;return!0}(r)?r?(e.sampled=Math.random()new(Object(s.a)(e,"./integrations/node/mongo").Mongo),mongoose:()=>new(Object(s.a)(e,"./integrations/node/mongo").Mongo)({mongoose:!0}),mysql:()=>new(Object(s.a)(e,"./integrations/node/mysql").Mysql),pg:()=>new(Object(s.a)(e,"./integrations/node/postgres").Postgres)},i=Object.keys(n).filter(e=>!!Object(s.c)(e)).map(e=>{try{return n[e]()}catch(e){return}}).filter(e=>e);i.length>0&&(t.__SENTRY__.integrations=[...t.__SENTRY__.integrations||[],...i])}(),Object(a.a)()}}).call(this,n(64)(e))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return i}));var r=n(17);function i(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:e.substr(0,t)+"..."}function o(e,t){let n=e;const r=n.length;if(r<=150)return n;t>r&&(t=r);let i=Math.max(t-60,0);i<5&&(i=0);let o=Math.min(i+140,r);return o>r-5&&(o=r),o===r&&(i=Math.max(o-140,0)),n=n.slice(i,o),i>0&&(n="'{snip} "+n),or&&(t=r);let i=Math.max(t-60,0);i<5&&(i=0);let o=Math.min(i+140,r);return o>r-5&&(o=r),o===r&&(i=Math.max(o-140,0)),n=n.slice(i,o),i>0&&(n="'{snip} "+n),o`."),this.name=""),super.finish(e),!0!==this.sampled){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.c.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled.");const e=this._hub.getClient();return void(e&&e.recordDroppedEvent("sample_rate","transaction"))}const t=this.spanRecorder?this.spanRecorder.spans.filter(e=>e!==this&&e.endTimestamp):[];this._trimEnd&&t.length>0&&(this.endTimestamp=t.reduce((e,t)=>e.endTimestamp&&t.endTimestamp?e.endTimestamp>t.endTimestamp?e:t:e).endTimestamp);const n=this.metadata,r={contexts:{trace:this.getTraceContext()},spans:t,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:{...n,dynamicSamplingContext:this.getDynamicSamplingContext()},...n.source&&{transaction_info:{source:n.source,changes:n.changes,propagations:n.propagations}}};return Object.keys(this._measurements).length>0&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.c.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),r.measurements=this._measurements),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.c.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`),this._hub.captureEvent(r)}toContext(){const e=super.toContext();return Object(a.b)({...e,name:this.name,trimEnd:this._trimEnd})}updateWithContext(e){return super.updateWithContext(e),this.name=Object(r.a)(e.name,()=>""),this._trimEnd=e.trimEnd,this}getDynamicSamplingContext(){if(this._frozenDynamicSamplingContext)return this._frozenDynamicSamplingContext;const e=this._hub||Object(i.a)(),t=e&&e.getClient();if(!t)return{};const{environment:n,release:r}=t.getOptions()||{},{publicKey:o}=t.getDsn()||{},s=this.metadata.sampleRate,l=void 0!==s?s.toString():void 0,c=e.getScope(),{segment:u}=c&&c.getUser()||{},d=this.metadata.source,h=d&&"url"!==d?this.name:void 0;return Object(a.b)({environment:n,release:r,transaction:h,user_segment:u,public_key:o,trace_id:this.traceId,sample_rate:l})}}},function(e,t,n){var r=n(343),i=n(344),o=n(345),s=n(347);e.exports=function(e,t){return r(e)||i(e,t)||o(e,t)||s()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){"use strict";var r=n(209),i={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},o={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function l(e){return r.isMemo(e)?s:a[e.$$typeof]||i}a[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[r.Memo]=s;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,r){if("string"!=typeof n){if(f){var i=p(n);i&&i!==f&&e(t,i,r)}var s=u(n);d&&(s=s.concat(d(n)));for(var a=l(t),m=l(n),g=0;gDate.now()/1e3};const s=Object(i.b)()?function(){try{return Object(i.a)(e,"perf_hooks").performance}catch(e){return}}():function(){const{performance:e}=r.a;if(!e||!e.now)return;return{now:()=>e.now(),timeOrigin:Date.now()-e.now()}}(),a=void 0===s?o:{nowSeconds:()=>(s.timeOrigin+s.now())/1e3},l=o.nowSeconds.bind(o),c=a.nowSeconds.bind(a),u=c;let d;const h=(()=>{const{performance:e}=r.a;if(!e||!e.now)return void(d="none");const t=e.now(),n=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+t-n):36e5,o=i<36e5,s=e.timing&&e.timing.navigationStart,a="number"==typeof s?Math.abs(s+t-n):36e5;return o||a<36e5?i<=a?(d="timeOrigin",e.timeOrigin):(d="navigationStart",s):(d="dateNow",n)})()}).call(this,n(64)(e))},function(e,t,n){"use strict";function r(e,t){return null!=e?e:t()}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return _})),n.d(t,"b",(function(){return v}));var r,i=n(196),o=n(60),s=n(11),a=n(38),l=n(40),c=n(17);!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(r||(r={}));class u{__init(){this._state=r.PENDING}__init2(){this._handlers=[]}constructor(e){u.prototype.__init.call(this),u.prototype.__init2.call(this),u.prototype.__init3.call(this),u.prototype.__init4.call(this),u.prototype.__init5.call(this),u.prototype.__init6.call(this);try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new u((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(e){return new u((t,n)=>{let r,i;return this.then(t=>{i=!1,r=t,e&&e()},t=>{i=!0,r=t,e&&e()}).then(()=>{i?n(r):t(r)})})}__init3(){this._resolve=e=>{this._setResult(r.RESOLVED,e)}}__init4(){this._reject=e=>{this._setResult(r.REJECTED,e)}}__init5(){this._setResult=(e,t)=>{this._state===r.PENDING&&(Object(c.j)(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init6(){this._executeHandlers=()=>{if(this._state===r.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(this._state===r.RESOLVED&&e[1](this._value),this._state===r.REJECTED&&e[2](this._value),e[0]=!0)})}}}var d=n(22);function h(e){const t=Object(o.c)(),n={sid:Object(i.b)(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return Object(d.b)({sid:""+e.sid,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?""+e.did:void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&p(n,e),n}function p(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Object(o.c)(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:Object(i.b)()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=""+t.did),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}class f{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(e){const t=new f;return e&&(t._breadcrumbs=[...e._breadcrumbs],t._tags={...e._tags},t._extra={...e._extra},t._contexts={...e._contexts},t._user=e._user,t._level=e._level,t._span=e._span,t._session=e._session,t._transactionName=e._transactionName,t._fingerprint=e._fingerprint,t._eventProcessors=[...e._eventProcessors],t._requestSession=e._requestSession,t._attachments=[...e._attachments]),t}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&p(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts={...this._contexts,[e]:t},this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if("function"==typeof e){const t=e(this);return t instanceof f?t:this}return e instanceof f?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession)):Object(c.f)(e)&&(e=e,this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:Object(o.b)(),...e};return this._breadcrumbs=[...this._breadcrumbs,r].slice(-n),this._notifyScopeListeners(),this}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,t={}){if(this._extra&&Object.keys(this._extra).length&&(e.extra={...this._extra,...e.extra}),this._tags&&Object.keys(this._tags).length&&(e.tags={...this._tags,...e.tags}),this._user&&Object.keys(this._user).length&&(e.user={...this._user,...e.user}),this._contexts&&Object.keys(this._contexts).length&&(e.contexts={...this._contexts,...e.contexts}),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts={trace:this._span.getTraceContext(),...e.contexts};const t=this._span.transaction&&this._span.transaction.name;t&&(e.tags={transaction:t,...e.tags})}return this._applyFingerprint(e),e.breadcrumbs=[...e.breadcrumbs||[],...this._breadcrumbs],e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...m(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}_notifyEventProcessors(e,t,n,r=0){return new u((i,o)=>{const a=e[r];if(null===t||"function"!=typeof a)i(t);else{const l=a({...t},n);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.id&&null===l&&s.c.log(`Event processor "${a.id}" dropped event`),Object(c.j)(l)?l.then(t=>this._notifyEventProcessors(e,t,n,r+1).then(i)).then(null,o):this._notifyEventProcessors(e,l,n,r+1).then(i).then(null,o)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}_applyFingerprint(e){e.fingerprint=e.fingerprint?Object(i.a)(e.fingerprint):[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}}function m(){return Object(a.b)("globalEventProcessors",()=>[])}const g=100;class b{__init(){this._stack=[{}]}constructor(e,t=new f,n=4){this._version=n,b.prototype.__init.call(this),this.getStackTop().scope=t,e&&this.bindClient(e)}isOlderThan(e){return this._version{i.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},o)}),n}captureMessage(e,t,n){const r=this._lastEventId=n&&n.event_id?n.event_id:Object(i.b)(),o=new Error(e);return this._withClient((i,s)=>{i.captureMessage(e,t,{originalException:e,syntheticException:o,...n,event_id:r},s)}),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:Object(i.b)();return"transaction"!==e.type&&(this._lastEventId=n),this._withClient((r,i)=>{r.captureEvent(e,{...t,event_id:n},i)}),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){const{scope:n,client:r}=this.getStackTop();if(!n||!r)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:a=g}=r.getOptions&&r.getOptions()||{};if(a<=0)return;const l={timestamp:Object(o.b)(),...e},c=i?Object(s.b)(()=>i(l,t)):l;null!==c&&n.addBreadcrumb(c,a)}setUser(e){const t=this.getScope();t&&t.setUser(e)}setTags(e){const t=this.getScope();t&&t.setTags(e)}setExtras(e){const t=this.getScope();t&&t.setExtras(e)}setTag(e,t){const n=this.getScope();n&&n.setTag(e,t)}setExtra(e,t){const n=this.getScope();n&&n.setExtra(e,t)}setContext(e,t){const n=this.getScope();n&&n.setContext(e,t)}configureScope(e){const{scope:t,client:n}=this.getStackTop();t&&n&&e(t)}run(e){const t=y(this);try{e(this)}finally{y(t)}}getIntegration(e){const t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(t){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.c.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,t){return this._callExtensionMethod("startTransaction",e,t)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){const e=this.getStackTop(),t=e&&e.scope,n=t&&t.getSession();n&&function(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),p(e,n)}(n),this._sendSessionUpdate(),t&&t.setSession()}startSession(e){const{scope:t,client:n}=this.getStackTop(),{release:r,environment:i}=n&&n.getOptions()||{},{userAgent:o}=a.a.navigator||{},s=h({release:r,environment:i,...t&&{user:t.getUser()},...o&&{userAgent:o},...e});if(t){const e=t.getSession&&t.getSession();e&&"ok"===e.status&&p(e,{status:"exited"}),this.endSession(),t.setSession(s)}return s}shouldSendDefaultPii(){const e=this.getClient(),t=e&&e.getOptions();return Boolean(t&&t.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:t}=this.getStackTop();if(!e)return;const n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}_withClient(e){const{scope:t,client:n}=this.getStackTop();n&&e(n,t)}_callExtensionMethod(e,...t){const n=v().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[e])return n.extensions[e].apply(this,t);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.c.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}function v(){return a.a.__SENTRY__=a.a.__SENTRY__||{extensions:{},hub:void 0},a.a}function y(e){const t=v(),n=x(t);return w(t,e),n}function _(){const e=v();return S(e)&&!x(e).isOlderThan(4)||w(e,new b),Object(l.b)()?function(e){try{const t=v().__SENTRY__,n=t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active;if(!n)return x(e);if(!S(n)||x(n).isOlderThan(4)){const t=x(e).getStackTop();w(n,new b(t.client,f.clone(t.scope)))}return x(n)}catch(t){return x(e)}}(e):x(e)}function S(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function x(e){return Object(a.b)("hub",()=>new b,e)}function w(e,t){if(!e)return!1;return(e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0}},,function(e,t){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,"exports",{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},function(e,t,n){var r=n(33).Symbol;e.exports=r},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var r=n(133),i=n(134);e.exports=function(e,t,n,o){var s=!n;n||(n={});for(var a=-1,l=t.length;++ae===t)){if(e===t)return!0;if(!e||!t)return!1;const r=e.length;if(t.length!==r)return!1;for(let i=0;is.response=e).then(()=>{o.lifespan&&o.lifespan>0&&setTimeout(()=>{const e=i.indexOf(s);-1!==e&&i.splice(e,1)},o.lifespan)}).catch(e=>s.error=e)};if(i.push(s),!n)throw s.promise}const s=(e,t,n)=>o(e,t,!1,n),a=(e,t,n)=>{o(e,t,!0,n)},l=e=>{if(void 0===e||0===e.length)i.splice(0,i.length);else{const t=i.find(t=>r(e,t.keys,t.equal));if(t){const e=i.indexOf(t);-1!==e&&i.splice(e,1)}}}},function(e,t,n){e.exports=(n(27),n(0),n(81),function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=15)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.USER_EXPIRED="redux-oidc/USER_EXPIRED",t.SILENT_RENEW_ERROR="redux-oidc/SILENT_RENEW_ERROR",t.SESSION_TERMINATED="redux-oidc/SESSION_TERMINATED",t.USER_EXPIRING="redux-oidc/USER_EXPIRING",t.USER_FOUND="redux-oidc/USER_FOUND",t.LOADING_USER="redux-oidc/LOADING_USER",t.USER_SIGNED_OUT="redux-oidc/USER_SIGNED_OUT",t.LOAD_USER_ERROR="redux-oidc/LOAD_USER_ERROR"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.userExpired=function(){return{type:r.USER_EXPIRED}},t.userFound=function(e){return{type:r.USER_FOUND,payload:e}},t.silentRenewError=function(e){return{type:r.SILENT_RENEW_ERROR,payload:e}},t.sessionTerminated=function(){return{type:r.SESSION_TERMINATED}},t.userExpiring=function(){return{type:r.USER_EXPIRING}},t.loadingUser=function(){return{type:r.LOADING_USER}},t.userSignedOut=function(){return{type:r.USER_SIGNED_OUT}},t.loadUserError=function(){return{type:r.LOAD_USER_ERROR}};var r=n(0)},function(e,t){e.exports=n(27)},function(e,t){e.exports=n(0)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return new r.UserManager(e)};var r=n(14)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.loadUserError=t.userSignedOut=t.loadingUser=t.userExpiring=t.sessionTerminated=t.silentRenewError=t.userFound=t.userExpired=t.LOAD_USER_ERROR=t.USER_SIGNED_OUT=t.LOADING_USER=t.USER_EXPIRING=t.SESSION_TERMINATED=t.SILENT_RENEW_ERROR=t.USER_FOUND=t.USER_EXPIRED=t.SignoutCallbackComponent=t.OidcProvider=t.reducer=t.createImmutableReducer=t.CallbackComponent=t.loadUser=t.processSilentRenew=t.createUserManager=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(11));t.createUserManager=n(4).default,t.processSilentRenew=n(10).default,t.loadUser=n(9).default,t.CallbackComponent=n(6).default,t.createImmutableReducer=n(12).default,t.reducer=n(13).default,t.OidcProvider=n(7).default,t.SignoutCallbackComponent=n(8).default,t.USER_EXPIRED=n(0).USER_EXPIRED,t.USER_FOUND=n(0).USER_FOUND,t.SILENT_RENEW_ERROR=n(0).SILENT_RENEW_ERROR,t.SESSION_TERMINATED=n(0).SESSION_TERMINATED,t.USER_EXPIRING=n(0).USER_EXPIRING,t.LOADING_USER=n(0).LOADING_USER,t.USER_SIGNED_OUT=n(0).USER_SIGNED_OUT,t.LOAD_USER_ERROR=n(0).LOAD_USER_ERROR,t.userExpired=n(1).userExpired,t.userFound=n(1).userFound,t.silentRenewError=n(1).silentRenewError,t.sessionTerminated=n(1).sessionTerminated,t.userExpiring=n(1).userExpiring,t.loadingUser=n(1).loadingUser,t.userSignedOut=n(1).userSignedOut,t.loadUserError=n(1).loadUserError,t.default=r.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:s,n=arguments[1];switch(n.type){case i.USER_EXPIRED:case i.SILENT_RENEW_ERROR:return t({user:null,isLoadingUser:!1});case i.SESSION_TERMINATED:case i.USER_SIGNED_OUT:return t({user:null,isLoadingUser:!1});case i.USER_FOUND:return o({user:n.payload,isLoadingUser:!1});case i.LOADING_USER:return e.set("isLoadingUser",!0);default:return e}}}catch(e){}};var i=n(0)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:o,t=arguments[1];switch(t.type){case i.USER_EXPIRED:case i.SILENT_RENEW_ERROR:return Object.assign({},r({},e),{user:null,isLoadingUser:!1});case i.SESSION_TERMINATED:case i.USER_SIGNED_OUT:return Object.assign({},r({},e),{user:null,isLoadingUser:!1});case i.USER_FOUND:return Object.assign({},r({},e),{user:t.payload,isLoadingUser:!1});case i.LOADING_USER:return Object.assign({},r({},e),{isLoadingUser:!0});default:return e}};var i=n(0),o={user:null,isLoadingUser:!1}},function(e,t){e.exports=n(81)},function(e,t,n){e.exports=n(5)}]))},function(e,t,n){e.exports=n(218)},function(e,t,n){"use strict";(function(t){var r=n(30),i=n(223),o=n(121),s={"Content-Type":"application/x-www-form-urlencoded"};function a(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var l,c={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||void 0!==t&&"[object process]"===Object.prototype.toString.call(t))&&(l=n(122)),l),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(a(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(a(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||c.transitional,n=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,s=!n&&"json"===this.responseType;if(s||i&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(s){if("SyntaxError"===e.name)throw o(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){c.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){c.headers[e]=r.merge(s)})),e.exports=c}).call(this,n(36))},function(e,t,n){"use strict";function r(e){this.message=e}r.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},r.prototype.__CANCEL__=!0,e.exports=r},function(e,t,n){var r=n(237),i=n(238),o=n(239),s=n(240),a=n(241);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t=4){for(var e=arguments.length,t=Array(e),n=0;n=3){for(var e=arguments.length,t=Array(e),n=0;n=2){for(var e=arguments.length,t=Array(e),n=0;n=1){for(var e=arguments.length,t=Array(e),n=0;n1&&void 0!==arguments[1]?arguments[1]:o.JsonService;if(s(this,e),!t)throw i.Log.error("MetadataService: No settings passed to MetadataService"),new Error("settings");this._settings=t,this._jsonService=new n(["application/jwk-set+json"])}return e.prototype.resetSigningKeys=function(){this._settings=this._settings||{},this._settings.signingKeys=void 0},e.prototype.getMetadata=function(){var e=this;return this._settings.metadata?(i.Log.debug("MetadataService.getMetadata: Returning metadata from settings"),Promise.resolve(this._settings.metadata)):this.metadataUrl?(i.Log.debug("MetadataService.getMetadata: getting metadata from",this.metadataUrl),this._jsonService.getJson(this.metadataUrl).then((function(t){i.Log.debug("MetadataService.getMetadata: json received");var n=e._settings.metadataSeed||{};return e._settings.metadata=Object.assign({},n,t),e._settings.metadata}))):(i.Log.error("MetadataService.getMetadata: No authority or metadataUrl configured on settings"),Promise.reject(new Error("No authority or metadataUrl configured on settings")))},e.prototype.getIssuer=function(){return this._getMetadataProperty("issuer")},e.prototype.getAuthorizationEndpoint=function(){return this._getMetadataProperty("authorization_endpoint")},e.prototype.getUserInfoEndpoint=function(){return this._getMetadataProperty("userinfo_endpoint")},e.prototype.getTokenEndpoint=function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this._getMetadataProperty("token_endpoint",e)},e.prototype.getCheckSessionIframe=function(){return this._getMetadataProperty("check_session_iframe",!0)},e.prototype.getEndSessionEndpoint=function(){return this._getMetadataProperty("end_session_endpoint",!0)},e.prototype.getRevocationEndpoint=function(){return this._getMetadataProperty("revocation_endpoint",!0)},e.prototype.getKeysEndpoint=function(){return this._getMetadataProperty("jwks_uri",!0)},e.prototype._getMetadataProperty=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return i.Log.debug("MetadataService.getMetadataProperty for: "+e),this.getMetadata().then((function(n){if(i.Log.debug("MetadataService.getMetadataProperty: metadata recieved"),void 0===n[e]){if(!0===t)return void i.Log.warn("MetadataService.getMetadataProperty: Metadata does not contain optional property "+e);throw i.Log.error("MetadataService.getMetadataProperty: Metadata does not contain property "+e),new Error("Metadata does not contain property "+e)}return n[e]}))},e.prototype.getSigningKeys=function(){var e=this;return this._settings.signingKeys?(i.Log.debug("MetadataService.getSigningKeys: Returning signingKeys from settings"),Promise.resolve(this._settings.signingKeys)):this._getMetadataProperty("jwks_uri").then((function(t){return i.Log.debug("MetadataService.getSigningKeys: jwks_uri received",t),e._jsonService.getJson(t).then((function(t){if(i.Log.debug("MetadataService.getSigningKeys: key set received",t),!t.keys)throw i.Log.error("MetadataService.getSigningKeys: Missing keys on keyset"),new Error("Missing keys on keyset");return e._settings.signingKeys=t.keys,e._settings.signingKeys}))}))},r(e,[{key:"metadataUrl",get:function(){return this._metadataUrl||(this._settings.metadataUrl?this._metadataUrl=this._settings.metadataUrl:(this._metadataUrl=this._settings.authority,this._metadataUrl&&this._metadataUrl.indexOf(a)<0&&("/"!==this._metadataUrl[this._metadataUrl.length-1]&&(this._metadataUrl+="/"),this._metadataUrl+=a))),this._metadataUrl}}]),e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UrlUtility=void 0;var r=n(0),i=n(1);t.UrlUtility=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.addQueryParam=function(e,t,n){return e.indexOf("?")<0&&(e+="?"),"?"!==e[e.length-1]&&(e+="&"),e+=encodeURIComponent(t),(e+="=")+encodeURIComponent(n)},e.parseUrlFragment=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.Global;"string"!=typeof e&&(e=n.location.href);var o=e.lastIndexOf(t);o>=0&&(e=e.substr(o+1)),"?"===t&&(o=e.indexOf("#"))>=0&&(e=e.substr(0,o));for(var s,a={},l=/([^&=]+)=([^&]*)/g,c=0;s=l.exec(e);)if(a[decodeURIComponent(s[1])]=decodeURIComponent(s[2].replace(/\+/g," ")),c++>50)return r.Log.error("UrlUtility.parseUrlFragment: response exceeded expected number of parameters",e),{error:"Response exceeded expected number of parameters"};for(var u in a)return a;return{}},e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JoseUtil=void 0;var r=n(26),i=function(e){return e&&e.__esModule?e:{default:e}}(n(33));t.JoseUtil=(0,i.default)({jws:r.jws,KeyUtil:r.KeyUtil,X509:r.X509,crypto:r.crypto,hextob64u:r.hextob64u,b64tohex:r.b64tohex,AllowedSigningAlgs:r.AllowedSigningAlgs})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OidcClientSettings=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},n=t.authority,i=t.metadataUrl,o=t.metadata,d=t.signingKeys,m=t.metadataSeed,g=t.client_id,b=t.client_secret,v=t.response_type,y=void 0===v?h:v,_=t.scope,S=void 0===_?p:_,x=t.redirect_uri,w=t.post_logout_redirect_uri,k=t.client_authentication,O=void 0===k?f:k,E=t.prompt,A=t.display,T=t.max_age,C=t.ui_locales,M=t.acr_values,P=t.resource,$=t.response_mode,R=t.filterProtocolClaims,I=void 0===R||R,D=t.loadUserInfo,N=void 0===D||D,j=t.staleStateAge,L=void 0===j?900:j,B=t.clockSkew,F=void 0===B?300:B,z=t.clockService,U=void 0===z?new s.ClockService:z,Q=t.userInfoJwtIssuer,q=void 0===Q?"OP":Q,H=t.mergeClaims,G=void 0!==H&&H,V=t.stateStore,W=void 0===V?new a.WebStorageStateStore:V,X=t.ResponseValidatorCtor,Y=void 0===X?l.ResponseValidator:X,Z=t.MetadataServiceCtor,J=void 0===Z?c.MetadataService:Z,K=t.extraQueryParams,ee=void 0===K?{}:K,te=t.extraTokenParams,ne=void 0===te?{}:te;u(this,e),this._authority=n,this._metadataUrl=i,this._metadata=o,this._metadataSeed=m,this._signingKeys=d,this._client_id=g,this._client_secret=b,this._response_type=y,this._scope=S,this._redirect_uri=x,this._post_logout_redirect_uri=w,this._client_authentication=O,this._prompt=E,this._display=A,this._max_age=T,this._ui_locales=C,this._acr_values=M,this._resource=P,this._response_mode=$,this._filterProtocolClaims=!!I,this._loadUserInfo=!!N,this._staleStateAge=L,this._clockSkew=F,this._clockService=U,this._userInfoJwtIssuer=q,this._mergeClaims=!!G,this._stateStore=W,this._validator=new Y(this),this._metadataService=new J(this),this._extraQueryParams="object"===(void 0===ee?"undefined":r(ee))?ee:{},this._extraTokenParams="object"===(void 0===ne?"undefined":r(ne))?ne:{}}return e.prototype.getEpochTime=function(){return this._clockService.getEpochTime()},i(e,[{key:"client_id",get:function(){return this._client_id},set:function(e){if(this._client_id)throw o.Log.error("OidcClientSettings.set_client_id: client_id has already been assigned."),new Error("client_id has already been assigned.");this._client_id=e}},{key:"client_secret",get:function(){return this._client_secret}},{key:"response_type",get:function(){return this._response_type}},{key:"scope",get:function(){return this._scope}},{key:"redirect_uri",get:function(){return this._redirect_uri}},{key:"post_logout_redirect_uri",get:function(){return this._post_logout_redirect_uri}},{key:"client_authentication",get:function(){return this._client_authentication}},{key:"prompt",get:function(){return this._prompt}},{key:"display",get:function(){return this._display}},{key:"max_age",get:function(){return this._max_age}},{key:"ui_locales",get:function(){return this._ui_locales}},{key:"acr_values",get:function(){return this._acr_values}},{key:"resource",get:function(){return this._resource}},{key:"response_mode",get:function(){return this._response_mode}},{key:"authority",get:function(){return this._authority},set:function(e){if(this._authority)throw o.Log.error("OidcClientSettings.set_authority: authority has already been assigned."),new Error("authority has already been assigned.");this._authority=e}},{key:"metadataUrl",get:function(){return this._metadataUrl||(this._metadataUrl=this.authority,this._metadataUrl&&this._metadataUrl.indexOf(d)<0&&("/"!==this._metadataUrl[this._metadataUrl.length-1]&&(this._metadataUrl+="/"),this._metadataUrl+=d)),this._metadataUrl}},{key:"metadata",get:function(){return this._metadata},set:function(e){this._metadata=e}},{key:"metadataSeed",get:function(){return this._metadataSeed},set:function(e){this._metadataSeed=e}},{key:"signingKeys",get:function(){return this._signingKeys},set:function(e){this._signingKeys=e}},{key:"filterProtocolClaims",get:function(){return this._filterProtocolClaims}},{key:"loadUserInfo",get:function(){return this._loadUserInfo}},{key:"staleStateAge",get:function(){return this._staleStateAge}},{key:"clockSkew",get:function(){return this._clockSkew}},{key:"userInfoJwtIssuer",get:function(){return this._userInfoJwtIssuer}},{key:"mergeClaims",get:function(){return this._mergeClaims}},{key:"stateStore",get:function(){return this._stateStore}},{key:"validator",get:function(){return this._validator}},{key:"metadataService",get:function(){return this._metadataService}},{key:"extraQueryParams",get:function(){return this._extraQueryParams},set:function(e){"object"===(void 0===e?"undefined":r(e))?this._extraQueryParams=e:this._extraQueryParams={}}},{key:"extraTokenParams",get:function(){return this._extraTokenParams},set:function(e){"object"===(void 0===e?"undefined":r(e))?this._extraTokenParams=e:this._extraTokenParams={}}}]),e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebStorageStateStore=void 0;var r=n(0),i=n(1);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.WebStorageStateStore=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.prefix,r=void 0===n?"oidc.":n,s=t.store,a=void 0===s?i.Global.localStorage:s;o(this,e),this._store=a,this._prefix=r}return e.prototype.set=function(e,t){return r.Log.debug("WebStorageStateStore.set",e),e=this._prefix+e,this._store.setItem(e,t),Promise.resolve()},e.prototype.get=function(e){r.Log.debug("WebStorageStateStore.get",e),e=this._prefix+e;var t=this._store.getItem(e);return Promise.resolve(t)},e.prototype.remove=function(e){r.Log.debug("WebStorageStateStore.remove",e),e=this._prefix+e;var t=this._store.getItem(e);return this._store.removeItem(e),Promise.resolve(t)},e.prototype.getAllKeys=function(){r.Log.debug("WebStorageStateStore.getAllKeys");for(var e=[],t=0;t0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i.Global.XMLHttpRequest,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;o(this,e),t&&Array.isArray(t)?this._contentTypes=t.slice():this._contentTypes=[],this._contentTypes.push("application/json"),r&&this._contentTypes.push("application/jwt"),this._XMLHttpRequest=n,this._jwtHandler=r}return e.prototype.getJson=function(e,t){var n=this;if(!e)throw r.Log.error("JsonService.getJson: No url passed"),new Error("url");return r.Log.debug("JsonService.getJson, url: ",e),new Promise((function(i,o){var s=new n._XMLHttpRequest;s.open("GET",e);var a=n._contentTypes,l=n._jwtHandler;s.onload=function(){if(r.Log.debug("JsonService.getJson: HTTP response received, status",s.status),200===s.status){var t=s.getResponseHeader("Content-Type");if(t){var n=a.find((function(e){if(t.startsWith(e))return!0}));if("application/jwt"==n)return void l(s).then(i,o);if(n)try{return void i(JSON.parse(s.responseText))}catch(e){return r.Log.error("JsonService.getJson: Error parsing JSON response",e.message),void o(e)}}o(Error("Invalid response Content-Type: "+t+", from URL: "+e))}else o(Error(s.statusText+" ("+s.status+")"))},s.onerror=function(){r.Log.error("JsonService.getJson: network error"),o(Error("Network Error"))},t&&(r.Log.debug("JsonService.getJson: token passed, setting Authorization header"),s.setRequestHeader("Authorization","Bearer "+t)),s.send()}))},e.prototype.postForm=function(e,t,n){var i=this;if(!e)throw r.Log.error("JsonService.postForm: No url passed"),new Error("url");return r.Log.debug("JsonService.postForm, url: ",e),new Promise((function(o,s){var a=new i._XMLHttpRequest;a.open("POST",e);var l=i._contentTypes;a.onload=function(){if(r.Log.debug("JsonService.postForm: HTTP response received, status",a.status),200!==a.status){if(400===a.status&&(n=a.getResponseHeader("Content-Type"))&&l.find((function(e){if(n.startsWith(e))return!0})))try{var t=JSON.parse(a.responseText);if(t&&t.error)return r.Log.error("JsonService.postForm: Error from server: ",t.error),void s(new Error(t.error))}catch(e){return r.Log.error("JsonService.postForm: Error parsing JSON response",e.message),void s(e)}s(Error(a.statusText+" ("+a.status+")"))}else{var n;if((n=a.getResponseHeader("Content-Type"))&&l.find((function(e){if(n.startsWith(e))return!0})))try{return void o(JSON.parse(a.responseText))}catch(e){return r.Log.error("JsonService.postForm: Error parsing JSON response",e.message),void s(e)}s(Error("Invalid response Content-Type: "+n+", from URL: "+e))}},a.onerror=function(){r.Log.error("JsonService.postForm: network error"),s(Error("Network Error"))};var c="";for(var u in t){var d=t[u];d&&(c.length>0&&(c+="&"),c+=encodeURIComponent(u),c+="=",c+=encodeURIComponent(d))}a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),void 0!==n&&a.setRequestHeader("Authorization","Basic "+btoa(n)),a.send(c)}))},e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SigninRequest=void 0;var r=n(0),i=n(3),o=n(13);t.SigninRequest=function(){function e(t){var n=t.url,s=t.client_id,a=t.redirect_uri,l=t.response_type,c=t.scope,u=t.authority,d=t.data,h=t.prompt,p=t.display,f=t.max_age,m=t.ui_locales,g=t.id_token_hint,b=t.login_hint,v=t.acr_values,y=t.resource,_=t.response_mode,S=t.request,x=t.request_uri,w=t.extraQueryParams,k=t.request_type,O=t.client_secret,E=t.extraTokenParams,A=t.skipUserInfo;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!n)throw r.Log.error("SigninRequest.ctor: No url passed"),new Error("url");if(!s)throw r.Log.error("SigninRequest.ctor: No client_id passed"),new Error("client_id");if(!a)throw r.Log.error("SigninRequest.ctor: No redirect_uri passed"),new Error("redirect_uri");if(!l)throw r.Log.error("SigninRequest.ctor: No response_type passed"),new Error("response_type");if(!c)throw r.Log.error("SigninRequest.ctor: No scope passed"),new Error("scope");if(!u)throw r.Log.error("SigninRequest.ctor: No authority passed"),new Error("authority");var T=e.isOidc(l),C=e.isCode(l);_||(_=e.isCode(l)?"query":null),this.state=new o.SigninState({nonce:T,data:d,client_id:s,authority:u,redirect_uri:a,code_verifier:C,request_type:k,response_mode:_,client_secret:O,scope:c,extraTokenParams:E,skipUserInfo:A}),n=i.UrlUtility.addQueryParam(n,"client_id",s),n=i.UrlUtility.addQueryParam(n,"redirect_uri",a),n=i.UrlUtility.addQueryParam(n,"response_type",l),n=i.UrlUtility.addQueryParam(n,"scope",c),n=i.UrlUtility.addQueryParam(n,"state",this.state.id),T&&(n=i.UrlUtility.addQueryParam(n,"nonce",this.state.nonce)),C&&(n=i.UrlUtility.addQueryParam(n,"code_challenge",this.state.code_challenge),n=i.UrlUtility.addQueryParam(n,"code_challenge_method","S256"));var M={prompt:h,display:p,max_age:f,ui_locales:m,id_token_hint:g,login_hint:b,acr_values:v,resource:y,request:S,request_uri:x,response_mode:_};for(var P in M)M[P]&&(n=i.UrlUtility.addQueryParam(n,P,M[P]));for(var $ in w)n=i.UrlUtility.addQueryParam(n,$,w[$]);this.url=n}return e.isOidc=function(e){return!!e.split(/\s+/g).filter((function(e){return"id_token"===e}))[0]},e.isOAuth=function(e){return!!e.split(/\s+/g).filter((function(e){return"token"===e}))[0]},e.isCode=function(e){return!!e.split(/\s+/g).filter((function(e){return"code"===e}))[0]},e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.State=void 0;var r=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},n=t.id,r=t.data,i=t.created,a=t.request_type;s(this,e),this._id=n||(0,o.default)(),this._data=r,this._created="number"==typeof i&&i>0?i:parseInt(Date.now()/1e3),this._request_type=a}return e.prototype.toStorageString=function(){return i.Log.debug("State.toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type})},e.fromStorageString=function(t){return i.Log.debug("State.fromStorageString"),new e(JSON.parse(t))},e.clearStaleState=function(t,n){var r=Date.now()/1e3-n;return t.getAllKeys().then((function(n){i.Log.debug("State.clearStaleState: got keys",n);for(var o=[],s=function(s){var a=n[s];l=t.get(a).then((function(n){var o=!1;if(n)try{var s=e.fromStorageString(n);i.Log.debug("State.clearStaleState: got item from key: ",a,s.created),s.created<=r&&(o=!0)}catch(e){i.Log.error("State.clearStaleState: Error parsing state for key",a,e.message),o=!0}else i.Log.debug("State.clearStaleState: no item in storage for key: ",a),o=!0;if(o)return i.Log.debug("State.clearStaleState: removed item for key: ",a),t.remove(a)})),o.push(l)},a=0;a0&&void 0!==arguments[0]?arguments[0]:{};p(this,e),t instanceof o.OidcClientSettings?this._settings=t:this._settings=new o.OidcClientSettings(t)}return e.prototype.createSigninRequest=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.response_type,r=t.scope,o=t.redirect_uri,s=t.data,l=t.state,c=t.prompt,u=t.display,d=t.max_age,h=t.ui_locales,p=t.id_token_hint,f=t.login_hint,m=t.acr_values,g=t.resource,b=t.request,v=t.request_uri,y=t.response_mode,_=t.extraQueryParams,S=t.extraTokenParams,x=t.request_type,w=t.skipUserInfo,k=arguments[1];i.Log.debug("OidcClient.createSigninRequest");var O=this._settings.client_id;n=n||this._settings.response_type,r=r||this._settings.scope,o=o||this._settings.redirect_uri,c=c||this._settings.prompt,u=u||this._settings.display,d=d||this._settings.max_age,h=h||this._settings.ui_locales,m=m||this._settings.acr_values,g=g||this._settings.resource,y=y||this._settings.response_mode,_=_||this._settings.extraQueryParams,S=S||this._settings.extraTokenParams;var E=this._settings.authority;return a.SigninRequest.isCode(n)&&"code"!==n?Promise.reject(new Error("OpenID Connect hybrid flow is not supported")):this._metadataService.getAuthorizationEndpoint().then((function(t){i.Log.debug("OidcClient.createSigninRequest: Received authorization endpoint",t);var A=new a.SigninRequest({url:t,client_id:O,redirect_uri:o,response_type:n,scope:r,data:s||l,authority:E,prompt:c,display:u,max_age:d,ui_locales:h,id_token_hint:p,login_hint:f,acr_values:m,resource:g,request:b,request_uri:v,extraQueryParams:_,extraTokenParams:S,request_type:x,response_mode:y,client_secret:e._settings.client_secret,skipUserInfo:w}),T=A.state;return(k=k||e._stateStore).set(T.id,T.toStorageString()).then((function(){return A}))}))},e.prototype.readSigninResponseState=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];i.Log.debug("OidcClient.readSigninResponseState");var r="query"===this._settings.response_mode||!this._settings.response_mode&&a.SigninRequest.isCode(this._settings.response_type),o=r?"?":"#",s=new l.SigninResponse(e,o);if(!s.state)return i.Log.error("OidcClient.readSigninResponseState: No state in response"),Promise.reject(new Error("No state in response"));t=t||this._stateStore;var c=n?t.remove.bind(t):t.get.bind(t);return c(s.state).then((function(e){if(!e)throw i.Log.error("OidcClient.readSigninResponseState: No matching state found in storage"),new Error("No matching state found in storage");return{state:d.SigninState.fromStorageString(e),response:s}}))},e.prototype.processSigninResponse=function(e,t){var n=this;return i.Log.debug("OidcClient.processSigninResponse"),this.readSigninResponseState(e,t,!0).then((function(e){var t=e.state,r=e.response;return i.Log.debug("OidcClient.processSigninResponse: Received state from storage; validating response"),n._validator.validateSigninResponse(t,r)}))},e.prototype.createSignoutRequest=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.id_token_hint,r=t.data,o=t.state,s=t.post_logout_redirect_uri,a=t.extraQueryParams,l=t.request_type,u=arguments[1];return i.Log.debug("OidcClient.createSignoutRequest"),s=s||this._settings.post_logout_redirect_uri,a=a||this._settings.extraQueryParams,this._metadataService.getEndSessionEndpoint().then((function(t){if(!t)throw i.Log.error("OidcClient.createSignoutRequest: No end session endpoint url returned"),new Error("no end session endpoint");i.Log.debug("OidcClient.createSignoutRequest: Received end session endpoint",t);var d=new c.SignoutRequest({url:t,id_token_hint:n,post_logout_redirect_uri:s,data:r||o,extraQueryParams:a,request_type:l}),h=d.state;return h&&(i.Log.debug("OidcClient.createSignoutRequest: Signout request has state to persist"),(u=u||e._stateStore).set(h.id,h.toStorageString())),d}))},e.prototype.readSignoutResponseState=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];i.Log.debug("OidcClient.readSignoutResponseState");var r=new u.SignoutResponse(e);if(!r.state)return i.Log.debug("OidcClient.readSignoutResponseState: No state in response"),r.error?(i.Log.warn("OidcClient.readSignoutResponseState: Response was error: ",r.error),Promise.reject(new s.ErrorResponse(r))):Promise.resolve({state:void 0,response:r});var o=r.state;t=t||this._stateStore;var a=n?t.remove.bind(t):t.get.bind(t);return a(o).then((function(e){if(!e)throw i.Log.error("OidcClient.readSignoutResponseState: No matching state found in storage"),new Error("No matching state found in storage");return{state:h.State.fromStorageString(e),response:r}}))},e.prototype.processSignoutResponse=function(e,t){var n=this;return i.Log.debug("OidcClient.processSignoutResponse"),this.readSignoutResponseState(e,t,!0).then((function(e){var t=e.state,r=e.response;return t?(i.Log.debug("OidcClient.processSignoutResponse: Received state from storage; validating response"),n._validator.validateSignoutResponse(t,r)):(i.Log.debug("OidcClient.processSignoutResponse: No state from storage; skipping validating response"),r)}))},e.prototype.clearStaleState=function(e){return i.Log.debug("OidcClient.clearStaleState"),e=e||this._stateStore,h.State.clearStaleState(e,this.settings.staleStateAge)},r(e,[{key:"_stateStore",get:function(){return this.settings.stateStore}},{key:"_validator",get:function(){return this.settings.validator}},{key:"_metadataService",get:function(){return this.settings.metadataService}},{key:"settings",get:function(){return this._settings}},{key:"metadataService",get:function(){return this._metadataService}}]),e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenClient=void 0;var r=n(7),i=n(2),o=n(0);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.TokenClient=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.JsonService,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.MetadataService;if(s(this,e),!t)throw o.Log.error("TokenClient.ctor: No settings passed"),new Error("settings");this._settings=t,this._jsonService=new n,this._metadataService=new a(this._settings)}return e.prototype.exchangeCode=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(t=Object.assign({},t)).grant_type=t.grant_type||"authorization_code",t.client_id=t.client_id||this._settings.client_id,t.client_secret=t.client_secret||this._settings.client_secret,t.redirect_uri=t.redirect_uri||this._settings.redirect_uri;var n=void 0,r=t._client_authentication||this._settings._client_authentication;return delete t._client_authentication,t.code?t.redirect_uri?t.code_verifier?t.client_id?t.client_secret||"client_secret_basic"!=r?("client_secret_basic"==r&&(n=t.client_id+":"+t.client_secret,delete t.client_id,delete t.client_secret),this._metadataService.getTokenEndpoint(!1).then((function(r){return o.Log.debug("TokenClient.exchangeCode: Received token endpoint"),e._jsonService.postForm(r,t,n).then((function(e){return o.Log.debug("TokenClient.exchangeCode: response received"),e}))}))):(o.Log.error("TokenClient.exchangeCode: No client_secret passed"),Promise.reject(new Error("A client_secret is required"))):(o.Log.error("TokenClient.exchangeCode: No client_id passed"),Promise.reject(new Error("A client_id is required"))):(o.Log.error("TokenClient.exchangeCode: No code_verifier passed"),Promise.reject(new Error("A code_verifier is required"))):(o.Log.error("TokenClient.exchangeCode: No redirect_uri passed"),Promise.reject(new Error("A redirect_uri is required"))):(o.Log.error("TokenClient.exchangeCode: No code passed"),Promise.reject(new Error("A code is required")))},e.prototype.exchangeRefreshToken=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(t=Object.assign({},t)).grant_type=t.grant_type||"refresh_token",t.client_id=t.client_id||this._settings.client_id,t.client_secret=t.client_secret||this._settings.client_secret;var n=void 0,r=t._client_authentication||this._settings._client_authentication;return delete t._client_authentication,t.refresh_token?t.client_id?("client_secret_basic"==r&&(n=t.client_id+":"+t.client_secret,delete t.client_id,delete t.client_secret),this._metadataService.getTokenEndpoint(!1).then((function(r){return o.Log.debug("TokenClient.exchangeRefreshToken: Received token endpoint"),e._jsonService.postForm(r,t,n).then((function(e){return o.Log.debug("TokenClient.exchangeRefreshToken: response received"),e}))}))):(o.Log.error("TokenClient.exchangeRefreshToken: No client_id passed"),Promise.reject(new Error("A client_id is required"))):(o.Log.error("TokenClient.exchangeRefreshToken: No refresh_token passed"),Promise.reject(new Error("A refresh_token is required")))},e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorResponse=void 0;var r=n(0);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}t.ErrorResponse=function(e){function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},s=n.error,a=n.error_description,l=n.error_uri,c=n.state,u=n.session_state;if(i(this,t),!s)throw r.Log.error("No error passed to ErrorResponse"),new Error("error");var d=o(this,e.call(this,a||s));return d.name="ErrorResponse",d.error=s,d.error_description=a,d.error_uri=l,d.state=c,d.session_state=u,d}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(Error)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SigninState=void 0;var r=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},r=n.nonce,i=n.authority,o=n.client_id,u=n.redirect_uri,d=n.code_verifier,h=n.response_mode,p=n.client_secret,f=n.scope,m=n.extraTokenParams,g=n.skipUserInfo;l(this,t);var b=c(this,e.call(this,arguments[0]));if(!0===r?b._nonce=(0,a.default)():r&&(b._nonce=r),!0===d?b._code_verifier=(0,a.default)()+(0,a.default)()+(0,a.default)():d&&(b._code_verifier=d),b.code_verifier){var v=s.JoseUtil.hashString(b.code_verifier,"SHA256");b._code_challenge=s.JoseUtil.hexToBase64Url(v)}return b._redirect_uri=u,b._authority=i,b._client_id=o,b._response_mode=h,b._client_secret=p,b._scope=f,b._extraTokenParams=m,b._skipUserInfo=g,b}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.toStorageString=function(){return i.Log.debug("SigninState.toStorageString"),JSON.stringify({id:this.id,data:this.data,created:this.created,request_type:this.request_type,nonce:this.nonce,code_verifier:this.code_verifier,redirect_uri:this.redirect_uri,authority:this.authority,client_id:this.client_id,response_mode:this.response_mode,client_secret:this.client_secret,scope:this.scope,extraTokenParams:this.extraTokenParams,skipUserInfo:this.skipUserInfo})},t.fromStorageString=function(e){return i.Log.debug("SigninState.fromStorageString"),new t(JSON.parse(e))},r(t,[{key:"nonce",get:function(){return this._nonce}},{key:"authority",get:function(){return this._authority}},{key:"client_id",get:function(){return this._client_id}},{key:"redirect_uri",get:function(){return this._redirect_uri}},{key:"code_verifier",get:function(){return this._code_verifier}},{key:"code_challenge",get:function(){return this._code_challenge}},{key:"response_mode",get:function(){return this._response_mode}},{key:"client_secret",get:function(){return this._client_secret}},{key:"scope",get:function(){return this._scope}},{key:"extraTokenParams",get:function(){return this._extraTokenParams}},{key:"skipUserInfo",get:function(){return this._skipUserInfo}}]),t}(o.State)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(){return("undefined"!=r&&null!==r&&void 0!==r.getRandomValues?i:o)().replace(/-/g,"")};var r="undefined"!=typeof window?window.crypto||window.msCrypto:null;function i(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(function(e){return(e^r.getRandomValues(new Uint8Array(1))[0]&15>>e/4).toString(16)}))}function o(){return([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,(function(e){return(e^16*Math.random()>>e/4).toString(16)}))}e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.User=void 0;var r=function(){function e(e,t){for(var n=0;n0){var n=parseInt(Date.now()/1e3);this.expires_at=n+t}}},{key:"expired",get:function(){var e=this.expires_in;if(void 0!==e)return e<=0}},{key:"scopes",get:function(){return(this.scope||"").split(" ")}}]),e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AccessTokenEvents=void 0;var r=n(0),i=n(46);function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.AccessTokenEvents=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.accessTokenExpiringNotificationTime,r=void 0===n?60:n,s=t.accessTokenExpiringTimer,a=void 0===s?new i.Timer("Access token expiring"):s,l=t.accessTokenExpiredTimer,c=void 0===l?new i.Timer("Access token expired"):l;o(this,e),this._accessTokenExpiringNotificationTime=r,this._accessTokenExpiring=a,this._accessTokenExpired=c}return e.prototype.load=function(e){if(e.access_token&&void 0!==e.expires_in){var t=e.expires_in;if(r.Log.debug("AccessTokenEvents.load: access token present, remaining duration:",t),t>0){var n=t-this._accessTokenExpiringNotificationTime;n<=0&&(n=1),r.Log.debug("AccessTokenEvents.load: registering expiring timer in:",n),this._accessTokenExpiring.init(n)}else r.Log.debug("AccessTokenEvents.load: canceling existing expiring timer becase we're past expiration."),this._accessTokenExpiring.cancel();var i=t+1;r.Log.debug("AccessTokenEvents.load: registering expired timer in:",i),this._accessTokenExpired.init(i)}else this._accessTokenExpiring.cancel(),this._accessTokenExpired.cancel()},e.prototype.unload=function(){r.Log.debug("AccessTokenEvents.unload: canceling existing access token timers"),this._accessTokenExpiring.cancel(),this._accessTokenExpired.cancel()},e.prototype.addAccessTokenExpiring=function(e){this._accessTokenExpiring.addHandler(e)},e.prototype.removeAccessTokenExpiring=function(e){this._accessTokenExpiring.removeHandler(e)},e.prototype.addAccessTokenExpired=function(e){this._accessTokenExpired.addHandler(e)},e.prototype.removeAccessTokenExpired=function(e){this._accessTokenExpired.removeHandler(e)},e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Event=void 0;var r=n(0);t.Event=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._name=t,this._callbacks=[]}return e.prototype.addHandler=function(e){this._callbacks.push(e)},e.prototype.removeHandler=function(e){var t=this._callbacks.findIndex((function(t){return t===e}));t>=0&&this._callbacks.splice(t,1)},e.prototype.raise=function(){r.Log.debug("Event: Raising event: "+this._name);for(var e=0;e1&&void 0!==arguments[1]?arguments[1]:o.CheckSessionIFrame,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.Global.timer;if(a(this,e),!t)throw i.Log.error("SessionMonitor.ctor: No user manager passed to SessionMonitor"),new Error("userManager");this._userManager=t,this._CheckSessionIFrameCtor=r,this._timer=l,this._userManager.events.addUserLoaded(this._start.bind(this)),this._userManager.events.addUserUnloaded(this._stop.bind(this)),Promise.resolve(this._userManager.getUser().then((function(e){e?n._start(e):n._settings.monitorAnonymousSession&&n._userManager.querySessionStatus().then((function(e){var t={session_state:e.session_state};e.sub&&e.sid&&(t.profile={sub:e.sub,sid:e.sid}),n._start(t)})).catch((function(e){i.Log.error("SessionMonitor ctor: error from querySessionStatus:",e.message)}))})).catch((function(e){i.Log.error("SessionMonitor ctor: error from getUser:",e.message)})))}return e.prototype._start=function(e){var t=this,n=e.session_state;n&&(e.profile?(this._sub=e.profile.sub,this._sid=e.profile.sid,i.Log.debug("SessionMonitor._start: session_state:",n,", sub:",this._sub)):(this._sub=void 0,this._sid=void 0,i.Log.debug("SessionMonitor._start: session_state:",n,", anonymous user")),this._checkSessionIFrame?this._checkSessionIFrame.start(n):this._metadataService.getCheckSessionIframe().then((function(e){if(e){i.Log.debug("SessionMonitor._start: Initializing check session iframe");var r=t._client_id,o=t._checkSessionInterval,s=t._stopCheckSessionOnError;t._checkSessionIFrame=new t._CheckSessionIFrameCtor(t._callback.bind(t),r,e,o,s),t._checkSessionIFrame.load().then((function(){t._checkSessionIFrame.start(n)}))}else i.Log.warn("SessionMonitor._start: No check session iframe found in the metadata")})).catch((function(e){i.Log.error("SessionMonitor._start: Error from getCheckSessionIframe:",e.message)})))},e.prototype._stop=function(){var e=this;if(this._sub=void 0,this._sid=void 0,this._checkSessionIFrame&&(i.Log.debug("SessionMonitor._stop"),this._checkSessionIFrame.stop()),this._settings.monitorAnonymousSession)var t=this._timer.setInterval((function(){e._timer.clearInterval(t),e._userManager.querySessionStatus().then((function(t){var n={session_state:t.session_state};t.sub&&t.sid&&(n.profile={sub:t.sub,sid:t.sid}),e._start(n)})).catch((function(e){i.Log.error("SessionMonitor: error from querySessionStatus:",e.message)}))}),1e3)},e.prototype._callback=function(){var e=this;this._userManager.querySessionStatus().then((function(t){var n=!0;t?t.sub===e._sub?(n=!1,e._checkSessionIFrame.start(t.session_state),t.sid===e._sid?i.Log.debug("SessionMonitor._callback: Same sub still logged in at OP, restarting check session iframe; session_state:",t.session_state):(i.Log.debug("SessionMonitor._callback: Same sub still logged in at OP, session state has changed, restarting check session iframe; session_state:",t.session_state),e._userManager.events._raiseUserSessionChanged())):i.Log.debug("SessionMonitor._callback: Different subject signed into OP:",t.sub):i.Log.debug("SessionMonitor._callback: Subject no longer signed into OP"),n&&(e._sub?(i.Log.debug("SessionMonitor._callback: SessionMonitor._callback; raising signed out event"),e._userManager.events._raiseUserSignedOut()):(i.Log.debug("SessionMonitor._callback: SessionMonitor._callback; raising signed in event"),e._userManager.events._raiseUserSignedIn()))})).catch((function(t){e._sub&&(i.Log.debug("SessionMonitor._callback: Error calling queryCurrentSigninSession; raising signed out event",t.message),e._userManager.events._raiseUserSignedOut())}))},r(e,[{key:"_settings",get:function(){return this._userManager.settings}},{key:"_metadataService",get:function(){return this._userManager.metadataService}},{key:"_client_id",get:function(){return this._settings.client_id}},{key:"_checkSessionInterval",get:function(){return this._settings.checkSessionInterval}},{key:"_stopCheckSessionOnError",get:function(){return this._settings.stopCheckSessionOnError}}]),e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CheckSessionIFrame=void 0;var r=n(0);function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.CheckSessionIFrame=function(){function e(t,n,r,o){var s=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];i(this,e),this._callback=t,this._client_id=n,this._url=r,this._interval=o||2e3,this._stopOnError=s;var a=r.indexOf("/",r.indexOf("//")+2);this._frame_origin=r.substr(0,a),this._frame=window.document.createElement("iframe"),this._frame.style.visibility="hidden",this._frame.style.position="absolute",this._frame.style.display="none",this._frame.width=0,this._frame.height=0,this._frame.src=r}return e.prototype.load=function(){var e=this;return new Promise((function(t){e._frame.onload=function(){t()},window.document.body.appendChild(e._frame),e._boundMessageEvent=e._message.bind(e),window.addEventListener("message",e._boundMessageEvent,!1)}))},e.prototype._message=function(e){e.origin===this._frame_origin&&e.source===this._frame.contentWindow&&("error"===e.data?(r.Log.error("CheckSessionIFrame: error message from check session op iframe"),this._stopOnError&&this.stop()):"changed"===e.data?(r.Log.debug("CheckSessionIFrame: changed message from check session op iframe"),this.stop(),this._callback()):r.Log.debug("CheckSessionIFrame: "+e.data+" message from check session op iframe"))},e.prototype.start=function(e){var t=this;if(this._session_state!==e){r.Log.debug("CheckSessionIFrame.start"),this.stop(),this._session_state=e;var n=function(){t._frame.contentWindow.postMessage(t._client_id+" "+t._session_state,t._frame_origin)};n(),this._timer=window.setInterval(n,this._interval)}},e.prototype.stop=function(){this._session_state=null,this._timer&&(r.Log.debug("CheckSessionIFrame.stop"),window.clearInterval(this._timer),this._timer=null)},e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenRevocationClient=void 0;var r=n(0),i=n(2),o=n(1);function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a="access_token",l="refresh_token";t.TokenRevocationClient=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:o.Global.XMLHttpRequest,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.MetadataService;if(s(this,e),!t)throw r.Log.error("TokenRevocationClient.ctor: No settings provided"),new Error("No settings provided.");this._settings=t,this._XMLHttpRequestCtor=n,this._metadataService=new a(this._settings)}return e.prototype.revoke=function(e,t){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"access_token";if(!e)throw r.Log.error("TokenRevocationClient.revoke: No token provided"),new Error("No token provided.");if(i!==a&&i!=l)throw r.Log.error("TokenRevocationClient.revoke: Invalid token type"),new Error("Invalid token type.");return this._metadataService.getRevocationEndpoint().then((function(o){if(o){r.Log.debug("TokenRevocationClient.revoke: Revoking "+i);var s=n._settings.client_id,a=n._settings.client_secret;return n._revoke(o,s,a,e,i)}if(t)throw r.Log.error("TokenRevocationClient.revoke: Revocation not supported"),new Error("Revocation not supported")}))},e.prototype._revoke=function(e,t,n,i,o){var s=this;return new Promise((function(a,l){var c=new s._XMLHttpRequestCtor;c.open("POST",e),c.onload=function(){r.Log.debug("TokenRevocationClient.revoke: HTTP response received, status",c.status),200===c.status?a():l(Error(c.statusText+" ("+c.status+")"))},c.onerror=function(){r.Log.debug("TokenRevocationClient.revoke: Network Error."),l("Network Error")};var u="client_id="+encodeURIComponent(t);n&&(u+="&client_secret="+encodeURIComponent(n)),u+="&token_type_hint="+encodeURIComponent(o),u+="&token="+encodeURIComponent(i),c.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),c.send(u)}))},e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CordovaPopupWindow=void 0;var r=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:o.MetadataService,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.UserInfoService,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:c.JoseUtil,d=arguments.length>4&&void 0!==arguments[4]?arguments[4]:a.TokenClient;if(u(this,e),!t)throw i.Log.error("ResponseValidator.ctor: No settings passed to ResponseValidator"),new Error("settings");this._settings=t,this._metadataService=new n(this._settings),this._userInfoService=new r(this._settings),this._joseUtil=l,this._tokenClient=new d(this._settings)}return e.prototype.validateSigninResponse=function(e,t){var n=this;return i.Log.debug("ResponseValidator.validateSigninResponse"),this._processSigninParams(e,t).then((function(t){return i.Log.debug("ResponseValidator.validateSigninResponse: state processed"),n._validateTokens(e,t).then((function(t){return i.Log.debug("ResponseValidator.validateSigninResponse: tokens validated"),n._processClaims(e,t).then((function(e){return i.Log.debug("ResponseValidator.validateSigninResponse: claims processed"),e}))}))}))},e.prototype.validateSignoutResponse=function(e,t){return e.id!==t.state?(i.Log.error("ResponseValidator.validateSignoutResponse: State does not match"),Promise.reject(new Error("State does not match"))):(i.Log.debug("ResponseValidator.validateSignoutResponse: state validated"),t.state=e.data,t.error?(i.Log.warn("ResponseValidator.validateSignoutResponse: Response was error",t.error),Promise.reject(new l.ErrorResponse(t))):Promise.resolve(t))},e.prototype._processSigninParams=function(e,t){if(e.id!==t.state)return i.Log.error("ResponseValidator._processSigninParams: State does not match"),Promise.reject(new Error("State does not match"));if(!e.client_id)return i.Log.error("ResponseValidator._processSigninParams: No client_id on state"),Promise.reject(new Error("No client_id on state"));if(!e.authority)return i.Log.error("ResponseValidator._processSigninParams: No authority on state"),Promise.reject(new Error("No authority on state"));if(this._settings.authority){if(this._settings.authority&&this._settings.authority!==e.authority)return i.Log.error("ResponseValidator._processSigninParams: authority mismatch on settings vs. signin state"),Promise.reject(new Error("authority mismatch on settings vs. signin state"))}else this._settings.authority=e.authority;if(this._settings.client_id){if(this._settings.client_id&&this._settings.client_id!==e.client_id)return i.Log.error("ResponseValidator._processSigninParams: client_id mismatch on settings vs. signin state"),Promise.reject(new Error("client_id mismatch on settings vs. signin state"))}else this._settings.client_id=e.client_id;return i.Log.debug("ResponseValidator._processSigninParams: state validated"),t.state=e.data,t.error?(i.Log.warn("ResponseValidator._processSigninParams: Response was error",t.error),Promise.reject(new l.ErrorResponse(t))):e.nonce&&!t.id_token?(i.Log.error("ResponseValidator._processSigninParams: Expecting id_token in response"),Promise.reject(new Error("No id_token in response"))):!e.nonce&&t.id_token?(i.Log.error("ResponseValidator._processSigninParams: Not expecting id_token in response"),Promise.reject(new Error("Unexpected id_token in response"))):e.code_verifier&&!t.code?(i.Log.error("ResponseValidator._processSigninParams: Expecting code in response"),Promise.reject(new Error("No code in response"))):!e.code_verifier&&t.code?(i.Log.error("ResponseValidator._processSigninParams: Not expecting code in response"),Promise.reject(new Error("Unexpected code in response"))):(t.scope||(t.scope=e.scope),Promise.resolve(t))},e.prototype._processClaims=function(e,t){var n=this;if(t.isOpenIdConnect){if(i.Log.debug("ResponseValidator._processClaims: response is OIDC, processing claims"),t.profile=this._filterProtocolClaims(t.profile),!0!==e.skipUserInfo&&this._settings.loadUserInfo&&t.access_token)return i.Log.debug("ResponseValidator._processClaims: loading user info"),this._userInfoService.getClaims(t.access_token).then((function(e){return i.Log.debug("ResponseValidator._processClaims: user info claims received from user info endpoint"),e.sub!==t.profile.sub?(i.Log.error("ResponseValidator._processClaims: sub from user info endpoint does not match sub in id_token"),Promise.reject(new Error("sub from user info endpoint does not match sub in id_token"))):(t.profile=n._mergeClaims(t.profile,e),i.Log.debug("ResponseValidator._processClaims: user info claims received, updated profile:",t.profile),t)}));i.Log.debug("ResponseValidator._processClaims: not loading user info")}else i.Log.debug("ResponseValidator._processClaims: response is not OIDC, not processing claims");return Promise.resolve(t)},e.prototype._mergeClaims=function(e,t){var n=Object.assign({},e);for(var i in t){var o=t[i];Array.isArray(o)||(o=[o]);for(var s=0;s1)return i.Log.error("ResponseValidator._validateIdToken: No kid found in id_token and more than one key found in metadata"),Promise.reject(new Error("No kid found in id_token and more than one key found in metadata"));o=n[0]}return Promise.resolve(o)}))},e.prototype._getSigningKeyForJwtWithSingleRetry=function(e){var t=this;return this._getSigningKeyForJwt(e).then((function(n){return n?Promise.resolve(n):(t._metadataService.resetSigningKeys(),t._getSigningKeyForJwt(e))}))},e.prototype._validateIdToken=function(e,t){var n=this;if(!e.nonce)return i.Log.error("ResponseValidator._validateIdToken: No nonce on state"),Promise.reject(new Error("No nonce on state"));var r=this._joseUtil.parseJwt(t.id_token);return r&&r.header&&r.payload?e.nonce!==r.payload.nonce?(i.Log.error("ResponseValidator._validateIdToken: Invalid nonce in id_token"),Promise.reject(new Error("Invalid nonce in id_token"))):this._metadataService.getIssuer().then((function(o){return i.Log.debug("ResponseValidator._validateIdToken: Received issuer"),n._getSigningKeyForJwtWithSingleRetry(r).then((function(s){if(!s)return i.Log.error("ResponseValidator._validateIdToken: No key matching kid or alg found in signing keys"),Promise.reject(new Error("No key matching kid or alg found in signing keys"));var a=e.client_id,l=n._settings.clockSkew;return i.Log.debug("ResponseValidator._validateIdToken: Validaing JWT; using clock skew (in seconds) of: ",l),n._joseUtil.validateJwt(t.id_token,s,o,a,l).then((function(){return i.Log.debug("ResponseValidator._validateIdToken: JWT validation successful"),r.payload.sub?(t.profile=r.payload,t):(i.Log.error("ResponseValidator._validateIdToken: No sub present in id_token"),Promise.reject(new Error("No sub present in id_token")))}))}))})):(i.Log.error("ResponseValidator._validateIdToken: Failed to parse id_token",r),Promise.reject(new Error("Failed to parse id_token")))},e.prototype._filterByAlg=function(e,t){var n=null;if(t.startsWith("RS"))n="RSA";else if(t.startsWith("PS"))n="PS";else{if(!t.startsWith("ES"))return i.Log.debug("ResponseValidator._filterByAlg: alg not supported: ",t),[];n="EC"}return i.Log.debug("ResponseValidator._filterByAlg: Looking for keys that match kty: ",n),e=e.filter((function(e){return e.kty===n})),i.Log.debug("ResponseValidator._filterByAlg: Number of keys that match kty: ",n,e.length),e},e.prototype._validateAccessToken=function(e){if(!e.profile)return i.Log.error("ResponseValidator._validateAccessToken: No profile loaded from id_token"),Promise.reject(new Error("No profile loaded from id_token"));if(!e.profile.at_hash)return i.Log.error("ResponseValidator._validateAccessToken: No at_hash in id_token"),Promise.reject(new Error("No at_hash in id_token"));if(!e.id_token)return i.Log.error("ResponseValidator._validateAccessToken: No id_token"),Promise.reject(new Error("No id_token"));var t=this._joseUtil.parseJwt(e.id_token);if(!t||!t.header)return i.Log.error("ResponseValidator._validateAccessToken: Failed to parse id_token",t),Promise.reject(new Error("Failed to parse id_token"));var n=t.header.alg;if(!n||5!==n.length)return i.Log.error("ResponseValidator._validateAccessToken: Unsupported alg:",n),Promise.reject(new Error("Unsupported alg: "+n));var r=n.substr(2,3);if(!r)return i.Log.error("ResponseValidator._validateAccessToken: Unsupported alg:",n,r),Promise.reject(new Error("Unsupported alg: "+n));if(256!==(r=parseInt(r))&&384!==r&&512!==r)return i.Log.error("ResponseValidator._validateAccessToken: Unsupported alg:",n,r),Promise.reject(new Error("Unsupported alg: "+n));var o="sha"+r,s=this._joseUtil.hashString(e.access_token,o);if(!s)return i.Log.error("ResponseValidator._validateAccessToken: access_token hash failed:",o),Promise.reject(new Error("Failed to validate at_hash"));var a=s.substr(0,s.length/2),l=this._joseUtil.hexToBase64Url(a);return l!==e.profile.at_hash?(i.Log.error("ResponseValidator._validateAccessToken: Failed to validate at_hash",l,e.profile.at_hash),Promise.reject(new Error("Failed to validate at_hash"))):(i.Log.debug("ResponseValidator._validateAccessToken: success"),Promise.resolve(e))},e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserInfoService=void 0;var r=n(7),i=n(2),o=n(0),s=n(4);function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.UserInfoService=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r.JsonService,l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:i.MetadataService,c=arguments.length>3&&void 0!==arguments[3]?arguments[3]:s.JoseUtil;if(a(this,e),!t)throw o.Log.error("UserInfoService.ctor: No settings passed"),new Error("settings");this._settings=t,this._jsonService=new n(void 0,void 0,this._getClaimsFromJwt.bind(this)),this._metadataService=new l(this._settings),this._joseUtil=c}return e.prototype.getClaims=function(e){var t=this;return e?this._metadataService.getUserInfoEndpoint().then((function(n){return o.Log.debug("UserInfoService.getClaims: received userinfo url",n),t._jsonService.getJson(n,e).then((function(e){return o.Log.debug("UserInfoService.getClaims: claims received",e),e}))})):(o.Log.error("UserInfoService.getClaims: No token passed"),Promise.reject(new Error("A token is required")))},e.prototype._getClaimsFromJwt=function e(t){var n=this;try{var r=this._joseUtil.parseJwt(t.responseText);if(!r||!r.header||!r.payload)return o.Log.error("UserInfoService._getClaimsFromJwt: Failed to parse JWT",r),Promise.reject(new Error("Failed to parse id_token"));var i=r.header.kid,s=void 0;switch(this._settings.userInfoJwtIssuer){case"OP":s=this._metadataService.getIssuer();break;case"ANY":s=Promise.resolve(r.payload.iss);break;default:s=Promise.resolve(this._settings.userInfoJwtIssuer)}return s.then((function(e){return o.Log.debug("UserInfoService._getClaimsFromJwt: Received issuer:"+e),n._metadataService.getSigningKeys().then((function(s){if(!s)return o.Log.error("UserInfoService._getClaimsFromJwt: No signing keys from metadata"),Promise.reject(new Error("No signing keys from metadata"));o.Log.debug("UserInfoService._getClaimsFromJwt: Received signing keys");var a=void 0;if(i)a=s.filter((function(e){return e.kid===i}))[0];else{if((s=n._filterByAlg(s,r.header.alg)).length>1)return o.Log.error("UserInfoService._getClaimsFromJwt: No kid found in id_token and more than one key found in metadata"),Promise.reject(new Error("No kid found in id_token and more than one key found in metadata"));a=s[0]}if(!a)return o.Log.error("UserInfoService._getClaimsFromJwt: No key matching kid or alg found in signing keys"),Promise.reject(new Error("No key matching kid or alg found in signing keys"));var l=n._settings.client_id,c=n._settings.clockSkew;return o.Log.debug("UserInfoService._getClaimsFromJwt: Validaing JWT; using clock skew (in seconds) of: ",c),n._joseUtil.validateJwt(t.responseText,a,e,l,c,void 0,!0).then((function(){return o.Log.debug("UserInfoService._getClaimsFromJwt: JWT validation successful"),r.payload}))}))}))}catch(e){return o.Log.error("UserInfoService._getClaimsFromJwt: Error parsing JWT response",e.message),void reject(e)}},e.prototype._filterByAlg=function(e,t){var n=null;if(t.startsWith("RS"))n="RSA";else if(t.startsWith("PS"))n="PS";else{if(!t.startsWith("ES"))return o.Log.debug("UserInfoService._filterByAlg: alg not supported: ",t),[];n="EC"}return o.Log.debug("UserInfoService._filterByAlg: Looking for keys that match kty: ",n),e=e.filter((function(e){return e.kty===n})),o.Log.debug("UserInfoService._filterByAlg: Number of keys that match kty: ",n,e.length),e},e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AllowedSigningAlgs=t.b64tohex=t.hextob64u=t.crypto=t.X509=t.KeyUtil=t.jws=void 0;var r=n(27);t.jws=r.jws,t.KeyUtil=r.KEYUTIL,t.X509=r.X509,t.crypto=r.crypto,t.hextob64u=r.hextob64u,t.b64tohex=r.b64tohex,t.AllowedSigningAlgs=["RS256","RS384","RS512","PS256","PS384","PS512","ES256","ES384","ES512"]},function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r={userAgent:!1},i={}; +/*! +Copyright (c) 2011, Yahoo! Inc. All rights reserved. +Code licensed under the BSD License: +http://developer.yahoo.com/yui/license.html +version: 2.9.0 +*/if(void 0===o)var o={};o.lang={extend:function(e,t,n){if(!t||!e)throw new Error("YAHOO.lang.extend failed, please check that all dependencies are included.");var i=function(){};if(i.prototype=t.prototype,e.prototype=new i,e.prototype.constructor=e,e.superclass=t.prototype,t.prototype.constructor==Object.prototype.constructor&&(t.prototype.constructor=t),n){var o;for(o in n)e.prototype[o]=n[o];var s=function(){},a=["toString","valueOf"];try{/MSIE/.test(r.userAgent)&&(s=function(e,t){for(o=0;o>>2]>>>24-o%4*8&255;t[r+o>>>2]|=s<<24-(r+o)%4*8}else for(o=0;o>>2]=n[o>>>2];return this.sigBytes+=i,this},clamp:function(){var e=this.words,t=this.sigBytes;e[t>>>2]&=4294967295<<32-t%4*8,e.length=s.ceil(t/4)},clone:function(){var e=c.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],n=0;n>>2]>>>24-i%4*8&255;r.push((o>>>4).toString(16)),r.push((15&o).toString(16))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>3]|=parseInt(e.substr(r,2),16)<<24-r%8*4;return new u.init(n,t/2)}},p=d.Latin1={stringify:function(e){for(var t=e.words,n=e.sigBytes,r=[],i=0;i>>2]>>>24-i%4*8&255;r.push(String.fromCharCode(o))}return r.join("")},parse:function(e){for(var t=e.length,n=[],r=0;r>>2]|=(255&e.charCodeAt(r))<<24-r%4*8;return new u.init(n,t)}},f=d.Utf8={stringify:function(e){try{return decodeURIComponent(escape(p.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return p.parse(unescape(encodeURIComponent(e)))}},m=l.BufferedBlockAlgorithm=c.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=f.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(e){var t=this._data,n=t.words,r=t.sigBytes,i=this.blockSize,o=r/(4*i),a=(o=e?s.ceil(o):s.max((0|o)-this._minBufferSize,0))*i,l=s.min(4*a,r);if(a){for(var c=0;c>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,s=0;4>s&&i+.75*s>>6*(3-s)&63));if(t=r.charAt(64))for(;e.length%4;)e.push(t);return e.join("")},parse:function(e){var n=e.length,r=this._map;(i=r.charAt(64))&&-1!=(i=e.indexOf(i))&&(n=i);for(var i=[],o=0,s=0;s>>6-s%4*2;i[o>>>2]|=(a|l)<<24-o%4*8,o++}return t.create(i,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),function(e){for(var t=b,n=(i=t.lib).WordArray,r=i.Hasher,i=t.algo,o=[],s=[],a=function(e){return 4294967296*(e-(0|e))|0},l=2,c=0;64>c;){var u;e:{u=l;for(var d=e.sqrt(u),h=2;h<=d;h++)if(!(u%h)){u=!1;break e}u=!0}u&&(8>c&&(o[c]=a(e.pow(l,.5))),s[c]=a(e.pow(l,1/3)),c++),l++}var p=[];i=i.SHA256=r.extend({_doReset:function(){this._hash=new n.init(o.slice(0))},_doProcessBlock:function(e,t){for(var n=this._hash.words,r=n[0],i=n[1],o=n[2],a=n[3],l=n[4],c=n[5],u=n[6],d=n[7],h=0;64>h;h++){if(16>h)p[h]=0|e[t+h];else{var f=p[h-15],m=p[h-2];p[h]=((f<<25|f>>>7)^(f<<14|f>>>18)^f>>>3)+p[h-7]+((m<<15|m>>>17)^(m<<13|m>>>19)^m>>>10)+p[h-16]}f=d+((l<<26|l>>>6)^(l<<21|l>>>11)^(l<<7|l>>>25))+(l&c^~l&u)+s[h]+p[h],m=((r<<30|r>>>2)^(r<<19|r>>>13)^(r<<10|r>>>22))+(r&i^r&o^i&o),d=u,u=c,c=l,l=a+f|0,a=o,o=i,i=r,r=f+m|0}n[0]=n[0]+r|0,n[1]=n[1]+i|0,n[2]=n[2]+o|0,n[3]=n[3]+a|0,n[4]=n[4]+l|0,n[5]=n[5]+c|0,n[6]=n[6]+u|0,n[7]=n[7]+d|0},_doFinalize:function(){var t=this._data,n=t.words,r=8*this._nDataBytes,i=8*t.sigBytes;return n[i>>>5]|=128<<24-i%32,n[14+(i+64>>>9<<4)]=e.floor(r/4294967296),n[15+(i+64>>>9<<4)]=r,t.sigBytes=4*n.length,this._process(),this._hash},clone:function(){var e=r.clone.call(this);return e._hash=this._hash.clone(),e}}),t.SHA256=r._createHelper(i),t.HmacSHA256=r._createHmacHelper(i)}(Math),function(){function e(){return r.create.apply(r,arguments)}for(var t=b,n=t.lib.Hasher,r=(o=t.x64).Word,i=o.WordArray,o=t.algo,s=[e(1116352408,3609767458),e(1899447441,602891725),e(3049323471,3964484399),e(3921009573,2173295548),e(961987163,4081628472),e(1508970993,3053834265),e(2453635748,2937671579),e(2870763221,3664609560),e(3624381080,2734883394),e(310598401,1164996542),e(607225278,1323610764),e(1426881987,3590304994),e(1925078388,4068182383),e(2162078206,991336113),e(2614888103,633803317),e(3248222580,3479774868),e(3835390401,2666613458),e(4022224774,944711139),e(264347078,2341262773),e(604807628,2007800933),e(770255983,1495990901),e(1249150122,1856431235),e(1555081692,3175218132),e(1996064986,2198950837),e(2554220882,3999719339),e(2821834349,766784016),e(2952996808,2566594879),e(3210313671,3203337956),e(3336571891,1034457026),e(3584528711,2466948901),e(113926993,3758326383),e(338241895,168717936),e(666307205,1188179964),e(773529912,1546045734),e(1294757372,1522805485),e(1396182291,2643833823),e(1695183700,2343527390),e(1986661051,1014477480),e(2177026350,1206759142),e(2456956037,344077627),e(2730485921,1290863460),e(2820302411,3158454273),e(3259730800,3505952657),e(3345764771,106217008),e(3516065817,3606008344),e(3600352804,1432725776),e(4094571909,1467031594),e(275423344,851169720),e(430227734,3100823752),e(506948616,1363258195),e(659060556,3750685593),e(883997877,3785050280),e(958139571,3318307427),e(1322822218,3812723403),e(1537002063,2003034995),e(1747873779,3602036899),e(1955562222,1575990012),e(2024104815,1125592928),e(2227730452,2716904306),e(2361852424,442776044),e(2428436474,593698344),e(2756734187,3733110249),e(3204031479,2999351573),e(3329325298,3815920427),e(3391569614,3928383900),e(3515267271,566280711),e(3940187606,3454069534),e(4118630271,4000239992),e(116418474,1914138554),e(174292421,2731055270),e(289380356,3203993006),e(460393269,320620315),e(685471733,587496836),e(852142971,1086792851),e(1017036298,365543100),e(1126000580,2618297676),e(1288033470,3409855158),e(1501505948,4234509866),e(1607167915,987167468),e(1816402316,1246189591)],a=[],l=0;80>l;l++)a[l]=e();o=o.SHA512=n.extend({_doReset:function(){this._hash=new i.init([new r.init(1779033703,4089235720),new r.init(3144134277,2227873595),new r.init(1013904242,4271175723),new r.init(2773480762,1595750129),new r.init(1359893119,2917565137),new r.init(2600822924,725511199),new r.init(528734635,4215389547),new r.init(1541459225,327033209)])},_doProcessBlock:function(e,t){for(var n=(d=this._hash.words)[0],r=d[1],i=d[2],o=d[3],l=d[4],c=d[5],u=d[6],d=d[7],h=n.high,p=n.low,f=r.high,m=r.low,g=i.high,b=i.low,v=o.high,y=o.low,_=l.high,S=l.low,x=c.high,w=c.low,k=u.high,O=u.low,E=d.high,A=d.low,T=h,C=p,M=f,P=m,$=g,R=b,I=v,D=y,N=_,j=S,L=x,B=w,F=k,z=O,U=E,Q=A,q=0;80>q;q++){var H=a[q];if(16>q)var G=H.high=0|e[t+2*q],V=H.low=0|e[t+2*q+1];else{G=((V=(G=a[q-15]).high)>>>1|(W=G.low)<<31)^(V>>>8|W<<24)^V>>>7;var W=(W>>>1|V<<31)^(W>>>8|V<<24)^(W>>>7|V<<25),X=((V=(X=a[q-2]).high)>>>19|(Y=X.low)<<13)^(V<<3|Y>>>29)^V>>>6,Y=(Y>>>19|V<<13)^(Y<<3|V>>>29)^(Y>>>6|V<<26),Z=(V=a[q-7]).high,J=(K=a[q-16]).high,K=K.low;G=(G=(G=G+Z+((V=W+V.low)>>>0>>0?1:0))+X+((V+=Y)>>>0>>0?1:0))+J+((V+=K)>>>0>>0?1:0),H.high=G,H.low=V}Z=N&L^~N&F,K=j&B^~j&z,H=T&M^T&$^M&$;var ee=C&P^C&R^P&R,te=(W=(T>>>28|C<<4)^(T<<30|C>>>2)^(T<<25|C>>>7),X=(C>>>28|T<<4)^(C<<30|T>>>2)^(C<<25|T>>>7),(Y=s[q]).high),ne=Y.low;J=U+((N>>>14|j<<18)^(N>>>18|j<<14)^(N<<23|j>>>9))+((Y=Q+((j>>>14|N<<18)^(j>>>18|N<<14)^(j<<23|N>>>9)))>>>0>>0?1:0),U=F,Q=z,F=L,z=B,L=N,B=j,N=I+(J=(J=(J=J+Z+((Y+=K)>>>0>>0?1:0))+te+((Y+=ne)>>>0>>0?1:0))+G+((Y+=V)>>>0>>0?1:0))+((j=D+Y|0)>>>0>>0?1:0)|0,I=$,D=R,$=M,R=P,M=T,P=C,T=J+(H=W+H+((V=X+ee)>>>0>>0?1:0))+((C=Y+V|0)>>>0>>0?1:0)|0}p=n.low=p+C,n.high=h+T+(p>>>0>>0?1:0),m=r.low=m+P,r.high=f+M+(m>>>0

>>0?1:0),b=i.low=b+R,i.high=g+$+(b>>>0>>0?1:0),y=o.low=y+D,o.high=v+I+(y>>>0>>0?1:0),S=l.low=S+j,l.high=_+N+(S>>>0>>0?1:0),w=c.low=w+B,c.high=x+L+(w>>>0>>0?1:0),O=u.low=O+z,u.high=k+F+(O>>>0>>0?1:0),A=d.low=A+Q,d.high=E+U+(A>>>0>>0?1:0)},_doFinalize:function(){var e=this._data,t=e.words,n=8*this._nDataBytes,r=8*e.sigBytes;return t[r>>>5]|=128<<24-r%32,t[30+(r+128>>>10<<5)]=Math.floor(n/4294967296),t[31+(r+128>>>10<<5)]=n,e.sigBytes=4*t.length,this._process(),this._hash.toX32()},clone:function(){var e=n.clone.call(this);return e._hash=this._hash.clone(),e},blockSize:32}),t.SHA512=n._createHelper(o),t.HmacSHA512=n._createHmacHelper(o)}(),function(){var e=b,t=(i=e.x64).Word,n=i.WordArray,r=(i=e.algo).SHA512,i=i.SHA384=r.extend({_doReset:function(){this._hash=new n.init([new t.init(3418070365,3238371032),new t.init(1654270250,914150663),new t.init(2438529370,812702999),new t.init(355462360,4144912697),new t.init(1731405415,4290775857),new t.init(2394180231,1750603025),new t.init(3675008525,1694076839),new t.init(1203062813,3204075428)])},_doFinalize:function(){var e=r._doFinalize.call(this);return e.sigBytes-=16,e}});e.SHA384=r._createHelper(i),e.HmacSHA384=r._createHmacHelper(i)}(); +/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/ + */ +var v,y="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function _(e){var t,n,r="";for(t=0;t+3<=e.length;t+=3)n=parseInt(e.substring(t,t+3),16),r+=y.charAt(n>>6)+y.charAt(63&n);for(t+1==e.length?(n=parseInt(e.substring(t,t+1),16),r+=y.charAt(n<<2)):t+2==e.length&&(n=parseInt(e.substring(t,t+2),16),r+=y.charAt(n>>2)+y.charAt((3&n)<<4));(3&r.length)>0;)r+="=";return r}function S(e){var t,n,r,i="",o=0;for(t=0;t>2),n=3&r,o=1):1==o?(i+=T(n<<2|r>>4),n=15&r,o=2):2==o?(i+=T(n),i+=T(r>>2),n=3&r,o=3):(i+=T(n<<2|r>>4),i+=T(15&r),o=0));return 1==o&&(i+=T(n<<2)),i}function x(e){var t,n=S(e),r=new Array;for(t=0;2*t>15;--o>=0;){var l=32767&this[e],c=this[e++]>>15,u=a*l+c*s;i=((l=s*l+((32767&u)<<15)+n[r]+(1073741823&i))>>>30)+(u>>>15)+a*c+(i>>>30),n[r++]=1073741823&l}return i},v=30):"Netscape"!=r.appName?(w.prototype.am=function(e,t,n,r,i,o){for(;--o>=0;){var s=t*this[e++]+n[r]+i;i=Math.floor(s/67108864),n[r++]=67108863&s}return i},v=26):(w.prototype.am=function(e,t,n,r,i,o){for(var s=16383&t,a=t>>14;--o>=0;){var l=16383&this[e],c=this[e++]>>14,u=a*l+c*s;i=((l=s*l+((16383&u)<<14)+n[r]+i)>>28)+(u>>14)+a*c,n[r++]=268435455&l}return i},v=28),w.prototype.DB=v,w.prototype.DM=(1<>>16)&&(e=t,n+=16),0!=(t=e>>8)&&(e=t,n+=8),0!=(t=e>>4)&&(e=t,n+=4),0!=(t=e>>2)&&(e=t,n+=2),0!=(t=e>>1)&&(e=t,n+=1),n}function $(e){this.m=e}function R(e){this.m=e,this.mp=e.invDigit(),this.mpl=32767&this.mp,this.mph=this.mp>>15,this.um=(1<>=16,t+=16),0==(255&e)&&(e>>=8,t+=8),0==(15&e)&&(e>>=4,t+=4),0==(3&e)&&(e>>=2,t+=2),0==(1&e)&&++t,t}function B(e){for(var t=0;0!=e;)e&=e-1,++t;return t}function F(){}function z(e){return e}function U(e){this.r2=k(),this.q3=k(),w.ONE.dlShiftTo(2*e.t,this.r2),this.mu=this.r2.divide(e),this.m=e}$.prototype.convert=function(e){return e.s<0||e.compareTo(this.m)>=0?e.mod(this.m):e},$.prototype.revert=function(e){return e},$.prototype.reduce=function(e){e.divRemTo(this.m,null,e)},$.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},$.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},R.prototype.convert=function(e){var t=k();return e.abs().dlShiftTo(this.m.t,t),t.divRemTo(this.m,null,t),e.s<0&&t.compareTo(w.ZERO)>0&&this.m.subTo(t,t),t},R.prototype.revert=function(e){var t=k();return e.copyTo(t),this.reduce(t),t},R.prototype.reduce=function(e){for(;e.t<=this.mt2;)e[e.t++]=0;for(var t=0;t>15)*this.mpl&this.um)<<15)&e.DM;for(e[n=t+this.m.t]+=this.m.am(0,r,e,t,0,this.m.t);e[n]>=e.DV;)e[n]-=e.DV,e[++n]++}e.clamp(),e.drShiftTo(this.m.t,e),e.compareTo(this.m)>=0&&e.subTo(this.m,e)},R.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},R.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)},w.prototype.copyTo=function(e){for(var t=this.t-1;t>=0;--t)e[t]=this[t];e.t=this.t,e.s=this.s},w.prototype.fromInt=function(e){this.t=1,this.s=e<0?-1:0,e>0?this[0]=e:e<-1?this[0]=e+this.DV:this.t=0},w.prototype.fromString=function(e,t){var n;if(16==t)n=4;else if(8==t)n=3;else if(256==t)n=8;else if(2==t)n=1;else if(32==t)n=5;else{if(4!=t)return void this.fromRadix(e,t);n=2}this.t=0,this.s=0;for(var r=e.length,i=!1,o=0;--r>=0;){var s=8==n?255&e[r]:C(e,r);s<0?"-"==e.charAt(r)&&(i=!0):(i=!1,0==o?this[this.t++]=s:o+n>this.DB?(this[this.t-1]|=(s&(1<>this.DB-o):this[this.t-1]|=s<=this.DB&&(o-=this.DB))}8==n&&0!=(128&e[0])&&(this.s=-1,o>0&&(this[this.t-1]|=(1<0&&this[this.t-1]==e;)--this.t},w.prototype.dlShiftTo=function(e,t){var n;for(n=this.t-1;n>=0;--n)t[n+e]=this[n];for(n=e-1;n>=0;--n)t[n]=0;t.t=this.t+e,t.s=this.s},w.prototype.drShiftTo=function(e,t){for(var n=e;n=0;--n)t[n+s+1]=this[n]>>i|a,a=(this[n]&o)<=0;--n)t[n]=0;t[s]=a,t.t=this.t+s+1,t.s=this.s,t.clamp()},w.prototype.rShiftTo=function(e,t){t.s=this.s;var n=Math.floor(e/this.DB);if(n>=this.t)t.t=0;else{var r=e%this.DB,i=this.DB-r,o=(1<>r;for(var s=n+1;s>r;r>0&&(t[this.t-n-1]|=(this.s&o)<>=this.DB;if(e.t>=this.DB;r+=this.s}else{for(r+=this.s;n>=this.DB;r-=e.s}t.s=r<0?-1:0,r<-1?t[n++]=this.DV+r:r>0&&(t[n++]=r),t.t=n,t.clamp()},w.prototype.multiplyTo=function(e,t){var n=this.abs(),r=e.abs(),i=n.t;for(t.t=i+r.t;--i>=0;)t[i]=0;for(i=0;i=0;)e[n]=0;for(n=0;n=t.DV&&(e[n+t.t]-=t.DV,e[n+t.t+1]=1)}e.t>0&&(e[e.t-1]+=t.am(n,t[n],e,2*n,0,1)),e.s=0,e.clamp()},w.prototype.divRemTo=function(e,t,n){var r=e.abs();if(!(r.t<=0)){var i=this.abs();if(i.t0?(r.lShiftTo(l,o),i.lShiftTo(l,n)):(r.copyTo(o),i.copyTo(n));var c=o.t,u=o[c-1];if(0!=u){var d=u*(1<1?o[c-2]>>this.F2:0),h=this.FV/d,p=(1<=0&&(n[n.t++]=1,n.subTo(b,n)),w.ONE.dlShiftTo(c,b),b.subTo(o,o);o.t=0;){var v=n[--m]==u?this.DM:Math.floor(n[m]*h+(n[m-1]+f)*p);if((n[m]+=o.am(0,v,n,g,0,c))0&&n.rShiftTo(l,n),s<0&&w.ZERO.subTo(n,n)}}},w.prototype.invDigit=function(){if(this.t<1)return 0;var e=this[0];if(0==(1&e))return 0;var t=3&e;return(t=(t=(t=(t=t*(2-(15&e)*t)&15)*(2-(255&e)*t)&255)*(2-((65535&e)*t&65535))&65535)*(2-e*t%this.DV)%this.DV)>0?this.DV-t:-t},w.prototype.isEven=function(){return 0==(this.t>0?1&this[0]:this.s)},w.prototype.exp=function(e,t){if(e>4294967295||e<1)return w.ONE;var n=k(),r=k(),i=t.convert(this),o=P(e)-1;for(i.copyTo(n);--o>=0;)if(t.sqrTo(n,r),(e&1<0)t.mulTo(r,i,n);else{var s=n;n=r,r=s}return t.revert(n)},w.prototype.toString=function(e){if(this.s<0)return"-"+this.negate().toString(e);var t;if(16==e)t=4;else if(8==e)t=3;else if(2==e)t=1;else if(32==e)t=5;else{if(4!=e)return this.toRadix(e);t=2}var n,r=(1<0)for(a>a)>0&&(i=!0,o=T(n));s>=0;)a>(a+=this.DB-t)):(n=this[s]>>(a-=t)&r,a<=0&&(a+=this.DB,--s)),n>0&&(i=!0),i&&(o+=T(n));return i?o:"0"},w.prototype.negate=function(){var e=k();return w.ZERO.subTo(this,e),e},w.prototype.abs=function(){return this.s<0?this.negate():this},w.prototype.compareTo=function(e){var t=this.s-e.s;if(0!=t)return t;var n=this.t;if(0!=(t=n-e.t))return this.s<0?-t:t;for(;--n>=0;)if(0!=(t=this[n]-e[n]))return t;return 0},w.prototype.bitLength=function(){return this.t<=0?0:this.DB*(this.t-1)+P(this[this.t-1]^this.s&this.DM)},w.prototype.mod=function(e){var t=k();return this.abs().divRemTo(e,null,t),this.s<0&&t.compareTo(w.ZERO)>0&&e.subTo(t,t),t},w.prototype.modPowInt=function(e,t){var n;return n=e<256||t.isEven()?new $(t):new R(t),this.exp(e,n)},w.ZERO=M(0),w.ONE=M(1),F.prototype.convert=z,F.prototype.revert=z,F.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n)},F.prototype.sqrTo=function(e,t){e.squareTo(t)},U.prototype.convert=function(e){if(e.s<0||e.t>2*this.m.t)return e.mod(this.m);if(e.compareTo(this.m)<0)return e;var t=k();return e.copyTo(t),this.reduce(t),t},U.prototype.revert=function(e){return e},U.prototype.reduce=function(e){for(e.drShiftTo(this.m.t-1,this.r2),e.t>this.m.t+1&&(e.t=this.m.t+1,e.clamp()),this.mu.multiplyUpperTo(this.r2,this.m.t+1,this.q3),this.m.multiplyLowerTo(this.q3,this.m.t+1,this.r2);e.compareTo(this.r2)<0;)e.dAddOffset(1,this.m.t+1);for(e.subTo(this.r2,e);e.compareTo(this.m)>=0;)e.subTo(this.m,e)},U.prototype.mulTo=function(e,t,n){e.multiplyTo(t,n),this.reduce(n)},U.prototype.sqrTo=function(e,t){e.squareTo(t),this.reduce(t)};var Q,q,H,G=[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],V=(1<<26)/G[G.length-1]; +/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/ + */function W(){this.i=0,this.j=0,this.S=new Array} +/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/ + */ +function X(){!function(e){q[H++]^=255&e,q[H++]^=e>>8&255,q[H++]^=e>>16&255,q[H++]^=e>>24&255,H>=256&&(H-=256)}((new Date).getTime())}if(w.prototype.chunkSize=function(e){return Math.floor(Math.LN2*this.DB/Math.log(e))},w.prototype.toRadix=function(e){if(null==e&&(e=10),0==this.signum()||e<2||e>36)return"0";var t=this.chunkSize(e),n=Math.pow(e,t),r=M(n),i=k(),o=k(),s="";for(this.divRemTo(r,i,o);i.signum()>0;)s=(n+o.intValue()).toString(e).substr(1)+s,i.divRemTo(r,i,o);return o.intValue().toString(e)+s},w.prototype.fromRadix=function(e,t){this.fromInt(0),null==t&&(t=10);for(var n=this.chunkSize(t),r=Math.pow(t,n),i=!1,o=0,s=0,a=0;a=n&&(this.dMultiply(r),this.dAddOffset(s,0),o=0,s=0))}o>0&&(this.dMultiply(Math.pow(t,o)),this.dAddOffset(s,0)),i&&w.ZERO.subTo(this,this)},w.prototype.fromNumber=function(e,t,n){if("number"==typeof t)if(e<2)this.fromInt(1);else for(this.fromNumber(e,n),this.testBit(e-1)||this.bitwiseTo(w.ONE.shiftLeft(e-1),D,this),this.isEven()&&this.dAddOffset(1,0);!this.isProbablePrime(t);)this.dAddOffset(2,0),this.bitLength()>e&&this.subTo(w.ONE.shiftLeft(e-1),this);else{var r=new Array,i=7&e;r.length=1+(e>>3),t.nextBytes(r),i>0?r[0]&=(1<>=this.DB;if(e.t>=this.DB;r+=this.s}else{for(r+=this.s;n>=this.DB;r+=e.s}t.s=r<0?-1:0,r>0?t[n++]=r:r<-1&&(t[n++]=this.DV+r),t.t=n,t.clamp()},w.prototype.dMultiply=function(e){this[this.t]=this.am(0,e-1,this,0,0,this.t),++this.t,this.clamp()},w.prototype.dAddOffset=function(e,t){if(0!=e){for(;this.t<=t;)this[this.t++]=0;for(this[t]+=e;this[t]>=this.DV;)this[t]-=this.DV,++t>=this.t&&(this[this.t++]=0),++this[t]}},w.prototype.multiplyLowerTo=function(e,t,n){var r,i=Math.min(this.t+e.t,t);for(n.s=0,n.t=i;i>0;)n[--i]=0;for(r=n.t-this.t;i=0;)n[r]=0;for(r=Math.max(t-this.t,0);r0)if(0==t)n=this[0]%e;else for(var r=this.t-1;r>=0;--r)n=(t*n+this[r])%e;return n},w.prototype.millerRabin=function(e){var t=this.subtract(w.ONE),n=t.getLowestSetBit();if(n<=0)return!1;var r=t.shiftRight(n);(e=e+1>>1)>G.length&&(e=G.length);for(var i=k(),o=0;o>24},w.prototype.shortValue=function(){return 0==this.t?this.s:this[0]<<16>>16},w.prototype.signum=function(){return this.s<0?-1:this.t<=0||1==this.t&&this[0]<=0?0:1},w.prototype.toByteArray=function(){var e=this.t,t=new Array;t[0]=this.s;var n,r=this.DB-e*this.DB%8,i=0;if(e-- >0)for(r>r)!=(this.s&this.DM)>>r&&(t[i++]=n|this.s<=0;)r<8?(n=(this[e]&(1<>(r+=this.DB-8)):(n=this[e]>>(r-=8)&255,r<=0&&(r+=this.DB,--e)),0!=(128&n)&&(n|=-256),0==i&&(128&this.s)!=(128&n)&&++i,(i>0||n!=this.s)&&(t[i++]=n);return t},w.prototype.equals=function(e){return 0==this.compareTo(e)},w.prototype.min=function(e){return this.compareTo(e)<0?this:e},w.prototype.max=function(e){return this.compareTo(e)>0?this:e},w.prototype.and=function(e){var t=k();return this.bitwiseTo(e,I,t),t},w.prototype.or=function(e){var t=k();return this.bitwiseTo(e,D,t),t},w.prototype.xor=function(e){var t=k();return this.bitwiseTo(e,N,t),t},w.prototype.andNot=function(e){var t=k();return this.bitwiseTo(e,j,t),t},w.prototype.not=function(){for(var e=k(),t=0;t=this.t?0!=this.s:0!=(this[t]&1<1){var u=k();for(r.sqrTo(s[1],u);a<=c;)s[a]=k(),r.mulTo(u,s[a-2],s[a]),a+=2}var d,h,p=e.t-1,f=!0,m=k();for(i=P(e[p])-1;p>=0;){for(i>=l?d=e[p]>>i-l&c:(d=(e[p]&(1<0&&(d|=e[p-1]>>this.DB+i-l)),a=n;0==(1&d);)d>>=1,--a;if((i-=a)<0&&(i+=this.DB,--p),f)s[d].copyTo(o),f=!1;else{for(;a>1;)r.sqrTo(o,m),r.sqrTo(m,o),a-=2;a>0?r.sqrTo(o,m):(h=o,o=m,m=h),r.mulTo(m,s[d],o)}for(;p>=0&&0==(e[p]&1<=0?(n.subTo(r,n),t&&i.subTo(s,i),o.subTo(a,o)):(r.subTo(n,r),t&&s.subTo(i,s),a.subTo(o,a))}return 0!=r.compareTo(w.ONE)?w.ZERO:a.compareTo(e)>=0?a.subtract(e):a.signum()<0?(a.addTo(e,a),a.signum()<0?a.add(e):a):a},w.prototype.pow=function(e){return this.exp(e,new F)},w.prototype.gcd=function(e){var t=this.s<0?this.negate():this.clone(),n=e.s<0?e.negate():e.clone();if(t.compareTo(n)<0){var r=t;t=n,n=r}var i=t.getLowestSetBit(),o=n.getLowestSetBit();if(o<0)return t;for(i0&&(t.rShiftTo(o,t),n.rShiftTo(o,n));t.signum()>0;)(i=t.getLowestSetBit())>0&&t.rShiftTo(i,t),(i=n.getLowestSetBit())>0&&n.rShiftTo(i,n),t.compareTo(n)>=0?(t.subTo(n,t),t.rShiftTo(1,t)):(n.subTo(t,n),n.rShiftTo(1,n));return o>0&&n.lShiftTo(o,n),n},w.prototype.isProbablePrime=function(e){var t,n=this.abs();if(1==n.t&&n[0]<=G[G.length-1]){for(t=0;t>>8,q[H++]=255&Y;H=0,X()}function ee(){if(null==Q){for(X(),(Q=new W).init(q),H=0;H>24,(16711680&i)>>16,(65280&i)>>8,255&i]))),i+=1;return r}function ie(){this.n=null,this.e=0,this.d=null,this.p=null,this.q=null,this.dmp1=null,this.dmq1=null,this.coeff=null} +/*! (c) Tom Wu | http://www-cs-students.stanford.edu/~tjw/jsbn/ + */function oe(e,t){this.x=t,this.q=e}function se(e,t,n,r){this.curve=e,this.x=t,this.y=n,this.z=null==r?w.ONE:r,this.zinv=null}function ae(e,t,n){this.q=e,this.a=this.fromBigInteger(t),this.b=this.fromBigInteger(n),this.infinity=new se(this,null,null)}te.prototype.nextBytes=function(e){var t;for(t=0;t0&&t.length>0))throw"Invalid RSA public key";this.n=ne(e,16),this.e=parseInt(t,16)}},ie.prototype.encrypt=function(e){var t=function(e,t){if(t=0&&t>0;){var i=e.charCodeAt(r--);i<128?n[--t]=i:i>127&&i<2048?(n[--t]=63&i|128,n[--t]=i>>6|192):(n[--t]=63&i|128,n[--t]=i>>6&63|128,n[--t]=i>>12|224)}n[--t]=0;for(var o=new te,s=new Array;t>2;){for(s[0]=0;0==s[0];)o.nextBytes(s);n[--t]=s[0]}return n[--t]=2,n[--t]=0,new w(n)}(e,this.n.bitLength()+7>>3);if(null==t)return null;var n=this.doPublic(t);if(null==n)return null;var r=n.toString(16);return 0==(1&r.length)?r:"0"+r},ie.prototype.encryptOAEP=function(e,t,n){var r=function(e,t,n,r){var i=ce.crypto.MessageDigest,o=ce.crypto.Util,s=null;if(n||(n="sha1"),"string"==typeof n&&(s=i.getCanonicalAlgName(n),r=i.getHashLength(s),n=function(e){return we(o.hashHex(ke(e),s))}),e.length+2*r+2>t)throw"Message too long for RSA";var a,l="";for(a=0;a>3,t,n);if(null==r)return null;var i=this.doPublic(r);if(null==i)return null;var o=i.toString(16);return 0==(1&o.length)?o:"0"+o},ie.prototype.type="RSA",oe.prototype.equals=function(e){return e==this||this.q.equals(e.q)&&this.x.equals(e.x)},oe.prototype.toBigInteger=function(){return this.x},oe.prototype.negate=function(){return new oe(this.q,this.x.negate().mod(this.q))},oe.prototype.add=function(e){return new oe(this.q,this.x.add(e.toBigInteger()).mod(this.q))},oe.prototype.subtract=function(e){return new oe(this.q,this.x.subtract(e.toBigInteger()).mod(this.q))},oe.prototype.multiply=function(e){return new oe(this.q,this.x.multiply(e.toBigInteger()).mod(this.q))},oe.prototype.square=function(){return new oe(this.q,this.x.square().mod(this.q))},oe.prototype.divide=function(e){return new oe(this.q,this.x.multiply(e.toBigInteger().modInverse(this.q)).mod(this.q))},se.prototype.getX=function(){return null==this.zinv&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.x.toBigInteger().multiply(this.zinv).mod(this.curve.q))},se.prototype.getY=function(){return null==this.zinv&&(this.zinv=this.z.modInverse(this.curve.q)),this.curve.fromBigInteger(this.y.toBigInteger().multiply(this.zinv).mod(this.curve.q))},se.prototype.equals=function(e){return e==this||(this.isInfinity()?e.isInfinity():e.isInfinity()?this.isInfinity():!!e.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(e.z)).mod(this.curve.q).equals(w.ZERO)&&e.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(e.z)).mod(this.curve.q).equals(w.ZERO))},se.prototype.isInfinity=function(){return null==this.x&&null==this.y||this.z.equals(w.ZERO)&&!this.y.toBigInteger().equals(w.ZERO)},se.prototype.negate=function(){return new se(this.curve,this.x,this.y.negate(),this.z)},se.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.y.toBigInteger().multiply(this.z).subtract(this.y.toBigInteger().multiply(e.z)).mod(this.curve.q),n=e.x.toBigInteger().multiply(this.z).subtract(this.x.toBigInteger().multiply(e.z)).mod(this.curve.q);if(w.ZERO.equals(n))return w.ZERO.equals(t)?this.twice():this.curve.getInfinity();var r=new w("3"),i=this.x.toBigInteger(),o=this.y.toBigInteger(),s=(e.x.toBigInteger(),e.y.toBigInteger(),n.square()),a=s.multiply(n),l=i.multiply(s),c=t.square().multiply(this.z),u=c.subtract(l.shiftLeft(1)).multiply(e.z).subtract(a).multiply(n).mod(this.curve.q),d=l.multiply(r).multiply(t).subtract(o.multiply(a)).subtract(c.multiply(t)).multiply(e.z).add(t.multiply(a)).mod(this.curve.q),h=a.multiply(this.z).multiply(e.z).mod(this.curve.q);return new se(this.curve,this.curve.fromBigInteger(u),this.curve.fromBigInteger(d),h)},se.prototype.twice=function(){if(this.isInfinity())return this;if(0==this.y.toBigInteger().signum())return this.curve.getInfinity();var e=new w("3"),t=this.x.toBigInteger(),n=this.y.toBigInteger(),r=n.multiply(this.z),i=r.multiply(n).mod(this.curve.q),o=this.curve.a.toBigInteger(),s=t.square().multiply(e);w.ZERO.equals(o)||(s=s.add(this.z.square().multiply(o)));var a=(s=s.mod(this.curve.q)).square().subtract(t.shiftLeft(3).multiply(i)).shiftLeft(1).multiply(r).mod(this.curve.q),l=s.multiply(e).multiply(t).subtract(i.shiftLeft(1)).shiftLeft(2).multiply(i).subtract(s.square().multiply(s)).mod(this.curve.q),c=r.square().multiply(r).shiftLeft(3).mod(this.curve.q);return new se(this.curve,this.curve.fromBigInteger(a),this.curve.fromBigInteger(l),c)},se.prototype.multiply=function(e){if(this.isInfinity())return this;if(0==e.signum())return this.curve.getInfinity();var t,n=e,r=n.multiply(new w("3")),i=this.negate(),o=this,s=this.curve.q.subtract(e),a=s.multiply(new w("3")),l=new se(this.curve,this.x,this.y),c=l.negate();for(t=r.bitLength()-2;t>0;--t){o=o.twice();var u=r.testBit(t);u!=n.testBit(t)&&(o=o.add(u?this:i))}for(t=a.bitLength()-2;t>0;--t){l=l.twice();var d=a.testBit(t);d!=s.testBit(t)&&(l=l.add(d?l:c))}return o},se.prototype.multiplyTwo=function(e,t,n){var r;r=e.bitLength()>n.bitLength()?e.bitLength()-1:n.bitLength()-1;for(var i=this.curve.getInfinity(),o=this.add(t);r>=0;)i=i.twice(),e.testBit(r)?i=n.testBit(r)?i.add(o):i.add(this):n.testBit(r)&&(i=i.add(t)),--r;return i},ae.prototype.getQ=function(){return this.q},ae.prototype.getA=function(){return this.a},ae.prototype.getB=function(){return this.b},ae.prototype.equals=function(e){return e==this||this.q.equals(e.q)&&this.a.equals(e.a)&&this.b.equals(e.b)},ae.prototype.getInfinity=function(){return this.infinity},ae.prototype.fromBigInteger=function(e){return new oe(this.q,e)},ae.prototype.decodePointHex=function(e){switch(parseInt(e.substr(0,2),16)){case 0:return this.infinity;case 2:case 3:return null;case 4:case 6:case 7:var t=(e.length-2)/2,n=e.substr(2,t),r=e.substr(t+2,t);return new se(this,this.fromBigInteger(new w(n,16)),this.fromBigInteger(new w(r,16)));default:return null}}, +/*! (c) Stefan Thomas | https://github.com/bitcoinjs/bitcoinjs-lib + */ +oe.prototype.getByteLength=function(){return Math.floor((this.toBigInteger().bitLength()+7)/8)},se.prototype.getEncoded=function(e){var t=function(e,t){var n=e.toByteArrayUnsigned();if(tn.length;)n.unshift(0);return n},n=this.getX().toBigInteger(),r=this.getY().toBigInteger(),i=t(n,32);return e?r.isEven()?i.unshift(2):i.unshift(3):(i.unshift(4),i=i.concat(t(r,32))),i},se.decodeFrom=function(e,t){t[0];var n=t.length-1,r=t.slice(1,1+n/2),i=t.slice(1+n/2,1+n);r.unshift(0),i.unshift(0);var o=new w(r),s=new w(i);return new se(e,e.fromBigInteger(o),e.fromBigInteger(s))},se.decodeFromHex=function(e,t){t.substr(0,2);var n=t.length-2,r=t.substr(2,n/2),i=t.substr(2+n/2,n/2),o=new w(r,16),s=new w(i,16);return new se(e,e.fromBigInteger(o),e.fromBigInteger(s))},se.prototype.add2D=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;if(this.x.equals(e.x))return this.y.equals(e.y)?this.twice():this.curve.getInfinity();var t=e.x.subtract(this.x),n=e.y.subtract(this.y).divide(t),r=n.square().subtract(this.x).subtract(e.x),i=n.multiply(this.x.subtract(r)).subtract(this.y);return new se(this.curve,r,i)},se.prototype.twice2D=function(){if(this.isInfinity())return this;if(0==this.y.toBigInteger().signum())return this.curve.getInfinity();var e=this.curve.fromBigInteger(w.valueOf(2)),t=this.curve.fromBigInteger(w.valueOf(3)),n=this.x.square().multiply(t).add(this.curve.a).divide(this.y.multiply(e)),r=n.square().subtract(this.x.multiply(e)),i=n.multiply(this.x.subtract(r)).subtract(this.y);return new se(this.curve,r,i)},se.prototype.multiply2D=function(e){if(this.isInfinity())return this;if(0==e.signum())return this.curve.getInfinity();var t,n=e,r=n.multiply(new w("3")),i=this.negate(),o=this;for(t=r.bitLength()-2;t>0;--t){o=o.twice();var s=r.testBit(t);s!=n.testBit(t)&&(o=o.add2D(s?this:i))}return o},se.prototype.isOnCurve=function(){var e=this.getX().toBigInteger(),t=this.getY().toBigInteger(),n=this.curve.getA().toBigInteger(),r=this.curve.getB().toBigInteger(),i=this.curve.getQ(),o=t.multiply(t).mod(i),s=e.multiply(e).multiply(e).add(n.multiply(e)).add(r).mod(i);return o.equals(s)},se.prototype.toString=function(){return"("+this.getX().toBigInteger().toString()+","+this.getY().toBigInteger().toString()+")"},se.prototype.validate=function(){var e=this.curve.getQ();if(this.isInfinity())throw new Error("Point is at infinity.");var t=this.getX().toBigInteger(),n=this.getY().toBigInteger();if(t.compareTo(w.ONE)<0||t.compareTo(e.subtract(w.ONE))>0)throw new Error("x coordinate out of bounds");if(n.compareTo(w.ONE)<0||n.compareTo(e.subtract(w.ONE))>0)throw new Error("y coordinate out of bounds");if(!this.isOnCurve())throw new Error("Point is not on the curve.");if(this.multiply(e).isInfinity())throw new Error("Point is not a scalar multiple of G.");return!0}; +/*! Mike Samuel (c) 2009 | code.google.com/p/json-sans-eval + */ +var le=function(){var e=new RegExp('(?:false|true|null|[\\{\\}\\[\\]]|(?:-?\\b(?:0|[1-9][0-9]*)(?:\\.[0-9]+)?(?:[eE][+-]?[0-9]+)?\\b)|(?:"(?:[^\\0-\\x08\\x0a-\\x1f"\\\\]|\\\\(?:["/\\\\bfnrt]|u[0-9A-Fa-f]{4}))*"))',"g"),t=new RegExp("\\\\(?:([^u])|u(.{4}))","g"),r={'"':'"',"/":"/","\\":"\\",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"};function i(e,t,n){return t?r[t]:String.fromCharCode(parseInt(n,16))}var o=new String(""),s=Object.hasOwnProperty;return function(r,a){var l,c,u=r.match(e),d=u[0],h=!1;"{"===d?l={}:"["===d?l=[]:(l=[],h=!0);for(var p=[l],f=1-h,m=u.length;f=0;)delete i[o[u]]}return a.call(t,r,i)}({"":l},"")),l}}();void 0!==ce&&ce||(t.KJUR=ce={}),void 0!==ce.asn1&&ce.asn1||(ce.asn1={}),ce.asn1.ASN1Util=new function(){this.integerToByteHex=function(e){var t=e.toString(16);return t.length%2==1&&(t="0"+t),t},this.bigIntToMinTwosComplementsHex=function(e){var t=e.toString(16);if("-"!=t.substr(0,1))t.length%2==1?t="0"+t:t.match(/^[0-7]/)||(t="00"+t);else{var n=t.substr(1).length;n%2==1?n+=1:t.match(/^[0-7]/)||(n+=2);for(var r="",i=0;i15)throw"ASN.1 length too long to represent by 8x: n = "+e.toString(16);return(128+n).toString(16)+t},this.getEncodedHex=function(){return(null==this.hTLV||this.isModified)&&(this.hV=this.getFreshValueHex(),this.hL=this.getLengthHexFromValue(),this.hTLV=this.hT+this.hL+this.hV,this.isModified=!1),this.hTLV},this.getValueHex=function(){return this.getEncodedHex(),this.hV},this.getFreshValueHex=function(){return""},this.setByParam=function(e){this.params=e},null!=e&&null!=e.tlv&&(this.hTLV=e.tlv,this.isModified=!1)},ce.asn1.DERAbstractString=function(e){ce.asn1.DERAbstractString.superclass.constructor.call(this),this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=Se(this.s).toLowerCase()},this.setStringHex=function(e){this.hTLV=null,this.isModified=!0,this.s=null,this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&("string"==typeof e?this.setString(e):void 0!==e.str?this.setString(e.str):void 0!==e.hex&&this.setStringHex(e.hex))},o.lang.extend(ce.asn1.DERAbstractString,ce.asn1.ASN1Object),ce.asn1.DERAbstractTime=function(e){ce.asn1.DERAbstractTime.superclass.constructor.call(this),this.localDateToUTC=function(e){var t=e.getTime()+6e4*e.getTimezoneOffset();return new Date(t)},this.formatDate=function(e,t,n){var r=this.zeroPadding,i=this.localDateToUTC(e),o=String(i.getFullYear());"utc"==t&&(o=o.substr(2,2));var s=o+r(String(i.getMonth()+1),2)+r(String(i.getDate()),2)+r(String(i.getHours()),2)+r(String(i.getMinutes()),2)+r(String(i.getSeconds()),2);if(!0===n){var a=i.getMilliseconds();if(0!=a){var l=r(String(a),3);s=s+"."+(l=l.replace(/[0]+$/,""))}}return s+"Z"},this.zeroPadding=function(e,t){return e.length>=t?e:new Array(t-e.length+1).join("0")+e},this.getString=function(){return this.s},this.setString=function(e){this.hTLV=null,this.isModified=!0,this.s=e,this.hV=ge(e)},this.setByDateValue=function(e,t,n,r,i,o){var s=new Date(Date.UTC(e,t-1,n,r,i,o,0));this.setByDate(s)},this.getFreshValueHex=function(){return this.hV}},o.lang.extend(ce.asn1.DERAbstractTime,ce.asn1.ASN1Object),ce.asn1.DERAbstractStructured=function(e){ce.asn1.DERAbstractString.superclass.constructor.call(this),this.setByASN1ObjectArray=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array=e},this.appendASN1Object=function(e){this.hTLV=null,this.isModified=!0,this.asn1Array.push(e)},this.asn1Array=new Array,void 0!==e&&void 0!==e.array&&(this.asn1Array=e.array)},o.lang.extend(ce.asn1.DERAbstractStructured,ce.asn1.ASN1Object),ce.asn1.DERBoolean=function(e){ce.asn1.DERBoolean.superclass.constructor.call(this),this.hT="01",this.hTLV=0==e?"010100":"0101ff"},o.lang.extend(ce.asn1.DERBoolean,ce.asn1.ASN1Object),ce.asn1.DERInteger=function(e){ce.asn1.DERInteger.superclass.constructor.call(this),this.hT="02",this.setByBigInteger=function(e){this.hTLV=null,this.isModified=!0,this.hV=ce.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e)},this.setByInteger=function(e){var t=new w(String(e),10);this.setByBigInteger(t)},this.setValueHex=function(e){this.hV=e},this.getFreshValueHex=function(){return this.hV},void 0!==e&&(void 0!==e.bigint?this.setByBigInteger(e.bigint):void 0!==e.int?this.setByInteger(e.int):"number"==typeof e?this.setByInteger(e):void 0!==e.hex&&this.setValueHex(e.hex))},o.lang.extend(ce.asn1.DERInteger,ce.asn1.ASN1Object),ce.asn1.DERBitString=function(e){if(void 0!==e&&void 0!==e.obj){var t=ce.asn1.ASN1Util.newObject(e.obj);e.hex="00"+t.getEncodedHex()}ce.asn1.DERBitString.superclass.constructor.call(this),this.hT="03",this.setHexValueIncludingUnusedBits=function(e){this.hTLV=null,this.isModified=!0,this.hV=e},this.setUnusedBitsAndHexValue=function(e,t){if(e<0||7i.length&&(i=r[n]);return(e=e.replace(i,"::")).slice(1,-1)}function Ne(e){var t="malformed hex value";if(!e.match(/^([0-9A-Fa-f][0-9A-Fa-f]){1,}$/))throw t;if(8!=e.length)return 32==e.length?De(e):e;try{return parseInt(e.substr(0,2),16)+"."+parseInt(e.substr(2,2),16)+"."+parseInt(e.substr(4,2),16)+"."+parseInt(e.substr(6,2),16)}catch(e){throw t}}function je(e){for(var t=encodeURIComponent(e),n="",r=0;r"7"?"00"+e:e}he.getLblen=function(e,t){if("8"!=e.substr(t+2,1))return 1;var n=parseInt(e.substr(t+3,1));return 0==n?-1:0=r)break}return s},he.getNthChildIdx=function(e,t,n){return he.getChildIdx(e,t)[n]},he.getIdxbyList=function(e,t,n,r){var i,o,s=he;return 0==n.length?void 0!==r&&e.substr(t,2)!==r?-1:t:(i=n.shift())>=(o=s.getChildIdx(e,t)).length?-1:s.getIdxbyList(e,o[i],n,r)},he.getIdxbyListEx=function(e,t,n,r){var i,o,s=he;if(0==n.length)return void 0!==r&&e.substr(t,2)!==r?-1:t;i=n.shift(),o=s.getChildIdx(e,t);for(var a=0,l=0;l=e.length?null:i.getTLV(e,o)},he.getTLVbyListEx=function(e,t,n,r){var i=he,o=i.getIdxbyListEx(e,t,n,r);return-1==o?null:i.getTLV(e,o)},he.getVbyList=function(e,t,n,r,i){var o,s,a=he;return-1==(o=a.getIdxbyList(e,t,n,r))||o>=e.length?null:(s=a.getV(e,o),!0===i&&(s=s.substr(2)),s)},he.getVbyListEx=function(e,t,n,r,i){var o,s,a=he;return-1==(o=a.getIdxbyListEx(e,t,n,r))?null:(s=a.getV(e,o),"03"==e.substr(o,2)&&!1!==i&&(s=s.substr(2)),s)},he.getInt=function(e,t,n){null==n&&(n=-1);try{var r=e.substr(t,2);if("02"!=r&&"03"!=r)return n;var i=he.getV(e,t);return"02"==r?parseInt(i,16):function(e){try{var t=e.substr(0,2);if("00"==t)return parseInt(e.substr(2),16);var n=parseInt(t,16),r=e.substr(2),i=parseInt(r,16).toString(2);return"0"==i&&(i="00000000"),i=i.slice(0,0-n),parseInt(i,2)}catch(e){return-1}}(i)}catch(e){return n}},he.getOID=function(e,t,n){null==n&&(n=null);try{return"06"!=e.substr(t,2)?n:function(e){if(!Le(e))return null;try{var t=[],n=e.substr(0,2),r=parseInt(n,16);t[0]=new String(Math.floor(r/40)),t[1]=new String(r%40);for(var i=e.substr(2),o=[],s=0;s0&&(c=c+"."+a.join(".")),c}catch(e){return null}}(he.getV(e,t))}catch(e){return n}},he.getOIDName=function(e,t,n){null==n&&(n=null);try{var r=he.getOID(e,t,n);if(r==n)return n;var i=ce.asn1.x509.OID.oid2name(r);return""==i?r:i}catch(e){return n}},he.getString=function(e,t,n){null==n&&(n=null);try{return we(he.getV(e,t))}catch(e){return n}},he.hextooidstr=function(e){var t=function(e,t){return e.length>=t?e:new Array(t-e.length+1).join("0")+e},n=[],r=e.substr(0,2),i=parseInt(r,16);n[0]=new String(Math.floor(i/40)),n[1]=new String(i%40);for(var o=e.substr(2),s=[],a=0;a0&&(u=u+"."+l.join(".")),u},he.dump=function(e,t,n,r){var i=he,o=i.getV,s=i.dump,a=i.getChildIdx,l=e;e instanceof ce.asn1.ASN1Object&&(l=e.getEncodedHex());var c=function(e,t){return e.length<=2*t?e:e.substr(0,t)+"..(total "+e.length/2+"bytes).."+e.substr(e.length-t,t)};void 0===t&&(t={ommit_long_octet:32}),void 0===n&&(n=0),void 0===r&&(r="");var u,d=t.ommit_long_octet;if("01"==(u=l.substr(n,2)))return"00"==(h=o(l,n))?r+"BOOLEAN FALSE\n":r+"BOOLEAN TRUE\n";if("02"==u)return r+"INTEGER "+c(h=o(l,n),d)+"\n";if("03"==u){var h=o(l,n);return i.isASN1HEX(h.substr(2))?(S=r+"BITSTRING, encapsulates\n")+s(h.substr(2),t,0,r+" "):r+"BITSTRING "+c(h,d)+"\n"}if("04"==u)return h=o(l,n),i.isASN1HEX(h)?(S=r+"OCTETSTRING, encapsulates\n")+s(h,t,0,r+" "):r+"OCTETSTRING "+c(h,d)+"\n";if("05"==u)return r+"NULL\n";if("06"==u){var p=o(l,n),f=ce.asn1.ASN1Util.oidHexToInt(p),m=ce.asn1.x509.OID.oid2name(f),g=f.replace(/\./g," ");return""!=m?r+"ObjectIdentifier "+m+" ("+g+")\n":r+"ObjectIdentifier ("+g+")\n"}if("0a"==u)return r+"ENUMERATED "+parseInt(o(l,n))+"\n";if("0c"==u)return r+"UTF8String '"+xe(o(l,n))+"'\n";if("13"==u)return r+"PrintableString '"+xe(o(l,n))+"'\n";if("14"==u)return r+"TeletexString '"+xe(o(l,n))+"'\n";if("16"==u)return r+"IA5String '"+xe(o(l,n))+"'\n";if("17"==u)return r+"UTCTime "+xe(o(l,n))+"\n";if("18"==u)return r+"GeneralizedTime "+xe(o(l,n))+"\n";if("1a"==u)return r+"VisualString '"+xe(o(l,n))+"'\n";if("1e"==u)return r+"BMPString '"+xe(o(l,n))+"'\n";if("30"==u){if("3000"==l.substr(n,4))return r+"SEQUENCE {}\n";S=r+"SEQUENCE\n";var b=t;if((2==(_=a(l,n)).length||3==_.length)&&"06"==l.substr(_[0],2)&&"04"==l.substr(_[_.length-1],2)){m=i.oidname(o(l,_[0]));var v=JSON.parse(JSON.stringify(t));v.x509ExtName=m,b=v}for(var y=0;y<_.length;y++)S+=s(l,b,_[y],r+" ");return S}if("31"==u){S=r+"SET\n";var _=a(l,n);for(y=0;y<_.length;y++)S+=s(l,t,_[y],r+" ");return S}if(0!=(128&(u=parseInt(u,16)))){var S,x=31&u;if(0!=(32&u)){for(S=r+"["+x+"]\n",_=a(l,n),y=0;y<_.length;y++)S+=s(l,t,_[y],r+" ");return S}return h=o(l,n),he.isASN1HEX(h)?(S=r+"["+x+"]\n")+s(h,t,0,r+" "):(("68747470"==h.substr(0,8)||"subjectAltName"===t.x509ExtName&&2==x)&&(h=xe(h)),r+"["+x+"] "+h+"\n")}return r+"UNKNOWN("+u+") "+o(l,n)+"\n"},he.isContextTag=function(e,t){var n,r;e=e.toLowerCase();try{n=parseInt(e,16)}catch(e){return-1}if(void 0===t)return 128==(192&n);try{return null!=t.match(/^\[[0-9]+\]$/)&&!((r=parseInt(t.substr(1,t.length-1),10))>31)&&128==(192&n)&&(31&n)==r}catch(e){return!1}},he.isASN1HEX=function(e){var t=he;if(e.length%2==1)return!1;var n=t.getVblen(e,0),r=e.substr(0,2),i=t.getL(e,0);return e.length-r.length-i.length==2*n},he.checkStrictDER=function(e,t,n,r,i){var o=he;if(void 0===n){if("string"!=typeof e)throw new Error("not hex string");if(e=e.toLowerCase(),!ce.lang.String.isHex(e))throw new Error("not hex string");n=e.length,i=(r=e.length/2)<128?1:Math.ceil(r.toString(16))+1}if(o.getL(e,t).length>2*i)throw new Error("L of TLV too long: idx="+t);var s=o.getVblen(e,t);if(s>r)throw new Error("value of L too long than hex: idx="+t);var a=o.getTLV(e,t),l=a.length-2-o.getL(e,t).length;if(l!==2*s)throw new Error("V string length and L's value not the same:"+l+"/"+2*s);if(0===t&&e.length!=a.length)throw new Error("total length and TLV length unmatch:"+e.length+"!="+a.length);var c=e.substr(t,2);if("02"===c){var u=o.getVidx(e,t);if("00"==e.substr(u,2)&&e.charCodeAt(u+2)<56)throw new Error("not least zeros for DER INTEGER")}if(32&parseInt(c,16)){for(var d=o.getVblen(e,t),h=0,p=o.getChildIdx(e,t),f=0;f=t?e:new Array(t-e.length+1).join(n)+e};void 0!==ce&&ce||(t.KJUR=ce={}),void 0!==ce.crypto&&ce.crypto||(ce.crypto={}),ce.crypto.Util=new function(){this.DIGESTINFOHEAD={sha1:"3021300906052b0e03021a05000414",sha224:"302d300d06096086480165030402040500041c",sha256:"3031300d060960864801650304020105000420",sha384:"3041300d060960864801650304020205000430",sha512:"3051300d060960864801650304020305000440",md2:"3020300c06082a864886f70d020205000410",md5:"3020300c06082a864886f70d020505000410",ripemd160:"3021300906052b2403020105000414"},this.DEFAULTPROVIDER={md5:"cryptojs",sha1:"cryptojs",sha224:"cryptojs",sha256:"cryptojs",sha384:"cryptojs",sha512:"cryptojs",ripemd160:"cryptojs",hmacmd5:"cryptojs",hmacsha1:"cryptojs",hmacsha224:"cryptojs",hmacsha256:"cryptojs",hmacsha384:"cryptojs",hmacsha512:"cryptojs",hmacripemd160:"cryptojs",MD5withRSA:"cryptojs/jsrsa",SHA1withRSA:"cryptojs/jsrsa",SHA224withRSA:"cryptojs/jsrsa",SHA256withRSA:"cryptojs/jsrsa",SHA384withRSA:"cryptojs/jsrsa",SHA512withRSA:"cryptojs/jsrsa",RIPEMD160withRSA:"cryptojs/jsrsa",MD5withECDSA:"cryptojs/jsrsa",SHA1withECDSA:"cryptojs/jsrsa",SHA224withECDSA:"cryptojs/jsrsa",SHA256withECDSA:"cryptojs/jsrsa",SHA384withECDSA:"cryptojs/jsrsa",SHA512withECDSA:"cryptojs/jsrsa",RIPEMD160withECDSA:"cryptojs/jsrsa",SHA1withDSA:"cryptojs/jsrsa",SHA224withDSA:"cryptojs/jsrsa",SHA256withDSA:"cryptojs/jsrsa",MD5withRSAandMGF1:"cryptojs/jsrsa",SHAwithRSAandMGF1:"cryptojs/jsrsa",SHA1withRSAandMGF1:"cryptojs/jsrsa",SHA224withRSAandMGF1:"cryptojs/jsrsa",SHA256withRSAandMGF1:"cryptojs/jsrsa",SHA384withRSAandMGF1:"cryptojs/jsrsa",SHA512withRSAandMGF1:"cryptojs/jsrsa",RIPEMD160withRSAandMGF1:"cryptojs/jsrsa"},this.CRYPTOJSMESSAGEDIGESTNAME={md5:b.algo.MD5,sha1:b.algo.SHA1,sha224:b.algo.SHA224,sha256:b.algo.SHA256,sha384:b.algo.SHA384,sha512:b.algo.SHA512,ripemd160:b.algo.RIPEMD160},this.getDigestInfoHex=function(e,t){if(void 0===this.DIGESTINFOHEAD[t])throw"alg not supported in Util.DIGESTINFOHEAD: "+t;return this.DIGESTINFOHEAD[t]+e},this.getPaddedDigestInfoHex=function(e,t,n){var r=this.getDigestInfoHex(e,t),i=n/4;if(r.length+22>i)throw"key is too short for SigAlg: keylen="+n+","+t;for(var o="0001",s="00"+r,a="",l=i-o.length-s.length,c=0;c=0)return!1;if(n.compareTo(r.ONE)<0||n.compareTo(o)>=0)return!1;var a=n.modInverse(o),l=e.multiply(a).mod(o),c=t.multiply(a).mod(o);return s.multiply(l).add(i.multiply(c)).getX().toBigInteger().mod(o).equals(t)},this.serializeSig=function(e,t){var n=e.toByteArraySigned(),r=t.toByteArraySigned(),i=[];return i.push(2),i.push(n.length),(i=i.concat(n)).push(2),i.push(r.length),(i=i.concat(r)).unshift(i.length),i.unshift(48),i},this.parseSig=function(e){var t;if(48!=e[0])throw new Error("Signature not a valid DERSequence");if(2!=e[t=2])throw new Error("First element in signature must be a DERInteger");var n=e.slice(t+2,t+2+e[t+1]);if(2!=e[t+=2+e[t+1]])throw new Error("Second element in signature must be a DERInteger");var i=e.slice(t+2,t+2+e[t+1]);return t+=2+e[t+1],{r:r.fromByteArrayUnsigned(n),s:r.fromByteArrayUnsigned(i)}},this.parseSigCompact=function(e){if(65!==e.length)throw"Signature has the wrong length";var t=e[0]-27;if(t<0||t>7)throw"Invalid signature type";var n=this.ecparams.n;return{r:r.fromByteArrayUnsigned(e.slice(1,33)).mod(n),s:r.fromByteArrayUnsigned(e.slice(33,65)).mod(n),i:t}},this.readPKCS5PrvKeyHex=function(e){if(!1===u(e))throw new Error("not ASN.1 hex string");var t,n,r;try{t=c(e,0,["[0]",0],"06"),n=c(e,0,[1],"04");try{r=c(e,0,["[1]",0],"03")}catch(e){}}catch(e){throw new Error("malformed PKCS#1/5 plain ECC private key")}if(this.curveName=a(t),void 0===this.curveName)throw"unsupported curve name";this.setNamedCurve(this.curveName),this.setPublicKeyHex(r),this.setPrivateKeyHex(n),this.isPublic=!1},this.readPKCS8PrvKeyHex=function(e){if(!1===u(e))throw new t("not ASN.1 hex string");var n,r,i;try{c(e,0,[1,0],"06"),n=c(e,0,[1,1],"06"),r=c(e,0,[2,0,1],"04");try{i=c(e,0,[2,0,"[1]",0],"03")}catch(e){}}catch(e){throw new t("malformed PKCS#8 plain ECC private key")}if(this.curveName=a(n),void 0===this.curveName)throw new t("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(i),this.setPrivateKeyHex(r),this.isPublic=!1},this.readPKCS8PubKeyHex=function(e){if(!1===u(e))throw new t("not ASN.1 hex string");var n,r;try{c(e,0,[0,0],"06"),n=c(e,0,[0,1],"06"),r=c(e,0,[1],"03")}catch(e){throw new t("malformed PKCS#8 ECC public key")}if(this.curveName=a(n),null===this.curveName)throw new t("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(r)},this.readCertPubKeyHex=function(e,n){if(!1===u(e))throw new t("not ASN.1 hex string");var r,i;try{r=c(e,0,[0,5,0,1],"06"),i=c(e,0,[0,5,1],"03")}catch(e){throw new t("malformed X.509 certificate ECC public key")}if(this.curveName=a(r),null===this.curveName)throw new t("unsupported curve name");this.setNamedCurve(this.curveName),this.setPublicKeyHex(i)},void 0!==e&&void 0!==e.curve&&(this.curveName=e.curve),void 0===this.curveName&&(this.curveName="secp256r1"),this.setNamedCurve(this.curveName),void 0!==e&&(void 0!==e.prv&&this.setPrivateKeyHex(e.prv),void 0!==e.pub&&this.setPublicKeyHex(e.pub))},ce.crypto.ECDSA.parseSigHex=function(e){var t=ce.crypto.ECDSA.parseSigHexInHexRS(e);return{r:new w(t.r,16),s:new w(t.s,16)}},ce.crypto.ECDSA.parseSigHexInHexRS=function(e){var t=he,n=t.getChildIdx,r=t.getV;if(t.checkStrictDER(e,0),"30"!=e.substr(0,2))throw new Error("signature is not a ASN.1 sequence");var i=n(e,0);if(2!=i.length)throw new Error("signature shall have two elements");var o=i[0],s=i[1];if("02"!=e.substr(o,2))throw new Error("1st item not ASN.1 integer");if("02"!=e.substr(s,2))throw new Error("2nd item not ASN.1 integer");return{r:r(e,o),s:r(e,s)}},ce.crypto.ECDSA.asn1SigToConcatSig=function(e){var t=ce.crypto.ECDSA.parseSigHexInHexRS(e),n=t.r,r=t.s;if("00"==n.substr(0,2)&&n.length%32==2&&(n=n.substr(2)),"00"==r.substr(0,2)&&r.length%32==2&&(r=r.substr(2)),n.length%32==30&&(n="00"+n),r.length%32==30&&(r="00"+r),n.length%32!=0)throw"unknown ECDSA sig r length error";if(r.length%32!=0)throw"unknown ECDSA sig s length error";return n+r},ce.crypto.ECDSA.concatSigToASN1Sig=function(e){if(e.length/2*8%128!=0)throw"unknown ECDSA concatinated r-s sig length error";var t=e.substr(0,e.length/2),n=e.substr(e.length/2);return ce.crypto.ECDSA.hexRSSigToASN1Sig(t,n)},ce.crypto.ECDSA.hexRSSigToASN1Sig=function(e,t){var n=new w(e,16),r=new w(t,16);return ce.crypto.ECDSA.biRSSigToASN1Sig(n,r)},ce.crypto.ECDSA.biRSSigToASN1Sig=function(e,t){var n=ce.asn1,r=new n.DERInteger({bigint:e}),i=new n.DERInteger({bigint:t});return new n.DERSequence({array:[r,i]}).getEncodedHex()},ce.crypto.ECDSA.getName=function(e){return"2b8104001f"===e?"secp192k1":"2a8648ce3d030107"===e?"secp256r1":"2b8104000a"===e?"secp256k1":"2b81040021"===e?"secp224r1":"2b81040022"===e?"secp384r1":-1!=="|secp256r1|NIST P-256|P-256|prime256v1|".indexOf(e)?"secp256r1":-1!=="|secp256k1|".indexOf(e)?"secp256k1":-1!=="|secp224r1|NIST P-224|P-224|".indexOf(e)?"secp224r1":-1!=="|secp384r1|NIST P-384|P-384|".indexOf(e)?"secp384r1":null},void 0!==ce&&ce||(t.KJUR=ce={}),void 0!==ce.crypto&&ce.crypto||(ce.crypto={}),ce.crypto.ECParameterDB=new function(){var e={},t={};function n(e){return new w(e,16)}this.getByName=function(n){var r=n;if(void 0!==t[r]&&(r=t[n]),void 0!==e[r])return e[r];throw"unregistered EC curve name: "+r},this.regist=function(r,i,o,s,a,l,c,u,d,h,p,f){e[r]={};var m=n(o),g=n(s),b=n(a),v=n(l),y=n(c),_=new ae(m,g,b),S=_.decodePointHex("04"+u+d);e[r].name=r,e[r].keylen=i,e[r].curve=_,e[r].G=S,e[r].n=v,e[r].h=y,e[r].oid=p,e[r].info=f;for(var x=0;x=2*a)break}var d={};return d.keyhex=l.substr(0,2*i[e].keylen),d.ivhex=l.substr(2*i[e].keylen,2*i[e].ivlen),d},a=function(e,t,n,r){var o=b.enc.Base64.parse(e),s=b.enc.Hex.stringify(o);return(0,i[t].proc)(s,n,r)};return{version:"1.0.0",parsePKCS5PEM:function(e){return o(e)},getKeyAndUnusedIvByPasscodeAndIvsalt:function(e,t,n){return s(e,t,n)},decryptKeyB64:function(e,t,n,r){return a(e,t,n,r)},getDecryptedKeyHex:function(e,t){var n=o(e),r=(n.type,n.cipher),i=n.ivsalt,l=n.data,c=s(r,t,i).keyhex;return a(l,r,c,i)},getEncryptedPKCS5PEMFromPrvKeyHex:function(e,t,n,r,o){var a="";if(void 0!==r&&null!=r||(r="AES-256-CBC"),void 0===i[r])throw"KEYUTIL unsupported algorithm: "+r;return void 0!==o&&null!=o||(o=function(e){var t=b.lib.WordArray.random(e);return b.enc.Hex.stringify(t)}(i[r].ivlen).toUpperCase()),a="-----BEGIN "+e+" PRIVATE KEY-----\r\n",a+="Proc-Type: 4,ENCRYPTED\r\n",a+="DEK-Info: "+r+","+o+"\r\n",a+="\r\n",(a+=function(e,t,n,r){return(0,i[t].eproc)(e,n,r)}(t,r,s(r,n,o).keyhex,o).replace(/(.{64})/g,"$1\r\n"))+"\r\n-----END "+e+" PRIVATE KEY-----\r\n"},parseHexOfEncryptedPKCS8:function(e){var t=he,n=t.getChildIdx,r=t.getV,i={},o=n(e,0);if(2!=o.length)throw"malformed format: SEQUENCE(0).items != 2: "+o.length;i.ciphertext=r(e,o[1]);var s=n(e,o[0]);if(2!=s.length)throw"malformed format: SEQUENCE(0.0).items != 2: "+s.length;if("2a864886f70d01050d"!=r(e,s[0]))throw"this only supports pkcs5PBES2";var a=n(e,s[1]);if(2!=s.length)throw"malformed format: SEQUENCE(0.0.1).items != 2: "+a.length;var l=n(e,a[1]);if(2!=l.length)throw"malformed format: SEQUENCE(0.0.1.1).items != 2: "+l.length;if("2a864886f70d0307"!=r(e,l[0]))throw"this only supports TripleDES";i.encryptionSchemeAlg="TripleDES",i.encryptionSchemeIV=r(e,l[1]);var c=n(e,a[0]);if(2!=c.length)throw"malformed format: SEQUENCE(0.0.1.0).items != 2: "+c.length;if("2a864886f70d01050c"!=r(e,c[0]))throw"this only supports pkcs5PBKDF2";var u=n(e,c[1]);if(u.length<2)throw"malformed format: SEQUENCE(0.0.1.0.1).items < 2: "+u.length;i.pbkdf2Salt=r(e,u[0]);var d=r(e,u[1]);try{i.pbkdf2Iter=parseInt(d,16)}catch(e){throw"malformed format pbkdf2Iter: "+d}return i},getPBKDF2KeyHexFromParam:function(e,t){var n=b.enc.Hex.parse(e.pbkdf2Salt),r=e.pbkdf2Iter,i=b.PBKDF2(t,n,{keySize:6,iterations:r});return b.enc.Hex.stringify(i)},_getPlainPKCS8HexFromEncryptedPKCS8PEM:function(e,t){var n=Ce(e,"ENCRYPTED PRIVATE KEY"),r=this.parseHexOfEncryptedPKCS8(n),i=ze.getPBKDF2KeyHexFromParam(r,t),o={};o.ciphertext=b.enc.Hex.parse(r.ciphertext);var s=b.enc.Hex.parse(i),a=b.enc.Hex.parse(r.encryptionSchemeIV),l=b.TripleDES.decrypt(o,s,{iv:a});return b.enc.Hex.stringify(l)},getKeyFromEncryptedPKCS8PEM:function(e,t){var n=this._getPlainPKCS8HexFromEncryptedPKCS8PEM(e,t);return this.getKeyFromPlainPrivatePKCS8Hex(n)},parsePlainPrivatePKCS8Hex:function(e){var t=he,n=t.getChildIdx,r=t.getV,i={algparam:null};if("30"!=e.substr(0,2))throw"malformed plain PKCS8 private key(code:001)";var o=n(e,0);if(3!=o.length)throw"malformed plain PKCS8 private key(code:002)";if("30"!=e.substr(o[1],2))throw"malformed PKCS8 private key(code:003)";var s=n(e,o[1]);if(2!=s.length)throw"malformed PKCS8 private key(code:004)";if("06"!=e.substr(s[0],2))throw"malformed PKCS8 private key(code:005)";if(i.algoid=r(e,s[0]),"06"==e.substr(s[1],2)&&(i.algparam=r(e,s[1])),"04"!=e.substr(o[2],2))throw"malformed PKCS8 private key(code:006)";return i.keyidx=t.getVidx(e,o[2]),i},getKeyFromPlainPrivatePKCS8PEM:function(e){var t=Ce(e,"PRIVATE KEY");return this.getKeyFromPlainPrivatePKCS8Hex(t)},getKeyFromPlainPrivatePKCS8Hex:function(e){var t,n=this.parsePlainPrivatePKCS8Hex(e);if("2a864886f70d010101"==n.algoid)t=new ie;else if("2a8648ce380401"==n.algoid)t=new ce.crypto.DSA;else{if("2a8648ce3d0201"!=n.algoid)throw"unsupported private key algorithm";t=new ce.crypto.ECDSA}return t.readPKCS8PrvKeyHex(e),t},_getKeyFromPublicPKCS8Hex:function(e){var t,n=he.getVbyList(e,0,[0,0],"06");if("2a864886f70d010101"===n)t=new ie;else if("2a8648ce380401"===n)t=new ce.crypto.DSA;else{if("2a8648ce3d0201"!==n)throw"unsupported PKCS#8 public key hex";t=new ce.crypto.ECDSA}return t.readPKCS8PubKeyHex(e),t},parsePublicRawRSAKeyHex:function(e){var t=he,n=t.getChildIdx,r=t.getV,i={};if("30"!=e.substr(0,2))throw"malformed RSA key(code:001)";var o=n(e,0);if(2!=o.length)throw"malformed RSA key(code:002)";if("02"!=e.substr(o[0],2))throw"malformed RSA key(code:003)";if(i.n=r(e,o[0]),"02"!=e.substr(o[1],2))throw"malformed RSA key(code:004)";return i.e=r(e,o[1]),i},parsePublicPKCS8Hex:function(e){var t=he,n=t.getChildIdx,r=t.getV,i={algparam:null},o=n(e,0);if(2!=o.length)throw"outer DERSequence shall have 2 elements: "+o.length;var s=o[0];if("30"!=e.substr(s,2))throw"malformed PKCS8 public key(code:001)";var a=n(e,s);if(2!=a.length)throw"malformed PKCS8 public key(code:002)";if("06"!=e.substr(a[0],2))throw"malformed PKCS8 public key(code:003)";if(i.algoid=r(e,a[0]),"06"==e.substr(a[1],2)?i.algparam=r(e,a[1]):"30"==e.substr(a[1],2)&&(i.algparam={},i.algparam.p=t.getVbyList(e,a[1],[0],"02"),i.algparam.q=t.getVbyList(e,a[1],[1],"02"),i.algparam.g=t.getVbyList(e,a[1],[2],"02")),"03"!=e.substr(o[1],2))throw"malformed PKCS8 public key(code:004)";return i.key=r(e,o[1]).substr(2),i}}}();ze.getKey=function(e,t,n){var r,i=(b=he).getChildIdx,o=(b.getV,b.getVbyList),s=ce.crypto,a=s.ECDSA,l=s.DSA,c=ie,u=Ce,d=ze;if(void 0!==c&&e instanceof c)return e;if(void 0!==a&&e instanceof a)return e;if(void 0!==l&&e instanceof l)return e;if(void 0!==e.curve&&void 0!==e.xy&&void 0===e.d)return new a({pub:e.xy,curve:e.curve});if(void 0!==e.curve&&void 0!==e.d)return new a({prv:e.d,curve:e.curve});if(void 0===e.kty&&void 0!==e.n&&void 0!==e.e&&void 0===e.d)return(C=new c).setPublic(e.n,e.e),C;if(void 0===e.kty&&void 0!==e.n&&void 0!==e.e&&void 0!==e.d&&void 0!==e.p&&void 0!==e.q&&void 0!==e.dp&&void 0!==e.dq&&void 0!==e.co&&void 0===e.qi)return(C=new c).setPrivateEx(e.n,e.e,e.d,e.p,e.q,e.dp,e.dq,e.co),C;if(void 0===e.kty&&void 0!==e.n&&void 0!==e.e&&void 0!==e.d&&void 0===e.p)return(C=new c).setPrivate(e.n,e.e,e.d),C;if(void 0!==e.p&&void 0!==e.q&&void 0!==e.g&&void 0!==e.y&&void 0===e.x)return(C=new l).setPublic(e.p,e.q,e.g,e.y),C;if(void 0!==e.p&&void 0!==e.q&&void 0!==e.g&&void 0!==e.y&&void 0!==e.x)return(C=new l).setPrivate(e.p,e.q,e.g,e.y,e.x),C;if("RSA"===e.kty&&void 0!==e.n&&void 0!==e.e&&void 0===e.d)return(C=new c).setPublic(_e(e.n),_e(e.e)),C;if("RSA"===e.kty&&void 0!==e.n&&void 0!==e.e&&void 0!==e.d&&void 0!==e.p&&void 0!==e.q&&void 0!==e.dp&&void 0!==e.dq&&void 0!==e.qi)return(C=new c).setPrivateEx(_e(e.n),_e(e.e),_e(e.d),_e(e.p),_e(e.q),_e(e.dp),_e(e.dq),_e(e.qi)),C;if("RSA"===e.kty&&void 0!==e.n&&void 0!==e.e&&void 0!==e.d)return(C=new c).setPrivate(_e(e.n),_e(e.e),_e(e.d)),C;if("EC"===e.kty&&void 0!==e.crv&&void 0!==e.x&&void 0!==e.y&&void 0===e.d){var h=(T=new a({curve:e.crv})).ecparams.keylen/4,p="04"+("0000000000"+_e(e.x)).slice(-h)+("0000000000"+_e(e.y)).slice(-h);return T.setPublicKeyHex(p),T}if("EC"===e.kty&&void 0!==e.crv&&void 0!==e.x&&void 0!==e.y&&void 0!==e.d){h=(T=new a({curve:e.crv})).ecparams.keylen/4,p="04"+("0000000000"+_e(e.x)).slice(-h)+("0000000000"+_e(e.y)).slice(-h);var f=("0000000000"+_e(e.d)).slice(-h);return T.setPublicKeyHex(p),T.setPrivateKeyHex(f),T}if("pkcs5prv"===n){var m,g=e,b=he;if(9===(m=i(g,0)).length)(C=new c).readPKCS5PrvKeyHex(g);else if(6===m.length)(C=new l).readPKCS5PrvKeyHex(g);else{if(!(m.length>2&&"04"===g.substr(m[1],2)))throw"unsupported PKCS#1/5 hexadecimal key";(C=new a).readPKCS5PrvKeyHex(g)}return C}if("pkcs8prv"===n)return d.getKeyFromPlainPrivatePKCS8Hex(e);if("pkcs8pub"===n)return d._getKeyFromPublicPKCS8Hex(e);if("x509pub"===n)return Ge.getPublicKeyFromCertHex(e);if(-1!=e.indexOf("-END CERTIFICATE-",0)||-1!=e.indexOf("-END X509 CERTIFICATE-",0)||-1!=e.indexOf("-END TRUSTED CERTIFICATE-",0))return Ge.getPublicKeyFromCertPEM(e);if(-1!=e.indexOf("-END PUBLIC KEY-")){var v=Ce(e,"PUBLIC KEY");return d._getKeyFromPublicPKCS8Hex(v)}if(-1!=e.indexOf("-END RSA PRIVATE KEY-")&&-1==e.indexOf("4,ENCRYPTED")){var y=u(e,"RSA PRIVATE KEY");return d.getKey(y,null,"pkcs5prv")}if(-1!=e.indexOf("-END DSA PRIVATE KEY-")&&-1==e.indexOf("4,ENCRYPTED")){var _=o(r=u(e,"DSA PRIVATE KEY"),0,[1],"02"),S=o(r,0,[2],"02"),x=o(r,0,[3],"02"),k=o(r,0,[4],"02"),O=o(r,0,[5],"02");return(C=new l).setPrivate(new w(_,16),new w(S,16),new w(x,16),new w(k,16),new w(O,16)),C}if(-1!=e.indexOf("-END EC PRIVATE KEY-")&&-1==e.indexOf("4,ENCRYPTED"))return y=u(e,"EC PRIVATE KEY"),d.getKey(y,null,"pkcs5prv");if(-1!=e.indexOf("-END PRIVATE KEY-"))return d.getKeyFromPlainPrivatePKCS8PEM(e);if(-1!=e.indexOf("-END RSA PRIVATE KEY-")&&-1!=e.indexOf("4,ENCRYPTED")){var E=d.getDecryptedKeyHex(e,t),A=new ie;return A.readPKCS5PrvKeyHex(E),A}if(-1!=e.indexOf("-END EC PRIVATE KEY-")&&-1!=e.indexOf("4,ENCRYPTED")){var T,C=o(r=d.getDecryptedKeyHex(e,t),0,[1],"04"),M=o(r,0,[2,0],"06"),P=o(r,0,[3,0],"03").substr(2);if(void 0===ce.crypto.OID.oidhex2name[M])throw"undefined OID(hex) in KJUR.crypto.OID: "+M;return(T=new a({curve:ce.crypto.OID.oidhex2name[M]})).setPublicKeyHex(P),T.setPrivateKeyHex(C),T.isPublic=!1,T}if(-1!=e.indexOf("-END DSA PRIVATE KEY-")&&-1!=e.indexOf("4,ENCRYPTED"))return _=o(r=d.getDecryptedKeyHex(e,t),0,[1],"02"),S=o(r,0,[2],"02"),x=o(r,0,[3],"02"),k=o(r,0,[4],"02"),O=o(r,0,[5],"02"),(C=new l).setPrivate(new w(_,16),new w(S,16),new w(x,16),new w(k,16),new w(O,16)),C;if(-1!=e.indexOf("-END ENCRYPTED PRIVATE KEY-"))return d.getKeyFromEncryptedPKCS8PEM(e,t);throw new Error("not supported argument")},ze.generateKeypair=function(e,t){if("RSA"==e){var n=t;(s=new ie).generate(n,"10001"),s.isPrivate=!0,s.isPublic=!0;var r=new ie,i=s.n.toString(16),o=s.e.toString(16);return r.setPublic(i,o),r.isPrivate=!1,r.isPublic=!0,(a={}).prvKeyObj=s,a.pubKeyObj=r,a}if("EC"==e){var s,a,l=t,c=new ce.crypto.ECDSA({curve:l}).generateKeyPairHex();return(s=new ce.crypto.ECDSA({curve:l})).setPublicKeyHex(c.ecpubhex),s.setPrivateKeyHex(c.ecprvhex),s.isPrivate=!0,s.isPublic=!1,(r=new ce.crypto.ECDSA({curve:l})).setPublicKeyHex(c.ecpubhex),r.isPrivate=!1,r.isPublic=!0,(a={}).prvKeyObj=s,a.pubKeyObj=r,a}throw"unknown algorithm: "+e},ze.getPEM=function(e,t,n,r,i,o){var s=ce,a=s.asn1,l=a.DERObjectIdentifier,c=a.DERInteger,u=a.ASN1Util.newObject,d=a.x509.SubjectPublicKeyInfo,h=s.crypto,p=h.DSA,f=h.ECDSA,m=ie;function g(e){return u({seq:[{int:0},{int:{bigint:e.n}},{int:e.e},{int:{bigint:e.d}},{int:{bigint:e.p}},{int:{bigint:e.q}},{int:{bigint:e.dmp1}},{int:{bigint:e.dmq1}},{int:{bigint:e.coeff}}]})}function v(e){return u({seq:[{int:1},{octstr:{hex:e.prvKeyHex}},{tag:["a0",!0,{oid:{name:e.curveName}}]},{tag:["a1",!0,{bitstr:{hex:"00"+e.pubKeyHex}}]}]})}function y(e){return u({seq:[{int:0},{int:{bigint:e.p}},{int:{bigint:e.q}},{int:{bigint:e.g}},{int:{bigint:e.y}},{int:{bigint:e.x}}]})}if((void 0!==m&&e instanceof m||void 0!==p&&e instanceof p||void 0!==f&&e instanceof f)&&1==e.isPublic&&(void 0===t||"PKCS8PUB"==t))return Te(w=new d(e).getEncodedHex(),"PUBLIC KEY");if("PKCS1PRV"==t&&void 0!==m&&e instanceof m&&(void 0===n||null==n)&&1==e.isPrivate)return Te(w=g(e).getEncodedHex(),"RSA PRIVATE KEY");if("PKCS1PRV"==t&&void 0!==f&&e instanceof f&&(void 0===n||null==n)&&1==e.isPrivate){var _=new l({name:e.curveName}).getEncodedHex(),S=v(e).getEncodedHex(),x="";return(x+=Te(_,"EC PARAMETERS"))+Te(S,"EC PRIVATE KEY")}if("PKCS1PRV"==t&&void 0!==p&&e instanceof p&&(void 0===n||null==n)&&1==e.isPrivate)return Te(w=y(e).getEncodedHex(),"DSA PRIVATE KEY");if("PKCS5PRV"==t&&void 0!==m&&e instanceof m&&void 0!==n&&null!=n&&1==e.isPrivate){var w=g(e).getEncodedHex();return void 0===r&&(r="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("RSA",w,n,r,o)}if("PKCS5PRV"==t&&void 0!==f&&e instanceof f&&void 0!==n&&null!=n&&1==e.isPrivate)return w=v(e).getEncodedHex(),void 0===r&&(r="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("EC",w,n,r,o);if("PKCS5PRV"==t&&void 0!==p&&e instanceof p&&void 0!==n&&null!=n&&1==e.isPrivate)return w=y(e).getEncodedHex(),void 0===r&&(r="DES-EDE3-CBC"),this.getEncryptedPKCS5PEMFromPrvKeyHex("DSA",w,n,r,o);var k=function(e,t){var n=O(e,t);return new u({seq:[{seq:[{oid:{name:"pkcs5PBES2"}},{seq:[{seq:[{oid:{name:"pkcs5PBKDF2"}},{seq:[{octstr:{hex:n.pbkdf2Salt}},{int:n.pbkdf2Iter}]}]},{seq:[{oid:{name:"des-EDE3-CBC"}},{octstr:{hex:n.encryptionSchemeIV}}]}]}]},{octstr:{hex:n.ciphertext}}]}).getEncodedHex()},O=function(e,t){var n=b.lib.WordArray.random(8),r=b.lib.WordArray.random(8),i=b.PBKDF2(t,n,{keySize:6,iterations:100}),o=b.enc.Hex.parse(e),s=b.TripleDES.encrypt(o,i,{iv:r})+"",a={};return a.ciphertext=s,a.pbkdf2Salt=b.enc.Hex.stringify(n),a.pbkdf2Iter=100,a.encryptionSchemeAlg="DES-EDE3-CBC",a.encryptionSchemeIV=b.enc.Hex.stringify(r),a};if("PKCS8PRV"==t&&null!=m&&e instanceof m&&1==e.isPrivate){var E=g(e).getEncodedHex();return w=u({seq:[{int:0},{seq:[{oid:{name:"rsaEncryption"}},{null:!0}]},{octstr:{hex:E}}]}).getEncodedHex(),void 0===n||null==n?Te(w,"PRIVATE KEY"):Te(S=k(w,n),"ENCRYPTED PRIVATE KEY")}if("PKCS8PRV"==t&&void 0!==f&&e instanceof f&&1==e.isPrivate)return E=new u({seq:[{int:1},{octstr:{hex:e.prvKeyHex}},{tag:["a1",!0,{bitstr:{hex:"00"+e.pubKeyHex}}]}]}).getEncodedHex(),w=u({seq:[{int:0},{seq:[{oid:{name:"ecPublicKey"}},{oid:{name:e.curveName}}]},{octstr:{hex:E}}]}).getEncodedHex(),void 0===n||null==n?Te(w,"PRIVATE KEY"):Te(S=k(w,n),"ENCRYPTED PRIVATE KEY");if("PKCS8PRV"==t&&void 0!==p&&e instanceof p&&1==e.isPrivate)return E=new c({bigint:e.x}).getEncodedHex(),w=u({seq:[{int:0},{seq:[{oid:{name:"dsa"}},{seq:[{int:{bigint:e.p}},{int:{bigint:e.q}},{int:{bigint:e.g}}]}]},{octstr:{hex:E}}]}).getEncodedHex(),void 0===n||null==n?Te(w,"PRIVATE KEY"):Te(S=k(w,n),"ENCRYPTED PRIVATE KEY");throw new Error("unsupported object nor format")},ze.getKeyFromCSRPEM=function(e){var t=Ce(e,"CERTIFICATE REQUEST");return ze.getKeyFromCSRHex(t)},ze.getKeyFromCSRHex=function(e){var t=ze.parseCSRHex(e);return ze.getKey(t.p8pubkeyhex,null,"pkcs8pub")},ze.parseCSRHex=function(e){var t=he,n=t.getChildIdx,r=t.getTLV,i={},o=e;if("30"!=o.substr(0,2))throw"malformed CSR(code:001)";var s=n(o,0);if(s.length<1)throw"malformed CSR(code:002)";if("30"!=o.substr(s[0],2))throw"malformed CSR(code:003)";var a=n(o,s[0]);if(a.length<3)throw"malformed CSR(code:004)";return i.p8pubkeyhex=r(o,a[2]),i},ze.getKeyID=function(e){var t=ze,n=he;"string"==typeof e&&-1!=e.indexOf("BEGIN ")&&(e=t.getKey(e));var r=Ce(t.getPEM(e)),i=n.getIdxbyList(r,0,[1]),o=n.getV(r,i).substring(2);return ce.crypto.Util.hashHex(o,"sha1")},ze.getJWKFromKey=function(e){var t={};if(e instanceof ie&&e.isPrivate)return t.kty="RSA",t.n=ye(e.n.toString(16)),t.e=ye(e.e.toString(16)),t.d=ye(e.d.toString(16)),t.p=ye(e.p.toString(16)),t.q=ye(e.q.toString(16)),t.dp=ye(e.dmp1.toString(16)),t.dq=ye(e.dmq1.toString(16)),t.qi=ye(e.coeff.toString(16)),t;if(e instanceof ie&&e.isPublic)return t.kty="RSA",t.n=ye(e.n.toString(16)),t.e=ye(e.e.toString(16)),t;if(e instanceof ce.crypto.ECDSA&&e.isPrivate){if("P-256"!==(r=e.getShortNISTPCurveName())&&"P-384"!==r)throw"unsupported curve name for JWT: "+r;var n=e.getPublicKeyXYHex();return t.kty="EC",t.crv=r,t.x=ye(n.x),t.y=ye(n.y),t.d=ye(e.prvKeyHex),t}if(e instanceof ce.crypto.ECDSA&&e.isPublic){var r;if("P-256"!==(r=e.getShortNISTPCurveName())&&"P-384"!==r)throw"unsupported curve name for JWT: "+r;return n=e.getPublicKeyXYHex(),t.kty="EC",t.crv=r,t.x=ye(n.x),t.y=ye(n.y),t}throw"not supported key object"},ie.getPosArrayOfChildrenFromHex=function(e){return he.getChildIdx(e,0)},ie.getHexValueArrayOfChildrenFromHex=function(e){var t,n=he.getV,r=n(e,(t=ie.getPosArrayOfChildrenFromHex(e))[0]),i=n(e,t[1]),o=n(e,t[2]),s=n(e,t[3]),a=n(e,t[4]),l=n(e,t[5]),c=n(e,t[6]),u=n(e,t[7]),d=n(e,t[8]);return(t=new Array).push(r,i,o,s,a,l,c,u,d),t},ie.prototype.readPrivateKeyFromPEMString=function(e){var t=Ce(e),n=ie.getHexValueArrayOfChildrenFromHex(t);this.setPrivateEx(n[1],n[2],n[3],n[4],n[5],n[6],n[7],n[8])},ie.prototype.readPKCS5PrvKeyHex=function(e){var t=ie.getHexValueArrayOfChildrenFromHex(e);this.setPrivateEx(t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8])},ie.prototype.readPKCS8PrvKeyHex=function(e){var t,n,r,i,o,s,a,l,c=he,u=c.getVbyListEx;if(!1===c.isASN1HEX(e))throw new Error("not ASN.1 hex string");try{t=u(e,0,[2,0,1],"02"),n=u(e,0,[2,0,2],"02"),r=u(e,0,[2,0,3],"02"),i=u(e,0,[2,0,4],"02"),o=u(e,0,[2,0,5],"02"),s=u(e,0,[2,0,6],"02"),a=u(e,0,[2,0,7],"02"),l=u(e,0,[2,0,8],"02")}catch(e){throw new Error("malformed PKCS#8 plain RSA private key")}this.setPrivateEx(t,n,r,i,o,s,a,l)},ie.prototype.readPKCS5PubKeyHex=function(e){var t=he,n=t.getV;if(!1===t.isASN1HEX(e))throw new Error("keyHex is not ASN.1 hex string");var r=t.getChildIdx(e,0);if(2!==r.length||"02"!==e.substr(r[0],2)||"02"!==e.substr(r[1],2))throw new Error("wrong hex for PKCS#5 public key");var i=n(e,r[0]),o=n(e,r[1]);this.setPublic(i,o)},ie.prototype.readPKCS8PubKeyHex=function(e){var t=he;if(!1===t.isASN1HEX(e))throw new Error("not ASN.1 hex string");if("06092a864886f70d010101"!==t.getTLVbyListEx(e,0,[0,0]))throw new Error("not PKCS8 RSA public key");var n=t.getTLVbyListEx(e,0,[1,0]);this.readPKCS5PubKeyHex(n)},ie.prototype.readCertPubKeyHex=function(e,t){var n,r;(n=new Ge).readCertHex(e),r=n.getPublicKeyHex(),this.readPKCS8PubKeyHex(r)};var Ue=new RegExp("[^0-9a-f]","gi");function Qe(e,t){for(var n="",r=t/4-e.length,i=0;i>24,(16711680&i)>>16,(65280&i)>>8,255&i])))),i+=1;return r}function He(e){for(var t in ce.crypto.Util.DIGESTINFOHEAD){var n=ce.crypto.Util.DIGESTINFOHEAD[t],r=n.length;if(e.substring(0,r)==n)return[t,e.substring(r)]}return[]}function Ge(e){var t,n=he,r=n.getChildIdx,i=n.getV,o=n.getTLV,s=n.getVbyList,a=n.getVbyListEx,l=n.getTLVbyList,c=n.getTLVbyListEx,u=n.getIdxbyList,d=n.getIdxbyListEx,h=n.getVidx,p=n.oidname,f=n.hextooidstr,m=Ge,g=Ce;try{t=ce.asn1.x509.AlgorithmIdentifier.PSSNAME2ASN1TLV}catch(e){}this.HEX2STAG={"0c":"utf8",13:"prn",16:"ia5","1a":"vis","1e":"bmp"},this.hex=null,this.version=0,this.foffset=0,this.aExtInfo=null,this.getVersion=function(){return null===this.hex||0!==this.version?this.version:"a003020102"!==l(this.hex,0,[0,0])?(this.version=1,this.foffset=-1,1):(this.version=3,3)},this.getSerialNumberHex=function(){return a(this.hex,0,[0,0],"02")},this.getSignatureAlgorithmField=function(){var e=c(this.hex,0,[0,1]);return this.getAlgorithmIdentifierName(e)},this.getAlgorithmIdentifierName=function(e){for(var n in t)if(e===t[n])return n;return p(a(e,0,[0],"06"))},this.getIssuer=function(){return this.getX500Name(this.getIssuerHex())},this.getIssuerHex=function(){return l(this.hex,0,[0,3+this.foffset],"30")},this.getIssuerString=function(){return m.hex2dn(this.getIssuerHex())},this.getSubject=function(){return this.getX500Name(this.getSubjectHex())},this.getSubjectHex=function(){return l(this.hex,0,[0,5+this.foffset],"30")},this.getSubjectString=function(){return m.hex2dn(this.getSubjectHex())},this.getNotBefore=function(){var e=s(this.hex,0,[0,4+this.foffset,0]);return e=e.replace(/(..)/g,"%$1"),decodeURIComponent(e)},this.getNotAfter=function(){var e=s(this.hex,0,[0,4+this.foffset,1]);return e=e.replace(/(..)/g,"%$1"),decodeURIComponent(e)},this.getPublicKeyHex=function(){return n.getTLVbyList(this.hex,0,[0,6+this.foffset],"30")},this.getPublicKeyIdx=function(){return u(this.hex,0,[0,6+this.foffset],"30")},this.getPublicKeyContentIdx=function(){var e=this.getPublicKeyIdx();return u(this.hex,e,[1,0],"30")},this.getPublicKey=function(){return ze.getKey(this.getPublicKeyHex(),null,"pkcs8pub")},this.getSignatureAlgorithmName=function(){var e=l(this.hex,0,[1],"30");return this.getAlgorithmIdentifierName(e)},this.getSignatureValueHex=function(){return s(this.hex,0,[2],"03",!0)},this.verifySignature=function(e){var t=this.getSignatureAlgorithmField(),n=this.getSignatureValueHex(),r=l(this.hex,0,[0],"30"),i=new ce.crypto.Signature({alg:t});return i.init(e),i.updateHex(r),i.verify(n)},this.parseExt=function(e){var t,o,a;if(void 0===e){if(a=this.hex,3!==this.version)return-1;t=u(a,0,[0,7,0],"30"),o=r(a,t)}else{a=Ce(e);var l=u(a,0,[0,3,0,0],"06");if("2a864886f70d01090e"!=i(a,l))return void(this.aExtInfo=new Array);t=u(a,0,[0,3,0,1,0],"30"),o=r(a,t),this.hex=a}this.aExtInfo=new Array;for(var c=0;c1){var a=o(e,s[1]),l=this.getGeneralName(a);null!=l.uri&&(i.uri=l.uri)}if(s.length>2){var c=o(e,s[2]);"0101ff"==c&&(i.reqauth=!0),"010100"==c&&(i.reqauth=!1)}return i},this.getX500NameRule=function(e){for(var t=null,n=[],r=0;r0&&(e.ext=this.getExtParamArray()),e.sighex=this.getSignatureValueHex(),e},this.getExtParamArray=function(e){null==e&&-1!=d(this.hex,0,[0,"[3]"])&&(e=c(this.hex,0,[0,"[3]",0],"30"));for(var t=[],n=r(e,0),i=0;i0&&(c=new Array(n),(new te).nextBytes(c),c=String.fromCharCode.apply(String,c));var u=we(l(ke("\0\0\0\0\0\0\0\0"+i+c))),d=[];for(r=0;r>8*a-s&255;for(f[0]&=~m,r=0;rthis.n.bitLength())return 0;var r=He(this.doPublic(n).toString(16).replace(/^1f+00/,""));if(0==r.length)return!1;var i=r[0];return r[1]==function(e){return ce.crypto.Util.hashString(e,i)}(e)},ie.prototype.verifyWithMessageHash=function(e,t){if(t.length!=Math.ceil(this.n.bitLength()/4))return!1;var n=ne(t,16);if(n.bitLength()>this.n.bitLength())return 0;var r=He(this.doPublic(n).toString(16).replace(/^1f+00/,""));return 0!=r.length&&(r[0],r[1]==e)},ie.prototype.verifyPSS=function(e,t,n,r){var i=function(e){return ce.crypto.Util.hashHex(e,n)}(ke(e));return void 0===r&&(r=-1),this.verifyWithMessageHashPSS(i,t,n,r)},ie.prototype.verifyWithMessageHashPSS=function(e,t,n,r){if(t.length!=Math.ceil(this.n.bitLength()/4))return!1;var i,o=new w(t,16),s=function(e){return ce.crypto.Util.hashHex(e,n)},a=we(e),l=a.length,c=this.n.bitLength()-1,u=Math.ceil(c/8);if(-1===r||void 0===r)r=l;else if(-2===r)r=u-l-2;else if(r<-2)throw new Error("invalid salt length");if(u>8*u-c&255;if(0!=(h.charCodeAt(0)&f))throw new Error("bits beyond keysize not zero");var m=qe(p,h.length,s),g=[];for(i=0;i0&&-1==(":"+r.join(":")+":").indexOf(":"+b+":"))throw"algorithm '"+b+"' not accepted in the list";if("none"!=b&&null===t)throw"key shall be specified to verify.";if("string"==typeof t&&-1!=t.indexOf("-----BEGIN ")&&(t=ze.getKey(t)),!("RS"!=p&&"PS"!=p||t instanceof i))throw"key shall be a RSAKey obj for RS* and PS* algs";if("ES"==p&&!(t instanceof c))throw"key shall be a ECDSA obj for ES* algs";var v=null;if(void 0===s.jwsalg2sigalg[g.alg])throw"unsupported alg name: "+b;if("none"==(v=s.jwsalg2sigalg[b]))throw"not supported";if("Hmac"==v.substr(0,4)){if(void 0===t)throw"hexadecimal key shall be specified for HMAC";var y=new u({alg:v,pass:t});return y.updateString(f),m==y.doFinal()}if(-1!=v.indexOf("withECDSA")){var _,S=null;try{S=c.concatSigToASN1Sig(m)}catch(e){return!1}return(_=new d({alg:v})).init(t),_.updateString(f),_.verify(S)}return(_=new d({alg:v})).init(t),_.updateString(f),_.verify(m)},ce.jws.JWS.parse=function(e){var t,n,r,i=e.split("."),o={};if(2!=i.length&&3!=i.length)throw"malformed sJWS: wrong number of '.' splitted elements";return t=i[0],n=i[1],3==i.length&&(r=i[2]),o.headerObj=ce.jws.JWS.readSafeJSONString(de(t)),o.payloadObj=ce.jws.JWS.readSafeJSONString(de(n)),o.headerPP=JSON.stringify(o.headerObj,null," "),null==o.payloadObj?o.payloadPP=de(n):o.payloadPP=JSON.stringify(o.payloadObj,null," "),void 0!==r&&(o.sigHex=_e(r)),o},ce.jws.JWS.verifyJWT=function(e,t,r){var i=ce.jws,o=i.JWS,s=o.readSafeJSONString,a=o.inArray,l=o.includedArray,c=e.split("."),u=c[0],d=c[1],h=(_e(c[2]),s(de(u))),p=s(de(d));if(void 0===h.alg)return!1;if(void 0===r.alg)throw"acceptField.alg shall be specified";if(!a(h.alg,r.alg))return!1;if(void 0!==p.iss&&"object"===n(r.iss)&&!a(p.iss,r.iss))return!1;if(void 0!==p.sub&&"object"===n(r.sub)&&!a(p.sub,r.sub))return!1;if(void 0!==p.aud&&"object"===n(r.aud))if("string"==typeof p.aud){if(!a(p.aud,r.aud))return!1}else if("object"==n(p.aud)&&!l(p.aud,r.aud))return!1;var f=i.IntDate.getNow();return void 0!==r.verifyAt&&"number"==typeof r.verifyAt&&(f=r.verifyAt),void 0!==r.gracePeriod&&"number"==typeof r.gracePeriod||(r.gracePeriod=0),!(void 0!==p.exp&&"number"==typeof p.exp&&p.exp+r.gracePeriodt.length&&(n=t.length);for(var r=0;r + * @license MIT + */ +var r=n(30),i=n(31),o=n(32);function s(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function f(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return z(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(e).length;default:if(r)return z(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return M(this,t,n);case"utf8":case"utf-8":return E(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return C(this,t,n);case"base64":return O(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,i);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,i){var o,s=1,a=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,n/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var u=-1;for(o=n;oa&&(n=a-l),o=n;o>=0;o--){for(var d=!0,h=0;hi&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function O(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function E(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+d<=n)switch(d){case 1:c<128&&(u=c);break;case 2:128==(192&(o=e[i+1]))&&(l=(31&c)<<6|63&o)>127&&(u=l);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(l=(15&c)<<12|(63&o)<<6|63&s)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(l=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=d}return function(e){var t=e.length;if(t<=A)return String.fromCharCode.apply(String,e);for(var n="",r=0;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},l.prototype.compare=function(e,t,n,r,i){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(o,s),c=this.slice(r,i),u=e.slice(t,n),d=0;di)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return y(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":return S(this,e,t,n);case"latin1":case"binary":return x(this,e,t,n);case"base64":return w(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var A=4096;function T(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;ir)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function R(e,t,n,r,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function I(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function D(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function N(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function j(e,t,n,r,o){return o||N(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function L(e,t,n,r,o){return o||N(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUInt8=function(e,t){return t||$(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||$(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||$(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||$(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||$(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||$(e,t,this.length);for(var r=this[e],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||$(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return t||$(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||$(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){t||$(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return t||$(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||$(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||$(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||$(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||$(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||$(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,r){e=+e,t|=0,n|=0,r||R(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):D(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);R(this,e,t,n,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o>0)-a&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);R(this,e,t,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):I(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):I(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):D(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||R(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return j(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return j(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return L(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return L(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(o<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function U(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(B,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Q(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(29))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=c(e),s=r[0],a=r[1],l=new o(function(e,t,n){return 3*(t+n)/4-n}(0,s,a)),u=0,d=a>0?s-4:s;for(n=0;n>16&255,l[u++]=t>>8&255,l[u++]=255&t;return 2===a&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,l[u++]=255&t),1===a&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t),l},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=16383,a=0,l=n-i;al?l:a+s));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,l=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,n){for(var i,o,s=[],a=t;a>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){ +/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ +t.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,l=(1<>1,u=-7,d=n?i-1:0,h=n?-1:1,p=e[t+d];for(d+=h,o=p&(1<<-u)-1,p>>=-u,u+=a;u>0;o=256*o+e[t+d],d+=h,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=r;u>0;s=256*s+e[t+d],d+=h,u-=8);if(0===o)o=1-c;else{if(o===l)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),o-=c}return(p?-1:1)*s*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var s,a,l,c=8*o-i-1,u=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,f=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+d>=1?h/l:h*Math.pow(2,1-d))*l>=2&&(s++,l/=2),s+d>=u?(a=0,s=u):s+d>=1?(a=(t*l-1)*Math.pow(2,i),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),s=0));i>=8;e[n+p]=255&a,p+=f,a/=256,i-=8);for(s=s<0;e[n+p]=255&s,p+=f,s/=256,c-=8);e[n+p-f]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.jws,n=e.KeyUtil,i=e.X509,o=e.crypto,s=e.hextob64u,a=e.b64tohex,l=e.AllowedSigningAlgs;return function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.parseJwt=function e(n){r.Log.debug("JoseUtil.parseJwt");try{var i=t.JWS.parse(n);return{header:i.headerObj,payload:i.payloadObj}}catch(e){r.Log.error(e)}},e.validateJwt=function(t,o,s,l,c,u,d){r.Log.debug("JoseUtil.validateJwt");try{if("RSA"===o.kty)if(o.e&&o.n)o=n.getKey(o);else{if(!o.x5c||!o.x5c.length)return r.Log.error("JoseUtil.validateJwt: RSA key missing key material",o),Promise.reject(new Error("RSA key missing key material"));var h=a(o.x5c[0]);o=i.getPublicKeyFromCertHex(h)}else{if("EC"!==o.kty)return r.Log.error("JoseUtil.validateJwt: Unsupported key type",o&&o.kty),Promise.reject(new Error(o.kty));if(!(o.crv&&o.x&&o.y))return r.Log.error("JoseUtil.validateJwt: EC key missing key material",o),Promise.reject(new Error("EC key missing key material"));o=n.getKey(o)}return e._validateJwt(t,o,s,l,c,u,d)}catch(e){return r.Log.error(e&&e.message||e),Promise.reject("JWT validation failed")}},e.validateJwtAttributes=function(t,n,i,o,s,a){o||(o=0),s||(s=parseInt(Date.now()/1e3));var l=e.parseJwt(t).payload;if(!l.iss)return r.Log.error("JoseUtil._validateJwt: issuer was not provided"),Promise.reject(new Error("issuer was not provided"));if(l.iss!==n)return r.Log.error("JoseUtil._validateJwt: Invalid issuer in token",l.iss),Promise.reject(new Error("Invalid issuer in token: "+l.iss));if(!l.aud)return r.Log.error("JoseUtil._validateJwt: aud was not provided"),Promise.reject(new Error("aud was not provided"));if(!(l.aud===i||Array.isArray(l.aud)&&l.aud.indexOf(i)>=0))return r.Log.error("JoseUtil._validateJwt: Invalid audience in token",l.aud),Promise.reject(new Error("Invalid audience in token: "+l.aud));if(l.azp&&l.azp!==i)return r.Log.error("JoseUtil._validateJwt: Invalid azp in token",l.azp),Promise.reject(new Error("Invalid azp in token: "+l.azp));if(!a){var c=s+o,u=s-o;if(!l.iat)return r.Log.error("JoseUtil._validateJwt: iat was not provided"),Promise.reject(new Error("iat was not provided"));if(c1&&void 0!==arguments[1]?arguments[1]:"#";o(this,e);var r=i.UrlUtility.parseUrlFragment(t,n);this.error=r.error,this.error_description=r.error_description,this.error_uri=r.error_uri,this.code=r.code,this.state=r.state,this.id_token=r.id_token,this.session_state=r.session_state,this.access_token=r.access_token,this.token_type=r.token_type,this.scope=r.scope,this.profile=void 0,this.expires_in=r.expires_in}return r(e,[{key:"expires_in",get:function(){if(this.expires_at){var e=parseInt(Date.now()/1e3);return this.expires_at-e}},set:function(e){var t=parseInt(e);if("number"==typeof t&&t>0){var n=parseInt(Date.now()/1e3);this.expires_at=n+t}}},{key:"expired",get:function(){var e=this.expires_in;if(void 0!==e)return e<=0}},{key:"scopes",get:function(){return(this.scope||"").split(" ")}},{key:"isOpenIdConnect",get:function(){return this.scopes.indexOf("openid")>=0||!!this.id_token}}]),e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SignoutRequest=void 0;var r=n(0),i=n(3),o=n(9);t.SignoutRequest=function e(t){var n=t.url,s=t.id_token_hint,a=t.post_logout_redirect_uri,l=t.data,c=t.extraQueryParams,u=t.request_type;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),!n)throw r.Log.error("SignoutRequest.ctor: No url passed"),new Error("url");for(var d in s&&(n=i.UrlUtility.addQueryParam(n,"id_token_hint",s)),a&&(n=i.UrlUtility.addQueryParam(n,"post_logout_redirect_uri",a),l&&(this.state=new o.State({data:l,request_type:u}),n=i.UrlUtility.addQueryParam(n,"state",this.state.id))),c)n=i.UrlUtility.addQueryParam(n,d,c[d]);this.url=n}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SignoutResponse=void 0;var r=n(3);t.SignoutResponse=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var n=r.UrlUtility.parseUrlFragment(t,"?");this.error=n.error,this.error_description=n.error_description,this.error_uri=n.error_uri,this.state=n.state}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InMemoryWebStorage=void 0;var r=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.SilentRenewService,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u.SessionMonitor,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:h.TokenRevocationClient,d=arguments.length>4&&void 0!==arguments[4]?arguments[4]:p.TokenClient,b=arguments.length>5&&void 0!==arguments[5]?arguments[5]:f.JoseUtil;m(this,t),n instanceof s.UserManagerSettings||(n=new s.UserManagerSettings(n));var v=g(this,e.call(this,n));return v._events=new l.UserManagerEvents(n),v._silentRenewService=new r(v),v.settings.automaticSilentRenew&&(i.Log.debug("UserManager.ctor: automaticSilentRenew is configured, setting up silent renew"),v.startSilentRenew()),v.settings.monitorSession&&(i.Log.debug("UserManager.ctor: monitorSession is configured, setting up session monitor"),v._sessionMonitor=new o(v)),v._tokenRevocationClient=new a(v._settings),v._tokenClient=new d(v._settings),v._joseUtil=b,v}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.getUser=function(){var e=this;return this._loadUser().then((function(t){return t?(i.Log.info("UserManager.getUser: user loaded"),e._events.load(t,!1),t):(i.Log.info("UserManager.getUser: user not found in storage"),null)}))},t.prototype.removeUser=function(){var e=this;return this.storeUser(null).then((function(){i.Log.info("UserManager.removeUser: user removed from storage"),e._events.unload()}))},t.prototype.signinRedirect=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(e=Object.assign({},e)).request_type="si:r";var t={useReplaceToNavigate:e.useReplaceToNavigate};return this._signinStart(e,this._redirectNavigator,t).then((function(){i.Log.info("UserManager.signinRedirect: successful")}))},t.prototype.signinRedirectCallback=function(e){return this._signinEnd(e||this._redirectNavigator.url).then((function(e){return e.profile&&e.profile.sub?i.Log.info("UserManager.signinRedirectCallback: successful, signed in sub: ",e.profile.sub):i.Log.info("UserManager.signinRedirectCallback: no sub"),e}))},t.prototype.signinPopup=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(e=Object.assign({},e)).request_type="si:p";var t=e.redirect_uri||this.settings.popup_redirect_uri||this.settings.redirect_uri;return t?(e.redirect_uri=t,e.display="popup",this._signin(e,this._popupNavigator,{startUrl:t,popupWindowFeatures:e.popupWindowFeatures||this.settings.popupWindowFeatures,popupWindowTarget:e.popupWindowTarget||this.settings.popupWindowTarget}).then((function(e){return e&&(e.profile&&e.profile.sub?i.Log.info("UserManager.signinPopup: signinPopup successful, signed in sub: ",e.profile.sub):i.Log.info("UserManager.signinPopup: no sub")),e}))):(i.Log.error("UserManager.signinPopup: No popup_redirect_uri or redirect_uri configured"),Promise.reject(new Error("No popup_redirect_uri or redirect_uri configured")))},t.prototype.signinPopupCallback=function(e){return this._signinCallback(e,this._popupNavigator).then((function(e){return e&&(e.profile&&e.profile.sub?i.Log.info("UserManager.signinPopupCallback: successful, signed in sub: ",e.profile.sub):i.Log.info("UserManager.signinPopupCallback: no sub")),e})).catch((function(e){i.Log.error(e.message)}))},t.prototype.signinSilent=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=Object.assign({},t),this._loadUser().then((function(n){return n&&n.refresh_token?(t.refresh_token=n.refresh_token,e._useRefreshToken(t)):(t.request_type="si:s",t.id_token_hint=t.id_token_hint||e.settings.includeIdTokenInSilentRenew&&n&&n.id_token,n&&e._settings.validateSubOnSilentRenew&&(i.Log.debug("UserManager.signinSilent, subject prior to silent renew: ",n.profile.sub),t.current_sub=n.profile.sub),e._signinSilentIframe(t))}))},t.prototype._useRefreshToken=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._tokenClient.exchangeRefreshToken(t).then((function(t){return t?t.access_token?e._loadUser().then((function(n){if(n){var r=Promise.resolve();return t.id_token&&(r=e._validateIdTokenFromTokenRefreshToken(n.profile,t.id_token)),r.then((function(){return i.Log.debug("UserManager._useRefreshToken: refresh token response success"),n.id_token=t.id_token||n.id_token,n.access_token=t.access_token,n.refresh_token=t.refresh_token||n.refresh_token,n.expires_in=t.expires_in,e.storeUser(n).then((function(){return e._events.load(n),n}))}))}return null})):(i.Log.error("UserManager._useRefreshToken: No access token returned from token endpoint"),Promise.reject("No access token returned from token endpoint")):(i.Log.error("UserManager._useRefreshToken: No response returned from token endpoint"),Promise.reject("No response returned from token endpoint"))}))},t.prototype._validateIdTokenFromTokenRefreshToken=function(e,t){var n=this;return this._metadataService.getIssuer().then((function(r){return n.settings.getEpochTime().then((function(o){return n._joseUtil.validateJwtAttributes(t,r,n._settings.client_id,n._settings.clockSkew,o).then((function(t){return t?t.sub!==e.sub?(i.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: sub in id_token does not match current sub"),Promise.reject(new Error("sub in id_token does not match current sub"))):t.auth_time&&t.auth_time!==e.auth_time?(i.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: auth_time in id_token does not match original auth_time"),Promise.reject(new Error("auth_time in id_token does not match original auth_time"))):t.azp&&t.azp!==e.azp?(i.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: azp in id_token does not match original azp"),Promise.reject(new Error("azp in id_token does not match original azp"))):!t.azp&&e.azp?(i.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: azp not in id_token, but present in original id_token"),Promise.reject(new Error("azp not in id_token, but present in original id_token"))):void 0:(i.Log.error("UserManager._validateIdTokenFromTokenRefreshToken: Failed to validate id_token"),Promise.reject(new Error("Failed to validate id_token")))}))}))}))},t.prototype._signinSilentIframe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.redirect_uri||this.settings.silent_redirect_uri||this.settings.redirect_uri;return t?(e.redirect_uri=t,e.prompt=e.prompt||"none",this._signin(e,this._iframeNavigator,{startUrl:t,silentRequestTimeout:e.silentRequestTimeout||this.settings.silentRequestTimeout}).then((function(e){return e&&(e.profile&&e.profile.sub?i.Log.info("UserManager.signinSilent: successful, signed in sub: ",e.profile.sub):i.Log.info("UserManager.signinSilent: no sub")),e}))):(i.Log.error("UserManager.signinSilent: No silent_redirect_uri configured"),Promise.reject(new Error("No silent_redirect_uri configured")))},t.prototype.signinSilentCallback=function(e){return this._signinCallback(e,this._iframeNavigator).then((function(e){return e&&(e.profile&&e.profile.sub?i.Log.info("UserManager.signinSilentCallback: successful, signed in sub: ",e.profile.sub):i.Log.info("UserManager.signinSilentCallback: no sub")),e}))},t.prototype.signinCallback=function(e){var t=this;return this.readSigninResponseState(e).then((function(n){var r=n.state;return n.response,"si:r"===r.request_type?t.signinRedirectCallback(e):"si:p"===r.request_type?t.signinPopupCallback(e):"si:s"===r.request_type?t.signinSilentCallback(e):Promise.reject(new Error("invalid response_type in state"))}))},t.prototype.signoutCallback=function(e,t){var n=this;return this.readSignoutResponseState(e).then((function(r){var i=r.state,o=r.response;return i?"so:r"===i.request_type?n.signoutRedirectCallback(e):"so:p"===i.request_type?n.signoutPopupCallback(e,t):Promise.reject(new Error("invalid response_type in state")):o}))},t.prototype.querySessionStatus=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(t=Object.assign({},t)).request_type="si:s";var n=t.redirect_uri||this.settings.silent_redirect_uri||this.settings.redirect_uri;return n?(t.redirect_uri=n,t.prompt="none",t.response_type=t.response_type||this.settings.query_status_response_type,t.scope=t.scope||"openid",t.skipUserInfo=!0,this._signinStart(t,this._iframeNavigator,{startUrl:n,silentRequestTimeout:t.silentRequestTimeout||this.settings.silentRequestTimeout}).then((function(t){return e.processSigninResponse(t.url).then((function(e){if(i.Log.debug("UserManager.querySessionStatus: got signin response"),e.session_state&&e.profile.sub)return i.Log.info("UserManager.querySessionStatus: querySessionStatus success for sub: ",e.profile.sub),{session_state:e.session_state,sub:e.profile.sub,sid:e.profile.sid};i.Log.info("querySessionStatus successful, user not authenticated")})).catch((function(t){if(t.session_state&&e.settings.monitorAnonymousSession&&("login_required"==t.message||"consent_required"==t.message||"interaction_required"==t.message||"account_selection_required"==t.message))return i.Log.info("UserManager.querySessionStatus: querySessionStatus success for anonymous user"),{session_state:t.session_state};throw t}))}))):(i.Log.error("UserManager.querySessionStatus: No silent_redirect_uri configured"),Promise.reject(new Error("No silent_redirect_uri configured")))},t.prototype._signin=function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._signinStart(e,t,r).then((function(t){return n._signinEnd(t.url,e)}))},t.prototype._signinStart=function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return t.prepare(r).then((function(t){return i.Log.debug("UserManager._signinStart: got navigator window handle"),n.createSigninRequest(e).then((function(e){return i.Log.debug("UserManager._signinStart: got signin request"),r.url=e.url,r.id=e.state.id,t.navigate(r)})).catch((function(e){throw t.close&&(i.Log.debug("UserManager._signinStart: Error after preparing navigator, closing navigator window"),t.close()),e}))}))},t.prototype._signinEnd=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.processSigninResponse(e).then((function(e){i.Log.debug("UserManager._signinEnd: got signin response");var r=new a.User(e);if(n.current_sub){if(n.current_sub!==r.profile.sub)return i.Log.debug("UserManager._signinEnd: current user does not match user returned from signin. sub from signin: ",r.profile.sub),Promise.reject(new Error("login_required"));i.Log.debug("UserManager._signinEnd: current user matches user returned from signin")}return t.storeUser(r).then((function(){return i.Log.debug("UserManager._signinEnd: user stored"),t._events.load(r),r}))}))},t.prototype._signinCallback=function(e,t){i.Log.debug("UserManager._signinCallback");var n="query"===this._settings.response_mode||!this._settings.response_mode&&d.SigninRequest.isCode(this._settings.response_type)?"?":"#";return t.callback(e,void 0,n)},t.prototype.signoutRedirect=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(e=Object.assign({},e)).request_type="so:r";var t=e.post_logout_redirect_uri||this.settings.post_logout_redirect_uri;t&&(e.post_logout_redirect_uri=t);var n={useReplaceToNavigate:e.useReplaceToNavigate};return this._signoutStart(e,this._redirectNavigator,n).then((function(){i.Log.info("UserManager.signoutRedirect: successful")}))},t.prototype.signoutRedirectCallback=function(e){return this._signoutEnd(e||this._redirectNavigator.url).then((function(e){return i.Log.info("UserManager.signoutRedirectCallback: successful"),e}))},t.prototype.signoutPopup=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};(e=Object.assign({},e)).request_type="so:p";var t=e.post_logout_redirect_uri||this.settings.popup_post_logout_redirect_uri||this.settings.post_logout_redirect_uri;return e.post_logout_redirect_uri=t,e.display="popup",e.post_logout_redirect_uri&&(e.state=e.state||{}),this._signout(e,this._popupNavigator,{startUrl:t,popupWindowFeatures:e.popupWindowFeatures||this.settings.popupWindowFeatures,popupWindowTarget:e.popupWindowTarget||this.settings.popupWindowTarget}).then((function(){i.Log.info("UserManager.signoutPopup: successful")}))},t.prototype.signoutPopupCallback=function(e,t){return void 0===t&&"boolean"==typeof e&&(t=e,e=null),this._popupNavigator.callback(e,t,"?").then((function(){i.Log.info("UserManager.signoutPopupCallback: successful")}))},t.prototype._signout=function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this._signoutStart(e,t,r).then((function(e){return n._signoutEnd(e.url)}))},t.prototype._signoutStart=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this,n=arguments[1],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return n.prepare(r).then((function(n){return i.Log.debug("UserManager._signoutStart: got navigator window handle"),t._loadUser().then((function(o){return i.Log.debug("UserManager._signoutStart: loaded current user from storage"),(t._settings.revokeAccessTokenOnSignout?t._revokeInternal(o):Promise.resolve()).then((function(){var s=e.id_token_hint||o&&o.id_token;return s&&(i.Log.debug("UserManager._signoutStart: Setting id_token into signout request"),e.id_token_hint=s),t.removeUser().then((function(){return i.Log.debug("UserManager._signoutStart: user removed, creating signout request"),t.createSignoutRequest(e).then((function(e){return i.Log.debug("UserManager._signoutStart: got signout request"),r.url=e.url,e.state&&(r.id=e.state.id),n.navigate(r)}))}))}))})).catch((function(e){throw n.close&&(i.Log.debug("UserManager._signoutStart: Error after preparing navigator, closing navigator window"),n.close()),e}))}))},t.prototype._signoutEnd=function(e){return this.processSignoutResponse(e).then((function(e){return i.Log.debug("UserManager._signoutEnd: got signout response"),e}))},t.prototype.revokeAccessToken=function(){var e=this;return this._loadUser().then((function(t){return e._revokeInternal(t,!0).then((function(n){if(n)return i.Log.debug("UserManager.revokeAccessToken: removing token properties from user and re-storing"),t.access_token=null,t.refresh_token=null,t.expires_at=null,t.token_type=null,e.storeUser(t).then((function(){i.Log.debug("UserManager.revokeAccessToken: user stored"),e._events.load(t)}))}))})).then((function(){i.Log.info("UserManager.revokeAccessToken: access token revoked successfully")}))},t.prototype._revokeInternal=function(e,t){var n=this;if(e){var r=e.access_token,o=e.refresh_token;return this._revokeAccessTokenInternal(r,t).then((function(e){return n._revokeRefreshTokenInternal(o,t).then((function(t){return e||t||i.Log.debug("UserManager.revokeAccessToken: no need to revoke due to no token(s), or JWT format"),e||t}))}))}return Promise.resolve(!1)},t.prototype._revokeAccessTokenInternal=function(e,t){return!e||e.indexOf(".")>=0?Promise.resolve(!1):this._tokenRevocationClient.revoke(e,t).then((function(){return!0}))},t.prototype._revokeRefreshTokenInternal=function(e,t){return e?this._tokenRevocationClient.revoke(e,t,"refresh_token").then((function(){return!0})):Promise.resolve(!1)},t.prototype.startSilentRenew=function(){this._silentRenewService.start()},t.prototype.stopSilentRenew=function(){this._silentRenewService.stop()},t.prototype._loadUser=function(){return this._userStore.get(this._userStoreKey).then((function(e){return e?(i.Log.debug("UserManager._loadUser: user storageString loaded"),a.User.fromStorageString(e)):(i.Log.debug("UserManager._loadUser: no user storageString"),null)}))},t.prototype.storeUser=function(e){if(e){i.Log.debug("UserManager.storeUser: storing user");var t=e.toStorageString();return this._userStore.set(this._userStoreKey,t)}return i.Log.debug("storeUser.storeUser: removing user"),this._userStore.remove(this._userStoreKey)},r(t,[{key:"_redirectNavigator",get:function(){return this.settings.redirectNavigator}},{key:"_popupNavigator",get:function(){return this.settings.popupNavigator}},{key:"_iframeNavigator",get:function(){return this.settings.iframeNavigator}},{key:"_userStore",get:function(){return this.settings.userStore}},{key:"events",get:function(){return this._events}},{key:"_userStoreKey",get:function(){return"user:"+this.settings.authority+":"+this.settings.client_id}}]),t}(o.OidcClient)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UserManagerSettings=void 0;var r=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},r=n.popup_redirect_uri,i=n.popup_post_logout_redirect_uri,p=n.popupWindowFeatures,f=n.popupWindowTarget,m=n.silent_redirect_uri,g=n.silentRequestTimeout,b=n.automaticSilentRenew,v=void 0!==b&&b,y=n.validateSubOnSilentRenew,_=void 0!==y&&y,S=n.includeIdTokenInSilentRenew,x=void 0===S||S,w=n.monitorSession,k=void 0===w||w,O=n.monitorAnonymousSession,E=void 0!==O&&O,A=n.checkSessionInterval,T=void 0===A?2e3:A,C=n.stopCheckSessionOnError,M=void 0===C||C,P=n.query_status_response_type,$=n.revokeAccessTokenOnSignout,R=void 0!==$&&$,I=n.accessTokenExpiringNotificationTime,D=void 0===I?60:I,N=n.redirectNavigator,j=void 0===N?new o.RedirectNavigator:N,L=n.popupNavigator,B=void 0===L?new s.PopupNavigator:L,F=n.iframeNavigator,z=void 0===F?new a.IFrameNavigator:F,U=n.userStore,Q=void 0===U?new l.WebStorageStateStore({store:c.Global.sessionStorage}):U;d(this,t);var q=h(this,e.call(this,arguments[0]));return q._popup_redirect_uri=r,q._popup_post_logout_redirect_uri=i,q._popupWindowFeatures=p,q._popupWindowTarget=f,q._silent_redirect_uri=m,q._silentRequestTimeout=g,q._automaticSilentRenew=v,q._validateSubOnSilentRenew=_,q._includeIdTokenInSilentRenew=x,q._accessTokenExpiringNotificationTime=D,q._monitorSession=k,q._monitorAnonymousSession=E,q._checkSessionInterval=T,q._stopCheckSessionOnError=M,P?q._query_status_response_type=P:arguments[0]&&arguments[0].response_type?q._query_status_response_type=u.SigninRequest.isOidc(arguments[0].response_type)?"id_token":"code":q._query_status_response_type="id_token",q._revokeAccessTokenOnSignout=R,q._redirectNavigator=j,q._popupNavigator=B,q._iframeNavigator=z,q._userStore=Q,q}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"popup_redirect_uri",get:function(){return this._popup_redirect_uri}},{key:"popup_post_logout_redirect_uri",get:function(){return this._popup_post_logout_redirect_uri}},{key:"popupWindowFeatures",get:function(){return this._popupWindowFeatures}},{key:"popupWindowTarget",get:function(){return this._popupWindowTarget}},{key:"silent_redirect_uri",get:function(){return this._silent_redirect_uri}},{key:"silentRequestTimeout",get:function(){return this._silentRequestTimeout}},{key:"automaticSilentRenew",get:function(){return this._automaticSilentRenew}},{key:"validateSubOnSilentRenew",get:function(){return this._validateSubOnSilentRenew}},{key:"includeIdTokenInSilentRenew",get:function(){return this._includeIdTokenInSilentRenew}},{key:"accessTokenExpiringNotificationTime",get:function(){return this._accessTokenExpiringNotificationTime}},{key:"monitorSession",get:function(){return this._monitorSession}},{key:"monitorAnonymousSession",get:function(){return this._monitorAnonymousSession}},{key:"checkSessionInterval",get:function(){return this._checkSessionInterval}},{key:"stopCheckSessionOnError",get:function(){return this._stopCheckSessionOnError}},{key:"query_status_response_type",get:function(){return this._query_status_response_type}},{key:"revokeAccessTokenOnSignout",get:function(){return this._revokeAccessTokenOnSignout}},{key:"redirectNavigator",get:function(){return this._redirectNavigator}},{key:"popupNavigator",get:function(){return this._popupNavigator}},{key:"iframeNavigator",get:function(){return this._iframeNavigator}},{key:"userStore",get:function(){return this._userStore}}]),t}(i.OidcClientSettings)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RedirectNavigator=void 0;var r=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1])||arguments[1];r.Log.debug("UserManagerEvents.load"),e.prototype.load.call(this,t),n&&this._userLoaded.raise(t)},t.prototype.unload=function(){r.Log.debug("UserManagerEvents.unload"),e.prototype.unload.call(this),this._userUnloaded.raise()},t.prototype.addUserLoaded=function(e){this._userLoaded.addHandler(e)},t.prototype.removeUserLoaded=function(e){this._userLoaded.removeHandler(e)},t.prototype.addUserUnloaded=function(e){this._userUnloaded.addHandler(e)},t.prototype.removeUserUnloaded=function(e){this._userUnloaded.removeHandler(e)},t.prototype.addSilentRenewError=function(e){this._silentRenewError.addHandler(e)},t.prototype.removeSilentRenewError=function(e){this._silentRenewError.removeHandler(e)},t.prototype._raiseSilentRenewError=function(e){r.Log.debug("UserManagerEvents._raiseSilentRenewError",e.message),this._silentRenewError.raise(e)},t.prototype.addUserSignedIn=function(e){this._userSignedIn.addHandler(e)},t.prototype.removeUserSignedIn=function(e){this._userSignedIn.removeHandler(e)},t.prototype._raiseUserSignedIn=function(){r.Log.debug("UserManagerEvents._raiseUserSignedIn"),this._userSignedIn.raise()},t.prototype.addUserSignedOut=function(e){this._userSignedOut.addHandler(e)},t.prototype.removeUserSignedOut=function(e){this._userSignedOut.removeHandler(e)},t.prototype._raiseUserSignedOut=function(){r.Log.debug("UserManagerEvents._raiseUserSignedOut"),this._userSignedOut.raise()},t.prototype.addUserSessionChanged=function(e){this._userSessionChanged.addHandler(e)},t.prototype.removeUserSessionChanged=function(e){this._userSessionChanged.removeHandler(e)},t.prototype._raiseUserSessionChanged=function(){r.Log.debug("UserManagerEvents._raiseUserSessionChanged"),this._userSessionChanged.raise()},t}(i.AccessTokenEvents)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Timer=void 0;var r=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:o.Global.timer,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;a(this,t);var s=l(this,e.call(this,n));return s._timer=r,s._nowFunc=i||function(){return Date.now()/1e3},s}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t.prototype.init=function(e){e<=0&&(e=1),e=parseInt(e);var t=this.now+e;if(this.expiration===t&&this._timerHandle)i.Log.debug("Timer.init timer "+this._name+" skipping initialization since already initialized for expiration:",this.expiration);else{this.cancel(),i.Log.debug("Timer.init timer "+this._name+" for duration:",e),this._expiration=t;var n=5;e-1){var i=n[r];return r>0&&(n.splice(r,1),n.unshift(i)),i.value}return"NOT_FOUND"}return{get:r,put:function(t,i){"NOT_FOUND"===r(t)&&(n.unshift({key:t,value:i}),n.length>e&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}(c,d);function p(){var t=h.get(arguments);if("NOT_FOUND"===t){if(t=e.apply(null,arguments),u){var n=h.getEntries(),r=n.find((function(e){return u(e.value,t)}));r&&(t=r.value)}h.put(arguments,t)}return t}return p.clearCache=function(){return h.clear()},p}function o(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"==typeof e}))){var n=t.map((function(e){return"function"==typeof e?"function "+(e.name||"unnamed")+"()":typeof e})).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+n+"]")}return t}function s(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;re[0]-t[0]).map(e=>e[1]);return(e,n=0)=>{const r=[];for(const i of e.split("\n").slice(n)){const e=i.replace(/\(error: (.*)\)/,"$1");for(const n of t){const t=n(e);if(t){r.push(t);break}}}return function(e){if(!e.length)return[];let t=e;const n=t[0].function||"",r=t[t.length-1].function||"";-1===n.indexOf("captureMessage")&&-1===n.indexOf("captureException")||(t=t.slice(1));-1!==r.indexOf("sentryWrapped")&&(t=t.slice(0,-1));return t.slice(0,50).map(e=>({...e,filename:e.filename||t[0].filename,function:e.function||"?"})).reverse()}(r)}}function i(e){return Array.isArray(e)?r(...e):e}function o(e){try{return e&&"function"==typeof e&&e.name||""}catch(e){return""}}},,,function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(208),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(29))},function(e,t,n){var r=n(45)(n(33),"Map");e.exports=r},function(e,t,n){var r=n(136),i=n(273),o=n(141);e.exports=function(e){return o(e)?r(e):i(e)}},function(e,t){e.exports=function(e){return function(t){return e(t)}}},function(e,t,n){(function(e){var r=n(130),i=t&&!t.nodeType&&t,o=i&&"object"==typeof e&&e&&!e.nodeType&&e,s=o&&o.exports===i&&r.process,a=function(){try{var e=o&&o.require&&o.require("util").types;return e||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a}).call(this,n(65)(e))},function(e,t){var n=Object.prototype;e.exports=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||n)}},function(e,t,n){var r=n(136),i=n(276),o=n(141);e.exports=function(e){return o(e)?r(e,!0):i(e)}},function(e,t,n){var r=n(281),i=n(142),o=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(e){return null==e?[]:(e=Object(e),r(s(e),(function(t){return o.call(e,t)})))}:i;e.exports=a},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,i=e.length;++n\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g,h={"­":"shy","‌":"zwnj","‍":"zwj","‎":"lrm","⁣":"ic","⁢":"it","⁡":"af","‏":"rlm","​":"ZeroWidthSpace","⁠":"NoBreak","̑":"DownBreve","⃛":"tdot","⃜":"DotDot","\t":"Tab","\n":"NewLine"," ":"puncsp"," ":"MediumSpace"," ":"thinsp"," ":"hairsp"," ":"emsp13"," ":"ensp"," ":"emsp14"," ":"emsp"," ":"numsp"," ":"nbsp","  ":"ThickSpace","‾":"oline",_:"lowbar","‐":"dash","–":"ndash","—":"mdash","―":"horbar",",":"comma",";":"semi","⁏":"bsemi",":":"colon","⩴":"Colone","!":"excl","¡":"iexcl","?":"quest","¿":"iquest",".":"period","‥":"nldr","…":"mldr","·":"middot","'":"apos","‘":"lsquo","’":"rsquo","‚":"sbquo","‹":"lsaquo","›":"rsaquo",'"':"quot","“":"ldquo","”":"rdquo","„":"bdquo","«":"laquo","»":"raquo","(":"lpar",")":"rpar","[":"lsqb","]":"rsqb","{":"lcub","}":"rcub","⌈":"lceil","⌉":"rceil","⌊":"lfloor","⌋":"rfloor","⦅":"lopar","⦆":"ropar","⦋":"lbrke","⦌":"rbrke","⦍":"lbrkslu","⦎":"rbrksld","⦏":"lbrksld","⦐":"rbrkslu","⦑":"langd","⦒":"rangd","⦓":"lparlt","⦔":"rpargt","⦕":"gtlPar","⦖":"ltrPar","⟦":"lobrk","⟧":"robrk","⟨":"lang","⟩":"rang","⟪":"Lang","⟫":"Rang","⟬":"loang","⟭":"roang","❲":"lbbrk","❳":"rbbrk","‖":"Vert","§":"sect","¶":"para","@":"commat","*":"ast","/":"sol",undefined:null,"&":"amp","#":"num","%":"percnt","‰":"permil","‱":"pertenk","†":"dagger","‡":"Dagger","•":"bull","⁃":"hybull","′":"prime","″":"Prime","‴":"tprime","⁗":"qprime","‵":"bprime","⁁":"caret","`":"grave","´":"acute","˜":"tilde","^":"Hat","¯":"macr","˘":"breve","˙":"dot","¨":"die","˚":"ring","˝":"dblac","¸":"cedil","˛":"ogon","ˆ":"circ","ˇ":"caron","°":"deg","©":"copy","®":"reg","℗":"copysr","℘":"wp","℞":"rx","℧":"mho","℩":"iiota","←":"larr","↚":"nlarr","→":"rarr","↛":"nrarr","↑":"uarr","↓":"darr","↔":"harr","↮":"nharr","↕":"varr","↖":"nwarr","↗":"nearr","↘":"searr","↙":"swarr","↝":"rarrw","↝̸":"nrarrw","↞":"Larr","↟":"Uarr","↠":"Rarr","↡":"Darr","↢":"larrtl","↣":"rarrtl","↤":"mapstoleft","↥":"mapstoup","↦":"map","↧":"mapstodown","↩":"larrhk","↪":"rarrhk","↫":"larrlp","↬":"rarrlp","↭":"harrw","↰":"lsh","↱":"rsh","↲":"ldsh","↳":"rdsh","↵":"crarr","↶":"cularr","↷":"curarr","↺":"olarr","↻":"orarr","↼":"lharu","↽":"lhard","↾":"uharr","↿":"uharl","⇀":"rharu","⇁":"rhard","⇂":"dharr","⇃":"dharl","⇄":"rlarr","⇅":"udarr","⇆":"lrarr","⇇":"llarr","⇈":"uuarr","⇉":"rrarr","⇊":"ddarr","⇋":"lrhar","⇌":"rlhar","⇐":"lArr","⇍":"nlArr","⇑":"uArr","⇒":"rArr","⇏":"nrArr","⇓":"dArr","⇔":"iff","⇎":"nhArr","⇕":"vArr","⇖":"nwArr","⇗":"neArr","⇘":"seArr","⇙":"swArr","⇚":"lAarr","⇛":"rAarr","⇝":"zigrarr","⇤":"larrb","⇥":"rarrb","⇵":"duarr","⇽":"loarr","⇾":"roarr","⇿":"hoarr","∀":"forall","∁":"comp","∂":"part","∂̸":"npart","∃":"exist","∄":"nexist","∅":"empty","∇":"Del","∈":"in","∉":"notin","∋":"ni","∌":"notni","϶":"bepsi","∏":"prod","∐":"coprod","∑":"sum","+":"plus","±":"pm","÷":"div","×":"times","<":"lt","≮":"nlt","<⃒":"nvlt","=":"equals","≠":"ne","=⃥":"bne","⩵":"Equal",">":"gt","≯":"ngt",">⃒":"nvgt","¬":"not","|":"vert","¦":"brvbar","−":"minus","∓":"mp","∔":"plusdo","⁄":"frasl","∖":"setmn","∗":"lowast","∘":"compfn","√":"Sqrt","∝":"prop","∞":"infin","∟":"angrt","∠":"ang","∠⃒":"nang","∡":"angmsd","∢":"angsph","∣":"mid","∤":"nmid","∥":"par","∦":"npar","∧":"and","∨":"or","∩":"cap","∩︀":"caps","∪":"cup","∪︀":"cups","∫":"int","∬":"Int","∭":"tint","⨌":"qint","∮":"oint","∯":"Conint","∰":"Cconint","∱":"cwint","∲":"cwconint","∳":"awconint","∴":"there4","∵":"becaus","∶":"ratio","∷":"Colon","∸":"minusd","∺":"mDDot","∻":"homtht","∼":"sim","≁":"nsim","∼⃒":"nvsim","∽":"bsim","∽̱":"race","∾":"ac","∾̳":"acE","∿":"acd","≀":"wr","≂":"esim","≂̸":"nesim","≃":"sime","≄":"nsime","≅":"cong","≇":"ncong","≆":"simne","≈":"ap","≉":"nap","≊":"ape","≋":"apid","≋̸":"napid","≌":"bcong","≍":"CupCap","≭":"NotCupCap","≍⃒":"nvap","≎":"bump","≎̸":"nbump","≏":"bumpe","≏̸":"nbumpe","≐":"doteq","≐̸":"nedot","≑":"eDot","≒":"efDot","≓":"erDot","≔":"colone","≕":"ecolon","≖":"ecir","≗":"cire","≙":"wedgeq","≚":"veeeq","≜":"trie","≟":"equest","≡":"equiv","≢":"nequiv","≡⃥":"bnequiv","≤":"le","≰":"nle","≤⃒":"nvle","≥":"ge","≱":"nge","≥⃒":"nvge","≦":"lE","≦̸":"nlE","≧":"gE","≧̸":"ngE","≨︀":"lvnE","≨":"lnE","≩":"gnE","≩︀":"gvnE","≪":"ll","≪̸":"nLtv","≪⃒":"nLt","≫":"gg","≫̸":"nGtv","≫⃒":"nGt","≬":"twixt","≲":"lsim","≴":"nlsim","≳":"gsim","≵":"ngsim","≶":"lg","≸":"ntlg","≷":"gl","≹":"ntgl","≺":"pr","⊀":"npr","≻":"sc","⊁":"nsc","≼":"prcue","⋠":"nprcue","≽":"sccue","⋡":"nsccue","≾":"prsim","≿":"scsim","≿̸":"NotSucceedsTilde","⊂":"sub","⊄":"nsub","⊂⃒":"vnsub","⊃":"sup","⊅":"nsup","⊃⃒":"vnsup","⊆":"sube","⊈":"nsube","⊇":"supe","⊉":"nsupe","⊊︀":"vsubne","⊊":"subne","⊋︀":"vsupne","⊋":"supne","⊍":"cupdot","⊎":"uplus","⊏":"sqsub","⊏̸":"NotSquareSubset","⊐":"sqsup","⊐̸":"NotSquareSuperset","⊑":"sqsube","⋢":"nsqsube","⊒":"sqsupe","⋣":"nsqsupe","⊓":"sqcap","⊓︀":"sqcaps","⊔":"sqcup","⊔︀":"sqcups","⊕":"oplus","⊖":"ominus","⊗":"otimes","⊘":"osol","⊙":"odot","⊚":"ocir","⊛":"oast","⊝":"odash","⊞":"plusb","⊟":"minusb","⊠":"timesb","⊡":"sdotb","⊢":"vdash","⊬":"nvdash","⊣":"dashv","⊤":"top","⊥":"bot","⊧":"models","⊨":"vDash","⊭":"nvDash","⊩":"Vdash","⊮":"nVdash","⊪":"Vvdash","⊫":"VDash","⊯":"nVDash","⊰":"prurel","⊲":"vltri","⋪":"nltri","⊳":"vrtri","⋫":"nrtri","⊴":"ltrie","⋬":"nltrie","⊴⃒":"nvltrie","⊵":"rtrie","⋭":"nrtrie","⊵⃒":"nvrtrie","⊶":"origof","⊷":"imof","⊸":"mumap","⊹":"hercon","⊺":"intcal","⊻":"veebar","⊽":"barvee","⊾":"angrtvb","⊿":"lrtri","⋀":"Wedge","⋁":"Vee","⋂":"xcap","⋃":"xcup","⋄":"diam","⋅":"sdot","⋆":"Star","⋇":"divonx","⋈":"bowtie","⋉":"ltimes","⋊":"rtimes","⋋":"lthree","⋌":"rthree","⋍":"bsime","⋎":"cuvee","⋏":"cuwed","⋐":"Sub","⋑":"Sup","⋒":"Cap","⋓":"Cup","⋔":"fork","⋕":"epar","⋖":"ltdot","⋗":"gtdot","⋘":"Ll","⋘̸":"nLl","⋙":"Gg","⋙̸":"nGg","⋚︀":"lesg","⋚":"leg","⋛":"gel","⋛︀":"gesl","⋞":"cuepr","⋟":"cuesc","⋦":"lnsim","⋧":"gnsim","⋨":"prnsim","⋩":"scnsim","⋮":"vellip","⋯":"ctdot","⋰":"utdot","⋱":"dtdot","⋲":"disin","⋳":"isinsv","⋴":"isins","⋵":"isindot","⋵̸":"notindot","⋶":"notinvc","⋷":"notinvb","⋹":"isinE","⋹̸":"notinE","⋺":"nisd","⋻":"xnis","⋼":"nis","⋽":"notnivc","⋾":"notnivb","⌅":"barwed","⌆":"Barwed","⌌":"drcrop","⌍":"dlcrop","⌎":"urcrop","⌏":"ulcrop","⌐":"bnot","⌒":"profline","⌓":"profsurf","⌕":"telrec","⌖":"target","⌜":"ulcorn","⌝":"urcorn","⌞":"dlcorn","⌟":"drcorn","⌢":"frown","⌣":"smile","⌭":"cylcty","⌮":"profalar","⌶":"topbot","⌽":"ovbar","⌿":"solbar","⍼":"angzarr","⎰":"lmoust","⎱":"rmoust","⎴":"tbrk","⎵":"bbrk","⎶":"bbrktbrk","⏜":"OverParenthesis","⏝":"UnderParenthesis","⏞":"OverBrace","⏟":"UnderBrace","⏢":"trpezium","⏧":"elinters","␣":"blank","─":"boxh","│":"boxv","┌":"boxdr","┐":"boxdl","└":"boxur","┘":"boxul","├":"boxvr","┤":"boxvl","┬":"boxhd","┴":"boxhu","┼":"boxvh","═":"boxH","║":"boxV","╒":"boxdR","╓":"boxDr","╔":"boxDR","╕":"boxdL","╖":"boxDl","╗":"boxDL","╘":"boxuR","╙":"boxUr","╚":"boxUR","╛":"boxuL","╜":"boxUl","╝":"boxUL","╞":"boxvR","╟":"boxVr","╠":"boxVR","╡":"boxvL","╢":"boxVl","╣":"boxVL","╤":"boxHd","╥":"boxhD","╦":"boxHD","╧":"boxHu","╨":"boxhU","╩":"boxHU","╪":"boxvH","╫":"boxVh","╬":"boxVH","▀":"uhblk","▄":"lhblk","█":"block","░":"blk14","▒":"blk12","▓":"blk34","□":"squ","▪":"squf","▫":"EmptyVerySmallSquare","▭":"rect","▮":"marker","▱":"fltns","△":"xutri","▴":"utrif","▵":"utri","▸":"rtrif","▹":"rtri","▽":"xdtri","▾":"dtrif","▿":"dtri","◂":"ltrif","◃":"ltri","◊":"loz","○":"cir","◬":"tridot","◯":"xcirc","◸":"ultri","◹":"urtri","◺":"lltri","◻":"EmptySmallSquare","◼":"FilledSmallSquare","★":"starf","☆":"star","☎":"phone","♀":"female","♂":"male","♠":"spades","♣":"clubs","♥":"hearts","♦":"diams","♪":"sung","✓":"check","✗":"cross","✠":"malt","✶":"sext","❘":"VerticalSeparator","⟈":"bsolhsub","⟉":"suphsol","⟵":"xlarr","⟶":"xrarr","⟷":"xharr","⟸":"xlArr","⟹":"xrArr","⟺":"xhArr","⟼":"xmap","⟿":"dzigrarr","⤂":"nvlArr","⤃":"nvrArr","⤄":"nvHarr","⤅":"Map","⤌":"lbarr","⤍":"rbarr","⤎":"lBarr","⤏":"rBarr","⤐":"RBarr","⤑":"DDotrahd","⤒":"UpArrowBar","⤓":"DownArrowBar","⤖":"Rarrtl","⤙":"latail","⤚":"ratail","⤛":"lAtail","⤜":"rAtail","⤝":"larrfs","⤞":"rarrfs","⤟":"larrbfs","⤠":"rarrbfs","⤣":"nwarhk","⤤":"nearhk","⤥":"searhk","⤦":"swarhk","⤧":"nwnear","⤨":"toea","⤩":"tosa","⤪":"swnwar","⤳":"rarrc","⤳̸":"nrarrc","⤵":"cudarrr","⤶":"ldca","⤷":"rdca","⤸":"cudarrl","⤹":"larrpl","⤼":"curarrm","⤽":"cularrp","⥅":"rarrpl","⥈":"harrcir","⥉":"Uarrocir","⥊":"lurdshar","⥋":"ldrushar","⥎":"LeftRightVector","⥏":"RightUpDownVector","⥐":"DownLeftRightVector","⥑":"LeftUpDownVector","⥒":"LeftVectorBar","⥓":"RightVectorBar","⥔":"RightUpVectorBar","⥕":"RightDownVectorBar","⥖":"DownLeftVectorBar","⥗":"DownRightVectorBar","⥘":"LeftUpVectorBar","⥙":"LeftDownVectorBar","⥚":"LeftTeeVector","⥛":"RightTeeVector","⥜":"RightUpTeeVector","⥝":"RightDownTeeVector","⥞":"DownLeftTeeVector","⥟":"DownRightTeeVector","⥠":"LeftUpTeeVector","⥡":"LeftDownTeeVector","⥢":"lHar","⥣":"uHar","⥤":"rHar","⥥":"dHar","⥦":"luruhar","⥧":"ldrdhar","⥨":"ruluhar","⥩":"rdldhar","⥪":"lharul","⥫":"llhard","⥬":"rharul","⥭":"lrhard","⥮":"udhar","⥯":"duhar","⥰":"RoundImplies","⥱":"erarr","⥲":"simrarr","⥳":"larrsim","⥴":"rarrsim","⥵":"rarrap","⥶":"ltlarr","⥸":"gtrarr","⥹":"subrarr","⥻":"suplarr","⥼":"lfisht","⥽":"rfisht","⥾":"ufisht","⥿":"dfisht","⦚":"vzigzag","⦜":"vangrt","⦝":"angrtvbd","⦤":"ange","⦥":"range","⦦":"dwangle","⦧":"uwangle","⦨":"angmsdaa","⦩":"angmsdab","⦪":"angmsdac","⦫":"angmsdad","⦬":"angmsdae","⦭":"angmsdaf","⦮":"angmsdag","⦯":"angmsdah","⦰":"bemptyv","⦱":"demptyv","⦲":"cemptyv","⦳":"raemptyv","⦴":"laemptyv","⦵":"ohbar","⦶":"omid","⦷":"opar","⦹":"operp","⦻":"olcross","⦼":"odsold","⦾":"olcir","⦿":"ofcir","⧀":"olt","⧁":"ogt","⧂":"cirscir","⧃":"cirE","⧄":"solb","⧅":"bsolb","⧉":"boxbox","⧍":"trisb","⧎":"rtriltri","⧏":"LeftTriangleBar","⧏̸":"NotLeftTriangleBar","⧐":"RightTriangleBar","⧐̸":"NotRightTriangleBar","⧜":"iinfin","⧝":"infintie","⧞":"nvinfin","⧣":"eparsl","⧤":"smeparsl","⧥":"eqvparsl","⧫":"lozf","⧴":"RuleDelayed","⧶":"dsol","⨀":"xodot","⨁":"xoplus","⨂":"xotime","⨄":"xuplus","⨆":"xsqcup","⨍":"fpartint","⨐":"cirfnint","⨑":"awint","⨒":"rppolint","⨓":"scpolint","⨔":"npolint","⨕":"pointint","⨖":"quatint","⨗":"intlarhk","⨢":"pluscir","⨣":"plusacir","⨤":"simplus","⨥":"plusdu","⨦":"plussim","⨧":"plustwo","⨩":"mcomma","⨪":"minusdu","⨭":"loplus","⨮":"roplus","⨯":"Cross","⨰":"timesd","⨱":"timesbar","⨳":"smashp","⨴":"lotimes","⨵":"rotimes","⨶":"otimesas","⨷":"Otimes","⨸":"odiv","⨹":"triplus","⨺":"triminus","⨻":"tritime","⨼":"iprod","⨿":"amalg","⩀":"capdot","⩂":"ncup","⩃":"ncap","⩄":"capand","⩅":"cupor","⩆":"cupcap","⩇":"capcup","⩈":"cupbrcap","⩉":"capbrcup","⩊":"cupcup","⩋":"capcap","⩌":"ccups","⩍":"ccaps","⩐":"ccupssm","⩓":"And","⩔":"Or","⩕":"andand","⩖":"oror","⩗":"orslope","⩘":"andslope","⩚":"andv","⩛":"orv","⩜":"andd","⩝":"ord","⩟":"wedbar","⩦":"sdote","⩪":"simdot","⩭":"congdot","⩭̸":"ncongdot","⩮":"easter","⩯":"apacir","⩰":"apE","⩰̸":"napE","⩱":"eplus","⩲":"pluse","⩳":"Esim","⩷":"eDDot","⩸":"equivDD","⩹":"ltcir","⩺":"gtcir","⩻":"ltquest","⩼":"gtquest","⩽":"les","⩽̸":"nles","⩾":"ges","⩾̸":"nges","⩿":"lesdot","⪀":"gesdot","⪁":"lesdoto","⪂":"gesdoto","⪃":"lesdotor","⪄":"gesdotol","⪅":"lap","⪆":"gap","⪇":"lne","⪈":"gne","⪉":"lnap","⪊":"gnap","⪋":"lEg","⪌":"gEl","⪍":"lsime","⪎":"gsime","⪏":"lsimg","⪐":"gsiml","⪑":"lgE","⪒":"glE","⪓":"lesges","⪔":"gesles","⪕":"els","⪖":"egs","⪗":"elsdot","⪘":"egsdot","⪙":"el","⪚":"eg","⪝":"siml","⪞":"simg","⪟":"simlE","⪠":"simgE","⪡":"LessLess","⪡̸":"NotNestedLessLess","⪢":"GreaterGreater","⪢̸":"NotNestedGreaterGreater","⪤":"glj","⪥":"gla","⪦":"ltcc","⪧":"gtcc","⪨":"lescc","⪩":"gescc","⪪":"smt","⪫":"lat","⪬":"smte","⪬︀":"smtes","⪭":"late","⪭︀":"lates","⪮":"bumpE","⪯":"pre","⪯̸":"npre","⪰":"sce","⪰̸":"nsce","⪳":"prE","⪴":"scE","⪵":"prnE","⪶":"scnE","⪷":"prap","⪸":"scap","⪹":"prnap","⪺":"scnap","⪻":"Pr","⪼":"Sc","⪽":"subdot","⪾":"supdot","⪿":"subplus","⫀":"supplus","⫁":"submult","⫂":"supmult","⫃":"subedot","⫄":"supedot","⫅":"subE","⫅̸":"nsubE","⫆":"supE","⫆̸":"nsupE","⫇":"subsim","⫈":"supsim","⫋︀":"vsubnE","⫋":"subnE","⫌︀":"vsupnE","⫌":"supnE","⫏":"csub","⫐":"csup","⫑":"csube","⫒":"csupe","⫓":"subsup","⫔":"supsub","⫕":"subsub","⫖":"supsup","⫗":"suphsub","⫘":"supdsub","⫙":"forkv","⫚":"topfork","⫛":"mlcp","⫤":"Dashv","⫦":"Vdashl","⫧":"Barv","⫨":"vBar","⫩":"vBarv","⫫":"Vbar","⫬":"Not","⫭":"bNot","⫮":"rnmid","⫯":"cirmid","⫰":"midcir","⫱":"topcir","⫲":"nhpar","⫳":"parsim","⫽":"parsl","⫽⃥":"nparsl","♭":"flat","♮":"natur","♯":"sharp","¤":"curren","¢":"cent",$:"dollar","£":"pound","¥":"yen","€":"euro","¹":"sup1","½":"half","⅓":"frac13","¼":"frac14","⅕":"frac15","⅙":"frac16","⅛":"frac18","²":"sup2","⅔":"frac23","⅖":"frac25","³":"sup3","¾":"frac34","⅗":"frac35","⅜":"frac38","⅘":"frac45","⅚":"frac56","⅝":"frac58","⅞":"frac78","𝒶":"ascr","𝕒":"aopf","𝔞":"afr","𝔸":"Aopf","𝔄":"Afr","𝒜":"Ascr","ª":"ordf","á":"aacute","Á":"Aacute","à":"agrave","À":"Agrave","ă":"abreve","Ă":"Abreve","â":"acirc","Â":"Acirc","å":"aring","Å":"angst","ä":"auml","Ä":"Auml","ã":"atilde","Ã":"Atilde","ą":"aogon","Ą":"Aogon","ā":"amacr","Ā":"Amacr","æ":"aelig","Æ":"AElig","𝒷":"bscr","𝕓":"bopf","𝔟":"bfr","𝔹":"Bopf","ℬ":"Bscr","𝔅":"Bfr","𝔠":"cfr","𝒸":"cscr","𝕔":"copf","ℭ":"Cfr","𝒞":"Cscr","ℂ":"Copf","ć":"cacute","Ć":"Cacute","ĉ":"ccirc","Ĉ":"Ccirc","č":"ccaron","Č":"Ccaron","ċ":"cdot","Ċ":"Cdot","ç":"ccedil","Ç":"Ccedil","℅":"incare","𝔡":"dfr","ⅆ":"dd","𝕕":"dopf","𝒹":"dscr","𝒟":"Dscr","𝔇":"Dfr","ⅅ":"DD","𝔻":"Dopf","ď":"dcaron","Ď":"Dcaron","đ":"dstrok","Đ":"Dstrok","ð":"eth","Ð":"ETH","ⅇ":"ee","ℯ":"escr","𝔢":"efr","𝕖":"eopf","ℰ":"Escr","𝔈":"Efr","𝔼":"Eopf","é":"eacute","É":"Eacute","è":"egrave","È":"Egrave","ê":"ecirc","Ê":"Ecirc","ě":"ecaron","Ě":"Ecaron","ë":"euml","Ë":"Euml","ė":"edot","Ė":"Edot","ę":"eogon","Ę":"Eogon","ē":"emacr","Ē":"Emacr","𝔣":"ffr","𝕗":"fopf","𝒻":"fscr","𝔉":"Ffr","𝔽":"Fopf","ℱ":"Fscr","ff":"fflig","ffi":"ffilig","ffl":"ffllig","fi":"filig",fj:"fjlig","fl":"fllig","ƒ":"fnof","ℊ":"gscr","𝕘":"gopf","𝔤":"gfr","𝒢":"Gscr","𝔾":"Gopf","𝔊":"Gfr","ǵ":"gacute","ğ":"gbreve","Ğ":"Gbreve","ĝ":"gcirc","Ĝ":"Gcirc","ġ":"gdot","Ġ":"Gdot","Ģ":"Gcedil","𝔥":"hfr","ℎ":"planckh","𝒽":"hscr","𝕙":"hopf","ℋ":"Hscr","ℌ":"Hfr","ℍ":"Hopf","ĥ":"hcirc","Ĥ":"Hcirc","ℏ":"hbar","ħ":"hstrok","Ħ":"Hstrok","𝕚":"iopf","𝔦":"ifr","𝒾":"iscr","ⅈ":"ii","𝕀":"Iopf","ℐ":"Iscr","ℑ":"Im","í":"iacute","Í":"Iacute","ì":"igrave","Ì":"Igrave","î":"icirc","Î":"Icirc","ï":"iuml","Ï":"Iuml","ĩ":"itilde","Ĩ":"Itilde","İ":"Idot","į":"iogon","Į":"Iogon","ī":"imacr","Ī":"Imacr","ij":"ijlig","IJ":"IJlig","ı":"imath","𝒿":"jscr","𝕛":"jopf","𝔧":"jfr","𝒥":"Jscr","𝔍":"Jfr","𝕁":"Jopf","ĵ":"jcirc","Ĵ":"Jcirc","ȷ":"jmath","𝕜":"kopf","𝓀":"kscr","𝔨":"kfr","𝒦":"Kscr","𝕂":"Kopf","𝔎":"Kfr","ķ":"kcedil","Ķ":"Kcedil","𝔩":"lfr","𝓁":"lscr","ℓ":"ell","𝕝":"lopf","ℒ":"Lscr","𝔏":"Lfr","𝕃":"Lopf","ĺ":"lacute","Ĺ":"Lacute","ľ":"lcaron","Ľ":"Lcaron","ļ":"lcedil","Ļ":"Lcedil","ł":"lstrok","Ł":"Lstrok","ŀ":"lmidot","Ŀ":"Lmidot","𝔪":"mfr","𝕞":"mopf","𝓂":"mscr","𝔐":"Mfr","𝕄":"Mopf","ℳ":"Mscr","𝔫":"nfr","𝕟":"nopf","𝓃":"nscr","ℕ":"Nopf","𝒩":"Nscr","𝔑":"Nfr","ń":"nacute","Ń":"Nacute","ň":"ncaron","Ň":"Ncaron","ñ":"ntilde","Ñ":"Ntilde","ņ":"ncedil","Ņ":"Ncedil","№":"numero","ŋ":"eng","Ŋ":"ENG","𝕠":"oopf","𝔬":"ofr","ℴ":"oscr","𝒪":"Oscr","𝔒":"Ofr","𝕆":"Oopf","º":"ordm","ó":"oacute","Ó":"Oacute","ò":"ograve","Ò":"Ograve","ô":"ocirc","Ô":"Ocirc","ö":"ouml","Ö":"Ouml","ő":"odblac","Ő":"Odblac","õ":"otilde","Õ":"Otilde","ø":"oslash","Ø":"Oslash","ō":"omacr","Ō":"Omacr","œ":"oelig","Œ":"OElig","𝔭":"pfr","𝓅":"pscr","𝕡":"popf","ℙ":"Popf","𝔓":"Pfr","𝒫":"Pscr","𝕢":"qopf","𝔮":"qfr","𝓆":"qscr","𝒬":"Qscr","𝔔":"Qfr","ℚ":"Qopf","ĸ":"kgreen","𝔯":"rfr","𝕣":"ropf","𝓇":"rscr","ℛ":"Rscr","ℜ":"Re","ℝ":"Ropf","ŕ":"racute","Ŕ":"Racute","ř":"rcaron","Ř":"Rcaron","ŗ":"rcedil","Ŗ":"Rcedil","𝕤":"sopf","𝓈":"sscr","𝔰":"sfr","𝕊":"Sopf","𝔖":"Sfr","𝒮":"Sscr","Ⓢ":"oS","ś":"sacute","Ś":"Sacute","ŝ":"scirc","Ŝ":"Scirc","š":"scaron","Š":"Scaron","ş":"scedil","Ş":"Scedil","ß":"szlig","𝔱":"tfr","𝓉":"tscr","𝕥":"topf","𝒯":"Tscr","𝔗":"Tfr","𝕋":"Topf","ť":"tcaron","Ť":"Tcaron","ţ":"tcedil","Ţ":"Tcedil","™":"trade","ŧ":"tstrok","Ŧ":"Tstrok","𝓊":"uscr","𝕦":"uopf","𝔲":"ufr","𝕌":"Uopf","𝔘":"Ufr","𝒰":"Uscr","ú":"uacute","Ú":"Uacute","ù":"ugrave","Ù":"Ugrave","ŭ":"ubreve","Ŭ":"Ubreve","û":"ucirc","Û":"Ucirc","ů":"uring","Ů":"Uring","ü":"uuml","Ü":"Uuml","ű":"udblac","Ű":"Udblac","ũ":"utilde","Ũ":"Utilde","ų":"uogon","Ų":"Uogon","ū":"umacr","Ū":"Umacr","𝔳":"vfr","𝕧":"vopf","𝓋":"vscr","𝔙":"Vfr","𝕍":"Vopf","𝒱":"Vscr","𝕨":"wopf","𝓌":"wscr","𝔴":"wfr","𝒲":"Wscr","𝕎":"Wopf","𝔚":"Wfr","ŵ":"wcirc","Ŵ":"Wcirc","𝔵":"xfr","𝓍":"xscr","𝕩":"xopf","𝕏":"Xopf","𝔛":"Xfr","𝒳":"Xscr","𝔶":"yfr","𝓎":"yscr","𝕪":"yopf","𝒴":"Yscr","𝔜":"Yfr","𝕐":"Yopf","ý":"yacute","Ý":"Yacute","ŷ":"ycirc","Ŷ":"Ycirc","ÿ":"yuml","Ÿ":"Yuml","𝓏":"zscr","𝔷":"zfr","𝕫":"zopf","ℨ":"Zfr","ℤ":"Zopf","𝒵":"Zscr","ź":"zacute","Ź":"Zacute","ž":"zcaron","Ž":"Zcaron","ż":"zdot","Ż":"Zdot","Ƶ":"imped","þ":"thorn","Þ":"THORN","ʼn":"napos","α":"alpha","Α":"Alpha","β":"beta","Β":"Beta","γ":"gamma","Γ":"Gamma","δ":"delta","Δ":"Delta","ε":"epsi","ϵ":"epsiv","Ε":"Epsilon","ϝ":"gammad","Ϝ":"Gammad","ζ":"zeta","Ζ":"Zeta","η":"eta","Η":"Eta","θ":"theta","ϑ":"thetav","Θ":"Theta","ι":"iota","Ι":"Iota","κ":"kappa","ϰ":"kappav","Κ":"Kappa","λ":"lambda","Λ":"Lambda","μ":"mu","µ":"micro","Μ":"Mu","ν":"nu","Ν":"Nu","ξ":"xi","Ξ":"Xi","ο":"omicron","Ο":"Omicron","π":"pi","ϖ":"piv","Π":"Pi","ρ":"rho","ϱ":"rhov","Ρ":"Rho","σ":"sigma","Σ":"Sigma","ς":"sigmaf","τ":"tau","Τ":"Tau","υ":"upsi","Υ":"Upsilon","ϒ":"Upsi","φ":"phi","ϕ":"phiv","Φ":"Phi","χ":"chi","Χ":"Chi","ψ":"psi","Ψ":"Psi","ω":"omega","Ω":"ohm","а":"acy","А":"Acy","б":"bcy","Б":"Bcy","в":"vcy","В":"Vcy","г":"gcy","Г":"Gcy","ѓ":"gjcy","Ѓ":"GJcy","д":"dcy","Д":"Dcy","ђ":"djcy","Ђ":"DJcy","е":"iecy","Е":"IEcy","ё":"iocy","Ё":"IOcy","є":"jukcy","Є":"Jukcy","ж":"zhcy","Ж":"ZHcy","з":"zcy","З":"Zcy","ѕ":"dscy","Ѕ":"DScy","и":"icy","И":"Icy","і":"iukcy","І":"Iukcy","ї":"yicy","Ї":"YIcy","й":"jcy","Й":"Jcy","ј":"jsercy","Ј":"Jsercy","к":"kcy","К":"Kcy","ќ":"kjcy","Ќ":"KJcy","л":"lcy","Л":"Lcy","љ":"ljcy","Љ":"LJcy","м":"mcy","М":"Mcy","н":"ncy","Н":"Ncy","њ":"njcy","Њ":"NJcy","о":"ocy","О":"Ocy","п":"pcy","П":"Pcy","р":"rcy","Р":"Rcy","с":"scy","С":"Scy","т":"tcy","Т":"Tcy","ћ":"tshcy","Ћ":"TSHcy","у":"ucy","У":"Ucy","ў":"ubrcy","Ў":"Ubrcy","ф":"fcy","Ф":"Fcy","х":"khcy","Х":"KHcy","ц":"tscy","Ц":"TScy","ч":"chcy","Ч":"CHcy","џ":"dzcy","Џ":"DZcy","ш":"shcy","Ш":"SHcy","щ":"shchcy","Щ":"SHCHcy","ъ":"hardcy","Ъ":"HARDcy","ы":"ycy","Ы":"Ycy","ь":"softcy","Ь":"SOFTcy","э":"ecy","Э":"Ecy","ю":"yucy","Ю":"YUcy","я":"yacy","Я":"YAcy","ℵ":"aleph","ℶ":"beth","ℷ":"gimel","ℸ":"daleth"},p=/["&'<>`]/g,f={'"':""","&":"&","'":"'","<":"<",">":">","`":"`"},m=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/,g=/[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,b=/&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g,v={aacute:"á",Aacute:"Á",abreve:"ă",Abreve:"Ă",ac:"∾",acd:"∿",acE:"∾̳",acirc:"â",Acirc:"Â",acute:"´",acy:"а",Acy:"А",aelig:"æ",AElig:"Æ",af:"⁡",afr:"𝔞",Afr:"𝔄",agrave:"à",Agrave:"À",alefsym:"ℵ",aleph:"ℵ",alpha:"α",Alpha:"Α",amacr:"ā",Amacr:"Ā",amalg:"⨿",amp:"&",AMP:"&",and:"∧",And:"⩓",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",Aogon:"Ą",aopf:"𝕒",Aopf:"𝔸",ap:"≈",apacir:"⩯",ape:"≊",apE:"⩰",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",aring:"å",Aring:"Å",ascr:"𝒶",Ascr:"𝒜",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",Bcy:"Б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",beta:"β",Beta:"Β",beth:"ℶ",between:"≬",bfr:"𝔟",Bfr:"𝔅",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bNot:"⫭",bopf:"𝕓",Bopf:"𝔹",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxhD:"╥",boxHd:"╤",boxHD:"╦",boxhu:"┴",boxhU:"╨",boxHu:"╧",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpe:"≏",bumpE:"⪮",bumpeq:"≏",Bumpeq:"≎",cacute:"ć",Cacute:"Ć",cap:"∩",Cap:"⋒",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",ccaron:"č",Ccaron:"Č",ccedil:"ç",Ccedil:"Ç",ccirc:"ĉ",Ccirc:"Ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",Cdot:"Ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",chcy:"ч",CHcy:"Ч",check:"✓",checkmark:"✓",chi:"χ",Chi:"Χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cire:"≗",cirE:"⧃",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",colone:"≔",Colone:"⩴",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",cscr:"𝒸",Cscr:"𝒞",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",Cup:"⋓",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",dArr:"⇓",Darr:"↡",dash:"‐",dashv:"⊣",Dashv:"⫤",dbkarow:"⤏",dblac:"˝",dcaron:"ď",Dcaron:"Ď",dcy:"д",Dcy:"Д",dd:"ⅆ",DD:"ⅅ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",delta:"δ",Delta:"Δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",Dfr:"𝔇",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",DJcy:"Ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",Dopf:"𝔻",dot:"˙",Dot:"¨",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",downarrow:"↓",Downarrow:"⇓",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",Dscr:"𝒟",dscy:"ѕ",DScy:"Ѕ",dsol:"⧶",dstrok:"đ",Dstrok:"Đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",DZcy:"Џ",dzigrarr:"⟿",eacute:"é",Eacute:"É",easter:"⩮",ecaron:"ě",Ecaron:"Ě",ecir:"≖",ecirc:"ê",Ecirc:"Ê",ecolon:"≕",ecy:"э",Ecy:"Э",eDDot:"⩷",edot:"ė",eDot:"≑",Edot:"Ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",Efr:"𝔈",eg:"⪚",egrave:"è",Egrave:"È",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",Emacr:"Ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",eng:"ŋ",ENG:"Ŋ",ensp:" ",eogon:"ę",Eogon:"Ę",eopf:"𝕖",Eopf:"𝔼",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",Epsilon:"Ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",esim:"≂",Esim:"⩳",eta:"η",Eta:"Η",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",fcy:"ф",Fcy:"Ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",Ffr:"𝔉",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",Fopf:"𝔽",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",gamma:"γ",Gamma:"Γ",gammad:"ϝ",Gammad:"Ϝ",gap:"⪆",gbreve:"ğ",Gbreve:"Ğ",Gcedil:"Ģ",gcirc:"ĝ",Gcirc:"Ĝ",gcy:"г",Gcy:"Г",gdot:"ġ",Gdot:"Ġ",ge:"≥",gE:"≧",gel:"⋛",gEl:"⪌",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",Gfr:"𝔊",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",GJcy:"Ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",Gopf:"𝔾",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",gscr:"ℊ",Gscr:"𝒢",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",Gt:"≫",GT:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",HARDcy:"Ъ",harr:"↔",hArr:"⇔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",hcirc:"ĥ",Hcirc:"Ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",hstrok:"ħ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",iacute:"í",Iacute:"Í",ic:"⁣",icirc:"î",Icirc:"Î",icy:"и",Icy:"И",Idot:"İ",iecy:"е",IEcy:"Е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",igrave:"ì",Igrave:"Ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",IJlig:"IJ",Im:"ℑ",imacr:"ī",Imacr:"Ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",Int:"∬",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",iocy:"ё",IOcy:"Ё",iogon:"į",Iogon:"Į",iopf:"𝕚",Iopf:"𝕀",iota:"ι",Iota:"Ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",Itilde:"Ĩ",iukcy:"і",Iukcy:"І",iuml:"ï",Iuml:"Ï",jcirc:"ĵ",Jcirc:"Ĵ",jcy:"й",Jcy:"Й",jfr:"𝔧",Jfr:"𝔍",jmath:"ȷ",jopf:"𝕛",Jopf:"𝕁",jscr:"𝒿",Jscr:"𝒥",jsercy:"ј",Jsercy:"Ј",jukcy:"є",Jukcy:"Є",kappa:"κ",Kappa:"Κ",kappav:"ϰ",kcedil:"ķ",Kcedil:"Ķ",kcy:"к",Kcy:"К",kfr:"𝔨",Kfr:"𝔎",kgreen:"ĸ",khcy:"х",KHcy:"Х",kjcy:"ќ",KJcy:"Ќ",kopf:"𝕜",Kopf:"𝕂",kscr:"𝓀",Kscr:"𝒦",lAarr:"⇚",lacute:"ĺ",Lacute:"Ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",Lambda:"Λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larr:"←",lArr:"⇐",Larr:"↞",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",lAtail:"⤛",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",Lcaron:"Ľ",lcedil:"ļ",Lcedil:"Ļ",lceil:"⌈",lcub:"{",lcy:"л",Lcy:"Л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",leftarrow:"←",Leftarrow:"⇐",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",Leftrightarrow:"⇔",LeftRightArrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",leg:"⋚",lEg:"⪋",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",Lfr:"𝔏",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",LJcy:"Љ",ll:"≪",Ll:"⋘",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",lmidot:"ŀ",Lmidot:"Ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",Longleftarrow:"⟸",LongLeftArrow:"⟵",longleftrightarrow:"⟷",Longleftrightarrow:"⟺",LongLeftRightArrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",Longrightarrow:"⟹",LongRightArrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",Lopf:"𝕃",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",Lstrok:"Ł",lt:"<",Lt:"≪",LT:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",Map:"⤅",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",Mcy:"М",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",mfr:"𝔪",Mfr:"𝔐",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",Mopf:"𝕄",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",mu:"μ",Mu:"Μ",multimap:"⊸",mumap:"⊸",nabla:"∇",nacute:"ń",Nacute:"Ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",Ncaron:"Ň",ncedil:"ņ",Ncedil:"Ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",Ncy:"Н",ndash:"–",ne:"≠",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:"\n",nexist:"∄",nexists:"∄",nfr:"𝔫",Nfr:"𝔑",nge:"≱",ngE:"≧̸",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",ngt:"≯",nGt:"≫⃒",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",NJcy:"Њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nle:"≰",nlE:"≦̸",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nlt:"≮",nLt:"≪⃒",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",not:"¬",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrarr:"↛",nrArr:"⇏",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",Nscr:"𝒩",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsube:"⊈",nsubE:"⫅̸",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupe:"⊉",nsupE:"⫆̸",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",Ntilde:"Ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",Nu:"Ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",oacute:"ó",Oacute:"Ó",oast:"⊛",ocir:"⊚",ocirc:"ô",Ocirc:"Ô",ocy:"о",Ocy:"О",odash:"⊝",odblac:"ő",Odblac:"Ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",OElig:"Œ",ofcir:"⦿",ofr:"𝔬",Ofr:"𝔒",ogon:"˛",ograve:"ò",Ograve:"Ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",Omacr:"Ō",omega:"ω",Omega:"Ω",omicron:"ο",Omicron:"Ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",Oopf:"𝕆",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",or:"∨",Or:"⩔",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",oscr:"ℴ",Oscr:"𝒪",oslash:"ø",Oslash:"Ø",osol:"⊘",otilde:"õ",Otilde:"Õ",otimes:"⊗",Otimes:"⨷",otimesas:"⨶",ouml:"ö",Ouml:"Ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",pcy:"п",Pcy:"П",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",Pfr:"𝔓",phi:"φ",Phi:"Φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",Pi:"Π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",pr:"≺",Pr:"⪻",prap:"⪷",prcue:"≼",pre:"⪯",prE:"⪳",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",Pscr:"𝒫",psi:"ψ",Psi:"Ψ",puncsp:" ",qfr:"𝔮",Qfr:"𝔔",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",qscr:"𝓆",Qscr:"𝒬",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",racute:"ŕ",Racute:"Ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rArr:"⇒",Rarr:"↠",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",Rarrtl:"⤖",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",Rcaron:"Ř",rcedil:"ŗ",Rcedil:"Ŗ",rceil:"⌉",rcub:"}",rcy:"р",Rcy:"Р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",Rho:"Ρ",rhov:"ϱ",RightAngleBracket:"⟩",rightarrow:"→",Rightarrow:"⇒",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",sacute:"ś",Sacute:"Ś",sbquo:"‚",sc:"≻",Sc:"⪼",scap:"⪸",scaron:"š",Scaron:"Š",sccue:"≽",sce:"⪰",scE:"⪴",scedil:"ş",Scedil:"Ş",scirc:"ŝ",Scirc:"Ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",Scy:"С",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",Sfr:"𝔖",sfrown:"⌢",sharp:"♯",shchcy:"щ",SHCHcy:"Щ",shcy:"ш",SHcy:"Ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",sigma:"σ",Sigma:"Σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",SOFTcy:"Ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",Sopf:"𝕊",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",Sscr:"𝒮",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",Star:"⋆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",sube:"⊆",subE:"⫅",subedot:"⫃",submult:"⫁",subne:"⊊",subnE:"⫋",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup:"⊃",Sup:"⋑",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supe:"⊇",supE:"⫆",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supne:"⊋",supnE:"⫌",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:"\t",target:"⌖",tau:"τ",Tau:"Τ",tbrk:"⎴",tcaron:"ť",Tcaron:"Ť",tcedil:"ţ",Tcedil:"Ţ",tcy:"т",Tcy:"Т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",Tfr:"𝔗",there4:"∴",therefore:"∴",Therefore:"∴",theta:"θ",Theta:"Θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",thorn:"þ",THORN:"Þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",Topf:"𝕋",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",Tscr:"𝒯",tscy:"ц",TScy:"Ц",tshcy:"ћ",TSHcy:"Ћ",tstrok:"ŧ",Tstrok:"Ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uacute:"ú",Uacute:"Ú",uarr:"↑",uArr:"⇑",Uarr:"↟",Uarrocir:"⥉",ubrcy:"ў",Ubrcy:"Ў",ubreve:"ŭ",Ubreve:"Ŭ",ucirc:"û",Ucirc:"Û",ucy:"у",Ucy:"У",udarr:"⇅",udblac:"ű",Udblac:"Ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",Ufr:"𝔘",ugrave:"ù",Ugrave:"Ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",Umacr:"Ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",uogon:"ų",Uogon:"Ų",uopf:"𝕦",Uopf:"𝕌",uparrow:"↑",Uparrow:"⇑",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",updownarrow:"↕",Updownarrow:"⇕",UpDownArrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",upsilon:"υ",Upsilon:"Υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",Uring:"Ů",urtri:"◹",uscr:"𝓊",Uscr:"𝒰",utdot:"⋰",utilde:"ũ",Utilde:"Ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",Uuml:"Ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",vcy:"в",Vcy:"В",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",vee:"∨",Vee:"⋁",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",vfr:"𝔳",Vfr:"𝔙",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",Vopf:"𝕍",vprop:"∝",vrtri:"⊳",vscr:"𝓋",Vscr:"𝒱",vsubne:"⊊︀",vsubnE:"⫋︀",vsupne:"⊋︀",vsupnE:"⫌︀",Vvdash:"⊪",vzigzag:"⦚",wcirc:"ŵ",Wcirc:"Ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",wfr:"𝔴",Wfr:"𝔚",wopf:"𝕨",Wopf:"𝕎",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",Wscr:"𝒲",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",Xfr:"𝔛",xharr:"⟷",xhArr:"⟺",xi:"ξ",Xi:"Ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",Xopf:"𝕏",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",xscr:"𝓍",Xscr:"𝒳",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",Yacute:"Ý",yacy:"я",YAcy:"Я",ycirc:"ŷ",Ycirc:"Ŷ",ycy:"ы",Ycy:"Ы",yen:"¥",yfr:"𝔶",Yfr:"𝔜",yicy:"ї",YIcy:"Ї",yopf:"𝕪",Yopf:"𝕐",yscr:"𝓎",Yscr:"𝒴",yucy:"ю",YUcy:"Ю",yuml:"ÿ",Yuml:"Ÿ",zacute:"ź",Zacute:"Ź",zcaron:"ž",Zcaron:"Ž",zcy:"з",Zcy:"З",zdot:"ż",Zdot:"Ż",zeetrf:"ℨ",ZeroWidthSpace:"​",zeta:"ζ",Zeta:"Ζ",zfr:"𝔷",Zfr:"ℨ",zhcy:"ж",ZHcy:"Ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",zscr:"𝓏",Zscr:"𝒵",zwj:"‍",zwnj:"‌"},y={aacute:"á",Aacute:"Á",acirc:"â",Acirc:"Â",acute:"´",aelig:"æ",AElig:"Æ",agrave:"à",Agrave:"À",amp:"&",AMP:"&",aring:"å",Aring:"Å",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",brvbar:"¦",ccedil:"ç",Ccedil:"Ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",Eacute:"É",ecirc:"ê",Ecirc:"Ê",egrave:"è",Egrave:"È",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",iacute:"í",Iacute:"Í",icirc:"î",Icirc:"Î",iexcl:"¡",igrave:"ì",Igrave:"Ì",iquest:"¿",iuml:"ï",Iuml:"Ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",Ntilde:"Ñ",oacute:"ó",Oacute:"Ó",ocirc:"ô",Ocirc:"Ô",ograve:"ò",Ograve:"Ò",ordf:"ª",ordm:"º",oslash:"ø",Oslash:"Ø",otilde:"õ",Otilde:"Õ",ouml:"ö",Ouml:"Ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",THORN:"Þ",times:"×",uacute:"ú",Uacute:"Ú",ucirc:"û",Ucirc:"Û",ugrave:"ù",Ugrave:"Ù",uml:"¨",uuml:"ü",Uuml:"Ü",yacute:"ý",Yacute:"Ý",yen:"¥",yuml:"ÿ"},_={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},S=[1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65e3,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111],x=String.fromCharCode,w={}.hasOwnProperty,k=function(e,t){return w.call(e,t)},O=function(e,t){if(!e)return t;var n,r={};for(n in t)r[n]=k(e,n)?e[n]:t[n];return r},E=function(e,t){var n="";return e>=55296&&e<=57343||e>1114111?(t&&C("character reference outside the permissible Unicode range"),"�"):k(_,e)?(t&&C("disallowed character reference"),_[e]):(t&&function(e,t){for(var n=-1,r=e.length;++n65535&&(n+=x((e-=65536)>>>10&1023|55296),e=56320|1023&e),n+=x(e))},A=function(e){return"&#x"+e.toString(16).toUpperCase()+";"},T=function(e){return"&#"+e+";"},C=function(e){throw Error("Parse error: "+e)},M=function(e,t){(t=O(t,M.options)).strict&&g.test(e)&&C("forbidden code point");var n=t.encodeEverything,r=t.useNamedReferences,i=t.allowUnsafeSymbols,o=t.decimal?T:A,s=function(e){return o(e.charCodeAt(0))};return n?(e=e.replace(c,(function(e){return r&&k(h,e)?"&"+h[e]+";":s(e)})),r&&(e=e.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒").replace(/fj/g,"fj")),r&&(e=e.replace(d,(function(e){return"&"+h[e]+";"})))):r?(i||(e=e.replace(p,(function(e){return"&"+h[e]+";"}))),e=(e=e.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒")).replace(d,(function(e){return"&"+h[e]+";"}))):i||(e=e.replace(p,s)),e.replace(l,(function(e){var t=e.charCodeAt(0),n=e.charCodeAt(1);return o(1024*(t-55296)+n-56320+65536)})).replace(u,s)};M.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1,decimal:!1};var P=function(e,t){var n=(t=O(t,P.options)).strict;return n&&m.test(e)&&C("malformed character reference"),e.replace(b,(function(e,r,i,o,s,a,l,c,u){var d,h,p,f,m,g;return r?v[m=r]:i?(m=i,(g=o)&&t.isAttributeValue?(n&&"="==g&&C("`&` did not start a character reference"),e):(n&&C("named character reference was not terminated by a semicolon"),y[m]+(g||""))):s?(p=s,h=a,n&&!h&&C("character reference was not terminated by a semicolon"),d=parseInt(p,10),E(d,n)):l?(f=l,h=c,n&&!h&&C("character reference was not terminated by a semicolon"),d=parseInt(f,16),E(d,n)):(n&&C("named character reference was not terminated by a semicolon"),e)}))};P.options={isAttributeValue:!1,strict:!1};var $={version:"1.2.0",encode:M,decode:P,escape:function(e){return e.replace(p,(function(e){return f[e]}))},unescape:P};void 0===(i=function(){return $}.call(t,n,t,e))||(e.exports=i)}()}).call(this,n(65)(e),n(29))},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=function(e,t){return(r=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])})(e,t)},function(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}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n0&&t.push(e=[]),r.childNodes.forEach(n),e.length>0&&t.push(e=[])):r.childNodes.forEach(n);else if(r.nodeType===g.default.TEXT_NODE)if(r.isWhitespace)e.prependWhitespace=!0;else{var i=r.trimmedText;e.prependWhitespace&&(i=" ".concat(i),e.prependWhitespace=!1),e.push(i)}}(this),t.map((function(e){return e.join("").replace(/\s{2,}/g," ")})).join("\n").replace(/\s+$/,"")},enumerable:!1,configurable:!0}),t.prototype.toString=function(){var e=this.rawTagName;if(e){var t=this.rawAttrs?" ".concat(this.rawAttrs):"";return this.voidTag.formatNode(e,t,this.innerHTML)}return this.innerHTML},Object.defineProperty(t.prototype,"innerHTML",{get:function(){return this.childNodes.map((function(e){return e.toString()})).join("")},set:function(e){var t=T(e,this._parseOptions),n=t.childNodes.length?t.childNodes:[new m.default(e,this)];C(n,this),C(this.childNodes,null),this.childNodes=n},enumerable:!1,configurable:!0}),t.prototype.set_content=function(e,t){if(void 0===t&&(t={}),e instanceof f.default)e=[e];else if("string"==typeof e){var n=T(e,t=o(o({},this._parseOptions),t));e=n.childNodes.length?n.childNodes:[new m.default(n.innerHTML,this)]}return C(this.childNodes,null),C(e,this),this.childNodes=e,this},t.prototype.replaceWith=function(){for(var e=this,t=[],n=0;n-1&&(n.rawText=n.rawText.substr(0,r),this.childNodes.length=t+1)}}return this},Object.defineProperty(t.prototype,"structure",{get:function(){var e=[],t=0;function n(n){e.push(" ".repeat(t)+n)}return function e(r){var i=r.id?"#".concat(r.id):"",o=r.classList.length?".".concat(r.classList.value.join(".")):"";n("".concat(r.rawTagName).concat(i).concat(o)),t++,r.childNodes.forEach((function(t){t.nodeType===g.default.ELEMENT_NODE?e(t):t.nodeType===g.default.TEXT_NODE&&(t.isWhitespace||n("#text"))})),t--}(this),e.join("\n")},enumerable:!1,configurable:!0}),t.prototype.removeWhitespace=function(){var e=this,t=0;return this.childNodes.forEach((function(n){if(n.nodeType===g.default.TEXT_NODE){if(n.isWhitespace)return;n.rawText=n.trimmedRawText}else n.nodeType===g.default.ELEMENT_NODE&&n.removeWhitespace();e.childNodes[t++]=n})),this.childNodes.length=t,this},t.prototype.querySelectorAll=function(e){return(0,l.selectAll)(e,this,{xmlMode:!0,adapter:d.default})},t.prototype.querySelector=function(e){return(0,l.selectOne)(e,this,{xmlMode:!0,adapter:d.default})},t.prototype.getElementsByTagName=function(e){for(var t=e.toUpperCase(),n=[],r=[],i=this,o=0;void 0!==o;){var s=void 0;do{s=i.childNodes[o++]}while(o0&&(r.push(o),i=s,o=0)):(i=i.parentNode,o=r.pop())}return n},t.prototype.getElementById=function(e){for(var t=[],n=this,r=0;void 0!==r;){var i=void 0;do{i=n.childNodes[r++]}while(r0&&(t.push(r),n=i,r=0)}}else n=n.parentNode,r=t.pop()}return null},t.prototype.closest=function(e){var t=new Map,n=this,r=null;function i(e,n){for(var r=null,o=0,s=n.length;o0;){if(this===e[--t])return e[t-1]||null}return null}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousElementSibling",{get:function(){if(this.parentNode){for(var e=this.parentNode.childNodes,n=e.length,r=!1;n>0;){var i=e[--n];if(r){if(i instanceof t)return i||null}else this===i&&(r=!0)}return null}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"classNames",{get:function(){return this.classList.toString()},enumerable:!1,configurable:!0}),t.prototype.clone=function(){return T(this.toString(),this._parseOptions).firstChild},t}(f.default);t.default=_;var S=/|<(\/?)([a-zA-Z][-.:0-9_a-zA-Z]*)((?:\s+[^>]*?(?:(?:'[^']*')|(?:"[^"]*"))?)*)\s*(\/?)>/g,x=/(?:^|\s)(id|class)\s*=\s*((?:'[^']*')|(?:"[^"]*")|\S+)/gi,w={area:!0,AREA:!0,base:!0,BASE:!0,br:!0,BR:!0,col:!0,COL:!0,hr:!0,HR:!0,img:!0,IMG:!0,input:!0,INPUT:!0,link:!0,LINK:!0,meta:!0,META:!0,source:!0,SOURCE:!0,embed:!0,EMBED:!0,param:!0,PARAM:!0,track:!0,TRACK:!0,wbr:!0,WBR:!0},k={li:{li:!0,LI:!0},LI:{li:!0,LI:!0},p:{p:!0,div:!0,P:!0,DIV:!0},P:{p:!0,div:!0,P:!0,DIV:!0},b:{div:!0,DIV:!0},B:{div:!0,DIV:!0},td:{td:!0,th:!0,TD:!0,TH:!0},TD:{td:!0,th:!0,TD:!0,TH:!0},th:{td:!0,th:!0,TD:!0,TH:!0},TH:{td:!0,th:!0,TD:!0,TH:!0},h1:{h1:!0,H1:!0},H1:{h1:!0,H1:!0},h2:{h2:!0,H2:!0},H2:{h2:!0,H2:!0},h3:{h3:!0,H3:!0},H3:{h3:!0,H3:!0},h4:{h4:!0,H4:!0},H4:{h4:!0,H4:!0},h5:{h5:!0,H5:!0},H5:{h5:!0,H5:!0},h6:{h6:!0,H6:!0},H6:{h6:!0,H6:!0}},O={li:{ul:!0,ol:!0,UL:!0,OL:!0},LI:{ul:!0,ol:!0,UL:!0,OL:!0},a:{div:!0,DIV:!0},A:{div:!0,DIV:!0},b:{div:!0,DIV:!0},B:{div:!0,DIV:!0},i:{div:!0,DIV:!0},I:{div:!0,DIV:!0},p:{div:!0,DIV:!0},P:{div:!0,DIV:!0},td:{tr:!0,table:!0,TR:!0,TABLE:!0},TD:{tr:!0,table:!0,TR:!0,TABLE:!0},th:{tr:!0,table:!0,TR:!0,TABLE:!0},TH:{tr:!0,table:!0,TR:!0,TABLE:!0}},E="documentfragmentcontainer";function A(e,t){var n,r;void 0===t&&(t={});var i=new h.default(null===(n=null==t?void 0:t.voidTag)||void 0===n?void 0:n.closingSlash,null===(r=null==t?void 0:t.voidTag)||void 0===r?void 0:r.tags),o=t.blockTextElements||{script:!0,noscript:!0,style:!0,pre:!0},s=Object.keys(o),a=s.map((function(e){return new RegExp("^".concat(e,"$"),"i")})),l=s.filter((function(e){return o[e]})).map((function(e){return new RegExp("^".concat(e,"$"),"i")}));function c(e){return l.some((function(t){return t.test(e)}))}function d(e){return a.some((function(t){return t.test(e)}))}var f,g=function(e,t){return[e-$,t-$]},b=new _(null,{},"",null,[0,e.length],i,t),v=b,y=[b],A=-1,T=void 0;e="<".concat(E,">").concat(e,"");for(var C=t.lowerCaseTagName,M=t.fixNestedATags,P=e.length-(E.length+2),$=E.length+2;f=S.exec(e);){var R=f[0],I=f[1],D=f[2],N=f[3],j=f[4],L=R.length,B=S.lastIndex-L,F=S.lastIndex;if(A>-1&&A+L"),Z=C?e.toLocaleLowerCase().indexOf(Y,S.lastIndex):e.indexOf(Y,S.lastIndex),J=-1===Z?P:Z;if(c(D))(z=e.substring(W,J)).length>0&&/\S/.test(z)&&v.appendChild(new m.default(z,v,g(W,J)));-1===Z?A=S.lastIndex=e.length+1:(A=S.lastIndex=Z+Y.length,I="/")}}if(I||j||w[D])for(;;){if(null==T||"a"!==D&&"A"!==D||(T=void 0),v.rawTagName===D){v.range[1]=g(-1,Math.max(A,F))[1],y.pop(),v=(0,u.default)(y);break}V=v.tagName;if(!O[V]||!O[V][D])break;y.pop(),v=(0,u.default)(y)}}else if(t.comment){var z=e.substring(B+4,F-3);v.appendChild(new p.default(z,v,g(B,F)))}}return y}function T(e,t){void 0===t&&(t={});for(var n=A(e,t),r=n[0],i=function(){var e=n.pop(),r=(0,u.default)(n);e.parentNode&&e.parentNode.parentNode&&(e.parentNode===r&&e.tagName===r.tagName?!0!==t.parseNoneClosedTags&&(r.removeChild(e),e.childNodes.forEach((function(e){r.parentNode.appendChild(e)})),n.pop()):!0!==t.parseNoneClosedTags&&(r.removeChild(e),e.childNodes.forEach((function(e){r.appendChild(e)}))))};n.length>1;)i();return r}function C(e,t){return e.map((function(e){return e.parentNode=t,e}))}t.base_parse=A,t.parse=T},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.canUseDOM=t.SafeNodeList=t.SafeHTMLCollection=void 0;var r,i=n(425);var o=((r=i)&&r.__esModule?r:{default:r}).default,s=o.canUseDOM?window.HTMLElement:{};t.SafeHTMLCollection=o.canUseDOM?window.HTMLCollection:{},t.SafeNodeList=o.canUseDOM?window.NodeList:{},t.canUseDOM=o.canUseDOM;t.default=s},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.modal-overlay{display:flex;align-items:center;justify-content:center;padding:calc(5rem*var(--scale-factor, 1));z-index:1000;position:fixed;inset:0px}@media screen and (max-width: 480px){.modal-overlay{padding:calc(2rem*var(--scale-factor, 1))}}.modal-content{inline-size:560px;max-block-size:100%;border:0;border-radius:10px;display:flex;flex-direction:column}.modal-content label,.modal-content legend{font-weight:700}.modal-content input[type=text]{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));inline-size:100%;box-sizing:border-box;border:2px solid rgba(0,0,0,0);border-radius:12px;padding:calc(.5rem*var(--scale-factor, 1));display:block}.modal-content:focus-visible{border:3px solid #cd2356;outline:none}.modal-content__header{display:flex;align-items:center;min-block-size:fit-content;padding:calc(1rem*var(--scale-factor, 1)) calc(.5rem*var(--scale-factor, 1)) calc(1rem*var(--scale-factor, 1)) calc(1rem*var(--scale-factor, 1))}.modal-content__header button{margin-inline-start:auto;block-size:fit-content}.modal-content__heading{font-size:calc(1.5rem*var(--scale-factor, 1));line-height:calc(2rem*var(--scale-factor, 1));margin-block:calc(.5rem*var(--scale-factor, 1));margin-inline:calc(.5rem*var(--scale-factor, 1)) 0}.modal-content__body{padding:calc(1.5rem*var(--scale-factor, 1));display:flex;flex-direction:column;row-gap:calc(.5rem*var(--scale-factor, 1));overflow-y:auto}.modal-content__subheading{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));margin:0;font-weight:700}.modal-content__text{margin:0;line-height:1.4}.modal-content__help-text{margin:calc(.25rem*var(--scale-factor, 1)) 0;font-weight:400}.modal-content__inputs{display:flex;flex-direction:column;gap:calc(2rem*var(--scale-factor, 1))}.modal-content__input-section{display:flex;flex-direction:column;gap:calc(.5rem*var(--scale-factor, 1))}.modal-content__buttons{padding:calc(1rem*var(--scale-factor, 1));display:flex;flex-wrap:wrap;flex-direction:row-reverse;gap:calc(1rem*var(--scale-factor, 1));justify-content:flex-start}@media screen and (max-width: 480px){.modal-content__buttons{display:flex;flex-direction:column}}.modal-content__buttons button,.modal-content__buttons a{margin:0}.modal-content__buttons button span,.modal-content__buttons a span{inline-size:100%}@media screen and (max-width: 480px){.modal-content__buttons button,.modal-content__buttons a{inline-size:100%}}.modal-content__links{text-align:center;margin-block:calc(.5rem*var(--scale-factor, 1)) calc(.25rem*var(--scale-factor, 1));margin-inline:0}.modal-content__links button{text-decoration:underline}.--dark .modal-overlay{background-color:rgba(0,0,0,.5)}.--dark .modal-overlay input{border:2px solid #fff;background-color:#33353d;color:inherit}.--dark .modal-overlay input:focus-visible{border:2px solid var(--rpf-input-active-border);outline:none}.--dark .modal-content{background-color:#33353d}.--dark .modal-content__header{border-block-end:1px solid #636674}.--dark .modal-content__help-text{color:#ccc}.--dark .modal-content__buttons{border-block-start:1px solid #636674}.--light .modal-overlay{background-color:rgba(67,69,76,.5)}.--light .modal-overlay input{border:2px solid #e3e4e8}.--light .modal-overlay input:focus-visible{border:2px solid var(--rpf-input-active-border);outline:none}.--light .modal-content{background-color:#fff}.--light .modal-content__header{border-block-end:1px solid #d5d7dc}.--light .modal-content__help-text{color:#4d575b}.--light .modal-content__buttons{border-block-start:1px solid #d5d7dc}",""])},function(e,t,n){"use strict";e.exports=n(351)},function(e,t,n){"use strict";e.exports=n(414)},function(e,t,n){"use strict";function r(e){return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(i){return"function"==typeof i?i(n,r,e):t(i)}}}}var i=r();i.withExtraArgument=r,t.a=i},function(e,t){function n(e,t,n){var r,i,o,s,a;function l(){var c=Date.now()-s;c=0?r=setTimeout(l,t-c):(r=null,n||(a=e.apply(o,i),o=i=null))}null==t&&(t=100);var c=function(){o=this,i=arguments,s=Date.now();var c=n&&!r;return r||(r=setTimeout(l,t)),c&&(a=e.apply(o,i),o=i=null),a};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(a=e.apply(o,i),o=i=null,clearTimeout(r),r=null)},c}n.debounce=n,e.exports=n},function(e,t,n){"use strict"; +/*! + * mime-types + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015 Douglas Christopher Wilson + * MIT Licensed + */var r,i,o,s=n(364),a=n(366).extname,l=/^\s*([^;\s]*)(?:;|\s|$)/,c=/^text\//i;function u(e){if(!e||"string"!=typeof e)return!1;var t=l.exec(e),n=t&&s[t[1].toLowerCase()];return n&&n.charset?n.charset:!(!t||!c.test(t[1]))&&"UTF-8"}t.charset=u,t.charsets={lookup:u},t.contentType=function(e){if(!e||"string"!=typeof e)return!1;var n=-1===e.indexOf("/")?t.lookup(e):e;if(!n)return!1;if(-1===n.indexOf("charset")){var r=t.charset(n);r&&(n+="; charset="+r.toLowerCase())}return n},t.extension=function(e){if(!e||"string"!=typeof e)return!1;var n=l.exec(e),r=n&&t.extensions[n[1].toLowerCase()];if(!r||!r.length)return!1;return r[0]},t.extensions=Object.create(null),t.lookup=function(e){if(!e||"string"!=typeof e)return!1;var n=a("x."+e).toLowerCase().substr(1);if(!n)return!1;return t.types[n]||!1},t.types=Object.create(null),r=t.extensions,i=t.types,o=["nginx","apache",void 0,"iana"],Object.keys(s).forEach((function(e){var t=s[e],n=t.extensions;if(n&&n.length){r[e]=n;for(var a=0;au||c===u&&"application/"===i[l].substr(0,12)))continue}i[l]=e}}}))},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.NodeType=t.TextNode=t.Node=t.valid=t.CommentNode=t.HTMLElement=t.parse=void 0;var i=r(n(155));t.CommentNode=i.default;var o=r(n(106));t.HTMLElement=o.default;var s=r(n(80));t.Node=s.default;var a=r(n(156));t.TextNode=a.default;var l=r(n(69));t.NodeType=l.default;var c=r(n(370)),u=r(n(371));function d(e,t){return void 0===t&&(t={}),(0,c.default)(e,t)}t.valid=u.default,t.default=d,t.parse=d,d.parse=c.default,d.HTMLElement=o.default,d.CommentNode=i.default,d.valid=u.default,d.Node=s.default,d.TextNode=a.default,d.NodeType=l.default},function(e,t,n){"use strict";(function(e,r){n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return o}));var i=n(192);function o(){return!Object(i.a)()&&"[object process]"===Object.prototype.toString.call(void 0!==e?e:0)}function s(e,t){return e.require(t)}}).call(this,n(36),n(64)(e))},,function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));const r=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function i(e){const t=e.match(r);if(!e||!t)return;let n;return"1"===t[3]?n=!0:"0"===t[3]&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}},function(e,t,n){"use strict";t.decode=t.parse=n(212),t.encode=t.stringify=n(213)},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r-1&&e%1==0&&e<=9007199254740991}},function(e,t){e.exports=function(e,t){return function(n){return e(t(n))}}},function(e,t,n){var r=n(129),i=n(139);e.exports=function(e){return null!=e&&i(e.length)&&!r(e)}},function(e,t){e.exports=function(){return[]}},function(e,t,n){var r=n(99),i=n(100),o=n(98),s=n(142),a=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,o(e)),e=i(e);return t}:s;e.exports=a},function(e,t,n){var r=n(99),i=n(47);e.exports=function(e,t,n){var o=t(e);return i(e)?o:r(o,n(e))}},function(e,t,n){var r=n(144),i=n(143),o=n(97);e.exports=function(e){return r(e,o,i)}},function(e,t,n){var r=n(104);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.proj{display:flex;flex-flow:column;overflow:hidden;block-size:100%;block-size:-moz-available;block-size:-webkit-stretch;block-size:stretch}.proj-header{display:flex;flex:1 0 auto;justify-content:space-between;padding-inline:5px}.editor-controls{display:flex}.proj-controls{padding-block-start:20px}.proj-share-link{padding-inline:5px}.proj-container{display:flex;flex-direction:row;overflow-y:hidden;grid-gap:calc(1rem*var(--scale-factor, 1));margin:calc(1rem*var(--scale-factor, 1));block-size:100%}.proj-container .project-wrapper{container-type:inline-size;display:flex;flex-direction:column;grid-gap:calc(.5rem*var(--scale-factor, 1));flex:1 1 auto;overflow:hidden}.proj-container .proj-editor-wrapper{display:flex;flex:0 1 auto;flex-flow:column;grid-gap:calc(1rem*var(--scale-factor, 1));overflow:hidden;block-size:100%;inline-size:100%}@container (min-width: 720px){.proj-container .proj-editor-wrapper{flex-flow:row}.proj-container .proj-editor-container{max-block-size:100% !important}.proj-container--wc .proj-runner-container,.proj-container--wc .proj-editor-container{inline-size:50%}}.proj-container .sidebar,.proj-container .proj-editor-container,.proj-container .proj-runner-container{border-radius:8px}.proj-container .proj-editor-container{display:flex;box-sizing:border-box;min-block-size:30%;max-block-size:70%}.proj-container .proj-editor-container .react-tabs__tab-panel--selected{overflow-y:hidden}.proj-container .proj-runner-container{display:flex;box-sizing:border-box;flex:5;overflow:hidden}.proj-container .proj-runner-container .react-tabs__tab-panel--selected{overflow-y:auto}.proj-container--wc{min-block-size:200px}.proj-container--wc .proj-runner-container,.proj-container--wc .proj-editor-container{inline-size:100%}.proj-editor-container .react-tabs__tab-list,.proj-runner-container .react-tabs__tab-list{flex:1}.proj-editor-container .react-tabs__tab-container .btn--run,.proj-editor-container .react-tabs__tab-container .btn--stop,.proj-runner-container .react-tabs__tab-container .btn--run,.proj-runner-container .react-tabs__tab-container .btn--stop{margin-block-start:0;margin-block-end:0}.--light .proj-runner-container,.--light .proj-editor-container,.--light .sidebar{background-color:#fff}@media screen and (min-width: 601px){.--light .proj-runner-container,.--light .proj-editor-container,.--light .sidebar{border:1px solid #d5d7dc}}.--dark .proj-runner-container,.--dark .proj-editor-container,.--dark .sidebar{background-color:#2a2b32}@media screen and (min-width: 601px){.--dark .proj-runner-container,.--dark .proj-editor-container,.--dark .sidebar{border:1px solid #4a4d59}}",""])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){for(var t=[],n=0,r=Object.keys(e);n4?e:void 0}());var t},r.isLegacyOpera=function(){return!!window.opera}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.prototype.hasOwnProperty;t.default=function(e,t){var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var o=0;o=0&&r0&&/[^\S\r\n]/.test(e[t-1]),o=n=0)&&o(e,!n)}e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){a&&(a.removeAttribute?a.removeAttribute("aria-hidden"):null!=a.length?a.forEach((function(e){return e.removeAttribute("aria-hidden")})):document.querySelectorAll(a).forEach((function(e){return e.removeAttribute("aria-hidden")})));a=null},t.log=function(){0},t.assertNodeList=l,t.setElement=function(e){var t=e;if("string"==typeof t&&s.canUseDOM){var n=document.querySelectorAll(t);l(n,t),t=n}return a=t||a},t.validateElement=c,t.hide=function(e){var t=!0,n=!1,r=void 0;try{for(var i,o=c(e)[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){i.value.setAttribute("aria-hidden","true")}}catch(e){n=!0,r=e}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}},t.show=function(e){var t=!0,n=!1,r=void 0;try{for(var i,o=c(e)[Symbol.iterator]();!(t=(i=o.next()).done);t=!0){i.value.removeAttribute("aria-hidden")}}catch(e){n=!0,r=e}finally{try{!t&&o.return&&o.return()}finally{if(n)throw r}}},t.documentNotReadyOrSSRTesting=function(){a=null};var r,i=n(424),o=(r=i)&&r.__esModule?r:{default:r},s=n(107);var a=null;function l(e,t){if(!e||!e.length)throw new Error("react-modal: No elements were found for selector "+t+".")}function c(e){var t=e||a;return t?Array.isArray(t)||t instanceof HTMLCollection||t instanceof NodeList?t:[t]:((0,o.default)(!1,["react-modal: App element is not defined.","Please use `Modal.setAppElement(el)` or set `appElement={el}`.","This is needed so screen readers don't see main content","when modal is opened. It is not recommended, but you can opt-out","by setting `ariaHideApp={false}`."].join(" ")),[])}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.log=function(){console.log("portalOpenInstances ----------"),console.log(i.openInstances.length),i.openInstances.forEach((function(e){return console.log(e)})),console.log("end portalOpenInstances ----------")},t.resetState=function(){i=new r};var r=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.register=function(e){-1===t.openInstances.indexOf(e)&&(t.openInstances.push(e),t.emit("register"))},this.deregister=function(e){var n=t.openInstances.indexOf(e);-1!==n&&(t.openInstances.splice(n,1),t.emit("deregister"))},this.subscribe=function(e){t.subscribers.push(e)},this.emit=function(e){t.subscribers.forEach((function(n){return n(e,t.openInstances.slice())}))},this.openInstances=[],this.subscribers=[]},i=new r;t.default=i},function(e,t,n){"use strict";var r=n(14);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},function(e,t,n){"use strict";function r(){return"undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&!!__SENTRY_BROWSER_BUNDLE__}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(197),i=n(11),o=n(10);function s(){Object(r.a)("error",a),Object(r.a)("unhandledrejection",a)}function a(){const e=Object(o.a)();if(e){const t="internal_error";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&i.c.log(`[Tracing] Transaction: ${t} -> Global error occured`),e.setStatus(t)}}},function(e,t,n){"use strict";e.exports=n(211)},function(e,t,n){"use strict";(function(t){var r=n(118),i=n(214),o=n(217);const s=parseInt(t.env.PARSE_LINK_HEADER_MAXLEN)||2e3,a=null!=t.env.PARSE_LINK_HEADER_THROW_ON_MAXLEN_EXCEEDED;function l(e){return e&&e.rel}function c(e,t){return t.rel.split(/\s+/).forEach((function(n){e[n]=o(t,{rel:n})})),e}function u(e,t){var n=t.match(/\s*(.+)\s*=\s*"?([^"]+)"?/);return n&&(e[n[1]]=n[2]),e}function d(e){try{var t=e.match(/]*)>(.*)/),n=t[1],s=t[2].split(";"),a=i.parse(n),l=r.parse(a.query);s.shift();var c=s.reduce(u,{});return(c=o(l,c)).url=n,c}catch(e){return null}}e.exports=function(e){return function(e){if(!e)return!1;if(e.length>s){if(a)throw new Error("Input string too long, it should be under "+s+" characters.");return!1}return!0}(e)?e.split(/,\s*1),t})),a(e,u(e),n),c&&(n=i(n,7,l));for(var d=t.length;d--;)o(n,t[d]);return n}));e.exports=d},function(e,t,n){"use strict";var r,i=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),o=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;nthis.startX&&(this.setState({checked:!0}),this.startX=t,this.activated=tn?this.previouslyChecked!==this.state.checked&&(this.setState({checked:!1}),this.previouslyChecked=this.state.checked,t.click()):this.startX-4=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(t,["className","icons"])),o=(0,a.default)("react-toggle",{"react-toggle--checked":this.state.checked,"react-toggle--focus":this.state.hasFocus,"react-toggle--disabled":this.props.disabled},n);return s.default.createElement("div",{className:o,onClick:this.handleClick,onTouchStart:this.handleTouchStart,onTouchMove:this.handleTouchMove,onTouchEnd:this.handleTouchEnd},s.default.createElement("div",{className:"react-toggle-track"},s.default.createElement("div",{className:"react-toggle-track-check"},this.getIcon("checked")),s.default.createElement("div",{className:"react-toggle-track-x"},this.getIcon("unchecked"))),s.default.createElement("div",{className:"react-toggle-thumb"}),s.default.createElement("input",r({},i,{ref:function(t){e.input=t},onFocus:this.handleFocus,onBlur:this.handleBlur,className:"react-toggle-screenreader-only",type:"checkbox"})))}}]),t}(o.PureComponent);t.default=p,p.displayName="Toggle",p.defaultProps={icons:{checked:s.default.createElement(c.default,null),unchecked:s.default.createElement(u.default,null)}},p.propTypes={checked:l.default.bool,disabled:l.default.bool,defaultChecked:l.default.bool,onChange:l.default.func,onFocus:l.default.func,onBlur:l.default.func,className:l.default.string,name:l.default.string,value:l.default.string,id:l.default.string,"aria-labelledby":l.default.string,"aria-label":l.default.string,icons:l.default.oneOfType([l.default.bool,l.default.shape({checked:l.default.node,unchecked:l.default.node})])}},function(e,t,n){var r;"undefined"!=typeof self&&self,e.exports=(r=n(0),function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=3)}([function(e,t){e.exports=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Validate=t.Time=void 0;var r=o(n(5)),i=o(n(6));function o(e){return e&&e.__esModule?e:{default:e}}t.Time=r.default,t.Validate=i.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useInterval=void 0;var r=function(e){return e&&e.__esModule?e:{default:e}}(n(7));t.useInterval=r.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useTime=t.useStopwatch=t.useTimer=void 0;var r=Object.assign||function(e){for(var t=1;t1&&void 0!==arguments[1])||arguments[1];P(c(e)),A(t),w(t),m(e),y(s.Time.getSecondsFromExpiry(e))}function R(){var e=new Date;e.setMilliseconds(e.getMilliseconds()+1e3*v),$(e)}return(0,a.useInterval)((function(){M!==l&&P(l);var e=s.Time.getSecondsFromExpiry(f);y(e),e<=0&&(s.Validate.onExpire(n)&&n(),w(!1),P(null))}),x?M:null),r({},s.Time.getTimeFromSeconds(v),{start:function(){E?(y(s.Time.getSecondsFromExpiry(f)),w(!0)):R()},pause:function(){w(!1)},resume:R,restart:$,isRunning:x})};var o=n(0),s=n(1),a=n(2),l=1e3;function c(e){if(!s.Validate.expiryTimestamp(e))return null;var t=s.Time.getSecondsFromExpiry(e),n=Math.floor(1e3*(t-Math.floor(t)));return n>0?n:l}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0){var r=n/1e3;return t?Math.round(r):r}return 0}},{key:"getSecondsFromPrevTime",value:function(e,t){var n=(new Date).getTime()-e;if(n>0){var r=n/1e3;return t?Math.round(r):r}return 0}},{key:"getSecondsFromTimeNow",value:function(){var e=new Date;return e.getTime()/1e3-60*e.getTimezoneOffset()}},{key:"getFormattedTimeFromSeconds",value:function(t,n){var r=e.getTimeFromSeconds(t),i=r.seconds,o=r.minutes,s=r.hours,a="",l=s;return"12-hour"===n&&(a=s>=12?"pm":"am",l=s%12),{seconds:i,minutes:o,hours:l,ampm:a}}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n0;return t||console.warn("react-timer-hook: { useTimer } Invalid expiryTimestamp settings",e),t}},{key:"onExpire",value:function(e){var t=e&&"function"==typeof e;return e&&!t&&console.warn("react-timer-hook: { useTimer } Invalid onExpire settings function",e),t}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,r.useRef)();(0,r.useEffect)((function(){n.current=e})),(0,r.useEffect)((function(){if(!t)return function(){};var e=setInterval((function(){n.current&&n.current()}),t);return function(){return clearInterval(e)}}),[t])};var r=n(0)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:0,t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=s.Time.getSecondsFromExpiry(e,!0)||0,r=new Date;m(r),d(n),w(t),y(n+s.Time.getSecondsFromPrevTime(r,!0))},isRunning:x})};var o=n(0),s=n(1),a=n(2)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;tparseInt(e.userAgent.split("Firefox/")[1],10),e.hasTouch=!!e.win.TouchEvent,e.marginNames=["plotTop","marginRight","marginBottom","plotLeft"],e.noop=function(){},e.supportsPassiveEvents=function(){var t=!1;if(!e.isMS){var n=Object.defineProperty({},"passive",{get:function(){t=!0}});e.win.addEventListener&&e.win.removeEventListener&&(e.win.addEventListener("testPassive",e.noop,n),e.win.removeEventListener("testPassive",e.noop,n))}return t}(),e.charts=[],e.dateFormats={},e.seriesTypes={},e.symbolSizes={},e.chartCount=0}(t||(t={})),t})),t(n,"Core/Utilities.js",[n["Core/Globals.js"]],(function(e){function t(n,r,i,o){var s=r?"Highcharts error":"Highcharts warning";32===n&&(n=s+": Deprecated member");var a=l(n),c=a?s+" #"+n+": www.highcharts.com/errors/"+n+"/":n.toString();if(void 0!==o){var u="";a&&(c+="?"),m(o,(function(e,t){u+="\n - "+t+": "+e,a&&(c+=encodeURI(t)+"="+encodeURI(e))})),c+=u}b(e,"displayError",{chart:i,code:n,message:c,params:o},(function(){if(r)throw Error(c);_.console&&-1===t.messages.indexOf(c)&&console.warn(c)})),t.messages.push(c)}function n(e,t){return parseInt(e,t||10)}function r(e){return"string"==typeof e}function i(e){return"[object Array]"===(e=Object.prototype.toString.call(e))||"[object Array Iterator]"===e}function o(e,t){return!(!e||"object"!=typeof e||t&&i(e))}function s(e){return o(e)&&"number"==typeof e.nodeType}function a(e){var t=e&&e.constructor;return!(!o(e,!0)||s(e)||!t||!t.name||"Object"===t.name)}function l(e){return"number"==typeof e&&!isNaN(e)&&1/0>e&&-1/0n&&(n=e[t]);return n},arrayMin:function(e){for(var t=e.length,n=e[0];t--;)e[t]t?e=o-1&&(o=Math.floor(s)),Math.max(0,o-(a(i,"padding-left",!0)||0)-(a(i,"padding-right",!0)||0));if("height"===o)return Math.max(0,Math.min(i.offsetHeight,i.scrollHeight)-(a(i,"padding-top",!0)||0)-(a(i,"padding-bottom",!0)||0));if(_.getComputedStyle||t(27,!0),i=_.getComputedStyle(i,void 0)){var l=i.getPropertyValue(o);h(s,"opacity"!==o)&&(l=n(l))}return l},inArray:function(e,n,r){return t(32,!1,void 0,{"Highcharts.inArray":"use Array.indexOf"}),n.indexOf(e,r)},isArray:i,isClass:a,isDOMElement:s,isFunction:function(e){return"function"==typeof e},isNumber:l,isObject:o,isString:r,keys:function(e){return t(32,!1,void 0,{"Highcharts.keys":"use Object.keys"}),Object.keys(e)},merge:function(){var e,t=arguments,n={},r=function(e,t){return"object"!=typeof e&&(e={}),m(t,(function(n,i){"__proto__"!==i&&"constructor"!==i&&(!o(n,!0)||a(n)||s(n)?e[i]=t[i]:e[i]=r(e[i]||{},n))})),e};!0===t[0]&&(n=t[1],t=Array.prototype.slice.call(t,2));var i=t.length;for(e=0;e=n&&(t=[1/n]))),r=0;r=e||!i&&s<=(t[r]+(t[r+1]||t[r]))/2));r++);return f(o*n,-Math.round(Math.log(.001)/Math.LN10))},objectEach:m,offset:function(e){var t=y.documentElement;return{top:(e=e.parentElement||e.parentNode?e.getBoundingClientRect():{top:0,left:0,width:0,height:0}).top+(_.pageYOffset||t.scrollTop)-(t.clientTop||0),left:e.left+(_.pageXOffset||t.scrollLeft)-(t.clientLeft||0),width:e.width,height:e.height}},pad:function(e,t,n){return Array((t||2)+1-String(e).replace("-","").length).join(n||"0")+e},pick:h,pInt:n,relativeLength:function(e,t,n){return/%$/.test(e)?t*parseFloat(e)/100+(n||0):parseFloat(e)},removeEvent:g,splat:function(e){return i(e)?e:[e]},stableSort:function(e,t){var n,r,i=e.length;for(r=0;r>16,(65280&i)>>8,255&i,1]:4===r&&(n=[(3840&i)>>4|(3840&i)>>8,(240&i)>>4|240&i,(15&i)<<4|15&i,1])}if(!n)for(i=t.parsers.length;i--&&!n;){var o=t.parsers[i];(r=o.regex.exec(e))&&(n=o.parse(r))}}n&&(this.rgba=n)},t.prototype.get=function(e){var t=this.input,i=this.rgba;if("object"==typeof t&&void 0!==this.stops){var o=r(t);return o.stops=[].slice.call(o.stops),this.stops.forEach((function(t,n){o.stops[n]=[o.stops[n][0],t.get(e)]})),o}return i&&n(i[0])?"rgb"===e||!e&&1===i[3]?"rgb("+i[0]+","+i[1]+","+i[2]+")":"a"===e?""+i[3]:"rgba("+i.join(",")+")":t},t.prototype.brighten=function(e){var t=this.rgba;if(this.stops)this.stops.forEach((function(t){t.brighten(e)}));else if(n(e)&&0!==e)for(var r=0;3>r;r++)t[r]+=i(255*e),0>t[r]&&(t[r]=0),255d?"AM":"PM",P:12>d?"am":"pm",S:c(a.getSeconds()),L:c(Math.floor(n%1e3),3)},e.dateFormats),l(a,(function(e,r){for(;-1!==t.indexOf("%"+r);)t=t.replace("%"+r,"function"==typeof e?e.call(s,n):e)})),i?t.substr(0,1).toUpperCase()+t.substr(1):t},t.prototype.resolveDTLFormat=function(e){return s(e,!0)?e:{main:(e=d(e))[0],from:e[1],to:e[2]}},t.prototype.getTimeTicks=function(e,t,n,i){var s,a=this,l=[],c={},d=new a.Date(t),p=e.unitRange,f=e.count||1;if(i=u(i,1),r(t)){if(a.set("Milliseconds",d,p>=h.second?0:f*Math.floor(a.get("Milliseconds",d)/f)),p>=h.second&&a.set("Seconds",d,p>=h.minute?0:f*Math.floor(a.get("Seconds",d)/f)),p>=h.minute&&a.set("Minutes",d,p>=h.hour?0:f*Math.floor(a.get("Minutes",d)/f)),p>=h.hour&&a.set("Hours",d,p>=h.day?0:f*Math.floor(a.get("Hours",d)/f)),p>=h.day&&a.set("Date",d,p>=h.month?1:Math.max(1,f*Math.floor(a.get("Date",d)/f))),p>=h.month){a.set("Month",d,p>=h.year?0:f*Math.floor(a.get("Month",d)/f));var m=a.get("FullYear",d)}p>=h.year&&a.set("FullYear",d,m-m%f),p===h.week&&(m=a.get("Day",d),a.set("Date",d,a.get("Date",d)-m+i+(m4*h.month||a.getTimezoneOffset(t)!==a.getTimezoneOffset(n)),t=d.getTime(),d=1;tl.length&&l.forEach((function(e){0==e%18e5&&"000000000"===a.dateFormat("%H%M%S%L",e)&&(c[e]="day")}))}return l.info=o(e,{higherRanks:c,totalRange:p*f}),l},t.prototype.getDateFormat=function(e,t,n,r){var i=this.dateFormat("%m-%d %H:%M:%S.%L",t),o={millisecond:15,second:12,minute:9,hour:6,day:3},s="millisecond";for(a in h){if(e===h.week&&+this.dateFormat("%w",t)===n&&"00:00:00.000"===i.substr(6)){var a="week";break}if(h[a]>e){a=s;break}if(o[a]&&i.substr(o[a])!=="01-01 00:00:00.000".substr(o[a]))break;"week"!==a&&(s=a)}if(a)var l=this.resolveDTLFormat(r[a]).main;return l},t}()})),t(n,"Core/DefaultOptions.js",[n["Core/Chart/ChartDefaults.js"],n["Core/Color/Color.js"],n["Core/Globals.js"],n["Core/Color/Palettes.js"],n["Core/Time.js"],n["Core/Utilities.js"]],(function(e,t,n,r,i,o){t=t.parse;var s=o.merge,a={colors:r.colors,symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),weekdays:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),decimalPoint:".",numericSymbols:"kMGTPE".split(""),resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:" "},global:{},time:{Date:void 0,getTimezoneOffset:void 0,timezone:void 0,timezoneOffset:0,useUTC:!0},chart:e,title:{text:"Chart title",align:"center",margin:15,widthAdjust:-44},subtitle:{text:"",align:"center",widthAdjust:-44},caption:{margin:15,text:"",align:"left",verticalAlign:"bottom"},plotOptions:{},labels:{style:{position:"absolute",color:"#333333"}},legend:{enabled:!0,align:"center",alignColumns:!0,className:"highcharts-no-tooltip",layout:"horizontal",labelFormatter:function(){return this.name},borderColor:"#999999",borderRadius:0,navigation:{activeColor:"#003399",inactiveColor:"#cccccc"},itemStyle:{color:"#333333",cursor:"pointer",fontSize:"12px",fontWeight:"bold",textOverflow:"ellipsis"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#cccccc"},shadow:!1,itemCheckboxStyle:{position:"absolute",width:"13px",height:"13px"},squareSymbol:!0,symbolPadding:5,verticalAlign:"bottom",x:0,y:0,title:{style:{fontWeight:"bold"}}},loading:{labelStyle:{fontWeight:"bold",position:"relative",top:"45%"},style:{position:"absolute",backgroundColor:"#ffffff",opacity:.5,textAlign:"center"}},tooltip:{enabled:!0,animation:n.svg,borderRadius:3,dateTimeLabelFormats:{millisecond:"%A, %b %e, %H:%M:%S.%L",second:"%A, %b %e, %H:%M:%S",minute:"%A, %b %e, %H:%M",hour:"%A, %b %e, %H:%M",day:"%A, %b %e, %Y",week:"Week from %A, %b %e, %Y",month:"%B %Y",year:"%Y"},footerFormat:"",headerShape:"callout",hideDelay:500,padding:8,shape:"callout",shared:!1,snap:n.isTouchDevice?25:10,headerFormat:'{point.key}
',pointFormat:' {series.name}: {point.y}
',backgroundColor:t("#f7f7f7").setOpacity(.85).get(),borderWidth:1,shadow:!0,stickOnContact:!1,style:{color:"#333333",cursor:"default",fontSize:"12px",whiteSpace:"nowrap"},useHTML:!1},credits:{enabled:!0,href:"https://www.highcharts.com?credits",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#999999",fontSize:"9px"},text:"Highcharts.com"}};a.chart.styledMode=!1;var l=new i(s(a.global,a.time));return e={defaultOptions:a,defaultTime:l,getOptions:function(){return a},setOptions:function(e){return s(!0,a,e),(e.time||e.global)&&(n.time?n.time.update(s(a.global,a.time,e.global,e.time)):n.time=l),a}}})),t(n,"Core/Animation/Fx.js",[n["Core/Color/Color.js"],n["Core/Globals.js"],n["Core/Utilities.js"]],(function(e,t,n){var r=e.parse,i=t.win,o=n.isNumber,s=n.objectEach;return function(){function e(e,t,n){this.pos=NaN,this.options=t,this.elem=e,this.prop=n}return e.prototype.dSetter=function(){var e=this.paths,t=e&&e[0];e=e&&e[1];var n=this.now||0,r=[];if(1!==n&&t&&e)if(t.length===e.length&&1>n)for(var i=0;i=o+this.startTime){this.now=this.end,this.pos=1,this.update();var l=a[this.prop]=!0;s(a,(function(e){!0!==e&&(l=!1)})),l&&i&&i.call(r),e=!1}else this.pos=n.easing((t-this.startTime)/o),this.now=this.start+(this.end-this.start)*this.pos,this.update(),e=!0;return e},e.prototype.initPath=function(e,t,n){function r(e,t){for(;e.lengthu[1]){var h=t+ +u[1];0<=h?(u[0]=(+u[0]).toExponential(h).split("e")[0],t=h):(u[0]=u[0].split(".")[0]||0,e=20>t?(u[0]*Math.pow(10,u[1])).toFixed(t):0,u[1]=0)}}else t=2;h=(Math.abs(u[1]?u[0]:e)+Math.pow(10,-Math.max(t,c)-1)).toFixed(t);var p=3<(c=String(l(h))).length?c.length%3:0;return n=a(n,o.decimalPoint),i=a(i,o.thousandsSep),e=(0>e?"-":"")+(p?c.substr(0,p)+i:""),e=0>+u[1]&&!d?"0":e+c.substr(p).replace(/(\d{3})(?=\d)/g,"$1"+i),t&&(e+=n+h.slice(-t)),u[1]&&0!=+e&&(e+="e"+u[1]),e}var r=e.defaultOptions,i=e.defaultTime,o=t.getNestedProperty,s=t.isNumber,a=t.pick,l=t.pInt;return{dateFormat:function(e,t,n){return i.dateFormat(e,t,n)},format:function(e,t,s){var a="{",l=!1,c=/f$/,u=/\.([0-9])/,d=r.lang,h=s&&s.time||i;s=s&&s.numberFormatter||n;for(var p=[];e;){var f=e.indexOf(a);if(-1===f)break;var m=e.slice(0,f);if(l){if(m=m.split(":"),a=o(m.shift()||"",t),m.length&&"number"==typeof a)if(m=m.join(":"),c.test(m)){var g=parseInt((m.match(u)||["","-1"])[1],10);null!==a&&(a=s(a,g,d.decimalPoint,-1c){for(i(t,u),f=a=0;f<=c;)f+=t[a].size,a++;p=t.splice(a-1,t.length)}for(i(t,d),t=t.map((function(e){return{size:e.size,targets:[e.target],align:r(e.align,.5)}}));h;){for(a=t.length;a--;)c=t[a],u=(Math.min.apply(0,c.targets)+Math.max.apply(0,c.targets))/2,c.pos=n(u-c.size*c.align,0,o-c.size);for(a=t.length,h=!1;a--;)0t[a].pos&&(t[a-1].size+=t[a].size,t[a-1].targets=t[a-1].targets.concat(t[a].targets),t[a-1].align=.5,t[a-1].pos+t[a-1].size>o&&(t[a-1].pos=o-t[a-1].size),t.splice(a,1),h=!0)}return l.push.apply(l,p),a=0,t.some((function(t){var n=0;return(t.targets||[]).some((function(){return l[a].pos=t.pos+n,void 0!==s&&Math.abs(l[a].pos-l[a].target)>s?(l.slice(0,a+1).forEach((function(e){return delete e.pos})),l.reducedLen=(l.reducedLen||o)-.1*o,l.reducedLen>.1*o&&e(l,o,s),!0):(n+=l[a].size,a++,!1)}))})),i(l,d),l}}(t||(t={})),t})),t(n,"Core/Renderer/SVG/SVGElement.js",[n["Core/Animation/AnimationUtilities.js"],n["Core/Renderer/HTML/AST.js"],n["Core/Color/Color.js"],n["Core/Globals.js"],n["Core/Utilities.js"]],(function(e,t,n,r,i){var o=e.animate,s=e.animObject,a=e.stop,l=r.deg2rad,c=r.doc,u=r.noop,d=r.svg,h=r.SVG_NS,p=r.win,f=i.addEvent,m=i.attr,g=i.createElement,b=i.css,v=i.defined,y=i.erase,_=i.extend,S=i.fireEvent,x=i.isArray,w=i.isFunction,k=i.isNumber,O=i.isString,E=i.merge,A=i.objectEach,T=i.pick,C=i.pInt,M=i.syncTimeout,P=i.uniqueKey;return(e=function(){function e(){this.element=void 0,this.onEvents={},this.opacity=1,this.renderer=void 0,this.SVG_NS=h,this.symbolCustomAttribs="x y width height r start end innerR anchorX anchorY rounded".split(" ")}return e.prototype._defaultGetter=function(e){return e=T(this[e+"Value"],this[e],this.element?this.element.getAttribute(e):null,0),/^[\-0-9\.]+$/.test(e)&&(e=parseFloat(e)),e},e.prototype._defaultSetter=function(e,t,n){n.setAttribute(t,e)},e.prototype.add=function(e){var t=this.renderer,n=this.element;if(e&&(this.parentGroup=e),this.parentInverted=e&&e.inverted,void 0!==this.textStr&&"text"===this.element.nodeName&&t.buildText(this),this.added=!0,!e||e.handleZ||this.zIndex)var r=this.zIndexSetter();return r||(e?e.element:t.box).appendChild(n),this.onAdd&&this.onAdd(),this},e.prototype.addClass=function(e,t){var n=t?"":this.attr("class")||"";return(e=(e||"").split(/ /g).reduce((function(e,t){return-1===n.indexOf(t)&&e.push(t),e}),n?[n]:[]).join(" "))!==n&&this.attr("class",e),this},e.prototype.afterSetters=function(){this.doTransform&&(this.updateTransform(),this.doTransform=!1)},e.prototype.align=function(e,t,n){var r,i,o,s={},a=this.renderer,l=a.alignedObjects;e?(this.alignOptions=e,this.alignByTranslate=t,(!n||O(n))&&(this.alignTo=r=n||"renderer",y(l,this),l.push(this),n=void 0)):(e=this.alignOptions,t=this.alignByTranslate,r=this.alignTo),n=T(n,a[r],"scrollablePlotBox"===r?a.plotBox:void 0,a),r=e.align;var c=e.verticalAlign;return a=(n.x||0)+(e.x||0),l=(n.y||0)+(e.y||0),"right"===r?i=1:"center"===r&&(i=2),i&&(a+=(n.width-(e.width||0))/i),s[t?"translateX":"x"]=Math.round(a),"bottom"===c?o=1:"middle"===c&&(o=2),o&&(l+=(n.height-(e.height||0))/o),s[t?"translateY":"y"]=Math.round(l),this[this.placed?"animate":"attr"](s),this.placed=!0,this.alignAttr=s,this},e.prototype.alignSetter=function(e){var t={left:"start",center:"middle",right:"end"};t[e]&&(this.alignValue=e,this.element.setAttribute("text-anchor",t[e]))},e.prototype.animate=function(e,t,n){var r=this,i=s(T(t,this.renderer.globalAnimation,!0));return t=i.defer,T(c.hidden,c.msHidden,c.webkitHidden,!1)&&(i.duration=0),0!==i.duration?(n&&(i.complete=n),M((function(){r.element&&o(r,e,i)}),t)):(this.attr(e,void 0,n),A(e,(function(e,t){i.step&&i.step.call(this,e,{prop:t,pos:1,elem:this})}),this)),this},e.prototype.applyTextOutline=function(e){var t=this.element;-1!==e.indexOf("contrast")&&(e=e.replace(/contrast/g,this.renderer.getContrast(t.style.fill)));var n=e.split(" ");if(e=n[n.length-1],(n=n[0])&&"none"!==n&&r.svg){this.fakeTS=!0,this.ySetter=this.xSetter,n=n.replace(/(^[\d\.]+)(.*?)$/g,(function(e,t,n){return 2*Number(t)+n})),this.removeTextOutline();var i=c.createElementNS(h,"tspan");m(i,{class:"highcharts-text-outline",fill:e,stroke:e,"stroke-width":n,"stroke-linejoin":"round"}),[].forEach.call(t.childNodes,(function(e){var t=e.cloneNode(!0);t.removeAttribute&&["fill","stroke","stroke-width","stroke"].forEach((function(e){return t.removeAttribute(e)})),i.appendChild(t)}));var o=c.createElementNS(h,"tspan");o.textContent="​",["x","y"].forEach((function(e){var n=t.getAttribute(e);n&&o.setAttribute(e,n)})),i.appendChild(o),t.insertBefore(i,t.firstChild)}},e.prototype.attr=function(e,t,n,r){var i,o,s,l=this.element,c=this.symbolCustomAttribs,u=this;if("string"==typeof e&&void 0!==t){var d=e;(e={})[d]=t}return"string"==typeof e?u=(this[e+"Getter"]||this._defaultGetter).call(this,e,l):(A(e,(function(t,n){o=!1,r||a(this,n),this.symbolName&&-1!==c.indexOf(n)&&(i||(this.symbolAttr(e),i=!0),o=!0),!this.rotation||"x"!==n&&"y"!==n||(this.doTransform=!0),o||((s=this[n+"Setter"]||this._defaultSetter).call(this,t,n,l),!this.styledMode&&this.shadows&&/^(width|height|visibility|x|y|d|transform|cx|cy|r)$/.test(n)&&this.updateShadows(n,t,s))}),this),this.afterSetters()),n&&n.call(this),u},e.prototype.clip=function(e){return this.attr("clip-path",e?"url("+this.renderer.url+"#"+e.id+")":"none")},e.prototype.crisp=function(e,t){t=t||e.strokeWidth||0;var n=Math.round(t)%2/2;return e.x=Math.floor(e.x||this.x||0)+n,e.y=Math.floor(e.y||this.y||0)+n,e.width=Math.floor((e.width||this.width||0)-2*n),e.height=Math.floor((e.height||this.height||0)-2*n),v(e.strokeWidth)&&(e.strokeWidth=t),e},e.prototype.complexColor=function(e,t,r){var i,o,s,a,l,c,u,d,h,p,f,m=this.renderer,g=[];S(this.renderer,"complexColor",{args:arguments},(function(){if(e.radialGradient?o="radialGradient":e.linearGradient&&(o="linearGradient"),o){if(s=e[o],l=m.gradients,c=e.stops,h=r.radialReference,x(s)&&(e[o]=s={x1:s[0],y1:s[1],x2:s[2],y2:s[3],gradientUnits:"userSpaceOnUse"}),"radialGradient"===o&&h&&!v(s.gradientUnits)&&(a=s,s=E(s,m.getRadialAttr(h,a),{gradientUnits:"userSpaceOnUse"})),A(s,(function(e,t){"id"!==t&&g.push(t,e)})),A(c,(function(e){g.push(e)})),g=g.join(","),l[g])p=l[g].attr("id");else{s.id=p=P();var b=l[g]=m.createElement(o).attr(s).add(m.defs);b.radAttr=a,b.stops=[],c.forEach((function(e){0===e[1].indexOf("rgba")?(i=n.parse(e[1]),u=i.get("rgb"),d=i.get("a")):(u=e[1],d=1),e=m.createElement("stop").attr({offset:e[0],"stop-color":u,"stop-opacity":d}).add(b),b.stops.push(e)}))}f="url("+m.url+"#"+p+")",r.setAttribute(t,f),r.gradient=g,e.toString=function(){return f}}}))},e.prototype.css=function(e){var t=this.styles,n={},r=this.element,i=["textOutline","textOverflow","width"],o="",s=!t;if(e&&e.color&&(e.fill=e.color),t&&A(e,(function(e,r){t&&t[r]!==e&&(n[r]=e,s=!0)})),s){if(t&&(e=_(t,n)),e)if(null===e.width||"auto"===e.width)delete this.textWidth;else if("text"===r.nodeName.toLowerCase()&&e.width)var a=this.textWidth=C(e.width);if(this.styles=e,a&&!d&&this.renderer.forExport&&delete e.width,r.namespaceURI===this.SVG_NS){var l=function(e,t){return"-"+t.toLowerCase()};A(e,(function(e,t){-1===i.indexOf(t)&&(o+=t.replace(/([A-Z])/g,l)+":"+e+";")})),o&&m(r,"style",o)}else b(r,e);this.added&&("text"===this.element.nodeName&&this.renderer.buildText(this),e&&e.textOutline&&this.applyTextOutline(e.textOutline))}return this},e.prototype.dashstyleSetter=function(e){var t=this["stroke-width"];if("inherit"===t&&(t=1),e=e&&e.toLowerCase()){var n=e.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(",");for(e=n.length;e--;)n[e]=""+C(n[e])*T(t,NaN);e=n.join(",").replace(/NaN/g,"none"),this.element.setAttribute("stroke-dasharray",e)}},e.prototype.destroy=function(){var e=this,t=e.element||{},n=e.renderer,r=t.ownerSVGElement,i=n.isSVG&&"SPAN"===t.nodeName&&e.parentGroup||void 0;if(t.onclick=t.onmouseout=t.onmouseover=t.onmousemove=t.point=null,a(e),e.clipPath&&r){var o=e.clipPath;[].forEach.call(r.querySelectorAll("[clip-path],[CLIP-PATH]"),(function(e){-1d.width)&&(d={width:0,height:0})}else d=this.htmlGetBBox();if(r.isSVG&&(t=d.width,r=d.height,u&&(d.height=r={"11px,17":14,"13px,20":16}[(h||"")+","+Math.round(r)]||r),n&&(u=n*l,d.width=Math.abs(r*Math.sin(u))+Math.abs(t*Math.cos(u)),d.height=Math.abs(r*Math.cos(u))+Math.abs(t*Math.sin(u)))),p&&(""===s||0]*>/g,"").replace(/</g,"<").replace(/>/g,">")},e.prototype.toFront=function(){var e=this.element;return e.parentNode.appendChild(e),this},e.prototype.translate=function(e,t){return this.attr({translateX:e,translateY:t})},e.prototype.updateShadows=function(e,t,n){var r=this.shadows;if(r)for(var i=r.length;i--;)n.call(r[i],"height"===e?Math.max(t-(r[i].cutHeight||0),0):"d"===e?this.d:t,e,r[i])},e.prototype.updateTransform=function(){var e=this.scaleX,t=this.scaleY,n=this.inverted,r=this.rotation,i=this.matrix,o=this.element,s=this.translateX||0,a=this.translateY||0;n&&(s+=this.width,a+=this.height),s=["translate("+s+","+a+")"],v(i)&&s.push("matrix("+i.join(",")+")"),n?s.push("rotate(90) scale(-1,1)"):r&&s.push("rotate("+r+" "+T(this.rotationOriginX,o.getAttribute("x"),0)+" "+T(this.rotationOriginY,o.getAttribute("y")||0)+")"),(v(e)||v(t))&&s.push("scale("+T(e,1)+" "+T(t,1)+")"),s.length&&o.setAttribute("transform",s.join(" "))},e.prototype.visibilitySetter=function(e,t,n){"inherit"===e?n.removeAttribute(t):this[t]!==e&&n.setAttribute(t,e),this[t]=e},e.prototype.xGetter=function(e){return"circle"===this.element.nodeName&&("x"===e?e="cx":"y"===e&&(e="cy")),this._defaultGetter(e)},e.prototype.zIndexSetter=function(e,t){var n=this.renderer,r=this.parentGroup,i=(r||n).element||n.box,o=this.element;n=i===n.box;var s,a=!1,l=this.added;if(v(e)?(o.setAttribute("data-z-index",e),e=+e,this[t]===e&&(l=!1)):v(this[t])&&o.removeAttribute("data-z-index"),this[t]=e,l){for((e=this.zIndex)&&r&&(r.handleZ=!0),s=(t=i.childNodes).length-1;0<=s&&!a;s--){l=(r=t[s]).getAttribute("data-z-index");var c=!v(l);r!==o&&(0>e&&c&&!n&&!s?(i.insertBefore(o,t[s]),a=!0):(C(l)<=e||c&&(!v(e)||0<=e))&&(i.insertBefore(o,t[s+1]||null),a=!0))}a||(i.insertBefore(o,t[n?3:0]||null),a=!0)}return a},e}()).prototype["stroke-widthSetter"]=e.prototype.strokeSetter,e.prototype.yGetter=e.prototype.xGetter,e.prototype.matrixSetter=e.prototype.rotationOriginXSetter=e.prototype.rotationOriginYSetter=e.prototype.rotationSetter=e.prototype.scaleXSetter=e.prototype.scaleYSetter=e.prototype.translateXSetter=e.prototype.translateYSetter=e.prototype.verticalAlignSetter=function(e,t){this[t]=e,this.doTransform=!0},e})),t(n,"Core/Renderer/RendererRegistry.js",[n["Core/Globals.js"]],(function(e){var t;return function(t){var n;t.rendererTypes={},t.getRendererType=function(e){return void 0===e&&(e=n),t.rendererTypes[e]||t.rendererTypes[n]},t.registerRendererType=function(r,i,o){t.rendererTypes[r]=i,n&&!o||(n=r,e.Renderer=i)}}(t||(t={})),t})),t(n,"Core/Renderer/SVG/SVGLabel.js",[n["Core/Renderer/SVG/SVGElement.js"],n["Core/Utilities.js"]],(function(e,t){var n=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),r=t.defined,i=t.extend,o=t.isNumber,s=t.merge,a=t.pick,l=t.removeEvent;return function(t){function c(e,n,r,i,o,s,a,l,u,d){var h,p=t.call(this)||this;return p.paddingLeftSetter=p.paddingSetter,p.paddingRightSetter=p.paddingSetter,p.init(e,"g"),p.textStr=n,p.x=r,p.y=i,p.anchorX=s,p.anchorY=a,p.baseline=u,p.className=d,p.addClass("button"===d?"highcharts-no-tooltip":"highcharts-label"),d&&p.addClass("highcharts-"+d),p.text=e.text(void 0,0,0,l).attr({zIndex:1}),"string"==typeof o&&((h=/^url\((.*?)\)$/.test(o))||p.renderer.symbols[o])&&(p.symbolKey=o),p.bBox=c.emptyBBox,p.padding=3,p.baselineOffset=0,p.needsBox=e.styledMode||h,p.deferredAttr={},p.alignFactor=0,p}return n(c,t),c.prototype.alignSetter=function(e){(e={left:0,center:.5,right:1}[e])!==this.alignFactor&&(this.alignFactor=e,this.bBox&&o(this.xSetting)&&this.attr({x:this.xSetting}))},c.prototype.anchorXSetter=function(e,t){this.anchorX=e,this.boxAttr(t,Math.round(e)-this.getCrispAdjust()-this.xSetting)},c.prototype.anchorYSetter=function(e,t){this.anchorY=e,this.boxAttr(t,e-this.ySetting)},c.prototype.boxAttr=function(e,t){this.box?this.box.attr(e,t):this.deferredAttr[e]=t},c.prototype.css=function(t){if(t){var n={};t=s(t),c.textProps.forEach((function(e){void 0!==t[e]&&(n[e]=t[e],delete t[e])})),this.text.css(n);var r="width"in n;"fontSize"in n||"fontWeight"in n?this.updateTextPadding():r&&this.updateBoxSize()}return e.prototype.css.call(this,t)},c.prototype.destroy=function(){l(this.element,"mouseenter"),l(this.element,"mouseleave"),this.text&&this.text.destroy(),this.box&&(this.box=this.box.destroy()),e.prototype.destroy.call(this)},c.prototype.fillSetter=function(e,t){e&&(this.needsBox=!0),this.fill=e,this.boxAttr(t,e)},c.prototype.getBBox=function(){this.textStr&&0===this.bBox.width&&0===this.bBox.height&&this.updateBoxSize();var e=this.padding,t=a(this.paddingLeft,e);return{width:this.width,height:this.height,x:this.bBox.x-t,y:this.bBox.y-e}},c.prototype.getCrispAdjust=function(){return this.renderer.styledMode&&this.box?this.box.strokeWidth()%2/2:(this["stroke-width"]?parseInt(this["stroke-width"],10):0)%2/2},c.prototype.heightSetter=function(e){this.heightSetting=e},c.prototype.onAdd=function(){var e=this.textStr;this.text.add(this),this.attr({text:r(e)?e:"",x:this.x,y:this.y}),this.box&&r(this.anchorX)&&this.attr({anchorX:this.anchorX,anchorY:this.anchorY})},c.prototype.paddingSetter=function(e,t){o(e)?e!==this[t]&&(this[t]=e,this.updateTextPadding()):this[t]=void 0},c.prototype.rSetter=function(e,t){this.boxAttr(t,e)},c.prototype.shadow=function(e){return e&&!this.renderer.styledMode&&(this.updateBoxSize(),this.box&&this.box.shadow(e)),this},c.prototype.strokeSetter=function(e,t){this.stroke=e,this.boxAttr(t,e)},c.prototype["stroke-widthSetter"]=function(e,t){e&&(this.needsBox=!0),this["stroke-width"]=e,this.boxAttr(t,e)},c.prototype["text-alignSetter"]=function(e){this.textAlign=e},c.prototype.textSetter=function(e){void 0!==e&&this.text.attr({text:e}),this.updateTextPadding()},c.prototype.updateBoxSize=function(){var e=this.text.element.style,t={},n=this.padding,s=this.bBox=o(this.widthSetting)&&o(this.heightSetting)&&!this.textAlign||!r(this.text.textStr)?c.emptyBBox:this.text.getBBox();this.width=this.getPaddedWidth(),this.height=(this.heightSetting||s.height||0)+2*n,e=this.renderer.fontMetrics(e&&e.fontSize,this.text),this.baselineOffset=n+Math.min((this.text.firstLineMetrics||e).b,s.height||1/0),this.heightSetting&&(this.baselineOffset+=(this.heightSetting-e.h)/2),this.needsBox&&(this.box||((n=this.box=this.symbolKey?this.renderer.symbol(this.symbolKey):this.renderer.rect()).addClass(("button"===this.className?"":"highcharts-label-box")+(this.className?" highcharts-"+this.className+"-box":"")),n.add(this)),n=this.getCrispAdjust(),t.x=n,t.y=(this.baseline?-this.baselineOffset:0)+n,t.width=Math.round(this.width),t.height=Math.round(this.height),this.box.attr(i(t,this.deferredAttr)),this.deferredAttr={})},c.prototype.updateTextPadding=function(){var e=this.text;this.updateBoxSize();var t=this.baseline?0:this.baselineOffset,n=a(this.paddingLeft,this.padding);r(this.widthSetting)&&this.bBox&&("center"===this.textAlign||"right"===this.textAlign)&&(n+={center:.5,right:1}[this.textAlign]*(this.widthSetting-this.bBox.width)),n===e.x&&t===e.y||(e.attr("x",n),e.hasBoxWidthChanged&&(this.bBox=e.getBBox(!0)),void 0!==t&&e.attr("y",t)),e.x=n,e.y=t},c.prototype.widthSetter=function(e){this.widthSetting=o(e)?e:void 0},c.prototype.getPaddedWidth=function(){var e=this.padding,t=a(this.paddingLeft,e);return e=a(this.paddingRight,e),(this.widthSetting||this.bBox.width||0)+t+e},c.prototype.xSetter=function(e){this.x=e,this.alignFactor&&(e-=this.alignFactor*this.getPaddedWidth(),this["forceAnimate:x"]=!0),this.xSetting=Math.round(e),this.attr("translateX",this.xSetting)},c.prototype.ySetter=function(e){this.ySetting=this.y=Math.round(e),this.attr("translateY",this.ySetting)},c.emptyBBox={width:0,height:0,x:0,y:0},c.textProps="color direction fontFamily fontSize fontStyle fontWeight lineHeight textAlign textDecoration textOutline textOverflow width".split(" "),c}(e)})),t(n,"Core/Renderer/SVG/Symbols.js",[n["Core/Utilities.js"]],(function(e){function t(e,t,n,r,o){var a=[];if(o){var l=o.start||0,c=s(o.r,n);n=s(o.r,r||n);var u=(o.end||0)-.001;r=o.innerR;var d=s(o.open,.001>Math.abs((o.end||0)-l-2*Math.PI)),h=Math.cos(l),p=Math.sin(l),f=Math.cos(u),m=Math.sin(u);l=s(o.longArc,.001>u-l-Math.PI?0:1),a.push(["M",e+c*h,t+n*p],["A",c,n,0,l,s(o.clockwise,1),e+c*f,t+n*m]),i(r)&&a.push(d?["M",e+r*f,t+r*m]:["L",e+r*f,t+r*m],["A",r,r,0,l,i(o.clockwise)?1-o.clockwise:0,e+r*h,t+r*p]),d||a.push(["Z"])}return a}function n(e,t,n,i,o){return o&&o.r?r(e,t,n,i,o):[["M",e,t],["L",e+n,t],["L",e+n,t+i],["L",e,t+i],["Z"]]}function r(e,t,n,r,i){return[["M",e+(i=i&&i.r||0),t],["L",e+n-i,t],["C",e+n,t,e+n,t,e+n,t+i],["L",e+n,t+r-i],["C",e+n,t+r,e+n,t+r,e+n-i,t+r],["L",e+i,t+r],["C",e,t+r,e,t+r,e,t+r-i],["L",e,t+i],["C",e,t,e,t,e+i,t]]}var i=e.defined,o=e.isNumber,s=e.pick;return{arc:t,callout:function(e,t,n,i,s){var a=Math.min(s&&s.r||0,n,i),l=a+6,c=s&&s.anchorX;s=s&&s.anchorY||0;var u=r(e,t,n,i,{r:a});return o(c)?(e+c>=n?s>t+l&&s=e+c?s>t+l&&si&&c>e+l&&cs&&c>e+l&&c/g.test(o))?""!==o&&(i&&i.appendChild(n),o=new e(o),this.modifyTree(o.nodes),o.addToDOM(t.element),this.modifyDOM(),this.ellipsis&&-1!==(n.textContent||"").indexOf("…")&&t.attr("title",this.unescapeEntities(t.textStr||"",["<",">"])),i&&i.removeChild(n)):n.appendChild(r.createTextNode(this.unescapeEntities(o))),a(this.textOutline)&&t.applyTextOutline&&t.applyTextOutline(this.textOutline)}},t.prototype.modifyDOM=function(){var e,t=this,n=this.svgElement,a=s(n.element,"x");for(n.firstLineMetrics=void 0;(e=n.element.firstChild)&&/^[\s\u200B]*$/.test(e.textContent||" ");)n.element.removeChild(e);[].forEach.call(n.element.querySelectorAll("tspan.highcharts-br"),(function(e,r){e.nextSibling&&e.previousSibling&&(0===r&&1===e.previousSibling.nodeType&&(n.firstLineMetrics=n.renderer.fontMetrics(void 0,e.previousSibling)),s(e,{dy:t.getLineHeight(e.nextSibling),x:a}))}));var l=this.width||0;if(l){var c=function(e,o){var c=e.textContent||"",u=c.replace(/([^\^])-/g,"$1- ").split(" "),d=!t.noWrap&&(1i){for(;d<=h;)p=Math.ceil((d+h)/2),n&&(s=o(n,p)),m=f(p,s&&s.length-1),d===h?d=h+1:m>i?h=p-1:d=p;0===h?e.textContent="":t&&h===t.length-1||(e.textContent=s||o(t||n,p))}n&&n.splice(0,p),a.actualWidth=m,a.rotation=c},t.prototype.unescapeEntities=function(e,t){return l(this.renderer.escapes,(function(n,r){t&&-1!==t.indexOf(n)||(e=e.toString().replace(new RegExp(n,"g"),r))})),e},t}()})),t(n,"Core/Renderer/SVG/SVGRenderer.js",[n["Core/Renderer/HTML/AST.js"],n["Core/Color/Color.js"],n["Core/Globals.js"],n["Core/Renderer/RendererRegistry.js"],n["Core/Renderer/SVG/SVGElement.js"],n["Core/Renderer/SVG/SVGLabel.js"],n["Core/Renderer/SVG/Symbols.js"],n["Core/Renderer/SVG/TextBuilder.js"],n["Core/Utilities.js"]],(function(e,t,n,r,i,o,s,a,l){var c,u=n.charts,d=n.deg2rad,h=n.doc,p=n.isFirefox,f=n.isMS,m=n.isWebKit,g=n.noop,b=n.SVG_NS,v=n.symbolSizes,y=n.win,_=l.addEvent,S=l.attr,x=l.createElement,w=l.css,k=l.defined,O=l.destroyObjectProperties,E=l.extend,A=l.isArray,T=l.isNumber,C=l.isObject,M=l.isString,P=l.merge,$=l.pick,R=l.pInt,I=l.uniqueKey;return n=function(){function n(e,t,n,r,i,o,s){this.width=this.url=this.style=this.isSVG=this.imgCount=this.height=this.gradients=this.globalAnimation=this.defs=this.chartIndex=this.cacheKeys=this.cache=this.boxWrapper=this.box=this.alignedObjects=void 0,this.init(e,t,n,r,i,o,s)}return n.prototype.init=function(e,t,n,r,i,o,s){var a,l=this.createElement("svg").attr({version:"1.1",class:"highcharts-root"}),c=l.element;s||l.css(this.getStyle(r)),e.appendChild(c),S(e,"dir","ltr"),-1===e.innerHTML.indexOf("xmlns")&&S(c,"xmlns",this.SVG_NS),this.isSVG=!0,this.box=c,this.boxWrapper=l,this.alignedObjects=[],this.url=this.getReferenceURL(),this.createElement("desc").add().element.appendChild(h.createTextNode("Created with Highcharts 9.3.3")),this.defs=this.createElement("defs").add(),this.allowHTML=o,this.forExport=i,this.styledMode=s,this.gradients={},this.cache={},this.cacheKeys=[],this.imgCount=0,this.setSize(t,n,!1),p&&e.getBoundingClientRect&&((t=function(){w(e,{left:0,top:0}),a=e.getBoundingClientRect(),w(e,{left:Math.ceil(a.left)-a.left+"px",top:Math.ceil(a.top)-a.top+"px"})})(),this.unSubPixelFix=_(y,"resize",t))},n.prototype.definition=function(t){return new e([t]).addToDOM(this.defs.element)},n.prototype.getReferenceURL=function(){if((p||m)&&h.getElementsByTagName("base").length){if(!k(c)){var t=I();t=new e([{tagName:"svg",attributes:{width:8,height:8},children:[{tagName:"defs",children:[{tagName:"clipPath",attributes:{id:t},children:[{tagName:"rect",attributes:{width:4,height:4}}]}]},{tagName:"rect",attributes:{id:"hitme",width:8,height:8,"clip-path":"url(#"+t+")",fill:"rgba(0,0,0,0.001)"}}]}]).addToDOM(h.body),w(t,{position:"fixed",top:0,left:0,zIndex:9e5});var n=h.elementFromPoint(6,6);c="hitme"===(n&&n.id),h.body.removeChild(t)}if(c)return y.location.href.split("#")[0].replace(/<[^>]*>/g,"").replace(/([\('\)])/g,"\\$1").replace(/ /g,"%20")}return""},n.prototype.getStyle=function(e){return this.style=E({fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Arial, Helvetica, sans-serif',fontSize:"12px"},e)},n.prototype.setStyle=function(e){this.boxWrapper.css(this.getStyle(e))},n.prototype.isHidden=function(){return!this.boxWrapper.getBBox().width},n.prototype.destroy=function(){var e=this.defs;return this.box=null,this.boxWrapper=this.boxWrapper.destroy(),O(this.gradients||{}),this.gradients=null,e&&(this.defs=e.destroy()),this.unSubPixelFix&&this.unSubPixelFix(),this.alignedObjects=null},n.prototype.createElement=function(e){var t=new this.Element;return t.init(this,e),t},n.prototype.getRadialAttr=function(e,t){return{cx:e[0]-e[2]/2+(t.cx||0)*e[2],cy:e[1]-e[2]/2+(t.cy||0)*e[2],r:(t.r||0)*e[2]}},n.prototype.buildText=function(e){new a(e).buildSVG()},n.prototype.getContrast=function(e){return(e=t.parse(e).rgba)[0]*=1,e[1]*=1.2,e[2]*=.5,459(e=/px/.test(e)?R(e):12)?e+3:Math.round(1.2*e),b:Math.round(.8*t),f:e}},n.prototype.rotCorr=function(e,t,n){var r=e;return t&&n&&(r=Math.max(r*Math.cos(t*d),4)),{x:-e/3*Math.sin(t*d),y:r}},n.prototype.pathToSegments=function(e){for(var t=[],n=[],r={A:8,C:7,H:2,L:3,M:3,Q:5,S:5,T:3,V:2},i=0;i":">","'":"'",'"':"""},symbols:s,draw:g}),r.registerRendererType("svg",n,!0),n})),t(n,"Core/Renderer/HTML/HTMLElement.js",[n["Core/Globals.js"],n["Core/Renderer/SVG/SVGElement.js"],n["Core/Utilities.js"]],(function(e,t,n){var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=e.isFirefox,o=e.isMS,s=e.isWebKit,a=e.win,l=n.css,c=n.defined,u=n.extend,d=n.pick,h=n.pInt;return function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.compose=function(e){if(-1===t.composedClasses.indexOf(e)){t.composedClasses.push(e);var n=t.prototype,r=e.prototype;r.getSpanCorrection=n.getSpanCorrection,r.htmlCss=n.htmlCss,r.htmlGetBBox=n.htmlGetBBox,r.htmlUpdateTransform=n.htmlUpdateTransform,r.setSpanRotation=n.setSpanRotation}return e},t.prototype.getSpanCorrection=function(e,t,n){this.xCorr=-e*n,this.yCorr=-t},t.prototype.htmlCss=function(e){var t="SPAN"===this.element.tagName&&e&&"width"in e,n=d(t&&e.width,void 0);if(t){delete e.width,this.textWidth=n;var r=!0}return e&&"ellipsis"===e.textOverflow&&(e.whiteSpace="nowrap",e.overflow="hidden"),this.styles=u(this.styles,e),l(this.element,e),r&&this.htmlUpdateTransform(),this},t.prototype.htmlGetBBox=function(){var e=this.element;return{x:e.offsetLeft,y:e.offsetTop,width:e.offsetWidth,height:e.offsetHeight}},t.prototype.htmlUpdateTransform=function(){if(this.added){var e=this.renderer,t=this.element,n=this.translateX||0,r=this.translateY||0,i=this.x||0,o=this.y||0,s=this.textAlign||"left",a={left:0,center:.5,right:1}[s],u=this.styles;if(u=u&&u.whiteSpace,l(t,{marginLeft:n,marginTop:r}),!e.styledMode&&this.shadows&&this.shadows.forEach((function(e){l(e,{marginLeft:n+1,marginTop:r+1})})),this.inverted&&[].forEach.call(t.childNodes,(function(n){e.invertChild(n,t)})),"SPAN"===t.tagName){var d=this.rotation,p=this.textWidth&&h(this.textWidth),f=[d,s,t.innerHTML,this.textWidth,this.textAlign].join(),m=void 0;if(m=!1,p!==this.oldTextWidth){if(this.textPxLength)var g=this.textPxLength;else l(t,{width:"",whiteSpace:u||"nowrap"}),g=t.offsetWidth;(p>this.oldTextWidth||g>p)&&(/[ \-]/.test(t.textContent||t.innerText)||"ellipsis"===t.style.textOverflow)&&(l(t,{width:g>p||d?p+"px":"auto",display:"block",whiteSpace:u||"normal"}),this.oldTextWidth=p,m=!0)}this.hasBoxWidthChanged=m,f!==this.cTT&&(m=e.fontMetrics(t.style.fontSize,t).b,!c(d)||d===(this.oldRotation||0)&&s===this.oldAlign||this.setSpanRotation(d,a,m),this.getSpanCorrection(!c(d)&&this.textPxLength||t.offsetWidth,m,a,d,s)),l(t,{left:i+(this.xCorr||0)+"px",top:o+(this.yCorr||0)+"px"}),this.cTT=f,this.oldRotation=d,this.oldAlign=s}}else this.alignOnAdd=!0},t.prototype.setSpanRotation=function(e,t,n){var r={},c=o&&!/Edge/.test(a.navigator.userAgent)?"-ms-transform":s?"-webkit-transform":i?"MozTransform":a.opera?"-o-transform":void 0;c&&(r[c]=r.transform="rotate("+e+"deg)",r[c+(i?"Origin":"-origin")]=r.transformOrigin=100*t+"% "+n+"px",l(this.element,r))},t.composedClasses=[],t}(t)})),t(n,"Core/Renderer/HTML/HTMLRenderer.js",[n["Core/Renderer/HTML/AST.js"],n["Core/Renderer/SVG/SVGElement.js"],n["Core/Renderer/SVG/SVGRenderer.js"],n["Core/Utilities.js"]],(function(e,t,n,r){var i=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),o=r.attr,s=r.createElement,a=r.extend,l=r.pick;return function(n){function r(){return null!==n&&n.apply(this,arguments)||this}return i(r,n),r.compose=function(e){return-1===r.composedClasses.indexOf(e)&&(r.composedClasses.push(e),e.prototype.html=r.prototype.html),e},r.prototype.html=function(n,r,i){var c=this.createElement("span"),u=c.element,d=c.renderer,h=d.isSVG,p=function(e,n){["opacity","visibility"].forEach((function(r){e[r+"Setter"]=function(i,o,s){var a=e.div?e.div.style:n;t.prototype[r+"Setter"].call(this,i,o,s),a&&(a[o]=i)}})),e.addedSetters=!0};return c.textSetter=function(t){t!==this.textStr&&(delete this.bBox,delete this.oldTextWidth,e.setElementHTML(this.element,l(t,"")),this.textStr=t,c.doTransform=!0)},h&&p(c,c.element.style),c.xSetter=c.ySetter=c.alignSetter=c.rotationSetter=function(e,t){"align"===t?c.alignValue=c.textAlign=e:c[t]=e,c.doTransform=!0},c.afterSetters=function(){this.doTransform&&(this.htmlUpdateTransform(),this.doTransform=!1)},c.attr({text:n,x:Math.round(r),y:Math.round(i)}).css({position:"absolute"}),d.styledMode||c.css({fontFamily:this.style.fontFamily,fontSize:this.style.fontSize}),u.style.whiteSpace="nowrap",c.css=c.htmlCss,h&&(c.add=function(e){var t=d.box.parentNode,n=[];if(this.parentGroup=e){var r=e.div;if(!r){for(;e;)n.push(e),e=e.parentGroup;n.reverse().forEach((function(e){function i(t,n){e[n]=t,"translateX"===n?d.left=t+"px":d.top=t+"px",e.doTransform=!0}var l=o(e.element,"class"),u=e.styles||{},d=(r=e.div=e.div||s("div",l?{className:l}:void 0,{position:"absolute",left:(e.translateX||0)+"px",top:(e.translateY||0)+"px",display:e.display,opacity:e.opacity,cursor:u.cursor,pointerEvents:u.pointerEvents,visibility:e.visibility},r||t)).style;a(e,{classSetter:function(e){return function(t){this.element.setAttribute("class",t),e.className=t}}(r),on:function(){return n[0].div&&c.on.apply({element:n[0].div,onEvents:e.onEvents},arguments),e},translateXSetter:i,translateYSetter:i}),e.addedSetters||p(e)}))}}else r=t;return r.appendChild(u),c.added=!0,c.alignOnAdd&&c.htmlUpdateTransform(),c}),c},r.composedClasses=[],r}(n)})),t(n,"Core/Axis/AxisDefaults.js",[],(function(){var e;return function(e){e.defaultXAxisOptions={alignTicks:!0,allowDecimals:void 0,panningEnabled:!0,zIndex:2,zoomEnabled:!0,dateTimeLabelFormats:{millisecond:{main:"%H:%M:%S.%L",range:!1},second:{main:"%H:%M:%S",range:!1},minute:{main:"%H:%M",range:!1},hour:{main:"%H:%M",range:!1},day:{main:"%e. %b"},week:{main:"%e. %b"},month:{main:"%b '%y"},year:{main:"%Y"}},endOnTick:!1,gridLineDashStyle:"Solid",gridZIndex:1,labels:{autoRotation:void 0,autoRotationLimit:80,distance:void 0,enabled:!0,indentation:10,overflow:"justify",padding:5,reserveSpace:void 0,rotation:void 0,staggerLines:0,step:0,useHTML:!1,x:0,zIndex:7,style:{color:"#666666",cursor:"default",fontSize:"11px"}},maxPadding:.01,minorGridLineDashStyle:"Solid",minorTickLength:2,minorTickPosition:"outside",minPadding:.01,offset:void 0,opposite:!1,reversed:void 0,reversedStacks:!1,showEmpty:!0,showFirstLabel:!0,showLastLabel:!0,startOfWeek:1,startOnTick:!1,tickLength:10,tickPixelInterval:100,tickmarkPlacement:"between",tickPosition:"outside",title:{align:"middle",rotation:0,useHTML:!1,x:0,y:0,style:{color:"#666666"}},type:"linear",uniqueNames:!0,visible:!0,minorGridLineColor:"#f2f2f2",minorGridLineWidth:1,minorTickColor:"#999999",lineColor:"#ccd6eb",lineWidth:1,gridLineColor:"#e6e6e6",gridLineWidth:void 0,tickColor:"#ccd6eb"},e.defaultYAxisOptions={reversedStacks:!0,endOnTick:!0,maxPadding:.05,minPadding:.05,tickPixelInterval:72,showLastLabel:!0,labels:{x:-8},startOnTick:!0,title:{rotation:270,text:"Values"},stackLabels:{animation:{},allowOverlap:!1,enabled:!1,crop:!0,overflow:"justify",formatter:function(){return(0,this.axis.chart.numberFormatter)(this.total,-1)},style:{color:"#000000",fontSize:"11px",fontWeight:"bold",textOutline:"1px contrast"}},gridLineWidth:1,lineWidth:0},e.defaultLeftAxisOptions={labels:{x:-15},title:{rotation:270}},e.defaultRightAxisOptions={labels:{x:15},title:{rotation:90}},e.defaultBottomAxisOptions={labels:{autoRotation:[-45],x:0},margin:15,title:{rotation:0}},e.defaultTopAxisOptions={labels:{autoRotation:[-45],x:0},margin:15,title:{rotation:0}}}(e||(e={})),e})),t(n,"Core/Foundation.js",[n["Core/Utilities.js"]],(function(e){var t,n=e.addEvent,r=e.isFunction,i=e.objectEach,o=e.removeEvent;return function(e){e.registerEventOptions=function(e,t){e.eventOptions=e.eventOptions||{},i(t.events,(function(t,i){e.eventOptions[i]!==t&&(e.eventOptions[i]&&(o(e,i,e.eventOptions[i]),delete e.eventOptions[i]),r(t)&&(e.eventOptions[i]=t,n(e,i,t)))}))}}(t||(t={})),t})),t(n,"Core/Axis/Tick.js",[n["Core/FormatUtilities.js"],n["Core/Globals.js"],n["Core/Utilities.js"]],(function(e,t,n){var r=t.deg2rad,i=n.clamp,o=n.correctFloat,s=n.defined,a=n.destroyObjectProperties,l=n.extend,c=n.fireEvent,u=n.isNumber,d=n.merge,h=n.objectEach,p=n.pick;return t=function(){function t(e,t,n,r,i){this.isNewLabel=this.isNew=!0,this.axis=e,this.pos=t,this.type=n||"",this.parameters=i||{},this.tickmarkOffset=this.parameters.tickmarkOffset,this.options=this.parameters.options,c(this,"init"),n||r||this.addLabel()}return t.prototype.addLabel=function(){var t=this,n=t.axis,r=n.options,i=n.chart,a=n.categories,d=n.logarithmic,h=n.names,f=t.pos,m=p(t.options&&t.options.labels,r.labels),g=n.tickPositions,b=f===g[0],v=f===g[g.length-1],y=(!m.step||1===m.step)&&1===n.tickInterval;g=g.info;var _,S=t.label;if(a=this.parameters.category||(a?p(a[f],h[f],f):f),d&&u(a)&&(a=o(d.lin2log(a))),n.dateTime)if(g)var x=i.time.resolveDTLFormat(r.dateTimeLabelFormats[!r.grid&&g.higherRanks[f]||g.unitName]),w=x.main;else u(a)&&(w=n.dateTime.getXDateFormat(a,r.dateTimeLabelFormats||{}));t.isFirst=b,t.isLast=v;var k={axis:n,chart:i,dateTimeLabelFormat:w,isFirst:b,isLast:v,pos:f,tick:t,tickPositionInfo:g,value:a};c(this,"labelFormat",k);var O=function(t){return m.formatter?m.formatter.call(t,t):m.format?(t.text=n.defaultLabelFormatter.call(t),e.format(m.format,t,i)):n.defaultLabelFormatter.call(t,t)};r=O.call(k,k);var E=x&&x.list;t.shortenLabel=E?function(){for(_=0;_u&&i-d*hs&&(l=Math.round((o-i)/Math.cos(u*r))):(o=i+(1-d)*h,i-d*hs&&(g=s-e.x+g*d,b=-1),(g=Math.min(f,g))g||t.autoRotation&&(c.styles||{}).width)&&(l=g)),l&&(this.shortenLabel?this.shortenLabel():(m.width=Math.floor(l)+"px",(n.style||{}).textOverflow||(m.textOverflow="ellipsis"),c.css(m)))},t.prototype.moveLabel=function(e,t){var n=this,r=n.label,i=n.axis,o=i.reversed,s=!1;if(r&&r.textStr===e?(n.movedLabel=r,s=!0,delete n.label):h(i.ticks,(function(t){s||t.isNew||t===n||!t.label||t.label.textStr!==e||(n.movedLabel=t.label,s=!0,t.labelPos=n.movedLabel.xy,delete t.label)})),!s&&(n.labelPos||r)){var a=n.labelPos||r.xy;r=i.horiz?o?0:i.width+i.left:a.x,i=i.horiz?a.y:o?i.width+i.left:0,n.movedLabel=n.createLabel({x:r,y:i},e,t),n.movedLabel&&n.movedLabel.attr({opacity:0})}},t.prototype.render=function(e,t,n){var r=this.axis,i=r.horiz,o=this.pos,s=p(this.tickmarkOffset,r.tickmarkOffset);s=(o=this.getPosition(i,o,s,t)).x;var a=o.y;r=i&&s===r.pos+r.len||!i&&a===r.pos?-1:1,i=p(n,this.label&&this.label.newOpacity,1),n=p(n,1),this.isActive=!0,this.renderGridLine(t,n,r),this.renderMark(o,n,r),this.renderLabel(o,t,i,e),this.isNew=!1,c(this,"afterRender")},t.prototype.renderGridLine=function(e,t,n){var r=this.axis,i=r.options,o={},s=this.pos,a=this.type,l=p(this.tickmarkOffset,r.tickmarkOffset),c=r.chart.renderer,u=this.gridLine,d=i.gridLineWidth,h=i.gridLineColor,f=i.gridLineDashStyle;"minor"===this.type&&(d=i.minorGridLineWidth,h=i.minorGridLineColor,f=i.minorGridLineDashStyle),u||(r.chart.styledMode||(o.stroke=h,o["stroke-width"]=d||0,o.dashstyle=f),a||(o.zIndex=1),e&&(t=0),this.gridLine=u=c.path().attr(o).addClass("highcharts-"+(a?a+"-":"")+"grid-line").add(r.gridGroup)),u&&(n=r.getPlotLinePath({value:s+l,lineWidth:u.strokeWidth()*n,force:"pass",old:e}))&&u[e||this.isNew?"attr":"animate"]({d:n,opacity:t})},t.prototype.renderMark=function(e,t,n){var r=this.axis,i=r.options,o=r.chart.renderer,s=this.type,a=r.tickSize(s?s+"Tick":"tick"),l=e.x;e=e.y;var c=p(i["minor"!==s?"tickWidth":"minorTickWidth"],!s&&r.isXAxis?1:0);i=i["minor"!==s?"tickColor":"minorTickColor"];var u=this.mark,d=!u;a&&(r.opposite&&(a[0]=-a[0]),u||(this.mark=u=o.path().addClass("highcharts-"+(s?s+"-":"")+"tick").add(r.axisGroup),r.chart.styledMode||u.attr({stroke:i,"stroke-width":c})),u[d?"attr":"animate"]({d:this.getMarkPath(l,e,a[0],u.strokeWidth()*n,r.horiz,o),opacity:t}))},t.prototype.renderLabel=function(e,t,n,r){var i=this.axis,o=i.horiz,s=i.options,a=this.label,l=s.labels,c=l.step;i=p(this.tickmarkOffset,i.tickmarkOffset);var d=e.x;e=e.y;var h=!0;a&&u(d)&&(a.xy=e=this.getLabelPosition(d,e,a,o,l,i,r,c),this.isFirst&&!this.isLast&&!s.showFirstLabel||this.isLast&&!this.isFirst&&!s.showLastLabel?h=!1:!o||l.step||l.rotation||t||0===n||this.handleOverflow(e),c&&r%c&&(h=!1),h&&u(e.y)?(e.opacity=n,a[this.isNewLabel?"attr":"animate"](e),this.isNewLabel=!1):(a.attr("y",-9999),this.isNewLabel=!0))},t.prototype.replaceMovedLabel=function(){var e=this.label,t=this.axis,n=t.reversed;if(e&&!this.isNew){var r=t.horiz?n?t.left:t.width+t.left:e.xy.x;n=t.horiz?e.xy.y:n?t.width+t.top:t.top,e.animate({x:r,y:n,opacity:0},void 0,e.destroy),delete this.label}t.isDirty=!0,this.label=this.movedLabel,delete this.movedLabel},t}()})),t(n,"Core/Axis/Axis.js",[n["Core/Animation/AnimationUtilities.js"],n["Core/Axis/AxisDefaults.js"],n["Core/Color/Color.js"],n["Core/DefaultOptions.js"],n["Core/Foundation.js"],n["Core/Globals.js"],n["Core/Axis/Tick.js"],n["Core/Utilities.js"]],(function(e,t,n,r,i,o,s,a){var l=e.animObject,c=r.defaultOptions,u=i.registerEventOptions,d=o.deg2rad,h=a.arrayMax,p=a.arrayMin,f=a.clamp,m=a.correctFloat,g=a.defined,b=a.destroyObjectProperties,v=a.erase,y=a.error,_=a.extend,S=a.fireEvent,x=a.getMagnitude,w=a.isArray,k=a.isNumber,O=a.isString,E=a.merge,A=a.normalizeTickInterval,T=a.objectEach,C=a.pick,M=a.relativeLength,P=a.removeEvent,$=a.splat,R=a.syncTimeout;return e=function(){function e(e,t){this.zoomEnabled=this.width=this.visible=this.userOptions=this.translationSlope=this.transB=this.transA=this.top=this.ticks=this.tickRotCorr=this.tickPositions=this.tickmarkOffset=this.tickInterval=this.tickAmount=this.side=this.series=this.right=this.positiveValuesOnly=this.pos=this.pointRangePadding=this.pointRange=this.plotLinesAndBandsGroups=this.plotLinesAndBands=this.paddedTicks=this.overlap=this.options=this.offset=this.names=this.minPixelPadding=this.minorTicks=this.minorTickInterval=this.min=this.maxLabelLength=this.max=this.len=this.left=this.labelFormatter=this.labelEdge=this.isLinked=this.height=this.hasVisibleSeries=this.hasNames=this.eventOptions=this.coll=this.closestPointRange=this.chart=this.categories=this.bottom=this.alternateBands=void 0,this.init(e,t)}return e.prototype.init=function(e,t){var n=t.isX;this.chart=e,this.horiz=e.inverted&&!this.isZAxis?!n:n,this.isXAxis=n,this.coll=this.coll||(n?"xAxis":"yAxis"),S(this,"init",{userOptions:t}),this.opposite=C(t.opposite,this.opposite),this.side=C(t.side,this.side,this.horiz?this.opposite?0:2:this.opposite?1:3),this.setOptions(t);var r=this.options,i=r.labels,o=r.type;this.userOptions=t,this.minPixelPadding=0,this.reversed=C(r.reversed,this.reversed),this.visible=r.visible,this.zoomEnabled=r.zoomEnabled,this.hasNames="category"===o||!0===r.categories,this.categories=r.categories||this.hasNames,this.names||(this.names=[],this.names.keys={}),this.plotLinesAndBandsGroups={},this.positiveValuesOnly=!!this.logarithmic,this.isLinked=g(r.linkedTo),this.ticks={},this.labelEdge=[],this.minorTicks={},this.plotLinesAndBands=[],this.alternateBands={},this.len=0,this.minRange=this.userMinRange=r.minRange||r.maxZoom,this.range=r.range,this.offset=r.offset||0,this.min=this.max=null,t=C(r.crosshair,$(e.options.tooltip.crosshairs)[n?0:1]),this.crosshair=!0===t?{}:t,-1===e.axes.indexOf(this)&&(n?e.axes.splice(e.xAxis.length,0,this):e.axes.push(this),e[this.coll].push(this)),this.series=this.series||[],e.inverted&&!this.isZAxis&&n&&void 0===this.reversed&&(this.reversed=!0),this.labelRotation=k(i.rotation)?i.rotation:void 0,u(this,r),S(this,"afterInit")},e.prototype.setOptions=function(e){this.options=E(t.defaultXAxisOptions,"yAxis"===this.coll&&t.defaultYAxisOptions,[t.defaultTopAxisOptions,t.defaultRightAxisOptions,t.defaultBottomAxisOptions,t.defaultLeftAxisOptions][this.side],E(c[this.coll],e)),S(this,"afterSetOptions",{userOptions:e})},e.prototype.defaultLabelFormatter=function(e){var t=this.axis;e=this.chart.numberFormatter;var n=k(this.value)?this.value:NaN,r=t.chart.time,i=this.dateTimeLabelFormat,o=c.lang,s=o.numericSymbols;o=o.numericSymbolMagnitude||1e3;var a=t.logarithmic?Math.abs(n):t.tickInterval,l=s&&s.length;if(t.categories)var u=""+this.value;else if(i)u=r.dateFormat(i,n);else if(l&&1e3<=a)for(;l--&&void 0===u;)a>=(t=Math.pow(o,l+1))&&0==10*n%t&&null!==s[l]&&0!==n&&(u=e(n/t,-1)+s[l]);return void 0===u&&(u=1e4<=Math.abs(n)?e(n,-1):e(n,-1,void 0,"")),u},e.prototype.getSeriesExtremes=function(){var e,t=this,n=t.chart;S(this,"getSeriesExtremes",null,(function(){t.hasVisibleSeries=!1,t.dataMin=t.dataMax=t.threshold=null,t.softThreshold=!t.isXAxis,t.stacking&&t.stacking.buildStacks(),t.series.forEach((function(r){if(r.visible||!n.options.chart.ignoreHiddenSeries){var i=r.options,o=i.threshold;if(t.hasVisibleSeries=!0,t.positiveValuesOnly&&0>=o&&(o=null),t.isXAxis){if((i=r.xData).length){i=t.logarithmic?i.filter(t.validatePositiveValue):i;var s=(e=r.getXExtremes(i)).min,a=e.max;k(s)||s instanceof Date||(i=i.filter(k),s=(e=r.getXExtremes(i)).min,a=e.max),i.length&&(t.dataMin=Math.min(C(t.dataMin,s),s),t.dataMax=Math.max(C(t.dataMax,a),a))}}else r=r.applyExtremes(),k(r.dataMin)&&(s=r.dataMin,t.dataMin=Math.min(C(t.dataMin,s),s)),k(r.dataMax)&&(a=r.dataMax,t.dataMax=Math.max(C(t.dataMax,a),a)),g(o)&&(t.threshold=o),(!i.softThreshold||t.positiveValuesOnly)&&(t.softThreshold=!1)}}))})),S(this,"afterGetSeriesExtremes")},e.prototype.translate=function(e,t,n,r,i,o){var s=this.linkedParent||this,a=r&&s.old?s.old.min:s.min,l=s.minPixelPadding;i=(s.isOrdinal||s.brokenAxis&&s.brokenAxis.hasBreaks||s.logarithmic&&i)&&s.lin2val;var c=1,u=0;return(r=r&&s.old?s.old.transA:s.transA)||(r=s.transA),n&&(c*=-1,u=s.len),s.reversed&&(u-=(c*=-1)*(s.sector||s.len)),t?(e=(e*c+u-l)/r+a,i&&(e=s.lin2val(e))):(i&&(e=s.val2lin(e)),e=k(a)?c*(e-a)*r+u+c*l+(k(o)?r*o:0):void 0),e},e.prototype.toPixels=function(e,t){return this.translate(e,!1,!this.horiz,null,!0)+(t?0:this.pos)},e.prototype.toValue=function(e,t){return this.translate(e-(t?0:this.pos),!0,!this.horiz,null,!0)},e.prototype.getPlotLinePath=function(e){function t(e,t,n){return("pass"!==y&&en)&&(y?e=f(e,t,n):s=!0),e}var n,r,i,o,s,a=this,l=a.chart,c=a.left,u=a.top,d=e.old,h=e.value,p=e.lineWidth,m=d&&l.oldChartHeight||l.chartHeight,g=d&&l.oldChartWidth||l.chartWidth,b=a.transB,v=e.translatedValue,y=e.force;return e={value:h,lineWidth:p,old:d,force:y,acrossPanes:e.acrossPanes,translatedValue:v},S(this,"getPlotLinePath",e,(function(e){v=C(v,a.translate(h,null,null,d)),v=f(v,-1e5,1e5),n=i=Math.round(v+b),r=o=Math.round(m-v-b),k(v)?a.horiz?(r=u,o=m-a.bottom,n=i=t(n,c,c+a.width)):(n=c,i=g-a.right,r=o=t(r,u,u+a.height)):(s=!0,y=!1),e.path=s&&!y?null:l.renderer.crispLine([["M",n,r],["L",i,o]],p||1)})),e.path},e.prototype.getLinearTickPositions=function(e,t,n){var r=m(Math.floor(t/e)*e);n=m(Math.ceil(n/e)*e);var i,o=[];if(m(r+e)===r&&(i=20),this.single)return[t];for(t=r;t<=n&&(o.push(t),(t=m(t+e,i))!==s);)var s=t;return o},e.prototype.getMinorTickInterval=function(){var e=this.options;return!0===e.minorTicks?C(e.minorTickInterval,"auto"):!1===e.minorTicks?null:e.minorTickInterval},e.prototype.getMinorTickPositions=function(){var e=this.options,t=this.tickPositions,n=this.minorTickInterval,r=this.pointRangePadding||0,i=this.min-r,o=(r=this.max+r)-i,s=[];if(o&&o/n=this.minRange,u=this.minRange,d=(u-a+s)/2;d=[s-d,C(i.min,s-d)],c&&(d[2]=this.logarithmic?this.logarithmic.log2lin(this.dataMin):this.dataMin),a=[(s=h(d))+u,C(i.max,s+u)],c&&(a[2]=o?o.log2lin(this.dataMax):this.dataMax),(a=p(a))-s=h)b=h,u=0;else if(this.dataMax<=h){var v=h;c=0}this.min=C(p,b,this.dataMin),this.max=C(f,v,this.dataMax)}if(n&&(this.positiveValuesOnly&&!e&&0>=Math.min(this.min,C(this.dataMin,this.min))&&y(10,1,t),this.min=m(n.log2lin(this.min),16),this.max=m(n.log2lin(this.max),16)),this.range&&g(this.max)&&(this.userMin=this.min=p=Math.max(this.dataMin,this.minFromRange()),this.userMax=f=this.max,this.range=null),S(this,"foundExtremes"),this.beforePadding&&this.beforePadding(),this.adjustForMinRange(),!(a||this.axisPointRange||this.stacking&&this.stacking.usePercentage||o)&&g(this.min)&&g(this.max)&&(t=this.max-this.min)&&(!g(p)&&u&&(this.min-=t*u),!g(f)&&c&&(this.max+=t*c)),k(this.userMin)||(k(r.softMin)&&r.softMinthis.max&&(this.max=f=r.softMax),k(r.ceiling)&&(this.max=Math.min(this.max,r.ceiling))),l&&g(this.dataMin)&&(h=h||0,!g(p)&&this.min=h?this.min=this.options.minRange?Math.min(h,this.max-this.minRange):h:!g(f)&&this.max>h&&this.dataMax<=h&&(this.max=this.options.minRange?Math.max(h,this.min+this.minRange):h)),k(this.min)&&k(this.max)&&!this.chart.polar&&this.min>this.max&&(g(this.options.min)?this.max=this.min:g(this.options.max)&&(this.min=this.max)),this.tickInterval=this.min===this.max||void 0===this.min||void 0===this.max?1:o&&this.linkedParent&&!d&&s===this.linkedParent.options.tickPixelInterval?d=this.linkedParent.tickInterval:C(d,this.tickAmount?(this.max-this.min)/Math.max(this.tickAmount-1,1):void 0,a?1:(this.max-this.min)*s/Math.max(this.len,s)),i&&!e){var _=this.min!==(this.old&&this.old.min)||this.max!==(this.old&&this.old.max);this.series.forEach((function(e){e.forceCrop=e.forceCropping&&e.forceCropping(),e.processData(_)})),S(this,"postProcessData",{hasExtemesChanged:_})}this.setAxisTranslation(),S(this,"initialAxisTranslation"),this.pointRange&&!d&&(this.tickInterval=Math.max(this.pointRange,this.tickInterval)),e=C(r.minTickInterval,this.dateTime&&!this.series.some((function(e){return e.noSharedTooltip}))?this.closestPointRange:0),!d&&this.tickIntervalthis.tickInterval||void 0!==this.tickAmount),!!this.tickAmount)),this.tickAmount||(this.tickInterval=this.unsquish()),this.setTickPositions()},e.prototype.setTickPositions=function(){var e=this.options,t=e.tickPositions,n=this.getMinorTickInterval(),r=this.hasVerticalPanning(),i="colorAxis"===this.coll,o=(i||!r)&&e.startOnTick;r=(i||!r)&&e.endOnTick,i=e.tickPositioner,this.tickmarkOffset=this.categories&&"between"===e.tickmarkPlacement&&1===this.tickInterval?.5:0,this.minorTickInterval="auto"===n&&this.tickInterval?this.tickInterval/5:n,this.single=this.min===this.max&&g(this.min)&&!this.tickAmount&&(parseInt(this.min,10)===this.min||!1!==e.allowDecimals),this.tickPositions=n=t&&t.slice(),!n&&(this.ordinal&&this.ordinal.positions||!((this.max-this.min)/this.tickInterval>Math.max(2*this.len,200))?n=this.dateTime?this.getTimeTicks(this.dateTime.normalizeTimeTickInterval(this.tickInterval,e.units),this.min,this.max,e.startOfWeek,this.ordinal&&this.ordinal.positions,this.closestPointRange,!0):this.logarithmic?this.logarithmic.getLogTickPositions(this.tickInterval,this.min,this.max):this.getLinearTickPositions(this.tickInterval,this.min,this.max):(n=[this.min,this.max],y(19,!1,this.chart)),n.length>this.len&&((n=[n[0],n.pop()])[0]===n[1]&&(n.length=1)),this.tickPositions=n,i&&(i=i.apply(this,[this.min,this.max])))&&(this.tickPositions=n=i),this.paddedTicks=n.slice(0),this.trimTicks(n,o,r),this.isLinked||(this.single&&2>n.length&&!this.categories&&!this.series.some((function(e){return e.is("heatmap")&&"between"===e.options.pointPlacement}))&&(this.min-=.5,this.max+=.5),t||i||this.adjustTickAmount()),S(this,"afterSetTickPositions")},e.prototype.trimTicks=function(e,t,n){var r=e[0],i=e[e.length-1],o=!this.isOrdinal&&this.minPointOffset||0;if(S(this,"trimTicks"),!this.isLinked){if(t&&-1/0!==r)this.min=r;else for(;this.min-o>e[0];)e.shift();if(n)this.max=i;else for(;this.max+on&&(this.finalTickAmt=n,n=5),this.tickAmount=n},e.prototype.adjustTickAmount=function(){var e=this.options,t=this.tickInterval,n=this.tickPositions,r=this.tickAmount,i=this.finalTickAmt,o=n&&n.length,s=C(this.threshold,this.softThreshold?0:null);if(this.hasData()&&k(this.min)&&k(this.max)){if(or&&(this.tickInterval*=2,this.setTickPositions());if(g(i)){for(t=e=n.length;t--;)(3===i&&1==t%2||2>=i&&0a&&(t=a)),g(i)&&(oa&&(o=a))),n.displayBtn=void 0!==t||void 0!==o,n.setExtremes(t,o,!1,void 0,{trigger:"zoom"})),e.zoomed=!0})),e.zoomed},e.prototype.setAxisSize=function(){var e=this.chart,t=this.options,n=t.offsets||[0,0,0,0],r=this.horiz,i=this.width=Math.round(M(C(t.width,e.plotWidth-n[3]+n[1]),e.plotWidth)),o=this.height=Math.round(M(C(t.height,e.plotHeight-n[0]+n[2]),e.plotHeight)),s=this.top=Math.round(M(C(t.top,e.plotTop+n[0]),e.plotHeight,e.plotTop));t=this.left=Math.round(M(C(t.left,e.plotLeft+n[3]),e.plotWidth,e.plotLeft)),this.bottom=e.chartHeight-o-s,this.right=e.chartWidth-i-t,this.len=Math.max(r?i:o,0),this.pos=r?t:s},e.prototype.getExtremes=function(){var e=this.logarithmic;return{min:e?m(e.lin2log(this.min)):this.min,max:e?m(e.lin2log(this.max)):this.max,dataMin:this.dataMin,dataMax:this.dataMax,userMin:this.userMin,userMax:this.userMax}},e.prototype.getThreshold=function(e){var t=this.logarithmic,n=t?t.lin2log(this.min):this.min;return t=t?t.lin2log(this.max):this.max,null===e||-1/0===e?e=n:1/0===e?e=t:n>e?e=n:tt?e.align="right":195t&&(e.align="left")})),e.align},e.prototype.tickSize=function(e){var t=this.options,n=C(t["tick"===e?"tickWidth":"minorTickWidth"],"tick"===e&&this.isXAxis&&!this.categories?1:0),r=t["tick"===e?"tickLength":"minorTickLength"];if(n&&r){"inside"===t[e+"Position"]&&(r=-r);var i=[r,n]}return S(this,"afterTickSize",e={tickSize:i}),e.tickSize},e.prototype.labelMetrics=function(){var e=this.tickPositions&&this.tickPositions[0]||0;return this.chart.renderer.fontMetrics(this.options.labels.style.fontSize,this.ticks[e]&&this.ticks[e].label)},e.prototype.unsquish=function(){var e,t,n=this.options.labels,r=this.horiz,i=this.tickInterval,o=this.len/(((this.categories?1:0)+this.max-this.min)/i),s=n.rotation,a=this.labelMetrics(),l=Math.max(this.max-this.min,0),c=function(e){var t=e/(o||1);return(t=1l&&1/0!==e&&1/0!==o&&l&&(t=Math.ceil(l/i)),m(t*i)},u=i,h=Number.MAX_VALUE;if(r){if(!n.staggerLines&&!n.step)if(k(s))var p=[s];else o=n){var r=(t=c(Math.abs(a.h/Math.sin(d*n))))+Math.abs(n/360);rr.step)return r.rotation?0:(this.staggerLines||1)*this.len/i;if(!n){if(void 0!==(e=r.style.width))return parseInt(String(e),10);if(o)return o-t.spacing[3]}return.33*t.chartWidth},e.prototype.renderUnsquish=function(){var e=this.chart,t=e.renderer,n=this.tickPositions,r=this.ticks,i=this.options.labels,o=i.style,s=this.horiz,a=this.getSlotWidth(),l=Math.max(1,Math.round(a-2*i.padding)),c={},u=this.labelMetrics(),d=o.textOverflow,h=0;if(O(i.rotation)||(c.rotation=i.rotation||0),n.forEach((function(e){(e=r[e]).movedLabel&&e.replaceMovedLabel(),e&&e.label&&e.label.textPxLength>h&&(h=e.label.textPxLength)})),this.maxLabelLength=h,this.autoRotation)h>l&&h>u.h?c.rotation=this.labelRotation:this.labelRotation=0;else if(a){var p=l;if(!d){var f="clip";for(l=n.length;!s&&l--;){var m=n[l];(m=r[m].label)&&(m.styles&&"ellipsis"===m.styles.textOverflow?m.css({textOverflow:"clip"}):m.textPxLength>a&&m.css({width:a+"px"}),m.getBBox().height>this.len/n.length-(u.h-u.f)&&(m.specificTextOverflow="ellipsis"))}}}c.rotation&&(p=h>.5*e.chartHeight?.33*e.chartHeight:h,d||(f="ellipsis")),(this.labelAlign=i.align||this.autoLabelAlign(this.labelRotation))&&(c.align=this.labelAlign),n.forEach((function(e){var t=(e=r[e])&&e.label,n=o.width,i={};t&&(t.attr(c),e.shortenLabel?e.shortenLabel():p&&!n&&"nowrap"!==o.whiteSpace&&(p=this.min&&e<=this.max||this.grid&&this.grid.isColumn)&&(r[e]||(r[e]=new s(this,e)),n&&r[e].isNew&&r[e].render(t,!0,-1),r[e].render(t))},e.prototype.render=function(){var e,t,n=this,r=n.chart,i=n.logarithmic,a=n.options,c=n.isLinked,u=n.tickPositions,d=n.axisTitle,h=n.ticks,p=n.minorTicks,f=n.alternateBands,m=a.stackLabels,g=a.alternateGridColor,b=n.tickmarkOffset,v=n.axisLine,y=n.showAxis,_=l(r.renderer.globalAnimation);if(n.labelEdge.length=0,n.overlap=!1,[h,p,f].forEach((function(e){T(e,(function(e){e.isActive=!1}))})),n.hasData()||c){var x=n.chart.hasRendered&&n.old&&k(n.old.min);n.minorTickInterval&&!n.categories&&n.getMinorTickPositions().forEach((function(e){n.renderMinorTick(e,x)})),u.length&&(u.forEach((function(e,t){n.renderTick(e,t,x)})),b&&(0===n.min||n.single)&&(h[-1]||(h[-1]=new s(n,-1,null,!0)),h[-1].render(-1))),g&&u.forEach((function(s,a){t=void 0!==u[a+1]?u[a+1]+b:n.max-b,0==a%2&&st&&(!s||c<=n)&&void 0!==c&&u.push(c),c>n&&(p=!0),c=m}}}else t=this.lin2log(t),n=this.lin2log(n),e=s?a.getMinorTickInterval():c.tickInterval,e=o("auto"===e?null:e,this.minorAutoInterval,c.tickPixelInterval/(s?5:1)*(n-t)/((s?l/a.tickPositions.length:l)||1)),e=i(e,void 0,r(e)),u=a.getLinearTickPositions(e,t,n).map(this.log2lin),s||(this.minorAutoInterval=e/5);return s||(a.tickInterval=e),u},e.prototype.lin2log=function(e){return Math.pow(10,e)},e.prototype.log2lin=function(e){return Math.log(e)/Math.LN10},e}();e.Additions=l}(t||(t={})),t})),t(n,"Core/Axis/PlotLineOrBand/PlotLineOrBandAxis.js",[n["Core/Utilities.js"]],(function(e){var t,n=e.erase,r=e.extend,i=e.isNumber;return function(e){var t,o=[];e.compose=function(e,n){return t||(t=e),-1===o.indexOf(n)&&(o.push(n),r(n.prototype,s.prototype)),n};var s=function(){function e(){}return e.prototype.getPlotBandPath=function(e,t,n){void 0===n&&(n=this.options);var r=this.getPlotLinePath({value:t,force:!0,acrossPanes:n.acrossPanes}),o=[],s=this.horiz;if(t=!i(this.min)||!i(this.max)||ethis.max&&t>this.max,e=this.getPlotLinePath({value:e,force:!0,acrossPanes:n.acrossPanes}),n=1,e&&r){if(t){var a=e.toString()===r.toString();n=0}for(t=0;tb-l?b:b-l);else{if(!m)return!1;a[e]=Math.max(s,i+l+n>t?i:i+l)}},v=function(e,t,n,r,i){var s;return it-o?s=!1:a[e]=it-r/2?t-r-2:i-n/2,s},_=function(e){var t=f;f=m,m=t,r=e},S=function(){!1!==b.apply(0,f)?!1!==v.apply(0,m)||r||(_(!0),S()):r?a.x=a.y=0:(_(!0),S())};return(i.inverted||1t}))&&(e=e.map((function(e){var t=n(e.anchorX,e.anchorY,e.point.isHeader,e.boxWidth,!1);return p(e,{target:t.y,x:t.x})}))),r.cleanSplit(),a(e,R);var I=M,D=M;e.forEach((function(e){var t=e.x,n=e.boxWidth;(e=e.isHeader)||(r.outside&&M+tD&&(D=M+t))})),e.forEach((function(e){var t=e.x,n=e.anchorX,i=e.pos,o=e.point.isHeader;if(i={visibility:void 0===i?"hidden":"inherit",x:t,y:i+P,anchorX:n,anchorY:e.anchorY},r.outside&&tn[0]?Math.max(Math.abs(n[0]),i.width-n[0]):Math.max(Math.abs(n[0]),i.width),r.height=0>n[1]?Math.max(Math.abs(n[1]),i.height-Math.abs(n[1])):Math.max(Math.abs(n[1]),i.height),this.tracker?this.tracker.attr(r):(this.tracker=t.renderer.rect(r).addClass("highcharts-tracker").add(t),e.styledMode||this.tracker.attr({fill:"rgba(0,0,0,0)"}))}}},e.prototype.styledModeFormat=function(e){return e.replace('style="font-size: 10px"','class="highcharts-header"').replace(/style="color:{(point|series)\.color}"/g,'class="highcharts-color-{$1.colorIndex}"')},e.prototype.tooltipFooterHeaderFormatter=function(e,t){var n=e.series,r=n.tooltipOptions,i=n.xAxis,s=i&&i.dateTime;i={isFooter:t,labelConfig:e};var a=r.xDateFormat,l=r[t?"footerFormat":"headerFormat"];return f(this,"headerFormatter",i,(function(t){s&&!a&&g(e.key)&&(a=s.getXDateFormat(e.key,r.dateTimeLabelFormats)),s&&a&&(e.point&&e.point.tooltipDateKeys||["key"]).forEach((function(e){l=l.replace("{point."+e+"}","{point."+e+":"+a+"}")})),n.chart.styledMode&&(l=this.styledModeFormat(l)),t.text=o(l,{point:e,series:n},this.chart)})),i.text},e.prototype.update=function(e){this.destroy(),v(!0,this.chart.options.tooltip.userOptions,e),this.init(this.chart,v(!0,this.options,e))},e.prototype.updatePosition=function(e){var t=this.chart,n=this.options,r=t.pointer,i=this.getLabel();r=r.getChartPosition();var o=(n.positioner||this.getPosition).call(this,i.width,i.height,e),s=e.plotX+t.plotLeft;e=e.plotY+t.plotTop,this.outside&&(n=n.borderWidth+2*this.distance,this.renderer.setSize(i.width+n,i.height+n,!1),1===r.scaleX&&1===r.scaleY||(u(this.container,{transform:"scale("+r.scaleX+", "+r.scaleY+")"}),s*=r.scaleX,e*=r.scaleY),s+=r.left-o.x,e+=r.top-o.y),this.move(Math.round(o.x),Math.round(o.y||0),s,e)},e}()})),t(n,"Core/Series/Point.js",[n["Core/Renderer/HTML/AST.js"],n["Core/Animation/AnimationUtilities.js"],n["Core/DefaultOptions.js"],n["Core/FormatUtilities.js"],n["Core/Utilities.js"]],(function(e,t,n,r,i){var o=t.animObject,s=n.defaultOptions,a=r.format,l=i.addEvent,c=i.defined,u=i.erase,d=i.extend,h=i.fireEvent,p=i.getNestedProperty,f=i.isArray,m=i.isFunction,g=i.isNumber,b=i.isObject,v=i.merge,y=i.objectEach,_=i.pick,S=i.syncTimeout,x=i.removeEvent,w=i.uniqueKey;return t=function(){function t(){this.colorIndex=this.category=void 0,this.formatPrefix="point",this.id=void 0,this.isNull=!1,this.percentage=this.options=this.name=void 0,this.selected=!1,this.total=this.series=void 0,this.visible=!0,this.x=void 0}return t.prototype.animateBeforeDestroy=function(){var e=this,t={x:e.startXPos,opacity:0},n=e.getGraphicalProps();n.singular.forEach((function(n){e[n]=e[n].animate("dataLabel"===n?{x:e[n].startXPos,y:e[n].startYPos,opacity:0}:t)})),n.plural.forEach((function(t){e[t].forEach((function(t){t.element&&t.animate(d({x:e.startXPos},t.startYPos?{x:t.startXPos,y:t.startYPos}:{}))}))}))},t.prototype.applyOptions=function(e,n){var r=this.series,i=r.options.pointValKey||r.pointValKey;return e=t.prototype.optionsToObject.call(this,e),d(this,e),this.options=this.options?d(this.options,e):e,e.group&&delete this.group,e.dataLabels&&delete this.dataLabels,i&&(this.y=t.prototype.getNestedProperty.call(this,i)),this.formatPrefix=(this.isNull=_(this.isValid&&!this.isValid(),null===this.x||!g(this.y)))?"null":"point",this.selected&&(this.state="select"),"name"in this&&void 0===n&&r.xAxis&&r.xAxis.hasNames&&(this.x=r.xAxis.nameToX(this)),void 0===this.x&&r?this.x=void 0===n?r.autoIncrement():n:g(e.x)&&r.options.relativeXValue&&(this.x=r.autoIncrement(e.x)),this},t.prototype.destroy=function(){function e(){for(i in(t.graphic||t.dataLabel||t.dataLabels)&&(x(t),t.destroyElements()),t)t[i]=null}var t=this,n=t.series,r=n.chart;n=n.options.dataSorting;var i,s=r.hoverPoints,a=o(t.series.chart.renderer.globalAnimation);t.legendItem&&r.legend.destroyItem(t),s&&(t.setState(),u(s,t),s.length||(r.hoverPoints=null)),t===r.hoverPoint&&t.onMouseOut(),n&&n.enabled?(this.animateBeforeDestroy(),S(e,a.duration)):e(),r.pointCount--},t.prototype.destroyElements=function(e){var t=this;(e=t.getGraphicalProps(e)).singular.forEach((function(e){t[e]=t[e].destroy()})),e.plural.forEach((function(e){t[e].forEach((function(e){e.element&&e.destroy()})),delete t[e]}))},t.prototype.firePointEvent=function(e,t,n){var r=this,i=this.series.options;(i.point.events[e]||r.options&&r.options.events&&r.options.events[e])&&r.importEvents(),"click"===e&&i.allowPointSelect&&(n=function(e){r.select&&r.select(null,e.ctrlKey||e.metaKey||e.shiftKey)}),h(r,e,t,n)},t.prototype.getClassName=function(){return"highcharts-point"+(this.selected?" highcharts-point-select":"")+(this.negative?" highcharts-negative":"")+(this.isNull?" highcharts-null-point":"")+(void 0!==this.colorIndex?" highcharts-color-"+this.colorIndex:"")+(this.options.className?" "+this.options.className:"")+(this.zone&&this.zone.className?" "+this.zone.className.replace("highcharts-negative",""):"")},t.prototype.getGraphicalProps=function(e){var t,n=this,r=[],i={singular:[],plural:[]};for((e=e||{graphic:1,dataLabel:1}).graphic&&r.push("graphic","upperGraphic","shadowGroup"),e.dataLabel&&r.push("dataLabel","dataLabelUpper","connector"),t=r.length;t--;){var o=r[t];n[o]&&i.singular.push(o)}return["dataLabel","connector"].forEach((function(t){var r=t+"s";e[t]&&n[r]&&i.plural.push(r)})),i},t.prototype.getLabelConfig=function(){return{x:this.category,y:this.y,color:this.color,colorIndex:this.colorIndex,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},t.prototype.getNestedProperty=function(e){if(e)return 0===e.indexOf("custom.")?p(e,this.options):this[e]},t.prototype.getZone=function(){var e=this.series,t=e.zones;e=e.zoneAxis||"y";var n,r=0;for(n=t[r];this[e]>=n.value;)n=t[++r];return this.nonZonedColor||(this.nonZonedColor=this.color),this.color=n&&n.color&&!this.options.color?n.color:this.nonZonedColor,n},t.prototype.hasNewShapeType=function(){return(this.graphic&&(this.graphic.symbolName||this.graphic.element.nodeName))!==this.shapeType},t.prototype.init=function(e,t,n){return this.series=e,this.applyOptions(t,n),this.id=c(this.id)?this.id:w(),this.resolveColor(),e.chart.pointCount++,h(this,"afterInit"),this},t.prototype.optionsToObject=function(e){var n=this.series,r=n.options.keys,i=r||n.pointArrayMap||["y"],o=i.length,s={},a=0,l=0;if(g(e)||null===e)s[i[0]]=e;else if(f(e))for(!r&&e.length>o&&("string"===(n=typeof e[0])?s.name=e[0]:"number"===n&&(s.x=e[0]),a++);ls+l&&(f=s+l),ga+c&&(g=a+c),this.hasDragged=Math.sqrt(Math.pow(u-f,2)+Math.pow(d-g,2)),10e.options.findNearestPointBy.indexOf("y");if(e=e.searchPoint(n,i),(i=m(e,!0)&&e.series)&&!(i=!m(r,!0))){i=r.distX-e.distX;var o=r.dist-e.dist,s=(e.series.group&&e.series.group.zIndex)-(r.series.group&&r.series.group.zIndex);i=0<(0!==i&&t?i:0!==o?o:0!==s?s:r.series.index>e.series.index?-1:1)}i&&(r=e)})),r)},e.prototype.getChartCoordinatesFromPoint=function(e,t){var n=e.series,r=n.xAxis;n=n.yAxis;var i=e.shapeArgs;if(r&&n){var o=v(e.clientX,e.plotX),s=e.plotY||0;return e.isNode&&i&&f(i.x)&&f(i.y)&&(o=i.x,s=i.y),t?{chartX:n.len+n.pos-s,chartY:r.len+r.pos-o}:{chartX:o+r.pos,chartY:s+n.pos}}if(i&&i.x&&i.y)return{chartX:i.x,chartY:i.y}},e.prototype.getChartPosition=function(){if(this.chartPosition)return this.chartPosition;var e=this.chart.container,t=b(e);this.chartPosition={left:t.left,top:t.top,scaleX:1,scaleY:1};var n=e.offsetWidth;return e=e.offsetHeight,2m.max&&(n=m.max-y,k=!0);k?(x-=.8*(x-s[c][0]),"number"==typeof w&&(w-=.8*(w-s[c][1])),t()):s[c]=[x,w],f||(o[c]=_-p,o[h]=y),o=f?1/S:S,i[h]=y,i[c]=n,r[f?e?"scaleY":"scaleX":"scale"+u]=S,r["translate"+u]=o*p+(x-o*b)},e.prototype.reset=function(e,t){var n=this.chart,r=n.hoverSeries,i=n.hoverPoint,o=n.hoverPoints,s=n.tooltip,a=s&&s.shared?o:i;e&&a&&y(a).forEach((function(t){t.series.isCartesian&&void 0===t.plotX&&(e=!1)})),e?s&&a&&y(a).length&&(s.refresh(a),s.shared&&o?o.forEach((function(e){e.setState(e.state,!0),e.series.isCartesian&&(e.series.xAxis.crosshair&&e.series.xAxis.drawCrosshair(null,e),e.series.yAxis.crosshair&&e.series.yAxis.drawCrosshair(null,e))})):i&&(i.setState(i.state,!0),n.axes.forEach((function(e){e.crosshair&&i.series[e.coll]===e&&e.drawCrosshair(null,i)})))):(i&&i.onMouseOut(),o&&o.forEach((function(e){e.setState()})),r&&r.onMouseOut(),s&&s.hide(t),this.unDocMouseMove&&(this.unDocMouseMove=this.unDocMouseMove()),n.axes.forEach((function(e){e.hideCrosshair()})),this.hoverX=n.hoverPoints=n.hoverPoint=null)},e.prototype.runPointActions=function(t,n){var r=this.chart,i=r.tooltip&&r.tooltip.options.enabled?r.tooltip:void 0,s=!!i&&i.shared,l=n||r.hoverPoint,c=l&&l.series||r.hoverSeries;l=(n=this.getHoverData(l,c,r.series,(!t||"touchmove"!==t.type)&&(!!n||c&&c.directTouch&&this.isDirectTouch),s,t)).hoverPoint,c=n.hoverSeries;var u=n.hoverPoints;if(n=c&&c.tooltipOptions.followPointer&&!c.tooltipOptions.split,s=s&&c&&!c.noSharedTooltip,l&&(l!==r.hoverPoint||i&&i.isHidden)){if((r.hoverPoints||[]).forEach((function(e){-1===u.indexOf(e)&&e.setState()})),r.hoverSeries!==c&&c.onMouseOver(),this.applyInactiveState(u),(u||[]).forEach((function(e){e.setState("hover")})),r.hoverPoint&&r.hoverPoint.firePointEvent("mouseOut"),!l.series)return;r.hoverPoints=u,r.hoverPoint=l,l.firePointEvent("mouseOver"),i&&i.refresh(s?u:l,t)}else n&&i&&!i.isHidden&&(l=i.getAnchor([{}],t),r.isInsidePlot(l[0],l[1],{visiblePlotOnly:!0})&&i.updatePosition({plotX:l[0],plotY:l[1]}));this.unDocMouseMove||(this.unDocMouseMove=a(r.container.ownerDocument,"mousemove",(function(t){var n=o[e.hoverChartIndex];n&&n.pointer.onDocumentMouseMove(t)})),this.eventsToUnbind.push(this.unDocMouseMove)),r.axes.forEach((function(e){var n,i=v((e.crosshair||{}).snap,!0);i&&((n=r.hoverPoint)&&n.series[e.coll]===e||(n=h(u,(function(t){return t.series[e.coll]===e})))),n||!i?e.drawCrosshair(t,n):e.hideCrosshair()}))},e.prototype.scaleGroups=function(e,t){var n=this.chart;n.series.forEach((function(r){var i=e||r.getPlotBox();r.group&&(r.xAxis&&r.xAxis.zoomEnabled||n.mapView)&&(r.group.attr(i),r.markerGroup&&(r.markerGroup.attr(i),r.markerGroup.clip(t?n.clipRect:null)),r.dataLabelsGroup&&r.dataLabelsGroup.attr(i))})),n.clipRect.attr(t||n.clipBox)},e.prototype.setDOMEvents=function(){var n=this,r=this.chart.container,i=r.ownerDocument;r.onmousedown=this.onContainerMouseDown.bind(this),r.onmousemove=this.onContainerMouseMove.bind(this),r.onclick=this.onContainerClick.bind(this),this.eventsToUnbind.push(a(r,"mouseenter",this.onContainerMouseEnter.bind(this))),this.eventsToUnbind.push(a(r,"mouseleave",this.onContainerMouseLeave.bind(this))),e.unbindDocumentMouseUp||(e.unbindDocumentMouseUp=a(i,"mouseup",this.onDocumentMouseUp.bind(this)));for(var o=this.chart.renderTo.parentElement;o&&"BODY"!==o.tagName;)this.eventsToUnbind.push(a(o,"scroll",(function(){delete n.chartPosition}))),o=o.parentElement;t.hasTouch&&(this.eventsToUnbind.push(a(r,"touchstart",this.onContainerTouchStart.bind(this),{passive:!1})),this.eventsToUnbind.push(a(r,"touchmove",this.onContainerTouchMove.bind(this),{passive:!1})),e.unbindDocumentTouchEnd||(e.unbindDocumentTouchEnd=a(i,"touchend",this.onDocumentTouchEnd.bind(this),{passive:!1})))},e.prototype.setHoverChartIndex=function(){var n=this.chart,r=t.charts[v(e.hoverChartIndex,-1)];r&&r!==n&&r.pointer.onContainerMouseLeave({relatedTarget:!0}),r&&r.mouseIsDown||(e.hoverChartIndex=n.index)},e.prototype.touch=function(e,t){var n=this.chart;if(this.setHoverChartIndex(),1===e.touches.length)if(e=this.normalize(e),n.isInsidePlot(e.chartX-n.plotLeft,e.chartY-n.plotTop,{visiblePlotOnly:!0})&&!n.openMenu){if(t&&this.runPointActions(e),"touchmove"===e.type)var r=!!(t=this.pinchDown)[0]&&4<=Math.sqrt(Math.pow(t[0].chartX-e.chartX,2)+Math.pow(t[0].chartY-e.chartY,2));v(r,!0)&&this.pinch(e)}else t&&this.reset();else 2===e.touches.length&&this.pinch(e)},e.prototype.touchSelect=function(e){return!(!this.chart.options.chart.zoomBySingleTouch||!e.touches||1!==e.touches.length)},e.prototype.zoomOption=function(e){var t=this.chart,n=t.options.chart;t=t.inverted;var r=n.zoomType||"";/touch/.test(e.type)&&(r=v(n.pinchType,r)),this.zoomX=e=/x/.test(r),this.zoomY=n=/y/.test(r),this.zoomHor=e&&!t||n&&t,this.zoomVert=n&&!t||e&&t,this.hasZoom=e||n},e}()})),t(n,"Core/MSPointer.js",[n["Core/Globals.js"],n["Core/Pointer.js"],n["Core/Utilities.js"]],(function(e,t,n){function r(){var e=[];return e.item=function(e){return this[e]},h(f,(function(t){e.push({pageX:t.pageX,pageY:t.pageY,target:t.target})})),e}function i(e,n,i,o){var a=s[t.hoverChartIndex||NaN];"touch"!==e.pointerType&&e.pointerType!==e.MSPOINTER_TYPE_TOUCH||!a||(a=a.pointer,o(e),a[n]({type:i,target:e.currentTarget,preventDefault:l,touches:r()}))}var o=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),s=e.charts,a=e.doc,l=e.noop,c=e.win,u=n.addEvent,d=n.css,h=n.objectEach,p=n.removeEvent,f={},m=!!c.PointerEvent;return function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return o(n,t),n.isRequired=function(){return!(e.hasTouch||!c.PointerEvent&&!c.MSPointerEvent)},n.prototype.batchMSEvents=function(e){e(this.chart.container,m?"pointerdown":"MSPointerDown",this.onContainerPointerDown),e(this.chart.container,m?"pointermove":"MSPointerMove",this.onContainerPointerMove),e(a,m?"pointerup":"MSPointerUp",this.onDocumentPointerUp)},n.prototype.destroy=function(){this.batchMSEvents(p),t.prototype.destroy.call(this)},n.prototype.init=function(e,n){t.prototype.init.call(this,e,n),this.hasZoom&&d(e.container,{"-ms-touch-action":"none","touch-action":"none"})},n.prototype.onContainerPointerDown=function(e){i(e,"onContainerTouchStart","touchstart",(function(e){f[e.pointerId]={pageX:e.pageX,pageY:e.pageY,target:e.currentTarget}}))},n.prototype.onContainerPointerMove=function(e){i(e,"onContainerTouchMove","touchmove",(function(e){f[e.pointerId]={pageX:e.pageX,pageY:e.pageY},f[e.pointerId].target||(f[e.pointerId].target=e.currentTarget)}))},n.prototype.onDocumentPointerUp=function(e){i(e,"onDocumentTouchEnd","touchend",(function(e){delete f[e.pointerId]}))},n.prototype.setDOMEvents=function(){t.prototype.setDOMEvents.call(this),(this.hasZoom||this.followTouchMove)&&this.batchMSEvents(u)},n}(t)})),t(n,"Core/Legend/Legend.js",[n["Core/Animation/AnimationUtilities.js"],n["Core/FormatUtilities.js"],n["Core/Globals.js"],n["Core/Series/Point.js"],n["Core/Renderer/RendererUtilities.js"],n["Core/Utilities.js"]],(function(e,t,n,r,i,o){var s=e.animObject,a=e.setAnimation,l=t.format;e=n.isFirefox;var c=n.marginNames;n=n.win;var u=i.distribute,d=o.addEvent,h=o.createElement,p=o.css,f=o.defined,m=o.discardElement,g=o.find,b=o.fireEvent,v=o.isNumber,y=o.merge,_=o.pick,S=o.relativeLength,x=o.stableSort,w=o.syncTimeout;return i=o.wrap,o=function(){function e(e,t){this.allItems=[],this.contentGroup=this.box=void 0,this.display=!1,this.group=void 0,this.offsetWidth=this.maxLegendWidth=this.maxItemWidth=this.legendWidth=this.legendHeight=this.lastLineHeight=this.lastItemY=this.itemY=this.itemX=this.itemMarginTop=this.itemMarginBottom=this.itemHeight=this.initialItemY=0,this.options={},this.padding=0,this.pages=[],this.proximate=!1,this.scrollGroup=void 0,this.widthOption=this.totalItemWidth=this.titleHeight=this.symbolWidth=this.symbolHeight=0,this.chart=e,this.init(e,t)}return e.prototype.init=function(e,t){this.chart=e,this.setOptions(t),t.enabled&&(this.render(),d(this.chart,"endResize",(function(){this.legend.positionCheckboxes()})),this.proximate?this.unchartrender=d(this.chart,"render",(function(){this.legend.proximatePositions(),this.legend.positionItems()})):this.unchartrender&&this.unchartrender())},e.prototype.setOptions=function(e){var t=_(e.padding,8);this.options=e,this.chart.styledMode||(this.itemStyle=e.itemStyle,this.itemHiddenStyle=y(this.itemStyle,e.itemHiddenStyle)),this.itemMarginTop=e.itemMarginTop||0,this.itemMarginBottom=e.itemMarginBottom||0,this.padding=t,this.initialItemY=t-5,this.symbolWidth=_(e.symbolWidth,16),this.pages=[],this.proximate="proximate"===e.layout&&!this.chart.inverted,this.baseline=void 0},e.prototype.update=function(e,t){var n=this.chart;this.setOptions(y(!0,this.options,e)),this.destroy(),n.isDirtyLegend=n.isDirtyBox=!0,_(t,!0)&&n.redraw(),b(this,"afterUpdate")},e.prototype.colorizeItem=function(e,t){if(e.legendGroup[t?"removeClass":"addClass"]("highcharts-legend-item-hidden"),!this.chart.styledMode){var n=this.options,r=e.legendItem,i=e.legendLine,o=e.legendSymbol,s=this.itemHiddenStyle.color;n=t?n.itemStyle.color:s;var a=t&&e.color||s,l=e.options&&e.options.marker,c={fill:a};r&&r.css({fill:n,color:n}),i&&i.attr({stroke:a}),o&&(l&&o.isMarker&&(c=e.pointAttribs(),t||(c.stroke=c.fill=s)),o.attr(c))}b(this,"afterColorizeItem",{item:e,visible:t})},e.prototype.positionItems=function(){this.allItems.forEach(this.positionItem,this),this.chart.isResizing||this.positionCheckboxes()},e.prototype.positionItem=function(e){var t=this,n=this.options,r=n.symbolPadding,i=!n.rtl,o=e._legendItemPos;n=o[0],o=o[1];var s=e.checkbox,a=e.legendGroup;a&&a.element&&(r={translateX:i?n:this.legendWidth-n-2*r-4,translateY:o},i=function(){b(t,"afterPositionItem",{item:e})},f(a.translateY)?a.animate(r,void 0,i):(a.attr(r),i())),s&&(s.x=n,s.y=o)},e.prototype.destroyItem=function(e){var t=e.checkbox;["legendItem","legendLine","legendSymbol","legendGroup"].forEach((function(t){e[t]&&(e[t]=e[t].destroy())})),t&&m(e.checkbox)},e.prototype.destroy=function(){function e(e){this[e]&&(this[e]=this[e].destroy())}this.getAllItems().forEach((function(t){["legendItem","legendGroup"].forEach(e,t)})),"clipRect up down pager nav box title group".split(" ").forEach(e,this),this.display=null},e.prototype.positionCheckboxes=function(){var e=this.group&&this.group.alignAttr,t=this.clipHeight||this.legendHeight,n=this.titleHeight;if(e){var r=e.translateY;this.allItems.forEach((function(i){var o=i.checkbox;if(o){var s=r+n+o.y+(this.scrollOffset||0)+3;p(o,{left:e.translateX+i.checkboxOffset+o.x-20+"px",top:s+"px",display:this.proximate||s>r-6&&s1.5*n?t.height:n))},e.prototype.layoutItem=function(e){var t=this.options,n=this.padding,r="horizontal"===t.layout,i=e.itemHeight,o=this.itemMarginBottom,s=this.itemMarginTop,a=r?_(t.itemDistance,20):0,l=this.maxLegendWidth;t=t.alignColumns&&this.totalItemWidth>l?this.maxItemWidth:e.itemWidth,r&&this.itemX-n+t>l&&(this.itemX=n,this.lastLineHeight&&(this.itemY+=s+this.lastLineHeight+o),this.lastLineHeight=0),this.lastItemY=s+this.itemY+o,this.lastLineHeight=Math.max(i,this.lastLineHeight),e._legendItemPos=[this.itemX,this.itemY],r?this.itemX+=t:(this.itemY+=s+i+o,this.lastLineHeight=i),this.offsetWidth=this.widthOption||Math.max((r?this.itemX-n-(e.checkbox?0:a):t)+n,this.offsetWidth)},e.prototype.getAllItems=function(){var e=[];return this.chart.series.forEach((function(t){var n=t&&t.options;t&&_(n.showInLegend,!f(n.linkedTo)&&void 0,!0)&&(e=e.concat(t.legendItems||("point"===n.legendType?t.data:t)))})),b(this,"afterGetAllItems",{allItems:e}),e},e.prototype.getAlignment=function(){var e=this.options;return this.proximate?e.align.charAt(0)+"tv":e.floating?"":e.align.charAt(0)+e.verticalAlign.charAt(0)+e.layout.charAt(0)},e.prototype.adjustMargins=function(e,t){var n=this.chart,r=this.options,i=this.getAlignment();i&&[/(lth|ct|rth)/,/(rtv|rm|rbv)/,/(rbh|cb|lbh)/,/(lbv|lm|ltv)/].forEach((function(o,s){o.test(i)&&!f(e[s])&&(n[c[s]]=Math.max(n[c[s]],n.legend[(s+1)%2?"legendHeight":"legendWidth"]+[1,-1,-1,1][s]*r[s%2?"x":"y"]+_(r.margin,12)+t[s]+(n.titleOffset[s]||0)))}))},e.prototype.proximatePositions=function(){var e=this.chart,t=[],n="left"===this.options.align;this.allItems.forEach((function(r){var i,o=n;if(r.yAxis){r.xAxis.options.reversed&&(o=!o),r.points&&(i=g(o?r.points:r.points.slice(0).reverse(),(function(e){return v(e.plotY)}))),o=this.itemMarginTop+r.legendItem.getBBox().height+this.itemMarginBottom;var s=r.yAxis.top-e.plotTop;r.visible?(i=i?i.plotY:r.yAxis.height,i+=s-.3*o):i=s+r.yAxis.height,t.push({target:i,size:o,item:r})}}),this),u(t,e.plotHeight).forEach((function(t){t.item._legendItemPos&&(t.item._legendItemPos[1]=e.plotTop-e.spacing[0]+t.pos)}))},e.prototype.render=function(){var e=this.chart,t=e.renderer,n=this.options,r=this.padding,i=this.getAllItems(),o=this.group,s=this.box;this.itemX=r,this.itemY=this.initialItemY,this.lastItemY=this.offsetWidth=0,this.widthOption=S(n.width,e.spacingBox.width-r);var a=e.spacingBox.width-2*r-n.x;-1<["rm","lm"].indexOf(this.getAlignment().substring(0,2))&&(a/=2),this.maxLegendWidth=this.widthOption||a,o||(this.group=o=t.g("legend").addClass(n.className||"").attr({zIndex:7}).add(),this.contentGroup=t.g().attr({zIndex:1}).add(o),this.scrollGroup=t.g().add(this.contentGroup)),this.renderTitle(),x(i,(function(e,t){return(e.options&&e.options.legendIndex||0)-(t.options&&t.options.legendIndex||0)})),n.reversed&&i.reverse(),this.allItems=i,this.display=a=!!i.length,this.itemHeight=this.totalItemWidth=this.maxItemWidth=this.lastLineHeight=0,i.forEach(this.renderItem,this),i.forEach(this.layoutItem,this),i=(this.widthOption||this.offsetWidth)+r;var l=this.lastItemY+this.lastLineHeight+this.titleHeight;l=this.handleOverflow(l),l+=r,s||(this.box=s=t.rect().addClass("highcharts-legend-box").attr({r:n.borderRadius}).add(o),s.isNew=!0),e.styledMode||s.attr({stroke:n.borderColor,"stroke-width":n.borderWidth||0,fill:n.backgroundColor||"none"}).shadow(n.shadow),0a&&!1!==d.enabled?(this.clipHeight=t=Math.max(a-20-this.titleHeight-c,0),this.currentPage=_(this.currentPage,1),this.fullHeight=e,m.forEach((function(e,r){var i=e._legendItemPos[1],o=Math.round(e.legendItem.getBBox().height),s=f.length;(!s||i-f[s-1]>t&&(n||i)!==f[s-1])&&(f.push(n||i),s++),e.pageIx=s-1,n&&(m[r-1].pageIx=s-1),r===m.length-1&&i+o-f[s-1]>t&&o<=t&&(f.push(i),e.pageIx=s),i!==n&&(n=i)})),y||(y=r.clipRect=o.clipRect(0,c,9999,0),r.contentGroup.clip(y)),g(t),v||(this.nav=v=o.g().attr({zIndex:1}).add(this.group),this.up=o.symbol("triangle",0,0,p,p).add(v),b("upTracker").on("click",(function(){r.scroll(-1,h)})),this.pager=o.text("",15,10).addClass("highcharts-legend-navigation"),i.styledMode||this.pager.css(d.style),this.pager.add(v),this.down=o.symbol("triangle-down",0,0,p,p).add(v),b("downTracker").on("click",(function(){r.scroll(1,h)}))),r.scroll(0),e=a):v&&(g(),this.nav=v.destroy(),this.scrollGroup.attr({translateY:1}),this.clipHeight=0),e},e.prototype.scroll=function(e,t){var n=this,r=this.chart,i=this.pages,o=i.length,l=this.clipHeight,c=this.options.navigation,u=this.pager,d=this.padding,h=this.currentPage+e;h>o&&(h=o),0=Math.max(l+o,d.pos)&&a<=Math.min(l+o+i.width,d.pos+d.len)||(e.isInsidePlot=!1)}return!n.ignoreY&&e.isInsidePlot&&(r=u&&(r?u.xAxis:u.yAxis)||{pos:s,len:1/0},(n=n.paneCoordinates?r.pos+t:s+t)>=Math.max(c+s,r.pos)&&n<=Math.min(c+s+i.height,r.pos+r.len)||(e.isInsidePlot=!1)),B(this,"afterIsInsidePlot",e),e.isInsidePlot},e.prototype.redraw=function(e){B(this,"beforeRedraw");var t=this.hasCartesianSeries?this.axes:this.colorAxis||[],n=this.series,r=this.pointer,i=this.legend,o=this.userOptions.legend,s=this.renderer,a=s.isHidden(),l=[],c=this.isDirtyBox,u=this.isDirtyLegend;for(this.setResponsive&&this.setResponsive(!1),b(!!this.hasRendered&&e,this),a&&this.temporaryDisplay(),this.layOutTitles(),e=n.length;e--;){var d=n[e];if(d.options.stacking||d.options.centerInCategory){var h=!0;if(d.isDirty){var p=!0;break}}}if(p)for(e=n.length;e--;)(d=n[e]).options.stacking&&(d.isDirty=!0);n.forEach((function(e){e.isDirty&&("point"===e.options.legendType?("function"==typeof e.updateTotals&&e.updateTotals(),u=!0):o&&(o.labelFormatter||o.labelFormat)&&(u=!0)),e.isDirtyData&&B(e,"updatedData")})),u&&i&&i.options.enabled&&(i.render(),this.isDirtyLegend=!1),h&&this.getStacks(),t.forEach((function(e){e.updateNames(),e.setScale()})),this.getMargins(),t.forEach((function(e){e.isDirty&&(c=!0)})),t.forEach((function(e){var t=e.min+","+e.max;e.extKey!==t&&(e.extKey=t,l.push((function(){B(e,"afterSetExtremes",j(e.eventArgs,e.getExtremes())),delete e.eventArgs}))),(c||h)&&e.redraw()})),c&&this.drawChartBox(),B(this,"predraw"),n.forEach((function(e){(c||e.isDirty)&&e.visible&&e.redraw(),e.isDirtyData=!1})),r&&r.reset(!0),s.draw(),B(this,"redraw"),B(this,"render"),a&&this.temporaryDisplay(!0),l.forEach((function(e){e.call()}))},e.prototype.get=function(e){function t(t){return t.id===e||t.options&&t.options.id===e}for(var n=this.series,r=L(this.axes,t)||L(this.series,t),i=0;!r&&i=a&&i<=l||c||!R(i))&&(u=!0),r[c?"zoomX":"zoomY"]&&u&&(t=s.zoom(e.min,e.max),s.displayBtn&&(o=!0))}));var s=n.resetZoomButton;o&&!s?n.showResetZoom():!o&&Q(s)&&(n.resetZoomButton=s.destroy()),t&&n.redraw(V(n.options.chart.animation,e&&e.animation,100>n.pointCount))},e.prototype.pan=function(e,t){var n=this,r=n.hoverPoints;t="object"==typeof t?t:{enabled:t,type:"x"};var i=n.options.chart,o=n.options.mapNavigation&&n.options.mapNavigation.enabled;i&&i.panning&&(i.panning=t);var s,a=t.type;B(this,"pan",{originalEvent:e},(function(){r&&r.forEach((function(e){e.setState()}));var t=n.xAxis;"xy"===a?t=t.concat(n.yAxis):"y"===a&&(t=n.yAxis);var i={};t.forEach((function(t){if(t.options.panningEnabled&&!t.options.isInternal){var r=t.horiz,l=e[r?"chartX":"chartY"],c=n[r=r?"mouseDownX":"mouseDownY"],u=t.minPointOffset||0,d=t.reversed&&!n.inverted||!t.reversed&&n.inverted?-1:1,h=t.getExtremes(),p=t.toValue(c-l,!0)+u*d,f=t.toValue(c+t.len-l,!0)-(u*d||t.isXAxis&&t.pointRangePadding||0),m=f=d&&p<=f&&(t.setExtremes(c,p,!1,!1,{trigger:"pan"}),n.resetZoomButton||o||c===d||p===f||!a.match("y")||(n.showResetZoom(),t.displayBtn=!1),s=!0),i[r]=l)}})),G(i,(function(e,t){n[t]=e})),s&&n.redraw(!1),$(n.container,{cursor:"move"})}))},e}(),j(e.prototype,{callbacks:[],collectionsWithInit:{xAxis:[e.prototype.addAxis,[!0]],yAxis:[e.prototype.addAxis,[!1]],series:[e.prototype.addSeries]},collectionsWithUpdate:["xAxis","yAxis","series"],propsRequireDirtyBox:"backgroundColor borderColor borderWidth borderRadius plotBackgroundColor plotBackgroundImage plotBorderColor plotBorderWidth plotShadow shadow".split(" "),propsRequireReflow:"margin marginTop marginRight marginBottom marginLeft spacing spacingTop spacingRight spacingBottom spacingLeft".split(" "),propsRequireUpdateSeries:"chart.inverted chart.polar chart.ignoreHiddenSeries chart.type colors plotOptions time tooltip".split(" ")}),e})),t(n,"Core/Legend/LegendSymbol.js",[n["Core/Utilities.js"]],(function(e){var t,n=e.merge,r=e.pick;return function(e){e.drawLineMarker=function(e){var t=this.options,i=e.symbolWidth,o=e.symbolHeight,s=o/2,a=this.chart.renderer,l=this.legendGroup;e=e.baseline-Math.round(.3*e.fontMetrics.b);var c={},u=t.marker;this.chart.styledMode||(c={"stroke-width":t.lineWidth||0},t.dashStyle&&(c.dashstyle=t.dashStyle)),this.legendLine=a.path([["M",0,e],["L",i,e]]).addClass("highcharts-graph").attr(c).add(l),u&&!1!==u.enabled&&i&&(t=Math.min(r(u.radius,s),s),0===this.symbol.indexOf("url")&&(u=n(u,{width:o,height:o}),t=0),this.legendSymbol=i=a.symbol(this.symbol,i/2-t,e-t,2*t,2*t,u).addClass("highcharts-point").add(l),i.isMarker=!0)},e.drawRectangle=function(e,t){var n=e.symbolHeight,i=e.options.squareSymbol;t.legendSymbol=this.chart.renderer.rect(i?(e.symbolWidth-n)/2:0,e.baseline-n+1,i?n:e.symbolWidth,n,r(e.options.symbolRadius,n/2)).addClass("highcharts-point").attr({zIndex:3}).add(t.legendGroup)}}(t||(t={})),t})),t(n,"Core/Series/SeriesDefaults.js",[],(function(){return{lineWidth:2,allowPointSelect:!1,crisp:!0,showCheckbox:!1,animation:{duration:1e3},events:{},marker:{enabledThreshold:2,lineColor:"#ffffff",lineWidth:0,radius:4,states:{normal:{animation:!0},hover:{animation:{duration:50},enabled:!0,radiusPlus:2,lineWidthPlus:1},select:{fillColor:"#cccccc",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:{animation:{},align:"center",defer:!0,formatter:function(){var e=this.series.chart.numberFormatter;return"number"!=typeof this.y?"":e(this.y,-1)},padding:5,style:{fontSize:"11px",fontWeight:"bold",color:"contrast",textOutline:"1px contrast"},verticalAlign:"bottom",x:0,y:0},cropThreshold:300,opacity:1,pointRange:0,softThreshold:!0,states:{normal:{animation:!0},hover:{animation:{duration:50},lineWidthPlus:1,marker:{},halo:{size:10,opacity:.25}},select:{animation:{duration:0}},inactive:{animation:{duration:50},opacity:.2}},stickyTracking:!0,turboThreshold:1e3,findNearestPointBy:"x"}})),t(n,"Core/Series/Series.js",[n["Core/Animation/AnimationUtilities.js"],n["Core/DefaultOptions.js"],n["Core/Foundation.js"],n["Core/Globals.js"],n["Core/Legend/LegendSymbol.js"],n["Core/Series/Point.js"],n["Core/Series/SeriesDefaults.js"],n["Core/Series/SeriesRegistry.js"],n["Core/Renderer/SVG/SVGElement.js"],n["Core/Utilities.js"]],(function(e,t,n,r,i,o,s,a,l,c){var u=e.animObject,d=e.setAnimation,h=t.defaultOptions,p=n.registerEventOptions,f=r.hasTouch,m=r.svg,g=r.win,b=a.seriesTypes,v=c.addEvent,y=c.arrayMax,_=c.arrayMin,S=c.clamp,x=c.cleanRecursively,w=c.correctFloat,k=c.defined,O=c.erase,E=c.error,A=c.extend,T=c.find,C=c.fireEvent,M=c.getNestedProperty,P=c.isArray,$=c.isNumber,R=c.isString,I=c.merge,D=c.objectEach,N=c.pick,j=c.removeEvent,L=c.splat,B=c.syncTimeout;return e=function(){function e(){this.zones=this.yAxis=this.xAxis=this.userOptions=this.tooltipOptions=this.processedYData=this.processedXData=this.points=this.options=this.linkedSeries=this.index=this.eventsToUnbind=this.eventOptions=this.data=this.chart=this._i=void 0}return e.prototype.init=function(e,t){C(this,"init",{options:t});var n=this,r=e.series;this.eventsToUnbind=[],n.chart=e,n.options=n.setOptions(t),t=n.options,n.linkedSeries=[],n.bindAxes(),A(n,{name:t.name,state:"",visible:!1!==t.visible,selected:!0===t.selected}),p(this,t);var i,o=t.events;(o&&o.click||t.point&&t.point.events&&t.point.events.click||t.allowPointSelect)&&(e.runTrackerClick=!0),n.getColor(),n.getSymbol(),n.parallelArrays.forEach((function(e){n[e+"Data"]||(n[e+"Data"]=[])})),n.isCartesian&&(e.hasCartesianSeries=!0),r.length&&(i=r[r.length-1]),n._i=N(i&&i._i,-1)+1,n.opacity=n.options.opacity,e.orderSeries(this.insert(r)),t.dataSorting&&t.dataSorting.enabled?n.setDataSortingOptions():n.points||n.data||n.setData(t.data,!1),C(this,"afterInit")},e.prototype.is=function(e){return b[e]&&this instanceof b[e]},e.prototype.insert=function(e){var t,n=this.options.index;if($(n)){for(t=e.length;t--;)if(n>=N(e[t].options.index,e[t]._i)){e.splice(t+1,0,this);break}-1===t&&e.unshift(this),t+=1}else e.push(this);return N(t,e.length-1)},e.prototype.bindAxes=function(){var e,t=this,n=t.options,r=t.chart;C(this,"bindAxes",null,(function(){(t.axisTypes||[]).forEach((function(i){var o=0;r[i].forEach((function(r){e=r.options,(n[i]===o&&!e.isInternal||void 0!==n[i]&&n[i]===e.id||void 0===n[i]&&0===e.index)&&(t.insert(r.series),t[i]=r,r.isDirty=!0),e.isInternal||o++})),t[i]||t.optionalAxis===i||E(18,!0,r)}))})),C(this,"afterBindAxes")},e.prototype.updateParallelArrays=function(e,t){var n=e.series,r=arguments,i=$(t)?function(r){var i="y"===r&&n.toYData?n.toYData(e):e[r];n[r+"Data"][t]=i}:function(e){Array.prototype[t].apply(n[e+"Data"],Array.prototype.slice.call(r,2))};n.parallelArrays.forEach(i)},e.prototype.hasData=function(){return this.visible&&void 0!==this.dataMax&&void 0!==this.dataMin||this.visible&&this.yData&&0=this.cropStart?c-this.cropStart:c),!r&&$(c)&&a[c]&&a[c].touched&&(c=void 0),c},e.prototype.updateData=function(e,t){var n,r,i,o=this.options,s=o.dataSorting,a=this.points,l=[],c=this.requireSorting,u=e.length===a.length,d=!0;if(this.xIncrement=null,e.forEach((function(e,t){var r=k(e)&&this.pointClass.prototype.optionsToObject.call({series:this},e)||{},d=r.x;r.id||$(d)?(-1===(r=this.findPointIndex(r,i))||void 0===r?l.push(e):a[r]&&e!==o.data[r]?(a[r].update(e,!1,null,!1),a[r].touched=!0,c&&(i=r+1)):a[r]&&(a[r].touched=!0),(!u||t!==r||s&&s.enabled||this.hasDerivedData)&&(n=!0)):l.push(e)}),this),n)for(e=a.length;e--;)(r=a[e])&&!r.touched&&r.remove&&r.remove(!1,t);else!u||s&&s.enabled?d=!1:(e.forEach((function(e,t){e!==a[t].y&&a[t].update&&a[t].update(e,!1,null,!1)})),l.length=0);return a.forEach((function(e){e&&(e.touched=!1)})),!!d&&(l.forEach((function(e){this.addPoint(e,!1,null,null,!1)}),this),null===this.xIncrement&&this.xData&&this.xData.length&&(this.xIncrement=y(this.xData),this.autoIncrement()),!0)},e.prototype.setData=function(e,t,n,r){var i=this,o=i.points,s=o&&o.length||0,a=i.options,l=i.chart,c=a.dataSorting,u=i.xAxis,d=a.turboThreshold,h=this.xData,p=this.yData,f=i.pointArrayMap;f=f&&f.length;var m,g=a.keys,b=0,v=1,y=null,_=(e=e||[]).length;if(t=N(t,!0),c&&c.enabled&&(e=this.sortData(e)),!1!==r&&_&&s&&!i.cropped&&!i.hasGroupedData&&i.visible&&!i.isSeriesBoosting&&(m=this.updateData(e,n)),!m){if(i.xIncrement=null,i.colorCounter=0,this.parallelArrays.forEach((function(e){i[e+"Data"].length=0})),d&&_>d)if(y=i.getFirstValidPoint(e),$(y))for(n=0;n<_;n++)h[n]=this.autoIncrement(),p[n]=e[n];else if(P(y))if(f)if(y.length===f)for(n=0;n<_;n++)h[n]=this.autoIncrement(),p[n]=e[n];else for(n=0;n<_;n++)r=e[n],h[n]=r[0],p[n]=r.slice(1,f+1);else if(g&&(b=0<=(b=g.indexOf("x"))?b:0,v=0<=(v=g.indexOf("y"))?v:1),1===y.length&&(v=0),b===v)for(n=0;n<_;n++)h[n]=this.autoIncrement(),p[n]=e[n][v];else for(n=0;n<_;n++)r=e[n],h[n]=r[b],p[n]=r[v];else E(12,!1,l);else for(n=0;n<_;n++)void 0!==e[n]&&(r={series:i},i.pointClass.prototype.applyOptions.apply(r,[e[n]]),i.updateParallelArrays(r,n));for(p&&R(p[0])&&E(14,!0,l),i.data=[],i.options.data=i.userOptions.data=e,n=s;n--;)o[n]&&o[n].destroy&&o[n].destroy();u&&(u.minRange=u.userMinRange),i.isDirty=l.isDirtyBox=!0,i.isDirtyData=!!o,n=!1}"point"===a.legendType&&(this.processData(),this.generatePoints()),t&&l.redraw(n)},e.prototype.sortData=function(e){var t=this,n=t.options.dataSorting.sortKey||"y",r=function(e,t){return k(t)&&e.pointClass.prototype.optionsToObject.call({series:e},t)||{}};return e.forEach((function(n,i){e[i]=r(t,n),e[i].index=i}),this),e.concat().sort((function(e,t){return e=M(n,e),(t=M(n,t))e?1:0})).forEach((function(e,t){e.x=t}),this),t.linkedSeries&&t.linkedSeries.forEach((function(t){var n=t.options,i=n.data;n.dataSorting&&n.dataSorting.enabled||!i||(i.forEach((function(n,o){i[o]=r(t,n),e[o]&&(i[o].x=e[o].x,i[o].index=o)})),t.setData(i,!1))})),e},e.prototype.getProcessedData=function(e){var t=this.xAxis,n=this.options,r=n.cropThreshold,i=e||this.getExtremesFromAll||n.getExtremesFromAll,o=this.isCartesian;e=t&&t.val2lin,n=!(!t||!t.logarithmic);var s=0,a=this.xData,l=this.yData,c=this.requireSorting,u=!1,d=a.length;if(t){var h=(u=t.getExtremes()).min,p=u.max;u=t.categories&&!t.names.length}if(o&&this.sorted&&!i&&(!r||d>r||this.forceCrop))if(a[d-1]p)a=[],l=[];else if(this.yData&&(a[0]p)){var f=this.cropData(this.xData,this.yData,h,p);a=f.xData,l=f.yData,s=f.start,f=!0}for(r=a.length||1;--r;)if(0<(t=n?e(a[r])-e(a[r-1]):a[r]-a[r-1])&&(void 0===m||tt&&c&&!u&&(E(15,!1,this.chart),c=!1);return{xData:a,yData:l,cropped:f,cropStart:s,closestPointRange:m}},e.prototype.processData=function(e){var t=this.xAxis;if(this.isCartesian&&!this.isDirty&&!t.isDirty&&!this.yAxis.isDirty&&!e)return!1;e=this.getProcessedData(),this.cropped=e.cropped,this.cropStart=e.cropStart,this.processedXData=e.xData,this.processedYData=e.yData,this.closestPointRange=this.basePointRange=e.closestPointRange,C(this,"afterProcessData")},e.prototype.cropData=function(e,t,n,r,i){var o,s=e.length,a=0,l=s;for(i=N(i,this.cropShoulder),o=0;o=n){a=Math.max(0,o-i);break}for(n=o;nr){l=n+i;break}return{xData:e.slice(a,l),yData:t.slice(a,l),start:a,end:l}},e.prototype.generatePoints=function(){var e=this.options,t=e.data,n=this.processedXData,r=this.processedYData,i=this.pointClass,o=n.length,s=this.cropStart||0,a=this.hasGroupedData,l=e.keys,c=[];e=e.dataGrouping&&e.dataGrouping.groupAll?s:0;var u,d,h=this.data;if(!h&&!a){var p=[];p.length=t.length,h=this.data=p}for(l&&a&&(this.options.keys=!1),d=0;d=l&&(i[a-s]||p)<=c,f&&p)if(f=h.length)for(;f--;)$(h[f])&&(o[u++]=h[f]);else o[u++]=h}return e={activeYData:o,dataMin:_(o),dataMax:y(o)},C(this,"afterGetExtremes",{dataExtremes:e}),e},e.prototype.applyExtremes=function(){var e=this.getExtremes();return this.dataMin=e.dataMin,this.dataMax=e.dataMax,e},e.prototype.getFirstValidPoint=function(e){for(var t=e.length,n=0,r=null;null===r&&n=x&&(x=null),g.total=g.stackTotal=v.total,g.percentage=v.total&&g.y/v.total*100,g.stackY=_,this.irregularWidths||v.setOffset(this.pointXOffset||0,this.barW||0)),g.yBottom=k(x)?S(a.translate(x,0,1,0,1),-1e5,1e5):null,this.dataModify&&(_=this.dataModify.modifyValue(_,e)),g.plotY=void 0,$(_)&&(void 0!==(v=a.translate(_,!1,!0,!1,!0))&&(g.plotY=S(v,-1e5,1e5))),g.isInside=this.isPointInside(g),g.clientX=d?w(i.translate(b,0,0,0,1,u)):t,g.negative=g[f]<(n[f+"Threshold"]||h||0),g.category=o&&void 0!==o[g.x]?o[g.x]:g.x,!g.isNull&&!1!==g.visible){void 0!==A&&(m=Math.min(m,Math.abs(t-A)));var A=t}g.zone=this.zones.length?g.getZone():void 0,!g.graphic&&this.group&&s&&(g.isNew=!0)}this.closestPointRangePx=m,C(this,"afterTranslate")},e.prototype.getValidPoints=function(e,t,n){var r=this.chart;return(e||this.points||[]).filter((function(e){return!(t&&!r.isInsidePlot(e.plotX,e.plotY,{inverted:r.inverted}))&&(!1!==e.visible&&(n||!e.isNull))}))},e.prototype.getClipBox=function(){var e=this.chart,t=this.xAxis,n=this.yAxis,r=I(e.clipBox);return t&&t.len!==e.plotSizeX&&(r.width=t.len),n&&n.len!==e.plotSizeY&&(r.height=n.len),r},e.prototype.getSharedClipKey=function(){return this.sharedClipKey=(this.options.xAxis||0)+","+(this.options.yAxis||0)},e.prototype.setClip=function(){var e=this.chart,t=this.group,n=this.markerGroup,r=e.sharedClips;e=e.renderer;var i=this.getClipBox(),o=this.getSharedClipKey(),s=r[o];s?s.animate(i):r[o]=s=e.clipRect(i),t&&t.clip(!1===this.options.clip?void 0:s),n&&n.clip()},e.prototype.animate=function(e){var t=this.chart,n=this.group,r=this.markerGroup,i=t.inverted,o=u(this.options.animation),s=[this.getSharedClipKey(),o.duration,o.easing,o.defer].join(),a=t.sharedClips[s],l=t.sharedClips[s+"m"];if(e&&n)o=this.getClipBox(),a?a.attr("height",o.height):(o.width=0,i&&(o.x=t.plotHeight),a=t.renderer.clipRect(o),t.sharedClips[s]=a,l=t.renderer.clipRect({x:i?(t.plotSizeX||0)+99:-99,y:i?-t.plotLeft:-t.plotTop,width:99,height:i?t.chartWidth:t.chartHeight}),t.sharedClips[s+"m"]=l),n.clip(a),r&&r.clip(l);else if(a&&!a.hasClass("highcharts-animating")){t=this.getClipBox();var c=o.step;r&&r.element.childNodes.length&&(o.step=function(e,t){c&&c.apply(t,arguments),l&&l.element&&l.attr(t.prop,"width"===t.prop?e+99:e)}),a.addClass("highcharts-animating").animate(t,o)}},e.prototype.afterAnimate=function(){var e=this;this.setClip(),D(this.chart.sharedClips,(function(t,n,r){t&&!e.chart.container.querySelector('[clip-path="url(#'+t.id+')"]')&&(t.destroy(),delete r[n])})),this.finishedAnimating=!0,C(this,"afterAnimate")},e.prototype.drawPoints=function(){var e,t,n=this.points,r=this.chart,i=this.options.marker,o=this[this.specialGroup]||this.markerGroup,s=this.xAxis,a=N(i.enabled,!(s&&!s.isRadial)||null,this.closestPointRangePx>=i.enabledThreshold*i.radius);if(!1!==i.enabled||this._hasPointMarkers)for(e=0;ex.max,l.resetZones&&0===t&&(t=void 0)})),this.clips=h}else l.visible&&(p&&p.show(!0),f&&f.show(!0))},e.prototype.invertGroups=function(e){function t(){["group","markerGroup"].forEach((function(t){n[t]&&(r.renderer.isVML&&n[t].attr({width:n.yAxis.len,height:n.xAxis.len}),n[t].width=n.yAxis.len,n[t].height=n.xAxis.len,n[t].invert(!n.isRadialSeries&&e))}))}var n=this,r=n.chart;n.xAxis&&(n.eventsToUnbind.push(v(r,"resize",t)),t(),n.invertGroups=t)},e.prototype.plotGroup=function(e,t,n,r,i){var o=this[e],s=!o;return n={visibility:n,zIndex:r||.1},void 0===this.opacity||this.chart.styledMode||"inactive"===this.state||(n.opacity=this.opacity),s&&(this[e]=o=this.chart.renderer.g().add(i)),o.addClass("highcharts-"+t+" highcharts-series-"+this.index+" highcharts-"+this.type+"-series "+(k(this.colorIndex)?"highcharts-color-"+this.colorIndex+" ":"")+(this.options.className||"")+(o.hasClass("highcharts-tracker")?" highcharts-tracker":""),!0),o.attr(n)[s?"attr":"animate"](this.getPlotBox()),o},e.prototype.getPlotBox=function(){var e=this.chart,t=this.xAxis,n=this.yAxis;return e.inverted&&(t=n,n=this.xAxis),{translateX:t?t.left:e.plotLeft,translateY:n?n.top:e.plotTop,scaleX:1,scaleY:1}},e.prototype.removeEvents=function(e){e||j(this),this.eventsToUnbind.length&&(this.eventsToUnbind.forEach((function(e){e()})),this.eventsToUnbind.length=0)},e.prototype.render=function(){var e=this,t=e.chart,n=e.options,r=u(n.animation),i=e.visible?"inherit":"hidden",o=n.zIndex,s=e.hasRendered,a=t.seriesGroup,l=t.inverted;t=!e.finishedAnimating&&t.renderer.isSVG?r.duration:0,C(this,"render");var c=e.plotGroup("group","series",i,o,a);e.markerGroup=e.plotGroup("markerGroup","markers",i,o,a),!1!==n.clip&&e.setClip(),e.animate&&t&&e.animate(!0),c.inverted=!!N(e.invertible,e.isCartesian)&&l,e.drawGraph&&(e.drawGraph(),e.applyZones()),e.visible&&e.drawPoints(),e.drawDataLabels&&e.drawDataLabels(),e.redrawPoints&&e.redrawPoints(),e.drawTracker&&!1!==e.options.enableMouseTracking&&e.drawTracker(),e.invertGroups(l),e.animate&&t&&e.animate(),s||(t&&r.defer&&(t+=r.defer),e.animationTimeout=B((function(){e.afterAnimate()}),t||0)),e.isDirty=!1,e.hasRendered=!0,C(e,"afterRender")},e.prototype.redraw=function(){var e=this.chart,t=this.isDirty||this.isDirtyData,n=this.group,r=this.xAxis,i=this.yAxis;n&&(e.inverted&&n.attr({width:e.plotWidth,height:e.plotHeight}),n.animate({translateX:N(r&&r.left,e.plotLeft),translateY:N(i&&i.top,e.plotTop)})),this.translate(),this.render(),t&&delete this.kdTree},e.prototype.searchPoint=function(e,t){var n=this.xAxis,r=this.yAxis,i=this.chart.inverted;return this.searchKDTree({clientX:i?n.len-e.chartY+n.pos:e.chartX-n.pos,plotY:i?r.len-e.chartX+r.pos:e.chartY-r.pos},t,e)},e.prototype.buildKDTree=function(e){this.buildingKdTree=!0;var t=this,n=-1(u=t[u]-c[u])?"right":"left",n[p=0>u?"left":"right"]&&(d=(p=e(t,n[p],a+1,l))[s]p;)f--;this.updateParallelArrays(h,"splice",f,0,0),this.updateParallelArrays(h,f),l&&h.name&&(l[p]=h.name),u.splice(f,0,e),c&&(this.data.splice(f,0,null),this.processData()),"point"===o.legendType&&this.generatePoints(),n&&(s[0]&&s[0].remove?s[0].remove(!1):(s.shift(),this.updateParallelArrays(h,"shift"),u.shift())),!1!==i&&C(this,"addPoint",{point:h}),this.isDirtyData=this.isDirty=!0,t&&a.redraw(r)},e.prototype.removePoint=function(e,t,n){var r=this,i=r.data,o=i[e],s=r.points,a=r.chart,l=function(){s&&s.length===i.length&&s.splice(e,1),i.splice(e,1),r.options.data.splice(e,1),r.updateParallelArrays(o||{series:r},"splice",e,1),o&&o.destroy(),r.isDirty=!0,r.isDirtyData=!0,t&&a.redraw()};d(n,a),t=N(t,!0),o?o.firePointEvent("remove",null,l):l()},e.prototype.remove=function(e,t,n,r){function i(){o.destroy(r),s.isDirtyLegend=s.isDirtyBox=!0,s.linkSeries(),N(e,!0)&&s.redraw(t)}var o=this,s=o.chart;!1!==n?C(o,"remove",null,i):i()},e.prototype.update=function(e,t){e=x(e,this.userOptions),C(this,"update",{options:e});var n,r=this,i=r.chart,o=r.userOptions,s=r.initialType||r.type,a=i.options.plotOptions,l=b[s].prototype,c=r.finishedAnimating&&{animation:!1},u={},d=["eventOptions","navigatorSeries","baseSeries"],h=e.type||o.type||i.options.chart.type,p=!(this.hasDerivedData||h&&h!==this.type||void 0!==e.pointStart||void 0!==e.pointInterval||void 0!==e.relativeXValue||r.hasOptionChanged("dataGrouping")||r.hasOptionChanged("pointStart")||r.hasOptionChanged("pointInterval")||r.hasOptionChanged("pointIntervalUnit")||r.hasOptionChanged("keys"));if(h=h||s,p&&(d.push("data","isDirtyData","points","processedXData","processedYData","xIncrement","cropped","_hasPointMarkers","_hasPointLabels","clips","nodes","layout","mapMap","mapData","minY","maxY","minX","maxX"),!1!==e.visible&&d.push("area","graph"),r.parallelArrays.forEach((function(e){d.push(e+"Data")})),e.data&&(e.dataSorting&&A(r.options.dataSorting,e.dataSorting),this.setData(e.data,!1))),e=I(o,c,{index:void 0===o.index?r.index:o.index,pointStart:N(a&&a.series&&a.series.pointStart,o.pointStart,r.xData[0])},!p&&{data:r.options.data},e),p&&e.data&&(e.data=r.options.data),(d=["group","markerGroup","dataLabelsGroup","transformGroup"].concat(d)).forEach((function(e){d[e]=r[e],delete r[e]})),a=!1,b[h]){if(a=h!==r.type,r.remove(!1,!1,!1,!0),a)if(Object.setPrototypeOf)Object.setPrototypeOf(r,b[h].prototype);else{for(n in c=Object.hasOwnProperty.call(r,"hcEvents")&&r.hcEvents,l)r[n]=void 0;A(r,b[h].prototype),c?r.hcEvents=c:delete r.hcEvents}}else E(17,!0,i,{missingModuleFor:h});if(d.forEach((function(e){r[e]=d[e]})),r.init(i,e),p&&this.points){var f=r.options;!1===f.visible?(u.graphic=1,u.dataLabel=1):r._hasPointLabels||(e=f.marker,l=f.dataLabels,!e||!1!==e.enabled&&(o.marker&&o.marker.symbol)===e.symbol||(u.graphic=1),l&&!1===l.enabled&&(u.dataLabel=1)),this.points.forEach((function(e){e&&e.series&&(e.resolveColor(),Object.keys(u).length&&e.destroyElements(u),!1===f.showInLegend&&e.legendItem&&i.legend.destroyItem(e))}),this)}r.initialType=s,i.linkSeries(),a&&r.linkedSeries.length&&(r.isDirtyData=!0),C(this,"afterUpdate"),N(t,!0)&&i.redraw(!!p&&void 0)},e.prototype.setName=function(e){this.name=this.options.name=this.userOptions.name=e,this.chart.isDirtyLegend=!0},e.prototype.hasOptionChanged=function(e){var t=this.options[e],n=this.chart.options.plotOptions,r=this.userOptions[e];return r?t!==r:t!==N(n&&n[this.type]&&n[this.type][e],n&&n.series&&n.series[e],t)},e.prototype.onMouseOver=function(){var e=this.chart,t=e.hoverSeries;e.pointer.setHoverChartIndex(),t&&t!==this&&t.onMouseOut(),this.options.events.mouseOver&&C(this,"mouseOver"),this.setState("hover"),e.hoverSeries=this},e.prototype.onMouseOut=function(){var e=this.options,t=this.chart,n=t.tooltip,r=t.hoverPoint;t.hoverSeries=null,r&&r.onMouseOut(),this&&e.events.mouseOut&&C(this,"mouseOut"),!n||this.stickyTracking||n.shared&&!this.noSharedTooltip||n.hide(),t.series.forEach((function(e){e.setState("",!0)}))},e.prototype.setState=function(e,t){var n=this,r=n.options,i=n.graph,o=r.inactiveOtherPoints,s=r.states,a=N(s[e||"normal"]&&s[e||"normal"].animation,n.chart.options.chart.animation),l=r.lineWidth,c=0,u=r.opacity;if(e=e||"",n.state!==e&&([n.group,n.markerGroup,n.dataLabelsGroup].forEach((function(t){t&&(n.state&&t.removeClass("highcharts-series-"+n.state),e&&t.addClass("highcharts-series-"+e))})),n.state=e,!n.chart.styledMode)){if(s[e]&&!1===s[e].enabled)return;if(e&&(l=s[e].lineWidth||l+(s[e].lineWidthPlus||0),u=N(s[e].opacity,u)),i&&!i.dashstyle)for(r={"stroke-width":l},i.animate(r,a);n["zone-graph-"+c];)n["zone-graph-"+c].animate(r,a),c+=1;o||[n.group,n.markerGroup,n.dataLabelsGroup,n.labelBySeries].forEach((function(e){e&&e.animate({opacity:u},a)}))}t&&o&&n.points&&n.setAllPointsToState(e||void 0)},e.prototype.setAllPointsToState=function(e){this.points.forEach((function(t){t.setState&&t.setState(e)}))},e.prototype.setVisible=function(e,t){var n=this,r=n.chart,i=n.legendItem,o=r.options.chart.ignoreHiddenSeries,s=n.visible,a=(n.visible=e=n.options.visible=n.userOptions.visible=void 0===e?!s:e)?"show":"hide";["group","dataLabelsGroup","markerGroup","tracker","tt"].forEach((function(e){n[e]&&n[e][a]()})),r.hoverSeries!==n&&(r.hoverPoint&&r.hoverPoint.series)!==n||n.onMouseOut(),i&&r.legend.colorizeItem(n,e),n.isDirty=!0,n.options.stacking&&r.series.forEach((function(e){e.options.stacking&&e.visible&&(e.isDirty=!0)})),n.linkedSeries.forEach((function(t){t.setVisible(e,!1)})),o&&(r.isDirtyBox=!0),C(n,a),!1!==t&&r.redraw()},e.prototype.show=function(){this.setVisible(!0)},e.prototype.hide=function(){this.setVisible(!1)},e.prototype.select=function(e){this.selected=e=this.options.selected=void 0===e?!this.selected:e,this.checkbox&&(this.checkbox.checked=e),C(this,e?"select":"unselect")},e.prototype.shouldShowTooltip=function(e,t,n){return void 0===n&&(n={}),n.series=this,n.visiblePlotOnly=!0,this.chart.isInsidePlot(e,t,n)},e.defaultOptions=s,e}(),A(e.prototype,{axisTypes:["xAxis","yAxis"],coll:"series",colorCounter:0,cropShoulder:1,directTouch:!1,drawLegendSymbol:i.drawLineMarker,isCartesian:!0,kdAxisArray:["clientX","plotY"],parallelArrays:["x","y"],pointClass:o,requireSorting:!0,sorted:!0}),a.series=e,e})),t(n,"Extensions/ScrollablePlotArea.js",[n["Core/Animation/AnimationUtilities.js"],n["Core/Axis/Axis.js"],n["Core/Chart/Chart.js"],n["Core/Series/Series.js"],n["Core/Renderer/RendererRegistry.js"],n["Core/Utilities.js"]],(function(e,t,n,r,i,o){var s=e.stop,a=o.addEvent,l=o.createElement,c=o.merge,u=o.pick;a(n,"afterSetChartSize",(function(e){var n=this.options.chart.scrollablePlotArea,r=n&&n.minWidth;if(n=n&&n.minHeight,!this.renderer.forExport){if(r){if(this.scrollablePixelsX=r=Math.max(0,r-this.chartWidth)){this.scrollablePlotBox=this.renderer.scrollablePlotBox=c(this.plotBox),this.plotBox.width=this.plotWidth+=r,this.inverted?this.clipBox.height+=r:this.clipBox.width+=r;var i={1:{name:"right",value:r}}}}else n&&(this.scrollablePixelsY=r=Math.max(0,n-this.chartHeight))&&(this.scrollablePlotBox=this.renderer.scrollablePlotBox=c(this.plotBox),this.plotBox.height=this.plotHeight+=r,this.inverted?this.clipBox.width+=r:this.clipBox.height+=r,i={2:{name:"bottom",value:r}});i&&!e.skipAxes&&this.axes.forEach((function(e){i[e.side]?e.getPlotLinePath=function(){var n=i[e.side].name,r=this[n];this[n]=r-i[e.side].value;var o=t.prototype.getPlotLinePath.apply(this,arguments);return this[n]=r,o}:(e.setAxisSize(),e.setAxisTranslation())}))}})),a(n,"render",(function(){this.scrollablePixelsX||this.scrollablePixelsY?(this.setUpScrolling&&this.setUpScrolling(),this.applyFixed()):this.fixedDiv&&this.applyFixed()})),n.prototype.setUpScrolling=function(){var e=this,t={WebkitOverflowScrolling:"touch",overflowX:"hidden",overflowY:"hidden"};this.scrollablePixelsX&&(t.overflowX="auto"),this.scrollablePixelsY&&(t.overflowY="auto"),this.scrollingParent=l("div",{className:"highcharts-scrolling-parent"},{position:"relative"},this.renderTo),this.scrollingContainer=l("div",{className:"highcharts-scrolling"},t,this.scrollingParent),a(this.scrollingContainer,"scroll",(function(){e.pointer&&delete e.pointer.chartPosition})),this.innerContainer=l("div",{className:"highcharts-inner-container"},null,this.scrollingContainer),this.innerContainer.appendChild(this.container),this.setUpScrolling=null},n.prototype.moveFixedElements=function(){var e,t=this.container,n=this.fixedRenderer,r=".highcharts-contextbutton .highcharts-credits .highcharts-legend .highcharts-legend-checkbox .highcharts-navigator-series .highcharts-navigator-xaxis .highcharts-navigator-yaxis .highcharts-navigator .highcharts-reset-zoom .highcharts-drillup-button .highcharts-scrollbar .highcharts-subtitle .highcharts-title".split(" ");this.scrollablePixelsX&&!this.inverted?e=".highcharts-yaxis":this.scrollablePixelsX&&this.inverted||this.scrollablePixelsY&&!this.inverted?e=".highcharts-xaxis":this.scrollablePixelsY&&this.inverted&&(e=".highcharts-yaxis"),e&&r.push(e+":not(.highcharts-radial-axis)",e+"-labels:not(.highcharts-radial-axis-labels)"),r.forEach((function(e){[].forEach.call(t.querySelectorAll(e),(function(e){(e.namespaceURI===n.SVG_NS?n.box:n.box.parentNode).appendChild(e),e.style.pointerEvents="auto"}))}))},n.prototype.applyFixed=function(){var e=!this.fixedDiv,t=this.options.chart,n=t.scrollablePlotArea,r=i.getRendererType();e?(this.fixedDiv=l("div",{className:"highcharts-fixed"},{position:"absolute",overflow:"hidden",pointerEvents:"none",zIndex:(t.style&&t.style.zIndex||0)+2,top:0},null,!0),this.scrollingContainer&&this.scrollingContainer.parentNode.insertBefore(this.fixedDiv,this.scrollingContainer),this.renderTo.style.overflow="visible",this.fixedRenderer=t=new r(this.fixedDiv,this.chartWidth,this.chartHeight,this.options.chart.style),this.scrollableMask=t.path().attr({fill:this.options.chart.backgroundColor||"#fff","fill-opacity":u(n.opacity,.85),zIndex:-1}).addClass("highcharts-scrollable-mask").add(),a(this,"afterShowResetZoom",this.moveFixedElements),a(this,"afterDrilldown",this.moveFixedElements),a(this,"afterLayOutTitles",this.moveFixedElements)):this.fixedRenderer.setSize(this.chartWidth,this.chartHeight),(this.scrollableDirty||e)&&(this.scrollableDirty=!1,this.moveFixedElements()),t=this.chartWidth+(this.scrollablePixelsX||0),r=this.chartHeight+(this.scrollablePixelsY||0),s(this.container),this.container.style.width=t+"px",this.container.style.height=r+"px",this.renderer.boxWrapper.attr({width:t,height:r,viewBox:[0,0,t,r].join(" ")}),this.chartBackground.attr({width:t,height:r}),this.scrollingContainer.style.height=this.chartHeight+"px",e&&(n.scrollPositionX&&(this.scrollingContainer.scrollLeft=this.scrollablePixelsX*n.scrollPositionX),n.scrollPositionY&&(this.scrollingContainer.scrollTop=this.scrollablePixelsY*n.scrollPositionY)),r=this.axisOffset,e=this.plotTop-r[0]-1,n=this.plotLeft-r[3]-1,t=this.plotTop+this.plotHeight+r[2]+1,r=this.plotLeft+this.plotWidth+r[1]+1;var o=this.plotLeft+this.plotWidth-(this.scrollablePixelsX||0),c=this.plotTop+this.plotHeight-(this.scrollablePixelsY||0);e=this.scrollablePixelsX?[["M",0,e],["L",this.plotLeft-1,e],["L",this.plotLeft-1,t],["L",0,t],["Z"],["M",o,e],["L",this.chartWidth,e],["L",this.chartWidth,t],["L",o,t],["Z"]]:this.scrollablePixelsY?[["M",n,0],["L",n,this.plotTop-1],["L",r,this.plotTop-1],["L",r,0],["Z"],["M",n,c],["L",n,this.chartHeight],["L",r,this.chartHeight],["L",r,c],["Z"]]:[["M",0,0]],"adjustHeight"!==this.redrawTrigger&&this.scrollableMask.attr({d:e})},a(t,"afterInit",(function(){this.chart.scrollableDirty=!0})),a(r,"show",(function(){this.chart.scrollableDirty=!0}))})),t(n,"Core/Axis/StackingAxis.js",[n["Core/Animation/AnimationUtilities.js"],n["Core/Axis/Axis.js"],n["Core/Utilities.js"]],(function(e,t,n){var r,i=e.getDeferredAnimation,o=n.addEvent,s=n.destroyObjectProperties,a=n.fireEvent,l=n.isNumber,c=n.objectEach;return function(e){function t(){var e=this.stacking;if(e){var t=e.stacks;c(t,(function(e,n){s(e),t[n]=null})),e&&e.stackTotalGroup&&e.stackTotalGroup.destroy()}}function n(){this.stacking||(this.stacking=new u(this))}var r=[];e.compose=function(e){return-1===r.indexOf(e)&&(r.push(e),o(e,"init",n),o(e,"destroy",t)),e};var u=function(){function e(e){this.oldStacks={},this.stacks={},this.stacksTouched=0,this.axis=e}return e.prototype.buildStacks=function(){var e,t=this.axis,n=t.series,r=t.options.reversedStacks,i=n.length;if(!t.isXAxis){for(this.usePercentage=!1,e=i;e--;){var o=n[r?e:i-e-1];o.setStackedPoints(),o.setGroupedPoints()}for(e=0;eo&&t.shadow)),a&&(a.startX=n.xMap,a.isArea=n.isArea)}))},n.prototype.getGraphPath=function(e,t,n){var r,o=this,s=o.options,a=[],l=[],c=s.step,u=(e=e||o.points).reversed;return u&&e.reverse(),(c={right:1,center:2}[c]||c&&3)&&u&&(c=4-c),(e=this.getValidPoints(e,!1,!(s.connectNulls&&!t&&!n))).forEach((function(u,d){var h=u.plotX,p=u.plotY,f=e[d-1];(u.leftCliff||f&&f.rightCliff)&&!n&&(r=!0),u.isNull&&!i(t)&&0e&&u>i?d=2*i-(u=Math.max(e,i)):un&&d>i?u=2*i-(d=Math.max(n,i)):d=Math.abs(t)&&.5e.closestPointRange*e.xAxis.transA;r=e.borderWidth=y(n.borderWidth,r?0:1);var o=e.xAxis,s=e.yAxis,a=n.threshold,l=e.translatedThreshold=s.getThreshold(a),c=y(n.minPointLength,5),u=e.getColumnMetrics(),h=u.width,f=e.pointXOffset=u.offset,m=e.dataMin,g=e.dataMax,v=e.barW=Math.max(h,1+2*r);t.inverted&&(l-=.5),n.pointPadding&&(v=Math.ceil(v)),i.prototype.translate.apply(e),e.points.forEach((function(r){var i=y(r.yBottom,l),_=999+Math.abs(i),S=r.plotX||0;_=d(r.plotY,-_,s.len+_);var x=Math.min(_,i),w=Math.max(_,i)-x,k=h,O=S+f,E=v;c&&Math.abs(w)c?i-c:l-(S?c:0)),p(r.options.pointWidth)&&(k=E=Math.ceil(r.options.pointWidth),O-=Math.round((k-h)/2)),n.centerInCategory&&(O=e.adjustForMissingColumns(O,k,r,u)),r.barX=O,r.pointWidth=k,r.tooltipPos=t.inverted?[d(s.len+s.pos-t.plotLeft-_,s.pos-t.plotLeft,s.len+s.pos-t.plotLeft),o.len+o.pos-t.plotTop-O-E/2,w]:[o.left-t.plotLeft+O+E/2,d(_+s.pos-t.plotTop,s.pos-t.plotTop,s.len+s.pos-t.plotTop),w],r.shapeType=e.pointClass.prototype.shapeType||"rect",r.shapeArgs=e.crispCol.apply(e,r.isNull?[O,l,E,0]:[O,x,E,w])}))},t.prototype.drawGraph=function(){this.group[this.dense?"addClass":"removeClass"]("highcharts-dense-data")},t.prototype.pointAttribs=function(e,t){var n=this.options,r=this.pointAttrToOptions||{},i=r.stroke||"borderColor",o=r["stroke-width"]||"borderWidth",s=e&&e.color||this.color,a=e&&e[i]||n[i]||s;r=e&&e.options.dashStyle||n.dashStyle;var l=e&&e[o]||n[o]||this[o]||0,u=y(e&&e.opacity,n.opacity,1);if(e&&this.zones.length){var d=e.getZone();s=e.options.color||d&&(d.color||e.nonZonedColor)||this.color,d&&(a=d.borderColor||a,r=d.dashStyle||r,l=d.borderWidth||l)}return t&&e&&(t=(e=v(n.states[t],e.options.states&&e.options.states[t]||{})).brightness,s=e.color||void 0!==t&&c(s).brighten(e.brightness).get()||s,a=e[i]||a,l=e[o]||l,r=e.dashStyle||r,u=y(e.opacity,u)),i={fill:s,stroke:a,"stroke-width":l,opacity:u},r&&(i.dashstyle=r),i},t.prototype.drawPoints=function(){var e,t=this,n=this.chart,r=t.options,i=n.renderer,o=r.animationLimit||250;t.points.forEach((function(s){var a=s.graphic,l=!!a,c=a&&n.pointCountb,"left"===m?u.y-=b?p.height:0:"center"===m?(u.x-=p.width/2,u.y-=p.height/2):"right"===m&&(u.x-=p.width,u.y-=b?0:p.height),t.placed=!0,t.alignAttr=u):(b(r),t.align(n,void 0,r),u=t.alignAttr),v&&0<=r.height?this.justifyDataLabel(t,n,u,p,r,i):h(n.crop,!0)&&(y=s.isInsidePlot(u.x,u.y,{paneCoordinates:!0,series:o})&&s.isInsidePlot(u.x+p.width,u.y+p.height,{paneCoordinates:!0,series:o})),n.shape&&!f&&t[i?"attr":"animate"]({anchorX:l?s.plotWidth-e.plotY:e.plotX,anchorY:l?s.plotHeight-e.plotX:e.plotY})}i&&c&&(t.placed=!1),y||c&&!v||(t.hide(!0),t.placed=!1)}function n(){var e=this,t=e.chart,n=e.options,r=e.points,a=e.hasRendered||0,u=t.renderer,m=n.dataLabels,g=m.animation;if(g=m.defer?i(t,g,e):{defer:0,duration:0},m=f(f(t.options.plotOptions&&t.options.plotOptions.series&&t.options.plotOptions.series.dataLabels,t.options.plotOptions&&t.options.plotOptions[e.type]&&t.options.plotOptions[e.type].dataLabels),m),l(this,"drawDataLabels"),c(m)||m.enabled||e._hasPointLabels){var b=e.plotGroup("dataLabelsGroup","data-labels",a?"inherit":"hidden",m.zIndex||6);b.attr({opacity:+a}),!a&&(a=e.dataLabelsGroup)&&(e.visible&&b.show(!0),a[n.animation?"animate":"attr"]({opacity:1},g)),r.forEach((function(r){p(f(m,r.dlOptions||r.options&&r.options.dataLabels)).forEach((function(i,a){var l=i.enabled&&(!r.isNull||r.dataLabelOnNull)&&function(e,t){var n=t.filter;return!n||(t=n.operator,e=e[n.property],n=n.value,">"===t&&e>n||"<"===t&&e="===t&&e>=n||"<="===t&&e<=n||"=="===t&&e==n||"==="===t&&e===n)}(r,i),c=r.connectors?r.connectors[a]:r.connector,p=r.dataLabels?r.dataLabels[a]:r.dataLabel,f=h(i.distance,r.labelDistance),m=!p;if(l){var g=r.getLabelConfig(),v=h(i[r.formatPrefix+"Format"],i.format);g=s(v)?o(v,g,t):(i[r.formatPrefix+"Formatter"]||i.formatter).call(g,i),v=i.style;var y=i.rotation;t.styledMode||(v.color=h(i.color,v.color,e.color,"#000000"),"contrast"===v.color?(r.contrastColor=u.getContrast(r.color||e.color),v.color=!s(f)&&i.inside||0>f||n.stacking?r.contrastColor:"#000000"):delete r.contrastColor,n.cursor&&(v.cursor=n.cursor));var _={r:i.borderRadius||0,rotation:y,padding:i.padding,zIndex:1};t.styledMode||(_.fill=i.backgroundColor,_.stroke=i.borderColor,_["stroke-width"]=i.borderWidth),d(_,(function(e,t){void 0===e&&delete _[t]}))}!p||l&&s(g)&&!!p.div==!!i.useHTML||(r.dataLabel=p=r.dataLabel&&r.dataLabel.destroy(),r.dataLabels&&(1===r.dataLabels.length?delete r.dataLabels:delete r.dataLabels[a]),a||delete r.dataLabel,c&&(r.connector=r.connector.destroy(),r.connectors&&(1===r.connectors.length?delete r.connectors:delete r.connectors[a]))),l&&s(g)&&(p?_.text=g:(r.dataLabels=r.dataLabels||[],p=r.dataLabels[a]=y?u.text(g,0,-9999,i.useHTML).addClass("highcharts-data-label"):u.label(g,0,-9999,i.shape,null,null,i.useHTML,null,"data-label"),a||(r.dataLabel=p),p.addClass(" highcharts-data-label-color-"+r.colorIndex+" "+(i.className||"")+(i.useHTML?" highcharts-tracker":""))),p.options=i,p.attr(_),t.styledMode||p.css(v).shadow(i.shadow),p.added||p.add(b),i.textPath&&!i.useHTML&&(p.setTextPath(r.getDataLabelPath&&r.getDataLabelPath(p)||r.graphic,i.textPath),r.dataLabelPath&&!i.textPath.enabled&&(r.dataLabelPath=r.dataLabelPath.destroy())),e.alignDataLabel(r,p,i,null,m))}))}))}l(this,"afterDrawDataLabels")}function r(e,t,n,r,i,o){var s=this.chart,a=t.align,l=t.verticalAlign,c=e.box?0:e.padding||0,u=t.x;u=void 0===u?0:u;var d=t.y;d=void 0===d?0:d;var h=(n.x||0)+c;if(0>h){"right"===a&&0<=u?(t.align="left",t.inside=!0):u-=h;var p=!0}return(h=(n.x||0)+r.width-c)>s.plotWidth&&("left"===a&&0>=u?(t.align="right",t.inside=!0):u+=s.plotWidth-h,p=!0),0>(h=n.y+c)&&("bottom"===l&&0<=d?(t.verticalAlign="top",t.inside=!0):d-=h,p=!0),(h=(n.y||0)+r.height-c)>s.plotHeight&&("top"===l&&0>=d?(t.verticalAlign="bottom",t.inside=!0):d+=s.plotHeight-h,p=!0),p&&(t.x=u,t.y=d,e.placed=!o,e.align(t,void 0,i)),p}function f(e,t){var n,r=[];if(c(e)&&!c(t))r=e.map((function(e){return u(e,t)}));else if(c(t)&&!c(e))r=t.map((function(t){return u(e,t)}));else if(c(e)||c(t))for(n=Math.max(e.length,t.length);n--;)r[n]=u(e[n],t[n]);else r=u(e,t);return r}function m(e,t,n,r,i){var o=this.chart,s=o.inverted,a=this.xAxis,l=a.reversed,c=s?t.height/2:t.width/2;e=(e=e.pointWidth)?e/2:0,t.startXPos=s?i.x:l?-c-e:a.width-c+e,t.startYPos=s?l?this.yAxis.height-c+e:-c-e:i.y,r?"hidden"===t.visibility&&(t.show(),t.attr({opacity:0}).animate({opacity:1})):t.attr({opacity:1}).animate({opacity:0},void 0,t.hide),o.hasRendered&&(n&&t.attr({x:t.startXPos,y:t.startYPos}),t.placed=!0)}var g=[];e.compose=function(e){if(-1===g.indexOf(e)){var i=e.prototype;g.push(e),i.alignDataLabel=t,i.drawDataLabels=n,i.justifyDataLabel=r,i.setDataLabelStartPos=m}}}(r||(r={})),r})),t(n,"Series/Column/ColumnDataLabel.js",[n["Core/Series/DataLabel.js"],n["Core/Series/SeriesRegistry.js"],n["Core/Utilities.js"]],(function(e,t,n){var r,i=t.series,o=n.merge,s=n.pick;return function(t){function n(e,t,n,r,a){var l=this.chart.inverted,c=e.series,u=(c.xAxis?c.xAxis.len:this.chart.plotSizeX)||0;c=(c.yAxis?c.yAxis.len:this.chart.plotSizeY)||0;var d=e.dlBox||e.shapeArgs,h=s(e.below,e.plotY>s(this.translatedThreshold,c)),p=s(n.inside,!!this.options.stacking);d&&(0>(r=o(d)).y&&(r.height+=r.y,r.y=0),0<(d=r.y+r.height-c)&&d {series.name}
',pointFormat:"x: {point.x}
y: {point.y}
"}}),n}(t)).prototype,{drawTracker:e.prototype.drawTracker,sorted:!1,requireSorting:!1,noSharedTooltip:!0,trackerGroups:["group","markerGroup","dataLabelsGroup"],takeOrdinalPosition:!1}),o(r,"afterTranslate",(function(){this.applyJitter()})),n.registerSeriesType("scatter",r),r})),t(n,"Series/CenteredUtilities.js",[n["Core/Globals.js"],n["Core/Series/Series.js"],n["Core/Utilities.js"]],(function(e,t,n){var r,i=e.deg2rad,o=n.isNumber,s=n.pick,a=n.relativeLength;return function(e){e.getCenter=function(){var e=this.options,n=this.chart,r=2*(e.slicedOffset||0),i=n.plotWidth-2*r,o=n.plotHeight-2*r,l=e.center,c=Math.min(i,o),u=e.size,d=e.innerSize||0;for("string"==typeof u&&(u=parseFloat(u)),"string"==typeof d&&(d=parseFloat(d)),e=[s(l[0],"50%"),s(l[1],"50%"),s(u&&0>u?void 0:e.size,"100%"),s(d&&0>d?void 0:e.innerSize||0,"0%")],!n.angular||this instanceof t||(e[3]=0),l=0;4>l;++l)u=e[l],n=2>l||2===l&&/%$/.test(u),e[l]=a(u,[i,o,c,e[2]][l])+(n?r:0);return e[3]>e[2]&&(e[3]=e[2]),e},e.getStartAndEndRadians=function(e,t){return e=o(e)?e:0,t=o(t)&&t>e&&360>t-e?t:e+360,{start:i*(e+-90),end:i*(t+-90)}}}(r||(r={})),r})),t(n,"Series/Pie/PiePoint.js",[n["Core/Animation/AnimationUtilities.js"],n["Core/Series/Point.js"],n["Core/Utilities.js"]],(function(e,t,n){var r=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),i=e.setAnimation,o=n.addEvent,s=n.defined;e=n.extend;var a=n.isNumber,l=n.pick,c=n.relativeLength;return t=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.labelDistance=void 0,t.options=void 0,t.series=void 0,t}return r(t,e),t.prototype.getConnectorPath=function(){var e=this.labelPosition,t=this.series.options.dataLabels,n=this.connectorShapes,r=t.connectorShape;return n[r]&&(r=n[r]),r.call(this,{x:e.final.x,y:e.final.y,alignment:e.alignment},e.connectorPosition,t)},t.prototype.getTranslate=function(){return this.sliced?this.slicedTranslation:{translateX:0,translateY:0}},t.prototype.haloPath=function(e){var t=this.shapeArgs;return this.sliced||!this.visible?[]:this.series.chart.renderer.symbols.arc(t.x,t.y,t.r+e,t.r+e,{innerR:t.r-1,start:t.start,end:t.end})},t.prototype.init=function(){var t=this;e.prototype.init.apply(this,arguments),this.name=l(this.name,"Slice");var n=function(e){t.slice("select"===e.type)};return o(this,"select",n),o(this,"unselect",n),this},t.prototype.isValid=function(){return a(this.y)&&0<=this.y},t.prototype.setVisible=function(e,t){var n=this,r=this.series,i=r.chart,o=r.options.ignoreHiddenPoint;t=l(t,o),e!==this.visible&&(this.visible=this.options.visible=e=void 0===e?!this.visible:e,r.options.data[r.data.indexOf(this)]=this.options,["graphic","dataLabel","connector","shadowGroup"].forEach((function(t){n[t]&&n[t][e?"show":"hide"](e)})),this.legendItem&&i.legend.colorizeItem(this,e),e||"hover"!==this.state||this.setState(""),o&&(r.isDirty=!0),t&&i.redraw())},t.prototype.slice=function(e,t,n){var r=this.series;i(n,r.chart),l(t,!0),this.sliced=this.options.sliced=s(e)?e:!this.sliced,r.options.data[r.data.indexOf(this)]=this.options,this.graphic&&this.graphic.animate(this.getTranslate()),this.shadowGroup&&this.shadowGroup.animate(this.getTranslate())},t}(t),e(t.prototype,{connectorShapes:{fixedOffset:function(e,t,n){var r=t.breakAt;return t=t.touchingSliceAt,[["M",e.x,e.y],n.softConnector?["C",e.x+("left"===e.alignment?-5:5),e.y,2*r.x-t.x,2*r.y-t.y,r.x,r.y]:["L",r.x,r.y],["L",t.x,t.y]]},straight:function(e,t){return t=t.touchingSliceAt,[["M",e.x,e.y],["L",t.x,t.y]]},crookedLine:function(e,t,n){t=t.touchingSliceAt;var r=this.series,i=r.center[0],o=r.chart.plotWidth,s=r.chart.plotLeft;r=e.alignment;var a=this.shapeArgs.r;return n=c(n.crookDistance,1),n=["L",o="left"===r?i+a+(o+s-i-a)*(1-n):s+(i-a)*n,e.y],i=!0,("left"===r?o>e.x||ot.x)&&(i=!1),e=[["M",e.x,e.y]],i&&e.push(n),e.push(["L",t.x,t.y]),e}}}),t})),t(n,"Series/Pie/PieSeries.js",[n["Series/CenteredUtilities.js"],n["Series/Column/ColumnSeries.js"],n["Core/Globals.js"],n["Core/Legend/LegendSymbol.js"],n["Series/Pie/PiePoint.js"],n["Core/Series/Series.js"],n["Core/Series/SeriesRegistry.js"],n["Core/Renderer/SVG/Symbols.js"],n["Core/Utilities.js"]],(function(e,t,n,r,i,o,s,a,l){var c=this&&this.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),u=e.getStartAndEndRadians;n=n.noop;var d=l.clamp,h=l.extend,p=l.fireEvent,f=l.merge,m=l.pick,g=l.relativeLength;return l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.center=void 0,t.data=void 0,t.maxLabelDistance=void 0,t.options=void 0,t.points=void 0,t}return c(t,e),t.prototype.animate=function(e){var t=this,n=t.points,r=t.startAngleRad;e||n.forEach((function(e){var n=e.graphic,i=e.shapeArgs;n&&i&&(n.attr({r:m(e.startR,t.center&&t.center[3]/2),start:r,end:r}),n.animate({r:i.r,start:i.start,end:i.end},t.options.animation))}))},t.prototype.drawEmpty=function(){var e=this.startAngleRad,t=this.endAngleRad,n=this.options;if(0===this.total&&this.center){var r=this.center[0],i=this.center[1];this.graph||(this.graph=this.chart.renderer.arc(r,i,this.center[1]/2,0,e,t).addClass("highcharts-empty-series").add(this.group)),this.graph.attr({d:a.arc(r,i,this.center[2]/2,0,{start:e,end:t,innerR:this.center[3]/2})}),this.chart.styledMode||this.graph.attr({"stroke-width":n.borderWidth,fill:n.fillColor||"none",stroke:n.color||"#cccccc"})}else this.graph&&(this.graph=this.graph.destroy())},t.prototype.drawPoints=function(){var e=this.chart.renderer;this.points.forEach((function(t){t.graphic&&t.hasNewShapeType()&&(t.graphic=t.graphic.destroy()),t.graphic||(t.graphic=e[t.shapeType](t.shapeArgs).add(t.series.group),t.delayedRendering=!0)}))},t.prototype.generatePoints=function(){e.prototype.generatePoints.call(this),this.updateTotals()},t.prototype.getX=function(e,t,n){var r=this.center,i=this.radii?this.radii[n.index]||0:r[2]/2;return e=Math.asin(d((e-r[1])/(i+n.labelDistance),-1,1)),r[0]+(t?-1:1)*Math.cos(e)*(i+n.labelDistance)+(01.5*Math.PI?b-=2*Math.PI:b<-Math.PI/2&&(b+=2*Math.PI),h.slicedTranslation={translateX:Math.round(Math.cos(b)*n),translateY:Math.round(Math.sin(b)*n)},v=Math.cos(b)*e[2]/2;var y=Math.sin(b)*e[2]/2;h.tooltipPos=[e[0]+.7*v,e[1]+.7*y],h.half=b<-Math.PI/2||b>Math.PI/2?1:0,h.angle=b,f=Math.min(r,h.labelDistance/5),h.labelPosition={natural:{x:e[0]+v+Math.cos(b)*h.labelDistance,y:e[1]+y+Math.sin(b)*h.labelDistance},final:{},alignment:0>h.labelDistance?"center":h.half?"right":"left",connectorPosition:{breakAt:{x:e[0]+v+Math.cos(b)*f,y:e[1]+y+Math.sin(b)*f},touchingSliceAt:{x:e[0]+v,y:e[1]+y}}}}p(this,"afterTranslate")},t.prototype.updateTotals=function(){var e,t=this.points,n=t.length,r=this.options.ignoreHiddenPoint,i=0;for(e=0;eE&&(e.dataLabel.css({width:Math.round(.7*E)+"px"}),e.dataLabel.shortened=!0)):(e.dataLabel=e.dataLabel.destroy(),e.dataLabels&&1===e.dataLabels.length&&delete e.dataLabels))})),M.forEach((function(t,n){var l,c=t.length,h=[];if(c){if(v.sortByAngle(t,n-.5),0w-x&&0===n&&(y=Math.round(u+i-w+x),P[1]=Math.max(y,P[1])),0>f-s/2?P[0]=Math.max(Math.round(s/2-f),P[0]):f+s/2>k&&(P[2]=Math.max(Math.round(f+s/2-k),P[2])),r.sideOverflow=y)}}})),0===c(P)||this.verifyDataLabelOverflow(P))&&(this.placeDataLabels(),this.points.forEach((function(e){var i;(b=h(S,e.options.dataLabels),t=p(b.connectorWidth,1))&&(n=e.connector,(r=e.dataLabel)&&r._pos&&e.visible&&0t.bottom-2?r:n,t.half,t)},justify:function(e,t,n){return n[0]+(e.half?-1:1)*(t+e.labelDistance)},alignToPlotEdges:function(e,t,n,r){return e=e.getBBox().width,t?e+r:n-e-r},alignToConnectors:function(e,t,n,r){var i,o=0;return e.forEach((function(e){(i=e.dataLabel.getBBox().width)>o&&(o=i)})),t?o+r:n-o-r}};t.compose=function(t){e.compose(l),-1===o.indexOf(t)&&(o.push(t),(t=t.prototype).dataLabelPositioners=m,t.alignDataLabel=s,t.drawDataLabels=n,t.placeDataLabels=r,t.verifyDataLabelOverflow=i)}}(o||(o={})),o})),t(n,"Extensions/OverlappingDataLabels.js",[n["Core/Chart/Chart.js"],n["Core/Utilities.js"]],(function(e,t){function n(e,t){var n=!1;if(e){var r=e.newOpacity;e.oldOpacity!==r&&(e.alignAttr&&e.placed?(e[r?"removeClass":"addClass"]("highcharts-data-label-hidden"),n=!0,e.alignAttr.opacity=r,e[e.isOld?"animate":"attr"](e.alignAttr,null,(function(){t.styledMode||e.css({pointerEvents:r?"auto":"none"})})),i(t,"afterHideOverlappingLabel")):e.attr({opacity:r})),e.isOld=!0}return n}var r=t.addEvent,i=t.fireEvent,o=t.isArray,s=t.isNumber,a=t.objectEach,l=t.pick;r(e,"render",(function(){var e=this,t=[];(this.labelCollectors||[]).forEach((function(e){t=t.concat(e())})),(this.yAxis||[]).forEach((function(e){e.stacking&&e.options.stackLabels&&!e.options.stackLabels.allowOverlap&&a(e.stacking.stacks,(function(e){a(e,(function(e){e.label&&"hidden"!==e.label.visibility&&t.push(e.label)}))}))})),(this.series||[]).forEach((function(r){var i=r.options.dataLabels;r.visible&&(!1!==i.enabled||r._hasPointLabels)&&((i=function(r){return r.forEach((function(r){r.visible&&(o(r.dataLabels)?r.dataLabels:r.dataLabel?[r.dataLabel]:[]).forEach((function(i){var o=i.options;i.labelrank=l(o.labelrank,r.labelrank,r.shapeArgs&&r.shapeArgs.height),o.allowOverlap?(i.oldOpacity=i.opacity,i.newOpacity=1,n(i,e)):t.push(i)}))}))})(r.nodes||[]),i(r.points))})),this.hideOverlappingLabels(t)})),e.prototype.hideOverlappingLabels=function(e){var t,r,o,a=this,l=e.length,c=a.renderer,u=!1,d=function(e){var t,n,r=e.box?0:e.padding||0,i=t=0;if(e&&(!e.alignAttr||e.placed)){var o=e.alignAttr||{x:e.attr("x"),y:e.attr("y")},a=e.parentGroup;e.width||(t=e.getBBox(),e.width=t.width,e.height=t.height,t=c.fontMetrics(null,e.element).h);var l=e.width-2*r;return(n={left:"0",center:"0.5",right:"1"}[e.alignValue])?i=+n*l:s(e.x)&&Math.round(e.x)!==e.translateX&&(i=e.x-e.translateX),{x:o.x+(a.translateX||0)+r-(i||0),y:o.y+(a.translateY||0)+r-t,width:e.width-2*r,height:e.height-2*r}}};for(r=0;r=h.x+h.width||p.x+p.width<=h.x||p.y>=h.y+h.height||p.y+p.height<=h.y||((d.labelrank=l(n.minWidth,0)&&this.chartHeight>=l(n.minHeight,0)}).call(this)&&t.push(e._id)},e.prototype.setResponsive=function(e,t){var n=this,i=this.options.responsive,o=this.currentResponsive,a=[];!t&&i&&i.rules&&i.rules.forEach((function(e){void 0===e._id&&(e._id=u()),n.matchResponsiveRule(e,a)}),this),(t=s.apply(void 0,a.map((function(e){return r((i||{}).rules||[],(function(t){return t._id===e}))})).map((function(e){return e&&e.chartOptions})))).isResponsiveOptions=!0,(a=a.toString()||void 0)!==(o&&o.ruleIds)&&(o&&this.update(o.undoOptions,e,!0),a?((o=this.currentOptions(t)).isResponsiveOptions=!0,this.currentResponsive={ruleIds:a,mergedOptions:t,undoOptions:o},this.update(t,e,!0)):this.currentResponsive=void 0)},e}()}(t||(t={})),t})),t(n,"masters/highcharts.src.js",[n["Core/Globals.js"],n["Core/Utilities.js"],n["Core/DefaultOptions.js"],n["Core/Animation/Fx.js"],n["Core/Animation/AnimationUtilities.js"],n["Core/Renderer/HTML/AST.js"],n["Core/FormatUtilities.js"],n["Core/Renderer/RendererUtilities.js"],n["Core/Renderer/SVG/SVGElement.js"],n["Core/Renderer/SVG/SVGRenderer.js"],n["Core/Renderer/HTML/HTMLElement.js"],n["Core/Renderer/HTML/HTMLRenderer.js"],n["Core/Axis/Axis.js"],n["Core/Axis/DateTimeAxis.js"],n["Core/Axis/LogarithmicAxis.js"],n["Core/Axis/PlotLineOrBand/PlotLineOrBand.js"],n["Core/Axis/Tick.js"],n["Core/Tooltip.js"],n["Core/Series/Point.js"],n["Core/Pointer.js"],n["Core/MSPointer.js"],n["Core/Legend/Legend.js"],n["Core/Chart/Chart.js"],n["Core/Series/Series.js"],n["Core/Series/SeriesRegistry.js"],n["Series/Column/ColumnSeries.js"],n["Series/Column/ColumnDataLabel.js"],n["Series/Pie/PieSeries.js"],n["Series/Pie/PieDataLabel.js"],n["Core/Series/DataLabel.js"],n["Core/Responsive.js"],n["Core/Color/Color.js"],n["Core/Time.js"]],(function(e,t,n,r,i,o,s,a,l,c,u,d,h,p,f,m,g,b,v,y,_,S,x,w,k,O,E,A,T,C,M,P,$){return e.animate=i.animate,e.animObject=i.animObject,e.getDeferredAnimation=i.getDeferredAnimation,e.setAnimation=i.setAnimation,e.stop=i.stop,e.timers=r.timers,e.AST=o,e.Axis=h,e.Chart=x,e.chart=x.chart,e.Fx=r,e.Legend=S,e.PlotLineOrBand=m,e.Point=v,e.Pointer=_.isRequired()?_:y,e.Series=w,e.SVGElement=l,e.SVGRenderer=c,e.Tick=g,e.Time=$,e.Tooltip=b,e.Color=P,e.color=P.parse,d.compose(c),u.compose(l),e.defaultOptions=n.defaultOptions,e.getOptions=n.getOptions,e.time=n.defaultTime,e.setOptions=n.setOptions,e.dateFormat=s.dateFormat,e.format=s.format,e.numberFormat=s.numberFormat,e.addEvent=t.addEvent,e.arrayMax=t.arrayMax,e.arrayMin=t.arrayMin,e.attr=t.attr,e.clearTimeout=t.clearTimeout,e.correctFloat=t.correctFloat,e.createElement=t.createElement,e.css=t.css,e.defined=t.defined,e.destroyObjectProperties=t.destroyObjectProperties,e.discardElement=t.discardElement,e.distribute=a.distribute,e.erase=t.erase,e.error=t.error,e.extend=t.extend,e.extendClass=t.extendClass,e.find=t.find,e.fireEvent=t.fireEvent,e.getMagnitude=t.getMagnitude,e.getStyle=t.getStyle,e.inArray=t.inArray,e.isArray=t.isArray,e.isClass=t.isClass,e.isDOMElement=t.isDOMElement,e.isFunction=t.isFunction,e.isNumber=t.isNumber,e.isObject=t.isObject,e.isString=t.isString,e.keys=t.keys,e.merge=t.merge,e.normalizeTickInterval=t.normalizeTickInterval,e.objectEach=t.objectEach,e.offset=t.offset,e.pad=t.pad,e.pick=t.pick,e.pInt=t.pInt,e.relativeLength=t.relativeLength,e.removeEvent=t.removeEvent,e.seriesType=k.seriesType,e.splat=t.splat,e.stableSort=t.stableSort,e.syncTimeout=t.syncTimeout,e.timeUnits=t.timeUnits,e.uniqueKey=t.uniqueKey,e.useSerialIds=t.useSerialIds,e.wrap=t.wrap,E.compose(O),C.compose(w),p.compose(h),f.compose(h),T.compose(A),m.compose(h),M.compose(x),e})),n["masters/highcharts.src.js"]._modules=n,n["masters/highcharts.src.js"]}))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,i,o=function(){function e(e,t){for(var n=0;n=t.status}function i(e){try{e.dispatchEvent(new MouseEvent("click"))}catch(n){var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var o="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof n&&n.global===n?n:void 0,s=o.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),a=o.saveAs||("object"!=typeof window||window!==o?function(){}:"download"in HTMLAnchorElement.prototype&&!s?function(e,n,s){var a=o.URL||o.webkitURL,l=document.createElement("a");n=n||e.name||"download",l.download=n,l.rel="noopener","string"==typeof e?(l.href=e,l.origin===location.origin?i(l):r(l.href)?t(e,n,s):i(l,l.target="_blank")):(l.href=a.createObjectURL(e),setTimeout((function(){a.revokeObjectURL(l.href)}),4e4),setTimeout((function(){i(l)}),0))}:"msSaveOrOpenBlob"in navigator?function(e,n,o){if(n=n||e.name||"download","string"!=typeof e)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(e,o),n);else if(r(e))t(e,n,o);else{var s=document.createElement("a");s.href=e,s.target="_blank",setTimeout((function(){i(s)}))}}:function(e,n,r,i){if((i=i||open("","_blank"))&&(i.document.title=i.document.body.innerText="downloading..."),"string"==typeof e)return t(e,n,r);var a="application/octet-stream"===e.type,l=/constructor/i.test(o.HTMLElement)||o.safari,c=/CriOS\/[\d]+/.test(navigator.userAgent);if((c||a&&l||s)&&"undefined"!=typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=c?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),i?i.location.href=e:location=e,i=null},u.readAsDataURL(e)}else{var d=o.URL||o.webkitURL,h=d.createObjectURL(e);i?i.location=h:location.href=h,i=null,setTimeout((function(){d.revokeObjectURL(h)}),4e4)}});o.saveAs=a.saveAs=a,e.exports=a})?r.apply(t,i):r)||(e.exports=o)}).call(this,n(29))},function(e,t,n){e.exports=n(376)},function(e,t,n){(function(t,n,r,i){e.exports=function e(t,n,r){function i(s,a){if(!n[s]){if(!t[s]){if(o)return o(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[s]={exports:{}};t[s][0].call(c.exports,(function(e){return i(t[s][1][e]||e)}),c,c.exports,e,t,n,r)}return n[s].exports}for(var o=!1,s=0;s>2,a=(3&t)<<4|n>>4,l=1>6:64,c=2>4,n=(15&s)<<4|(a=o.indexOf(e.charAt(c++)))>>2,r=(3&a)<<6|(l=o.indexOf(e.charAt(c++))),h[u++]=t,64!==a&&(h[u++]=n),64!==l&&(h[u++]=r);return h}},{"./support":30,"./utils":32}],2:[function(e,t,n){"use strict";var r=e("./external"),i=e("./stream/DataWorker"),o=e("./stream/Crc32Probe"),s=e("./stream/DataLengthProbe");function a(e,t,n,r,i){this.compressedSize=e,this.uncompressedSize=t,this.crc32=n,this.compression=r,this.compressedContent=i}a.prototype={getContentWorker:function(){var e=new i(r.Promise.resolve(this.compressedContent)).pipe(this.compression.uncompressWorker()).pipe(new s("data_length")),t=this;return e.on("end",(function(){if(this.streamInfo.data_length!==t.uncompressedSize)throw new Error("Bug : uncompressed data size mismatch")})),e},getCompressedWorker:function(){return new i(r.Promise.resolve(this.compressedContent)).withStreamInfo("compressedSize",this.compressedSize).withStreamInfo("uncompressedSize",this.uncompressedSize).withStreamInfo("crc32",this.crc32).withStreamInfo("compression",this.compression)}},a.createWorkerFrom=function(e,t,n){return e.pipe(new o).pipe(new s("uncompressedSize")).pipe(t.compressWorker(n)).pipe(new s("compressedSize")).withStreamInfo("compression",t)},t.exports=a},{"./external":6,"./stream/Crc32Probe":25,"./stream/DataLengthProbe":26,"./stream/DataWorker":27}],3:[function(e,t,n){"use strict";var r=e("./stream/GenericWorker");n.STORE={magic:"\0\0",compressWorker:function(){return new r("STORE compression")},uncompressWorker:function(){return new r("STORE decompression")}},n.DEFLATE=e("./flate")},{"./flate":7,"./stream/GenericWorker":28}],4:[function(e,t,n){"use strict";var r=e("./utils"),i=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var r=0;r<8;r++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t){return void 0!==e&&e.length?"string"!==r.getTypeOf(e)?function(e,t,n,r){var o=i,s=0+n;e^=-1;for(var a=0;a>>8^o[255&(e^t[a])];return-1^e}(0|t,e,e.length):function(e,t,n,r){var o=i,s=0+n;e^=-1;for(var a=0;a>>8^o[255&(e^t.charCodeAt(a))];return-1^e}(0|t,e,e.length):0}},{"./utils":32}],5:[function(e,t,n){"use strict";n.base64=!1,n.binary=!1,n.dir=!1,n.createFolders=!0,n.date=null,n.compression=null,n.compressionOptions=null,n.comment=null,n.unixPermissions=null,n.dosPermissions=null},{}],6:[function(e,t,n){"use strict";var r;r="undefined"!=typeof Promise?Promise:e("lie"),t.exports={Promise:r}},{lie:37}],7:[function(e,t,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Uint32Array,i=e("pako"),o=e("./utils"),s=e("./stream/GenericWorker"),a=r?"uint8array":"array";function l(e,t){s.call(this,"FlateWorker/"+e),this._pako=null,this._pakoAction=e,this._pakoOptions=t,this.meta={}}n.magic="\b\0",o.inherits(l,s),l.prototype.processChunk=function(e){this.meta=e.meta,null===this._pako&&this._createPako(),this._pako.push(o.transformTo(a,e.data),!1)},l.prototype.flush=function(){s.prototype.flush.call(this),null===this._pako&&this._createPako(),this._pako.push([],!0)},l.prototype.cleanUp=function(){s.prototype.cleanUp.call(this),this._pako=null},l.prototype._createPako=function(){this._pako=new i[this._pakoAction]({raw:!0,level:this._pakoOptions.level||-1});var e=this;this._pako.onData=function(t){e.push({data:t,meta:e.meta})}},n.compressWorker=function(e){return new l("Deflate",e)},n.uncompressWorker=function(){return new l("Inflate",{})}},{"./stream/GenericWorker":28,"./utils":32,pako:38}],8:[function(e,t,n){"use strict";function r(e,t){var n,r="";for(n=0;n>>=8;return r}function i(e,t,n,i,s,u){var d,h,p=e.file,f=e.compression,m=u!==a.utf8encode,g=o.transformTo("string",u(p.name)),b=o.transformTo("string",a.utf8encode(p.name)),v=p.comment,y=o.transformTo("string",u(v)),_=o.transformTo("string",a.utf8encode(v)),S=b.length!==p.name.length,x=_.length!==v.length,w="",k="",O="",E=p.dir,A=p.date,T={crc32:0,compressedSize:0,uncompressedSize:0};t&&!n||(T.crc32=e.crc32,T.compressedSize=e.compressedSize,T.uncompressedSize=e.uncompressedSize);var C=0;t&&(C|=8),m||!S&&!x||(C|=2048);var M=0,P=0;E&&(M|=16),"UNIX"===s?(P=798,M|=function(e,t){var n=e;return e||(n=t?16893:33204),(65535&n)<<16}(p.unixPermissions,E)):(P=20,M|=function(e){return 63&(e||0)}(p.dosPermissions)),d=A.getUTCHours(),d<<=6,d|=A.getUTCMinutes(),d<<=5,d|=A.getUTCSeconds()/2,h=A.getUTCFullYear()-1980,h<<=4,h|=A.getUTCMonth()+1,h<<=5,h|=A.getUTCDate(),S&&(k=r(1,1)+r(l(g),4)+b,w+="up"+r(k.length,2)+k),x&&(O=r(1,1)+r(l(y),4)+_,w+="uc"+r(O.length,2)+O);var $="";return $+="\n\0",$+=r(C,2),$+=f.magic,$+=r(d,2),$+=r(h,2),$+=r(T.crc32,4),$+=r(T.compressedSize,4),$+=r(T.uncompressedSize,4),$+=r(g.length,2),$+=r(w.length,2),{fileRecord:c.LOCAL_FILE_HEADER+$+g+w,dirRecord:c.CENTRAL_FILE_HEADER+r(P,2)+$+r(y.length,2)+"\0\0\0\0"+r(M,4)+r(i,4)+g+w+y}}var o=e("../utils"),s=e("../stream/GenericWorker"),a=e("../utf8"),l=e("../crc32"),c=e("../signature");function u(e,t,n,r){s.call(this,"ZipFileWorker"),this.bytesWritten=0,this.zipComment=t,this.zipPlatform=n,this.encodeFileName=r,this.streamFiles=e,this.accumulate=!1,this.contentBuffer=[],this.dirRecords=[],this.currentSourceOffset=0,this.entriesCount=0,this.currentFile=null,this._sources=[]}o.inherits(u,s),u.prototype.push=function(e){var t=e.meta.percent||0,n=this.entriesCount,r=this._sources.length;this.accumulate?this.contentBuffer.push(e):(this.bytesWritten+=e.data.length,s.prototype.push.call(this,{data:e.data,meta:{currentFile:this.currentFile,percent:n?(t+100*(n-r-1))/n:100}}))},u.prototype.openedSource=function(e){this.currentSourceOffset=this.bytesWritten,this.currentFile=e.file.name;var t=this.streamFiles&&!e.file.dir;if(t){var n=i(e,t,!1,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);this.push({data:n.fileRecord,meta:{percent:0}})}else this.accumulate=!0},u.prototype.closedSource=function(e){this.accumulate=!1;var t=this.streamFiles&&!e.file.dir,n=i(e,t,!0,this.currentSourceOffset,this.zipPlatform,this.encodeFileName);if(this.dirRecords.push(n.dirRecord),t)this.push({data:function(e){return c.DATA_DESCRIPTOR+r(e.crc32,4)+r(e.compressedSize,4)+r(e.uncompressedSize,4)}(e),meta:{percent:100}});else for(this.push({data:n.fileRecord,meta:{percent:0}});this.contentBuffer.length;)this.push(this.contentBuffer.shift());this.currentFile=null},u.prototype.flush=function(){for(var e=this.bytesWritten,t=0;t=this.index;t--)n=(n<<8)+this.byteAt(t);return this.index+=e,n},readString:function(e){return r.transformTo("string",this.readData(e))},readData:function(){},lastIndexOfSignature:function(){},readAndCheckSignature:function(){},readDate:function(){var e=this.readInt(4);return new Date(Date.UTC(1980+(e>>25&127),(e>>21&15)-1,e>>16&31,e>>11&31,e>>5&63,(31&e)<<1))}},t.exports=i},{"../utils":32}],19:[function(e,t,n){"use strict";var r=e("./Uint8ArrayReader");function i(e){r.call(this,e)}e("../utils").inherits(i,r),i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./Uint8ArrayReader":21}],20:[function(e,t,n){"use strict";var r=e("./DataReader");function i(e){r.call(this,e)}e("../utils").inherits(i,r),i.prototype.byteAt=function(e){return this.data.charCodeAt(this.zero+e)},i.prototype.lastIndexOfSignature=function(e){return this.data.lastIndexOf(e)-this.zero},i.prototype.readAndCheckSignature=function(e){return e===this.readData(4)},i.prototype.readData=function(e){this.checkOffset(e);var t=this.data.slice(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./DataReader":18}],21:[function(e,t,n){"use strict";var r=e("./ArrayReader");function i(e){r.call(this,e)}e("../utils").inherits(i,r),i.prototype.readData=function(e){if(this.checkOffset(e),0===e)return new Uint8Array(0);var t=this.data.subarray(this.zero+this.index,this.zero+this.index+e);return this.index+=e,t},t.exports=i},{"../utils":32,"./ArrayReader":17}],22:[function(e,t,n){"use strict";var r=e("../utils"),i=e("../support"),o=e("./ArrayReader"),s=e("./StringReader"),a=e("./NodeBufferReader"),l=e("./Uint8ArrayReader");t.exports=function(e){var t=r.getTypeOf(e);return r.checkSupport(t),"string"!==t||i.uint8array?"nodebuffer"===t?new a(e):i.uint8array?new l(r.transformTo("uint8array",e)):new o(r.transformTo("array",e)):new s(e)}},{"../support":30,"../utils":32,"./ArrayReader":17,"./NodeBufferReader":19,"./StringReader":20,"./Uint8ArrayReader":21}],23:[function(e,t,n){"use strict";n.LOCAL_FILE_HEADER="PK",n.CENTRAL_FILE_HEADER="PK",n.CENTRAL_DIRECTORY_END="PK",n.ZIP64_CENTRAL_DIRECTORY_LOCATOR="PK",n.ZIP64_CENTRAL_DIRECTORY_END="PK",n.DATA_DESCRIPTOR="PK\b"},{}],24:[function(e,t,n){"use strict";var r=e("./GenericWorker"),i=e("../utils");function o(e){r.call(this,"ConvertWorker to "+e),this.destType=e}i.inherits(o,r),o.prototype.processChunk=function(e){this.push({data:i.transformTo(this.destType,e.data),meta:e.meta})},t.exports=o},{"../utils":32,"./GenericWorker":28}],25:[function(e,t,n){"use strict";var r=e("./GenericWorker"),i=e("../crc32");function o(){r.call(this,"Crc32Probe"),this.withStreamInfo("crc32",0)}e("../utils").inherits(o,r),o.prototype.processChunk=function(e){this.streamInfo.crc32=i(e.data,this.streamInfo.crc32||0),this.push(e)},t.exports=o},{"../crc32":4,"../utils":32,"./GenericWorker":28}],26:[function(e,t,n){"use strict";var r=e("../utils"),i=e("./GenericWorker");function o(e){i.call(this,"DataLengthProbe for "+e),this.propName=e,this.withStreamInfo(e,0)}r.inherits(o,i),o.prototype.processChunk=function(e){if(e){var t=this.streamInfo[this.propName]||0;this.streamInfo[this.propName]=t+e.data.length}i.prototype.processChunk.call(this,e)},t.exports=o},{"../utils":32,"./GenericWorker":28}],27:[function(e,t,n){"use strict";var r=e("../utils"),i=e("./GenericWorker");function o(e){i.call(this,"DataWorker");var t=this;this.dataIsReady=!1,this.index=0,this.max=0,this.data=null,this.type="",this._tickScheduled=!1,e.then((function(e){t.dataIsReady=!0,t.data=e,t.max=e&&e.length||0,t.type=r.getTypeOf(e),t.isPaused||t._tickAndRepeat()}),(function(e){t.error(e)}))}r.inherits(o,i),o.prototype.cleanUp=function(){i.prototype.cleanUp.call(this),this.data=null},o.prototype.resume=function(){return!!i.prototype.resume.call(this)&&(!this._tickScheduled&&this.dataIsReady&&(this._tickScheduled=!0,r.delay(this._tickAndRepeat,[],this)),!0)},o.prototype._tickAndRepeat=function(){this._tickScheduled=!1,this.isPaused||this.isFinished||(this._tick(),this.isFinished||(r.delay(this._tickAndRepeat,[],this),this._tickScheduled=!0))},o.prototype._tick=function(){if(this.isPaused||this.isFinished)return!1;var e=null,t=Math.min(this.max,this.index+16384);if(this.index>=this.max)return this.end();switch(this.type){case"string":e=this.data.substring(this.index,t);break;case"uint8array":e=this.data.subarray(this.index,t);break;case"array":case"nodebuffer":e=this.data.slice(this.index,t)}return this.index=t,this.push({data:e,meta:{percent:this.max?this.index/this.max*100:0}})},t.exports=o},{"../utils":32,"./GenericWorker":28}],28:[function(e,t,n){"use strict";function r(e){this.name=e||"default",this.streamInfo={},this.generatedError=null,this.extraStreamInfo={},this.isPaused=!0,this.isFinished=!1,this.isLocked=!1,this._listeners={data:[],end:[],error:[]},this.previous=null}r.prototype={push:function(e){this.emit("data",e)},end:function(){if(this.isFinished)return!1;this.flush();try{this.emit("end"),this.cleanUp(),this.isFinished=!0}catch(e){this.emit("error",e)}return!0},error:function(e){return!this.isFinished&&(this.isPaused?this.generatedError=e:(this.isFinished=!0,this.emit("error",e),this.previous&&this.previous.error(e),this.cleanUp()),!0)},on:function(e,t){return this._listeners[e].push(t),this},cleanUp:function(){this.streamInfo=this.generatedError=this.extraStreamInfo=null,this._listeners=[]},emit:function(e,t){if(this._listeners[e])for(var n=0;n "+e:e}},t.exports=r},{}],29:[function(e,n,r){"use strict";var i=e("../utils"),o=e("./ConvertWorker"),s=e("./GenericWorker"),a=e("../base64"),l=e("../support"),c=e("../external"),u=null;if(l.nodestream)try{u=e("../nodejs/NodejsStreamOutputAdapter")}catch(e){}function d(e,t,n){var r=t;switch(t){case"blob":case"arraybuffer":r="uint8array";break;case"base64":r="string"}try{this._internalType=r,this._outputType=t,this._mimeType=n,i.checkSupport(r),this._worker=e.pipe(new o(r)),e.lock()}catch(e){this._worker=new s("error"),this._worker.error(e)}}d.prototype={accumulate:function(e){return function(e,n){return new c.Promise((function(r,o){var s=[],l=e._internalType,c=e._outputType,u=e._mimeType;e.on("data",(function(e,t){s.push(e),n&&n(t)})).on("error",(function(e){s=[],o(e)})).on("end",(function(){try{var e=function(e,t,n){switch(e){case"blob":return i.newBlob(i.transformTo("arraybuffer",t),n);case"base64":return a.encode(t);default:return i.transformTo(e,t)}}(c,function(e,n){var r,i=0,o=null,s=0;for(r=0;r>>6:(n<65536?t[s++]=224|n>>>12:(t[s++]=240|n>>>18,t[s++]=128|n>>>12&63),t[s++]=128|n>>>6&63),t[s++]=128|63&n);return t}(e)},n.utf8decode=function(e){return i.nodebuffer?r.transformTo("nodebuffer",e).toString("utf-8"):function(e){var t,n,i,o,s=e.length,l=new Array(2*s);for(t=n=0;t>10&1023,l[n++]=56320|1023&i)}return l.length!==n&&(l.subarray?l=l.subarray(0,n):l.length=n),r.applyFromCharCode(l)}(e=r.transformTo(i.uint8array?"uint8array":"array",e))},r.inherits(c,s),c.prototype.processChunk=function(e){var t=r.transformTo(i.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var o=t;(t=new Uint8Array(o.length+this.leftOver.length)).set(this.leftOver,0),t.set(o,this.leftOver.length)}else t=this.leftOver.concat(t);this.leftOver=null}var s=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;0<=n&&128==(192&e[n]);)n--;return n<0||0===n?t:n+a[e[n]]>t?n:t}(t),l=t;s!==t.length&&(i.uint8array?(l=t.subarray(0,s),this.leftOver=t.subarray(s,t.length)):(l=t.slice(0,s),this.leftOver=t.slice(s,t.length))),this.push({data:n.utf8decode(l),meta:e.meta})},c.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:n.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},n.Utf8DecodeWorker=c,r.inherits(u,s),u.prototype.processChunk=function(e){this.push({data:n.utf8encode(e.data),meta:e.meta})},n.Utf8EncodeWorker=u},{"./nodejsUtils":14,"./stream/GenericWorker":28,"./support":30,"./utils":32}],32:[function(e,t,r){"use strict";var i=e("./support"),o=e("./base64"),s=e("./nodejsUtils"),a=e("./external");function l(e){return e}function c(e,t){for(var n=0;n>8;this.dir=!!(16&this.externalFileAttributes),0==e&&(this.dosPermissions=63&this.externalFileAttributes),3==e&&(this.unixPermissions=this.externalFileAttributes>>16&65535),this.dir||"/"!==this.fileNameStr.slice(-1)||(this.dir=!0)},parseZIP64ExtraField:function(){if(this.extraFields[1]){var e=r(this.extraFields[1].value);this.uncompressedSize===i.MAX_VALUE_32BITS&&(this.uncompressedSize=e.readInt(8)),this.compressedSize===i.MAX_VALUE_32BITS&&(this.compressedSize=e.readInt(8)),this.localHeaderOffset===i.MAX_VALUE_32BITS&&(this.localHeaderOffset=e.readInt(8)),this.diskNumberStart===i.MAX_VALUE_32BITS&&(this.diskNumberStart=e.readInt(4))}},readExtraFields:function(e){var t,n,r,i=e.index+this.extraFieldsLength;for(this.extraFields||(this.extraFields={});e.index+4>>6:(n<65536?t[s++]=224|n>>>12:(t[s++]=240|n>>>18,t[s++]=128|n>>>12&63),t[s++]=128|n>>>6&63),t[s++]=128|63&n);return t},n.buf2binstring=function(e){return l(e,e.length)},n.binstring2buf=function(e){for(var t=new r.Buf8(e.length),n=0,i=t.length;n>10&1023,c[r++]=56320|1023&i)}return l(c,r)},n.utf8border=function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;0<=n&&128==(192&e[n]);)n--;return n<0||0===n?t:n+s[e[n]]>t?n:t}},{"./common":41}],43:[function(e,t,n){"use strict";t.exports=function(e,t,n,r){for(var i=65535&e|0,o=e>>>16&65535|0,s=0;0!==n;){for(n-=s=2e3>>1:e>>>1;t[n]=e}return t}();t.exports=function(e,t,n,i){var o=r,s=i+n;e^=-1;for(var a=i;a>>8^o[255&(e^t[a])];return-1^e}},{}],46:[function(e,t,n){"use strict";var r,i=e("../utils/common"),o=e("./trees"),s=e("./adler32"),a=e("./crc32"),l=e("./messages"),c=-2,u=258,d=262,h=113;function p(e,t){return e.msg=l[t],t}function f(e){return(e<<1)-(4e.avail_out&&(n=e.avail_out),0!==n&&(i.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function b(e,t){o._tr_flush_block(e,0<=e.block_start?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,g(e.strm)}function v(e,t){e.pending_buf[e.pending++]=t}function y(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function _(e,t){var n,r,i=e.max_chain_length,o=e.strstart,s=e.prev_length,a=e.nice_match,l=e.strstart>e.w_size-d?e.strstart-(e.w_size-d):0,c=e.window,h=e.w_mask,p=e.prev,f=e.strstart+u,m=c[o+s-1],g=c[o+s];e.prev_length>=e.good_match&&(i>>=2),a>e.lookahead&&(a=e.lookahead);do{if(c[(n=t)+s]===g&&c[n+s-1]===m&&c[n]===c[o]&&c[++n]===c[o+1]){o+=2,n++;do{}while(c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&c[++o]===c[++n]&&ol&&0!=--i);return s<=e.lookahead?s:e.lookahead}function S(e){var t,n,r,o,l,c,u,h,p,f,m=e.w_size;do{if(o=e.window_size-e.lookahead-e.strstart,e.strstart>=m+(m-d)){for(i.arraySet(e.window,e.window,m,m,0),e.match_start-=m,e.strstart-=m,e.block_start-=m,t=n=e.hash_size;r=e.head[--t],e.head[t]=m<=r?r-m:0,--n;);for(t=n=m;r=e.prev[--t],e.prev[t]=m<=r?r-m:0,--n;);o+=m}if(0===e.strm.avail_in)break;if(c=e.strm,u=e.window,h=e.strstart+e.lookahead,f=void 0,(p=o)<(f=c.avail_in)&&(f=p),n=0===f?0:(c.avail_in-=f,i.arraySet(u,c.input,c.next_in,f,h),1===c.state.wrap?c.adler=s(c.adler,u,f,h):2===c.state.wrap&&(c.adler=a(c.adler,u,f,h)),c.next_in+=f,c.total_in+=f,f),e.lookahead+=n,e.lookahead+e.insert>=3)for(l=e.strstart-e.insert,e.ins_h=e.window[l],e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<=3)if(r=o._tr_tally(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=3){for(e.match_length--;e.strstart++,e.ins_h=(e.ins_h<=3&&(e.ins_h=(e.ins_h<=3&&e.match_length<=e.prev_length){for(i=e.strstart+e.lookahead-3,r=o._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-3),e.lookahead-=e.prev_length-1,e.prev_length-=2;++e.strstart<=i&&(e.ins_h=(e.ins_h<e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(S(e),0===e.lookahead&&0===t)return 1;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var r=e.block_start+n;if((0===e.strstart||e.strstart>=r)&&(e.lookahead=e.strstart-r,e.strstart=r,b(e,!1),0===e.strm.avail_out))return 1;if(e.strstart-e.block_start>=e.w_size-d&&(b(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(b(e,!0),0===e.strm.avail_out?3:4):(e.strstart>e.block_start&&(b(e,!1),e.strm.avail_out),1)})),new k(4,4,8,4,x),new k(4,5,16,8,x),new k(4,6,32,32,x),new k(4,4,16,16,w),new k(8,16,32,32,w),new k(8,16,128,128,w),new k(8,32,128,256,w),new k(32,128,258,1024,w),new k(32,258,258,4096,w)],n.deflateInit=function(e,t){return T(e,t,8,15,8,0)},n.deflateInit2=T,n.deflateReset=A,n.deflateResetKeep=E,n.deflateSetHeader=function(e,t){return e&&e.state?2!==e.state.wrap?c:(e.state.gzhead=t,0):c},n.deflate=function(e,t){var n,i,s,l;if(!e||!e.state||5>8&255),v(i,i.gzhead.time>>16&255),v(i,i.gzhead.time>>24&255),v(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),v(i,255&i.gzhead.os),i.gzhead.extra&&i.gzhead.extra.length&&(v(i,255&i.gzhead.extra.length),v(i,i.gzhead.extra.length>>8&255)),i.gzhead.hcrc&&(e.adler=a(e.adler,i.pending_buf,i.pending,0)),i.gzindex=0,i.status=69):(v(i,0),v(i,0),v(i,0),v(i,0),v(i,0),v(i,9===i.level?2:2<=i.strategy||i.level<2?4:0),v(i,3),i.status=h);else{var d=8+(i.w_bits-8<<4)<<8;d|=(2<=i.strategy||i.level<2?0:i.level<6?1:6===i.level?2:3)<<6,0!==i.strstart&&(d|=32),d+=31-d%31,i.status=h,y(i,d),0!==i.strstart&&(y(i,e.adler>>>16),y(i,65535&e.adler)),e.adler=1}if(69===i.status)if(i.gzhead.extra){for(s=i.pending;i.gzindex<(65535&i.gzhead.extra.length)&&(i.pending!==i.pending_buf_size||(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),g(e),s=i.pending,i.pending!==i.pending_buf_size));)v(i,255&i.gzhead.extra[i.gzindex]),i.gzindex++;i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),i.gzindex===i.gzhead.extra.length&&(i.gzindex=0,i.status=73)}else i.status=73;if(73===i.status)if(i.gzhead.name){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),g(e),s=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindexs&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),0===l&&(i.gzindex=0,i.status=91)}else i.status=91;if(91===i.status)if(i.gzhead.comment){s=i.pending;do{if(i.pending===i.pending_buf_size&&(i.gzhead.hcrc&&i.pending>s&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),g(e),s=i.pending,i.pending===i.pending_buf_size)){l=1;break}l=i.gzindexs&&(e.adler=a(e.adler,i.pending_buf,i.pending-s,s)),0===l&&(i.status=103)}else i.status=103;if(103===i.status&&(i.gzhead.hcrc?(i.pending+2>i.pending_buf_size&&g(e),i.pending+2<=i.pending_buf_size&&(v(i,255&e.adler),v(i,e.adler>>8&255),e.adler=0,i.status=h)):i.status=h),0!==i.pending){if(g(e),0===e.avail_out)return i.last_flush=-1,0}else if(0===e.avail_in&&f(t)<=f(n)&&4!==t)return p(e,-5);if(666===i.status&&0!==e.avail_in)return p(e,-5);if(0!==e.avail_in||0!==i.lookahead||0!==t&&666!==i.status){var _=2===i.strategy?function(e,t){for(var n;;){if(0===e.lookahead&&(S(e),0===e.lookahead)){if(0===t)return 1;break}if(e.match_length=0,n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(b(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(b(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(b(e,!1),0===e.strm.avail_out)?1:2}(i,t):3===i.strategy?function(e,t){for(var n,r,i,s,a=e.window;;){if(e.lookahead<=u){if(S(e),e.lookahead<=u&&0===t)return 1;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=3&&0e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=3?(n=o._tr_tally(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=o._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(b(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,4===t?(b(e,!0),0===e.strm.avail_out?3:4):e.last_lit&&(b(e,!1),0===e.strm.avail_out)?1:2}(i,t):r[i.level].func(i,t);if(3!==_&&4!==_||(i.status=666),1===_||3===_)return 0===e.avail_out&&(i.last_flush=-1),0;if(2===_&&(1===t?o._tr_align(i):5!==t&&(o._tr_stored_block(i,0,0,!1),3===t&&(m(i.head),0===i.lookahead&&(i.strstart=0,i.block_start=0,i.insert=0))),g(e),0===e.avail_out))return i.last_flush=-1,0}return 4!==t?0:i.wrap<=0?1:(2===i.wrap?(v(i,255&e.adler),v(i,e.adler>>8&255),v(i,e.adler>>16&255),v(i,e.adler>>24&255),v(i,255&e.total_in),v(i,e.total_in>>8&255),v(i,e.total_in>>16&255),v(i,e.total_in>>24&255)):(y(i,e.adler>>>16),y(i,65535&e.adler)),g(e),0=n.w_size&&(0===a&&(m(n.head),n.strstart=0,n.block_start=0,n.insert=0),h=new i.Buf8(n.w_size),i.arraySet(h,t,p-n.w_size,n.w_size,0),t=h,p=n.w_size),l=e.avail_in,u=e.next_in,d=e.input,e.avail_in=p,e.next_in=0,e.input=t,S(n);n.lookahead>=3;){for(r=n.strstart,o=n.lookahead-2;n.ins_h=(n.ins_h<>>=_=y>>>24,f-=_,0==(_=y>>>16&255))E[o++]=65535&y;else{if(!(16&_)){if(0==(64&_)){y=m[(65535&y)+(p&(1<<_)-1)];continue t}if(32&_){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}S=65535&y,(_&=15)&&(f<_&&(p+=O[r++]<>>=_,f-=_),f<15&&(p+=O[r++]<>>=_=y>>>24,f-=_,!(16&(_=y>>>16&255))){if(0==(64&_)){y=g[(65535&y)+(p&(1<<_)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(x=65535&y,f<(_&=15)&&(p+=O[r++]<>>=_,f-=_,(_=o-s)>3,p&=(1<<(f-=S<<3))-1,e.next_in=r,e.next_out=o,e.avail_in=r>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function u(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new r.Buf16(320),this.work=new r.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function d(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=1,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new r.Buf32(852),t.distcode=t.distdyn=new r.Buf32(592),t.sane=1,t.back=-1,0):l}function h(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,d(e)):l}function p(e,t){var n,r;return e&&e.state?(r=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=s.wsize?(r.arraySet(s.window,t,n-s.wsize,s.wsize,0),s.wnext=0,s.whave=s.wsize):(i<(o=s.wsize-s.wnext)&&(o=i),r.arraySet(s.window,t,n-i,o,s.wnext),(i-=o)?(r.arraySet(s.window,t,n-i,i,0),s.wnext=i,s.whave=s.wsize):(s.wnext+=o,s.wnext===s.wsize&&(s.wnext=0),s.whave>>8&255,n.check=o(n.check,N,2,0),b=g=0,n.mode=2;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&g)<<8)+(g>>8))%31){e.msg="incorrect header check",n.mode=30;break}if(8!=(15&g)){e.msg="unknown compression method",n.mode=30;break}if(b-=4,P=8+(15&(g>>>=4)),0===n.wbits)n.wbits=P;else if(P>n.wbits){e.msg="invalid window size",n.mode=30;break}n.dmax=1<>8&1),512&n.flags&&(N[0]=255&g,N[1]=g>>>8&255,n.check=o(n.check,N,2,0)),b=g=0,n.mode=3;case 3:for(;b<32;){if(0===f)break e;f--,g+=u[h++]<>>8&255,N[2]=g>>>16&255,N[3]=g>>>24&255,n.check=o(n.check,N,4,0)),b=g=0,n.mode=4;case 4:for(;b<16;){if(0===f)break e;f--,g+=u[h++]<>8),512&n.flags&&(N[0]=255&g,N[1]=g>>>8&255,n.check=o(n.check,N,2,0)),b=g=0,n.mode=5;case 5:if(1024&n.flags){for(;b<16;){if(0===f)break e;f--,g+=u[h++]<>>8&255,n.check=o(n.check,N,2,0)),b=g=0}else n.head&&(n.head.extra=null);n.mode=6;case 6:if(1024&n.flags&&(f<(x=n.length)&&(x=f),x&&(n.head&&(P=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),r.arraySet(n.head.extra,u,h,x,P)),512&n.flags&&(n.check=o(n.check,u,x,h)),f-=x,h+=x,n.length-=x),n.length))break e;n.length=0,n.mode=7;case 7:if(2048&n.flags){if(0===f)break e;for(x=0;P=u[h+x++],n.head&&P&&n.length<65536&&(n.head.name+=String.fromCharCode(P)),P&&x>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=12;break;case 10:for(;b<32;){if(0===f)break e;f--,g+=u[h++]<>>=7&b,b-=7&b,n.mode=27;break}for(;b<3;){if(0===f)break e;f--,g+=u[h++]<>>=1)){case 0:n.mode=14;break;case 1:if(v(n),n.mode=20,6!==t)break;g>>>=2,b-=2;break e;case 2:n.mode=17;break;case 3:e.msg="invalid block type",n.mode=30}g>>>=2,b-=2;break;case 14:for(g>>>=7&b,b-=7&b;b<32;){if(0===f)break e;f--,g+=u[h++]<>>16^65535)){e.msg="invalid stored block lengths",n.mode=30;break}if(n.length=65535&g,b=g=0,n.mode=15,6===t)break e;case 15:n.mode=16;case 16:if(x=n.length){if(f>>=5,b-=5,n.ndist=1+(31&g),g>>>=5,b-=5,n.ncode=4+(15&g),g>>>=4,b-=4,286>>=3,b-=3}for(;n.have<19;)n.lens[j[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,R={bits:n.lenbits},$=a(0,n.lens,0,19,n.lencode,0,n.work,R),n.lenbits=R.bits,$){e.msg="invalid code lengths set",n.mode=30;break}n.have=0,n.mode=19;case 19:for(;n.have>>16&255,A=65535&D,!((O=D>>>24)<=b);){if(0===f)break e;f--,g+=u[h++]<>>=O,b-=O,n.lens[n.have++]=A;else{if(16===A){for(I=O+2;b>>=O,b-=O,0===n.have){e.msg="invalid bit length repeat",n.mode=30;break}P=n.lens[n.have-1],x=3+(3&g),g>>>=2,b-=2}else if(17===A){for(I=O+3;b>>=O)),g>>>=3,b-=3}else{for(I=O+7;b>>=O)),g>>>=7,b-=7}if(n.have+x>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=30;break}for(;x--;)n.lens[n.have++]=P}}if(30===n.mode)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=30;break}if(n.lenbits=9,R={bits:n.lenbits},$=a(1,n.lens,0,n.nlen,n.lencode,0,n.work,R),n.lenbits=R.bits,$){e.msg="invalid literal/lengths set",n.mode=30;break}if(n.distbits=6,n.distcode=n.distdyn,R={bits:n.distbits},$=a(2,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,R),n.distbits=R.bits,$){e.msg="invalid distances set",n.mode=30;break}if(n.mode=20,6===t)break e;case 20:n.mode=21;case 21:if(6<=f&&258<=m){e.next_out=p,e.avail_out=m,e.next_in=h,e.avail_in=f,n.hold=g,n.bits=b,s(e,S),p=e.next_out,d=e.output,m=e.avail_out,h=e.next_in,u=e.input,f=e.avail_in,g=n.hold,b=n.bits,12===n.mode&&(n.back=-1);break}for(n.back=0;E=(D=n.lencode[g&(1<>>16&255,A=65535&D,!((O=D>>>24)<=b);){if(0===f)break e;f--,g+=u[h++]<>T)])>>>16&255,A=65535&D,!(T+(O=D>>>24)<=b);){if(0===f)break e;f--,g+=u[h++]<>>=T,b-=T,n.back+=T}if(g>>>=O,b-=O,n.back+=O,n.length=A,0===E){n.mode=26;break}if(32&E){n.back=-1,n.mode=12;break}if(64&E){e.msg="invalid literal/length code",n.mode=30;break}n.extra=15&E,n.mode=22;case 22:if(n.extra){for(I=n.extra;b>>=n.extra,b-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=23;case 23:for(;E=(D=n.distcode[g&(1<>>16&255,A=65535&D,!((O=D>>>24)<=b);){if(0===f)break e;f--,g+=u[h++]<>T)])>>>16&255,A=65535&D,!(T+(O=D>>>24)<=b);){if(0===f)break e;f--,g+=u[h++]<>>=T,b-=T,n.back+=T}if(g>>>=O,b-=O,n.back+=O,64&E){e.msg="invalid distance code",n.mode=30;break}n.offset=A,n.extra=15&E,n.mode=24;case 24:if(n.extra){for(I=n.extra;b>>=n.extra,b-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=30;break}n.mode=25;case 25:if(0===m)break e;if(x=S-m,n.offset>x){if((x=n.offset-x)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=30;break}w=x>n.wnext?(x-=n.wnext,n.wsize-x):n.wnext-x,x>n.length&&(x=n.length),k=n.window}else k=d,w=p-n.offset,x=n.length;for(mv?(_=j[L+d[k]],R[I+d[k]]):(_=96,0),p=1<>C)+(f-=p)]=y<<24|_<<16|S|0,0!==f;);for(p=1<>=1;if(0!==p?($&=p-1,$+=p):$=0,k++,0==--D[w]){if(w===E)break;w=t[n+d[k]]}if(A>>7)]}function O(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function E(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<>>=1,n<<=1,0<--t;);return n>>>1}function C(e,t,n){var r,i,o=new Array(16),s=0;for(r=1;r<=l;r++)o[r]=s=s+n[r-1]<<1;for(i=0;i<=t;i++){var a=e[2*i+1];0!==a&&(e[2*i]=T(o[a]++,a))}}function M(e){var t;for(t=0;t>1;1<=n;n--)R(e,o,n);for(i=c;n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],R(e,o,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,o[2*i]=o[2*n]+o[2*r],e.depth[i]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,o[2*n+1]=o[2*r+1]=i,e.heap[1]=i++,R(e,o,1),2<=e.heap_len;);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,r,i,o,s,a,c=t.dyn_tree,u=t.max_code,d=t.stat_desc.static_tree,h=t.stat_desc.has_stree,p=t.stat_desc.extra_bits,f=t.stat_desc.extra_base,m=t.stat_desc.max_length,g=0;for(o=0;o<=l;o++)e.bl_count[o]=0;for(c[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<573;n++)m<(o=c[2*c[2*(r=e.heap[n])+1]+1]+1)&&(o=m,g++),c[2*r+1]=o,u>=7;r>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;t>>3,(s=e.static_len+3+7>>>3)<=i&&(i=s)):i=s=n+5,n+4<=i&&-1!==t?B(e,t,n,r):4===e.strategy||s===i?(E(e,2+(r?1:0),3),I(e,p,f)):(E(e,4+(r?1:0),3),function(e,t,n,r){var i;for(E(e,t-257,5),E(e,n-1,5),E(e,r-4,4),i=0;i>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(g[n]+o+1)]++,e.dyn_dtree[2*k(t)]++),e.last_lit===e.lit_bufsize-1},n._tr_align=function(e){E(e,2,3),A(e,256,p),function(e){16===e.bi_valid?(O(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):8<=e.bi_valid&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}},{"../utils/common":41}],53:[function(e,t,n){"use strict";t.exports=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}},{}],54:[function(e,t,n){(function(e){!function(e,t){"use strict";if(!e.setImmediate){var n,r,o,s,a=1,l={},c=!1,u=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,n="[object process]"==={}.toString.call(e.process)?function(e){i.nextTick((function(){p(e)}))}:function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?(s="setImmediate$"+Math.random()+"$",e.addEventListener?e.addEventListener("message",f,!1):e.attachEvent("onmessage",f),function(t){e.postMessage(s+t,"*")}):e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){p(e.data)},function(e){o.port2.postMessage(e)}):u&&"onreadystatechange"in u.createElement("script")?(r=u.documentElement,function(e){var t=u.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,r.removeChild(t),t=null},r.appendChild(t)}):function(e){setTimeout(p,0,e)},d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),r=0;rdiv:last-child{flex:1}.Toastify__toast-icon{margin-inline-end:10px;width:20px;flex-shrink:0;display:flex}.Toastify--animate{animation-fill-mode:both;animation-duration:.7s}.Toastify--animate-icon{animation-fill-mode:both;animation-duration:.3s}@media only screen and (max-width : 480px){.Toastify__toast{margin-bottom:0;border-radius:0}}.Toastify__toast-theme--dark{background:var(--toastify-color-dark);color:var(--toastify-text-color-dark)}.Toastify__toast-theme--light{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--default{background:var(--toastify-color-light);color:var(--toastify-text-color-light)}.Toastify__toast-theme--colored.Toastify__toast--info{color:var(--toastify-text-color-info);background:var(--toastify-color-info)}.Toastify__toast-theme--colored.Toastify__toast--success{color:var(--toastify-text-color-success);background:var(--toastify-color-success)}.Toastify__toast-theme--colored.Toastify__toast--warning{color:var(--toastify-text-color-warning);background:var(--toastify-color-warning)}.Toastify__toast-theme--colored.Toastify__toast--error{color:var(--toastify-text-color-error);background:var(--toastify-color-error)}.Toastify__progress-bar-theme--light{background:var(--toastify-color-progress-light)}.Toastify__progress-bar-theme--dark{background:var(--toastify-color-progress-dark)}.Toastify__progress-bar--info{background:var(--toastify-color-progress-info)}.Toastify__progress-bar--success{background:var(--toastify-color-progress-success)}.Toastify__progress-bar--warning{background:var(--toastify-color-progress-warning)}.Toastify__progress-bar--error{background:var(--toastify-color-progress-error)}.Toastify__progress-bar-theme--colored.Toastify__progress-bar--info,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--success,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--warning,.Toastify__progress-bar-theme--colored.Toastify__progress-bar--error{background:var(--toastify-color-transparent)}.Toastify__close-button{color:#fff;background:rgba(0,0,0,0);outline:none;border:none;padding:0;cursor:pointer;opacity:.7;transition:.3s ease;align-self:flex-start}.Toastify__close-button--light{color:#000;opacity:.3}.Toastify__close-button>svg{fill:currentColor;height:16px;width:14px}.Toastify__close-button:hover,.Toastify__close-button:focus{opacity:1}@keyframes Toastify__trackProgress{0%{transform:scaleX(1)}100%{transform:scaleX(0)}}.Toastify__progress-bar{position:absolute;bottom:0;left:0;width:100%;height:5px;z-index:var(--toastify-z-index);opacity:.7;transform-origin:left}.Toastify__progress-bar--animated{animation:Toastify__trackProgress linear 1 forwards}.Toastify__progress-bar--controlled{transition:transform .2s}.Toastify__progress-bar--rtl{right:0;left:initial;transform-origin:right}.Toastify__spinner{width:20px;height:20px;box-sizing:border-box;border:2px solid;border-radius:100%;border-color:var(--toastify-spinner-color-empty-area);border-right-color:var(--toastify-spinner-color);animation:Toastify__spin .65s linear infinite}@keyframes Toastify__bounceInRight{from,60%,75%,90%,to{animation-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1)}from{opacity:0;transform:translate3d(3000px, 0, 0)}60%{opacity:1;transform:translate3d(-25px, 0, 0)}75%{transform:translate3d(10px, 0, 0)}90%{transform:translate3d(-5px, 0, 0)}to{transform:none}}@keyframes Toastify__bounceOutRight{20%{opacity:1;transform:translate3d(-20px, 0, 0)}to{opacity:0;transform:translate3d(2000px, 0, 0)}}@keyframes Toastify__bounceInLeft{from,60%,75%,90%,to{animation-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1)}0%{opacity:0;transform:translate3d(-3000px, 0, 0)}60%{opacity:1;transform:translate3d(25px, 0, 0)}75%{transform:translate3d(-10px, 0, 0)}90%{transform:translate3d(5px, 0, 0)}to{transform:none}}@keyframes Toastify__bounceOutLeft{20%{opacity:1;transform:translate3d(20px, 0, 0)}to{opacity:0;transform:translate3d(-2000px, 0, 0)}}@keyframes Toastify__bounceInUp{from,60%,75%,90%,to{animation-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1)}from{opacity:0;transform:translate3d(0, 3000px, 0)}60%{opacity:1;transform:translate3d(0, -20px, 0)}75%{transform:translate3d(0, 10px, 0)}90%{transform:translate3d(0, -5px, 0)}to{transform:translate3d(0, 0, 0)}}@keyframes Toastify__bounceOutUp{20%{transform:translate3d(0, -10px, 0)}40%,45%{opacity:1;transform:translate3d(0, 20px, 0)}to{opacity:0;transform:translate3d(0, -2000px, 0)}}@keyframes Toastify__bounceInDown{from,60%,75%,90%,to{animation-timing-function:cubic-bezier(0.215, 0.61, 0.355, 1)}0%{opacity:0;transform:translate3d(0, -3000px, 0)}60%{opacity:1;transform:translate3d(0, 25px, 0)}75%{transform:translate3d(0, -10px, 0)}90%{transform:translate3d(0, 5px, 0)}to{transform:none}}@keyframes Toastify__bounceOutDown{20%{transform:translate3d(0, 10px, 0)}40%,45%{opacity:1;transform:translate3d(0, -20px, 0)}to{opacity:0;transform:translate3d(0, 2000px, 0)}}.Toastify__bounce-enter--top-left,.Toastify__bounce-enter--bottom-left{animation-name:Toastify__bounceInLeft}.Toastify__bounce-enter--top-right,.Toastify__bounce-enter--bottom-right{animation-name:Toastify__bounceInRight}.Toastify__bounce-enter--top-center{animation-name:Toastify__bounceInDown}.Toastify__bounce-enter--bottom-center{animation-name:Toastify__bounceInUp}.Toastify__bounce-exit--top-left,.Toastify__bounce-exit--bottom-left{animation-name:Toastify__bounceOutLeft}.Toastify__bounce-exit--top-right,.Toastify__bounce-exit--bottom-right{animation-name:Toastify__bounceOutRight}.Toastify__bounce-exit--top-center{animation-name:Toastify__bounceOutUp}.Toastify__bounce-exit--bottom-center{animation-name:Toastify__bounceOutDown}@keyframes Toastify__zoomIn{from{opacity:0;transform:scale3d(0.3, 0.3, 0.3)}50%{opacity:1}}@keyframes Toastify__zoomOut{from{opacity:1}50%{opacity:0;transform:scale3d(0.3, 0.3, 0.3)}to{opacity:0}}.Toastify__zoom-enter{animation-name:Toastify__zoomIn}.Toastify__zoom-exit{animation-name:Toastify__zoomOut}@keyframes Toastify__flipIn{from{transform:perspective(400px) rotate3d(1, 0, 0, 90deg);animation-timing-function:ease-in;opacity:0}40%{transform:perspective(400px) rotate3d(1, 0, 0, -20deg);animation-timing-function:ease-in}60%{transform:perspective(400px) rotate3d(1, 0, 0, 10deg);opacity:1}80%{transform:perspective(400px) rotate3d(1, 0, 0, -5deg)}to{transform:perspective(400px)}}@keyframes Toastify__flipOut{from{transform:perspective(400px)}30%{transform:perspective(400px) rotate3d(1, 0, 0, -20deg);opacity:1}to{transform:perspective(400px) rotate3d(1, 0, 0, 90deg);opacity:0}}.Toastify__flip-enter{animation-name:Toastify__flipIn}.Toastify__flip-exit{animation-name:Toastify__flipOut}@keyframes Toastify__slideInRight{from{transform:translate3d(110%, 0, 0);visibility:visible}to{transform:translate3d(0, 0, 0)}}@keyframes Toastify__slideInLeft{from{transform:translate3d(-110%, 0, 0);visibility:visible}to{transform:translate3d(0, 0, 0)}}@keyframes Toastify__slideInUp{from{transform:translate3d(0, 110%, 0);visibility:visible}to{transform:translate3d(0, 0, 0)}}@keyframes Toastify__slideInDown{from{transform:translate3d(0, -110%, 0);visibility:visible}to{transform:translate3d(0, 0, 0)}}@keyframes Toastify__slideOutRight{from{transform:translate3d(0, 0, 0)}to{visibility:hidden;transform:translate3d(110%, 0, 0)}}@keyframes Toastify__slideOutLeft{from{transform:translate3d(0, 0, 0)}to{visibility:hidden;transform:translate3d(-110%, 0, 0)}}@keyframes Toastify__slideOutDown{from{transform:translate3d(0, 0, 0)}to{visibility:hidden;transform:translate3d(0, 500px, 0)}}@keyframes Toastify__slideOutUp{from{transform:translate3d(0, 0, 0)}to{visibility:hidden;transform:translate3d(0, -500px, 0)}}.Toastify__slide-enter--top-left,.Toastify__slide-enter--bottom-left{animation-name:Toastify__slideInLeft}.Toastify__slide-enter--top-right,.Toastify__slide-enter--bottom-right{animation-name:Toastify__slideInRight}.Toastify__slide-enter--top-center{animation-name:Toastify__slideInDown}.Toastify__slide-enter--bottom-center{animation-name:Toastify__slideInUp}.Toastify__slide-exit--top-left,.Toastify__slide-exit--bottom-left{animation-name:Toastify__slideOutLeft}.Toastify__slide-exit--top-right,.Toastify__slide-exit--bottom-right{animation-name:Toastify__slideOutRight}.Toastify__slide-exit--top-center{animation-name:Toastify__slideOutUp}.Toastify__slide-exit--bottom-center{animation-name:Toastify__slideOutDown}@keyframes Toastify__spin{from{transform:rotate(0deg)}to{transform:rotate(360deg)}}:root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}#app .react-tabs,#wc .react-tabs{flex:1;display:flex;flex-flow:column;overflow:hidden;position:relative;border-radius:8px}#app .react-tabs__tab,#wc .react-tabs__tab{border:none;background-color:rgba(0,0,0,0);padding:0;margin:0;inset-block-start:0;inset-block-end:0;block-size:calc(3rem*var(--scale-factor, 1));box-sizing:border-box;display:flex;align-items:center;justify-content:center;font-weight:700}#app .react-tabs__tab svg,#wc .react-tabs__tab svg{padding:0 0 0 calc(.75rem*var(--scale-factor, 1))}#app .react-tabs__tab:hover,#wc .react-tabs__tab:hover{text-decoration:underline}#app .react-tabs__tab--selected,#wc .react-tabs__tab--selected{border-radius:0;padding-block-start:calc(.25rem*var(--scale-factor, 1))}#app .react-tabs__tab--selected:hover,#wc .react-tabs__tab--selected:hover{text-decoration:none}#app .react-tabs__tab--selected:focus-visible,#wc .react-tabs__tab--selected:focus-visible{padding-block-start:7px}#app .react-tabs__tab:focus,#wc .react-tabs__tab:focus{box-shadow:none}#app .react-tabs__tab:focus-visible,#wc .react-tabs__tab:focus-visible{outline-offset:-3px;outline:3px solid #cd2356}#app .react-tabs__tab:focus:after,#wc .react-tabs__tab:focus:after{display:none}#app .react-tabs__tab-text,#wc .react-tabs__tab-text{block-size:fit-content;inline-size:fit-content;margin:0;padding:0 calc(.75rem*var(--scale-factor, 1));white-space:nowrap}#app .react-tabs__tab-text--split,#wc .react-tabs__tab-text--split{padding-inline-end:0}#app .react-tabs__tab-close-btn,#wc .react-tabs__tab-close-btn{block-size:100%;padding:calc(.25rem*var(--scale-factor, 1));background-color:rgba(0,0,0,0)}#app .react-tabs__tab-close-btn svg,#wc .react-tabs__tab-close-btn svg{padding:calc(.5rem*var(--scale-factor, 1));border-radius:8px}#app .react-tabs__tab-close-btn:focus-visible,#wc .react-tabs__tab-close-btn:focus-visible{border:0}#app .react-tabs__tab-close-btn:focus-visible svg,#wc .react-tabs__tab-close-btn:focus-visible svg{border:3px solid #cd2356}#app .react-tabs__tab-container,#wc .react-tabs__tab-container{display:flex;block-size:fit-content}#app .react-tabs__tab-list,#wc .react-tabs__tab-list{border-block-end:none;box-sizing:border-box;display:flex;overflow-y:hidden;margin:0;padding:0 calc(.25rem*var(--scale-factor, 1)) 0 0}#app .react-tabs__tab-container--hidden,#wc .react-tabs__tab-container--hidden{display:none}#app .react-tabs__tab-panel--selected,#wc .react-tabs__tab-panel--selected{flex:1;display:flex;overflow-y:auto}#app .react-tabs__tab-container,#wc .react-tabs__tab-container{border-block-end:1px solid var(--editor-color-outline)}#app .react-tabs__tab,#wc .react-tabs__tab{background-color:var(--rpf-tab-button-background);border-inline-end:1px solid var(--editor-color-outline)}#app .react-tabs__tab--selected,#wc .react-tabs__tab--selected{color:var(--editor-color-text);background-color:var(--editor-color-layer-3);border-block-end:4px solid var(--rpf-tab-border-bottom-selected)}#app .react-tabs__tab--selected:focus-visible,#wc .react-tabs__tab--selected:focus-visible{border-block-end:7px solid var(--rpf-tab-border-bottom-selected)}#app .react-tabs__tab-close-btn:hover svg,#wc .react-tabs__tab-close-btn:hover svg{background-color:var(--rpf-tab-button-hover)}a,button{border:3px solid rgba(0,0,0,0)}a:focus-visible,button:focus-visible{border:3px solid #cd2356;outline:none}button{all:initial;border:3px solid rgba(0,0,0,0);cursor:pointer}input{font-family:"Roboto",-apple-system,BlinkMacSystemFont,"Segoe UI","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif}.--light{background-color:#e7f8f7;color:#212121;caret-color:#000}.--light .pythonrunner-input{color:#2467ec}.--light svg{fill:var(--editor-color-text)}.--dark{background-color:#17181c;color:#fff;caret-color:#fff}.--dark .pythonrunner-input{color:#24baec}.--dark svg{fill:var(--editor-color-text)}#app{display:flex;flex-flow:column;font-family:"Roboto",-apple-system,BlinkMacSystemFont,"Segoe UI","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1))}html,body,#root,#app{overflow:auto;block-size:100%;block-size:-moz-available;block-size:-webkit-stretch;block-size:stretch;block-size:100dvh;-ms-overflow-style:none;scrollbar-width:none}::-webkit-scrollbar{display:none}#app .toast--bottom-center__message,#app .toast--top-center__message,#wc .toast--bottom-center__message,#wc .toast--top-center__message{min-block-size:fit-content;padding:calc(.25rem*var(--scale-factor, 1)) calc(.5rem*var(--scale-factor, 1));margin:0}#app .toast--bottom-center,#wc .toast--bottom-center{font-size:calc(.75rem*var(--scale-factor, 1));line-height:calc(1rem*var(--scale-factor, 1));inline-size:fit-content;max-inline-size:100%;inset-block-end:1em;padding:4px;inset-inline-start:50%;transform:translateX(-50%);white-space:nowrap}#app .toast--bottom-center .Toastify__toast-icon,#wc .toast--bottom-center .Toastify__toast-icon{margin-block:0;margin-inline:calc(.25rem*var(--scale-factor, 1)) 0}#app .toast--bottom-center__message,#wc .toast--bottom-center__message{border-radius:20px}#app .toast--top-center,#wc .toast--top-center{max-inline-size:fit-content;inline-size:100%;font-weight:700;inset-block-start:20%;z-index:1}#app .toast--top-center .Toastify__toast-icon,#wc .toast--top-center .Toastify__toast-icon{inline-size:fit-content}#app .toast--top-center__message,#wc .toast--top-center__message{background-color:#fff;border-radius:25px}#app .toast--info,#wc .toast--info{color:#1e398a;border:2px solid #1e398a}#app .toast--info svg,#wc .toast--info svg{fill:#17181c}#app .toast--info .Toastify__toast-icon svg,#wc .toast--info .Toastify__toast-icon svg{fill:#1e398a}#app.--dark .toast--bottom-center__message,#wc.--dark .toast--bottom-center__message{background-color:#fff;color:#17181c}#app.--dark .toast--bottom-center__message svg,#wc.--dark .toast--bottom-center__message svg{fill:#17181c}#app.--light .toast--bottom-center__message,#wc.--light .toast--bottom-center__message{background-color:#17181c;color:#fff}#app.--light .toast--bottom-center__message svg,#wc.--light .toast--bottom-center__message svg{fill:#fff}.proj{display:flex;flex-flow:column;overflow:hidden;block-size:100%;block-size:-moz-available;block-size:-webkit-stretch;block-size:stretch}.proj-header{display:flex;flex:1 0 auto;justify-content:space-between;padding-inline:5px}.editor-controls{display:flex}.proj-controls{padding-block-start:20px}.proj-share-link{padding-inline:5px}.proj-container{display:flex;flex-direction:row;overflow-y:hidden;grid-gap:calc(1rem*var(--scale-factor, 1));margin:calc(1rem*var(--scale-factor, 1));block-size:100%}.proj-container .project-wrapper{container-type:inline-size;display:flex;flex-direction:column;grid-gap:calc(.5rem*var(--scale-factor, 1));flex:1 1 auto;overflow:hidden}.proj-container .proj-editor-wrapper{display:flex;flex:0 1 auto;flex-flow:column;grid-gap:calc(1rem*var(--scale-factor, 1));overflow:hidden;block-size:100%;inline-size:100%}@container (min-width: 720px){.proj-container .proj-editor-wrapper{flex-flow:row}.proj-container .proj-editor-container{max-block-size:100% !important}.proj-container--wc .proj-runner-container,.proj-container--wc .proj-editor-container{inline-size:50%}}.proj-container .sidebar,.proj-container .proj-editor-container,.proj-container .proj-runner-container{border-radius:8px}.proj-container .proj-editor-container{display:flex;box-sizing:border-box;min-block-size:30%;max-block-size:70%}.proj-container .proj-editor-container .react-tabs__tab-panel--selected{overflow-y:hidden}.proj-container .proj-runner-container{display:flex;box-sizing:border-box;flex:5;overflow:hidden}.proj-container .proj-runner-container .react-tabs__tab-panel--selected{overflow-y:auto}.proj-container--wc{min-block-size:200px}.proj-container--wc .proj-runner-container,.proj-container--wc .proj-editor-container{inline-size:100%}.proj-editor-container .react-tabs__tab-list,.proj-runner-container .react-tabs__tab-list{flex:1}.proj-editor-container .react-tabs__tab-container .btn--run,.proj-editor-container .react-tabs__tab-container .btn--stop,.proj-runner-container .react-tabs__tab-container .btn--run,.proj-runner-container .react-tabs__tab-container .btn--stop{margin-block-start:0;margin-block-end:0}.--light .proj-runner-container,.--light .proj-editor-container,.--light .sidebar{background-color:#fff}@media screen and (min-width: 601px){.--light .proj-runner-container,.--light .proj-editor-container,.--light .sidebar{border:1px solid #d5d7dc}}.--dark .proj-runner-container,.--dark .proj-editor-container,.--dark .sidebar{background-color:#2a2b32}@media screen and (min-width: 601px){.--dark .proj-runner-container,.--dark .proj-editor-container,.--dark .sidebar{border:1px solid #4a4d59}}.project-bar{border-radius:calc(.5rem*var(--scale-factor, 1));display:flex;align-items:center;z-index:1;block-size:calc(4rem*var(--scale-factor, 1));container-type:inline-size;background-color:var(--editor-color-layer-3);border:1px solid var(--editor-color-outline)}@container (max-width: 367px){.project-bar{flex-direction:column;block-size:fit-content;justify-content:left}}.project-bar .project-name{border-inline-end:1px solid var(--editor-color-outline);margin-inline-end:-1px;min-inline-size:0px}@container (max-width: 365px){.project-bar .project-name{inline-size:100%;box-sizing:border-box;border-inline-end:none}}.project-bar .btn--save{border-radius:calc(.5rem*var(--scale-factor, 1))}@container (min-width: 560px){.project-bar .btn--save .icon{display:none}}.project-bar .project-bar__btn-wrapper{block-size:100%}.project-bar .project-bar__btn-wrapper:not(:last-child){border-inline-end:1px solid var(--editor-color-outline)}.project-bar__right{border-inline-start:1px solid var(--editor-color-outline);margin-inline-start:auto;display:flex;align-items:center;block-size:100%;flex-shrink:0;max-inline-size:55%}@container (max-width: 365px){.project-bar__right{margin-inline-start:0;border-inline-start:none;border-block-start:1px solid var(--editor-color-outline);block-size:fit-content;inline-size:100%;max-inline-size:100%}.project-bar__right .save-status{flex:1;justify-content:center}}.project-bar__btn{border-radius:calc(.5rem*var(--scale-factor, 1));justify-content:center;margin:calc(.5rem*var(--scale-factor, 1));gap:calc(.5rem*var(--scale-factor, 1))}.project-bar__btn .text{display:none}.project-bar__btn:hover .project-bar__btn{border-radius:inherit}@container (min-width: 560px){.project-bar__btn .text{min-inline-size:auto;display:block}}.proj-container--mobile{margin:0;gap:0}#app .proj-container--mobile .react-tabs{border-radius:0}#wc .proj-container--mobile{border-radius:8px}#app .mobile-nav,#wc .mobile-nav{display:flex;inline-size:100%}#app .mobile-nav .react-tabs__tab-list,#wc .mobile-nav .react-tabs__tab-list{padding:0}#app .mobile-nav .react-tabs__tab,#wc .mobile-nav .react-tabs__tab{flex:1;display:flex;block-size:calc(4rem*var(--scale-factor, 1))}#app .mobile-nav .react-tabs__tab:last-of-type,#wc .mobile-nav .react-tabs__tab:last-of-type{border-inline-end:none}.mobile-nav__menu{margin:0;border-radius:0;border:none;display:flex;align-items:center;justify-content:center;inline-size:calc(4rem*var(--scale-factor, 1))}.--dark .proj-container--mobile .runner-controls{border-inline-start:1px solid #4a4d59}.--dark .proj-container--mobile .mobile-nav{background-color:#2a2b32;border-block-start:1px solid #4a4d59}.--dark .proj-container--mobile .mobile-nav__menu{border-inline-end:1px solid #4a4d59}.--light .proj-container--mobile .runner-controls{border-inline-start:1px solid #d5d7dc}.--light .proj-container--mobile .mobile-nav{background-color:#f5f6f9;border-block-start:1px solid #d5d7dc}.--light .proj-container--mobile .mobile-nav__menu{border-inline-end:1px solid #d5d7dc}#app.--light .mobile-nav,#app.--dark .mobile-nav,#wc.--light .mobile-nav,#wc.--dark .mobile-nav{border-block-end:none}#app.--light .mobile-nav .react-tabs__tab--selected,#app.--dark .mobile-nav .react-tabs__tab--selected,#wc.--light .mobile-nav .react-tabs__tab--selected,#wc.--dark .mobile-nav .react-tabs__tab--selected{background-color:inherit}#wc.--light .proj-container--mobile{border:1px solid #d5d7dc}#wc.--dark .proj-container--mobile{border:1px solid #4a4d59}.draggable-tab{user-select:none}.draggable-tab:focus-visible{outline:none}.--dark .draggable-tab:focus-visible .react-tabs__tab{outline:2px auto #fff;outline-offset:-1px}.--light .draggable-tab:focus-visible .react-tabs__tab{outline:2px auto Highlight;outline:2px auto -webkit-focus-ring-color;outline-offset:-1px}.droppable-tab-list{display:flex;inline-size:100%}.resizable-with-handle__handle--right div{inset-inline-end:3px !important}.resizable-with-handle__handle--right div svg{block-size:100%;min-inline-size:0}.resizable-with-handle__handle--bottom div{inset-block-end:3px !important}.resizable-with-handle__handle--bottom div svg{inline-size:100%}.modal-overlay{display:flex;align-items:center;justify-content:center;padding:calc(5rem*var(--scale-factor, 1));z-index:1000;position:fixed;inset:0px}@media screen and (max-width: 480px){.modal-overlay{padding:calc(2rem*var(--scale-factor, 1))}}.modal-content{inline-size:560px;max-block-size:100%;border:0;border-radius:10px;display:flex;flex-direction:column}.modal-content label,.modal-content legend{font-weight:700}.modal-content input[type=text]{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));inline-size:100%;box-sizing:border-box;border:2px solid rgba(0,0,0,0);border-radius:12px;padding:calc(.5rem*var(--scale-factor, 1));display:block}.modal-content:focus-visible{border:3px solid #cd2356;outline:none}.modal-content__header{display:flex;align-items:center;min-block-size:fit-content;padding:calc(1rem*var(--scale-factor, 1)) calc(.5rem*var(--scale-factor, 1)) calc(1rem*var(--scale-factor, 1)) calc(1rem*var(--scale-factor, 1))}.modal-content__header button{margin-inline-start:auto;block-size:fit-content}.modal-content__heading{font-size:calc(1.5rem*var(--scale-factor, 1));line-height:calc(2rem*var(--scale-factor, 1));margin-block:calc(.5rem*var(--scale-factor, 1));margin-inline:calc(.5rem*var(--scale-factor, 1)) 0}.modal-content__body{padding:calc(1.5rem*var(--scale-factor, 1));display:flex;flex-direction:column;row-gap:calc(.5rem*var(--scale-factor, 1));overflow-y:auto}.modal-content__subheading{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));margin:0;font-weight:700}.modal-content__text{margin:0;line-height:1.4}.modal-content__help-text{margin:calc(.25rem*var(--scale-factor, 1)) 0;font-weight:400}.modal-content__inputs{display:flex;flex-direction:column;gap:calc(2rem*var(--scale-factor, 1))}.modal-content__input-section{display:flex;flex-direction:column;gap:calc(.5rem*var(--scale-factor, 1))}.modal-content__buttons{padding:calc(1rem*var(--scale-factor, 1));display:flex;flex-wrap:wrap;flex-direction:row-reverse;gap:calc(1rem*var(--scale-factor, 1));justify-content:flex-start}@media screen and (max-width: 480px){.modal-content__buttons{display:flex;flex-direction:column}}.modal-content__buttons button,.modal-content__buttons a{margin:0}.modal-content__buttons button span,.modal-content__buttons a span{inline-size:100%}@media screen and (max-width: 480px){.modal-content__buttons button,.modal-content__buttons a{inline-size:100%}}.modal-content__links{text-align:center;margin-block:calc(.5rem*var(--scale-factor, 1)) calc(.25rem*var(--scale-factor, 1));margin-inline:0}.modal-content__links button{text-decoration:underline}.--dark .modal-overlay{background-color:rgba(0,0,0,.5)}.--dark .modal-overlay input{border:2px solid #fff;background-color:#33353d;color:inherit}.--dark .modal-overlay input:focus-visible{border:2px solid var(--rpf-input-active-border);outline:none}.--dark .modal-content{background-color:#33353d}.--dark .modal-content__header{border-block-end:1px solid #636674}.--dark .modal-content__help-text{color:#ccc}.--dark .modal-content__buttons{border-block-start:1px solid #636674}.--light .modal-overlay{background-color:rgba(67,69,76,.5)}.--light .modal-overlay input{border:2px solid #e3e4e8}.--light .modal-overlay input:focus-visible{border:2px solid var(--rpf-input-active-border);outline:none}.--light .modal-content{background-color:#fff}.--light .modal-content__header{border-block-end:1px solid #d5d7dc}.--light .modal-content__help-text{color:#4d575b}.--light .modal-content__buttons{border-block-start:1px solid #d5d7dc}.editor-input{display:flex;flex-direction:column;block-size:100%;inline-size:100%}.editor{display:flex;flex-flow:column;flex:1;overflow:hidden}.editor .cm-editor{flex:1;overflow:hidden}.editor .cm-editor:focus{outline:none}.editor .cm-editor .cm-scroller{overflow:auto;overscroll-behavior-x:none}.editor .cm-editor .cm-scroller .cm-content{flex:1;padding-block-start:calc(.5rem*var(--scale-factor, 1));margin-inline-end:calc(.5rem*var(--scale-factor, 1))}.editor--small{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1))}.editor--medium{font-size:calc(1.5rem*var(--scale-factor, 1));line-height:calc(2rem*var(--scale-factor, 1))}.editor--large{font-size:calc(2rem*var(--scale-factor, 1));line-height:calc(2.5rem*var(--scale-factor, 1))}.sidebar{display:flex;position:relative;scrollbar-width:none}.sidebar--mobile{inline-size:100%;overflow-y:hidden}.editor-logo{block-size:calc(2.5rem*var(--scale-factor, 1));inline-size:calc(2.5rem*var(--scale-factor, 1));padding:calc(.75rem*var(--scale-factor, 1))}.sidebar__bar{display:flex;flex-direction:column;justify-content:space-between;border-radius:8px;background-color:var(--sidebar-background)}.sidebar__bar--selected{border-radius:8px 0 0 8px;background-color:var(--sidebar-background-selected);border-inline-end:1px solid var(--sidebar-border)}.sidebar__bar-options--top,.sidebar__bar-options--bottom{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:calc(.5rem*var(--scale-factor, 1))}.sidebar__bar-option-wrapper{padding:calc(.75*.5rem*var(--scale-factor, 1));border:1px solid rgba(0,0,0,0)}.sidebar__bar-option-wrapper--selected{background-color:var(--sidebar-panel-background);border-radius:calc(.5rem*var(--scale-factor, 1)) 0 0 calc(.5rem*var(--scale-factor, 1));border-block:1px solid var(--sidebar-border);border-inline-start:1px solid var(--sidebar-border)}.sidebar__bar-option-wrapper--selected .sidebar__bar-option{border:2px solid var(--sidebar-option-selected-border)}.sidebar__bar-option{display:flex;align-items:center;justify-content:center;box-sizing:border-box;margin:0;border:2px solid rgba(0,0,0,0)}.sidebar__bar-option svg{margin:0}.sidebar__bar-option:hover{background-color:var(--sidebar-option-hover)}.sidebar__bar-option--selected{background-color:var(--sidebar-option-selected-background)}.sidebar__bar-option--selected svg{fill:var(--sidebar-option-selected-icon)}.sidebar__bar-option--selected:hover{background-color:var(--sidebar-option-selected-background-hover)}.sidebar__bar-close{border-block-start:1px solid var(--sidebar-border)}.sidebar__panel{display:flex;flex-direction:column;padding:calc(1rem*var(--scale-factor, 1));border-radius:0 8px 8px 0;inline-size:inherit;background:var(--sidebar-panel-background)}.sidebar__panel--with-footer{padding-block-end:calc(2rem*var(--scale-factor, 1))}.sidebar__panel-heading{margin:0;font-size:calc(1.5rem*var(--scale-factor, 1));line-height:calc(2rem*var(--scale-factor, 1))}.sidebar__panel-header{display:flex;flex-direction:column;gap:calc(1rem*var(--scale-factor, 1));padding-block-end:calc(1rem*var(--scale-factor, 1));border-block-end:1px solid var(--sidebar-border)}.sidebar__panel-content{flex:1;padding:calc(1rem*var(--scale-factor, 1)) 0;overflow-y:scroll;scrollbar-width:thin;overflow:auto}.sidebar__panel-footer{border-block-start:1px solid #d5d7dc;position:absolute;inset-block-end:0px;inline-size:100%;inline-size:-moz-available;inline-size:-webkit-stretch;inline-size:stretch;background-color:#fff;border-end-end-radius:8px}:root{--rpf-brand-black: hsla(60, 4%, 11%, 1);--rpf-brand-leaf: hsla(123, 43%, 48%, 1);--rpf-brand-raspberry: hsla(342, 71%, 47%, 1)}:root{--space-0-125: 0.0625rem;--space-0-25: 0.125rem;--space-0-5: 0.25rem;--space-1: 0.5rem;--space-1-5: 0.75rem;--space-2: 1rem;--space-3: 1.5rem;--space-4: 2rem;--space-5: 2.5rem;--space-6: 3rem;--space-7: 3.5rem;--space-8: 4rem;--space-9: 4.5rem;--space-10: 5rem}.rpf-squiggle,.rpf-squiggle-heading::after,.project-instructions .c-project-heading--task::after{--rpf-squiggle-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xml%3Aspace%3D%22preserve%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%3Bstroke-linecap%3Around%3Bstroke-miterlimit%3A10%22%20viewBox%3D%220%200%2029%2013%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M3%2011c7%200%207-8%2014-8%208%200%208%208%2015%208%22%20style%3D%22fill%3Anone%3Bfill-rule%3Anonzero%3Bstroke%3Awhite%3Bstroke-width%3A4px%22%20transform%3D%22translate%28-3%29%22%2F%3E%3C%2Fsvg%3E");--rpf-squiggle-end-cap-l-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xml%3Aspace%3D%22preserve%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%22%20viewBox%3D%220%200%202%2013%22%3E%3Ccircle%20cx%3D%220%22%20cy%3D%2211%22%20r%3D%222%22%20style%3D%22fill%3Awhite%22%2F%3E%3C%2Fsvg%3E");--rpf-squiggle-end-cap-r-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xml%3Aspace%3D%22preserve%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%22%20viewBox%3D%220%200%202%2013%22%3E%3Ccircle%20cx%3D%222%22%20cy%3D%2211%22%20r%3D%222%22%20style%3D%22fill%3Awhite%22%2F%3E%3C%2Fsvg%3E");background-color:var(--rpf-squiggle-color, var(--rpf-brand-raspberry));border:2px solid rgba(0,0,0,0);border-block:none;height:13px;mask-clip:content-box,border-box,border-box;mask-image:var(--rpf-squiggle-mask),var(--rpf-squiggle-end-cap-l-mask),var(--rpf-squiggle-end-cap-r-mask);mask-origin:content-box,border-box,border-box;mask-position:top left,top right,top left;mask-repeat:round,no-repeat,no-repeat;mask-size:29px 13px,2px 13px,2px 13px;-webkit-mask-clip:content-box,border-box,border-box;-webkit-mask-image:var(--rpf-squiggle-mask),var(--rpf-squiggle-end-cap-l-mask),var(--rpf-squiggle-end-cap-r-mask);-webkit-mask-origin:content-box,border-box,border-box;-webkit-mask-position:top left,top right,top left;-webkit-mask-repeat:round,no-repeat,no-repeat;-webkit-mask-size:29px 13px,2px 13px,2px 13px}.rpf-squiggle-heading,.project-instructions .c-project-heading--task{display:inline-block;position:relative;padding-bottom:calc(13px + var(--space-1))}.rpf-squiggle-heading::after,.project-instructions .c-project-heading--task::after{content:"";display:block;position:absolute;left:0;right:0;margin-top:var(--space-1)}.project-instructions h2{font-size:calc(1.25rem*var(--scale-factor, 1));margin:0}.project-instructions strong{font-weight:700}.project-instructions img{max-inline-size:100%}.project-instructions table{border-collapse:collapse;margin-block-end:calc(1.5rem*var(--scale-factor, 1));inline-size:100%}.project-instructions table tr{border-block-end:1px solid #000}.project-instructions table td{padding:calc(.5rem*var(--scale-factor, 1)) calc(1.5rem*var(--scale-factor, 1))}.project-instructions pre{background-color:#33353d;border-radius:8px;padding:calc(.5rem*var(--scale-factor, 1));overflow:auto;margin:calc(1rem*var(--scale-factor, 1)) 0}.project-instructions code{color:#fff;background-color:#33353d;border-radius:8px;padding:calc(.75*.125rem*var(--scale-factor, 1)) calc(.5rem*var(--scale-factor, 1))}.project-instructions .c-project-code{margin:calc(1rem*var(--scale-factor, 1)) 0 calc(1.5rem*var(--scale-factor, 1)) 0;border-radius:8px;background-color:#33353d}.project-instructions .c-project-code pre{margin:0}.project-instructions .c-project-code code{padding-inline-start:0}.project-instructions .c-code-filename{font-family:monospace;margin:0;padding:calc(.5rem*var(--scale-factor, 1)) calc(1rem*var(--scale-factor, 1));color:#fff;background-color:#2a2b32;border-start-start-radius:8px;border-start-end-radius:8px;border-block-end:1px solid #4a4d59}.project-instructions .line-numbers{padding-inline-start:calc(3rem*var(--scale-factor, 1));padding-inline-end:calc(1rem*var(--scale-factor, 1))}.project-instructions .line-numbers-rows{border-color:#ccc}.project-instructions .line-numbers-rows span::before{padding-inline-end:calc(.5rem*var(--scale-factor, 1));color:#ccc}.project-instructions .line-highlight{margin-block-start:.5rem;background-color:#fff;mix-blend-mode:difference;min-inline-size:100%}.project-instructions .language-python .number,.project-instructions .language-python .boolean,.project-instructions .language-python .function{color:#9ee8ff}.project-instructions .language-python .keyword{color:#ecf}.project-instructions .language-python .string,.project-instructions .language-python .char{color:#94f9af}.project-instructions .language-python .comment{color:#ffca99}.project-instructions .language-python .keyword-print{color:#fff}.project-instructions .language-css{color:#9ee8ff}.project-instructions .language-css .comment{color:#ffca99}.project-instructions .language-css .selector{color:#ecf}.project-instructions .language-css .function{color:#ecf}.project-instructions .language-css .property,.project-instructions .language-css .punctuation{color:#fff}.project-instructions .language-html .tag{color:#ecf}.project-instructions .language-html .tag .punctuation,.project-instructions .language-html .tag .attr-name{color:#fff}.project-instructions .language-html .tag .attr-value{color:#94f9af}.project-instructions .language-html .tag .attr-value .punctuation{color:inherit}.project-instructions .language-html .tag .attr-value .attr-equals{color:#fff}.project-instructions .language-html .comment{color:#ffca99}.project-instructions .c-project-heading--task{--rpf-squiggle-color: var(--rpf-blue-800);background-color:#e5f4fd;padding:calc(1rem*var(--scale-factor, 1));inline-size:100%;box-sizing:border-box;border-start-start-radius:8px;border-start-end-radius:8px}.project-instructions .c-project-heading--task::after{margin-inline:calc(1rem*var(--scale-factor, 1));margin-block-start:calc(.25rem*var(--scale-factor, 1))}.project-instructions .c-project-task{background-color:#e5f4fd;padding:calc(1rem*var(--scale-factor, 1));display:flex;flex-direction:column;gap:calc(1rem*var(--scale-factor, 1));border-end-start-radius:8px;border-end-end-radius:8px;margin-block-end:calc(1.5rem*var(--scale-factor, 1))}.project-instructions .c-project-task p{margin:0}.project-instructions .c-project-task__checkbox{display:none}.project-instructions .c-project-callout{background-color:#e5f4fd;border-inline-start:4px solid #0090f0;padding:calc(.5rem*var(--scale-factor, 1)) calc(1rem*var(--scale-factor, 1));display:flex;flex-direction:column;gap:calc(.5rem*var(--scale-factor, 1));margin:calc(1.5rem*var(--scale-factor, 1)) 0}.project-instructions .c-project-callout h3{margin:0;padding-inline-start:calc(2rem*var(--scale-factor, 1));font-size:calc(1rem*var(--scale-factor, 1));background-repeat:no-repeat;background-position:inline-start calc(.5rem*var(--scale-factor, 1)) center}.project-instructions .c-project-callout p{margin:0}.project-instructions .c-project-callout--tip{background-color:#ecf7ed;border-inline-start:4px solid #46af4b}.project-instructions .c-project-callout--tip h3{background-image:url('+u+")}.project-instructions .c-project-callout--debug{background-color:#feeeed;border-inline-start:4px solid #f3514f}.project-instructions .c-project-callout--debug h3{background-image:url("+d+")}.project-instructions .c-project-output{display:flex;align-items:flex-start;align-self:stretch;padding:calc(1rem*var(--scale-factor, 1));border-radius:8px;border:1px solid var(--rpf-grey-150);margin-block-end:calc(1.5rem*var(--scale-factor, 1))}.project-instructions .c-project-output pre{padding:0;margin:0;inline-size:100%;background-color:#fff}.project-instructions .c-project-output code{background-color:#fff;color:#212121;padding:0;white-space:pre-wrap}.projects-panel-wrapper .sidebar__panel-content{overflow:visible}.projects-panel-wrapper .projects-panel__your-projects-button{display:flex;align-items:center;justify-content:center;inline-size:100%;box-sizing:border-box;margin:0}.projects-panel-wrapper .projects-panel__your-projects-button a{color:#000;text-decoration:none}.projects-panel-wrapper .projects-panel__download-button{inline-size:100%;margin:0;justify-content:center}.projects-panel-wrapper .project-name{block-size:auto;padding-inline-start:0}.projects-panel-wrapper .project-name__label{padding-inline-start:0}.projects-panel-wrapper .project-name__input{padding:0 calc(1rem*var(--scale-factor, 1))}.projects-panel-wrapper .projects-panel__item{margin-block-end:calc(1rem*var(--scale-factor, 1))}.projects-panel-wrapper .projects-panel__save,.projects-panel-wrapper .projects-panel__button{border-block-start:1px solid var(--sidebar-border);padding:calc(1rem*var(--scale-factor, 1)) 0;display:flex}.projects-panel-wrapper .projects-panel__save-button{inline-size:100%;margin-block-end:calc(1rem*var(--scale-factor, 1));justify-content:center}.projects-panel-wrapper .projects-panel__save-button .icon{display:none}.projects-panel-wrapper .projects-panel__save-button .content{margin:auto}.projects-panel-wrapper .projects-panel__save-button span{font-weight:bold}.projects-panel-wrapper .projects-panel__save-status{margin:auto;inline-size:fit-content}.--dark .projects-panel__save-button .content{color:#fff}.project-name{align-items:center;display:flex;block-size:100%;padding-inline-start:calc(.5rem*var(--scale-factor, 1))}.project-name .btn--primary{margin:0 calc(.5rem*var(--scale-factor, 1))}.project-name__title{font-size:calc(1.25rem*var(--scale-factor, 1));font-weight:700;margin-block:calc(1rem*var(--scale-factor, 1));margin-inline-start:calc(.5rem*var(--scale-factor, 1));margin-inline-end:calc(1rem*var(--scale-factor, 1));overflow:hidden;text-overflow:ellipsis;text-wrap:nowrap}.project-name__label{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));font-weight:700;margin-block-end:calc(.5rem*var(--scale-factor, 1));display:block}.project-name__input{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));padding:0 calc(1.5rem*var(--scale-factor, 1));block-size:calc(3rem*var(--scale-factor, 1));border-radius:calc(.5rem*var(--scale-factor, 1));border:none;color:inherit;background-color:inherit;text-overflow:ellipsis;inline-size:100%}.project-name__button{margin:calc(.5rem*var(--scale-factor, 1));inline-size:48px;block-size:48px}.project-name__button svg{block-size:calc(1.5rem*var(--scale-factor, 1));inline-size:calc(1.5rem*var(--scale-factor, 1));margin:0}.--dark .project-name__input{background-color:#4a4d59}.--dark .project-name__input:focus-visible{background-color:inherit;outline:2px solid #fff}.--light .project-name__input{background-color:#f1f2f3}.--light .project-name__input:focus-visible{background-color:inherit;outline:2px solid #212121}.project-info{align-items:inline-start;display:flex;flex-direction:column;padding:calc(1rem*var(--scale-factor, 1));border-radius:calc(.5rem*var(--scale-factor, 1));border:none;background-color:inherit}.project-info .btn--primary{margin:0 calc(.5rem*var(--scale-factor, 1))}.project-type__label{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));font-weight:700;margin-block-end:calc(.5rem*var(--scale-factor, 1));display:block}.project-type__text{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));color:inherit;text-overflow:ellipsis}.--light .project-info{background-color:#f1f2f3}.--dark .project-info{background-color:#4a4d59}.download-panel__login-section{border-block-end:1px solid #d5d7dc;margin-block-end:calc(1.5rem*var(--scale-factor, 1));padding-block-end:calc(1.5rem*var(--scale-factor, 1))}.download-panel__subtitle{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));font-weight:700;margin-block-end:calc(.5rem*var(--scale-factor, 1))}.download-panel__hint{margin:0;margin-block-end:calc(1rem*var(--scale-factor, 1))}.download-panel__button-container{display:flex;flex-direction:column;justify-content:center;align-self:stretch;gap:calc(1rem*var(--scale-factor, 1));align-items:stretch}.download-panel__button{justify-content:center;inline-size:100%;box-sizing:border-box;margin:0}.download-panel__download-section{margin-block-end:calc(1rem*var(--scale-factor, 1))}.settings-panel{display:flex;flex-direction:column;gap:calc(1.25rem*var(--scale-factor, 1));padding:calc(.25rem*var(--scale-factor, 1))}.settings-panel .select-buttons__legend{font-size:calc(1.25rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));font-weight:700}.settings-panel .select-buttons__options{flex-direction:column}.select-buttons{border:none;margin:0;padding:0}.select-buttons__legend{padding:0;margin-block-end:calc(1rem*var(--scale-factor, 1))}.select-buttons__options{display:flex;inline-size:100%;gap:calc(1rem*var(--scale-factor, 1));flex-wrap:wrap}.select-buttons__option{flex:1}.select-buttons__button{opacity:0;position:absolute}.select-buttons__label{display:flex;align-items:center;padding:calc(.75rem*var(--scale-factor, 1));gap:calc(.75rem*var(--scale-factor, 1));border-radius:8px;position:relative;box-sizing:border-box;font-weight:700;cursor:pointer}.select-buttons__tick{display:flex;align-items:center;margin-inline-start:auto;visibility:hidden}.select-buttons__tick--selected{visibility:visible}.select-buttons__tick--selected svg rect{fill:var(--editor-color-theme)}.select-buttons__tick--selected svg path{fill:var(--rpf-select-buttons-tick-color)}.--light .select-buttons__label{border:2px solid #d5d7dc}.--light .select-buttons__label--selected{border:2px solid #212121}.--dark .select-buttons__label{border:2px solid #636674}.--dark .select-buttons__label--selected{border:2px solid #babcc5}.select-buttons__button:focus-visible+.select-buttons__label{outline:3px solid #cd2356}.info-panel{border-radius:calc(.5rem*var(--scale-factor, 1));padding:calc(1rem*var(--scale-factor, 1));margin-block-end:calc(.5rem*var(--scale-factor, 1))}.info-panel p{margin:0}.info-panel__links{display:flex;flex-direction:column}.info-panel__links a{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));font-weight:700;text-decoration:underline}.info-panel__link:last-of-type{margin-block-end:calc(1rem*var(--scale-factor, 1))}.--dark .info-panel{color:#fff;background-color:#4a4d59}.--dark .info-panel__links a{color:#fff}.--light .info-panel{color:#212121;background-color:#f1f2f3}.--light .info-panel__links a{color:#212121}.progress-bar{accent-color:var(--editor-color-theme);display:flex;align-items:center;justify-content:center;max-inline-size:300px;margin:auto}.progress-bar progress{flex:1;min-inline-size:0px}.progress-bar .btn-outer{padding:calc(.5rem*var(--scale-factor, 1))}.run-bar{display:flex;flex-direction:row;justify-content:flex-end;padding:calc(.5rem*var(--scale-factor, 1))}.--light .run-bar{border-block-start:1px solid #d5d7dc}.--dark .run-bar{border-block-start:1px solid #4a4d59}.runner-controls{display:flex;align-items:center;padding:0 calc(.5rem*var(--scale-factor, 1))}.pythonrunner-container{display:flex;flex-direction:column;flex:1;block-size:100%;inline-size:100%}.pythonrunner-console{padding:calc(.5rem*var(--scale-factor, 1)) calc(1.5rem*var(--scale-factor, 1));margin:0;white-space:pre-wrap;white-space:-moz-pre-wrap;white-space:-pre-wrap;white-space:-o-pre-wrap;width:100%;word-wrap:break-word;overflow-y:auto}.pythonrunner-console--medium{font-size:calc(1.5rem*var(--scale-factor, 1));line-height:calc(2rem*var(--scale-factor, 1))}.pythonrunner-console--large{font-size:calc(2rem*var(--scale-factor, 1));line-height:calc(2.5rem*var(--scale-factor, 1))}.pythonrunner-console-output-line{padding-inline-end:5px}.pythonrunner-console-output-line.stderr{color:red}.pythonrunner-input{caret-color:inherit;color:#2467ec;display:block;line-height:20px;padding:2px 1px 2px 0}.pythonrunner-input:focus{outline:0}.pythonrunner-graphic{overflow:auto;position:relative}.visual-output{flex:1;display:flex;min-block-size:100%;inline-size:100%}#p5Sketch{display:flex;flex:1;position:absolute}.--light .visual-output{background:url(\"data:image/svg+xml,%3Csvg width='525' height='686' viewBox='0 0 525 686' fill='none' xmlns='http:%2F%2Fwww.w3.org/2000/svg' xmlns:xlink='http:%2F%2Fwww.w3.org/1999/xlink'%3E%3Crect width='526' height='686' transform='translate(0.5)' fill='url(%23pattern0)' fill-opacity='0.1'/%3E%3Cdefs%3E%3Cpattern id='pattern0' patternContentUnits='objectBoundingBox' width='0.0152091' height='0.0116618'%3E%3Cuse xlink:href='%23image0_214_29626' transform='scale(0.00190114 0.00145773)'/%3E%3C/pattern%3E%3Cimage id='image0_214_29626' width='8' height='8' xlink:href='data:image/png%3Bbase64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAAXNSR0IArs4c6QAAABdJREFUGBljYGBg+A/FQAoTMGEKDUcRAATwAgFGIXEOAAAAAElFTkSuQmCC'/%3E%3C/defs%3E%3C/svg%3E\")}.--dark .visual-output{background:url(\"data:image/svg+xml,%3Csvg width='527' height='684' viewBox='0 0 527 684' fill='none' xmlns='http:%2F%2Fwww.w3.org/2000/svg' xmlns:xlink='http:%2F%2Fwww.w3.org/1999/xlink'%3E%3Crect width='526' height='686' transform='translate(0.388916)' fill='url(%23pattern0)'/%3E%3Cdefs%3E%3Cpattern id='pattern0' patternContentUnits='objectBoundingBox' width='0.0152091' height='0.0116618'%3E%3Cuse xlink:href='%23image0_214_22403' transform='scale(0.00190114 0.00145773)'/%3E%3C/pattern%3E%3Cimage id='image0_214_22403' width='8' height='8' xlink:href='data:image/png%3Bbase64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAYAAADED76LAAAAAXNSR0IArs4c6QAAABdJREFUGBljYGBg+A/FQAoTMGEKDUcRAATwAgFGIXEOAAAAAElFTkSuQmCC'/%3E%3C/defs%3E%3C/svg%3E%0A\")}.output-panel{display:flex;overflow:hidden}.output-panel--text{flex:3}.output-panel--visual{flex:7}.--light .output-panel--visual{border-block-end:5px solid #e3e4e8}.--dark .output-panel--visual{border-block-end:5px solid #4a4d59}.--light .output-panel--single,.--dark .output-panel--single{border-block-end:none}.htmlrunner-container{container-type:inline-size;display:flex;block-size:100%;inline-size:100%}.htmlrunner-link{margin-inline-start:auto}@container (max-width: 480px){.htmlrunner-link__text{display:none}}.htmlrunner-iframe{border:none;background-color:#fff;block-size:100%;inline-size:100%}.error-message{color:#7e0305;background-color:#fde2e1;padding:calc(.75rem*var(--scale-factor, 1)) calc(1.25rem*var(--scale-factor, 1))}.error-message__content{padding:0;margin:0;white-space:pre-wrap;word-break:break-word}.error-message--medium{font-size:calc(1.5rem*var(--scale-factor, 1));line-height:calc(2rem*var(--scale-factor, 1))}.error-message--large{font-size:calc(2rem*var(--scale-factor, 1));line-height:calc(2.5rem*var(--scale-factor, 1))}.output-view-toggle__button{block-size:100%}.--light .output-view-toggle{border-inline-start:1px solid #d5d7dc}.--dark .output-view-toggle{border-inline-start:1px solid #4a4d59}.sense-hat{inline-size:100%;flex:1;display:flex;flex-flow:column}.sense-hat-model{display:flex;flex-flow:column;max-block-size:50%;min-block-size:200px;flex:1;padding-block-end:calc(.5rem*var(--scale-factor, 1))}.sense-hat-model canvas{cursor:grab}.sense-hat-model-orientation{display:flex;align-items:center;justify-content:center;margin:0 calc(.5rem*var(--scale-factor, 1))}.sense-hat-model-orientation__spacing{flex:1}.sense-hat-model-orientation__values{flex:10;display:flex;margin:0 calc(.5rem*var(--scale-factor, 1))}.sense-hat-model-orientation__reading{font-size:calc(.75rem*var(--scale-factor, 1));line-height:calc(1rem*var(--scale-factor, 1));flex:1;text-transform:uppercase;font-weight:700;margin:0 calc(.5rem*var(--scale-factor, 1))}.sense-hat-model-orientation__reset-btn{flex:1;display:flex;margin-inline-start:auto}.sense-hat-model-orientation__reset-btn svg{padding:calc(.5rem*var(--scale-factor, 1));border-radius:5px;fill:#000}.sense-hat-model-orientation__reset-btn button{cursor:pointer}.sense-hat-controls{padding:calc(.5rem*var(--scale-factor, 1));display:flex;flex-flow:column}.sense-hat-controls-heading{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));font-weight:400;margin-block:0 calc(.5rem*var(--scale-factor, 1));margin-inline:0}.sense-hat-controls-panel{flex:1;display:flex;flex-flow:column}.sense-hat-controls-panel__control{display:flex;flex-flow:column;align-items:center;text-align:center;padding-block:calc(.25rem*var(--scale-factor, 1)) calc(.5rem*var(--scale-factor, 1));padding-inline:calc(.5rem*var(--scale-factor, 1));box-sizing:border-box;border-radius:5px;inline-size:32%;justify-content:space-between}.sense-hat-controls-panel__control-reading{inline-size:100%;border-radius:5px;margin-block-start:calc(.25rem*var(--scale-factor, 1));padding:calc(.25rem*var(--scale-factor, 1));box-sizing:border-box;display:flex;align-items:center;justify-content:center;font-family:source-code-pro,Menlo,Monaco,Consolas,\"Courier New\",monospace}.sense-hat-controls-panel__control-reading-timer{margin-block-start:0;padding:calc(.5rem*var(--scale-factor, 1)) 0;inline-size:100%}.sense-hat-controls-panel__control-toggle{border-radius:5px;inline-size:100%;flex:1;box-sizing:border-box;display:flex;align-items:center;justify-content:center}.sense-hat-controls-panel__control-toggle label{flex:1}.sense-hat-controls-panel__control-input{cursor:pointer;inline-size:85px;transform:rotate(270deg)}.sense-hat-controls-panel__control input[type=color]{border-radius:5px;flex:1;inline-size:100%;padding:calc(.25rem*var(--scale-factor, 1)) calc(1.5rem*var(--scale-factor, 1))}.sense-hat-controls-panel__control-name{font-variant:small-caps;text-transform:lowercase;margin:calc(.25rem*var(--scale-factor, 1)) 0}.sense-hat-controls-panel__control-value{margin-inline-start:calc(.25rem*var(--scale-factor, 1))}.sense-hat-controls-panel__control-last{margin-block-start:calc(.5rem*var(--scale-factor, 1));flex-flow:row;inline-size:100%;align-items:inherit;justify-content:space-between}.sense-hat-controls-panel__sliders{display:flex;justify-content:space-between}.sense-hat-controls-panel__sliders .sense-hat-controls-panel__control{min-block-size:175px}.sense-hat-controls-panel__container{display:flex;flex-flow:column;align-items:center;inline-size:32%}.sense-hat-controls-panel__container .sense-hat-controls-panel__control-name,.sense-hat-controls-panel__container input{cursor:pointer}.sense-hat-controls-panel__container-timer .sense-hat-controls-panel__control-name{cursor:default}.--dark .sense-hat{background-color:#2a2b32}.--dark .sense-hat-controls{border-block-start:7px solid #17181c}.--dark .sense-hat-controls-panel__control{box-shadow:inset 0 0 calc(3rem*var(--scale-factor, 1)) #33353d;background-color:#33353d}.--dark .sense-hat-controls-panel__control-reading{background-color:#2a2b32;border:1px solid #636674}.--dark .sense-hat-controls-panel__control input[type=color]{background-color:#2a2b32;border:1px solid #636674}.--dark .sense-hat-controls-panel__control-toggle{background-color:#2a2b32;border:1px solid #636674}.--dark .sense-hat-controls-panel__control-toggle .react-toggle-thumb{border:1px solid #fff;background-color:#fff}.--dark .sense-hat-model{background-color:#002b3f}.--dark .sense-hat-model-orientation{background-color:#002b3f;color:#fff}.--dark .sense-hat-model-orientation__reset-btn svg{background-color:#fff}.--light .sense-hat{background-color:#fff}.--light .sense-hat-controls{border-block-start:5px solid #e3e4e8}.--light .sense-hat-controls-panel__control{box-shadow:inset 0 0 calc(3rem*var(--scale-factor, 1)) #e3e4e8;background-color:#f1f2f3}.--light .sense-hat-controls-panel__control-reading{background-color:#e3e4e8;border:2px solid #babcc5}.--light .sense-hat-controls-panel__control input[type=color]{background-color:#fff;border:2px solid #babcc5}.--light .sense-hat-controls-panel__control-toggle{background-color:#fff;border:2px solid #babcc5}.--light .sense-hat-controls-panel__control-toggle .react-toggle-thumb{border:1px solid #e3e4e8;background-color:#e3e4e8}.--light .sense-hat-model{background-color:#002b3f}.--light .sense-hat-model-orientation{background-color:#002b3f;color:#fff}.--light .sense-hat-model-orientation__reset-btn svg{background-color:#fff}.mobile-project-bar{background-color:#fff;border-block-start:1px solid #d5d7dc;display:flex;block-size:25px;justify-content:space-between;padding:0 calc(.5rem*var(--scale-factor, 1))}.mobile-project-bar__name{font-size:calc(.75rem*var(--scale-factor, 1));line-height:calc(1rem*var(--scale-factor, 1));font-weight:700;margin:auto 0}.--dark .mobile-project-bar{background-color:#2a2b32;border-block-start:1px solid #4a4d59}.--dark .mobile-project-bar__name{color:#fff}.--light .mobile-project-bar{background-color:#fff;border-block-start:1px solid #d5d7dc}.--light .mobile-project-bar__name{color:#4d575b}.btn{align-items:center;border-radius:calc(.5rem*var(--scale-factor, 1));border:3px solid rgba(0,0,0,0);box-sizing:border-box;color:inherit;cursor:pointer;display:inline-flex;font-family:sans-serif;font-size:inherit;font-weight:700;gap:calc(.5rem*var(--scale-factor, 1));justify-content:center;min-block-size:44px;min-inline-size:44px;padding:10px;position:relative;text-align:center;text-decoration:none}.btn:disabled{background-color:#4a4d59;color:#fff;cursor:default}.btn:focus-visible{border:3px solid #cd2356;outline:none}.btn--primary{background-color:var(--rpf-button-primary-background-color);border-radius:calc(.5rem*var(--scale-factor, 1));color:var(--rpf-button-primary-text-color)}.btn--primary svg{fill:var(--rpf-button-primary-text-color)}.btn--primary:active,.btn-outer:active .btn--primary{background-color:var(--rpf-button-primary-background-color-active)}.btn--primary:focus-visible,.btn-outer:focus-visible .btn--primary{background-color:var(--rpf-button-primary-background-color-focus)}.btn--primary:hover,.btn-outer:hover .btn--primary{background-color:var(--rpf-button-primary-background-color-hover);border-radius:calc(.5rem*var(--scale-factor, 1))}.btn--primary:disabled{background-color:var(--rpf-button-primary-background-color-disabled);color:var(--rpf-button-primary-color-disabled)}.btn--primary:disabled svg{fill:var(--rpf-button-primary-color-disabled)}.btn--primary:disabled:hover,.btn-outer:hover .btn--primary:disabled{background-color:var(--rpf-button-primary-background-color-disabled)}.btn--secondary{background-color:inherit;color:var(--rpf-button-secondary-text-color);border:2px solid var(--rpf-button-primary-background-color)}.btn--secondary svg{fill:var(--rpf-button-secondary-text-color)}.btn--secondary:active,.btn-outer:active .btn--secondary{background-color:inherit}.btn--secondary:focus-visible,.btn-outer:focus-visible .btn--secondary{background-color:inherit}.btn--secondary:hover,.btn-outer:hover .btn--secondary{background-color:inherit}.btn--secondary:disabled{background-color:var(--rpf-button-secondary-background-color-disabled);color:var(--rpf-button-secondary-background-color-active)}.btn--secondary:disabled svg{fill:var(--rpf-button-secondary-background-color-active)}.btn--secondary:disabled:hover,.btn-outer:hover .btn--secondary:disabled{background-color:var(--rpf-button-secondary-background-color-disabled)}.btn--secondary:active{border:2px solid var(--rpf-button-secondary-background-color-active)}.btn--secondary:hover{background-color:var(--rpf-button-secondary-background-color-hover);color:var(--rpf-button-secondary-text-color-hover);border-color:var(--rpf-button-secondary-border-color-hover) !important}.btn--secondary:hover svg{fill:var(--rpf-button-secondary-text-color-hover)}.btn--secondary:focus-visible{outline:3px solid var(--rpf-button-secondary-background-color-focus)}.btn--tertiary{background-color:inherit;color:inherit}.btn--tertiary:active,.btn-outer:active .btn--tertiary{background-color:inherit}.btn--tertiary:focus-visible,.btn-outer:focus-visible .btn--tertiary{background-color:inherit}.btn--tertiary:hover,.btn-outer:hover .btn--tertiary{background-color:inherit}.btn--tertiary:disabled{background-color:inherit;color:#4a4d59}.btn--tertiary:disabled svg{fill:#4a4d59}.btn--tertiary:disabled:hover,.btn-outer:hover .btn--tertiary:disabled{background-color:inherit}.btn--tertiary:active{color:#0e857a}.btn--tertiary:active svg{fill:#0e857a}.btn--tertiary:hover{color:var(--rpf-button-tertiary-text-color-hover)}.btn--tertiary:hover svg{fill:var(--rpf-button-tertiary-text-color-hover)}.btn--danger{background-color:#9e0a0a;color:#fff}.btn--danger svg{fill:#fff}.btn--danger:active,.btn-outer:active .btn--danger{background-color:#9e0a0a}.btn--danger:focus-visible,.btn-outer:focus-visible .btn--danger{background-color:#9e0a0a}.btn--danger:hover,.btn-outer:hover .btn--danger{background-color:#86151e}.btn--danger:disabled{background-color:#9e0a0a;color:#fff}.btn--danger:disabled svg{fill:#fff}.btn--danger:disabled:hover,.btn-outer:hover .btn--danger:disabled{background-color:#9e0a0a}.btn--danger:focus-visible{background-clip:padding-box;border:2px solid rgba(0,0,0,0);outline:3px solid #cd2356}.btn--small{min-block-size:unset;min-inline-size:unset;padding:calc(.25rem*var(--scale-factor, 1))}.btn--svg-only svg{margin:0}.btn-outer{background:rgba(0,0,0,0);border-radius:calc(.5rem*var(--scale-factor, 1));cursor:pointer;padding:calc(.5rem*var(--scale-factor, 1)) 0;display:flex;align-items:center;justify-content:center}.btn-outer:focus-visible{outline:none}.btn-outer:focus-visible .btn{border:3px solid #cd2356}.btn-outer:has(.btn:disabled){cursor:default}.rpf-button--primary * svg{fill:var(--rpf-button-primary-text-color)}.rpf-button--tertiary * svg{fill:var(--rpf-button-secondary-text-color) !important}.rpf-button{flex-direction:row-reverse}.rpf-button--fit{inline-size:fit-content}.rpf-button.rpf-button--fill{justify-content:center;inline-size:100%;box-sizing:border-box}.rpf-button--secondary{justify-content:center;align-items:center}.rpf-button--secondary * svg{fill:#4d575b}.--dark * .rpf-button--secondary{border-color:#89ddd5}.--dark * .rpf-button--secondary span{color:#fff}.--dark * .rpf-button--secondary svg{fill:#fff}.--dark * .rpf-button--secondary::before{background-color:#33353d}.--dark * .rpf-button--secondary:hover{border-color:#89ddd5}.--dark * .rpf-button--secondary:hover::before{background-color:rgba(255,255,255,.1)}.--dark * .rpf-button--secondary:active::before{background-color:rgba(255,255,255,.15)}.--dark * .rpf-button--secondary:disabled{border-color:#d5d7dc;background-color:inherit}.--dark * .rpf-button--secondary:disabled::before{background-color:inherit}.--dark * .rpf-button--secondary:disabled span{color:#d5d7dc}.--dark * .rpf-button--tertiary{color:#fff;border:none}.--dark * .rpf-button--tertiary:hover::before{background-color:rgba(255,255,255,.1)}.--dark * .rpf-button--tertiary:active::before{background-color:rgba(255,255,255,.15)}.--dark * .rpf-button--tertiary:disabled{background-color:inherit}.--dark * .rpf-button--tertiary:disabled::before{background-color:inherit}.--dark * .rpf-button--tertiary:disabled span{color:#d5d7dc}.--light * .rpf-button--secondary span{color:#212121}.--light * .rpf-button--secondary::before{background-color:#fff}.--light * .rpf-button--secondary:hover{border-color:#89ddd5}.--light * .rpf-button--secondary:hover::before{background-color:#e7f8f7}.--light * .rpf-button--secondary:active::before{background-color:#dcf5f3}.--light * .rpf-button--secondary:disabled{border-color:#d5d7dc;background-color:inherit}.--light * .rpf-button--secondary:disabled::before{background-color:inherit}.--light * .rpf-button--secondary:disabled span{color:#d5d7dc}.--light * .rpf-button--tertiary{color:#212121;border:none}.--light * .rpf-button--tertiary::before{background-color:#fff}.--light * .rpf-button--tertiary:hover::before{background-color:#e7f8f7}.--light * .rpf-button--tertiary:active::before{background-color:#dcf5f3}.--light * .rpf-button--tertiary:disabled{background-color:inherit}.--light * .rpf-button--tertiary:disabled::before{background-color:inherit}.--light * .rpf-button--tertiary:disabled span{color:#d5d7dc}.rpf-button__icon{display:flex}.save-status{align-items:center;display:flex;gap:calc(.25rem*var(--scale-factor, 1));justify-content:flex-end;margin-block:0;padding-inline:calc(1rem*var(--scale-factor, 1))}.save-status--mobile{margin:unset}.save-status--mobile .save-status__text{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1))}.save-status__icon{display:flex}.context-menu__drop{padding:calc(.5rem*var(--scale-factor, 1)) calc(1rem*var(--scale-factor, 1));margin:0}.context-menu__drop svg{margin:0}.context-menu__drop :focus-visible{border:none}.context-menu{list-style-type:none;padding:0;margin-inline:calc(.5rem*var(--scale-factor, 1)) 0;margin-block:0;border-radius:5px;display:flex;flex-direction:column}.context-menu .context-menu__item{margin:0;background-color:inherit;color:var(--rpf-button-secondary-color);padding:calc(.5rem*var(--scale-factor, 1));text-align:start;white-space:nowrap;overflow-x:visible;box-sizing:border-box;inline-size:100%;justify-content:start}.context-menu :focus-visible{border:none}.context-menu svg{inline-size:calc(1.5rem*var(--scale-factor, 1));block-size:auto}.context-menu--dark{background-color:#000;color:#fff;border:1px solid rgba(0,0,0,0)}.context-menu--dark svg{fill:#fff}.context-menu--dark .btn:hover{background-color:#33353d}.context-menu--dark .btn:disabled{color:#4a4d59}.context-menu--light{background-color:#fff;color:#212121;border:1px solid #d5d7dc}.context-menu--light svg{fill:#000}.context-menu--light .btn:hover{background-color:#e3e4e8}.context-menu--light .btn:disabled{color:#babcc5}.context-menu--dark .btn:disabled svg{fill:#4a4d59}.context-menu--light .btn:disabled svg{fill:#e3e4e8}.context-menu .btn:disabled:hover{background-color:inherit}.files-list-item-wrapper{display:flex;position:relative}.files-list-item{inline-size:100%;display:flex;flex-direction:row !important;justify-content:flex-start;position:relative;align-items:center;border-radius:8px;border:3px solid rgba(0,0,0,0);box-sizing:border-box;white-space:nowrap;font-weight:400;min-block-size:44px;padding:calc(.5rem*var(--scale-factor, 1)) calc(2.5rem*var(--scale-factor, 1)) calc(.5rem*var(--scale-factor, 1)) calc(.5rem*var(--scale-factor, 1));margin:0}.files-list-item span{font-weight:700;overflow-x:hidden;text-overflow:ellipsis}.files-list-item__menu{border-radius:8px;position:absolute;inset-inline-end:0}.files-list-item:hover,.files-list-item__menu:hover{background-color:var(--rpf-files-list-item-hover)}.files-list-item:hover::before,.files-list-item__menu:hover::before{background-color:rgba(0,0,0,0) !important}.files-list-item:active,.files-list-item__menu:active{background-color:var(--rpf-files-list-item-active)}.embedded-viewer{display:flex;flex:1 1 auto;block-size:auto;overflow:hidden}.embedded-viewer .proj-runner-container{display:flex;flex:1 1 auto;flex-direction:column;border-radius:10px;block-size:auto;inline-size:100%}.embedded-viewer .pythonrunner-container{border-radius:10px;flex:1;overflow:hidden;box-sizing:border-box}.embedded-viewer .visual-output{box-sizing:border-box;overflow:auto}#app.--light .embedded-viewer{background-color:#fff}:host{font-size:1.6rem}#wc{background:var(--editor-secondary-theme, transparent);font-family:\"Roboto\",-apple-system,BlinkMacSystemFont,\"Segoe UI\",\"Oxygen\",\"Ubuntu\",\"Cantarell\",\"Fira Sans\",\"Droid Sans\",\"Helvetica Neue\",sans-serif;font-size:16px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:flex;flex-flow:column;block-size:100%}#wc .proj{min-block-size:100%}code{font-family:source-code-pro,Menlo,Monaco,Consolas,\"Courier New\",monospace}button{all:initial;font-size:inherit}svg{min-inline-size:fit-content}button:focus-visible{outline:2px solid #000}.select-buttons__tick--selected svg path{fill:var(--editor-color-layer-2)}.--light{--editor-color-layer-1: #e7f8f7;--editor-color-layer-2: #ffffff;--editor-color-layer-3: #ffffff;--editor-color-outline: #d5d7dc;--editor-color-theme: #232d9a;--editor-color-theme-secondary: #0e857a;--editor-color-theme-tertiary: #e7f8f7;--editor-color-text: #212121;--editor-color-text-secondary: #4d575b}.--dark{--editor-color-layer-1: #23242a;--editor-color-layer-2: #ffffff;--editor-color-layer-3: #33353d;--editor-color-outline: #4a4d59;--editor-color-theme: #232d9a;--editor-color-theme-secondary: #89ddd5;--editor-color-theme-tertiary: #0e857a;--editor-color-text: #ffffff;--editor-color-text-secondary: #cccccc;--rpf-button-secondary-text-color: #ffffff}.--dark .rpf-button--secondary{border-color:#232d9a}",""]),t.a=c},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,'.react-tabs{-webkit-tap-highlight-color:transparent}.react-tabs__tab-list{border-bottom:1px solid #aaa;margin:0 0 10px;padding:0}.react-tabs__tab{display:inline-block;border:1px solid transparent;border-bottom:none;bottom:-1px;position:relative;list-style:none;padding:6px 12px;cursor:pointer}.react-tabs__tab--selected{background:#fff;border-color:#aaa;color:black;border-radius:5px 5px 0 0}.react-tabs__tab--disabled{color:GrayText;cursor:default}.react-tabs__tab:focus{box-shadow:0 0 5px hsl(208, 99%, 50%);border-color:hsl(208, 99%, 50%);outline:none}.react-tabs__tab:focus:after{content:"";position:absolute;height:5px;left:-4px;right:-4px;bottom:-5px;background:#fff}.react-tabs__tab-panel{display:none}.react-tabs__tab-panel--selected{display:block}.react-toggle{touch-action:pan-x;display:inline-block;position:relative;cursor:pointer;background-color:transparent;border:0;padding:0;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:rgba(0, 0, 0, 0);-webkit-tap-highlight-color:transparent}.react-toggle-screenreader-only{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.react-toggle--disabled{cursor:not-allowed;opacity:.5;-webkit-transition:opacity .25s;transition:opacity .25s}.react-toggle-track{width:50px;height:24px;padding:0;border-radius:30px;background-color:#4d4d4d;-webkit-transition:all .2s ease;-moz-transition:all .2s ease;transition:all .2s ease}.react-toggle:hover:not(.react-toggle--disabled) .react-toggle-track{background-color:#000}.react-toggle--checked .react-toggle-track{background-color:#19ab27}.react-toggle--checked:hover:not(.react-toggle--disabled) .react-toggle-track{background-color:#128d15}.react-toggle-track-check{position:absolute;width:14px;height:10px;top:0px;bottom:0px;margin-top:auto;margin-bottom:auto;line-height:0;left:8px;opacity:0;-webkit-transition:opacity .25s ease;-moz-transition:opacity .25s ease;transition:opacity .25s ease}.react-toggle--checked .react-toggle-track-check{opacity:1;-webkit-transition:opacity .25s ease;-moz-transition:opacity .25s ease;transition:opacity .25s ease}.react-toggle-track-x{position:absolute;width:10px;height:10px;top:0px;bottom:0px;margin-top:auto;margin-bottom:auto;line-height:0;right:10px;opacity:1;-webkit-transition:opacity .25s ease;-moz-transition:opacity .25s ease;transition:opacity .25s ease}.react-toggle--checked .react-toggle-track-x{opacity:0}.react-toggle-thumb{transition:all .5s cubic-bezier(0.23, 1, 0.32, 1) 0ms;position:absolute;top:1px;left:1px;width:22px;height:22px;border:1px solid #4d4d4d;border-radius:50%;background-color:#fafafa;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:all .25s ease;-moz-transition:all .25s ease;transition:all .25s ease}.react-toggle--checked .react-toggle-thumb{left:27px;border-color:#19ab27}.react-toggle--focus .react-toggle-thumb{-webkit-box-shadow:0px 0px 3px 2px #0099e0;-moz-box-shadow:0px 0px 3px 2px #0099e0;box-shadow:0px 0px 2px 3px #0099e0}.react-toggle:active:not(.react-toggle--disabled) .react-toggle-thumb{-webkit-box-shadow:0px 0px 5px 5px #0099e0;-moz-box-shadow:0px 0px 5px 5px #0099e0;box-shadow:0px 0px 5px 5px #0099e0}pre[class*=language-].line-numbers{position:relative;padding-left:3.8em;counter-reset:linenumber}pre[class*=language-].line-numbers>code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8em;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows>span{display:block;counter-increment:linenumber}.line-numbers-rows>span:before{content:counter(linenumber);color:#999;display:block;padding-right:.8em;text-align:right}pre[data-line]{position:relative;padding:1em 0 1em 3em}.line-highlight{position:absolute;left:0;right:0;padding:inherit 0;margin-top:1em;background:hsla(24, 20%, 50%, 0.08);background:linear-gradient(to right, hsla(24, 20%, 50%, 0.1) 70%, hsla(24, 20%, 50%, 0));pointer-events:none;line-height:inherit;white-space:pre}@media print{.line-highlight{-webkit-print-color-adjust:exact;color-adjust:exact}}.line-highlight:before,.line-highlight[data-end]:after{content:attr(data-start);position:absolute;top:.4em;left:.6em;min-width:1em;padding:0 .5em;background-color:hsla(24, 20%, 50%, 0.4);color:hsl(24, 20%, 95%);font:bold 65%/1.5 sans-serif;text-align:center;vertical-align:.3em;border-radius:999px;text-shadow:none;box-shadow:0 1px white}.line-highlight[data-end]:after{content:attr(data-end);top:auto;bottom:.4em}.line-numbers .line-highlight:before,.line-numbers .line-highlight:after{content:none}pre[id].linkable-line-numbers span.line-numbers-rows{pointer-events:all}pre[id].linkable-line-numbers span.line-numbers-rows>span:before{cursor:pointer}pre[id].linkable-line-numbers span.line-numbers-rows>span:hover:before{background-color:rgba(128, 128, 128, 0.2)}',""]),t.a=i},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,':root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}html,body{margin:0}:host{font-size:16px}body{font-family:"Roboto",-apple-system,BlinkMacSystemFont,"Segoe UI","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}code{font-family:source-code-pro,Menlo,Monaco,Consolas,"Courier New",monospace}#app{min-block-size:100dvh}.--light,#wc.--light{--editor-color-layer-1: #e7f8f7;--editor-color-layer-2: #000000;--editor-color-layer-3: #ffffff;--editor-color-outline: #d5d7dc;--editor-color-theme: #14bdac;--editor-color-theme-secondary: #0e857a;--editor-color-theme-tertiary: #e7f8f7;--editor-color-text: #212121;--editor-color-text-secondary: #4d575b;--rpf-files-list-item-active: #dcf5f3;--rpf-files-list-item-hover: #e7f8f7;--rpf-tab-button-hover: var(--rpf-grey-100);--rpf-tab-button-background: inherit;--rpf-tab-border-bottom-selected: var(--rpf-teal-900);--sidebar-border: var(--rpf-grey-150);--sidebar-background: var(--rpf-white);--sidebar-background-selected: var(--rpf-off-white);--sidebar-panel-background: var(--rpf-white);--sidebar-option-hover: var(--rpf-grey-100);--sidebar-option-selected-icon: var(--rpf-black);--sidebar-option-selected-border: var(--editor-color-theme);--sidebar-option-selected-background: var(--editor-color-theme-tertiary);--sidebar-option-selected-background-hover: var(--rpf-teal-200)}.--dark,#wc.--dark{--editor-color-layer-1: #23242a;--editor-color-layer-2: #2a2b32;--editor-color-layer-3: #33353d;--editor-color-outline: #4a4d59;--editor-color-theme: #89ddd5;--editor-color-theme-secondary: #89ddd5;--editor-color-theme-tertiary: #0e857a;--editor-color-text: #ffffff;--editor-color-text-secondary: #cccccc;--rpf-files-list-item-active: hsla(0, 0%, 100%, 0.15);--rpf-files-list-item-hover: hsla(0, 0%, 100%, 0.1);--rpf-tab-button-hover: var(--rpf-grey-900);--rpf-tab-button-background: var(--rpf-grey-800);--rpf-tab-border-bottom-selected: var(--rpf-teal-800);--sidebar-border: var(--rpf-grey-600);--sidebar-background: var(--rpf-grey-800);--sidebar-background-selected: var(--rpf-grey-800);--sidebar-panel-background: var(--rpf-grey-700);--sidebar-option-hover: var(--rpf-grey-600);--sidebar-option-selected-icon: var(--rpf-white);--sidebar-option-selected-border: var(--editor-color-theme);--sidebar-option-selected-background: var(--editor-color-theme-tertiary);--sidebar-option-selected-background-hover: var(--rpf-teal-800)}.--dark .btn,.--dark .rpf-button,#wc.--dark .btn,#wc.--dark .rpf-button{--rpf-button-primary-background-color: var(--rpf-teal-400);--rpf-button-primary-background-color-focus: var(--rpf-teal-400);--rpf-button-primary-background-color-active: var(--rpf-teal-200);--rpf-button-primary-background-color-disabled: var(--rpf-grey-200);--rpf-button-primary-color-disabled: var(--rpf-grey-700);--rpf-button-primary-color-disabled-focus: var(--rpf-teal-400);--rpf-button-primary-background-color-hover: var(--rpf-teal-600);--rpf-button-secondary-background-color: var(--rpf-grey-800);--rpf-button-secondary-background-color-active: var(--rpf-teal-200);--rpf-button-secondary-color-disabled-background: var(--rpf-grey-700);--rpf-button-secondary-background-color-hover: var(--rpf-grey-600);--rpf-button-secondary-border-color-hover: var(--rpf-teal-400);--rpf-button-secondary-color-disabled: var(--rpf-grey-100);--rpf-button-secondary-color: var(--rpf-white);--rpf-button-secondary-text-color: var(--rpf-white);--rpf-button-tertiary-text-color-hover: var(--rpf-grey-200)}.--dark .rpf-button--secondary,#wc.--dark .rpf-button--secondary{border-color:var(--rpf-teal-400)}.btn,.rpf-button{--rpf-button-primary-background-color: var(--rpf-teal-800);--rpf-button-primary-background-color-focus: var(--rpf-teal-800);--rpf-button-primary-background-color-hover: var(--rpf-teal-900);--rpf-button-primary-background-color-active: var(--rpf-teal-600);--rpf-button-primary-background-color-disabled: var(--rpf-teal-200);--rpf-button-primary-color-disabled: var(--rpf-grey-600);--rpf-button-primary-text-color: var(--rpf-black);--rpf-button-secondary-background-color: var(--rpf-teal-800);--rpf-button-secondary-background-color-focus: $rpf-brand-raspberry;--rpf-button-secondary-background-color-hover: var(--rpf-teal-100);--rpf-button-secondary-border-color-hover: var(--rpf-teal-900);--rpf-button-secondary-background-color-active: var(--rpf-teal-900);--rpf-button-secondary-background-color-disabled: var(--rpf-grey-50);--rpf-button-secondary-text-color: var(--rpf-black);--rpf-button-tertiary-text-color-hover: var(--rpf-grey-600)}.btn .rpf-button--secondary,.rpf-button .rpf-button--secondary{border-color:var(--rpf-teal-800)}.select-buttons__tick--selected{--rpf-select-buttons-tick-color: var(--rpf-black)}.modal-overlay{--rpf-input-active-border: var(--editor-color-theme) }',""]),t.a=i},function(e,t,n){var r;r=function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t1)throw new Error("Multiple style objects as direct descedents of a Style component are not supported ("+e.length+" style objects detected): \n\n"+e[0]);return e[0]}return"string"!=typeof n.props.children||(0,s.isValidElement)(n.props.children)?null:n.props.children},n.getRootElement=function(){if(n.props.children instanceof Array){var e=n.props.children.filter((function(e){return(0,s.isValidElement)(e)}));return e[0]}return(0,s.isValidElement)(n.props.children)?n.props.children:null},n.getRootSelectors=function(e){var t=[];return e.props.id&&t.push("#"+e.props.id),e.props.className&&e.props.className.trim().split(/\s+/g).forEach((function(e){return t.push(e)})),t.length||"function"==typeof e.type||t.push(e.type),t},n.processCSSText=function(e,t,r){return e.replace(/\s*\/\/(?![^(]*\)).*|\s*\/\*.*\*\//g,"").replace(/\s\s+/g," ").split("}").map((function(e){var i=/.*:.*;/g,o=/.*:.*(;|$|\s+)/g,s=/\s*@/g,a=/\s*(([0-9][0-9]?|100)\s*%)|\s*(to|from)\s*$/g;return e.split("{").map((function(e,l,c){if(!e.trim().length)return"";var u=c.length-1===l&&e.match(o);if(e.match(i)||u)return n.escapeTextContentForBrowser(e);var d=e;return t&&!/:target/gi.test(d)?d.match(s)||d.match(a)?d:n.scopeSelector(t,d,r):d})).join("{\n")})).join("}\n")},n.escaper=function(e){return{">":">","<":"<"}[e]},n.escapeTextContentForBrowser=function(e){return(""+e).replace(/[><]/g,n.escaper)},n.scopeSelector=function(e,t,n){for(var r=[],i=t.split(/,(?![^(|[]*\)|\])/g),o=0;o1&&void 0!==arguments[1]?arguments[1]:0;if(!(t>32||n.pepper.length>1e4))for(var r in e){var o=/^[_$]|type|ref|^value$/.test(r);e[r]&&"object"===i(e[r])&&!o?n.traverseObjectToGeneratePepper(e[r],t+1):e[r]&&!o&&"function"!=typeof e[r]&&(n.pepper+=e[r])}},n.isVoidElement=function(e){return["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"].some((function(t){return e===t}))},n.addCSSTextToHead=function(e){if(e.length){var t=(0,l.default)(e);window._reactiveStyle.cssTextHashesAddedToHead.some((function(e){return e===t}))||(window._reactiveStyle.el.innerHTML+=e,window._reactiveStyle.cssTextHashesAddedToHead.push(t))}},n.createStyleElement=function(e,t){return a.default.createElement("style",{type:"text/css",key:t,ref:function(e){return n._style=e},dangerouslySetInnerHTML:{__html:e||""}})},n.getNewChildrenForCloneElement=function(e,t,r){return[n.createStyleElement(e,r)].concat(t.props.children)},n.scopeClassNameCache={},n.scopedCSSTextCache={},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"render",value:function(){if(!this.props.children)return this.createStyleElement();var e=this.getStyleString(),t=this.getRootElement();if(!e&&t)return t.props.children;if(e&&!t)return this.createStyleElement(this.processCSSText(e),this.getScopeClassName(e,t));var n=t.props.className?t.props.className+" ":"",i=void 0,o=void 0,a=n+(t.props.id?t.props.id:"")+e;return this.scopeClassNameCache[a]?(i=this.scopeClassNameCache[a],o=this.scopedCSSTextCache[i]):(i=this.getScopeClassName(e,t),o=this.processCSSText(e,"."+i,this.getRootSelectors(t)),this.scopeClassNameCache[a]=i,this.scopedCSSTextCache[i]=o),(0,s.cloneElement)(t,r({},t.props,{className:""+n+i}),this.getNewChildrenForCloneElement(o,t,i))}}]),t}(s.Component);u.it=function(e,t){return a.default.createElement(u,null,e,t)},t.default=u},function(e,t){"use strict";e.exports=function(e){for(var t=1,n=0,r=0,i=e.length,o=-4&i;r{if("string"!=typeof e&&!Array.isArray(e))throw new TypeError("Expected the input to be `string | string[]`");if(t={pascalCase:!1,preserveConsecutiveUppercase:!1,...t},0===(e=Array.isArray(e)?e.map(e=>e.trim()).filter(e=>e.length).join("-"):e.trim()).length)return"";const n=!1===t.locale?e=>e.toLowerCase():e=>e.toLocaleLowerCase(t.locale),s=!1===t.locale?e=>e.toUpperCase():e=>e.toLocaleUpperCase(t.locale);if(1===e.length)return t.pascalCase?s(e):n(e);return e!==n(e)&&(e=((e,t,n)=>{let o=!1,s=!1,a=!1;for(let l=0;l(o.lastIndex=0,e.replace(o,e=>t(e))))(e,n):n(e),t.pascalCase&&(e=s(e.charAt(0))+e.slice(1)),((e,t)=>(c.lastIndex=0,u.lastIndex=0,e.replace(c,(e,n)=>t(n)).replace(u,e=>t(e))))(e,s)};e.exports=d,e.exports.default=d},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return l})),n.d(t,"b",(function(){return c}));var r=n(8),i=n(115);const o={nowSeconds:()=>Date.now()/1e3};const s=Object(i.b)()?function(){try{return Object(i.a)(e,"perf_hooks").performance}catch(e){return}}():function(){const{performance:e}=r.a;if(!e||!e.now)return;return{now:()=>e.now(),timeOrigin:Date.now()-e.now()}}(),a=void 0===s?o:{nowSeconds:()=>(s.timeOrigin+s.now())/1e3},l=o.nowSeconds.bind(o),c=a.nowSeconds.bind(a);let u;(()=>{const{performance:e}=r.a;if(!e||!e.now)return void(u="none");const t=e.now(),n=Date.now(),i=e.timeOrigin?Math.abs(e.timeOrigin+t-n):36e5,o=i<36e5,s=e.timing&&e.timing.navigationStart,a="number"==typeof s?Math.abs(s+t-n):36e5;o||a<36e5?i<=a?(u="timeOrigin",e.timeOrigin):u="navigationStart":u="dateNow"})()}).call(this,n(64)(e))},function(e,t,n){"use strict";function r(){return"undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&!!__SENTRY_BROWSER_BUNDLE__}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return l}));var r=n(18),i=n(194),o=n(26),s=n(88);function a(t,n=1/0,a=1/0){try{return function t(n,a,l=1/0,c=1/0,u=Object(i.a)()){const[d,h]=u;if(null===a||["number","boolean","string"].includes(typeof a)&&!Object(r.h)(a))return a;const p=function(t,n){try{return"domain"===t&&n&&"object"==typeof n&&n._events?"[Domain]":"domainEmitter"===t?"[DomainEmitter]":void 0!==e&&n===e?"[Global]":"undefined"!=typeof window&&n===window?"[Window]":"undefined"!=typeof document&&n===document?"[Document]":Object(r.m)(n)?"[SyntheticEvent]":"number"==typeof n&&n!=n?"[NaN]":void 0===n?"[undefined]":"function"==typeof n?`[Function: ${Object(s.b)(n)}]`:"symbol"==typeof n?`[${String(n)}]`:"bigint"==typeof n?`[BigInt: ${String(n)}]`:`[object ${Object.getPrototypeOf(n).constructor.name}]`}catch(e){return`**non-serializable** (${e})`}}(n,a);if(!p.startsWith("[object "))return p;if(a.__sentry_skip_normalization__)return a;if(0===l)return p.replace("object ","");if(d(a))return"[Circular ~]";const f=a;if(f&&"function"==typeof f.toJSON)try{const e=f.toJSON();return t("",e,l-1,c,u)}catch(e){}const m=Array.isArray(a)?[]:{};let g=0;const b=Object(o.b)(a);for(const e in b){if(!Object.prototype.hasOwnProperty.call(b,e))continue;if(g>=c){m[e]="[MaxProperties ~]";break}const n=b[e];m[e]=t(e,n,l-1,c,u),g+=1}return h(a),m}("",t,n,a)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function l(e,t=3,n=102400){const r=a(e,t);return i=r,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(i))>n?l(e,t-1,n):r;var i}}).call(this,n(29))},function(e,t,n){"use strict";function r(){const e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;ee.length)&&(t=e.length);for(var n=0,r=new Array(t);nt.getRandomValues(new Uint8Array(1))[0]:()=>16*Math.random();return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,e=>(e^(15&n())>>e/4).toString(16))}function o(e){return Array.isArray(e)?e:[e]}},function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(7),i=n(17),o=n(11),s=n(22);n(441);function a(e){try{return e&&"function"==typeof e&&e.name||""}catch(e){return""}}function l(){if(!("fetch"in r.a))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}function c(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}const u={},d={};function h(e){if(!d[e])switch(d[e]=!0,e){case"console":!function(){if(!("console"in r.a))return;o.a.forEach((function(e){e in r.a.console&&Object(s.c)(r.a.console,e,(function(t){return function(...n){f("console",{args:n,level:e}),t&&t.apply(r.a.console,n)}}))}))}();break;case"dom":!function(){if(!("document"in r.a))return;const e=f.bind(null,"dom"),t=_(e,!0);r.a.document.addEventListener("click",t,!1),r.a.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{const n=r.a[t]&&r.a[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(Object(s.c)(n,"addEventListener",(function(t){return function(n,r,i){if("click"===n||"keypress"==n)try{const r=this,o=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},s=o[n]=o[n]||{refCount:0};if(!s.handler){const r=_(e);s.handler=r,t.call(this,n,r,i)}s.refCount+=1}catch(e){}return t.call(this,n,r,i)}})),Object(s.c)(n,"removeEventListener",(function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this,i=n.__sentry_instrumentation_handlers__||{},o=i[t];o&&(o.refCount-=1,o.refCount<=0&&(e.call(this,t,o.handler,r),o.handler=void 0,delete i[t]),0===Object.keys(i).length&&delete n.__sentry_instrumentation_handlers__)}catch(e){}return e.call(this,t,n,r)}})))})}();break;case"xhr":!function(){if(!("XMLHttpRequest"in r.a))return;const e=XMLHttpRequest.prototype;Object(s.c)(e,"open",(function(e){return function(...t){const n=this,r=t[1],o=n.__sentry_xhr__={method:Object(i.i)(t[0])?t[0].toUpperCase():t[0],url:t[1]};Object(i.i)(r)&&"POST"===o.method&&r.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const a=function(){if(4===n.readyState){try{o.status_code=n.status}catch(e){}f("xhr",{args:t,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:n})}};return"onreadystatechange"in n&&"function"==typeof n.onreadystatechange?Object(s.c)(n,"onreadystatechange",(function(e){return function(...t){return a(),e.apply(n,t)}})):n.addEventListener("readystatechange",a),e.apply(n,t)}})),Object(s.c)(e,"send",(function(e){return function(...t){return this.__sentry_xhr__&&void 0!==t[0]&&(this.__sentry_xhr__.body=t[0]),f("xhr",{args:t,startTimestamp:Date.now(),xhr:this}),e.apply(this,t)}}))}();break;case"fetch":!function(){if(!function(){if(!l())return!1;if(c(r.a.fetch))return!0;let e=!1;const t=r.a.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=c(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&o.c.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e}())return;Object(s.c)(r.a,"fetch",(function(e){return function(...t){const n={args:t,fetchData:{method:m(t),url:g(t)},startTimestamp:Date.now()};return f("fetch",{...n}),e.apply(r.a,t).then(e=>(f("fetch",{...n,endTimestamp:Date.now(),response:e}),e),e=>{throw f("fetch",{...n,endTimestamp:Date.now(),error:e}),e})}}))}();break;case"history":!function(){if(!function(){const e=r.a.chrome,t=e&&e.app&&e.app.runtime,n="history"in r.a&&!!r.a.history.pushState&&!!r.a.history.replaceState;return!t&&n}())return;const e=r.a.onpopstate;function t(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=b,t=String(n);b=t,f("history",{from:e,to:t})}return e.apply(this,t)}}r.a.onpopstate=function(...t){const n=r.a.location.href,i=b;if(b=n,f("history",{from:i,to:n}),e)try{return e.apply(this,t)}catch(e){}},Object(s.c)(r.a.history,"pushState",t),Object(s.c)(r.a.history,"replaceState",t)}();break;case"error":S=r.a.onerror,r.a.onerror=function(e,t,n,r,i){return f("error",{column:r,error:i,line:n,msg:e,url:t}),!!S&&S.apply(this,arguments)};break;case"unhandledrejection":x=r.a.onunhandledrejection,r.a.onunhandledrejection=function(e){return f("unhandledrejection",e),!x||x.apply(this,arguments)};break;default:return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&o.c.warn("unknown instrumentation type:",e))}}function p(e,t){u[e]=u[e]||[],u[e].push(t),h(e)}function f(e,t){if(e&&u[e])for(const n of u[e]||[])try{n(t)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&o.c.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${a(n)}\nError:`,t)}}function m(e=[]){return"Request"in r.a&&Object(i.d)(e[0],Request)&&e[0].method?String(e[0].method).toUpperCase():e[1]&&e[1].method?String(e[1].method).toUpperCase():"GET"}function g(e=[]){return"string"==typeof e[0]?e[0]:"Request"in r.a&&Object(i.d)(e[0],Request)?e[0].url:String(e[0])}let b;let v,y;function _(e,t=!1){return n=>{if(!n||y===n)return;if(function(e){if("keypress"!==e.type)return!1;try{const t=e.target;if(!t||!t.tagName)return!0;if("INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable)return!1}catch(e){}return!0}(n))return;const i="keypress"===n.type?"input":n.type;(void 0===v||function(e,t){if(!e)return!0;if(e.type!==t.type)return!0;try{if(e.target!==t.target)return!0}catch(e){}return!1}(y,n))&&(e({event:n,name:i,global:t}),y=n),clearTimeout(v),v=r.a.setTimeout(()=>{v=void 0},1e3)}}let S=null;let x=null},,,,,,,function(e,t,n){"use strict"; +/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var r=Symbol.for("react.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),f=Symbol.iterator;var m={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,b={};function v(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||m}function y(){}function _(e,t,n){this.props=e,this.context=t,this.refs=b,this.updater=n||m}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=v.prototype;var S=_.prototype=new y;S.constructor=_,g(S,v.prototype),S.isPureReactComponent=!0;var x=Array.isArray,w=Object.prototype.hasOwnProperty,k={current:null},O={key:!0,ref:!0,__self:!0,__source:!0};function E(e,t,n){var i,o={},s=null,a=null;if(null!=t)for(i in void 0!==t.ref&&(a=t.ref),void 0!==t.key&&(s=""+t.key),t)w.call(t,i)&&!O.hasOwnProperty(i)&&(o[i]=t[i]);var l=arguments.length-2;if(1===l)o.children=n;else if(1

"+a+"
"},d="This page requires a browser that supports WebGL.
Click here to upgrade your browser.",e=function(a){for(var b=["webgl","experimental-webgl","webkit-3d","moz-webgl"],c=null,d=0;dClick here for more information."):c(d)}return h};return a.Context=Sk.misceval.buildClass(a,function(a,b){b.__init__=new Sk.builtin.func(function(a,b){var c=document.getElementById(b.v),d=f(b.v,c);if(!d)throw new Error("Your browser does not appear to support WebGL.");for(var e in a.gl=d,d.__proto__)if("number"==typeof d.__proto__[e])Sk.abstr.objectSetItem(a.$d,new Sk.builtin.str(e),d.__proto__[e]);else if("function"==typeof d.__proto__[e])switch(e){case"bufferData":break;case"clearColor":break;case"drawArrays":break;case"getAttribLocation":break;case"getUniformLocation":break;case"shaderSource":break;case"uniformMatrix4fv":break;case"vertexAttribPointer":break;case"viewport":break;default:(function(b){Sk.abstr.objectSetItem(a.$d,new Sk.builtin.str(e),new Sk.builtin.func(function(){var a=d.__proto__[b];return a.apply(d,arguments)}))})(e);}d.clearColor(100/255,149/255,237/255,1),d.clear(d.COLOR_BUFFER_BIT)}),b.tp$getattr=Sk.generic.getAttr,b.bufferData=new Sk.builtin.func(function(a,b,c,d){a.gl.bufferData(b,c.v,d)}),b.clearColor=new Sk.builtin.func(function(a,b,c,d,e){a.gl.clearColor(Sk.builtin.asnum$(b),Sk.builtin.asnum$(c),Sk.builtin.asnum$(d),Sk.builtin.asnum$(e))}),b.getAttribLocation=new Sk.builtin.func(function(a,b,c){return a.gl.getAttribLocation(b,c.v)}),b.getUniformLocation=new Sk.builtin.func(function(a,b,c){return a.gl.getUniformLocation(b,c.v)}),b.shaderSource=new Sk.builtin.func(function(a,b,c){a.gl.shaderSource(b,c.v)}),b.drawArrays=new Sk.builtin.func(function(a,b,c,d){a.gl.drawArrays(Sk.builtin.asnum$(b),Sk.builtin.asnum$(c),Sk.builtin.asnum$(d))}),b.vertexAttribPointer=new Sk.builtin.func(function(a,b,c,d,e,f,g){a.gl.vertexAttribPointer(b,Sk.builtin.asnum$(c),Sk.builtin.asnum$(d),e,Sk.builtin.asnum$(f),Sk.builtin.asnum$(g))}),b.viewport=new Sk.builtin.func(function(a,b,c,d,e){a.gl.viewport(Sk.builtin.asnum$(b),Sk.builtin.asnum$(c),Sk.builtin.asnum$(d),Sk.builtin.asnum$(e))}),b.uniformMatrix4fv=new Sk.builtin.func(function(a,b,c,d){a.gl.uniformMatrix4fv(Sk.builtin.asnum$(b),c,d.v)}),b.setDrawFunc=new Sk.builtin.func(function(a,b){var c=new Date().getTime(),d=setInterval(function(){Sk.misceval.callsimArray(b,[a,new Date().getTime()-c])},1e3/60)})},"Context",[]),a.Float32Array=Sk.misceval.buildClass(a,function(a,b){b.__init__=new Sk.builtin.func(function(a,b){a.v="number"==typeof b?new Float32Array(b):new Float32Array(Sk.ffi.remapToJs(b))}),b.__repr__=new Sk.builtin.func(function(a){for(var b=[],c=0;ce;e++)d.elements[4*e+0]=b.elements[4*e+0]*c.elements[0]+b.elements[4*e+1]*c.elements[4]+b.elements[4*e+2]*c.elements[8]+b.elements[4*e+3]*c.elements[12],d.elements[4*e+1]=b.elements[4*e+0]*c.elements[1]+b.elements[4*e+1]*c.elements[5]+b.elements[4*e+2]*c.elements[9]+b.elements[4*e+3]*c.elements[13],d.elements[4*e+2]=b.elements[4*e+0]*c.elements[2]+b.elements[4*e+1]*c.elements[6]+b.elements[4*e+2]*c.elements[10]+b.elements[4*e+3]*c.elements[14],d.elements[4*e+3]=b.elements[4*e+0]*c.elements[3]+b.elements[4*e+1]*c.elements[7]+b.elements[4*e+2]*c.elements[11]+b.elements[4*e+3]*c.elements[15];return b.elements=d.elements,b}),c.lookAt=new Sk.builtin.func(function(b,c,e,f,g,h,i,j,k,l){var m=[c-g,e-h,f-i],n=d(m[0]*m[0]+m[1]*m[1]+m[2]*m[2]);n&&(m[0]/=n,m[1]/=n,m[2]/=n);var o=[j,k,l],p=[];p[0]=o[1]*m[2]-o[2]*m[1],p[1]=-o[0]*m[2]+o[2]*m[0],p[2]=o[0]*m[1]-o[1]*m[0],o[0]=m[1]*p[2]-m[2]*p[1],o[1]=-m[0]*p[2]+m[2]*p[0],o[2]=m[0]*p[1]-m[1]*p[0],n=d(p[0]*p[0]+p[1]*p[1]+p[2]*p[2]),n&&(p[0]/=n,p[1]/=n,p[2]/=n),n=d(o[0]*o[0]+o[1]*o[1]+o[2]*o[2]),n&&(o[0]/=n,o[1]/=n,o[2]/=n);var q=Sk.misceval.callsimArray(a.Mat44);return q.elements[0]=p[0],q.elements[4]=p[1],q.elements[8]=p[2],q.elements[12]=0,q.elements[1]=o[0],q.elements[5]=o[1],q.elements[9]=o[2],q.elements[13]=0,q.elements[2]=m[0],q.elements[6]=m[1],q.elements[10]=m[2],q.elements[14]=0,q.elements[3]=0,q.elements[7]=0,q.elements[11]=0,q.elements[15]=1,q=q.multiply(b),b.elements=q.elements,b.translate(-c,-e,-f),b})},"Mat44",[]),a.Mat33=Sk.misceval.buildClass(a,function(a,b){b.__init__=new Sk.builtin.func(function(a){Sk.misceval.callsimArray(b.loadIdentity,[a])}),b.loadIdentity=new Sk.builtin.func(function(a){a.elements=[1,0,0,0,1,0,0,0,1]})},"Mat33",[]),a.Vec3=Sk.misceval.buildClass(a,function(b,c){c.__init__=new Sk.builtin.func(function(a,b,c,d){a.x=b,a.y=c,a.z=d}),c.__sub__=new Sk.builtin.func(function(b,c){return Sk.misceval.callsimArray(a.Vec3,[b.x-c.x,b.y-c.y,b.z-c.z])})},"Vec3",[]),a.cross=new Sk.builtin.func(function(b,c){return Sk.asserts.assert(b instanceof a.Vec3&&c instanceof a.Vec3),Sk.misceval.callsimArray(a.Vec3,[b.y*c.z-b.z*c.y,b.z*c.x-b.x*c.z,b.x*c.y-b.y*c.x])}),a};',"src/lib/webgl/matrix4.js":"var $builtinmodule=function(){var a=Math.PI,b={},c=new Float32Array(3),d=new Float32Array(3),e=new Float32Array(3),f=new Float32Array(4),g=new Float32Array(4),h=new Float32Array(4),i=new Float32Array(16),j=new Float32Array(16),k=new Float32Array(16),l=function(b,c){for(var a=Math.sqrt,d=0,e=c.length,f=0;fe;++e)for(var f=0;4>f;++f)c[4*e+f]=d[4*f+e];return c}),b};","src/lib/webgl/models.js":'var $builtinmodule=function(a){var c={},d=function(a,c){var d=c||gl.ARRAY_BUFFER,e=gl.createBuffer();if(this.target=d,this.buf=e,this.set(a),this.numComponents_=a.numComponents,this.numElements_=a.numElements,this.totalComponents_=this.numComponents_*this.numElements_,a.buffer instanceof Float32Array)this.type_=gl.FLOAT;else if(a.buffer instanceof Uint8Array)this.type_=gl.UNSIGNED_BYTE;else if(a.buffer instanceof Int8Array)this.type_=gl._BYTE;else if(a.buffer instanceof Uint16Array)this.type_=gl.UNSIGNED_SHORT;else if(a.buffer instanceof Int16Array)this.type_=gl.SHORT;else throw"unhandled type:"+typeof a.buffer};return d.prototype.set=function(a){gl.bindBuffer(this.target,this.buf),gl.bufferData(this.target,a.buffer,gl.STATIC_DRAW)},d.prototype.type=function(){return this.type_},d.prototype.numComponents=function(){return this.numComponents_},d.prototype.numElements=function(){return this.numElements_},d.prototype.totalComponents=function(){return this.totalComponents_},d.prototype.buffer=function(){return this.buf},d.prototype.stride=function(){return 0},d.prototype.offset=function(){return 0},c.Model=Sk.misceval.buildClass(c,function(c,e){e.__init__=new Sk.builtin.func(function(c,e,f,g){c.buffers={};var h=function(a,e){var f="indices"==a?gl.ELEMENT_ARRAY_BUFFER:gl.ARRAY_BUFFER;b=c.buffers[a],b?b.set(e):b=new d(e,f),c.buffers[a]=b};for(a in f)h(a,f[a]);var i={},j=0;for(var k in g)i[k]=j++;c.mode=gl.TRIANGLES,c.textures=g.v,c.textureUnits=i,c.shader=e}),e.drawPrep=new Sk.builtin.func(function(a,c){var d=a.shader,e=a.buffers,f=a.textures;for(var g in c=Sk.ffi.remapToJs(c),Sk.misceval.callsimArray(d.use,[d]),e){var h=e[g];if("indices"==g)gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER,h.buffer());else{var i=d.attrib[g];i&&i(h)}}for(var j in f){var k=a.textureUnits[j];d.setUniform$impl(d,textuer,k),f[j].bindToUnit(k)}for(var l in c)d.setUniform$impl(d,l,c[l])}),e.draw=new Sk.builtin.func(function(a,c,d){var e=a.shader;for(uniform in c=Sk.ffi.remapToJs(c),c)e.setUniform$impl(e,uniform,c[uniform]);if(d)for(var f in d){var g=a.textureUnits[f];e.setUniform$impl(e,f,g),d[f].bindToUnit(g)}var h=a.buffers;gl.drawElements(a.mode,h.indices.totalComponents(),gl.UNSIGNED_SHORT,0)})},"Model",[]),c};',"src/lib/webgl/primitives.js":'var $builtinmodule=function(){var a={},b=function(a,b,c){c=c||"Float32Array";var d=window[c];b.length?(this.buffer=new d(b),b=this.buffer.length/a,this.cursor=b):(this.buffer=new d(a*b),this.cursor=0),this.numComponents=a,this.numElements=b,this.type=c};return b.prototype.stride=function(){return 0},b.prototype.offset=function(){return 0},b.prototype.getElement=function(a){for(var b=a*this.numComponents,c=[],d=0;do;++o){c=d[o];for(var p=0;4>p;++p){var q=g[c[p]],r=h[o],s=i[p];k.push(q),l.push(r),m.push(s)}var t=4*o;n.push([t+0,t+1,t+2]),n.push([t+0,t+2,t+3])}return{position:k,normal:l,texCoord:m,indices:n}}),a};',"src/lib/whichdb.py":'raise NotImplementedError("whichdb is not yet implemented in Skulpt")\n',"src/lib/wsgiref/__init__.py":'raise NotImplementedError("wsgiref is not yet implemented in Skulpt")\n',"src/lib/xdrlib.py":'raise NotImplementedError("xdrlib is not yet implemented in Skulpt")\n',"src/lib/xml/__init__.py":'raise NotImplementedError("xml is not yet implemented in Skulpt")\n',"src/lib/xml/dom/__init__.py":'raise NotImplementedError("dom is not yet implemented in Skulpt")\n',"src/lib/xml/etree/__init__.py":'raise NotImplementedError("etree is not yet implemented in Skulpt")\n',"src/lib/xml/parsers/__init__.py":'raise NotImplementedError("parsers is not yet implemented in Skulpt")\n',"src/lib/xml/sax/__init__.py":'raise NotImplementedError("sax is not yet implemented in Skulpt")\n',"src/lib/xmllib.py":'raise NotImplementedError("xmllib is not yet implemented in Skulpt")\n',"src/lib/xmlrpclib.py":'raise NotImplementedError("xmlrpclib is not yet implemented in Skulpt")\n',"src/lib/zipfile.py":'raise NotImplementedError("zipfile is not yet implemented in Skulpt")\n'}}},function(e,t,n){"use strict"; +/** + * @license React + * react-reconciler-constants.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */t.ConcurrentRoot=1,t.ContinuousEventPriority=4,t.DefaultEventPriority=16,t.DiscreteEventPriority=1,t.IdleEventPriority=536870912,t.LegacyRoot=0},function(e,t,n){ +/** + * @license React + * react-reconciler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +e.exports=function(e){var t={},r=n(0),i=n(70),o=Object.assign;function s(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n--a||i[s]!==o[a]){var l="\n"+i[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}}while(1<=s&&0<=a);break}}}finally{Ke=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Je(e):""}var tt=Object.prototype.hasOwnProperty,nt=[],rt=-1;function it(e){return{current:e}}function ot(e){0>rt||(e.current=nt[rt],nt[rt]=null,rt--)}function st(e,t){rt++,nt[rt]=e.current,e.current=t}var at={},lt=it(at),ct=it(!1),ut=at;function dt(e,t){var n=e.type.contextTypes;if(!n)return at;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function ht(e){return null!=(e=e.childContextTypes)}function pt(){ot(ct),ot(lt)}function ft(e,t,n){if(lt.current!==at)throw Error(s(168));st(lt,t),st(ct,n)}function mt(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(s(108,k(e)||"Unknown",i));return o({},n,r)}function gt(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||at,ut=lt.current,st(lt,e),st(ct,ct.current),!0}function bt(e,t,n){var r=e.stateNode;if(!r)throw Error(s(169));n?(e=mt(e,t,ut),r.__reactInternalMemoizedMergedChildContext=e,ot(ct),ot(lt),st(lt,e)):ot(ct),st(ct,n)}var vt=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(yt(e)/_t|0)|0},yt=Math.log,_t=Math.LN2;var St=64,xt=4194304;function wt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function kt(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=268435455&n;if(0!==s){var a=s&~i;0!==a?r=wt(a):0!==(o&=s)&&(r=wt(o))}else 0!==(s=n&~i)?r=wt(s):0!==o&&(r=wt(o));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&0!=(4194240&o)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Tt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-vt(t)]=n}function Ct(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-vt(n),i=1<>=s,i-=s,In=1<<32-vt(t)+i|n<h?(p=d,d=null):p=d.sibling;var f=g(i,d,a[h],l);if(null===f){null===d&&(d=p);break}e&&d&&null===f.alternate&&t(i,d),s=o(f,s,h),null===u?c=f:u.sibling=f,u=f,d=p}if(h===a.length)return n(i,d),Un&&Nn(i,h),c;if(null===d){for(;hp?(f=h,h=null):f=h.sibling;var y=g(i,h,v.value,c);if(null===y){null===h&&(h=f);break}e&&h&&null===y.alternate&&t(i,h),a=o(y,a,p),null===d?u=y:d.sibling=y,d=y,h=f}if(v.done)return n(i,h),Un&&Nn(i,p),u;if(null===h){for(;!v.done;p++,v=l.next())null!==(v=m(i,v.value,c))&&(a=o(v,a,p),null===d?u=v:d.sibling=v,d=v);return Un&&Nn(i,p),u}for(h=r(i,h);!v.done;p++,v=l.next())null!==(v=b(h,i,p,v.value,c))&&(e&&null!==v.alternate&&h.delete(null===v.key?p:v.key),a=o(v,a,p),null===d?u=v:d.sibling=v,d=v);return e&&h.forEach((function(e){return t(i,e)})),Un&&Nn(i,p),u}return function e(r,o,s,d){if("object"==typeof s&&null!==s&&s.type===u&&null===s.key&&(s=s.props.children),"object"==typeof s&&null!==s){switch(s.$$typeof){case l:e:{for(var h=s.key,p=o;null!==p;){if(p.key===h){if((h=s.type)===u){if(7===p.tag){n(r,p.sibling),(o=i(p,s.props.children)).return=r,r=o;break e}}else if(p.elementType===h||"object"==typeof h&&null!==h&&h.$$typeof===y&&tr(h)===p.type){n(r,p.sibling),(o=i(p,s.props)).ref=Kn(r,p,s),o.return=r,r=o;break e}n(r,p);break}t(r,p),p=p.sibling}s.type===u?((o=Zs(s.props.children,r.mode,d,s.key)).return=r,r=o):((d=Ys(s.type,s.key,s.props,null,r.mode,d)).ref=Kn(r,o,s),d.return=r,r=d)}return a(r);case c:e:{for(p=s.key;null!==o;){if(o.key===p){if(4===o.tag&&o.stateNode.containerInfo===s.containerInfo&&o.stateNode.implementation===s.implementation){n(r,o.sibling),(o=i(o,s.children||[])).return=r,r=o;break e}n(r,o);break}t(r,o),o=o.sibling}(o=ea(s,r.mode,d)).return=r,r=o}return a(r);case y:return e(r,o,(p=s._init)(s._payload),d)}if(M(s))return v(r,o,s,d);if(x(s))return _(r,o,s,d);er(r,s)}return"string"==typeof s&&""!==s||"number"==typeof s?(s=""+s,null!==o&&6===o.tag?(n(r,o.sibling),(o=i(o,s)).return=r,r=o):(n(r,o),(o=Ks(s,r.mode,d)).return=r,r=o),a(r)):n(r,o)}}var rr=nr(!0),ir=nr(!1),or={},sr=it(or),ar=it(or),lr=it(or);function cr(e){if(e===or)throw Error(s(174));return e}function ur(e,t){st(lr,t),st(ar,e),st(sr,or),e=$(t),ot(sr),st(sr,e)}function dr(){ot(sr),ot(ar),ot(lr)}function hr(e){var t=cr(lr.current),n=cr(sr.current);n!==(t=R(n,e.type,t))&&(st(ar,e),st(sr,t))}function pr(e){ar.current===e&&(ot(sr),ot(ar))}var fr=it(0);function mr(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||Ie(n)||De(n)))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var gr=[];function br(){for(var e=0;en?n:4,e(!0);var r=yr.transition;yr.transition={};try{e(!1),t()}finally{Mt=n,yr.transition=r}}function ii(){return Rr().memoizedState}function oi(e,t,n){var r=bs(e);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ai(e)?li(t,n):(ci(e,t,n),null!==(e=vs(e,r,n=gs()))&&ui(e,t,r))}function si(e,t,n){var r=bs(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ai(e))li(t,i);else{ci(e,t,i);var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,Qt(a,s))return}catch(e){}null!==(e=vs(e,r,n=gs()))&&ui(e,t,r)}}function ai(e){var t=e.alternate;return e===Sr||null!==t&&t===Sr}function li(e,t){Or=kr=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ci(e,t,n){null!==qo&&0!=(1&e.mode)&&0==(2&Qo)?(null===(e=t.interleaved)?(n.next=n,null===un?un=[t]:un.push(t)):(n.next=e.next,e.next=n),t.interleaved=n):(null===(e=t.pending)?n.next=n:(n.next=e.next,e.next=n),t.pending=n)}function ui(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Ct(e,n)}}var di={readContext:cn,useCallback:Tr,useContext:Tr,useEffect:Tr,useImperativeHandle:Tr,useInsertionEffect:Tr,useLayoutEffect:Tr,useMemo:Tr,useReducer:Tr,useRef:Tr,useState:Tr,useDebugValue:Tr,useDeferredValue:Tr,useTransition:Tr,useMutableSource:Tr,useSyncExternalStore:Tr,useId:Tr,unstable_isNewReconciler:!1},hi={readContext:cn,useCallback:function(e,t){return $r().memoizedState=[e,void 0===t?null:t],e},useContext:cn,useEffect:Wr,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Gr(4194308,4,Jr.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Gr(4194308,4,e,t)},useInsertionEffect:function(e,t){return Gr(4,2,e,t)},useMemo:function(e,t){var n=$r();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=$r();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=oi.bind(null,Sr,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},$r().memoizedState=e},useState:Qr,useDebugValue:ei,useDeferredValue:function(e){var t=Qr(e),n=t[0],r=t[1];return Wr((function(){var t=yr.transition;yr.transition={};try{r(e)}finally{yr.transition=t}}),[e]),n},useTransition:function(){var e=Qr(!1),t=e[0];return e=ri.bind(null,e[1]),$r().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Sr,i=$r();if(Un){if(void 0===n)throw Error(s(407));n=n()}else{if(n=t(),null===qo)throw Error(s(349));0!=(30&_r)||Br(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Wr(zr.bind(null,r,o,e),[e]),r.flags|=2048,qr(9,Fr.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=$r(),t=qo.identifierPrefix;if(Un){var n=Dn;t=":"+t+"R"+(n=(In&~(1<<32-vt(In)-1)).toString(32)+n),0<(n=Er++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=Ar++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},pi={readContext:cn,useCallback:ti,useContext:cn,useEffect:Xr,useImperativeHandle:Kr,useInsertionEffect:Yr,useLayoutEffect:Zr,useMemo:ni,useReducer:Dr,useRef:Hr,useState:function(){return Dr(Ir)},useDebugValue:ei,useDeferredValue:function(e){var t=Dr(Ir),n=t[0],r=t[1];return Xr((function(){var t=yr.transition;yr.transition={};try{r(e)}finally{yr.transition=t}}),[e]),n},useTransition:function(){return[Dr(Ir)[0],Rr().memoizedState]},useMutableSource:jr,useSyncExternalStore:Lr,useId:ii,unstable_isNewReconciler:!1},fi={readContext:cn,useCallback:ti,useContext:cn,useEffect:Xr,useImperativeHandle:Kr,useInsertionEffect:Yr,useLayoutEffect:Zr,useMemo:ni,useReducer:Nr,useRef:Hr,useState:function(){return Nr(Ir)},useDebugValue:ei,useDeferredValue:function(e){var t=Nr(Ir),n=t[0],r=t[1];return Xr((function(){var t=yr.transition;yr.transition={};try{r(e)}finally{yr.transition=t}}),[e]),n},useTransition:function(){return[Nr(Ir)[0],Rr().memoizedState]},useMutableSource:jr,useSyncExternalStore:Lr,useId:ii,unstable_isNewReconciler:!1};function mi(e,t){try{var n="",r=t;do{n+=Zt(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i}}function gi(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var bi,vi,yi,_i,Si="function"==typeof WeakMap?WeakMap:Map;function xi(e,t,n){(n=fn(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){ss||(ss=!0,as=r),gi(0,t)},n}function wi(e,t,n){(n=fn(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){gi(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){gi(0,t),"function"!=typeof r&&(null===ls?ls=new Set([this]):ls.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function ki(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new Si;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=zs.bind(null,e,t,n),t.then(e,e))}function Oi(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function Ei(e,t,n,r,i){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=fn(-1,1)).tag=2,mn(n,t))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}function Ai(e){e.flags|=4}function Ti(e,t){if(null!==e&&e.child===t.child)return!0;if(0!=(16&t.flags))return!1;for(e=t.child;null!==e;){if(0!=(12854&e.flags)||0!=(12854&e.subtreeFlags))return!1;e=e.sibling}return!0}if(G)bi=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)j(e,n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},vi=function(){},yi=function(e,t,n,r,i){if((e=e.memoizedProps)!==r){var o=t.stateNode,s=cr(sr.current);n=B(o,n,e,r,i,s),(t.updateQueue=n)&&Ai(t)}},_i=function(e,t,n,r){n!==r&&Ai(t)};else if(V){bi=function(e,t,n,r){for(var i=t.child;null!==i;){if(5===i.tag){var o=i.stateNode;n&&r&&(o=Ce(o,i.type,i.memoizedProps,i)),j(e,o)}else if(6===i.tag)o=i.stateNode,n&&r&&(o=Me(o,i.memoizedProps,i)),j(e,o);else if(4!==i.tag)if(22===i.tag&&null!==i.memoizedState)null!==(o=i.child)&&(o.return=i),bi(e,i,!0,!0);else if(null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}};var Ci=function(e,t,n,r){for(var i=t.child;null!==i;){if(5===i.tag){var o=i.stateNode;n&&r&&(o=Ce(o,i.type,i.memoizedProps,i)),Ee(e,o)}else if(6===i.tag)o=i.stateNode,n&&r&&(o=Me(o,i.memoizedProps,i)),Ee(e,o);else if(4!==i.tag)if(22===i.tag&&null!==i.memoizedState)null!==(o=i.child)&&(o.return=i),Ci(e,i,!0,!0);else if(null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}};vi=function(e,t){var n=t.stateNode;if(!Ti(e,t)){e=n.containerInfo;var r=Oe(e);Ci(r,t,!1,!1),n.pendingChildren=r,Ai(t),Ae(e,r)}},yi=function(e,t,n,r,i){var o=e.stateNode,s=e.memoizedProps;if((e=Ti(e,t))&&s===r)t.stateNode=o;else{var a=t.stateNode,l=cr(sr.current),c=null;s!==r&&(c=B(a,n,s,r,i,l)),e&&null===c?t.stateNode=o:(o=ke(o,c,n,s,r,t,e,a),L(o,n,r,i,l)&&Ai(t),t.stateNode=o,e?Ai(t):bi(o,t,!1,!1))}},_i=function(e,t,n,r){n!==r?(e=cr(lr.current),n=cr(sr.current),t.stateNode=z(r,e,n,t),Ai(t)):t.stateNode=e.stateNode}}else vi=function(){},yi=function(){},_i=function(){};function Mi(e,t){if(!Un)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Pi(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function $i(e,t,n){var r=t.pendingProps;switch(Bn(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pi(t),null;case 1:return ht(t.type)&&pt(),Pi(t),null;case 3:return r=t.stateNode,dr(),ot(ct),ot(lt),br(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Yn(t)?Ai(t):null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==qn&&(ws(qn),qn=null))),vi(e,t),Pi(t),null;case 5:pr(t),n=cr(lr.current);var i=t.type;if(null!==e&&null!=t.stateNode)yi(e,t,i,r,n),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(s(166));return Pi(t),null}if(e=cr(sr.current),Yn(t)){if(!W)throw Error(s(175));e=ze(t.stateNode,t.type,t.memoizedProps,n,e,t,!Qn),t.updateQueue=e,null!==e&&Ai(t)}else{var o=N(i,r,n,e,t);bi(o,t,!1,!1),t.stateNode=o,L(o,i,r,n,e)&&Ai(t)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Pi(t),null;case 6:if(e&&null!=t.stateNode)_i(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(s(166));if(e=cr(lr.current),n=cr(sr.current),Yn(t)){if(!W)throw Error(s(176));if(e=t.stateNode,r=t.memoizedProps,(n=Ue(e,r,t,!Qn))&&null!==(i=Fn))switch(o=0!=(1&i.mode),i.tag){case 3:Ye(i.stateNode.containerInfo,e,r,o);break;case 5:Ze(i.type,i.memoizedProps,i.stateNode,e,r,o)}n&&Ai(t)}else t.stateNode=z(r,e,n,t)}return Pi(t),null;case 13:if(ot(fr),r=t.memoizedState,Un&&null!==zn&&0!=(1&t.mode)&&0==(128&t.flags)){for(e=zn;e;)e=je(e);return Zn(),t.flags|=98560,t}if(null!==r&&null!==r.dehydrated){if(r=Yn(t),null===e){if(!r)throw Error(s(318));if(!W)throw Error(s(344));if(!(e=null!==(e=t.memoizedState)?e.dehydrated:null))throw Error(s(317));Qe(e,t)}else Zn(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;return Pi(t),null}return null!==qn&&(ws(qn),qn=null),0!=(128&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?Yn(t):n=null!==e.memoizedState,r&&!n&&(t.child.flags|=8192,0!=(1&t.mode)&&(null===e||0!=(1&fr.current)?0===Xo&&(Xo=3):Ps())),null!==t.updateQueue&&(t.flags|=4),Pi(t),null);case 4:return dr(),vi(e,t),null===e&&Y(t.stateNode.containerInfo),Pi(t),null;case 10:return sn(t.type._context),Pi(t),null;case 17:return ht(t.type)&&pt(),Pi(t),null;case 19:if(ot(fr),null===(i=t.memoizedState))return Pi(t),null;if(r=0!=(128&t.flags),null===(o=i.rendering))if(r)Mi(i,!1);else{if(0!==Xo||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(o=mr(e))){for(t.flags|=128,Mi(i,!1),null!==(e=o.updateQueue)&&(t.updateQueue=e,t.flags|=4),t.subtreeFlags=0,e=n,r=t.child;null!==r;)i=e,(n=r).flags&=14680066,null===(o=n.alternate)?(n.childLanes=0,n.lanes=i,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=o.childLanes,n.lanes=o.lanes,n.child=o.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=o.memoizedProps,n.memoizedState=o.memoizedState,n.updateQueue=o.updateQueue,n.type=o.type,i=o.dependencies,n.dependencies=null===i?null:{lanes:i.lanes,firstContext:i.firstContext}),r=r.sibling;return st(fr,1&fr.current|2),t.child}e=e.sibling}null!==i.tail&&Nt()>rs&&(t.flags|=128,r=!0,Mi(i,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=mr(o))){if(t.flags|=128,r=!0,null!==(e=e.updateQueue)&&(t.updateQueue=e,t.flags|=4),Mi(i,!0),null===i.tail&&"hidden"===i.tailMode&&!o.alternate&&!Un)return Pi(t),null}else 2*Nt()-i.renderingStartTime>rs&&1073741824!==n&&(t.flags|=128,r=!0,Mi(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(null!==(e=i.last)?e.sibling=o:t.child=o,i.last=o)}return null!==i.tail?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Nt(),t.sibling=null,e=fr.current,st(fr,r?1&e|2:1&e),t):(Pi(t),null);case 22:case 23:return As(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(1073741824&Vo)&&(Pi(t),G&&6&t.subtreeFlags&&(t.flags|=8192)):Pi(t),null;case 24:case 25:return null}throw Error(s(156,t.tag))}var Ri=a.ReactCurrentOwner,Ii=!1;function Di(e,t,n,r){t.child=null===e?ir(t,null,n,r):rr(t,e.child,n,r)}function Ni(e,t,n,r,i){n=n.render;var o=t.ref;return ln(t,i),r=Mr(e,t,n,r,o,i),n=Pr(),null===e||Ii?(Un&&n&&Ln(t),t.flags|=1,Di(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,no(e,t,i))}function ji(e,t,n,r,i){if(null===e){var o=n.type;return"function"!=typeof o||Ws(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Ys(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,Li(e,t,o,r,i))}if(o=e.child,0==(e.lanes&i)){var s=o.memoizedProps;if((n=null!==(n=n.compare)?n:Yt)(s,r)&&e.ref===t.ref)return no(e,t,i)}return t.flags|=1,(e=Xs(o,r)).ref=t.ref,e.return=t,t.child=e}function Li(e,t,n,r,i){if(null!==e&&Yt(e.memoizedProps,r)&&e.ref===t.ref){if(Ii=!1,0==(e.lanes&i))return t.lanes=e.lanes,no(e,t,i);0!=(131072&e.flags)&&(Ii=!0)}return zi(e,t,n,r,i)}function Bi(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null},st(Wo,Vo),Vo|=n;else{if(0==(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null},t.updateQueue=null,st(Wo,Vo),Vo|=e,null;t.memoizedState={baseLanes:0,cachePool:null},r=null!==o?o.baseLanes:n,st(Wo,Vo),Vo|=r}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,st(Wo,Vo),Vo|=r;return Di(e,t,i,n),t.child}function Fi(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function zi(e,t,n,r,i){var o=ht(n)?ut:lt.current;return o=dt(t,o),ln(t,i),n=Mr(e,t,n,r,o,i),r=Pr(),null===e||Ii?(Un&&r&&Ln(t),t.flags|=1,Di(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,no(e,t,i))}function Ui(e,t,n,r,i){if(ht(n)){var o=!0;gt(t)}else o=!1;if(ln(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),kn(t,n,r),En(t,n,r,i),r=!0;else if(null===e){var s=t.stateNode,a=t.memoizedProps;s.props=a;var l=s.context,c=n.contextType;"object"==typeof c&&null!==c?c=cn(c):c=dt(t,c=ht(n)?ut:lt.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof s.getSnapshotBeforeUpdate;d||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(a!==r||l!==c)&&On(t,s,r,c),dn=!1;var h=t.memoizedState;s.state=h,vn(t,r,s,i),l=t.memoizedState,a!==r||h!==l||ct.current||dn?("function"==typeof u&&(Sn(t,n,u,r),l=t.memoizedState),(a=dn||wn(t,n,a,r,h,l,c))?(d||"function"!=typeof s.UNSAFE_componentWillMount&&"function"!=typeof s.componentWillMount||("function"==typeof s.componentWillMount&&s.componentWillMount(),"function"==typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"==typeof s.componentDidMount&&(t.flags|=4194308)):("function"==typeof s.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=c,r=a):("function"==typeof s.componentDidMount&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,pn(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:Jt(t.type,a),s.props=c,d=t.pendingProps,h=s.context,"object"==typeof(l=n.contextType)&&null!==l?l=cn(l):l=dt(t,l=ht(n)?ut:lt.current);var p=n.getDerivedStateFromProps;(u="function"==typeof p||"function"==typeof s.getSnapshotBeforeUpdate)||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(a!==d||h!==l)&&On(t,s,r,l),dn=!1,h=t.memoizedState,s.state=h,vn(t,r,s,i);var f=t.memoizedState;a!==d||h!==f||ct.current||dn?("function"==typeof p&&(Sn(t,n,p,r),f=t.memoizedState),(c=dn||wn(t,n,c,r,h,f,l)||!1)?(u||"function"!=typeof s.UNSAFE_componentWillUpdate&&"function"!=typeof s.componentWillUpdate||("function"==typeof s.componentWillUpdate&&s.componentWillUpdate(r,f,l),"function"==typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(r,f,l)),"function"==typeof s.componentDidUpdate&&(t.flags|=4),"function"==typeof s.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof s.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=f),s.props=r,s.state=f,s.context=l,r=c):("function"!=typeof s.componentDidUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Qi(e,t,n,r,o,i)}function Qi(e,t,n,r,i,o){Fi(e,t);var s=0!=(128&t.flags);if(!r&&!s)return i&&bt(t,n,!1),no(e,t,o);r=t.stateNode,Ri.current=t;var a=s&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&s?(t.child=rr(t,e.child,null,o),t.child=rr(t,null,a,o)):Di(e,t,a,o),t.memoizedState=r.state,i&&bt(t,n,!0),t.child}function qi(e){var t=e.stateNode;t.pendingContext?ft(0,t.pendingContext,t.pendingContext!==t.context):t.context&&ft(0,t.context,!1),ur(e,t.containerInfo)}function Hi(e,t,n,r,i){return Zn(),Jn(i),t.flags|=256,Di(e,t,n,r),t.child}var Gi={dehydrated:null,treeContext:null,retryLane:0};function Vi(e){return{baseLanes:e,cachePool:null}}function Wi(e,t,n){var r,i=t.pendingProps,o=fr.current,a=!1,l=0!=(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!=(2&o)),r?(a=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),st(fr,1&o),null===e)return Wn(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&t.mode)?t.lanes=1:De(e)?t.lanes=8:t.lanes=1073741824,null):(o=i.children,e=i.fallback,a?(i=t.mode,a=t.child,o={mode:"hidden",children:o},0==(1&i)&&null!==a?(a.childLanes=0,a.pendingProps=o):a=Js(o,i,0,null),e=Zs(e,i,n,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=Vi(n),t.memoizedState=Gi,e):Xi(t,o));if(null!==(o=e.memoizedState)){if(null!==(r=o.dehydrated)){if(l)return 256&t.flags?(t.flags&=-257,Ji(e,t,n,Error(s(422)))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=i.fallback,o=t.mode,i=Js({mode:"visible",children:i.children},o,0,null),(a=Zs(a,o,n,null)).flags|=2,i.return=t,a.return=t,i.sibling=a,t.child=i,0!=(1&t.mode)&&rr(t,e.child,null,n),t.child.memoizedState=Vi(n),t.memoizedState=Gi,a);if(0==(1&t.mode))t=Ji(e,t,n,null);else if(De(r))t=Ji(e,t,n,Error(s(419)));else if(i=0!=(n&e.childLanes),Ii||i){if(null!==(i=qo)){switch(n&-n){case 4:a=2;break;case 16:a=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:a=32;break;case 536870912:a=268435456;break;default:a=0}0!==(i=0!=(a&(i.suspendedLanes|n))?0:a)&&i!==o.retryLane&&(o.retryLane=i,vs(e,i,-1))}Ps(),t=Ji(e,t,n,Error(s(421)))}else Ie(r)?(t.flags|=128,t.child=e.child,t=Qs.bind(null,e),Ne(r,t),t=null):(n=o.treeContext,W&&(zn=Fe(r),Fn=t,Un=!0,qn=null,Qn=!1,null!==n&&(Pn[$n++]=In,Pn[$n++]=Dn,Pn[$n++]=Rn,In=n.id,Dn=n.overflow,Rn=t)),(t=Xi(t,t.pendingProps.children)).flags|=4096);return t}return a?(i=Zi(e,t,i.children,i.fallback,n),a=t.child,o=e.child.memoizedState,a.memoizedState=null===o?Vi(n):{baseLanes:o.baseLanes|n,cachePool:null},a.childLanes=e.childLanes&~n,t.memoizedState=Gi,i):(n=Yi(e,t,i.children,n),t.memoizedState=null,n)}return a?(i=Zi(e,t,i.children,i.fallback,n),a=t.child,o=e.child.memoizedState,a.memoizedState=null===o?Vi(n):{baseLanes:o.baseLanes|n,cachePool:null},a.childLanes=e.childLanes&~n,t.memoizedState=Gi,i):(n=Yi(e,t,i.children,n),t.memoizedState=null,n)}function Xi(e,t){return(t=Js({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Yi(e,t,n,r){var i=e.child;return e=i.sibling,n=Xs(i,{mode:"visible",children:n}),0==(1&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n}function Zi(e,t,n,r,i){var o=t.mode,s=(e=e.child).sibling,a={mode:"hidden",children:n};return 0==(1&o)&&t.child!==e?((n=t.child).childLanes=0,n.pendingProps=a,t.deletions=null):(n=Xs(e,a)).subtreeFlags=14680064&e.subtreeFlags,null!==s?r=Xs(s,r):(r=Zs(r,o,i,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function Ji(e,t,n,r){return null!==r&&Jn(r),rr(t,e.child,null,n),(e=Xi(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Ki(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),an(e.return,t,n)}function eo(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function to(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(Di(e,t,r.children,n),0!=(2&(r=fr.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ki(e,n,t);else if(19===e.tag)Ki(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(st(fr,r),0==(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===mr(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),eo(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===mr(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}eo(t,!0,n,null,o);break;case"together":eo(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function no(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Zo|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(s(153));if(null!==t.child){for(n=Xs(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Xs(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function ro(e,t){switch(Bn(t),t.tag){case 1:return ht(t.type)&&pt(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return dr(),ot(ct),ot(lt),br(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return pr(t),null;case 13:if(ot(fr),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(s(340));Zn()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return ot(fr),null;case 4:return dr(),null;case 10:return sn(t.type._context),null;case 22:case 23:return As(),null;case 24:default:return null}}var io=!1,oo=!1,so="function"==typeof WeakSet?WeakSet:Set,ao=null;function lo(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){Fs(e,t,n)}else n.current=null}function co(e,t,n){try{n()}catch(n){Fs(e,t,n)}}var uo=!1;function ho(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&co(t,n,o)}i=i.next}while(i!==r)}}function po(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function fo(e){var t=e.ref;if(null!==t){var n=e.stateNode;switch(e.tag){case 5:e=P(n);break;default:e=n}"function"==typeof t?t(e):t.current=e}}function mo(e,t,n){if(Ut&&"function"==typeof Ut.onCommitFiberUnmount)try{Ut.onCommitFiberUnmount(zt,t)}catch(e){}switch(t.tag){case 0:case 11:case 14:case 15:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var r=e=e.next;do{var i=r,o=i.destroy;i=i.tag,void 0!==o&&(0!=(2&i)||0!=(4&i))&&co(t,n,o),r=r.next}while(r!==e)}break;case 1:if(lo(t,n),"function"==typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(e){Fs(t,n,e)}break;case 5:lo(t,n);break;case 4:G?So(e,t,n):V&&V&&(t=t.stateNode.containerInfo,n=Oe(t),Te(t,n))}}function go(e,t,n){for(var r=t;;)if(mo(e,r,n),null===r.child||G&&4===r.tag){if(r===t)break;for(;null===r.sibling;){if(null===r.return||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}else r.child.return=r,r=r.child}function bo(e){var t=e.alternate;null!==t&&(e.alternate=null,bo(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&J(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function vo(e){return 5===e.tag||3===e.tag||4===e.tag}function yo(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||vo(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function _o(e){if(G){e:{for(var t=e.return;null!==t;){if(vo(t))break e;t=t.return}throw Error(s(160))}var n=t;switch(n.tag){case 5:t=n.stateNode,32&n.flags&&(ve(t),n.flags&=-33),function e(t,n,r){var i=t.tag;if(5===i||6===i)t=t.stateNode,n?fe(r,t,n):ce(r,t);else if(4!==i&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n=yo(e),t);break;case 3:case 4:t=n.stateNode.containerInfo,function e(t,n,r){var i=t.tag;if(5===i||6===i)t=t.stateNode,n?me(r,t,n):ue(r,t);else if(4!==i&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,n=yo(e),t);break;default:throw Error(s(161))}}}function So(e,t,n){for(var r,i,o=t,a=!1;;){if(!a){a=o.return;e:for(;;){if(null===a)throw Error(s(160));switch(r=a.stateNode,a.tag){case 5:i=!1;break e;case 3:case 4:r=r.containerInfo,i=!0;break e}a=a.return}a=!0}if(5===o.tag||6===o.tag)go(e,o,n),i?be(r,o.stateNode):ge(r,o.stateNode);else if(18===o.tag)i?We(r,o.stateNode):Ve(r,o.stateNode);else if(4===o.tag){if(null!==o.child){r=o.stateNode.containerInfo,i=!0,o.child.return=o,o=o.child;continue}}else if(mo(e,o,n),null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break;for(;null===o.sibling;){if(null===o.return||o.return===t)return;4===(o=o.return).tag&&(a=!1)}o.sibling.return=o.return,o=o.sibling}}function xo(e,t){if(G){switch(t.tag){case 0:case 11:case 14:case 15:return ho(3,t,t.return),po(3,t),void ho(5,t,t.return);case 1:return;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps;e=null!==e?e.memoizedProps:r;var i=t.type,o=t.updateQueue;t.updateQueue=null,null!==o&&pe(n,o,i,e,r,t)}return;case 6:if(null===t.stateNode)throw Error(s(162));return n=t.memoizedProps,void de(t.stateNode,null!==e?e.memoizedProps:n,n);case 3:return void(W&&null!==e&&e.memoizedState.isDehydrated&&He(t.stateNode.containerInfo));case 12:return;case 13:case 19:return void wo(t);case 17:return}throw Error(s(163))}switch(t.tag){case 0:case 11:case 14:case 15:return ho(3,t,t.return),po(3,t),void ho(5,t,t.return);case 12:return;case 13:case 19:return void wo(t);case 3:W&&null!==e&&e.memoizedState.isDehydrated&&He(t.stateNode.containerInfo);break;case 22:case 23:return}e:if(V){switch(t.tag){case 1:case 5:case 6:break e;case 3:case 4:t=t.stateNode,Te(t.containerInfo,t.pendingChildren);break e}throw Error(s(163))}}function wo(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new so),t.forEach((function(t){var r=qs.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function ko(e,t,n){ao=e,function e(t,n,r){for(var i=0!=(1&t.mode);null!==ao;){var o=ao,s=o.child;if(22===o.tag&&i){var a=null!==o.memoizedState||io;if(!a){var l=o.alternate,c=null!==l&&null!==l.memoizedState||oo;l=io;var u=oo;if(io=a,(oo=c)&&!u)for(ao=o;null!==ao;)c=(a=ao).child,22===a.tag&&null!==a.memoizedState?Ao(o):null!==c?(c.return=a,ao=c):Ao(o);for(;null!==s;)ao=s,e(s,n,r),s=s.sibling;ao=o,io=l,oo=u}Oo(t)}else 0!=(8772&o.subtreeFlags)&&null!==s?(s.return=o,ao=s):Oo(t)}}(e,t,n)}function Oo(e){for(;null!==ao;){var t=ao;if(0!=(8772&t.flags)){var n=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:oo||po(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!oo)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:Jt(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;null!==o&&yn(t,o,r);break;case 3:var a=t.updateQueue;if(null!==a){if(n=null,null!==t.child)switch(t.child.tag){case 5:n=P(t.child.stateNode);break;case 1:n=t.child.stateNode}yn(t,a,n)}break;case 5:var l=t.stateNode;null===n&&4&t.flags&&he(l,t.type,t.memoizedProps,t);break;case 6:case 4:case 12:break;case 13:if(W&&null===t.memoizedState){var c=t.alternate;if(null!==c){var u=c.memoizedState;if(null!==u){var d=u.dehydrated;null!==d&&Ge(d)}}}break;case 19:case 17:case 21:case 22:case 23:break;default:throw Error(s(163))}oo||512&t.flags&&fo(t)}catch(e){Fs(t,t.return,e)}}if(t===e){ao=null;break}if(null!==(n=t.sibling)){n.return=t.return,ao=n;break}ao=t.return}}function Eo(e){for(;null!==ao;){var t=ao;if(t===e){ao=null;break}var n=t.sibling;if(null!==n){n.return=t.return,ao=n;break}ao=t.return}}function Ao(e){for(;null!==ao;){var t=ao;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{po(4,t)}catch(e){Fs(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){Fs(t,i,e)}}var o=t.return;try{fo(t)}catch(e){Fs(t,o,e)}break;case 5:var s=t.return;try{fo(t)}catch(e){Fs(t,s,e)}}}catch(e){Fs(t,t.return,e)}if(t===e){ao=null;break}var a=t.sibling;if(null!==a){a.return=t.return,ao=a;break}ao=t.return}}var To=0,Co=1,Mo=2,Po=3,$o=4;if("function"==typeof Symbol&&Symbol.for){var Ro=Symbol.for;To=Ro("selector.component"),Co=Ro("selector.has_pseudo_class"),Mo=Ro("selector.role"),Po=Ro("selector.test_id"),$o=Ro("selector.text")}function Io(e){var t=X(e);if(null!=t){if("string"!=typeof t.memoizedProps["data-testname"])throw Error(s(364));return t}if(null===(e=ne(e)))throw Error(s(362));return e.stateNode.current}function Do(e,t){switch(t.$$typeof){case To:if(e.type===t.value)return!0;break;case Co:e:{t=t.value,e=[e,0];for(var n=0;n";case Co:return":has("+(No(e)||"")+")";case Mo:return'[role="'+e.value+'"]';case $o:return'"'+e.value+'"';case Po:return'[data-testname="'+e.value+'"]';default:throw Error(s(365))}}function jo(e,t){var n=[];e=[e,0];for(var r=0;ri&&(i=a),r&=~o}if(r=i,10<(r=(120>(r=Nt()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Bo(r/1960))-r)){e.timeoutHandle=U(js.bind(null,e,ts),r);break}js(e,ts);break;case 5:js(e,ts);break;default:throw Error(s(329))}}}return _s(e,Nt()),e.callbackNode===n?Ss.bind(null,e):null}function xs(e,t){var n=es;return e.current.memoizedState.isDehydrated&&(Ts(e,t).flags|=256),2!==(e=$s(e,t))&&(t=ts,ts=n,null!==t&&ws(t)),e}function ws(e){null===ts?ts=e:ts.push.apply(ts,e)}function ks(e,t){for(t&=~Ko,t&=~Jo,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0e?16:e,null===us)var r=!1;else{if(e=us,us=null,ds=0,0!=(6&Qo))throw Error(s(331));var i=Qo;for(Qo|=4,ao=e.current;null!==ao;){var o=ao,a=o.child;if(0!=(16&ao.flags)){var l=o.deletions;if(null!==l){for(var c=0;cNt()-ns?Ts(e,0):Ko|=n),_s(e,t)}function Us(e,t){0===t&&(0==(1&e.mode)?t=1:(t=xt,0==(130023424&(xt<<=1))&&(xt=4194304)));var n=gs();null!==(e=ys(e,t))&&(Tt(e,t,n),_s(e,n))}function Qs(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Us(e,n)}function qs(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(s(314))}null!==r&&r.delete(t),Us(e,n)}function Hs(e,t){return $t(e,t)}function Gs(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Vs(e,t,n,r){return new Gs(e,t,n,r)}function Ws(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Xs(e,t){var n=e.alternate;return null===n?((n=Vs(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ys(e,t,n,r,i,o){var a=2;if(r=e,"function"==typeof e)Ws(e)&&(a=1);else if("string"==typeof e)a=5;else e:switch(e){case u:return Zs(n.children,i,o,t);case d:a=8,i|=8;break;case h:return(e=Vs(12,n,t,2|i)).elementType=h,e.lanes=o,e;case g:return(e=Vs(13,n,t,i)).elementType=g,e.lanes=o,e;case b:return(e=Vs(19,n,t,i)).elementType=b,e.lanes=o,e;case _:return Js(n,i,o,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case p:a=10;break e;case f:a=9;break e;case m:a=11;break e;case v:a=14;break e;case y:a=16,r=null;break e}throw Error(s(130,null==e?e:typeof e,""))}return(t=Vs(a,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function Zs(e,t,n,r){return(e=Vs(7,e,r,t)).lanes=n,e}function Js(e,t,n,r){return(e=Vs(22,e,r,t)).elementType=_,e.lanes=n,e.stateNode={},e}function Ks(e,t,n){return(e=Vs(6,e,null,t)).lanes=n,e}function ea(e,t,n){return(t=Vs(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ta(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=q,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=At(0),this.expirationTimes=At(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=At(0),this.identifierPrefix=r,this.onRecoverableError=i,W&&(this.mutableSourceEagerHydrationData=null)}function na(e,t,n,r,i,o,s,a,l){return e=new ta(e,t,n,a,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Vs(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null},hn(o),e}function ra(e){if(!e)return at;e:{if(O(e=e._reactInternals)!==e||1!==e.tag)throw Error(s(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ht(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(s(171))}if(1===e.tag){var n=e.type;if(ht(n))return mt(e,n,t)}return t}function ia(e){var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(s(188));throw e=Object.keys(e).join(","),Error(s(268,e))}return null===(e=T(t))?null:e.stateNode}function oa(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n=u&&o>=h&&i<=d&&a<=p){e.splice(t,1);break}if(!(r!==u||n.width!==c.width||pa)){h>o&&(c.height+=h-o,c.y=o),pi)){u>r&&(c.width+=u-r,c.x=r),dn&&(n=a)),a ")+"\n\nNo matching component was found for:\n "+e.join(" > ")}return null},t.getPublicRootInstance=function(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:return P(e.child.stateNode);default:return e.child.stateNode}},t.injectIntoDevTools=function(e){if(e={bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:a.ReactCurrentDispatcher,findHostInstanceByFiber:aa,findFiberByHostInstance:e.findFiberByHostInstance||la,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},"undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)e=!1;else{var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)e=!0;else{try{zt=t.inject(e),Ut=t}catch(e){}e=!!t.checkDCE}}return e},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(e,t,n,r){if(!te)throw Error(s(363));e=Lo(e,t);var i=le(e,n,r).disconnect;return{disconnect:function(){i()}}},t.registerMutableSourceForHydration=function(e,t){var n=t._getVersion;n=n(t._source),null==e.mutableSourceEagerHydrationData?e.mutableSourceEagerHydrationData=[t,n]:e.mutableSourceEagerHydrationData.push(t,n)},t.runWithPriority=function(e,t){var n=Mt;try{return Mt=e,t()}finally{Mt=n}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(e,t,n,r){var i=t.current,o=gs(),s=bs(i);return n=ra(n),null===t.context?t.context=n:t.pendingContext=n,(t=fn(o,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),mn(i,t),null!==(e=vs(i,s,o))&&gn(e,i,s),s},t}},function(e,t,n){"use strict";(function(e){ +/** + * @license React + * scheduler.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +function n(e,t){var n=e.length;e.push(t);e:for(;0>>1,i=e[r];if(!(0>>1;ro(l,n))co(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[a]=n,r=a);else{if(!(co(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var a=Date,l=a.now();t.unstable_now=function(){return a.now()-l}}var c=[],u=[],d=1,h=null,p=3,f=!1,m=!1,g=!1,b="function"==typeof setTimeout?setTimeout:null,v="function"==typeof clearTimeout?clearTimeout:null,y=void 0!==e?e:null;function _(e){for(var t=r(u);null!==t;){if(null===t.callback)i(u);else{if(!(t.startTime<=e))break;i(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function S(e){if(g=!1,_(e),!m)if(null!==r(c))m=!0,R(x);else{var t=r(u);null!==t&&I(S,t.startTime-e)}}function x(e,n){m=!1,g&&(g=!1,v(E),E=-1),f=!0;var o=p;try{for(_(n),h=r(c);null!==h&&(!(h.expirationTime>n)||e&&!C());){var s=h.callback;if("function"==typeof s){h.callback=null,p=h.priorityLevel;var a=s(h.expirationTime<=n);n=t.unstable_now(),"function"==typeof a?h.callback=a:h===r(c)&&i(c),_(n)}else i(c);h=r(c)}if(null!==h)var l=!0;else{var d=r(u);null!==d&&I(S,d.startTime-n),l=!1}return l}finally{h=null,p=o,f=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var w,k=!1,O=null,E=-1,A=5,T=-1;function C(){return!(t.unstable_now()-Te||125s?(e.sortIndex=o,n(u,e),null===r(c)&&e===r(u)&&(g?(v(E),E=-1):g=!0,I(S,o-s))):(e.sortIndex=a,n(c,e),m||f||(m=!0,R(x))),e},t.unstable_shouldYield=C,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}}).call(this,n(91).setImmediate)},function(e,t,n){"use strict";var r=n(354);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,o,s){if(s!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:i};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(0),o=(r=i)&&r.__esModule?r:{default:r};t.default=function(){return o.default.createElement("svg",{width:"14",height:"11",viewBox:"0 0 14 11"},o.default.createElement("path",{d:"M11.264 0L5.26 6.004 2.103 2.847 0 4.95l5.26 5.26 8.108-8.107L11.264 0",fill:"#fff",fillRule:"evenodd"}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,i=n(0),o=(r=i)&&r.__esModule?r:{default:r};t.default=function(){return o.default.createElement("svg",{width:"10",height:"10",viewBox:"0 0 10 10"},o.default.createElement("path",{d:"M9.9 2.12L7.78 0 4.95 2.828 2.12 0 0 2.12l2.83 2.83L0 7.776 2.123 9.9 4.95 7.07 7.78 9.9 9.9 7.776 7.072 4.95 9.9 2.12",fill:"#fff",fillRule:"evenodd"}))}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pointerCoord=function(e){if(e){var t=e.changedTouches;if(t&&t.length>0){var n=t[0];return{x:n.clientX,y:n.clientY}}var r=e.pageX;if(void 0!==r)return{x:r,y:e.pageY}}return{x:0,y:0}}},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,".react-toggle {\n touch-action: pan-x;\n\n display: inline-block;\n position: relative;\n cursor: pointer;\n background-color: transparent;\n border: 0;\n padding: 0;\n\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -khtml-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n -webkit-tap-highlight-color: transparent;\n}\n\n.react-toggle-screenreader-only {\n border: 0;\n clip: rect(0 0 0 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n width: 1px;\n}\n\n.react-toggle--disabled {\n cursor: not-allowed;\n opacity: 0.5;\n -webkit-transition: opacity 0.25s;\n transition: opacity 0.25s;\n}\n\n.react-toggle-track {\n width: 50px;\n height: 24px;\n padding: 0;\n border-radius: 30px;\n background-color: #4D4D4D;\n -webkit-transition: all 0.2s ease;\n -moz-transition: all 0.2s ease;\n transition: all 0.2s ease;\n}\n\n.react-toggle:hover:not(.react-toggle--disabled) .react-toggle-track {\n background-color: #000000;\n}\n\n.react-toggle--checked .react-toggle-track {\n background-color: #19AB27;\n}\n\n.react-toggle--checked:hover:not(.react-toggle--disabled) .react-toggle-track {\n background-color: #128D15;\n}\n\n.react-toggle-track-check {\n position: absolute;\n width: 14px;\n height: 10px;\n top: 0px;\n bottom: 0px;\n margin-top: auto;\n margin-bottom: auto;\n line-height: 0;\n left: 8px;\n opacity: 0;\n -webkit-transition: opacity 0.25s ease;\n -moz-transition: opacity 0.25s ease;\n transition: opacity 0.25s ease;\n}\n\n.react-toggle--checked .react-toggle-track-check {\n opacity: 1;\n -webkit-transition: opacity 0.25s ease;\n -moz-transition: opacity 0.25s ease;\n transition: opacity 0.25s ease;\n}\n\n.react-toggle-track-x {\n position: absolute;\n width: 10px;\n height: 10px;\n top: 0px;\n bottom: 0px;\n margin-top: auto;\n margin-bottom: auto;\n line-height: 0;\n right: 10px;\n opacity: 1;\n -webkit-transition: opacity 0.25s ease;\n -moz-transition: opacity 0.25s ease;\n transition: opacity 0.25s ease;\n}\n\n.react-toggle--checked .react-toggle-track-x {\n opacity: 0;\n}\n\n.react-toggle-thumb {\n transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1) 0ms;\n position: absolute;\n top: 1px;\n left: 1px;\n width: 22px;\n height: 22px;\n border: 1px solid #4D4D4D;\n border-radius: 50%;\n background-color: #FAFAFA;\n\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n\n -webkit-transition: all 0.25s ease;\n -moz-transition: all 0.25s ease;\n transition: all 0.25s ease;\n}\n\n.react-toggle--checked .react-toggle-thumb {\n left: 27px;\n border-color: #19AB27;\n}\n\n.react-toggle--focus .react-toggle-thumb {\n -webkit-box-shadow: 0px 0px 3px 2px #0099E0;\n -moz-box-shadow: 0px 0px 3px 2px #0099E0;\n box-shadow: 0px 0px 2px 3px #0099E0;\n}\n\n.react-toggle:active:not(.react-toggle--disabled) .react-toggle-thumb {\n -webkit-box-shadow: 0px 0px 5px 5px #0099E0;\n -moz-box-shadow: 0px 0px 5px 5px #0099E0;\n box-shadow: 0px 0px 5px 5px #0099E0;\n}\n",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,"body.react-confirm-alert-body-element {\n overflow: hidden;\n}\n\n.react-confirm-alert-blur {\n filter: url(#gaussian-blur);\n filter: blur(2px);\n -webkit-filter: blur(2px);\n}\n\n.react-confirm-alert-overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 99;\n background: rgba(255, 255, 255, 0.9);\n display: -webkit-flex;\n display: -moz-flex;\n display: -ms-flex;\n display: -o-flex;\n display: flex;\n justify-content: center;\n -ms-align-items: center;\n align-items: center;\n opacity: 0;\n -webkit-animation: react-confirm-alert-fadeIn 0.5s 0.2s forwards;\n -moz-animation: react-confirm-alert-fadeIn 0.5s 0.2s forwards;\n -o-animation: react-confirm-alert-fadeIn 0.5s 0.2s forwards;\n animation: react-confirm-alert-fadeIn 0.5s 0.2s forwards;\n}\n\n.react-confirm-alert-body {\n font-family: Arial, Helvetica, sans-serif;\n width: 400px;\n padding: 30px;\n text-align: left;\n background: #fff;\n border-radius: 10px;\n box-shadow: 0 20px 75px rgba(0, 0, 0, 0.13);\n color: #666;\n}\n\n.react-confirm-alert-svg {\n position: absolute;\n top: 0;\n left: 0;\n}\n\n.react-confirm-alert-body > h1 {\n margin-top: 0;\n}\n\n.react-confirm-alert-body > h3 {\n margin: 0;\n font-size: 16px;\n}\n\n.react-confirm-alert-button-group {\n display: -webkit-flex;\n display: -moz-flex;\n display: -ms-flex;\n display: -o-flex;\n display: flex;\n justify-content: flex-start;\n margin-top: 20px;\n}\n\n.react-confirm-alert-button-group > button {\n outline: none;\n background: #333;\n border: none;\n display: inline-block;\n padding: 6px 18px;\n color: #eee;\n margin-right: 10px;\n border-radius: 5px;\n font-size: 12px;\n cursor: pointer;\n}\n\n@-webkit-keyframes react-confirm-alert-fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@-moz-keyframes react-confirm-alert-fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@-o-keyframes react-confirm-alert-fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n\n@keyframes react-confirm-alert-fadeIn {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.btn{align-items:center;border-radius:calc(.5rem*var(--scale-factor, 1));border:3px solid rgba(0,0,0,0);box-sizing:border-box;color:inherit;cursor:pointer;display:inline-flex;font-family:sans-serif;font-size:inherit;font-weight:700;gap:calc(.5rem*var(--scale-factor, 1));justify-content:center;min-block-size:44px;min-inline-size:44px;padding:10px;position:relative;text-align:center;text-decoration:none}.btn:disabled{background-color:#4a4d59;color:#fff;cursor:default}.btn:focus-visible{border:3px solid #cd2356;outline:none}.btn--primary{background-color:var(--rpf-button-primary-background-color);border-radius:calc(.5rem*var(--scale-factor, 1));color:var(--rpf-button-primary-text-color)}.btn--primary svg{fill:var(--rpf-button-primary-text-color)}.btn--primary:active,.btn-outer:active .btn--primary{background-color:var(--rpf-button-primary-background-color-active)}.btn--primary:focus-visible,.btn-outer:focus-visible .btn--primary{background-color:var(--rpf-button-primary-background-color-focus)}.btn--primary:hover,.btn-outer:hover .btn--primary{background-color:var(--rpf-button-primary-background-color-hover);border-radius:calc(.5rem*var(--scale-factor, 1))}.btn--primary:disabled{background-color:var(--rpf-button-primary-background-color-disabled);color:var(--rpf-button-primary-color-disabled)}.btn--primary:disabled svg{fill:var(--rpf-button-primary-color-disabled)}.btn--primary:disabled:hover,.btn-outer:hover .btn--primary:disabled{background-color:var(--rpf-button-primary-background-color-disabled)}.btn--secondary{background-color:inherit;color:var(--rpf-button-secondary-text-color);border:2px solid var(--rpf-button-primary-background-color)}.btn--secondary svg{fill:var(--rpf-button-secondary-text-color)}.btn--secondary:active,.btn-outer:active .btn--secondary{background-color:inherit}.btn--secondary:focus-visible,.btn-outer:focus-visible .btn--secondary{background-color:inherit}.btn--secondary:hover,.btn-outer:hover .btn--secondary{background-color:inherit}.btn--secondary:disabled{background-color:var(--rpf-button-secondary-background-color-disabled);color:var(--rpf-button-secondary-background-color-active)}.btn--secondary:disabled svg{fill:var(--rpf-button-secondary-background-color-active)}.btn--secondary:disabled:hover,.btn-outer:hover .btn--secondary:disabled{background-color:var(--rpf-button-secondary-background-color-disabled)}.btn--secondary:active{border:2px solid var(--rpf-button-secondary-background-color-active)}.btn--secondary:hover{background-color:var(--rpf-button-secondary-background-color-hover);color:var(--rpf-button-secondary-text-color-hover);border-color:var(--rpf-button-secondary-border-color-hover) !important}.btn--secondary:hover svg{fill:var(--rpf-button-secondary-text-color-hover)}.btn--secondary:focus-visible{outline:3px solid var(--rpf-button-secondary-background-color-focus)}.btn--tertiary{background-color:inherit;color:inherit}.btn--tertiary:active,.btn-outer:active .btn--tertiary{background-color:inherit}.btn--tertiary:focus-visible,.btn-outer:focus-visible .btn--tertiary{background-color:inherit}.btn--tertiary:hover,.btn-outer:hover .btn--tertiary{background-color:inherit}.btn--tertiary:disabled{background-color:inherit;color:#4a4d59}.btn--tertiary:disabled svg{fill:#4a4d59}.btn--tertiary:disabled:hover,.btn-outer:hover .btn--tertiary:disabled{background-color:inherit}.btn--tertiary:active{color:#0e857a}.btn--tertiary:active svg{fill:#0e857a}.btn--tertiary:hover{color:var(--rpf-button-tertiary-text-color-hover)}.btn--tertiary:hover svg{fill:var(--rpf-button-tertiary-text-color-hover)}.btn--danger{background-color:#9e0a0a;color:#fff}.btn--danger svg{fill:#fff}.btn--danger:active,.btn-outer:active .btn--danger{background-color:#9e0a0a}.btn--danger:focus-visible,.btn-outer:focus-visible .btn--danger{background-color:#9e0a0a}.btn--danger:hover,.btn-outer:hover .btn--danger{background-color:#86151e}.btn--danger:disabled{background-color:#9e0a0a;color:#fff}.btn--danger:disabled svg{fill:#fff}.btn--danger:disabled:hover,.btn-outer:hover .btn--danger:disabled{background-color:#9e0a0a}.btn--danger:focus-visible{background-clip:padding-box;border:2px solid rgba(0,0,0,0);outline:3px solid #cd2356}.btn--small{min-block-size:unset;min-inline-size:unset;padding:calc(.25rem*var(--scale-factor, 1))}.btn--svg-only svg{margin:0}.btn-outer{background:rgba(0,0,0,0);border-radius:calc(.5rem*var(--scale-factor, 1));cursor:pointer;padding:calc(.5rem*var(--scale-factor, 1)) 0;display:flex;align-items:center;justify-content:center}.btn-outer:focus-visible{outline:none}.btn-outer:focus-visible .btn{border:3px solid #cd2356}.btn-outer:has(.btn:disabled){cursor:default}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.output-view-toggle__button{block-size:100%}.--light .output-view-toggle{border-inline-start:1px solid #d5d7dc}.--dark .output-view-toggle{border-inline-start:1px solid #4a4d59}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,".runner-controls{display:flex;align-items:center;padding:0 calc(.5rem*var(--scale-factor, 1))}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.htmlrunner-container{container-type:inline-size;display:flex;block-size:100%;inline-size:100%}.htmlrunner-link{margin-inline-start:auto}@container (max-width: 480px){.htmlrunner-link__text{display:none}}.htmlrunner-iframe{border:none;background-color:#fff;block-size:100%;inline-size:100%}",""])},function(e,t,n){ +/*! + * mime-db + * Copyright(c) 2014 Jonathan Ong + * Copyright(c) 2015-2022 Douglas Christopher Wilson + * MIT Licensed + */ +e.exports=n(365)},function(e){e.exports=JSON.parse('{"application/1d-interleaved-parityfec":{"source":"iana"},"application/3gpdash-qoe-report+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/3gpp-ims+xml":{"source":"iana","compressible":true},"application/3gpphal+json":{"source":"iana","compressible":true},"application/3gpphalforms+json":{"source":"iana","compressible":true},"application/a2l":{"source":"iana"},"application/ace+cbor":{"source":"iana"},"application/activemessage":{"source":"iana"},"application/activity+json":{"source":"iana","compressible":true},"application/alto-costmap+json":{"source":"iana","compressible":true},"application/alto-costmapfilter+json":{"source":"iana","compressible":true},"application/alto-directory+json":{"source":"iana","compressible":true},"application/alto-endpointcost+json":{"source":"iana","compressible":true},"application/alto-endpointcostparams+json":{"source":"iana","compressible":true},"application/alto-endpointprop+json":{"source":"iana","compressible":true},"application/alto-endpointpropparams+json":{"source":"iana","compressible":true},"application/alto-error+json":{"source":"iana","compressible":true},"application/alto-networkmap+json":{"source":"iana","compressible":true},"application/alto-networkmapfilter+json":{"source":"iana","compressible":true},"application/alto-updatestreamcontrol+json":{"source":"iana","compressible":true},"application/alto-updatestreamparams+json":{"source":"iana","compressible":true},"application/aml":{"source":"iana"},"application/andrew-inset":{"source":"iana","extensions":["ez"]},"application/applefile":{"source":"iana"},"application/applixware":{"source":"apache","extensions":["aw"]},"application/at+jwt":{"source":"iana"},"application/atf":{"source":"iana"},"application/atfx":{"source":"iana"},"application/atom+xml":{"source":"iana","compressible":true,"extensions":["atom"]},"application/atomcat+xml":{"source":"iana","compressible":true,"extensions":["atomcat"]},"application/atomdeleted+xml":{"source":"iana","compressible":true,"extensions":["atomdeleted"]},"application/atomicmail":{"source":"iana"},"application/atomsvc+xml":{"source":"iana","compressible":true,"extensions":["atomsvc"]},"application/atsc-dwd+xml":{"source":"iana","compressible":true,"extensions":["dwd"]},"application/atsc-dynamic-event-message":{"source":"iana"},"application/atsc-held+xml":{"source":"iana","compressible":true,"extensions":["held"]},"application/atsc-rdt+json":{"source":"iana","compressible":true},"application/atsc-rsat+xml":{"source":"iana","compressible":true,"extensions":["rsat"]},"application/atxml":{"source":"iana"},"application/auth-policy+xml":{"source":"iana","compressible":true},"application/bacnet-xdd+zip":{"source":"iana","compressible":false},"application/batch-smtp":{"source":"iana"},"application/bdoc":{"compressible":false,"extensions":["bdoc"]},"application/beep+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/calendar+json":{"source":"iana","compressible":true},"application/calendar+xml":{"source":"iana","compressible":true,"extensions":["xcs"]},"application/call-completion":{"source":"iana"},"application/cals-1840":{"source":"iana"},"application/captive+json":{"source":"iana","compressible":true},"application/cbor":{"source":"iana"},"application/cbor-seq":{"source":"iana"},"application/cccex":{"source":"iana"},"application/ccmp+xml":{"source":"iana","compressible":true},"application/ccxml+xml":{"source":"iana","compressible":true,"extensions":["ccxml"]},"application/cdfx+xml":{"source":"iana","compressible":true,"extensions":["cdfx"]},"application/cdmi-capability":{"source":"iana","extensions":["cdmia"]},"application/cdmi-container":{"source":"iana","extensions":["cdmic"]},"application/cdmi-domain":{"source":"iana","extensions":["cdmid"]},"application/cdmi-object":{"source":"iana","extensions":["cdmio"]},"application/cdmi-queue":{"source":"iana","extensions":["cdmiq"]},"application/cdni":{"source":"iana"},"application/cea":{"source":"iana"},"application/cea-2018+xml":{"source":"iana","compressible":true},"application/cellml+xml":{"source":"iana","compressible":true},"application/cfw":{"source":"iana"},"application/city+json":{"source":"iana","compressible":true},"application/clr":{"source":"iana"},"application/clue+xml":{"source":"iana","compressible":true},"application/clue_info+xml":{"source":"iana","compressible":true},"application/cms":{"source":"iana"},"application/cnrp+xml":{"source":"iana","compressible":true},"application/coap-group+json":{"source":"iana","compressible":true},"application/coap-payload":{"source":"iana"},"application/commonground":{"source":"iana"},"application/conference-info+xml":{"source":"iana","compressible":true},"application/cose":{"source":"iana"},"application/cose-key":{"source":"iana"},"application/cose-key-set":{"source":"iana"},"application/cpl+xml":{"source":"iana","compressible":true,"extensions":["cpl"]},"application/csrattrs":{"source":"iana"},"application/csta+xml":{"source":"iana","compressible":true},"application/cstadata+xml":{"source":"iana","compressible":true},"application/csvm+json":{"source":"iana","compressible":true},"application/cu-seeme":{"source":"apache","extensions":["cu"]},"application/cwt":{"source":"iana"},"application/cybercash":{"source":"iana"},"application/dart":{"compressible":true},"application/dash+xml":{"source":"iana","compressible":true,"extensions":["mpd"]},"application/dash-patch+xml":{"source":"iana","compressible":true,"extensions":["mpp"]},"application/dashdelta":{"source":"iana"},"application/davmount+xml":{"source":"iana","compressible":true,"extensions":["davmount"]},"application/dca-rft":{"source":"iana"},"application/dcd":{"source":"iana"},"application/dec-dx":{"source":"iana"},"application/dialog-info+xml":{"source":"iana","compressible":true},"application/dicom":{"source":"iana"},"application/dicom+json":{"source":"iana","compressible":true},"application/dicom+xml":{"source":"iana","compressible":true},"application/dii":{"source":"iana"},"application/dit":{"source":"iana"},"application/dns":{"source":"iana"},"application/dns+json":{"source":"iana","compressible":true},"application/dns-message":{"source":"iana"},"application/docbook+xml":{"source":"apache","compressible":true,"extensions":["dbk"]},"application/dots+cbor":{"source":"iana"},"application/dskpp+xml":{"source":"iana","compressible":true},"application/dssc+der":{"source":"iana","extensions":["dssc"]},"application/dssc+xml":{"source":"iana","compressible":true,"extensions":["xdssc"]},"application/dvcs":{"source":"iana"},"application/ecmascript":{"source":"iana","compressible":true,"extensions":["es","ecma"]},"application/edi-consent":{"source":"iana"},"application/edi-x12":{"source":"iana","compressible":false},"application/edifact":{"source":"iana","compressible":false},"application/efi":{"source":"iana"},"application/elm+json":{"source":"iana","charset":"UTF-8","compressible":true},"application/elm+xml":{"source":"iana","compressible":true},"application/emergencycalldata.cap+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/emergencycalldata.comment+xml":{"source":"iana","compressible":true},"application/emergencycalldata.control+xml":{"source":"iana","compressible":true},"application/emergencycalldata.deviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.ecall.msd":{"source":"iana"},"application/emergencycalldata.providerinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.serviceinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.subscriberinfo+xml":{"source":"iana","compressible":true},"application/emergencycalldata.veds+xml":{"source":"iana","compressible":true},"application/emma+xml":{"source":"iana","compressible":true,"extensions":["emma"]},"application/emotionml+xml":{"source":"iana","compressible":true,"extensions":["emotionml"]},"application/encaprtp":{"source":"iana"},"application/epp+xml":{"source":"iana","compressible":true},"application/epub+zip":{"source":"iana","compressible":false,"extensions":["epub"]},"application/eshop":{"source":"iana"},"application/exi":{"source":"iana","extensions":["exi"]},"application/expect-ct-report+json":{"source":"iana","compressible":true},"application/express":{"source":"iana","extensions":["exp"]},"application/fastinfoset":{"source":"iana"},"application/fastsoap":{"source":"iana"},"application/fdt+xml":{"source":"iana","compressible":true,"extensions":["fdt"]},"application/fhir+json":{"source":"iana","charset":"UTF-8","compressible":true},"application/fhir+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/fido.trusted-apps+json":{"compressible":true},"application/fits":{"source":"iana"},"application/flexfec":{"source":"iana"},"application/font-sfnt":{"source":"iana"},"application/font-tdpfr":{"source":"iana","extensions":["pfr"]},"application/font-woff":{"source":"iana","compressible":false},"application/framework-attributes+xml":{"source":"iana","compressible":true},"application/geo+json":{"source":"iana","compressible":true,"extensions":["geojson"]},"application/geo+json-seq":{"source":"iana"},"application/geopackage+sqlite3":{"source":"iana"},"application/geoxacml+xml":{"source":"iana","compressible":true},"application/gltf-buffer":{"source":"iana"},"application/gml+xml":{"source":"iana","compressible":true,"extensions":["gml"]},"application/gpx+xml":{"source":"apache","compressible":true,"extensions":["gpx"]},"application/gxf":{"source":"apache","extensions":["gxf"]},"application/gzip":{"source":"iana","compressible":false,"extensions":["gz"]},"application/h224":{"source":"iana"},"application/held+xml":{"source":"iana","compressible":true},"application/hjson":{"extensions":["hjson"]},"application/http":{"source":"iana"},"application/hyperstudio":{"source":"iana","extensions":["stk"]},"application/ibe-key-request+xml":{"source":"iana","compressible":true},"application/ibe-pkg-reply+xml":{"source":"iana","compressible":true},"application/ibe-pp-data":{"source":"iana"},"application/iges":{"source":"iana"},"application/im-iscomposing+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/index":{"source":"iana"},"application/index.cmd":{"source":"iana"},"application/index.obj":{"source":"iana"},"application/index.response":{"source":"iana"},"application/index.vnd":{"source":"iana"},"application/inkml+xml":{"source":"iana","compressible":true,"extensions":["ink","inkml"]},"application/iotp":{"source":"iana"},"application/ipfix":{"source":"iana","extensions":["ipfix"]},"application/ipp":{"source":"iana"},"application/isup":{"source":"iana"},"application/its+xml":{"source":"iana","compressible":true,"extensions":["its"]},"application/java-archive":{"source":"apache","compressible":false,"extensions":["jar","war","ear"]},"application/java-serialized-object":{"source":"apache","compressible":false,"extensions":["ser"]},"application/java-vm":{"source":"apache","compressible":false,"extensions":["class"]},"application/javascript":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["js","mjs"]},"application/jf2feed+json":{"source":"iana","compressible":true},"application/jose":{"source":"iana"},"application/jose+json":{"source":"iana","compressible":true},"application/jrd+json":{"source":"iana","compressible":true},"application/jscalendar+json":{"source":"iana","compressible":true},"application/json":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["json","map"]},"application/json-patch+json":{"source":"iana","compressible":true},"application/json-seq":{"source":"iana"},"application/json5":{"extensions":["json5"]},"application/jsonml+json":{"source":"apache","compressible":true,"extensions":["jsonml"]},"application/jwk+json":{"source":"iana","compressible":true},"application/jwk-set+json":{"source":"iana","compressible":true},"application/jwt":{"source":"iana"},"application/kpml-request+xml":{"source":"iana","compressible":true},"application/kpml-response+xml":{"source":"iana","compressible":true},"application/ld+json":{"source":"iana","compressible":true,"extensions":["jsonld"]},"application/lgr+xml":{"source":"iana","compressible":true,"extensions":["lgr"]},"application/link-format":{"source":"iana"},"application/load-control+xml":{"source":"iana","compressible":true},"application/lost+xml":{"source":"iana","compressible":true,"extensions":["lostxml"]},"application/lostsync+xml":{"source":"iana","compressible":true},"application/lpf+zip":{"source":"iana","compressible":false},"application/lxf":{"source":"iana"},"application/mac-binhex40":{"source":"iana","extensions":["hqx"]},"application/mac-compactpro":{"source":"apache","extensions":["cpt"]},"application/macwriteii":{"source":"iana"},"application/mads+xml":{"source":"iana","compressible":true,"extensions":["mads"]},"application/manifest+json":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["webmanifest"]},"application/marc":{"source":"iana","extensions":["mrc"]},"application/marcxml+xml":{"source":"iana","compressible":true,"extensions":["mrcx"]},"application/mathematica":{"source":"iana","extensions":["ma","nb","mb"]},"application/mathml+xml":{"source":"iana","compressible":true,"extensions":["mathml"]},"application/mathml-content+xml":{"source":"iana","compressible":true},"application/mathml-presentation+xml":{"source":"iana","compressible":true},"application/mbms-associated-procedure-description+xml":{"source":"iana","compressible":true},"application/mbms-deregister+xml":{"source":"iana","compressible":true},"application/mbms-envelope+xml":{"source":"iana","compressible":true},"application/mbms-msk+xml":{"source":"iana","compressible":true},"application/mbms-msk-response+xml":{"source":"iana","compressible":true},"application/mbms-protection-description+xml":{"source":"iana","compressible":true},"application/mbms-reception-report+xml":{"source":"iana","compressible":true},"application/mbms-register+xml":{"source":"iana","compressible":true},"application/mbms-register-response+xml":{"source":"iana","compressible":true},"application/mbms-schedule+xml":{"source":"iana","compressible":true},"application/mbms-user-service-description+xml":{"source":"iana","compressible":true},"application/mbox":{"source":"iana","extensions":["mbox"]},"application/media-policy-dataset+xml":{"source":"iana","compressible":true,"extensions":["mpf"]},"application/media_control+xml":{"source":"iana","compressible":true},"application/mediaservercontrol+xml":{"source":"iana","compressible":true,"extensions":["mscml"]},"application/merge-patch+json":{"source":"iana","compressible":true},"application/metalink+xml":{"source":"apache","compressible":true,"extensions":["metalink"]},"application/metalink4+xml":{"source":"iana","compressible":true,"extensions":["meta4"]},"application/mets+xml":{"source":"iana","compressible":true,"extensions":["mets"]},"application/mf4":{"source":"iana"},"application/mikey":{"source":"iana"},"application/mipc":{"source":"iana"},"application/missing-blocks+cbor-seq":{"source":"iana"},"application/mmt-aei+xml":{"source":"iana","compressible":true,"extensions":["maei"]},"application/mmt-usd+xml":{"source":"iana","compressible":true,"extensions":["musd"]},"application/mods+xml":{"source":"iana","compressible":true,"extensions":["mods"]},"application/moss-keys":{"source":"iana"},"application/moss-signature":{"source":"iana"},"application/mosskey-data":{"source":"iana"},"application/mosskey-request":{"source":"iana"},"application/mp21":{"source":"iana","extensions":["m21","mp21"]},"application/mp4":{"source":"iana","extensions":["mp4s","m4p"]},"application/mpeg4-generic":{"source":"iana"},"application/mpeg4-iod":{"source":"iana"},"application/mpeg4-iod-xmt":{"source":"iana"},"application/mrb-consumer+xml":{"source":"iana","compressible":true},"application/mrb-publish+xml":{"source":"iana","compressible":true},"application/msc-ivr+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/msc-mixer+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/msword":{"source":"iana","compressible":false,"extensions":["doc","dot"]},"application/mud+json":{"source":"iana","compressible":true},"application/multipart-core":{"source":"iana"},"application/mxf":{"source":"iana","extensions":["mxf"]},"application/n-quads":{"source":"iana","extensions":["nq"]},"application/n-triples":{"source":"iana","extensions":["nt"]},"application/nasdata":{"source":"iana"},"application/news-checkgroups":{"source":"iana","charset":"US-ASCII"},"application/news-groupinfo":{"source":"iana","charset":"US-ASCII"},"application/news-transmission":{"source":"iana"},"application/nlsml+xml":{"source":"iana","compressible":true},"application/node":{"source":"iana","extensions":["cjs"]},"application/nss":{"source":"iana"},"application/oauth-authz-req+jwt":{"source":"iana"},"application/oblivious-dns-message":{"source":"iana"},"application/ocsp-request":{"source":"iana"},"application/ocsp-response":{"source":"iana"},"application/octet-stream":{"source":"iana","compressible":false,"extensions":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{"source":"iana","extensions":["oda"]},"application/odm+xml":{"source":"iana","compressible":true},"application/odx":{"source":"iana"},"application/oebps-package+xml":{"source":"iana","compressible":true,"extensions":["opf"]},"application/ogg":{"source":"iana","compressible":false,"extensions":["ogx"]},"application/omdoc+xml":{"source":"apache","compressible":true,"extensions":["omdoc"]},"application/onenote":{"source":"apache","extensions":["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{"source":"iana","compressible":true},"application/oscore":{"source":"iana"},"application/oxps":{"source":"iana","extensions":["oxps"]},"application/p21":{"source":"iana"},"application/p21+zip":{"source":"iana","compressible":false},"application/p2p-overlay+xml":{"source":"iana","compressible":true,"extensions":["relo"]},"application/parityfec":{"source":"iana"},"application/passport":{"source":"iana"},"application/patch-ops-error+xml":{"source":"iana","compressible":true,"extensions":["xer"]},"application/pdf":{"source":"iana","compressible":false,"extensions":["pdf"]},"application/pdx":{"source":"iana"},"application/pem-certificate-chain":{"source":"iana"},"application/pgp-encrypted":{"source":"iana","compressible":false,"extensions":["pgp"]},"application/pgp-keys":{"source":"iana","extensions":["asc"]},"application/pgp-signature":{"source":"iana","extensions":["asc","sig"]},"application/pics-rules":{"source":"apache","extensions":["prf"]},"application/pidf+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/pidf-diff+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/pkcs10":{"source":"iana","extensions":["p10"]},"application/pkcs12":{"source":"iana"},"application/pkcs7-mime":{"source":"iana","extensions":["p7m","p7c"]},"application/pkcs7-signature":{"source":"iana","extensions":["p7s"]},"application/pkcs8":{"source":"iana","extensions":["p8"]},"application/pkcs8-encrypted":{"source":"iana"},"application/pkix-attr-cert":{"source":"iana","extensions":["ac"]},"application/pkix-cert":{"source":"iana","extensions":["cer"]},"application/pkix-crl":{"source":"iana","extensions":["crl"]},"application/pkix-pkipath":{"source":"iana","extensions":["pkipath"]},"application/pkixcmp":{"source":"iana","extensions":["pki"]},"application/pls+xml":{"source":"iana","compressible":true,"extensions":["pls"]},"application/poc-settings+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/postscript":{"source":"iana","compressible":true,"extensions":["ai","eps","ps"]},"application/ppsp-tracker+json":{"source":"iana","compressible":true},"application/problem+json":{"source":"iana","compressible":true},"application/problem+xml":{"source":"iana","compressible":true},"application/provenance+xml":{"source":"iana","compressible":true,"extensions":["provx"]},"application/prs.alvestrand.titrax-sheet":{"source":"iana"},"application/prs.cww":{"source":"iana","extensions":["cww"]},"application/prs.cyn":{"source":"iana","charset":"7-BIT"},"application/prs.hpub+zip":{"source":"iana","compressible":false},"application/prs.nprend":{"source":"iana"},"application/prs.plucker":{"source":"iana"},"application/prs.rdf-xml-crypt":{"source":"iana"},"application/prs.xsf+xml":{"source":"iana","compressible":true},"application/pskc+xml":{"source":"iana","compressible":true,"extensions":["pskcxml"]},"application/pvd+json":{"source":"iana","compressible":true},"application/qsig":{"source":"iana"},"application/raml+yaml":{"compressible":true,"extensions":["raml"]},"application/raptorfec":{"source":"iana"},"application/rdap+json":{"source":"iana","compressible":true},"application/rdf+xml":{"source":"iana","compressible":true,"extensions":["rdf","owl"]},"application/reginfo+xml":{"source":"iana","compressible":true,"extensions":["rif"]},"application/relax-ng-compact-syntax":{"source":"iana","extensions":["rnc"]},"application/remote-printing":{"source":"iana"},"application/reputon+json":{"source":"iana","compressible":true},"application/resource-lists+xml":{"source":"iana","compressible":true,"extensions":["rl"]},"application/resource-lists-diff+xml":{"source":"iana","compressible":true,"extensions":["rld"]},"application/rfc+xml":{"source":"iana","compressible":true},"application/riscos":{"source":"iana"},"application/rlmi+xml":{"source":"iana","compressible":true},"application/rls-services+xml":{"source":"iana","compressible":true,"extensions":["rs"]},"application/route-apd+xml":{"source":"iana","compressible":true,"extensions":["rapd"]},"application/route-s-tsid+xml":{"source":"iana","compressible":true,"extensions":["sls"]},"application/route-usd+xml":{"source":"iana","compressible":true,"extensions":["rusd"]},"application/rpki-ghostbusters":{"source":"iana","extensions":["gbr"]},"application/rpki-manifest":{"source":"iana","extensions":["mft"]},"application/rpki-publication":{"source":"iana"},"application/rpki-roa":{"source":"iana","extensions":["roa"]},"application/rpki-updown":{"source":"iana"},"application/rsd+xml":{"source":"apache","compressible":true,"extensions":["rsd"]},"application/rss+xml":{"source":"apache","compressible":true,"extensions":["rss"]},"application/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"application/rtploopback":{"source":"iana"},"application/rtx":{"source":"iana"},"application/samlassertion+xml":{"source":"iana","compressible":true},"application/samlmetadata+xml":{"source":"iana","compressible":true},"application/sarif+json":{"source":"iana","compressible":true},"application/sarif-external-properties+json":{"source":"iana","compressible":true},"application/sbe":{"source":"iana"},"application/sbml+xml":{"source":"iana","compressible":true,"extensions":["sbml"]},"application/scaip+xml":{"source":"iana","compressible":true},"application/scim+json":{"source":"iana","compressible":true},"application/scvp-cv-request":{"source":"iana","extensions":["scq"]},"application/scvp-cv-response":{"source":"iana","extensions":["scs"]},"application/scvp-vp-request":{"source":"iana","extensions":["spq"]},"application/scvp-vp-response":{"source":"iana","extensions":["spp"]},"application/sdp":{"source":"iana","extensions":["sdp"]},"application/secevent+jwt":{"source":"iana"},"application/senml+cbor":{"source":"iana"},"application/senml+json":{"source":"iana","compressible":true},"application/senml+xml":{"source":"iana","compressible":true,"extensions":["senmlx"]},"application/senml-etch+cbor":{"source":"iana"},"application/senml-etch+json":{"source":"iana","compressible":true},"application/senml-exi":{"source":"iana"},"application/sensml+cbor":{"source":"iana"},"application/sensml+json":{"source":"iana","compressible":true},"application/sensml+xml":{"source":"iana","compressible":true,"extensions":["sensmlx"]},"application/sensml-exi":{"source":"iana"},"application/sep+xml":{"source":"iana","compressible":true},"application/sep-exi":{"source":"iana"},"application/session-info":{"source":"iana"},"application/set-payment":{"source":"iana"},"application/set-payment-initiation":{"source":"iana","extensions":["setpay"]},"application/set-registration":{"source":"iana"},"application/set-registration-initiation":{"source":"iana","extensions":["setreg"]},"application/sgml":{"source":"iana"},"application/sgml-open-catalog":{"source":"iana"},"application/shf+xml":{"source":"iana","compressible":true,"extensions":["shf"]},"application/sieve":{"source":"iana","extensions":["siv","sieve"]},"application/simple-filter+xml":{"source":"iana","compressible":true},"application/simple-message-summary":{"source":"iana"},"application/simplesymbolcontainer":{"source":"iana"},"application/sipc":{"source":"iana"},"application/slate":{"source":"iana"},"application/smil":{"source":"iana"},"application/smil+xml":{"source":"iana","compressible":true,"extensions":["smi","smil"]},"application/smpte336m":{"source":"iana"},"application/soap+fastinfoset":{"source":"iana"},"application/soap+xml":{"source":"iana","compressible":true},"application/sparql-query":{"source":"iana","extensions":["rq"]},"application/sparql-results+xml":{"source":"iana","compressible":true,"extensions":["srx"]},"application/spdx+json":{"source":"iana","compressible":true},"application/spirits-event+xml":{"source":"iana","compressible":true},"application/sql":{"source":"iana"},"application/srgs":{"source":"iana","extensions":["gram"]},"application/srgs+xml":{"source":"iana","compressible":true,"extensions":["grxml"]},"application/sru+xml":{"source":"iana","compressible":true,"extensions":["sru"]},"application/ssdl+xml":{"source":"apache","compressible":true,"extensions":["ssdl"]},"application/ssml+xml":{"source":"iana","compressible":true,"extensions":["ssml"]},"application/stix+json":{"source":"iana","compressible":true},"application/swid+xml":{"source":"iana","compressible":true,"extensions":["swidtag"]},"application/tamp-apex-update":{"source":"iana"},"application/tamp-apex-update-confirm":{"source":"iana"},"application/tamp-community-update":{"source":"iana"},"application/tamp-community-update-confirm":{"source":"iana"},"application/tamp-error":{"source":"iana"},"application/tamp-sequence-adjust":{"source":"iana"},"application/tamp-sequence-adjust-confirm":{"source":"iana"},"application/tamp-status-query":{"source":"iana"},"application/tamp-status-response":{"source":"iana"},"application/tamp-update":{"source":"iana"},"application/tamp-update-confirm":{"source":"iana"},"application/tar":{"compressible":true},"application/taxii+json":{"source":"iana","compressible":true},"application/td+json":{"source":"iana","compressible":true},"application/tei+xml":{"source":"iana","compressible":true,"extensions":["tei","teicorpus"]},"application/tetra_isi":{"source":"iana"},"application/thraud+xml":{"source":"iana","compressible":true,"extensions":["tfi"]},"application/timestamp-query":{"source":"iana"},"application/timestamp-reply":{"source":"iana"},"application/timestamped-data":{"source":"iana","extensions":["tsd"]},"application/tlsrpt+gzip":{"source":"iana"},"application/tlsrpt+json":{"source":"iana","compressible":true},"application/tnauthlist":{"source":"iana"},"application/token-introspection+jwt":{"source":"iana"},"application/toml":{"compressible":true,"extensions":["toml"]},"application/trickle-ice-sdpfrag":{"source":"iana"},"application/trig":{"source":"iana","extensions":["trig"]},"application/ttml+xml":{"source":"iana","compressible":true,"extensions":["ttml"]},"application/tve-trigger":{"source":"iana"},"application/tzif":{"source":"iana"},"application/tzif-leap":{"source":"iana"},"application/ubjson":{"compressible":false,"extensions":["ubj"]},"application/ulpfec":{"source":"iana"},"application/urc-grpsheet+xml":{"source":"iana","compressible":true},"application/urc-ressheet+xml":{"source":"iana","compressible":true,"extensions":["rsheet"]},"application/urc-targetdesc+xml":{"source":"iana","compressible":true,"extensions":["td"]},"application/urc-uisocketdesc+xml":{"source":"iana","compressible":true},"application/vcard+json":{"source":"iana","compressible":true},"application/vcard+xml":{"source":"iana","compressible":true},"application/vemmi":{"source":"iana"},"application/vividence.scriptfile":{"source":"apache"},"application/vnd.1000minds.decision-model+xml":{"source":"iana","compressible":true,"extensions":["1km"]},"application/vnd.3gpp-prose+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-prose-pc3ch+xml":{"source":"iana","compressible":true},"application/vnd.3gpp-v2x-local-service-information":{"source":"iana"},"application/vnd.3gpp.5gnas":{"source":"iana"},"application/vnd.3gpp.access-transfer-events+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.bsf+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.gmop+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.gtpc":{"source":"iana"},"application/vnd.3gpp.interworking-data":{"source":"iana"},"application/vnd.3gpp.lpp":{"source":"iana"},"application/vnd.3gpp.mc-signalling-ear":{"source":"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-payload":{"source":"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-signalling":{"source":"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcdata-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-floor-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-signed+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-ue-init-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcptt-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-location-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-service-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-transmission-request+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-ue-config+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mcvideo-user-profile+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.mid-call+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.ngap":{"source":"iana"},"application/vnd.3gpp.pfcp":{"source":"iana"},"application/vnd.3gpp.pic-bw-large":{"source":"iana","extensions":["plb"]},"application/vnd.3gpp.pic-bw-small":{"source":"iana","extensions":["psb"]},"application/vnd.3gpp.pic-bw-var":{"source":"iana","extensions":["pvb"]},"application/vnd.3gpp.s1ap":{"source":"iana"},"application/vnd.3gpp.sms":{"source":"iana"},"application/vnd.3gpp.sms+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-ext+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.srvcc-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.state-and-event-info+xml":{"source":"iana","compressible":true},"application/vnd.3gpp.ussd+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.bcmcsinfo+xml":{"source":"iana","compressible":true},"application/vnd.3gpp2.sms":{"source":"iana"},"application/vnd.3gpp2.tcap":{"source":"iana","extensions":["tcap"]},"application/vnd.3lightssoftware.imagescal":{"source":"iana"},"application/vnd.3m.post-it-notes":{"source":"iana","extensions":["pwn"]},"application/vnd.accpac.simply.aso":{"source":"iana","extensions":["aso"]},"application/vnd.accpac.simply.imp":{"source":"iana","extensions":["imp"]},"application/vnd.acucobol":{"source":"iana","extensions":["acu"]},"application/vnd.acucorp":{"source":"iana","extensions":["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{"source":"apache","compressible":false,"extensions":["air"]},"application/vnd.adobe.flash.movie":{"source":"iana"},"application/vnd.adobe.formscentral.fcdt":{"source":"iana","extensions":["fcdt"]},"application/vnd.adobe.fxp":{"source":"iana","extensions":["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{"source":"iana"},"application/vnd.adobe.xdp+xml":{"source":"iana","compressible":true,"extensions":["xdp"]},"application/vnd.adobe.xfdf":{"source":"iana","extensions":["xfdf"]},"application/vnd.aether.imp":{"source":"iana"},"application/vnd.afpc.afplinedata":{"source":"iana"},"application/vnd.afpc.afplinedata-pagedef":{"source":"iana"},"application/vnd.afpc.cmoca-cmresource":{"source":"iana"},"application/vnd.afpc.foca-charset":{"source":"iana"},"application/vnd.afpc.foca-codedfont":{"source":"iana"},"application/vnd.afpc.foca-codepage":{"source":"iana"},"application/vnd.afpc.modca":{"source":"iana"},"application/vnd.afpc.modca-cmtable":{"source":"iana"},"application/vnd.afpc.modca-formdef":{"source":"iana"},"application/vnd.afpc.modca-mediummap":{"source":"iana"},"application/vnd.afpc.modca-objectcontainer":{"source":"iana"},"application/vnd.afpc.modca-overlay":{"source":"iana"},"application/vnd.afpc.modca-pagesegment":{"source":"iana"},"application/vnd.age":{"source":"iana","extensions":["age"]},"application/vnd.ah-barcode":{"source":"iana"},"application/vnd.ahead.space":{"source":"iana","extensions":["ahead"]},"application/vnd.airzip.filesecure.azf":{"source":"iana","extensions":["azf"]},"application/vnd.airzip.filesecure.azs":{"source":"iana","extensions":["azs"]},"application/vnd.amadeus+json":{"source":"iana","compressible":true},"application/vnd.amazon.ebook":{"source":"apache","extensions":["azw"]},"application/vnd.amazon.mobi8-ebook":{"source":"iana"},"application/vnd.americandynamics.acc":{"source":"iana","extensions":["acc"]},"application/vnd.amiga.ami":{"source":"iana","extensions":["ami"]},"application/vnd.amundsen.maze+xml":{"source":"iana","compressible":true},"application/vnd.android.ota":{"source":"iana"},"application/vnd.android.package-archive":{"source":"apache","compressible":false,"extensions":["apk"]},"application/vnd.anki":{"source":"iana"},"application/vnd.anser-web-certificate-issue-initiation":{"source":"iana","extensions":["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{"source":"apache","extensions":["fti"]},"application/vnd.antix.game-component":{"source":"iana","extensions":["atx"]},"application/vnd.apache.arrow.file":{"source":"iana"},"application/vnd.apache.arrow.stream":{"source":"iana"},"application/vnd.apache.thrift.binary":{"source":"iana"},"application/vnd.apache.thrift.compact":{"source":"iana"},"application/vnd.apache.thrift.json":{"source":"iana"},"application/vnd.api+json":{"source":"iana","compressible":true},"application/vnd.aplextor.warrp+json":{"source":"iana","compressible":true},"application/vnd.apothekende.reservation+json":{"source":"iana","compressible":true},"application/vnd.apple.installer+xml":{"source":"iana","compressible":true,"extensions":["mpkg"]},"application/vnd.apple.keynote":{"source":"iana","extensions":["key"]},"application/vnd.apple.mpegurl":{"source":"iana","extensions":["m3u8"]},"application/vnd.apple.numbers":{"source":"iana","extensions":["numbers"]},"application/vnd.apple.pages":{"source":"iana","extensions":["pages"]},"application/vnd.apple.pkpass":{"compressible":false,"extensions":["pkpass"]},"application/vnd.arastra.swi":{"source":"iana"},"application/vnd.aristanetworks.swi":{"source":"iana","extensions":["swi"]},"application/vnd.artisan+json":{"source":"iana","compressible":true},"application/vnd.artsquare":{"source":"iana"},"application/vnd.astraea-software.iota":{"source":"iana","extensions":["iota"]},"application/vnd.audiograph":{"source":"iana","extensions":["aep"]},"application/vnd.autopackage":{"source":"iana"},"application/vnd.avalon+json":{"source":"iana","compressible":true},"application/vnd.avistar+xml":{"source":"iana","compressible":true},"application/vnd.balsamiq.bmml+xml":{"source":"iana","compressible":true,"extensions":["bmml"]},"application/vnd.balsamiq.bmpr":{"source":"iana"},"application/vnd.banana-accounting":{"source":"iana"},"application/vnd.bbf.usp.error":{"source":"iana"},"application/vnd.bbf.usp.msg":{"source":"iana"},"application/vnd.bbf.usp.msg+json":{"source":"iana","compressible":true},"application/vnd.bekitzur-stech+json":{"source":"iana","compressible":true},"application/vnd.bint.med-content":{"source":"iana"},"application/vnd.biopax.rdf+xml":{"source":"iana","compressible":true},"application/vnd.blink-idb-value-wrapper":{"source":"iana"},"application/vnd.blueice.multipass":{"source":"iana","extensions":["mpm"]},"application/vnd.bluetooth.ep.oob":{"source":"iana"},"application/vnd.bluetooth.le.oob":{"source":"iana"},"application/vnd.bmi":{"source":"iana","extensions":["bmi"]},"application/vnd.bpf":{"source":"iana"},"application/vnd.bpf3":{"source":"iana"},"application/vnd.businessobjects":{"source":"iana","extensions":["rep"]},"application/vnd.byu.uapi+json":{"source":"iana","compressible":true},"application/vnd.cab-jscript":{"source":"iana"},"application/vnd.canon-cpdl":{"source":"iana"},"application/vnd.canon-lips":{"source":"iana"},"application/vnd.capasystems-pg+json":{"source":"iana","compressible":true},"application/vnd.cendio.thinlinc.clientconf":{"source":"iana"},"application/vnd.century-systems.tcp_stream":{"source":"iana"},"application/vnd.chemdraw+xml":{"source":"iana","compressible":true,"extensions":["cdxml"]},"application/vnd.chess-pgn":{"source":"iana"},"application/vnd.chipnuts.karaoke-mmd":{"source":"iana","extensions":["mmd"]},"application/vnd.ciedi":{"source":"iana"},"application/vnd.cinderella":{"source":"iana","extensions":["cdy"]},"application/vnd.cirpack.isdn-ext":{"source":"iana"},"application/vnd.citationstyles.style+xml":{"source":"iana","compressible":true,"extensions":["csl"]},"application/vnd.claymore":{"source":"iana","extensions":["cla"]},"application/vnd.cloanto.rp9":{"source":"iana","extensions":["rp9"]},"application/vnd.clonk.c4group":{"source":"iana","extensions":["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{"source":"iana","extensions":["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{"source":"iana","extensions":["c11amz"]},"application/vnd.coffeescript":{"source":"iana"},"application/vnd.collabio.xodocuments.document":{"source":"iana"},"application/vnd.collabio.xodocuments.document-template":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation":{"source":"iana"},"application/vnd.collabio.xodocuments.presentation-template":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{"source":"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{"source":"iana"},"application/vnd.collection+json":{"source":"iana","compressible":true},"application/vnd.collection.doc+json":{"source":"iana","compressible":true},"application/vnd.collection.next+json":{"source":"iana","compressible":true},"application/vnd.comicbook+zip":{"source":"iana","compressible":false},"application/vnd.comicbook-rar":{"source":"iana"},"application/vnd.commerce-battelle":{"source":"iana"},"application/vnd.commonspace":{"source":"iana","extensions":["csp"]},"application/vnd.contact.cmsg":{"source":"iana","extensions":["cdbcmsg"]},"application/vnd.coreos.ignition+json":{"source":"iana","compressible":true},"application/vnd.cosmocaller":{"source":"iana","extensions":["cmc"]},"application/vnd.crick.clicker":{"source":"iana","extensions":["clkx"]},"application/vnd.crick.clicker.keyboard":{"source":"iana","extensions":["clkk"]},"application/vnd.crick.clicker.palette":{"source":"iana","extensions":["clkp"]},"application/vnd.crick.clicker.template":{"source":"iana","extensions":["clkt"]},"application/vnd.crick.clicker.wordbank":{"source":"iana","extensions":["clkw"]},"application/vnd.criticaltools.wbs+xml":{"source":"iana","compressible":true,"extensions":["wbs"]},"application/vnd.cryptii.pipe+json":{"source":"iana","compressible":true},"application/vnd.crypto-shade-file":{"source":"iana"},"application/vnd.cryptomator.encrypted":{"source":"iana"},"application/vnd.cryptomator.vault":{"source":"iana"},"application/vnd.ctc-posml":{"source":"iana","extensions":["pml"]},"application/vnd.ctct.ws+xml":{"source":"iana","compressible":true},"application/vnd.cups-pdf":{"source":"iana"},"application/vnd.cups-postscript":{"source":"iana"},"application/vnd.cups-ppd":{"source":"iana","extensions":["ppd"]},"application/vnd.cups-raster":{"source":"iana"},"application/vnd.cups-raw":{"source":"iana"},"application/vnd.curl":{"source":"iana"},"application/vnd.curl.car":{"source":"apache","extensions":["car"]},"application/vnd.curl.pcurl":{"source":"apache","extensions":["pcurl"]},"application/vnd.cyan.dean.root+xml":{"source":"iana","compressible":true},"application/vnd.cybank":{"source":"iana"},"application/vnd.cyclonedx+json":{"source":"iana","compressible":true},"application/vnd.cyclonedx+xml":{"source":"iana","compressible":true},"application/vnd.d2l.coursepackage1p0+zip":{"source":"iana","compressible":false},"application/vnd.d3m-dataset":{"source":"iana"},"application/vnd.d3m-problem":{"source":"iana"},"application/vnd.dart":{"source":"iana","compressible":true,"extensions":["dart"]},"application/vnd.data-vision.rdz":{"source":"iana","extensions":["rdz"]},"application/vnd.datapackage+json":{"source":"iana","compressible":true},"application/vnd.dataresource+json":{"source":"iana","compressible":true},"application/vnd.dbf":{"source":"iana","extensions":["dbf"]},"application/vnd.debian.binary-package":{"source":"iana"},"application/vnd.dece.data":{"source":"iana","extensions":["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{"source":"iana","compressible":true,"extensions":["uvt","uvvt"]},"application/vnd.dece.unspecified":{"source":"iana","extensions":["uvx","uvvx"]},"application/vnd.dece.zip":{"source":"iana","extensions":["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{"source":"iana","extensions":["fe_launch"]},"application/vnd.desmume.movie":{"source":"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{"source":"iana"},"application/vnd.dm.delegation+xml":{"source":"iana","compressible":true},"application/vnd.dna":{"source":"iana","extensions":["dna"]},"application/vnd.document+json":{"source":"iana","compressible":true},"application/vnd.dolby.mlp":{"source":"apache","extensions":["mlp"]},"application/vnd.dolby.mobile.1":{"source":"iana"},"application/vnd.dolby.mobile.2":{"source":"iana"},"application/vnd.doremir.scorecloud-binary-document":{"source":"iana"},"application/vnd.dpgraph":{"source":"iana","extensions":["dpg"]},"application/vnd.dreamfactory":{"source":"iana","extensions":["dfac"]},"application/vnd.drive+json":{"source":"iana","compressible":true},"application/vnd.ds-keypoint":{"source":"apache","extensions":["kpxx"]},"application/vnd.dtg.local":{"source":"iana"},"application/vnd.dtg.local.flash":{"source":"iana"},"application/vnd.dtg.local.html":{"source":"iana"},"application/vnd.dvb.ait":{"source":"iana","extensions":["ait"]},"application/vnd.dvb.dvbisl+xml":{"source":"iana","compressible":true},"application/vnd.dvb.dvbj":{"source":"iana"},"application/vnd.dvb.esgcontainer":{"source":"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess":{"source":"iana"},"application/vnd.dvb.ipdcesgaccess2":{"source":"iana"},"application/vnd.dvb.ipdcesgpdd":{"source":"iana"},"application/vnd.dvb.ipdcroaming":{"source":"iana"},"application/vnd.dvb.iptv.alfec-base":{"source":"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{"source":"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-container+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-generic+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-msglist+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-request+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-ia-registration-response+xml":{"source":"iana","compressible":true},"application/vnd.dvb.notif-init+xml":{"source":"iana","compressible":true},"application/vnd.dvb.pfr":{"source":"iana"},"application/vnd.dvb.service":{"source":"iana","extensions":["svc"]},"application/vnd.dxr":{"source":"iana"},"application/vnd.dynageo":{"source":"iana","extensions":["geo"]},"application/vnd.dzr":{"source":"iana"},"application/vnd.easykaraoke.cdgdownload":{"source":"iana"},"application/vnd.ecdis-update":{"source":"iana"},"application/vnd.ecip.rlp":{"source":"iana"},"application/vnd.eclipse.ditto+json":{"source":"iana","compressible":true},"application/vnd.ecowin.chart":{"source":"iana","extensions":["mag"]},"application/vnd.ecowin.filerequest":{"source":"iana"},"application/vnd.ecowin.fileupdate":{"source":"iana"},"application/vnd.ecowin.series":{"source":"iana"},"application/vnd.ecowin.seriesrequest":{"source":"iana"},"application/vnd.ecowin.seriesupdate":{"source":"iana"},"application/vnd.efi.img":{"source":"iana"},"application/vnd.efi.iso":{"source":"iana"},"application/vnd.emclient.accessrequest+xml":{"source":"iana","compressible":true},"application/vnd.enliven":{"source":"iana","extensions":["nml"]},"application/vnd.enphase.envoy":{"source":"iana"},"application/vnd.eprints.data+xml":{"source":"iana","compressible":true},"application/vnd.epson.esf":{"source":"iana","extensions":["esf"]},"application/vnd.epson.msf":{"source":"iana","extensions":["msf"]},"application/vnd.epson.quickanime":{"source":"iana","extensions":["qam"]},"application/vnd.epson.salt":{"source":"iana","extensions":["slt"]},"application/vnd.epson.ssf":{"source":"iana","extensions":["ssf"]},"application/vnd.ericsson.quickcall":{"source":"iana"},"application/vnd.espass-espass+zip":{"source":"iana","compressible":false},"application/vnd.eszigno3+xml":{"source":"iana","compressible":true,"extensions":["es3","et3"]},"application/vnd.etsi.aoc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.asic-e+zip":{"source":"iana","compressible":false},"application/vnd.etsi.asic-s+zip":{"source":"iana","compressible":false},"application/vnd.etsi.cug+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvcommand+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-bc+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-cod+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsad-npvr+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvservice+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvsync+xml":{"source":"iana","compressible":true},"application/vnd.etsi.iptvueprofile+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mcid+xml":{"source":"iana","compressible":true},"application/vnd.etsi.mheg5":{"source":"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{"source":"iana","compressible":true},"application/vnd.etsi.pstn+xml":{"source":"iana","compressible":true},"application/vnd.etsi.sci+xml":{"source":"iana","compressible":true},"application/vnd.etsi.simservs+xml":{"source":"iana","compressible":true},"application/vnd.etsi.timestamp-token":{"source":"iana"},"application/vnd.etsi.tsl+xml":{"source":"iana","compressible":true},"application/vnd.etsi.tsl.der":{"source":"iana"},"application/vnd.eu.kasparian.car+json":{"source":"iana","compressible":true},"application/vnd.eudora.data":{"source":"iana"},"application/vnd.evolv.ecig.profile":{"source":"iana"},"application/vnd.evolv.ecig.settings":{"source":"iana"},"application/vnd.evolv.ecig.theme":{"source":"iana"},"application/vnd.exstream-empower+zip":{"source":"iana","compressible":false},"application/vnd.exstream-package":{"source":"iana"},"application/vnd.ezpix-album":{"source":"iana","extensions":["ez2"]},"application/vnd.ezpix-package":{"source":"iana","extensions":["ez3"]},"application/vnd.f-secure.mobile":{"source":"iana"},"application/vnd.familysearch.gedcom+zip":{"source":"iana","compressible":false},"application/vnd.fastcopy-disk-image":{"source":"iana"},"application/vnd.fdf":{"source":"iana","extensions":["fdf"]},"application/vnd.fdsn.mseed":{"source":"iana","extensions":["mseed"]},"application/vnd.fdsn.seed":{"source":"iana","extensions":["seed","dataless"]},"application/vnd.ffsns":{"source":"iana"},"application/vnd.ficlab.flb+zip":{"source":"iana","compressible":false},"application/vnd.filmit.zfc":{"source":"iana"},"application/vnd.fints":{"source":"iana"},"application/vnd.firemonkeys.cloudcell":{"source":"iana"},"application/vnd.flographit":{"source":"iana","extensions":["gph"]},"application/vnd.fluxtime.clip":{"source":"iana","extensions":["ftc"]},"application/vnd.font-fontforge-sfd":{"source":"iana"},"application/vnd.framemaker":{"source":"iana","extensions":["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{"source":"iana","extensions":["fnc"]},"application/vnd.frogans.ltf":{"source":"iana","extensions":["ltf"]},"application/vnd.fsc.weblaunch":{"source":"iana","extensions":["fsc"]},"application/vnd.fujifilm.fb.docuworks":{"source":"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{"source":"iana"},"application/vnd.fujifilm.fb.docuworks.container":{"source":"iana"},"application/vnd.fujifilm.fb.jfi+xml":{"source":"iana","compressible":true},"application/vnd.fujitsu.oasys":{"source":"iana","extensions":["oas"]},"application/vnd.fujitsu.oasys2":{"source":"iana","extensions":["oa2"]},"application/vnd.fujitsu.oasys3":{"source":"iana","extensions":["oa3"]},"application/vnd.fujitsu.oasysgp":{"source":"iana","extensions":["fg5"]},"application/vnd.fujitsu.oasysprs":{"source":"iana","extensions":["bh2"]},"application/vnd.fujixerox.art-ex":{"source":"iana"},"application/vnd.fujixerox.art4":{"source":"iana"},"application/vnd.fujixerox.ddd":{"source":"iana","extensions":["ddd"]},"application/vnd.fujixerox.docuworks":{"source":"iana","extensions":["xdw"]},"application/vnd.fujixerox.docuworks.binder":{"source":"iana","extensions":["xbd"]},"application/vnd.fujixerox.docuworks.container":{"source":"iana"},"application/vnd.fujixerox.hbpl":{"source":"iana"},"application/vnd.fut-misnet":{"source":"iana"},"application/vnd.futoin+cbor":{"source":"iana"},"application/vnd.futoin+json":{"source":"iana","compressible":true},"application/vnd.fuzzysheet":{"source":"iana","extensions":["fzs"]},"application/vnd.genomatix.tuxedo":{"source":"iana","extensions":["txd"]},"application/vnd.gentics.grd+json":{"source":"iana","compressible":true},"application/vnd.geo+json":{"source":"iana","compressible":true},"application/vnd.geocube+xml":{"source":"iana","compressible":true},"application/vnd.geogebra.file":{"source":"iana","extensions":["ggb"]},"application/vnd.geogebra.slides":{"source":"iana"},"application/vnd.geogebra.tool":{"source":"iana","extensions":["ggt"]},"application/vnd.geometry-explorer":{"source":"iana","extensions":["gex","gre"]},"application/vnd.geonext":{"source":"iana","extensions":["gxt"]},"application/vnd.geoplan":{"source":"iana","extensions":["g2w"]},"application/vnd.geospace":{"source":"iana","extensions":["g3w"]},"application/vnd.gerber":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt":{"source":"iana"},"application/vnd.globalplatform.card-content-mgt-response":{"source":"iana"},"application/vnd.gmx":{"source":"iana","extensions":["gmx"]},"application/vnd.google-apps.document":{"compressible":false,"extensions":["gdoc"]},"application/vnd.google-apps.presentation":{"compressible":false,"extensions":["gslides"]},"application/vnd.google-apps.spreadsheet":{"compressible":false,"extensions":["gsheet"]},"application/vnd.google-earth.kml+xml":{"source":"iana","compressible":true,"extensions":["kml"]},"application/vnd.google-earth.kmz":{"source":"iana","compressible":false,"extensions":["kmz"]},"application/vnd.gov.sk.e-form+xml":{"source":"iana","compressible":true},"application/vnd.gov.sk.e-form+zip":{"source":"iana","compressible":false},"application/vnd.gov.sk.xmldatacontainer+xml":{"source":"iana","compressible":true},"application/vnd.grafeq":{"source":"iana","extensions":["gqf","gqs"]},"application/vnd.gridmp":{"source":"iana"},"application/vnd.groove-account":{"source":"iana","extensions":["gac"]},"application/vnd.groove-help":{"source":"iana","extensions":["ghf"]},"application/vnd.groove-identity-message":{"source":"iana","extensions":["gim"]},"application/vnd.groove-injector":{"source":"iana","extensions":["grv"]},"application/vnd.groove-tool-message":{"source":"iana","extensions":["gtm"]},"application/vnd.groove-tool-template":{"source":"iana","extensions":["tpl"]},"application/vnd.groove-vcard":{"source":"iana","extensions":["vcg"]},"application/vnd.hal+json":{"source":"iana","compressible":true},"application/vnd.hal+xml":{"source":"iana","compressible":true,"extensions":["hal"]},"application/vnd.handheld-entertainment+xml":{"source":"iana","compressible":true,"extensions":["zmm"]},"application/vnd.hbci":{"source":"iana","extensions":["hbci"]},"application/vnd.hc+json":{"source":"iana","compressible":true},"application/vnd.hcl-bireports":{"source":"iana"},"application/vnd.hdt":{"source":"iana"},"application/vnd.heroku+json":{"source":"iana","compressible":true},"application/vnd.hhe.lesson-player":{"source":"iana","extensions":["les"]},"application/vnd.hl7cda+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.hl7v2+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.hp-hpgl":{"source":"iana","extensions":["hpgl"]},"application/vnd.hp-hpid":{"source":"iana","extensions":["hpid"]},"application/vnd.hp-hps":{"source":"iana","extensions":["hps"]},"application/vnd.hp-jlyt":{"source":"iana","extensions":["jlt"]},"application/vnd.hp-pcl":{"source":"iana","extensions":["pcl"]},"application/vnd.hp-pclxl":{"source":"iana","extensions":["pclxl"]},"application/vnd.httphone":{"source":"iana"},"application/vnd.hydrostatix.sof-data":{"source":"iana","extensions":["sfd-hdstx"]},"application/vnd.hyper+json":{"source":"iana","compressible":true},"application/vnd.hyper-item+json":{"source":"iana","compressible":true},"application/vnd.hyperdrive+json":{"source":"iana","compressible":true},"application/vnd.hzn-3d-crossword":{"source":"iana"},"application/vnd.ibm.afplinedata":{"source":"iana"},"application/vnd.ibm.electronic-media":{"source":"iana"},"application/vnd.ibm.minipay":{"source":"iana","extensions":["mpy"]},"application/vnd.ibm.modcap":{"source":"iana","extensions":["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{"source":"iana","extensions":["irm"]},"application/vnd.ibm.secure-container":{"source":"iana","extensions":["sc"]},"application/vnd.iccprofile":{"source":"iana","extensions":["icc","icm"]},"application/vnd.ieee.1905":{"source":"iana"},"application/vnd.igloader":{"source":"iana","extensions":["igl"]},"application/vnd.imagemeter.folder+zip":{"source":"iana","compressible":false},"application/vnd.imagemeter.image+zip":{"source":"iana","compressible":false},"application/vnd.immervision-ivp":{"source":"iana","extensions":["ivp"]},"application/vnd.immervision-ivu":{"source":"iana","extensions":["ivu"]},"application/vnd.ims.imsccv1p1":{"source":"iana"},"application/vnd.ims.imsccv1p2":{"source":"iana"},"application/vnd.ims.imsccv1p3":{"source":"iana"},"application/vnd.ims.lis.v2.result+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolproxy.id+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings+json":{"source":"iana","compressible":true},"application/vnd.ims.lti.v2.toolsettings.simple+json":{"source":"iana","compressible":true},"application/vnd.informedcontrol.rms+xml":{"source":"iana","compressible":true},"application/vnd.informix-visionary":{"source":"iana"},"application/vnd.infotech.project":{"source":"iana"},"application/vnd.infotech.project+xml":{"source":"iana","compressible":true},"application/vnd.innopath.wamp.notification":{"source":"iana"},"application/vnd.insors.igm":{"source":"iana","extensions":["igm"]},"application/vnd.intercon.formnet":{"source":"iana","extensions":["xpw","xpx"]},"application/vnd.intergeo":{"source":"iana","extensions":["i2g"]},"application/vnd.intertrust.digibox":{"source":"iana"},"application/vnd.intertrust.nncp":{"source":"iana"},"application/vnd.intu.qbo":{"source":"iana","extensions":["qbo"]},"application/vnd.intu.qfx":{"source":"iana","extensions":["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.conceptitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.knowledgeitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.newsmessage+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.packageitem+xml":{"source":"iana","compressible":true},"application/vnd.iptc.g2.planningitem+xml":{"source":"iana","compressible":true},"application/vnd.ipunplugged.rcprofile":{"source":"iana","extensions":["rcprofile"]},"application/vnd.irepository.package+xml":{"source":"iana","compressible":true,"extensions":["irp"]},"application/vnd.is-xpr":{"source":"iana","extensions":["xpr"]},"application/vnd.isac.fcs":{"source":"iana","extensions":["fcs"]},"application/vnd.iso11783-10+zip":{"source":"iana","compressible":false},"application/vnd.jam":{"source":"iana","extensions":["jam"]},"application/vnd.japannet-directory-service":{"source":"iana"},"application/vnd.japannet-jpnstore-wakeup":{"source":"iana"},"application/vnd.japannet-payment-wakeup":{"source":"iana"},"application/vnd.japannet-registration":{"source":"iana"},"application/vnd.japannet-registration-wakeup":{"source":"iana"},"application/vnd.japannet-setstore-wakeup":{"source":"iana"},"application/vnd.japannet-verification":{"source":"iana"},"application/vnd.japannet-verification-wakeup":{"source":"iana"},"application/vnd.jcp.javame.midlet-rms":{"source":"iana","extensions":["rms"]},"application/vnd.jisp":{"source":"iana","extensions":["jisp"]},"application/vnd.joost.joda-archive":{"source":"iana","extensions":["joda"]},"application/vnd.jsk.isdn-ngn":{"source":"iana"},"application/vnd.kahootz":{"source":"iana","extensions":["ktz","ktr"]},"application/vnd.kde.karbon":{"source":"iana","extensions":["karbon"]},"application/vnd.kde.kchart":{"source":"iana","extensions":["chrt"]},"application/vnd.kde.kformula":{"source":"iana","extensions":["kfo"]},"application/vnd.kde.kivio":{"source":"iana","extensions":["flw"]},"application/vnd.kde.kontour":{"source":"iana","extensions":["kon"]},"application/vnd.kde.kpresenter":{"source":"iana","extensions":["kpr","kpt"]},"application/vnd.kde.kspread":{"source":"iana","extensions":["ksp"]},"application/vnd.kde.kword":{"source":"iana","extensions":["kwd","kwt"]},"application/vnd.kenameaapp":{"source":"iana","extensions":["htke"]},"application/vnd.kidspiration":{"source":"iana","extensions":["kia"]},"application/vnd.kinar":{"source":"iana","extensions":["kne","knp"]},"application/vnd.koan":{"source":"iana","extensions":["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{"source":"iana","extensions":["sse"]},"application/vnd.las":{"source":"iana"},"application/vnd.las.las+json":{"source":"iana","compressible":true},"application/vnd.las.las+xml":{"source":"iana","compressible":true,"extensions":["lasxml"]},"application/vnd.laszip":{"source":"iana"},"application/vnd.leap+json":{"source":"iana","compressible":true},"application/vnd.liberty-request+xml":{"source":"iana","compressible":true},"application/vnd.llamagraphics.life-balance.desktop":{"source":"iana","extensions":["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{"source":"iana","compressible":true,"extensions":["lbe"]},"application/vnd.logipipe.circuit+zip":{"source":"iana","compressible":false},"application/vnd.loom":{"source":"iana"},"application/vnd.lotus-1-2-3":{"source":"iana","extensions":["123"]},"application/vnd.lotus-approach":{"source":"iana","extensions":["apr"]},"application/vnd.lotus-freelance":{"source":"iana","extensions":["pre"]},"application/vnd.lotus-notes":{"source":"iana","extensions":["nsf"]},"application/vnd.lotus-organizer":{"source":"iana","extensions":["org"]},"application/vnd.lotus-screencam":{"source":"iana","extensions":["scm"]},"application/vnd.lotus-wordpro":{"source":"iana","extensions":["lwp"]},"application/vnd.macports.portpkg":{"source":"iana","extensions":["portpkg"]},"application/vnd.mapbox-vector-tile":{"source":"iana","extensions":["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.conftoken+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.license+xml":{"source":"iana","compressible":true},"application/vnd.marlin.drm.mdcf":{"source":"iana"},"application/vnd.mason+json":{"source":"iana","compressible":true},"application/vnd.maxar.archive.3tz+zip":{"source":"iana","compressible":false},"application/vnd.maxmind.maxmind-db":{"source":"iana"},"application/vnd.mcd":{"source":"iana","extensions":["mcd"]},"application/vnd.medcalcdata":{"source":"iana","extensions":["mc1"]},"application/vnd.mediastation.cdkey":{"source":"iana","extensions":["cdkey"]},"application/vnd.meridian-slingshot":{"source":"iana"},"application/vnd.mfer":{"source":"iana","extensions":["mwf"]},"application/vnd.mfmp":{"source":"iana","extensions":["mfm"]},"application/vnd.micro+json":{"source":"iana","compressible":true},"application/vnd.micrografx.flo":{"source":"iana","extensions":["flo"]},"application/vnd.micrografx.igx":{"source":"iana","extensions":["igx"]},"application/vnd.microsoft.portable-executable":{"source":"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{"source":"iana"},"application/vnd.miele+json":{"source":"iana","compressible":true},"application/vnd.mif":{"source":"iana","extensions":["mif"]},"application/vnd.minisoft-hp3000-save":{"source":"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{"source":"iana"},"application/vnd.mobius.daf":{"source":"iana","extensions":["daf"]},"application/vnd.mobius.dis":{"source":"iana","extensions":["dis"]},"application/vnd.mobius.mbk":{"source":"iana","extensions":["mbk"]},"application/vnd.mobius.mqy":{"source":"iana","extensions":["mqy"]},"application/vnd.mobius.msl":{"source":"iana","extensions":["msl"]},"application/vnd.mobius.plc":{"source":"iana","extensions":["plc"]},"application/vnd.mobius.txf":{"source":"iana","extensions":["txf"]},"application/vnd.mophun.application":{"source":"iana","extensions":["mpn"]},"application/vnd.mophun.certificate":{"source":"iana","extensions":["mpc"]},"application/vnd.motorola.flexsuite":{"source":"iana"},"application/vnd.motorola.flexsuite.adsi":{"source":"iana"},"application/vnd.motorola.flexsuite.fis":{"source":"iana"},"application/vnd.motorola.flexsuite.gotap":{"source":"iana"},"application/vnd.motorola.flexsuite.kmr":{"source":"iana"},"application/vnd.motorola.flexsuite.ttc":{"source":"iana"},"application/vnd.motorola.flexsuite.wem":{"source":"iana"},"application/vnd.motorola.iprm":{"source":"iana"},"application/vnd.mozilla.xul+xml":{"source":"iana","compressible":true,"extensions":["xul"]},"application/vnd.ms-3mfdocument":{"source":"iana"},"application/vnd.ms-artgalry":{"source":"iana","extensions":["cil"]},"application/vnd.ms-asf":{"source":"iana"},"application/vnd.ms-cab-compressed":{"source":"iana","extensions":["cab"]},"application/vnd.ms-color.iccprofile":{"source":"apache"},"application/vnd.ms-excel":{"source":"iana","compressible":false,"extensions":["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{"source":"iana","extensions":["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{"source":"iana","extensions":["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{"source":"iana","extensions":["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{"source":"iana","extensions":["xltm"]},"application/vnd.ms-fontobject":{"source":"iana","compressible":true,"extensions":["eot"]},"application/vnd.ms-htmlhelp":{"source":"iana","extensions":["chm"]},"application/vnd.ms-ims":{"source":"iana","extensions":["ims"]},"application/vnd.ms-lrm":{"source":"iana","extensions":["lrm"]},"application/vnd.ms-office.activex+xml":{"source":"iana","compressible":true},"application/vnd.ms-officetheme":{"source":"iana","extensions":["thmx"]},"application/vnd.ms-opentype":{"source":"apache","compressible":true},"application/vnd.ms-outlook":{"compressible":false,"extensions":["msg"]},"application/vnd.ms-package.obfuscated-opentype":{"source":"apache"},"application/vnd.ms-pki.seccat":{"source":"apache","extensions":["cat"]},"application/vnd.ms-pki.stl":{"source":"apache","extensions":["stl"]},"application/vnd.ms-playready.initiator+xml":{"source":"iana","compressible":true},"application/vnd.ms-powerpoint":{"source":"iana","compressible":false,"extensions":["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{"source":"iana","extensions":["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{"source":"iana","extensions":["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{"source":"iana","extensions":["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{"source":"iana","extensions":["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{"source":"iana","extensions":["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{"source":"iana","compressible":true},"application/vnd.ms-printing.printticket+xml":{"source":"apache","compressible":true},"application/vnd.ms-printschematicket+xml":{"source":"iana","compressible":true},"application/vnd.ms-project":{"source":"iana","extensions":["mpp","mpt"]},"application/vnd.ms-tnef":{"source":"iana"},"application/vnd.ms-windows.devicepairing":{"source":"iana"},"application/vnd.ms-windows.nwprinting.oob":{"source":"iana"},"application/vnd.ms-windows.printerpairing":{"source":"iana"},"application/vnd.ms-windows.wsd.oob":{"source":"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.lic-resp":{"source":"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{"source":"iana"},"application/vnd.ms-wmdrm.meter-resp":{"source":"iana"},"application/vnd.ms-word.document.macroenabled.12":{"source":"iana","extensions":["docm"]},"application/vnd.ms-word.template.macroenabled.12":{"source":"iana","extensions":["dotm"]},"application/vnd.ms-works":{"source":"iana","extensions":["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{"source":"iana","extensions":["wpl"]},"application/vnd.ms-xpsdocument":{"source":"iana","compressible":false,"extensions":["xps"]},"application/vnd.msa-disk-image":{"source":"iana"},"application/vnd.mseq":{"source":"iana","extensions":["mseq"]},"application/vnd.msign":{"source":"iana"},"application/vnd.multiad.creator":{"source":"iana"},"application/vnd.multiad.creator.cif":{"source":"iana"},"application/vnd.music-niff":{"source":"iana"},"application/vnd.musician":{"source":"iana","extensions":["mus"]},"application/vnd.muvee.style":{"source":"iana","extensions":["msty"]},"application/vnd.mynfc":{"source":"iana","extensions":["taglet"]},"application/vnd.nacamar.ybrid+json":{"source":"iana","compressible":true},"application/vnd.ncd.control":{"source":"iana"},"application/vnd.ncd.reference":{"source":"iana"},"application/vnd.nearst.inv+json":{"source":"iana","compressible":true},"application/vnd.nebumind.line":{"source":"iana"},"application/vnd.nervana":{"source":"iana"},"application/vnd.netfpx":{"source":"iana"},"application/vnd.neurolanguage.nlu":{"source":"iana","extensions":["nlu"]},"application/vnd.nimn":{"source":"iana"},"application/vnd.nintendo.nitro.rom":{"source":"iana"},"application/vnd.nintendo.snes.rom":{"source":"iana"},"application/vnd.nitf":{"source":"iana","extensions":["ntf","nitf"]},"application/vnd.noblenet-directory":{"source":"iana","extensions":["nnd"]},"application/vnd.noblenet-sealer":{"source":"iana","extensions":["nns"]},"application/vnd.noblenet-web":{"source":"iana","extensions":["nnw"]},"application/vnd.nokia.catalogs":{"source":"iana"},"application/vnd.nokia.conml+wbxml":{"source":"iana"},"application/vnd.nokia.conml+xml":{"source":"iana","compressible":true},"application/vnd.nokia.iptv.config+xml":{"source":"iana","compressible":true},"application/vnd.nokia.isds-radio-presets":{"source":"iana"},"application/vnd.nokia.landmark+wbxml":{"source":"iana"},"application/vnd.nokia.landmark+xml":{"source":"iana","compressible":true},"application/vnd.nokia.landmarkcollection+xml":{"source":"iana","compressible":true},"application/vnd.nokia.n-gage.ac+xml":{"source":"iana","compressible":true,"extensions":["ac"]},"application/vnd.nokia.n-gage.data":{"source":"iana","extensions":["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{"source":"iana","extensions":["n-gage"]},"application/vnd.nokia.ncd":{"source":"iana"},"application/vnd.nokia.pcd+wbxml":{"source":"iana"},"application/vnd.nokia.pcd+xml":{"source":"iana","compressible":true},"application/vnd.nokia.radio-preset":{"source":"iana","extensions":["rpst"]},"application/vnd.nokia.radio-presets":{"source":"iana","extensions":["rpss"]},"application/vnd.novadigm.edm":{"source":"iana","extensions":["edm"]},"application/vnd.novadigm.edx":{"source":"iana","extensions":["edx"]},"application/vnd.novadigm.ext":{"source":"iana","extensions":["ext"]},"application/vnd.ntt-local.content-share":{"source":"iana"},"application/vnd.ntt-local.file-transfer":{"source":"iana"},"application/vnd.ntt-local.ogw_remote-access":{"source":"iana"},"application/vnd.ntt-local.sip-ta_remote":{"source":"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{"source":"iana"},"application/vnd.oasis.opendocument.chart":{"source":"iana","extensions":["odc"]},"application/vnd.oasis.opendocument.chart-template":{"source":"iana","extensions":["otc"]},"application/vnd.oasis.opendocument.database":{"source":"iana","extensions":["odb"]},"application/vnd.oasis.opendocument.formula":{"source":"iana","extensions":["odf"]},"application/vnd.oasis.opendocument.formula-template":{"source":"iana","extensions":["odft"]},"application/vnd.oasis.opendocument.graphics":{"source":"iana","compressible":false,"extensions":["odg"]},"application/vnd.oasis.opendocument.graphics-template":{"source":"iana","extensions":["otg"]},"application/vnd.oasis.opendocument.image":{"source":"iana","extensions":["odi"]},"application/vnd.oasis.opendocument.image-template":{"source":"iana","extensions":["oti"]},"application/vnd.oasis.opendocument.presentation":{"source":"iana","compressible":false,"extensions":["odp"]},"application/vnd.oasis.opendocument.presentation-template":{"source":"iana","extensions":["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{"source":"iana","compressible":false,"extensions":["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{"source":"iana","extensions":["ots"]},"application/vnd.oasis.opendocument.text":{"source":"iana","compressible":false,"extensions":["odt"]},"application/vnd.oasis.opendocument.text-master":{"source":"iana","extensions":["odm"]},"application/vnd.oasis.opendocument.text-template":{"source":"iana","extensions":["ott"]},"application/vnd.oasis.opendocument.text-web":{"source":"iana","extensions":["oth"]},"application/vnd.obn":{"source":"iana"},"application/vnd.ocf+cbor":{"source":"iana"},"application/vnd.oci.image.manifest.v1+json":{"source":"iana","compressible":true},"application/vnd.oftn.l10n+json":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessdownload+xml":{"source":"iana","compressible":true},"application/vnd.oipf.contentaccessstreaming+xml":{"source":"iana","compressible":true},"application/vnd.oipf.cspg-hexbinary":{"source":"iana"},"application/vnd.oipf.dae.svg+xml":{"source":"iana","compressible":true},"application/vnd.oipf.dae.xhtml+xml":{"source":"iana","compressible":true},"application/vnd.oipf.mippvcontrolmessage+xml":{"source":"iana","compressible":true},"application/vnd.oipf.pae.gem":{"source":"iana"},"application/vnd.oipf.spdiscovery+xml":{"source":"iana","compressible":true},"application/vnd.oipf.spdlist+xml":{"source":"iana","compressible":true},"application/vnd.oipf.ueprofile+xml":{"source":"iana","compressible":true},"application/vnd.oipf.userprofile+xml":{"source":"iana","compressible":true},"application/vnd.olpc-sugar":{"source":"iana","extensions":["xo"]},"application/vnd.oma-scws-config":{"source":"iana"},"application/vnd.oma-scws-http-request":{"source":"iana"},"application/vnd.oma-scws-http-response":{"source":"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.drm-trigger+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.imd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.ltkm":{"source":"iana"},"application/vnd.oma.bcast.notification+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.provisioningtrigger":{"source":"iana"},"application/vnd.oma.bcast.sgboot":{"source":"iana"},"application/vnd.oma.bcast.sgdd+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.sgdu":{"source":"iana"},"application/vnd.oma.bcast.simple-symbol-container":{"source":"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.sprov+xml":{"source":"iana","compressible":true},"application/vnd.oma.bcast.stkm":{"source":"iana"},"application/vnd.oma.cab-address-book+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-feature-handler+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-pcc+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-subs-invite+xml":{"source":"iana","compressible":true},"application/vnd.oma.cab-user-prefs+xml":{"source":"iana","compressible":true},"application/vnd.oma.dcd":{"source":"iana"},"application/vnd.oma.dcdc":{"source":"iana"},"application/vnd.oma.dd2+xml":{"source":"iana","compressible":true,"extensions":["dd2"]},"application/vnd.oma.drm.risd+xml":{"source":"iana","compressible":true},"application/vnd.oma.group-usage-list+xml":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+cbor":{"source":"iana"},"application/vnd.oma.lwm2m+json":{"source":"iana","compressible":true},"application/vnd.oma.lwm2m+tlv":{"source":"iana"},"application/vnd.oma.pal+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.detailed-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.final-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.groups+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.invocation-descriptor+xml":{"source":"iana","compressible":true},"application/vnd.oma.poc.optimized-progress-report+xml":{"source":"iana","compressible":true},"application/vnd.oma.push":{"source":"iana"},"application/vnd.oma.scidm.messages+xml":{"source":"iana","compressible":true},"application/vnd.oma.xcap-directory+xml":{"source":"iana","compressible":true},"application/vnd.omads-email+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omads-file+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omads-folder+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.omaloc-supl-init":{"source":"iana"},"application/vnd.onepager":{"source":"iana"},"application/vnd.onepagertamp":{"source":"iana"},"application/vnd.onepagertamx":{"source":"iana"},"application/vnd.onepagertat":{"source":"iana"},"application/vnd.onepagertatp":{"source":"iana"},"application/vnd.onepagertatx":{"source":"iana"},"application/vnd.openblox.game+xml":{"source":"iana","compressible":true,"extensions":["obgx"]},"application/vnd.openblox.game-binary":{"source":"iana"},"application/vnd.openeye.oeb":{"source":"iana"},"application/vnd.openofficeorg.extension":{"source":"apache","extensions":["oxt"]},"application/vnd.openstreetmap.data+xml":{"source":"iana","compressible":true,"extensions":["osm"]},"application/vnd.opentimestamps.ots":{"source":"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawing+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{"source":"iana","compressible":false,"extensions":["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slide":{"source":"iana","extensions":["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{"source":"iana","extensions":["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.template":{"source":"iana","extensions":["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"source":"iana","compressible":false,"extensions":["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{"source":"iana","extensions":["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.theme+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.vmldrawing":{"source":"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{"source":"iana","compressible":false,"extensions":["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{"source":"iana","extensions":["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.core-properties+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{"source":"iana","compressible":true},"application/vnd.openxmlformats-package.relationships+xml":{"source":"iana","compressible":true},"application/vnd.oracle.resource+json":{"source":"iana","compressible":true},"application/vnd.orange.indata":{"source":"iana"},"application/vnd.osa.netdeploy":{"source":"iana"},"application/vnd.osgeo.mapguide.package":{"source":"iana","extensions":["mgp"]},"application/vnd.osgi.bundle":{"source":"iana"},"application/vnd.osgi.dp":{"source":"iana","extensions":["dp"]},"application/vnd.osgi.subsystem":{"source":"iana","extensions":["esa"]},"application/vnd.otps.ct-kip+xml":{"source":"iana","compressible":true},"application/vnd.oxli.countgraph":{"source":"iana"},"application/vnd.pagerduty+json":{"source":"iana","compressible":true},"application/vnd.palm":{"source":"iana","extensions":["pdb","pqa","oprc"]},"application/vnd.panoply":{"source":"iana"},"application/vnd.paos.xml":{"source":"iana"},"application/vnd.patentdive":{"source":"iana"},"application/vnd.patientecommsdoc":{"source":"iana"},"application/vnd.pawaafile":{"source":"iana","extensions":["paw"]},"application/vnd.pcos":{"source":"iana"},"application/vnd.pg.format":{"source":"iana","extensions":["str"]},"application/vnd.pg.osasli":{"source":"iana","extensions":["ei6"]},"application/vnd.piaccess.application-licence":{"source":"iana"},"application/vnd.picsel":{"source":"iana","extensions":["efif"]},"application/vnd.pmi.widget":{"source":"iana","extensions":["wg"]},"application/vnd.poc.group-advertisement+xml":{"source":"iana","compressible":true},"application/vnd.pocketlearn":{"source":"iana","extensions":["plf"]},"application/vnd.powerbuilder6":{"source":"iana","extensions":["pbd"]},"application/vnd.powerbuilder6-s":{"source":"iana"},"application/vnd.powerbuilder7":{"source":"iana"},"application/vnd.powerbuilder7-s":{"source":"iana"},"application/vnd.powerbuilder75":{"source":"iana"},"application/vnd.powerbuilder75-s":{"source":"iana"},"application/vnd.preminet":{"source":"iana"},"application/vnd.previewsystems.box":{"source":"iana","extensions":["box"]},"application/vnd.proteus.magazine":{"source":"iana","extensions":["mgz"]},"application/vnd.psfs":{"source":"iana"},"application/vnd.publishare-delta-tree":{"source":"iana","extensions":["qps"]},"application/vnd.pvi.ptid1":{"source":"iana","extensions":["ptid"]},"application/vnd.pwg-multiplexed":{"source":"iana"},"application/vnd.pwg-xhtml-print+xml":{"source":"iana","compressible":true},"application/vnd.qualcomm.brew-app-res":{"source":"iana"},"application/vnd.quarantainenet":{"source":"iana"},"application/vnd.quark.quarkxpress":{"source":"iana","extensions":["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{"source":"iana"},"application/vnd.radisys.moml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-conn+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-audit-stream+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-conf+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-base+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-detect+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-group+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-speech+xml":{"source":"iana","compressible":true},"application/vnd.radisys.msml-dialog-transform+xml":{"source":"iana","compressible":true},"application/vnd.rainstor.data":{"source":"iana"},"application/vnd.rapid":{"source":"iana"},"application/vnd.rar":{"source":"iana","extensions":["rar"]},"application/vnd.realvnc.bed":{"source":"iana","extensions":["bed"]},"application/vnd.recordare.musicxml":{"source":"iana","extensions":["mxl"]},"application/vnd.recordare.musicxml+xml":{"source":"iana","compressible":true,"extensions":["musicxml"]},"application/vnd.renlearn.rlprint":{"source":"iana"},"application/vnd.resilient.logic":{"source":"iana"},"application/vnd.restful+json":{"source":"iana","compressible":true},"application/vnd.rig.cryptonote":{"source":"iana","extensions":["cryptonote"]},"application/vnd.rim.cod":{"source":"apache","extensions":["cod"]},"application/vnd.rn-realmedia":{"source":"apache","extensions":["rm"]},"application/vnd.rn-realmedia-vbr":{"source":"apache","extensions":["rmvb"]},"application/vnd.route66.link66+xml":{"source":"iana","compressible":true,"extensions":["link66"]},"application/vnd.rs-274x":{"source":"iana"},"application/vnd.ruckus.download":{"source":"iana"},"application/vnd.s3sms":{"source":"iana"},"application/vnd.sailingtracker.track":{"source":"iana","extensions":["st"]},"application/vnd.sar":{"source":"iana"},"application/vnd.sbm.cid":{"source":"iana"},"application/vnd.sbm.mid2":{"source":"iana"},"application/vnd.scribus":{"source":"iana"},"application/vnd.sealed.3df":{"source":"iana"},"application/vnd.sealed.csf":{"source":"iana"},"application/vnd.sealed.doc":{"source":"iana"},"application/vnd.sealed.eml":{"source":"iana"},"application/vnd.sealed.mht":{"source":"iana"},"application/vnd.sealed.net":{"source":"iana"},"application/vnd.sealed.ppt":{"source":"iana"},"application/vnd.sealed.tiff":{"source":"iana"},"application/vnd.sealed.xls":{"source":"iana"},"application/vnd.sealedmedia.softseal.html":{"source":"iana"},"application/vnd.sealedmedia.softseal.pdf":{"source":"iana"},"application/vnd.seemail":{"source":"iana","extensions":["see"]},"application/vnd.seis+json":{"source":"iana","compressible":true},"application/vnd.sema":{"source":"iana","extensions":["sema"]},"application/vnd.semd":{"source":"iana","extensions":["semd"]},"application/vnd.semf":{"source":"iana","extensions":["semf"]},"application/vnd.shade-save-file":{"source":"iana"},"application/vnd.shana.informed.formdata":{"source":"iana","extensions":["ifm"]},"application/vnd.shana.informed.formtemplate":{"source":"iana","extensions":["itp"]},"application/vnd.shana.informed.interchange":{"source":"iana","extensions":["iif"]},"application/vnd.shana.informed.package":{"source":"iana","extensions":["ipk"]},"application/vnd.shootproof+json":{"source":"iana","compressible":true},"application/vnd.shopkick+json":{"source":"iana","compressible":true},"application/vnd.shp":{"source":"iana"},"application/vnd.shx":{"source":"iana"},"application/vnd.sigrok.session":{"source":"iana"},"application/vnd.simtech-mindmapper":{"source":"iana","extensions":["twd","twds"]},"application/vnd.siren+json":{"source":"iana","compressible":true},"application/vnd.smaf":{"source":"iana","extensions":["mmf"]},"application/vnd.smart.notebook":{"source":"iana"},"application/vnd.smart.teacher":{"source":"iana","extensions":["teacher"]},"application/vnd.snesdev-page-table":{"source":"iana"},"application/vnd.software602.filler.form+xml":{"source":"iana","compressible":true,"extensions":["fo"]},"application/vnd.software602.filler.form-xml-zip":{"source":"iana"},"application/vnd.solent.sdkm+xml":{"source":"iana","compressible":true,"extensions":["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{"source":"iana","extensions":["dxp"]},"application/vnd.spotfire.sfs":{"source":"iana","extensions":["sfs"]},"application/vnd.sqlite3":{"source":"iana"},"application/vnd.sss-cod":{"source":"iana"},"application/vnd.sss-dtf":{"source":"iana"},"application/vnd.sss-ntf":{"source":"iana"},"application/vnd.stardivision.calc":{"source":"apache","extensions":["sdc"]},"application/vnd.stardivision.draw":{"source":"apache","extensions":["sda"]},"application/vnd.stardivision.impress":{"source":"apache","extensions":["sdd"]},"application/vnd.stardivision.math":{"source":"apache","extensions":["smf"]},"application/vnd.stardivision.writer":{"source":"apache","extensions":["sdw","vor"]},"application/vnd.stardivision.writer-global":{"source":"apache","extensions":["sgl"]},"application/vnd.stepmania.package":{"source":"iana","extensions":["smzip"]},"application/vnd.stepmania.stepchart":{"source":"iana","extensions":["sm"]},"application/vnd.street-stream":{"source":"iana"},"application/vnd.sun.wadl+xml":{"source":"iana","compressible":true,"extensions":["wadl"]},"application/vnd.sun.xml.calc":{"source":"apache","extensions":["sxc"]},"application/vnd.sun.xml.calc.template":{"source":"apache","extensions":["stc"]},"application/vnd.sun.xml.draw":{"source":"apache","extensions":["sxd"]},"application/vnd.sun.xml.draw.template":{"source":"apache","extensions":["std"]},"application/vnd.sun.xml.impress":{"source":"apache","extensions":["sxi"]},"application/vnd.sun.xml.impress.template":{"source":"apache","extensions":["sti"]},"application/vnd.sun.xml.math":{"source":"apache","extensions":["sxm"]},"application/vnd.sun.xml.writer":{"source":"apache","extensions":["sxw"]},"application/vnd.sun.xml.writer.global":{"source":"apache","extensions":["sxg"]},"application/vnd.sun.xml.writer.template":{"source":"apache","extensions":["stw"]},"application/vnd.sus-calendar":{"source":"iana","extensions":["sus","susp"]},"application/vnd.svd":{"source":"iana","extensions":["svd"]},"application/vnd.swiftview-ics":{"source":"iana"},"application/vnd.sycle+xml":{"source":"iana","compressible":true},"application/vnd.syft+json":{"source":"iana","compressible":true},"application/vnd.symbian.install":{"source":"apache","extensions":["sis","sisx"]},"application/vnd.syncml+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["xsm"]},"application/vnd.syncml.dm+wbxml":{"source":"iana","charset":"UTF-8","extensions":["bdm"]},"application/vnd.syncml.dm+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["xdm"]},"application/vnd.syncml.dm.notification":{"source":"iana"},"application/vnd.syncml.dmddf+wbxml":{"source":"iana"},"application/vnd.syncml.dmddf+xml":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{"source":"iana"},"application/vnd.syncml.dmtnds+xml":{"source":"iana","charset":"UTF-8","compressible":true},"application/vnd.syncml.ds.notification":{"source":"iana"},"application/vnd.tableschema+json":{"source":"iana","compressible":true},"application/vnd.tao.intent-module-archive":{"source":"iana","extensions":["tao"]},"application/vnd.tcpdump.pcap":{"source":"iana","extensions":["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{"source":"iana","compressible":true},"application/vnd.tmd.mediaflex.api+xml":{"source":"iana","compressible":true},"application/vnd.tml":{"source":"iana"},"application/vnd.tmobile-livetv":{"source":"iana","extensions":["tmo"]},"application/vnd.tri.onesource":{"source":"iana"},"application/vnd.trid.tpt":{"source":"iana","extensions":["tpt"]},"application/vnd.triscape.mxs":{"source":"iana","extensions":["mxs"]},"application/vnd.trueapp":{"source":"iana","extensions":["tra"]},"application/vnd.truedoc":{"source":"iana"},"application/vnd.ubisoft.webplayer":{"source":"iana"},"application/vnd.ufdl":{"source":"iana","extensions":["ufd","ufdl"]},"application/vnd.uiq.theme":{"source":"iana","extensions":["utz"]},"application/vnd.umajin":{"source":"iana","extensions":["umj"]},"application/vnd.unity":{"source":"iana","extensions":["unityweb"]},"application/vnd.uoml+xml":{"source":"iana","compressible":true,"extensions":["uoml"]},"application/vnd.uplanet.alert":{"source":"iana"},"application/vnd.uplanet.alert-wbxml":{"source":"iana"},"application/vnd.uplanet.bearer-choice":{"source":"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{"source":"iana"},"application/vnd.uplanet.cacheop":{"source":"iana"},"application/vnd.uplanet.cacheop-wbxml":{"source":"iana"},"application/vnd.uplanet.channel":{"source":"iana"},"application/vnd.uplanet.channel-wbxml":{"source":"iana"},"application/vnd.uplanet.list":{"source":"iana"},"application/vnd.uplanet.list-wbxml":{"source":"iana"},"application/vnd.uplanet.listcmd":{"source":"iana"},"application/vnd.uplanet.listcmd-wbxml":{"source":"iana"},"application/vnd.uplanet.signal":{"source":"iana"},"application/vnd.uri-map":{"source":"iana"},"application/vnd.valve.source.material":{"source":"iana"},"application/vnd.vcx":{"source":"iana","extensions":["vcx"]},"application/vnd.vd-study":{"source":"iana"},"application/vnd.vectorworks":{"source":"iana"},"application/vnd.vel+json":{"source":"iana","compressible":true},"application/vnd.verimatrix.vcas":{"source":"iana"},"application/vnd.veritone.aion+json":{"source":"iana","compressible":true},"application/vnd.veryant.thin":{"source":"iana"},"application/vnd.ves.encrypted":{"source":"iana"},"application/vnd.vidsoft.vidconference":{"source":"iana"},"application/vnd.visio":{"source":"iana","extensions":["vsd","vst","vss","vsw"]},"application/vnd.visionary":{"source":"iana","extensions":["vis"]},"application/vnd.vividence.scriptfile":{"source":"iana"},"application/vnd.vsf":{"source":"iana","extensions":["vsf"]},"application/vnd.wap.sic":{"source":"iana"},"application/vnd.wap.slc":{"source":"iana"},"application/vnd.wap.wbxml":{"source":"iana","charset":"UTF-8","extensions":["wbxml"]},"application/vnd.wap.wmlc":{"source":"iana","extensions":["wmlc"]},"application/vnd.wap.wmlscriptc":{"source":"iana","extensions":["wmlsc"]},"application/vnd.webturbo":{"source":"iana","extensions":["wtb"]},"application/vnd.wfa.dpp":{"source":"iana"},"application/vnd.wfa.p2p":{"source":"iana"},"application/vnd.wfa.wsc":{"source":"iana"},"application/vnd.windows.devicepairing":{"source":"iana"},"application/vnd.wmc":{"source":"iana"},"application/vnd.wmf.bootstrap":{"source":"iana"},"application/vnd.wolfram.mathematica":{"source":"iana"},"application/vnd.wolfram.mathematica.package":{"source":"iana"},"application/vnd.wolfram.player":{"source":"iana","extensions":["nbp"]},"application/vnd.wordperfect":{"source":"iana","extensions":["wpd"]},"application/vnd.wqd":{"source":"iana","extensions":["wqd"]},"application/vnd.wrq-hp3000-labelled":{"source":"iana"},"application/vnd.wt.stf":{"source":"iana","extensions":["stf"]},"application/vnd.wv.csp+wbxml":{"source":"iana"},"application/vnd.wv.csp+xml":{"source":"iana","compressible":true},"application/vnd.wv.ssp+xml":{"source":"iana","compressible":true},"application/vnd.xacml+json":{"source":"iana","compressible":true},"application/vnd.xara":{"source":"iana","extensions":["xar"]},"application/vnd.xfdl":{"source":"iana","extensions":["xfdl"]},"application/vnd.xfdl.webform":{"source":"iana"},"application/vnd.xmi+xml":{"source":"iana","compressible":true},"application/vnd.xmpie.cpkg":{"source":"iana"},"application/vnd.xmpie.dpkg":{"source":"iana"},"application/vnd.xmpie.plan":{"source":"iana"},"application/vnd.xmpie.ppkg":{"source":"iana"},"application/vnd.xmpie.xlim":{"source":"iana"},"application/vnd.yamaha.hv-dic":{"source":"iana","extensions":["hvd"]},"application/vnd.yamaha.hv-script":{"source":"iana","extensions":["hvs"]},"application/vnd.yamaha.hv-voice":{"source":"iana","extensions":["hvp"]},"application/vnd.yamaha.openscoreformat":{"source":"iana","extensions":["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{"source":"iana","compressible":true,"extensions":["osfpvg"]},"application/vnd.yamaha.remote-setup":{"source":"iana"},"application/vnd.yamaha.smaf-audio":{"source":"iana","extensions":["saf"]},"application/vnd.yamaha.smaf-phrase":{"source":"iana","extensions":["spf"]},"application/vnd.yamaha.through-ngn":{"source":"iana"},"application/vnd.yamaha.tunnel-udpencap":{"source":"iana"},"application/vnd.yaoweme":{"source":"iana"},"application/vnd.yellowriver-custom-menu":{"source":"iana","extensions":["cmp"]},"application/vnd.youtube.yt":{"source":"iana"},"application/vnd.zul":{"source":"iana","extensions":["zir","zirz"]},"application/vnd.zzazz.deck+xml":{"source":"iana","compressible":true,"extensions":["zaz"]},"application/voicexml+xml":{"source":"iana","compressible":true,"extensions":["vxml"]},"application/voucher-cms+json":{"source":"iana","compressible":true},"application/vq-rtcpxr":{"source":"iana"},"application/wasm":{"source":"iana","compressible":true,"extensions":["wasm"]},"application/watcherinfo+xml":{"source":"iana","compressible":true,"extensions":["wif"]},"application/webpush-options+json":{"source":"iana","compressible":true},"application/whoispp-query":{"source":"iana"},"application/whoispp-response":{"source":"iana"},"application/widget":{"source":"iana","extensions":["wgt"]},"application/winhlp":{"source":"apache","extensions":["hlp"]},"application/wita":{"source":"iana"},"application/wordperfect5.1":{"source":"iana"},"application/wsdl+xml":{"source":"iana","compressible":true,"extensions":["wsdl"]},"application/wspolicy+xml":{"source":"iana","compressible":true,"extensions":["wspolicy"]},"application/x-7z-compressed":{"source":"apache","compressible":false,"extensions":["7z"]},"application/x-abiword":{"source":"apache","extensions":["abw"]},"application/x-ace-compressed":{"source":"apache","extensions":["ace"]},"application/x-amf":{"source":"apache"},"application/x-apple-diskimage":{"source":"apache","extensions":["dmg"]},"application/x-arj":{"compressible":false,"extensions":["arj"]},"application/x-authorware-bin":{"source":"apache","extensions":["aab","x32","u32","vox"]},"application/x-authorware-map":{"source":"apache","extensions":["aam"]},"application/x-authorware-seg":{"source":"apache","extensions":["aas"]},"application/x-bcpio":{"source":"apache","extensions":["bcpio"]},"application/x-bdoc":{"compressible":false,"extensions":["bdoc"]},"application/x-bittorrent":{"source":"apache","extensions":["torrent"]},"application/x-blorb":{"source":"apache","extensions":["blb","blorb"]},"application/x-bzip":{"source":"apache","compressible":false,"extensions":["bz"]},"application/x-bzip2":{"source":"apache","compressible":false,"extensions":["bz2","boz"]},"application/x-cbr":{"source":"apache","extensions":["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{"source":"apache","extensions":["vcd"]},"application/x-cfs-compressed":{"source":"apache","extensions":["cfs"]},"application/x-chat":{"source":"apache","extensions":["chat"]},"application/x-chess-pgn":{"source":"apache","extensions":["pgn"]},"application/x-chrome-extension":{"extensions":["crx"]},"application/x-cocoa":{"source":"nginx","extensions":["cco"]},"application/x-compress":{"source":"apache"},"application/x-conference":{"source":"apache","extensions":["nsc"]},"application/x-cpio":{"source":"apache","extensions":["cpio"]},"application/x-csh":{"source":"apache","extensions":["csh"]},"application/x-deb":{"compressible":false},"application/x-debian-package":{"source":"apache","extensions":["deb","udeb"]},"application/x-dgc-compressed":{"source":"apache","extensions":["dgc"]},"application/x-director":{"source":"apache","extensions":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{"source":"apache","extensions":["wad"]},"application/x-dtbncx+xml":{"source":"apache","compressible":true,"extensions":["ncx"]},"application/x-dtbook+xml":{"source":"apache","compressible":true,"extensions":["dtb"]},"application/x-dtbresource+xml":{"source":"apache","compressible":true,"extensions":["res"]},"application/x-dvi":{"source":"apache","compressible":false,"extensions":["dvi"]},"application/x-envoy":{"source":"apache","extensions":["evy"]},"application/x-eva":{"source":"apache","extensions":["eva"]},"application/x-font-bdf":{"source":"apache","extensions":["bdf"]},"application/x-font-dos":{"source":"apache"},"application/x-font-framemaker":{"source":"apache"},"application/x-font-ghostscript":{"source":"apache","extensions":["gsf"]},"application/x-font-libgrx":{"source":"apache"},"application/x-font-linux-psf":{"source":"apache","extensions":["psf"]},"application/x-font-pcf":{"source":"apache","extensions":["pcf"]},"application/x-font-snf":{"source":"apache","extensions":["snf"]},"application/x-font-speedo":{"source":"apache"},"application/x-font-sunos-news":{"source":"apache"},"application/x-font-type1":{"source":"apache","extensions":["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{"source":"apache"},"application/x-freearc":{"source":"apache","extensions":["arc"]},"application/x-futuresplash":{"source":"apache","extensions":["spl"]},"application/x-gca-compressed":{"source":"apache","extensions":["gca"]},"application/x-glulx":{"source":"apache","extensions":["ulx"]},"application/x-gnumeric":{"source":"apache","extensions":["gnumeric"]},"application/x-gramps-xml":{"source":"apache","extensions":["gramps"]},"application/x-gtar":{"source":"apache","extensions":["gtar"]},"application/x-gzip":{"source":"apache"},"application/x-hdf":{"source":"apache","extensions":["hdf"]},"application/x-httpd-php":{"compressible":true,"extensions":["php"]},"application/x-install-instructions":{"source":"apache","extensions":["install"]},"application/x-iso9660-image":{"source":"apache","extensions":["iso"]},"application/x-iwork-keynote-sffkey":{"extensions":["key"]},"application/x-iwork-numbers-sffnumbers":{"extensions":["numbers"]},"application/x-iwork-pages-sffpages":{"extensions":["pages"]},"application/x-java-archive-diff":{"source":"nginx","extensions":["jardiff"]},"application/x-java-jnlp-file":{"source":"apache","compressible":false,"extensions":["jnlp"]},"application/x-javascript":{"compressible":true},"application/x-keepass2":{"extensions":["kdbx"]},"application/x-latex":{"source":"apache","compressible":false,"extensions":["latex"]},"application/x-lua-bytecode":{"extensions":["luac"]},"application/x-lzh-compressed":{"source":"apache","extensions":["lzh","lha"]},"application/x-makeself":{"source":"nginx","extensions":["run"]},"application/x-mie":{"source":"apache","extensions":["mie"]},"application/x-mobipocket-ebook":{"source":"apache","extensions":["prc","mobi"]},"application/x-mpegurl":{"compressible":false},"application/x-ms-application":{"source":"apache","extensions":["application"]},"application/x-ms-shortcut":{"source":"apache","extensions":["lnk"]},"application/x-ms-wmd":{"source":"apache","extensions":["wmd"]},"application/x-ms-wmz":{"source":"apache","extensions":["wmz"]},"application/x-ms-xbap":{"source":"apache","extensions":["xbap"]},"application/x-msaccess":{"source":"apache","extensions":["mdb"]},"application/x-msbinder":{"source":"apache","extensions":["obd"]},"application/x-mscardfile":{"source":"apache","extensions":["crd"]},"application/x-msclip":{"source":"apache","extensions":["clp"]},"application/x-msdos-program":{"extensions":["exe"]},"application/x-msdownload":{"source":"apache","extensions":["exe","dll","com","bat","msi"]},"application/x-msmediaview":{"source":"apache","extensions":["mvb","m13","m14"]},"application/x-msmetafile":{"source":"apache","extensions":["wmf","wmz","emf","emz"]},"application/x-msmoney":{"source":"apache","extensions":["mny"]},"application/x-mspublisher":{"source":"apache","extensions":["pub"]},"application/x-msschedule":{"source":"apache","extensions":["scd"]},"application/x-msterminal":{"source":"apache","extensions":["trm"]},"application/x-mswrite":{"source":"apache","extensions":["wri"]},"application/x-netcdf":{"source":"apache","extensions":["nc","cdf"]},"application/x-ns-proxy-autoconfig":{"compressible":true,"extensions":["pac"]},"application/x-nzb":{"source":"apache","extensions":["nzb"]},"application/x-perl":{"source":"nginx","extensions":["pl","pm"]},"application/x-pilot":{"source":"nginx","extensions":["prc","pdb"]},"application/x-pkcs12":{"source":"apache","compressible":false,"extensions":["p12","pfx"]},"application/x-pkcs7-certificates":{"source":"apache","extensions":["p7b","spc"]},"application/x-pkcs7-certreqresp":{"source":"apache","extensions":["p7r"]},"application/x-pki-message":{"source":"iana"},"application/x-rar-compressed":{"source":"apache","compressible":false,"extensions":["rar"]},"application/x-redhat-package-manager":{"source":"nginx","extensions":["rpm"]},"application/x-research-info-systems":{"source":"apache","extensions":["ris"]},"application/x-sea":{"source":"nginx","extensions":["sea"]},"application/x-sh":{"source":"apache","compressible":true,"extensions":["sh"]},"application/x-shar":{"source":"apache","extensions":["shar"]},"application/x-shockwave-flash":{"source":"apache","compressible":false,"extensions":["swf"]},"application/x-silverlight-app":{"source":"apache","extensions":["xap"]},"application/x-sql":{"source":"apache","extensions":["sql"]},"application/x-stuffit":{"source":"apache","compressible":false,"extensions":["sit"]},"application/x-stuffitx":{"source":"apache","extensions":["sitx"]},"application/x-subrip":{"source":"apache","extensions":["srt"]},"application/x-sv4cpio":{"source":"apache","extensions":["sv4cpio"]},"application/x-sv4crc":{"source":"apache","extensions":["sv4crc"]},"application/x-t3vm-image":{"source":"apache","extensions":["t3"]},"application/x-tads":{"source":"apache","extensions":["gam"]},"application/x-tar":{"source":"apache","compressible":true,"extensions":["tar"]},"application/x-tcl":{"source":"apache","extensions":["tcl","tk"]},"application/x-tex":{"source":"apache","extensions":["tex"]},"application/x-tex-tfm":{"source":"apache","extensions":["tfm"]},"application/x-texinfo":{"source":"apache","extensions":["texinfo","texi"]},"application/x-tgif":{"source":"apache","extensions":["obj"]},"application/x-ustar":{"source":"apache","extensions":["ustar"]},"application/x-virtualbox-hdd":{"compressible":true,"extensions":["hdd"]},"application/x-virtualbox-ova":{"compressible":true,"extensions":["ova"]},"application/x-virtualbox-ovf":{"compressible":true,"extensions":["ovf"]},"application/x-virtualbox-vbox":{"compressible":true,"extensions":["vbox"]},"application/x-virtualbox-vbox-extpack":{"compressible":false,"extensions":["vbox-extpack"]},"application/x-virtualbox-vdi":{"compressible":true,"extensions":["vdi"]},"application/x-virtualbox-vhd":{"compressible":true,"extensions":["vhd"]},"application/x-virtualbox-vmdk":{"compressible":true,"extensions":["vmdk"]},"application/x-wais-source":{"source":"apache","extensions":["src"]},"application/x-web-app-manifest+json":{"compressible":true,"extensions":["webapp"]},"application/x-www-form-urlencoded":{"source":"iana","compressible":true},"application/x-x509-ca-cert":{"source":"iana","extensions":["der","crt","pem"]},"application/x-x509-ca-ra-cert":{"source":"iana"},"application/x-x509-next-ca-cert":{"source":"iana"},"application/x-xfig":{"source":"apache","extensions":["fig"]},"application/x-xliff+xml":{"source":"apache","compressible":true,"extensions":["xlf"]},"application/x-xpinstall":{"source":"apache","compressible":false,"extensions":["xpi"]},"application/x-xz":{"source":"apache","extensions":["xz"]},"application/x-zmachine":{"source":"apache","extensions":["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{"source":"iana"},"application/xacml+xml":{"source":"iana","compressible":true},"application/xaml+xml":{"source":"apache","compressible":true,"extensions":["xaml"]},"application/xcap-att+xml":{"source":"iana","compressible":true,"extensions":["xav"]},"application/xcap-caps+xml":{"source":"iana","compressible":true,"extensions":["xca"]},"application/xcap-diff+xml":{"source":"iana","compressible":true,"extensions":["xdf"]},"application/xcap-el+xml":{"source":"iana","compressible":true,"extensions":["xel"]},"application/xcap-error+xml":{"source":"iana","compressible":true},"application/xcap-ns+xml":{"source":"iana","compressible":true,"extensions":["xns"]},"application/xcon-conference-info+xml":{"source":"iana","compressible":true},"application/xcon-conference-info-diff+xml":{"source":"iana","compressible":true},"application/xenc+xml":{"source":"iana","compressible":true,"extensions":["xenc"]},"application/xhtml+xml":{"source":"iana","compressible":true,"extensions":["xhtml","xht"]},"application/xhtml-voice+xml":{"source":"apache","compressible":true},"application/xliff+xml":{"source":"iana","compressible":true,"extensions":["xlf"]},"application/xml":{"source":"iana","compressible":true,"extensions":["xml","xsl","xsd","rng"]},"application/xml-dtd":{"source":"iana","compressible":true,"extensions":["dtd"]},"application/xml-external-parsed-entity":{"source":"iana"},"application/xml-patch+xml":{"source":"iana","compressible":true},"application/xmpp+xml":{"source":"iana","compressible":true},"application/xop+xml":{"source":"iana","compressible":true,"extensions":["xop"]},"application/xproc+xml":{"source":"apache","compressible":true,"extensions":["xpl"]},"application/xslt+xml":{"source":"iana","compressible":true,"extensions":["xsl","xslt"]},"application/xspf+xml":{"source":"apache","compressible":true,"extensions":["xspf"]},"application/xv+xml":{"source":"iana","compressible":true,"extensions":["mxml","xhvml","xvml","xvm"]},"application/yang":{"source":"iana","extensions":["yang"]},"application/yang-data+json":{"source":"iana","compressible":true},"application/yang-data+xml":{"source":"iana","compressible":true},"application/yang-patch+json":{"source":"iana","compressible":true},"application/yang-patch+xml":{"source":"iana","compressible":true},"application/yin+xml":{"source":"iana","compressible":true,"extensions":["yin"]},"application/zip":{"source":"iana","compressible":false,"extensions":["zip"]},"application/zlib":{"source":"iana"},"application/zstd":{"source":"iana"},"audio/1d-interleaved-parityfec":{"source":"iana"},"audio/32kadpcm":{"source":"iana"},"audio/3gpp":{"source":"iana","compressible":false,"extensions":["3gpp"]},"audio/3gpp2":{"source":"iana"},"audio/aac":{"source":"iana"},"audio/ac3":{"source":"iana"},"audio/adpcm":{"source":"apache","extensions":["adp"]},"audio/amr":{"source":"iana","extensions":["amr"]},"audio/amr-wb":{"source":"iana"},"audio/amr-wb+":{"source":"iana"},"audio/aptx":{"source":"iana"},"audio/asc":{"source":"iana"},"audio/atrac-advanced-lossless":{"source":"iana"},"audio/atrac-x":{"source":"iana"},"audio/atrac3":{"source":"iana"},"audio/basic":{"source":"iana","compressible":false,"extensions":["au","snd"]},"audio/bv16":{"source":"iana"},"audio/bv32":{"source":"iana"},"audio/clearmode":{"source":"iana"},"audio/cn":{"source":"iana"},"audio/dat12":{"source":"iana"},"audio/dls":{"source":"iana"},"audio/dsr-es201108":{"source":"iana"},"audio/dsr-es202050":{"source":"iana"},"audio/dsr-es202211":{"source":"iana"},"audio/dsr-es202212":{"source":"iana"},"audio/dv":{"source":"iana"},"audio/dvi4":{"source":"iana"},"audio/eac3":{"source":"iana"},"audio/encaprtp":{"source":"iana"},"audio/evrc":{"source":"iana"},"audio/evrc-qcp":{"source":"iana"},"audio/evrc0":{"source":"iana"},"audio/evrc1":{"source":"iana"},"audio/evrcb":{"source":"iana"},"audio/evrcb0":{"source":"iana"},"audio/evrcb1":{"source":"iana"},"audio/evrcnw":{"source":"iana"},"audio/evrcnw0":{"source":"iana"},"audio/evrcnw1":{"source":"iana"},"audio/evrcwb":{"source":"iana"},"audio/evrcwb0":{"source":"iana"},"audio/evrcwb1":{"source":"iana"},"audio/evs":{"source":"iana"},"audio/flexfec":{"source":"iana"},"audio/fwdred":{"source":"iana"},"audio/g711-0":{"source":"iana"},"audio/g719":{"source":"iana"},"audio/g722":{"source":"iana"},"audio/g7221":{"source":"iana"},"audio/g723":{"source":"iana"},"audio/g726-16":{"source":"iana"},"audio/g726-24":{"source":"iana"},"audio/g726-32":{"source":"iana"},"audio/g726-40":{"source":"iana"},"audio/g728":{"source":"iana"},"audio/g729":{"source":"iana"},"audio/g7291":{"source":"iana"},"audio/g729d":{"source":"iana"},"audio/g729e":{"source":"iana"},"audio/gsm":{"source":"iana"},"audio/gsm-efr":{"source":"iana"},"audio/gsm-hr-08":{"source":"iana"},"audio/ilbc":{"source":"iana"},"audio/ip-mr_v2.5":{"source":"iana"},"audio/isac":{"source":"apache"},"audio/l16":{"source":"iana"},"audio/l20":{"source":"iana"},"audio/l24":{"source":"iana","compressible":false},"audio/l8":{"source":"iana"},"audio/lpc":{"source":"iana"},"audio/melp":{"source":"iana"},"audio/melp1200":{"source":"iana"},"audio/melp2400":{"source":"iana"},"audio/melp600":{"source":"iana"},"audio/mhas":{"source":"iana"},"audio/midi":{"source":"apache","extensions":["mid","midi","kar","rmi"]},"audio/mobile-xmf":{"source":"iana","extensions":["mxmf"]},"audio/mp3":{"compressible":false,"extensions":["mp3"]},"audio/mp4":{"source":"iana","compressible":false,"extensions":["m4a","mp4a"]},"audio/mp4a-latm":{"source":"iana"},"audio/mpa":{"source":"iana"},"audio/mpa-robust":{"source":"iana"},"audio/mpeg":{"source":"iana","compressible":false,"extensions":["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{"source":"iana"},"audio/musepack":{"source":"apache"},"audio/ogg":{"source":"iana","compressible":false,"extensions":["oga","ogg","spx","opus"]},"audio/opus":{"source":"iana"},"audio/parityfec":{"source":"iana"},"audio/pcma":{"source":"iana"},"audio/pcma-wb":{"source":"iana"},"audio/pcmu":{"source":"iana"},"audio/pcmu-wb":{"source":"iana"},"audio/prs.sid":{"source":"iana"},"audio/qcelp":{"source":"iana"},"audio/raptorfec":{"source":"iana"},"audio/red":{"source":"iana"},"audio/rtp-enc-aescm128":{"source":"iana"},"audio/rtp-midi":{"source":"iana"},"audio/rtploopback":{"source":"iana"},"audio/rtx":{"source":"iana"},"audio/s3m":{"source":"apache","extensions":["s3m"]},"audio/scip":{"source":"iana"},"audio/silk":{"source":"apache","extensions":["sil"]},"audio/smv":{"source":"iana"},"audio/smv-qcp":{"source":"iana"},"audio/smv0":{"source":"iana"},"audio/sofa":{"source":"iana"},"audio/sp-midi":{"source":"iana"},"audio/speex":{"source":"iana"},"audio/t140c":{"source":"iana"},"audio/t38":{"source":"iana"},"audio/telephone-event":{"source":"iana"},"audio/tetra_acelp":{"source":"iana"},"audio/tetra_acelp_bb":{"source":"iana"},"audio/tone":{"source":"iana"},"audio/tsvcis":{"source":"iana"},"audio/uemclip":{"source":"iana"},"audio/ulpfec":{"source":"iana"},"audio/usac":{"source":"iana"},"audio/vdvi":{"source":"iana"},"audio/vmr-wb":{"source":"iana"},"audio/vnd.3gpp.iufp":{"source":"iana"},"audio/vnd.4sb":{"source":"iana"},"audio/vnd.audiokoz":{"source":"iana"},"audio/vnd.celp":{"source":"iana"},"audio/vnd.cisco.nse":{"source":"iana"},"audio/vnd.cmles.radio-events":{"source":"iana"},"audio/vnd.cns.anp1":{"source":"iana"},"audio/vnd.cns.inf1":{"source":"iana"},"audio/vnd.dece.audio":{"source":"iana","extensions":["uva","uvva"]},"audio/vnd.digital-winds":{"source":"iana","extensions":["eol"]},"audio/vnd.dlna.adts":{"source":"iana"},"audio/vnd.dolby.heaac.1":{"source":"iana"},"audio/vnd.dolby.heaac.2":{"source":"iana"},"audio/vnd.dolby.mlp":{"source":"iana"},"audio/vnd.dolby.mps":{"source":"iana"},"audio/vnd.dolby.pl2":{"source":"iana"},"audio/vnd.dolby.pl2x":{"source":"iana"},"audio/vnd.dolby.pl2z":{"source":"iana"},"audio/vnd.dolby.pulse.1":{"source":"iana"},"audio/vnd.dra":{"source":"iana","extensions":["dra"]},"audio/vnd.dts":{"source":"iana","extensions":["dts"]},"audio/vnd.dts.hd":{"source":"iana","extensions":["dtshd"]},"audio/vnd.dts.uhd":{"source":"iana"},"audio/vnd.dvb.file":{"source":"iana"},"audio/vnd.everad.plj":{"source":"iana"},"audio/vnd.hns.audio":{"source":"iana"},"audio/vnd.lucent.voice":{"source":"iana","extensions":["lvp"]},"audio/vnd.ms-playready.media.pya":{"source":"iana","extensions":["pya"]},"audio/vnd.nokia.mobile-xmf":{"source":"iana"},"audio/vnd.nortel.vbk":{"source":"iana"},"audio/vnd.nuera.ecelp4800":{"source":"iana","extensions":["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{"source":"iana","extensions":["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{"source":"iana","extensions":["ecelp9600"]},"audio/vnd.octel.sbc":{"source":"iana"},"audio/vnd.presonus.multitrack":{"source":"iana"},"audio/vnd.qcelp":{"source":"iana"},"audio/vnd.rhetorex.32kadpcm":{"source":"iana"},"audio/vnd.rip":{"source":"iana","extensions":["rip"]},"audio/vnd.rn-realaudio":{"compressible":false},"audio/vnd.sealedmedia.softseal.mpeg":{"source":"iana"},"audio/vnd.vmx.cvsd":{"source":"iana"},"audio/vnd.wave":{"compressible":false},"audio/vorbis":{"source":"iana","compressible":false},"audio/vorbis-config":{"source":"iana"},"audio/wav":{"compressible":false,"extensions":["wav"]},"audio/wave":{"compressible":false,"extensions":["wav"]},"audio/webm":{"source":"apache","compressible":false,"extensions":["weba"]},"audio/x-aac":{"source":"apache","compressible":false,"extensions":["aac"]},"audio/x-aiff":{"source":"apache","extensions":["aif","aiff","aifc"]},"audio/x-caf":{"source":"apache","compressible":false,"extensions":["caf"]},"audio/x-flac":{"source":"apache","extensions":["flac"]},"audio/x-m4a":{"source":"nginx","extensions":["m4a"]},"audio/x-matroska":{"source":"apache","extensions":["mka"]},"audio/x-mpegurl":{"source":"apache","extensions":["m3u"]},"audio/x-ms-wax":{"source":"apache","extensions":["wax"]},"audio/x-ms-wma":{"source":"apache","extensions":["wma"]},"audio/x-pn-realaudio":{"source":"apache","extensions":["ram","ra"]},"audio/x-pn-realaudio-plugin":{"source":"apache","extensions":["rmp"]},"audio/x-realaudio":{"source":"nginx","extensions":["ra"]},"audio/x-tta":{"source":"apache"},"audio/x-wav":{"source":"apache","extensions":["wav"]},"audio/xm":{"source":"apache","extensions":["xm"]},"chemical/x-cdx":{"source":"apache","extensions":["cdx"]},"chemical/x-cif":{"source":"apache","extensions":["cif"]},"chemical/x-cmdf":{"source":"apache","extensions":["cmdf"]},"chemical/x-cml":{"source":"apache","extensions":["cml"]},"chemical/x-csml":{"source":"apache","extensions":["csml"]},"chemical/x-pdb":{"source":"apache"},"chemical/x-xyz":{"source":"apache","extensions":["xyz"]},"font/collection":{"source":"iana","extensions":["ttc"]},"font/otf":{"source":"iana","compressible":true,"extensions":["otf"]},"font/sfnt":{"source":"iana"},"font/ttf":{"source":"iana","compressible":true,"extensions":["ttf"]},"font/woff":{"source":"iana","extensions":["woff"]},"font/woff2":{"source":"iana","extensions":["woff2"]},"image/aces":{"source":"iana","extensions":["exr"]},"image/apng":{"compressible":false,"extensions":["apng"]},"image/avci":{"source":"iana","extensions":["avci"]},"image/avcs":{"source":"iana","extensions":["avcs"]},"image/avif":{"source":"iana","compressible":false,"extensions":["avif"]},"image/bmp":{"source":"iana","compressible":true,"extensions":["bmp"]},"image/cgm":{"source":"iana","extensions":["cgm"]},"image/dicom-rle":{"source":"iana","extensions":["drle"]},"image/emf":{"source":"iana","extensions":["emf"]},"image/fits":{"source":"iana","extensions":["fits"]},"image/g3fax":{"source":"iana","extensions":["g3"]},"image/gif":{"source":"iana","compressible":false,"extensions":["gif"]},"image/heic":{"source":"iana","extensions":["heic"]},"image/heic-sequence":{"source":"iana","extensions":["heics"]},"image/heif":{"source":"iana","extensions":["heif"]},"image/heif-sequence":{"source":"iana","extensions":["heifs"]},"image/hej2k":{"source":"iana","extensions":["hej2"]},"image/hsj2":{"source":"iana","extensions":["hsj2"]},"image/ief":{"source":"iana","extensions":["ief"]},"image/jls":{"source":"iana","extensions":["jls"]},"image/jp2":{"source":"iana","compressible":false,"extensions":["jp2","jpg2"]},"image/jpeg":{"source":"iana","compressible":false,"extensions":["jpeg","jpg","jpe"]},"image/jph":{"source":"iana","extensions":["jph"]},"image/jphc":{"source":"iana","extensions":["jhc"]},"image/jpm":{"source":"iana","compressible":false,"extensions":["jpm"]},"image/jpx":{"source":"iana","compressible":false,"extensions":["jpx","jpf"]},"image/jxr":{"source":"iana","extensions":["jxr"]},"image/jxra":{"source":"iana","extensions":["jxra"]},"image/jxrs":{"source":"iana","extensions":["jxrs"]},"image/jxs":{"source":"iana","extensions":["jxs"]},"image/jxsc":{"source":"iana","extensions":["jxsc"]},"image/jxsi":{"source":"iana","extensions":["jxsi"]},"image/jxss":{"source":"iana","extensions":["jxss"]},"image/ktx":{"source":"iana","extensions":["ktx"]},"image/ktx2":{"source":"iana","extensions":["ktx2"]},"image/naplps":{"source":"iana"},"image/pjpeg":{"compressible":false},"image/png":{"source":"iana","compressible":false,"extensions":["png"]},"image/prs.btif":{"source":"iana","extensions":["btif"]},"image/prs.pti":{"source":"iana","extensions":["pti"]},"image/pwg-raster":{"source":"iana"},"image/sgi":{"source":"apache","extensions":["sgi"]},"image/svg+xml":{"source":"iana","compressible":true,"extensions":["svg","svgz"]},"image/t38":{"source":"iana","extensions":["t38"]},"image/tiff":{"source":"iana","compressible":false,"extensions":["tif","tiff"]},"image/tiff-fx":{"source":"iana","extensions":["tfx"]},"image/vnd.adobe.photoshop":{"source":"iana","compressible":true,"extensions":["psd"]},"image/vnd.airzip.accelerator.azv":{"source":"iana","extensions":["azv"]},"image/vnd.cns.inf2":{"source":"iana"},"image/vnd.dece.graphic":{"source":"iana","extensions":["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{"source":"iana","extensions":["djvu","djv"]},"image/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"image/vnd.dwg":{"source":"iana","extensions":["dwg"]},"image/vnd.dxf":{"source":"iana","extensions":["dxf"]},"image/vnd.fastbidsheet":{"source":"iana","extensions":["fbs"]},"image/vnd.fpx":{"source":"iana","extensions":["fpx"]},"image/vnd.fst":{"source":"iana","extensions":["fst"]},"image/vnd.fujixerox.edmics-mmr":{"source":"iana","extensions":["mmr"]},"image/vnd.fujixerox.edmics-rlc":{"source":"iana","extensions":["rlc"]},"image/vnd.globalgraphics.pgb":{"source":"iana"},"image/vnd.microsoft.icon":{"source":"iana","compressible":true,"extensions":["ico"]},"image/vnd.mix":{"source":"iana"},"image/vnd.mozilla.apng":{"source":"iana"},"image/vnd.ms-dds":{"compressible":true,"extensions":["dds"]},"image/vnd.ms-modi":{"source":"iana","extensions":["mdi"]},"image/vnd.ms-photo":{"source":"apache","extensions":["wdp"]},"image/vnd.net-fpx":{"source":"iana","extensions":["npx"]},"image/vnd.pco.b16":{"source":"iana","extensions":["b16"]},"image/vnd.radiance":{"source":"iana"},"image/vnd.sealed.png":{"source":"iana"},"image/vnd.sealedmedia.softseal.gif":{"source":"iana"},"image/vnd.sealedmedia.softseal.jpg":{"source":"iana"},"image/vnd.svf":{"source":"iana"},"image/vnd.tencent.tap":{"source":"iana","extensions":["tap"]},"image/vnd.valve.source.texture":{"source":"iana","extensions":["vtf"]},"image/vnd.wap.wbmp":{"source":"iana","extensions":["wbmp"]},"image/vnd.xiff":{"source":"iana","extensions":["xif"]},"image/vnd.zbrush.pcx":{"source":"iana","extensions":["pcx"]},"image/webp":{"source":"apache","extensions":["webp"]},"image/wmf":{"source":"iana","extensions":["wmf"]},"image/x-3ds":{"source":"apache","extensions":["3ds"]},"image/x-cmu-raster":{"source":"apache","extensions":["ras"]},"image/x-cmx":{"source":"apache","extensions":["cmx"]},"image/x-freehand":{"source":"apache","extensions":["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{"source":"apache","compressible":true,"extensions":["ico"]},"image/x-jng":{"source":"nginx","extensions":["jng"]},"image/x-mrsid-image":{"source":"apache","extensions":["sid"]},"image/x-ms-bmp":{"source":"nginx","compressible":true,"extensions":["bmp"]},"image/x-pcx":{"source":"apache","extensions":["pcx"]},"image/x-pict":{"source":"apache","extensions":["pic","pct"]},"image/x-portable-anymap":{"source":"apache","extensions":["pnm"]},"image/x-portable-bitmap":{"source":"apache","extensions":["pbm"]},"image/x-portable-graymap":{"source":"apache","extensions":["pgm"]},"image/x-portable-pixmap":{"source":"apache","extensions":["ppm"]},"image/x-rgb":{"source":"apache","extensions":["rgb"]},"image/x-tga":{"source":"apache","extensions":["tga"]},"image/x-xbitmap":{"source":"apache","extensions":["xbm"]},"image/x-xcf":{"compressible":false},"image/x-xpixmap":{"source":"apache","extensions":["xpm"]},"image/x-xwindowdump":{"source":"apache","extensions":["xwd"]},"message/cpim":{"source":"iana"},"message/delivery-status":{"source":"iana"},"message/disposition-notification":{"source":"iana","extensions":["disposition-notification"]},"message/external-body":{"source":"iana"},"message/feedback-report":{"source":"iana"},"message/global":{"source":"iana","extensions":["u8msg"]},"message/global-delivery-status":{"source":"iana","extensions":["u8dsn"]},"message/global-disposition-notification":{"source":"iana","extensions":["u8mdn"]},"message/global-headers":{"source":"iana","extensions":["u8hdr"]},"message/http":{"source":"iana","compressible":false},"message/imdn+xml":{"source":"iana","compressible":true},"message/news":{"source":"iana"},"message/partial":{"source":"iana","compressible":false},"message/rfc822":{"source":"iana","compressible":true,"extensions":["eml","mime"]},"message/s-http":{"source":"iana"},"message/sip":{"source":"iana"},"message/sipfrag":{"source":"iana"},"message/tracking-status":{"source":"iana"},"message/vnd.si.simp":{"source":"iana"},"message/vnd.wfa.wsc":{"source":"iana","extensions":["wsc"]},"model/3mf":{"source":"iana","extensions":["3mf"]},"model/e57":{"source":"iana"},"model/gltf+json":{"source":"iana","compressible":true,"extensions":["gltf"]},"model/gltf-binary":{"source":"iana","compressible":true,"extensions":["glb"]},"model/iges":{"source":"iana","compressible":false,"extensions":["igs","iges"]},"model/mesh":{"source":"iana","compressible":false,"extensions":["msh","mesh","silo"]},"model/mtl":{"source":"iana","extensions":["mtl"]},"model/obj":{"source":"iana","extensions":["obj"]},"model/step":{"source":"iana"},"model/step+xml":{"source":"iana","compressible":true,"extensions":["stpx"]},"model/step+zip":{"source":"iana","compressible":false,"extensions":["stpz"]},"model/step-xml+zip":{"source":"iana","compressible":false,"extensions":["stpxz"]},"model/stl":{"source":"iana","extensions":["stl"]},"model/vnd.collada+xml":{"source":"iana","compressible":true,"extensions":["dae"]},"model/vnd.dwf":{"source":"iana","extensions":["dwf"]},"model/vnd.flatland.3dml":{"source":"iana"},"model/vnd.gdl":{"source":"iana","extensions":["gdl"]},"model/vnd.gs-gdl":{"source":"apache"},"model/vnd.gs.gdl":{"source":"iana"},"model/vnd.gtw":{"source":"iana","extensions":["gtw"]},"model/vnd.moml+xml":{"source":"iana","compressible":true},"model/vnd.mts":{"source":"iana","extensions":["mts"]},"model/vnd.opengex":{"source":"iana","extensions":["ogex"]},"model/vnd.parasolid.transmit.binary":{"source":"iana","extensions":["x_b"]},"model/vnd.parasolid.transmit.text":{"source":"iana","extensions":["x_t"]},"model/vnd.pytha.pyox":{"source":"iana"},"model/vnd.rosette.annotated-data-model":{"source":"iana"},"model/vnd.sap.vds":{"source":"iana","extensions":["vds"]},"model/vnd.usdz+zip":{"source":"iana","compressible":false,"extensions":["usdz"]},"model/vnd.valve.source.compiled-map":{"source":"iana","extensions":["bsp"]},"model/vnd.vtu":{"source":"iana","extensions":["vtu"]},"model/vrml":{"source":"iana","compressible":false,"extensions":["wrl","vrml"]},"model/x3d+binary":{"source":"apache","compressible":false,"extensions":["x3db","x3dbz"]},"model/x3d+fastinfoset":{"source":"iana","extensions":["x3db"]},"model/x3d+vrml":{"source":"apache","compressible":false,"extensions":["x3dv","x3dvz"]},"model/x3d+xml":{"source":"iana","compressible":true,"extensions":["x3d","x3dz"]},"model/x3d-vrml":{"source":"iana","extensions":["x3dv"]},"multipart/alternative":{"source":"iana","compressible":false},"multipart/appledouble":{"source":"iana"},"multipart/byteranges":{"source":"iana"},"multipart/digest":{"source":"iana"},"multipart/encrypted":{"source":"iana","compressible":false},"multipart/form-data":{"source":"iana","compressible":false},"multipart/header-set":{"source":"iana"},"multipart/mixed":{"source":"iana"},"multipart/multilingual":{"source":"iana"},"multipart/parallel":{"source":"iana"},"multipart/related":{"source":"iana","compressible":false},"multipart/report":{"source":"iana"},"multipart/signed":{"source":"iana","compressible":false},"multipart/vnd.bint.med-plus":{"source":"iana"},"multipart/voice-message":{"source":"iana"},"multipart/x-mixed-replace":{"source":"iana"},"text/1d-interleaved-parityfec":{"source":"iana"},"text/cache-manifest":{"source":"iana","compressible":true,"extensions":["appcache","manifest"]},"text/calendar":{"source":"iana","extensions":["ics","ifb"]},"text/calender":{"compressible":true},"text/cmd":{"compressible":true},"text/coffeescript":{"extensions":["coffee","litcoffee"]},"text/cql":{"source":"iana"},"text/cql-expression":{"source":"iana"},"text/cql-identifier":{"source":"iana"},"text/css":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["css"]},"text/csv":{"source":"iana","compressible":true,"extensions":["csv"]},"text/csv-schema":{"source":"iana"},"text/directory":{"source":"iana"},"text/dns":{"source":"iana"},"text/ecmascript":{"source":"iana"},"text/encaprtp":{"source":"iana"},"text/enriched":{"source":"iana"},"text/fhirpath":{"source":"iana"},"text/flexfec":{"source":"iana"},"text/fwdred":{"source":"iana"},"text/gff3":{"source":"iana"},"text/grammar-ref-list":{"source":"iana"},"text/html":{"source":"iana","compressible":true,"extensions":["html","htm","shtml"]},"text/jade":{"extensions":["jade"]},"text/javascript":{"source":"iana","compressible":true},"text/jcr-cnd":{"source":"iana"},"text/jsx":{"compressible":true,"extensions":["jsx"]},"text/less":{"compressible":true,"extensions":["less"]},"text/markdown":{"source":"iana","compressible":true,"extensions":["markdown","md"]},"text/mathml":{"source":"nginx","extensions":["mml"]},"text/mdx":{"compressible":true,"extensions":["mdx"]},"text/mizar":{"source":"iana"},"text/n3":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["n3"]},"text/parameters":{"source":"iana","charset":"UTF-8"},"text/parityfec":{"source":"iana"},"text/plain":{"source":"iana","compressible":true,"extensions":["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{"source":"iana","charset":"UTF-8"},"text/prs.fallenstein.rst":{"source":"iana"},"text/prs.lines.tag":{"source":"iana","extensions":["dsc"]},"text/prs.prop.logic":{"source":"iana"},"text/raptorfec":{"source":"iana"},"text/red":{"source":"iana"},"text/rfc822-headers":{"source":"iana"},"text/richtext":{"source":"iana","compressible":true,"extensions":["rtx"]},"text/rtf":{"source":"iana","compressible":true,"extensions":["rtf"]},"text/rtp-enc-aescm128":{"source":"iana"},"text/rtploopback":{"source":"iana"},"text/rtx":{"source":"iana"},"text/sgml":{"source":"iana","extensions":["sgml","sgm"]},"text/shaclc":{"source":"iana"},"text/shex":{"source":"iana","extensions":["shex"]},"text/slim":{"extensions":["slim","slm"]},"text/spdx":{"source":"iana","extensions":["spdx"]},"text/strings":{"source":"iana"},"text/stylus":{"extensions":["stylus","styl"]},"text/t140":{"source":"iana"},"text/tab-separated-values":{"source":"iana","compressible":true,"extensions":["tsv"]},"text/troff":{"source":"iana","extensions":["t","tr","roff","man","me","ms"]},"text/turtle":{"source":"iana","charset":"UTF-8","extensions":["ttl"]},"text/ulpfec":{"source":"iana"},"text/uri-list":{"source":"iana","compressible":true,"extensions":["uri","uris","urls"]},"text/vcard":{"source":"iana","compressible":true,"extensions":["vcard"]},"text/vnd.a":{"source":"iana"},"text/vnd.abc":{"source":"iana"},"text/vnd.ascii-art":{"source":"iana"},"text/vnd.curl":{"source":"iana","extensions":["curl"]},"text/vnd.curl.dcurl":{"source":"apache","extensions":["dcurl"]},"text/vnd.curl.mcurl":{"source":"apache","extensions":["mcurl"]},"text/vnd.curl.scurl":{"source":"apache","extensions":["scurl"]},"text/vnd.debian.copyright":{"source":"iana","charset":"UTF-8"},"text/vnd.dmclientscript":{"source":"iana"},"text/vnd.dvb.subtitle":{"source":"iana","extensions":["sub"]},"text/vnd.esmertec.theme-descriptor":{"source":"iana","charset":"UTF-8"},"text/vnd.familysearch.gedcom":{"source":"iana","extensions":["ged"]},"text/vnd.ficlab.flt":{"source":"iana"},"text/vnd.fly":{"source":"iana","extensions":["fly"]},"text/vnd.fmi.flexstor":{"source":"iana","extensions":["flx"]},"text/vnd.gml":{"source":"iana"},"text/vnd.graphviz":{"source":"iana","extensions":["gv"]},"text/vnd.hans":{"source":"iana"},"text/vnd.hgl":{"source":"iana"},"text/vnd.in3d.3dml":{"source":"iana","extensions":["3dml"]},"text/vnd.in3d.spot":{"source":"iana","extensions":["spot"]},"text/vnd.iptc.newsml":{"source":"iana"},"text/vnd.iptc.nitf":{"source":"iana"},"text/vnd.latex-z":{"source":"iana"},"text/vnd.motorola.reflex":{"source":"iana"},"text/vnd.ms-mediapackage":{"source":"iana"},"text/vnd.net2phone.commcenter.command":{"source":"iana"},"text/vnd.radisys.msml-basic-layout":{"source":"iana"},"text/vnd.senx.warpscript":{"source":"iana"},"text/vnd.si.uricatalogue":{"source":"iana"},"text/vnd.sosi":{"source":"iana"},"text/vnd.sun.j2me.app-descriptor":{"source":"iana","charset":"UTF-8","extensions":["jad"]},"text/vnd.trolltech.linguist":{"source":"iana","charset":"UTF-8"},"text/vnd.wap.si":{"source":"iana"},"text/vnd.wap.sl":{"source":"iana"},"text/vnd.wap.wml":{"source":"iana","extensions":["wml"]},"text/vnd.wap.wmlscript":{"source":"iana","extensions":["wmls"]},"text/vtt":{"source":"iana","charset":"UTF-8","compressible":true,"extensions":["vtt"]},"text/x-asm":{"source":"apache","extensions":["s","asm"]},"text/x-c":{"source":"apache","extensions":["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{"source":"nginx","extensions":["htc"]},"text/x-fortran":{"source":"apache","extensions":["f","for","f77","f90"]},"text/x-gwt-rpc":{"compressible":true},"text/x-handlebars-template":{"extensions":["hbs"]},"text/x-java-source":{"source":"apache","extensions":["java"]},"text/x-jquery-tmpl":{"compressible":true},"text/x-lua":{"extensions":["lua"]},"text/x-markdown":{"compressible":true,"extensions":["mkd"]},"text/x-nfo":{"source":"apache","extensions":["nfo"]},"text/x-opml":{"source":"apache","extensions":["opml"]},"text/x-org":{"compressible":true,"extensions":["org"]},"text/x-pascal":{"source":"apache","extensions":["p","pas"]},"text/x-processing":{"compressible":true,"extensions":["pde"]},"text/x-sass":{"extensions":["sass"]},"text/x-scss":{"extensions":["scss"]},"text/x-setext":{"source":"apache","extensions":["etx"]},"text/x-sfv":{"source":"apache","extensions":["sfv"]},"text/x-suse-ymp":{"compressible":true,"extensions":["ymp"]},"text/x-uuencode":{"source":"apache","extensions":["uu"]},"text/x-vcalendar":{"source":"apache","extensions":["vcs"]},"text/x-vcard":{"source":"apache","extensions":["vcf"]},"text/xml":{"source":"iana","compressible":true,"extensions":["xml"]},"text/xml-external-parsed-entity":{"source":"iana"},"text/yaml":{"compressible":true,"extensions":["yaml","yml"]},"video/1d-interleaved-parityfec":{"source":"iana"},"video/3gpp":{"source":"iana","extensions":["3gp","3gpp"]},"video/3gpp-tt":{"source":"iana"},"video/3gpp2":{"source":"iana","extensions":["3g2"]},"video/av1":{"source":"iana"},"video/bmpeg":{"source":"iana"},"video/bt656":{"source":"iana"},"video/celb":{"source":"iana"},"video/dv":{"source":"iana"},"video/encaprtp":{"source":"iana"},"video/ffv1":{"source":"iana"},"video/flexfec":{"source":"iana"},"video/h261":{"source":"iana","extensions":["h261"]},"video/h263":{"source":"iana","extensions":["h263"]},"video/h263-1998":{"source":"iana"},"video/h263-2000":{"source":"iana"},"video/h264":{"source":"iana","extensions":["h264"]},"video/h264-rcdo":{"source":"iana"},"video/h264-svc":{"source":"iana"},"video/h265":{"source":"iana"},"video/iso.segment":{"source":"iana","extensions":["m4s"]},"video/jpeg":{"source":"iana","extensions":["jpgv"]},"video/jpeg2000":{"source":"iana"},"video/jpm":{"source":"apache","extensions":["jpm","jpgm"]},"video/jxsv":{"source":"iana"},"video/mj2":{"source":"iana","extensions":["mj2","mjp2"]},"video/mp1s":{"source":"iana"},"video/mp2p":{"source":"iana"},"video/mp2t":{"source":"iana","extensions":["ts"]},"video/mp4":{"source":"iana","compressible":false,"extensions":["mp4","mp4v","mpg4"]},"video/mp4v-es":{"source":"iana"},"video/mpeg":{"source":"iana","compressible":false,"extensions":["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{"source":"iana"},"video/mpv":{"source":"iana"},"video/nv":{"source":"iana"},"video/ogg":{"source":"iana","compressible":false,"extensions":["ogv"]},"video/parityfec":{"source":"iana"},"video/pointer":{"source":"iana"},"video/quicktime":{"source":"iana","compressible":false,"extensions":["qt","mov"]},"video/raptorfec":{"source":"iana"},"video/raw":{"source":"iana"},"video/rtp-enc-aescm128":{"source":"iana"},"video/rtploopback":{"source":"iana"},"video/rtx":{"source":"iana"},"video/scip":{"source":"iana"},"video/smpte291":{"source":"iana"},"video/smpte292m":{"source":"iana"},"video/ulpfec":{"source":"iana"},"video/vc1":{"source":"iana"},"video/vc2":{"source":"iana"},"video/vnd.cctv":{"source":"iana"},"video/vnd.dece.hd":{"source":"iana","extensions":["uvh","uvvh"]},"video/vnd.dece.mobile":{"source":"iana","extensions":["uvm","uvvm"]},"video/vnd.dece.mp4":{"source":"iana"},"video/vnd.dece.pd":{"source":"iana","extensions":["uvp","uvvp"]},"video/vnd.dece.sd":{"source":"iana","extensions":["uvs","uvvs"]},"video/vnd.dece.video":{"source":"iana","extensions":["uvv","uvvv"]},"video/vnd.directv.mpeg":{"source":"iana"},"video/vnd.directv.mpeg-tts":{"source":"iana"},"video/vnd.dlna.mpeg-tts":{"source":"iana"},"video/vnd.dvb.file":{"source":"iana","extensions":["dvb"]},"video/vnd.fvt":{"source":"iana","extensions":["fvt"]},"video/vnd.hns.video":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.1dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-1010":{"source":"iana"},"video/vnd.iptvforum.2dparityfec-2005":{"source":"iana"},"video/vnd.iptvforum.ttsavc":{"source":"iana"},"video/vnd.iptvforum.ttsmpeg2":{"source":"iana"},"video/vnd.motorola.video":{"source":"iana"},"video/vnd.motorola.videop":{"source":"iana"},"video/vnd.mpegurl":{"source":"iana","extensions":["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{"source":"iana","extensions":["pyv"]},"video/vnd.nokia.interleaved-multimedia":{"source":"iana"},"video/vnd.nokia.mp4vr":{"source":"iana"},"video/vnd.nokia.videovoip":{"source":"iana"},"video/vnd.objectvideo":{"source":"iana"},"video/vnd.radgamettools.bink":{"source":"iana"},"video/vnd.radgamettools.smacker":{"source":"iana"},"video/vnd.sealed.mpeg1":{"source":"iana"},"video/vnd.sealed.mpeg4":{"source":"iana"},"video/vnd.sealed.swf":{"source":"iana"},"video/vnd.sealedmedia.softseal.mov":{"source":"iana"},"video/vnd.uvvu.mp4":{"source":"iana","extensions":["uvu","uvvu"]},"video/vnd.vivo":{"source":"iana","extensions":["viv"]},"video/vnd.youtube.yt":{"source":"iana"},"video/vp8":{"source":"iana"},"video/vp9":{"source":"iana"},"video/webm":{"source":"apache","compressible":false,"extensions":["webm"]},"video/x-f4v":{"source":"apache","extensions":["f4v"]},"video/x-fli":{"source":"apache","extensions":["fli"]},"video/x-flv":{"source":"apache","compressible":false,"extensions":["flv"]},"video/x-m4v":{"source":"apache","extensions":["m4v"]},"video/x-matroska":{"source":"apache","compressible":false,"extensions":["mkv","mk3d","mks"]},"video/x-mng":{"source":"apache","extensions":["mng"]},"video/x-ms-asf":{"source":"apache","extensions":["asf","asx"]},"video/x-ms-vob":{"source":"apache","extensions":["vob"]},"video/x-ms-wm":{"source":"apache","extensions":["wm"]},"video/x-ms-wmv":{"source":"apache","compressible":false,"extensions":["wmv"]},"video/x-ms-wmx":{"source":"apache","extensions":["wmx"]},"video/x-ms-wvx":{"source":"apache","extensions":["wvx"]},"video/x-msvideo":{"source":"apache","extensions":["avi"]},"video/x-sgi-movie":{"source":"apache","extensions":["movie"]},"video/x-smv":{"source":"apache","extensions":["smv"]},"x-conference/x-cooltalk":{"source":"apache","extensions":["ice"]},"x-shader/x-fragment":{"compressible":true},"x-shader/x-vertex":{"compressible":true}}')},function(e,t,n){(function(e){function n(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}function r(e,t){if(e.filter)return e.filter(t);for(var n=[],r=0;r=-1&&!i;o--){var s=o>=0?arguments[o]:e.cwd();if("string"!=typeof s)throw new TypeError("Arguments to path.resolve must be strings");s&&(t=s+"/"+t,i="/"===s.charAt(0))}return(i?"/":"")+(t=n(r(t.split("/"),(function(e){return!!e})),!i).join("/"))||"."},t.normalize=function(e){var o=t.isAbsolute(e),s="/"===i(e,-1);return(e=n(r(e.split("/"),(function(e){return!!e})),!o).join("/"))||o||(e="."),e&&s&&(e+="/"),(o?"/":"")+e},t.isAbsolute=function(e){return"/"===e.charAt(0)},t.join=function(){var e=Array.prototype.slice.call(arguments,0);return t.normalize(r(e,(function(e,t){if("string"!=typeof e)throw new TypeError("Arguments to path.join must be strings");return e})).join("/"))},t.relative=function(e,n){function r(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=t.resolve(e).substr(1),n=t.resolve(n).substr(1);for(var i=r(e.split("/")),o=r(n.split("/")),s=Math.min(i.length,o.length),a=s,l=0;l=1;--o)if(47===(t=e.charCodeAt(o))){if(!i){r=o;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"/":e.slice(0,r)},t.basename=function(e,t){var n=function(e){"string"!=typeof e&&(e+="");var t,n=0,r=-1,i=!0;for(t=e.length-1;t>=0;--t)if(47===e.charCodeAt(t)){if(!i){n=t+1;break}}else-1===r&&(i=!1,r=t+1);return-1===r?"":e.slice(n,r)}(e);return t&&n.substr(-1*t.length)===t&&(n=n.substr(0,n.length-t.length)),n},t.extname=function(e){"string"!=typeof e&&(e+="");for(var t=-1,n=0,r=-1,i=!0,o=0,s=e.length-1;s>=0;--s){var a=e.charCodeAt(s);if(47!==a)-1===r&&(i=!1,r=s+1),46===a?-1===t?t=s:1!==o&&(o=1):-1!==t&&(o=-1);else if(!i){n=s+1;break}}return-1===t||-1===r||0===o||1===o&&t===r-1&&t===n+1?"":e.slice(t,r)};var i="b"==="ab".substr(-1)?function(e,t,n){return e.substr(t,n)}:function(e,t,n){return t<0&&(t=e.length+t),e.substr(t,n)}}).call(this,n(36))},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return e[e.length-1]}},function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var i=r(n(69));function o(e){return e&&e.nodeType===i.default.ELEMENT_NODE}function s(e,t){return o(e)?e.getAttribute(t):void 0}function a(e){return e&&e.childNodes}function l(e){return e?e.parentNode:null}t.default={isTag:o,getAttributeValue:s,getName:function(e){return(e&&e.rawTagName||"").toLowerCase()},getChildren:a,getParent:l,getText:function(e){return e.text},removeSubsets:function(e){for(var t,n,r,i=e.length;--i>-1;){for(t=n=e[i],e[i]=null,r=!0;n;){if(e.indexOf(n)>-1){r=!1,e.splice(i,1);break}n=l(n)}r&&(e[i]=t)}return e},existsOne:function e(t,n){return n.some((function(n){return!!o(n)&&(t(n)||e(t,a(n)))}))},getSiblings:function(e){var t=l(e);return t?a(t):[]},hasAttrib:function(e,t){return void 0!==s(e,t)},findOne:function e(t,n){for(var r=null,i=0,o=null==n?void 0:n.length;i0&&(r=e(t,l))}}return r},findAll:function e(t,n){for(var r=[],i=0,s=n.length;i"):"<".concat(e).concat(t,">").concat(n,"")},e.prototype.isVoidElement=function(e){return this.voidTags.has(e)},e}();t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(106);Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r.parse}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(106);t.default=function(e,t){void 0===t&&(t={});var n=(0,r.base_parse)(e,t);return Boolean(1===n.length)}},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.run-bar{display:flex;flex-direction:row;justify-content:flex-end;padding:calc(.5rem*var(--scale-factor, 1))}.--light .run-bar{border-block-start:1px solid #d5d7dc}.--dark .run-bar{border-block-start:1px solid #4a4d59}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.save-status{align-items:center;display:flex;gap:calc(.25rem*var(--scale-factor, 1));justify-content:flex-end;margin-block:0;padding-inline:calc(1rem*var(--scale-factor, 1))}.save-status--mobile{margin:unset}.save-status--mobile .save-status__text{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1))}.save-status__icon{display:flex}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.rpf-button--primary * svg{fill:var(--rpf-button-primary-text-color)}.rpf-button--tertiary * svg{fill:var(--rpf-button-secondary-text-color) !important}.rpf-button{flex-direction:row-reverse}.rpf-button--fit{inline-size:fit-content}.rpf-button.rpf-button--fill{justify-content:center;inline-size:100%;box-sizing:border-box}.rpf-button--secondary{justify-content:center;align-items:center}.rpf-button--secondary * svg{fill:#4d575b}.--dark * .rpf-button--secondary{border-color:#89ddd5}.--dark * .rpf-button--secondary span{color:#fff}.--dark * .rpf-button--secondary svg{fill:#fff}.--dark * .rpf-button--secondary::before{background-color:#33353d}.--dark * .rpf-button--secondary:hover{border-color:#89ddd5}.--dark * .rpf-button--secondary:hover::before{background-color:rgba(255,255,255,.1)}.--dark * .rpf-button--secondary:active::before{background-color:rgba(255,255,255,.15)}.--dark * .rpf-button--secondary:disabled{border-color:#d5d7dc;background-color:inherit}.--dark * .rpf-button--secondary:disabled::before{background-color:inherit}.--dark * .rpf-button--secondary:disabled span{color:#d5d7dc}.--dark * .rpf-button--tertiary{color:#fff;border:none}.--dark * .rpf-button--tertiary:hover::before{background-color:rgba(255,255,255,.1)}.--dark * .rpf-button--tertiary:active::before{background-color:rgba(255,255,255,.15)}.--dark * .rpf-button--tertiary:disabled{background-color:inherit}.--dark * .rpf-button--tertiary:disabled::before{background-color:inherit}.--dark * .rpf-button--tertiary:disabled span{color:#d5d7dc}.--light * .rpf-button--secondary span{color:#212121}.--light * .rpf-button--secondary::before{background-color:#fff}.--light * .rpf-button--secondary:hover{border-color:#89ddd5}.--light * .rpf-button--secondary:hover::before{background-color:#e7f8f7}.--light * .rpf-button--secondary:active::before{background-color:#dcf5f3}.--light * .rpf-button--secondary:disabled{border-color:#d5d7dc;background-color:inherit}.--light * .rpf-button--secondary:disabled::before{background-color:inherit}.--light * .rpf-button--secondary:disabled span{color:#d5d7dc}.--light * .rpf-button--tertiary{color:#212121;border:none}.--light * .rpf-button--tertiary::before{background-color:#fff}.--light * .rpf-button--tertiary:hover::before{background-color:#e7f8f7}.--light * .rpf-button--tertiary:active::before{background-color:#dcf5f3}.--light * .rpf-button--tertiary:disabled{background-color:inherit}.--light * .rpf-button--tertiary:disabled::before{background-color:inherit}.--light * .rpf-button--tertiary:disabled span{color:#d5d7dc}.rpf-button__icon{display:flex}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.project-name{align-items:center;display:flex;block-size:100%;padding-inline-start:calc(.5rem*var(--scale-factor, 1))}.project-name .btn--primary{margin:0 calc(.5rem*var(--scale-factor, 1))}.project-name__title{font-size:calc(1.25rem*var(--scale-factor, 1));font-weight:700;margin-block:calc(1rem*var(--scale-factor, 1));margin-inline-start:calc(.5rem*var(--scale-factor, 1));margin-inline-end:calc(1rem*var(--scale-factor, 1));overflow:hidden;text-overflow:ellipsis;text-wrap:nowrap}.project-name__label{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));font-weight:700;margin-block-end:calc(.5rem*var(--scale-factor, 1));display:block}.project-name__input{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));padding:0 calc(1.5rem*var(--scale-factor, 1));block-size:calc(3rem*var(--scale-factor, 1));border-radius:calc(.5rem*var(--scale-factor, 1));border:none;color:inherit;background-color:inherit;text-overflow:ellipsis;inline-size:100%}.project-name__button{margin:calc(.5rem*var(--scale-factor, 1));inline-size:48px;block-size:48px}.project-name__button svg{block-size:calc(1.5rem*var(--scale-factor, 1));inline-size:calc(1.5rem*var(--scale-factor, 1));margin:0}.--dark .project-name__input{background-color:#4a4d59}.--dark .project-name__input:focus-visible{background-color:inherit;outline:2px solid #fff}.--light .project-name__input{background-color:#f1f2f3}.--light .project-name__input:focus-visible{background-color:inherit;outline:2px solid #212121}",""])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.kebabKeys=t.pascalKeys=t.snakeKeys=t.camelKeys=t.upperKeys=t.lowerKeys=t.toLowerCase=t.toUpperCase=t.toKebabCase=t.toHeaderCase=t.toSentenceCase=t.toTextCase=t.toPathCase=t.toDotCase=t.toPascalCase=t.toSnakeCase=t.toCamelCase=void 0;var r=n(157);t.toCamelCase=r.default;var i=n(158);t.toSnakeCase=i.default;var o=n(159);t.toPascalCase=o.default;var s=n(377);t.toDotCase=s.default;var a=n(378);t.toPathCase=a.default;var l=n(379);t.toTextCase=l.default;var c=n(380);t.toSentenceCase=c.default;var u=n(381);t.toHeaderCase=u.default;var d=n(160);t.toKebabCase=d.default;var h=n(382);t.lowerKeys=h.default;var p=n(383);t.upperKeys=p.default;var f=n(384);t.camelKeys=f.default;var m=n(385);t.snakeKeys=m.default;var g=n(386);t.pascalKeys=g.default;var b=n(387);t.kebabKeys=b.default;var v=function(e){return String(e||"").toLowerCase()};t.toLowerCase=v;var y=function(e){return String(e||"").toUpperCase()};t.toUpperCase=y;var _={toCamelCase:r.default,toSnakeCase:i.default,toPascalCase:o.default,toDotCase:s.default,toPathCase:a.default,toTextCase:l.default,toSentenceCase:c.default,toHeaderCase:u.default,toKebabCase:d.default,toUpperCase:y,toLowerCase:v,lowerKeys:h.default,upperKeys:p.default,camelKeys:f.default,snakeKeys:m.default,pascalKeys:g.default,kebabKeys:b.default};t.default=_},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return void 0===e&&(e=""),e?String(e).replace(/^[^A-Za-z0-9]*|[^A-Za-z0-9]*$/g,"").replace(/([a-z])([A-Z])/g,(function(e,t,n){return t+"_"+n.toLowerCase()})).replace(/[^A-Za-z0-9]+|_+/g,".").toLowerCase():""}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return void 0===e&&(e=""),e?String(e).replace(/^[^A-Za-z0-9]*|[^A-Za-z0-9]*$/g,"").replace(/([a-z])([A-Z])/g,(function(e,t,n){return t+"_"+n.toLowerCase()})).replace(/[^A-Za-z0-9]+|_+/g,"/").toLowerCase():""}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return void 0===e&&(e=""),e?String(e).replace(/^[^A-Za-z0-9]*|[^A-Za-z0-9]*$/g,"").replace(/([a-z])([A-Z])/g,(function(e,t,n){return t+"_"+n.toLowerCase()})).replace(/[^A-Za-z0-9]+|_+/g," ").toLowerCase():""}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){if(void 0===e&&(e=""),!e)return"";var t=String(e).replace(/^[^A-Za-z0-9]*|[^A-Za-z0-9]*$/g,"").replace(/([a-z])([A-Z])/g,(function(e,t,n){return t+"_"+n.toLowerCase()})).replace(/[^A-Za-z0-9]+|_+/g," ").toLowerCase();return t.charAt(0).toUpperCase()+t.slice(1)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return void 0===e&&(e=""),e?String(e).replace(/^[^A-Za-z0-9]*|[^A-Za-z0-9]*$/g,"").replace(/([a-z])([A-Z])/g,(function(e,t,n){return t+"_"+n.toLowerCase()})).replace(/[^A-Za-z0-9]+|_+/g," ").toLowerCase().replace(/( ?)(\w+)( ?)/g,(function(e,t,n,r){return t+n.charAt(0).toUpperCase()+n.slice(1)+r})):""}},function(e,t,n){"use strict";var r=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t + * @license MIT + */ +var r=n(389),i=n(390),o=n(391);function s(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,t){if(s()=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|e}function f(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return z(e).length;default:if(r)return F(e).length;t=(""+t).toLowerCase(),r=!0}}function m(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return C(this,t,n);case"utf8":case"utf-8":return E(this,t,n);case"ascii":return A(this,t,n);case"latin1":case"binary":return T(this,t,n);case"base64":return O(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return M(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,i){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,i);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,i){var o,s=1,a=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;s=2,a/=2,l/=2,n/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){var u=-1;for(o=n;oa&&(n=a-l),o=n;o>=0;o--){for(var d=!0,h=0;hi&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");r>o/2&&(r=o/2);for(var s=0;s>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function O(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function E(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i239?4:c>223?3:c>191?2:1;if(i+d<=n)switch(d){case 1:c<128&&(u=c);break;case 2:128==(192&(o=e[i+1]))&&(l=(31&c)<<6|63&o)>127&&(u=l);break;case 3:o=e[i+1],s=e[i+2],128==(192&o)&&128==(192&s)&&(l=(15&c)<<12|(63&o)<<6|63&s)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:o=e[i+1],s=e[i+2],a=e[i+3],128==(192&o)&&128==(192&s)&&128==(192&a)&&(l=(15&c)<<18|(63&o)<<12|(63&s)<<6|63&a)>65535&&l<1114112&&(u=l)}null===u?(u=65533,d=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=d}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",r=0;for(;r0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},l.prototype.compare=function(e,t,n,r,i){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError("out of range index");if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0),a=Math.min(o,s),c=this.slice(r,i),u=e.slice(t,n),d=0;di)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var o=!1;;)switch(r){case"hex":return y(this,e,t,n);case"utf8":case"utf-8":return _(this,e,t,n);case"ascii":return S(this,e,t,n);case"latin1":case"binary":return x(this,e,t,n);case"base64":return w(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,n);default:if(o)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function A(e,t,n){var r="";n=Math.min(e.length,n);for(var i=t;ir)&&(n=r);for(var i="",o=t;on)throw new RangeError("Trying to access beyond buffer length")}function $(e,t,n,r,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function R(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i>>8*(r?i:1-i)}function I(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i>>8*(r?i:3-i)&255}function D(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function N(e,t,n,r,o){return o||D(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function j(e,t,n,r,o){return o||D(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUInt8=function(e,t){return t||P(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||P(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||P(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||P(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||P(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=this[e],i=1,o=0;++o=(i*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||P(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return t||P(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||P(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){t||P(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return t||P(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||P(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||P(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||P(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||P(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||P(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||$(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o=0&&(o*=256);)this[t+i]=e/o&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||$(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||$(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||$(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||$(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):I(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||$(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):I(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);$(this,e,t,n,i-1,-i)}var o=0,s=1,a=0;for(this[t]=255&e;++o>0)-a&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);$(this,e,t,n,i-1,-i)}var o=n-1,s=1,a=0;for(this[t+o]=255&e;--o>=0&&(s*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/s>>0)-a&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||$(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||$(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):R(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||$(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):R(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||$(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):I(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||$(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):I(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return N(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return N(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return j(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return j(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--i)e[i+t]=this[i+n];else if(o<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function z(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(L,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function U(e,t,n,r){for(var i=0;i=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(29))},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=c(e),s=r[0],a=r[1],l=new o(function(e,t,n){return 3*(t+n)/4-n}(0,s,a)),u=0,d=a>0?s-4:s;for(n=0;n>16&255,l[u++]=t>>8&255,l[u++]=255&t;2===a&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,l[u++]=255&t);1===a&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t);return l},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=0,a=n-i;sa?a:s+16383));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"="));return o.join("")};for(var r=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0,l=s.length;a0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,n){for(var i,o,s=[],a=t;a>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(e,t){ +/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ +t.read=function(e,t,n,r,i){var o,s,a=8*i-r-1,l=(1<>1,u=-7,d=n?i-1:0,h=n?-1:1,p=e[t+d];for(d+=h,o=p&(1<<-u)-1,p>>=-u,u+=a;u>0;o=256*o+e[t+d],d+=h,u-=8);for(s=o&(1<<-u)-1,o>>=-u,u+=r;u>0;s=256*s+e[t+d],d+=h,u-=8);if(0===o)o=1-c;else{if(o===l)return s?NaN:1/0*(p?-1:1);s+=Math.pow(2,r),o-=c}return(p?-1:1)*s*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var s,a,l,c=8*o-i-1,u=(1<>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?0:o-1,f=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),(t+=s+d>=1?h/l:h*Math.pow(2,1-d))*l>=2&&(s++,l/=2),s+d>=u?(a=0,s=u):s+d>=1?(a=(t*l-1)*Math.pow(2,i),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,i),s=0));i>=8;e[n+p]=255&a,p+=f,a/=256,i-=8);for(s=s<0;e[n+p]=255&s,p+=f,s/=256,c-=8);e[n+p-f]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.project-bar{border-radius:calc(.5rem*var(--scale-factor, 1));display:flex;align-items:center;z-index:1;block-size:calc(4rem*var(--scale-factor, 1));container-type:inline-size;background-color:var(--editor-color-layer-3);border:1px solid var(--editor-color-outline)}@container (max-width: 367px){.project-bar{flex-direction:column;block-size:fit-content;justify-content:left}}.project-bar .project-name{border-inline-end:1px solid var(--editor-color-outline);margin-inline-end:-1px;min-inline-size:0px}@container (max-width: 365px){.project-bar .project-name{inline-size:100%;box-sizing:border-box;border-inline-end:none}}.project-bar .btn--save{border-radius:calc(.5rem*var(--scale-factor, 1))}@container (min-width: 560px){.project-bar .btn--save .icon{display:none}}.project-bar .project-bar__btn-wrapper{block-size:100%}.project-bar .project-bar__btn-wrapper:not(:last-child){border-inline-end:1px solid var(--editor-color-outline)}.project-bar__right{border-inline-start:1px solid var(--editor-color-outline);margin-inline-start:auto;display:flex;align-items:center;block-size:100%;flex-shrink:0;max-inline-size:55%}@container (max-width: 365px){.project-bar__right{margin-inline-start:0;border-inline-start:none;border-block-start:1px solid var(--editor-color-outline);block-size:fit-content;inline-size:100%;max-inline-size:100%}.project-bar__right .save-status{flex:1;justify-content:center}}.project-bar__btn{border-radius:calc(.5rem*var(--scale-factor, 1));justify-content:center;margin:calc(.5rem*var(--scale-factor, 1));gap:calc(.5rem*var(--scale-factor, 1))}.project-bar__btn .text{display:none}.project-bar__btn:hover .project-bar__btn{border-radius:inherit}@container (min-width: 560px){.project-bar__btn .text{min-inline-size:auto;display:block}}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.context-menu__drop{padding:calc(.5rem*var(--scale-factor, 1)) calc(1rem*var(--scale-factor, 1));margin:0}.context-menu__drop svg{margin:0}.context-menu__drop :focus-visible{border:none}.context-menu{list-style-type:none;padding:0;margin-inline:calc(.5rem*var(--scale-factor, 1)) 0;margin-block:0;border-radius:5px;display:flex;flex-direction:column}.context-menu .context-menu__item{margin:0;background-color:inherit;color:var(--rpf-button-secondary-color);padding:calc(.5rem*var(--scale-factor, 1));text-align:start;white-space:nowrap;overflow-x:visible;box-sizing:border-box;inline-size:100%;justify-content:start}.context-menu :focus-visible{border:none}.context-menu svg{inline-size:calc(1.5rem*var(--scale-factor, 1));block-size:auto}.context-menu--dark{background-color:#000;color:#fff;border:1px solid rgba(0,0,0,0)}.context-menu--dark svg{fill:#fff}.context-menu--dark .btn:hover{background-color:#33353d}.context-menu--dark .btn:disabled{color:#4a4d59}.context-menu--light{background-color:#fff;color:#212121;border:1px solid #d5d7dc}.context-menu--light svg{fill:#000}.context-menu--light .btn:hover{background-color:#e3e4e8}.context-menu--light .btn:disabled{color:#babcc5}.context-menu--dark .btn:disabled svg{fill:#4a4d59}.context-menu--light .btn:disabled svg{fill:#e3e4e8}.context-menu .btn:disabled:hover{background-color:inherit}",""])},function(e,t,n){"use strict"; +/** + * @license React + * react-jsx-runtime.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var r=n(0),i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,o={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)s.call(t,r)&&!l.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:i,type:e,key:c,ref:u,props:o,_owner:a.current}}t.Fragment=o,t.jsx=c,t.jsxs=c},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.files-list-item-wrapper{display:flex;position:relative}.files-list-item{inline-size:100%;display:flex;flex-direction:row !important;justify-content:flex-start;position:relative;align-items:center;border-radius:8px;border:3px solid rgba(0,0,0,0);box-sizing:border-box;white-space:nowrap;font-weight:400;min-block-size:44px;padding:calc(.5rem*var(--scale-factor, 1)) calc(2.5rem*var(--scale-factor, 1)) calc(.5rem*var(--scale-factor, 1)) calc(.5rem*var(--scale-factor, 1));margin:0}.files-list-item span{font-weight:700;overflow-x:hidden;text-overflow:ellipsis}.files-list-item__menu{border-radius:8px;position:absolute;inset-inline-end:0}.files-list-item:hover,.files-list-item__menu:hover{background-color:var(--rpf-files-list-item-hover)}.files-list-item:hover::before,.files-list-item__menu:hover::before{background-color:rgba(0,0,0,0) !important}.files-list-item:active,.files-list-item__menu:active{background-color:var(--rpf-files-list-item-active)}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,".resizable-with-handle__handle--right div{inset-inline-end:3px !important}.resizable-with-handle__handle--right div svg{block-size:100%;min-inline-size:0}.resizable-with-handle__handle--bottom div{inset-block-end:3px !important}.resizable-with-handle__handle--bottom div svg{inline-size:100%}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.info-panel{border-radius:calc(.5rem*var(--scale-factor, 1));padding:calc(1rem*var(--scale-factor, 1));margin-block-end:calc(.5rem*var(--scale-factor, 1))}.info-panel p{margin:0}.info-panel__links{display:flex;flex-direction:column}.info-panel__links a{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));font-weight:700;text-decoration:underline}.info-panel__link:last-of-type{margin-block-end:calc(1rem*var(--scale-factor, 1))}.--dark .info-panel{color:#fff;background-color:#4a4d59}.--dark .info-panel__links a{color:#fff}.--light .info-panel{color:#212121;background-color:#f1f2f3}.--light .info-panel__links a{color:#212121}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.select-buttons{border:none;margin:0;padding:0}.select-buttons__legend{padding:0;margin-block-end:calc(1rem*var(--scale-factor, 1))}.select-buttons__options{display:flex;inline-size:100%;gap:calc(1rem*var(--scale-factor, 1));flex-wrap:wrap}.select-buttons__option{flex:1}.select-buttons__button{opacity:0;position:absolute}.select-buttons__label{display:flex;align-items:center;padding:calc(.75rem*var(--scale-factor, 1));gap:calc(.75rem*var(--scale-factor, 1));border-radius:8px;position:relative;box-sizing:border-box;font-weight:700;cursor:pointer}.select-buttons__tick{display:flex;align-items:center;margin-inline-start:auto;visibility:hidden}.select-buttons__tick--selected{visibility:visible}.select-buttons__tick--selected svg rect{fill:var(--editor-color-theme)}.select-buttons__tick--selected svg path{fill:var(--rpf-select-buttons-tick-color)}.--light .select-buttons__label{border:2px solid #d5d7dc}.--light .select-buttons__label--selected{border:2px solid #212121}.--dark .select-buttons__label{border:2px solid #636674}.--dark .select-buttons__label--selected{border:2px solid #babcc5}.select-buttons__button:focus-visible+.select-buttons__label{outline:3px solid #cd2356}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.settings-panel{display:flex;flex-direction:column;gap:calc(1.25rem*var(--scale-factor, 1));padding:calc(.25rem*var(--scale-factor, 1))}.settings-panel .select-buttons__legend{font-size:calc(1.25rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));font-weight:700}.settings-panel .select-buttons__options{flex-direction:column}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.projects-panel-wrapper .sidebar__panel-content{overflow:visible}.projects-panel-wrapper .projects-panel__your-projects-button{display:flex;align-items:center;justify-content:center;inline-size:100%;box-sizing:border-box;margin:0}.projects-panel-wrapper .projects-panel__your-projects-button a{color:#000;text-decoration:none}.projects-panel-wrapper .projects-panel__download-button{inline-size:100%;margin:0;justify-content:center}.projects-panel-wrapper .project-name{block-size:auto;padding-inline-start:0}.projects-panel-wrapper .project-name__label{padding-inline-start:0}.projects-panel-wrapper .project-name__input{padding:0 calc(1rem*var(--scale-factor, 1))}.projects-panel-wrapper .projects-panel__item{margin-block-end:calc(1rem*var(--scale-factor, 1))}.projects-panel-wrapper .projects-panel__save,.projects-panel-wrapper .projects-panel__button{border-block-start:1px solid var(--sidebar-border);padding:calc(1rem*var(--scale-factor, 1)) 0;display:flex}.projects-panel-wrapper .projects-panel__save-button{inline-size:100%;margin-block-end:calc(1rem*var(--scale-factor, 1));justify-content:center}.projects-panel-wrapper .projects-panel__save-button .icon{display:none}.projects-panel-wrapper .projects-panel__save-button .content{margin:auto}.projects-panel-wrapper .projects-panel__save-button span{font-weight:bold}.projects-panel-wrapper .projects-panel__save-status{margin:auto;inline-size:fit-content}.--dark .projects-panel__save-button .content{color:#fff}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.project-info{align-items:inline-start;display:flex;flex-direction:column;padding:calc(1rem*var(--scale-factor, 1));border-radius:calc(.5rem*var(--scale-factor, 1));border:none;background-color:inherit}.project-info .btn--primary{margin:0 calc(.5rem*var(--scale-factor, 1))}.project-type__label{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));font-weight:700;margin-block-end:calc(.5rem*var(--scale-factor, 1));display:block}.project-type__text{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));color:inherit;text-overflow:ellipsis}.--light .project-info{background-color:#f1f2f3}.--dark .project-info{background-color:#4a4d59}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.project-images{display:grid;justify-content:center;gap:calc(1rem*var(--scale-factor, 1))}.project-images__block{display:inline-block;box-sizing:border-box;overflow-wrap:break-word;word-break:break-word;text-align:center;vertical-align:block-start}.project-images__image-wrapper{display:flex;align-items:center;justify-content:center}.project-images__image{block-size:auto;inline-size:100%}.project-images p{margin:0}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.download-panel__login-section{border-block-end:1px solid #d5d7dc;margin-block-end:calc(1.5rem*var(--scale-factor, 1));padding-block-end:calc(1.5rem*var(--scale-factor, 1))}.download-panel__subtitle{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1));font-weight:700;margin-block-end:calc(.5rem*var(--scale-factor, 1))}.download-panel__hint{margin:0;margin-block-end:calc(1rem*var(--scale-factor, 1))}.download-panel__button-container{display:flex;flex-direction:column;justify-content:center;align-self:stretch;gap:calc(1rem*var(--scale-factor, 1));align-items:stretch}.download-panel__button{justify-content:center;inline-size:100%;box-sizing:border-box;margin:0}.download-panel__download-section{margin-block-end:calc(1rem*var(--scale-factor, 1))}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,".progress-bar{accent-color:var(--editor-color-theme);display:flex;align-items:center;justify-content:center;max-inline-size:300px;margin:auto}.progress-bar progress{flex:1;min-inline-size:0px}.progress-bar .btn-outer{padding:calc(.5rem*var(--scale-factor, 1))}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r),o=n(58),s=n.n(o),a=n(84),l=n(85),c=i()(!1),u=s()(a.a),d=s()(l.a);c.push([e.i,':root{--rpf-brand-black: hsla(60, 4%, 11%, 1);--rpf-brand-leaf: hsla(123, 43%, 48%, 1);--rpf-brand-raspberry: hsla(342, 71%, 47%, 1)}:root{--space-0-125: 0.0625rem;--space-0-25: 0.125rem;--space-0-5: 0.25rem;--space-1: 0.5rem;--space-1-5: 0.75rem;--space-2: 1rem;--space-3: 1.5rem;--space-4: 2rem;--space-5: 2.5rem;--space-6: 3rem;--space-7: 3.5rem;--space-8: 4rem;--space-9: 4.5rem;--space-10: 5rem}.rpf-squiggle,.rpf-squiggle-heading::after,.project-instructions .c-project-heading--task::after{--rpf-squiggle-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xml%3Aspace%3D%22preserve%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%3Bstroke-linecap%3Around%3Bstroke-miterlimit%3A10%22%20viewBox%3D%220%200%2029%2013%22%20preserveAspectRatio%3D%22none%22%3E%3Cpath%20d%3D%22M3%2011c7%200%207-8%2014-8%208%200%208%208%2015%208%22%20style%3D%22fill%3Anone%3Bfill-rule%3Anonzero%3Bstroke%3Awhite%3Bstroke-width%3A4px%22%20transform%3D%22translate%28-3%29%22%2F%3E%3C%2Fsvg%3E");--rpf-squiggle-end-cap-l-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xml%3Aspace%3D%22preserve%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%22%20viewBox%3D%220%200%202%2013%22%3E%3Ccircle%20cx%3D%220%22%20cy%3D%2211%22%20r%3D%222%22%20style%3D%22fill%3Awhite%22%2F%3E%3C%2Fsvg%3E");--rpf-squiggle-end-cap-r-mask: url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20xml%3Aspace%3D%22preserve%22%20style%3D%22fill-rule%3Aevenodd%3Bclip-rule%3Aevenodd%22%20viewBox%3D%220%200%202%2013%22%3E%3Ccircle%20cx%3D%222%22%20cy%3D%2211%22%20r%3D%222%22%20style%3D%22fill%3Awhite%22%2F%3E%3C%2Fsvg%3E");background-color:var(--rpf-squiggle-color, var(--rpf-brand-raspberry));border:2px solid rgba(0,0,0,0);border-block:none;height:13px;mask-clip:content-box,border-box,border-box;mask-image:var(--rpf-squiggle-mask),var(--rpf-squiggle-end-cap-l-mask),var(--rpf-squiggle-end-cap-r-mask);mask-origin:content-box,border-box,border-box;mask-position:top left,top right,top left;mask-repeat:round,no-repeat,no-repeat;mask-size:29px 13px,2px 13px,2px 13px;-webkit-mask-clip:content-box,border-box,border-box;-webkit-mask-image:var(--rpf-squiggle-mask),var(--rpf-squiggle-end-cap-l-mask),var(--rpf-squiggle-end-cap-r-mask);-webkit-mask-origin:content-box,border-box,border-box;-webkit-mask-position:top left,top right,top left;-webkit-mask-repeat:round,no-repeat,no-repeat;-webkit-mask-size:29px 13px,2px 13px,2px 13px}.rpf-squiggle-heading,.project-instructions .c-project-heading--task{display:inline-block;position:relative;padding-bottom:calc(13px + var(--space-1))}.rpf-squiggle-heading::after,.project-instructions .c-project-heading--task::after{content:"";display:block;position:absolute;left:0;right:0;margin-top:var(--space-1)}:root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.project-instructions h2{font-size:calc(1.25rem*var(--scale-factor, 1));margin:0}.project-instructions strong{font-weight:700}.project-instructions img{max-inline-size:100%}.project-instructions table{border-collapse:collapse;margin-block-end:calc(1.5rem*var(--scale-factor, 1));inline-size:100%}.project-instructions table tr{border-block-end:1px solid #000}.project-instructions table td{padding:calc(.5rem*var(--scale-factor, 1)) calc(1.5rem*var(--scale-factor, 1))}.project-instructions pre{background-color:#33353d;border-radius:8px;padding:calc(.5rem*var(--scale-factor, 1));overflow:auto;margin:calc(1rem*var(--scale-factor, 1)) 0}.project-instructions code{color:#fff;background-color:#33353d;border-radius:8px;padding:calc(.75*.125rem*var(--scale-factor, 1)) calc(.5rem*var(--scale-factor, 1))}.project-instructions .c-project-code{margin:calc(1rem*var(--scale-factor, 1)) 0 calc(1.5rem*var(--scale-factor, 1)) 0;border-radius:8px;background-color:#33353d}.project-instructions .c-project-code pre{margin:0}.project-instructions .c-project-code code{padding-inline-start:0}.project-instructions .c-code-filename{font-family:monospace;margin:0;padding:calc(.5rem*var(--scale-factor, 1)) calc(1rem*var(--scale-factor, 1));color:#fff;background-color:#2a2b32;border-start-start-radius:8px;border-start-end-radius:8px;border-block-end:1px solid #4a4d59}.project-instructions .line-numbers{padding-inline-start:calc(3rem*var(--scale-factor, 1));padding-inline-end:calc(1rem*var(--scale-factor, 1))}.project-instructions .line-numbers-rows{border-color:#ccc}.project-instructions .line-numbers-rows span::before{padding-inline-end:calc(.5rem*var(--scale-factor, 1));color:#ccc}.project-instructions .line-highlight{margin-block-start:.5rem;background-color:#fff;mix-blend-mode:difference;min-inline-size:100%}.project-instructions .language-python .number,.project-instructions .language-python .boolean,.project-instructions .language-python .function{color:#9ee8ff}.project-instructions .language-python .keyword{color:#ecf}.project-instructions .language-python .string,.project-instructions .language-python .char{color:#94f9af}.project-instructions .language-python .comment{color:#ffca99}.project-instructions .language-python .keyword-print{color:#fff}.project-instructions .language-css{color:#9ee8ff}.project-instructions .language-css .comment{color:#ffca99}.project-instructions .language-css .selector{color:#ecf}.project-instructions .language-css .function{color:#ecf}.project-instructions .language-css .property,.project-instructions .language-css .punctuation{color:#fff}.project-instructions .language-html .tag{color:#ecf}.project-instructions .language-html .tag .punctuation,.project-instructions .language-html .tag .attr-name{color:#fff}.project-instructions .language-html .tag .attr-value{color:#94f9af}.project-instructions .language-html .tag .attr-value .punctuation{color:inherit}.project-instructions .language-html .tag .attr-value .attr-equals{color:#fff}.project-instructions .language-html .comment{color:#ffca99}.project-instructions .c-project-heading--task{--rpf-squiggle-color: var(--rpf-blue-800);background-color:#e5f4fd;padding:calc(1rem*var(--scale-factor, 1));inline-size:100%;box-sizing:border-box;border-start-start-radius:8px;border-start-end-radius:8px}.project-instructions .c-project-heading--task::after{margin-inline:calc(1rem*var(--scale-factor, 1));margin-block-start:calc(.25rem*var(--scale-factor, 1))}.project-instructions .c-project-task{background-color:#e5f4fd;padding:calc(1rem*var(--scale-factor, 1));display:flex;flex-direction:column;gap:calc(1rem*var(--scale-factor, 1));border-end-start-radius:8px;border-end-end-radius:8px;margin-block-end:calc(1.5rem*var(--scale-factor, 1))}.project-instructions .c-project-task p{margin:0}.project-instructions .c-project-task__checkbox{display:none}.project-instructions .c-project-callout{background-color:#e5f4fd;border-inline-start:4px solid #0090f0;padding:calc(.5rem*var(--scale-factor, 1)) calc(1rem*var(--scale-factor, 1));display:flex;flex-direction:column;gap:calc(.5rem*var(--scale-factor, 1));margin:calc(1.5rem*var(--scale-factor, 1)) 0}.project-instructions .c-project-callout h3{margin:0;padding-inline-start:calc(2rem*var(--scale-factor, 1));font-size:calc(1rem*var(--scale-factor, 1));background-repeat:no-repeat;background-position:inline-start calc(.5rem*var(--scale-factor, 1)) center}.project-instructions .c-project-callout p{margin:0}.project-instructions .c-project-callout--tip{background-color:#ecf7ed;border-inline-start:4px solid #46af4b}.project-instructions .c-project-callout--tip h3{background-image:url('+u+")}.project-instructions .c-project-callout--debug{background-color:#feeeed;border-inline-start:4px solid #f3514f}.project-instructions .c-project-callout--debug h3{background-image:url("+d+")}.project-instructions .c-project-output{display:flex;align-items:flex-start;align-self:stretch;padding:calc(1rem*var(--scale-factor, 1));border-radius:8px;border:1px solid var(--rpf-grey-150);margin-block-end:calc(1.5rem*var(--scale-factor, 1))}.project-instructions .c-project-output pre{padding:0;margin:0;inline-size:100%;background-color:#fff}.project-instructions .c-project-output code{background-color:#fff;color:#212121;padding:0;white-space:pre-wrap}",""])},function(e,t){"undefined"!=typeof Prism&&Prism.hooks.add("wrap",(function(e){"keyword"===e.type&&e.classes.push("keyword-"+e.content)}))},function(e,t){!function(){if("undefined"!=typeof Prism&&"undefined"!=typeof document&&document.querySelector){var e,t=/\n(?!$)/g,n=function(){if(void 0===e){var t=document.createElement("div");t.style.fontSize="13px",t.style.lineHeight="1.5",t.style.padding="0",t.style.border="0",t.innerHTML=" 
 ",document.body.appendChild(t),e=38===t.offsetHeight,document.body.removeChild(t)}return e},r=!0;Prism.plugins.lineHighlight={highlightLines:function(e,i,l){var c=(i="string"==typeof i?i:e.getAttribute("data-line")||"").replace(/\s+/g,"").split(",").filter(Boolean),u=+e.getAttribute("data-line-offset")||0,d=(n()?parseInt:parseFloat)(getComputedStyle(e).lineHeight),h=Prism.util.isActive(e,"line-numbers"),p=e.querySelector("code"),f=h?e:p||e,m=[],g=p.textContent.match(t),b=g?g.length+1:1,v=p&&f!=p?function(e,t){var n=getComputedStyle(e),r=getComputedStyle(t);function i(e){return+e.substr(0,e.length-2)}return t.offsetTop+i(r.borderTopWidth)+i(r.paddingTop)-i(n.paddingTop)}(e,p):0;c.forEach((function(t){var n=t.split("-"),r=+n[0],i=+n[1]||r;if(!((i=Math.min(b+u,i))r&&o.setAttribute("data-end",String(i)),o.style.top=(r-u-1)*d+v+"px",o.textContent=new Array(i-r+2).join(" \n")}));m.push((function(){o.style.width=e.scrollWidth+"px"})),m.push((function(){f.appendChild(o)}))}}));var y=e.id;if(h&&Prism.util.isActive(e,"linkable-line-numbers")&&y){s(e,"linkable-line-numbers")||m.push((function(){e.classList.add("linkable-line-numbers")}));var _=parseInt(e.getAttribute("data-start")||"1");o(".line-numbers-rows > span",e).forEach((function(e,t){var n=t+_;e.onclick=function(){var e=y+"."+n;r=!1,location.hash=e,setTimeout((function(){r=!0}),1)}}))}return function(){m.forEach(a)}}};var i=0;Prism.hooks.add("before-sanity-check",(function(e){var t=e.element.parentElement;if(l(t)){var n=0;o(".line-highlight",t).forEach((function(e){n+=e.textContent.length,e.parentNode.removeChild(e)})),n&&/^(?: \n)+$/.test(e.code.slice(-n))&&(e.code=e.code.slice(0,-n))}})),Prism.hooks.add("complete",(function e(t){var n=t.element.parentElement;if(l(n)){clearTimeout(i);var r=Prism.plugins.lineNumbers,o=t.plugins&&t.plugins.lineNumbers;if(s(n,"line-numbers")&&r&&!o)Prism.hooks.add("line-numbers",e);else Prism.plugins.lineHighlight.highlightLines(n)(),i=setTimeout(c,1)}})),window.addEventListener("hashchange",c),window.addEventListener("resize",(function(){o("pre").filter(l).map((function(e){return Prism.plugins.lineHighlight.highlightLines(e)})).forEach(a)}))}function o(e,t){return Array.prototype.slice.call((t||document).querySelectorAll(e))}function s(e,t){return e.classList.contains(t)}function a(e){e()}function l(e){return!(!e||!/pre/i.test(e.nodeName))&&(!!e.hasAttribute("data-line")||!(!e.id||!Prism.util.isActive(e,"linkable-line-numbers")))}function c(){var e=location.hash.slice(1);o(".temporary.line-highlight").forEach((function(e){e.parentNode.removeChild(e)}));var t=(e.match(/\.([\d,-]+)$/)||[,""])[1];if(t&&!document.getElementById(e)){var n=e.slice(0,e.lastIndexOf(".")),i=document.getElementById(n);if(i)i.hasAttribute("data-line")||i.setAttribute("data-line",""),Prism.plugins.lineHighlight.highlightLines(i,t,"temporary ")(),r&&document.querySelector(".temporary.line-highlight").scrollIntoView()}}}()},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,'pre[class*="language-"].line-numbers {\n\tposition: relative;\n\tpadding-left: 3.8em;\n\tcounter-reset: linenumber;\n}\n\npre[class*="language-"].line-numbers > code {\n\tposition: relative;\n\twhite-space: inherit;\n}\n\n.line-numbers .line-numbers-rows {\n\tposition: absolute;\n\tpointer-events: none;\n\ttop: 0;\n\tfont-size: 100%;\n\tleft: -3.8em;\n\twidth: 3em; /* works for line-numbers below 1000 lines */\n\tletter-spacing: -1px;\n\tborder-right: 1px solid #999;\n\n\t-webkit-user-select: none;\n\t-moz-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none;\n\n}\n\n\t.line-numbers-rows > span {\n\t\tdisplay: block;\n\t\tcounter-increment: linenumber;\n\t}\n\n\t\t.line-numbers-rows > span:before {\n\t\t\tcontent: counter(linenumber);\n\t\t\tcolor: #999;\n\t\t\tdisplay: block;\n\t\t\tpadding-right: 0.8em;\n\t\t\ttext-align: right;\n\t\t}\n',""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,"pre[data-line] {\n\tposition: relative;\n\tpadding: 1em 0 1em 3em;\n}\n\n.line-highlight {\n\tposition: absolute;\n\tleft: 0;\n\tright: 0;\n\tpadding: inherit 0;\n\tmargin-top: 1em; /* Same as .prism’s padding-top */\n\n\tbackground: hsla(24, 20%, 50%,.08);\n\tbackground: linear-gradient(to right, hsla(24, 20%, 50%,.1) 70%, hsla(24, 20%, 50%,0));\n\n\tpointer-events: none;\n\n\tline-height: inherit;\n\twhite-space: pre;\n}\n\n@media print {\n\t.line-highlight {\n\t\t/*\n\t\t * This will prevent browsers from replacing the background color with white.\n\t\t * It's necessary because the element is layered on top of the displayed code.\n\t\t */\n\t\t-webkit-print-color-adjust: exact;\n\t\tcolor-adjust: exact;\n\t}\n}\n\n\t.line-highlight:before,\n\t.line-highlight[data-end]:after {\n\t\tcontent: attr(data-start);\n\t\tposition: absolute;\n\t\ttop: .4em;\n\t\tleft: .6em;\n\t\tmin-width: 1em;\n\t\tpadding: 0 .5em;\n\t\tbackground-color: hsla(24, 20%, 50%,.4);\n\t\tcolor: hsl(24, 20%, 95%);\n\t\tfont: bold 65%/1.5 sans-serif;\n\t\ttext-align: center;\n\t\tvertical-align: .3em;\n\t\tborder-radius: 999px;\n\t\ttext-shadow: none;\n\t\tbox-shadow: 0 1px white;\n\t}\n\n\t.line-highlight[data-end]:after {\n\t\tcontent: attr(data-end);\n\t\ttop: auto;\n\t\tbottom: .4em;\n\t}\n\n.line-numbers .line-highlight:before,\n.line-numbers .line-highlight:after {\n\tcontent: none;\n}\n\npre[id].linkable-line-numbers span.line-numbers-rows {\n\tpointer-events: all;\n}\npre[id].linkable-line-numbers span.line-numbers-rows > span:before {\n\tcursor: pointer;\n}\npre[id].linkable-line-numbers span.line-numbers-rows > span:hover:before {\n\tbackground-color: rgba(128, 128, 128, .2);\n}\n",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,".editor{display:flex;flex-flow:column;flex:1;overflow:hidden}.editor .cm-editor{flex:1;overflow:hidden}.editor .cm-editor:focus{outline:none}.editor .cm-editor .cm-scroller{overflow:auto;overscroll-behavior-x:none}.editor .cm-editor .cm-scroller .cm-content{flex:1;padding-block-start:calc(.5rem*var(--scale-factor, 1));margin-inline-end:calc(.5rem*var(--scale-factor, 1))}.editor--small{font-size:calc(1rem*var(--scale-factor, 1));line-height:calc(1.5rem*var(--scale-factor, 1))}.editor--medium{font-size:calc(1.5rem*var(--scale-factor, 1));line-height:calc(2rem*var(--scale-factor, 1))}.editor--large{font-size:calc(2rem*var(--scale-factor, 1));line-height:calc(2.5rem*var(--scale-factor, 1))}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,"",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,"",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,"",""])},function(e,t,n){"use strict"; +/** + * @license React + * use-sync-external-store-shim.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var r=n(0);var i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useState,s=r.useEffect,a=r.useLayoutEffect,l=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),i=r[0].inst,u=r[1];return a((function(){i.value=n,i.getSnapshot=t,c(i)&&u({inst:i})}),[e,n,t]),s((function(){return c(i)&&u({inst:i}),e((function(){c(i)&&u({inst:i})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},function(e,t,n){"use strict"; +/** + * @license React + * use-sync-external-store-shim/with-selector.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var r=n(0),i=n(110);var o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=i.useSyncExternalStore,a=r.useRef,l=r.useEffect,c=r.useMemo,u=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var d=a(null);if(null===d.current){var h={hasValue:!1,value:null};d.current=h}else h=d.current;d=c((function(){function e(e){if(!l){if(l=!0,s=e,e=r(e),void 0!==i&&h.hasValue){var t=h.value;if(i(t,e))return a=t}return a=e}if(t=a,o(s,e))return t;var n=r(e);return void 0!==i&&i(t,n)?t:(s=e,a=n)}var s,a,l=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]}),[t,n,r,i]);var p=s(e,d[0],d[1]);return l((function(){h.hasValue=!0,h.value=p}),[p]),u(p),p}},function(e,t,n){"use strict"; +/** + * @license React + * react-is.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var r,i=Symbol.for("react.element"),o=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),u=Symbol.for("react.context"),d=Symbol.for("react.server_context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),b=Symbol.for("react.offscreen");function v(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case s:case l:case a:case p:case f:return e;default:switch(e=e&&e.$$typeof){case d:case u:case h:case g:case m:case c:return e;default:return t}}case o:return t}}}r=Symbol.for("react.module.reference"),t.ContextConsumer=u,t.ContextProvider=c,t.Element=i,t.ForwardRef=h,t.Fragment=s,t.Lazy=g,t.Memo=m,t.Portal=o,t.Profiler=l,t.StrictMode=a,t.Suspense=p,t.SuspenseList=f,t.isAsyncMode=function(){return!1},t.isConcurrentMode=function(){return!1},t.isContextConsumer=function(e){return v(e)===u},t.isContextProvider=function(e){return v(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return v(e)===h},t.isFragment=function(e){return v(e)===s},t.isLazy=function(e){return v(e)===g},t.isMemo=function(e){return v(e)===m},t.isPortal=function(e){return v(e)===o},t.isProfiler=function(e){return v(e)===l},t.isStrictMode=function(e){return v(e)===a},t.isSuspense=function(e){return v(e)===p},t.isSuspenseList=function(e){return v(e)===f},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===s||e===l||e===a||e===p||e===f||e===b||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===c||e.$$typeof===u||e.$$typeof===h||e.$$typeof===r||void 0!==e.getModuleId)},t.typeOf=v},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,".editor-input{display:flex;flex-direction:column;block-size:100%;inline-size:100%}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.mobile-project-bar{background-color:#fff;border-block-start:1px solid #d5d7dc;display:flex;block-size:25px;justify-content:space-between;padding:0 calc(.5rem*var(--scale-factor, 1))}.mobile-project-bar__name{font-size:calc(.75rem*var(--scale-factor, 1));line-height:calc(1rem*var(--scale-factor, 1));font-weight:700;margin:auto 0}.--dark .mobile-project-bar{background-color:#2a2b32;border-block-start:1px solid #4a4d59}.--dark .mobile-project-bar__name{color:#fff}.--light .mobile-project-bar{background-color:#fff;border-block-start:1px solid #d5d7dc}.--light .mobile-project-bar__name{color:#4d575b}",""])},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}.proj-container--mobile{margin:0;gap:0}#app .proj-container--mobile .react-tabs{border-radius:0}#wc .proj-container--mobile{border-radius:8px}#app .mobile-nav,#wc .mobile-nav{display:flex;inline-size:100%}#app .mobile-nav .react-tabs__tab-list,#wc .mobile-nav .react-tabs__tab-list{padding:0}#app .mobile-nav .react-tabs__tab,#wc .mobile-nav .react-tabs__tab{flex:1;display:flex;block-size:calc(4rem*var(--scale-factor, 1))}#app .mobile-nav .react-tabs__tab:last-of-type,#wc .mobile-nav .react-tabs__tab:last-of-type{border-inline-end:none}.mobile-nav__menu{margin:0;border-radius:0;border:none;display:flex;align-items:center;justify-content:center;inline-size:calc(4rem*var(--scale-factor, 1))}.--dark .proj-container--mobile .runner-controls{border-inline-start:1px solid #4a4d59}.--dark .proj-container--mobile .mobile-nav{background-color:#2a2b32;border-block-start:1px solid #4a4d59}.--dark .proj-container--mobile .mobile-nav__menu{border-inline-end:1px solid #4a4d59}.--light .proj-container--mobile .runner-controls{border-inline-start:1px solid #d5d7dc}.--light .proj-container--mobile .mobile-nav{background-color:#f5f6f9;border-block-start:1px solid #d5d7dc}.--light .proj-container--mobile .mobile-nav__menu{border-inline-end:1px solid #d5d7dc}#app.--light .mobile-nav,#app.--dark .mobile-nav,#wc.--light .mobile-nav,#wc.--dark .mobile-nav{border-block-end:none}#app.--light .mobile-nav .react-tabs__tab--selected,#app.--dark .mobile-nav .react-tabs__tab--selected,#wc.--light .mobile-nav .react-tabs__tab--selected,#wc.--dark .mobile-nav .react-tabs__tab--selected{background-color:inherit}#wc.--light .proj-container--mobile{border:1px solid #d5d7dc}#wc.--dark .proj-container--mobile{border:1px solid #4a4d59}",""])},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bodyOpenClassName=t.portalClassName=void 0;var r=Object.assign||function(e){for(var t=1;t0&&0===(v-=1)&&u.show(t),n.props.shouldFocusAfterRender&&(n.props.shouldReturnFocusAfterClose?(l.returnFocus(n.props.preventScroll),l.teardownScopedFocus()):l.popWithoutFocus()),n.props.onAfterClose&&n.props.onAfterClose(),f.default.deregister(n)},n.open=function(){n.beforeOpen(),n.state.afterOpen&&n.state.beforeClose?(clearTimeout(n.closeTimer),n.setState({beforeClose:!1})):(n.props.shouldFocusAfterRender&&(l.setupScopedFocus(n.node),l.markForFocusLater()),n.setState({isOpen:!0},(function(){n.openAnimationFrame=requestAnimationFrame((function(){n.setState({afterOpen:!0}),n.props.isOpen&&n.props.onAfterOpen&&n.props.onAfterOpen({overlayEl:n.overlay,contentEl:n.content})}))})))},n.close=function(){n.props.closeTimeoutMS>0?n.closeWithTimeout():n.closeWithoutTimeout()},n.focusContent=function(){return n.content&&!n.contentHasFocus()&&n.content.focus({preventScroll:!0})},n.closeWithTimeout=function(){var e=Date.now()+n.props.closeTimeoutMS;n.setState({beforeClose:!0,closesAt:e},(function(){n.closeTimer=setTimeout(n.closeWithoutTimeout,n.state.closesAt-Date.now())}))},n.closeWithoutTimeout=function(){n.setState({beforeClose:!1,isOpen:!1,afterOpen:!1,closesAt:null},n.afterClose)},n.handleKeyDown=function(e){(function(e){return"Tab"===e.code||9===e.keyCode})(e)&&(0,c.default)(n.content,e),n.props.shouldCloseOnEsc&&function(e){return"Escape"===e.code||27===e.keyCode}(e)&&(e.stopPropagation(),n.requestClose(e))},n.handleOverlayOnClick=function(e){null===n.shouldClose&&(n.shouldClose=!0),n.shouldClose&&n.props.shouldCloseOnOverlayClick&&(n.ownerHandlesClose()?n.requestClose(e):n.focusContent()),n.shouldClose=null},n.handleContentOnMouseUp=function(){n.shouldClose=!1},n.handleOverlayOnMouseDown=function(e){n.props.shouldCloseOnOverlayClick||e.target!=n.overlay||e.preventDefault()},n.handleContentOnClick=function(){n.shouldClose=!1},n.handleContentOnMouseDown=function(){n.shouldClose=!1},n.requestClose=function(e){return n.ownerHandlesClose()&&n.props.onRequestClose(e)},n.ownerHandlesClose=function(){return n.props.onRequestClose},n.shouldBeClosed=function(){return!n.state.isOpen&&!n.state.beforeClose},n.contentHasFocus=function(){return document.activeElement===n.content||n.content.contains(document.activeElement)},n.buildClassName=function(e,t){var r="object"===(void 0===t?"undefined":i(t))?t:{base:b[e],afterOpen:b[e]+"--after-open",beforeClose:b[e]+"--before-close"},o=r.base;return n.state.afterOpen&&(o=o+" "+r.afterOpen),n.state.beforeClose&&(o=o+" "+r.beforeClose),"string"==typeof t&&t?o+" "+t:o},n.attributesFromObject=function(e,t){return Object.keys(t).reduce((function(n,r){return n[e+"-"+r]=t[r],n}),{})},n.state={afterOpen:!1,beforeClose:!1},n.shouldClose=null,n.moveFromContentToOverlay=null,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"componentDidMount",value:function(){this.props.isOpen&&this.open()}},{key:"componentDidUpdate",value:function(e,t){this.props.isOpen&&!e.isOpen?this.open():!this.props.isOpen&&e.isOpen&&this.close(),this.props.shouldFocusAfterRender&&this.state.isOpen&&!t.isOpen&&this.focusContent()}},{key:"componentWillUnmount",value:function(){this.state.isOpen&&this.afterClose(),clearTimeout(this.closeTimer),cancelAnimationFrame(this.openAnimationFrame)}},{key:"beforeOpen",value:function(){var e=this.props,t=e.appElement,n=e.ariaHideApp,r=e.htmlOpenClassName,i=e.bodyOpenClassName,o=e.parentSelector,s=o&&o().ownerDocument||document;i&&d.add(s.body,i),r&&d.add(s.getElementsByTagName("html")[0],r),n&&(v+=1,u.hide(t)),f.default.register(this)}},{key:"render",value:function(){var e=this.props,t=e.id,n=e.className,i=e.overlayClassName,o=e.defaultStyles,s=e.children,a=n?{}:o.content,l=i?{}:o.overlay;if(this.shouldBeClosed())return null;var c={ref:this.setOverlayRef,className:this.buildClassName("overlay",i),style:r({},l,this.props.style.overlay),onClick:this.handleOverlayOnClick,onMouseDown:this.handleOverlayOnMouseDown},u=r({id:t,ref:this.setContentRef,style:r({},a,this.props.style.content),className:this.buildClassName("content",n),tabIndex:"-1",onKeyDown:this.handleKeyDown,onMouseDown:this.handleContentOnMouseDown,onMouseUp:this.handleContentOnMouseUp,onClick:this.handleContentOnClick,role:this.props.role,"aria-label":this.props.contentLabel},this.attributesFromObject("aria",r({modal:!0},this.props.aria)),this.attributesFromObject("data",this.props.data||{}),{"data-testid":this.props.testId}),d=this.props.contentElement(u,s);return this.props.overlayElement(c,d)}}]),t}(s.Component);y.defaultProps={style:{overlay:{},content:{}},defaultStyles:{}},y.propTypes={isOpen:a.default.bool.isRequired,defaultStyles:a.default.shape({content:a.default.object,overlay:a.default.object}),style:a.default.shape({content:a.default.object,overlay:a.default.object}),className:a.default.oneOfType([a.default.string,a.default.object]),overlayClassName:a.default.oneOfType([a.default.string,a.default.object]),parentSelector:a.default.func,bodyOpenClassName:a.default.string,htmlOpenClassName:a.default.string,ariaHideApp:a.default.bool,appElement:a.default.oneOfType([a.default.instanceOf(p.default),a.default.instanceOf(h.SafeHTMLCollection),a.default.instanceOf(h.SafeNodeList),a.default.arrayOf(a.default.instanceOf(p.default))]),onAfterOpen:a.default.func,onAfterClose:a.default.func,onRequestClose:a.default.func,closeTimeoutMS:a.default.number,shouldFocusAfterRender:a.default.bool,shouldCloseOnOverlayClick:a.default.bool,shouldReturnFocusAfterClose:a.default.bool,preventScroll:a.default.bool,role:a.default.string,contentLabel:a.default.string,aria:a.default.object,data:a.default.object,children:a.default.node,shouldCloseOnEsc:a.default.bool,overlayRef:a.default.func,contentRef:a.default.func,id:a.default.string,overlayElement:a.default.func,contentElement:a.default.func,testId:a.default.string},t.default=y,e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){s=[]},t.log=function(){0},t.handleBlur=c,t.handleFocus=u,t.markForFocusLater=function(){s.push(document.activeElement)},t.returnFocus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=null;try{return void(0!==s.length&&(t=s.pop()).focus({preventScroll:e}))}catch(e){console.warn(["You tried to return focus to",t,"but it is not in the DOM anymore"].join(" "))}},t.popWithoutFocus=function(){s.length>0&&s.pop()},t.setupScopedFocus=function(e){a=e,window.addEventListener?(window.addEventListener("blur",c,!1),document.addEventListener("focus",u,!0)):(window.attachEvent("onBlur",c),document.attachEvent("onFocus",u))},t.teardownScopedFocus=function(){a=null,window.addEventListener?(window.removeEventListener("blur",c),document.removeEventListener("focus",u)):(window.detachEvent("onBlur",c),document.detachEvent("onFocus",u))};var r,i=n(163),o=(r=i)&&r.__esModule?r:{default:r};var s=[],a=null,l=!1;function c(){l=!0}function u(){if(l){if(l=!1,!a)return;setTimeout((function(){a.contains(document.activeElement)||((0,o.default)(a)[0]||a).focus()}),0)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=(0,o.default)(e);if(!n.length)return void t.preventDefault();var r=void 0,i=t.shiftKey,s=n[0],a=n[n.length-1],l=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;return t.activeElement.shadowRoot?e(t.activeElement.shadowRoot):t.activeElement}();if(e===l){if(!i)return;r=a}a!==l||i||(r=s);s===l&&i&&(r=a);if(r)return t.preventDefault(),void r.focus();var c=/(\bChrome\b|\bSafari\b)\//.exec(navigator.userAgent);if(null==c||"Chrome"==c[1]||null!=/\biPod\b|\biPad\b/g.exec(navigator.userAgent))return;var u=n.indexOf(l);u>-1&&(u+=i?-1:1);if(void 0===(r=n[u]))return t.preventDefault(),void(r=i?a:s).focus();t.preventDefault(),r.focus()};var r,i=n(163),o=(r=i)&&r.__esModule?r:{default:r};e.exports=t.default},function(e,t,n){"use strict";var r=function(){};e.exports=r},function(e,t,n){var r; +/*! + Copyright (c) 2015 Jed Watson. + Based on code that is Copyright 2013-2015, Facebook, Inc. + All rights reserved. +*/!function(){"use strict";var i=!("undefined"==typeof window||!window.document||!window.document.createElement),o={canUseDOM:i,canUseWorkers:"undefined"!=typeof Worker,canUseEventListeners:i&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:i&&!!window.screen};void 0===(r=function(){return o}.call(t,n,t,e))||(e.exports=r)}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){var e=document.getElementsByTagName("html")[0];for(var t in r)o(e,r[t]);var n=document.body;for(var s in i)o(n,i[s]);r={},i={}},t.log=function(){0};var r={},i={};function o(e,t){e.classList.remove(t)}t.add=function(e,t){return n=e.classList,o="html"==e.nodeName.toLowerCase()?r:i,void t.split(" ").forEach((function(e){!function(e,t){e[t]||(e[t]=0),e[t]+=1}(o,e),n.add(e)}));var n,o},t.remove=function(e,t){return n=e.classList,o="html"==e.nodeName.toLowerCase()?r:i,void t.split(" ").forEach((function(e){!function(e,t){e[t]&&(e[t]-=1)}(o,e),0===o[e]&&n.remove(e)}));var n,o}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resetState=function(){for(var e=[s,a],t=0;t0?(document.body.firstChild!==s&&document.body.insertBefore(s,document.body.firstChild),document.body.lastChild!==a&&document.body.appendChild(a)):(s.parentElement&&s.parentElement.removeChild(s),a.parentElement&&a.parentElement.removeChild(a))}))},function(e,t,n){"use strict";function r(){var e=this.constructor.getDerivedStateFromProps(this.props,this.state);null!=e&&this.setState(e)}function i(e){this.setState(function(t){var n=this.constructor.getDerivedStateFromProps(e,t);return null!=n?n:null}.bind(this))}function o(e,t){try{var n=this.props,r=this.state;this.props=e,this.state=t,this.__reactInternalSnapshotFlag=!0,this.__reactInternalSnapshot=this.getSnapshotBeforeUpdate(n,r)}finally{this.props=n,this.state=r}}function s(e){var t=e.prototype;if(!t||!t.isReactComponent)throw new Error("Can only polyfill class components");if("function"!=typeof e.getDerivedStateFromProps&&"function"!=typeof t.getSnapshotBeforeUpdate)return e;var n=null,s=null,a=null;if("function"==typeof t.componentWillMount?n="componentWillMount":"function"==typeof t.UNSAFE_componentWillMount&&(n="UNSAFE_componentWillMount"),"function"==typeof t.componentWillReceiveProps?s="componentWillReceiveProps":"function"==typeof t.UNSAFE_componentWillReceiveProps&&(s="UNSAFE_componentWillReceiveProps"),"function"==typeof t.componentWillUpdate?a="componentWillUpdate":"function"==typeof t.UNSAFE_componentWillUpdate&&(a="UNSAFE_componentWillUpdate"),null!==n||null!==s||null!==a){var l=e.displayName||e.name,c="function"==typeof e.getDerivedStateFromProps?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";throw Error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n"+l+" uses "+c+" but also contains the following legacy lifecycles:"+(null!==n?"\n "+n:"")+(null!==s?"\n "+s:"")+(null!==a?"\n "+a:"")+"\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://fb.me/react-async-component-lifecycle-hooks")}if("function"==typeof e.getDerivedStateFromProps&&(t.componentWillMount=r,t.componentWillReceiveProps=i),"function"==typeof t.getSnapshotBeforeUpdate){if("function"!=typeof t.componentDidUpdate)throw new Error("Cannot polyfill getSnapshotBeforeUpdate() for components that do not define componentDidUpdate() on the prototype");t.componentWillUpdate=o;var u=t.componentDidUpdate;t.componentDidUpdate=function(e,t,n){var r=this.__reactInternalSnapshotFlag?this.__reactInternalSnapshot:n;u.call(this,e,t,r)}}return e}n.r(t),n.d(t,"polyfill",(function(){return s})),r.__suppressDeprecationWarning=!0,i.__suppressDeprecationWarning=!0,o.__suppressDeprecationWarning=!0},function(e,t,n){"use strict";var r=n(2),i=n.n(r)()(!1);i.push([e.i,":root{--rpf-white: #ffffff}:export{grey-rpi-grey-15:#d5d7dc;grey-rpi-grey-40:#9497a4;grey-rpi-grey-5:#f1f2f3;grey-rpi-grey-70:#4a4d59;grey-rpf-white:#fff}#app .toast--bottom-center__message,#app .toast--top-center__message,#wc .toast--bottom-center__message,#wc .toast--top-center__message{min-block-size:fit-content;padding:calc(.25rem*var(--scale-factor, 1)) calc(.5rem*var(--scale-factor, 1));margin:0}#app .toast--bottom-center,#wc .toast--bottom-center{font-size:calc(.75rem*var(--scale-factor, 1));line-height:calc(1rem*var(--scale-factor, 1));inline-size:fit-content;max-inline-size:100%;inset-block-end:1em;padding:4px;inset-inline-start:50%;transform:translateX(-50%);white-space:nowrap}#app .toast--bottom-center .Toastify__toast-icon,#wc .toast--bottom-center .Toastify__toast-icon{margin-block:0;margin-inline:calc(.25rem*var(--scale-factor, 1)) 0}#app .toast--bottom-center__message,#wc .toast--bottom-center__message{border-radius:20px}#app .toast--top-center,#wc .toast--top-center{max-inline-size:fit-content;inline-size:100%;font-weight:700;inset-block-start:20%;z-index:1}#app .toast--top-center .Toastify__toast-icon,#wc .toast--top-center .Toastify__toast-icon{inline-size:fit-content}#app .toast--top-center__message,#wc .toast--top-center__message{background-color:#fff;border-radius:25px}#app .toast--info,#wc .toast--info{color:#1e398a;border:2px solid #1e398a}#app .toast--info svg,#wc .toast--info svg{fill:#17181c}#app .toast--info .Toastify__toast-icon svg,#wc .toast--info .Toastify__toast-icon svg{fill:#1e398a}#app.--dark .toast--bottom-center__message,#wc.--dark .toast--bottom-center__message{background-color:#fff;color:#17181c}#app.--dark .toast--bottom-center__message svg,#wc.--dark .toast--bottom-center__message svg{fill:#17181c}#app.--light .toast--bottom-center__message,#wc.--light .toast--bottom-center__message{background-color:#17181c;color:#fff}#app.--light .toast--bottom-center__message svg,#wc.--light .toast--bottom-center__message svg{fill:#fff}",""])},function(e,t,n){"use strict";n.r(t);var r={};n.r(r),n.d(r,"FunctionToString",(function(){return d})),n.d(r,"InboundFilters",(function(){return E}));var i=n(0),o=n.n(i),s=n(14),a=n.n(s),l=n(166);var c=n(26);let u;class d{constructor(){d.prototype.__init.call(this)}static __initStatic(){this.id="FunctionToString"}__init(){this.name=d.id}setupOnce(){u=Function.prototype.toString,Function.prototype.toString=function(...e){const t=Object(c.f)(this)||this;return u.apply(t,e)}}}d.__initStatic();var h=n(39);const p=["debug","info","warn","error","log","assert","trace"];function f(e){if(!("console"in h.a))return e();const t=h.a.console,n={};p.forEach(e=>{const r=t[e]&&t[e].__sentry_original__;e in t&&r&&(n[e]=t[e],t[e]=r)});try{return e()}finally{Object.keys(n).forEach(e=>{t[e]=n[e]})}}function m(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1}};return"undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?p.forEach(n=>{t[n]=(...t)=>{e&&f(()=>{h.a.console[n](`Sentry Logger [${n}]:`,...t)})}}):p.forEach(e=>{t[e]=()=>{}}),t}let g;g="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?Object(h.b)("logger",m):m();var b=n(51);function v(){const e=h.a,t=e.crypto||e.msCrypto;if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");const n=t&&t.getRandomValues?()=>t.getRandomValues(new Uint8Array(1))[0]:()=>16*Math.random();return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,e=>(e^(15&n())>>e/4).toString(16))}function y(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function _(e){const{message:t,event_id:n}=e;if(t)return t;const r=y(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function S(e,t,n){const r=e.exception=e.exception||{},i=r.values=r.values||[],o=i[0]=i[0]||{};o.value||(o.value=t||""),o.type||(o.type=n||"Error")}function x(e,t){const n=y(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r&&r.data,...t.data};n.mechanism.data=e}}function w(e){if(e&&e.__sentry_captured__)return!0;try{Object(c.a)(e,"__sentry_captured__",!0)}catch(e){}return!1}function k(e){return Array.isArray(e)?e:[e]}const O=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/];class E{static __initStatic(){this.id="InboundFilters"}__init(){this.name=E.id}constructor(e={}){this._options=e,E.prototype.__init.call(this)}setupOnce(e,t){const n=e=>{const n=t();if(n){const t=n.getIntegration(E);if(t){const r=n.getClient(),i=r?r.getOptions():{};return function(e,t){if(t.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(e){}return!1}(e))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&g.warn("Event dropped due to being internal Sentry Error.\nEvent: "+_(e)),!0;if(function(e,t){if(!t||!t.length)return!1;return function(e){if(e.message)return[e.message];if(e.exception)try{const{type:t="",value:n=""}=e.exception.values&&e.exception.values[0]||{};return[""+n,`${t}: ${n}`]}catch(t){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&g.error("Cannot extract message for event "+_(e)),[]}return[]}(e).some(e=>t.some(t=>Object(b.a)(e,t)))}(e,t.ignoreErrors))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&g.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: "+_(e)),!0;if(function(e,t){if(!t||!t.length)return!1;const n=A(e);return!!n&&t.some(e=>Object(b.a)(n,e))}(e,t.denyUrls))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&g.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${_(e)}.\nUrl: ${A(e)}`),!0;if(!function(e,t){if(!t||!t.length)return!0;const n=A(e);return!n||t.some(e=>Object(b.a)(n,e))}(e,t.allowUrls))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&g.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${_(e)}.\nUrl: ${A(e)}`),!0;return!1}(e,function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...O],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(t._options,i))?null:e}}return e};n.id=this.name,e(n)}}function A(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch(e){}return t?function(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&""!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(t):null}catch(t){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&g.error("Cannot extract url for event "+_(e)),null}}E.__initStatic();var T,C=n(191),M=n(115),P=n(18);function $(e){return new I(t=>{t(e)})}function R(e){return new I((t,n)=>{n(e)})}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(T||(T={}));class I{__init(){this._state=T.PENDING}__init2(){this._handlers=[]}constructor(e){I.prototype.__init.call(this),I.prototype.__init2.call(this),I.prototype.__init3.call(this),I.prototype.__init4.call(this),I.prototype.__init5.call(this),I.prototype.__init6.call(this);try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new I((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()})}catch(e){return this.then(e=>e,e)}finally(e){return new I((t,n)=>{let r,i;return this.then(t=>{i=!1,r=t,e&&e()},t=>{i=!0,r=t,e&&e()}).then(()=>{i?n(r):t(r)})})}__init3(){this._resolve=e=>{this._setResult(T.RESOLVED,e)}}__init4(){this._reject=e=>{this._setResult(T.REJECTED,e)}}__init5(){this._setResult=(e,t)=>{this._state===T.PENDING&&(Object(P.n)(t)?t.then(this._resolve,this._reject):(this._state=e,this._value=t,this._executeHandlers()))}}__init6(){this._executeHandlers=()=>{if(this._state===T.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach(e=>{e[0]||(this._state===T.RESOLVED&&e[1](this._value),this._state===T.REJECTED&&e[2](this._value),e[0]=!0)})}}}function D(e){const t=Object(C.b)(),n={sid:v(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(e){return Object(c.c)({sid:""+e.sid,init:e.init,started:new Date(1e3*e.started).toISOString(),timestamp:new Date(1e3*e.timestamp).toISOString(),status:e.status,errors:e.errors,did:"number"==typeof e.did||"string"==typeof e.did?""+e.did:void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}(n)};return e&&N(n,e),n}function N(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),e.did||t.did||(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Object(C.b)(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:v()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=""+t.did),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}class j{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(e){const t=new j;return e&&(t._breadcrumbs=[...e._breadcrumbs],t._tags={...e._tags},t._extra={...e._extra},t._contexts={...e._contexts},t._user=e._user,t._level=e._level,t._span=e._span,t._session=e._session,t._transactionName=e._transactionName,t._fingerprint=e._fingerprint,t._eventProcessors=[...e._eventProcessors],t._requestSession=e._requestSession,t._attachments=[...e._attachments]),t}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{},this._session&&N(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts={...this._contexts,[e]:t},this._notifyScopeListeners(),this}setSpan(e){return this._span=e,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const e=this.getSpan();return e&&e.transaction}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;if("function"==typeof e){const t=e(this);return t instanceof j?t:this}return e instanceof j?(this._tags={...this._tags,...e._tags},this._extra={...this._extra,...e._extra},this._contexts={...this._contexts,...e._contexts},e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession)):Object(P.i)(e)&&(e=e,this._tags={...this._tags,...e.tags},this._extra={...this._extra,...e.extra},this._contexts={...this._contexts,...e.contexts},e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession)),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:Object(C.a)(),...e};return this._breadcrumbs=[...this._breadcrumbs,r].slice(-n),this._notifyScopeListeners(),this}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(e,t={}){if(this._extra&&Object.keys(this._extra).length&&(e.extra={...this._extra,...e.extra}),this._tags&&Object.keys(this._tags).length&&(e.tags={...this._tags,...e.tags}),this._user&&Object.keys(this._user).length&&(e.user={...this._user,...e.user}),this._contexts&&Object.keys(this._contexts).length&&(e.contexts={...this._contexts,...e.contexts}),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts={trace:this._span.getTraceContext(),...e.contexts};const t=this._span.transaction&&this._span.transaction.name;t&&(e.tags={transaction:t,...e.tags})}return this._applyFingerprint(e),e.breadcrumbs=[...e.breadcrumbs||[],...this._breadcrumbs],e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...L(),...this._eventProcessors],e,t)}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...e},this}_notifyEventProcessors(e,t,n,r=0){return new I((i,o)=>{const s=e[r];if(null===t||"function"!=typeof s)i(t);else{const a=s({...t},n);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&s.id&&null===a&&g.log(`Event processor "${s.id}" dropped event`),Object(P.n)(a)?a.then(t=>this._notifyEventProcessors(e,t,n,r+1).then(i)).then(null,o):this._notifyEventProcessors(e,a,n,r+1).then(i).then(null,o)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(e=>{e(this)}),this._notifyingListeners=!1)}_applyFingerprint(e){e.fingerprint=e.fingerprint?k(e.fingerprint):[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}}function L(){return Object(h.b)("globalEventProcessors",()=>[])}function B(e){L().push(e)}const F=100;class z{__init(){this._stack=[{}]}constructor(e,t=new j,n=4){this._version=n,z.prototype.__init.call(this),this.getStackTop().scope=t,e&&this.bindClient(e)}isOlderThan(e){return this._version{i.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},o)}),n}captureMessage(e,t,n){const r=this._lastEventId=n&&n.event_id?n.event_id:v(),i=new Error(e);return this._withClient((o,s)=>{o.captureMessage(e,t,{originalException:e,syntheticException:i,...n,event_id:r},s)}),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:v();return"transaction"!==e.type&&(this._lastEventId=n),this._withClient((r,i)=>{r.captureEvent(e,{...t,event_id:n},i)}),n}lastEventId(){return this._lastEventId}addBreadcrumb(e,t){const{scope:n,client:r}=this.getStackTop();if(!n||!r)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=F}=r.getOptions&&r.getOptions()||{};if(o<=0)return;const s={timestamp:Object(C.a)(),...e},a=i?f(()=>i(s,t)):s;null!==a&&n.addBreadcrumb(a,o)}setUser(e){const t=this.getScope();t&&t.setUser(e)}setTags(e){const t=this.getScope();t&&t.setTags(e)}setExtras(e){const t=this.getScope();t&&t.setExtras(e)}setTag(e,t){const n=this.getScope();n&&n.setTag(e,t)}setExtra(e,t){const n=this.getScope();n&&n.setExtra(e,t)}setContext(e,t){const n=this.getScope();n&&n.setContext(e,t)}configureScope(e){const{scope:t,client:n}=this.getStackTop();t&&n&&e(t)}run(e){const t=Q(this);try{e(this)}finally{Q(t)}}getIntegration(e){const t=this.getClient();if(!t)return null;try{return t.getIntegration(e)}catch(t){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&g.warn(`Cannot retrieve integration ${e.id} from the current Hub`),null}}startTransaction(e,t){return this._callExtensionMethod("startTransaction",e,t)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(e=!1){if(e)return this.endSession();this._sendSessionUpdate()}endSession(){const e=this.getStackTop(),t=e&&e.scope,n=t&&t.getSession();n&&function(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),N(e,n)}(n),this._sendSessionUpdate(),t&&t.setSession()}startSession(e){const{scope:t,client:n}=this.getStackTop(),{release:r,environment:i}=n&&n.getOptions()||{},{userAgent:o}=h.a.navigator||{},s=D({release:r,environment:i,...t&&{user:t.getUser()},...o&&{userAgent:o},...e});if(t){const e=t.getSession&&t.getSession();e&&"ok"===e.status&&N(e,{status:"exited"}),this.endSession(),t.setSession(s)}return s}shouldSendDefaultPii(){const e=this.getClient(),t=e&&e.getOptions();return Boolean(t&&t.sendDefaultPii)}_sendSessionUpdate(){const{scope:e,client:t}=this.getStackTop();if(!e)return;const n=e.getSession();n&&t&&t.captureSession&&t.captureSession(n)}_withClient(e){const{scope:t,client:n}=this.getStackTop();n&&e(n,t)}_callExtensionMethod(e,...t){const n=U().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[e])return n.extensions[e].apply(this,t);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&g.warn(`Extension method ${e} couldn't be found, doing nothing.`)}}function U(){return h.a.__SENTRY__=h.a.__SENTRY__||{extensions:{},hub:void 0},h.a}function Q(e){const t=U(),n=G(t);return V(t,e),n}function q(){const e=U();return H(e)&&!G(e).isOlderThan(4)||V(e,new z),Object(M.b)()?function(e){try{const t=U().__SENTRY__,n=t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active;if(!n)return G(e);if(!H(n)||G(n).isOlderThan(4)){const t=G(e).getStackTop();V(n,new z(t.client,j.clone(t.scope)))}return G(n)}catch(t){return G(e)}}(e):G(e)}function H(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function G(e){return Object(h.b)("hub",()=>new z,e)}function V(e,t){if(!e)return!1;return(e.__SENTRY__=e.__SENTRY__||{}).hub=t,!0}const W=[];function X(e){const t=e.defaultIntegrations||[],n=e.integrations;let r;t.forEach(e=>{e.isDefaultInstance=!0}),r=Array.isArray(n)?[...t,...n]:"function"==typeof n?k(n(t)):t;const i=function(e){const t={};return e.forEach(e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)}),Object.values(t)}(r),o=i.findIndex(e=>"Debug"===e.name);if(-1!==o){const[e]=i.splice(o,1);i.push(e)}return i}class Y extends Error{constructor(e,t="warn"){super(e),this.message=e,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=t}}const Z=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function J(e,t=!1){const{host:n,path:r,pass:i,port:o,projectId:s,protocol:a,publicKey:l}=e;return`${a}://${l}${t&&i?":"+i:""}@${n}${o?":"+o:""}/${r?r+"/":r}${s}`}function K(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function ee(e){const t="string"==typeof e?function(e){const t=Z.exec(e);if(!t)throw new Y("Invalid Sentry Dsn: "+e);const[n,r,i="",o,s="",a]=t.slice(1);let l="",c=a;const u=c.split("/");if(u.length>1&&(l=u.slice(0,-1).join("/"),c=u.pop()),c){const e=c.match(/^\d+/);e&&(c=e[0])}return K({host:o,pass:i,path:l,projectId:c,port:s,protocol:n,publicKey:r})}(e):K(e);return function(e){if("undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__)return;const{port:t,projectId:n,protocol:r}=e;if(["protocol","publicKey","host","projectId"].forEach(t=>{if(!e[t])throw new Y(`Invalid Sentry Dsn: ${t} missing`)}),!n.match(/^\d+$/))throw new Y("Invalid Sentry Dsn: Invalid projectId "+n);if(!function(e){return"http"===e||"https"===e}(r))throw new Y("Invalid Sentry Dsn: Invalid protocol "+r);if(t&&isNaN(parseInt(t,10)))throw new Y("Invalid Sentry Dsn: Invalid port "+t)}(t),t}function te(e){const t=e.protocol?e.protocol+":":"",n=e.port?":"+e.port:"";return`${t}//${e.host}${n}${e.path?"/"+e.path:""}/api/`}function ne(e,t={}){const n="string"==typeof t?t:t.tunnel,r="string"!=typeof t&&t._metadata?t._metadata.sdk:void 0;return n||`${function(e){return`${te(e)}${e.projectId}/envelope/`}(e)}?${function(e,t){return Object(c.h)({sentry_key:e.publicKey,sentry_version:"7",...t&&{sentry_client:`${t.name}/${t.version}`}})}(e,r)}`}var re=n(8),ie=n(88);function oe(){if(!("fetch"in re.a))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}function se(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}const ae={},le={};function ce(e){if(!le[e])switch(le[e]=!0,e){case"console":!function(){if(!("console"in re.a))return;p.forEach((function(e){e in re.a.console&&Object(c.e)(re.a.console,e,(function(t){return function(...n){de("console",{args:n,level:e}),t&&t.apply(re.a.console,n)}}))}))}();break;case"dom":!function(){if(!("document"in re.a))return;const e=de.bind(null,"dom"),t=be(e,!0);re.a.document.addEventListener("click",t,!1),re.a.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(t=>{const n=re.a[t]&&re.a[t].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(Object(c.e)(n,"addEventListener",(function(t){return function(n,r,i){if("click"===n||"keypress"==n)try{const r=this,o=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},s=o[n]=o[n]||{refCount:0};if(!s.handler){const r=be(e);s.handler=r,t.call(this,n,r,i)}s.refCount+=1}catch(e){}return t.call(this,n,r,i)}})),Object(c.e)(n,"removeEventListener",(function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this,i=n.__sentry_instrumentation_handlers__||{},o=i[t];o&&(o.refCount-=1,o.refCount<=0&&(e.call(this,t,o.handler,r),o.handler=void 0,delete i[t]),0===Object.keys(i).length&&delete n.__sentry_instrumentation_handlers__)}catch(e){}return e.call(this,t,n,r)}})))})}();break;case"xhr":!function(){if(!("XMLHttpRequest"in re.a))return;const e=XMLHttpRequest.prototype;Object(c.e)(e,"open",(function(e){return function(...t){const n=this,r=t[1],i=n.__sentry_xhr__={method:Object(P.l)(t[0])?t[0].toUpperCase():t[0],url:t[1]};Object(P.l)(r)&&"POST"===i.method&&r.match(/sentry_key/)&&(n.__sentry_own_request__=!0);const o=function(){if(4===n.readyState){try{i.status_code=n.status}catch(e){}de("xhr",{args:t,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:n})}};return"onreadystatechange"in n&&"function"==typeof n.onreadystatechange?Object(c.e)(n,"onreadystatechange",(function(e){return function(...t){return o(),e.apply(n,t)}})):n.addEventListener("readystatechange",o),e.apply(n,t)}})),Object(c.e)(e,"send",(function(e){return function(...t){return this.__sentry_xhr__&&void 0!==t[0]&&(this.__sentry_xhr__.body=t[0]),de("xhr",{args:t,startTimestamp:Date.now(),xhr:this}),e.apply(this,t)}}))}();break;case"fetch":!function(){if(!function(){if(!oe())return!1;if(se(re.a.fetch))return!0;let e=!1;const t=re.a.document;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=se(n.contentWindow.fetch)),t.head.removeChild(n)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&g.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return e}())return;Object(c.e)(re.a,"fetch",(function(e){return function(...t){const n={args:t,fetchData:{method:he(t),url:pe(t)},startTimestamp:Date.now()};return de("fetch",{...n}),e.apply(re.a,t).then(e=>(de("fetch",{...n,endTimestamp:Date.now(),response:e}),e),e=>{throw de("fetch",{...n,endTimestamp:Date.now(),error:e}),e})}}))}();break;case"history":!function(){if(!function(){const e=re.a.chrome,t=e&&e.app&&e.app.runtime,n="history"in re.a&&!!re.a.history.pushState&&!!re.a.history.replaceState;return!t&&n}())return;const e=re.a.onpopstate;function t(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=fe,t=String(n);fe=t,de("history",{from:e,to:t})}return e.apply(this,t)}}re.a.onpopstate=function(...t){const n=re.a.location.href,r=fe;if(fe=n,de("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch(e){}},Object(c.e)(re.a.history,"pushState",t),Object(c.e)(re.a.history,"replaceState",t)}();break;case"error":ve=re.a.onerror,re.a.onerror=function(e,t,n,r,i){return de("error",{column:r,error:i,line:n,msg:e,url:t}),!!ve&&ve.apply(this,arguments)};break;case"unhandledrejection":ye=re.a.onunhandledrejection,re.a.onunhandledrejection=function(e){return de("unhandledrejection",e),!ye||ye.apply(this,arguments)};break;default:return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&g.warn("unknown instrumentation type:",e))}}function ue(e,t){ae[e]=ae[e]||[],ae[e].push(t),ce(e)}function de(e,t){if(e&&ae[e])for(const n of ae[e]||[])try{n(t)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&g.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${Object(ie.b)(n)}\nError:`,t)}}function he(e=[]){return"Request"in re.a&&Object(P.g)(e[0],Request)&&e[0].method?String(e[0].method).toUpperCase():e[1]&&e[1].method?String(e[1].method).toUpperCase():"GET"}function pe(e=[]){return"string"==typeof e[0]?e[0]:"Request"in re.a&&Object(P.g)(e[0],Request)?e[0].url:String(e[0])}let fe;let me,ge;function be(e,t=!1){return n=>{if(!n||ge===n)return;if(function(e){if("keypress"!==e.type)return!1;try{const t=e.target;if(!t||!t.tagName)return!0;if("INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable)return!1}catch(e){}return!0}(n))return;const r="keypress"===n.type?"input":n.type;(void 0===me||function(e,t){if(!e)return!0;if(e.type!==t.type)return!0;try{if(e.target!==t.target)return!0}catch(e){}return!1}(ge,n))&&(e({event:n,name:r,global:t}),ge=n),clearTimeout(me),me=re.a.setTimeout(()=>{me=void 0},1e3)}}let ve=null;let ye=null;var _e=n(193);function Se(e,t=[]){return[e,t]}function xe(e,t){const[n,r]=e;return[n,[...r,t]]}function we(e,t){e[1].forEach(e=>{const n=e[0].type;t(e,n)})}function ke(e,t){return(t||new TextEncoder).encode(e)}function Oe(e,t){const[n,r]=e;let i=JSON.stringify(n);function o(e){"string"==typeof i?i="string"==typeof e?i+e:[ke(i,t),e]:i.push("string"==typeof e?ke(e,t):e)}for(const e of r){const[t,n]=e;if(o(`\n${JSON.stringify(t)}\n`),"string"==typeof n||n instanceof Uint8Array)o(n);else{let e;try{e=JSON.stringify(n)}catch(t){e=JSON.stringify(Object(_e.a)(n))}o(e)}}return"string"==typeof i?i:function(e){const t=e.reduce((e,t)=>e+t.length,0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}(i)}function Ee(e,t){const n="string"==typeof e.data?ke(e.data,t):e.data;return[Object(c.c)({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}const Ae={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default"};function Te(e){return Ae[e]}function Ce(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function Me(e,t,n,r){const i=Ce(n),o=e.type||"event";!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])}(e,n&&n.sdk);const s=function(e,t,n,r){const i=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&{dsn:J(r)},..."transaction"===e.type&&i&&{trace:Object(c.c)({...i})}}}(e,i,r,t);delete e.sdkProcessingMetadata;return Se(s,[[{type:o},e]])}const Pe="Not capturing exception because it's already been captured.";class $e{__init(){this._integrations={}}__init2(){this._integrationsInitialized=!1}__init3(){this._numProcessing=0}__init4(){this._outcomes={}}constructor(e){if($e.prototype.__init.call(this),$e.prototype.__init2.call(this),$e.prototype.__init3.call(this),$e.prototype.__init4.call(this),this._options=e,e.dsn){this._dsn=ee(e.dsn);const t=ne(this._dsn,e);this._transport=e.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...e.transportOptions,url:t})}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&g.warn("No DSN provided, client will not do anything.")}captureException(e,t,n){if(w(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&g.log(Pe));let r=t&&t.event_id;return this._process(this.eventFromException(e,t).then(e=>this._captureEvent(e,t,n)).then(e=>{r=e})),r}captureMessage(e,t,n,r){let i=n&&n.event_id;const o=Object(P.j)(e)?this.eventFromMessage(String(e),t,n):this.eventFromException(e,n);return this._process(o.then(e=>this._captureEvent(e,n,r)).then(e=>{i=e})),i}captureEvent(e,t,n){if(t&&t.originalException&&w(t.originalException))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&g.log(Pe));let r=t&&t.event_id;return this._process(this._captureEvent(e,t,n).then(e=>{r=e})),r}captureSession(e){this._isEnabled()?"string"!=typeof e.release?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&g.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),N(e,{init:!1})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&g.warn("SDK not enabled, will not capture session.")}getDsn(){return this._dsn}getOptions(){return this._options}getTransport(){return this._transport}flush(e){const t=this._transport;return t?this._isClientDoneProcessing(e).then(n=>t.flush(e).then(e=>n&&e)):$(!0)}close(e){return this.flush(e).then(e=>(this.getOptions().enabled=!1,e))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=function(e){const t={};return e.forEach(e=>{t[e.name]=e,-1===W.indexOf(e.name)&&(e.setupOnce(B,q),W.push(e.name),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&g.log("Integration installed: "+e.name))}),t}(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(e){return this._integrations[e]}getIntegration(e){try{return this._integrations[e.id]||null}catch(t){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&g.warn(`Cannot retrieve integration ${e.id} from the current Client`),null}}sendEvent(e,t={}){if(this._dsn){let n=Me(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=xe(n,Ee(e,this._options.transportOptions&&this._options.transportOptions.textEncoder));this._sendEnvelope(n)}}sendSession(e){if(this._dsn){const t=function(e,t,n,r){const i=Ce(n);return Se({sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!r&&{dsn:J(t)}},["aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e]])}(e,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(t)}}recordDroppedEvent(e,t){if(this._options.sendClientReports){const n=`${e}:${t}`;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&g.log(`Adding outcome: "${n}"`),this._outcomes[n]=this._outcomes[n]+1||1}}_updateSessionFromEvent(e,t){let n=!1,r=!1;const i=t.exception&&t.exception.values;if(i){r=!0;for(const e of i){const t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}}const o="ok"===e.status;(o&&0===e.errors||o&&n)&&(N(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new I(t=>{let n=0;const r=setInterval(()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))},1)})}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._dsn}_prepareEvent(e,t,n){const{normalizeDepth:r=3,normalizeMaxBreadth:i=1e3}=this.getOptions(),o={...e,event_id:e.event_id||t.event_id||v(),timestamp:e.timestamp||Object(C.a)()};this._applyClientOptions(o),this._applyIntegrationsMetadata(o);let s=n;t.captureContext&&(s=j.clone(s).update(t.captureContext));let a=$(o);if(s){const e=[...t.attachments||[],...s.getAttachments()];e.length&&(t.attachments=e),a=s.applyToEvent(o,t)}return a.then(e=>"number"==typeof r&&r>0?this._normalizeEvent(e,r,i):e)}_normalizeEvent(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(e=>({...e,...e.data&&{data:Object(_e.a)(e.data,t,n)}}))},...e.user&&{user:Object(_e.a)(e.user,t,n)},...e.contexts&&{contexts:Object(_e.a)(e.contexts,t,n)},...e.extra&&{extra:Object(_e.a)(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=Object(_e.a)(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(e=>(e.data&&(e.data=Object(_e.a)(e.data,t,n)),e))),r}_applyClientOptions(e){const t=this.getOptions(),{environment:n,release:r,dist:i,maxValueLength:o=250}=t;"environment"in e||(e.environment="environment"in t?n:"production"),void 0===e.release&&void 0!==r&&(e.release=r),void 0===e.dist&&void 0!==i&&(e.dist=i),e.message&&(e.message=Object(b.d)(e.message,o));const s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=Object(b.d)(s.value,o));const a=e.request;a&&a.url&&(a.url=Object(b.d)(a.url,o))}_applyIntegrationsMetadata(e){const t=Object.keys(this._integrations);t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}_captureEvent(e,t={},n){return this._processEvent(e,t,n).then(e=>e.event_id,e=>{if("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__){const t=e;"log"===t.logLevel?g.log(t.message):g.warn(t)}})}_processEvent(e,t,n){const{beforeSend:r,sampleRate:i}=this.getOptions();if(!this._isEnabled())return R(new Y("SDK not enabled, will not capture event.","log"));const o="transaction"===e.type;return!o&&"number"==typeof i&&Math.random()>i?(this.recordDroppedEvent("sample_rate","error"),R(new Y(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"))):this._prepareEvent(e,t,n).then(n=>{if(null===n)throw this.recordDroppedEvent("event_processor",e.type||"error"),new Y("An event processor returned null, will not send event.","log");if(t.data&&!0===t.data.__sentry__||o||!r)return n;return function(e){const t="`beforeSend` method has to return `null` or a valid event.";if(Object(P.n)(e))return e.then(e=>{if(!Object(P.i)(e)&&null!==e)throw new Y(t);return e},e=>{throw new Y("beforeSend rejected with "+e)});if(!Object(P.i)(e)&&null!==e)throw new Y(t);return e}(r(n,t))}).then(r=>{if(null===r)throw this.recordDroppedEvent("before_send",e.type||"error"),new Y("`beforeSend` returned `null`, will not send event.","log");const i=n&&n.getSession();!o&&i&&this._updateSessionFromEvent(i,r);const s=r.transaction_info;if(o&&s&&r.transaction!==e.transaction){const e="custom";r.transaction_info={...s,source:e,changes:[...s.changes,{source:e,timestamp:r.timestamp,propagations:s.propagations}]}}return this.sendEvent(r,t),r}).then(null,e=>{if(e instanceof Y)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new Y("Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: "+e)})}_process(e){this._numProcessing+=1,e.then(e=>(this._numProcessing-=1,e),e=>(this._numProcessing-=1,e))}_sendEnvelope(e){this._transport&&this._dsn?this._transport.send(e).then(null,e=>{("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&g.error("Error while sending event:",e)}):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&g.error("Transport disabled")}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.keys(e).map(t=>{const[n,r]=t.split(":");return{reason:n,category:r,quantity:e[t]}})}}function Re(e,t){const n=De(e,t),r={type:t&&t.name,value:je(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function Ie(e,t){return{exception:{values:[Re(e,t)]}}}function De(e,t){const n=t.stacktrace||t.stack||"",r=function(e){if(e){if("number"==typeof e.framesToPop)return e.framesToPop;if(Ne.test(e.message))return 1}return 0}(t);try{return e(n,r)}catch(e){}return[]}const Ne=/Minified React error #\d+;/i;function je(e){const t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}function Le(e,t,n,r,i){let o;if(Object(P.e)(t)&&t.error){return Ie(e,t.error)}if(Object(P.a)(t)||Object(P.b)(t)){const i=t;if("stack"in t)o=Ie(e,t);else{const t=i.name||(Object(P.a)(i)?"DOMError":"DOMException"),s=i.message?`${t}: ${i.message}`:t;o=Be(e,s,n,r),S(o,s)}return"code"in i&&(o.tags={...o.tags,"DOMException.code":""+i.code}),o}if(Object(P.d)(t))return Ie(e,t);if(Object(P.i)(t)||Object(P.f)(t)){return o=function(e,t,n,r){const i=q().getClient(),o=i&&i.getOptions().normalizeDepth,s={exception:{values:[{type:Object(P.f)(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:`Non-Error ${r?"promise rejection":"exception"} captured with keys: ${Object(c.d)(t)}`}]},extra:{__serialized__:Object(_e.b)(t,o)}};if(n){const t=De(e,n);t.length&&(s.exception.values[0].stacktrace={frames:t})}return s}(e,t,n,i),x(o,{synthetic:!0}),o}return o=Be(e,t,n,r),S(o,""+t,void 0),x(o,{synthetic:!0}),o}function Be(e,t,n,r){const i={message:t};if(r&&n){const r=De(e,n);r.length&&(i.exception={values:[{value:t,stacktrace:{frames:r}}]})}return i}const Fe=["fatal","error","warning","log","info","debug"];function ze(e){return"warn"===e?"warning":Fe.includes(e)?e:"log"}function Ue(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],relative:t[5]+n+r}}class Qe{static __initStatic(){this.id="Breadcrumbs"}__init(){this.name=Qe.id}constructor(e){Qe.prototype.__init.call(this),this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e}}setupOnce(){var e;this.options.console&&ue("console",qe),this.options.dom&&ue("dom",(e=this.options.dom,function(t){let n,r="object"==typeof e?e.serializeAttribute:void 0;"string"==typeof r&&(r=[r]);try{n=t.event.target?Object(re.c)(t.event.target,r):Object(re.c)(t.event,r)}catch(e){n=""}0!==n.length&&q().addBreadcrumb({category:"ui."+t.name,message:n},{event:t.event,name:t.name,global:t.global})})),this.options.xhr&&ue("xhr",He),this.options.fetch&&ue("fetch",Ge),this.options.history&&ue("history",Ve)}}function qe(e){const t={category:"console",data:{arguments:e.args,logger:"console"},level:ze(e.level),message:Object(b.b)(e.args," ")};if("assert"===e.level){if(!1!==e.args[0])return;t.message="Assertion failed: "+(Object(b.b)(e.args.slice(1)," ")||"console.assert"),t.data.arguments=e.args.slice(1)}q().addBreadcrumb(t,{input:e.args,level:e.level})}function He(e){if(e.endTimestamp){if(e.xhr.__sentry_own_request__)return;const{method:t,url:n,status_code:r,body:i}=e.xhr.__sentry_xhr__||{};q().addBreadcrumb({category:"xhr",data:{method:t,url:n,status_code:r},type:"http"},{xhr:e.xhr,input:i})}else;}function Ge(e){e.endTimestamp&&(e.fetchData.url.match(/sentry_key/)&&"POST"===e.fetchData.method||(e.error?q().addBreadcrumb({category:"fetch",data:e.fetchData,level:"error",type:"http"},{data:e.error,input:e.args}):q().addBreadcrumb({category:"fetch",data:{...e.fetchData,status_code:e.response.status},type:"http"},{input:e.args,response:e.response})))}function Ve(e){let t=e.from,n=e.to;const r=Ue(re.a.location.href);let i=Ue(t);const o=Ue(n);i.path||(i=r),r.protocol===o.protocol&&r.host===o.host&&(n=o.relative),r.protocol===i.protocol&&r.host===i.host&&(t=i.relative),q().addBreadcrumb({category:"navigation",data:{from:t,to:n}})}Qe.__initStatic();class We extends $e{constructor(e){e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:"npm:@sentry/browser",version:"7.16.0"}],version:"7.16.0"},super(e),e.sendClientReports&&re.a.document&&re.a.document.addEventListener("visibilitychange",()=>{"hidden"===re.a.document.visibilityState&&this._flushOutcomes()})}eventFromException(e,t){return function(e,t,n,r){const i=Le(e,t,n&&n.syntheticException||void 0,r);return x(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),$(i)}(this._options.stackParser,e,t,this._options.attachStacktrace)}eventFromMessage(e,t="info",n){return function(e,t,n="info",r,i){const o=Be(e,t,r&&r.syntheticException||void 0,i);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),$(o)}(this._options.stackParser,e,t,n,this._options.attachStacktrace)}sendEvent(e,t){const n=this.getIntegrationById("Breadcrumbs");n&&n.options&&n.options.sentry&&q().addBreadcrumb({category:"sentry."+("transaction"===e.type?"transaction":"event"),event_id:e.event_id,level:e.level,message:_(e)},{event:e}),super.sendEvent(e,t)}_prepareEvent(e,t,n){return e.platform=e.platform||"javascript",super._prepareEvent(e,t,n)}_flushOutcomes(){const e=this._clearOutcomes();if(0===e.length)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&g.log("No outcomes to send"));if(!this._dsn)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&g.log("No dsn provided, will not send outcomes"));("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&g.log("Sending outcomes:",e);const t=ne(this._dsn,this._options),n=(r=e,Se((i=this._options.tunnel&&J(this._dsn))?{dsn:i}:{},[[{type:"client_report"},{timestamp:o||Object(C.a)(),discarded_events:r}]]));var r,i,o;try{const e="[object Navigator]"===Object.prototype.toString.call(re.a&&re.a.navigator);if(e&&"function"==typeof re.a.navigator.sendBeacon&&!this._options.transportOptions){re.a.navigator.sendBeacon.bind(re.a.navigator)(t,Oe(n))}else this._sendEnvelope(n)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&g.error(e)}}}function Xe(e,t){return q().captureException(e,{captureContext:t})}function Ye(e){q().withScope(e)}let Ze=0;function Je(){return Ze>0}function Ke(){Ze+=1,setTimeout(()=>{Ze-=1})}function et(e,t={},n){if("function"!=typeof e)return e;try{const t=e.__sentry_wrapped__;if(t)return t;if(Object(c.f)(e))return e}catch(t){return e}const r=function(){const r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);const i=r.map(e=>et(e,t));return e.apply(this,i)}catch(e){throw Ke(),Ye(n=>{n.addEventProcessor(e=>(t.mechanism&&(S(e,void 0,void 0),x(e,t.mechanism)),e.extra={...e.extra,arguments:r},e)),Xe(e)}),e}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t])}catch(e){}Object(c.g)(r,e),Object(c.a)(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:()=>e.name})}catch(e){}return r}function tt(e,t,n,r){const i={filename:e,function:t,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}const nt=/^\s*at (?:(.*\).*?|.*?) ?\((?:address at )?)?((?:file|https?|blob|chrome-extension|address|native|eval|webpack||[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,rt=/\((\S*)(?::(\d+))(?::(\d+))\)/,it=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:file|https?|blob|chrome|webpack|resource|moz-extension|safari-extension|safari-web-extension|capacitor)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,ot=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,st=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,at=[[30,e=>{const t=nt.exec(e);if(t){if(t[2]&&0===t[2].indexOf("eval")){const e=rt.exec(t[2]);e&&(t[2]=e[1],t[3]=e[2],t[4]=e[3])}const[e,n]=ct(t[1]||"?",t[2]);return tt(n,e,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}}],[50,e=>{const t=it.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const e=ot.exec(t[3]);e&&(t[1]=t[1]||"eval",t[3]=e[1],t[4]=e[2],t[5]="")}let e=t[3],n=t[1]||"?";return[n,e]=ct(n,e),tt(e,n,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}}],[40,e=>{const t=st.exec(e);return t?tt(t[2],t[1]||"?",+t[3],t[4]?+t[4]:void 0):void 0}]],lt=Object(ie.a)(...at),ct=(e,t)=>{const n=-1!==e.indexOf("safari-extension"),r=-1!==e.indexOf("safari-web-extension");return n||r?[-1!==e.indexOf("@")?e.split("@")[0]:"?",n?"safari-extension:"+t:"safari-web-extension:"+t]:[e,t]},ut=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];class dt{static __initStatic(){this.id="TryCatch"}__init(){this.name=dt.id}constructor(e){dt.prototype.__init.call(this),this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}setupOnce(){this._options.setTimeout&&Object(c.e)(re.a,"setTimeout",ht),this._options.setInterval&&Object(c.e)(re.a,"setInterval",ht),this._options.requestAnimationFrame&&Object(c.e)(re.a,"requestAnimationFrame",pt),this._options.XMLHttpRequest&&"XMLHttpRequest"in re.a&&Object(c.e)(XMLHttpRequest.prototype,"send",ft);const e=this._options.eventTarget;if(e){(Array.isArray(e)?e:ut).forEach(mt)}}}function ht(e){return function(...t){const n=t[0];return t[0]=et(n,{mechanism:{data:{function:Object(ie.b)(e)},handled:!0,type:"instrument"}}),e.apply(this,t)}}function pt(e){return function(t){return e.apply(this,[et(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Object(ie.b)(e)},handled:!0,type:"instrument"}})])}}function ft(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(e=>{e in n&&"function"==typeof n[e]&&Object(c.e)(n,e,(function(t){const n={mechanism:{data:{function:e,handler:Object(ie.b)(t)},handled:!0,type:"instrument"}},r=Object(c.f)(t);return r&&(n.mechanism.data.handler=Object(ie.b)(r)),et(t,n)}))}),e.apply(this,t)}}function mt(e){const t=re.a,n=t[e]&&t[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(Object(c.e)(n,"addEventListener",(function(t){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=et(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Object(ie.b)(r),target:e},handled:!0,type:"instrument"}}))}catch(e){}return t.apply(this,[n,et(r,{mechanism:{data:{function:"addEventListener",handler:Object(ie.b)(r),target:e},handled:!0,type:"instrument"}}),i])}})),Object(c.e)(n,"removeEventListener",(function(e){return function(t,n,r){const i=n;try{const n=i&&i.__sentry_wrapped__;n&&e.call(this,t,n,r)}catch(e){}return e.call(this,t,i,r)}})))}dt.__initStatic();class gt{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=gt.id}__init2(){this._installFunc={onerror:bt,onunhandledrejection:vt}}constructor(e){gt.prototype.__init.call(this),gt.prototype.__init2.call(this),this._options={onerror:!0,onunhandledrejection:!0,...e}}setupOnce(){Error.stackTraceLimit=50;const e=this._options;for(const n in e){const r=this._installFunc[n];r&&e[n]&&(t=n,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&g.log("Global Handler attached: "+t),r(),this._installFunc[n]=void 0)}var t}}function bt(){ue("error",e=>{const[t,n,r]=St();if(!t.getIntegration(gt))return;const{msg:i,url:o,line:s,column:a,error:l}=e;if(Je()||l&&l.__sentry_own_request__)return;const c=void 0===l&&Object(P.l)(i)?function(e,t,n,r){let i=Object(P.e)(e)?e.message:e,o="Error";const s=i.match(/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i);s&&(o=s[1],i=s[2]);return yt({exception:{values:[{type:o,value:i}]}},t,n,r)}(i,o,s,a):yt(Le(n,l||i,void 0,r,!1),o,s,a);c.level="error",_t(t,l,c,"onerror")})}function vt(){ue("unhandledrejection",e=>{const[t,n,r]=St();if(!t.getIntegration(gt))return;let i=e;try{"reason"in e?i=e.reason:"detail"in e&&"reason"in e.detail&&(i=e.detail.reason)}catch(e){}if(Je()||i&&i.__sentry_own_request__)return!0;const o=Object(P.j)(i)?{exception:{values:[{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(i)}]}}:Le(n,i,void 0,r,!0);o.level="error",_t(t,i,o,"onunhandledrejection")})}function yt(e,t,n,r){const i=e.exception=e.exception||{},o=i.values=i.values||[],s=o[0]=o[0]||{},a=s.stacktrace=s.stacktrace||{},l=a.frames=a.frames||[],c=isNaN(parseInt(r,10))?void 0:r,u=isNaN(parseInt(n,10))?void 0:n,d=Object(P.l)(t)&&t.length>0?t:Object(re.b)();return 0===l.length&&l.push({colno:c,filename:d,function:"?",in_app:!0,lineno:u}),e}function _t(e,t,n,r){x(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function St(){const e=q(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}gt.__initStatic();class xt{static __initStatic(){this.id="LinkedErrors"}__init(){this.name=xt.id}constructor(e={}){xt.prototype.__init.call(this),this._key=e.key||"cause",this._limit=e.limit||5}setupOnce(){const e=q().getClient();e&&B((t,n)=>{const r=q().getIntegration(xt);return r?function(e,t,n,r,i){if(!(r.exception&&r.exception.values&&i&&Object(P.g)(i.originalException,Error)))return r;const o=function e(t,n,r,i,o=[]){if(!Object(P.g)(r[i],Error)||o.length+1>=n)return o;const s=Re(t,r[i]);return e(t,n,r[i],i,[s,...o])}(e,n,i.originalException,t);return r.exception.values=[...o,...r.exception.values],r}(e.getOptions().stackParser,r._key,r._limit,t,n):t})}}xt.__initStatic();class wt{constructor(){wt.prototype.__init.call(this)}static __initStatic(){this.id="Dedupe"}__init(){this.name=wt.id}setupOnce(e,t){const n=e=>{const n=t().getIntegration(wt);if(n){try{if(function(e,t){if(!t)return!1;if(function(e,t){const n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!Ot(e,t))return!1;if(!kt(e,t))return!1;return!0}(e,t))return!0;if(function(e,t){const n=Et(t),r=Et(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!Ot(e,t))return!1;if(!kt(e,t))return!1;return!0}(e,t))return!0;return!1}(e,n._previousEvent))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&g.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(t){return n._previousEvent=e}return n._previousEvent=e}return e};n.id=this.name,e(n)}}function kt(e,t){let n=At(e),r=At(t);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(n=n,r=r,r.length!==n.length)return!1;for(let e=0;e{if(q().getIntegration(Tt)){if(!re.a.navigator&&!re.a.location&&!re.a.document)return e;const t=e.request&&e.request.url||re.a.location&&re.a.location.href,{referrer:n}=re.a.document||{},{userAgent:r}=re.a.navigator||{},i={...t&&{url:t},headers:{...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}}};return{...e,request:i}}return e})}}function Ct(e){const t=[];function n(e){return t.splice(t.indexOf(e),1)[0]}return{$:t,add:function(r){if(!(void 0===e||t.lengthn(i)).then(null,()=>n(i).then(null,()=>{})),i},drain:function(e){return new I((n,r)=>{let i=t.length;if(!i)return n(!0);const o=setTimeout(()=>{e&&e>0&&n(!1)},e);t.forEach(e=>{$(e).then(()=>{--i||(clearTimeout(o),n(!0))},r)})})}}}Tt.__initStatic();function Mt(e,{statusCode:t,headers:n},r=Date.now()){const i={...e},o=n&&n["x-sentry-rate-limits"],s=n&&n["retry-after"];if(o)for(const e of o.trim().split(",")){const[t,n]=e.split(":",2),o=parseInt(t,10),s=1e3*(isNaN(o)?60:o);if(n)for(const e of n.split(";"))i[e]=r+s;else i.all=r+s}else s?i.all=r+function(e,t=Date.now()){const n=parseInt(""+e,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(""+e);return isNaN(r)?6e4:r-t}(s,r):429===t&&(i.all=r+6e4);return i}function Pt(e,t,n=Ct(e.bufferSize||30)){let r={};return{send:function(i){const o=[];if(we(i,(t,n)=>{const i=Te(n);!function(e,t,n=Date.now()){return function(e,t){return e[t]||e.all||0}(e,t)>n}(r,i)?o.push(t):e.recordDroppedEvent("ratelimit_backoff",i)}),0===o.length)return $();const s=Se(i[0],o),a=t=>{we(s,(n,r)=>{e.recordDroppedEvent(t,Te(r))})};return n.add(()=>t({body:Oe(s,e.textEncoder)}).then(e=>{void 0!==e.statusCode&&(e.statusCode<200||e.statusCode>=300)&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&g.warn(`Sentry responded with status code ${e.statusCode} to sent event.`),r=Mt(r,e)},e=>{("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&g.error("Failed while sending event:",e),a("network_error")})).then(e=>e,e=>{if(e instanceof Y)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&g.error("Skipped sending event because buffer is full."),a("queue_overflow"),$();throw e})},flush:e=>n.drain(e)}}let $t;function Rt(e,t=function(){if($t)return $t;if(se(re.a.fetch))return $t=re.a.fetch.bind(re.a);const e=re.a.document;let t=re.a.fetch;if(e&&"function"==typeof e.createElement)try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&g.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",e)}return $t=t.bind(re.a)}()){return Pt(e,(function(n){const r={body:n.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n.body.length<=65536,...e.fetchOptions};return t(e.url,r).then(e=>({statusCode:e.status,headers:{"x-sentry-rate-limits":e.headers.get("X-Sentry-Rate-Limits"),"retry-after":e.headers.get("Retry-After")}}))}))}function It(e){return Pt(e,(function(t){return new I((n,r)=>{const i=new XMLHttpRequest;i.onerror=r,i.onreadystatechange=()=>{4===i.readyState&&n({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",e.url);for(const t in e.headers)Object.prototype.hasOwnProperty.call(e.headers,t)&&i.setRequestHeader(t,e.headers[t]);i.send(t.body)})}))}const Dt=[new r.InboundFilters,new r.FunctionToString,new dt,new Qe,new gt,new xt,new wt,new Tt];function Nt(e={}){void 0===e.defaultIntegrations&&(e.defaultIntegrations=Dt),void 0===e.release&&re.a.SENTRY_RELEASE&&re.a.SENTRY_RELEASE.id&&(e.release=re.a.SENTRY_RELEASE.id),void 0===e.autoSessionTracking&&(e.autoSessionTracking=!0),void 0===e.sendClientReports&&(e.sendClientReports=!0);const t={...e,stackParser:Object(ie.c)(e.stackParser||lt),integrations:X(e),transport:e.transport||(oe()?Rt:It)};!function(e,t){!0===t.debug&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?g.enable():console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."));const n=q(),r=n.getScope();r&&r.update(t.initialScope);const i=new e(t);n.bindClient(i)}(We,t),e.autoSessionTracking&&function(){if(void 0===re.a.document)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&g.warn("Session tracking in non-browser environment with @sentry/browser is not supported."));const e=q();if(!e.captureSession)return;jt(e),ue("history",({from:e,to:t})=>{void 0!==e&&e!==t&&jt(q())})}()}function jt(e){e.startSession({ignoreDuration:!0}),e.captureSession()}var Lt=n(49),Bt=n(441),Ft=n(11),zt=n(117),Ut=n(17);const Qt=/^sentry-/;function qt(e){return function(e){if(0===Object.keys(e).length)return;return Object.entries(e).reduce((e,[t,n],r)=>{const i=`${encodeURIComponent(t)}=${encodeURIComponent(n)}`,o=0===r?i:`${e},${i}`;return o.length>8192?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ft.c.warn(`Not adding key: ${t} with val: ${n} to baggage header due to exceeding baggage size limits.`),e):o},"")}(Object.entries(e).reduce((e,[t,n])=>(n&&(e["sentry-"+t]=n),e),{}))}function Ht(e){return e.split(",").map(e=>e.split("=").map(e=>decodeURIComponent(e.trim()))).reduce((e,[t,n])=>(e[t]=n,e),{})}var Gt=n(7),Vt=n(43),Wt=n(10);var Xt=n(61),Yt=n(60);const Zt=(e,t,n)=>{let r;return i=>{t.value>=0&&(i||n)&&(t.delta=t.value-(r||0),(t.delta||void 0===r)&&(r=t.value,e(t)))}},Jt=(e,t)=>({name:e,value:Object(Xt.a)(t,()=>-1),delta:0,entries:[],id:`v2-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`}),Kt=(e,t)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){if("first-input"===e&&!("PerformanceEventTiming"in self))return;const n=new PerformanceObserver(e=>e.getEntries().map(t));return n.observe({type:e,buffered:!0}),n}}catch(e){}},en=(e,t)=>{const n=r=>{"pagehide"!==r.type&&"hidden"!==Gt.a.document.visibilityState||(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)};let tn=-1;const nn=()=>(tn<0&&(tn="hidden"===Gt.a.document.visibilityState?0:1/0,en(({timeStamp:e})=>{tn=e},!0)),{get firstHiddenTime(){return tn}}),rn={};function on(e){return"number"==typeof e&&isFinite(e)}function sn(e,{startTimestamp:t,...n}){return t&&e.startTimestamp>t&&(e.startTimestamp=t),e.startChild({startTimestamp:t,...n})}function an(){return Gt.a&&Gt.a.addEventListener&&Gt.a.performance}let ln,cn,un=0,dn={};function hn(e=!1){const t=an();t&&Yt.a&&(t.mark&&Gt.a.performance.mark("sentry-tracing-init"),((e,t)=>{const n=Jt("CLS",0);let r,i=0,o=[];const s=e=>{if(e&&!e.hadRecentInput){const t=o[0],s=o[o.length-1];i&&0!==o.length&&e.startTime-s.startTime<1e3&&e.startTime-t.startTime<5e3?(i+=e.value,o.push(e)):(i=e.value,o=[e]),i>n.value&&(n.value=i,n.entries=o,r&&r())}},a=Kt("layout-shift",s);a&&(r=Zt(e,n,t),en(()=>{a.takeRecords().map(s),r(!0)}))})(e=>{const t=e.entries.pop();t&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ft.c.log("[Measurements] Adding CLS"),dn.cls={value:e.value,unit:""},cn=t)}),function(e){((e,t)=>{const n=nn(),r=Jt("LCP");let i;const o=e=>{const t=e.startTime;t{rn[r.id]||(s.takeRecords().map(o),s.disconnect(),rn[r.id]=!0,i(!0))};["keydown","click"].forEach(e=>{addEventListener(e,n,{once:!0,capture:!0})}),en(n,!0)}})(e=>{const t=e.entries.pop();t&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ft.c.log("[Measurements] Adding LCP"),dn.lcp={value:e.value,unit:"millisecond"},ln=t)},e)}(e),((e,t)=>{const n=nn(),r=Jt("FID");let i;const o=e=>{i&&e.startTime{s.takeRecords().map(o),s.disconnect()},!0))})(e=>{const t=e.entries.pop();if(!t)return;const n=Object(Wt.c)(Yt.a),r=Object(Wt.c)(t.startTime);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ft.c.log("[Measurements] Adding FID"),dn.fid={value:e.value,unit:"millisecond"},dn["mark.fid"]={value:n+r,unit:"second"}}))}function pn(e){const t=an();if(!t||!Gt.a.performance.getEntries||!Yt.a)return;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ft.c.log("[Tracing] Adding & adjusting spans using Performance API");const n=Object(Wt.c)(Yt.a),r=t.getEntries();let i,o;if(r.slice(un).forEach(t=>{const r=Object(Wt.c)(t.startTime),s=Object(Wt.c)(t.duration);if(!("navigation"===e.op&&n+r{fn(e,t,r,n)}),fn(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),fn(e,t,"fetch",n,"cache","domainLookupStart"),fn(e,t,"domainLookup",n,"DNS"),function(e,t,n){sn(e,{op:"browser",description:"request",startTimestamp:n+Object(Wt.c)(t.requestStart),endTimestamp:n+Object(Wt.c)(t.responseEnd)}),sn(e,{op:"browser",description:"response",startTimestamp:n+Object(Wt.c)(t.responseStart),endTimestamp:n+Object(Wt.c)(t.responseEnd)})}(e,t,n)}(e,t,n),i=n+Object(Wt.c)(t.responseStart),o=n+Object(Wt.c)(t.requestStart);break;case"mark":case"paint":case"measure":{!function(e,t,n,r,i){const o=i+n,s=o+r;sn(e,{description:t.name,endTimestamp:s,op:t.entryType,startTimestamp:o})}(e,t,r,s,n);const i=nn(),o=t.startTime{if(!dn[t]||n>=e.startTimestamp)return;const r=dn[t].value,i=n+Object(Wt.c)(r),o=Math.abs(1e3*(i-e.startTimestamp)),s=o-r;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ft.c.log(`[Measurements] Normalized ${t} from ${r} to ${o} (${s})`),dn[t].value=o});const t=dn["mark.fid"];t&&dn.fid&&(sn(e,{description:"first input delay",endTimestamp:t.value+Object(Wt.c)(dn.fid.value),op:"ui.action",startTimestamp:t.value}),delete dn["mark.fid"]),"fcp"in dn||delete dn.cls,Object.keys(dn).forEach(t=>{e.setMeasurement(t,dn[t].value,dn[t].unit)}),function(e){ln&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ft.c.log("[Measurements] Adding LCP Data"),ln.element&&e.setTag("lcp.element",Object(Gt.c)(ln.element)),ln.id&&e.setTag("lcp.id",ln.id),ln.url&&e.setTag("lcp.url",ln.url.trim().slice(0,200)),e.setTag("lcp.size",ln.size));cn&&cn.sources&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ft.c.log("[Measurements] Adding CLS Data"),cn.sources.forEach((t,n)=>e.setTag("cls.source."+(n+1),Object(Gt.c)(t.node))))}(e)}ln=void 0,cn=void 0,dn={}}function fn(e,t,n,r,i,o){const s=o?t[o]:t[n+"End"],a=t[n+"Start"];a&&s&&sn(e,{op:"browser",description:Object(Xt.a)(i,()=>n),startTimestamp:r+Object(Wt.c)(a),endTimestamp:r+Object(Wt.c)(s)})}var mn=n(50),gn=n(197);const bn={traceFetch:!0,traceXHR:!0,tracingOrigins:["localhost",/^\//]};function vn(e){const{traceFetch:t,traceXHR:n,tracingOrigins:r,shouldCreateSpanForRequest:i}={...bn,...e},o={},s=e=>{if(o[e])return o[e];const t=r;return o[e]=t.some(t=>Object(mn.a)(e,t))&&!Object(mn.a)(e,"sentry_key"),o[e]};let a=s;"function"==typeof i&&(a=e=>s(e)&&i(e));const l={};t&&Object(gn.a)("fetch",e=>{!function(e,t,n){if(!Object(Wt.b)()||!e.fetchData||!t(e.fetchData.url))return;if(e.endTimestamp){const t=e.fetchData.__span;if(!t)return;const r=n[t];return void(r&&(e.response?r.setHttpStatus(e.response.status):e.error&&r.setStatus("internal_error"),r.finish(),delete n[t]))}const r=Object(Wt.a)();if(r){const t=r.startChild({data:{...e.fetchData,type:"fetch"},description:`${e.fetchData.method} ${e.fetchData.url}`,op:"http.client"});e.fetchData.__span=t.spanId,n[t.spanId]=t;const i=e.args[0];e.args[1]=e.args[1]||{};const o=e.args[1];o.headers=function(e,t,n,r){const i=qt(t),o=n.toTraceparent(),s="undefined"!=typeof Request&&Object(Ut.d)(e,Request)?e.headers:r.headers;if(s){if("undefined"!=typeof Headers&&Object(Ut.d)(s,Headers)){const e=new Headers(s);return e.append("sentry-trace",o),i&&e.append("baggage",i),e}if(Array.isArray(s)){const e=[...s,["sentry-trace",o]];return i&&e.push(["baggage",i]),e}{const e="baggage"in s?s.baggage:void 0,t=[];return Array.isArray(e)?t.push(...e):e&&t.push(e),i&&t.push(i),{...s,"sentry-trace":o,baggage:t.length>0?t.join(","):void 0}}}return{"sentry-trace":o,baggage:i}}(i,r.getDynamicSamplingContext(),t,o),r.metadata.propagations+=1}}(e,a,l)}),n&&Object(gn.a)("xhr",e=>{!function(e,t,n){if(!Object(Wt.b)()||e.xhr&&e.xhr.__sentry_own_request__||!(e.xhr&&e.xhr.__sentry_xhr__&&t(e.xhr.__sentry_xhr__.url)))return;const r=e.xhr.__sentry_xhr__;if(e.endTimestamp){const t=e.xhr.__sentry_xhr_span_id__;if(!t)return;const i=n[t];return void(i&&(i.setHttpStatus(r.status_code),i.finish(),delete n[t]))}const i=Object(Wt.a)();if(i){const t=i.startChild({data:{...r.data,type:"xhr",method:r.method,url:r.url},description:`${r.method} ${r.url}`,op:"http.client"});if(e.xhr.__sentry_xhr_span_id__=t.spanId,n[e.xhr.__sentry_xhr_span_id__]=t,e.xhr.setRequestHeader)try{e.xhr.setRequestHeader("sentry-trace",t.toTraceparent());const n=qt(i.getDynamicSamplingContext());n&&e.xhr.setRequestHeader("baggage",n),i.metadata.propagations+=1}catch(e){}}}(e,a,l)})}const yn={idleTimeout:Vt.c,finalTimeout:Vt.a,heartbeatInterval:Vt.b,markBackgroundTransactions:!0,routingInstrumentation:function(e,t=!0,n=!0){if(!Gt.a||!Gt.a.location)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ft.c.warn("Could not initialize routing instrumentation due to invalid location"));let r,i=Gt.a.location.href;t&&(r=e({name:Gt.a.location.pathname,op:"pageload",metadata:{source:"url"}})),n&&Object(gn.a)("history",({to:t,from:n})=>{void 0===n&&i&&-1!==i.indexOf(t)?i=void 0:n!==t&&(i=void 0,r&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ft.c.log("[Tracing] Finishing current transaction with op: "+r.op),r.finish()),r=e({name:Gt.a.location.pathname,op:"navigation",metadata:{source:"url"}}))})},startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,_experiments:{enableLongTask:!0},...bn};class _n{__init(){this.name="BrowserTracing"}constructor(e){_n.prototype.__init.call(this);let t=bn.tracingOrigins;e&&(e.tracingOrigins&&Array.isArray(e.tracingOrigins)?t=e.tracingOrigins:("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&(this._emitOptionsWarning=!0)),this.options={...yn,...e,tracingOrigins:t};const{_metricOptions:n}=this.options;hn(n&&n._reportAllChanges),Object(Bt.a)([this,"access",e=>e.options,"access",e=>e._experiments,"optionalAccess",e=>e.enableLongTask])&&Kt("longtask",e=>{const t=Object(Wt.a)();if(!t)return;const n=Object(Wt.c)(Yt.a+e.startTime),r=Object(Wt.c)(e.duration);t.startChild({description:"Main UI thread blocked",op:"ui.long-task",startTimestamp:n,endTimestamp:n+r})})}setupOnce(e,t){this._getCurrentHub=t,this._emitOptionsWarning&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ft.c.warn("[Tracing] You need to define `tracingOrigins` in the options. Set an array of urls or patterns to trace."),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ft.c.warn("[Tracing] We added a reasonable default for you: "+bn.tracingOrigins));const{routingInstrumentation:n,startTransactionOnLocationChange:r,startTransactionOnPageLoad:i,markBackgroundTransactions:o,traceFetch:s,traceXHR:a,tracingOrigins:l,shouldCreateSpanForRequest:c}=this.options;n(e=>this._createRouteTransaction(e),i,r),o&&(Gt.a&&Gt.a.document?Gt.a.document.addEventListener("visibilitychange",()=>{const e=Object(Wt.a)();if(Gt.a.document.hidden&&e){const t="cancelled";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ft.c.log(`[Tracing] Transaction: ${t} -> since tab moved to the background, op: ${e.op}`),e.status||e.setStatus(t),e.setTag("visibilitychange","document.hidden"),e.finish()}}):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ft.c.warn("[Tracing] Could not set up background tab detection due to lack of global document")),vn({traceFetch:s,traceXHR:a,tracingOrigins:l,shouldCreateSpanForRequest:c})}_createRouteTransaction(e){if(!this._getCurrentHub)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ft.c.warn(`[Tracing] Did not create ${e.op} transaction because _getCurrentHub is invalid.`));const{beforeNavigate:t,idleTimeout:n,finalTimeout:r,heartbeatInterval:i}=this.options,o="pageload"===e.op,s=o?Sn("sentry-trace"):null,a=o?Sn("baggage"):null,l=s?Object(zt.a)(s):void 0,c=a?function(e){if(!Object(Ut.i)(e)&&!Array.isArray(e))return;let t={};if(Array.isArray(e))t=e.reduce((e,t)=>({...e,...Ht(t)}),{});else{if(!e)return;t=Ht(e)}const n=Object.entries(t).reduce((e,[t,n])=>{if(t.match(Qt)){e[t.slice("sentry-".length)]=n}return e},{});return Object.keys(n).length>0?n:void 0}(a):void 0,u={...e,...l,metadata:{...e.metadata,dynamicSamplingContext:l&&!c?{}:c},trimEnd:!0},d="function"==typeof t?t(u):u,h=void 0===d?{...u,sampled:!1}:d;h.metadata=h.name!==u.name?{...h.metadata,source:"custom"}:h.metadata,!1===h.sampled&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ft.c.log(`[Tracing] Will not send ${h.op} transaction because of beforeNavigate.`),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&Ft.c.log(`[Tracing] Starting ${h.op} transaction on scope`);const p=this._getCurrentHub(),{location:f}=Gt.a,m=Object(Lt.b)(p,h,n,r,!0,{location:f},i);return m.registerBeforeFinishCallback(e=>{pn(e),e.setTag("sentry_reportAllChanges",Boolean(this.options._metricOptions&&this.options._metricOptions._reportAllChanges))}),m}}function Sn(e){const t=Object(Gt.b)(`meta[name=${e}]`);return t?t.getAttribute("content"):null}("undefined"==typeof __SENTRY_TRACING__||__SENTRY_TRACING__)&&Object(Lt.a)();var xn=o.a.createContext(null);var wn=function(e){e()};function kn(){var e=wn,t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,i=n={callback:e,next:null,prev:n};return i.prev?i.prev.next=i:t=i,function(){r&&null!==t&&(r=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}var On={notify:function(){},get:function(){return[]}};function En(e,t){var n,r=On;function i(){s.onStateChange&&s.onStateChange()}function o(){n||(n=t?t.addNestedSub(i):e.subscribe(i),r=kn())}var s={addNestedSub:function(e){return o(),r.subscribe(e)},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:i,isSubscribed:function(){return Boolean(n)},trySubscribe:o,tryUnsubscribe:function(){n&&(n(),n=void 0,r.clear(),r=On)},getListeners:function(){return r}};return s}var An="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?i.useLayoutEffect:i.useEffect;var Tn=function(e){var t=e.store,n=e.context,r=e.children,s=Object(i.useMemo)((function(){var e=En(t);return{store:t,subscription:e}}),[t]),a=Object(i.useMemo)((function(){return t.getState()}),[t]);An((function(){var e=s.subscription;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),a!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[s,a]);var l=n||xn;return o.a.createElement(l.Provider,{value:s},r)},Cn=n(15);function Mn(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}var Pn=n(56),$n=n.n(Pn);n(169);function Rn(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function In(e,t){if(Rn(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(var i=0;i{e.loading="pending",e.accessDeniedNoAuthModalShowing=!1,e.modals={},e.currentLoadingRequestId=t.meta.requestId},Wn=(e,t)=>{if("pending"===e.loading&&e.currentLoadingRequestId===t.meta.requestId){e.project=t.payload.project,e.loading="success",e.justLoaded=!0,e.saving="idle",e.currentLoadingRequestId=void 0,e.openFiles=[[]];const n=0;"html"===e.project.project_type?e.openFiles[n].push("index.html"):e.openFiles[n].push("main.py"),e.focussedFileIndices=[0]}},Xn=(e,t)=>{if("pending"===e.loading&&e.currentLoadingRequestId===t.meta.requestId){var n;e.loading="failed",e.saving="idle";const r=t.error.message.split(" "),i=r[r.length-1],o=null===(n=t.meta.arg)||void 0===n?void 0:n.accessToken,s=["401","403","500"];"404"===i?e.notFoundModalShowing=!0:s.includes(i)&&o?e.accessDeniedWithAuthModalShowing=!0:s.includes(i)&&!o&&(e.accessDeniedNoAuthModalShowing=!0,e.modals.accessDenied={identifier:t.meta.arg.identifier,projectType:t.meta.arg.projectType}),e.currentLoadingRequestId=void 0}};var Yn=n(73),Zn=n.n(Yn),Jn=n(171),Kn=n.n(Jn);const er="https://editor-api.raspberrypi.org",tr=async(e,t)=>await Zn.a.get(e,t),nr=async(e,t,n)=>await Zn.a.post(e,t,n),rr=e=>{let t;return t=e?{Accept:"application/json",Authorization:e}:{Accept:"application/json"},{headers:t}},ir=async(e,t)=>{const n=Kn()(e,["user_id"]);return n.identifier?await(async(e,t,n)=>await Zn.a.put(e,t,n))("".concat(er,"/api/projects/").concat(n.identifier),{project:n},rr(t)):await nr("".concat(er,"/api/projects"),{project:n},rr(t))},or=async function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(!r)return;const{errorMessage:i,errorType:o}=n;return await nr("".concat(er,"/api/project_errors"),{error:i,error_type:o,project_id:e,user_id:t})},sr=e=>Object(qn.b)("editor/".concat(e,"Project"),async(t,n)=>{let r,{project:i,identifier:o,locale:s,accessToken:a,autosave:l,assetsOnly:c}=t,{rejectWithValue:u}=n;switch(e){case"load":r=c?await(async(e,t,n)=>{const r=t?"?locale=".concat(t):"";return await tr("".concat(er,"/api/projects/").concat(e,"/images").concat(r),rr(n))})(o,s,a):await(async(e,t,n)=>{const r=t?"?locale=".concat(t):"";return await tr("".concat(er,"/api/projects/").concat(e).concat(r),rr(n))})(o,s,a);break;case"loadRemix":r=await(async(e,t)=>await tr("".concat(er,"/api/projects/").concat(e,"/remix"),rr(t)))(o,a);break;case"remix":r=await(async(e,t)=>await nr("".concat(er,"/api/projects/").concat(e.identifier,"/remix"),{project:e},rr(t)))(i,a);break;case"save":r=await ir(i,a);break;case"delete":r=await(async(e,t)=>await Zn.a.delete("".concat(er,"/api/projects/").concat(e),rr(t)))(o,a);break;default:u({error:"no such sync action"})}return{project:r.data,autosave:l}},{condition:(t,n)=>{let{getState:r}=n;const{editor:i,auth:o}=r(),s=i.saving,a=i.loading;return!o.isLoadingUser&&(("save"!==e&&"remix"!==e||"pending"!==s)&&(("load"!==e||"pending"!==a)&&void 0))}}),ar=(Object(qn.b)("editor/loadProjectList",async e=>{let{page:t,accessToken:n}=e;const r=await(async(e,t)=>await tr("".concat(er,"/api/projects"),{params:{page:e},...rr(t)}))(t,n);return{projects:r.data,page:t,links:Gn()(r.headers.link)}}),Object(qn.c)({name:"editor",initialState:{project:{},saveTriggered:!1,saving:"idle",loading:"idle",justLoaded:!1,remixLoadFailed:!1,hasShownSavePrompt:!1,loadError:"",saveError:"",currentLoadingRequestId:void 0,openFiles:[[]],focussedFileIndices:[0],nameError:"",autorunEnabled:!1,codeRunTriggered:!1,codeHasBeenRun:!1,drawTriggered:!1,isEmbedded:!1,isOutputOnly:!1,browserPreview:!1,isSplitView:!0,isThemeable:!0,webComponent:!1,codeRunLoading:!1,codeRunStopped:!1,projectList:[],projectListLoaded:"idle",projectIndexCurrentPage:1,projectIndexTotalPages:1,lastSaveAutosave:!1,lastSavedTime:null,senseHatAlwaysEnabled:!1,senseHatEnabled:!1,loadRemixDisabled:!1,accessDeniedNoAuthModalShowing:!1,accessDeniedWithAuthModalShowing:!1,betaModalShowing:!1,errorModalShowing:!1,loginToSaveModalShowing:!1,notFoundModalShowing:!1,newFileModalShowing:!1,renameFileModalShowing:!1,newProjectModalShowing:!1,renameProjectModalShowing:!1,deleteProjectModalShowing:!1,sidebarShowing:!0,modals:{},errorDetails:{}},reducers:{closeFile:(e,t)=>{const n=e.openFiles.map(e=>e.includes(t.payload)).indexOf(!0),r=e.openFiles[n].indexOf(t.payload);e.openFiles[n]=e.openFiles[n].filter(e=>e!==t.payload),(e.focussedFileIndices[n]>=e.openFiles[n].length||r{e.openFiles.flat().includes(t.payload)||e.openFiles[0].push(t.payload),e.focussedFileIndices[0]=e.openFiles[0].indexOf(t.payload)},setOpenFiles:(e,t)=>{e.openFiles=t.payload},addFilePanel:e=>{e.openFiles.push([]),e.focussedFileIndices.push(0)},setFocussedFileIndex:(e,t)=>{e.focussedFileIndices[t.payload.panelIndex]=t.payload.fileIndex},updateImages:(e,t)=>{e.project.image_list||(e.project.image_list=[]),e.project.image_list=t.payload},setWebComponent:(e,t)=>{e.webComponent=t.payload},addProjectComponent:(e,t)=>{e.project.components.push({name:t.payload.name,extension:t.payload.extension,content:""}),e.saving="idle"},setPage:(e,t)=>{e.page=t.payload},setEmbedded:(e,t)=>{e.isEmbedded=!0},setIsOutputOnly:(e,t)=>{e.isOutputOnly=t.payload},setBrowserPreview:(e,t)=>{e.browserPreview=!0},setIsSplitView:(e,t)=>{e.isSplitView=t.payload},setNameError:(e,t)=>{e.nameError=t.payload},setHasShownSavePrompt:e=>{e.hasShownSavePrompt=!0},setProject:(e,t)=>{e.project=t.payload,e.project.image_list||(e.project.image_list=[]),e.loading="success",e.openFiles=[[]];"html"===e.project.project_type?e.openFiles[0].push("index.html"):e.openFiles[0].push("main.py"),e.justLoaded=!0},expireJustLoaded:e=>{e.justLoaded=!1},setSenseHatAlwaysEnabled:(e,t)=>{e.senseHatAlwaysEnabled=t.payload},setSenseHatEnabled:(e,t)=>{e.senseHatEnabled=t.payload},setLoadRemixDisabled:(e,t)=>{e.loadRemixDisabled=t.payload},triggerDraw:e=>{e.drawTriggered=!0},triggerSave:e=>{e.saveTriggered=!0},updateProjectComponent:(e,t)=>{const n=t.payload.extension,r=t.payload.name,i=t.payload.code,o=e.project.components.map(e=>e.extension!==n||e.name!==r?e:{...e,content:i});e.project.components=o},updateProjectName:(e,t)=>{e.project.name=t.payload,e.saving="idle"},updateComponentName:(e,t)=>{const n=t.payload.key,r=t.payload.name,i=t.payload.extension,o="".concat(e.project.components[n].name,".").concat(e.project.components[n].extension);if(e.project.components[n].name=r,e.project.components[n].extension=i,e.openFiles.flat().includes(o)){const t=e.openFiles.map(e=>e.includes(o)).indexOf(!0),n=e.openFiles[t].indexOf(o);e.openFiles[t][n]="".concat(r,".").concat(i)}e.saving="idle"},setError:(e,t)=>{e.error=t.payload},triggerCodeRun:e=>{e.codeRunTriggered=!0,e.codeHasBeenRun=!0},stopCodeRun:e=>{e.codeRunStopped=!0},stopDraw:e=>{e.drawTriggered=!1},loadingRunner:e=>{e.codeRunLoading=!0},codeRunHandled:e=>{e.codeRunLoading=!1,e.codeRunTriggered=!1,e.codeRunStopped=!1},closeAccessDeniedNoAuthModal:e=>{e.accessDeniedNoAuthModalShowing=!1,e.modals={}},closeAccessDeniedWithAuthModal:e=>{e.accessDeniedWithAuthModalShowing=!1},showBetaModal:e=>{e.betaModalShowing=!0},closeBetaModal:e=>{e.betaModalShowing=!1},showErrorModal:e=>{e.errorModalShowing=!0},closeErrorModal:e=>{e.errorModalShowing=!1},showLoginToSaveModal:e=>{e.loginToSaveModalShowing=!0},closeLoginToSaveModal:e=>{e.loginToSaveModalShowing=!1,e.saveTriggered=!1},closeNotFoundModal:e=>{e.notFoundModalShowing=!1},showNewFileModal:e=>{e.newFileModalShowing=!0},closeNewFileModal:e=>{e.newFileModalShowing=!1,e.nameError=""},showRenameFileModal:(e,t)=>{e.modals.renameFile=t.payload,e.renameFileModalShowing=!0},closeRenameFileModal:e=>{e.renameFileModalShowing=!1,e.nameError=""},showNewProjectModal:e=>{e.newProjectModalShowing=!0},closeNewProjectModal:e=>{e.newProjectModalShowing=!1},showRenameProjectModal:(e,t)=>{e.modals.renameProject=t.payload,e.renameProjectModalShowing=!0},closeRenameProjectModal:e=>{e.modals.renameProject=null,e.renameProjectModalShowing=!1},showDeleteProjectModal:(e,t)=>{e.modals.deleteProject=t.payload,e.deleteProjectModalShowing=!0},closeDeleteProjectModal:e=>{e.modals.deleteProject=null,e.deleteProjectModalShowing=!1},setProjectIndexPage:(e,t)=>{e.projectIndexCurrentPage=t.payload,e.projectListLoaded="idle"},showSidebar:e=>{e.sidebarShowing=!0},hideSidebar:e=>{e.sidebarShowing=!1},disableTheming:e=>{e.isThemeable=!1},setErrorDetails:(e,t)=>{e.errorDetails=t.payload}},extraReducers:e=>{e.addCase("editor/saveProject/pending",e=>{e.saving="pending",e.saveTriggered=!1}),e.addCase("editor/saveProject/fulfilled",(e,t)=>{localStorage.removeItem(e.project.identifier||"project"),e.lastSaveAutosave=t.payload.autosave,e.saving="success",e.lastSavedTime=Date.now(),e.renameProjectModalShowing?(e.modals.renameProject=null,e.renameProjectModalShowing=!1,e.projectListLoaded="idle"):e.project.identifier!==t.payload.project.identifier&&(e.project.image_list=e.project.image_list||[],e.project=t.payload.project,e.loading="idle")}),e.addCase("editor/saveProject/rejected",e=>{e.saving="failed"}),e.addCase("editor/remixProject/pending",(e,t)=>{e.saving="pending",e.saveTriggered=!1}),e.addCase("editor/remixProject/fulfilled",(e,t)=>{localStorage.removeItem(e.project.identifier),e.lastSaveAutosave=!1,e.saving="success",e.project=t.payload.project,e.loading="idle"}),e.addCase("editor/loadRemixProject/pending",Vn),e.addCase("editor/loadRemixProject/fulfilled",(e,t)=>{Wn(e,t),e.remixLoadFailed=!1}),e.addCase("editor/loadRemixProject/rejected",(e,t)=>{Xn(e,t),e.remixLoadFailed=!0}),e.addCase("editor/loadProject/pending",Vn),e.addCase("editor/loadProject/fulfilled",Wn),e.addCase("editor/loadProject/rejected",Xn),e.addCase("editor/deleteProject/fulfilled",e=>{e.projectListLoaded="idle",e.modals.deleteProject=null,e.deleteProjectModalShowing=!1}),e.addCase("editor/loadProjectList/pending",e=>{e.projectListLoaded="pending"}),e.addCase("editor/loadProjectList/fulfilled",(e,t)=>{if(t.payload.projects.length>0||1===t.payload.page){e.projectListLoaded="success",e.projectList=t.payload.projects;const n=t.payload.links;e.projectIndexTotalPages=n&&n.last?parseInt(n.last.page):t.payload.page}else e.projectIndexCurrentPage=e.projectIndexCurrentPage-1,e.projectListLoaded="idle"}),e.addCase("editor/loadProjectList/rejected",e=>{e.projectListLoaded="failed"})}})),{addProjectComponent:lr,loadingRunner:cr,codeRunHandled:ur,expireJustLoaded:dr,closeFile:hr,openFile:pr,setOpenFiles:fr,addFilePanel:mr,setFocussedFileIndex:gr,setPage:br,setEmbedded:vr,setIsOutputOnly:yr,setBrowserPreview:_r,setError:Sr,setIsSplitView:xr,setNameError:wr,setHasShownSavePrompt:kr,setWebComponent:Or,setProject:Er,setSenseHatAlwaysEnabled:Ar,setSenseHatEnabled:Tr,setLoadRemixDisabled:Cr,stopCodeRun:Mr,stopDraw:Pr,triggerCodeRun:$r,triggerDraw:Rr,triggerSave:Ir,updateComponentName:Dr,updateImages:Nr,updateProjectComponent:jr,updateProjectName:Lr,closeAccessDeniedNoAuthModal:Br,closeAccessDeniedWithAuthModal:Fr,showBetaModal:zr,closeBetaModal:Ur,showErrorModal:Qr,closeErrorModal:qr,showLoginToSaveModal:Hr,closeLoginToSaveModal:Gr,closeNotFoundModal:Vr,showNewFileModal:Wr,closeNewFileModal:Xr,showRenameFileModal:Yr,closeRenameFileModal:Zr,showNewProjectModal:Jr,closeNewProjectModal:Kr,showRenameProjectModal:ei,closeRenameProjectModal:ti,showDeleteProjectModal:ni,closeDeleteProjectModal:ri,setProjectIndexPage:ii,showSidebar:oi,hideSidebar:si,disableTheming:ai,setErrorDetails:li}=ar.actions;var ci=ar.reducer,ui=n(20),di=(n(325),n(147),n(326),n(327),n(172)),hi=n(12),pi=n.n(hi);var fi=()=>{var e;const t=Qn(e=>e.editor.project);return o.a.createElement("div",{id:"file-content",hidden:!0},null===(e=t.components)||void 0===e?void 0:e.map((e,t)=>["csv","txt"].includes(e.extension)?o.a.createElement("div",{id:"".concat(e.name,".").concat(e.extension),key:t},e.content):null))},mi=(n(152),n(28)),gi=n.n(mi),bi=(n(32),n(34)),vi=n.n(bi);n(173);Object.create(null);function yi(){if(console&&console.warn){for(var e,t=arguments.length,n=new Array(t),r=0;r2&&void 0!==arguments[2]?arguments[2]:{},r=t.languages[0],i=!!t.options&&t.options.fallbackLng,o=t.languages[t.languages.length-1];if("cimode"===r.toLowerCase())return!0;var s=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};return!(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!s(t.isLanguageChangingTo,e))&&(!!t.hasResourceBundle(r,e)||(!(t.services.backendConnector.backend&&(!t.options.resources||t.options.partialBundledLanguages))||!(!s(r,e)||i&&!s(o,e))))}function ki(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!t.languages||!t.languages.length)return Si("i18n.languages were undefined or empty",t.languages),!0;var r=void 0!==t.options.ignoreJSONStructure;return r?t.hasLoadedNamespace(e,{precheck:function(t,r){if(n.bindI18n&&n.bindI18n.indexOf("languageChanging")>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}):wi(e,t,n)}var Oi=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,Ei={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},Ai=function(e){return Ei[e]};function Ti(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ci(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};Pi=Ci(Ci({},Pi),e)}(e.options.react),function(e){Mi=e}(e)}};var Bi=Object(i.createContext)(),Fi=function(){function e(){Di()(this,e),this.usedNamespaces={}}return ji()(e,[{key:"addUsedNamespaces",value:function(e){var t=this;e.forEach((function(e){t.usedNamespaces[e]||(t.usedNamespaces[e]=!0)}))}},{key:"getUsedNamespaces",value:function(){return Object.keys(this.usedNamespaces)}}]),e}();var zi=n(55),Ui=n.n(zi);function Qi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function qi(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},n=t.i18n,r=Object(i.useContext)(Bi)||{},o=r.i18n,s=r.defaultNS,a=n||o||Ri();if(a&&!a.reportNamespaces&&(a.reportNamespaces=new Fi),!a){Si("You will need to pass in an i18next instance by using initReactI18next");var l=function(e,t){return"string"==typeof t?t:t&&"object"===vi()(t)&&"string"==typeof t.defaultValue?t.defaultValue:Array.isArray(e)?e[e.length-1]:e},c=[l,{},!1];return c.t=l,c.i18n={},c.ready=!1,c}a.options.react&&void 0!==a.options.react.wait&&Si("It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.");var u=qi(qi(qi({},$i()),a.options.react),t),d=u.useSuspense,h=u.keyPrefix,p=e||s||a.options&&a.options.defaultNS;p="string"==typeof p?[p]:p||["translation"],a.reportNamespaces.addUsedNamespaces&&a.reportNamespaces.addUsedNamespaces(p);var f=(a.isInitialized||a.initializedStoreOnce)&&p.every((function(e){return ki(e,a,u)}));function m(){return a.getFixedT(null,"fallback"===u.nsMode?p:p[0],h)}var g=Object(i.useState)(m),b=Ui()(g,2),v=b[0],y=b[1],_=p.join(),S=Hi(_),x=Object(i.useRef)(!0);Object(i.useEffect)((function(){var e=u.bindI18n,t=u.bindI18nStore;function n(){x.current&&y(m)}return x.current=!0,f||d||xi(a,p,(function(){x.current&&y(m)})),f&&S&&S!==_&&x.current&&y(m),e&&a&&a.on(e,n),t&&a&&a.store.on(t,n),function(){x.current=!1,e&&a&&e.split(" ").forEach((function(e){return a.off(e,n)})),t&&a&&t.split(" ").forEach((function(e){return a.store.off(e,n)}))}}),[a,_]);var w=Object(i.useRef)(!0);Object(i.useEffect)((function(){x.current&&!w.current&&y(m),w.current=!1}),[a,h]);var k=[v,a,f];if(k.t=v,k.i18n=a,k.ready=f,f)return k;if(!f&&!d)return k;throw new Promise((function(e){xi(a,p,(function(){e()}))}))}function Vi(e){return function(t){return!!t.type&&t.type.tabsRole===e}}var Wi=Vi("Tab"),Xi=Vi("TabList"),Yi=Vi("TabPanel");function Zi(){return(Zi=Object.assign||function(e){for(var t=1;t=this.getTabsCount())){var n=this.props;(0,n.onSelect)(e,n.selectedIndex,t)}},s.getNextTab=function(e){for(var t=this.getTabsCount(),n=e+1;ne;)if(!ho(this.getTab(t)))return t;return e},s.getFirstTab=function(){for(var e=this.getTabsCount(),t=0;t=0||(i[n]=e[n]);return i}(t,so));return o.a.createElement("div",ao({},i,{className:to(n),onClick:this.handleClick,onKeyDown:this.handleKeyDown,ref:function(t){e.node=t,r&&r(t)},"data-rttabs":!0}),this.getChildren())},r}(i.Component);po.defaultProps={className:"react-tabs",focus:!1},po.propTypes={};var fo=["children","defaultIndex","defaultFocus"];function mo(e,t){return(mo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var go=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).handleSelected=function(e,t,r){var i=n.props.onSelect,o=n.state.mode;if("function"!=typeof i||!1!==i(e,t,r)){var s={focus:"keydown"===r.type};1===o&&(s.selectedIndex=e),n.setState(s)}},n.state=r.copyPropsToState(n.props,{},t.defaultFocus),n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,mo(t,n),r.getDerivedStateFromProps=function(e,t){return r.copyPropsToState(e,t)},r.getModeFromProps=function(e){return null===e.selectedIndex?1:0},r.copyPropsToState=function(e,t,n){void 0===n&&(n=!1);var i={focus:n,mode:r.getModeFromProps(e)};if(1===i.mode){var o=Math.max(0,io(e.children)-1),s=null;s=null!=t.selectedIndex?Math.min(t.selectedIndex,o):e.defaultIndex||0,i.selectedIndex=s}return i},r.prototype.render=function(){var e=this.props,t=e.children,n=(e.defaultIndex,e.defaultFocus,function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r=0||(i[n]=e[n]);return i}(e,fo)),r=this.state,i=r.focus,s=r.selectedIndex;return n.focus=i,n.onSelect=this.handleSelected,null!=s&&(n.selectedIndex=s),o.a.createElement(po,n,t)},r}(i.Component);go.defaultProps={defaultFocus:!1,forceRenderTabPanel:!1,selectedIndex:null,defaultIndex:null,environment:null,disableUpDownKeys:!1},go.propTypes={},go.tabsRole="Tabs";var bo=["children","className"];function vo(){return(vo=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,bo);return o.a.createElement("ul",vo({},r,{className:to(n),role:"tablist"}),t)},r}(i.Component);_o.defaultProps={className:"react-tabs__tab-list"},_o.propTypes={},_o.tabsRole="TabList";var So=["children","className","disabled","disabledClassName","focus","id","panelId","selected","selectedClassName","tabIndex","tabRef"];function xo(){return(xo=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(n,So);return o.a.createElement("li",xo({},f,{className:to(i,(e={},e[d]=u,e[a]=s,e)),ref:function(e){t.node=e,p&&p(e)},role:"tab",id:l,"aria-selected":u?"true":"false","aria-disabled":s?"true":"false","aria-controls":c,tabIndex:h||(u?"0":null),"data-rttab":!0}),r)},r}(i.Component);ko.defaultProps={className:"react-tabs__tab",disabledClassName:"react-tabs__tab--disabled",focus:!1,id:null,panelId:null,selected:!1,selectedClassName:"react-tabs__tab--selected"},ko.propTypes={},ko.tabsRole="Tab";var Oo=["children","className","forceRender","id","selected","selectedClassName","tabId"];function Eo(){return(Eo=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}(t,Oo);return o.a.createElement("div",Eo({},u,{className:to(r,(e={},e[l]=a,e)),role:"tabpanel",id:s,"aria-labelledby":c}),i||a?n:null)},r}(i.Component);To.defaultProps={className:"react-tabs__tab-panel",forceRender:!1,selectedClassName:"react-tabs__tab-panel--selected"},To.propTypes={},To.tabsRole="TabPanel";const Co="(max-width: ".concat("600px",")");n(154);const Mo=Object(i.createContext)({theme:window.matchMedia("(prefers-color-scheme:dark)").matches?"dark":"light",fontSize:"small"});var Po,$o=()=>{const e=Qn(e=>e.editor.error),t=Object(i.useContext)(Mo);return e?o.a.createElement("div",{className:"error-message error-message--".concat(t.fontSize)},o.a.createElement("pre",{className:"error-message__content"},e)):null},Ro=(n(37),n(1)),Io=[];!function(e){e.BORDER_BOX="border-box",e.CONTENT_BOX="content-box",e.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(Po||(Po={}));var Do,No=function(e){return Object.freeze(e)},jo=function(e,t){this.inlineSize=e,this.blockSize=t,No(this)},Lo=function(){function e(e,t,n,r){return this.x=e,this.y=t,this.width=n,this.height=r,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,No(this)}return e.prototype.toJSON=function(){var e=this;return{x:e.x,y:e.y,top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.width,height:e.height}},e.fromRect=function(t){return new e(t.x,t.y,t.width,t.height)},e}(),Bo=function(e){return e instanceof SVGElement&&"getBBox"in e},Fo=function(e){if(Bo(e)){var t=e.getBBox(),n=t.width,r=t.height;return!n&&!r}var i=e,o=i.offsetWidth,s=i.offsetHeight;return!(o||s||e.getClientRects().length)},zo=function(e){var t;if(e instanceof Element)return!0;var n=null===(t=null==e?void 0:e.ownerDocument)||void 0===t?void 0:t.defaultView;return!!(n&&e instanceof n.Element)},Uo="undefined"!=typeof window?window:{},Qo=new WeakMap,qo=/auto|scroll/,Ho=/^tb|vertical/,Go=/msie|trident/i.test(Uo.navigator&&Uo.navigator.userAgent),Vo=function(e){return parseFloat(e||"0")},Wo=function(e,t,n){return void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=!1),new jo((n?t:e)||0,(n?e:t)||0)},Xo=No({devicePixelContentBoxSize:Wo(),borderBoxSize:Wo(),contentBoxSize:Wo(),contentRect:new Lo(0,0,0,0)}),Yo=function(e,t){if(void 0===t&&(t=!1),Qo.has(e)&&!t)return Qo.get(e);if(Fo(e))return Qo.set(e,Xo),Xo;var n=getComputedStyle(e),r=Bo(e)&&e.ownerSVGElement&&e.getBBox(),i=!Go&&"border-box"===n.boxSizing,o=Ho.test(n.writingMode||""),s=!r&&qo.test(n.overflowY||""),a=!r&&qo.test(n.overflowX||""),l=r?0:Vo(n.paddingTop),c=r?0:Vo(n.paddingRight),u=r?0:Vo(n.paddingBottom),d=r?0:Vo(n.paddingLeft),h=r?0:Vo(n.borderTopWidth),p=r?0:Vo(n.borderRightWidth),f=r?0:Vo(n.borderBottomWidth),m=d+c,g=l+u,b=(r?0:Vo(n.borderLeftWidth))+p,v=h+f,y=a?e.offsetHeight-v-e.clientHeight:0,_=s?e.offsetWidth-b-e.clientWidth:0,S=i?m+b:0,x=i?g+v:0,w=r?r.width:Vo(n.width)-S-_,k=r?r.height:Vo(n.height)-x-y,O=w+m+_+b,E=k+g+y+v,A=No({devicePixelContentBoxSize:Wo(Math.round(w*devicePixelRatio),Math.round(k*devicePixelRatio),o),borderBoxSize:Wo(O,E,o),contentBoxSize:Wo(w,k,o),contentRect:new Lo(d,l,w,k)});return Qo.set(e,A),A},Zo=function(e,t,n){var r=Yo(e,n),i=r.borderBoxSize,o=r.contentBoxSize,s=r.devicePixelContentBoxSize;switch(t){case Po.DEVICE_PIXEL_CONTENT_BOX:return s;case Po.BORDER_BOX:return i;default:return o}},Jo=function(e){var t=Yo(e);this.target=e,this.contentRect=t.contentRect,this.borderBoxSize=No([t.borderBoxSize]),this.contentBoxSize=No([t.contentBoxSize]),this.devicePixelContentBoxSize=No([t.devicePixelContentBoxSize])},Ko=function(e){if(Fo(e))return 1/0;for(var t=0,n=e.parentNode;n;)t+=1,n=n.parentNode;return t},es=function(){var e=1/0,t=[];Io.forEach((function(n){if(0!==n.activeTargets.length){var r=[];n.activeTargets.forEach((function(t){var n=new Jo(t.target),i=Ko(t.target);r.push(n),t.lastReportedSize=Zo(t.target,t.observedBox),ie?t.activeTargets.push(n):t.skippedTargets.push(n))}))}))},ns=function(){var e,t=0;for(ts(t);Io.some((function(e){return e.activeTargets.length>0}));)t=es(),ts(t);return Io.some((function(e){return e.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?e=new ErrorEvent("error",{message:"ResizeObserver loop completed with undelivered notifications."}):((e=document.createEvent("Event")).initEvent("error",!1,!1),e.message="ResizeObserver loop completed with undelivered notifications."),window.dispatchEvent(e)),t>0},rs=[],is=function(e){if(!Do){var t=0,n=document.createTextNode("");new MutationObserver((function(){return rs.splice(0).forEach((function(e){return e()}))})).observe(n,{characterData:!0}),Do=function(){n.textContent="".concat(t?t--:t++)}}rs.push(e),Do()},os=0,ss={attributes:!0,characterData:!0,childList:!0,subtree:!0},as=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],ls=function(e){return void 0===e&&(e=0),Date.now()+e},cs=!1,us=new(function(){function e(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return e.prototype.run=function(e){var t=this;if(void 0===e&&(e=250),!cs){cs=!0;var n,r=ls(e);n=function(){var n=!1;try{n=ns()}finally{if(cs=!1,e=r-ls(),!os)return;n?t.run(1e3):e>0?t.run(e):t.start()}},is((function(){requestAnimationFrame(n)}))}},e.prototype.schedule=function(){this.stop(),this.run()},e.prototype.observe=function(){var e=this,t=function(){return e.observer&&e.observer.observe(document.body,ss)};document.body?t():Uo.addEventListener("DOMContentLoaded",t)},e.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),as.forEach((function(t){return Uo.addEventListener(t,e.listener,!0)})))},e.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),as.forEach((function(t){return Uo.removeEventListener(t,e.listener,!0)})),this.stopped=!0)},e}()),ds=function(e){!os&&e>0&&us.start(),!(os+=e)&&us.stop()},hs=function(){function e(e,t){this.target=e,this.observedBox=t||Po.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return e.prototype.isActive=function(){var e,t=Zo(this.target,this.observedBox,!0);return e=this.target,Bo(e)||function(e){switch(e.tagName){case"INPUT":if("image"!==e.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(e)||"inline"!==getComputedStyle(e).display||(this.lastReportedSize=t),this.lastReportedSize.inlineSize!==t.inlineSize||this.lastReportedSize.blockSize!==t.blockSize},e}(),ps=function(e,t){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=t},fs=new WeakMap,ms=function(e,t){for(var n=0;n=0&&(i&&Io.splice(Io.indexOf(n),1),n.observationTargets.splice(r,1),ds(-1))},e.disconnect=function(e){var t=this,n=fs.get(e);n.observationTargets.slice().forEach((function(n){return t.unobserve(e,n.target)})),n.activeTargets.splice(0,n.activeTargets.length)},e}(),bs=function(){function e(e){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof e)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");gs.connect(this,e)}return e.prototype.observe=function(e,t){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!zo(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");gs.observe(this,e,t)},e.prototype.unobserve=function(e){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!zo(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");gs.unobserve(this,e)},e.prototype.disconnect=function(){gs.disconnect(this)},e.toString=function(){return"function ResizeObserver () { [polyfill code] }"},e}(),vs=n(48),ys=n(9);var _s=function(e){return function(t){e.forEach((function(e){"function"==typeof e?e(t):null!=e&&(e.current=t)}))}};const Ss=i.forwardRef(({envMap:e,resolution:t=256,frames:n=1/0,makeDefault:r,children:o,...s},a)=>{const l=Object(ys.m)(({set:e})=>e),c=Object(ys.m)(({camera:e})=>e),u=Object(ys.m)(({size:e})=>e),d=i.useRef(null),h=i.useRef(null),p=function(e,t,n){const r=Object(ys.m)(e=>e.size),o=Object(ys.m)(e=>e.viewport),s="number"==typeof e?e:r.width*o.dpr,a="number"==typeof t?t:r.height*o.dpr,l=("number"==typeof e?n:e)||{},{samples:c=0,depth:u,...d}=l,h=i.useMemo(()=>{const e=new Ro.WebGLRenderTarget(s,a,{minFilter:Ro.LinearFilter,magFilter:Ro.LinearFilter,type:Ro.HalfFloatType,...d});return u&&(e.depthTexture=new Ro.DepthTexture(s,a,Ro.FloatType)),e.samples=c,e},[]);return i.useLayoutEffect(()=>{h.setSize(s,a),c&&(h.samples=c)},[c,h,s,a]),i.useEffect(()=>()=>h.dispose(),[]),h}(t);i.useLayoutEffect(()=>{s.manual||(d.current.aspect=u.width/u.height)},[u,s]),i.useLayoutEffect(()=>{d.current.updateProjectionMatrix()});let f=0,m=null;const g="function"==typeof o;return Object(ys.a)(t=>{g&&(n===1/0||f{if(r){const e=c;return l(()=>({camera:d.current})),()=>l(()=>({camera:e}))}},[d,r,l]),i.createElement(i.Fragment,null,i.createElement("perspectiveCamera",Object(Cn.a)({ref:_s([d,a])},s),!g&&o),i.createElement("group",{ref:h},g&&o(p.texture)))});var xs=n(5);const ws=(e,t)=>(e%t+t)%t;class ks extends Ro.EventDispatcher{constructor(e,t){super(),Object(xs.a)(this,"object",void 0),Object(xs.a)(this,"domElement",void 0),Object(xs.a)(this,"enabled",!0),Object(xs.a)(this,"target",new Ro.Vector3),Object(xs.a)(this,"minDistance",0),Object(xs.a)(this,"maxDistance",1/0),Object(xs.a)(this,"minZoom",0),Object(xs.a)(this,"maxZoom",1/0),Object(xs.a)(this,"minPolarAngle",0),Object(xs.a)(this,"maxPolarAngle",Math.PI),Object(xs.a)(this,"minAzimuthAngle",-1/0),Object(xs.a)(this,"maxAzimuthAngle",1/0),Object(xs.a)(this,"enableDamping",!1),Object(xs.a)(this,"dampingFactor",.05),Object(xs.a)(this,"enableZoom",!0),Object(xs.a)(this,"zoomSpeed",1),Object(xs.a)(this,"enableRotate",!0),Object(xs.a)(this,"rotateSpeed",1),Object(xs.a)(this,"enablePan",!0),Object(xs.a)(this,"panSpeed",1),Object(xs.a)(this,"screenSpacePanning",!0),Object(xs.a)(this,"keyPanSpeed",7),Object(xs.a)(this,"autoRotate",!1),Object(xs.a)(this,"autoRotateSpeed",2),Object(xs.a)(this,"reverseOrbit",!1),Object(xs.a)(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),Object(xs.a)(this,"mouseButtons",{LEFT:Ro.MOUSE.ROTATE,MIDDLE:Ro.MOUSE.DOLLY,RIGHT:Ro.MOUSE.PAN}),Object(xs.a)(this,"touches",{ONE:Ro.TOUCH.ROTATE,TWO:Ro.TOUCH.DOLLY_PAN}),Object(xs.a)(this,"target0",void 0),Object(xs.a)(this,"position0",void 0),Object(xs.a)(this,"zoom0",void 0),Object(xs.a)(this,"_domElementKeyEvents",null),Object(xs.a)(this,"getPolarAngle",void 0),Object(xs.a)(this,"getAzimuthalAngle",void 0),Object(xs.a)(this,"setPolarAngle",void 0),Object(xs.a)(this,"setAzimuthalAngle",void 0),Object(xs.a)(this,"getDistance",void 0),Object(xs.a)(this,"listenToKeyEvents",void 0),Object(xs.a)(this,"saveState",void 0),Object(xs.a)(this,"reset",void 0),Object(xs.a)(this,"update",void 0),Object(xs.a)(this,"connect",void 0),Object(xs.a)(this,"dispose",void 0),this.object=e,this.domElement=t,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object instanceof Ro.PerspectiveCamera?this.object.zoom:1,this.getPolarAngle=()=>c.phi,this.getAzimuthalAngle=()=>c.theta,this.setPolarAngle=e=>{let t=ws(e,2*Math.PI),r=c.phi;r<0&&(r+=2*Math.PI),t<0&&(t+=2*Math.PI);let i=Math.abs(t-r);2*Math.PI-i{let t=ws(e,2*Math.PI),r=c.theta;r<0&&(r+=2*Math.PI),t<0&&(t+=2*Math.PI);let i=Math.abs(t-r);2*Math.PI-in.object.position.distanceTo(n.target),this.listenToKeyEvents=e=>{e.addEventListener("keydown",G),this._domElementKeyEvents=e},this.saveState=()=>{n.target0.copy(n.target),n.position0.copy(n.object.position),n.zoom0=n.object instanceof Ro.PerspectiveCamera?n.object.zoom:1},this.reset=()=>{n.target.copy(n.target0),n.object.position.copy(n.position0),n.object instanceof Ro.PerspectiveCamera&&(n.object.zoom=n.zoom0,n.object.updateProjectionMatrix()),n.dispatchEvent(r),n.update(),a=s.NONE},this.update=(()=>{const t=new Ro.Vector3,i=(new Ro.Quaternion).setFromUnitVectors(e.up,new Ro.Vector3(0,1,0)),o=i.clone().invert(),f=new Ro.Vector3,m=new Ro.Quaternion,g=2*Math.PI;return function(){const e=n.object.position;t.copy(e).sub(n.target),t.applyQuaternion(i),c.setFromVector3(t),n.autoRotate&&a===s.NONE&&E(2*Math.PI/60/60*n.autoRotateSpeed),n.enableDamping?(c.theta+=u.theta*n.dampingFactor,c.phi+=u.phi*n.dampingFactor):(c.theta+=u.theta,c.phi+=u.phi);let b=n.minAzimuthAngle,v=n.maxAzimuthAngle;return isFinite(b)&&isFinite(v)&&(b<-Math.PI?b+=g:b>Math.PI&&(b-=g),v<-Math.PI?v+=g:v>Math.PI&&(v-=g),c.theta=b<=v?Math.max(b,Math.min(v,c.theta)):c.theta>(b+v)/2?Math.max(b,c.theta):Math.min(v,c.theta)),c.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,c.phi)),c.makeSafe(),c.radius*=d,c.radius=Math.max(n.minDistance,Math.min(n.maxDistance,c.radius)),!0===n.enableDamping?n.target.addScaledVector(h,n.dampingFactor):n.target.add(h),t.setFromSpherical(c),t.applyQuaternion(o),e.copy(n.target).add(t),n.object.lookAt(n.target),!0===n.enableDamping?(u.theta*=1-n.dampingFactor,u.phi*=1-n.dampingFactor,h.multiplyScalar(1-n.dampingFactor)):(u.set(0,0,0),h.set(0,0,0)),d=1,!!(p||f.distanceToSquared(n.object.position)>l||8*(1-m.dot(n.object.quaternion))>l)&&(n.dispatchEvent(r),f.copy(n.object.position),m.copy(n.object.quaternion),p=!1,!0)}})(),this.connect=e=>{e===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),n.domElement=e,n.domElement.style.touchAction="none",n.domElement.addEventListener("contextmenu",V),n.domElement.addEventListener("pointerdown",z),n.domElement.addEventListener("pointercancel",q),n.domElement.addEventListener("wheel",H)},this.dispose=()=>{var e,t,r,i,o,s;null===(e=n.domElement)||void 0===e||e.removeEventListener("contextmenu",V),null===(t=n.domElement)||void 0===t||t.removeEventListener("pointerdown",z),null===(r=n.domElement)||void 0===r||r.removeEventListener("pointercancel",q),null===(i=n.domElement)||void 0===i||i.removeEventListener("wheel",H),null===(o=n.domElement)||void 0===o||o.ownerDocument.removeEventListener("pointermove",U),null===(s=n.domElement)||void 0===s||s.ownerDocument.removeEventListener("pointerup",Q),null!==n._domElementKeyEvents&&n._domElementKeyEvents.removeEventListener("keydown",G)};const n=this,r={type:"change"},i={type:"start"},o={type:"end"},s={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let a=s.NONE;const l=1e-6,c=new Ro.Spherical,u=new Ro.Spherical;let d=1;const h=new Ro.Vector3;let p=!1;const f=new Ro.Vector2,m=new Ro.Vector2,g=new Ro.Vector2,b=new Ro.Vector2,v=new Ro.Vector2,y=new Ro.Vector2,_=new Ro.Vector2,S=new Ro.Vector2,x=new Ro.Vector2,w=[],k={};function O(){return Math.pow(.95,n.zoomSpeed)}function E(e){n.reverseOrbit?u.theta+=e:u.theta-=e}function A(e){n.reverseOrbit?u.phi+=e:u.phi-=e}const T=(()=>{const e=new Ro.Vector3;return function(t,n){e.setFromMatrixColumn(n,0),e.multiplyScalar(-t),h.add(e)}})(),C=(()=>{const e=new Ro.Vector3;return function(t,r){!0===n.screenSpacePanning?e.setFromMatrixColumn(r,1):(e.setFromMatrixColumn(r,0),e.crossVectors(n.object.up,e)),e.multiplyScalar(t),h.add(e)}})(),M=(()=>{const e=new Ro.Vector3;return function(t,r){const i=n.domElement;if(i&&n.object instanceof Ro.PerspectiveCamera&&n.object.isPerspectiveCamera){const o=n.object.position;e.copy(o).sub(n.target);let s=e.length();s*=Math.tan(n.object.fov/2*Math.PI/180),T(2*t*s/i.clientHeight,n.object.matrix),C(2*r*s/i.clientHeight,n.object.matrix)}else i&&n.object instanceof Ro.OrthographicCamera&&n.object.isOrthographicCamera?(T(t*(n.object.right-n.object.left)/n.object.zoom/i.clientWidth,n.object.matrix),C(r*(n.object.top-n.object.bottom)/n.object.zoom/i.clientHeight,n.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),n.enablePan=!1)}})();function P(e){n.object instanceof Ro.PerspectiveCamera&&n.object.isPerspectiveCamera?d/=e:n.object instanceof Ro.OrthographicCamera&&n.object.isOrthographicCamera?(n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom*e)),n.object.updateProjectionMatrix(),p=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function $(e){n.object instanceof Ro.PerspectiveCamera&&n.object.isPerspectiveCamera?d*=e:n.object instanceof Ro.OrthographicCamera&&n.object.isOrthographicCamera?(n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/e)),n.object.updateProjectionMatrix(),p=!0):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function R(e){f.set(e.clientX,e.clientY)}function I(e){b.set(e.clientX,e.clientY)}function D(){if(1==w.length)f.set(w[0].pageX,w[0].pageY);else{const e=.5*(w[0].pageX+w[1].pageX),t=.5*(w[0].pageY+w[1].pageY);f.set(e,t)}}function N(){if(1==w.length)b.set(w[0].pageX,w[0].pageY);else{const e=.5*(w[0].pageX+w[1].pageX),t=.5*(w[0].pageY+w[1].pageY);b.set(e,t)}}function j(){const e=w[0].pageX-w[1].pageX,t=w[0].pageY-w[1].pageY,n=Math.sqrt(e*e+t*t);_.set(0,n)}function L(e){if(1==w.length)m.set(e.pageX,e.pageY);else{const t=Y(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);m.set(n,r)}g.subVectors(m,f).multiplyScalar(n.rotateSpeed);const t=n.domElement;t&&(E(2*Math.PI*g.x/t.clientHeight),A(2*Math.PI*g.y/t.clientHeight)),f.copy(m)}function B(e){if(1==w.length)v.set(e.pageX,e.pageY);else{const t=Y(e),n=.5*(e.pageX+t.x),r=.5*(e.pageY+t.y);v.set(n,r)}y.subVectors(v,b).multiplyScalar(n.panSpeed),M(y.x,y.y),b.copy(v)}function F(e){const t=Y(e),r=e.pageX-t.x,i=e.pageY-t.y,o=Math.sqrt(r*r+i*i);S.set(0,o),x.set(0,Math.pow(S.y/_.y,n.zoomSpeed)),P(x.y),_.copy(S)}function z(e){if(!1!==n.enabled){var t,r;if(0===w.length)null===(t=n.domElement)||void 0===t||t.ownerDocument.addEventListener("pointermove",U),null===(r=n.domElement)||void 0===r||r.ownerDocument.addEventListener("pointerup",Q);!function(e){w.push(e)}(e),"touch"===e.pointerType?function(e){switch(X(e),w.length){case 1:switch(n.touches.ONE){case Ro.TOUCH.ROTATE:if(!1===n.enableRotate)return;D(),a=s.TOUCH_ROTATE;break;case Ro.TOUCH.PAN:if(!1===n.enablePan)return;N(),a=s.TOUCH_PAN;break;default:a=s.NONE}break;case 2:switch(n.touches.TWO){case Ro.TOUCH.DOLLY_PAN:if(!1===n.enableZoom&&!1===n.enablePan)return;n.enableZoom&&j(),n.enablePan&&N(),a=s.TOUCH_DOLLY_PAN;break;case Ro.TOUCH.DOLLY_ROTATE:if(!1===n.enableZoom&&!1===n.enableRotate)return;n.enableZoom&&j(),n.enableRotate&&D(),a=s.TOUCH_DOLLY_ROTATE;break;default:a=s.NONE}break;default:a=s.NONE}a!==s.NONE&&n.dispatchEvent(i)}(e):function(e){let t;switch(e.button){case 0:t=n.mouseButtons.LEFT;break;case 1:t=n.mouseButtons.MIDDLE;break;case 2:t=n.mouseButtons.RIGHT;break;default:t=-1}switch(t){case Ro.MOUSE.DOLLY:if(!1===n.enableZoom)return;!function(e){_.set(e.clientX,e.clientY)}(e),a=s.DOLLY;break;case Ro.MOUSE.ROTATE:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enablePan)return;I(e),a=s.PAN}else{if(!1===n.enableRotate)return;R(e),a=s.ROTATE}break;case Ro.MOUSE.PAN:if(e.ctrlKey||e.metaKey||e.shiftKey){if(!1===n.enableRotate)return;R(e),a=s.ROTATE}else{if(!1===n.enablePan)return;I(e),a=s.PAN}break;default:a=s.NONE}a!==s.NONE&&n.dispatchEvent(i)}(e)}}function U(e){!1!==n.enabled&&("touch"===e.pointerType?function(e){switch(X(e),a){case s.TOUCH_ROTATE:if(!1===n.enableRotate)return;L(e),n.update();break;case s.TOUCH_PAN:if(!1===n.enablePan)return;B(e),n.update();break;case s.TOUCH_DOLLY_PAN:if(!1===n.enableZoom&&!1===n.enablePan)return;!function(e){n.enableZoom&&F(e),n.enablePan&&B(e)}(e),n.update();break;case s.TOUCH_DOLLY_ROTATE:if(!1===n.enableZoom&&!1===n.enableRotate)return;!function(e){n.enableZoom&&F(e),n.enableRotate&&L(e)}(e),n.update();break;default:a=s.NONE}}(e):function(e){if(!1===n.enabled)return;switch(a){case s.ROTATE:if(!1===n.enableRotate)return;!function(e){m.set(e.clientX,e.clientY),g.subVectors(m,f).multiplyScalar(n.rotateSpeed);const t=n.domElement;t&&(E(2*Math.PI*g.x/t.clientHeight),A(2*Math.PI*g.y/t.clientHeight)),f.copy(m),n.update()}(e);break;case s.DOLLY:if(!1===n.enableZoom)return;!function(e){S.set(e.clientX,e.clientY),x.subVectors(S,_),x.y>0?P(O()):x.y<0&&$(O()),_.copy(S),n.update()}(e);break;case s.PAN:if(!1===n.enablePan)return;!function(e){v.set(e.clientX,e.clientY),y.subVectors(v,b).multiplyScalar(n.panSpeed),M(y.x,y.y),b.copy(v),n.update()}(e)}}(e))}function Q(e){var t,r,i;(W(e),0===w.length)&&(null===(t=n.domElement)||void 0===t||t.releasePointerCapture(e.pointerId),null===(r=n.domElement)||void 0===r||r.ownerDocument.removeEventListener("pointermove",U),null===(i=n.domElement)||void 0===i||i.ownerDocument.removeEventListener("pointerup",Q));n.dispatchEvent(o),a=s.NONE}function q(e){W(e)}function H(e){!1===n.enabled||!1===n.enableZoom||a!==s.NONE&&a!==s.ROTATE||(e.preventDefault(),n.dispatchEvent(i),function(e){e.deltaY<0?$(O()):e.deltaY>0&&P(O()),n.update()}(e),n.dispatchEvent(o))}function G(e){!1!==n.enabled&&!1!==n.enablePan&&function(e){let t=!1;switch(e.code){case n.keys.UP:M(0,n.keyPanSpeed),t=!0;break;case n.keys.BOTTOM:M(0,-n.keyPanSpeed),t=!0;break;case n.keys.LEFT:M(n.keyPanSpeed,0),t=!0;break;case n.keys.RIGHT:M(-n.keyPanSpeed,0),t=!0}t&&(e.preventDefault(),n.update())}(e)}function V(e){!1!==n.enabled&&e.preventDefault()}function W(e){delete k[e.pointerId];for(let t=0;t{const d=Object(ys.m)(e=>e.invalidate),h=Object(ys.m)(e=>e.camera),p=Object(ys.m)(e=>e.gl),f=Object(ys.m)(e=>e.events),m=Object(ys.m)(e=>e.setEvents),g=Object(ys.m)(e=>e.set),b=Object(ys.m)(e=>e.get),v=Object(ys.m)(e=>e.performance),y=t||h,_=r||f.connected||p.domElement,S=i.useMemo(()=>new ks(y),[y]);return Object(ys.a)(()=>{S.enabled&&S.update()},-1),i.useEffect(()=>(S.connect(_),()=>{S.dispose()}),[_,n,S,d]),i.useEffect(()=>{const e=e=>{d(),n&&v.regress(),s&&s(e)},t=e=>{a&&a(e)},r=e=>{l&&l(e)};return S.addEventListener("change",e),S.addEventListener("start",t),S.addEventListener("end",r),()=>{S.removeEventListener("start",t),S.removeEventListener("end",r),S.removeEventListener("change",e)}},[s,a,l,S,d,m]),i.useEffect(()=>{if(e){const e=b().controls;return g({controls:S}),()=>g({controls:e})}},[e,S]),i.createElement("primitive",Object(Cn.a)({ref:u,object:S,enableDamping:o},c))});var Es=()=>o.a.createElement(o.a.Fragment,null,o.a.createElement("ambientLight",{intensity:.25}),o.a.createElement("pointLight",{intensity:.35,angle:28,penumbra:2,position:[.418,16.199,.3],castShadow:!0}),o.a.createElement("pointLight",{position:[-16.116,14.37,8.208],intensity:.5,castShadow:!0}),o.a.createElement("pointLight",{position:[-16.109,18.021,-8.207],intensity:.5,castShadow:!0}),o.a.createElement("pointLight",{position:[14.904,12.198,-1.832],intensity:.17,castShadow:!0}),o.a.createElement("pointLight",{position:[-.462,8.89,14.52],intensity:.43,castShadow:!0}),o.a.createElement("pointLight",{position:[3.235,11.486,-12.541],intensity:.2,castShadow:!0}),o.a.createElement("pointLight",{position:[0,-20,0],intensity:.5,castShadow:!0})),As={_Eps:1e-5,Vector:function(e,t,n){this.x=e,this.y=t,this.z=n}};As.Vector.prototype={length:function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},normalize:function(){var e=this.length();e<=As._Eps||(this.x/=e,this.y/=e,this.z/=e)}},As.transpose3x3Matrix=function(e){var t=[[0,0,0],[0,0,0],[0,0,0]];return t[0][0]=e[0][0],t[0][1]=e[1][0],t[0][2]=e[2][0],t[1][0]=e[0][1],t[1][1]=e[1][1],t[1][2]=e[2][1],t[2][0]=e[0][2],t[2][1]=e[1][2],t[2][2]=e[2][2],t},As.dot3x3and3x1=function(e,t){var n=[];return n[0]=e[0][0]*t[0]+e[0][1]*t[1]+e[0][2]*t[2],n[1]=e[1][0]*t[0]+e[1][1]*t[1]+e[1][2]*t[2],n[2]=e[2][0]*t[0]+e[2][1]*t[1]+e[2][2]*t[2],n},As.multiplyArrayWithScalar=function(e,t){return[e[0]*t,e[1]*t,e[2]*t]},As.divideArrayWithScalar=function(e,t){return[e[0]/t,e[1]/t,e[2]/t]},As.Defaults={},As.Defaults.O=[0,0,0],As.Defaults.X=[1,0,0],As.Defaults.Y=[0,1,0],As.Defaults.Z=[0,0,1],As.Defaults.NORTH=As.multiplyArrayWithScalar(As.Defaults.X,.33),As.Defaults.GRAVITY=As.Defaults.Z,As.clamp=function(e,t,n){return Math.min(n,Math.max(t,e))},As.degToRad=function(e){return e instanceof Array?[e[0]*Math.PI/180,e[1]*Math.PI/180,e[2]*Math.PI/180]:e*Math.PI/180},As.radToDeg=function(e){return e instanceof Array?[180*e[0]/Math.PI,180*e[1]/Math.PI,180*e[2]/Math.PI]:180*e/Math.PI};var Ts=n(4),Cs=n.n(Ts);function Ms(){return 1e3*Date.now()}window.rotatemodel=function(e,t,n){window.mod.rotation.x=e,window.mod.rotation.y=t,window.mod.rotation.z=n};const Ps=new WeakMap;class $s extends Ro.Loader{constructor(e){super(e),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(e){return this.decoderPath=e,this}setDecoderConfig(e){return this.decoderConfig=e,this}setWorkerLimit(e){return this.workerLimit=e,this}load(e,t,n,r){const i=new Ro.FileLoader(this.manager);i.setPath(this.path),i.setResponseType("arraybuffer"),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials),i.load(e,e=>{const n={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(e,n).then(t).catch(r)},n,r)}decodeDracoFile(e,t,n,r){const i={attributeIDs:n||this.defaultAttributeIDs,attributeTypes:r||this.defaultAttributeTypes,useUniqueIDs:!!n};this.decodeGeometry(e,i).then(t)}decodeGeometry(e,t){for(const e in t.attributeTypes){const n=t.attributeTypes[e];void 0!==n.BYTES_PER_ELEMENT&&(t.attributeTypes[e]=n.name)}const n=JSON.stringify(t);if(Ps.has(e)){const t=Ps.get(e);if(t.key===n)return t.promise;if(0===e.byteLength)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let r;const i=this.workerNextTaskID++,o=e.byteLength,s=this._getWorker(i,o).then(n=>(r=n,new Promise((n,o)=>{r._callbacks[i]={resolve:n,reject:o},r.postMessage({type:"decode",id:i,taskConfig:t,buffer:e},[e])}))).then(e=>this._createGeometry(e.geometry));return s.catch(()=>!0).then(()=>{r&&i&&this._releaseTask(r,i)}),Ps.set(e,{key:n,promise:s}),s}_createGeometry(e){const t=new Ro.BufferGeometry;e.index&&t.setIndex(new Ro.BufferAttribute(e.index.array,1));for(let n=0;n{n.load(e,t,void 0,r)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const e="object"!=typeof WebAssembly||"js"===this.decoderConfig.type,t=[];return e?t.push(this._loadLibrary("draco_decoder.js","text")):(t.push(this._loadLibrary("draco_wasm_wrapper.js","text")),t.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(t).then(t=>{const n=t[0];e||(this.decoderConfig.wasmBinary=t[1]);const r=Rs.toString(),i=["/* draco decoder */",n,"","/* worker */",r.substring(r.indexOf("{")+1,r.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([i]))}),this.decoderPending}_getWorker(e,t){return this._initDecoder().then(()=>{if(this.workerPool.lengtht._taskLoad?-1:1}));const n=this.workerPool[this.workerPool.length-1];return n._taskCosts[e]=t,n._taskLoad+=t,n})}_releaseTask(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]}debug(){console.log("Task load: ",this.workerPool.map(e=>e._taskLoad))}dispose(){for(let e=0;e{const t=e.draco,s=new t.Decoder,a=new t.DecoderBuffer;a.Init(new Int8Array(r),r.byteLength);try{const e=function(e,t,r,i){const o=i.attributeIDs,s=i.attributeTypes;let a,l;const c=t.GetEncodedGeometryType(r);if(c===e.TRIANGULAR_MESH)a=new e.Mesh,l=t.DecodeBufferToMesh(r,a);else{if(c!==e.POINT_CLOUD)throw new Error("THREE.DRACOLoader: Unexpected geometry type.");a=new e.PointCloud,l=t.DecodeBufferToPointCloud(r,a)}if(!l.ok()||0===a.ptr)throw new Error("THREE.DRACOLoader: Decoding failed: "+l.error_msg());const u={index:null,attributes:[]};for(const r in o){const l=self[s[r]];let c,d;if(i.useUniqueIDs)d=o[r],c=t.GetAttributeByUniqueId(a,d);else{if(d=t.GetAttributeId(a,e[o[r]]),-1===d)continue;c=t.GetAttribute(a,d)}u.attributes.push(n(e,t,a,r,l,c))}c===e.TRIANGULAR_MESH&&(u.index=function(e,t,n){const r=3*n.num_faces(),i=4*r,o=e._malloc(i);t.GetTrianglesUInt32Array(n,i,o);const s=new Uint32Array(e.HEAPF32.buffer,o,r).slice();return e._free(o),{array:s,itemSize:1}}(e,t,a));return e.destroy(a),u}(t,s,a,o),r=e.attributes.map(e=>e.array.buffer);e.index&&r.push(e.index.array.buffer),self.postMessage({type:"decode",id:i.id,geometry:e},r)}catch(e){console.error(e),self.postMessage({type:"error",id:i.id,error:e.message})}finally{t.destroy(a),t.destroy(s)}})}}}let Is;const Ds=()=>{if(Is)return Is;const e=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),t=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]);if("object"!=typeof WebAssembly)return{supported:!1};let n,r="B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAGTkUUUBRNCUoBAG9uC/wgBZHKCUGAKCUG9JyRVAECFJRICBRcGXEXAcAF9PQFAVAFAclAcAVJAF9JyRMGXGXAG9FQBAMCbJHKC9wZRSAKCIrCEJCGrRQANCUGJRfCBRbAIRTEXGXAOATlAQ9PQBCBRISEMATAQJRIGXAS9FQBCBRtCBREEXGXAOAIlCi9PQBCBRISLMANCU/CBJAEJRKGXGXGXGXGXATAECKrJ2BBAtCKZrCEZfIBFGEBMAKhB83EBAKCNJhB83EBSEMAKAI2BIAI2BBHmCKrHYAYCE6HYy86BBAKCFJAICIJAYJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCGJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCEJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCIJAYAmJHY2BBAI2BFHmCKrHPAPCE6HPy86BBAKCLJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCKJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCOJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCNJAYAmJHY2BBAI2BGHmCKrHPAPCE6HPy86BBAKCVJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCcJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCMJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCSJAYAmJHm2BBAI2BEHICKrHYAYCE6HYy86BBAKCQJAmAYJHm2BBAICIrCEZHYAYCE6HYy86BBAKCfJAmAYJHm2BBAICGrCEZHYAYCE6HYy86BBAKCbJAmAYJHK2BBAICEZHIAICE6HIy86BBAKAIJRISGMAKAI2BNAI2BBHmCIrHYAYCb6HYy86BBAKCFJAICNJAYJHY2BBAmCbZHmAmCb6Hmy86BBAKCGJAYAmJHm2BBAI2BFHYCIrHPAPCb6HPy86BBAKCEJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCIJAmAYJHm2BBAI2BGHYCIrHPAPCb6HPy86BBAKCLJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCKJAmAYJHm2BBAI2BEHYCIrHPAPCb6HPy86BBAKCOJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCNJAmAYJHm2BBAI2BIHYCIrHPAPCb6HPy86BBAKCVJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCcJAmAYJHm2BBAI2BLHYCIrHPAPCb6HPy86BBAKCMJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCSJAmAYJHm2BBAI2BKHYCIrHPAPCb6HPy86BBAKCQJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCfJAmAYJHm2BBAI2BOHICIrHYAYCb6HYy86BBAKCbJAmAYJHK2BBAICbZHIAICb6HIy86BBAKAIJRISFMAKAI8pBB83BBAKCNJAICNJ8pBB83BBAICTJRIMAtCGJRtAECTJHEAS9JQBMMGXAIQBCBRISEMGXAM9FQBANAbJ2BBRtCBRKAfREEXAEANCU/CBJAKJ2BBHTCFrCBATCFZl9zAtJHt86BBAEAGJREAKCFJHKAM9HQBMMAfCFJRfAIRTAbCFJHbAG9HQBMMABAcAG9sJANCUGJAMAG9sTkUUUBpANANCUGJAMCaJAG9sJAGTkUUUBpMAMCBAIyAcJRcAIQBMC9+RKSFMCBC99AOAIlAGCAAGCA9Ly6yRKMALCU/EBJ8kUUUUBAKM+OmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUFT+JUUUBpALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM+lLKFaF99GaG99FaG99GXGXAGCI9HQBAF9FQFEXGXGX9DBBB8/9DBBB+/ABCGJHG1BB+yAB1BBHE+yHI+L+TABCFJHL1BBHK+yHO+L+THN9DBBBB9gHVyAN9DBB/+hANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE86BBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG86BBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG86BBABCIJRBAFCaJHFQBSGMMAF9FQBEXGXGX9DBBB8/9DBBB+/ABCIJHG8uFB+yAB8uFBHE+yHI+L+TABCGJHL8uFBHK+yHO+L+THN9DBBBB9gHVyAN9DB/+g6ANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE87FBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG87FBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG87FBABCNJRBAFCaJHFQBMMM/SEIEaE99EaF99GXAF9FQBCBREABRIEXGXGX9D/zI818/AICKJ8uFBHLCEq+y+VHKAI8uFB+y+UHO9DB/+g6+U9DBBB8/9DBBB+/AO9DBBBB9gy+SHN+L9DBBB9P9d9FQBAN+oRVSFMCUUUU94RVMAICIJ8uFBRcAICGJ8uFBRMABALCFJCEZAEqCFWJAV87FBGXGXAKAM+y+UHN9DB/+g6+U9DBBB8/9DBBB+/AN9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRMSFMCUUUU94RMMABALCGJCEZAEqCFWJAM87FBGXGXAKAc+y+UHK9DB/+g6+U9DBBB8/9DBBB+/AK9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRcSFMCUUUU94RcMABALCaJCEZAEqCFWJAc87FBGXGX9DBBU8/AOAO+U+TANAN+U+TAKAK+U+THO9DBBBBAO9DBBBB9gy+R9DB/+g6+U9DBBB8/+SHO+L9DBBB9P9d9FQBAO+oRcSFMCUUUU94RcMABALCEZAEqCFWJAc87FBAICNJRIAECIJREAFCaJHFQBMMM9JBGXAGCGrAF9sHF9FQBEXABAB8oGBHGCNWCN91+yAGCi91CnWCUUU/8EJ+++U84GBABCIJRBAFCaJHFQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEM/lFFFaGXGXAFABqCEZ9FQBABRESFMGXGXAGCT9PQBABRESFMABREEXAEAF8oGBjGBAECIJAFCIJ8oGBjGBAECNJAFCNJ8oGBjGBAECSJAFCSJ8oGBjGBAECTJREAFCTJRFAGC9wJHGCb9LQBMMAGCI9JQBEXAEAF8oGBjGBAFCIJRFAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF2BB86BBAECFJREAFCFJRFAGCaJHGQBMMABMoFFGaGXGXABCEZ9FQBABRESFMAFCgFZC+BwsN9sRIGXGXAGCT9PQBABRESFMABREEXAEAIjGBAECSJAIjGBAECNJAIjGBAECIJAIjGBAECTJREAGC9wJHGCb9LQBMMAGCI9JQBEXAEAIjGBAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF86BBAECFJREAGCaJHGQBMMABMMMFBCUNMIT9kBB";WebAssembly.validate(e)&&(r="B9h9z9tFBBBFiI9gBB9gLaaaaaFa9gEaaaB9gFaFaEMcBBFBFFGGGEILF9wFFFLEFBFKNFaFCx/aFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBG8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBIy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBKi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBOn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBNI9z9iqlBVc+N9IcIBTEM9+FLa8jUUUUBCTlRBCBRFEXCBRGCBREEXABCNJAGJAECUaAFAGrCFZHIy86BBAEAIJREAGCFJHGCN9HQBMAFCx+YUUBJAE86BBAFCEWCxkUUBJAB8pEN83EBAFCFJHFCUG9HQBMMk8lLbaE97F9+FaL978jUUUUBCU/KBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAG/8cBBCUoBAG9uC/wgBZHKCUGAKCUG9JyRNAECFJRKCBRVGXEXAVAF9PQFANAFAVlAVANJAF9JyRcGXGXAG9FQBAcCbJHIC9wZHMCE9sRSAMCFWRQAICIrCEJCGrRfCBRbEXAKRTCBRtGXEXGXAOATlAf9PQBCBRKSLMALCU/CBJAtAM9sJRmATAfJRKCBREGXAMCoB9JQBAOAKlC/gB9JQBCBRIEXAmAIJREGXGXGXGXGXATAICKrJ2BBHYCEZfIBFGEBMAECBDtDMIBSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIBAKCTJRKMGXGXGXGXGXAYCGrCEZfIBFGEBMAECBDtDMITSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMITAKCTJRKMGXGXGXGXGXAYCIrCEZfIBFGEBMAECBDtDMIASEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIAAKCTJRKMGXGXGXGXGXAYCKrfIBFGEBMAECBDtDMI8wSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCIJAeDeBJAYCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCNJAeDeBJAYCx+YUUBJ2BBJRKSFMAEAKDBBBDMI8wAKCTJRKMAICoBJREAICUFJAM9LQFAERIAOAKlC/fB9LQBMMGXAEAM9PQBAECErRIEXGXAOAKlCi9PQBCBRKSOMAmAEJRYGXGXGXGXGXATAECKrJ2BBAICKZrCEZfIBFGEBMAYCBDtDMIBSEMAYAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAYAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAYAKDBBBDMIBAKCTJRKMAICGJRIAECTJHEAM9JQBMMGXAK9FQBAKRTAtCFJHtCI6QGSFMMCBRKSEMGXAM9FQBALCUGJAbJREALAbJDBGBReCBRYEXAEALCU/CBJAYJHIDBIBHdCFD9tAdCFDbHPD9OD9hD9RHdAIAMJDBIBH8ZCFD9tA8ZAPD9OD9hD9RH8ZDQBTFtGmEYIPLdKeOnHpAIAQJDBIBHyCFD9tAyAPD9OD9hD9RHyAIASJDBIBH8cCFD9tA8cAPD9OD9hD9RH8cDQBTFtGmEYIPLdKeOnH8dDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGEAeD9uHeDyBjGBAEAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeApA8dDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeAdA8ZDQNiV8ZcpMyS8cQ8df8eb8fHdAyA8cDQNiV8ZcpMyS8cQ8df8eb8fH8ZDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeAdA8ZDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJREAYCTJHYAM9JQBMMAbCIJHbAG9JQBMMABAVAG9sJALCUGJAcAG9s/8cBBALALCUGJAcCaJAG9sJAG/8cBBMAcCBAKyAVJRVAKQBMC9+RKSFMCBC99AOAKlAGCAAGCA9Ly6yRKMALCU/KBJ8kUUUUBAKMNBT+BUUUBM+KmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUF/8MBALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM/dLEK97FaF97GXGXAGCI9HQBAF9FQFCBRGEXABABDBBBHECiD+rFCiD+sFD/6FHIAECND+rFCiD+sFD/6FAID/gFAECTD+rFCiD+sFD/6FHLD/gFD/kFD/lFHKCBDtD+2FHOAICUUUU94DtHND9OD9RD/kFHI9DBB/+hDYAIAID/mFAKAKD/mFALAOALAND9OD9RD/kFHIAID/mFD/kFD/kFD/jFD/nFHLD/mF9DBBX9LDYHOD/kFCgFDtD9OAECUUU94DtD9OD9QAIALD/mFAOD/kFCND+rFCU/+EDtD9OD9QAKALD/mFAOD/kFCTD+rFCUU/8ODtD9OD9QDMBBABCTJRBAGCIJHGAF9JQBSGMMAF9FQBCBRGEXABCTJHVAVDBBBHECBDtHOCUU98D8cFCUU98D8cEHND9OABDBBBHKAEDQILKOSQfbPden8c8d8e8fCggFDtD9OD/6FAKAEDQBFGENVcMTtmYi8ZpyHECTD+sFD/6FHID/gFAECTD+rFCTD+sFD/6FHLD/gFD/kFD/lFHE9DB/+g6DYALAEAOD+2FHOALCUUUU94DtHcD9OD9RD/kFHLALD/mFAEAED/mFAIAOAIAcD9OD9RD/kFHEAED/mFD/kFD/kFD/jFD/nFHID/mF9DBBX9LDYHOD/kFCTD+rFALAID/mFAOD/kFCggEDtD9OD9QHLAEAID/mFAOD/kFCaDbCBDnGCBDnECBDnKCBDnOCBDncCBDnMCBDnfCBDnbD9OHEDQNVi8ZcMpySQ8c8dfb8e8fD9QDMBBABAKAND9OALAEDQBFTtGEmYILPdKOenD9QDMBBABCAJRBAGCIJHGAF9JQBMMM/hEIGaF97FaL978jUUUUBCTlREGXAF9FQBCBRIEXAEABDBBBHLABCTJHKDBBBHODQILKOSQfbPden8c8d8e8fHNCTD+sFHVCID+rFDMIBAB9DBBU8/DY9D/zI818/DYAVCEDtD9QD/6FD/nFHVALAODQBFGENVcMTtmYi8ZpyHLCTD+rFCTD+sFD/6FD/mFHOAOD/mFAVALCTD+sFD/6FD/mFHcAcD/mFAVANCTD+rFCTD+sFD/6FD/mFHNAND/mFD/kFD/kFD/lFCBDtD+4FD/jF9DB/+g6DYHVD/mF9DBBX9LDYHLD/kFCggEDtHMD9OAcAVD/mFALD/kFCTD+rFD9QHcANAVD/mFALD/kFCTD+rFAOAVD/mFALD/kFAMD9OD9QHVDQBFTtGEmYILPdKOenHLD8dBAEDBIBDyB+t+J83EBABCNJALD8dFAEDBIBDyF+t+J83EBAKAcAVDQNVi8ZcMpySQ8c8dfb8e8fHVD8dBAEDBIBDyG+t+J83EBABCiJAVD8dFAEDBIBDyE+t+J83EBABCAJRBAICIJHIAF9JQBMMM9jFF97GXAGCGrAF9sHG9FQBCBRFEXABABDBBBHECND+rFCND+sFD/6FAECiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMBBABCTJRBAFCIJHFAG9JQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEMMMFBCUNMIT9tBB");const i=WebAssembly.instantiate(function(e){const n=new Uint8Array(e.length);for(let t=0;t96?r-71:r>64?r-65:r>47?r+4:r>46?63:62}let r=0;for(let i=0;i{n=e.instance,n.exports.__wasm_call_ctors()});function o(e,t,r,i,o,s){const a=n.exports.sbrk,l=r+3&-4,c=a(l*i),u=a(o.length),d=new Uint8Array(n.exports.memory.buffer);d.set(o,u);const h=e(c,r,i,u,o.length);if(0===h&&s&&s(c,l,i),t.set(d.subarray(c,c+r*i)),a(c-a(0)),0!==h)throw new Error("Malformed buffer data: "+h)}const s={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},a={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};return Is={ready:i,supported:!0,decodeVertexBuffer(e,t,r,i,a){o(n.exports.meshopt_decodeVertexBuffer,e,t,r,i,n.exports[s[a]])},decodeIndexBuffer(e,t,r,i){o(n.exports.meshopt_decodeIndexBuffer,e,t,r,i)},decodeIndexSequence(e,t,r,i){o(n.exports.meshopt_decodeIndexSequence,e,t,r,i)},decodeGltfBuffer(e,t,r,i,l,c){o(n.exports[a[l]],e,t,r,i,n.exports[s[c]])}},Is};function Ns(e,t){if(t===Ro.TrianglesDrawMode)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),e;if(t===Ro.TriangleFanDrawMode||t===Ro.TriangleStripDrawMode){let n=e.getIndex();if(null===n){const t=[],r=e.getAttribute("position");if(void 0===r)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),e;for(let e=0;e=2.0 are supported.")));const l=new Ca(i,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});l.fileLoader.setRequestHeader(this.requestHeader);for(let e=0;e=0&&void 0===s[t]&&console.warn('THREE.GLTFLoader: Unknown extension "'+t+'".')}}l.setExtensions(o),l.setPlugins(s),l.parse(n,r)}parseAsync(e,t){const n=this;return new Promise((function(r,i){n.parse(e,t,r,i)}))}}function Ls(){let e={};return{get:function(t){return e[t]},add:function(t,n){e[t]=n},remove:function(t){delete e[t]},removeAll:function(){e={}}}}const Bs={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class Fs{constructor(e){this.parser=e,this.name=Bs.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let n=0,r=t.length;n=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,i.source,o)}}class Zs{constructor(e){this.parser=e,this.name=Bs.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,r=n.json,i=r.textures[e];if(!i.extensions||!i.extensions[t])return null;const o=i.extensions[t],s=r.images[o.source];let a=n.textureLoader;if(s.uri){const e=n.options.manager.getHandler(s.uri);null!==e&&(a=e)}return this.detectSupport().then((function(i){if(i)return n.loadTextureImage(e,o.source,a);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return n.loadTexture(e)}))}detectSupport(){return this.isSupported||(this.isSupported=new Promise((function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(1===t.height)}}))),this.isSupported}}class Js{constructor(e){this.parser=e,this.name=Bs.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,r=n.json,i=r.textures[e];if(!i.extensions||!i.extensions[t])return null;const o=i.extensions[t],s=r.images[o.source];let a=n.textureLoader;if(s.uri){const e=n.options.manager.getHandler(s.uri);null!==e&&(a=e)}return this.detectSupport().then((function(i){if(i)return n.loadTextureImage(e,o.source,a);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return n.loadTexture(e)}))}detectSupport(){return this.isSupported||(this.isSupported=new Promise((function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(1===t.height)}}))),this.isSupported}}class Ks{constructor(e){this.name=Bs.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,n=t.bufferViews[e];if(n.extensions&&n.extensions[this.name]){const e=n.extensions[this.name],r=this.parser.getDependency("buffer",e.buffer),i=this.parser.options.meshoptDecoder;if(!i||!i.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return r.then((function(t){const n=e.byteOffset||0,r=e.byteLength||0,o=e.count,s=e.byteStride,a=new Uint8Array(t,n,r);return i.decodeGltfBufferAsync?i.decodeGltfBufferAsync(o,s,a,e.mode,e.filter).then((function(e){return e.buffer})):i.ready.then((function(){const t=new ArrayBuffer(o*s);return i.decodeGltfBuffer(new Uint8Array(t),o,s,a,e.mode,e.filter),t}))}))}return null}}class ea{constructor(e){this.name=Bs.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,n=t.nodes[e];if(!n.extensions||!n.extensions[this.name]||void 0===n.mesh)return null;const r=t.meshes[n.mesh];for(const e of r.primitives)if(e.mode!==da.TRIANGLES&&e.mode!==da.TRIANGLE_STRIP&&e.mode!==da.TRIANGLE_FAN&&void 0!==e.mode)return null;const i=n.extensions[this.name].attributes,o=[],s={};for(const e in i)o.push(this.parser.getDependency("accessor",i[e]).then(t=>(s[e]=t,s[e])));return o.length<1?null:(o.push(this.parser.createNodeMesh(e)),Promise.all(o).then(e=>{const t=e.pop(),n=t.isGroup?t.children:[t],r=e[0].count,i=[];for(const e of n){const t=new Ro.Matrix4,n=new Ro.Vector3,o=new Ro.Quaternion,a=new Ro.Vector3(1,1,1),l=new Ro.InstancedMesh(e.geometry,e.material,r);for(let e=0;e=152?{TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3"}:{TEXCOORD_0:"uv",TEXCOORD_1:"uv2"},COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},ba={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},va={CUBICSPLINE:void 0,LINEAR:Ro.InterpolateLinear,STEP:Ro.InterpolateDiscrete},ya="OPAQUE",_a="MASK",Sa="BLEND";function xa(e,t,n){for(const r in n.extensions)void 0===e[r]&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[r]=n.extensions[r])}function wa(e,t){void 0!==t.extras&&("object"==typeof t.extras?Object.assign(e.userData,t.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+t.extras))}function ka(e,t){if(e.updateMorphTargets(),void 0!==t.weights)for(let n=0,r=t.weights.length;n-1,i=r?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),"undefined"==typeof createImageBitmap||n||r&&i<98?this.textureLoader=new Ro.TextureLoader(this.options.manager):this.textureLoader=new Ro.ImageBitmapLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Ro.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),"use-credentials"===this.options.crossOrigin&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const n=this,r=this.json,i=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll((function(e){return e._markDefs&&e._markDefs()})),Promise.all(this._invokeAll((function(e){return e.beforeRoot&&e.beforeRoot()}))).then((function(){return Promise.all([n.getDependencies("scene"),n.getDependencies("animation"),n.getDependencies("camera")])})).then((function(t){const o={scene:t[0][r.scene||0],scenes:t[0],animations:t[1],cameras:t[2],asset:r.asset,parser:n,userData:{}};xa(i,o,r),wa(o,r),Promise.all(n._invokeAll((function(e){return e.afterRoot&&e.afterRoot(o)}))).then((function(){e(o)}))})).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],n=this.json.meshes||[];for(let n=0,r=t.length;n{const n=this.associations.get(e);null!=n&&this.associations.set(t,n);for(const[n,r]of e.children.entries())i(r,t.children[n])};return i(n,r),r.name+="_instance_"+e.uses[t]++,r}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let n=0;n=2&&p.setY(t,u[e*o+1]),o>=3&&p.setZ(t,u[e*o+2]),o>=4&&p.setW(t,u[e*o+3]),o>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return p}))}loadTexture(e){const t=this.json,n=this.options,r=t.textures[e].source,i=t.images[r];let o=this.textureLoader;if(i.uri){const e=n.manager.getHandler(i.uri);null!==e&&(o=e)}return this.loadTextureImage(e,r,o)}loadTextureImage(e,t,n){const r=this,i=this.json,o=i.textures[e],s=i.images[t],a=(s.uri||s.bufferView)+":"+o.sampler;if(this.textureCache[a])return this.textureCache[a];const l=this.loadImageSource(t,n).then((function(t){t.flipY=!1,t.name=o.name||s.name||"",""===t.name&&"string"==typeof s.uri&&!1===s.uri.startsWith("data:image/")&&(t.name=s.uri);const n=(i.samplers||{})[o.sampler]||{};return t.magFilter=pa[n.magFilter]||Ro.LinearFilter,t.minFilter=pa[n.minFilter]||Ro.LinearMipmapLinearFilter,t.wrapS=fa[n.wrapS]||Ro.RepeatWrapping,t.wrapT=fa[n.wrapT]||Ro.RepeatWrapping,r.associations.set(t,{textures:e}),t})).catch((function(){return null}));return this.textureCache[a]=l,l}loadImageSource(e,t){const n=this,r=this.json,i=this.options;if(void 0!==this.sourceCache[e])return this.sourceCache[e].then(e=>e.clone());const o=r.images[e],s=self.URL||self.webkitURL;let a=o.uri||"",l=!1;if(void 0!==o.bufferView)a=n.getDependency("bufferView",o.bufferView).then((function(e){l=!0;const t=new Blob([e],{type:o.mimeType});return a=s.createObjectURL(t),a}));else if(void 0===o.uri)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const c=Promise.resolve(a).then((function(e){return new Promise((function(n,r){let o=n;!0===t.isImageBitmapLoader&&(o=function(e){const t=new Ro.Texture(e);t.needsUpdate=!0,n(t)}),t.load(Ro.LoaderUtils.resolveURL(e,i.path),o,void 0,r)}))})).then((function(e){var t;return!0===l&&s.revokeObjectURL(a),e.userData.mimeType=o.mimeType||((t=o.uri).search(/\.jpe?g($|\?)/i)>0||0===t.search(/^data\:image\/jpeg/)?"image/jpeg":t.search(/\.webp($|\?)/i)>0||0===t.search(/^data\:image\/webp/)?"image/webp":"image/png"),e})).catch((function(e){throw console.error("THREE.GLTFLoader: Couldn't load texture",a),e}));return this.sourceCache[e]=c,c}assignTexture(e,t,n,r){const i=this;return this.getDependency("texture",n.index).then((function(o){if(!o)return null;if(void 0!==n.texCoord&&n.texCoord>0&&((o=o.clone()).channel=n.texCoord),i.extensions[Bs.KHR_TEXTURE_TRANSFORM]){const e=void 0!==n.extensions?n.extensions[Bs.KHR_TEXTURE_TRANSFORM]:void 0;if(e){const t=i.associations.get(o);o=i.extensions[Bs.KHR_TEXTURE_TRANSFORM].extendTexture(o,e),i.associations.set(o,t)}}return void 0!==r&&(o.encoding=r),e[t]=o,o}))}assignFinalMaterial(e){const t=e.geometry;let n=e.material;const r=void 0===t.attributes.tangent,i=void 0!==t.attributes.color,o=void 0===t.attributes.normal;if(e.isPoints){const e="PointsMaterial:"+n.uuid;let t=this.cache.get(e);t||(t=new Ro.PointsMaterial,Ro.Material.prototype.copy.call(t,n),t.color.copy(n.color),t.map=n.map,t.sizeAttenuation=!1,this.cache.add(e,t)),n=t}else if(e.isLine){const e="LineBasicMaterial:"+n.uuid;let t=this.cache.get(e);t||(t=new Ro.LineBasicMaterial,Ro.Material.prototype.copy.call(t,n),t.color.copy(n.color),t.map=n.map,this.cache.add(e,t)),n=t}if(r||i||o){let e="ClonedMaterial:"+n.uuid+":";r&&(e+="derivative-tangents:"),i&&(e+="vertex-colors:"),o&&(e+="flat-shading:");let t=this.cache.get(e);t||(t=n.clone(),i&&(t.vertexColors=!0),o&&(t.flatShading=!0),r&&(t.normalScale&&(t.normalScale.y*=-1),t.clearcoatNormalScale&&(t.clearcoatNormalScale.y*=-1)),this.cache.add(e,t),this.associations.set(t,this.associations.get(n))),n=t}e.material=n}getMaterialType(){return Ro.MeshStandardMaterial}loadMaterial(e){const t=this,n=this.json,r=this.extensions,i=n.materials[e];let o;const s={},a=[];if((i.extensions||{})[Bs.KHR_MATERIALS_UNLIT]){const e=r[Bs.KHR_MATERIALS_UNLIT];o=e.getMaterialType(),a.push(e.extendParams(s,i,t))}else{const n=i.pbrMetallicRoughness||{};if(s.color=new Ro.Color(1,1,1),s.opacity=1,Array.isArray(n.baseColorFactor)){const e=n.baseColorFactor;s.color.fromArray(e),s.opacity=e[3]}void 0!==n.baseColorTexture&&a.push(t.assignTexture(s,"map",n.baseColorTexture,Ro.sRGBEncoding)),s.metalness=void 0!==n.metallicFactor?n.metallicFactor:1,s.roughness=void 0!==n.roughnessFactor?n.roughnessFactor:1,void 0!==n.metallicRoughnessTexture&&(a.push(t.assignTexture(s,"metalnessMap",n.metallicRoughnessTexture)),a.push(t.assignTexture(s,"roughnessMap",n.metallicRoughnessTexture))),o=this._invokeOne((function(t){return t.getMaterialType&&t.getMaterialType(e)})),a.push(Promise.all(this._invokeAll((function(t){return t.extendMaterialParams&&t.extendMaterialParams(e,s)}))))}!0===i.doubleSided&&(s.side=Ro.DoubleSide);const l=i.alphaMode||ya;if(l===Sa?(s.transparent=!0,s.depthWrite=!1):(s.transparent=!1,l===_a&&(s.alphaTest=void 0!==i.alphaCutoff?i.alphaCutoff:.5)),void 0!==i.normalTexture&&o!==Ro.MeshBasicMaterial&&(a.push(t.assignTexture(s,"normalMap",i.normalTexture)),s.normalScale=new Ro.Vector2(1,1),void 0!==i.normalTexture.scale)){const e=i.normalTexture.scale;s.normalScale.set(e,e)}return void 0!==i.occlusionTexture&&o!==Ro.MeshBasicMaterial&&(a.push(t.assignTexture(s,"aoMap",i.occlusionTexture)),void 0!==i.occlusionTexture.strength&&(s.aoMapIntensity=i.occlusionTexture.strength)),void 0!==i.emissiveFactor&&o!==Ro.MeshBasicMaterial&&(s.emissive=(new Ro.Color).fromArray(i.emissiveFactor)),void 0!==i.emissiveTexture&&o!==Ro.MeshBasicMaterial&&a.push(t.assignTexture(s,"emissiveMap",i.emissiveTexture,Ro.sRGBEncoding)),Promise.all(a).then((function(){const n=new o(s);return i.name&&(n.name=i.name),wa(n,i),t.associations.set(n,{materials:e}),i.extensions&&xa(r,n,i),n}))}createUniqueName(e){const t=Ro.PropertyBinding.sanitizeNodeName(e||"");let n=t;for(let e=1;this.nodeNamesUsed[n];++e)n=t+"_"+e;return this.nodeNamesUsed[n]=!0,n}loadGeometries(e){const t=this,n=this.extensions,r=this.primitiveCache;function i(e){return n[Bs.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(e,t).then((function(n){return Ma(n,e,t)}))}const o=[];for(let n=0,s=e.length;n0&&ka(d,i),d.name=t.createUniqueName(i.name||"mesh_"+e),wa(d,i),u.extensions&&xa(r,d,u),t.assignFinalMaterial(d),l.push(d)}for(let n=0,r=l.length;n1?new Ro.Group:1===t.length?t[0]:new Ro.Object3D,s!==t[0])for(let e=0,n=t.length;e{const t=new Map;for(const[e,n]of r.associations)(e instanceof Ro.Material||e instanceof Ro.Texture)&&t.set(e,n);return e.traverse(e=>{const n=r.associations.get(e);null!=n&&t.set(e,n)}),t})(i),i}))}}function Ma(e,t,n){const r=t.attributes,i=[];function o(t,r){return n.getDependency("accessor",t).then((function(t){e.setAttribute(r,t)}))}for(const t in r){const n=ga[t]||t.toLowerCase();n in e.attributes||i.push(o(r[t],n))}if(void 0!==t.indices&&!e.index){const r=n.getDependency("accessor",t.indices).then((function(t){e.setIndex(t)}));i.push(r)}return wa(e,t),function(e,t,n){const r=t.attributes,i=new Ro.Box3;if(void 0===r.POSITION)return;{const e=n.json.accessors[r.POSITION],t=e.min,o=e.max;if(void 0===t||void 0===o)return void console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");if(i.set(new Ro.Vector3(t[0],t[1],t[2]),new Ro.Vector3(o[0],o[1],o[2])),e.normalized){const t=Aa(ha[e.componentType]);i.min.multiplyScalar(t),i.max.multiplyScalar(t)}}const o=t.targets;if(void 0!==o){const e=new Ro.Vector3,t=new Ro.Vector3;for(let r=0,i=o.length;r{n&&n(r),e&&(Pa||(Pa=new $s),Pa.setDecoderPath("string"==typeof e?e:"https://www.gstatic.com/draco/versioned/decoders/1.5.5/"),r.setDRACOLoader(Pa)),t&&r.setMeshoptDecoder(Ds())}}function Ra(e,t=!0,n=!0,r){return Object(ys.c)(js,e,$a(t,n,r))}Ra.preload=(e,t=!0,n=!0,r)=>ys.c.preload(js,e,$a(t,n,r)),Ra.clear=e=>ys.c.clear(js,e);var Ia=()=>{const{scene:e}=Ra("".concat("https://editor-static.raspberrypi.org/releases/v0.25.4","/models/raspi-compressed.glb"));window.mod=e;var t={"0_0_0":new Ro.MeshStandardMaterial({color:"rgb(0,0,0)"})};function n(n,r,i,o){var s=n%8,a=Math.floor(n/8);let l;"".concat(r,"_").concat(i,"_").concat(o)in t?l=t["".concat(r,"_").concat(i,"_").concat(o)]:(l=new Ro.MeshStandardMaterial({color:"rgb(".concat(r,",").concat(i,",").concat(o,")")}),t["".concat(r,"_").concat(i,"_").concat(o)]=l);var c=e.getObjectByName("circle".concat(s,"_").concat(7-a,"-1"));null!=c&&(c.material=l)}return Cs.a.sense_hat_emit=function(e,t){if(e&&"setpixel"===e){const e=t,r=Cs.a.sense_hat.pixels[e];Cs.a.sense_hat.pixels[e]=[-8&r[0],-4&r[1],-8&r[2]],n(e,parseInt(255*r[0]),parseInt(255*r[1]),parseInt(255*r[2]))}else e&&"setpixels"===e&&function(e,t){null==e&&(e=Array.from(Array(64).keys()));var r=0;for(const i of e)n(i,t[r][0],t[r][1],t[r][2]),r+=1}(t,Cs.a.sense_hat.pixels);Object(ys.k)()},o.a.createElement("primitive",{object:e,scale:4})},Da=!1,Na=.5,ja=.2,La=0,Ba=0,Fa=0,za=0,Ua=window.innerWidth/2,Qa=window.innerHeight/2;var qa=e=>{const{updateOrientation:t}=e,n=()=>{Da=!1};return o.a.createElement(vs.a,{frameloop:"demand",onPointerDown:e=>{Da=!0,Ba=e.clientX-Ua,za=e.clientY-Qa},onPointerUp:n,onPointerOut:n,onPointerMove:e=>{var n,r,i;La=e.clientX-Ua,Na=25e-5*(La-Ba),Fa=e.clientY-Qa,ja=25e-5*(Fa-za),Da&&(window.mod.rotateOnWorldAxis(new Ro.Vector3(0,0,-1),Na),window.mod.rotateOnWorldAxis(new Ro.Vector3(1,0,0),ja),t((n=window.mod.rotation.x,r=window.mod.rotation.y,i=window.mod.rotation.z,[(180*r/Math.PI+360)%360,(180*n/Math.PI+90+360)%360,(180*i/Math.PI+360)%360])),ja*=.75,Na*=.75)},resize:{polyfill:bs}},o.a.createElement(Es,null),o.a.createElement(i.Suspense,{fallback:null},o.a.createElement(Ss,{makeDefault:!0,fov:25,near:1,far:2e4,position:[0,1.5,0]}),o.a.createElement(Ia,null),o.a.createElement(Os,{enableRotate:!1,enablePan:!1,enableZoom:!1,enabled:!1})))};var Ha=e=>{const{name:t,label:n,type:r,defaultValue:s}=e,[a,l]=Object(i.useState)(s);return Object(i.useEffect)(()=>{Cs.a.sense_hat&&Object(i.startTransition)(()=>{Cs.a.sense_hat[t]=a})},[t,a]),o.a.createElement("div",{className:"sense-hat-controls-panel__container"},o.a.createElement("label",{className:"sense-hat-controls-panel__control-name",htmlFor:"sense_hat_".concat(t)},n),o.a.createElement("input",{type:r,id:"sense_hat_".concat(t),defaultValue:a,onChange:e=>l(e.target.value)}))},Ga=n(176),Va=n.n(Ga);n(358);var Wa=e=>{const{defaultValue:t}=e,[n,r]=Object(i.useState)(t),s=Qn(e=>e.editor.codeRunTriggered),{t:a}=Gi();return Object(i.useEffect)(()=>{s||(Cs.a.sense_hat.start_motion_callback=()=>{},Cs.a.sense_hat.stop_motion_callback=()=>{})},[s]),Object(i.useEffect)(()=>{Cs.a.sense_hat&&Object(i.startTransition)(()=>{Cs.a.sense_hat.motion=n}),n?Cs.a.sense_hat.start_motion_callback():Cs.a.sense_hat.stop_motion_callback()},[n]),o.a.createElement("div",{className:"sense-hat-controls-panel__container"},o.a.createElement("label",{className:"sense-hat-controls-panel__control-name",htmlFor:"sense_hat_motion"},a("output.senseHat.controls.motion")),o.a.createElement("div",{className:"sense-hat-controls-panel__control-toggle"},o.a.createElement("label",{htmlFor:"sense_hat_motion"},a("output.senseHat.controls.motionSensorOptions.no")),o.a.createElement(Va.a,{id:"sense_hat_motion",icons:!1,checked:n,onChange:e=>r(e.target.checked)}),o.a.createElement("label",{htmlFor:"sense_hat_motion"},a("output.senseHat.controls.motionSensorOptions.yes"))))};var Xa=e=>{const{name:t,label:n,unit:r,min:s,max:a,defaultValue:l,Icon:c}=e,[u,d]=Object(i.useState)(l);return Object(i.useEffect)(()=>{Cs.a.sense_hat&&Object(i.startTransition)(()=>{Cs.a.sense_hat.rtimu[t][1]=u+Math.random()-.5})},[t,u]),o.a.createElement("div",{className:"sense-hat-controls-panel__control"},o.a.createElement("label",{className:"sense-hat-controls-panel__control-name",htmlFor:"sense_hat_".concat(t)},n),o.a.createElement("input",{id:"sense_hat_".concat(t),className:"sense-hat-controls-panel__control-input",type:"range",min:s,max:a,step:"1",defaultValue:u,onChange:e=>d(parseFloat(e.target.value))}),o.a.createElement("div",{className:"sense-hat-controls-panel__control-reading"},c?o.a.createElement(c,null):null,o.a.createElement("span",{className:"sense-hat-controls-panel__control-value"},u,r)))},Ya=n(177);var Za,Ja=()=>{const e=Qn(e=>e.editor.codeRunTriggered),{seconds:t,minutes:n,isRunning:r,pause:s,reset:a}=Object(Ya.useStopwatch)({autoStart:!1}),[l,c]=Object(i.useState)(!1),{t:u}=Gi();return Object(i.useEffect)(()=>{window.addEventListener("blur",()=>{c(!0)})},[]),Object(i.useEffect)(()=>{e&&!r&&(c(!1),a()),!e&&r&&(s(),Cs.a.sense_hat.mz_criteria.duration=l?null:60*n+t)},[e,l,n,t,r,s,a]),o.a.createElement("div",{className:"sense-hat-controls-panel__container sense-hat-controls-panel__container-timer"},o.a.createElement("label",{className:"sense-hat-controls-panel__control-name",htmlFor:"sense_hat_timer"},u("output.senseHat.controls.timer")),o.a.createElement("span",{className:"sense-hat-controls-panel__control-reading sense-hat-controls-panel__control-reading-timer",id:"sense_hat_timer"},o.a.createElement("span",null,String(n).padStart(2,"0")),":",o.a.createElement("span",null,String(t).padStart(2,"0"))))};function Ka(){return(Ka=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{temperature:t,pressure:n,humidity:r,colour:i,motion:s}=e,{t:a}=Gi();return o.a.createElement("div",{className:"sense-hat-controls"},o.a.createElement("h2",{className:"sense-hat-controls-heading"},a("output.senseHat.controls.name")),o.a.createElement("div",{className:"sense-hat-controls-panel"},o.a.createElement("div",{className:"sense-hat-controls-panel__sliders"},o.a.createElement(Xa,{name:"temperature",label:a("output.senseHat.controls.temperature"),unit:"°C",min:-40,max:120,defaultValue:t,Icon:ll}),o.a.createElement(Xa,{name:"pressure",label:a("output.senseHat.controls.pressure"),unit:"hPa",min:260,max:1260,defaultValue:n,Icon:sl}),o.a.createElement(Xa,{name:"humidity",label:a("output.senseHat.controls.humidity"),unit:"%",min:0,max:100,defaultValue:r,Icon:rl})),o.a.createElement("div",{className:"sense-hat-controls-panel__control sense-hat-controls-panel__control-last"},o.a.createElement(Ha,{name:"colour",label:a("output.senseHat.controls.colour"),type:"color",defaultValue:i}),o.a.createElement(Wa,{defaultValue:s}),o.a.createElement(Ja,null))))};var ul,dl=e=>{const{name:t,value:n}=e;return o.a.createElement("span",{className:"sense-hat-model-orientation__reading"},t,": ",Math.round(n))};function hl(){return(hl=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{resetOrientation:t}=e;return o.a.createElement("button",{onClick:e=>t(e)},o.a.createElement(pl,null))};var ml=e=>{const{t:t}=Gi(),{orientation:n,resetOrientation:r}=e;return o.a.createElement("div",{className:"sense-hat-model-orientation"},o.a.createElement("div",{className:"sense-hat-model-orientation__spacing"}),o.a.createElement("div",{className:"sense-hat-model-orientation__values"},o.a.createElement(dl,{name:t("output.senseHat.model.roll"),value:n[0]}),o.a.createElement(dl,{name:t("output.senseHat.model.pitch"),value:n[1]}),o.a.createElement(dl,{name:t("output.senseHat.model.yaw"),value:n[2]})),o.a.createElement("div",{className:"sense-hat-model-orientation__reset-btn"},o.a.createElement(fl,{resetOrientation:r})))};const gl={duration:null,noInputEvents:!0,readColour:!1,readHumidity:!1,readPressure:!1,readTemperature:!1,usedLEDs:!1};var bl=()=>{const e=Qn(e=>e.editor.project),[t,n]=Object(i.useState)([0,90,0]);if(!Cs.a.sense_hat){Cs.a.sense_hat={colour:"#FF00A4",gamma:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],low_light:!1,motion:!1,mz_criteria:{...gl},pixels:[],rtimu:{pressure:[1,1013+Math.random()-.5],temperature:[1,13+Math.random()-.5],humidity:[1,45+Math.random()-.5],gyro:[0,0,0],accel:[0,0,0],compass:[0,0,33],raw_orientation:[0,90,0]},sensestick:{_eventQueue:[],off:()=>{},once:()=>{}},start_motion_callback:()=>{},stop_motion_callback:()=>{}};for(var r=0;r<64;r++)Cs.a.sense_hat.pixels.push([0,0,0])}return Object(i.useEffect)(()=>{Cs.a.sense_hat.mz_criteria={...gl}},[e]),Object(i.useEffect)(()=>{Cs.a.sense_hat.rtimu.raw_orientation=t,function(){var e=Cs.a.sense_hat.rtimu.timestamp;null==e&&(e=Ms());var t=Ms(),n=(t-e)/1e6;0===n&&(n=1);var r=Cs.a.sense_hat.rtimu.raw_old_orientation;null==r&&(r=[0,90,0]);var i=As.degToRad(Cs.a.sense_hat.rtimu.raw_orientation),o=[i[0]-r[0],i[1]-r[1],i[2]-r[2]];o=As.divideArrayWithScalar(o,n);var s=i[0],a=i[1],l=i[2],c=Math.cos(l),u=Math.cos(a),d=Math.cos(s),h=Math.sin(l),p=Math.sin(a),f=Math.sin(s),m=[[c*u,c*p*f-d*h,h*f+c*d*p],[u*h,c*d+h*p*f,d*h*p-c*f],[-p,u*f,u*d]],g=As.transpose3x3Matrix(m),b=As.dot3x3and3x1(g,As.Defaults.GRAVITY),v=As.dot3x3and3x1(g,As.Defaults.NORTH);Cs.a.sense_hat.rtimu.raw_old_orientation=i,Cs.a.sense_hat.rtimu.fusionPose=i,Cs.a.sense_hat.rtimu.timestamp=t,Cs.a.sense_hat.rtimu.accel=[As.clamp(b[0],-8,8),As.clamp(b[1],-8,8),As.clamp(b[2],-8,8)],Cs.a.sense_hat.rtimu.gyro=[o[0],o[1],o[2]],Cs.a.sense_hat.rtimu.compass=[100*v[0],100*v[1],100*v[2]]}()},[t]),o.a.createElement("div",{className:"sense-hat"},o.a.createElement("div",{className:"sense-hat-model"},o.a.createElement(qa,{updateOrientation:n}),o.a.createElement(ml,{orientation:t,resetOrientation:e=>{e.preventDefault(),window.rotatemodel(As.degToRad(0),As.degToRad(0),As.degToRad(0)),n([0,90,0])}})),o.a.createElement(cl,{pressure:1013,temperature:13,humidity:45,colour:Cs.a.sense_hat.colour,motion:Cs.a.sense_hat.motion}))},vl=n(178),yl=n.n(vl);const _l=(e,t)=>e.map(e=>e.showing?e:Sl(e,t)),Sl=(e,t)=>{switch(e.origin){case"sense_hat":t.current.textContent=JSON.stringify(e.content);break;case"pygal":const n={...e.content,chart:{...e.content.chart,events:{...e.content.chart.events,load:function(){this.renderTo.style.overflow="visible"}}}};yl.a.chart(t.current,n);break;case"turtle":t.current.innerHTML=xl(e.content).outerHTML;break;default:throw new Error("Unsupported origin: ".concat(e.origin))}return e.showing=!0,e},xl=e=>{const t=e.get("tag");if(!t)return document.createTextNode(e.get("text"));const n=document.createElement(t);for(const[t,r]of e.get("props"))n.setAttribute(t,r);for(const t of e.get("children"))n.appendChild(xl(t));return n};var wl,kl=e=>{let{visuals:t,setVisuals:n}=e;const r=Qn(e=>e.editor.senseHatEnabled),s=Qn(e=>e.editor.senseHatAlwaysEnabled),a=Object(i.useRef)();return Object(i.useEffect)(()=>{0===t.length?a.current.innerHTML="":t.some(e=>!e.showing)&&n(e=>_l(e,a))},[t,n]),o.a.createElement("div",{className:"visual-output"},o.a.createElement("div",{ref:a,className:"pythonrunner-graphic"}),r||s?o.a.createElement(bl,null):null)};function Ol(){return(Ol=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Fl(e,t,n,r){void 0===r&&(r={});let{window:i=document.defaultView,v5Compat:o=!1}=r,s=i.history,a=Ml.Pop,l=null,c=u();function u(){return(s.state||{idx:null}).idx}function d(){a=Ml.Pop;let e=u(),t=null==e?null:e-c;c=e,l&&l({action:a,location:p.location,delta:t})}function h(e){let t="null"!==i.location.origin?i.location.origin:i.location.href,n="string"==typeof e?e:Ll(e);return Dl(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==c&&(c=0,s.replaceState(Rl({},s.state,{idx:c}),""));let p={get action(){return a},get location(){return e(i,s)},listen(e){if(l)throw new Error("A history only accepts one active listener");return i.addEventListener("popstate",d),l=e,()=>{i.removeEventListener("popstate",d),l=null}},createHref:e=>t(i,e),createURL:h,encodeLocation(e){let t=h(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){a=Ml.Push;let r=jl(p.location,e,t);n&&n(r,e),c=u()+1;let d=Nl(r,c),h=p.createHref(r);try{s.pushState(d,"",h)}catch(e){i.location.assign(h)}o&&l&&l({action:a,location:p.location,delta:1})},replace:function(e,t){a=Ml.Replace;let r=jl(p.location,e,t);n&&n(r,e),c=u();let i=Nl(r,c),d=p.createHref(r);s.replaceState(i,"",d),o&&l&&l({action:a,location:p.location,delta:0})},go:e=>s.go(e)};return p}var zl;!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(zl||(zl={}));new Set(["lazy","caseSensitive","path","id","index","children"]);function Ul(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&"/"!==r?null:e.slice(n)||"/"}function Ql(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function ql(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function Hl(e,t,n,r){let i;void 0===r&&(r=!1),"string"==typeof e?i=Bl(e):(i=Rl({},e),Dl(!i.pathname||!i.pathname.includes("?"),Ql("?","pathname","search",i)),Dl(!i.pathname||!i.pathname.includes("#"),Ql("#","pathname","hash",i)),Dl(!i.search||!i.search.includes("#"),Ql("#","search","hash",i)));let o,s=""===e||""===i.pathname,a=s?"/":i.pathname;if(r||null==a)o=n;else{let e=t.length-1;if(a.startsWith("..")){let t=a.split("/");for(;".."===t[0];)t.shift(),e-=1;i.pathname=t.join("/")}o=e>=0?t[e]:"/"}let l=function(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:i=""}="string"==typeof e?Bl(e):e;return{pathname:n?n.startsWith("/")?n:function(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)}),n.length>1?n.join("/"):"/"}(n,t):t,search:Vl(r),hash:Wl(i)}}(i,o),c=a&&"/"!==a&&a.endsWith("/"),u=(s||"."===a)&&n.endsWith("/");return l.pathname.endsWith("/")||!c&&!u||(l.pathname+="/"),l}const Gl=e=>e.join("/").replace(/\/\/+/g,"/"),Vl=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Wl=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;const Xl=["post","put","patch","delete"],Yl=(new Set(Xl),["get",...Xl]);new Set(Yl),new Set([301,302,303,307,308]),new Set([307,308]),"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement;Symbol("deferred"); +/** + * React Router v6.11.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */ +function Zl(){return(Zl=Object.assign?Object.assign.bind():function(e){for(var t=1;t{n.current=!0}),i.useCallback((function(r,i){void 0===i&&(i={}),n.current&&("number"==typeof r?e.navigate(r):e.navigate(r,Zl({fromRouteId:t},i)))}),[e,t])}():function(){nc()||Dl(!1);let{basename:e,navigator:t}=i.useContext(Kl),{matches:n}=i.useContext(tc),{pathname:r}=rc(),o=JSON.stringify(ql(n).map(e=>e.pathnameBase)),s=i.useRef(!1);return ic(()=>{s.current=!0}),i.useCallback((function(n,i){if(void 0===i&&(i={}),!s.current)return;if("number"==typeof n)return void t.go(n);let a=Hl(n,JSON.parse(o),r,"path"===i.relative);"/"!==e&&(a.pathname="/"===a.pathname?e:Gl([e,a.pathname])),(i.replace?t.replace:t.push)(a,i.state,i)}),[e,t,o,r])}()}function sc(e,t){let{relative:n}=void 0===t?{}:t,{matches:r}=i.useContext(tc),{pathname:o}=rc(),s=JSON.stringify(ql(r).map(e=>e.pathnameBase));return i.useMemo(()=>Hl(e,JSON.parse(s),o,"path"===n),[e,s,o,n])}i.Component;var ac,lc;function cc(e){let t=i.useContext(Jl);return t||Dl(!1),t}function uc(e){let t=function(e){let t=i.useContext(tc);return t||Dl(!1),t}(),n=t.matches[t.matches.length-1];return n.route.id||Dl(!1),n.route.id}!function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"}(ac||(ac={})),function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"}(lc||(lc={}));function dc(e){let{basename:t="/",children:n=null,location:r,navigationType:o=Ml.Pop,navigator:s,static:a=!1}=e;nc()&&Dl(!1);let l=t.replace(/^\/*/,"/"),c=i.useMemo(()=>({basename:l,navigator:s,static:a}),[l,s,a]);"string"==typeof r&&(r=Bl(r));let{pathname:u="/",search:d="",hash:h="",state:p=null,key:f="default"}=r,m=i.useMemo(()=>{let e=Ul(u,l);return null==e?null:{location:{pathname:e,search:d,hash:h,state:p,key:f},navigationType:o}},[l,u,d,h,p,f,o]);return null==m?null:i.createElement(Kl.Provider,{value:c},i.createElement(ec.Provider,{children:n,value:m}))}var hc;!function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(hc||(hc={}));new Promise(()=>{});i.Component; +/** + * React Router DOM v6.11.1 + * + * Copyright (c) Remix Software Inc. + * + * This source code is licensed under the MIT license found in the + * LICENSE.md file in the root directory of this source tree. + * + * @license MIT + */ +function pc(){return(pc=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}const mc=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];function gc(e){let{basename:t,children:n,window:r}=e,o=i.useRef();null==o.current&&(o.current=Il({window:r,v5Compat:!0}));let s=o.current,[a,l]=i.useState({action:s.action,location:s.location});return i.useLayoutEffect(()=>s.listen(l),[s]),i.createElement(dc,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:s})}const bc="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,vc=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,yc=i.forwardRef((function(e,t){let n,{onClick:r,relative:o,reloadDocument:s,replace:a,state:l,target:c,to:u,preventScrollReset:d}=e,h=fc(e,mc),{basename:p}=i.useContext(Kl),f=!1;if("string"==typeof u&&vc.test(u)&&(n=u,bc))try{let e=new URL(window.location.href),t=u.startsWith("//")?new URL(e.protocol+u):new URL(u),n=Ul(t.pathname,p);t.origin===e.origin&&null!=n?u=n+t.search+t.hash:f=!0}catch(e){}let m=function(e,t){let{relative:n}=void 0===t?{}:t;nc()||Dl(!1);let{basename:r,navigator:o}=i.useContext(Kl),{hash:s,pathname:a,search:l}=sc(e,{relative:n}),c=a;return"/"!==r&&(c="/"===a?r:Gl([r,a])),o.createHref({pathname:c,search:l,hash:s})}(u,{relative:o}),g=function(e,t){let{target:n,replace:r,state:o,preventScrollReset:s,relative:a}=void 0===t?{}:t,l=oc(),c=rc(),u=sc(e,{relative:a});return i.useCallback(t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,n)){t.preventDefault();let n=void 0!==r?r:Ll(c)===Ll(u);l(e,{replace:n,state:o,preventScrollReset:s,relative:a})}},[c,l,u,r,o,n,e,s,a])}(u,{replace:a,state:l,target:c,preventScrollReset:d,relative:o});return i.createElement("a",pc({},h,{href:n||m,onClick:f||s?r:function(e){r&&r(e),e.defaultPrevented||g(e)},ref:t,target:c}))}));var _c,Sc;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(_c||(_c={})),function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(Sc||(Sc={}));n(360);var xc=e=>{const{className:t,onClickHandler:n,ButtonIcon:r,buttonImage:i,buttonImageAltText:s,buttonText:a,buttonOuter:l,buttonOuterClassName:c,buttonRef:u,disabled:d,confirmText:h,href:p,text:f,title:m,label:g,buttonIconPosition:b="left"}=e,v=pi()("btn",t,{"btn--svg-only":!a}),y=e=>{h?Object($l.confirmAlert)({message:h,buttons:[{label:"Yes",onClick:()=>n(e)},{label:"No"}]}):n(e)},_=e=>{e.stopPropagation()},S=p?o.a.createElement(yc,{ref:u,className:v,disabled:d,"aria-label":g,title:m,to:p,onClick:l?null:y,onKeyDown:_},i&&o.a.createElement("img",{src:i,alt:s,crossOrigin:"true"}),r&&"left"===b&&o.a.createElement(r,null),f&&o.a.createElement("span",null,f),r&&"right"===b&&o.a.createElement(r,null)):o.a.createElement("button",{ref:u,className:v,disabled:d,"aria-label":g,title:m,text:f,onClick:l?null:y,onKeyDown:_},i&&o.a.createElement("img",{src:i,alt:s,crossOrigin:"true"}),r&&"left"===b&&o.a.createElement(r,null),a&&o.a.createElement("span",null,a),r&&"right"===b&&o.a.createElement(r,null));return l?o.a.createElement("div",{className:pi()("btn-outer",{buttonOuterClassName:c}),onClick:y},S):S};n(361);var wc=()=>{const e=Qn(e=>e.editor.isSplitView),t=Qn(e=>e.editor.codeRunTriggered),n=Qn(e=>e.editor.drawTriggered),r=Object(ui.useMediaQuery)({query:Co}),i=Bn(),{t:s}=Gi();return o.a.createElement("div",{className:"output-view-toggle"},o.a.createElement(xc,{className:"btn--tertiary output-view-toggle__button",buttonText:r?null:s(e?"outputViewToggle.buttonTabLabel":"outputViewToggle.buttonSplitLabel"),disabled:t||n,label:s(e?"outputViewToggle.buttonTabLabel":"outputViewToggle.buttonSplitLabel"),title:s(e?"outputViewToggle.buttonTabTitle":"outputViewToggle.buttonSplitTitle"),ButtonIcon:e?Pl:Tl,buttonIconPosition:"right",onClickHandler:e?()=>{i(xr(!1))}:()=>{i(xr(!0))}}))};var kc=e=>{let{embedded:t=!1,className:n,...r}=e;const i=Qn(e=>e.editor.codeRunLoading),s=Bn();return o.a.createElement(xc,Object.assign({disabled:i,className:"btn--primary btn--run".concat(n?" ".concat(n):""),onClickHandler:()=>{window.plausible&&window.plausible("Run button".concat(t?" embedded":"")),s($r())}},r))};var Oc,Ec=e=>{let{embedded:t=!1,className:n,...r}=e;const s=Qn(e=>e.editor.codeRunStopped),a=Qn(e=>e.editor.codeRunTriggered),l=Bn(),{t:c}=Gi(),u=o.a.createElement(xc,Object.assign({className:"btn--primary btn--stop".concat(n?" ".concat(n):""),onClickHandler:()=>{window.plausible&&window.plausible("Stop button".concat(t?" embedded":"")),a&&l(Mr()),l(Pr())}},r)),[d,h]=Object(i.useState)(u);return Object(i.useEffect)(()=>{if(s){const e=o.a.createElement(xc,{className:"".concat(n?" ".concat(n):""),buttonText:c("runButton.stopping"),disabled:!0});setTimeout(()=>{h(e)},100)}},[n,s,c]),d};function Ac(){return(Ac=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{embedded:t=!1,skinny:n=!1}=e;const r=Qn(e=>e.editor.codeRunTriggered),i=Qn(e=>e.editor.drawTriggered),{t:s}=Gi();return o.a.createElement("div",{className:"runner-controls"},r||i?o.a.createElement(Ec,{embedded:t,buttonText:s("runButton.stop"),ButtonIcon:Pc,buttonIconPosition:"right",buttonOuter:n,className:"btn--stop btn--primary".concat(n?" btn--small":"")}):o.a.createElement(kc,{embedded:t,buttonText:s("runButton.run"),ButtonIcon:Cc,buttonIconPosition:"right",buttonOuter:n,className:n?"btn--small":""}))};var Rc=()=>{var e;const t=Object(i.useMemo)(()=>new Worker("./PyodideWorker.js",{type:"module"}),[]),n=Object(i.useRef)(),r=Object(i.useRef)(),s=Object(i.useRef)(),a=Qn(e=>e.editor.project.image_list),l=Qn(e=>e.editor.project.components),c=Qn(e=>e.editor.project.identifier),u=Qn(e=>e.auth.user),d=null==u||null===(e=u.profile)||void 0===e?void 0:e.user,h=Qn(e=>e.editor.isSplitView),p=Qn(e=>e.editor.isEmbedded),f=Qn(e=>e.editor.codeRunTriggered),m=Qn(e=>e.editor.codeRunStopped),g=Object(i.useRef)(),b=Bn(),{t:v}=Gi(),y=Object(i.useContext)(Mo),_=Object(ui.useMediaQuery)({query:Co}),S=Qn(e=>e.editor.senseHatAlwaysEnabled),x="true"===new URLSearchParams(window.location.search).get("show_visual_tab"),[w,k]=Object(i.useState)(x||S),[O,E]=Object(i.useState)([]);Object(i.useEffect)(()=>{t.onmessage=e=>{let{data:t}=e;switch(t.method){case"handleLoading":A();break;case"handleLoaded":T(t.stdinBuffer,t.interruptBuffer);break;case"handleInput":C();break;case"handleOutput":M(t.stream,t.content);break;case"handleError":P(t.file,t.line,t.mistake,t.type,t.info);break;case"handleVisual":$(t.origin,t.content);break;case"handleSenseHatEvent":R(t.type);break;default:throw new Error("Unsupported method: ".concat(t.method))}}},[]),Object(i.useEffect)(()=>{f&&I()},[f]),Object(i.useEffect)(()=>{m&&D()},[m]);const A=()=>{b(cr())},T=(e,t)=>{r.current=e,n.current=t,b(ur()),z()},C=async()=>{if(s.current)return void(r.current[0]=-1);g.current.appendChild(j());const e=L(),{content:t,ctrlD:n}=await B(e),i=(new TextEncoder).encode(t+"\r\n"),o=r.current[0];r.current.set(i,o);const a=o+i.length;r.current[0]=a,n&&(s.current=!0)},M=(e,t)=>{const n=g.current,r=document.createElement("span");r.classList.add("pythonrunner-console-output-line"),r.classList.add(e),r.innerHTML=new Option(t||" ").innerHTML+"\n",n.appendChild(r),n.scrollTop=n.scrollHeight},P=(e,t,n,r,i)=>{let o;if("KeyboardInterrupt"===r)o=v("output.errors.interrupted");else{o=[[r,i].filter(e=>e).join(": "),"on line ".concat(t," of ").concat(e)].join(" "),n&&(o+=":\n".concat(n)),or(c,d,{errorType:r,errorMessage:o})}b(Sr(o)),z()},$=(e,t)=>{k(!0),E(n=>[...n,{origin:e,content:t}])},R=e=>{console.log("handleSenseHatEvent")},I=async()=>{g.current.innerHTML="",b(Sr("")),E([]),s.current=!1,await Promise.allSettled(a.map(e=>{let{filename:t,url:n}=e;return fetch(n).then(e=>e.arrayBuffer()).then(e=>N(t,e))}));for(const{name:e,extension:t,content:n}of l)N([e,t].join("."),n);const e=l[0].content;n.current&&(n.current[0]=0),t.postMessage({method:"runPython",python:e})},D=()=>{n.current&&(n.current[0]=2),t.postMessage({method:"stopPython"}),z()},N=(e,n)=>{t.postMessage({method:"writeFile",filename:e,content:n})},j=()=>{const e=document.createElement("span");return e.setAttribute("id","input"),e.setAttribute("spellCheck","false"),e.setAttribute("class","pythonrunner-input"),e.setAttribute("contentEditable","true"),e},L=()=>document.querySelector("editor-wc")?document.querySelector("editor-wc").shadowRoot.getElementById("input"):document.getElementById("input"),B=async e=>(e.focus(),new Promise((function(t,n){e.addEventListener("keydown",(function n(r){const i=r.ctrlKey&&"d"===r.key.toLowerCase(),o="Enter"===r.key||i;if(o){e.removeEventListener(r.type,n);const s=e.innerText;e.removeAttribute("id"),e.removeAttribute("contentEditable"),e.innerText=s+"\n",document.addEventListener("keyup",(function e(n){o&&(document.removeEventListener(n.type,e),t({content:s,ctrlD:i}))}))}}))}))),F=e=>{if(document.getSelection().toString().length>0)return;const t=L();if(t&&e.target!==t){const e=L(),t=window.getSelection();if(t.removeAllRanges(),e.innerText&&e.innerText.length>0){const n=document.createRange();n.setStart(e,1),n.collapse(!0),t.addRange(n)}e.focus()}},z=()=>{const e=L();e&&(e.removeAttribute("id"),e.removeAttribute("contentEditable"))};return o.a.createElement("div",{className:"pythonrunner-container"},h?o.a.createElement(o.a.Fragment,null,w&&o.a.createElement("div",{className:"output-panel output-panel--visual"},o.a.createElement(go,{forceRenderTabPanel:!0},o.a.createElement("div",{className:"react-tabs__tab-container"},o.a.createElement(_o,null,o.a.createElement(ko,{key:0},o.a.createElement("span",{className:"react-tabs__tab-text"},v("output.visualOutput")))),!p&&w&&o.a.createElement(wc,null),!p&&_&&o.a.createElement($c,{skinny:!0})),o.a.createElement(To,{key:0},o.a.createElement(kl,{visuals:O,setVisuals:E})))),o.a.createElement("div",{className:"output-panel output-panel--text"},o.a.createElement(go,{forceRenderTabPanel:!0},o.a.createElement("div",{className:"react-tabs__tab-container"},o.a.createElement(_o,null,o.a.createElement(ko,{key:0},o.a.createElement("span",{className:"react-tabs__tab-text"},v("output.textOutput")))),!w&&!p&&_&&o.a.createElement($c,{skinny:!0})),o.a.createElement($o,null),o.a.createElement(To,{key:0},o.a.createElement("pre",{className:"pythonrunner-console pythonrunner-console--".concat(y.fontSize),onClick:F,ref:g}))))):o.a.createElement(go,{forceRenderTabPanel:!0,defaultIndex:w?0:1},o.a.createElement("div",{className:"react-tabs__tab-container"},o.a.createElement(_o,null,w&&o.a.createElement(ko,{key:0},o.a.createElement("span",{className:"react-tabs__tab-text"},v("output.visualOutput"))),o.a.createElement(ko,{key:1},o.a.createElement("span",{className:"react-tabs__tab-text"},v("output.textOutput")))),!p&&w&&o.a.createElement(wc,null),!p&&_&&o.a.createElement($c,{skinny:!0})),o.a.createElement($o,null),w&&o.a.createElement(To,{key:0},o.a.createElement(kl,{visuals:O,setVisuals:E})),o.a.createElement(To,{key:1},o.a.createElement("pre",{className:"pythonrunner-console pythonrunner-console--".concat(y.fontSize),onClick:F,ref:g}))))};const Ic={setInstructions:(e,t)=>({...e,...t.payload}),setCurrentStepPosition:(e,t)=>{e.currentStepPosition=t.payload}},Dc=Object(qn.c)({name:"instructions",initialState:{currentStepPosition:0,project:{}},reducers:Ic}),{setCurrentStepPosition:Nc,setInstructions:jc}=Dc.actions;var Lc=Dc.reducer,Bc=n(72),Fc=n(81);const zc="".concat(window.location.protocol,"//").concat(window.location.hostname).concat(window.location.port?":".concat(window.location.port):""),Uc={client_id:"editor-api",redirect_uri:"".concat(zc,"/auth/callback"),post_logout_redirect_uri:zc,response_type:"code",scope:"openid email profile force-consent allow-u13-login roles",authority:"https://auth-v1.raspberrypi.org",silent_redirect_uri:"".concat(zc,"/auth/silent_renew"),automaticSilentRenew:!0,filterProtocolClaims:!1,loadUserInfo:!1,monitorSession:!1,userStore:new Fc.WebStorageStateStore({store:window.localStorage}),extraQueryParams:{brand:"editor",login_options:"v1_signup"}},Qc=Object(Bc.createUserManager)(Uc);Qc.events.addAccessTokenExpired(()=>{Qc.signinSilent()});var qc=Qc;const Hc=Object(qn.a)({reducer:{editor:ci,instructions:Lc,auth:Bc.reducer},middleware:e=>e({serializableCheck:{ignoredActions:["redux-oidc/USER_FOUND","redux-odic/SILENT_RENEW_ERROR"],ignoredPaths:["auth.user"]}})});Object(Bc.loadUser)(Hc,qc);var Gc=Hc;var Vc=()=>{const e=Qn(e=>e.editor.codeRunTriggered),t=Qn(e=>e.editor.drawTriggered),n=Qn(e=>e.editor.senseHatAlwaysEnabled),r=Qn(e=>e.editor.senseHatEnabled),s=Qn(e=>e.editor.project.image_list),a=Qn(e=>e.editor.error),l=Object(i.useRef)(),c=Object(i.useRef)(),u=Object(i.useRef)(),d=Bn(),{t:h}=Gi();return Object(i.useEffect)(()=>{e&&(l.current.innerHTML="",c.current.innerHTML="",u.current.innerHTML="",Cs.a.py5={},Cs.a.py5.sketch="p5Sketch",Cs.a.py5.assets=s,Cs.a.p5={},Cs.a.p5.sketch="p5Sketch",Cs.a.p5.assets=s,(Cs.a.pygal||(Cs.a.pygal={})).outputCanvas=c.current,(Cs.a.TurtleGraphics||(Cs.a.TurtleGraphics={})).target="outputCanvas",Cs.a.TurtleGraphics.assets=Object.assign({},...s.map(e=>({["".concat(e.name,".").concat(e.extension)]:e.url}))))},[e,s]),Object(i.useEffect)(()=>{!t&&u.current&&""!==u.current.innerHTML&&(Cs.a.py5.stop?Cs.a.py5.stop():Cs.a.p5.stop(),""===a&&d(Sr(h("output.errors.interrupted"))),d(ur()))},[t,d,h,a]),o.a.createElement("div",{className:"visual-output"},o.a.createElement("div",{id:"p5Sketch",ref:u}),o.a.createElement("div",{id:"pygalOutput",ref:c}),o.a.createElement("div",{className:"pythonrunner-canvas-container"},o.a.createElement("div",{id:"outputCanvas",ref:l,className:"pythonrunner-graphic"})),r||n?o.a.createElement(bl,null):null)};const Wc={"./pygal/__init__.js":{path:"".concat("https://editor-static.raspberrypi.org/releases/v0.25.4","/shims/pygal/pygal.js"),dependencies:["https://cdnjs.cloudflare.com/ajax/libs/highcharts/6.0.2/highcharts.js","https://cdnjs.cloudflare.com/ajax/libs/highcharts/6.0.2/js/highcharts-more.js"]},"./py5/__init__.js":{path:"".concat("https://editor-static.raspberrypi.org/releases/v0.25.4","/shims/processing/py5/py5-shim.js"),dependencies:["".concat("https://editor-static.raspberrypi.org/releases/v0.25.4","/libraries/processing/p5/p5.js")]},"./py5_imported/__init__.js":{path:"".concat("https://editor-static.raspberrypi.org/releases/v0.25.4","/shims/processing/py5_imported_mode/py5_imported.js")},"./py5_imported_mode.py":{path:"".concat("https://editor-static.raspberrypi.org/releases/v0.25.4","/shims/processing/py5_imported_mode/py5_imported_mode.py")},"./p5/__init__.js":{path:"".concat("https://editor-static.raspberrypi.org/releases/v0.25.4","/shims/processing/p5/p5-shim.js"),dependencies:["".concat("https://editor-static.raspberrypi.org/releases/v0.25.4","/libraries/processing/p5/p5.js")]},"./_internal_sense_hat/__init__.js":{path:"".concat("https://editor-static.raspberrypi.org/releases/v0.25.4","/shims/sense_hat/_internal_sense_hat.js")},"./sense_hat.py":{path:"".concat("https://editor-static.raspberrypi.org/releases/v0.25.4","/shims/sense_hat/sense_hat_blob.py")}};var Xc=e=>{let{outputPanels:t=["text","visual"]}=e;const n=Qn(e=>e.editor.project.components),r=null==n?void 0:n.find(e=>"main"===e.name&&"py"===e.extension),s=Qn(e=>e.editor.project.identifier),a=Qn(e=>e.auth.user),l=Qn(e=>e.editor.isSplitView),c=Qn(e=>e.editor.isEmbedded),u=Qn(e=>e.editor.isOutputOnly),d=Qn(e=>e.editor.codeRunTriggered),h=Qn(e=>e.editor.codeRunStopped),p=Qn(e=>e.editor.drawTriggered),f=Qn(e=>e.editor.senseHatAlwaysEnabled),m=Object(i.useRef)(),g=Bn(),{t:b}=Gi(),v=Object(i.useContext)(Mo),y=Object(ui.useMediaQuery)({query:Co}),_=new URLSearchParams(window.location.search),[S,x]=Object(i.useState)("true"===_.get("show_visual_tab")||f),w=()=>{const e=document.getElementById("input"),t=document.querySelector("editor-wc")?document.querySelector("editor-wc").shadowRoot.getElementById("input"):null;return e||t};Object(i.useEffect)(()=>{d&&C()},[d]),Object(i.useEffect)(()=>{if(h&&w()){const e=w();e.removeAttribute("id"),e.removeAttribute("contentEditable"),g(Sr(b("output.errors.interrupted"))),g(ur())}},[h]),Object(i.useEffect)(()=>{if(!d&&!p&&w()){const e=w();e.removeAttribute("id"),e.removeAttribute("contentEditable")}},[p,d]);const k=["./pygal/__init__.js","./py5/__init__.js","./py5_imported/__init__.js","./p5/__init__.js","./_internal_sense_hat/__init__.js","src/builtin/turtle/__init__.js"],O=e=>{if(""!==e){const t=m.current;if(t){const n=document.createElement("span");n.classList.add("pythonrunner-console-output-line"),n.innerHTML=new Option(e).innerHTML,t.appendChild(n),t.scrollTop=t.scrollHeight}}},E=e=>{if("./_internal_sense_hat/__init__.js"===e&&g(Tr(!0)),"./p5/__init__.js"!==e&&"./py5/__init__.js"!==e||g(Rr()),k.includes(e)&&x(!0),n.filter(e=>"main"!==e.name).map(e=>"./".concat(e.name,".py")).includes(e)){let t=e.slice(2,-3),r=n.find(e=>e.name===t);if(r)return r.content}if(void 0!==Cs.a.builtinFiles&&void 0!==Cs.a.builtinFiles.files[e])return Cs.a.builtinFiles.files[e];if(Wc[e]){var t=Wc[e];return Wc[e].code||Cs.a.misceval.promiseToSuspension(fetch(t.path).then(e=>e.text()).then(n=>{if(!n)throw new Cs.a.builtin.ImportError("Failed to load remote module");function r(e){if(!document.querySelector('script[src="'.concat(e,'"]')))return new Promise((function(t,n){let r=document.createElement("script");r.type="text/javascript",r.src=e,r.async=!0,r.onload=function(){t(!0)},document.body.appendChild(r)}))}return Wc[e].code=n,(t.loadDepsSynchronously?(t.dependencies||[]).reduce((e,t)=>e.then(()=>r(t)),Promise.resolve()):Promise.all((t.dependencies||[]).map(r))).then((function(){return n})).catch((function(){throw new Cs.a.builtin.ImportError("Failed to load dependencies required")}))}))}throw new Error("File not found: '"+e+"'")},A=function(){Cs.a.sense_hat&&(Cs.a.sense_hat.mz_criteria.noInputEvents=!1);m.current.appendChild((()=>{const e=document.createElement("span");return e.setAttribute("id","input"),e.setAttribute("spellCheck","false"),e.setAttribute("class","pythonrunner-input"),e.setAttribute("contentEditable","true"),e})());const e=w();return e.focus(),new Promise((function(t,n){e.addEventListener("keydown",(function n(r){if("Enter"===r.key){e.removeEventListener(r.type,n);const i=e.innerText;e.removeAttribute("id"),e.removeAttribute("contentEditable"),e.innerText=i+"\n",document.addEventListener("keyup",(function e(n){"Enter"===n.key&&(document.removeEventListener(n.type,e),t(i))}))}}))}))},T=e=>{let t,n={};if(e.message===b("output.errors.interrupted"))t=e.message,n={type:"Interrupted",message:t};else{const i=(e.tp$str&&e.tp$str().v).replace(/\[(.*?)\]/,"").replace(/\.$/,""),o=e.tp$name||e.constructor.name,l=e.traceback[0].lineno,c=e.traceback[0].filename.replace(/^\.\//,"");let u;var r;if(null!=a&&a.profile)u=null===(r=a.profile)||void 0===r?void 0:r.user;t="".concat(o,": ").concat(i," on line ").concat(l," of ").concat(c),or(s,u,{errorType:o,errorMessage:t}),n={type:o,line:l,file:c,description:i,message:t}}if(g(Sr(t)),g(li(n)),g(Pr()),w()){const e=w();e.removeAttribute("id"),e.removeAttribute("contentEditable")}},C=()=>{g(Sr("")),g(li({})),m.current&&(m.current.innerHTML=""),g(Tr(!1));var e=(null==r?void 0:r.content)||"";e.includes("# ".concat(b("input.comment.py5")))&&((e=e.replace("# ".concat(b("input.comment.py5")),"from py5_imported_mode import *")).match(/(\nrun_sketch)/)||(e=e.concat("\nrun_sketch()"))),Cs.a.configure({inputfun:A,output:O,read:E,debugging:!0,inputTakesPrompt:!0,uncaughtException:T}),Cs.a.misceval.asyncToPromise(()=>Cs.a.importMainWithBody("main",!1,e,!0),{"*":()=>{if(Gc.getState().editor.codeRunStopped)throw new Error(b("output.errors.interrupted"))}}).catch(e=>{T(e)}).finally(()=>{g(ur())}).then((function(e){}))};function M(e){if(document.getSelection().toString().length>0)return;const t=w();if(t&&e.target!==t){const e=w(),t=window.getSelection();if(t.removeAllRanges(),e.innerText&&e.innerText.length>0){const n=document.createRange();n.setStart(e,1),n.collapse(!0),t.addRange(n)}e.focus()}}const P=1===t.length,$=t.includes("visual"),R=t.includes("text"),I=e=>pi()("output-panel","output-panel--".concat(e),{"output-panel--single":P});return o.a.createElement("div",{className:"pythonrunner-container"},l||P?o.a.createElement(o.a.Fragment,null,S&&$&&o.a.createElement("div",{className:I("visual")},o.a.createElement(go,{forceRenderTabPanel:!0},o.a.createElement("div",{className:pi()("react-tabs__tab-container",{"react-tabs__tab-container--hidden":P})},o.a.createElement(_o,null,o.a.createElement(ko,{key:0},o.a.createElement("span",{className:"react-tabs__tab-text"},b("output.visualOutput")))),!c&&S&&o.a.createElement(wc,null),!c&&y&&o.a.createElement($c,{skinny:!0})),o.a.createElement(To,{key:0},o.a.createElement(Vc,null)))),R&&o.a.createElement("div",{className:I("text")},o.a.createElement(go,{forceRenderTabPanel:!0},o.a.createElement("div",{className:pi()("react-tabs__tab-container",{"react-tabs__tab-container--hidden":P})},o.a.createElement(_o,null,o.a.createElement(ko,{key:0},o.a.createElement("span",{className:"react-tabs__tab-text"},b("output.textOutput")))),!S&&!c&&y&&o.a.createElement($c,{skinny:!0})),o.a.createElement($o,null),o.a.createElement(To,{key:0},o.a.createElement("pre",{className:"pythonrunner-console pythonrunner-console--".concat(v.fontSize),onClick:M,ref:m}))))):o.a.createElement(go,{forceRenderTabPanel:!0,defaultIndex:S?0:1},o.a.createElement("div",{className:"react-tabs__tab-container"},o.a.createElement(_o,null,S?o.a.createElement(ko,{key:0},o.a.createElement("span",{className:"react-tabs__tab-text"},b("output.visualOutput"))):null,o.a.createElement(ko,{key:1},o.a.createElement("span",{className:"react-tabs__tab-text"},b("output.textOutput")))),!c&&S&&o.a.createElement(wc,null),!c&&y&&o.a.createElement($c,{skinny:!0})),!u&&o.a.createElement($o,null),S?o.a.createElement(To,{key:0},o.a.createElement(Vc,null)):null,o.a.createElement(To,{key:1},o.a.createElement("pre",{className:"pythonrunner-console pythonrunner-console--".concat(v.fontSize),onClick:M,ref:m}))))},Yc=(n(363),n(114)),Zc=n(113),Jc=n.n(Zc);const Kc=new RegExp("^".concat("https://rpf.io/")),eu=new RegExp("^".concat("https://editor.raspberrypi.org//releases/v0.25.4")),tu=[new RegExp("^#[a-zA-Z0-9]+")],nu=[Kc,eu],ru=(e,t)=>e.some(e=>e.test(t));var iu;function ou(){return(ou=Object.assign?Object.assign.bind():function(e){for(var t=1;te.editor.project),t=e.components,n=e.image_list,r=Qn(e=>e.editor.focussedFileIndices)[0],s=Qn(e=>e.editor.openFiles)[0],a=Qn(e=>e.editor.codeRunTriggered),l=Qn(e=>e.editor.justLoaded),c=Qn(e=>e.editor.isEmbedded),u=Qn(e=>e.editor.autorunEnabled),d=Qn(e=>e.editor.codeHasBeenRun),h=Qn(e=>e.editor.browserPreview),p=Qn(e=>e.editor.page),{t:f,i18n:m}=Gi(),g=m.language,b=Bn(),v=Object(i.useRef)(null),y=Object(ui.useMediaQuery)({query:Co}),_=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return e.endsWith(".html")};let S="index.html";c&&p&&_(p)&&(e=>t.some(t=>"".concat(t.name,".").concat(t.extension)===e))(p)?S=p:!c&&_(s[r])&&(S=s[r]);const[x,w]=Object(i.useState)(S),[k,O]=Object(i.useState)(x),E=()=>{b(Qr()),I()},{externalLink:A,setExternalLink:T,handleAllowedExternalLink:C,handleRegularExternalLink:M,handleExternalLinkError:P}=(e=>{const t=Bn(),[n,r]=Object(i.useState)();return{externalLink:n,setExternalLink:r,handleAllowedExternalLink:e=>{r(e),t($r())},handleRegularExternalLink:(e,n)=>{r(null),n("".concat(e,".html")),t($r())},handleExternalLinkError:()=>{t(Sr("externalLink")),e()}}})(E),$=(e,t)=>{const n=new Blob([e],{type:t});return URL.createObjectURL(n)},R=(e,t)=>{var n;return(null===(n=e.parentNode)||void 0===n?void 0:n.tagName)&&e.parentNode.tagName.toLowerCase()===t},I=()=>{window.addEventListener("message",e=>{var t,n,r;"string"==typeof(null===(t=e.data)||void 0===t?void 0:t.msg)&&("ERROR: External link"===(null===(n=e.data)||void 0===n?void 0:n.msg)?P(E):"Allowed external link"===(null===(r=e.data)||void 0===r?void 0:r.msg)?C(e.data.payload.linkTo):M(e.data.payload.linkTo,w))})};let D;Object(i.useEffect)(()=>{I()},[]),Object(i.useEffect)(()=>{if(l&&c)b($r());else if(!l&&u)return D=setTimeout(()=>{b($r())},2e3),()=>clearTimeout(D)},[x]),Object(i.useEffect)(()=>{a&&L()},[a]),Object(i.useEffect)(()=>{A||c||!_(s[r])||w(s[r])},[r,s]),Object(i.useEffect)(()=>{c&&h&&b(br(k))},[k]);const N=(e,t)=>{e.querySelectorAll("[href]").forEach(e=>{var r;const i=t.find(t=>"".concat(t.name,".").concat(t.extension)===e.attrs.href);let o;if("_blank"===(null===(r=e.attrs)||void 0===r?void 0:r.target)&&e.removeAttribute("target"),i)if(R(e,"head")){const t=$((e=>{var t={...e};return"css"===e.extension&&n.forEach(e=>{const n=new RegExp("['\"]".concat(e.filename,"['\"]"),"g"),r='"'.concat(e.url,'"');t.content=t.content.replaceAll(n,r)}),t})(i).content,Jc.a.lookup("".concat(i.name,".").concat(i.extension)));e.setAttribute("href",t)}else e.setAttribute("href","javascript:void(0)"),o="window.parent.postMessage({msg: 'RELOAD', payload: { linkTo: '".concat(i.name,"' }})");else{const t=ru(nu,e.attrs.href);ru(tu,e.attrs.href)||t||R(e,"head")?t&&(o="window.parent.postMessage({msg: 'Allowed external link', payload: { linkTo: '".concat(e.attrs.href,"' }})")):(e.setAttribute("href","javascript:void(0)"),o="window.parent.postMessage({msg: 'ERROR: External link'})")}o&&(e.removeAttribute("target"),e.setAttribute("onclick",o))})},j=function(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"src";const i=e.querySelectorAll("[".concat(r,"]"));i.forEach(e=>{const i=t.find(t=>t.filename===e.attrs[r]),o=n.find(t=>"".concat(t.name,".").concat(t.extension)===e.attrs[r]);let s="";i?s=i.url:o?s=$(o.content,Jc.a.lookup("".concat(o.name,".").concat(o.extension))):ru(nu,e.attrs[r])&&(s=e.attrs[r]),e.setAttribute(r,s),e.setAttribute("crossorigin",!0)})},L=()=>{if(O(x),A)v.current.src=A,b(ur());else{const e=Object(Yc.parse)(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"index.html";return t.filter(t=>"".concat(t.name,".").concat(t.extension)===e)[0]}(x).content),r=e.querySelector("body")||e;N(e,t),j(e,n,t),j(e,n,t,"data-src"),r.appendChild(Object(Yc.parse)('')));const i=$(e.toString(),"text/html");v.current.src=i,a&&b(ur())}};return o.a.createElement("div",{className:"htmlrunner-container"},c||u||d?o.a.createElement(go,null,o.a.createElement("div",{className:"react-tabs__tab-container"},o.a.createElement(_o,null,o.a.createElement(ko,null,o.a.createElement("span",{className:"react-tabs__tab-text"},"".concat(k," ").concat(f("output.preview")))),!c&&o.a.createElement("a",{className:"btn btn--tertiary htmlrunner-link",target:"_blank",href:"/".concat(g,"/embed/viewer/").concat(e.identifier,"?browserPreview=true&page=").concat(encodeURI(k)),rel:"noreferrer"},o.a.createElement("span",{className:"htmlrunner-link__text"},f("output.newTab")),o.a.createElement(su,null))),!c&&y?o.a.createElement($c,{skinny:!0}):null),o.a.createElement(To,null,o.a.createElement("iframe",{className:"htmlrunner-iframe",id:"output-frame",title:f("runners.HtmlOutput"),ref:v,onLoad:()=>{const e=v.current.contentDocument;let t=(e=>{let t;return t=e&&e.querySelectorAll("meta[filename]")[0]?e.querySelectorAll("meta[filename]")[0].getAttribute("filename"):A,t})(e);if(k!==t&&O(t),e){const t=e.querySelector("a");t&&t.addEventListener("click",e=>{e.preventDefault(),v.current.contentDocument.href=t.getAttribute("href")})}T(null)}}))):null)};var lu=e=>{let{projectType:t,usePyodide:n,outputPanels:r=["text","visual"]}=e;const i="html"===t?au:n?Rc:Xc,s="html"===t?{}:{outputPanels:r};return o.a.createElement(i,s)};n(372);var cu=e=>{let{embedded:t=!1}=e;return o.a.createElement("div",{className:"run-bar"},o.a.createElement($c,{embedded:t}))};var uu=e=>{let{outputPanels:t=["text","visual"]}=e;const n=Qn(e=>e.editor.project),r=Qn(e=>e.editor.isEmbedded),i=new URLSearchParams(window.location.search),s="true"===i.get("browserPreview"),a="true"===i.get("pyodide");return o.a.createElement(o.a.Fragment,null,o.a.createElement(fi,null),o.a.createElement("div",{className:"proj-runner-container","data-testid":"output"},o.a.createElement(lu,{projectType:n.project_type,usePyodide:a,outputPanels:t}),r&&!s&&o.a.createElement(cu,{embedded:!0})))};function du(){return(du=Object.assign||function(e){for(var t=1;t=0||(i[n]=e[n]);return i}function pu(e){return"number"==typeof e&&!isNaN(e)}function fu(e){return"boolean"==typeof e}function mu(e){return"string"==typeof e}function gu(e){return"function"==typeof e}function bu(e){return mu(e)||gu(e)?e:null}function vu(e){return 0===e||e}var yu=!("undefined"==typeof window||!window.document||!window.document.createElement);function _u(e){return Object(i.isValidElement)(e)||mu(e)||gu(e)||pu(e)}var Su={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},xu={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"};function wu(e){var t=e.enter,n=e.exit,r=e.appendPosition,s=void 0!==r&&r,a=e.collapse,l=void 0===a||a,c=e.collapseDuration,u=void 0===c?300:c;return function(e){var r=e.children,a=e.position,c=e.preventExitTransition,d=e.done,h=e.nodeRef,p=e.isIn,f=s?t+"--"+a:t,m=s?n+"--"+a:n,g=Object(i.useRef)(),b=Object(i.useRef)(0);function v(e){if(e.target===h.current){var t=h.current;t.dispatchEvent(new Event("d")),t.removeEventListener("animationend",v),t.removeEventListener("animationcancel",v),0===b.current&&(t.className=g.current)}}function y(){var e=h.current;e.removeEventListener("animationend",y),l?function(e,t,n){void 0===n&&(n=300);var r=e.scrollHeight,i=e.style;requestAnimationFrame((function(){i.minHeight="initial",i.height=r+"px",i.transition="all "+n+"ms",requestAnimationFrame((function(){i.height="0",i.padding="0",i.margin="0",setTimeout(t,n)}))}))}(e,d,u):d()}return Object(i.useLayoutEffect)((function(){var e;e=h.current,g.current=e.className,e.className+=" "+f,e.addEventListener("animationend",v),e.addEventListener("animationcancel",v)}),[]),Object(i.useEffect)((function(){p||(c?y():function(){b.current=1;var e=h.current;e.className+=" "+m,e.addEventListener("animationend",y)}())}),[p]),o.a.createElement(o.a.Fragment,null,r)}}var ku={list:new Map,emitQueue:new Map,on:function(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off:function(e,t){if(t){var n=this.list.get(e).filter((function(e){return e!==t}));return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit:function(e){var t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit:function(e){for(var t=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i0?y:_),hideProgressBar:fu(l.hideProgressBar)?l.hideProgressBar:g.hideProgressBar,progress:l.progress,role:l.role||g.role,deleteToast:function(){a.delete(u);var e=c.queue.length;if(c.count=vu(u)?c.count-1:c.count-c.displayedToast,c.count<0&&(c.count=0),e>0){var n=vu(u)?1:c.props.limit;if(1===e||1===n)c.displayedToast++,h();else{var r=n>e?e:n;c.displayedToast=r;for(var i=0;i0&&c.count>g.limit&&v?c.queue.push({toastContent:x,toastProps:S,staleId:o}):pu(r)&&r>0?setTimeout((function(){f(x,S,o)}),r):f(x,S,o)}}function f(e,t,n){var r=t.toastId;n&&a.delete(n),a.set(r,{content:e,props:t}),o((function(e){return[].concat(e,[r]).filter((function(e){return e!==n}))}))}return Object(i.useEffect)((function(){return c.containerId=e.containerId,ku.cancelEmit(3).on(0,p).on(1,(function(e){return s.current&&d(e)})).on(5,u).emit(2,c),function(){return ku.emit(3,c)}}),[]),Object(i.useEffect)((function(){c.isToastActive=l,c.displayedToast=r.length,ku.emit(4,r.length,e.containerId)}),[r]),Object(i.useEffect)((function(){c.props=e})),{getToastToRender:function(t){var n=new Map,r=Array.from(a.values());return e.newestOnTop&&r.reverse(),r.forEach((function(e){var t=e.props.position;n.has(t)||n.set(t,[]),n.get(t).push(e)})),Array.from(n,(function(e){return t(e[0],e[1])}))},containerRef:s,isToastActive:l}}function Au(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function Tu(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function Cu(e){var t=Object(i.useState)(!1),n=t[0],r=t[1],o=Object(i.useState)(!1),s=o[0],a=o[1],l=Object(i.useRef)(null),c=Object(i.useRef)({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,u=Object(i.useRef)(e),d=e.autoClose,h=e.pauseOnHover,p=e.closeToast,f=e.onClick,m=e.closeOnClick;function g(t){if(e.draggable){c.didMove=!1,document.addEventListener("mousemove",_),document.addEventListener("mouseup",S),document.addEventListener("touchmove",_),document.addEventListener("touchend",S);var n=l.current;c.canCloseOnClick=!0,c.canDrag=!0,c.boundingRect=n.getBoundingClientRect(),n.style.transition="",c.x=Au(t.nativeEvent),c.y=Tu(t.nativeEvent),"x"===e.draggableDirection?(c.start=c.x,c.removalDistance=n.offsetWidth*(e.draggablePercent/100)):(c.start=c.y,c.removalDistance=n.offsetHeight*(80===e.draggablePercent?1.5*e.draggablePercent:e.draggablePercent/100))}}function b(){if(c.boundingRect){var t=c.boundingRect,n=t.top,r=t.bottom,i=t.left,o=t.right;e.pauseOnHover&&c.x>=i&&c.x<=o&&c.y>=n&&c.y<=r?y():v()}}function v(){r(!0)}function y(){r(!1)}function _(t){var r=l.current;c.canDrag&&r&&(c.didMove=!0,n&&y(),c.x=Au(t),c.y=Tu(t),"x"===e.draggableDirection?c.delta=c.x-c.start:c.delta=c.y-c.start,c.start!==c.x&&(c.canCloseOnClick=!1),r.style.transform="translate"+e.draggableDirection+"("+c.delta+"px)",r.style.opacity=""+(1-Math.abs(c.delta/c.removalDistance)))}function S(){document.removeEventListener("mousemove",_),document.removeEventListener("mouseup",S),document.removeEventListener("touchmove",_),document.removeEventListener("touchend",S);var t=l.current;if(c.canDrag&&c.didMove&&t){if(c.canDrag=!1,Math.abs(c.delta)>c.removalDistance)return a(!0),void e.closeToast();t.style.transition="transform 0.2s, opacity 0.2s",t.style.transform="translate"+e.draggableDirection+"(0)",t.style.opacity="1"}}Object(i.useEffect)((function(){u.current=e})),Object(i.useEffect)((function(){return l.current&&l.current.addEventListener("d",v,{once:!0}),gu(e.onOpen)&&e.onOpen(Object(i.isValidElement)(e.children)&&e.children.props),function(){var e=u.current;gu(e.onClose)&&e.onClose(Object(i.isValidElement)(e.children)&&e.children.props)}}),[]),Object(i.useEffect)((function(){return e.pauseOnFocusLoss&&function(){document.hasFocus()||y();window.addEventListener("focus",v),window.addEventListener("blur",y)}(),function(){e.pauseOnFocusLoss&&(window.removeEventListener("focus",v),window.removeEventListener("blur",y))}}),[e.pauseOnFocusLoss]);var x={onMouseDown:g,onTouchStart:g,onMouseUp:b,onTouchEnd:b};return d&&h&&(x.onMouseEnter=y,x.onMouseLeave=v),m&&(x.onClick=function(e){f&&f(e),c.canCloseOnClick&&p()}),{playToast:v,pauseToast:y,isRunning:n,preventExitTransition:s,toastRef:l,eventHandlers:x}}function Mu(e){var t=e.closeToast,n=e.theme,r=e.ariaLabel,o=void 0===r?"close":r;return Object(i.createElement)("button",{className:"Toastify__close-button Toastify__close-button--"+n,type:"button",onClick:function(e){e.stopPropagation(),t(e)},"aria-label":o},Object(i.createElement)("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},Object(i.createElement)("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function Pu(e){var t,n,r=e.delay,o=e.isRunning,s=e.closeToast,a=e.type,l=e.hide,c=e.className,u=e.style,d=e.controlledProgress,h=e.progress,p=e.rtl,f=e.isIn,m=e.theme,g=du({},u,{animationDuration:r+"ms",animationPlayState:o?"running":"paused",opacity:l?0:1});d&&(g.transform="scaleX("+h+")");var b=to("Toastify__progress-bar",d?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated","Toastify__progress-bar-theme--"+m,"Toastify__progress-bar--"+a,((t={})["Toastify__progress-bar--rtl"]=p,t)),v=gu(c)?c({rtl:p,type:a,defaultClassName:b}):to(b,c),y=((n={})[d&&h>=1?"onTransitionEnd":"onAnimationEnd"]=d&&h<1?null:function(){f&&s()},n);return Object(i.createElement)("div",Object.assign({role:"progressbar","aria-hidden":l?"true":"false","aria-label":"notification timer",className:v,style:g},y))}Pu.defaultProps={type:xu.DEFAULT,hide:!1};var $u=["theme","type"],Ru=function(e){var t=e.theme,n=e.type,r=hu(e,$u);return Object(i.createElement)("svg",Object.assign({viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===t?"currentColor":"var(--toastify-icon-color-"+n+")"},r))};var Iu={info:function(e){return Object(i.createElement)(Ru,Object.assign({},e),Object(i.createElement)("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return Object(i.createElement)(Ru,Object.assign({},e),Object(i.createElement)("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return Object(i.createElement)(Ru,Object.assign({},e),Object(i.createElement)("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return Object(i.createElement)(Ru,Object.assign({},e),Object(i.createElement)("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return Object(i.createElement)("div",{className:"Toastify__spinner"})}},Du=function(e){var t,n,r=Cu(e),o=r.isRunning,s=r.preventExitTransition,a=r.toastRef,l=r.eventHandlers,c=e.closeButton,u=e.children,d=e.autoClose,h=e.onClick,p=e.type,f=e.hideProgressBar,m=e.closeToast,g=e.transition,b=e.position,v=e.className,y=e.style,_=e.bodyClassName,S=e.bodyStyle,x=e.progressClassName,w=e.progressStyle,k=e.updateId,O=e.role,E=e.progress,A=e.rtl,T=e.toastId,C=e.deleteToast,M=e.isIn,P=e.isLoading,$=e.icon,R=e.theme,I=to("Toastify__toast","Toastify__toast-theme--"+R,"Toastify__toast--"+p,((t={})["Toastify__toast--rtl"]=A,t)),D=gu(v)?v({rtl:A,position:b,type:p,defaultClassName:I}):to(I,v),N=!!E,j=Iu[p],L={theme:R,type:p},B=j&&j(L);return!1===$?B=void 0:gu($)?B=$(L):Object(i.isValidElement)($)?B=Object(i.cloneElement)($,L):mu($)?B=$:P&&(B=Iu.spinner()),Object(i.createElement)(g,{isIn:M,done:C,position:b,preventExitTransition:s,nodeRef:a},Object(i.createElement)("div",Object.assign({id:T,onClick:h,className:D},l,{style:y,ref:a}),Object(i.createElement)("div",Object.assign({},M&&{role:O},{className:gu(_)?_({type:p}):to("Toastify__toast-body",_),style:S}),B&&Object(i.createElement)("div",{className:to("Toastify__toast-icon",(n={},n["Toastify--animate-icon Toastify__zoom-enter"]=!P,n))},B),Object(i.createElement)("div",null,u)),function(e){if(e){var t={closeToast:m,type:p,theme:R};return gu(e)?e(t):Object(i.isValidElement)(e)?Object(i.cloneElement)(e,t):void 0}}(c),(d||N)&&Object(i.createElement)(Pu,Object.assign({},k&&!N?{key:"pb-"+k}:{},{rtl:A,theme:R,delay:d,isRunning:o,isIn:M,closeToast:m,hide:f,type:p,style:w,className:x,controlledProgress:N,progress:E}))))},Nu=wu({enter:"Toastify--animate Toastify__bounce-enter",exit:"Toastify--animate Toastify__bounce-exit",appendPosition:!0}),ju=function(e){var t=Eu(e),n=t.getToastToRender,r=t.containerRef,o=t.isToastActive,s=e.className,a=e.style,l=e.rtl,c=e.containerId;function u(e){var t,n=to("Toastify__toast-container","Toastify__toast-container--"+e,((t={})["Toastify__toast-container--rtl"]=l,t));return gu(s)?s({position:e,rtl:l,defaultClassName:n}):to(n,bu(s))}return Object(i.createElement)("div",{ref:r,className:"Toastify",id:c},n((function(e,t){var n=t.length?du({},a):du({},a,{pointerEvents:"none"});return Object(i.createElement)("div",{className:u(e),style:n,key:"container-"+e},t.map((function(e){var t=e.content,n=e.props;return Object(i.createElement)(Du,Object.assign({},n,{isIn:o(n.toastId),key:"toast-"+n.key,closeButton:!0===n.closeButton?Mu:n.closeButton}),t)})))})))};ju.defaultProps={position:Su.TOP_RIGHT,transition:Nu,rtl:!1,autoClose:5e3,hideProgressBar:!1,closeButton:Mu,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,newestOnTop:!1,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};var Lu,Bu,Fu,zu,Uu=new Map,Qu=[],qu=!1;function Hu(){return Math.random().toString(36).substring(2,9)}function Gu(e){return e&&(mu(e.toastId)||pu(e.toastId))?e.toastId:Hu()}function Vu(e,t){return Uu.size>0?ku.emit(0,e,t):(Qu.push({content:e,options:t}),qu&&yu&&(qu=!1,Bu=document.createElement("div"),document.body.appendChild(Bu),Object(s.render)(Object(i.createElement)(ju,Object.assign({},Fu)),Bu))),t.toastId}function Wu(e,t){return du({},t,{type:t&&t.type||e,toastId:Gu(t)})}function Xu(e){return function(t,n){return Vu(t,Wu(e,n))}}function Yu(e,t){return Vu(e,Wu(xu.DEFAULT,t))}function Zu(){return(Zu=Object.assign?Object.assign.bind():function(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};rd(this,e),this.init(t,n)}return sd(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prefix=t.prefix||"i18next:",this.logger=e||gd,this.options=t,this.debug=t.debug}},{key:"setDebug",value:function(e){this.debug=e}},{key:"log",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n1?t-1:0),r=1;r-1?e.replace(/###/g,"."):e}function i(){return!e||"string"==typeof e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(i())return{};var s=r(o.shift());!e[s]&&n&&(e[s]=new n),e=Object.prototype.hasOwnProperty.call(e,s)?e[s]:{}}return i()?{}:{obj:e,k:r(o.shift())}}function wd(e,t,n){var r=xd(e,t,Object);r.obj[r.k]=n}function kd(e,t){var n=xd(e,t),r=n.obj,i=n.k;if(r)return r[i]}function Od(e,t,n){var r=kd(e,n);return void 0!==r?r:kd(t,n)}function Ed(e,t,n){for(var r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):Ed(e[r],t[r],n):e[r]=t[r]);return e}function Ad(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}var Td={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};function Cd(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,(function(e){return Td[e]})):e}var Md="undefined"!=typeof window&&window.navigator&&void 0===window.navigator.userAgentData&&window.navigator.userAgent&&window.navigator.userAgent.indexOf("MSIE")>-1,Pd=[" ",",","?","!",";"];function $d(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:".";if(e){if(e[t])return e[t];for(var r=t.split(n),i=e,o=0;oo+s;)s++,l=i[a=r.slice(o,o+s).join(n)];if(void 0===l)return;if(null===l)return null;if(t.endsWith(a)){if("string"==typeof l)return l;if(a&&"string"==typeof l[a])return l[a]}var c=r.slice(o+s).join(n);return c?$d(l,c,n):void 0}i=i[r[o]]}return i}}function Rd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Id(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{ns:["translation"],defaultNS:"translation"};return rd(this,n),r=t.call(this),Md&&vd.call(Object(ad.a)(r)),r.data=e||{},r.options=i,void 0===r.options.keySeparator&&(r.options.keySeparator="."),void 0===r.options.ignoreJSONStructure&&(r.options.ignoreJSONStructure=!0),r}return sd(n,[{key:"addNamespaces",value:function(e){this.options.ns.indexOf(e)<0&&this.options.ns.push(e)}},{key:"removeNamespaces",value:function(e){var t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,o=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure,s=[e,t];n&&"string"!=typeof n&&(s=s.concat(n)),n&&"string"==typeof n&&(s=s.concat(i?n.split(i):n)),e.indexOf(".")>-1&&(s=e.split("."));var a=kd(this.data,s);return a||!o||"string"!=typeof n?a:$d(this.data&&this.data[e]&&this.data[e][t],n,i)}},{key:"addResource",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{silent:!1},o=this.options.keySeparator;void 0===o&&(o=".");var s=[e,t];n&&(s=s.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(r=t,t=(s=e.split("."))[1]),this.addNamespaces(t),wd(this.data,s,r),i.silent||this.emit("added",e,t,n,r)}},{key:"addResources",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{silent:!1};for(var i in n)"string"!=typeof n[i]&&"[object Array]"!==Object.prototype.toString.apply(n[i])||this.addResource(e,t,i,n[i],{silent:!0});r.silent||this.emit("added",e,t,n)}},{key:"addResourceBundle",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{silent:!1},s=[e,t];e.indexOf(".")>-1&&(r=n,n=t,t=(s=e.split("."))[1]),this.addNamespaces(t);var a=kd(this.data,s)||{};r?Ed(a,n,i):a=Id(Id({},a),n),wd(this.data,s,a),o.silent||this.emit("added",e,t,n)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?Id(Id({},{}),this.getResource(e,t)):this.getResource(e,t)}},{key:"getDataByLanguage",value:function(e){return this.data[e]}},{key:"hasLanguageSomeTranslations",value:function(e){var t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find((function(e){return t[e]&&Object.keys(t[e]).length>0}))}},{key:"toJSON",value:function(){return this.data}}]),n}(vd),jd={processors:{},addPostProcessor:function(e){this.processors[e.name]=e},handle:function(e,t,n,r,i){var o=this;return e.forEach((function(e){o.processors[e]&&(t=o.processors[e].process(t,n,r,i))})),t}};function Ld(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Bd(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{};return rd(this,n),r=t.call(this),Md&&vd.call(Object(ad.a)(r)),Sd(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,Object(ad.a)(r)),r.options=i,void 0===r.options.keySeparator&&(r.options.keySeparator="."),r.logger=bd.create("translator"),r}return sd(n,[{key:"changeLanguage",value:function(e){e&&(this.language=e)}},{key:"exists",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}};if(null==e)return!1;var n=this.resolve(e,t);return n&&void 0!==n.res}},{key:"extractFromKey",value:function(e,t){var n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");var r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,i=t.ns||this.options.defaultNS||[],o=n&&e.indexOf(n)>-1,s=!(this.options.userDefinedKeySeparator||t.keySeparator||this.options.userDefinedNsSeparator||t.nsSeparator||function(e,t,n){t=t||"",n=n||"";var r=Pd.filter((function(e){return t.indexOf(e)<0&&n.indexOf(e)<0}));if(0===r.length)return!0;var i=new RegExp("(".concat(r.map((function(e){return"?"===e?"\\?":e})).join("|"),")")),o=!i.test(e);if(!o){var s=e.indexOf(n);s>0&&!i.test(e.substring(0,s))&&(o=!0)}return o}(e,n,r));if(o&&!s){var a=e.match(this.interpolator.nestingRegexp);if(a&&a.length>0)return{key:e,namespaces:i};var l=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(l[0])>-1)&&(i=l.shift()),e=l.join(r)}return"string"==typeof i&&(i=[i]),{key:e,namespaces:i}}},{key:"translate",value:function(e,t,r){var i=this;if("object"!==Object(nd.a)(t)&&this.options.overloadTranslationOptionHandler&&(t=this.options.overloadTranslationOptionHandler(arguments)),"object"===Object(nd.a)(t)&&(t=Bd({},t)),t||(t={}),null==e)return"";Array.isArray(e)||(e=[String(e)]);var o=void 0!==t.returnDetails?t.returnDetails:this.options.returnDetails,s=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,a=this.extractFromKey(e[e.length-1],t),l=a.key,c=a.namespaces,u=c[c.length-1],d=t.lng||this.language,h=t.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d&&"cimode"===d.toLowerCase()){if(h){var p=t.nsSeparator||this.options.nsSeparator;return o?{res:"".concat(u).concat(p).concat(l),usedKey:l,exactUsedKey:l,usedLng:d,usedNS:u}:"".concat(u).concat(p).concat(l)}return o?{res:l,usedKey:l,exactUsedKey:l,usedLng:d,usedNS:u}:l}var f=this.resolve(e,t),m=f&&f.res,g=f&&f.usedKey||l,b=f&&f.exactUsedKey||l,v=Object.prototype.toString.apply(m),y=["[object Number]","[object Function]","[object RegExp]"],_=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays,S=!this.i18nFormat||this.i18nFormat.handleAsObject,x="string"!=typeof m&&"boolean"!=typeof m&&"number"!=typeof m;if(S&&m&&x&&y.indexOf(v)<0&&("string"!=typeof _||"[object Array]"!==v)){if(!t.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");var w=this.options.returnedObjectHandler?this.options.returnedObjectHandler(g,m,Bd(Bd({},t),{},{ns:c})):"key '".concat(l," (").concat(this.language,")' returned an object instead of string.");return o?(f.res=w,f):w}if(s){var k="[object Array]"===v,O=k?[]:{},E=k?b:g;for(var A in m)if(Object.prototype.hasOwnProperty.call(m,A)){var T="".concat(E).concat(s).concat(A);O[A]=this.translate(T,Bd(Bd({},t),{joinArrays:!1,ns:c})),O[A]===T&&(O[A]=m[A])}m=O}}else if(S&&"string"==typeof _&&"[object Array]"===v)(m=m.join(_))&&(m=this.extendTranslation(m,e,t,r));else{var C=!1,M=!1,P=void 0!==t.count&&"string"!=typeof t.count,$=n.hasDefaultValue(t),R=P?this.pluralResolver.getSuffix(d,t.count,t):"",I=t["defaultValue".concat(R)]||t.defaultValue;!this.isValidLookup(m)&&$&&(C=!0,m=I),this.isValidLookup(m)||(M=!0,m=l);var D=t.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey,N=D&&M?void 0:m,j=$&&I!==m&&this.options.updateMissing;if(M||C||j){if(this.logger.log(j?"updateKey":"missingKey",d,u,l,j?I:m),s){var L=this.resolve(l,Bd(Bd({},t),{},{keySeparator:!1}));L&&L.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}var B=[],F=this.languageUtils.getFallbackCodes(this.options.fallbackLng,t.lng||this.language);if("fallback"===this.options.saveMissingTo&&F&&F[0])for(var z=0;z1&&void 0!==arguments[1]?arguments[1]:{};return"string"==typeof e&&(e=[e]),e.forEach((function(e){if(!s.isValidLookup(t)){var l=s.extractFromKey(e,a),c=l.key;n=c;var u=l.namespaces;s.options.fallbackNS&&(u=u.concat(s.options.fallbackNS));var d=void 0!==a.count&&"string"!=typeof a.count,h=d&&!a.ordinal&&0===a.count&&s.pluralResolver.shouldUseIntlApi(),p=void 0!==a.context&&("string"==typeof a.context||"number"==typeof a.context)&&""!==a.context,f=a.lngs?a.lngs:s.languageUtils.toResolveHierarchy(a.lng||s.language,a.fallbackLng);u.forEach((function(e){s.isValidLookup(t)||(o=e,!zd["".concat(f[0],"-").concat(e)]&&s.utils&&s.utils.hasLoadedNamespace&&!s.utils.hasLoadedNamespace(o)&&(zd["".concat(f[0],"-").concat(e)]=!0,s.logger.warn('key "'.concat(n,'" for languages "').concat(f.join(", "),'" won\'t get resolved as namespace "').concat(o,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),f.forEach((function(n){if(!s.isValidLookup(t)){i=n;var o,l=[c];if(s.i18nFormat&&s.i18nFormat.addLookupKeys)s.i18nFormat.addLookupKeys(l,c,n,e,a);else{var u;d&&(u=s.pluralResolver.getSuffix(n,a.count,a));var f="".concat(s.options.pluralSeparator,"zero");if(d&&(l.push(c+u),h&&l.push(c+f)),p){var m="".concat(c).concat(s.options.contextSeparator).concat(a.context);l.push(m),d&&(l.push(m+u),h&&l.push(m+f))}}for(;o=l.pop();)s.isValidLookup(t)||(r=o,t=s.getResource(n,e,o,a))}})))}))}})),{res:t,usedKey:n,exactUsedKey:r,usedLng:i,usedNS:o}}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return this.i18nFormat&&this.i18nFormat.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}}],[{key:"hasDefaultValue",value:function(e){for(var t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&"defaultValue"===t.substring(0,"defaultValue".length)&&void 0!==e[t])return!0;return!1}}]),n}(vd);function Qd(e){return e.charAt(0).toUpperCase()+e.slice(1)}var qd=function(){function e(t){rd(this,e),this.options=t,this.supportedLngs=this.options.supportedLngs||!1,this.logger=bd.create("languageUtils")}return sd(e,[{key:"getScriptPartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return null;var t=e.split("-");return 2===t.length?null:(t.pop(),"x"===t[t.length-1].toLowerCase()?null:this.formatLanguageCode(t.join("-")))}},{key:"getLanguagePartFromCode",value:function(e){if(!e||e.indexOf("-")<0)return e;var t=e.split("-");return this.formatLanguageCode(t[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=["hans","hant","latn","cyrl","cans","mong","arab"],n=e.split("-");return this.options.lowerCaseLng?n=n.map((function(e){return e.toLowerCase()})):2===n.length?(n[0]=n[0].toLowerCase(),n[1]=n[1].toUpperCase(),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=Qd(n[1].toLowerCase()))):3===n.length&&(n[0]=n[0].toLowerCase(),2===n[1].length&&(n[1]=n[1].toUpperCase()),"sgn"!==n[0]&&2===n[2].length&&(n[2]=n[2].toUpperCase()),t.indexOf(n[1].toLowerCase())>-1&&(n[1]=Qd(n[1].toLowerCase())),t.indexOf(n[2].toLowerCase())>-1&&(n[2]=Qd(n[2].toLowerCase()))),n.join("-")}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isSupportedCode",value:function(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}},{key:"getBestMatchFromCodes",value:function(e){var t,n=this;return e?(e.forEach((function(e){if(!t){var r=n.formatLanguageCode(e);n.options.supportedLngs&&!n.isSupportedCode(r)||(t=r)}})),!t&&this.options.supportedLngs&&e.forEach((function(e){if(!t){var r=n.getLanguagePartFromCode(e);if(n.isSupportedCode(r))return t=r;t=n.options.supportedLngs.find((function(e){return e===r?e:e.indexOf("-")<0&&r.indexOf("-")<0?void 0:0===e.indexOf(r)?e:void 0}))}})),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}},{key:"getFallbackCodes",value:function(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),"string"==typeof e&&(e=[e]),"[object Array]"===Object.prototype.toString.apply(e))return e;if(!t)return e.default||[];var n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}},{key:"toResolveHierarchy",value:function(e,t){var n=this,r=this.getFallbackCodes(t||this.options.fallbackLng||[],e),i=[],o=function(e){e&&(n.isSupportedCode(e)?i.push(e):n.logger.warn("rejecting language code not found in supportedLngs: ".concat(e)))};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&o(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):"string"==typeof e&&o(this.formatLanguageCode(e)),r.forEach((function(e){i.indexOf(e)<0&&o(n.formatLanguageCode(e))})),i}}]),e}(),Hd=[{lngs:["ach","ak","am","arn","br","fil","gun","ln","mfe","mg","mi","oc","pt","pt-BR","tg","tl","ti","tr","uz","wa"],nr:[1,2],fc:1},{lngs:["af","an","ast","az","bg","bn","ca","da","de","dev","el","en","eo","es","et","eu","fi","fo","fur","fy","gl","gu","ha","hi","hu","hy","ia","it","kk","kn","ku","lb","mai","ml","mn","mr","nah","nap","nb","ne","nl","nn","no","nso","pa","pap","pms","ps","pt-PT","rm","sco","se","si","so","son","sq","sv","sw","ta","te","tk","ur","yo"],nr:[1,2],fc:2},{lngs:["ay","bo","cgg","fa","ht","id","ja","jbo","ka","km","ko","ky","lo","ms","sah","su","th","tt","ug","vi","wo","zh"],nr:[1],fc:3},{lngs:["be","bs","cnr","dz","hr","ru","sr","uk"],nr:[1,2,5],fc:4},{lngs:["ar"],nr:[0,1,2,3,11,100],fc:5},{lngs:["cs","sk"],nr:[1,2,5],fc:6},{lngs:["csb","pl"],nr:[1,2,5],fc:7},{lngs:["cy"],nr:[1,2,3,8],fc:8},{lngs:["fr"],nr:[1,2],fc:9},{lngs:["ga"],nr:[1,2,3,7,11],fc:10},{lngs:["gd"],nr:[1,2,3,20],fc:11},{lngs:["is"],nr:[1,2],fc:12},{lngs:["jv"],nr:[0,1],fc:13},{lngs:["kw"],nr:[1,2,3,4],fc:14},{lngs:["lt"],nr:[1,2,10],fc:15},{lngs:["lv"],nr:[1,2,0],fc:16},{lngs:["mk"],nr:[1,2],fc:17},{lngs:["mnk"],nr:[0,1,2],fc:18},{lngs:["mt"],nr:[1,2,11,20],fc:19},{lngs:["or"],nr:[2,1],fc:2},{lngs:["ro"],nr:[1,2,20],fc:20},{lngs:["sl"],nr:[5,1,2,3],fc:21},{lngs:["he","iw"],nr:[1,2,20,21],fc:22}],Gd={1:function(e){return Number(e>1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},5:function(e){return Number(0==e?0:1==e?1:2==e?2:e%100>=3&&e%100<=10?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&e<=4?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&e%10<=4&&(e%100<10||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:e<7?2:e<11?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&e<20?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(e%100<10||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1&&e%100!=11?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0==e||e%100>1&&e%100<11?1:e%100>10&&e%100<20?2:3)},20:function(e){return Number(1==e?0:0==e||e%100>0&&e%100<20?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)},22:function(e){return Number(1==e?0:2==e?1:(e<0||e>10)&&e%10==0?2:3)}},Vd=["v1","v2","v3"],Wd={zero:0,one:1,two:2,few:3,many:4,other:5};function Xd(){var e={};return Hd.forEach((function(t){t.lngs.forEach((function(n){e[n]={numbers:t.nr,plurals:Gd[t.fc]}}))})),e}var Yd=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};rd(this,e),this.languageUtils=t,this.options=n,this.logger=bd.create("pluralResolver"),this.options.compatibilityJSON&&"v4"!==this.options.compatibilityJSON||"undefined"!=typeof Intl&&Intl.PluralRules||(this.options.compatibilityJSON="v3",this.logger.error("Your environment seems not to be Intl API compatible, use an Intl.PluralRules polyfill. Will fallback to the compatibilityJSON v3 format handling.")),this.rules=Xd()}return sd(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.shouldUseIntlApi())try{return new Intl.PluralRules(e,{type:t.ordinal?"ordinal":"cardinal"})}catch(e){return}return this.rules[e]||this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getRule(e,t);return this.shouldUseIntlApi()?n&&n.resolvedOptions().pluralCategories.length>1:n&&n.numbers.length>1}},{key:"getPluralFormsOfKey",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.getSuffixes(e,n).map((function(e){return"".concat(t).concat(e)}))}},{key:"getSuffixes",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?r.resolvedOptions().pluralCategories.sort((function(e,t){return Wd[e]-Wd[t]})).map((function(e){return"".concat(t.options.prepend).concat(e)})):r.numbers.map((function(r){return t.getSuffix(e,r,n)})):[]}},{key:"getSuffix",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getRule(e,n);return r?this.shouldUseIntlApi()?"".concat(this.options.prepend).concat(r.select(t)):this.getSuffixRetroCompatible(r,t):(this.logger.warn("no plural rule found for: ".concat(e)),"")}},{key:"getSuffixRetroCompatible",value:function(e,t){var n=this,r=e.noAbs?e.plurals(t):e.plurals(Math.abs(t)),i=e.numbers[r];this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]&&(2===i?i="plural":1===i&&(i=""));var o=function(){return n.options.prepend&&i.toString()?n.options.prepend+i.toString():i.toString()};return"v1"===this.options.compatibilityJSON?1===i?"":"number"==typeof i?"_plural_".concat(i.toString()):o():"v2"===this.options.compatibilityJSON||this.options.simplifyPluralSuffix&&2===e.numbers.length&&1===e.numbers[0]?o():this.options.prepend&&r.toString()?this.options.prepend+r.toString():r.toString()}},{key:"shouldUseIntlApi",value:function(){return!Vd.includes(this.options.compatibilityJSON)}}]),e}();function Zd(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Jd(e){for(var t=1;t3&&void 0!==arguments[3]?arguments[3]:".",i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],o=Od(e,t,n);return!o&&i&&"string"==typeof n&&void 0===(o=$d(e,n,r))&&(o=$d(t,n,r)),o}var eh=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};rd(this,e),this.logger=bd.create("interpolator"),this.options=t,this.format=t.interpolation&&t.interpolation.format||function(e){return e},this.init(t)}return sd(e,[{key:"init",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.interpolation||(e.interpolation={escapeValue:!0});var t=e.interpolation;this.escape=void 0!==t.escape?t.escape:Cd,this.escapeValue=void 0===t.escapeValue||t.escapeValue,this.useRawValueToEscape=void 0!==t.useRawValueToEscape&&t.useRawValueToEscape,this.prefix=t.prefix?Ad(t.prefix):t.prefixEscaped||"{{",this.suffix=t.suffix?Ad(t.suffix):t.suffixEscaped||"}}",this.formatSeparator=t.formatSeparator?t.formatSeparator:t.formatSeparator||",",this.unescapePrefix=t.unescapeSuffix?"":t.unescapePrefix||"-",this.unescapeSuffix=this.unescapePrefix?"":t.unescapeSuffix||"",this.nestingPrefix=t.nestingPrefix?Ad(t.nestingPrefix):t.nestingPrefixEscaped||Ad("$t("),this.nestingSuffix=t.nestingSuffix?Ad(t.nestingSuffix):t.nestingSuffixEscaped||Ad(")"),this.nestingOptionsSeparator=t.nestingOptionsSeparator?t.nestingOptionsSeparator:t.nestingOptionsSeparator||",",this.maxReplaces=t.maxReplaces?t.maxReplaces:1e3,this.alwaysFormat=void 0!==t.alwaysFormat&&t.alwaysFormat,this.resetRegExp()}},{key:"reset",value:function(){this.options&&this.init(this.options)}},{key:"resetRegExp",value:function(){var e="".concat(this.prefix,"(.+?)").concat(this.suffix);this.regexp=new RegExp(e,"g");var t="".concat(this.prefix).concat(this.unescapePrefix,"(.+?)").concat(this.unescapeSuffix).concat(this.suffix);this.regexpUnescape=new RegExp(t,"g");var n="".concat(this.nestingPrefix,"(.+?)").concat(this.nestingSuffix);this.nestingRegexp=new RegExp(n,"g")}},{key:"interpolate",value:function(e,t,n,r){var i,o,s,a=this,l=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{};function c(e){return e.replace(/\$/g,"$$$$")}var u=function(e){if(e.indexOf(a.formatSeparator)<0){var i=Kd(t,l,e,a.options.keySeparator,a.options.ignoreJSONStructure);return a.alwaysFormat?a.format(i,void 0,n,Jd(Jd(Jd({},r),t),{},{interpolationkey:e})):i}var o=e.split(a.formatSeparator),s=o.shift().trim(),c=o.join(a.formatSeparator).trim();return a.format(Kd(t,l,s,a.options.keySeparator,a.options.ignoreJSONStructure),c,n,Jd(Jd(Jd({},r),t),{},{interpolationkey:s}))};this.resetRegExp();var d=r&&r.missingInterpolationHandler||this.options.missingInterpolationHandler,h=r&&r.interpolation&&void 0!==r.interpolation.skipOnVariables?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:function(e){return c(e)}},{regex:this.regexp,safeValue:function(e){return a.escapeValue?c(a.escape(e)):c(e)}}].forEach((function(t){for(s=0;i=t.regex.exec(e);){var n=i[1].trim();if(void 0===(o=u(n)))if("function"==typeof d){var l=d(e,i,r);o="string"==typeof l?l:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))o="";else{if(h){o=i[0];continue}a.logger.warn("missed to pass in variable ".concat(n," for interpolating ").concat(e)),o=""}else"string"==typeof o||a.useRawValueToEscape||(o=_d(o));var c=t.safeValue(o);if(e=e.replace(i[0],c),h?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,++s>=a.maxReplaces)break}})),e}},{key:"nest",value:function(e,t){var n,r,i,o=this,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};function a(e,t){var n=this.nestingOptionsSeparator;if(e.indexOf(n)<0)return e;var r=e.split(new RegExp("".concat(n,"[ ]*{"))),o="{".concat(r[1]);e=r[0];var s=(o=this.interpolate(o,i)).match(/'/g),a=o.match(/"/g);(s&&s.length%2==0&&!a||a.length%2!=0)&&(o=o.replace(/'/g,'"'));try{i=JSON.parse(o),t&&(i=Jd(Jd({},t),i))}catch(t){return this.logger.warn("failed parsing options string in nesting for key ".concat(e),t),"".concat(e).concat(n).concat(o)}return delete i.defaultValue,e}for(;n=this.nestingRegexp.exec(e);){var l=[];(i=(i=Jd({},s)).replace&&"string"!=typeof i.replace?i.replace:i).applyPostProcessor=!1,delete i.defaultValue;var c=!1;if(-1!==n[0].indexOf(this.formatSeparator)&&!/{.*}/.test(n[1])){var u=n[1].split(this.formatSeparator).map((function(e){return e.trim()}));n[1]=u.shift(),l=u,c=!0}if((r=t(a.call(this,n[1].trim(),i),i))&&n[0]===e&&"string"!=typeof r)return r;"string"!=typeof r&&(r=_d(r)),r||(this.logger.warn("missed to resolve ".concat(n[1]," for nesting ").concat(e)),r=""),c&&(r=l.reduce((function(e,t){return o.format(e,t,s.lng,Jd(Jd({},s),{},{interpolationkey:n[1].trim()}))}),r.trim())),e=e.replace(n[0],r),this.regexp.lastIndex=0}return e}}]),e}();function th(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function nh(e){for(var t=1;t-1){var r=e.split("(");t=r[0].toLowerCase().trim();var i=r[1].substring(0,r[1].length-1);if("currency"===t&&i.indexOf(":")<0)n.currency||(n.currency=i.trim());else if("relativetime"===t&&i.indexOf(":")<0)n.range||(n.range=i.trim());else{i.split(";").forEach((function(e){if(e){var t=pd(e.split(":")),r=t[0],i=t.slice(1).join(":").trim().replace(/^'+|'+$/g,"");n[r.trim()]||(n[r.trim()]=i),"false"===i&&(n[r.trim()]=!1),"true"===i&&(n[r.trim()]=!0),isNaN(i)||(n[r.trim()]=parseInt(i,10))}}))}}return{formatName:t,formatOptions:n}}function ih(e){var t={};return function(n,r,i){var o=r+JSON.stringify(i),s=t[o];return s||(s=e(r,i),t[o]=s),s(n)}}var oh=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};rd(this,e),this.logger=bd.create("formatter"),this.options=t,this.formats={number:ih((function(e,t){var n=new Intl.NumberFormat(e,nh({},t));return function(e){return n.format(e)}})),currency:ih((function(e,t){var n=new Intl.NumberFormat(e,nh(nh({},t),{},{style:"currency"}));return function(e){return n.format(e)}})),datetime:ih((function(e,t){var n=new Intl.DateTimeFormat(e,nh({},t));return function(e){return n.format(e)}})),relativetime:ih((function(e,t){var n=new Intl.RelativeTimeFormat(e,nh({},t));return function(e){return n.format(e,t.range||"day")}})),list:ih((function(e,t){var n=new Intl.ListFormat(e,nh({},t));return function(e){return n.format(e)}}))},this.init(t)}return sd(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{interpolation:{}},n=t.interpolation;this.formatSeparator=n.formatSeparator?n.formatSeparator:n.formatSeparator||","}},{key:"add",value:function(e,t){this.formats[e.toLowerCase().trim()]=t}},{key:"addCached",value:function(e,t){this.formats[e.toLowerCase().trim()]=ih(t)}},{key:"format",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=t.split(this.formatSeparator),s=o.reduce((function(e,t){var o=rh(t),s=o.formatName,a=o.formatOptions;if(r.formats[s]){var l=e;try{var c=i&&i.formatParams&&i.formatParams[i.interpolationkey]||{},u=c.locale||c.lng||i.locale||i.lng||n;l=r.formats[s](e,u,nh(nh(nh({},a),i),c))}catch(e){r.logger.warn(e)}return l}return r.logger.warn("there was no format function for ".concat(s)),e}),e);return s}}]),e}();function sh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ah(e){for(var t=1;t3&&void 0!==arguments[3]?arguments[3]:{};return rd(this,n),o=t.call(this),Md&&vd.call(Object(ad.a)(o)),o.backend=e,o.store=r,o.services=i,o.languageUtils=i.languageUtils,o.options=s,o.logger=bd.create("backendConnector"),o.waitingReads=[],o.maxParallelReads=s.maxParallelReads||10,o.readingCalls=0,o.maxRetries=s.maxRetries>=0?s.maxRetries:5,o.retryTimeout=s.retryTimeout>=1?s.retryTimeout:350,o.state={},o.queue=[],o.backend&&o.backend.init&&o.backend.init(i,s.backend,s),o}return sd(n,[{key:"queueLoad",value:function(e,t,n,r){var i=this,o={},s={},a={},l={};return e.forEach((function(e){var r=!0;t.forEach((function(t){var a="".concat(e,"|").concat(t);!n.reload&&i.store.hasResourceBundle(e,t)?i.state[a]=2:i.state[a]<0||(1===i.state[a]?void 0===s[a]&&(s[a]=!0):(i.state[a]=1,r=!1,void 0===s[a]&&(s[a]=!0),void 0===o[a]&&(o[a]=!0),void 0===l[t]&&(l[t]=!0)))})),r||(a[e]=!0)})),(Object.keys(o).length||Object.keys(s).length)&&this.queue.push({pending:s,pendingCount:Object.keys(s).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(o),pending:Object.keys(s),toLoadLanguages:Object.keys(a),toLoadNamespaces:Object.keys(l)}}},{key:"loaded",value:function(e,t,n){var r=e.split("|"),i=r[0],o=r[1];t&&this.emit("failedLoading",i,o,t),n&&this.store.addResourceBundle(i,o,n),this.state[e]=t?-1:2;var s={};this.queue.forEach((function(n){var r,a,l,c,u,d;r=n.loaded,a=o,c=xd(r,[i],Object),u=c.obj,d=c.k,u[d]=u[d]||[],l&&(u[d]=u[d].concat(a)),l||u[d].push(a),function(e,t){void 0!==e.pending[t]&&(delete e.pending[t],e.pendingCount--)}(n,e),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach((function(e){s[e]||(s[e]={});var t=n.loaded[e];t.length&&t.forEach((function(t){void 0===s[e][t]&&(s[e][t]=!0)}))})),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())})),this.emit("loaded",s),this.queue=this.queue.filter((function(e){return!e.done}))}},{key:"read",value:function(e,t,n){var r=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.retryTimeout,s=arguments.length>5?arguments[5]:void 0;if(!e.length)return s(null,{});if(this.readingCalls>=this.maxParallelReads)this.waitingReads.push({lng:e,ns:t,fcName:n,tried:i,wait:o,callback:s});else{this.readingCalls++;var a=function(a,l){if(r.readingCalls--,r.waitingReads.length>0){var c=r.waitingReads.shift();r.read(c.lng,c.ns,c.fcName,c.tried,c.wait,c.callback)}a&&l&&i2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3?arguments[3]:void 0;if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();"string"==typeof e&&(e=this.languageUtils.toResolveHierarchy(e)),"string"==typeof t&&(t=[t]);var o=this.queueLoad(e,t,r,i);if(!o.toLoad.length)return o.pending.length||i(),null;o.toLoad.forEach((function(e){n.loadOne(e)}))}},{key:"load",value:function(e,t,n){this.prepareLoading(e,t,{},n)}},{key:"reload",value:function(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}},{key:"loadOne",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=e.split("|"),i=r[0],o=r[1];this.read(i,o,"read",void 0,void 0,(function(r,s){r&&t.logger.warn("".concat(n,"loading namespace ").concat(o," for language ").concat(i," failed"),r),!r&&s&&t.logger.log("".concat(n,"loaded namespace ").concat(o," for language ").concat(i),s),t.loaded(e,r,s)}))}},{key:"saveMissing",value:function(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{},s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:function(){};if(this.services.utils&&this.services.utils.hasLoadedNamespace&&!this.services.utils.hasLoadedNamespace(t))this.logger.warn('did not save key "'.concat(n,'" as the namespace "').concat(t,'" was not yet loaded'),"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");else if(null!=n&&""!==n){if(this.backend&&this.backend.create){var a=ah(ah({},o),{},{isUpdate:i}),l=this.backend.create.bind(this.backend);if(l.length<6)try{var c;(c=5===l.length?l(e,t,n,r,a):l(e,t,n,r))&&"function"==typeof c.then?c.then((function(e){return s(null,e)})).catch(s):s(null,c)}catch(e){s(e)}else l(e,t,n,r,s,a)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}]),n}(vd);function uh(){return{debug:!1,initImmediate:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!0,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:function(e){var t={};if("object"===Object(nd.a)(e[1])&&(t=e[1]),"string"==typeof e[1]&&(t.defaultValue=e[1]),"string"==typeof e[2]&&(t.tDescription=e[2]),"object"===Object(nd.a)(e[2])||"object"===Object(nd.a)(e[3])){var n=e[3]||e[2];Object.keys(n).forEach((function(e){t[e]=n[e]}))}return t},interpolation:{escapeValue:!0,format:function(e,t,n,r){return e},prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0}}}function dh(e){return"string"==typeof e.ns&&(e.ns=[e.ns]),"string"==typeof e.fallbackLng&&(e.fallbackLng=[e.fallbackLng]),"string"==typeof e.fallbackNS&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&e.supportedLngs.indexOf("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),e}function hh(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ph(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1?arguments[1]:void 0;if(rd(this,n),e=t.call(this),Md&&vd.call(Object(ad.a)(e)),e.options=dh(r),e.services={},e.logger=bd,e.modules={external:[]},gh(Object(ad.a)(e)),i&&!e.isInitialized&&!r.isClone){if(!e.options.initImmediate)return e.init(r,i),Object(ud.a)(e,Object(ad.a)(e));setTimeout((function(){e.init(r,i)}),0)}return e}return sd(n,[{key:"init",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0;"function"==typeof t&&(n=t,t={}),!t.defaultNS&&!1!==t.defaultNS&&t.ns&&("string"==typeof t.ns?t.defaultNS=t.ns:t.ns.indexOf("translation")<0&&(t.defaultNS=t.ns[0]));var r=uh();function i(e){return e?"function"==typeof e?new e:e:null}if(this.options=ph(ph(ph({},r),this.options),dh(t)),"v1"!==this.options.compatibilityAPI&&(this.options.interpolation=ph(ph({},r.interpolation),this.options.interpolation)),void 0!==t.keySeparator&&(this.options.userDefinedKeySeparator=t.keySeparator),void 0!==t.nsSeparator&&(this.options.userDefinedNsSeparator=t.nsSeparator),!this.options.isClone){var o;this.modules.logger?bd.init(i(this.modules.logger),this.options):bd.init(null,this.options),this.modules.formatter?o=this.modules.formatter:"undefined"!=typeof Intl&&(o=oh);var s=new qd(this.options);this.store=new Nd(this.options.resources,this.options);var a=this.services;a.logger=bd,a.resourceStore=this.store,a.languageUtils=s,a.pluralResolver=new Yd(s,{prepend:this.options.pluralSeparator,compatibilityJSON:this.options.compatibilityJSON,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),!o||this.options.interpolation.format&&this.options.interpolation.format!==r.interpolation.format||(a.formatter=i(o),a.formatter.init(a,this.options),this.options.interpolation.format=a.formatter.format.bind(a.formatter)),a.interpolator=new eh(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new ch(i(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(function(t){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i1?n-1:0),i=1;i0&&"dev"!==l[0]&&(this.options.lng=l[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined");var c=["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"];c.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments)}}));var u=["addResource","addResources","addResourceBundle","removeResourceBundle"];u.forEach((function(t){e[t]=function(){var n;return(n=e.store)[t].apply(n,arguments),e}}));var d=yd(),h=function(){var t=function(t,r){e.isInitialized&&!e.initializedStoreOnce&&e.logger.warn("init: i18next is already initialized. You should call init just once!"),e.isInitialized=!0,e.options.isClone||e.logger.log("initialized",e.options),e.emit("initialized",e.options),d.resolve(r),n(t,r)};if(e.languages&&"v1"!==e.options.compatibilityAPI&&!e.isInitialized)return t(null,e.t.bind(e));e.changeLanguage(e.options.lng,t)};return this.options.resources||!this.options.initImmediate?h():setTimeout(h,0),d}},{key:"loadResources",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:mh,r=n,i="string"==typeof e?e:this.language;if("function"==typeof e&&(r=e),!this.options.resources||this.options.partialBundledLanguages){if(i&&"cimode"===i.toLowerCase())return r();var o=[],s=function(e){e&&t.services.languageUtils.toResolveHierarchy(e).forEach((function(e){o.indexOf(e)<0&&o.push(e)}))};if(i)s(i);else{var a=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);a.forEach((function(e){return s(e)}))}this.options.preload&&this.options.preload.forEach((function(e){return s(e)})),this.services.backendConnector.load(o,this.options.ns,(function(e){e||t.resolvedLanguage||!t.language||t.setResolvedLanguage(t.language),r(e)}))}else r(null)}},{key:"reloadResources",value:function(e,t,n){var r=yd();return e||(e=this.languages),t||(t=this.options.ns),n||(n=mh),this.services.backendConnector.reload(e,t,(function(e){r.resolve(),n(e)})),r}},{key:"use",value:function(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&jd.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}},{key:"setResolvedLanguage",value:function(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1))for(var t=0;t-1)&&this.store.hasLanguageSomeTranslations(n)){this.resolvedLanguage=n;break}}}},{key:"changeLanguage",value:function(e,t){var n=this;this.isLanguageChangingTo=e;var r=yd();this.emit("languageChanging",e);var i=function(e){n.language=e,n.languages=n.services.languageUtils.toResolveHierarchy(e),n.resolvedLanguage=void 0,n.setResolvedLanguage(e)},o=function(o){e||o||!n.services.languageDetector||(o=[]);var s="string"==typeof o?o:n.services.languageUtils.getBestMatchFromCodes(o);s&&(n.language||i(s),n.translator.language||n.translator.changeLanguage(s),n.services.languageDetector&&n.services.languageDetector.cacheUserLanguage&&n.services.languageDetector.cacheUserLanguage(s)),n.loadResources(s,(function(e){!function(e,o){o?(i(o),n.translator.changeLanguage(o),n.isLanguageChangingTo=void 0,n.emit("languageChanged",o),n.logger.log("languageChanged",o)):n.isLanguageChangingTo=void 0,r.resolve((function(){return n.t.apply(n,arguments)})),t&&t(e,(function(){return n.t.apply(n,arguments)}))}(e,s)}))};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),r}},{key:"getFixedT",value:function(e,t,n){var r=this,i=function e(t,i){var o;if("object"!==Object(nd.a)(i)){for(var s=arguments.length,a=new Array(s>2?s-2:0),l=2;l1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;var r=this.resolvedLanguage||this.languages[0],i=!!this.options&&this.options.fallbackLng,o=this.languages[this.languages.length-1];if("cimode"===r.toLowerCase())return!0;var s=function(e,n){var r=t.services.backendConnector.state["".concat(e,"|").concat(n)];return-1===r||2===r};if(n.precheck){var a=n.precheck(this,s);if(void 0!==a)return a}return!!this.hasResourceBundle(r,e)||(!(this.services.backendConnector.backend&&(!this.options.resources||this.options.partialBundledLanguages))||!(!s(r,e)||i&&!s(o,e)))}},{key:"loadNamespaces",value:function(e,t){var n=this,r=yd();return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach((function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)})),this.loadResources((function(e){r.resolve(),t&&t(e)})),r):(t&&t(),Promise.resolve())}},{key:"loadLanguages",value:function(e,t){var n=yd();"string"==typeof e&&(e=[e]);var r=this.options.preload||[],i=e.filter((function(e){return r.indexOf(e)<0}));return i.length?(this.options.preload=r.concat(i),this.loadResources((function(e){n.resolve(),t&&t(e)})),n):(t&&t(),Promise.resolve())}},{key:"dir",value:function(e){if(e||(e=this.resolvedLanguage||(this.languages&&this.languages.length>0?this.languages[0]:this.language)),!e)return"rtl";var t=this.services&&this.services.languageUtils||new qd(uh());return["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}},{key:"cloneInstance",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:mh,i=ph(ph(ph({},this.options),t),{isClone:!0}),o=new n(i);void 0===t.debug&&void 0===t.prefix||(o.logger=o.logger.clone(t));var s=["store","services","language"];return s.forEach((function(t){o[t]=e[t]})),o.services=ph({},this.services),o.services.utils={hasLoadedNamespace:o.hasLoadedNamespace.bind(o)},o.translator=new Ud(o.services,o.options),o.translator.on("*",(function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;return new bh(e,t)}));var vh=bh.createInstance();vh.createInstance=bh.createInstance;vh.createInstance,vh.dir,vh.init,vh.loadResources,vh.reloadResources,vh.use,vh.changeLanguage,vh.getFixedT,vh.t,vh.exists,vh.setDefaultNamespace,vh.hasLoadedNamespace,vh.loadNamespaces,vh.loadLanguages;var yh=[],_h=yh.forEach,Sh=yh.slice;function xh(e){return _h.call(Sh.call(arguments,1),(function(t){if(t)for(var n in t)void 0===e[n]&&(e[n]=t[n])})),e}var wh=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,kh=function(e,t,n){var r=n||{};r.path=r.path||"/";var i=encodeURIComponent(t),o="".concat(e,"=").concat(i);if(r.maxAge>0){var s=r.maxAge-0;if(Number.isNaN(s))throw new Error("maxAge should be a Number");o+="; Max-Age=".concat(Math.floor(s))}if(r.domain){if(!wh.test(r.domain))throw new TypeError("option domain is invalid");o+="; Domain=".concat(r.domain)}if(r.path){if(!wh.test(r.path))throw new TypeError("option path is invalid");o+="; Path=".concat(r.path)}if(r.expires){if("function"!=typeof r.expires.toUTCString)throw new TypeError("option expires is invalid");o+="; Expires=".concat(r.expires.toUTCString())}if(r.httpOnly&&(o+="; HttpOnly"),r.secure&&(o+="; Secure"),r.sameSite)switch("string"==typeof r.sameSite?r.sameSite.toLowerCase():r.sameSite){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return o},Oh=function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{path:"/",sameSite:"strict"};n&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+60*n*1e3)),r&&(i.domain=r),document.cookie=kh(e,encodeURIComponent(t),i)},Eh=function(e){for(var t="".concat(e,"="),n=document.cookie.split(";"),r=0;r-1&&(n=window.location.hash.substring(window.location.hash.indexOf("?")));for(var r=n.substring(1).split("&"),i=0;i0)r[i].substring(0,o)===e.lookupQuerystring&&(t=r[i].substring(o+1))}}return t}},Ch=null,Mh=function(){if(null!==Ch)return Ch;try{Ch="undefined"!==window&&null!==window.localStorage;window.localStorage.setItem("i18next.translate.boo","foo"),window.localStorage.removeItem("i18next.translate.boo")}catch(e){Ch=!1}return Ch},Ph={name:"localStorage",lookup:function(e){var t;if(e.lookupLocalStorage&&Mh()){var n=window.localStorage.getItem(e.lookupLocalStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupLocalStorage&&Mh()&&window.localStorage.setItem(t.lookupLocalStorage,e)}},$h=null,Rh=function(){if(null!==$h)return $h;try{$h="undefined"!==window&&null!==window.sessionStorage;window.sessionStorage.setItem("i18next.translate.boo","foo"),window.sessionStorage.removeItem("i18next.translate.boo")}catch(e){$h=!1}return $h},Ih={name:"sessionStorage",lookup:function(e){var t;if(e.lookupSessionStorage&&Rh()){var n=window.sessionStorage.getItem(e.lookupSessionStorage);n&&(t=n)}return t},cacheUserLanguage:function(e,t){t.lookupSessionStorage&&Rh()&&window.sessionStorage.setItem(t.lookupSessionStorage,e)}},Dh={name:"navigator",lookup:function(e){var t=[];if("undefined"!=typeof navigator){if(navigator.languages)for(var n=0;n0?t:void 0}},Nh={name:"htmlTag",lookup:function(e){var t,n=e.htmlTag||("undefined"!=typeof document?document.documentElement:null);return n&&"function"==typeof n.getAttribute&&(t=n.getAttribute("lang")),t}},jh={name:"path",lookup:function(e){var t;if("undefined"!=typeof window){var n=window.location.pathname.match(/\/([a-zA-Z-]*)/g);if(n instanceof Array)if("number"==typeof e.lookupFromPathIndex){if("string"!=typeof n[e.lookupFromPathIndex])return;t=n[e.lookupFromPathIndex].replace("/","")}else t=n[0].replace("/","")}return t}},Lh={name:"subdomain",lookup:function(e){var t="number"==typeof e.lookupFromSubdomainIndex?e.lookupFromSubdomainIndex+1:1,n="undefined"!=typeof window&&window.location&&window.location.hostname&&window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(n)return n[t]}};var Bh=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};rd(this,e),this.type="languageDetector",this.detectors={},this.init(t,n)}return sd(e,[{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.services=e,this.options=xh(t,this.options||{},{order:["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"],lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"]}),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=n,this.addDetector(Ah),this.addDetector(Th),this.addDetector(Ph),this.addDetector(Ih),this.addDetector(Dh),this.addDetector(Nh),this.addDetector(jh),this.addDetector(Lh)}},{key:"addDetector",value:function(e){this.detectors[e.name]=e}},{key:"detect",value:function(e){var t=this;e||(e=this.options.order);var n=[];return e.forEach((function(e){if(t.detectors[e]){var r=t.detectors[e].lookup(t.options);r&&"string"==typeof r&&(r=[r]),r&&(n=n.concat(r))}})),this.services.languageUtils.getBestMatchFromCodes?n:n.length>0?n[0]:null}},{key:"cacheUserLanguage",value:function(e,t){var n=this;t||(t=this.options.caches),t&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||t.forEach((function(t){n.detectors[t]&&n.detectors[t].cacheUserLanguage(e,n.options)})))}}]),e}();Bh.type="languageDetector",vh.use(Bh).use(Li).init({debug:!0,fallbackLng:"en",locales:["en","ar-SA","ca-ES","cs-CZ","me-ME","cy-GB","da-DK","de-DE","el-GR","et-EE","es-ES","es-LA","fr-FR","he-IL","hi-IN","hr-HR","it-IT","ja-JP","kn-IN","ko-KR","mr-IN","hu-HU","nl-NL","no-NO","pl-PL","pt-BR","pt-PT","ro-RO","ru-RU","sk-SK","sl-SI","fi-FI","sv-SE","vls-BE","sr-SP","tr-TR","uk-UA","zh-CN","zh-TW"],supportedLngs:["en","ar-SA","ca-ES","cs-CZ","me-ME","cy-GB","da-DK","de-DE","el-GR","et-EE","es-ES","es-LA","fr-FR","he-IL","hi-IN","hr-HR","it-IT","ja-JP","kn-IN","ko-KR","mr-IN","hu-HU","nl-NL","no-NO","pl-PL","pt-BR","pt-PT","ro-RO","ru-RU","sk-SK","sl-SI","fi-FI","sv-SE","vls-BE","sr-SP","tr-TR","uk-UA","zh-CN","zh-TW"],load:"currentOnly",detection:{order:["path"]},interpolation:{escapeValue:!1},resources:{en:{translation:{modal:{close:"Close",error:{heading:"An error has occurred",externalLink:{message:"Unfortunately links to external sites are not available in the Editor."}}},betaBanner:{buttonLabel:"close",buttonTitle:"close",message:"The Code Editor is in",feedbackText:"Give us your",feedback:"feedback",feedbackImprove:"to help us improve.",modal:{close:"Close",heading:"Code Editor is in beta",meaningHeading:"What does beta mean?",meaningText:"Beta means that we are not quite finished yet, and some things might not look or work as well as we’d like. However, it also means you are one of the first people to use our new Code Editor!"},modalLink:"beta"},editorPanel:{ariaLabel:"editor text input"},filePanel:{errors:{containsSpaces:"File names must not contain spaces.",generalError:"Error",notUnique:"File names must be unique.",or:"or",unsupportedExtension:"File names must end in {{allowedExtensions}}."},files:"Project files",images:"Image gallery",newFileButton:"Add file",newFileModal:{cancel:"Cancel",heading:"Add a new file to your project",helpText:"Remember to add the file extension at the end of your file name, for example, {{examples}}",helpTextExample:{html:"'file.html', 'file.css' or 'file.js'",python:"'file.py'"},inputLabel:"Name your file",addFile:"Add file"},renameFileModal:{cancel:"Cancel",heading:"Rename file",inputLabel:"Name your file",save:"Save"},fileMenu:{label:"Open file menu",renameItem:"Rename file"}},downloadPanel:{heading:"Save & download",logInTitle:"Log in to save your progress",logInHint:"With a Raspberry Pi Account you can save your code and project steps progress.",logInButton:"Log in to save",signUpButton:"Sign up",downloadHint:"Download your project files so you can use them offline and in a different code editor.",downloadButton:"Download project"},landingPage:{title:"Code Editor",subtitle:"Start coding, no setup required!",python:"Start coding Python",html:"Start coding HTML/CSS",login:"Log in",start:"Not sure where to start?",projectPython:"Python path",projectHtml:"Web path"},footer:{accessibility:"Accessibility",charityNameAndNumber:"Raspberry Pi Foundation UK registered charity 1129409",cookies:"Cookies",privacy:"Privacy",safeguarding:"Safeguarding"},globalNav:{accountMenu:{login:"Log in",logout:"Log out",profile:"My profile",projects:"My projects"},accountMenuDefaultAltText:"Account menu",accountMenuProfileAltText:"{{name}}'s account",raspberryPiLogoAltText:"Raspberry Pi logo"},projectName:{label:"Project name",newProject:"New Project"},header:{download:"Download",downloadFileNameDefault:"my {{project_type}} project",editorLogoAltText:"Editor logo",projects:"Your projects",renameProject:"Edit project name",renameSave:"Save project name",save:"Save",loginToSave:"Log in to save",settings:"Settings"},imagePanel:{gallery:"Image Gallery"},infoPanel:{info:"Information"},instructionsPanel:{nextStep:"Next step",previousStep:"Previous step",projectSteps:"Project steps"},projectsPanel:{projects:"Projects",yourProjectsButton:"Go to your projects",projectTypeLabel:"Project type"},settingsPanel:{info:"Settings"},input:{comment:{py5:"Py5: imported mode"}},loginToSaveModal:{cancel:"Cancel",downloadButtonText:"Download",downloadText:"Or you can download your project and save it on your computer.",heading:"Save your project",loginButtonText:"Log in to save",loginText:"Log in to your Raspberry Pi account to save your work, and you'll be able to access and edit your project whenever you need to."},mobile:{code:"Code",menu:"Menu",output:"Output",preview:"Preview",steps:"Steps"},modals:{close:"Close"},newProjectModal:{cancel:"Cancel",createProject:"Create project",heading:"Create a new project",projectName:{default:"Untitled",helpText:"You can always rename your project later",inputLabel:"Project name"},projectType:{html:"HTML",inputLabel:"What kind of project do you want to make?",python:"Python"}},notifications:{close:"close",loginPrompt:"To save this project and access it later, don't forget to log in or sign up!",projectRemixed:"Your remixed project has been saved",projectRenamed:"You have renamed your project.",projectSaved:"Your project has been saved",savePrompt:'Save this project to access it later under "Your projects".'},output:{errors:{interrupted:"Execution interrupted"},newTab:"Preview in new tab",preview:"preview",senseHat:{controls:{colour:"colour",humidity:"humidity",motion:"motion",motionSensorOptions:{no:"No",yes:"Yes"},name:"Space Station Control Panel",pressure:"pressure",temperature:"temperature",timer:"timer"},model:{pitch:"pitch",roll:"roll",yaw:"yaw"}},textOutput:"Text output",visualOutput:"Visual output"},outputViewToggle:{buttonTabLabel:"Tabbed view",buttonTabTitle:"Tabbed view",buttonSplitLabel:"Split view",buttonSplitTitle:"Split view"},project:{accessDeniedNoAuthModal:{embedded:{text:"Visit the Projects site for cool project ideas"},heading:"You are not able to see this project",loginButtonText:"Log in to your account",newProject:"Create a new code project",projectsSiteLinkText:"Explore Projects site",text:"If this is your project, log in to see it. If this is not your project you can visit the Projects site for cool project ideas or to start coding in a new project."},accessDeniedWithAuthModal:{embedded:{text:"Visit the Projects site for cool project ideas"},heading:"You can't access this project",newProject:"Create a new code project",projectsSiteLinkText:"Explore Projects site",text:"Visit the Projects site for cool project ideas or start coding in a new project."},loading:"Loading",notFoundModal:{embedded:{text:"Visit the Projects site for cool project ideas"},heading:"This project does not exist",newProject:"Start new code project",projectsSiteLinkText:"Explore Projects site",text:"You can start coding in a new project, or visit the Projects site for cool project ideas."},untitled:"Untitled project"},projectHeader:{subTitle:"Code Editor",title:"Your projects",text:"Select a project to continue coding, view, or edit it."},projectList:{delete:"Delete",deleteLabel:"Delete project",deleteProjectModal:{cancel:"Cancel",delete:"Delete",heading:"Delete project",text:"Are you sure you want to delete this project?"},empty:"No projects created yet",label:"Open project menu",loading:"Loading",loadingFailed:"Failed to load projects",newProject:"Create a new project",pagination:{first:"First page",last:"Last page",next:"Next page",previous:"Previous page",more:"Load more projects"},rename:"Rename",renameLabel:"Rename project",renameProjectModal:{cancel:"Do not save",heading:"Rename project",inputLabel:"Change the name of your project",save:"Save"},updated:"Edited",python_type:"Python",html_type:"HTML"},projectTypes:{html:"HTML/CSS",python:"Python"},runButton:{run:"Run",stop:"Stop",stopping:"Stopping..."},saveStatus:{saving:"Saving",saved:"Saved"},runners:{HtmlOutput:"HTML Output Preview"},sidebar:{collapse:"Collapse sidebar",download:"Download project",expand:"Expand sidebar",file:"Project files",images:"Image gallery",settings:"Settings",projects:"Projects",information:"Information",information_text:"Our Code Editor is a tool to help young people learn to code. We have only included functions that are simple and safe to use. That's why, for example, links to other websites are not allowed.",instructions:"Project steps",feedback:"Feedback",privacy:"Privacy",cookies:"Cookies",accessibility:"Accessibility",safeguarding:"Safeguarding",charity:"Raspberry Pi Foundation - UK registered charity 1129409",settingsMenu:{heading:"Settings",textSize:"Text size",theme:"Theme",textSizeOptions:{large:"Large",medium:"Medium",small:"Small"},themeOptions:{dark:"Dark",light:"Light"}}},webComponent:{loading:"Loading"}}}}});var Fh=vh;var zh=e=>{const{scaleFactor:t}=e,n=t||1;return o.a.createElement("svg",{transform:"scale(".concat(n,", ").concat(n,")"),width:"14",height:"14",viewBox:"0 0 14 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.a.createElement("path",{d:"M1.4 14L0 12.6L5.6 7L0 1.4L1.4 0L7 5.6L12.6 0L14 1.4L8.4 7L14 12.6L12.6 14L7 8.4L1.4 14Z"}))};const Uh={position:Yu.POSITION.BOTTOM_CENTER,autoClose:3e3,className:"toast--bottom-center__message",closeButton:!1,containerId:"bottom-center",hideProgressBar:!0},Qh={position:Yu.POSITION.TOP_CENTER,autoClose:6e3,className:"toast--top-center__message",closeButton:e=>{let{closeToast:t}=e;return o.a.createElement(xc,{ButtonIcon:zh,onClickHandler:t,title:Fh.t("notifications.close"),label:Fh.t("notifications.close")})},containerId:"top-center",hideProgressBar:!0};Math.pow(10,8);function qh(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}function Hh(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function Gh(e){Hh(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===Object(nd.a)(e)&&"[object Date]"===t?new Date(e.getTime()):"number"==typeof e||"[object Number]"===t?new Date(e):("string"!=typeof e&&"[object String]"!==t||"undefined"==typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function Vh(e){Hh(1,arguments);var t=Gh(e);return t.setHours(0,0,0,0),t}function Wh(e,t){Hh(2,arguments);var n=Vh(e),r=Vh(t),i=n.getTime()-qh(n),o=r.getTime()-qh(r);return Math.round((i-o)/864e5)}function Xh(e,t){Hh(2,arguments);var n=Gh(e),r=Gh(t),i=n.getFullYear()-r.getFullYear(),o=n.getMonth()-r.getMonth();return 12*i+o}function Yh(e){Hh(1,arguments);var t=Gh(e),n=Math.floor(t.getMonth()/3)+1;return n}function Zh(e,t){Hh(2,arguments);var n=Gh(e),r=Gh(t),i=n.getFullYear()-r.getFullYear(),o=Yh(n)-Yh(r);return 4*i+o}function Jh(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}var Kh={};function ep(){return Kh}function tp(e,t){var n,r,i,o,s,a,l,c;Hh(1,arguments);var u=ep(),d=Jh(null!==(n=null!==(r=null!==(i=null!==(o=null==t?void 0:t.weekStartsOn)&&void 0!==o?o:null==t||null===(s=t.locale)||void 0===s||null===(a=s.options)||void 0===a?void 0:a.weekStartsOn)&&void 0!==i?i:u.weekStartsOn)&&void 0!==r?r:null===(l=u.locale)||void 0===l||null===(c=l.options)||void 0===c?void 0:c.weekStartsOn)&&void 0!==n?n:0);if(!(d>=0&&d<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=Gh(e),p=h.getDay(),f=(p{let{isMobile:t=!1}=e;const{t:n}=Gi(),r=Qn(e=>e.editor.lastSavedTime),s=Qn(e=>e.editor.saving),[a,l]=Object(i.useState)(Date.now()),c=Qn(e=>e.editor.loading),u="pending"===s;return Object(i.useEffect)(()=>{l(Date.now());const e=setInterval(()=>{l(Date.now())},1e4);return()=>clearInterval(e)},[r]),r&&"success"===c&&o.a.createElement("div",{className:pi()("save-status",{"save-status--mobile":t})},u?o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"save-status__icon"},o.a.createElement(bp,null)),o.a.createElement("div",{className:"save-status__status"},n("saveStatus.saving"),"…")):o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"save-status__icon"},o.a.createElement(mp,null)),o.a.createElement("div",{className:"save-status__text"},n("saveStatus.saved")," ",function(e,t,n){Hh(2,arguments);var r,i=0,o=Gh(e),s=Gh(t);if(null!=n&&n.unit)"second"===(r=null==n?void 0:n.unit)?i=dp(o,s):"minute"===r?i=up(o,s):"hour"===r?i=cp(o,s):"day"===r?i=Wh(o,s):"week"===r?i=np(o,s):"month"===r?i=Xh(o,s):"quarter"===r?i=Zh(o,s):"year"===r&&(i=rp(o,s));else{var a=dp(o,s);Math.abs(a)<60?(i=dp(o,s),r="second"):Math.abs(a)<3600?(i=up(o,s),r="minute"):Math.abs(a)<86400&&Math.abs(Wh(o,s))<1?(i=cp(o,s),r="hour"):Math.abs(a)<604800&&(i=Wh(o,s))&&Math.abs(i)<7?r="day":Math.abs(a)<2629746?(i=np(o,s),r="week"):Math.abs(a)<7889238?(i=Xh(o,s),r="month"):Math.abs(a)<31556952&&Zh(o,s)<4?(i=Zh(o,s),r="quarter"):(i=rp(o,s),r="year")}var l=new Intl.RelativeTimeFormat(null==n?void 0:n.locale,{localeMatcher:null==n?void 0:n.localeMatcher,numeric:(null==n?void 0:n.numeric)||"auto",style:null==n?void 0:n.style});return l.format(i,r)}(r,a,{style:"narrow"}))))};function _p(){return(_p=Object.assign?Object.assign.bind():function(e){for(var t=1;t>";return new o("Invalid "+i+" `"+s+"` of type `"+function(e){if(!e.constructor||!e.constructor.name)return"<>";return e.constructor.name}(t[n])+"` supplied to `"+r+"`, expected instance of `"+a+"`.")}return null}))},node:s((function(e,t,n,r,i){return c(e[t])?null:new o("Invalid "+r+" `"+i+"` supplied to `"+n+"`, expected a ReactNode.")})),objectOf:function(e){return s((function(t,n,r,i,s){if("function"!=typeof e)return new o("Property `"+s+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var a=t[n],l=u(a);if("object"!==l)return new o("Invalid "+i+" `"+s+"` of type `"+l+"` supplied to `"+r+"`, expected an object.");for(var c in a)if(Gp(a,c)){var d=e(a,c,r,i,s+"."+c,Hp);if(d instanceof Error)return d}return null}))},oneOf:function(e){if(!Array.isArray(e))return Up(arguments.length>1?"Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).":"Invalid argument supplied to oneOf, expected an array."),Wp;function t(t,n,r,s,a){for(var l=t[n],c=0;c0?", expected one of type ["+a.join(", ")+"]":"")+".")}))},shape:function(e){return s((function(t,n,r,i,s){var a=t[n],c=u(a);if("object"!==c)return new o("Invalid "+i+" `"+s+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");for(var h in e){var p=e[h];if("function"!=typeof p)return l(r,i,s,h,d(p));var f=p(a,h,r,i,s+"."+h,Hp);if(f)return f}return null}))},exact:function(e){return s((function(t,n,r,i,s){var a=t[n],c=u(a);if("object"!==c)return new o("Invalid "+i+" `"+s+"` of type `"+c+"` supplied to `"+r+"`, expected `object`.");var h=qp({},t[n],e);for(var p in h){var f=e[p];if(Gp(e,p)&&"function"!=typeof f)return l(r,i,s,p,d(f));if(!f)return new o("Invalid "+i+" `"+s+"` key `"+p+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=f(a,p,r,i,s+"."+p,Hp);if(m)return m}return null}))}};function i(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function o(e,t){this.message=e,this.data=t&&"object"==typeof t?t:{},this.stack=""}function s(e){var n={},r=0;function i(i,s,a,l,c,u,d){if(l=l||"<>",u=u||a,d!==Hp){if(t){var h=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw h.name="Invariant Violation",h}if("undefined"!=typeof console){var p=l+":"+a;!n[p]&&r<3&&(Up("You are manually calling a React.PropTypes validation function for the `"+u+"` prop on `"+l+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),n[p]=!0,r++)}}return null==s[a]?i?null===s[a]?new o("The "+c+" `"+u+"` is marked as required in `"+l+"`, but its value is `null`."):new o("The "+c+" `"+u+"` is marked as required in `"+l+"`, but its value is `undefined`."):null:e(s,a,l,c,u)}var s=i.bind(null,!1);return s.isRequired=i.bind(null,!0),s}function a(e){return s((function(t,n,r,i,s,a){var l=t[n];return u(l)!==e?new o("Invalid "+i+" `"+s+"` of type `"+d(l)+"` supplied to `"+r+"`, expected `"+e+"`.",{expectedType:e}):null}))}function l(e,t,n,r,i){return new o((e||"React class")+": "+t+" type `"+n+"."+r+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+i+"`.")}function c(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(c);if(null===t||e(t))return!0;var r=function(e){var t=e&&(n&&e[n]||e["@@iterator"]);if("function"==typeof t)return t}(t);if(!r)return!1;var i,o=r.call(t);if(r!==t.entries){for(;!(i=o.next()).done;)if(!c(i.value))return!1}else for(;!(i=o.next()).done;){var s=i.value;if(s&&!c(s[1]))return!1}return!0;default:return!1}}function u(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":function(e,t){return"symbol"===e||!!t&&("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}(t,e)?"symbol":t}function d(e){if(null==e)return""+e;var t=u(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function h(e){var t=d(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}return o.prototype=Error.prototype,r.checkPropTypes=Vp,r.resetWarningCache=Vp.resetWarningCache,r.PropTypes=r,r}(Xp.isElement,!0);var Yp=Op(Tp.exports),Zp={exports:{}},Jp={exports:{}};!function(e,t){!function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),f=Symbol.for("react.offscreen"),m=Symbol.iterator;function g(e){if(null===e||"object"!=typeof e)return null;var t=m&&e[m]||e["@@iterator"];return"function"==typeof t?t:null}var b={current:null},v={transition:null},y={current:null,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1},_={current:null},S={},x=null;function w(e){x=e}S.setExtraStackFrame=function(e){x=e},S.getCurrentStack=null,S.getStackAddendum=function(){var e="";x&&(e+=x);var t=S.getCurrentStack;return t&&(e+=t()||""),e};var k={ReactCurrentDispatcher:b,ReactCurrentBatchConfig:v,ReactCurrentOwner:_};function O(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r1){for(var u=Array(c),d=0;d1){for(var h=Array(d),p=0;p import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?",r),"default"in r||E("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",r),r.default}throw e._result}function fe(e){return"string"==typeof e||"function"==typeof e||(e===i||e===s||e===o||e===u||e===d||e===f||"object"==typeof e&&null!==e&&(e.$$typeof===p||e.$$typeof===h||e.$$typeof===a||e.$$typeof===l||e.$$typeof===c||e.$$typeof===he||void 0!==e.getModuleId))}function me(){var e=b.current;return null===e&&E("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem."),e}he=Symbol.for("react.module.reference");var ge,be,ve,ye,_e,Se,xe,we=0;function ke(){}ke.__reactDisabledLog=!0;var Oe,Ee=k.ReactCurrentDispatcher;function Ae(e,t,n){if(void 0===Oe)try{throw Error()}catch(e){var r=e.stack.trim().match(/\n( *(at )?)/);Oe=r&&r[1]||""}return"\n"+Oe+e}var Te,Ce=!1,Me="function"==typeof WeakMap?WeakMap:Map;function Pe(e,t){if(!e||Ce)return"";var n,r=Te.get(e);if(void 0!==r)return r;Ce=!0;var i,o=Error.prepareStackTrace;Error.prepareStackTrace=void 0,i=Ee.current,Ee.current=null,function(){if(0===we){ge=console.log,be=console.info,ve=console.warn,ye=console.error,_e=console.group,Se=console.groupCollapsed,xe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ke,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}we++}();try{if(t){var s=function(){throw Error()};if(Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(s,[])}catch(e){n=e}Reflect.construct(e,[],s)}else{try{s.call()}catch(e){n=e}e.call(s.prototype)}}else{try{throw Error()}catch(e){n=e}e()}}catch(t){if(t&&n&&"string"==typeof t.stack){for(var a=t.stack.split("\n"),l=n.stack.split("\n"),c=a.length-1,u=l.length-1;c>=1&&u>=0&&a[c]!==l[u];)u--;for(;c>=1&&u>=0;c--,u--)if(a[c]!==l[u]){if(1!==c||1!==u)do{if(c--,--u<0||a[c]!==l[u]){var d="\n"+a[c].replace(" at new "," at ");return e.displayName&&d.includes("")&&(d=d.replace("",e.displayName)),"function"==typeof e&&Te.set(e,d),d}}while(c>=1&&u>=0);break}}}finally{Ce=!1,Ee.current=i,function(){if(0===--we){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:P({},e,{value:ge}),info:P({},e,{value:be}),warn:P({},e,{value:ve}),error:P({},e,{value:ye}),group:P({},e,{value:_e}),groupCollapsed:P({},e,{value:Se}),groupEnd:P({},e,{value:xe})})}we<0&&E("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=o}var h=e?e.displayName||e.name:"",p=h?Ae(h):"";return"function"==typeof e&&Te.set(e,p),p}function $e(e,t,n){if(null==e)return"";if("function"==typeof e)return Pe(e,function(e){var t=e.prototype;return!(!t||!t.isReactComponent)}(e));if("string"==typeof e)return Ae(e);switch(e){case u:return Ae("Suspense");case d:return Ae("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case c:return Pe(e.render,!1);case h:return $e(e.type,t,n);case p:var r=e,i=r._payload,o=r._init;try{return $e(o(i),t,n)}catch(e){}}return""}Te=new Me;var Re,Ie={},De=k.ReactDebugCurrentFrame;function Ne(e){if(e){var t=e._owner,n=$e(e.type,e._source,t?t.type:null);De.setExtraStackFrame(n)}else De.setExtraStackFrame(null)}function je(e){if(e){var t=e._owner;w($e(e.type,e._source,t?t.type:null))}else w(null)}function Le(){if(_.current){var e=H(_.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}function Be(e){return null!=e&&void 0!==(t=e.__source)?"\n\nCheck your code at "+t.fileName.replace(/^.*[\\\/]/,"")+":"+t.lineNumber+".":"";var t}Re=!1;var Fe={};function ze(e,t){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var t=Le();if(!t){var n="string"==typeof e?e:e.displayName||e.name;n&&(t="\n\nCheck the top-level render call using <"+n+">.")}return t}(t);if(!Fe[n]){Fe[n]=!0;var r="";e&&e._owner&&e._owner!==_.current&&(r=" It was passed a child from "+H(e._owner.type)+"."),je(e),E('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,r),je(null)}}}function Ue(e,t){if("object"==typeof e)if(z(e))for(var n=0;n",s=" Did you accidentally export a JSX literal instead of a component?"):a=typeof e,E("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",a,s)}var c=re.apply(this,arguments);if(null==c)return c;if(o)for(var u=2;u ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(void 0)}}We(t)}((function(){0===i.length?(y.current=null,n(t)):Je(t,n,r)}))}catch(e){r(e)}else n(t)}var Ke=!1;function et(e){if(!Ke){Ke=!0;var t=0;try{for(;t is not supported and will be removed in a future major release. Did you mean to render instead?")),t.Provider},set:function(e){t.Provider=e}},_currentValue:{get:function(){return t._currentValue},set:function(e){t._currentValue=e}},_currentValue2:{get:function(){return t._currentValue2},set:function(e){t._currentValue2=e}},_threadCount:{get:function(){return t._threadCount},set:function(e){t._threadCount=e}},Consumer:{get:function(){return n||(n=!0,E("Rendering is not supported and will be removed in a future major release. Did you mean to render instead?")),t.Consumer}},displayName:{get:function(){return t.displayName},set:function(e){i||(O("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.",e),i=!0)}}}),t.Consumer=o,t._currentRenderer=null,t._currentRenderer2=null,t},t.createElement=tt,t.createFactory=rt,t.createRef=function(){var e={current:null};return Object.seal(e),e},t.forwardRef=function(e){null!=e&&e.$$typeof===h?E("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):"function"!=typeof e?E("forwardRef requires a render function but was given %s.",null===e?"null":typeof e):0!==e.length&&2!==e.length&&E("forwardRef render functions accept exactly two parameters: props and ref. %s",1===e.length?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),null!=e&&(null==e.defaultProps&&null==e.propTypes||E("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?"));var t,n={$$typeof:c,render:e};return Object.defineProperty(n,"displayName",{enumerable:!1,configurable:!0,get:function(){return t},set:function(n){t=n,e.name||e.displayName||(e.displayName=n)}}),n},t.isValidElement=oe,t.lazy=function(e){var t,n,r={$$typeof:p,_payload:{_status:-1,_result:e},_init:pe};return Object.defineProperties(r,{defaultProps:{configurable:!0,get:function(){return t},set:function(e){E("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),t=e,Object.defineProperty(r,"defaultProps",{enumerable:!0})}},propTypes:{configurable:!0,get:function(){return n},set:function(e){E("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it."),n=e,Object.defineProperty(r,"propTypes",{enumerable:!0})}}}),r},t.memo=function(e,t){fe(e)||E("memo: The first argument must be a component. Instead received: %s",null===e?"null":typeof e);var n,r={$$typeof:h,type:e,compare:void 0===t?null:t};return Object.defineProperty(r,"displayName",{enumerable:!1,configurable:!0,get:function(){return n},set:function(t){n=t,e.name||e.displayName||(e.displayName=t)}}),r},t.startTransition=function(e,t){var n=v.transition;v.transition={};var r=v.transition;v.transition._updatedFibers=new Set;try{e()}finally{if(v.transition=n,null===n&&r._updatedFibers)r._updatedFibers.size>10&&O("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table."),r._updatedFibers.clear()}},t.unstable_act=function(e){var t=Xe;Xe++,null===y.current&&(y.current=[]);var n,r=y.isBatchingLegacy;try{if(y.isBatchingLegacy=!0,n=e(),!r&&y.didScheduleLegacyUpdate){var i=y.current;null!==i&&(y.didScheduleLegacyUpdate=!1,et(i))}}catch(e){throw Ze(t),e}finally{y.isBatchingLegacy=r}if(null!==n&&"object"==typeof n&&"function"==typeof n.then){var o=n,s=!1,a={then:function(e,n){s=!0,o.then((function(r){Ze(t),0===Xe?Je(r,e,n):e(r)}),(function(e){Ze(t),n(e)}))}};return Ye||"undefined"==typeof Promise||Promise.resolve().then((function(){})).then((function(){s||(Ye=!0,E("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))})),a}var l=n;if(Ze(t),0===Xe){var c=y.current;return null!==c&&(et(c),y.current=null),{then:function(e,t){null===y.current?(y.current=[],Je(l,e,t)):e(l)}}}return{then:function(e,t){e(l)}}},t.useCallback=function(e,t){return me().useCallback(e,t)},t.useContext=function(e){var t=me();if(void 0!==e._context){var n=e._context;n.Consumer===e?E("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?"):n.Provider===e&&E("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?")}return t.useContext(e)},t.useDebugValue=function(e,t){return me().useDebugValue(e,t)},t.useDeferredValue=function(e){return me().useDeferredValue(e)},t.useEffect=function(e,t){return me().useEffect(e,t)},t.useId=function(){return me().useId()},t.useImperativeHandle=function(e,t,n){return me().useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return me().useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return me().useLayoutEffect(e,t)},t.useMemo=function(e,t){return me().useMemo(e,t)},t.useReducer=function(e,t,n){return me().useReducer(e,t,n)},t.useRef=function(e){return me().useRef(e)},t.useState=function(e){return me().useState(e)},t.useSyncExternalStore=function(e,t,n){return me().useSyncExternalStore(e,t,n)},t.useTransition=function(){return me().useTransition()},t.version="18.2.0","undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()}(Jp,Jp.exports);var Kp=Jp.exports;Zp.exports=Kp;var ef=Op(Zp.exports);!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}(':root {\n --rpf-brand-black: hsla(60, 4%, 11%, 1);\n --rpf-brand-leaf: hsla(123, 43%, 48%, 1);\n --rpf-brand-raspberry: hsla(342, 71%, 47%, 1);\n}\n\n:root {\n --rpf-red-100: hsla(4, 89%, 96%, 1);\n --rpf-red-200: hsla(1, 87%, 91%, 1);\n --rpf-red-400: hsla(1, 87%, 82%, 1);\n --rpf-red-600: hsla(1, 87%, 72%, 1);\n --rpf-red-800: hsla(1, 87%, 63%, 1);\n --rpf-red-900: hsla(1, 52%, 50%, 1);\n --rpf-green-100: hsla(125, 41%, 95%, 1);\n --rpf-green-200: hsla(122, 39%, 87%, 1);\n --rpf-green-400: hsla(123, 40%, 74%, 1);\n --rpf-green-600: hsla(123, 40%, 61%, 1);\n --rpf-green-800: hsla(123, 43%, 48%, 1);\n --rpf-green-900: hsla(123, 43%, 36%, 1);\n --rpf-teal-100: hsla(176, 55%, 94%, 1);\n --rpf-teal-200: hsla(174, 55%, 85%, 1);\n --rpf-teal-400: hsla(174, 55%, 70%, 1);\n --rpf-teal-600: hsla(174, 56%, 56%, 1);\n --rpf-teal-800: hsla(174, 81%, 41%, 1);\n --rpf-teal-900: hsla(174, 81%, 29%, 1);\n --rpf-orange-100: hsla(31, 100%, 95%, 1);\n --rpf-orange-200: hsla(32, 100%, 88%, 1);\n --rpf-orange-400: hsla(31, 100%, 77%, 1);\n --rpf-orange-600: hsla(31, 99%, 65%, 1);\n --rpf-orange-800: hsla(31, 99%, 54%, 1);\n --rpf-orange-900: hsla(31, 85%, 37%, 1);\n --rpf-yellow-100: hsla(51, 100%, 95%, 1);\n --rpf-yellow-200: hsla(52, 100%, 87%, 1);\n --rpf-yellow-400: hsla(51, 100%, 75%, 1);\n --rpf-yellow-600: hsla(52, 100%, 63%, 1);\n --rpf-yellow-800: hsla(52, 100%, 50%, 1);\n --rpf-yellow-900: hsla(52, 100%, 26%, 1);\n --rpf-purple-100: hsla(282, 36%, 95%, 1);\n --rpf-purple-200: hsla(279, 38%, 87%, 1);\n --rpf-purple-400: hsla(279, 38%, 73%, 1);\n --rpf-purple-600: hsla(279, 37%, 60%, 1);\n --rpf-purple-800: hsla(279, 43%, 47%, 1);\n --rpf-purple-900: hsla(280, 43%, 37%, 1);\n --rpf-navy-100: hsla(235, 38%, 94%, 1);\n --rpf-navy-200: hsla(234, 38%, 84%, 1);\n --rpf-navy-400: hsla(235, 38%, 69%, 1);\n --rpf-navy-600: hsla(235, 38%, 53%, 1);\n --rpf-navy-800: hsla(235, 63%, 37%, 1);\n --rpf-navy-900: hsla(234, 63%, 30%, 1);\n --rpf-blue-100: hsla(203, 86%, 95%, 1);\n --rpf-blue-200: hsla(204, 88%, 87%, 1);\n --rpf-blue-400: hsla(204, 88%, 74%, 1);\n --rpf-blue-600: hsla(204, 89%, 60%, 1);\n --rpf-blue-800: hsla(204, 100%, 47%, 1);\n --rpf-blue-900: hsla(204, 100%, 38%, 1);\n}\n\n:root {\n --rpf-white: hsla(0, 0%, 100%, 1);\n --rpf-off-white: hsla(225, 25%, 97%, 1);\n --rpf-grey-50: hsla(210, 8%, 95%, 1);\n --rpf-grey-100: hsla(228, 10%, 90%, 1);\n --rpf-grey-150: hsla(223, 9%, 85%, 1);\n --rpf-grey-200: hsla(228, 10%, 80%, 1);\n --rpf-grey-300: hsla(229, 9%, 75%, 1);\n --rpf-grey-400: hsla(229, 8%, 61%, 1);\n --rpf-grey-500: hsla(229, 9%, 42%, 1);\n --rpf-grey-600: hsla(228, 9%, 32%, 1);\n --rpf-grey-700: hsla(228, 9%, 22%, 1);\n --rpf-grey-800: hsla(232, 9%, 18%, 1);\n --rpf-grey-850: hsla(228, 9%, 15%, 1);\n --rpf-grey-900: hsla(228, 9%, 10%, 1);\n --rpf-grey-950: hsla(228, 8%, 5%, 1);\n --rpf-black: hsla(0, 0%, 0%, 1);\n}\n\n:root {\n --font-size-0-5: 0.5rem;\n --font-size-0-75: 0.75rem;\n --font-size-1: 1rem;\n --font-size-1-5: 1.25rem;\n --font-size-2: 1.5rem;\n --font-size-3: 2rem;\n --font-size-4: 2.5rem;\n --font-size-5: 3rem;\n --font-size-6: 3.5rem;\n --font-size-7: 4rem;\n --font-size-8: 4.5rem;\n --font-size-9: 5rem;\n}\n\n:root {\n --font-weight-regular: 400;\n --font-weight-bold: 700;\n}\n\n:root {\n --border-radius: var(--space-1);\n --input-border-width: 2px;\n --alert-border-width: 2px;\n}\n\n:root {\n --space-0-125: 0.0625rem;\n --space-0-25: 0.125rem;\n --space-0-5: 0.25rem;\n --space-1: 0.5rem;\n --space-1-5: 0.75rem;\n --space-2: 1rem;\n --space-3: 1.5rem;\n --space-4: 2rem;\n --space-5: 2.5rem;\n --space-6: 3rem;\n --space-7: 3.5rem;\n --space-8: 4rem;\n --space-9: 4.5rem;\n --space-10: 5rem;\n}\n\n:root {\n --rpf-button-primary-background-color: var(--rpf-navy-800);\n --rpf-button-primary-background-color-hover: var(--rpf-navy-900);\n --rpf-button-primary-background-color-active: var(--rpf-navy-600);\n --rpf-button-primary-background-color-disabled: var(--rpf-grey-600);\n --rpf-button-primary-text-color: var(--rpf-white);\n --rpf-button-border-radius: var(--border-radius);\n --rpf-button-lg-height: 48px;\n --rpf-button-sm-height: 32px;\n /* 44px min-height to meet WCAG AAA target size requirements */\n --rpf-button-min-target-size: 44px;\n}\n\n.rpf-button {\n all: unset;\n align-items: center;\n color: var(--rpf-button-primary-text-color);\n /*\n * We\'ve decided to follow the masses on this and have a pointer on buttons.\n * Google, Facebook, Twitter, Mozilla, and Microsoft amongst many others have a pointer on buttons.\n */\n cursor: pointer;\n display: flex;\n font-size: var(--font-size-1-5);\n font-weight: var(--font-weight-bold);\n gap: var(--space-1);\n min-height: calc(var(--rpf-button-lg-height) - var(--space-1) - var(--space-1));\n padding: var(--space-1) var(--space-2);\n position: relative;\n text-align: center;\n text-decoration: none;\n /* Fixes a rendering error that sometimes occurs due to negative z-index */\n transform: scale(1);\n width: fit-content;\n /* A bit of a hack to allow for separate visual and target heights */\n}\n.rpf-button::before {\n background-color: var(--rpf-button-primary-background-color);\n border-color: var(--rpf-button-primary-background-color);\n border-radius: var(--rpf-button-border-radius);\n border-style: solid;\n border-width: 2px;\n content: "";\n display: block;\n inset: 0;\n position: absolute;\n /* To ensure it renders under its siblings */\n z-index: -1;\n}\n.rpf-button:hover::before {\n background-color: var(--rpf-button-primary-background-color-hover);\n border-color: var(--rpf-button-primary-background-color-hover);\n}\n.rpf-button:active::before {\n background-color: var(--rpf-button-primary-background-color-active);\n border-color: var(--rpf-button-primary-background-color-active);\n}\n.rpf-button:focus-visible::before {\n outline: 3px solid var(--rpf-brand-raspberry);\n}\n.rpf-button:disabled, .rpf-button--disabled {\n cursor: default;\n}\n.rpf-button:disabled:hover::before, .rpf-button:disabled::before, .rpf-button--disabled:hover::before, .rpf-button--disabled::before {\n border-color: var(--rpf-button-primary-background-color-disabled);\n background-color: var(--rpf-button-primary-background-color-disabled);\n}\n.rpf-button--secondary {\n color: var(--rpf-button-primary-background-color);\n}\n.rpf-button--secondary::before {\n background-color: var(--rpf-button-primary-text-color);\n}\n.rpf-button--secondary:hover {\n color: var(--rpf-button-primary-background-color-hover);\n}\n.rpf-button--secondary:hover::before {\n background-color: var(--rpf-button-primary-text-color);\n border-color: var(--rpf-button-primary-background-color-hover);\n}\n.rpf-button--secondary:active {\n color: var(--rpf-button-primary-background-color-active);\n}\n.rpf-button--secondary:active::before {\n background-color: var(--rpf-button-primary-text-color);\n border-color: var(--rpf-button-primary-background-color-active);\n}\n.rpf-button--secondary:disabled, .rpf-button--secondary.rpf-button--disabled {\n color: var(--rpf-button-primary-background-color-disabled);\n}\n.rpf-button--secondary:disabled:hover::before, .rpf-button--secondary:disabled:before, .rpf-button--secondary.rpf-button--disabled:hover::before, .rpf-button--secondary.rpf-button--disabled:before {\n background-color: var(--rpf-button-primary-text-color);\n border-color: var(--rpf-button-primary-background-color-disabled);\n}\n.rpf-button--tertiary {\n color: var(--rpf-button-primary-background-color);\n}\n.rpf-button--tertiary::before {\n background-color: transparent;\n border-color: transparent;\n}\n.rpf-button--tertiary:hover {\n color: var(--rpf-button-primary-background-color-hover);\n}\n.rpf-button--tertiary:hover::before {\n background-color: transparent;\n border-color: transparent;\n}\n.rpf-button--tertiary:active {\n color: var(--rpf-button-primary-background-color-active);\n}\n.rpf-button--tertiary:active::before {\n background-color: transparent;\n}\n.rpf-button--tertiary:disabled, .rpf-button--tertiary.rpf-button--disabled {\n color: var(--rpf-button-primary-background-color-disabled);\n}\n.rpf-button--tertiary:disabled:hover::before, .rpf-button--tertiary:disabled::before, .rpf-button--tertiary.rpf-button--disabled:hover::before, .rpf-button--tertiary.rpf-button--disabled::before {\n background-color: transparent;\n border-color: transparent;\n}\n.rpf-button--icon-only {\n height: var(--rpf-button-lg-height);\n line-height: var(--rpf-button-lg-height);\n padding: 0;\n text-align: center;\n width: var(--rpf-button-lg-height);\n}\n.rpf-button--icon-only .rpf-button__icon {\n margin: 0 auto;\n}\n.rpf-button--sm {\n font-size: var(--font-size-1);\n min-height: calc(var(--rpf-button-min-target-size) - var(--space-1) - var(--space-1));\n padding: var(--space-1) var(--space-1);\n /* To account for 32px visual height and 44px target height */\n}\n.rpf-button--sm::before {\n inset: calc((var(--rpf-button-min-target-size) - var(--rpf-button-sm-height)) / 2) 0;\n}\n.rpf-button--sm.rpf-button--icon-only {\n height: var(--rpf-button-min-target-size);\n line-height: var(--rpf-button-min-target-size);\n padding: 0;\n width: var(--rpf-button-min-target-size);\n}\n.rpf-button--sm.rpf-button--icon-only::before {\n inset: calc((var(--rpf-button-min-target-size) - var(--rpf-button-sm-height)) / 2);\n}\n.rpf-button--sm .material-symbols-sharp {\n font-size: 20px;\n font-variation-settings: "OPSZ" 20;\n}\n');const tf=({type:e="primary",className:t,enabled:n=!0,active:r,icon:i,small:o=!1,onClick:s=(()=>{}),href:a,text:l,title:c,"aria-label":u="",textOnHover:d=!1,textAlways:h=!1})=>{const p=i&&!h,f=Ap("rpf-button",{active:r,disabled:!n,"rpf-button--sm":o,"rpf-button--icon-only":p,text_on_hover:d,["rpf-button--"+e]:e},t),m=Ap("icon","rpf-button__icon",{icon_with_text:!d,icon_without_text:d,icon_only:!d&&!l}),g=ef.createElement(ef.Fragment,null,i&&ef.createElement("div",{className:m},i),l&&!p&&ef.createElement("span",{className:"text"},l));return a?ef.createElement("a",{className:f,"aria-label":u,href:a,onClick:s},g):ef.createElement("button",{className:f,title:c,"aria-label":u,onClick:s,disabled:!n},g)};tf.propTypes={type:Yp.string,className:Yp.string,enabled:Yp.bool,active:Yp.bool,icon:Yp.element,href:Yp.string,onClick:Yp.func,text:Yp.string,title:Yp.string,textAlways:Yp.bool,"aria-label":Yp.string,textOnHover:Yp.bool};n(374);var nf=e=>{let{className:t,fill:n=!1,...r}=e;return o.a.createElement(tf,Object.assign({className:pi()("btn",t,{"rpf-button--fill":n,"rpf-button--fit":!n})},r))};n(375);var rf=e=>{let{className:t=null,showLabel:n=!1,editable:r=!0}=e;const s=Qn(e=>e.editor.project,In),a=Bn(),{t:l}=Gi(),c=Object(i.useRef)(),u=Object(i.useRef)(),[d,h]=Object(i.useState)(!1),[p,f]=Object(i.useState)(s.name||l("projectName.newProject"));Object(i.useEffect)(()=>{f(s.name)},[s.name]);const m=e=>{e.stopPropagation(),e.preventDefault(),h(!1),a(Lr(c.current.value))},g=Object(i.useCallback)(e=>{e.preventDefault(),h(!1),f(s.name)},[s.name]);return Object(i.useEffect)(()=>{d&&c.current.focus()}),Object(i.useEffect)(()=>{const e=e=>{d&&c.current&&!c.current.contains(e.target)&&u.current&&!u.current.contains(e.target)&&g(e)};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[d,c,u,s,g]),o.a.createElement(o.a.Fragment,null,n&&o.a.createElement("label",{htmlFor:"project_name",className:"project-name__label"},l("projectName.label")),o.a.createElement("div",{className:pi()("project-name",t)},o.a.createElement("h1",{style:{height:0,width:0,overflow:"hidden"}},s.name||l("header.newProject")),r?o.a.createElement("input",{className:"project-name__input",id:"project_name",ref:c,type:"text",onFocus:()=>{c.current.select()},onScroll:()=>{d||(c.current.scrollLeft=0)},onKeyDown:e=>{"Enter"===e.key?m(e):"Escape"===e.key&&g(e)},value:p,disabled:!d,onChange:()=>{f(c.current.value)}}):o.a.createElement("div",{className:"project-name__title"},p),r&&o.a.createElement("div",{ref:u},o.a.createElement(nf,{className:"project-name__button","aria-label":l(d?"header.renameSave":"header.renameProject"),title:l(d?"header.renameSave":"header.renameProject"),icon:d?o.a.createElement(td,null):o.a.createElement(kp,null),onClick:d?m:()=>{h(!0)},type:d?"primary":"tertiary"}))))},of=n(180),sf=n.n(of),af=n(181),lf=n(182),cf=n.n(lf),uf=n(183),df=n.n(uf);var hf=e=>{const{buttonText:t,className:n,Icon:r,type:i="secondary",...s}=e,{t:a}=Gi(),l=Qn(e=>e.editor.project),c=Qn(e=>e.editor.loginToSaveModalShowing),u=Bn();return o.a.createElement(nf,Object.assign({className:n,onClick:async()=>{window.plausible&&window.plausible("Download"),c&&u(Gr());const e=new cf.a;l.components.forEach(t=>{e.file("".concat(t.name,".").concat(t.extension),t.content)}),l.image_list.forEach(t=>{var n;e.file(t.filename,(n=t.url,new Promise((function(e,t){df.a.getBinaryContent(n,(function(n,r){n?t(n):e(r)}))}))),{binary:!0})});const t=await e.generateAsync({type:"blob"});sf.a.saveAs(t,"".concat(Object(af.toSnakeCase)(l.name||a("header.downloadFileNameDefault",{project_type:l.project_type}))))},text:t,textAlways:!0,icon:r?o.a.createElement(r,null):null,type:i},s))};const pf=(e,t)=>new CustomEvent(e,{bubbles:!0,cancelable:!1,composed:!0,detail:t}),ff=pf("editor-codeChanged"),mf=pf("editor-runStarted"),gf=pf("editor-logIn"),bf=pf("editor-signUp"),vf=pf("editor-quizReady"),yf=(e,t)=>e&&e.profile&&(e.profile.user===t.user_id||!t.identifier);var _f;function Sf(){return(Sf=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{className:t,type:n,fill:r=!1}=e;const s=Bn(),{t:a}=Gi(),[l,c]=Object(i.useState)(n),u=Qn(e=>e.editor.loading),d=Qn(e=>e.editor.webComponent),h=Qn(e=>e.auth.user),p=Qn(e=>e.editor.project);Object(i.useEffect)(()=>{n||c(d?"primary":"secondary")},[d,n]);const f=Object(i.useCallback)(async()=>{window.plausible&&window.plausible("Save button"),document.dispatchEvent(gf),s(Ir())},[s]),m=yf(h,p);return"success"===u&&!m&&l&&o.a.createElement(nf,{className:pi()(t,{"btn--primary":"primary"===l,"btn--secondary":"secondary"===l,"btn--tertiary":"tertiary"===l}),onClick:f,text:a(h?"header.save":"header.loginToSave"),textAlways:!0,icon:o.a.createElement(xf,null),type:l,fill:r})};n(392);var kf,Of=e=>{let{nameEditable:t=!0}=e;const{t:n}=Gi(),r=Qn(e=>e.editor.project),i=Qn(e=>e.auth.user),s=Qn(e=>e.editor.loading),a=Qn(e=>e.editor.saving),l=Qn(e=>e.editor.lastSavedTime),c=yf(i,r);return"success"===s&&o.a.createElement("div",{className:"project-bar"},"success"===s&&o.a.createElement(rf,{editable:t}),o.a.createElement("div",{className:"project-bar__right"},"success"===s&&o.a.createElement("div",{className:"project-bar__btn-wrapper"},o.a.createElement(hf,{buttonText:n("header.download"),className:"btn btn--tertiary project-bar__btn",Icon:xp,type:"tertiary"})),"success"===s&&!c&&o.a.createElement("div",{className:"project-bar__btn-wrapper"},o.a.createElement(wf,{className:"project-bar__btn btn--save"})),l&&i&&o.a.createElement(yp,{saving:a,lastSavedTime:l})))};function Ef(){return(Ef=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[n]=e[n]);return i}var Mf=n(21),Pf=s.unstable_batchedUpdates||function(e){return e()},$f=(Object.values,function(e,t,n){return void 0===n&&(n=1e-4),Math.abs(e-t)0&&(t=l(e-=n))<0&&(e-=t)}return e},confineVertically:function(e){var t=u(e);if(t<0)e-=t;else{var n=d(e);n>0&&(t=u(e-=n))<0&&(e-=t)}return e}}},em=function(e){var t,n,r,i=e.anchorRect,o=e.containerRect,s=e.menuRect,a=e.placeLeftorRightY,l=e.placeLeftX,c=e.placeRightX,u=e.getLeftOverflow,d=e.getRightOverflow,h=e.confineHorizontally,p=e.confineVertically,f=e.arrowRef,m=e.arrow,g=e.direction,b=e.position,v=g,y=a;return"initial"!==b&&(y=p(y),"anchor"===b&&(y=Math.min(y,i.bottom-o.top),y=Math.max(y,i.top-o.top-s.height))),"left"===v?(t=l,"initial"!==b&&(n=u(t))<0&&((r=d(c))<=0||-n>r)&&(t=c,v="right")):(t=c,"initial"!==b&&(r=d(t))>0&&((n=u(l))>=0||-nr)&&(t=c,v="bottom")):(t=c,"initial"!==b&&(r=d(t))>0&&((n=u(l))>=0||-n-1&&(r.splice(i,1),e.contains(document.activeElement)&&(t.current.focus(),o()))}else s.items=[];s.hoverIndex=-1,s.sorted=!1}),[s,t]);return{hoverItem:r,dispatch:Object(i.useCallback)((function(t,n,r){var i=s.items,a=s.hoverIndex,l=function(){if(!s.sorted){var t=e.current.querySelectorAll(".szh-menu__item");i.sort((function(e,n){return Lf(t,e)-Lf(t,n)})),s.sorted=!0}},c=-1,u=void 0;switch(t){case Vf.RESET:break;case Vf.SET:u=n;break;case Vf.UNSET:u=function(e){return e===n?void 0:e};break;case Vf.FIRST:l(),u=i[c=0];break;case Vf.LAST:l(),c=i.length-1,u=i[c];break;case Vf.SET_INDEX:l(),u=i[c=r];break;case Vf.INCREASE:l(),(c=a)<0&&(c=i.indexOf(n)),++c>=i.length&&(c=0),u=i[c];break;case Vf.DECREASE:l(),(c=a)<0&&(c=i.indexOf(n)),--c<0&&(c=i.length-1),u=i[c];break;default:0}u||(c=-1),o(u),s.hoverIndex=c}),[e,s]),updateItems:a}}(me,ge),xe=Se.hoverItem,we=Se.dispatch,ke=Se.updateItems,Oe=function(e){return!!e&&"o"===e[0]}(T),Ee=Rf(ne,"open"),Ae=Rf(ne,"close"),Te=ae.current,Ce=Object(i.useCallback)((function(e){var t,n=c?null==(t=c.current)?void 0:t.getBoundingClientRect():l?{left:l.x,right:l.x,top:l.y,bottom:l.y,width:0,height:0}:null;if(n){Te.menu||(Te.menu=(re?re.current:Nf(oe.current))||window);var r=Kf(u,me,Te.menu,ie),i=function(e){var t=e.arrow,n=e.align,r=e.direction,i=e.offsetX,o=e.offsetY,s=e.position,a=e.anchorRect,l=e.arrowRef,c=e.positionHelpers,u=c.menuRect,d=c.containerRect,h=i,p=o;t&&("left"===r||"right"===r?h+=l.current.offsetWidth:p+=l.current.offsetHeight);var f,m,g=a.left-d.left-u.width-h,b=a.right-d.left+h,v=a.top-d.top-u.height-p,y=a.bottom-d.top+p;"end"===n?(f=a.right-d.left-u.width,m=a.bottom-d.top-u.height):"center"===n?(f=a.left-d.left-(u.width-a.width)/2,m=a.top-d.top-(u.height-a.height)/2):(f=a.left-d.left,m=a.top-d.top);var _=Tf({},c,{anchorRect:a,placeLeftX:g,placeRightX:b,placeLeftorRightY:m+=p,placeTopY:v,placeBottomY:y,placeToporBottomX:f+=h,arrowRef:l,arrow:t,direction:r,position:s});switch(r){case"left":case"right":return em(_);case"top":case"bottom":default:return tm(_)}}({arrow:m,align:b,direction:y,offsetX:R,offsetY:D,position:S,anchorRect:n,arrowRef:be,positionHelpers:r}),o=i.arrowX,s=i.arrowY,a=i.x,d=i.y,h=i.computedDirection,p=r.menuRect,f=p.height;if(!e&&"visible"!==w){var g,v,_=r.getTopOverflow,x=r.getBottomOverflow,k=ye.current.height,O=x(d);if(O>0||$f(O,0)&&$f(f,k))g=f-O,v=O;else{var E=_(d);(E<0||$f(E,0)&&$f(f,k))&&(v=0-E,(g=f+E)>=0&&(d-=E))}g>=0?(f=g,V({height:g,overflowAmt:v})):V()}m&&q({x:o,y:s}),z({x:a,y:d}),Y(h),ye.current={width:p.width,height:f}}}),[m,b,ie,y,R,D,S,w,l,c,u,re,oe,Te]);nm((function(){Oe&&(Ce(),ve.current&&ee()),ve.current=Oe,_e.current=Ce}),[Oe,Ce,fe]),nm((function(){G&&!k&&(me.current.scrollTop=0)}),[G,k]),nm((function(){return ke}),[ke]),Object(i.useEffect)((function(){var e=Te.menu;if(Oe&&e){if(e=e.addEventListener?e:window,!Te.anchors){Te.anchors=[];for(var t=Nf(se&&se.current);t&&t!==e;)Te.anchors.push(t),t=Nf(t)}var n=ce;if(Te.anchors.length&&"initial"===n&&(n="auto"),"initial"!==n){var r=function(){"auto"===n?Pf((function(){return Ce(!0)})):If(j,{reason:Wf.SCROLL})},i=Te.anchors.concat("initial"!==ce?e:[]);return i.forEach((function(e){return e.addEventListener("scroll",r)})),function(){return i.forEach((function(e){return e.removeEventListener("scroll",r)}))}}}}),[se,Te,Oe,j,ce,Ce]);var Me=!!G&&G.overflowAmt>0;Object(i.useEffect)((function(){if(!Me&&Oe&&f){var e=function(){return Pf(Ce)},t=f.current;return t.addEventListener("scroll",e),function(){return t.removeEventListener("scroll",e)}}}),[Oe,Me,f,Ce]),Object(i.useEffect)((function(){if("function"==typeof ResizeObserver&&"initial"!==le){var e=new ResizeObserver((function(e){var t,n,r=e[0],i=r.borderBoxSize,o=r.target;if(i){var a=i[0]||i;t=a.inlineSize,n=a.blockSize}else{var l=o.getBoundingClientRect();t=l.width,n=l.height}0!==t&&0!==n&&($f(t,ye.current.width,1)&&$f(n,ye.current.height,1)||Object(s.flushSync)((function(){_e.current(),ee()})))})),t=me.current;return e.observe(t,{box:"border-box"}),function(){return e.unobserve(t)}}}),[le]),Object(i.useEffect)((function(){if(!Oe)return we(Vf.RESET),void(Ae||V());var e=P||{},t=e.position,n=e.alwaysUpdate,r=function(){t===Xf.FIRST?we(Vf.FIRST):t===Xf.LAST?we(Vf.LAST):t>=-1&&we(Vf.SET_INDEX,void 0,t)};if(n)r();else if(A){var i=setTimeout((function(){me.current.contains(document.activeElement)||(ge.current.focus(),r())}),Ee?170:100);return function(){return clearTimeout(i)}}}),[Oe,Ee,Ae,A,P,we]);var Pe,$e,Re=Object(i.useMemo)((function(){return{isParentOpen:Oe,submenuCtx:Z,dispatch:we,updateItems:ke}}),[Oe,Z,we,ke]);G&&(k?$e=G.overflowAmt:Pe=G.height);var Ie=Object(i.useMemo)((function(){return{reposSubmenu:K,submenuCtx:Z,overflow:w,overflowAmt:$e,parentMenuRef:me,parentDir:X}}),[K,Z,w,$e,X]),De=Pe>=0?{maxHeight:Pe,overflow:w}:void 0,Ne=Object(i.useMemo)((function(){return{state:T,dir:X}}),[T,X]),je=Object(i.useMemo)((function(){return{dir:X}}),[X]),Le=Bf({block:"szh-menu",element:"arrow",modifiers:je,className:o}),Be=Object(Mf.jsxs)("ul",Tf({role:"menu","aria-label":t},jf(M),Df({onPointerEnter:null==he?void 0:he.off,onPointerMove:function(e){e.stopPropagation(),Z.on(ue,(function(){we(Vf.RESET),ge.current.focus()}))},onPointerLeave:function(e){e.target===e.currentTarget&&Z.off()},onKeyDown:function(e){switch(e.key){case Gf.HOME:we(Vf.FIRST);break;case Gf.END:we(Vf.LAST);break;case Gf.UP:we(Vf.DECREASE,xe);break;case Gf.DOWN:we(Vf.INCREASE,xe);break;case Gf.SPACE:return void(e.target&&-1!==e.target.className.indexOf("szh-menu")&&e.preventDefault());default:return}e.preventDefault(),e.stopPropagation()},onAnimationEnd:function(){"closing"===T&&V(),If(C)}},L),{ref:im(p,me),className:Bf({block:"szh-menu",modifiers:Ne,className:n}),style:Tf({},r,De,{margin:0,display:"closed"===T?"none":void 0,position:"absolute",left:F.x,top:F.y}),children:[Object(Mf.jsx)("li",Tf({tabIndex:-1,style:{position:"absolute",left:0,top:0,display:"block",outline:"none"},ref:ge},Yf,h)),m&&Object(Mf.jsx)("li",Tf({className:Le,style:Tf({display:"block",position:"absolute",left:Q.x,top:Q.y},a),ref:be},Yf)),Object(Mf.jsx)(Uf.Provider,{value:Ie,children:Object(Mf.jsx)(zf.Provider,{value:Re,children:Object(Mf.jsx)(Ff.Provider,{value:xe,children:If(N,Ne)})})})]}));return d?Object(Mf.jsx)(Zf,Tf({},d,{isOpen:Oe,children:Be})):Be},am=["aria-label","className","containerProps","initialMounted","unmountOnClose","transition","transitionTimeout","boundingBoxRef","boundingBoxPadding","reposition","submenuOpenDelay","submenuCloseDelay","skipOpen","viewScroll","portal","theming","onItemClick"],lm=Object(i.forwardRef)((function(e,t){var n=e["aria-label"],r=e.className,o=e.containerProps,a=e.initialMounted,l=e.unmountOnClose,c=e.transition,u=e.transitionTimeout,d=e.boundingBoxRef,h=e.boundingBoxPadding,p=e.reposition,f=void 0===p?"auto":p,m=e.submenuOpenDelay,g=void 0===m?300:m,b=e.submenuCloseDelay,v=void 0===b?150:b,y=e.skipOpen,_=e.viewScroll,S=void 0===_?"initial":_,x=e.portal,w=e.theming,k=e.onItemClick,O=Cf(e,am),E=Object(i.useRef)(null),A=Object(i.useRef)({}),T=O.anchorRef,C=O.state,M=O.onClose,P=Object(i.useMemo)((function(){return{initialMounted:a,unmountOnClose:l,transition:c,transitionTimeout:u,boundingBoxRef:d,boundingBoxPadding:h,rootMenuRef:E,rootAnchorRef:T,scrollNodesRef:A,reposition:f,viewScroll:S,submenuOpenDelay:g,submenuCloseDelay:v}}),[a,l,c,u,T,d,h,f,S,g,v]),$=Object(i.useMemo)((function(){return{handleClick:function(e,t){e.stopPropagation||If(k,e);var n=e.keepOpen;void 0===n&&(n=t&&e.key===Gf.SPACE),n||If(M,{value:e.value,key:e.key,reason:Wf.CLICK})},handleClose:function(e){If(M,{key:e,reason:Wf.CLICK})}}}),[k,M]);if(!C)return null;var R=Object(Mf.jsx)(Hf.Provider,{value:P,children:Object(Mf.jsx)(Qf.Provider,{value:$,children:Object(Mf.jsx)(sm,Tf({},O,{ariaLabel:n||"Menu",externalRef:t,containerRef:E,containerProps:{className:r,containerRef:E,containerProps:o,skipOpen:y,theming:w,transition:c,onClose:M}}))})});return!0===x&&"undefined"!=typeof document?Object(s.createPortal)(R,document.body):x?x.target?Object(s.createPortal)(R,x.target):x.stablePosition?null:R:R})),cm=function(e,t,n,r){var o=Object(i.useContext)(Hf).submenuCloseDelay,s=Object(i.useContext)(zf),a=s.isParentOpen,l=s.submenuCtx,c=s.dispatch,u=s.updateItems,d=function(){!n&&!r&&c(Vf.SET,e.current)},h=function(){!r&&c(Vf.UNSET,e.current)};return function(e,t,n){nm((function(){if(!e){var r=t.current;return n(r,!0),function(){n(r)}}}),[e,t,n])}(r,e,u),Object(i.useEffect)((function(){n&&a&&t.current&&t.current.focus()}),[t,n,a]),{setHover:d,onBlur:function(e){n&&!e.currentTarget.contains(e.relatedTarget)&&h()},onPointerMove:function(e){r||(e.stopPropagation(),l.on(o,d,d))},onPointerLeave:function(e,t){l.off(),!t&&h()}}},um=["className","value","href","type","checked","disabled","children","onClick","isHovering","itemRef","externalRef"],dm=["setHover"],hm=function(e,t){var n=Object(i.memo)(t),r=Object(i.forwardRef)((function(e,t){var r=Object(i.useRef)(null);return Object(Mf.jsx)(n,Tf({},e,{itemRef:r,externalRef:t,isHovering:Object(i.useContext)(Ff)===r.current}))}));return r.displayName="WithHovering("+e+")",r}("MenuItem",(function(e){var t=e.className,n=e.value,r=e.href,o=e.type,s=e.checked,a=e.disabled,l=e.children,c=e.onClick,u=e.isHovering,d=e.itemRef,h=e.externalRef,p=Cf(e,um),f=!!a,m=cm(d,d,u,f),g=m.setHover,b=Cf(m,dm),v=Object(i.useContext)(Qf),y=Object(i.useContext)(qf),_="radio"===o,S="checkbox"===o,x=!(!r||f||_||S),w=_?y.value===n:!!S&&!!s,k=function(e){if(f)return e.stopPropagation(),void e.preventDefault();var t={value:n,syntheticEvent:e};void 0!==e.key&&(t.key=e.key),S&&(t.checked=!w),_&&(t.name=y.name),If(c,t),_&&If(y.onRadioChange,t),v.handleClick(t,S||_)},O=Object(i.useMemo)((function(){return{type:o,disabled:f,hover:u,checked:w,anchor:x}}),[o,f,u,w,x]),E=Df(Tf({},b,{onPointerDown:g,onKeyDown:function(e){if(u)switch(e.key){case Gf.ENTER:case Gf.SPACE:x?e.key===Gf.SPACE&&d.current.click():k(e)}},onClick:k}),p),A=Tf({role:_?"menuitemradio":S?"menuitemcheckbox":"menuitem","aria-checked":_||S?w:void 0},jf(f,u),E,{ref:im(h,d),className:Bf({block:"szh-menu",element:"item",modifiers:O,className:t}),children:Object(i.useMemo)((function(){return If(l,O)}),[l,O])});return x?Object(Mf.jsx)("li",{role:"presentation",children:Object(Mf.jsx)("a",Tf({href:r},A))}):Object(Mf.jsx)("li",Tf({},A))}));n(393);var pm=e=>{const{align:t,direction:n,menuButtonLabel:r,menuButtonClassName:s,MenuButtonIcon:a,menuOptions:l,offsetX:c,offsetY:u}=e,d=Object(i.useContext)(Mo),h=Object(i.useRef)(null),p=Object(i.useRef)(),[f,m]=Object(i.useState)(!1),g=e=>{if(m(e),e){const e=p.current.firstChild;e.setAttribute("role","menuitem"),e.setAttribute("aria-hidden","true")}else h.current.focus()},b=document.querySelector("editor-wc");return o.a.createElement(o.a.Fragment,null,o.a.createElement("button",{"aria-haspopup":"menu","aria-label":r,className:"btn context-menu__drop".concat(s?" ".concat(s):""),title:r,type:"button",ref:h,onClick:()=>g(!0)},o.a.createElement(a,null)),o.a.createElement(lm,{transition:!0,align:t,direction:n,menuStyle:{padding:"5px"},offsetX:c,offsetY:u,position:"anchor",viewScroll:"initial",portal:{target:b?b.shadowRoot.querySelector("#wc"):document.querySelector("#app")},menuClassName:"context-menu context-menu--".concat(d.theme),menuItemFocus:{position:"first"},state:f?"open":"closed",anchorRef:h,ref:p,onClose:()=>g(!1)},l.map((e,t)=>o.a.createElement(hm,{key:t,className:"btn context-menu__item",onClick:e.action},o.a.createElement(e.icon,null)," ",e.text))))};var fm,mm=e=>{const t=Bn(),{t:n}=Gi();return o.a.createElement("div",{onClick:e=>e.stopPropagation()},o.a.createElement(pm,{align:"start",direction:"right",menuButtonLabel:n("filePanel.fileMenu.label"),MenuButtonIcon:Af,menuOptions:[{icon:kp,text:n("filePanel.fileMenu.renameItem"),action:()=>{t(Yr(e))}}],offsetX:16,offsetY:-8}))};function gm(){return(gm=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{t:e}=Gi(),t=Bn();return o.a.createElement(nf,{text:e("filePanel.newFileButton"),textAlways:!0,icon:o.a.createElement(bm,null),onClick:()=>{t(Wr())},className:"btn--primary",fill:!0})},_m=(n(395),n(161),vm=function(e,t){return(vm=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])})(e,t)},function(e,t){function n(){this.constructor=e}vm(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),Sm=function(){return(Sm=Object.assign||function(e){for(var t,n=1,r=arguments.length;no.a.createElement("svg",{"data-testid":"verticalHandle",width:"44",height:"56",viewBox:"0 0 44 56",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.a.createElement("rect",{x:"20",width:"4",height:"56",rx:"2",fill:"#616575"})),Fm=()=>o.a.createElement("svg",{"data-testid":"horizontalHandle",width:"56",height:"44",viewBox:"0 0 56 44",fill:"none",xmlns:"http://www.w3.org/2000/svg"},o.a.createElement("rect",{x:"56",y:"20",width:"4",height:"56",rx:"2",transform:"rotate(90 56 20)",fill:"#616575"}));var zm=e=>{const{children:t,defaultWidth:n,defaultHeight:r,handleDirection:s,...a}=e,[l,c]=Object(i.useState)("auto"),[u,d]=Object(i.useState)("auto");Object(i.useMemo)(()=>c(n),[n]),Object(i.useMemo)(()=>d(r),[r]);let h=["right","left"].includes(s)?{[s]:o.a.createElement(Bm,null)}:["top","bottom"].includes(s)?{[s]:o.a.createElement(Fm,null)}:{},p="resizable-with-handle__handle resizable-with-handle__handle--".concat(s);return o.a.createElement(Lm,Object.assign({enable:{top:!1,right:!1,bottom:!1,left:!1,[s]:!0},handleComponent:h,handleWrapperClass:p,onResizeStop:function(){for(var e=arguments.length,t=new Array(e),n=0;n{const{children:t,heading:n,Footer:r,className:i,Button:s,defaultWidth:a="225px"}=e,l=Object(ui.useMediaQuery)({query:Co}),c=o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"sidebar__panel-header"},o.a.createElement("h2",{className:"sidebar__panel-heading"},n),s?o.a.createElement(s,null):null),o.a.createElement("div",{className:"sidebar__panel-content"},t),r&&o.a.createElement("div",{className:"sidebar__panel-footer"},o.a.createElement(r,null)));return l?o.a.createElement("div",{"data-testid":"sidebar__panel",className:pi()("sidebar__panel",i,r&&"sidebar__panel--with-footer")},c):o.a.createElement(zm,{"data-testid":"sidebar__panel",className:pi()("sidebar__panel",i,r&&"sidebar__panel--with-footer"),defaultWidth:a,defaultHeight:"100%",handleDirection:"right",minWidth:"180px",maxWidth:"600px"},c)};function qm(){return(qm=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{ext:t}=e;switch(t){case"py":return o.a.createElement(Xm,{"data-testid":"pythonIcon"});case"html":return o.a.createElement(Jm,{"data-testid":"htmlIcon"});case"css":return o.a.createElement(tg,{"data-testid":"cssIcon"});case"csv":return o.a.createElement(rg,{"data-testid":"csvIcon"});default:return o.a.createElement(Gm,{"data-testid":"defaultFileIcon"})}};var og=e=>{let{isMobile:t}=e;const n=Qn(e=>e.editor.project),r=Qn(e=>e.editor.openFiles),i=Bn(),s=(e,t)=>{i(gr({panelIndex:e,fileIndex:t}))},{t:a}=Gi();return o.a.createElement(Qm,{heading:a("filePanel.files"),Button:ym},n.components.map((e,n)=>o.a.createElement("div",{className:"files-list-item-wrapper",key:n},o.a.createElement(nf,{className:"files-list-item",onClick:()=>(e=>{if(r.flat().includes(e)){const t=r.map(t=>t.includes(e)).indexOf(!0),n=r[t].indexOf(e);s(t,n)}else i(pr(e)),s(0,r[0].length);t&&i(si())})("".concat(e.name,".").concat(e.extension)),text:"".concat(e.name,".").concat(e.extension),icon:o.a.createElement(ig,{ext:e.extension}),type:"tertiary",textAlways:!0,small:!0}),"main"===e.name&&"py"===e.extension||"index"===e.name&&"html"===e.extension?null:o.a.createElement("div",{className:"files-list-item__menu"},o.a.createElement(mm,{fileKey:n,name:e.name,ext:e.extension})))))};n(397);var sg,ag=()=>{const{t:e}=Gi(),t=[{id:"feedback",text:e("sidebar.feedback"),href:"https://form.raspberrypi.org/f/code-editor-feedback"},{id:"privacy",text:e("sidebar.privacy"),href:"https://www.raspberrypi.org/privacy/child-friendly/"},{id:"cookies",text:e("sidebar.cookies"),href:"https://www.raspberrypi.org/cookies/"},{id:"accessibility",text:e("sidebar.accessibility"),href:"https://www.raspberrypi.org/accessibility/"},{id:"safeguarding",text:e("sidebar.safeguarding"),href:"https://www.raspberrypi.org/safeguarding/"}];return o.a.createElement(Qm,{heading:e("infoPanel.info")},o.a.createElement("div",{className:"info-panel"},o.a.createElement("p",null,e("sidebar.information_text"))),o.a.createElement("div",{className:"info-panel info-panel__links"},t.map((e,t)=>o.a.createElement("a",{key:t,className:"info-panel__link",href:e.href,target:"_blank",rel:"noreferrer"},e.text)),o.a.createElement("p",null,e("sidebar.charity"))))};function lg(){return(lg=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const{Icon:t,isActive:n,name:r,title:i,toggleOption:s}=e;return o.a.createElement("div",{className:pi()("sidebar__bar-option-wrapper",{"sidebar__bar-option-wrapper--selected":n})},o.a.createElement(xc,{className:pi()("sidebar__bar-option",{"sidebar__bar-option--selected":n}),ButtonIcon:t,title:i,onClickHandler:()=>{s(r),"file"===r&&window.plausible&&window.plausible("Side menu open project files")}}))};var fg=e=>{const{menuOptions:t,option:n,toggleOption:r,instructions:i=!1}=e,s=Qn(e=>e.editor.project),{t:a}=Gi(),l=t.filter(e=>"top"===e.position),c=t.filter(e=>"bottom"===e.position),u=Object(ui.useMediaQuery)({query:Co});return o.a.createElement("div",{className:pi()("sidebar__bar",{"sidebar__bar--selected":n})},o.a.createElement("div",{className:"sidebar__bar-options--top"},o.a.createElement("img",{className:"editor-logo",src:"python"===s.project_type?"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjQwIiBoZWlnaHQ9IjQwIiByeD0iNCIgZmlsbD0iIzEwMUIyOSIvPgo8cGF0aCBkPSJNMTkuNTAwMSAxOS4zNzVIMTcuMDAwMUMxNS4yNTAxIDE5LjM3NSAxNC4xMjUxIDIwLjUgMTQuMTI1MSAyMi4yNVYyNC41QzE0LjEyNTEgMjQuNzUgMTQuMDAwMSAyNC44NzUgMTMuNzUwMSAyNC44NzVIMTIuNjI1MUMxMS41MDAxIDI0Ljg3NSAxMC42MjUxIDI0LjM3NSAxMC4xMjUxIDIzLjM3NUM5Ljc1MDExIDIyLjYyNSA5LjUwMDExIDIxLjg3NSA5LjUwMDExIDIxLjEyNUM5LjM3NTExIDE5Ljc1IDkuMzc1MTEgMTguMzc1IDkuODc1MTEgMTdDMTAuMjUwMSAxNS44NzUgMTEuMDAwMSAxNSAxMi4yNTAxIDE0Ljc1SDE5LjUwMDFDMTkuNjI1MSAxNC43NSAxOS44NzUxIDE0Ljc1IDE5Ljg3NTEgMTQuNjI1VjE0QzE5Ljg3NTEgMTQgMTkuNjI1MSAxMy44NzUgMTkuNTAwMSAxMy44NzVIMTUuMjUwMUMxNC44NzUxIDEzLjg3NSAxNC43NTAxIDEzLjc1IDE0Ljc1MDEgMTMuMzc1VjExLjc1QzE0Ljc1MDEgMTAuODc1IDE1LjEyNTEgMTAuMjUgMTUuODc1MSA5Ljk5OTk4QzE2LjUwMDEgOS43NDk5OCAxNy4xMjUxIDkuNDk5OTggMTcuNzUwMSA5LjM3NDk4QzE5LjI1MDEgOS4xMjQ5OCAyMC43NTAxIDkuMTI0OTggMjIuMjUwMSA5LjQ5OTk4QzIyLjg3NTEgOS42MjQ5OCAyMy41MDAxIDkuODc0OTggMjQuMDAwMSAxMC4yNUMyNC41MDAxIDEwLjc1IDI0Ljg3NTEgMTEuMjUgMjQuNzUwMSAxMlYxNi41QzI0Ljc1MDEgMTguMjUgMjMuNzUwMSAxOS4yNSAyMi4wMDAxIDE5LjI1QzIxLjEyNTEgMTkuMzc1IDIwLjI1MDEgMTkuMzc1IDE5LjUwMDEgMTkuMzc1Wk0xNi4wMDAxIDExLjg3NUMxNi4wMDAxIDEyLjM3NSAxNi4zNzUxIDEyLjg3NSAxNy4wMDAxIDEyLjg3NUMxNy41MDAxIDEyLjg3NSAxOC4wMDAxIDEyLjM3NSAxOC4wMDAxIDExLjg3NUMxOC4wMDAxIDExLjM3NSAxNy41MDAxIDExIDE3LjAwMDEgMTAuODc1QzE2LjM3NTEgMTAuODc1IDE2LjAwMDEgMTEuMzc1IDE2LjAwMDEgMTEuODc1Wk0yMC41MDAxIDIwLjYyNUgyMy4wMDAxQzI0Ljc1MDEgMjAuNjI1IDI1Ljg3NTEgMTkuNSAyNS44NzUxIDE3Ljc1VjE1LjVDMjUuODc1MSAxNS4yNSAyNi4wMDAxIDE1LjEyNSAyNi4yNTAxIDE1LjEyNUgyNy4zNzUxQzI4LjUwMDEgMTUuMTI1IDI5LjM3NTEgMTUuNjI1IDI5Ljg3NTEgMTYuNjI1QzMwLjI1MDEgMTcuMzc1IDMwLjUwMDEgMTguMTI1IDMwLjUwMDEgMTguODc1QzMwLjYyNTEgMjAuMjUgMzAuNjI1MSAyMS42MjUgMzAuMTI1MSAyM0MyOS43NTAxIDI0LjEyNSAyOS4wMDAxIDI1IDI3Ljc1MDEgMjUuMjVIMjAuNTAwMUMyMC4zNzUxIDI1LjI1IDIwLjEyNTEgMjUuMjUgMjAuMTI1MSAyNS4zNzVWMjZDMjAuMTI1MSAyNiAyMC4zNzUxIDI2LjEyNSAyMC41MDAxIDI2LjEyNUgyNC43NTAxQzI1LjEyNTEgMjYuMTI1IDI1LjI1MDEgMjYuMjUgMjUuMjUwMSAyNi42MjVWMjguMjVDMjUuMjUwMSAyOS4xMjUgMjQuODc1MSAyOS43NSAyNC4xMjUxIDMwQzIzLjUwMDEgMzAuMjUgMjIuODc1MSAzMC41IDIyLjI1MDEgMzAuNjI1QzIwLjc1MDEgMzAuODc1IDE5LjI1MDEgMzAuODc1IDE3Ljc1MDEgMzAuNUMxNy4xMjUxIDMwLjM3NSAxNi41MDAxIDMwLjEyNSAxNi4wMDAxIDI5Ljc1QzE1LjUwMDEgMjkuMjUgMTUuMTI1MSAyOC43NSAxNS4yNTAxIDI4VjIzLjVDMTUuMjUwMSAyMS43NSAxNi4yNTAxIDIwLjc1IDE4LjAwMDEgMjAuNzVDMTguODc1MSAyMC42MjUgMTkuNzUwMSAyMC42MjUgMjAuNTAwMSAyMC42MjVaTTI0LjAwMDEgMjguMTI1QzI0LjAwMDEgMjcuNjI1IDIzLjYyNTEgMjcuMTI1IDIzLjAwMDEgMjcuMTI1QzIyLjUwMDEgMjcuMTI1IDIyLjAwMDEgMjcuNjI1IDIyLjAwMDEgMjguMTI1QzIyLjAwMDEgMjguNjI1IDIyLjUwMDEgMjkgMjMuMDAwMSAyOS4xMjVDMjMuNjI1MSAyOS4xMjUgMjQuMDAwMSAyOC42MjUgMjQuMDAwMSAyOC4xMjVaIiBmaWxsPSIjODlEREQ1Ii8+Cjwvc3ZnPgo=":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjQwIiBoZWlnaHQ9IjQwIiByeD0iNCIgZmlsbD0iIzEwMUIyOSIvPgo8cGF0aCBkPSJNMTAgMTguNzVMMTcuNSAxMS43NVYxNUwxMS44NzUgMjBMMTcuNSAyNVYyOC4yNUwxMCAyMS4yNVYxOC43NVpNMzAgMjEuMzc1TDIyLjUgMjguMzc1VjI1TDI4LjI1IDIwTDIyLjUgMTVWMTEuNjI1TDMwIDE4LjYyNVYyMS4zNzVaIiBmaWxsPSIjODhEREQ0Ii8+Cjwvc3ZnPgo=",alt:a("header.editorLogoAltText")}),l.map((e,t)=>o.a.createElement(pg,{key:t,Icon:e.icon,title:e.title,isActive:n===e.name,toggleOption:r,name:e.name}))),o.a.createElement("div",{className:"sidebar__bar-options--bottom"},c.map((e,t)=>o.a.createElement(pg,{key:t,Icon:e.icon,title:e.title,isActive:n===e.name,toggleOption:r,name:e.name})),!u&&(n?o.a.createElement("div",{className:"sidebar__bar-option-wrapper"},o.a.createElement(xc,{className:"sidebar__bar-option",ButtonIcon:ug,title:a("sidebar.collapse"),onClickHandler:()=>{r(n),window.plausible&&window.plausible("Collapse file pane")}})):o.a.createElement("div",{className:"sidebar__bar-option-wrapper"},o.a.createElement(xc,{className:"sidebar__bar-option",ButtonIcon:hg,title:a("sidebar.expand"),onClickHandler:()=>{r(i?"instructions":"file"),window.plausible&&window.plausible("Expand file pane")}})))))},mg=n(57);function gg(e,t){void 0===t&&(t={});var n=function(e){if(e&&"j"===e[0]&&":"===e[1])return e.substr(2);return e}(e);if(function(e,t){return void 0===t&&(t=!e||"{"!==e[0]&&"["!==e[0]&&'"'!==e[0]),!t}(n,t.doNotParse))try{return JSON.parse(n)}catch(e){}return e}var bg=function(){return(bg=Object.assign||function(e){for(var t,n=1,r=arguments.length;n=0&&this.changeListeners.splice(t,1)},e}(),yg=i.createContext(new vg),_g=(yg.Provider,yg.Consumer,yg);function Sg(e){var t=Object(i.useContext)(_g);if(!t)throw new Error("Missing ");var n=t.getAll(),r=Object(i.useState)(n),o=r[0],s=r[1],a=Object(i.useRef)(o);return"undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement&&Object(i.useLayoutEffect)((function(){function n(){var n=t.getAll();(function(e,t,n){if(!e)return!0;for(var r=0,i=e;r{let{label:t,options:n,value:r,setValue:i}=e;return o.a.createElement("fieldset",{className:"select-buttons"},o.a.createElement("legend",{className:"select-buttons__legend"},t),o.a.createElement("div",{className:"select-buttons__options"},n.map((e,n)=>o.a.createElement("div",{className:"select-buttons__option",key:n},o.a.createElement("input",{className:"select-buttons__button",type:"radio",id:"".concat(t,"-option").concat(n),value:e.value,onChange:e=>i(e.target.value),checked:e.value===r}),o.a.createElement("label",{className:"select-buttons__label".concat(e.value===r?" select-buttons__label--selected":""),htmlFor:"".concat(t,"-option").concat(n)},e.Icon?o.a.createElement(e.Icon,null):null,e.label,o.a.createElement("div",{className:"select-buttons__tick".concat(e.value===r?" select-buttons__tick--selected":"")},o.a.createElement(Og,null)))))))};const Ag=["/","/projects","/python"];var Tg,Cg=()=>{const[e,t,n]=Sg(["theme"]),r="dark"===e.theme||!e.theme&&window.matchMedia("(prefers-color-scheme:dark)").matches,{t:s}=Gi();return o.a.createElement(Eg,{label:s("sidebar.settingsMenu.theme"),options:[{value:"light",label:s("sidebar.settingsMenu.themeOptions.light")},{value:"dark",label:s("sidebar.settingsMenu.themeOptions.dark")}],value:r?"dark":"light",setValue:r=>{e.theme&&Ag.forEach(e=>{n("theme",{path:e})}),Object(i.startTransition)(()=>{t("theme",r,{path:"/"})}),document.dispatchEvent(pf("editor-themeUpdated",r))}})};function Mg(){return(Mg=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const[e,t,n]=Sg(["fontSize"]),r=e.fontSize||"small",{t:i}=Gi();return o.a.createElement(Eg,{label:i("sidebar.settingsMenu.textSize"),options:[{value:"small",label:i("sidebar.settingsMenu.textSizeOptions.small"),Icon:jg},{value:"medium",label:i("sidebar.settingsMenu.textSizeOptions.medium"),Icon:Dg},{value:"large",label:i("sidebar.settingsMenu.textSizeOptions.large"),Icon:$g}],value:r,setValue:r=>{e.fontSize&&Lg.forEach(e=>{n("fontSize",{path:e})}),t("fontSize",r,{path:"/"})}})};n(399);var Fg,zg=()=>{const{t:e}=Gi(),t=Qn(e=>e.editor.isThemeable);return o.a.createElement(Qm,{heading:e("settingsPanel.info")},o.a.createElement("div",{className:"settings-panel"},t&&o.a.createElement(Cg,null),o.a.createElement(Bg,null)))};function Ug(){return(Ug=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{className:t}=e;const n=Qn(e=>e.editor.project.project_type),{t:r}=Gi();return o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:pi()("project-info",t)},o.a.createElement("label",{htmlFor:"project_type",className:"project-type__label"},r("projectsPanel.projectTypeLabel")),o.a.createElement("div",{className:"project-type__text"},r("projectTypes.".concat(n)))))};var eb=()=>{const{t:e,i18n:{language:t}}=Gi(),n=Qn(e=>{var t;return null==e||null===(t=e.auth)||void 0===t?void 0:t.user}),r=Object(ui.useMediaQuery)({query:Co}),i=o.a.createElement(o.a.Fragment,null,o.a.createElement("div",{className:"projects-panel__save"},o.a.createElement(wf,{className:"projects-panel__save-button"})),o.a.createElement("div",{className:"projects-panel__save-status"},o.a.createElement(yp,{isMobile:r})));return o.a.createElement(Qm,{heading:e("projectsPanel.projects"),Button:()=>n?o.a.createElement(xc,{text:e("projectsPanel.yourProjectsButton"),className:"btn--primary projects-panel__your-projects-button",buttonIconPosition:"right",href:"/".concat(t,"/projects")}):null,className:"projects-panel-wrapper"},o.a.createElement(rf,{showLabel:!0,className:"projects-panel__item"}),o.a.createElement(Kg,{className:"projects-panel__item"}),o.a.createElement("div",{className:"projects-panel__button"},o.a.createElement(hf,{buttonText:e("header.download"),className:"projects-panel__download-button",Icon:xp})),r&&i)};n(402);var tb=()=>{const e=Qn(e=>e.editor.project.image_list);return o.a.createElement("div",{className:"project-images"},e.map((e,t)=>o.a.createElement("div",{key:t,className:"project-images__block"},o.a.createElement("div",{className:"project-images__image-wrapper"},o.a.createElement("img",{crossOrigin:"true",className:"project-images__image",src:e.url,alt:e.filename})),o.a.createElement("p",null,e.filename))))};var nb=()=>{const{t:e}=Gi();return o.a.createElement(Qm,{heading:e("imagePanel.gallery")},o.a.createElement(tb,null))};n(403);var rb,ib=()=>{const{t:e}=Gi(),t=Qn(e=>e.auth.user),n=Qn(e=>e.editor.project),r=yf(t,n);return o.a.createElement(Qm,{heading:e("downloadPanel.heading")},!t&&o.a.createElement("div",{className:"download-panel__login-section"},o.a.createElement("div",{className:"download-panel__subtitle"},e("downloadPanel.logInTitle")),o.a.createElement("p",{className:"download-panel__hint"},e("downloadPanel.logInHint")),o.a.createElement("div",{className:"download-panel__button-container"},o.a.createElement(nf,{className:"btn btn--primary download-panel__button",text:e("downloadPanel.logInButton"),type:"primary",onClick:()=>{window.plausible&&window.plausible("Login button"),document.dispatchEvent(gf)},fill:!0}),o.a.createElement(nf,{className:"btn btn--secondary download-panel__button",text:e("downloadPanel.signUpButton"),type:"secondary",onClick:()=>{document.dispatchEvent(bf)},fill:!0}))),o.a.createElement("div",{className:"download-panel__download-section"},o.a.createElement("p",{className:"download-panel__hint"},e("downloadPanel.downloadHint")),o.a.createElement(hf,{buttonText:e("downloadPanel.downloadButton"),className:"btn btn--secondary download-panel__button",Icon:xp,fill:!0})),t&&!r&&o.a.createElement(wf,{fill:!0}))};function ob(){return(ob=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const e=Qn(e=>e.instructions.project.steps.length),t=Qn(e=>e.instructions.currentStepPosition),n=Bn(),{t:r}=Gi();return o.a.createElement("div",{className:"progress-bar"},o.a.createElement(xc,{className:"btn--primary btn--small",buttonOuter:!0,onClickHandler:()=>{n(Nc(Math.max(t-1,0)))},ButtonIcon:ab,disabled:0===t,title:r("instructionsPanel.previousStep")}),o.a.createElement("progress",{max:e-1,value:t}),o.a.createElement(xc,{className:"btn--primary btn--small",buttonOuter:!0,onClickHandler:()=>{n(Nc(Math.min(t+1,e-1)))},ButtonIcon:cb,disabled:t===e-1,title:r("instructionsPanel.nextStep")}))};n(405),n(406),n(407),n(408),n(409);var db=()=>{const e=Qn(e=>{var t;return null===(t=e.instructions.project)||void 0===t?void 0:t.steps}),t=Qn(e=>{var t;return null===(t=e.instructions)||void 0===t?void 0:t.quiz}),n=Bn(),r=Qn(e=>e.instructions.currentStepPosition),{t:s}=Gi(),a=Object(i.useRef)(),[l,c]=Object(i.useState)(!1),u=Object(i.useMemo)(()=>(null==t?void 0:t.currentQuestion)===(null==t?void 0:t.questionCount),[t]),d=Qn(e=>e.instructions.project.steps.length);return Object(i.useEffect)(()=>{var n;!u&&null!=t&&t.questionCount&&"string"==typeof(null===(n=e[r])||void 0===n?void 0:n.knowledgeQuiz)?c(!0):c(!1)},[t,e,r,u]),Object(i.useEffect)(()=>{const n=e=>{a.current.parentElement.scrollTo({top:0}),a.current.innerHTML=e,a.current.querySelectorAll(".language-python, .language-html, .language-css").forEach(e=>{window.Prism.highlightElement(e)})};l&&!u?(n(t.questions[t.currentQuestion]),document.dispatchEvent(vf)):e[r]&&n(e[r].content)},[e,r,t,u,l]),Object(i.useEffect)(()=>{u&&l&&n(Nc(Math.min(r+1,d-1)))},[u,r,d,n,l]),o.a.createElement(Qm,{defaultWidth:"30vw",heading:s("instructionsPanel.projectSteps"),Footer:ub},o.a.createElement("div",{className:"project-instructions",ref:a}))};var hb=e=>{let{options:t=[]}=e;const{t:n}=Gi();let r=[{name:"projects",icon:qg,title:n("sidebar.projects"),position:"top",panel:eb},{name:"instructions",icon:Jg,title:n("sidebar.instructions"),position:"top",panel:db},{name:"file",icon:ig,title:n("sidebar.file"),position:"top",panel:og},{name:"images",icon:Vg,title:n("sidebar.images"),position:"top",panel:nb},{name:"download",icon:xf,title:n("sidebar.download"),position:"top",panel:ib},{name:"settings",icon:Yg,title:n("sidebar.settings"),position:"bottom",panel:zg},{name:"info",icon:Ku,title:n("sidebar.information"),position:"bottom",panel:ag}].filter(e=>t.includes(e.name));const s=Object(ui.useMediaQuery)({query:Co}),a=Qn(e=>e.editor.project.image_list),l=Qn(e=>{var t,n;return null===(t=e.instructions)||void 0===t||null===(n=t.project)||void 0===n?void 0:n.steps}),c=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];n&&0!==n.length||!t.includes(e)||r.splice(r.findIndex(t=>t.name===e),1)};c("images",a),c("instructions",l);const[u,d]=Object(i.useState)(l?"instructions":"file"),h=r.find(e=>e.name===u),p=h&&h.panel?h.panel:()=>{};return o.a.createElement("div",{className:pi()("sidebar",{"sidebar--mobile":s})},o.a.createElement(fg,{menuOptions:r,option:u,toggleOption:e=>{u!==e?d(e):s||d(null)},instructions:l}),u&&o.a.createElement(p,{isMobile:s}))},pb=n(25),fb=n(110),mb=n(184);let gb=function(e){e()};const bb=Object(i.createContext)(null);const vb=()=>{throw new Error("uSES not initialized!")};let yb=vb;var _b=n(185);const Sb=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function xb(e,t,n,r,{areStatesEqual:i,areOwnPropsEqual:o,areStatePropsEqual:s}){let a,l,c,u,d,h=!1;function p(h,p){const f=!o(p,l),m=!i(h,a,p,l);return a=h,l=p,f&&m?(c=e(a,l),t.dependsOnOwnProps&&(u=t(r,l)),d=n(c,u,l),d):f?(e.dependsOnOwnProps&&(c=e(a,l)),t.dependsOnOwnProps&&(u=t(r,l)),d=n(c,u,l),d):m?function(){const t=e(a,l),r=!s(t,c);return c=t,r&&(d=n(c,u,l)),d}():d}return function(i,o){return h?p(i,o):(a=i,l=o,c=e(a,l),u=t(r,l),d=n(c,u,l),h=!0,d)}}function wb(e){return function(t){const n=e(t);function r(){return n}return r.dependsOnOwnProps=!1,r}}function kb(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function Ob(e,t){return function(t,{displayName:n}){const r=function(e,t){return r.dependsOnOwnProps?r.mapToProps(e,t):r.mapToProps(e,void 0)};return r.dependsOnOwnProps=!0,r.mapToProps=function(t,n){r.mapToProps=e,r.dependsOnOwnProps=kb(e);let i=r(t,n);return"function"==typeof i&&(r.mapToProps=i,r.dependsOnOwnProps=kb(i),i=r(t,n)),i},r}}function Eb(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}function Ab(e,t,n){return Object(Cn.a)({},n,e,t)}function Tb(){const e=gb;let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let e=t;for(;e;)e.callback(),e=e.next})},get(){let e=[],n=t;for(;n;)e.push(n),n=n.next;return e},subscribe(e){let r=!0,i=n={callback:e,next:null,prev:n};return i.prev?i.prev.next=i:t=i,function(){r&&null!==t&&(r=!1,i.next?i.next.prev=i.prev:n=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}const Cb={notify(){},get:()=>[]};function Mb(e,t){let n,r=Cb;function i(){s.onStateChange&&s.onStateChange()}function o(){n||(n=t?t.addNestedSub(i):e.subscribe(i),r=Tb())}const s={addNestedSub:function(e){return o(),r.subscribe(e)},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:i,isSubscribed:function(){return Boolean(n)},trySubscribe:o,tryUnsubscribe:function(){n&&(n(),n=void 0,r.clear(),r=Cb)},getListeners:()=>r};return s}const Pb=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement)?i.useLayoutEffect:i.useEffect;function $b(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function Rb(e,t){if($b(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r({}))}(e),f=function(e){return e&&"object"==typeof e?wb(t=>function(e,t){const n={};for(const r in e){const i=e[r];"function"==typeof i&&(n[r]=(...e)=>t(i(...e)))}return n}(e,t)):e?"function"==typeof e?Ob(e):Eb(e,"mapDispatchToProps"):wb(e=>({dispatch:e}))}(t),m=function(e){return e?"function"==typeof e?function(e){return function(t,{displayName:n,areMergedPropsEqual:r}){let i,o=!1;return function(t,n,s){const a=e(t,n,s);return o?r(a,i)||(i=a):(o=!0,i=a),i}}}(e):Eb(e,"mergeProps"):()=>Ab}(n),g=Boolean(e);return e=>{const t=e.displayName||e.name||"Component",n=`Connect(${t})`,r={shouldHandleStateChanges:g,displayName:n,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:p,initMapDispatchToProps:f,initMergeProps:m,areStatesEqual:s,areStatePropsEqual:l,areOwnPropsEqual:a,areMergedPropsEqual:c};function d(t){const[n,s,a]=Object(i.useMemo)(()=>{const{reactReduxForwardedRef:e}=t,n=Mn(t,Ib);return[t.context,e,n]},[t]),l=Object(i.useMemo)(()=>n&&n.Consumer&&Object(_b.isContextConsumer)(o.a.createElement(n.Consumer,null))?n:h,[n,h]),c=Object(i.useContext)(l),u=Boolean(t.store)&&Boolean(t.store.getState)&&Boolean(t.store.dispatch),d=Boolean(c)&&Boolean(c.store);const p=u?t.store:c.store,f=d?c.getServerState:p.getState,m=Object(i.useMemo)(()=>function(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:i}=t,o=Mn(t,Sb);return xb(n(e,o),r(e,o),i(e,o),e,o)}(p.dispatch,r),[p]),[b,v]=Object(i.useMemo)(()=>{if(!g)return Nb;const e=Mb(p,u?void 0:c.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]},[p,u,c]),y=Object(i.useMemo)(()=>u?c:Object(Cn.a)({},c,{subscription:b}),[u,c,b]),_=Object(i.useRef)(),S=Object(i.useRef)(a),x=Object(i.useRef)(),w=Object(i.useRef)(!1),k=(Object(i.useRef)(!1),Object(i.useRef)(!1)),O=Object(i.useRef)();Pb(()=>(k.current=!0,()=>{k.current=!1}),[]);const E=Object(i.useMemo)(()=>()=>x.current&&a===S.current?x.current:m(p.getState(),a),[p,a]),A=Object(i.useMemo)(()=>e=>b?function(e,t,n,r,i,o,s,a,l,c,u){if(!e)return()=>{};let d=!1,h=null;const p=()=>{if(d||!a.current)return;const e=t.getState();let n,p;try{n=r(e,i.current)}catch(e){p=e,h=e}p||(h=null),n===o.current?s.current||c():(o.current=n,l.current=n,s.current=!0,u())};return n.onStateChange=p,n.trySubscribe(),p(),()=>{if(d=!0,n.tryUnsubscribe(),n.onStateChange=null,h)throw h}}(g,p,b,m,S,_,w,k,x,v,e):()=>{},[b]);var T,C,M;let P;T=jb,C=[S,_,w,a,x,v],Pb(()=>T(...C),M);try{P=Db(A,E,f?()=>m(f(),a):E)}catch(e){throw O.current&&(e.message+=`\nThe error may be correlated with this previous error:\n${O.current.stack}\n\n`),e}Pb(()=>{O.current=void 0,x.current=void 0,_.current=P});const $=Object(i.useMemo)(()=>o.a.createElement(e,Object(Cn.a)({},P,{ref:s})),[s,e,P]);return Object(i.useMemo)(()=>g?o.a.createElement(l.Provider,{value:y},$):$,[l,$,y])}const b=o.a.memo(d);if(b.WrappedComponent=e,b.displayName=d.displayName=n,u){const t=o.a.forwardRef((function(e,t){return o.a.createElement(b,Object(Cn.a)({},e,{reactReduxForwardedRef:t}))}));return t.displayName=n,t.WrappedComponent=e,$n()(t,e)}return $n()(b,e)}};var Fb=function({store:e,context:t,children:n,serverState:r}){const s=Object(i.useMemo)(()=>{const t=Mb(e);return{store:e,subscription:t,getServerState:r?()=>r:void 0}},[e,r]),a=Object(i.useMemo)(()=>e.getState(),[e]);Pb(()=>{const{subscription:t}=s;return t.onStateChange=t.notifyNestedSubs,t.trySubscribe(),a!==e.getState()&&t.notifyNestedSubs(),()=>{t.tryUnsubscribe(),t.onStateChange=void 0}},[s,a]);const l=t||bb;return o.a.createElement(l.Provider,{value:s},n)};var zb;function Ub(e,t){var n=Object(i.useState)((function(){return{inputs:t,result:e()}}))[0],r=Object(i.useRef)(!0),o=Object(i.useRef)(n),s=r.current||Boolean(t&&o.current.inputs&&function(e,t){if(e.length!==t.length)return!1;for(var n=0;n{Db=e})(fb.useSyncExternalStore),(e=>{gb=e})(s.unstable_batchedUpdates);var Qb=Ub,qb=function(e,t){return Ub((function(){return e}),t)};var Hb=function(e){var t=e.top,n=e.right,r=e.bottom,i=e.left;return{top:t,right:n,bottom:r,left:i,width:n-i,height:r-t,x:i,y:t,center:{x:(n+i)/2,y:(r+t)/2}}},Gb=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},Vb=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},Wb={top:0,right:0,bottom:0,left:0},Xb=function(e){var t=e.borderBox,n=e.margin,r=void 0===n?Wb:n,i=e.border,o=void 0===i?Wb:i,s=e.padding,a=void 0===s?Wb:s,l=Hb(Gb(t,r)),c=Hb(Vb(t,o)),u=Hb(Vb(c,a));return{marginBox:l,borderBox:Hb(t),paddingBox:c,contentBox:u,margin:r,border:o,padding:a}},Yb=function(e){var t=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var n=Number(t);return isNaN(n)&&function(e,t){if(!e)throw new Error("Invariant failed")}(!1),n},Zb=function(e,t){var n,r,i=e.borderBox,o=e.border,s=e.margin,a=e.padding,l=(r=t,{top:(n=i).top+r.y,left:n.left+r.x,bottom:n.bottom+r.y,right:n.right+r.x});return Xb({borderBox:l,border:o,margin:s,padding:a})},Jb=function(e,t){return void 0===t&&(t={x:window.pageXOffset,y:window.pageYOffset}),Zb(e,t)},Kb=function(e,t){var n={top:Yb(t.marginTop),right:Yb(t.marginRight),bottom:Yb(t.marginBottom),left:Yb(t.marginLeft)},r={top:Yb(t.paddingTop),right:Yb(t.paddingRight),bottom:Yb(t.paddingBottom),left:Yb(t.paddingLeft)},i={top:Yb(t.borderTopWidth),right:Yb(t.borderRightWidth),bottom:Yb(t.borderBottomWidth),left:Yb(t.borderLeftWidth)};return Xb({borderBox:e,margin:n,padding:r,border:i})},ev=function(e){var t=e.getBoundingClientRect(),n=window.getComputedStyle(e);return Kb(t,n)},tv=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function nv(e,t){if(e.length!==t.length)return!1;for(var n=0;n{const r=function(e,t){return{...e,...t}}(n,t.options);return e.addEventListener(t.eventName,t.fn,r),function(){e.removeEventListener(t.eventName,t.fn,r)}});return function(){r.forEach(e=>{e()})}}class lv extends Error{}function cv(e,t){if(!e)throw new lv("Invariant failed")}lv.prototype.toString=function(){return this.message};class uv extends o.a.Component{constructor(){super(...arguments),this.callbacks=null,this.unbind=sv,this.onWindowError=e=>{const t=this.getCallbacks();t.isDragging()&&t.tryAbort();e.error instanceof lv&&e.preventDefault()},this.getCallbacks=()=>{if(!this.callbacks)throw new Error("Unable to find AppCallbacks in ");return this.callbacks},this.setCallbacks=e=>{this.callbacks=e}}componentDidMount(){this.unbind=av(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(e){if(!(e instanceof lv))throw e;this.setState({})}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}}const dv=e=>e+1,hv=(e,t)=>{const n=e.droppableId===t.droppableId,r=dv(e.index),i=dv(t.index);return n?`\n You have moved the item from position ${r}\n to position ${i}\n `:`\n You have moved the item from position ${r}\n in list ${e.droppableId}\n to list ${t.droppableId}\n in position ${i}\n `},pv=(e,t,n)=>t.droppableId===n.droppableId?`\n The item ${e}\n has been combined with ${n.draggableId}`:`\n The item ${e}\n in list ${t.droppableId}\n has been combined with ${n.draggableId}\n in list ${n.droppableId}\n `,fv=e=>`\n The item has returned to its starting position\n of ${dv(e.index)}\n`;var mv={dragHandleUsageInstructions:"\n Press space bar to start a drag.\n When dragging you can use the arrow keys to move the item around and escape to cancel.\n Some screen readers may require you to be in focus mode or to use your pass through key\n",onDragStart:e=>`\n You have lifted an item in position ${dv(e.source.index)}\n`,onDragUpdate:e=>{const t=e.destination;if(t)return hv(e.source,t);const n=e.combine;return n?pv(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},onDragEnd:e=>{if("CANCEL"===e.reason)return`\n Movement cancelled.\n ${fv(e.source)}\n `;const t=e.destination,n=e.combine;return t?`\n You have dropped the item.\n ${hv(e.source,t)}\n `:n?`\n You have dropped the item.\n ${pv(e.draggableId,e.source,n)}\n `:`\n The item has been dropped while not over a drop area.\n ${fv(e.source)}\n `}};const gv={x:0,y:0},bv=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),vv=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),yv=(e,t)=>e.x===t.x&&e.y===t.y,_v=e=>({x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}),Sv=function(e,t,n){return void 0===n&&(n=0),"x"===e?{x:t,y:n}:{x:n,y:t}},xv=(e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),wv=(e,t)=>Math.min(...t.map(t=>xv(e,t))),kv=e=>t=>({x:e(t.x),y:e(t.y)});const Ov=(e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),Ev=e=>[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}],Av=(e,t)=>t&&t.shouldClipSubject?((e,t)=>{const n=Hb({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n})(t.pageMarginBox,e):Hb(e);var Tv=e=>{let{page:t,withPlaceholder:n,axis:r,frame:i}=e;const o=((e,t,n)=>n&&n.increasedBy?{...e,[t.end]:e[t.end]+n.increasedBy[t.line]}:e)(((e,t)=>t?Ov(e,t.scroll.diff.displacement):e)(t.marginBox,i),r,n);return{page:t,withPlaceholder:n,active:Av(o,i)}},Cv=(e,t)=>{e.frame||cv(!1);const n=e.frame,r=vv(t,n.scroll.initial),i=_v(r),o={...n,scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:i},max:n.scroll.max}},s=Tv({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:o});return{...e,frame:o,subject:s}};const Mv=rv(e=>e.reduce((e,t)=>(e[t.descriptor.id]=t,e),{})),Pv=rv(e=>e.reduce((e,t)=>(e[t.descriptor.id]=t,e),{})),$v=rv(e=>Object.values(e)),Rv=rv(e=>Object.values(e));var Iv=rv((e,t)=>Rv(t).filter(t=>e===t.descriptor.droppableId).sort((e,t)=>e.descriptor.index-t.descriptor.index));function Dv(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function Nv(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}var jv=rv((e,t)=>t.filter(t=>t.descriptor.id!==e.descriptor.id)),Lv=(e,t)=>e.descriptor.droppableId===t.descriptor.id;const Bv={point:gv,value:0},Fv={invisible:{},visible:{},all:[]};var zv={displaced:Fv,displacedBy:Bv,at:null},Uv=(e,t)=>n=>e<=n&&n<=t,Qv=e=>{const t=Uv(e.top,e.bottom),n=Uv(e.left,e.right);return r=>{if(t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right))return!0;const i=t(r.top)||t(r.bottom),o=n(r.left)||n(r.right);if(i&&o)return!0;const s=r.tope.bottom,a=r.lefte.right;if(s&&a)return!0;return s&&o||a&&i}},qv=e=>{const t=Uv(e.top,e.bottom),n=Uv(e.left,e.right);return e=>t(e.top)&&t(e.bottom)&&n(e.left)&&n(e.right)};const Hv={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},Gv={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"};const Vv=e=>{let{target:t,destination:n,viewport:r,withDroppableDisplacement:i,isVisibleThroughFrameFn:o}=e;const s=i?((e,t)=>{const n=t.frame?t.frame.scroll.diff.displacement:gv;return Ov(e,n)})(t,n):t;return((e,t,n)=>!!t.subject.active&&n(t.subject.active)(e))(s,n,o)&&((e,t,n)=>n(t)(e))(s,r,o)},Wv=e=>Vv({...e,isVisibleThroughFrameFn:qv});function Xv(e){let{afterDragging:t,destination:n,displacedBy:r,viewport:i,forceShouldAnimate:o,last:s}=e;return t.reduce((function(e,t){const a=function(e,t){const n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return Hb(Gb(n,r))}(t,r),l=t.descriptor.id;e.all.push(l);var c;if(!(c={target:a,destination:n,viewport:i,withDroppableDisplacement:!0},Vv({...c,isVisibleThroughFrameFn:Qv})))return e.invisible[t.descriptor.id]=!0,e;const u={draggableId:l,shouldAnimate:((e,t,n)=>{if("boolean"==typeof n)return n;if(!t)return!0;const{invisible:r,visible:i}=t;if(r[e])return!1;const o=i[e];return!o||o.shouldAnimate})(l,s,o)};return e.visible[l]=u,e}),{all:[],visible:{},invisible:{}})}function Yv(e){let{insideDestination:t,inHomeList:n,displacedBy:r,destination:i}=e;const o=function(e,t){if(!e.length)return 0;const n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}(t,{inHomeList:n});return{displaced:Fv,displacedBy:r,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:o}}}}function Zv(e){let{draggable:t,insideDestination:n,destination:r,viewport:i,displacedBy:o,last:s,index:a,forceShouldAnimate:l}=e;const c=Lv(t,r);if(null==a)return Yv({insideDestination:n,inHomeList:c,displacedBy:o,destination:r});const u=n.find(e=>e.descriptor.index===a);if(!u)return Yv({insideDestination:n,inHomeList:c,displacedBy:o,destination:r});const d=jv(t,n),h=n.indexOf(u);return{displaced:Xv({afterDragging:d.slice(h),destination:r,displacedBy:o,last:s,viewport:i.frame,forceShouldAnimate:l}),displacedBy:o,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:a}}}}function Jv(e,t){return Boolean(t.effected[e])}var Kv=e=>{let{isMovingForward:t,isInHomeList:n,draggable:r,draggables:i,destination:o,insideDestination:s,previousImpact:a,viewport:l,afterCritical:c}=e;const u=a.at;if(u||cv(!1),"REORDER"===u.type){const e=(e=>{let{isMovingForward:t,isInHomeList:n,insideDestination:r,location:i}=e;if(!r.length)return null;const o=i.index,s=t?o+1:o-1,a=r[0].descriptor.index,l=r[r.length-1].descriptor.index;return s(n?l:l+1)?null:s})({isMovingForward:t,isInHomeList:n,location:u.destination,insideDestination:s});return null==e?null:Zv({draggable:r,insideDestination:s,destination:o,viewport:l,last:a.displaced,displacedBy:a.displacedBy,index:e})}const d=(e=>{let{isMovingForward:t,destination:n,draggables:r,combine:i,afterCritical:o}=e;if(!n.isCombineEnabled)return null;const s=i.draggableId,a=r[s].descriptor.index;return Jv(s,o)?t?a:a-1:t?a+1:a})({isMovingForward:t,destination:o,displaced:a.displaced,draggables:i,combine:u.combine,afterCritical:c});return null==d?null:Zv({draggable:r,insideDestination:s,destination:o,viewport:l,last:a.displaced,displacedBy:a.displacedBy,index:d})},ey=e=>{let{afterCritical:t,impact:n,draggables:r}=e;const i=Nv(n);i||cv(!1);const o=i.draggableId,s=r[o].page.borderBox.center,a=(e=>{let{displaced:t,afterCritical:n,combineWith:r,displacedBy:i}=e;const o=Boolean(t.visible[r]||t.invisible[r]);return Jv(r,n)?o?gv:_v(i.point):o?i.point:gv})({displaced:n.displaced,afterCritical:t,combineWith:o,displacedBy:n.displacedBy});return bv(s,a)};const ty=(e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,ny=(e,t,n)=>t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2,ry=e=>{let{axis:t,moveRelativeTo:n,isMoving:r}=e;return Sv(t.line,n.marginBox[t.end]+ty(t,r),ny(t,n.marginBox,r))},iy=e=>{let{axis:t,moveRelativeTo:n,isMoving:r}=e;return Sv(t.line,n.marginBox[t.start]-((e,t)=>t.margin[e.end]+t.borderBox[e.size]/2)(t,r),ny(t,n.marginBox,r))};var oy=e=>{let{impact:t,draggable:n,draggables:r,droppable:i,afterCritical:o}=e;const s=Iv(i.descriptor.id,r),a=n.page,l=i.axis;if(!s.length)return(e=>{let{axis:t,moveInto:n,isMoving:r}=e;return Sv(t.line,n.contentBox[t.start]+ty(t,r),ny(t,n.contentBox,r))})({axis:l,moveInto:i.page,isMoving:a});const{displaced:c,displacedBy:u}=t,d=c.all[0];if(d){const e=r[d];if(Jv(d,o))return iy({axis:l,moveRelativeTo:e.page,isMoving:a});const t=Zb(e.page,u.point);return iy({axis:l,moveRelativeTo:t,isMoving:a})}const h=s[s.length-1];if(h.descriptor.id===n.descriptor.id)return a.borderBox.center;if(Jv(h.descriptor.id,o)){const e=Zb(h.page,_v(o.displacedBy.point));return ry({axis:l,moveRelativeTo:e,isMoving:a})}return ry({axis:l,moveRelativeTo:h.page,isMoving:a})},sy=(e,t)=>{const n=e.frame;return n?bv(t,n.scroll.diff.displacement):t};var ay=e=>{const t=(e=>{let{impact:t,draggable:n,droppable:r,draggables:i,afterCritical:o}=e;const s=n.page.borderBox.center,a=t.at;return r&&a?"REORDER"===a.type?oy({impact:t,draggable:n,draggables:i,droppable:r,afterCritical:o}):ey({impact:t,draggables:i,afterCritical:o}):s})(e),n=e.droppable;return n?sy(n,t):t},ly=(e,t)=>{const n=vv(t,e.scroll.initial),r=_v(n);return{frame:Hb({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}}};function cy(e,t){return e.map(e=>t[e])}var uy=e=>{let{pageBorderBoxCenter:t,draggable:n,viewport:r}=e;const i=((e,t)=>bv(e.scroll.diff.displacement,t))(r,t),o=vv(i,n.page.borderBox.center);return bv(n.client.borderBox.center,o)},dy=e=>{let{draggable:t,destination:n,newPageBorderBoxCenter:r,viewport:i,withDroppableDisplacement:o,onlyOnMainAxis:s=!1}=e;const a=vv(r,t.page.borderBox.center),l={target:Ov(t.page.borderBox,a),destination:n,withDroppableDisplacement:o,viewport:i};return s?(e=>{return Vv({...e,isVisibleThroughFrameFn:(t=e.destination.axis,e=>{const n=Uv(e.top,e.bottom),r=Uv(e.left,e.right);return e=>t===Hv?n(e.top)&&n(e.bottom):r(e.left)&&r(e.right)})});var t})(l):Wv(l)},hy=e=>{let{isMovingForward:t,draggable:n,destination:r,draggables:i,previousImpact:o,viewport:s,previousPageBorderBoxCenter:a,previousClientSelection:l,afterCritical:c}=e;if(!r.isEnabled)return null;const u=Iv(r.descriptor.id,i),d=Lv(n,r),h=(e=>{let{isMovingForward:t,draggable:n,destination:r,insideDestination:i,previousImpact:o}=e;if(!r.isCombineEnabled)return null;if(!Dv(o))return null;function s(e){const t={type:"COMBINE",combine:{draggableId:e,droppableId:r.descriptor.id}};return{...o,at:t}}const a=o.displaced.all,l=a.length?a[0]:null;if(t)return l?s(l):null;const c=jv(n,i);if(!l){if(!c.length)return null;return s(c[c.length-1].descriptor.id)}const u=c.findIndex(e=>e.descriptor.id===l);-1===u&&cv(!1);const d=u-1;if(d<0)return null;return s(c[d].descriptor.id)})({isMovingForward:t,draggable:n,destination:r,insideDestination:u,previousImpact:o})||Kv({isMovingForward:t,isInHomeList:d,draggable:n,draggables:i,destination:r,insideDestination:u,previousImpact:o,viewport:s,afterCritical:c});if(!h)return null;const p=ay({impact:h,draggable:n,droppable:r,draggables:i,afterCritical:c});if(dy({draggable:n,destination:r,newPageBorderBoxCenter:p,viewport:s.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})){return{clientSelection:uy({pageBorderBoxCenter:p,draggable:n,viewport:s}),impact:h,scrollJumpRequest:null}}const f=vv(p,a);return{clientSelection:l,impact:(e=>{let{impact:t,viewport:n,destination:r,draggables:i,maxScrollChange:o}=e;const s=ly(n,bv(n.scroll.current,o)),a=r.frame?Cv(r,bv(r.frame.scroll.current,o)):r,l=t.displaced,c=Xv({afterDragging:cy(l.all,i),destination:r,displacedBy:t.displacedBy,viewport:s.frame,last:l,forceShouldAnimate:!1}),u=Xv({afterDragging:cy(l.all,i),destination:a,displacedBy:t.displacedBy,viewport:n.frame,last:l,forceShouldAnimate:!1}),d={},h={},p=[l,c,u];l.all.forEach(e=>{const t=function(e,t){for(let n=0;n{const t=e.subject.active;return t||cv(!1),t};const fy=(e,t)=>{const n=e.page.borderBox.center;return Jv(e.descriptor.id,t)?vv(n,t.displacedBy.point):n},my=(e,t)=>{const n=e.page.borderBox;return Jv(e.descriptor.id,t)?Ov(n,_v(t.displacedBy.point)):n};var gy=rv((function(e,t){const n=t[e.line];return{value:n,point:Sv(e.line,n)}}));const by=(e,t)=>({...e,scroll:{...e.scroll,max:t}}),vy=(e,t,n)=>{const r=e.frame;Lv(t,e)&&cv(!1),e.subject.withPlaceholder&&cv(!1);const i=gy(e.axis,t.displaceBy).point,o=((e,t,n)=>{const r=e.axis;if("virtual"===e.descriptor.mode)return Sv(r.line,t[r.line]);const i=e.subject.page.contentBox[r.size],o=Iv(e.descriptor.id,n).reduce((e,t)=>e+t.client.marginBox[r.size],0)+t[r.line]-i;return o<=0?null:Sv(r.line,o)})(e,i,n),s={placeholderSize:i,increasedBy:o,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!r){const t=Tv({page:e.subject.page,withPlaceholder:s,axis:e.axis,frame:e.frame});return{...e,subject:t}}const a=o?bv(r.scroll.max,o):r.scroll.max,l=by(r,a),c=Tv({page:e.subject.page,withPlaceholder:s,axis:e.axis,frame:l});return{...e,subject:c,frame:l}};var yy=e=>{let{isMovingForward:t,previousPageBorderBoxCenter:n,draggable:r,isOver:i,draggables:o,droppables:s,viewport:a,afterCritical:l}=e;const c=(e=>{let{isMovingForward:t,pageBorderBoxCenter:n,source:r,droppables:i,viewport:o}=e;const s=r.subject.active;if(!s)return null;const a=r.axis,l=Uv(s[a.start],s[a.end]),c=$v(i).filter(e=>e!==r).filter(e=>e.isEnabled).filter(e=>Boolean(e.subject.active)).filter(e=>Qv(o.frame)(py(e))).filter(e=>{const n=py(e);return t?s[a.crossAxisEnd]{const t=py(e),n=Uv(t[a.start],t[a.end]);return l(t[a.start])||l(t[a.end])||n(s[a.start])||n(s[a.end])}).sort((e,n)=>{const r=py(e)[a.crossAxisStart],i=py(n)[a.crossAxisStart];return t?r-i:i-r}).filter((e,t,n)=>py(e)[a.crossAxisStart]===py(n[0])[a.crossAxisStart]);if(!c.length)return null;if(1===c.length)return c[0];const u=c.filter(e=>Uv(py(e)[a.start],py(e)[a.end])(n[a.line]));return 1===u.length?u[0]:u.length>1?u.sort((e,t)=>py(e)[a.start]-py(t)[a.start])[0]:c.sort((e,t)=>{const r=wv(n,Ev(py(e))),i=wv(n,Ev(py(t)));return r!==i?r-i:py(e)[a.start]-py(t)[a.start]})[0]})({isMovingForward:t,pageBorderBoxCenter:n,source:i,droppables:s,viewport:a});if(!c)return null;const u=Iv(c.descriptor.id,o),d=(e=>{let{previousPageBorderBoxCenter:t,moveRelativeTo:n,insideDestination:r,draggable:i,draggables:o,destination:s,viewport:a,afterCritical:l}=e;if(!n){if(r.length)return null;const e={displaced:Fv,displacedBy:Bv,at:{type:"REORDER",destination:{droppableId:s.descriptor.id,index:0}}},t=ay({impact:e,draggable:i,droppable:s,draggables:o,afterCritical:l}),n=Lv(i,s)?s:vy(s,i,o);return dy({draggable:i,destination:n,newPageBorderBoxCenter:t,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?e:null}const c=Boolean(t[s.axis.line]<=n.page.borderBox.center[s.axis.line]),u=(()=>{const e=n.descriptor.index;return n.descriptor.id===i.descriptor.id||c?e:e+1})(),d=gy(s.axis,i.displaceBy);return Zv({draggable:i,insideDestination:r,destination:s,viewport:a,displacedBy:d,last:Fv,index:u})})({previousPageBorderBoxCenter:n,destination:c,draggable:r,draggables:o,moveRelativeTo:(e=>{let{pageBorderBoxCenter:t,viewport:n,destination:r,insideDestination:i,afterCritical:o}=e;return i.filter(e=>Wv({target:my(e,o),destination:r,viewport:n.frame,withDroppableDisplacement:!0})).sort((e,n)=>{const i=xv(t,sy(r,fy(e,o))),s=xv(t,sy(r,fy(n,o)));return i{const t=e.at;return t?"REORDER"===t.type?t.destination.droppableId:t.combine.droppableId:null};var Sy=e=>{let{state:t,type:n}=e;const r=((e,t)=>{const n=_y(e);return n?t[n]:null})(t.impact,t.dimensions.droppables),i=Boolean(r),o=t.dimensions.droppables[t.critical.droppable.id],s=r||o,a=s.axis.direction,l="vertical"===a&&("MOVE_UP"===n||"MOVE_DOWN"===n)||"horizontal"===a&&("MOVE_LEFT"===n||"MOVE_RIGHT"===n);if(l&&!i)return null;const c="MOVE_DOWN"===n||"MOVE_RIGHT"===n,u=t.dimensions.draggables[t.critical.draggable.id],d=t.current.page.borderBoxCenter,{draggables:h,droppables:p}=t.dimensions;return l?hy({isMovingForward:c,previousPageBorderBoxCenter:d,draggable:u,destination:s,draggables:h,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):yy({isMovingForward:c,previousPageBorderBoxCenter:d,draggable:u,isOver:s,draggables:h,droppables:p,viewport:t.viewport,afterCritical:t.afterCritical})};function xy(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}function wy(e){const t=Uv(e.top,e.bottom),n=Uv(e.left,e.right);return function(e){return t(e.y)&&n(e.x)}}function ky(e){let{pageBorderBox:t,draggable:n,droppables:r}=e;const i=$v(r).filter(e=>{if(!e.isEnabled)return!1;const n=e.subject.active;if(!n)return!1;if(i=n,!((r=t).lefti.left&&r.topi.top))return!1;var r,i;if(wy(n)(t.center))return!0;const o=e.axis,s=n.center[o.crossAxisLine],a=t[o.crossAxisStart],l=t[o.crossAxisEnd],c=Uv(n[o.crossAxisStart],n[o.crossAxisEnd]),u=c(a),d=c(l);return!u&&!d||(u?as)});return i.length?1===i.length?i[0].descriptor.id:function(e){let{pageBorderBox:t,draggable:n,candidates:r}=e;const i=n.page.borderBox.center,o=r.map(e=>{const n=e.axis,r=Sv(e.axis.line,t.center[n.line],e.page.borderBox.center[n.crossAxisLine]);return{id:e.descriptor.id,distance:xv(i,r)}}).sort((e,t)=>t.distance-e.distance);return o[0]?o[0].id:null}({pageBorderBox:t,draggable:n,candidates:i}):null}const Oy=(e,t)=>Hb(Ov(e,t));function Ey(e){let{displaced:t,id:n}=e;return Boolean(t.visible[n]||t.invisible[n])}var Ay=e=>{let{pageOffset:t,draggable:n,draggables:r,droppables:i,previousImpact:o,viewport:s,afterCritical:a}=e;const l=Oy(n.page.borderBox,t),c=ky({pageBorderBox:l,draggable:n,droppables:i});if(!c)return zv;const u=i[c],d=Iv(u.descriptor.id,r),h=((e,t)=>{const n=e.frame;return n?Oy(t,n.scroll.diff.value):t})(u,l);return(e=>{let{draggable:t,pageBorderBoxWithDroppableScroll:n,previousImpact:r,destination:i,insideDestination:o,afterCritical:s}=e;if(!i.isCombineEnabled)return null;const a=i.axis,l=gy(i.axis,t.displaceBy),c=l.value,u=n[a.start],d=n[a.end],h=jv(t,o).find(e=>{const t=e.descriptor.id,n=e.page.borderBox,i=n[a.size]/4,o=Jv(t,s),l=Ey({displaced:r.displaced,id:t});return o?l?d>n[a.start]+i&&dn[a.start]-c+i&&un[a.start]+c+i&&dn[a.start]+i&&u{let{pageBorderBoxWithDroppableScroll:t,draggable:n,destination:r,insideDestination:i,last:o,viewport:s,afterCritical:a}=e;const l=r.axis,c=gy(r.axis,n.displaceBy),u=c.value,d=t[l.start],h=t[l.end],p=function(e){let{draggable:t,closest:n,inHomeList:r}=e;return n?r&&n.descriptor.index>t.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}({draggable:n,closest:jv(n,i).find(e=>{const t=e.descriptor.id,n=e.page.borderBox.center[l.line],r=Jv(t,a),i=Ey({displaced:o,id:t});return r?i?h<=n:d({...e,[t.descriptor.id]:t});const Cy=e=>{let{previousImpact:t,impact:n,droppables:r}=e;const i=_y(t),o=_y(n);if(!i)return r;if(i===o)return r;const s=r[i];if(!s.subject.withPlaceholder)return r;const a=(e=>{const t=e.subject.withPlaceholder;t||cv(!1);const n=e.frame;if(!n){const t=Tv({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:t}}const r=t.oldFrameMaxScroll;r||cv(!1);const i=by(n,r),o=Tv({page:e.subject.page,axis:e.axis,frame:i,withPlaceholder:null});return{...e,subject:o,frame:i}})(s);return Ty(r,a)};var My=e=>{let{state:t,clientSelection:n,dimensions:r,viewport:i,impact:o,scrollJumpRequest:s}=e;const a=i||t.viewport,l=r||t.dimensions,c=n||t.current.client.selection,u=vv(c,t.initial.client.selection),d={offset:u,selection:c,borderBoxCenter:bv(t.initial.client.borderBoxCenter,u)},h={selection:bv(d.selection,a.scroll.current),borderBoxCenter:bv(d.borderBoxCenter,a.scroll.current),offset:bv(d.offset,a.scroll.diff.value)},p={client:d,page:h};if("COLLECTING"===t.phase)return{...t,dimensions:l,viewport:a,current:p};const f=l.draggables[t.critical.draggable.id],m=o||Ay({pageOffset:h.offset,draggable:f,draggables:l.draggables,droppables:l.droppables,previousImpact:t.impact,viewport:a,afterCritical:t.afterCritical}),g=(e=>{let{draggable:t,draggables:n,droppables:r,previousImpact:i,impact:o}=e;const s=Cy({previousImpact:i,impact:o,droppables:r}),a=_y(o);if(!a)return s;const l=r[a];if(Lv(t,l))return s;if(l.subject.withPlaceholder)return s;const c=vy(l,t,n);return Ty(s,c)})({draggable:f,impact:m,previousImpact:t.impact,draggables:l.draggables,droppables:l.droppables});return{...t,current:p,dimensions:{draggables:l.draggables,droppables:g},impact:m,viewport:a,scrollJumpRequest:s||null,forceShouldAnimate:!s&&null}};var Py=e=>{let{impact:t,viewport:n,draggables:r,destination:i,forceShouldAnimate:o}=e;const s=t.displaced,a=Xv({afterDragging:function(e,t){return e.map(e=>t[e])}(s.all,r),destination:i,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:o,last:s});return{...t,displaced:a}},$y=e=>{let{impact:t,draggable:n,droppable:r,draggables:i,viewport:o,afterCritical:s}=e;const a=ay({impact:t,draggable:n,draggables:i,droppable:r,afterCritical:s});return uy({pageBorderBoxCenter:a,draggable:n,viewport:o})},Ry=e=>{let{state:t,dimensions:n,viewport:r}=e;"SNAP"!==t.movementMode&&cv(!1);const i=t.impact,o=r||t.viewport,s=n||t.dimensions,{draggables:a,droppables:l}=s,c=a[t.critical.draggable.id],u=_y(i);u||cv(!1);const d=l[u],h=Py({impact:i,viewport:o,destination:d,draggables:a}),p=$y({impact:h,draggable:c,droppable:d,draggables:a,viewport:o,afterCritical:t.afterCritical});return My({impact:h,clientSelection:p,state:t,dimensions:s,viewport:o})},Iy=e=>{let{draggable:t,home:n,draggables:r,viewport:i}=e;const o=gy(n.axis,t.displaceBy),s=Iv(n.descriptor.id,r),a=s.indexOf(t);-1===a&&cv(!1);const l=s.slice(a+1),c=l.reduce((e,t)=>(e[t.descriptor.id]=!0,e),{}),u={inVirtualList:"virtual"===n.descriptor.mode,displacedBy:o,effected:c};var d;return{impact:{displaced:Xv({afterDragging:l,destination:n,displacedBy:o,last:null,viewport:i.frame,forceShouldAnimate:!1}),displacedBy:o,at:{type:"REORDER",destination:(d=t.descriptor,{index:d.index,droppableId:d.droppableId})}},afterCritical:u}};const Dy=e=>{0},Ny=e=>{0};var jy=e=>{let{additions:t,updatedDroppables:n,viewport:r}=e;const i=r.scroll.diff.value;return t.map(e=>{const t=e.descriptor.droppableId,o=(e=>{const t=e.frame;return t||cv(!1),t})(n[t]).scroll.diff.value;return(e=>{let{draggable:t,offset:n,initialWindowScroll:r}=e;const i=Zb(t.client,n),o=Jb(i,r);return{...t,placeholder:{...t.placeholder,client:i},client:i,page:o}})({draggable:e,offset:bv(i,o),initialWindowScroll:r.scroll.initial})})};const Ly=e=>"SNAP"===e.movementMode,By=(e,t,n)=>{const r=((e,t)=>({draggables:e.draggables,droppables:Ty(e.droppables,t)}))(e.dimensions,t);return!Ly(e)||n?My({state:e,dimensions:r}):Ry({state:e,dimensions:r})};function Fy(e){return e.isDragging&&"SNAP"===e.movementMode?{...e,scrollJumpRequest:null}:e}const zy={phase:"IDLE",completed:null,shouldFlush:!1};var Uy=function(e,t){if(void 0===e&&(e=zy),"FLUSH"===t.type)return{...zy,shouldFlush:!0};if("INITIAL_PUBLISH"===t.type){"IDLE"!==e.phase&&cv(!1);const{critical:n,clientSelection:r,viewport:i,dimensions:o,movementMode:s}=t.payload,a=o.draggables[n.draggable.id],l=o.droppables[n.droppable.id],c={selection:r,borderBoxCenter:a.client.borderBox.center,offset:gv},u={client:c,page:{selection:bv(c.selection,i.scroll.initial),borderBoxCenter:bv(c.selection,i.scroll.initial),offset:bv(c.selection,i.scroll.diff.value)}},d=$v(o.droppables).every(e=>!e.isFixedOnPage),{impact:h,afterCritical:p}=Iy({draggable:a,home:l,draggables:o.draggables,viewport:i});return{phase:"DRAGGING",isDragging:!0,critical:n,movementMode:s,dimensions:o,initial:u,current:u,isWindowScrollAllowed:d,impact:h,afterCritical:p,onLiftImpact:h,viewport:i,scrollJumpRequest:null,forceShouldAnimate:null}}if("COLLECTION_STARTING"===t.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&cv(!1);return{...e,phase:"COLLECTING"}}if("PUBLISH_WHILE_DRAGGING"===t.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&cv(!1),(e=>{let{state:t,published:n}=e;Dy();const r=n.modified.map(e=>{const n=t.dimensions.droppables[e.droppableId];return Cv(n,e.scroll)}),i={...t.dimensions.droppables,...Mv(r)},o=Pv(jy({additions:n.additions,updatedDroppables:i,viewport:t.viewport})),s={...t.dimensions.draggables,...o};n.removals.forEach(e=>{delete s[e]});const a={droppables:i,draggables:s},l=_y(t.impact),c=l?a.droppables[l]:null,u=a.draggables[t.critical.draggable.id],d=a.droppables[t.critical.droppable.id],{impact:h,afterCritical:p}=Iy({draggable:u,home:d,draggables:s,viewport:t.viewport}),f=c&&c.isCombineEnabled?t.impact:h,m=Ay({pageOffset:t.current.page.offset,draggable:a.draggables[t.critical.draggable.id],draggables:a.draggables,droppables:a.droppables,previousImpact:f,viewport:t.viewport,afterCritical:p});Ny();const g={...t,phase:"DRAGGING",impact:m,onLiftImpact:h,dimensions:a,afterCritical:p,forceShouldAnimate:!1};if("COLLECTING"===t.phase)return g;return{...g,phase:"DROP_PENDING",reason:t.reason,isWaiting:!1}})({state:e,published:t.payload});if("MOVE"===t.type){if("DROP_PENDING"===e.phase)return e;xy(e)||cv(!1);const{client:n}=t.payload;return yv(n,e.current.client.selection)?e:My({state:e,clientSelection:n,impact:Ly(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===t.type){if("DROP_PENDING"===e.phase)return Fy(e);if("COLLECTING"===e.phase)return Fy(e);xy(e)||cv(!1);const{id:n,newScroll:r}=t.payload,i=e.dimensions.droppables[n];if(!i)return e;const o=Cv(i,r);return By(e,o,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;xy(e)||cv(!1);const{id:n,isEnabled:r}=t.payload,i=e.dimensions.droppables[n];i||cv(!1),i.isEnabled===r&&cv(!1);const o={...i,isEnabled:r};return By(e,o,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;xy(e)||cv(!1);const{id:n,isCombineEnabled:r}=t.payload,i=e.dimensions.droppables[n];i||cv(!1),i.isCombineEnabled===r&&cv(!1);const o={...i,isCombineEnabled:r};return By(e,o,!0)}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;xy(e)||cv(!1),e.isWindowScrollAllowed||cv(!1);const n=t.payload.newScroll;if(yv(e.viewport.scroll.current,n))return Fy(e);const r=ly(e.viewport,n);return Ly(e)?Ry({state:e,viewport:r}):My({state:e,viewport:r})}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type){if(!xy(e))return e;const n=t.payload.maxScroll;if(yv(n,e.viewport.scroll.max))return e;const r={...e.viewport,scroll:{...e.viewport.scroll,max:n}};return{...e,viewport:r}}if("MOVE_UP"===t.type||"MOVE_DOWN"===t.type||"MOVE_LEFT"===t.type||"MOVE_RIGHT"===t.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&cv(!1);const n=Sy({state:e,type:t.type});return n?My({state:e,impact:n.impact,clientSelection:n.clientSelection,scrollJumpRequest:n.scrollJumpRequest}):e}if("DROP_PENDING"===t.type){const n=t.payload.reason;"COLLECTING"!==e.phase&&cv(!1);return{...e,phase:"DROP_PENDING",isWaiting:!0,reason:n}}if("DROP_ANIMATE"===t.type){const{completed:n,dropDuration:r,newHomeClientOffset:i}=t.payload;"DRAGGING"!==e.phase&&"DROP_PENDING"!==e.phase&&cv(!1);return{phase:"DROP_ANIMATING",completed:n,dropDuration:r,newHomeClientOffset:i,dimensions:e.dimensions}}if("DROP_COMPLETE"===t.type){const{completed:e}=t.payload;return{phase:"IDLE",completed:e,shouldFlush:!1}}return e};const Qy=e=>({type:"PUBLISH_WHILE_DRAGGING",payload:e}),qy=()=>({type:"COLLECTION_STARTING",payload:null}),Hy=e=>({type:"UPDATE_DROPPABLE_SCROLL",payload:e}),Gy=e=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}),Vy=e=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}),Wy=e=>({type:"MOVE",payload:e}),Xy=()=>({type:"MOVE_UP",payload:null}),Yy=()=>({type:"MOVE_DOWN",payload:null}),Zy=()=>({type:"MOVE_RIGHT",payload:null}),Jy=()=>({type:"MOVE_LEFT",payload:null}),Ky=e=>({type:"DROP_COMPLETE",payload:e}),e_=e=>({type:"DROP",payload:e}),t_=()=>({type:"DROP_ANIMATION_FINISHED",payload:null});const n_="cubic-bezier(.2,1,.1,1)",r_={drop:0,combining:.7},i_={drop:.75},o_={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},s_=`${o_.outOfTheWay}s ${"cubic-bezier(0.2, 0, 0, 1)"}`,a_={fluid:"opacity "+s_,snap:`transform ${s_}, opacity ${s_}`,drop:e=>{const t=`${e}s ${n_}`;return`transform ${t}, opacity ${t}`},outOfTheWay:"transform "+s_,placeholder:`height ${s_}, width ${s_}, margin ${s_}`},l_=e=>yv(e,gv)?void 0:`translate(${e.x}px, ${e.y}px)`,c_=l_,u_=(e,t)=>{const n=l_(e);if(n)return t?`${n} scale(${i_.drop})`:n},{minDropTime:d_,maxDropTime:h_}=o_,p_=h_-d_;var f_=e=>{let{getState:t,dispatch:n}=e;return e=>r=>{if("DROP"!==r.type)return void e(r);const i=t(),o=r.payload.reason;if("COLLECTING"===i.phase)return void n((e=>({type:"DROP_PENDING",payload:e}))({reason:o}));if("IDLE"===i.phase)return;"DROP_PENDING"===i.phase&&i.isWaiting&&cv(!1),"DRAGGING"!==i.phase&&"DROP_PENDING"!==i.phase&&cv(!1);const s=i.critical,a=i.dimensions,l=a.draggables[i.critical.draggable.id],{impact:c,didDropInsideDroppable:u}=(e=>{let{draggables:t,reason:n,lastImpact:r,home:i,viewport:o,onLiftImpact:s}=e;if(!r.at||"DROP"!==n){return{impact:Py({draggables:t,impact:s,destination:i,viewport:o,forceShouldAnimate:!0}),didDropInsideDroppable:!1}}if("REORDER"===r.at.type)return{impact:r,didDropInsideDroppable:!0};return{impact:{...r,displaced:Fv},didDropInsideDroppable:!0}})({reason:o,lastImpact:i.impact,afterCritical:i.afterCritical,onLiftImpact:i.onLiftImpact,home:i.dimensions.droppables[i.critical.droppable.id],viewport:i.viewport,draggables:i.dimensions.draggables}),d=u?Dv(c):null,h=u?Nv(c):null,p={index:s.draggable.index,droppableId:s.droppable.id},f={draggableId:l.descriptor.id,type:l.descriptor.type,source:p,reason:o,mode:i.movementMode,destination:d,combine:h},m=(e=>{let{impact:t,draggable:n,dimensions:r,viewport:i,afterCritical:o}=e;const{draggables:s,droppables:a}=r,l=_y(t),c=l?a[l]:null,u=a[n.descriptor.droppableId],d=$y({impact:t,draggable:n,draggables:s,afterCritical:o,droppable:c||u,viewport:i});return vv(d,n.client.borderBox.center)})({impact:c,draggable:l,dimensions:a,viewport:i.viewport,afterCritical:i.afterCritical}),g={critical:i.critical,afterCritical:i.afterCritical,result:f,impact:c};if(!(!yv(i.current.client.offset,m)||Boolean(f.combine)))return void n(Ky({completed:g}));const b=(e=>{let{current:t,destination:n,reason:r}=e;const i=xv(t,n);if(i<=0)return d_;if(i>=1500)return h_;const o=d_+p_*(i/1500);return Number(("CANCEL"===r?.6*o:o).toFixed(2))})({current:i.current.client.offset,destination:m,reason:o});n((e=>({type:"DROP_ANIMATE",payload:e}))({newHomeClientOffset:m,dropDuration:b,completed:g}))}},m_=()=>({x:window.pageXOffset,y:window.pageYOffset});function g_(e){let{onWindowScroll:t}=e;const n=iv((function(){t(m_())})),r=(i=n,{eventName:"scroll",options:{passive:!0,capture:!1},fn:e=>{e.target!==window&&e.target!==window.document||i()}});var i;let o=sv;function s(){return o!==sv}return{start:function(){s()&&cv(!1),o=av(window,[r])},stop:function(){s()||cv(!1),n.cancel(),o(),o=sv},isActive:s}}var b_=e=>{const t=g_({onWindowScroll:t=>{e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:t}})}});return e=>n=>{t.isActive()||"INITIAL_PUBLISH"!==n.type||t.start(),t.isActive()&&(e=>"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type)(n)&&t.stop(),e(n)}},v_=()=>{const e=[];return{add:t=>{const n=setTimeout(()=>(t=>{const n=e.findIndex(e=>e.timerId===t);-1===n&&cv(!1);const[r]=e.splice(n,1);r.callback()})(n)),r={timerId:n,callback:t};e.push(r)},flush:()=>{if(!e.length)return;const t=[...e];e.length=0,t.forEach(e=>{clearTimeout(e.timerId),e.callback()})}}};const y_=(e,t)=>{Dy(),t(),Ny()},__=(e,t)=>({draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t});function S_(e,t,n,r){if(!e)return void n(r(t));const i=(e=>{let t=!1,n=!1;const r=setTimeout(()=>{n=!0}),i=i=>{t||n||(t=!0,e(i),clearTimeout(r))};return i.wasCalled=()=>t,i})(n);e(t,{announce:i}),i.wasCalled()||n(r(t))}var x_=(e,t)=>{const n=((e,t)=>{const n=v_();let r=null;const i=n=>{r||cv(!1),r=null,y_(0,()=>S_(e().onDragEnd,n,t,mv.onDragEnd))};return{beforeCapture:(t,n)=>{r&&cv(!1),y_(0,()=>{const r=e().onBeforeCapture;if(r){r({draggableId:t,mode:n})}})},beforeStart:(t,n)=>{r&&cv(!1),y_(0,()=>{const r=e().onBeforeDragStart;r&&r(__(t,n))})},start:(i,o)=>{r&&cv(!1);const s=__(i,o);r={mode:o,lastCritical:i,lastLocation:s.source,lastCombine:null},n.add(()=>{y_(0,()=>S_(e().onDragStart,s,t,mv.onDragStart))})},update:(i,o)=>{const s=Dv(o),a=Nv(o);r||cv(!1);const l=!((e,t)=>{if(e===t)return!0;const n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,r=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&r})(i,r.lastCritical);l&&(r.lastCritical=i);const c=(u=r.lastLocation,d=s,!(null==u&&null==d||null!=u&&null!=d&&u.droppableId===d.droppableId&&u.index===d.index));var u,d;c&&(r.lastLocation=s);const h=!((e,t)=>null==e&&null==t||null!=e&&null!=t&&(e.draggableId===t.draggableId&&e.droppableId===t.droppableId))(r.lastCombine,a);if(h&&(r.lastCombine=a),!l&&!c&&!h)return;const p={...__(i,r.mode),combine:a,destination:s};n.add(()=>{y_(0,()=>S_(e().onDragUpdate,p,t,mv.onDragUpdate))})},flush:()=>{r||cv(!1),n.flush()},drop:i,abort:()=>{if(!r)return;const e={...__(r.lastCritical,r.mode),combine:null,destination:null,reason:"CANCEL"};i(e)}}})(e,t);return e=>t=>r=>{if("BEFORE_INITIAL_CAPTURE"===r.type)return void n.beforeCapture(r.payload.draggableId,r.payload.movementMode);if("INITIAL_PUBLISH"===r.type){const e=r.payload.critical;return n.beforeStart(e,r.payload.movementMode),t(r),void n.start(e,r.payload.movementMode)}if("DROP_COMPLETE"===r.type){const e=r.payload.completed.result;return n.flush(),t(r),void n.drop(e)}if(t(r),"FLUSH"===r.type)return void n.abort();const i=e.getState();"DRAGGING"===i.phase&&n.update(i.critical,i.impact)}};var w_=e=>t=>n=>{if("DROP_ANIMATION_FINISHED"!==n.type)return void t(n);const r=e.getState();"DROP_ANIMATING"!==r.phase&&cv(!1),e.dispatch(Ky({completed:r.completed}))};var k_=e=>{let t=null,n=null;return r=>i=>{if("FLUSH"!==i.type&&"DROP_COMPLETE"!==i.type&&"DROP_ANIMATION_FINISHED"!==i.type||(n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)),r(i),"DROP_ANIMATE"!==i.type)return;const o={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){"DROP_ANIMATING"===e.getState().phase&&e.dispatch({type:"DROP_ANIMATION_FINISHED",payload:null})}};n=requestAnimationFrame(()=>{n=null,t=av(window,[o])})}};var O_=e=>t=>n=>{if(t(n),"PUBLISH_WHILE_DRAGGING"!==n.type)return;const r=e.getState();"DROP_PENDING"===r.phase&&(r.isWaiting||e.dispatch(e_({reason:r.reason})))};const E_=pb.d;var A_=e=>{let{dimensionMarshal:t,focusMarshal:n,styleMarshal:r,getResponders:i,announce:o,autoScroller:s}=e;return Object(pb.e)(Uy,E_(Object(pb.a)((a=r,()=>e=>t=>{"INITIAL_PUBLISH"===t.type&&a.dragging(),"DROP_ANIMATE"===t.type&&a.dropping(t.payload.completed.result.reason),"FLUSH"!==t.type&&"DROP_COMPLETE"!==t.type||a.resting(),e(t)}),(e=>()=>t=>n=>{"DROP_COMPLETE"!==n.type&&"FLUSH"!==n.type&&"DROP_ANIMATE"!==n.type||e.stopPublishing(),t(n)})(t),(e=>t=>{let{getState:n,dispatch:r}=t;return t=>i=>{if("LIFT"!==i.type)return void t(i);const{id:o,clientSelection:s,movementMode:a}=i.payload,l=n();"DROP_ANIMATING"===l.phase&&r(Ky({completed:l.completed})),"IDLE"!==n().phase&&cv(!1),r({type:"FLUSH",payload:null}),r({type:"BEFORE_INITIAL_CAPTURE",payload:{draggableId:o,movementMode:a}});const c={draggableId:o,scrollOptions:{shouldPublishImmediately:"SNAP"===a}},{critical:u,dimensions:d,viewport:h}=e.startPublishing(c);r((e=>({type:"INITIAL_PUBLISH",payload:e}))({critical:u,dimensions:d,clientSelection:s,movementMode:a,viewport:h}))}})(t),f_,w_,k_,O_,(e=>t=>n=>r=>{if((e=>"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type)(r))return e.stop(),void n(r);if("INITIAL_PUBLISH"===r.type){n(r);const i=t.getState();return"DRAGGING"!==i.phase&&cv(!1),void e.start(i)}n(r),e.scroll(t.getState())})(s),b_,(e=>{let t=!1;return()=>n=>r=>{if("INITIAL_PUBLISH"===r.type)return t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),void e.tryRestoreFocusRecorded();if(n(r),t){if("FLUSH"===r.type)return t=!1,void e.tryRestoreFocusRecorded();if("DROP_COMPLETE"===r.type){t=!1;const n=r.payload.completed.result;n.combine&&e.tryShiftRecord(n.draggableId,n.combine.draggableId),e.tryRestoreFocusRecorded()}}}})(n),x_(i,o))));var a};var T_=e=>{let{scrollHeight:t,scrollWidth:n,height:r,width:i}=e;const o=vv({x:n,y:t},{x:i,y:r});return{x:Math.max(0,o.x),y:Math.max(0,o.y)}},C_=()=>{const e=document.documentElement;return e||cv(!1),e},M_=()=>{const e=C_();return T_({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},P_=e=>{let{critical:t,scrollOptions:n,registry:r}=e;Dy();const i=(()=>{const e=m_(),t=M_(),n=e.y,r=e.x,i=C_(),o=i.clientWidth,s=i.clientHeight;return{frame:Hb({top:n,left:r,right:r+o,bottom:n+s}),scroll:{initial:e,current:e,max:t,diff:{value:gv,displacement:gv}}}})(),o=i.scroll.current,s=t.droppable,a=r.droppable.getAllByType(s.type).map(e=>e.callbacks.getDimensionAndWatchScroll(o,n)),l=r.draggable.getAllByType(t.draggable.type).map(e=>e.getDimension(o)),c={draggables:Pv(l),droppables:Mv(a)};Ny();return{dimensions:c,critical:t,viewport:i}};function $_(e,t,n){if(n.descriptor.id===t.id)return!1;if(n.descriptor.type!==t.type)return!1;return"virtual"===e.droppable.getById(n.descriptor.droppableId).descriptor.mode}var R_=(e,t)=>{let n=null;const r=function(e){let{registry:t,callbacks:n}=e,r={additions:{},removals:{},modified:{}},i=null;const o=()=>{i||(n.collectionStarting(),i=requestAnimationFrame(()=>{i=null,Dy();const{additions:e,removals:o,modified:s}=r,a=Object.keys(e).map(e=>t.draggable.getById(e).getDimension(gv)).sort((e,t)=>e.descriptor.index-t.descriptor.index),l=Object.keys(s).map(e=>({droppableId:e,scroll:t.droppable.getById(e).callbacks.getScrollWhileDragging()})),c={additions:a,removals:Object.keys(o),modified:l};r={additions:{},removals:{},modified:{}},Ny(),n.publish(c)}))};return{add:e=>{const t=e.descriptor.id;r.additions[t]=e,r.modified[e.descriptor.droppableId]=!0,r.removals[t]&&delete r.removals[t],o()},remove:e=>{const t=e.descriptor;r.removals[t.id]=!0,r.modified[t.droppableId]=!0,r.additions[t.id]&&delete r.additions[t.id],o()},stop:()=>{i&&(cancelAnimationFrame(i),i=null,r={additions:{},removals:{},modified:{}})}}}({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),i=t=>{n||cv(!1);const i=n.critical.draggable;"ADDITION"===t.type&&$_(e,i,t.value)&&r.add(t.value),"REMOVAL"===t.type&&$_(e,i,t.value)&&r.remove(t.value)};return{updateDroppableIsEnabled:(r,i)=>{e.droppable.exists(r)||cv(!1),n&&t.updateDroppableIsEnabled({id:r,isEnabled:i})},updateDroppableIsCombineEnabled:(r,i)=>{n&&(e.droppable.exists(r)||cv(!1),t.updateDroppableIsCombineEnabled({id:r,isCombineEnabled:i}))},scrollDroppable:(t,r)=>{n&&e.droppable.getById(t).callbacks.scroll(r)},updateDroppableScroll:(r,i)=>{n&&(e.droppable.exists(r)||cv(!1),t.updateDroppableScroll({id:r,newScroll:i}))},startPublishing:t=>{n&&cv(!1);const r=e.draggable.getById(t.draggableId),o=e.droppable.getById(r.descriptor.droppableId),s={draggable:r.descriptor,droppable:o.descriptor},a=e.subscribe(i);return n={critical:s,unsubscribe:a},P_({critical:s,registry:e,scrollOptions:t.scrollOptions})},stopPublishing:()=>{if(!n)return;r.stop();const t=n.critical.droppable;e.droppable.getAllByType(t.type).forEach(e=>e.callbacks.dragStopped()),n.unsubscribe(),n=null}}},I_=(e,t)=>"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&(e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason),D_=e=>{window.scrollBy(e.x,e.y)};const N_=rv(e=>$v(e).filter(e=>!!e.isEnabled&&!!e.frame));var j_=e=>{let{center:t,destination:n,droppables:r}=e;if(n){const e=r[n];return e.frame?e:null}return((e,t)=>N_(t).find(t=>(t.frame||cv(!1),wy(t.frame.pageMarginBox)(e)))||null)(t,r)};const L_={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:e=>e**2,durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var B_=e=>{let{startOfRange:t,endOfRange:n,current:r}=e;const i=n-t;if(0===i)return 0;return(r-t)/i},F_=e=>{let{distanceToEdge:t,thresholds:n,dragStartTime:r,shouldUseTimeDampening:i,getAutoScrollerOptions:o}=e;const s=function(e,t,n){void 0===n&&(n=()=>L_);const r=n();if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return r.maxPixelScroll;if(e===t.startScrollingFrom)return 1;const i=1-B_({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),o=r.maxPixelScroll*r.ease(i);return Math.ceil(o)}(t,n,o);return 0===s?0:i?Math.max(((e,t,n)=>{const r=n(),i=r.durationDampening.accelerateAt,o=r.durationDampening.stopDampeningAt,s=t,a=o,l=Date.now()-s;if(l>=o)return e;if(l{let{container:t,distanceToEdges:n,dragStartTime:r,axis:i,shouldUseTimeDampening:o,getAutoScrollerOptions:s}=e;const a=function(e,t,n){void 0===n&&(n=()=>L_);const r=n();return{startScrollingFrom:e[t.size]*r.startFromPercentage,maxScrollValueAt:e[t.size]*r.maxScrollAtPercentage}}(t,i,s);return n[i.end]0===e?0:e);var Q_=e=>{let{dragStartTime:t,container:n,subject:r,center:i,shouldUseTimeDampening:o,getAutoScrollerOptions:s}=e;const a={top:i.y-n.top,right:n.right-i.x,bottom:n.bottom-i.y,left:i.x-n.left},l=z_({container:n,distanceToEdges:a,dragStartTime:t,axis:Hv,shouldUseTimeDampening:o,getAutoScrollerOptions:s}),c=z_({container:n,distanceToEdges:a,dragStartTime:t,axis:Gv,shouldUseTimeDampening:o,getAutoScrollerOptions:s}),u=U_({x:c,y:l});if(yv(u,gv))return null;const d=(e=>{let{container:t,subject:n,proposedScroll:r}=e;const i=n.height>t.height,o=n.width>t.width;return o||i?o&&i?null:{x:o?0:r.x,y:i?0:r.y}:r})({container:n,subject:r,proposedScroll:u});return d?yv(d,gv)?null:d:null};const q_=kv(e=>0===e?0:e>0?1:-1),H_=(()=>{const e=(e,t)=>e<0?e:e>t?e-t:0;return t=>{let{current:n,max:r,change:i}=t;const o=bv(n,i),s={x:e(o.x,r.x),y:e(o.y,r.y)};return yv(s,gv)?null:s}})(),G_=e=>{let{max:t,current:n,change:r}=e;const i={x:Math.max(n.x,t.x),y:Math.max(n.y,t.y)},o=q_(r),s=H_({max:i,current:n,change:o});return!s||(0!==o.x&&0===s.x||0!==o.y&&0===s.y)},V_=(e,t)=>G_({current:e.scroll.current,max:e.scroll.max,change:t}),W_=(e,t)=>{const n=e.frame;return!!n&&G_({current:n.scroll.current,max:n.scroll.max,change:t})};var X_=e=>{let{state:t,dragStartTime:n,shouldUseTimeDampening:r,scrollWindow:i,scrollDroppable:o,getAutoScrollerOptions:s}=e;const a=t.current.page.borderBoxCenter,l=t.dimensions.draggables[t.critical.draggable.id].page.marginBox;if(t.isWindowScrollAllowed){const e=(e=>{let{viewport:t,subject:n,center:r,dragStartTime:i,shouldUseTimeDampening:o,getAutoScrollerOptions:s}=e;const a=Q_({dragStartTime:i,container:t.frame,subject:n,center:r,shouldUseTimeDampening:o,getAutoScrollerOptions:s});return a&&V_(t,a)?a:null})({dragStartTime:n,viewport:t.viewport,subject:l,center:a,shouldUseTimeDampening:r,getAutoScrollerOptions:s});if(e)return void i(e)}const c=j_({center:a,destination:_y(t.impact),droppables:t.dimensions.droppables});if(!c)return;const u=(e=>{let{droppable:t,subject:n,center:r,dragStartTime:i,shouldUseTimeDampening:o,getAutoScrollerOptions:s}=e;const a=t.frame;if(!a)return null;const l=Q_({dragStartTime:i,container:a.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:o,getAutoScrollerOptions:s});return l&&W_(t,l)?l:null})({dragStartTime:n,droppable:c,subject:l,center:a,shouldUseTimeDampening:r,getAutoScrollerOptions:s});u&&o(c.descriptor.id,u)},Y_=e=>{let{move:t,scrollDroppable:n,scrollWindow:r}=e;const i=(e,t)=>{if(!W_(e,t))return t;const r=((e,t)=>{const n=e.frame;return n&&W_(e,t)?H_({current:n.scroll.current,max:n.scroll.max,change:t}):null})(e,t);if(!r)return n(e.descriptor.id,t),null;const i=vv(t,r);n(e.descriptor.id,i);return vv(t,i)},o=(e,t,n)=>{if(!e)return n;if(!V_(t,n))return n;const i=((e,t)=>{if(!V_(e,t))return null;const n=e.scroll.max,r=e.scroll.current;return H_({current:r,max:n,change:t})})(t,n);if(!i)return r(n),null;const o=vv(n,i);r(o);return vv(n,o)};return e=>{const n=e.scrollJumpRequest;if(!n)return;const r=_y(e.impact);r||cv(!1);const s=i(e.dimensions.droppables[r],n);if(!s)return;const a=e.viewport,l=o(e.isWindowScrollAllowed,a,s);l&&((e,n)=>{const r=bv(e.current.client.selection,n);t({client:r})})(e,l)}},Z_=e=>{let{scrollDroppable:t,scrollWindow:n,move:r,getAutoScrollerOptions:i}=e;const o=(e=>{let{scrollWindow:t,scrollDroppable:n,getAutoScrollerOptions:r=(()=>L_)}=e;const i=iv(t),o=iv(n);let s=null;const a=e=>{s||cv(!1);const{shouldUseTimeDampening:t,dragStartTime:n}=s;X_({state:e,scrollWindow:i,scrollDroppable:o,dragStartTime:n,shouldUseTimeDampening:t,getAutoScrollerOptions:r})};return{start:e=>{Dy(),s&&cv(!1);const t=Date.now();let n=!1;const i=()=>{n=!0};X_({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:i,scrollDroppable:i,getAutoScrollerOptions:r}),s={dragStartTime:t,shouldUseTimeDampening:n},Ny(),n&&a(e)},stop:()=>{s&&(i.cancel(),o.cancel(),s=null)},scroll:a}})({scrollWindow:n,scrollDroppable:t,getAutoScrollerOptions:i}),s=Y_({move:r,scrollWindow:n,scrollDroppable:t});return{scroll:e=>{i().disabled||"DRAGGING"!==e.phase||("FLUID"!==e.movementMode?e.scrollJumpRequest&&s(e):o.scroll(e))},start:o.start,stop:o.stop}};const J_=(()=>{const e="data-rfd-drag-handle";return{base:e,draggableId:e+"-draggable-id",contextId:e+"-context-id"}})(),K_=(()=>{const e="data-rfd-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}})(),eS=(()=>{const e="data-rfd-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}})(),tS={contextId:"data-rfd-scroll-container-context-id"},nS=(e,t)=>e.map(e=>{const n=e.styles[t];return n?`${e.selector} { ${n} }`:""}).join(" ");var rS="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?i.useLayoutEffect:i.useEffect;const iS=()=>{const e=document.querySelector("head");return e||cv(!1),e},oS=e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function sS(e,t){const n=Qb(()=>(e=>{const t=(n=e,e=>`[${e}="${n}"]`);var n;const r=(()=>{const e="\n cursor: -webkit-grab;\n cursor: grab;\n ";return{selector:t(J_.contextId),styles:{always:"\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n touch-action: manipulation;\n ",resting:e,dragging:"pointer-events: none;",dropAnimating:e}}})(),i=[(()=>{const e=`\n transition: ${a_.outOfTheWay};\n `;return{selector:t(K_.contextId),styles:{dragging:e,dropAnimating:e,userCancel:e}}})(),r,{selector:t(eS.contextId),styles:{always:"overflow-anchor: none;"}},{selector:"body",styles:{dragging:"\n cursor: grabbing;\n cursor: -webkit-grabbing;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n overflow-anchor: none;\n "}}];return{always:nS(i,"always"),resting:nS(i,"resting"),dragging:nS(i,"dragging"),dropAnimating:nS(i,"dropAnimating"),userCancel:nS(i,"userCancel")}})(e),[e]),r=Object(i.useRef)(null),o=Object(i.useRef)(null),s=qb(rv(e=>{const t=o.current;t||cv(!1),t.textContent=e}),[]),a=qb(e=>{const t=r.current;t||cv(!1),t.textContent=e},[]);rS(()=>{(r.current||o.current)&&cv(!1);const i=oS(t),l=oS(t);return r.current=i,o.current=l,i.setAttribute("data-rfd-always",e),l.setAttribute("data-rfd-dynamic",e),iS().appendChild(i),iS().appendChild(l),a(n.always),s(n.resting),()=>{const e=e=>{const t=e.current;t||cv(!1),iS().removeChild(t),e.current=null};e(r),e(o)}},[t,a,s,n.always,n.resting,e]);const l=qb(()=>s(n.dragging),[s,n.dragging]),c=qb(e=>{s("DROP"!==e?n.userCancel:n.dropAnimating)},[s,n.dropAnimating,n.userCancel]),u=qb(()=>{o.current&&s(n.resting)},[s,n.resting]);return Qb(()=>({dragging:l,dropping:c,resting:u}),[l,c,u])}function aS(e,t){return Array.from(e.querySelectorAll(t))}var lS=e=>{var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window};function cS(e){return e instanceof lS(e).HTMLElement}function uS(e,t){const n=`[${J_.contextId}="${e}"]`,r=aS(document,n);if(!r.length)return null;const i=r.find(e=>e.getAttribute(J_.draggableId)===t);return i&&cS(i)?i:null}function dS(){const e={draggables:{},droppables:{}},t=[];function n(e){t.length&&t.forEach(t=>t(e))}function r(t){return e.draggables[t]||null}function i(t){return e.droppables[t]||null}return{draggable:{register:t=>{e.draggables[t.descriptor.id]=t,n({type:"ADDITION",value:t})},update:(t,n)=>{const r=e.draggables[n.descriptor.id];r&&r.uniqueId===t.uniqueId&&(delete e.draggables[n.descriptor.id],e.draggables[t.descriptor.id]=t)},unregister:t=>{const i=t.descriptor.id,o=r(i);o&&t.uniqueId===o.uniqueId&&(delete e.draggables[i],e.droppables[t.descriptor.droppableId]&&n({type:"REMOVAL",value:t}))},getById:function(e){const t=r(e);return t||cv(!1),t},findById:r,exists:e=>Boolean(r(e)),getAllByType:t=>Object.values(e.draggables).filter(e=>e.descriptor.type===t)},droppable:{register:t=>{e.droppables[t.descriptor.id]=t},unregister:t=>{const n=i(t.descriptor.id);n&&t.uniqueId===n.uniqueId&&delete e.droppables[t.descriptor.id]},getById:function(e){const t=i(e);return t||cv(!1),t},findById:i,exists:e=>Boolean(i(e)),getAllByType:t=>Object.values(e.droppables).filter(e=>e.descriptor.type===t)},subscribe:function(e){return t.push(e),function(){const n=t.indexOf(e);-1!==n&&t.splice(n,1)}},clean:function(){e.draggables={},e.droppables={},t.length=0}}}var hS=o.a.createContext(null),pS=()=>{const e=document.body;return e||cv(!1),e};var fS={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"};let mS=0;const gS={separator:"::"};var bS="useId"in o.a?function(e,t){void 0===t&&(t=gS);const n=o.a.useId();return Qb(()=>`${e}${t.separator}${n}`,[t.separator,e,n])}:function(e,t){return void 0===t&&(t=gS),Qb(()=>`${e}${t.separator}${mS++}`,[t.separator,e])};var vS=o.a.createContext(null);function yS(e){0}function _S(e,t){yS()}function SS(){_S()}function xS(e){const t=Object(i.useRef)(e);return Object(i.useEffect)(()=>{t.current=e}),t}function wS(e){return"IDLE"!==e.phase&&"DROP_ANIMATING"!==e.phase&&e.isDragging}const kS={13:!0,9:!0};var OS=e=>{kS[e.keyCode]&&e.preventDefault()};var ES=(()=>{const e="visibilitychange";if("undefined"==typeof document)return e;return[e,"ms"+e,"webkit"+e,"moz"+e,"o"+e].find(e=>"on"+e in document)||e})();const AS={type:"IDLE"};function TS(e){let{cancel:t,completed:n,getPhase:r,setPhase:i}=e;return[{eventName:"mousemove",fn:e=>{const{button:t,clientX:n,clientY:o}=e;if(0!==t)return;const s={x:n,y:o},a=r();if("DRAGGING"===a.type)return e.preventDefault(),void a.actions.move(s);"PENDING"!==a.type&&cv(!1);const l=a.point;if(c=l,u=s,!(Math.abs(u.x-c.x)>=5||Math.abs(u.y-c.y)>=5))return;var c,u;e.preventDefault();const d=a.actions.fluidLift(s);i({type:"DRAGGING",actions:d})}},{eventName:"mouseup",fn:e=>{const i=r();"DRAGGING"===i.type?(e.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),n()):t()}},{eventName:"mousedown",fn:e=>{"DRAGGING"===r().type&&e.preventDefault(),t()}},{eventName:"keydown",fn:e=>{if("PENDING"!==r().type)return 27===e.keyCode?(e.preventDefault(),void t()):void OS(e);t()}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:()=>{"PENDING"===r().type&&t()}},{eventName:"webkitmouseforcedown",fn:e=>{const n=r();"IDLE"===n.type&&cv(!1),n.actions.shouldRespectForcePress()?t():e.preventDefault()}},{eventName:ES,fn:t}]}function CS(){}const MS={34:!0,33:!0,36:!0,35:!0};function PS(e,t){function n(){t(),e.cancel()}return[{eventName:"keydown",fn:r=>27===r.keyCode?(r.preventDefault(),void n()):32===r.keyCode?(r.preventDefault(),t(),void e.drop()):40===r.keyCode?(r.preventDefault(),void e.moveDown()):38===r.keyCode?(r.preventDefault(),void e.moveUp()):39===r.keyCode?(r.preventDefault(),void e.moveRight()):37===r.keyCode?(r.preventDefault(),void e.moveLeft()):void(MS[r.keyCode]?r.preventDefault():OS(r))},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:ES,fn:n}]}const $S={type:"IDLE"};const RS=["input","button","textarea","select","option","optgroup","video","audio"];function IS(e,t){const n=t.target;return!!cS(n)&&function e(t,n){if(null==n)return!1;if(RS.includes(n.tagName.toLowerCase()))return!0;const r=n.getAttribute("contenteditable");return"true"===r||""===r||n!==t&&e(t,n.parentElement)}(e,n)}var DS=e=>Hb(e.getBoundingClientRect()).center;const NS=(()=>{if("undefined"==typeof document)return"matches";return["matches","msMatchesSelector","webkitMatchesSelector"].find(e=>e in Element.prototype)||"matches"})();function jS(e,t){return e.closest?e.closest(t):function e(t,n){return null==t?null:t[NS](n)?t:e(t.parentElement,n)}(e,t)}function LS(e,t){const n=t.target;if(!((r=n)instanceof lS(r).Element))return null;var r;const i=jS(n,function(e){return`[${J_.contextId}="${e}"]`}(e));return i&&cS(i)?i:null}function BS(e){e.preventDefault()}function FS(e){let{expected:t,phase:n,isLockActive:r,shouldWarn:i}=e;return!!r()&&t===n}function zS(e){let{lockAPI:t,store:n,registry:r,draggableId:i}=e;if(t.isClaimed())return!1;const o=r.draggable.findById(i);return!!o&&(!!o.options.isEnabled&&!!I_(n.getState(),i))}function US(e){let{lockAPI:t,contextId:n,store:r,registry:i,draggableId:o,forceSensorStop:s,sourceEvent:a}=e;if(!zS({lockAPI:t,store:r,registry:i,draggableId:o}))return null;const l=i.draggable.getById(o),c=function(e,t){const n=`[${K_.contextId}="${e}"]`,r=aS(document,n).find(e=>e.getAttribute(K_.id)===t);return r&&cS(r)?r:null}(n,l.descriptor.id);if(!c)return null;if(a&&!l.options.canDragInteractiveElements&&IS(c,a))return null;const u=t.claim(s||sv);let d="PRE_DRAG";function h(){return l.options.shouldRespectForcePress}function p(){return t.isActive(u)}const f=function(e,t){FS({expected:e,phase:d,isLockActive:p,shouldWarn:!0})&&r.dispatch(t())}.bind(null,"DRAGGING");function m(e){function n(){t.release(),d="COMPLETED"}function i(t,i){if(void 0===i&&(i={shouldBlockNextClick:!1}),e.cleanup(),i.shouldBlockNextClick){const e=av(window,[{eventName:"click",fn:BS,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(e)}n(),r.dispatch(e_({reason:t}))}return"PRE_DRAG"!==d&&(n(),cv(!1)),r.dispatch((e=>({type:"LIFT",payload:e}))(e.liftActionArgs)),d="DRAGGING",{isActive:()=>FS({expected:"DRAGGING",phase:d,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:h,drop:e=>i("DROP",e),cancel:e=>i("CANCEL",e),...e.actions}}return{isActive:()=>FS({expected:"PRE_DRAG",phase:d,isLockActive:p,shouldWarn:!1}),shouldRespectForcePress:h,fluidLift:function(e){const t=iv(e=>{f(()=>Wy({client:e}))});return{...m({liftActionArgs:{id:o,clientSelection:e,movementMode:"FLUID"},cleanup:()=>t.cancel(),actions:{move:t}}),move:t}},snapLift:function(){const e={moveUp:()=>f(Xy),moveRight:()=>f(Zy),moveDown:()=>f(Yy),moveLeft:()=>f(Jy)};return m({liftActionArgs:{id:o,clientSelection:DS(c),movementMode:"SNAP"},cleanup:sv,actions:e})},abort:function(){FS({expected:"PRE_DRAG",phase:d,isLockActive:p,shouldWarn:!0})&&t.release()}}}const QS=[function(e){const t=Object(i.useRef)(AS),n=Object(i.useRef)(sv),r=Qb(()=>({eventName:"mousedown",fn:function(t){if(t.defaultPrevented)return;if(0!==t.button)return;if(t.ctrlKey||t.metaKey||t.shiftKey||t.altKey)return;const r=e.findClosestDraggableId(t);if(!r)return;const i=e.tryGetLock(r,a,{sourceEvent:t});if(!i)return;t.preventDefault();const o={x:t.clientX,y:t.clientY};n.current(),u(i,o)}}),[e]),o=Qb(()=>({eventName:"webkitmouseforcewillbegin",fn:t=>{if(t.defaultPrevented)return;const n=e.findClosestDraggableId(t);if(!n)return;const r=e.findOptionsForDraggable(n);r&&(r.shouldRespectForcePress||e.canGetLock(n)&&t.preventDefault())}}),[e]),s=qb((function(){n.current=av(window,[o,r],{passive:!1,capture:!0})}),[o,r]),a=qb(()=>{"IDLE"!==t.current.type&&(t.current=AS,n.current(),s())},[s]),l=qb(()=>{const e=t.current;a(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[a]),c=qb((function(){const e=TS({cancel:l,completed:a,getPhase:()=>t.current,setPhase:e=>{t.current=e}});n.current=av(window,e,{capture:!0,passive:!1})}),[l,a]),u=qb((function(e,n){"IDLE"!==t.current.type&&cv(!1),t.current={type:"PENDING",point:n,actions:e},c()}),[c]);rS((function(){return s(),function(){n.current()}}),[s])},function(e){const t=Object(i.useRef)(CS),n=Qb(()=>({eventName:"keydown",fn:function(n){if(n.defaultPrevented)return;if(32!==n.keyCode)return;const i=e.findClosestDraggableId(n);if(!i)return;const o=e.tryGetLock(i,l,{sourceEvent:n});if(!o)return;n.preventDefault();let s=!0;const a=o.snapLift();function l(){s||cv(!1),s=!1,t.current(),r()}t.current(),t.current=av(window,PS(a,l),{capture:!0,passive:!1})}}),[e]),r=qb((function(){t.current=av(window,[n],{passive:!1,capture:!0})}),[n]);rS((function(){return r(),function(){t.current()}}),[r])},function(e){const t=Object(i.useRef)($S),n=Object(i.useRef)(sv),r=qb((function(){return t.current}),[]),o=qb((function(e){t.current=e}),[]),s=Qb(()=>({eventName:"touchstart",fn:function(t){if(t.defaultPrevented)return;const r=e.findClosestDraggableId(t);if(!r)return;const i=e.tryGetLock(r,l,{sourceEvent:t});if(!i)return;const o=t.touches[0],{clientX:s,clientY:a}=o,c={x:s,y:a};n.current(),h(i,c)}}),[e]),a=qb((function(){n.current=av(window,[s],{capture:!0,passive:!1})}),[s]),l=qb(()=>{const e=t.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),o($S),n.current(),a())},[a,o]),c=qb(()=>{const e=t.current;l(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()},[l]),u=qb((function(){const e={capture:!0,passive:!1},t={cancel:c,completed:l,getPhase:r},i=av(window,function(e){let{cancel:t,completed:n,getPhase:r}=e;return[{eventName:"touchmove",options:{capture:!1},fn:e=>{const n=r();if("DRAGGING"!==n.type)return void t();n.hasMoved=!0;const{clientX:i,clientY:o}=e.touches[0],s={x:i,y:o};e.preventDefault(),n.actions.move(s)}},{eventName:"touchend",fn:e=>{const i=r();"DRAGGING"===i.type?(e.preventDefault(),i.actions.drop({shouldBlockNextClick:!0}),n()):t()}},{eventName:"touchcancel",fn:e=>{"DRAGGING"===r().type?(e.preventDefault(),t()):t()}},{eventName:"touchforcechange",fn:e=>{const n=r();"IDLE"===n.type&&cv(!1);const i=e.touches[0];if(!i)return;if(!(i.force>=.15))return;const o=n.actions.shouldRespectForcePress();if("PENDING"!==n.type)return o?n.hasMoved?void e.preventDefault():void t():void e.preventDefault();o&&t()}},{eventName:ES,fn:t}]}(t),e),o=av(window,function(e){let{cancel:t,getPhase:n}=e;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:e=>{e.preventDefault()}},{eventName:"keydown",fn:e=>{"DRAGGING"===n().type?(27===e.keyCode&&e.preventDefault(),t()):t()}},{eventName:ES,fn:t}]}(t),e);n.current=function(){i(),o()}}),[c,r,l]),d=qb((function(){const e=r();"PENDING"!==e.type&&cv(!1);const t=e.actions.fluidLift(e.point);o({type:"DRAGGING",actions:t,hasMoved:!1})}),[r,o]),h=qb((function(e,t){"IDLE"!==r().type&&cv(!1);const n=setTimeout(d,120);o({type:"PENDING",point:t,actions:e,longPressTimerId:n}),u()}),[u,r,o,d]);rS((function(){return a(),function(){n.current();const e=r();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),o($S))}}),[r,a,o]),rS((function(){return av(window,[{eventName:"touchmove",fn:()=>{},options:{capture:!1,passive:!1}}])}),[])}];function qS(e){let{contextId:t,store:n,registry:r,customSensors:o,enableDefaultSensors:s}=e;const a=[...s?QS:[],...o||[]],l=Object(i.useState)(()=>function(){let e=null;function t(){e||cv(!1),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(t){return t===e},claim:function(t){e&&cv(!1);const n={abandon:t};return e=n,n},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}())[0],c=qb((function(e,t){wS(e)&&!wS(t)&&l.tryAbandon()}),[l]);rS((function(){let e=n.getState();return n.subscribe(()=>{const t=n.getState();c(e,t),e=t})}),[l,n,c]),rS(()=>l.tryAbandon,[l.tryAbandon]);const u=qb(e=>zS({lockAPI:l,registry:r,store:n,draggableId:e}),[l,r,n]),d=qb((e,i,o)=>US({lockAPI:l,registry:r,contextId:t,store:n,draggableId:e,forceSensorStop:i||null,sourceEvent:o&&o.sourceEvent?o.sourceEvent:null}),[t,l,r,n]),h=qb(e=>function(e,t){const n=LS(e,t);return n?n.getAttribute(J_.draggableId):null}(t,e),[t]),p=qb(e=>{const t=r.draggable.findById(e);return t?t.options:null},[r.draggable]),f=qb((function(){l.isClaimed()&&(l.tryAbandon(),"IDLE"!==n.getState().phase&&n.dispatch({type:"FLUSH",payload:null}))}),[l,n]),m=qb(()=>l.isClaimed(),[l]),g=Qb(()=>({canGetLock:u,tryGetLock:d,findClosestDraggableId:h,findOptionsForDraggable:p,tryReleaseLock:f,isLockClaimed:m}),[u,d,h,p,f,m]);yS();for(let e=0;e(e=>({onBeforeCapture:t=>{const n=()=>{e.onBeforeCapture&&e.onBeforeCapture(t)};o.a.version.startsWith("16")||o.a.version.startsWith("17")?n():Object(s.flushSync)(n)},onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}))(u.current),[u]),h=qb(()=>(e=>({...L_,...e.autoScrollerOptions,durationDampening:{...L_.durationDampening,...e.autoScrollerOptions}}))(u.current),[u]),p=function(e){const t=Qb(()=>(e=>"rfd-announcement-"+e)(e),[e]),n=Object(i.useRef)(null);return Object(i.useEffect)((function(){const e=document.createElement("div");return n.current=e,e.id=t,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),Object(Cn.a)(e.style,fS),pS().appendChild(e),function(){setTimeout((function(){const t=pS();t.contains(e)&&t.removeChild(e),e===n.current&&(n.current=null)}))}}),[t]),qb(e=>{const t=n.current;t&&(t.textContent=e)},[])}(t),f=function(e){let{contextId:t,text:n}=e;const r=bS("hidden-text",{separator:"-"}),o=Qb(()=>function(e){let{contextId:t,uniqueId:n}=e;return`rfd-hidden-text-${t}-${n}`}({contextId:t,uniqueId:r}),[r,t]);return Object(i.useEffect)((function(){const e=document.createElement("div");return e.id=o,e.textContent=n,e.style.display="none",pS().appendChild(e),function(){const t=pS();t.contains(e)&&t.removeChild(e)}}),[o,n]),o}({contextId:t,text:l}),m=sS(t,a),g=qb(e=>{HS(c).dispatch(e)},[]),b=Qb(()=>Object(pb.b)({publishWhileDragging:Qy,updateDroppableScroll:Hy,updateDroppableIsEnabled:Gy,updateDroppableIsCombineEnabled:Vy,collectionStarting:qy},g),[g]),v=function(){const e=Qb(dS,[]);return Object(i.useEffect)(()=>function(){o.a.version.startsWith("16")||o.a.version.startsWith("17")?requestAnimationFrame(e.clean):e.clean()},[e]),e}(),y=Qb(()=>R_(v,b),[v,b]),_=Qb(()=>Z_({scrollWindow:D_,scrollDroppable:y.scrollDroppable,getAutoScrollerOptions:h,...Object(pb.b)({move:Wy},g)}),[y.scrollDroppable,g,h]),S=function(e){const t=Object(i.useRef)({}),n=Object(i.useRef)(null),r=Object(i.useRef)(null),o=Object(i.useRef)(!1),s=qb((function(e,n){const r={id:e,focus:n};return t.current[e]=r,function(){const n=t.current;n[e]!==r&&delete n[e]}}),[]),a=qb((function(t){const n=uS(e,t);n&&n!==document.activeElement&&n.focus()}),[e]),l=qb((function(e,t){n.current===e&&(n.current=t)}),[]),c=qb((function(){r.current||o.current&&(r.current=requestAnimationFrame(()=>{r.current=null;const e=n.current;e&&a(e)}))}),[a]),u=qb((function(e){n.current=null;const t=document.activeElement;t&&t.getAttribute(J_.draggableId)===e&&(n.current=e)}),[]);return rS(()=>(o.current=!0,function(){o.current=!1;const e=r.current;e&&cancelAnimationFrame(e)}),[]),Qb(()=>({register:s,tryRecordFocus:u,tryRestoreFocusRecorded:c,tryShiftRecord:l}),[s,u,c,l])}(t),x=Qb(()=>A_({announce:p,autoScroller:_,dimensionMarshal:y,focusMarshal:S,getResponders:d,styleMarshal:m}),[p,_,y,S,d,m]);c.current=x;const w=qb(()=>{const e=HS(c);"IDLE"!==e.getState().phase&&e.dispatch({type:"FLUSH",payload:null})},[]),k=qb(()=>{const e=HS(c).getState();return"DROP_ANIMATING"===e.phase||"IDLE"!==e.phase&&e.isDragging},[]);n(Qb(()=>({isDragging:k,tryAbort:w}),[k,w]));const O=qb(e=>I_(HS(c).getState(),e),[]),E=qb(()=>xy(HS(c).getState()),[]),A=Qb(()=>({marshal:y,focus:S,contextId:t,canLift:O,isMovementAllowed:E,dragHandleUsageInstructionsId:f,registry:v}),[t,y,f,S,O,E,v]);return qS({contextId:t,store:x,registry:v,customSensors:r||null,enableDefaultSensors:!1!==e.enableDefaultSensors}),Object(i.useEffect)(()=>w,[w]),o.a.createElement(vS.Provider,{value:A},o.a.createElement(Fb,{context:hS,store:x},e.children))}let VS=0;var WS="useId"in o.a?function(){return o.a.useId()}:function(){return Qb(()=>""+VS++,[])};function XS(e){const t=WS(),n=e.dragHandleUsageInstructions||mv.dragHandleUsageInstructions;return o.a.createElement(uv,null,r=>o.a.createElement(GS,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd,autoScrollerOptions:e.autoScrollerOptions},e.children))}const YS=5e3,ZS=4500,JS=(e,t)=>t?a_.drop(t.duration):e?a_.snap:a_.fluid,KS=(e,t)=>{if(e)return t?r_.drop:r_.combining};function ex(e){return"DRAGGING"===e.type?function(e){const t=e.dimension.client,{offset:n,combineWith:r,dropping:i}=e,o=Boolean(r),s=(e=>null!=e.forceShouldAnimate?e.forceShouldAnimate:"SNAP"===e.mode)(e),a=Boolean(i),l=a?u_(n,o):c_(n);return{position:"fixed",top:t.marginBox.top,left:t.marginBox.left,boxSizing:"border-box",width:t.borderBox.width,height:t.borderBox.height,transition:JS(s,i),transform:l,opacity:KS(o,a),zIndex:a?ZS:YS,pointerEvents:"none"}}(e):{transform:c_((t=e).offset),transition:t.shouldAnimateDisplacement?void 0:"none"};var t}function tx(e){const t=bS("draggable"),{descriptor:n,registry:r,getDraggableRef:o,canDragInteractiveElements:s,shouldRespectForcePress:a,isEnabled:l}=e,c=Qb(()=>({canDragInteractiveElements:s,shouldRespectForcePress:a,isEnabled:l}),[s,l,a]),u=qb(e=>{const t=o();return t||cv(!1),function(e,t,n){void 0===n&&(n=gv);const r=window.getComputedStyle(t),i=t.getBoundingClientRect(),o=Kb(i,r),s=Jb(o,n);return{descriptor:e,placeholder:{client:o,tagName:t.tagName.toLowerCase(),display:r.display},displaceBy:{x:o.marginBox.width,y:o.marginBox.height},client:o,page:s}}(n,t,e)},[n,o]),d=Qb(()=>({uniqueId:t,descriptor:n,options:c,getDimension:u}),[n,u,c,t]),h=Object(i.useRef)(d),p=Object(i.useRef)(!0);rS(()=>(r.draggable.register(h.current),()=>r.draggable.unregister(h.current)),[r.draggable]),rS(()=>{if(p.current)return void(p.current=!1);const e=h.current;h.current=d,r.draggable.update(d,e)},[d,r.draggable])}var nx=o.a.createContext(null);function rx(e){const t=Object(i.useContext)(e);return t||cv(!1),t}function ix(e){e.preventDefault()}var ox=e=>{const t=Object(i.useRef)(null),n=qb((function(e){void 0===e&&(e=null),t.current=e}),[]),r=qb(()=>t.current,[]),{contextId:a,dragHandleUsageInstructionsId:l,registry:c}=rx(vS),{type:u,droppableId:d}=rx(nx),h=Qb(()=>({id:e.draggableId,index:e.index,type:u,droppableId:d}),[e.draggableId,e.index,u,d]),{children:p,draggableId:f,isEnabled:m,shouldRespectForcePress:g,canDragInteractiveElements:b,isClone:v,mapped:y,dropAnimationFinished:_}=e;if(_S(),yS(),!v){tx(Qb(()=>({descriptor:h,registry:c,getDraggableRef:r,canDragInteractiveElements:b,shouldRespectForcePress:g,isEnabled:m}),[h,c,r,b,g,m]))}const S=Qb(()=>m?{tabIndex:0,role:"button","aria-describedby":l,"data-rfd-drag-handle-draggable-id":f,"data-rfd-drag-handle-context-id":a,draggable:!1,onDragStart:ix}:null,[a,l,f,m]),x=qb(e=>{"DRAGGING"===y.type&&y.dropping&&"transform"===e.propertyName&&(o.a.version.startsWith("16")||o.a.version.startsWith("17")?_():Object(s.flushSync)(_))},[_,y]),w=Qb(()=>{const e=ex(y),t="DRAGGING"===y.type&&y.dropping?x:void 0;return{innerRef:n,draggableProps:{"data-rfd-draggable-context-id":a,"data-rfd-draggable-id":f,style:e,onTransitionEnd:t},dragHandleProps:S}},[a,S,f,y,x,n]),k=Qb(()=>({draggableId:h.id,type:h.type,source:{index:h.index,droppableId:h.droppableId}}),[h.droppableId,h.id,h.index,h.type]);return o.a.createElement(o.a.Fragment,null,p(w,y.snapshot,k))},sx=(e,t)=>e===t,ax=e=>{const{combine:t,destination:n}=e;return n?n.droppableId:t?t.droppableId:null};function lx(e){return void 0===e&&(e=null),{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}const cx={mapped:{type:"SECONDARY",offset:gv,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:lx(null)}};var ux=Bb(()=>{const e=function(){const e=rv((e,t)=>({x:e,y:t})),t=rv((function(e,t,n,r,i){return void 0===n&&(n=null),void 0===r&&(r=null),void 0===i&&(i=null),{isDragging:!0,isClone:t,isDropAnimating:Boolean(i),dropAnimation:i,mode:e,draggingOver:n,combineWith:r,combineTargetFor:null}})),n=rv((function(e,n,r,i,o,s,a){return void 0===o&&(o=null),void 0===s&&(s=null),void 0===a&&(a=null),{mapped:{type:"DRAGGING",dropping:null,draggingOver:o,combineWith:s,mode:n,offset:e,dimension:r,forceShouldAnimate:a,snapshot:t(n,i,o,s,null)}}}));return(r,i)=>{if(wS(r)){if(r.critical.draggable.id!==i.draggableId)return null;const t=r.current.client.offset,s=r.dimensions.draggables[i.draggableId],a=_y(r.impact),l=(o=r.impact).at&&"COMBINE"===o.at.type?o.at.combine.draggableId:null,c=r.forceShouldAnimate;return n(e(t.x,t.y),r.movementMode,s,i.isClone,a,l,c)}var o;if("DROP_ANIMATING"===r.phase){const e=r.completed;if(e.result.draggableId!==i.draggableId)return null;const n=i.isClone,o=r.dimensions.draggables[i.draggableId],s=e.result,a=s.mode,l=ax(s),c=(e=>e.combine?e.combine.draggableId:null)(s),u={duration:r.dropDuration,curve:n_,moveTo:r.newHomeClientOffset,opacity:c?r_.drop:null,scale:c?i_.drop:null};return{mapped:{type:"DRAGGING",offset:r.newHomeClientOffset,dimension:o,dropping:u,draggingOver:l,combineWith:c,mode:a,forceShouldAnimate:null,snapshot:t(a,n,l,c,u)}}}return null}}(),t=function(){const e=rv((e,t)=>({x:e,y:t})),t=rv(lx),n=rv((function(e,n,r){return void 0===n&&(n=null),{mapped:{type:"SECONDARY",offset:e,combineTargetFor:n,shouldAnimateDisplacement:r,snapshot:t(n)}}})),r=e=>e?n(gv,e,!0):null,i=(t,i,o,s)=>{const a=o.displaced.visible[t],l=Boolean(s.inVirtualList&&s.effected[t]),c=Nv(o),u=c&&c.draggableId===t?i:null;if(!a){if(!l)return r(u);if(o.displaced.invisible[t])return null;const i=_v(s.displacedBy.point),a=e(i.x,i.y);return n(a,u,!0)}if(l)return r(u);const d=o.displacedBy.point,h=e(d.x,d.y);return n(h,u,a.shouldAnimate)};return(e,t)=>{if(wS(e))return e.critical.draggable.id===t.draggableId?null:i(t.draggableId,e.critical.draggable.id,e.impact,e.afterCritical);if("DROP_ANIMATING"===e.phase){const n=e.completed;return n.result.draggableId===t.draggableId?null:i(t.draggableId,n.result.draggableId,n.impact,n.afterCritical)}return null}}();return(n,r)=>e(n,r)||t(n,r)||cx},{dropAnimationFinished:t_},null,{context:hS,areStatePropsEqual:sx})(ox);function dx(e){return rx(nx).isUsingCloneFor!==e.draggableId||e.isClone?o.a.createElement(ux,e):null}function hx(e){const t="boolean"!=typeof e.isDragDisabled||!e.isDragDisabled,n=Boolean(e.disableInteractiveElementBlocking),r=Boolean(e.shouldRespectForcePress);return o.a.createElement(dx,Object(Cn.a)({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}const px=e=>t=>e===t,fx=px("scroll"),mx=px("auto"),gx=(px("visible"),(e,t)=>t(e.overflowX)||t(e.overflowY)),bx=e=>{const t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return gx(n,fx)||gx(n,mx)},vx=e=>null==e||e===document.body||e===document.documentElement?null:bx(e)?e:vx(e.parentElement);var yx=vx,_x=e=>({x:e.scrollLeft,y:e.scrollTop});const Sx=e=>{if(!e)return!1;return"fixed"===window.getComputedStyle(e).position||Sx(e.parentElement)};var xx=e=>{let{ref:t,descriptor:n,env:r,windowScroll:i,direction:o,isDropDisabled:s,isCombineEnabled:a,shouldClipSubject:l}=e;const c=r.closestScrollable,u=((e,t)=>{const n=ev(e);if(!t)return n;if(e!==t)return n;const r=n.paddingBox.top-t.scrollTop,i=n.paddingBox.left-t.scrollLeft,o=r+t.scrollHeight,s=i+t.scrollWidth,a=Gb({top:r,right:s,bottom:o,left:i},n.border);return Xb({borderBox:a,margin:n.margin,border:n.border,padding:n.padding})})(t,c),d=Jb(u,i),h=(()=>{if(!c)return null;const e=ev(c),t={scrollHeight:c.scrollHeight,scrollWidth:c.scrollWidth};return{client:e,page:Jb(e,i),scroll:_x(c),scrollSize:t,shouldClipSubject:l}})();return(e=>{let{descriptor:t,isEnabled:n,isCombineEnabled:r,isFixedOnPage:i,direction:o,client:s,page:a,closest:l}=e;const c=(()=>{if(!l)return null;const{scrollSize:e,client:t}=l,n=T_({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,height:t.paddingBox.height,width:t.paddingBox.width});return{pageMarginBox:l.page.marginBox,frameClient:t,scrollSize:e,shouldClipSubject:l.shouldClipSubject,scroll:{initial:l.scroll,current:l.scroll,max:n,diff:{value:gv,displacement:gv}}}})(),u="vertical"===o?Hv:Gv;return{descriptor:t,isCombineEnabled:r,isFixedOnPage:i,axis:u,isEnabled:n,client:s,page:a,frame:c,subject:Tv({page:a,withPlaceholder:null,axis:u,frame:c})}})({descriptor:n,isEnabled:!s,isCombineEnabled:a,isFixedOnPage:r.isFixedOnPage,direction:o,client:u,page:d,closest:h})};const wx={passive:!1},kx={passive:!0};var Ox=e=>e.shouldPublishImmediately?wx:kx;const Ex=e=>e&&e.env.closestScrollable||null;function Ax(e){const t=Object(i.useRef)(null),n=rx(vS),r=bS("droppable"),{registry:o,marshal:s}=n,a=xS(e),l=Qb(()=>({id:e.droppableId,type:e.type,mode:e.mode}),[e.droppableId,e.mode,e.type]),c=Object(i.useRef)(l),u=Qb(()=>rv((e,n)=>{t.current||cv(!1);const r={x:e,y:n};s.updateDroppableScroll(l.id,r)}),[l.id,s]),d=qb(()=>{const e=t.current;return e&&e.env.closestScrollable?_x(e.env.closestScrollable):gv},[]),h=qb(()=>{const e=d();u(e.x,e.y)},[d,u]),p=Qb(()=>iv(h),[h]),f=qb(()=>{const e=t.current,n=Ex(e);e&&n||cv(!1);e.scrollOptions.shouldPublishImmediately?h():p()},[p,h]),m=qb((e,r)=>{t.current&&cv(!1);const i=a.current,o=i.getDroppableRef();o||cv(!1);const s={closestScrollable:yx(c=o),isFixedOnPage:Sx(c)};var c;const u={ref:o,descriptor:l,env:s,scrollOptions:r};t.current=u;const d=xx({ref:o,descriptor:l,env:s,windowScroll:e,direction:i.direction,isDropDisabled:i.isDropDisabled,isCombineEnabled:i.isCombineEnabled,shouldClipSubject:!i.ignoreContainerClipping}),h=s.closestScrollable;return h&&(h.setAttribute(tS.contextId,n.contextId),h.addEventListener("scroll",f,Ox(u.scrollOptions))),d},[n.contextId,l,f,a]),g=qb(()=>{const e=t.current,n=Ex(e);return e&&n||cv(!1),_x(n)},[]),b=qb(()=>{const e=t.current;e||cv(!1);const n=Ex(e);t.current=null,n&&(p.cancel(),n.removeAttribute(tS.contextId),n.removeEventListener("scroll",f,Ox(e.scrollOptions)))},[f,p]),v=qb(e=>{const n=t.current;n||cv(!1);const r=Ex(n);r||cv(!1),r.scrollTop+=e.y,r.scrollLeft+=e.x},[]),y=Qb(()=>({getDimensionAndWatchScroll:m,getScrollWhileDragging:g,dragStopped:b,scroll:v}),[b,m,g,v]),_=Qb(()=>({uniqueId:r,descriptor:l,callbacks:y}),[y,l,r]);rS(()=>(c.current=_.descriptor,o.droppable.register(_),()=>{t.current&&b(),o.droppable.unregister(_)}),[y,l,b,_,s,o.droppable]),rS(()=>{t.current&&s.updateDroppableIsEnabled(c.current.id,!e.isDropDisabled)},[e.isDropDisabled,s]),rS(()=>{t.current&&s.updateDroppableIsCombineEnabled(c.current.id,e.isCombineEnabled)},[e.isCombineEnabled,s])}function Tx(){}const Cx={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}},Mx=e=>{let{isAnimatingOpenOnMount:t,placeholder:n,animate:r}=e;const i=(e=>{let{isAnimatingOpenOnMount:t,placeholder:n,animate:r}=e;return t||"close"===r?Cx:{height:n.client.borderBox.height,width:n.client.borderBox.width,margin:n.client.margin}})({isAnimatingOpenOnMount:t,placeholder:n,animate:r});return{display:n.display,boxSizing:"border-box",width:i.width,height:i.height,marginTop:i.margin.top,marginRight:i.margin.right,marginBottom:i.margin.bottom,marginLeft:i.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:"none"!==r?a_.placeholder:null}};var Px=o.a.memo(e=>{const t=Object(i.useRef)(null),n=qb(()=>{t.current&&(clearTimeout(t.current),t.current=null)},[]),{animate:r,onTransitionEnd:s,onClose:a,contextId:l}=e,[c,u]=Object(i.useState)("open"===e.animate);Object(i.useEffect)(()=>c?"open"!==r?(n(),u(!1),Tx):t.current?Tx:(t.current=setTimeout(()=>{t.current=null,u(!1)}),n):Tx,[r,c,n]);const d=qb(e=>{"height"===e.propertyName&&(s(),"close"===r&&a())},[r,a,s]),h=Mx({isAnimatingOpenOnMount:c,animate:e.animate,placeholder:e.placeholder});return o.a.createElement(e.placeholder.tagName,{style:h,"data-rfd-placeholder-context-id":l,onTransitionEnd:d,ref:e.innerRef})});class $x extends o.a.PureComponent{constructor(){super(...arguments),this.state={isVisible:Boolean(this.props.on),data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{"close"===this.state.animate&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(e,t){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:t.isVisible?{isVisible:!0,data:t.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(e.on),data:e.on,animate:"none"}}render(){if(!this.state.isVisible)return null;const e={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(e)}}var Rx=e=>{const t=Object(i.useContext)(vS);t||cv(!1);const{contextId:n,isMovementAllowed:r}=t,s=Object(i.useRef)(null),l=Object(i.useRef)(null),{children:c,droppableId:u,type:d,mode:h,direction:p,ignoreContainerClipping:f,isDropDisabled:m,isCombineEnabled:g,snapshot:b,useClone:v,updateViewportMaxScroll:y,getContainerForClone:_}=e,S=qb(()=>s.current,[]),x=qb((function(e){void 0===e&&(e=null),s.current=e}),[]),w=(qb(()=>l.current,[]),qb((function(e){void 0===e&&(e=null),l.current=e}),[]));_S();const k=qb(()=>{r()&&y({maxScroll:M_()})},[r,y]);Ax({droppableId:u,type:d,mode:h,direction:p,isDropDisabled:m,isCombineEnabled:g,ignoreContainerClipping:f,getDroppableRef:S});const O=Qb(()=>o.a.createElement($x,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},e=>{let{onClose:t,data:r,animate:i}=e;return o.a.createElement(Px,{placeholder:r,onClose:t,innerRef:w,animate:i,contextId:n,onTransitionEnd:k})}),[n,k,e.placeholder,e.shouldAnimatePlaceholder,w]),E=Qb(()=>({innerRef:x,placeholder:O,droppableProps:{"data-rfd-droppable-id":u,"data-rfd-droppable-context-id":n}}),[n,u,O,x]),A=v?v.dragging.draggableId:null,T=Qb(()=>({droppableId:u,type:d,isUsingCloneFor:A}),[u,A,d]);return o.a.createElement(nx.Provider,{value:T},c(E,b),function(){if(!v)return null;const{dragging:e,render:t}=v,n=o.a.createElement(dx,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(n,r)=>t(n,r,e));return a.a.createPortal(n,_())}())};const Ix=(e,t)=>e===t.droppable.type,Dx=(e,t)=>t.draggables[e.draggable.id];const Nx={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return document.body||cv(!1),document.body}},jx=Bb(()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},n=rv(e=>({draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}})),r=rv((r,i,o,s,a,l)=>{const c=a.descriptor.id;if(a.descriptor.droppableId===r){const e=l?{render:l,dragging:n(a.descriptor)}:null,t={isDraggingOver:o,draggingOverWith:o?c:null,draggingFromThisWith:c,isUsingPlaceholder:!0};return{placeholder:a.placeholder,shouldAnimatePlaceholder:!1,snapshot:t,useClone:e}}if(!i)return t;if(!s)return e;const u={isDraggingOver:o,draggingOverWith:c,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:a.placeholder,shouldAnimatePlaceholder:!0,snapshot:u,useClone:null}});return(n,i)=>{const o=i.droppableId,s=i.type,a=!i.isDropDisabled,l=i.renderClone;if(wS(n)){const e=n.critical;if(!Ix(s,e))return t;const i=Dx(e,n.dimensions),c=_y(n.impact)===o;return r(o,a,c,c,i,l)}if("DROP_ANIMATING"===n.phase){const e=n.completed;if(!Ix(s,e.critical))return t;const i=Dx(e.critical,n.dimensions);return r(o,a,ax(e.result)===o,_y(e.impact)===o,i,l)}if("IDLE"===n.phase&&n.completed&&!n.shouldFlush){const r=n.completed;if(!Ix(s,r.critical))return t;const i=_y(r.impact)===o,a=Boolean(r.impact.at&&"COMBINE"===r.impact.at.type),l=r.critical.droppable.id===o;return i?a?e:t:l?e:t}return t}},{updateViewportMaxScroll:e=>({type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e})},null,{context:hS,areStatePropsEqual:sx})(Rx);jx.defaultProps=Nx;var Lx=jx;n(410);class Bx{constructor(){}lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,t,n){let r=[];return this.decompose(0,e,r,2),n.length&&n.decompose(0,n.length,r,3),this.decompose(t,this.length,r,1),zx.from(r,this.length-(t-e)+n.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,t=this.length){let n=[];return this.decompose(e,t,n,0),zx.from(n,t-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let t=this.scanIdentical(e,1),n=this.length-this.scanIdentical(e,-1),r=new qx(this),i=new qx(e);for(let e=t,o=t;;){if(r.next(e),i.next(e),e=0,r.lineBreak!=i.lineBreak||r.done!=i.done||r.value!=i.value)return!1;if(o+=r.value.length,r.done||o>=n)return!0}}iter(e=1){return new qx(this,e)}iterRange(e,t=this.length){return new Hx(this,e,t)}iterLines(e,t){let n;if(null==e)n=this.iter();else{null==t&&(t=this.lines+1);let r=this.line(e).from;n=this.iterRange(r,Math.max(r,t==this.lines+1?this.length:t<=1?0:this.line(t-1).to))}return new Gx(n)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}static of(e){if(0==e.length)throw new RangeError("A document must have at least one line");return 1!=e.length||e[0]?e.length<=32?new Fx(e):zx.from(Fx.split(e,[])):Bx.empty}}class Fx extends Bx{constructor(e,t=function(e){let t=-1;for(let n of e)t+=n.length+1;return t}(e)){super(),this.text=e,this.length=t}get lines(){return this.text.length}get children(){return null}lineInner(e,t,n,r){for(let i=0;;i++){let o=this.text[i],s=r+o.length;if((t?n:s)>=e)return new Vx(r,s,n,o);r=s+1,n++}}decompose(e,t,n,r){let i=e<=0&&t>=this.length?this:new Fx(Qx(this.text,e,t),Math.min(t,this.length)-Math.max(0,e));if(1&r){let e=n.pop(),t=Ux(i.text,e.text.slice(),0,i.length);if(t.length<=32)n.push(new Fx(t,e.length+i.length));else{let e=t.length>>1;n.push(new Fx(t.slice(0,e)),new Fx(t.slice(e)))}}else n.push(i)}replace(e,t,n){if(!(n instanceof Fx))return super.replace(e,t,n);let r=Ux(this.text,Ux(n.text,Qx(this.text,0,e)),t),i=this.length+n.length-(t-e);return r.length<=32?new Fx(r,i):zx.from(Fx.split(r,[]),i)}sliceString(e,t=this.length,n="\n"){let r="";for(let i=0,o=0;i<=t&&oe&&o&&(r+=n),ei&&(r+=s.slice(Math.max(0,e-i),t-i)),i=a+1}return r}flatten(e){for(let t of this.text)e.push(t)}scanIdentical(){return 0}static split(e,t){let n=[],r=-1;for(let i of e)n.push(i),r+=i.length+1,32==n.length&&(t.push(new Fx(n,r)),n=[],r=-1);return r>-1&&t.push(new Fx(n,r)),t}}class zx extends Bx{constructor(e,t){super(),this.children=e,this.length=t,this.lines=0;for(let t of e)this.lines+=t.lines}lineInner(e,t,n,r){for(let i=0;;i++){let o=this.children[i],s=r+o.length,a=n+o.lines-1;if((t?a:s)>=e)return o.lineInner(e,t,n,r);r=s+1,n=a+1}}decompose(e,t,n,r){for(let i=0,o=0;o<=t&&i=o){let i=r&((o<=e?1:0)|(a>=t?2:0));o>=e&&a<=t&&!i?n.push(s):s.decompose(e-o,t-o,n,i)}o=a+1}}replace(e,t,n){if(n.lines=i&&t<=s){let a=o.replace(e-i,t-i,n),l=this.lines-o.lines+a.lines;if(a.lines>4&&a.lines>l>>6){let i=this.children.slice();return i[r]=a,new zx(i,this.length-(t-e)+n.length)}return super.replace(i,s,a)}i=s+1}return super.replace(e,t,n)}sliceString(e,t=this.length,n="\n"){let r="";for(let i=0,o=0;ie&&i&&(r+=n),eo&&(r+=s.sliceString(e-o,t-o,n)),o=a+1}return r}flatten(e){for(let t of this.children)t.flatten(e)}scanIdentical(e,t){if(!(e instanceof zx))return 0;let n=0,[r,i,o,s]=t>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=t,i+=t){if(r==o||i==s)return n;let a=this.children[r],l=e.children[i];if(a!=l)return n+a.scanIdentical(l,t);n+=a.length+1}}static from(e,t=e.reduce((e,t)=>e+t.length+1,-1)){let n=0;for(let t of e)n+=t.lines;if(n<32){let n=[];for(let t of e)t.flatten(n);return new Fx(n,t)}let r=Math.max(32,n>>5),i=r<<1,o=r>>1,s=[],a=0,l=-1,c=[];function u(e){let t;if(e.lines>i&&e instanceof zx)for(let t of e.children)u(t);else e.lines>o&&(a>o||!a)?(d(),s.push(e)):e instanceof Fx&&a&&(t=c[c.length-1])instanceof Fx&&e.lines+t.lines<=32?(a+=e.lines,l+=e.length+1,c[c.length-1]=new Fx(t.text.concat(e.text),t.length+1+e.length)):(a+e.lines>r&&d(),a+=e.lines,l+=e.length+1,c.push(e))}function d(){0!=a&&(s.push(1==c.length?c[0]:zx.from(c,l)),l=-1,a=c.length=0)}for(let t of e)u(t);return d(),1==s.length?s[0]:new zx(s,t)}}function Ux(e,t,n=0,r=1e9){for(let i=0,o=0,s=!0;o=n&&(l>r&&(a=a.slice(0,r-i)),i0?1:(e instanceof Fx?e.text.length:e.children.length)<<1]}nextInner(e,t){for(this.done=this.lineBreak=!1;;){let n=this.nodes.length-1,r=this.nodes[n],i=this.offsets[n],o=i>>1,s=r instanceof Fx?r.text.length:r.children.length;if(o==(t>0?s:0)){if(0==n)return this.done=!0,this.value="",this;t>0&&this.offsets[n-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&i)==(t>0?0:1)){if(this.offsets[n]+=t,0==e)return this.lineBreak=!0,this.value="\n",this;e--}else if(r instanceof Fx){let i=r.text[o+(t<0?-1:0)];if(this.offsets[n]+=t,i.length>Math.max(0,e))return this.value=0==e?i:t>0?i.slice(e):i.slice(0,i.length-e),this;e-=i.length}else{let i=r.children[o+(t<0?-1:0)];e>i.length?(e-=i.length,this.offsets[n]+=t):(t<0&&this.offsets[n]--,this.nodes.push(i),this.offsets.push(t>0?1:(i instanceof Fx?i.text.length:i.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class Hx{constructor(e,t,n){this.value="",this.done=!1,this.cursor=new qx(e,t>n?-1:1),this.pos=t>n?e.length:0,this.from=Math.min(t,n),this.to=Math.max(t,n)}nextInner(e,t){if(t<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,t<0?this.pos-this.to:this.from-this.pos);let n=t<0?this.pos-this.from:this.to-this.pos;e>n&&(e=n),n-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*t,this.value=r.length<=n?r:t<0?r.slice(r.length-n):r.slice(0,n),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class Gx{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:t,lineBreak:n,value:r}=this.inner.next(e);return t?(this.done=!0,this.value=""):n?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(Bx.prototype[Symbol.iterator]=function(){return this.iter()},qx.prototype[Symbol.iterator]=Hx.prototype[Symbol.iterator]=Gx.prototype[Symbol.iterator]=function(){return this});class Vx{constructor(e,t,n,r){this.from=e,this.to=t,this.number=n,this.text=r}get length(){return this.to-this.from}}let Wx="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=1;ee)return Wx[t-1]<=e;return!1}function Yx(e){return e>=127462&&e<=127487}function Zx(e,t,n=!0,r=!0){return(n?Jx:Kx)(e,t,r)}function Jx(e,t,n){if(t==e.length)return t;t&&ew(e.charCodeAt(t))&&tw(e.charCodeAt(t-1))&&t--;let r=nw(e,t);for(t+=iw(r);t=0&&Yx(nw(e,r));)n++,r-=2;if(n%2==0)break;t+=2}}}return t}function Kx(e,t,n){for(;t>0;){let r=Jx(e,t-2,n);if(r=56320&&e<57344}function tw(e){return e>=55296&&e<56320}function nw(e,t){let n=e.charCodeAt(t);if(!tw(n)||t+1==e.length)return n;let r=e.charCodeAt(t+1);return ew(r)?r-56320+(n-55296<<10)+65536:n}function rw(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10),56320+(1023&e)))}function iw(e){return e<65536?1:2}const ow=/\r\n?|\n/;var sw=function(e){return e[e.Simple=0]="Simple",e[e.TrackDel=1]="TrackDel",e[e.TrackBefore=2]="TrackBefore",e[e.TrackAfter=3]="TrackAfter",e}(sw||(sw={}));class aw{constructor(e){this.sections=e}get length(){let e=0;for(let t=0;te)return i+(e-r);i+=s}else{if(n!=sw.Simple&&l>=e&&(n==sw.TrackDel&&re||n==sw.TrackBefore&&re))return null;if(l>e||l==e&&t<0&&!s)return e==r||t<0?i:i+a;i+=a}r=l}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return i}touchesRange(e,t=e){for(let n=0,r=0;n=0&&r<=t&&i>=e)return!(rt)||"cover";r=i}return!1}toString(){let e="";for(let t=0;t=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(e=>"number"!=typeof e))throw new RangeError("Invalid JSON representation of ChangeDesc");return new aw(e)}static create(e){return new aw(e)}}class lw extends aw{constructor(e,t){super(e),this.inserted=t}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return dw(this,(t,n,r,i,o)=>e=e.replace(r,r+(n-t),o),!1),e}mapDesc(e,t=!1){return hw(this,e,t,!0)}invert(e){let t=this.sections.slice(),n=[];for(let r=0,i=0;r=0){t[r]=s,t[r+1]=o;let a=r>>1;for(;n.length0&&uw(n,t,i.text),i.forward(e),s+=e}let l=e[o++];for(;s>1].toJSON()))}return e}static of(e,t,n){let r=[],i=[],o=0,s=null;function a(e=!1){if(!e&&!r.length)return;os||e<0||s>t)throw new RangeError(`Invalid change range ${e} to ${s} (in doc of length ${t})`);let u=c?"string"==typeof c?Bx.of(c.split(n||ow)):c:Bx.empty,d=u.length;if(e==s&&0==d)return;eo&&cw(r,e-o,-1),cw(r,s-e,d),uw(i,r,u),o=s}}(e),a(!s),s}static empty(e){return new lw(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let t=[],n=[];for(let r=0;rt&&"string"!=typeof e))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==i.length)t.push(i[0],0);else{for(;n.length=0&&n<=0&&n==e[i+1]?e[i]+=t:0==t&&0==e[i]?e[i+1]+=n:r?(e[i]+=t,e[i+1]+=n):e.push(t,n)}function uw(e,t,n){if(0==n.length)return;let r=t.length-2>>1;if(r>1])),!(n||s==e.sections.length||e.sections[s+1]<0);)a=e.sections[s++],l=e.sections[s++];t(i,c,o,u,d),i=c,o=u}}}function hw(e,t,n,r=!1){let i=[],o=r?[]:null,s=new fw(e),a=new fw(t);for(let e=-1;;)if(-1==s.ins&&-1==a.ins){let e=Math.min(s.len,a.len);cw(i,e,-1),s.forward(e),a.forward(e)}else if(a.ins>=0&&(s.ins<0||e==s.i||0==s.off&&(a.len=0&&e=0)){if(s.done&&a.done)return o?lw.createSet(i,o):aw.create(i);throw new Error("Mismatched change set lengths")}{let t=0,n=s.len;for(;n;)if(-1==a.ins){let e=Math.min(n,a.len);t+=e,n-=e,a.forward(e)}else{if(!(0==a.ins&&a.lent||s.ins>=0&&s.len>t)&&(e||r.length>n),o.forward2(t),s.forward(t)}}else cw(r,0,s.ins,e),i&&uw(i,r,s.text),s.next()}}class fw{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i>1;return t>=e.length?Bx.empty:e[t]}textBit(e){let{inserted:t}=this.set,n=this.i-2>>1;return n>=t.length&&!e?Bx.empty:t[n].slice(this.off,null==e?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){-1==this.ins?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class mw{constructor(e,t,n){this.from=e,this.to=t,this.flags=n}get anchor(){return 16&this.flags?this.to:this.from}get head(){return 16&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 4&this.flags?-1:8&this.flags?1:0}get bidiLevel(){let e=3&this.flags;return 3==e?null:e}get goalColumn(){let e=this.flags>>5;return 33554431==e?void 0:e}map(e,t=-1){let n,r;return this.empty?n=r=e.mapPos(this.from,t):(n=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),n==this.from&&r==this.to?this:new mw(n,r,this.flags)}extend(e,t=e){if(e<=this.anchor&&t>=this.anchor)return gw.range(e,t);let n=Math.abs(e-this.anchor)>Math.abs(t-this.anchor)?e:t;return gw.range(this.anchor,n)}eq(e){return this.anchor==e.anchor&&this.head==e.head}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||"number"!=typeof e.anchor||"number"!=typeof e.head)throw new RangeError("Invalid JSON representation for SelectionRange");return gw.range(e.anchor,e.head)}static create(e,t,n){return new mw(e,t,n)}}class gw{constructor(e,t){this.ranges=e,this.mainIndex=t}map(e,t=-1){return e.empty?this:gw.create(this.ranges.map(n=>n.map(e,t)),this.mainIndex)}eq(e){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let t=0;te.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||"number"!=typeof e.main||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new gw(e.ranges.map(e=>mw.fromJSON(e)),e.main)}static single(e,t=e){return new gw([gw.range(e,t)],0)}static create(e,t=0){if(0==e.length)throw new RangeError("A selection needs at least one range");for(let n=0,r=0;re?4:0)|i)}static normalized(e,t=0){let n=e[t];e.sort((e,t)=>e.from-t.from),t=e.indexOf(n);for(let n=1;nr.head?gw.range(s,o):gw.range(o,s))}}return new gw(e,t)}}function bw(e,t){for(let n of e.ranges)if(n.to>t)throw new RangeError("Selection points outside of document")}let vw=0;class yw{constructor(e,t,n,r,i){this.combine=e,this.compareInput=t,this.compare=n,this.isStatic=r,this.id=vw++,this.default=e([]),this.extensions="function"==typeof i?i(this):i}static define(e={}){return new yw(e.combine||(e=>e),e.compareInput||((e,t)=>e===t),e.compare||(e.combine?(e,t)=>e===t:_w),!!e.static,e.enables)}of(e){return new Sw([],this,0,e)}compute(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Sw(e,this,1,t)}computeN(e,t){if(this.isStatic)throw new Error("Can't compute a static facet");return new Sw(e,this,2,t)}from(e,t){return t||(t=e=>e),this.compute([e],n=>t(n.field(e)))}}function _w(e,t){return e==t||e.length==t.length&&e.every((e,n)=>e===t[n])}class Sw{constructor(e,t,n,r){this.dependencies=e,this.facet=t,this.type=n,this.value=r,this.id=vw++}dynamicSlot(e){var t;let n=this.value,r=this.facet.compareInput,i=this.id,o=e[i]>>1,s=2==this.type,a=!1,l=!1,c=[];for(let n of this.dependencies)"doc"==n?a=!0:"selection"==n?l=!0:0==(1&(null!==(t=e[n.id])&&void 0!==t?t:1))&&c.push(e[n.id]);return{create:e=>(e.values[o]=n(e),1),update(e,t){if(a&&t.docChanged||l&&(t.docChanged||t.selection)||ww(e,c)){let t=n(e);if(s?!xw(t,e.values[o],r):!r(t,e.values[o]))return e.values[o]=t,1}return 0},reconfigure:(e,t)=>{let a,l=t.config.address[i];if(null!=l){let i=Lw(t,l);if(this.dependencies.every(n=>n instanceof yw?t.facet(n)===e.facet(n):!(n instanceof Ew)||t.field(n,!1)==e.field(n,!1))||(s?xw(a=n(e),i,r):r(a=n(e),i)))return e.values[o]=i,0}else a=n(e);return e.values[o]=a,1}}}}function xw(e,t,n){if(e.length!=t.length)return!1;for(let r=0;re[t.id]),i=n.map(e=>e.type),o=r.filter(e=>!(1&e)),s=e[t.id]>>1;function a(e){let n=[];for(let t=0;te===t),e);return e.provide&&(t.provides=e.provide(t)),t}create(e){let t=e.facet(Ow).find(e=>e.field==this);return((null==t?void 0:t.create)||this.createF)(e)}slot(e){let t=e[this.id]>>1;return{create:e=>(e.values[t]=this.create(e),1),update:(e,n)=>{let r=e.values[t],i=this.updateF(r,n);return this.compareF(r,i)?0:(e.values[t]=i,1)},reconfigure:(e,n)=>null!=n.config.address[this.id]?(e.values[t]=n.field(this),0):(e.values[t]=this.create(e),1)}}init(e){return[this,Ow.of({field:this,create:e})]}get extension(){return this}}const Aw=4,Tw=3,Cw=2,Mw=1;function Pw(e){return t=>new Rw(t,e)}const $w={highest:Pw(0),high:Pw(Mw),default:Pw(Cw),low:Pw(Tw),lowest:Pw(Aw)};class Rw{constructor(e,t){this.inner=e,this.prec=t}}class Iw{of(e){return new Dw(this,e)}reconfigure(e){return Iw.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class Dw{constructor(e,t){this.compartment=e,this.inner=t}}class Nw{constructor(e,t,n,r,i,o){for(this.base=e,this.compartments=t,this.dynamicSlots=n,this.address=r,this.staticValues=i,this.facets=o,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(e,t,n){let r=[],i=Object.create(null),o=new Map;for(let n of function(e,t,n){let r=[[],[],[],[],[]],i=new Map;function o(e,s){let a=i.get(e);if(null!=a){if(a<=s)return;let t=r[a].indexOf(e);t>-1&&r[a].splice(t,1),e instanceof Dw&&n.delete(e.compartment)}if(i.set(e,s),Array.isArray(e))for(let t of e)o(t,s);else if(e instanceof Dw){if(n.has(e.compartment))throw new RangeError("Duplicate use of compartment in extensions");let r=t.get(e.compartment)||e.inner;n.set(e.compartment,r),o(r,s)}else if(e instanceof Rw)o(e.inner,e.prec);else if(e instanceof Ew)r[s].push(e),e.provides&&o(e.provides,s);else if(e instanceof Sw)r[s].push(e),e.facet.extensions&&o(e.facet.extensions,Cw);else{let t=e.extension;if(!t)throw new Error(`Unrecognized extension value in extension set (${e}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);o(t,s)}}return o(e,Cw),r.reduce((e,t)=>e.concat(t))}(e,t,o))n instanceof Ew?r.push(n):(i[n.facet.id]||(i[n.facet.id]=[])).push(n);let s=Object.create(null),a=[],l=[];for(let e of r)s[e.id]=l.length<<1,l.push(t=>e.slot(t));let c=null==n?void 0:n.config.facets;for(let e in i){let t=i[e],r=t[0].facet,o=c&&c[e]||[];if(t.every(e=>0==e.type))if(s[r.id]=a.length<<1|1,_w(o,t))a.push(n.facet(r));else{let e=r.combine(t.map(e=>e.value));a.push(n&&r.compare(e,n.facet(r))?n.facet(r):e)}else{for(let e of t)0==e.type?(s[e.id]=a.length<<1|1,a.push(e.value)):(s[e.id]=l.length<<1,l.push(t=>e.dynamicSlot(t)));s[r.id]=l.length<<1,l.push(e=>kw(e,r,t))}}let u=l.map(e=>e(s));return new Nw(e,o,u,s,a,i)}}function jw(e,t){if(1&t)return 2;let n=t>>1,r=e.status[n];if(4==r)throw new Error("Cyclic dependency between fields and/or facets");if(2&r)return r;e.status[n]=4;let i=e.computeSlot(e,e.config.dynamicSlots[n]);return e.status[n]=2|i}function Lw(e,t){return 1&t?e.config.staticValues[t>>1]:e.values[t>>1]}const Bw=yw.define(),Fw=yw.define({combine:e=>e.some(e=>e),static:!0}),zw=yw.define({combine:e=>e.length?e[0]:void 0,static:!0}),Uw=yw.define(),Qw=yw.define(),qw=yw.define(),Hw=yw.define({combine:e=>!!e.length&&e[0]});class Gw{constructor(e,t){this.type=e,this.value=t}static define(){return new Vw}}class Vw{of(e){return new Gw(this,e)}}class Ww{constructor(e){this.map=e}of(e){return new Xw(this,e)}}class Xw{constructor(e,t){this.type=e,this.value=t}map(e){let t=this.type.map(this.value,e);return void 0===t?void 0:t==this.value?this:new Xw(this.type,t)}is(e){return this.type==e}static define(e={}){return new Ww(e.map||(e=>e))}static mapEffects(e,t){if(!e.length)return e;let n=[];for(let r of e){let e=r.map(t);e&&n.push(e)}return n}}Xw.reconfigure=Xw.define(),Xw.appendConfig=Xw.define();class Yw{constructor(e,t,n,r,i,o){this.startState=e,this.changes=t,this.selection=n,this.effects=r,this.annotations=i,this.scrollIntoView=o,this._doc=null,this._state=null,n&&bw(n,t.newLength),i.some(e=>e.type==Yw.time)||(this.annotations=i.concat(Yw.time.of(Date.now())))}static create(e,t,n,r,i,o){return new Yw(e,t,n,r,i,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let t of this.annotations)if(t.type==e)return t.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let t=this.annotation(Yw.userEvent);return!(!t||!(t==e||t.length>e.length&&t.slice(0,e.length)==e&&"."==t[e.length]))}}function Zw(e,t){let n=[];for(let r=0,i=0;;){let o,s;if(r=e[r]))o=e[r++],s=e[r++];else{if(!(i=0;i--){let o=n[i](e);o&&Object.keys(o).length&&(r=Jw(r,Kw(t,o,e.changes.newLength),!0))}return r==e?e:Yw.create(t,e.changes,e.selection,r.effects,r.annotations,r.scrollIntoView)}(n?function(e){let t=e.startState,n=!0;for(let r of t.facet(Uw)){let t=r(e);if(!1===t){n=!1;break}Array.isArray(t)&&(n=!0===n?t:Zw(n,t))}if(!0!==n){let r,i;if(!1===n)i=e.changes.invertedDesc,r=lw.empty(t.doc.length);else{let t=e.changes.filter(n);r=t.changes,i=t.filtered.mapDesc(t.changes).invertedDesc}e=Yw.create(t,r,e.selection&&e.selection.map(i),Xw.mapEffects(e.effects,i),e.annotations,e.scrollIntoView)}let r=t.facet(Qw);for(let n=r.length-1;n>=0;n--){let i=r[n](e);e=i instanceof Yw?i:Array.isArray(i)&&1==i.length&&i[0]instanceof Yw?i[0]:ek(t,nk(i),!1)}return e}(i):i)}Yw.time=Gw.define(),Yw.userEvent=Gw.define(),Yw.addToHistory=Gw.define(),Yw.remote=Gw.define();const tk=[];function nk(e){return null==e?tk:Array.isArray(e)?e:[e]}var rk=function(e){return e[e.Word=0]="Word",e[e.Space=1]="Space",e[e.Other=2]="Other",e}(rk||(rk={}));const ik=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let ok;try{ok=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(e){}function sk(e){return t=>{if(!/\S/.test(t))return rk.Space;if(function(e){if(ok)return ok.test(e);for(let t=0;t"€"&&(n.toUpperCase()!=n.toLowerCase()||ik.test(n)))return!0}return!1}(t))return rk.Word;for(let n=0;n-1)return rk.Word;return rk.Other}}class ak{constructor(e,t,n,r,i,o){this.config=e,this.doc=t,this.selection=n,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=i,o&&(o._state=this);for(let e=0;ei.set(t,e)),n=null),i.set(t.value.compartment,t.value.extension)):t.is(Xw.reconfigure)?(n=null,r=t.value):t.is(Xw.appendConfig)&&(n=null,r=nk(r).concat(t.value));if(n)t=e.startState.values.slice();else{n=Nw.resolve(r,i,this),t=new ak(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(e,t)=>t.reconfigure(e,this),null).values}new ak(n,e.newDoc,e.newSelection,t,(t,n)=>n.update(t,e),e)}replaceSelection(e){return"string"==typeof e&&(e=this.toText(e)),this.changeByRange(t=>({changes:{from:t.from,to:t.to,insert:e},range:gw.cursor(t.from+e.length)}))}changeByRange(e){let t=this.selection,n=e(t.ranges[0]),r=this.changes(n.changes),i=[n.range],o=nk(n.effects);for(let n=1;ni.spec.fromJSON(o,e)))}return ak.create({doc:e.doc,selection:gw.fromJSON(e.selection),extensions:t.extensions?r.concat([t.extensions]):r})}static create(e={}){let t=Nw.resolve(e.extensions||[],new Map),n=e.doc instanceof Bx?e.doc:Bx.of((e.doc||"").split(t.staticFacet(ak.lineSeparator)||ow)),r=e.selection?e.selection instanceof gw?e.selection:gw.single(e.selection.anchor,e.selection.head):gw.single(0);return bw(r,n.length),t.staticFacet(Fw)||(r=r.asSingle()),new ak(t,n,r,t.dynamicSlots.map(()=>null),(e,t)=>t.create(e),null)}get tabSize(){return this.facet(ak.tabSize)}get lineBreak(){return this.facet(ak.lineSeparator)||"\n"}get readOnly(){return this.facet(Hw)}phrase(e,...t){for(let t of this.facet(ak.phrases))if(Object.prototype.hasOwnProperty.call(t,e)){e=t[e];break}return t.length&&(e=e.replace(/\$(\$|\d*)/g,(e,n)=>{if("$"==n)return"$";let r=+(n||1);return!r||r>t.length?e:t[r-1]})),e}languageDataAt(e,t,n=-1){let r=[];for(let i of this.facet(Bw))for(let o of i(this,t,n))Object.prototype.hasOwnProperty.call(o,e)&&r.push(o[e]);return r}charCategorizer(e){return sk(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:t,from:n,length:r}=this.doc.lineAt(e),i=this.charCategorizer(e),o=e-n,s=e-n;for(;o>0;){let e=Zx(t,o,!1);if(i(t.slice(e,o))!=rk.Word)break;o=e}for(;se.length?e[0]:4}),ak.lineSeparator=zw,ak.readOnly=Hw,ak.phrases=yw.define({compare(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length==r.length&&n.every(n=>e[n]==t[n])}}),ak.languageData=Bw,ak.changeFilter=Uw,ak.transactionFilter=Qw,ak.transactionExtender=qw,Iw.reconfigure=Xw.define();class ck{eq(e){return this==e}range(e,t=e){return uk.create(e,t,this)}}ck.prototype.startSide=ck.prototype.endSide=0,ck.prototype.point=!1,ck.prototype.mapMode=sw.TrackDel;class uk{constructor(e,t,n){this.from=e,this.to=t,this.value=n}static create(e,t,n){return new uk(e,t,n)}}function dk(e,t){return e.from-t.from||e.value.startSide-t.value.startSide}class hk{constructor(e,t,n,r){this.from=e,this.to=t,this.value=n,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,t,n,r=0){let i=n?this.to:this.from;for(let o=r,s=i.length;;){if(o==s)return o;let r=o+s>>1,a=i[r]-e||(n?this.value[r].endSide:this.value[r].startSide)-t;if(r==o)return a>=0?o:s;a>=0?s=r:o=r+1}}between(e,t,n,r){for(let i=this.findIndex(t,-1e9,!0),o=this.findIndex(n,1e9,!1,i);ic||l==c&&u.startSide>0&&u.endSide<=0)continue;(c-l||u.endSide-u.startSide)<0||(o<0&&(o=l),u.point&&(s=Math.max(s,c-l)),n.push(u),r.push(l-o),i.push(c-o))}return{mapped:n.length?new hk(r,i,n,s):null,pos:o}}}class pk{constructor(e,t,n,r){this.chunkPos=e,this.chunk=t,this.nextLayer=n,this.maxPoint=r}static create(e,t,n,r){return new pk(e,t,n,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let t of this.chunk)e+=t.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:t=[],sort:n=!1,filterFrom:r=0,filterTo:i=this.length}=e,o=e.filter;if(0==t.length&&!o)return this;if(n&&(t=t.slice().sort(dk)),this.isEmpty)return t.length?pk.of(t):this;let s=new gk(this,null,-1).goto(0),a=0,l=[],c=new fk;for(;s.value||a=0){let e=t[a++];c.addInner(e.from,e.to,e.value)||l.push(e)}else 1==s.rangeIndex&&s.chunkIndexthis.chunkEnd(s.chunkIndex)||is.to||i=i&&e<=i+o.length&&!1===o.between(i,e-i,t-i,n))return}this.nextLayer.between(e,t,n)}}iter(e=0){return bk.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,t=0){return bk.from(e).goto(t)}static compare(e,t,n,r,i=-1){let o=e.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),s=t.filter(e=>e.maxPoint>0||!e.isEmpty&&e.maxPoint>=i),a=mk(o,s,n),l=new yk(o,a,i),c=new yk(s,a,i);n.iterGaps((e,t,n)=>_k(l,e,c,t,n,r)),n.empty&&0==n.length&&_k(l,0,c,0,0,r)}static eq(e,t,n=0,r){null==r&&(r=999999999);let i=e.filter(e=>!e.isEmpty&&t.indexOf(e)<0),o=t.filter(t=>!t.isEmpty&&e.indexOf(t)<0);if(i.length!=o.length)return!1;if(!i.length)return!0;let s=mk(i,o),a=new yk(i,s,0).goto(n),l=new yk(o,s,0).goto(n);for(;;){if(a.to!=l.to||!Sk(a.active,l.active)||a.point&&(!l.point||!a.point.eq(l.point)))return!1;if(a.to>r)return!0;a.next(),l.next()}}static spans(e,t,n,r,i=-1){let o=new yk(e,null,i).goto(t),s=t,a=o.openStart;for(;;){let e=Math.min(o.to,n);if(o.point){let n=o.activeForPoint(o.to),i=o.pointFroms&&(r.span(s,e,o.active,a),a=o.openEnd(e));if(o.to>n)return a+(o.point&&o.to>n?1:0);s=o.to,o.next()}}static of(e,t=!1){let n=new fk;for(let r of e instanceof uk?[e]:t?function(e){if(e.length>1)for(let t=e[0],n=1;n0)return e.slice().sort(dk);t=r}return e}(e):e)n.add(r.from,r.to,r.value);return n.finish()}}pk.empty=new pk([],[],null,-1),pk.empty.nextLayer=pk.empty;class fk{constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}finishChunk(e){this.chunks.push(new hk(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}add(e,t,n){this.addInner(e,t,n)||(this.nextLayer||(this.nextLayer=new fk)).add(e,t,n)}addInner(e,t,n){let r=e-this.lastTo||n.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||n.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(r<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(t-this.chunkStart),this.last=n,this.lastFrom=e,this.lastTo=t,this.value.push(n),n.point&&(this.maxPoint=Math.max(this.maxPoint,t-e)),!0)}addChunk(e,t){if((e-this.lastTo||t.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,t.maxPoint),this.chunks.push(t),this.chunkPos.push(e);let n=t.value.length-1;return this.last=t.value[n],this.lastFrom=t.from[n]+e,this.lastTo=t.to[n]+e,!0}finish(){return this.finishInner(pk.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return e;let t=pk.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,t}}function mk(e,t,n){let r=new Map;for(let t of e)for(let e=0;e=this.minPoint)break}}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=n&&r.push(new gk(o,t,n,i));return 1==r.length?r[0]:new bk(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,t=-1e9){for(let n of this.heap)n.goto(e,t);for(let e=this.heap.length>>1;e>=0;e--)vk(this.heap,e);return this.next(),this}forward(e,t){for(let n of this.heap)n.forward(e,t);for(let e=this.heap.length>>1;e>=0;e--)vk(this.heap,e);(this.to-e||this.value.endSide-t)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),vk(this.heap,0)}}}function vk(e,t){for(let n=e[t];;){let r=1+(t<<1);if(r>=e.length)break;let i=e[r];if(r+1=0&&(i=e[r+1],r++),n.compare(i)<0)break;e[r]=n,e[t]=i,t=r}}class yk{constructor(e,t,n){this.minPoint=n,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=bk.from(e,t,n)}goto(e,t=-1e9){return this.cursor.goto(e,t),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=t,this.openStart=-1,this.next(),this}forward(e,t){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-t)<0;)this.removeActive(this.minActive);this.cursor.forward(e,t)}removeActive(e){xk(this.active,e),xk(this.activeTo,e),xk(this.activeRank,e),this.minActive=kk(this.active,this.activeTo)}addActive(e){let t=0,{value:n,to:r,rank:i}=this.cursor;for(;t-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),n&&xk(n,r)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let e=this.cursor.value;if(e.point){if(!(t&&this.cursor.to==this.to&&this.cursor.from=0&&n[t]=0&&!(this.activeRank[n]e||this.activeTo[n]==e&&this.active[n].endSide>=this.point.endSide)&&t.push(this.active[n]);return t.reverse()}openEnd(e){let t=0;for(let n=this.activeTo.length-1;n>=0&&this.activeTo[n]>e;n--)t++;return t}}function _k(e,t,n,r,i,o){e.goto(t),n.goto(r);let s=r+i,a=r,l=r-t;for(;;){let t=e.to+l-n.to||e.endSide-n.endSide,r=t<0?e.to+l:n.to,i=Math.min(r,s);if(e.point||n.point?e.point&&n.point&&(e.point==n.point||e.point.eq(n.point))&&Sk(e.activeForPoint(e.to+l),n.activeForPoint(n.to))||o.comparePoint(a,i,e.point,n.point):i>a&&!Sk(e.active,n.active)&&o.compareRange(a,i,e.active,n.active),r>s)break;a=r,t<=0&&e.next(),t>=0&&n.next()}}function Sk(e,t){if(e.length!=t.length)return!1;for(let n=0;n=t;n--)e[n+1]=e[n];e[t]=n}function kk(e,t){let n=-1,r=1e9;for(let i=0;i=t)return r;if(r==e.length)break;i+=9==e.charCodeAt(r)?n-i%n:1,r=Zx(e,r)}return!0===r?-1:e.length}const Ak="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),Tk="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),Ck="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class Mk{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function i(e,t,o,s){let a=[],l=/^@(\w+)\b/.exec(e[0]),c=l&&"keyframes"==l[1];if(l&&null==t)return o.push(e[0]+";");for(let n in t){let s=t[n];if(/&/.test(n))i(n.split(/,\s*/).map(t=>e.map(e=>t.replace(/&/,e))).reduce((e,t)=>e.concat(t)),s,o);else if(s&&"object"==typeof s){if(!l)throw new RangeError("The value of a property ("+n+") should be a primitive value.");i(r(n),s,a,c)}else null!=s&&a.push(n.replace(/_.*/,"").replace(/[A-Z]/g,e=>"-"+e.toLowerCase())+": "+s+";")}(a.length||c)&&o.push((!n||l||s?e:e.map(n)).join(", ")+" {"+a.join(" ")+"}")}for(let t in e)i(r(t),e[t],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let e=Ck[Ak]||1;return Ck[Ak]=e+1,"ͼ"+e.toString(36)}static mount(e,t){(e[Tk]||new $k(e)).mount(Array.isArray(t)?t:[t])}}let Pk=new Map;class $k{constructor(e){let t=e.ownerDocument||e,n=t.defaultView;if(!e.head&&e.adoptedStyleSheets&&n.CSSStyleSheet){let r=Pk.get(t);if(r)return e.adoptedStyleSheets=[r.sheet,...e.adoptedStyleSheets],e[Tk]=r;this.sheet=new n.CSSStyleSheet,e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets],Pk.set(t,this)}else{this.styleTag=t.createElement("style");let n=e.head||e;n.insertBefore(this.styleTag,n.firstChild)}this.modules=[],e[Tk]=this}mount(e){let t=this.sheet,n=0,r=0;for(let i=0;i-1&&(this.modules.splice(s,1),r--,s=-1),-1==s){if(this.modules.splice(r++,0,o),t)for(let e=0;e",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},Dk="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),Nk=("undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),"undefined"!=typeof navigator&&/Mac/.test(navigator.platform)),jk="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Lk=Nk||Dk&&+Dk[1]<57,Bk=0;Bk<10;Bk++)Rk[48+Bk]=Rk[96+Bk]=String(Bk);for(Bk=1;Bk<=24;Bk++)Rk[Bk+111]="F"+Bk;for(Bk=65;Bk<=90;Bk++)Rk[Bk]=String.fromCharCode(Bk+32),Ik[Bk]=String.fromCharCode(Bk);for(var Fk in Rk)Ik.hasOwnProperty(Fk)||(Ik[Fk]=Rk[Fk]);function zk(e){var t=!(Lk&&(e.ctrlKey||e.altKey||e.metaKey)||jk&&e.shiftKey&&e.key&&1==e.key.length||"Unidentified"==e.key)&&e.key||(e.shiftKey?Ik:Rk)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}function Uk(e){let t;return t=11==e.nodeType?e.getSelection?e:e.ownerDocument:e,t.getSelection()}function Qk(e,t){return!!t&&(e==t||e.contains(1!=t.nodeType?t.parentNode:t))}function qk(e,t){if(!t.anchorNode)return!1;try{return Qk(e,t.anchorNode)}catch(e){return!1}}function Hk(e){return 3==e.nodeType?nO(e,0,e.nodeValue.length).getClientRects():1==e.nodeType?e.getClientRects():[]}function Gk(e,t,n,r){return!!n&&(Wk(e,t,n,r,-1)||Wk(e,t,n,r,1))}function Vk(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t}function Wk(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:Xk(e))){if("DIV"==e.nodeName)return!1;let n=e.parentNode;if(!n||1!=n.nodeType)return!1;t=Vk(e)+(i<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if(1==(e=e.childNodes[t+(i<0?-1:0)]).nodeType&&"false"==e.contentEditable)return!1;t=i<0?Xk(e):0}}}function Xk(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function Yk(e,t){let n=t?e.left:e.right;return{left:n,right:n,top:e.top,bottom:e.bottom}}function Zk(e){return{left:0,right:e.innerWidth,top:0,bottom:e.innerHeight}}class Jk{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){this.set(e.anchorNode,e.anchorOffset,e.focusNode,e.focusOffset)}set(e,t,n,r){this.anchorNode=e,this.anchorOffset=t,this.focusNode=n,this.focusOffset=r}}let Kk,eO=null;function tO(e){if(e.setActive)return e.setActive();if(eO)return e.focus(eO);let t=[];for(let n=e;n&&(t.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(e.focus(null==eO?{get preventScroll(){return eO={preventScroll:!0},!0}}:void 0),!eO){eO=!1;for(let e=0;et)return n.domBoundsAround(e,t,l);if(u>=e&&-1==r&&(r=a,i=l),l>t&&n.dom.parentNode==this.dom){o=a,s=c;break}c=u,l=u+n.breakAfter}return{from:i,to:s<0?n+this.length:s,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o=0?this.children[o].dom:null}}markDirty(e=!1){this.dirty|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.dirty|=2),1&t.dirty)return;t.dirty|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.dirty&&this.markParentsDirty(!0))}setDOM(e){this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,n=sO){this.markDirty();for(let n=e;nthis.pos||e==this.pos&&(t>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}function uO(e,t,n,r,i,o,s,a,l){let{children:c}=e,u=c.length?c[t]:null,d=o.length?o[o.length-1]:null,h=d?d.breakAfter:s;if(!(t==r&&u&&!s&&!h&&o.length<2&&u.merge(n,i,o.length?d:null,0==n,a,l))){if(r0&&(!s&&o.length&&u.merge(n,u.length,o[0],!1,a,0)?u.breakAfter=o.shift().breakAfter:(n2);var wO={mac:xO||/Mac/.test(hO.platform),windows:/Win/.test(hO.platform),linux:/Linux|X11/.test(hO.platform),ie:bO,ie_version:mO?pO.documentMode||6:gO?+gO[1]:fO?+fO[1]:0,gecko:vO,gecko_version:vO?+(/Firefox\/(\d+)/.exec(hO.userAgent)||[0,0])[1]:0,chrome:!!yO,chrome_version:yO?+yO[1]:0,ios:xO,android:/Android\b/.test(hO.userAgent),webkit:_O,safari:SO,webkit_version:_O?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:null!=pO.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};class kO extends aO{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){3==e.nodeType&&this.createDOM(e)}merge(e,t,n){return(!n||n instanceof kO&&!(this.length-(t-e)+n.length>256))&&(this.text=this.text.slice(0,e)+(n?n.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new kO(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new oO(this.dom,e)}domBoundsAround(e,t,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return EO(this.dom,e,t)}}class OO extends aO{constructor(e,t=[],n=0){super(),this.mark=e,this.children=t,this.length=n;for(let e of t)e.setParent(this)}setAttrs(e){if(iO(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.dirty|=6)}sync(e,t){this.dom?4&this.dirty&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,n,r,i,o){return(!n||!(!(n instanceof OO&&n.mark.eq(this.mark))||e&&i<=0||te&&t.push(n=e&&(r=i),n=s,i++}let o=this.length-e;return this.length=e,r>-1&&(this.children.length=r,this.markDirty()),new OO(this.mark,t,o)}domAtPos(e){return RO(this,e)}coordsAt(e,t){return IO(this,e,t)}}function EO(e,t,n){let r=e.nodeValue.length;t>r&&(t=r);let i=t,o=t,s=0;0==t&&n<0||t==r&&n>=0?wO.chrome||wO.gecko||(t?(i--,s=1):o=0)?0:a.length-1];return wO.safari&&!s&&0==l.width&&(l=Array.prototype.find.call(a,e=>e.width)||l),s?Yk(l,s<0):l||null}class AO extends aO{constructor(e,t,n){super(),this.widget=e,this.length=t,this.side=n,this.prevWidget=null}static create(e,t,n){return new(e.customView||AO)(e,t,n)}split(e){let t=AO.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){this.dom&&this.widget.updateDOM(this.dom,e)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}getSide(){return this.side}merge(e,t,n,r,i,o){return!(n&&(!(n instanceof AO&&this.widget.compare(n.widget))||e>0&&i<=0||t0)?oO.before(this.dom):oO.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let n=this.widget.coordsAt(this.dom,e,t);if(n)return n;let r=this.dom.getClientRects(),i=null;if(!r.length)return null;for(let t=e>0?r.length-1:0;i=r[t],!(e>0?0==t:t==r.length-1||i.top0?-1:1);return this.length?i:Yk(i,this.side>0)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class TO extends AO{domAtPos(e){let{topView:t,text:n}=this.widget;return t?CO(e,0,t,n,this.length-t.length,(e,t)=>e.domAtPos(t),(e,t)=>new oO(e,Math.min(t,e.nodeValue.length))):new oO(n,Math.min(e,n.nodeValue.length))}sync(){this.setDOM(this.widget.toDOM())}localPosFromDOM(e,t){let{topView:n,text:r}=this.widget;return n?function e(t,n,r,i,o){if(r instanceof OO){let s=0;for(let a=r.dom.firstChild;a;a=a.nextSibling){let r=aO.get(a);if(r){let l=Qk(a,i);if(Qk(a,t))return s+(l?e(t,n,r,i,o):r.localPosFromDOM(t,n));s+=r.length+(l?o:0)}else{let e=PO(t,n,a);if(null!=e.result)return s+e.result;s+=e.size}}}else if(r.dom==i)return Math.min(n,i.nodeValue.length);return r.localPosFromDOM(t,n)}(e,t,n,r,this.length-n.length):Math.min(t,this.length)}ignoreMutation(){return!1}get overrideDOMText(){return null}coordsAt(e,t){let{topView:n,text:r}=this.widget;return n?CO(e,t,n,r,this.length-n.length,(e,t,n)=>e.coordsAt(t,n),(e,t,n)=>EO(e,t,n)):EO(r,e,t)}destroy(){var e;super.destroy(),null===(e=this.widget.topView)||void 0===e||e.destroy()}get isEditable(){return!0}canReuseDOM(){return!0}}function CO(e,t,n,r,i,o,s){if(n instanceof OO){for(let a=n.dom.firstChild;a;a=a.nextSibling){let n=aO.get(a);if(n){let l=Qk(a,r),c=n.length+(l?i:0);if(e0?oO.before(this.dom):oO.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Bx.empty}get isHidden(){return!0}}function RO(e,t){let n=e.dom,{children:r}=e,i=0;for(let e=0;ie&&t0;e--){let t=r[e-1];if(t.dom.parentNode==n)return t.domAtPos(t.length)}for(let e=i;e=a&&(u.children.length?e(u,a-c):(!o||o.isHidden&&n>0)&&(d>a||c==d&&u.getSide()>0)?(o=u,s=a-c):(c0?3e8:-4e8:t>0?1e8:-1e8,new QO(e,t,t,n,e.widget||null,!1)}static replace(e){let t,n,r=!!e.block;if(e.isBlockGap)t=-5e8,n=4e8;else{let{start:i,end:o}=qO(e,r);t=(i?r?-3e8:-1:5e8)-1,n=1+(o?r?2e8:1:-6e8)}return new QO(e,t,n,r,e.widget||null,!0)}static line(e){return new UO(e)}static set(e,t=!1){return pk.of(e,t)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}FO.none=pk.empty;class zO extends FO{constructor(e){let{start:t,end:n}=qO(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){return this==e||e instanceof zO&&this.tagName==e.tagName&&this.class==e.class&&NO(this.attrs,e.attrs)}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}zO.prototype.point=!1;class UO extends FO{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof UO&&this.spec.class==e.spec.class&&NO(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}UO.prototype.mapMode=sw.TrackBefore,UO.prototype.point=!0;class QO extends FO{constructor(e,t,n,r,i,o){super(t,n,i,e),this.block=r,this.isReplace=o,this.mapMode=r?t<=0?sw.TrackBefore:sw.TrackAfter:sw.TrackDel}get type(){return this.startSide=5}eq(e){return e instanceof QO&&(t=this.widget,n=e.widget,t==n||!!(t&&n&&t.compare(n)))&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide;var t,n}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}function qO(e,t=!1){let{inclusiveStart:n,inclusiveEnd:r}=e;return null==n&&(n=e.inclusive),null==r&&(r=e.inclusive),{start:null!=n?n:t,end:null!=r?r:t}}function HO(e,t,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=e?n[i]=Math.max(n[i],t):n.push(e,t)}QO.prototype.point=!0;class GO extends aO{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,t,n,r,i,o){if(n){if(!(n instanceof GO))return!1;this.dom||n.transferDOM(this)}return r&&this.setDeco(n?n.attrs:null),dO(this,e,t,n?n.children:[],i,o),!0}split(e){let t=new GO;if(t.breakAfter=this.breakAfter,0==this.length)return t;let{i:n,off:r}=this.childPos(e);r&&(t.append(this.children[n].split(r),0),this.children[n].merge(r,this.children[n].length,null,!1,0,0),n++);for(let e=n;e0&&0==this.children[n-1].length;)this.children[--n].destroy();return this.children.length=n,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){NO(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){!function e(t,n,r){let i,{children:o}=t;r>0&&n instanceof OO&&o.length&&(i=o[o.length-1])instanceof OO&&i.mark.eq(n.mark)?e(i,n.children[0],r-1):(o.push(n),n.setParent(t)),t.length+=n.length}(this,e,t)}addLineDeco(e){let t=e.spec.attributes,n=e.spec.class;t&&(this.attrs=DO(t,this.attrs||{})),n&&(this.attrs=DO({class:n},this.attrs||{}))}domAtPos(e){return RO(this,e)}reuseDOM(e){"DIV"==e.nodeName&&(this.setDOM(e),this.dirty|=6)}sync(e,t){var n;this.dom?4&this.dirty&&(iO(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(jO(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let r=this.dom.lastChild;for(;r&&aO.get(r)instanceof OO;)r=r.lastChild;if(!(r&&this.length&&("BR"==r.nodeName||0!=(null===(n=aO.get(r))||void 0===n?void 0:n.isEditable)||wO.ios&&this.children.some(e=>e instanceof kO)))){let e=document.createElement("BR");e.cmIgnore=!0,this.dom.appendChild(e)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let e,t=0;for(let n of this.children){if(!(n instanceof kO)||/[^ -~]/.test(n.text))return null;let r=Hk(n.dom);if(1!=r.length)return null;t+=r[0].width,e=r[0].height}return t?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:t/this.length,textHeight:e}:null}coordsAt(e,t){let n=IO(this,e,t);if(!this.children.length&&n&&this.parent){let{heightOracle:e}=this.parent.view.viewState,t=n.bottom-n.top;if(Math.abs(t-e.lineHeight)<2&&e.textHeight=t){if(i instanceof GO)return i;if(o>t)break}r=o+i.breakAfter}return null}}class VO extends aO{constructor(e,t,n){super(),this.widget=e,this.length=t,this.type=n,this.breakAfter=0,this.prevWidget=null}merge(e,t,n,r,i,o){return!(n&&(!(n instanceof VO&&this.widget.compare(n.widget))||e>0&&i<=0||t0;){if(this.textOff==this.text.length){let{value:t,lineBreak:n,done:r}=this.cursor.next(this.skip);if(this.skip=0,r)throw new Error("Ran out of text content when drawing inline views");if(n){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}this.text=t,this.textOff=0}let r=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-n)),this.getLine().append(XO(new kO(this.text.slice(this.textOff,this.textOff+r)),t),n),this.atCursorPos=!0,this.textOff+=r,e-=r,n=0}}span(e,t,n,r){this.buildText(t-e,n,r),this.pos=t,this.openStart<0&&(this.openStart=r)}point(e,t,n,r,i,o){if(this.disallowBlockEffectsFor[o]&&n instanceof QO){if(n.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let s=t-e;if(n instanceof QO)if(n.block){let{type:e}=n;e!=BO.WidgetAfter||this.posCovered()||this.getLine(),this.addBlockWidget(new VO(n.widget||new YO("div"),s,e))}else{let o=AO.create(n.widget||new YO("span"),s,s?0:n.startSide),a=this.atCursorPos&&!o.isEditable&&i<=r.length&&(e0),l=!o.isEditable&&(er.length||n.startSide<=0),c=this.getLine();2!=this.pendingBuffer||a||o.isEditable||(this.pendingBuffer=0),this.flushBuffer(r),a&&(c.append(XO(new $O(1),r),i),i=r.length+Math.max(0,i-r.length)),c.append(XO(o,r),i),this.atCursorPos=l,this.pendingBuffer=l?er.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);s&&(this.textOff+s<=this.text.length?this.textOff+=s:(this.skip+=s-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=i)}static build(e,t,n,r,i){let o=new WO(e,t,n,i);return o.openEnd=pk.spans(r,t,n,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function XO(e,t){for(let n of t)e=new OO(n,[e],e.length);return e}class YO extends LO{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}const ZO=yw.define(),JO=yw.define(),KO=yw.define(),eE=yw.define(),tE=yw.define(),nE=yw.define(),rE=yw.define(),iE=yw.define({combine:e=>e.some(e=>e)}),oE=yw.define({combine:e=>e.some(e=>e)});class sE{constructor(e,t="nearest",n="nearest",r=5,i=5){this.range=e,this.y=t,this.x=n,this.yMargin=r,this.xMargin=i}map(e){return e.empty?this:new sE(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin)}}const aE=Xw.define({map:(e,t)=>e.map(t)});function lE(e,t,n){let r=e.facet(eE);r.length?r[0](t):window.onerror?window.onerror(String(t),n,void 0,void 0,t):n?console.error(n+":",t):console.error(t)}const cE=yw.define({combine:e=>!e.length||e[0]});let uE=0;const dE=yw.define();class hE{constructor(e,t,n,r){this.id=e,this.create=t,this.domEventHandlers=n,this.extension=r(this)}static define(e,t){const{eventHandlers:n,provide:r,decorations:i}=t||{};return new hE(uE++,e,n,e=>{let t=[dE.of(e)];return i&&t.push(gE.of(t=>{let n=t.plugin(e);return n?i(n):FO.none})),r&&t.push(r(e)),t})}static fromClass(e,t){return hE.define(t=>new e(t),t)}}class pE{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(lE(e.state,t,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(e){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){lE(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(null===(t=this.value)||void 0===t?void 0:t.destroy)try{this.value.destroy()}catch(t){lE(e.state,t,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const fE=yw.define(),mE=yw.define(),gE=yw.define(),bE=yw.define(),vE=yw.define(),yE=yw.define();class _E{constructor(e,t,n,r){this.fromA=e,this.toA=t,this.fromB=n,this.toB=r}join(e){return new _E(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let r=e[t-1];if(!(r.fromA>n.toA)){if(r.toAc)break;i+=2}if(!a)return n;new _E(a.fromA,a.toA,a.fromB,a.toB).addToSet(n),o=a.toA,s=a.toB}}}class SE{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=lw.empty(this.startState.doc.length);for(let e of n)this.changes=this.changes.compose(e.changes);let r=[];this.changes.iterChangedRanges((e,t,n,i)=>r.push(new _E(e,t,n,i))),this.changedRanges=r}static create(e,t,n){return new SE(e,t,n)}get viewportChanged(){return(4&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(10&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return 0==this.flags&&0==this.transactions.length}}var xE=function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e}(xE||(xE={}));const wE=xE.LTR,kE=xE.RTL;function OE(e){let t=[];for(let n=0;n=t){if(s.level==n)return o;(i<0||(0!=r?r<0?s.fromt:e[i].level>s.level))&&(i=o)}}if(i<0)throw new RangeError("Index out of range");return i}}const $E=[];function RE(e,t){let n=e.length,r=t==wE?1:2,i=t==wE?2:1;if(!e||1==r&&!ME.test(e))return IE(n);for(let t=0,i=r,s=r;t=0;e-=3)if(CE[e+1]==-o){let t=CE[e+2],n=2&t?r:4&t?1&t?i:r:0;n&&($E[a]=$E[CE[e]]=n),l=e;break}}else{if(189==CE.length)break;CE[l++]=a,CE[l++]=t,CE[l++]=c}else if(2==(s=$E[a])||1==s){let e=s==r;c=e?0:1;for(let t=l-3;t>=0;t-=3){let n=CE[t+2];if(2&n)break;if(e)CE[t+2]|=2;else{if(4&n)break;CE[t+2]|=4}}}for(let e=0;et;){let e=n,r=2!=$E[--n];for(;n>t&&r==(2!=$E[n-1]);)n--;s.push(new PE(n,e,r?2:1))}else s.push(new PE(t,e,0))}else for(let e=0;e1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=s-1);n=o+s}}readNode(e){if(e.cmIgnore)return;let t=aO.get(e),n=t&&t.overrideDOMText;if(null!=n){this.findPointInside(e,n.length);for(let e=n.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else 3==e.nodeType?this.readTextNode(e):"BR"==e.nodeName?e.nextSibling&&this.lineBreak():1==e.nodeType&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(3==e.nodeType?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+Math.min(t,n.offset))}}function LE(e){return 1==e.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(e.nodeName)}class BE{constructor(e,t){this.node=e,this.offset=t,this.pos=-1}}class FE extends aO{constructor(e){super(),this.view=e,this.compositionDeco=FO.none,this.decorations=[],this.dynamicDecorationMap=[],this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new GO],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new _E(0,0,0,e.state.doc.length)],0)}get length(){return this.view.state.doc.length}update(e){let t=e.changedRanges;this.minWidth>0&&t.length&&(t.every(({fromA:e,toA:t})=>tthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.view.inputState.composing<0?this.compositionDeco=FO.none:(e.transactions.length||this.dirty)&&(this.compositionDeco=function(e,t){let n=UE(e);if(!n)return FO.none;let{from:r,to:i,node:o,text:s}=n,a=t.mapPos(r,1),l=Math.max(a,t.mapPos(i,-1)),{state:c}=e,u=3==o.nodeType?o.nodeValue:new jE([],c).readRange(o.firstChild,null).text;if(u.indexOf("￿")>-1)return FO.none;if(l-a{this.dom.style.height=this.view.viewState.contentHeight+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let e=wO.chrome||wO.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,e),this.dirty=0,e&&(e.written||n.selectionRange.focusNode!=e.node)&&(this.forceSelection=!0),this.dom.style.height=""});let r=[];if(this.view.viewport.from||this.view.viewport.to=0?e[t]:null;if(!r)break;let{fromA:i,toA:o,fromB:s,toB:a}=r,{content:l,breakAtStart:c,openStart:u,openEnd:d}=WO.build(this.view.state.doc,s,a,this.decorations,this.dynamicDecorationMap),{i:h,off:p}=n.findPos(o,1),{i:f,off:m}=n.findPos(i,-1);uO(this,f,m,h,p,l,c,u,d)}}updateSelection(e=!1,t=!1){!e&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();let n=this.view.root.activeElement,r=n==this.dom,i=!r&&qk(this.dom,this.view.observer.selectionRange)&&!(n&&this.dom.contains(n));if(!(r||t||i))return;let o=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,a=this.domAtPos(s.anchor),l=s.empty?a:this.domAtPos(s.head);if(wO.gecko&&s.empty&&!this.compositionDeco.size&&(1==(c=a).node.nodeType&&c.node.firstChild&&(0==c.offset||"false"==c.node.childNodes[c.offset-1].contentEditable)&&(c.offset==c.node.childNodes.length||"false"==c.node.childNodes[c.offset].contentEditable))){let e=document.createTextNode("");this.view.observer.ignore(()=>a.node.insertBefore(e,a.node.childNodes[a.offset]||null)),a=l=new oO(e,0),o=!0}var c;let u=this.view.observer.selectionRange;!o&&u.focusNode&&Gk(a.node,a.offset,u.anchorNode,u.anchorOffset)&&Gk(l.node,l.offset,u.focusNode,u.focusOffset)||(this.view.observer.ignore(()=>{wO.android&&wO.chrome&&this.dom.contains(u.focusNode)&&function(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(1==n.nodeType&&"false"==n.contentEditable)return!0;return!1}(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let e=Uk(this.view.root);if(e)if(s.empty){if(wO.gecko){let e=(t=a.node,r=a.offset,1!=t.nodeType?0:(r&&"false"==t.childNodes[r-1].contentEditable?1:0)|(rs.head&&([a,l]=[l,a]),t.setEnd(l.node,l.offset),t.setStart(a.node,a.offset),e.removeAllRanges(),e.addRange(t)}else;var t,r;i&&this.view.root.activeElement==this.dom&&(this.dom.blur(),n&&n.focus())}),this.view.observer.setSelectionRange(a,l)),this.impreciseAnchor=a.precise?null:new oO(u.anchorNode,u.anchorOffset),this.impreciseHead=l.precise?null:new oO(u.focusNode,u.focusOffset)}enforceCursorAssoc(){if(this.compositionDeco.size)return;let{view:e}=this,t=e.state.selection.main,n=Uk(e.root),{anchorNode:r,anchorOffset:i}=e.observer.selectionRange;if(!(n&&t.empty&&t.assoc&&n.modify))return;let o=GO.find(this,t.head);if(!o)return;let s=o.posAtStart;if(t.head==s||t.head==s+o.length)return;let a=this.coordsAt(t.head,-1),l=this.coordsAt(t.head,1);if(!a||!l||a.bottom>l.top)return;let c=this.domAtPos(t.head+t.assoc);n.collapse(c.node,c.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let u=e.observer.selectionRange;e.docView.posFromDOM(u.anchorNode,u.anchorOffset)!=t.from&&n.collapse(r,i)}nearest(e){for(let t=e;t;){let e=aO.get(t);if(e&&e.rootView==this)return e;t=t.parentNode}return null}posFromDOM(e,t){let n=this.nearest(e);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(e,t)+n.posAtStart}domAtPos(e){let{i:t,off:n}=this.childCursor().findPos(e,-1);for(;to||e==o&&i.type!=BO.WidgetBefore&&i.type!=BO.WidgetAfter&&(!r||2==t||this.children[r-1].breakAfter||this.children[r-1].type==BO.WidgetBefore&&t>-2))return i.coordsAt(e-o,t);n=o}}measureVisibleLineHeights(e){let t=[],{from:n,to:r}=e,i=this.view.contentDOM.clientWidth,o=i>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,a=this.view.textDirection==xE.LTR;for(let e=0,l=0;lr)break;if(e>=n){let n=c.dom.getBoundingClientRect();if(t.push(n.height),o){let t=c.dom.lastChild,r=t?Hk(t):[];if(r.length){let t=r[r.length-1],o=a?t.right-n.left:n.right-t.left;o>s&&(s=o,this.minWidth=i,this.minWidthFrom=e,this.minWidthTo=u)}}}e=u+c.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return"rtl"==getComputedStyle(this.children[t].dom).direction?xE.RTL:xE.LTR}measureTextSize(){for(let e of this.children)if(e instanceof GO){let t=e.measureTextSize();if(t)return t}let e,t,n,r=document.createElement("div");return r.className="cm-line",r.style.width="99999px",r.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(r);let i=Hk(r.firstChild)[0];e=r.getBoundingClientRect().height,t=i?i.width/27:7,n=i?i.height:e,r.remove()}),{lineHeight:e,charWidth:t,textHeight:n}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new cO(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let i=r==t.viewports.length?null:t.viewports[r],o=i?i.from-1:this.length;if(o>n){let r=t.lineBlockAt(o).bottom-t.lineBlockAt(n).top;e.push(FO.replace({widget:new zE(r),block:!0,inclusive:!0,isBlockGap:!0}).range(n,o))}if(!i)break;n=i.to+1}return FO.set(e)}updateDeco(){let e=this.view.state.facet(gE).map((e,t)=>(this.dynamicDecorationMap[t]="function"==typeof e)?e(this.view):e);for(let t=e.length;tn.anchor?-1:1);if(!r)return;!n.empty&&(t=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,t.left),top:Math.min(r.top,t.top),right:Math.max(r.right,t.right),bottom:Math.max(r.bottom,t.bottom)});let i=0,o=0,s=0,a=0;for(let e of this.view.state.facet(vE).map(e=>e(this.view)))if(e){let{left:t,right:n,top:r,bottom:l}=e;null!=t&&(i=Math.max(i,t)),null!=n&&(o=Math.max(o,n)),null!=r&&(s=Math.max(s,r)),null!=l&&(a=Math.max(a,l))}let l={left:r.left-i,top:r.top-s,right:r.right+o,bottom:r.bottom+a};!function(e,t,n,r,i,o,s,a){let l=e.ownerDocument,c=l.defaultView||window;for(let u=e;u;)if(1==u.nodeType){let e,d=u==l.body;if(d)e=Zk(c);else{if(u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let t=u.getBoundingClientRect();e={left:t.left,right:t.left+u.clientWidth,top:t.top,bottom:t.top+u.clientHeight}}let h=0,p=0;if("nearest"==i)t.top0&&t.bottom>e.bottom+p&&(p=t.bottom-e.bottom+p+s)):t.bottom>e.bottom&&(p=t.bottom-e.bottom+s,n<0&&t.top-p0&&t.right>e.right+h&&(h=t.right-e.right+h+o)):t.right>e.right&&(h=t.right-e.right+o,n<0&&t.left0))break;n=n.childNodes[r-1],r=Xk(n)}if(n>=0)for(let r=e,i=t;;){if(3==r.nodeType)return r;if(!(1==r.nodeType&&i=0))break;r=r.childNodes[i],i=0}return null}class HE{constructor(){this.changes=[]}compareRange(e,t){HO(e,t,this.changes)}comparePoint(e,t){HO(e,t,this.changes)}}function GE(e,t){return t.left>e?t.left-e:Math.max(0,e-t.right)}function VE(e,t){return t.top>e?t.top-e:Math.max(0,e-t.bottom)}function WE(e,t){return e.topt.top+1}function XE(e,t){return te.bottom?{top:e.top,left:e.left,right:e.right,bottom:t}:e}function ZE(e,t,n){let r=e.nodeValue.length,i=-1,o=1e9,s=0;for(let a=0;an?c.top-n:n-c.bottom)-1;if(c.left-1<=t&&c.right+1>=t&&u=(c.left+c.right)/2,r=n;if(wO.chrome||wO.gecko){nO(e,a).getBoundingClientRect().left==c.right&&(r=!n)}if(u<=0)return{node:e,offset:a+(r?1:0)};i=a+(r?1:0),o=u}}}return{node:e,offset:i>-1?i:s>0?e.nodeValue.length:0}}function JE(e,t,n,r=-1){var i,o;let s,a=e.contentDOM.getBoundingClientRect(),l=a.top+e.viewState.paddingTop,{docHeight:c}=e.viewState,{x:u,y:d}=t,h=d-l;if(h<0)return 0;if(h>c)return e.state.doc.length;for(let t=e.defaultLineHeight/2,i=!1;s=e.elementAtHeight(h),s.type!=BO.Text;)for(;h=r>0?s.bottom+t:s.top-t,!(h>=0&&h<=c);){if(i)return n?null:0;i=!0,r=-r}d=l+h;let p=s.from;if(pe.viewport.to)return e.viewport.to==e.state.doc.length?e.state.doc.length:n?null:KE(e,a,s,u,d);let f=e.dom.ownerDocument,m=e.root.elementFromPoint?e.root:f,g=m.elementFromPoint(u,d);g&&!e.contentDOM.contains(g)&&(g=null),g||(u=Math.max(a.left+1,Math.min(a.right-1,u)),g=m.elementFromPoint(u,d),g&&!e.contentDOM.contains(g)&&(g=null));let b,v=-1;if(g&&0!=(null===(i=e.docView.nearest(g))||void 0===i?void 0:i.isEditable))if(f.caretPositionFromPoint){let e=f.caretPositionFromPoint(u,d);e&&({offsetNode:b,offset:v}=e)}else if(f.caretRangeFromPoint){let t=f.caretRangeFromPoint(u,d);t&&(({startContainer:b,startOffset:v}=t),(!e.contentDOM.contains(b)||wO.safari&&function(e,t,n){let r;if(3!=e.nodeType||t!=(r=e.nodeValue.length))return!1;for(let t=e.nextSibling;t;t=t.nextSibling)if(1!=t.nodeType||"BR"!=t.nodeName)return!1;return nO(e,r-1,r).getBoundingClientRect().left>n}(b,v,u)||wO.chrome&&function(e,t,n){if(0!=t)return!1;for(let t=e;;){let e=t.parentNode;if(!e||1!=e.nodeType||e.firstChild!=t)return!1;if(e.classList.contains("cm-line"))break;t=e}let r=1==e.nodeType?e.getBoundingClientRect():nO(e,0,Math.max(e.nodeValue.length,1)).getBoundingClientRect();return n-r.left>5}(b,v,u))&&(b=void 0))}if(!b||!e.docView.dom.contains(b)){let t=GO.find(e.docView,p);if(!t)return h>s.top+s.height/2?s.to:s.from;({node:b,offset:v}=function e(t,n,r){let i,o,s,a,l,c,u,d,h=!1;for(let p=t.firstChild;p;p=p.nextSibling){let t=Hk(p);for(let f=0;fb||a==b&&s>g){i=p,o=m,s=g,a=b;let e=b?r0?f0)}0==g?r>m.bottom&&(!u||u.bottomm.top)&&(c=p,d=m):u&&WE(u,m)?u=YE(u,m.bottom):d&&WE(d,m)&&(d=XE(d,m.top))}}if(u&&u.bottom>=r?(i=l,o=u):d&&d.top<=r&&(i=c,o=d),!i)return{node:t,offset:0};let p=Math.max(o.left,Math.min(o.right,n));return 3==i.nodeType?ZE(i,p,r):h&&"false"!=i.contentEditable?e(i,p,r):{node:t,offset:Array.prototype.indexOf.call(t.childNodes,i)+(n>=(o.left+o.right)/2?1:0)}}(t.dom,u,d))}let y=e.docView.nearest(b);if(!y)return null;if(y.isWidget&&1==(null===(o=y.dom)||void 0===o?void 0:o.nodeType)){let e=y.dom.getBoundingClientRect();return t.y1.5*e.defaultLineHeight){o+=Math.floor((i-n.top)/e.defaultLineHeight)*e.viewState.heightOracle.lineLength}let s=e.state.sliceDoc(n.from,n.to);return n.from+Ek(s,o,e.state.tabSize)}function eA(e,t,n,r){let i=e.state.doc.lineAt(t.head),o=e.bidiSpans(i),s=e.textDirectionAt(i.from);for(let a=t,l=null;;){let t=NE(i,o,s,a,n),c=DE;if(!t){if(i.number==(n?e.state.doc.lines:1))return a;c="\n",i=e.state.doc.line(i.number+(n?1:-1)),o=e.bidiSpans(i),t=gw.cursor(n?i.from:i.to)}if(l){if(!l(c))return a}else{if(!r)return t;l=r(c)}a=t}}function tA(e,t,n){let r=e.state.facet(bE).map(t=>t(e));for(;;){let e=!1;for(let i of r)i.between(n.from-1,n.from+1,(r,i,o)=>{n.from>r&&n.fromn.from?gw.cursor(r,1):gw.cursor(i,-1),e=!0)});if(!e)return n}}class nA{constructor(e){this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.chromeScrollHack=-1,this.pendingIOSKey=void 0,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastEscPress=0,this.lastContextMenu=0,this.scrollHandlers=[],this.registeredEvents=[],this.customHandlers=[],this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null;let t=(t,n)=>{this.ignoreDuringComposition(n)||"keydown"==n.type&&this.keydown(e,n)||(this.mustFlushObserver(n)&&e.observer.forceFlush(),this.runCustomHandlers(n.type,e,n)?n.preventDefault():t(e,n))};for(let n in cA){let r=cA[n];e.contentDOM.addEventListener(n,n=>{lA(e,n)&&t(r,n)},uA[n]),this.registeredEvents.push(n)}e.scrollDOM.addEventListener("mousedown",n=>{if(n.target==e.scrollDOM&&n.clientY>e.contentDOM.getBoundingClientRect().bottom&&(t(cA.mousedown,n),!n.defaultPrevented&&2==n.button)){let t=e.contentDOM.style.minHeight;e.contentDOM.style.minHeight="100%",setTimeout(()=>e.contentDOM.style.minHeight=t,200)}}),e.scrollDOM.addEventListener("drop",n=>{n.target==e.scrollDOM&&n.clientY>e.contentDOM.getBoundingClientRect().bottom&&t(cA.drop,n)}),wO.chrome&&102==wO.chrome_version&&e.scrollDOM.addEventListener("wheel",()=>{this.chromeScrollHack<0?e.contentDOM.style.pointerEvents="none":window.clearTimeout(this.chromeScrollHack),this.chromeScrollHack=setTimeout(()=>{this.chromeScrollHack=-1,e.contentDOM.style.pointerEvents=""},100)},{passive:!0}),this.notifiedFocused=e.hasFocus,wO.safari&&e.contentDOM.addEventListener("input",()=>null)}setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}ensureHandlers(e,t){var n;let r;this.customHandlers=[];for(let i of t)if(r=null===(n=i.update(e).spec)||void 0===n?void 0:n.domEventHandlers){this.customHandlers.push({plugin:i.value,handlers:r});for(let t in r)this.registeredEvents.indexOf(t)<0&&"scroll"!=t&&(this.registeredEvents.push(t),e.contentDOM.addEventListener(t,n=>{lA(e,n)&&this.runCustomHandlers(t,e,n)&&n.preventDefault()}))}}runCustomHandlers(e,t,n){for(let r of this.customHandlers){let i=r.handlers[e];if(i)try{if(i.call(r.plugin,n,t)||n.defaultPrevented)return!0}catch(e){lE(t.state,e)}}return!1}runScrollHandlers(e,t){this.lastScrollTop=e.scrollDOM.scrollTop,this.lastScrollLeft=e.scrollDOM.scrollLeft;for(let n of this.customHandlers){let r=n.handlers.scroll;if(r)try{r.call(n.plugin,t,e)}catch(t){lE(e.state,t)}}}keydown(e,t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),9==t.keyCode&&Date.now()e.keyCode==t.keyCode))&&!t.ctrlKey||iA.indexOf(t.key)>-1&&t.ctrlKey&&!t.shiftKey))&&(this.pendingIOSKey=n||t,setTimeout(()=>this.flushIOSKey(e),250),!0)}flushIOSKey(e){let t=this.pendingIOSKey;return!!t&&(this.pendingIOSKey=void 0,rO(e.contentDOM,t.key,t.keyCode))}ignoreDuringComposition(e){return!!/^key/.test(e.type)&&(this.composing>0||!!(wO.safari&&!wO.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}mustFlushObserver(e){return"keydown"==e.type&&229!=e.keyCode}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}const rA=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],iA="dthko",oA=[16,17,18,20,91,92,224,225];function sA(e){return.7*Math.max(0,e)+8}class aA{constructor(e,t,n,r){this.view=e,this.style=n,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParent=function(e){let t=e.ownerDocument;for(let n=e.parentNode;n&&n!=t.body;)if(1==n.nodeType){if(n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)return n;n=n.assignedSlot||n.parentNode}else{if(11!=n.nodeType)break;n=n.host}return null}(e.contentDOM);let i=e.contentDOM.ownerDocument;i.addEventListener("mousemove",this.move=this.move.bind(this)),i.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(ak.allowMultipleSelections)&&function(e,t){let n=e.state.facet(ZO);return n.length?n[0](t):wO.mac?t.metaKey:t.ctrlKey}(e,t),this.dragMove=function(e,t){let n=e.state.facet(JO);return n.length?n[0](t):wO.mac?!t.altKey:!t.ctrlKey}(e,t),this.dragging=!(!function(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=Uk(e.root);if(!r||0==r.rangeCount)return!0;let i=r.getRangeAt(0).getClientRects();for(let e=0;e=t.clientX&&n.top<=t.clientY&&n.bottom>=t.clientY)return!0}return!1}(e,t)||1!=xA(t))&&null}start(e){!1===this.dragging&&(e.preventDefault(),this.select(e))}move(e){var t;if(0==e.buttons)return this.destroy();if(!1!==this.dragging)return;this.select(this.lastEvent=e);let n=0,r=0,i=(null===(t=this.scrollParent)||void 0===t?void 0:t.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight};e.clientX<=i.left+6?n=-sA(i.left-e.clientX):e.clientX>=i.right-6&&(n=sA(e.clientX-i.right)),e.clientY<=i.top+6?r=-sA(i.top-e.clientY):e.clientY>=i.bottom-6&&(r=sA(e.clientY-i.bottom)),this.setScrollSpeed(n,r)}up(e){null==this.dragging&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),!1===this.dragging&&this.select(this.lastEvent)}select(e){let t=this.style.get(e,this.extend,this.multiple);!this.mustSelect&&t.eq(this.view.state.selection)&&t.main.assoc==this.view.state.selection.main.assoc||this.view.dispatch({selection:t,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.docChanged&&this.dragging&&(this.dragging=this.dragging.map(e.changes)),this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function lA(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n,r=t.target;r!=e.contentDOM;r=r.parentNode)if(!r||11==r.nodeType||(n=aO.get(r))&&n.ignoreEvent(t))return!1;return!0}const cA=Object.create(null),uA=Object.create(null),dA=wO.ie&&wO.ie_version<15||wO.ios&&wO.webkit_version<604;function hA(e,t){let n,{state:r}=e,i=1,o=r.toText(t),s=o.lines==r.selection.ranges.length;if(null!=kA&&r.selection.ranges.every(e=>e.empty)&&kA==o.toString()){let e=-1;n=r.changeByRange(n=>{let a=r.doc.lineAt(n.from);if(a.from==e)return{range:n};e=a.from;let l=r.toText((s?o.line(i++).text:t)+r.lineBreak);return{changes:{from:a.from,insert:l},range:gw.cursor(n.from+l.length)}})}else n=s?r.changeByRange(e=>{let t=o.line(i++);return{changes:{from:e.from,to:e.to,insert:t.text},range:gw.cursor(e.from+t.length)}}):r.replaceSelection(o);e.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}function pA(e,t,n,r){if(1==r)return gw.cursor(t,n);if(2==r)return function(e,t,n=1){let r=e.charCategorizer(t),i=e.doc.lineAt(t),o=t-i.from;if(0==i.length)return gw.cursor(t);0==o?n=1:o==i.length&&(n=-1);let s=o,a=o;n<0?s=Zx(i.text,o,!1):a=Zx(i.text,o);let l=r(i.text.slice(s,a));for(;s>0;){let e=Zx(i.text,s,!1);if(r(i.text.slice(e,s))!=l)break;s=e}for(;a{e.inputState.setSelectionOrigin("select"),27==t.keyCode&&(e.inputState.lastEscPress=Date.now())},cA.touchstart=(e,t)=>{e.inputState.lastTouchTime=Date.now(),e.inputState.setSelectionOrigin("select.pointer")},cA.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")},uA.touchstart=uA.touchmove={passive:!0},cA.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return;let n=null;for(let r of e.state.facet(KO))if(n=r(e,t),n)break;if(n||0!=t.button||(n=function(e,t){let n=bA(e,t),r=xA(t),i=e.state.selection;return{update(e){e.docChanged&&(n.pos=e.changes.mapPos(n.pos),i=i.map(e.changes))},get(t,o,s){let a,l=bA(e,t),c=pA(e,l.pos,l.bias,r);if(n.pos!=l.pos&&!o){let t=pA(e,n.pos,n.bias,r),i=Math.min(t.from,c.from),o=Math.max(t.to,c.to);c=i1&&(a=function(e,t){for(let n=0;n=t)return gw.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-(e.mainIndex>n?1:0))}return null}(i,l.pos))?a:s?i.addRange(c):gw.create([c])}}}(e,t)),n){let r=e.root.activeElement!=e.contentDOM;e.inputState.startMouseSelection(new aA(e,t,n,r)),r&&e.observer.ignore(()=>tO(e.contentDOM)),e.inputState.mouseSelection&&e.inputState.mouseSelection.start(t)}};let fA=(e,t)=>e>=t.top&&e<=t.bottom,mA=(e,t,n)=>fA(t,n)&&e>=n.left&&e<=n.right;function gA(e,t,n,r){let i=GO.find(e.docView,t);if(!i)return 1;let o=t-i.posAtStart;if(0==o)return 1;if(o==i.length)return-1;let s=i.coordsAt(o,-1);if(s&&mA(n,r,s))return-1;let a=i.coordsAt(o,1);return a&&mA(n,r,a)?1:s&&fA(r,s)?-1:1}function bA(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1);return{pos:n,bias:gA(e,n,t.clientX,t.clientY)}}const vA=wO.ie&&wO.ie_version<=11;let yA=null,_A=0,SA=0;function xA(e){if(!vA)return e.detail;let t=yA,n=SA;return yA=e,SA=Date.now(),_A=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(_A+1)%3:1}function wA(e,t,n,r){if(!n)return;let i=e.posAtCoords({x:t.clientX,y:t.clientY},!1);t.preventDefault();let{mouseSelection:o}=e.inputState,s=r&&o&&o.dragging&&o.dragMove?{from:o.dragging.from,to:o.dragging.to}:null,a={from:i,insert:n},l=e.state.changes(s?[s,a]:a);e.focus(),e.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:s?"move.drop":"input.drop"})}cA.dragstart=(e,t)=>{let{selection:{main:n}}=e.state,{mouseSelection:r}=e.inputState;r&&(r.dragging=n),t.dataTransfer&&(t.dataTransfer.setData("Text",e.state.sliceDoc(n.from,n.to)),t.dataTransfer.effectAllowed="copyMove")},cA.drop=(e,t)=>{if(!t.dataTransfer)return;if(e.state.readOnly)return t.preventDefault();let n=t.dataTransfer.files;if(n&&n.length){t.preventDefault();let r=Array(n.length),i=0,o=()=>{++i==n.length&&wA(e,t,r.filter(e=>null!=e).join(e.state.lineBreak),!1)};for(let e=0;e{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(r[e]=t.result),o()},t.readAsText(n[e])}}else wA(e,t,t.dataTransfer.getData("Text"),!0)},cA.paste=(e,t)=>{if(e.state.readOnly)return t.preventDefault();e.observer.flush();let n=dA?null:t.clipboardData;n?(hA(e,n.getData("text/plain")||n.getData("text/uri-text")),t.preventDefault()):function(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{e.focus(),n.remove(),hA(e,n.value)},50)}(e)};let kA=null;cA.copy=cA.cut=(e,t)=>{let{text:n,ranges:r,linewise:i}=function(e){let t=[],n=[],r=!1;for(let r of e.selection.ranges)r.empty||(t.push(e.sliceDoc(r.from,r.to)),n.push(r));if(!t.length){let i=-1;for(let{from:r}of e.selection.ranges){let o=e.doc.lineAt(r);o.number>i&&(t.push(o.text),n.push({from:o.from,to:Math.min(e.doc.length,o.to+1)})),i=o.number}r=!0}return{text:t.join(e.lineBreak),ranges:n,linewise:r}}(e.state);if(!n&&!i)return;kA=i?n:null;let o=dA?null:t.clipboardData;o?(t.preventDefault(),o.clearData(),o.setData("text/plain",n)):function(e,t){let n=e.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout(()=>{r.remove(),e.focus()},50)}(e,n),"cut"!=t.type||e.state.readOnly||e.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"})};const OA=Gw.define();function EA(e,t){let n=[];for(let r of e.facet(rE)){let i=r(e,t);i&&n.push(i)}return n?e.update({effects:n,annotations:OA.of(!0)}):null}function AA(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=EA(e.state,t);n?e.dispatch(n):e.update([])}},10)}cA.focus=e=>{e.inputState.lastFocusTime=Date.now(),e.scrollDOM.scrollTop||!e.inputState.lastScrollTop&&!e.inputState.lastScrollLeft||(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),AA(e)},cA.blur=e=>{e.observer.clearSelectionRange(),AA(e)},cA.compositionstart=cA.compositionupdate=e=>{null==e.inputState.compositionFirstChange&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0)},cA.compositionend=e=>{e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,wO.chrome&&wO.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.compositionDeco.size&&e.update([])},50)},cA.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},cA.beforeinput=(e,t)=>{var n;let r;if(wO.chrome&&wO.android&&(r=rA.find(e=>e.inputType==t.inputType))&&(e.observer.delayAndroidKey(r.key,r.keyCode),"Backspace"==r.key||"Delete"==r.key)){let t=(null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0;setTimeout(()=>{var n;((null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}};const TA=["pre-wrap","normal","pre-line","break-spaces"];class CA{constructor(e){this.lineWrapping=e,this.doc=Bx.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){if(!this.lineWrapping)return this.lineHeight;return(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return TA.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n-1,a=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=i,a){this.heightSamples={};for(let e=0;e0}set outdated(e){this.flags=(e?2:0)|-3&this.flags}setHeight(e,t){this.height!=t&&(Math.abs(this.height-t)>.001&&(e.heightChanged=!0),this.height=t)}replace(e,t,n){return RA.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,r){let i=this,o=n.doc;for(let s=r.length-1;s>=0;s--){let{fromA:a,toA:l,fromB:c,toB:u}=r[s],d=i.lineAt(a,$A.ByPosNoHeight,n.setDoc(t),0,0),h=d.to>=l?d:i.lineAt(l,$A.ByPosNoHeight,n,0,0);for(u+=h.to-l,l=h.to;s>0&&d.from<=r[s-1].toA;)a=r[s-1].fromA,c=r[s-1].fromB,s--,a2*i){let i=e[t-1];i.break?e.splice(--t,1,i.left,null,i.right):e.splice(--t,1,i.left,i.right),n+=1+i.break,r-=i.size}else{if(!(i>2*r))break;{let t=e[n];t.break?e.splice(n,1,t.left,null,t.right):e.splice(n,1,t.left,t.right),n+=2+t.break,i-=t.size}}else if(r=i&&o(this.blockAt(0,n,r,i))}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more&&this.setHeight(e,r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class DA extends IA{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0}replace(e,t,n){let r=n[0];return 1==n.length&&(r instanceof DA||r instanceof NA&&4&r.flags)&&Math.abs(this.length-r.length)<10?(r instanceof NA?r=new DA(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):RA.of(n)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more?this.setHeight(e,r.heights[r.index++]):(n||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class NA extends RA{constructor(e){super(e,0)}heightMetrics(e,t){let n,r=e.doc.lineAt(t).number,i=e.doc.lineAt(t+this.length).number,o=i-r+1,s=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*o);n=t/o,this.length>o+1&&(s=(this.height-t)/(this.length-o-1))}else n=this.height/o;return{firstLine:r,lastLine:i,perLine:n,perChar:s}}blockAt(e,t,n,r){let{firstLine:i,lastLine:o,perLine:s,perChar:a}=this.heightMetrics(t,r);if(t.lineWrapping){let i=r+Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length),o=t.doc.lineAt(i),l=s+o.length*a,c=Math.max(n,e-l/2);return new PA(o.from,o.length,c,l,null,null)}{let r=Math.max(0,Math.min(o-i,Math.floor((e-n)/s))),{from:a,length:l}=t.doc.line(i+r);return new PA(a,l,n+s*r,s,null,null)}}lineAt(e,t,n,r,i){if(t==$A.ByHeight)return this.blockAt(e,n,r,i);if(t==$A.ByPosNoHeight){let{from:t,to:r}=n.doc.lineAt(e);return new PA(t,r-t,0,0,null,null)}let{firstLine:o,perLine:s,perChar:a}=this.heightMetrics(n,i),l=n.doc.lineAt(e),c=s+l.length*a,u=l.number-o,d=r+s*u+a*(l.from-i-u);return new PA(l.from,l.length,Math.max(r,Math.min(d,r+this.height-c)),c,null,null)}forEachLine(e,t,n,r,i,o){e=Math.max(e,i),t=Math.min(t,i+this.length);let{firstLine:s,perLine:a,perChar:l}=this.heightMetrics(n,i);for(let c=e,u=r;c<=t;){let t=n.doc.lineAt(c);if(c==e){let n=t.number-s;u+=a*n+l*(e-i-n)}let r=a+l*t.length;o(new PA(t.from,t.length,u,r,null,null)),u+=r,c=t.to+1}}replace(e,t,n){let r=this.length-t;if(r>0){let e=n[n.length-1];e instanceof NA?n[n.length-1]=new NA(e.length+r):n.push(null,new NA(r-1))}if(e>0){let t=n[0];t instanceof NA?n[0]=new NA(e+t.length):n.unshift(new NA(e-1),null)}return RA.of(n)}decomposeLeft(e,t){t.push(new NA(e-1),null)}decomposeRight(e,t){t.push(null,new NA(this.length-e-1))}updateHeight(e,t=0,n=!1,r){let i=t+this.length;if(r&&r.from<=t+this.length&&r.more){let n=[],o=Math.max(t,r.from),s=-1;for(r.from>t&&n.push(new NA(r.from-t-1).updateHeight(e,t));o<=i&&r.more;){let t=e.doc.lineAt(o).length;n.length&&n.push(null);let i=r.heights[r.index++];-1==s?s=i:Math.abs(i-s)>=.001&&(s=-2);let a=new DA(t,i);a.outdated=!1,n.push(a),o+=t+1}o<=i&&n.push(null,new NA(i-o).updateHeight(e,o));let a=RA.of(n);return(s<0||Math.abs(a.height-this.height)>=.001||Math.abs(s-this.heightMetrics(e,t).perLine)>=.001)&&(e.heightChanged=!0),a}return(n||this.outdated)&&(this.setHeight(e,e.heightForGap(t,t+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class jA extends RA{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return 1&this.flags}blockAt(e,t,n,r){let i=n+this.left.height;return es))return l;let c=t==$A.ByPosNoHeight?$A.ByPosNoHeight:$A.ByPos;return a?l.join(this.right.lineAt(s,c,n,o,s)):this.left.lineAt(s,c,n,r,i).join(l)}forEachLine(e,t,n,r,i,o){let s=r+this.left.height,a=i+this.left.length+this.break;if(this.break)e=a&&this.right.forEachLine(e,t,n,s,a,o);else{let l=this.lineAt(a,$A.ByPos,n,r,i);e=e&&l.from<=t&&o(l),t>l.to&&this.right.forEachLine(l.to+1,t,n,s,a,o)}}replace(e,t,n){let r=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));let i=[];e>0&&this.decomposeLeft(e,i);let o=i.length;for(let e of n)i.push(e);if(e>0&&LA(i,o-1),t=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e2*t.size||t.size>2*e.size?RA.of(this.break?[e,null,t]:[e,t]):(this.left=e,this.right=t,this.height=e.height+t.height,this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,r){let{left:i,right:o}=this,s=t+i.length+this.break,a=null;return r&&r.from<=t+i.length&&r.more?a=i=i.updateHeight(e,t,n,r):i.updateHeight(e,t,n),r&&r.from<=s+o.length&&r.more?a=o=o.updateHeight(e,s,n,r):o.updateHeight(e,s,n),a?this.balanced(i,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function LA(e,t){let n,r;null==e[t]&&(n=e[t-1])instanceof NA&&(r=e[t+1])instanceof NA&&e.splice(t-1,3,new NA(n.length+1+r.length))}class BA{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof DA?n.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new DA(e-this.pos,-1)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e=5)&&this.addLineDeco(r,i)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new DA(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let n=new NA(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof DA)return e;let t=new DA(0,-1);return this.nodes.push(t),t}addBlock(e){var t;this.enterLine();let n=null===(t=e.deco)||void 0===t?void 0:t.type;n!=BO.WidgetAfter||this.isCovered||this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n!=BO.WidgetBefore&&(this.covering=e)}addLineDeco(e,t){let n=this.ensureLine();n.length+=t,n.collapsed+=t,n.widgetHeight=Math.max(n.widgetHeight,e),this.writtenTo=this.pos=this.pos+t}finish(e){let t=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||t instanceof DA||this.isCovered?(this.writtenTon.clientHeight||n.scrollWidth>n.clientWidth)&&"visible"!=r.overflow){let r=n.getBoundingClientRect();o=Math.max(o,r.left),s=Math.min(s,r.right),a=Math.max(a,r.top),l=t==e.parentNode?r.bottom:Math.min(l,r.bottom)}t="absolute"==r.position||"fixed"==r.position?n.offsetParent:n.parentNode}else{if(11!=t.nodeType)break;t=t.host}return{left:o-n.left,right:Math.max(o,s)-n.left,top:a-(n.top+t),bottom:Math.max(a,l)-(n.top+t)}}function UA(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}class QA{constructor(e,t,n){this.from=e,this.to=t,this.size=n}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n"function"!=typeof e&&"cm-lineWrapping"==e.class);this.heightOracle=new CA(t),this.stateDeco=e.facet(gE).filter(e=>"function"!=typeof e),this.heightMap=RA.empty().applyChanges(this.stateDeco,Bx.empty,this.heightOracle.setDoc(e.doc),[new _E(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=FO.set(this.lineGaps.map(e=>e.draw(!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let r=n?t.head:t.anchor;if(!e.some(({from:e,to:t})=>r>=e&&r<=t)){let{from:t,to:n}=this.lineBlockAt(r);e.push(new GA(t,n))}}this.viewports=e.sort((e,t)=>e.from-t.from),this.scaler=this.heightMap.height<=7e6?YA:new ZA(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(1==this.scaler.scale?e:JA(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=this.state.facet(gE).filter(e=>"function"!=typeof e);let r=e.changedRanges,i=_E.extendWithRanges(r,function(e,t,n){let r=new FA;return pk.compare(e,t,n,r,0),r.changes}(n,this.stateDeco,e?e.changes:lw.empty(this.state.doc.length))),o=this.heightMap.height;this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),i),this.heightMap.height!=o&&(e.flags|=2);let s=i.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.heads.to)||!this.viewportIsAppropriate(s))&&(s=this.getViewport(0,t));let a=!e.changes.empty||2&e.flags||s.from!=this.viewport.from||s.to!=this.viewport.to;this.viewport=s,this.updateForViewport(),a&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(oE)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,i=n.whiteSpace;this.defaultTextDirection="rtl"==n.direction?xE.RTL:xE.LTR;let o=this.heightOracle.mustRefreshForWrapping(i),s=t.getBoundingClientRect(),a=o||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;let l=0,c=0,u=parseInt(n.paddingTop)||0,d=parseInt(n.paddingBottom)||0;this.paddingTop==u&&this.paddingBottom==d||(this.paddingTop=u,this.paddingBottom=d,l|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(a=!0),this.editorWidth=e.scrollDOM.clientWidth,l|=8);let h=(this.printing?UA:zA)(t,this.paddingTop),p=h.top-this.pixelViewport.top,f=h.bottom-this.pixelViewport.bottom;this.pixelViewport=h;let m=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(m!=this.inView&&(this.inView=m,m&&(a=!0)),!this.inView&&!this.scrollTarget)return 0;let g=s.width;if(this.contentDOMWidth==g&&this.editorHeight==e.scrollDOM.clientHeight||(this.contentDOMWidth=s.width,this.editorHeight=e.scrollDOM.clientHeight,l|=8),a){let t=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(t)&&(o=!0),o||r.lineWrapping&&Math.abs(g-this.contentDOMWidth)>r.charWidth){let{lineHeight:n,charWidth:s,textHeight:a}=e.docView.measureTextSize();o=n>0&&r.refresh(i,n,s,a,g/s,t),o&&(e.docView.minWidth=0,l|=8)}p>0&&f>0?c=Math.max(p,f):p<0&&f<0&&(c=Math.min(p,f)),r.heightChanged=!1;for(let n of this.viewports){let i=n.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(n);this.heightMap=(o?RA.empty().applyChanges(this.stateDeco,Bx.empty,this.heightOracle,[new _E(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,o,new MA(n.from,i))}r.heightChanged&&(l|=2)}let b=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return b&&(this.viewport=this.getViewport(c,this.scrollTarget)),this.updateForViewport(),(2&l||b)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),l|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),l}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:o,visibleBottom:s}=this,a=new GA(r.lineAt(o-1e3*n,$A.ByHeight,i,0,0).from,r.lineAt(s+1e3*(1-n),$A.ByHeight,i,0,0).to);if(t){let{head:e}=t.range;if(ea.to){let n,o=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),s=r.lineAt(e,$A.ByPos,i,0,0);n="center"==t.y?(s.top+s.bottom)/2-o/2:"start"==t.y||"nearest"==t.y&&e=s+Math.max(10,Math.min(n,250)))&&r>o-2e3&&i>1,o=r<<1;if(this.defaultTextDirection!=xE.LTR&&!n)return[];let s=[],a=(r,o,l,c)=>{if(o-rr&&ee.from>=l.from&&e.to<=l.to&&Math.abs(e.from-r)e.fromt));if(!h){if(oe.from<=o&&e.to>=o)){let e=t.moveToLineBoundary(gw.cursor(o),!1,!0).head;e>r&&(o=e)}h=new QA(r,o,this.gapSize(l,r,o,c))}s.push(h)};for(let e of this.viewportLines){if(e.lengthe.from&&a(e.from,i,e,t),se.draw(this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];pk.spans(e,this.viewport.from,this.viewport.to,{span(e,n){t.push({from:e,to:n})},point(){}},20);let n=t.length!=this.visibleRanges.length||this.visibleRanges.some((e,n)=>e.from!=t[n].from||e.to!=t[n].to);return this.visibleRanges=t,n?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||JA(this.heightMap.lineAt(e,$A.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return JA(this.heightMap.lineAt(this.scaler.fromDOM(e),$A.ByHeight,this.heightOracle,0,0),this.scaler)}elementAtHeight(e){return JA(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class GA{constructor(e,t){this.from=e,this.to=t}}function VA(e,t,n){let r=[],i=e,o=0;return pk.spans(n,e,t,{span(){},point(e,t){e>i&&(r.push({from:i,to:e}),o+=e-i),i=t}},20),i=1)return t[t.length-1].to;let r=Math.floor(e*n);for(let e=0;;e++){let{from:n,to:i}=t[e],o=i-n;if(r<=o)return n+r;r-=o}}function XA(e,t){let n=0;for(let{from:r,to:i}of e.ranges){if(t<=i){n+=t-r;break}n+=i-r}return n/e.total}const YA={toDOM:e=>e,fromDOM:e=>e,scale:1};class ZA{constructor(e,t,n){let r=0,i=0,o=0;this.viewports=n.map(({from:n,to:i})=>{let o=t.lineAt(n,$A.ByPos,e,0,0).top,s=t.lineAt(i,$A.ByPos,e,0,0).bottom;return r+=s-o,{from:n,to:i,top:o,bottom:s,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(t.height-r);for(let e of this.viewports)e.domTop=o+(e.top-i)*this.scale,o=e.domBottom=e.domTop+(e.bottom-e.top),i=e.bottom}toDOM(e){for(let t=0,n=0,r=0;;t++){let i=tJA(e,t)),e.deco)}const KA=yw.define({combine:e=>e.join(" ")}),eT=yw.define({combine:e=>e.indexOf(!0)>-1}),tT=Mk.newName(),nT=Mk.newName(),rT=Mk.newName(),iT={"&light":"."+nT,"&dark":"."+rT};function oT(e,t,n){return new Mk(t,{finish:t=>/&/.test(t)?t.replace(/&\w*/,t=>{if("&"==t)return e;if(!n||!n[t])throw new RangeError("Unsupported selector: "+t);return n[t]}):e+" "+t})}const sT=oT("."+tT,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",left:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},iT);class aT{constructor(e,t,n,r){this.typeOver=r,this.bounds=null,this.text="";let{impreciseHead:i,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&t>-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,n,0))){let t=i||o?[]:function(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}=e.observer.selectionRange;n&&(t.push(new BE(n,r)),i==n&&o==r||t.push(new BE(i,o)));return t}(e),n=new jE(t,e.state);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=function(e,t){if(0==e.length)return null;let n=e[0].pos,r=2==e.length?e[1].pos:n;return n>-1&&r>-1?gw.single(n+t,r+t):null}(t,this.bounds.from)}else{let t=e.observer.selectionRange,n=i&&i.node==t.focusNode&&i.offset==t.focusOffset||!Qk(e.contentDOM,t.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),r=o&&o.node==t.anchorNode&&o.offset==t.anchorOffset||!Qk(e.contentDOM,t.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset);this.newSel=gw.single(r,n)}}}function lT(e,t){let n,{newSel:r}=t,i=e.state.selection.main;if(t.bounds){let{from:r,to:o}=t.bounds,s=i.from,a=null;(8===e.inputState.lastKeyCode&&e.inputState.lastKeyTime>Date.now()-100||wO.android&&t.text.length0&&a>0&&e.charCodeAt(s-1)==t.charCodeAt(a-1);)s--,a--;if("end"==r){let e=Math.max(0,o-Math.min(s,a));n-=s+e-o}if(s=s?o-n:0,a=o+(a-s),s=o}else if(a=a?o-n:0,s=o+(s-a),a=o}return{from:o,toA:s,toB:a}}(e.state.doc.sliceString(r,o,"￿"),t.text,s-r,a);l&&(wO.chrome&&13==e.inputState.lastKeyCode&&l.toB==l.from+2&&"￿￿"==t.text.slice(l.from,l.toB)&&l.toB--,n={from:r+l.from,to:r+l.toA,insert:Bx.of(t.text.slice(l.from,l.toB).split("￿"))})}else r&&(!e.hasFocus&&e.state.facet(cE)||r.main.eq(i))&&(r=null);if(!n&&!r)return!1;if(!n&&t.typeOver&&!i.empty&&r&&r.main.empty?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,i.to)}:n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,n.from).append(n.insert).append(e.state.doc.slice(n.to,i.to))}:(wO.mac||wO.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&"off"==e.contentDOM.getAttribute("autocorrect")?(r&&2==n.insert.length&&(r=gw.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:Bx.of([" "])}):wO.chrome&&n&&n.from==n.to&&n.from==i.head&&"\n "==n.insert.toString()&&e.lineWrapping&&(r&&(r=gw.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:Bx.of([" "])}),n){let t=e.state;if(wO.ios&&e.inputState.flushIOSKey(e))return!0;if(wO.android&&(n.from==i.from&&n.to==i.to&&1==n.insert.length&&2==n.insert.lines&&rO(e.contentDOM,"Enter",13)||n.from==i.from-1&&n.to==i.to&&0==n.insert.length&&rO(e.contentDOM,"Backspace",8)||n.from==i.from&&n.to==i.to+1&&0==n.insert.length&&rO(e.contentDOM,"Delete",46)))return!0;let o,s=n.insert.toString();if(e.state.facet(nE).some(t=>t(e,n.from,n.to,s)))return!0;if(e.inputState.composing>=0&&e.inputState.composing++,n.from>=i.from&&n.to<=i.to&&n.to-n.from>=(i.to-i.from)/3&&(!r||r.main.empty&&r.main.from==n.from+n.insert.length)&&e.inputState.composing<0){let r=i.fromn.to?t.sliceDoc(n.to,i.to):"";o=t.replaceSelection(e.state.toText(r+n.insert.sliceString(0,void 0,e.state.lineBreak)+s))}else{let s=t.changes(n),a=r&&r.main.to<=s.newLength?r.main:void 0;if(t.selection.ranges.length>1&&e.inputState.composing>=0&&n.to<=i.to&&n.to>=i.to-10){let r=e.state.sliceDoc(n.from,n.to),l=UE(e)||e.state.doc.lineAt(i.head),c=i.to-n.to,u=i.to-i.from;o=t.changeByRange(o=>{if(o.from==i.from&&o.to==i.to)return{changes:s,range:a||o.map(s)};let d=o.to-c,h=d-r.length;if(o.to-o.from!=u||e.state.sliceDoc(h,d)!=r||l&&o.to>=l.from&&o.from<=l.to)return{range:o};let p=t.changes({from:h,to:d,insert:n.insert}),f=o.to-i.to;return{changes:p,range:a?gw.range(Math.max(0,a.anchor+f),Math.max(0,a.head+f)):o.map(p)}})}else o={changes:s,selection:a&&t.selection.replaceRange(a)}}let a="input.type";return(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,a+=".compose",e.inputState.compositionFirstChange&&(a+=".start",e.inputState.compositionFirstChange=!1)),e.dispatch(o,{scrollIntoView:!0,userEvent:a}),!0}if(r&&!r.main.eq(i)){let t=!1,n="select";return e.inputState.lastSelectionTime>Date.now()-50&&("select"==e.inputState.lastSelectionOrigin&&(t=!0),n=e.inputState.lastSelectionOrigin),e.dispatch({selection:r,scrollIntoView:t,userEvent:n}),!0}return!1}const cT={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},uT=wO.ie&&wO.ie_version<=11;class dT{constructor(e){this.view=e,this.active=!1,this.selectionRange=new Jk,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.resizeContent=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let e of t)this.queue.push(e);(wO.ie&&wO.ie_version<=11||wO.ios&&e.composing)&&t.some(e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),uT&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver(()=>{var e;(null===(e=this.view.docView)||void 0===e?void 0:e.lastUpdate)this.view.requestMeasure()),this.resizeContent.observe(e.contentDOM)),this.addWindowListeners(this.win=e.win),this.start(),"function"==typeof IntersectionObserver&&(this.intersection=new IntersectionObserver(e=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runScrollHandlers(this.view,e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,r=this.selectionRange;if(n.state.facet(cE)?n.root.activeElement!=this.dom:!qk(n.dom,r))return;let i=r.anchorNode&&n.docView.nearest(r.anchorNode);i&&i.ignoreEvent(e)?t||(this.selectionChanged=!1):(wO.ie&&wO.ie_version<=11||wO.android&&wO.chrome)&&!n.state.selection.main.empty&&r.focusNode&&Gk(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=wO.safari&&11==e.root.nodeType&&function(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}(this.dom.ownerDocument)==this.dom&&function(e){let t=null;function n(e){e.preventDefault(),e.stopImmediatePropagation(),t=e.getTargetRanges()[0]}if(e.contentDOM.addEventListener("beforeinput",n,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",n,!0),!t)return null;let r=t.startContainer,i=t.startOffset,o=t.endContainer,s=t.endOffset,a=e.docView.domAtPos(e.state.selection.main.anchor);Gk(a.node,a.offset,o,s)&&([r,i,o,s]=[o,s,r,i]);return{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:s}}(this.view)||Uk(e.root);if(!t||this.selectionRange.eq(t))return!1;let n=qk(this.dom,t);return n&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let e=this.delayedAndroidKey;e&&(this.clearDelayedAndroidKey(),!this.flush()&&e.force&&rO(this.dom,e.key,e.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}this.delayedAndroidKey&&"Enter"!=e||(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,r=!1;for(let i of e){let e=this.readMutation(i);e&&(e.typeOver&&(r=!0),-1==t?({from:t,to:n}=e):(t=Math.min(e.from,t),n=Math.max(e.to,n)))}return{from:t,to:n,typeOver:r}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),r=this.selectionChanged&&qk(this.dom,this.selectionRange);return e<0&&!r?null:(e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1,new aT(this.view,e,t,n))}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return!1;let n=this.view.state,r=lT(this.view,t);return this.view.state==n&&this.view.update([]),r}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty("attributes"==e.type),"attributes"==e.type&&(t.dirty|=4),"childList"==e.type){let n=hT(t,e.previousSibling||e.target.previousSibling,-1),r=hT(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}return"characterData"==e.type?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,t,n,r;this.stop(),null===(e=this.intersection)||void 0===e||e.disconnect(),null===(t=this.gapIntersection)||void 0===t||t.disconnect(),null===(n=this.resizeScroll)||void 0===n||n.disconnect(),null===(r=this.resizeContent)||void 0===r||r.disconnect();for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function hT(e,t,n){for(;t;){let r=aO.get(t);if(r&&r.parent==e)return r;let i=t.parentNode;t=i!=e.dom?i:n>0?t.nextSibling:t.previousSibling}return null}class pT{constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),this._dispatch=e.dispatch||(e=>this.update([e])),this.dispatch=this.dispatch.bind(this),this._root=e.root||function(e){for(;e;){if(e&&(9==e.nodeType||11==e.nodeType&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}(e.parent)||document,this.viewState=new HA(e.state||ak.create(e)),this.plugins=this.state.facet(dE).map(e=>new pE(e));for(let e of this.plugins)e.update(this);this.observer=new dT(this),this.inputState=new nA(this),this.inputState.ensureHandlers(this,this.plugins),this.docView=new FE(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}dispatch(...e){this._dispatch(1==e.length&&e[0]instanceof Yw?e[0]:this.state.update(...e))}update(e){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t,n=!1,r=!1,i=this.state;for(let t of e){if(t.startState!=i)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");i=t.state}if(this.destroyed)return void(this.viewState.state=i);let o=this.hasFocus,s=0,a=null;e.some(e=>e.annotation(OA))?(this.inputState.notifiedFocused=o,s=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,a=EA(i,o),a||(s=1));let l=this.observer.delayedAndroidKey,c=null;if(l?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(i.doc)||!this.state.selection.eq(i.selection))&&(c=null)):this.observer.clear(),i.facet(ak.phrases)!=this.state.facet(ak.phrases))return this.setState(i);t=SE.create(this,i,e),t.flags|=s;let u=this.viewState.scrollTarget;try{this.updateState=2;for(let t of e){if(u&&(u=u.map(t.changes)),t.scrollIntoView){let{main:e}=t.state.selection;u=new sE(e.empty?e:gw.cursor(e.head,e.head>e.anchor?-1:1))}for(let e of t.effects)e.is(aE)&&(u=e.value)}this.viewState.update(t,u),this.bidiCache=gT.update(this.bidiCache,t.changes),t.empty||(this.updatePlugins(t),this.inputState.update(t)),n=this.docView.update(t),this.state.facet(yE)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(e=>e.isUserEvent("select.pointer")))}finally{this.updateState=0}if(t.startState.facet(KA)!=t.state.facet(KA)&&(this.viewState.mustMeasureContent=!0),(n||r||u||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!t.empty)for(let e of this.state.facet(tE))e(t);(a||c)&&Promise.resolve().then(()=>{a&&this.state==a.startState&&this.dispatch(a),c&&!lT(this,c)&&l.force&&rO(this.contentDOM,l.key,l.keyCode)})}setState(e){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=e);this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new HA(e),this.plugins=e.facet(dE).map(e=>new pE(e)),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView=new FE(this),this.inputState.ensureHandlers(this,this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(dE),n=e.state.facet(dE);if(t!=n){let r=[];for(let i of n){let n=t.indexOf(i);if(n<0)r.push(new pE(i));else{let t=this.plugins[n];t.mustUpdate=e,r.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=r,this.pluginMap.clear(),this.inputState.ensureHandlers(this,this.plugins)}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,{scrollHeight:n,scrollTop:r,clientHeight:i}=this.scrollDOM,o=r>n-i-4?n:r;try{for(let e=0;;e++){this.updateState=1;let n=this.viewport,r=this.viewState.lineBlockAtHeight(o),i=this.viewState.measure(this);if(!i&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(e>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let s=[];4&i||([this.measureRequests,s]=[s,this.measureRequests]);let a=s.map(e=>{try{return e.read(this)}catch(e){return lE(this.state,e),mT}}),l=SE.create(this,this.state,[]),c=!1,u=!1;l.flags|=i,t?t.flags|=i:t=l,this.updateState=2,l.empty||(this.updatePlugins(l),this.inputState.update(l),this.updateAttrs(),c=this.docView.update(l));for(let e=0;e1||e<-1)&&(this.scrollDOM.scrollTop+=e,u=!0)}if(c&&this.docView.updateSelection(!0),this.viewport.from==n.from&&this.viewport.to==n.to&&!u&&0==this.measureRequests.length)break}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(tE))e(t)}get themeClasses(){return tT+" "+(this.state.facet(eT)?rT:nT)+" "+this.state.facet(KA)}updateAttrs(){let e=bT(this,fE,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(cE)?"true":"false",class:"cm-content",style:`${wO.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),bT(this,mE,t);let n=this.observer.ignore(()=>{let n=jO(this.contentDOM,this.contentAttrs,t),r=jO(this.dom,this.editorAttrs,e);return n||r});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(e){let t=!0;for(let n of e)for(let e of n.effects)if(e.is(pT.announce)){t&&(this.announceDOM.textContent=""),t=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=e.value}}mountStyles(){this.styleModules=this.state.facet(yE),Mk.mount(this.root,this.styleModules.concat(sT).reverse())}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(null!=e.key)for(let t=0;tt.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return tA(this,e,eA(this,e,t,n))}moveByGroup(e,t){return tA(this,e,eA(this,e,t,t=>function(e,t,n){let r=e.state.charCategorizer(t),i=r(n);return e=>{let t=r(e);return i==rk.Space&&(i=t),i==t}}(this,e.head,t)))}moveToLineBoundary(e,t,n=!0){return function(e,t,n,r){let i=e.state.doc.lineAt(t.head),o=r&&e.lineWrapping?e.coordsAtPos(t.assoc<0&&t.head>i.from?t.head-1:t.head):null;if(o){let t=e.dom.getBoundingClientRect(),r=e.textDirectionAt(i.from),s=e.posAtCoords({x:n==(r==xE.LTR)?t.right-1:t.left+1,y:(o.top+o.bottom)/2});if(null!=s)return gw.cursor(s,n?-1:1)}let s=GO.find(e.docView,t.head),a=s?n?s.posAtEnd:s.posAtStart:n?i.to:i.from;return gw.cursor(a,n?-1:1)}(this,e,t,n)}moveVertically(e,t,n){return tA(this,e,function(e,t,n,r){let i=t.head,o=n?1:-1;if(i==(n?e.state.doc.length:0))return gw.cursor(i,t.assoc);let s,a=t.goalColumn,l=e.contentDOM.getBoundingClientRect(),c=e.coordsAtPos(i),u=e.documentTop;if(c)null==a&&(a=c.left-l.left),s=o<0?c.top:c.bottom;else{let t=e.viewState.lineBlockAt(i);null==a&&(a=Math.min(l.right-l.left,e.defaultCharacterWidth*(i-t.from))),s=(o<0?t.top:t.bottom)+u}let d=l.left+a,h=null!=r?r:e.defaultLineHeight>>1;for(let n=0;;n+=10){let r=s+(h+n)*o,c=JE(e,{x:d,y:r},!1,o);if(rl.bottom||(o<0?ci))return gw.cursor(c,t.assoc,void 0,a)}}(this,e,t,n))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,t=0){return this.docView.posFromDOM(e,t)}posAtCoords(e,t=!0){return this.readMeasured(),JE(this,e,t)}coordsAtPos(e,t=1){this.readMeasured();let n=this.docView.coordsAt(e,t);if(!n||n.left==n.right)return n;let r=this.state.doc.lineAt(e),i=this.bidiSpans(r);return Yk(n,i[PE.find(i,e-r.from,-1,t)].dir==xE.LTR==t>0)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(iE)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>fT)return IE(e.length);let t=this.textDirectionAt(e.from);for(let n of this.bidiCache)if(n.from==e.from&&n.dir==t)return n.order;let n=RE(e.text,t);return this.bidiCache.push(new gT(e.from,e.to,t,n)),n}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||wO.safari&&(null===(e=this.inputState)||void 0===e?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{tO(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((9==e.nodeType?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return aE.of(new sE("number"==typeof e?gw.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}static domEventHandlers(e){return hE.define(()=>({}),{eventHandlers:e})}static theme(e,t){let n=Mk.newName(),r=[KA.of(n),yE.of(oT("."+n,e))];return t&&t.dark&&r.push(eT.of(!0)),r}static baseTheme(e){return $w.lowest(yE.of(oT("."+tT,e,iT)))}static findFromDOM(e){var t;let n=e.querySelector(".cm-content"),r=n&&aO.get(n)||aO.get(e);return(null===(t=null==r?void 0:r.rootView)||void 0===t?void 0:t.view)||null}}pT.styleModule=yE,pT.inputHandler=nE,pT.focusChangeEffect=rE,pT.perLineTextDirection=iE,pT.exceptionSink=eE,pT.updateListener=tE,pT.editable=cE,pT.mouseSelectionStyle=KO,pT.dragMovesSelection=JO,pT.clickAddsSelectionRange=ZO,pT.decorations=gE,pT.atomicRanges=bE,pT.scrollMargins=vE,pT.darkTheme=eT,pT.contentAttributes=mE,pT.editorAttributes=fE,pT.lineWrapping=pT.contentAttributes.of({class:"cm-lineWrapping"}),pT.announce=Xw.define();const fT=4096,mT={};class gT{constructor(e,t,n,r){this.from=e,this.to=t,this.dir=n,this.order=r}static update(e,t){if(t.empty)return e;let n=[],r=e.length?e[e.length-1].dir:xE.LTR;for(let i=Math.max(0,e.length-10);i=0;i--){let t=r[i],o="function"==typeof t?t(e):t;o&&DO(o,n)}return n}const vT=wO.mac?"mac":wO.windows?"win":wO.linux?"linux":"key";function yT(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}const _T=$w.default(pT.domEventHandlers({keydown:(e,t)=>OT(wT(t.state),e,t,"editor")})),ST=yw.define({enables:_T}),xT=new WeakMap;function wT(e){let t=e.facet(ST),n=xT.get(t);return n||xT.set(t,n=function(e,t=vT){let n=Object.create(null),r=Object.create(null),i=(e,t)=>{let n=r[e];if(null==n)r[e]=t;else if(n!=t)throw new Error("Key binding "+e+" is used both as a regular binding and as a multi-stroke prefix")},o=(e,r,o,s)=>{var a,l;let c=n[e]||(n[e]=Object.create(null)),u=r.split(/ (?!$)/).map(e=>function(e,t){const n=e.split(/-(?!$)/);let r,i,o,s,a=n[n.length-1];"Space"==a&&(a=" ");for(let e=0;e{let r=kT={view:t,prefix:n,scope:e};return setTimeout(()=>{kT==r&&(kT=null)},4e3),!0}]})}let d=u.join(" ");i(d,!1);let h=c[d]||(c[d]={preventDefault:!1,run:(null===(l=null===(a=c._any)||void 0===a?void 0:a.run)||void 0===l?void 0:l.slice())||[]});o&&h.run.push(o),s&&(h.preventDefault=!0)};for(let r of e){let e=r.scope?r.scope.split(" "):["editor"];if(r.any)for(let t of e){let e=n[t]||(n[t]=Object.create(null));e._any||(e._any={preventDefault:!1,run:[]});for(let t in e)e[t].run.push(r.any)}let i=r[t]||r.key;if(i)for(let t of e)o(t,i,r.run,r.preventDefault),r.shift&&o(t,"Shift-"+i,r.shift,r.preventDefault)}return n}(t.reduce((e,t)=>e.concat(t),[]))),n}let kT=null;function OT(e,t,n,r){let i=zk(t),o=iw(nw(i,0))==i.length&&" "!=i,s="",a=!1;kT&&kT.view==n&&kT.scope==r&&(s=kT.prefix+" ",(a=oA.indexOf(t.keyCode)<0)&&(kT=null));let l,c,u=new Set,d=e=>{if(e){for(let r of e.run)if(!u.has(r)&&(u.add(r),r(n,t)))return!0;e.preventDefault&&(a=!0)}return!1},h=e[r];if(h){if(d(h[s+yT(i,t,!o)]))return!0;if(o&&(t.altKey||t.metaKey||t.ctrlKey)&&!(wO.windows&&t.ctrlKey&&t.altKey)&&(l=Rk[t.keyCode])&&l!=i){if(d(h[s+yT(l,t,!0)]))return!0;if(t.shiftKey&&(c=Ik[t.keyCode])!=i&&c!=l&&d(h[s+yT(c,t,!1)]))return!0}else if(o&&t.shiftKey&&d(h[s+yT(i,t,!0)]))return!0;if(d(h._any))return!0}return a}class ET{constructor(e,t,n,r,i){this.className=e,this.left=t,this.top=n,this.width=r,this.height=i}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,t){return t.className==this.className&&(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",null!=this.width&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,t,n){if(n.empty){let r=e.coordsAtPos(n.head,n.assoc||1);if(!r)return[];let i=AT(e);return[new ET(t,r.left-i.left,r.top-i.top,null,r.bottom-r.top)]}return function(e,t,n){if(n.to<=e.viewport.from||n.from>=e.viewport.to)return[];let r=Math.max(n.from,e.viewport.from),i=Math.min(n.to,e.viewport.to),o=e.textDirection==xE.LTR,s=e.contentDOM,a=s.getBoundingClientRect(),l=AT(e),c=s.querySelector(".cm-line"),u=c&&window.getComputedStyle(c),d=a.left+(u?parseInt(u.paddingLeft)+Math.min(0,parseInt(u.textIndent)):0),h=a.right-(u?parseInt(u.paddingRight):0),p=CT(e,r),f=CT(e,i),m=p.type==BO.Text?p:null,g=f.type==BO.Text?f:null;e.lineWrapping&&(m&&(m=TT(e,r,m)),g&&(g=TT(e,i,g)));if(m&&g&&m.from==g.from)return v(y(n.from,n.to,m));{let t=m?y(n.from,null,m):_(p,!1),r=g?y(null,n.to,g):_(f,!0),i=[];return(m||p).to<(g||f).from-1?i.push(b(d,t.bottom,h,r.top)):t.bottomc&&r.from=o)break;a>i&&l(Math.max(e,i),null==t&&e<=c,Math.min(a,o),null==n&&a>=u,s.dir)}if(i=r.to+1,i>=o)break}return 0==a.length&&l(c,null==t,u,null==n,e.textDirection),{top:i,bottom:s,horizontal:a}}function _(e,t){let n=a.top+(t?e.top:e.bottom);return{top:n,bottom:n,horizontal:[]}}}(e,t,n)}}function AT(e){let t=e.scrollDOM.getBoundingClientRect();return{left:(e.textDirection==xE.LTR?t.left:t.right-e.scrollDOM.clientWidth)-e.scrollDOM.scrollLeft,top:t.top-e.scrollDOM.scrollTop}}function TT(e,t,n){let r=gw.cursor(t);return{from:Math.max(n.from,e.moveToLineBoundary(r,!1,!0).from),to:Math.min(n.to,e.moveToLineBoundary(r,!0,!0).from),type:BO.Text}}function CT(e,t){let n=e.lineBlockAt(t);if(Array.isArray(n.type))for(let e of n.type)if(e.to>t||e.to==t&&(e.to==n.to||e.type==BO.Text))return e;return n}class MT{constructor(e,t){this.view=e,this.layer=t,this.drawn=[],this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),t.above&&this.dom.classList.add("cm-layer-above"),t.class&&this.dom.classList.add(t.class),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),t.mount&&t.mount(this.dom,e)}update(e){e.startState.facet(PT)!=e.state.facet(PT)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&e.view.requestMeasure(this.measureReq)}setOrder(e){let t=0,n=e.facet(PT);for(;t{return n=e,r=this.drawn[t],!(n.constructor==r.constructor&&n.eq(r));var n,r})){let t=this.dom.firstChild,n=0;for(let r of e)r.update&&t&&r.constructor&&this.drawn[n].constructor&&r.update(t,this.drawn[n])?(t=t.nextSibling,n++):this.dom.insertBefore(r.draw(),t);for(;t;){let e=t.nextSibling;t.remove(),t=e}this.drawn=e}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const PT=yw.define();function $T(e){return[hE.define(t=>new MT(t,e)),PT.of(e)]}const RT=!wO.ios,IT=yw.define({combine:e=>lk(e,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,t)=>Math.min(e,t),drawRangeCursor:(e,t)=>e||t})});function DT(e={}){return[IT.of(e),jT,BT,zT,oE.of(!0)]}function NT(e){return e.startState.facet(IT)!=e.state.facet(IT)}const jT=$T({above:!0,markers(e){let{state:t}=e,n=t.facet(IT),r=[];for(let i of t.selection.ranges){let o=i==t.selection.main;if(i.empty?!o||RT:n.drawRangeCursor){let t=o?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",n=i.empty?i:gw.cursor(i.head,i.head>i.anchor?-1:1);for(let i of ET.forRange(e,t,n))r.push(i)}}return r},update(e,t){e.transactions.some(e=>e.selection)&&(t.style.animationName="cm-blink"==t.style.animationName?"cm-blink2":"cm-blink");let n=NT(e);return n&<(e.state,t),e.docChanged||e.selectionSet||n},mount(e,t){LT(t.state,e)},class:"cm-cursorLayer"});function LT(e,t){t.style.animationDuration=e.facet(IT).cursorBlinkRate+"ms"}const BT=$T({above:!1,markers:e=>e.state.selection.ranges.map(t=>t.empty?[]:ET.forRange(e,"cm-selectionBackground",t)).reduce((e,t)=>e.concat(t)),update:(e,t)=>e.docChanged||e.selectionSet||e.viewportChanged||NT(e),class:"cm-selectionLayer"}),FT={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};RT&&(FT[".cm-line"].caretColor="transparent !important");const zT=$w.highest(pT.theme(FT)),UT=Xw.define({map:(e,t)=>null==e?null:t.mapPos(e)}),QT=Ew.define({create:()=>null,update:(e,t)=>(null!=e&&(e=t.changes.mapPos(e)),t.effects.reduce((e,t)=>t.is(UT)?t.value:e,e))}),qT=hE.fromClass(class{constructor(e){this.view=e,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(e){var t;let n=e.state.field(QT);null==n?null!=this.cursor&&(null===(t=this.cursor)||void 0===t||t.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(e.startState.field(QT)!=n||e.docChanged||e.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let e=this.view.state.field(QT),t=null!=e&&this.view.coordsAtPos(e);if(!t)return null;let n=this.view.scrollDOM.getBoundingClientRect();return{left:t.left-n.left+this.view.scrollDOM.scrollLeft,top:t.top-n.top+this.view.scrollDOM.scrollTop,height:t.bottom-t.top}}drawCursor(e){this.cursor&&(e?(this.cursor.style.left=e.left+"px",this.cursor.style.top=e.top+"px",this.cursor.style.height=e.height+"px"):this.cursor.style.left="-100000px")}destroy(){this.cursor&&this.cursor.remove()}setDropPos(e){this.view.state.field(QT)!=e&&this.view.dispatch({effects:UT.of(e)})}},{eventHandlers:{dragover(e){this.setDropPos(this.view.posAtCoords({x:e.clientX,y:e.clientY}))},dragleave(e){e.target!=this.view.contentDOM&&this.view.contentDOM.contains(e.relatedTarget)||this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function HT(e,t,n,r,i){t.lastIndex=0;for(let o,s=e.iterRange(n,r),a=n;!s.next().done;a+=s.value.length)if(!s.lineBreak)for(;o=t.exec(s.value);)i(a+o.index,o)}class GT{constructor(e){const{regexp:t,decoration:n,decorate:r,boundary:i,maxLength:o=1e3}=e;if(!t.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=t,r)this.addMatch=(e,t,n,i)=>r(i,n,n+e[0].length,e,t);else if("function"==typeof n)this.addMatch=(e,t,r,i)=>{let o=n(e,t,r);o&&i(r,r+e[0].length,o)};else{if(!n)throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.addMatch=(e,t,r,i)=>i(r,r+e[0].length,n)}this.boundary=i,this.maxLength=o}createDeco(e){let t=new fk,n=t.add.bind(t);for(let{from:t,to:r}of function(e,t){let n=e.visibleRanges;if(1==n.length&&n[0].from==e.viewport.from&&n[0].to==e.viewport.to)return n;let r=[];for(let{from:i,to:o}of n)i=Math.max(e.state.doc.lineAt(i).from,i-t),o=Math.min(e.state.doc.lineAt(o).to,o+t),r.length&&r[r.length-1].to>=i?r[r.length-1].to=o:r.push({from:i,to:o});return r}(e,this.maxLength))HT(e.state.doc,this.regexp,t,r,(t,r)=>this.addMatch(r,e,t,n));return t.finish()}updateDeco(e,t){let n=1e9,r=-1;return e.docChanged&&e.changes.iterChanges((t,i,o,s)=>{s>e.view.viewport.from&&o1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,t.map(e.changes),n,r):t}updateRange(e,t,n,r){for(let i of e.visibleRanges){let o=Math.max(i.from,n),s=Math.min(i.to,r);if(s>o){let n=e.state.doc.lineAt(o),r=n.ton.from;o--)if(this.boundary.test(n.text[o-1-n.from])){a=o;break}for(;su.push(n.range(e,t));if(n==r)for(this.regexp.lastIndex=a-n.from;(c=this.regexp.exec(n.text))&&c.indexthis.addMatch(n,e,t,d));t=t.update({filterFrom:a,filterTo:l,filter:(e,t)=>el,add:u})}}return t}}const VT=null!=/x/.unicode?"gu":"g",WT=new RegExp("[\0-\b\n--Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\ufeff-]",VT),XT={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let YT=null;const ZT=yw.define({combine(e){let t=lk(e,{render:null,specialChars:WT,addSpecialChars:null});return(t.replaceTabs=!function(){var e;if(null==YT&&"undefined"!=typeof document&&document.body){let t=document.body.style;YT=null!=(null!==(e=t.tabSize)&&void 0!==e?e:t.MozTabSize)}return YT||!1}())&&(t.specialChars=new RegExp("\t|"+t.specialChars.source,VT)),t.addSpecialChars&&(t.specialChars=new RegExp(t.specialChars.source+"|"+t.addSpecialChars.source,VT)),t}});function JT(e={}){return[ZT.of(e),KT||(KT=hE.fromClass(class{constructor(e){this.view=e,this.decorations=FO.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(e.state.facet(ZT)),this.decorations=this.decorator.createDeco(e)}makeDecorator(e){return new GT({regexp:e.specialChars,decoration:(t,n,r)=>{let{doc:i}=n.state,o=nw(t[0],0);if(9==o){let e=i.lineAt(r),t=n.state.tabSize,o=Ok(e.text,t,r-e.from);return FO.replace({widget:new tC((t-o%t)*this.view.defaultCharacterWidth)})}return this.decorationCache[o]||(this.decorationCache[o]=FO.replace({widget:new eC(e,o)}))},boundary:e.replaceTabs?void 0:/[^]/})}update(e){let t=e.state.facet(ZT);e.startState.facet(ZT)!=t?(this.decorator=this.makeDecorator(t),this.decorations=this.decorator.createDeco(e.view)):this.decorations=this.decorator.updateDeco(e,this.decorations)}},{decorations:e=>e.decorations}))]}let KT=null;class eC extends LO{constructor(e,t){super(),this.options=e,this.code=t}eq(e){return e.code==this.code}toDOM(e){let t=(n=this.code)>=32?"•":10==n?"␤":String.fromCharCode(9216+n);var n;let r=e.state.phrase("Control character")+" "+(XT[this.code]||"0x"+this.code.toString(16)),i=this.options.render&&this.options.render(this.code,r,t);if(i)return i;let o=document.createElement("span");return o.textContent=t,o.title=r,o.setAttribute("aria-label",r),o.className="cm-specialChar",o}ignoreEvent(){return!1}}class tC extends LO{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent="\t",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}const nC=FO.line({class:"cm-activeLine"}),rC=hE.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.docChanged||e.selectionSet)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=-1,n=[];for(let r of e.state.selection.ranges){let i=e.lineBlockAt(r.head);i.from>t&&(n.push(nC.range(i.from)),t=i.from)}return FO.set(n)}},{decorations:e=>e.decorations});function iC(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1),r=e.state.doc.lineAt(n),i=n-r.from,o=i>2e3?-1:i==r.length?function(e,t){let n=e.coordsAtPos(e.viewport.from);return n?Math.round(Math.abs((n.left-t)/e.defaultCharacterWidth)):-1}(e,t.clientX):Ok(r.text,e.state.tabSize,n-r.from);return{line:r.number,col:o,off:i}}function oC(e,t){let n=iC(e,t),r=e.state.selection;return n?{update(e){if(e.docChanged){let t=e.changes.mapPos(e.startState.doc.line(n.line).from),i=e.state.doc.lineAt(t);n={line:i.number,col:n.col,off:Math.min(n.off,i.length)},r=r.map(e.changes)}},get(t,i,o){let s=iC(e,t);if(!s)return r;let a=function(e,t,n){let r=Math.min(t.line,n.line),i=Math.max(t.line,n.line),o=[];if(t.off>2e3||n.off>2e3||t.col<0||n.col<0){let s=Math.min(t.off,n.off),a=Math.max(t.off,n.off);for(let t=r;t<=i;t++){let n=e.doc.line(t);n.length<=a&&o.push(gw.range(n.from+s,n.to+a))}}else{let s=Math.min(t.col,n.col),a=Math.max(t.col,n.col);for(let t=r;t<=i;t++){let n=e.doc.line(t),r=Ek(n.text,s,e.tabSize,!0);if(r<0)o.push(gw.cursor(n.to));else{let t=Ek(n.text,a,e.tabSize);o.push(gw.range(n.from+r,n.from+t))}}}return o}(e.state,n,s);return a.length?o?gw.create(a.concat(r.ranges)):gw.create(a):r}}:null}function sC(e){let t=(null==e?void 0:e.eventFilter)||(e=>e.altKey&&0==e.button);return pT.mouseSelectionStyle.of((e,n)=>t(n)?oC(e,n):null)}const aC={Alt:[18,e=>e.altKey],Control:[17,e=>e.ctrlKey],Shift:[16,e=>e.shiftKey],Meta:[91,e=>e.metaKey]},lC={style:"cursor: crosshair"};function cC(e={}){let[t,n]=aC[e.key||"Alt"],r=hE.fromClass(class{constructor(e){this.view=e,this.isDown=!1}set(e){this.isDown!=e&&(this.isDown=e,this.view.update([]))}},{eventHandlers:{keydown(e){this.set(e.keyCode==t||n(e))},keyup(e){e.keyCode!=t&&n(e)||this.set(!1)},mousemove(e){this.set(n(e))}}});return[r,pT.contentAttributes.of(e=>{var t;return(null===(t=e.plugin(r))||void 0===t?void 0:t.isDown)?lC:null})]}class uC{constructor(e,t,n){this.facet=t,this.createTooltipView=n,this.input=e.state.facet(t),this.tooltips=this.input.filter(e=>e),this.tooltipViews=this.tooltips.map(n)}update(e){var t;let n=e.state.facet(this.facet),r=n.filter(e=>e);if(n===this.input){for(let t of this.tooltipViews)t.update&&t.update(e);return!1}let i=[];for(let t=0;t{var t,n,r;return{position:wO.ios?"absolute":(null===(t=e.find(e=>e.position))||void 0===t?void 0:t.position)||"fixed",parent:(null===(n=e.find(e=>e.parent))||void 0===n?void 0:n.parent)||null,tooltipSpace:(null===(r=e.find(e=>e.tooltipSpace))||void 0===r?void 0:r.tooltipSpace)||dC}}}),pC=new WeakMap,fC=hE.fromClass(class{constructor(e){this.view=e,this.inView=!0,this.lastTransaction=0,this.measureTimeout=-1;let t=e.state.facet(hC);this.position=t.position,this.parent=t.parent,this.classes=e.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.manager=new uC(e,bC,e=>this.createTooltip(e)),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver(e=>{Date.now()>this.lastTransaction-50&&e.length>0&&e[e.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),e.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let e of this.manager.tooltipViews)this.intersectionObserver.observe(e.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(e){e.transactions.length&&(this.lastTransaction=Date.now());let t=this.manager.update(e);t&&this.observeIntersection();let n=t||e.geometryChanged,r=e.state.facet(hC);if(r.position!=this.position){this.position=r.position;for(let e of this.manager.tooltipViews)e.dom.style.position=this.position;n=!0}if(r.parent!=this.parent){this.parent&&this.container.remove(),this.parent=r.parent,this.createContainer();for(let e of this.manager.tooltipViews)this.container.appendChild(e.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(e){let t=e.create(this.view);if(t.dom.classList.add("cm-tooltip"),e.arrow&&!t.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let e=document.createElement("div");e.className="cm-tooltip-arrow",t.dom.appendChild(e)}return t.dom.style.position=this.position,t.dom.style.top="-10000px",this.container.appendChild(t.dom),t.mount&&t.mount(this.view),t}destroy(){var e,t;this.view.win.removeEventListener("resize",this.measureSoon);for(let t of this.manager.tooltipViews)t.dom.remove(),null===(e=t.destroy)||void 0===e||e.call(t);null===(t=this.intersectionObserver)||void 0===t||t.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let e=this.view.dom.getBoundingClientRect();return{editor:e,parent:this.parent?this.container.getBoundingClientRect():e,pos:this.manager.tooltips.map((e,t)=>{let n=this.manager.tooltipViews[t];return n.getCoords?n.getCoords(e.pos):this.view.coordsAtPos(e.pos)}),size:this.manager.tooltipViews.map(({dom:e})=>e.getBoundingClientRect()),space:this.view.state.facet(hC).tooltipSpace(this.view)}}writeMeasure(e){var t;let{editor:n,space:r}=e,i=[];for(let o=0;o=Math.min(n.bottom,r.bottom)||c.rightMath.min(n.right,r.right)+.1){l.style.top="-10000px";continue}let d=s.arrow?a.dom.querySelector(".cm-tooltip-arrow"):null,h=d?7:0,p=u.right-u.left,f=null!==(t=pC.get(a))&&void 0!==t?t:u.bottom-u.top,m=a.offset||gC,g=this.view.textDirection==xE.LTR,b=u.width>r.right-r.left?g?r.left:r.right-u.width:g?Math.min(c.left-(d?14:0)+m.x,r.right-p):Math.max(r.left,c.left-p+(d?14:0)-m.x),v=!!s.above;!s.strictSide&&(v?c.top-(u.bottom-u.top)-m.yr.bottom)&&v==r.bottom-c.bottom>c.top-r.top&&(v=!v);let y=(v?c.top-r.top:r.bottom-c.bottom)-h;if(yb&&e.top<_+f&&e.bottom>_&&(_=v?e.top-f-2-h:e.bottom+h+2);"absolute"==this.position?(l.style.top=_-e.parent.top+"px",l.style.left=b-e.parent.left+"px"):(l.style.top=_+"px",l.style.left=b+"px"),d&&(d.style.left=c.left+(g?m.x:-m.x)-(b+14-7)+"px"),!0!==a.overlap&&i.push({left:b,top:_,right:S,bottom:_+f}),l.classList.toggle("cm-tooltip-above",v),l.classList.toggle("cm-tooltip-below",!v),a.positioned&&a.positioned(e.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let e of this.manager.tooltipViews)e.dom.style.top="-10000px"}},{eventHandlers:{scroll(){this.maybeMeasure()}}}),mC=pT.baseTheme({".cm-tooltip":{zIndex:100,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),gC={x:0,y:0},bC=yw.define({enables:[fC,mC]}),vC=yw.define();class yC{constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new uC(e,vC,e=>this.createHostedView(e))}static create(e){return new yC(e)}createHostedView(e){let t=e.create(this.view);return t.dom.classList.add("cm-tooltip-section"),this.dom.appendChild(t.dom),this.mounted&&t.mount&&t.mount(this.view),t}mount(e){for(let t of this.manager.tooltipViews)t.mount&&t.mount(e);this.mounted=!0}positioned(e){for(let t of this.manager.tooltipViews)t.positioned&&t.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let t of this.manager.tooltipViews)null===(e=t.destroy)||void 0===e||e.call(t)}}const _C=bC.compute([vC],e=>{let t=e.facet(vC).filter(e=>e);return 0===t.length?null:{pos:Math.min(...t.map(e=>e.pos)),end:Math.max(...t.filter(e=>null!=e.end).map(e=>e.end)),create:yC.create,above:t[0].above,arrow:t.some(e=>e.arrow)}});class SC{constructor(e,t,n,r,i){this.view=e,this.source=t,this.field=n,this.setHover=r,this.hoverTime=i,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active)return;let e=Date.now()-this.lastMove.time;en.bottom||e.xn.right+this.view.defaultCharacterWidth)return;let r=this.view.bidiSpans(this.view.state.doc.lineAt(t)).find(e=>e.from<=t&&e.to>=t),i=r&&r.dir==xE.RTL?-1:1,o=this.source(this.view,t,e.x{this.pending==e&&(this.pending=null,t&&this.view.dispatch({effects:this.setHover.of(t)}))},e=>lE(this.view.state,e,"hover tooltip"))}else o&&this.view.dispatch({effects:this.setHover.of(o)})}mousemove(e){var t;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let n=this.active;if(n&&!xC(this.lastMove.target)||this.pending){let{pos:r}=n||this.pending,i=null!==(t=null==n?void 0:n.end)&&void 0!==t?t:r;(r==i?this.view.posAtCoords(this.lastMove)==r:function(e,t,n,r,i,o){let s=document.createRange(),a=e.domAtPos(t),l=e.domAtPos(n);s.setEnd(l.node,l.offset),s.setStart(a.node,a.offset);let c=s.getClientRects();s.detach();for(let e=0;enull,update(e,r){if(e&&(t.hideOnChange&&(r.docChanged||r.selection)||t.hideOn&&t.hideOn(r,e)))return null;if(e&&r.docChanged){let t=r.changes.mapPos(e.pos,-1,sw.TrackDel);if(null==t)return null;let n=Object.assign(Object.create(null),e);n.pos=t,null!=e.end&&(n.end=r.changes.mapPos(e.end)),e=n}for(let t of r.effects)t.is(n)&&(e=t.value),t.is(OC)&&(e=null);return e},provide:e=>vC.from(e)});return[r,hE.define(i=>new SC(i,e,r,n,t.hoverTime||300)),_C]}function kC(e,t){let n=e.plugin(fC);if(!n)return null;let r=n.manager.tooltips.indexOf(t);return r<0?null:n.manager.tooltipViews[r]}const OC=Xw.define();const EC=yw.define({combine(e){let t,n;for(let r of e)t=t||r.topContainer,n=n||r.bottomContainer;return{topContainer:t,bottomContainer:n}}});function AC(e,t){let n=e.plugin(TC),r=n?n.specs.indexOf(t):-1;return r>-1?n.panels[r]:null}const TC=hE.fromClass(class{constructor(e){this.input=e.state.facet(PC),this.specs=this.input.filter(e=>e),this.panels=this.specs.map(t=>t(e));let t=e.state.facet(EC);this.top=new CC(e,!0,t.topContainer),this.bottom=new CC(e,!1,t.bottomContainer),this.top.sync(this.panels.filter(e=>e.top)),this.bottom.sync(this.panels.filter(e=>!e.top));for(let e of this.panels)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}update(e){let t=e.state.facet(EC);this.top.container!=t.topContainer&&(this.top.sync([]),this.top=new CC(e.view,!0,t.topContainer)),this.bottom.container!=t.bottomContainer&&(this.bottom.sync([]),this.bottom=new CC(e.view,!1,t.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=e.state.facet(PC);if(n!=this.input){let t=n.filter(e=>e),r=[],i=[],o=[],s=[];for(let n of t){let t,a=this.specs.indexOf(n);a<0?(t=n(e.view),s.push(t)):(t=this.panels[a],t.update&&t.update(e)),r.push(t),(t.top?i:o).push(t)}this.specs=t,this.panels=r,this.top.sync(i),this.bottom.sync(o);for(let e of s)e.dom.classList.add("cm-panel"),e.mount&&e.mount()}else for(let t of this.panels)t.update&&t.update(e)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:e=>pT.scrollMargins.of(t=>{let n=t.plugin(e);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class CC{constructor(e,t,n){this.view=e,this.top=t,this.container=n,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let t of this.panels)t.destroy&&e.indexOf(t)<0&&t.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(0==this.panels.length)return void(this.dom&&(this.dom.remove(),this.dom=void 0));if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let e=this.container||this.view.dom;e.insertBefore(this.dom,this.top?e.firstChild:null)}let e=this.dom.firstChild;for(let t of this.panels)if(t.dom.parentNode==this.dom){for(;e!=t.dom;)e=MC(e);e=e.nextSibling}else this.dom.insertBefore(t.dom,e);for(;e;)e=MC(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function MC(e){let t=e.nextSibling;return e.remove(),t}const PC=yw.define({enables:TC});class $C extends ck{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}$C.prototype.elementClass="",$C.prototype.toDOM=void 0,$C.prototype.mapMode=sw.TrackBefore,$C.prototype.startSide=$C.prototype.endSide=-1,$C.prototype.point=!0;const RC=yw.define(),IC={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>pk.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},DC=yw.define();function NC(e){return[LC(),DC.of(Object.assign(Object.assign({},IC),e))]}const jC=yw.define({combine:e=>e.some(e=>e)});function LC(e){let t=[BC];return e&&!1===e.fixed&&t.push(jC.of(!0)),t}const BC=hE.fromClass(class{constructor(e){this.view=e,this.prevViewport=e.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight+"px",this.gutters=e.state.facet(DC).map(t=>new QC(e,t));for(let e of this.gutters)this.dom.appendChild(e.dom);this.fixed=!e.state.facet(jC),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),e.scrollDOM.insertBefore(this.dom,e.contentDOM)}update(e){if(this.updateGutters(e)){let t=this.prevViewport,n=e.view.viewport,r=Math.min(t.to,n.to)-Math.max(t.from,n.from);this.syncGutters(r<.8*(n.to-n.from))}e.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight+"px"),this.view.state.facet(jC)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=e.view.viewport}syncGutters(e){let t=this.dom.nextSibling;e&&this.dom.remove();let n=pk.iter(this.view.state.facet(RC),this.view.viewport.from),r=[],i=this.gutters.map(e=>new UC(e,this.view.viewport,-this.view.documentPadding.top));for(let e of this.view.viewportLineBlocks)if(r.length&&(r=[]),Array.isArray(e.type)){let t=!0;for(let o of e.type)if(o.type==BO.Text&&t){zC(n,r,o.from);for(let e of i)e.line(this.view,o,r);t=!1}else if(o.widget)for(let e of i)e.widget(this.view,o)}else if(e.type==BO.Text){zC(n,r,e.from);for(let t of i)t.line(this.view,e,r)}for(let e of i)e.finish();e&&this.view.scrollDOM.insertBefore(this.dom,t)}updateGutters(e){let t=e.startState.facet(DC),n=e.state.facet(DC),r=e.docChanged||e.heightChanged||e.viewportChanged||!pk.eq(e.startState.facet(RC),e.state.facet(RC),e.view.viewport.from,e.view.viewport.to);if(t==n)for(let t of this.gutters)t.update(e)&&(r=!0);else{r=!0;let i=[];for(let r of n){let n=t.indexOf(r);n<0?i.push(new QC(this.view,r)):(this.gutters[n].update(e),i.push(this.gutters[n]))}for(let e of this.gutters)e.dom.remove(),i.indexOf(e)<0&&e.destroy();for(let e of i)this.dom.appendChild(e.dom);this.gutters=i}return r}destroy(){for(let e of this.gutters)e.destroy();this.dom.remove()}},{provide:e=>pT.scrollMargins.of(t=>{let n=t.plugin(e);return n&&0!=n.gutters.length&&n.fixed?t.textDirection==xE.LTR?{left:n.dom.offsetWidth}:{right:n.dom.offsetWidth}:null})});function FC(e){return Array.isArray(e)?e:[e]}function zC(e,t,n){for(;e.value&&e.from<=n;)e.from==n&&t.push(e.value),e.next()}class UC{constructor(e,t,n){this.gutter=e,this.height=n,this.i=0,this.cursor=pk.iter(e.markers,t.from)}addElement(e,t,n){let{gutter:r}=this,i=t.top-this.height;if(this.i==r.elements.length){let o=new qC(e,t.height,i,n);r.elements.push(o),r.dom.appendChild(o.dom)}else r.elements[this.i].update(e,t.height,i,n);this.height=t.bottom,this.i++}line(e,t,n){let r=[];zC(this.cursor,r,t.from),n.length&&(r=r.concat(n));let i=this.gutter.config.lineMarker(e,t,r);i&&r.unshift(i);let o=this.gutter;(0!=r.length||o.config.renderEmptyElements)&&this.addElement(e,t,r)}widget(e,t){let n=this.gutter.config.widgetMarker(e,t.widget,t);n&&this.addElement(e,t,[n])}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let t=e.elements.pop();e.dom.removeChild(t.dom),t.destroy()}}}class QC{constructor(e,t){this.view=e,this.config=t,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let n in t.domEventHandlers)this.dom.addEventListener(n,r=>{let i,o=r.target;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let e=o.getBoundingClientRect();i=(e.top+e.bottom)/2}else i=r.clientY;let s=e.lineBlockAtHeight(i-e.documentTop);t.domEventHandlers[n](e,s,r)&&r.preventDefault()});this.markers=FC(t.markers(e)),t.initialSpacer&&(this.spacer=new qC(e,0,0,[t.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let t=this.markers;if(this.markers=FC(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let t=this.config.updateSpacer(this.spacer.markers[0],e);t!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[t])}let n=e.view.viewport;return!pk.eq(this.markers,t,n.from,n.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(e)}destroy(){for(let e of this.elements)e.destroy()}}class qC{constructor(e,t,n,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,t,n,r)}update(e,t,n,r){this.height!=t&&(this.dom.style.height=(this.height=t)+"px"),this.above!=n&&(this.dom.style.marginTop=(this.above=n)?n+"px":""),function(e,t){if(e.length!=t.length)return!1;for(let n=0;nlk(e,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,t){let n=Object.assign({},e);for(let e in t){let r=n[e],i=t[e];n[e]=r?(e,t,n)=>r(e,t,n)||i(e,t,n):i}return n}})});class VC extends $C{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function WC(e,t){return e.state.facet(GC).formatNumber(t,e.state)}const XC=DC.compute([GC],e=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:e=>e.state.facet(HC),lineMarker:(e,t,n)=>n.some(e=>e.toDOM)?null:new VC(WC(e,e.state.doc.lineAt(t.from).number)),widgetMarker:()=>null,lineMarkerChange:e=>e.startState.facet(GC)!=e.state.facet(GC),initialSpacer:e=>new VC(WC(e,ZC(e.state.doc.lines))),updateSpacer(e,t){let n=WC(t.view,ZC(t.view.state.doc.lines));return n==e.number?e:new VC(n)},domEventHandlers:e.facet(GC).domEventHandlers}));function YC(e={}){return[GC.of(e),LC(),XC]}function ZC(e){let t=9;for(;t{let t=[],n=-1;for(let r of e.selection.ranges){let i=e.doc.lineAt(r.head).from;i>n&&(n=i,t.push(JC.range(i)))}return pk.of(t)});var eM=n(3);let tM=0;class nM{constructor(e,t,n){this.set=e,this.base=t,this.modified=n,this.id=tM++}static define(e){if(null==e?void 0:e.base)throw new Error("Can not derive from a modified tag");let t=new nM([],null,[]);if(t.set.push(t),e)for(let n of e.set)t.set.push(n);return t}static defineModifier(){let e=new iM;return t=>t.modified.indexOf(e)>-1?t:iM.get(t.base||t,t.modified.concat(e).sort((e,t)=>e.id-t.id))}}let rM=0;class iM{constructor(){this.instances=[],this.id=rM++}static get(e,t){if(!t.length)return e;let n=t[0].instances.find(n=>{return n.base==e&&(r=t,i=n.modified,r.length==i.length&&r.every((e,t)=>e==i[t]));var r,i});if(n)return n;let r=[],i=new nM(r,e,t);for(let e of t)e.instances.push(i);let o=function(e){let t=[[]];for(let n=0;nt.length-e.length)}(t);for(let t of e.set)if(!t.modified.length)for(let e of o)r.push(iM.get(t,e));return i}}function oM(e){let t=Object.create(null);for(let n in e){let r=e[n];Array.isArray(r)||(r=[r]);for(let e of n.split(" "))if(e){let n=[],i=2,o=e;for(let t=0;;){if("..."==o&&t>0&&t+3==e.length){i=1;break}let r=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(o);if(!r)throw new RangeError("Invalid path: "+e);if(n.push("*"==r[0]?"":'"'==r[0][0]?JSON.parse(r[0]):r[0]),t+=r[0].length,t==e.length)break;let s=e[t++];if(t==e.length&&"!"==s){i=0;break}if("/"!=s)throw new RangeError("Invalid path: "+e);o=e.slice(t)}let s=n.length-1,a=n[s];if(!a)throw new RangeError("Invalid path: "+e);let l=new aM(r,i,s>0?n.slice(0,s):null);t[a]=l.sort(t[a])}}return sM.add(t)}const sM=new eM.c;class aM{constructor(e,t,n,r){this.tags=e,this.mode=t,this.context=n,this.next=r}get opaque(){return 0==this.mode}get inherit(){return 1==this.mode}sort(e){return!e||e.depth{let t=i;for(let r of e)for(let e of r.set){let r=n[e.id];if(r){t=t?t+" "+r:r;break}}return t},scope:r}}function cM(e,t,n,r=0,i=e.length){let o=new uM(r,Array.isArray(t)?t:[t],n);o.highlightRange(e.cursor(),r,i,"",o.highlighters),o.flush(i)}aM.empty=new aM([],2,null);class uM{constructor(e,t,n){this.at=e,this.highlighters=t,this.span=n,this.class=""}startSpan(e,t){t!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=t)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,t,n,r,i){let{type:o,from:s,to:a}=e;if(s>=n||a<=t)return;o.isTop&&(i=this.highlighters.filter(e=>!e.scope||e.scope(o)));let l=r,c=function(e){let t=e.type.prop(sM);for(;t&&t.context&&!e.matchContext(t.context);)t=t.next;return t||null}(e)||aM.empty,u=function(e,t){let n=null;for(let r of e){let e=r.style(t);e&&(n=n?n+" "+e:e)}return n}(i,c.tags);if(u&&(l&&(l+=" "),l+=u,1==c.mode&&(r+=(r?" ":"")+u)),this.startSpan(e.from,l),c.opaque)return;let d=e.tree&&e.tree.prop(eM.c.mounted);if(d&&d.overlay){let o=e.node.enter(d.overlay[0].from+s,1),c=this.highlighters.filter(e=>!e.scope||e.scope(d.tree.type)),u=e.firstChild();for(let h=0,p=s;;h++){let f=h=m)&&e.nextSibling()););if(!f||m>n)break;p=f.to+s,p>t&&(this.highlightRange(o.cursor(),Math.max(t,f.from+s),Math.min(n,p),r,c),this.startSpan(p,l))}u&&e.parent()}else if(e.firstChild()){do{if(!(e.to<=t)){if(e.from>=n)break;this.highlightRange(e,t,n,r,i),this.startSpan(Math.min(n,e.to),l)}}while(e.nextSibling());e.parent()}}}const dM=nM.define,hM=dM(),pM=dM(),fM=dM(pM),mM=dM(pM),gM=dM(),bM=dM(gM),vM=dM(gM),yM=dM(),_M=dM(yM),SM=dM(),xM=dM(),wM=dM(),kM=dM(wM),OM=dM(),EM={comment:hM,lineComment:dM(hM),blockComment:dM(hM),docComment:dM(hM),name:pM,variableName:dM(pM),typeName:fM,tagName:dM(fM),propertyName:mM,attributeName:dM(mM),className:dM(pM),labelName:dM(pM),namespace:dM(pM),macroName:dM(pM),literal:gM,string:bM,docString:dM(bM),character:dM(bM),attributeValue:dM(bM),number:vM,integer:dM(vM),float:dM(vM),bool:dM(gM),regexp:dM(gM),escape:dM(gM),color:dM(gM),url:dM(gM),keyword:SM,self:dM(SM),null:dM(SM),atom:dM(SM),unit:dM(SM),modifier:dM(SM),operatorKeyword:dM(SM),controlKeyword:dM(SM),definitionKeyword:dM(SM),moduleKeyword:dM(SM),operator:xM,derefOperator:dM(xM),arithmeticOperator:dM(xM),logicOperator:dM(xM),bitwiseOperator:dM(xM),compareOperator:dM(xM),updateOperator:dM(xM),definitionOperator:dM(xM),typeOperator:dM(xM),controlOperator:dM(xM),punctuation:wM,separator:dM(wM),bracket:kM,angleBracket:dM(kM),squareBracket:dM(kM),paren:dM(kM),brace:dM(kM),content:yM,heading:_M,heading1:dM(_M),heading2:dM(_M),heading3:dM(_M),heading4:dM(_M),heading5:dM(_M),heading6:dM(_M),contentSeparator:dM(yM),list:dM(yM),quote:dM(yM),emphasis:dM(yM),strong:dM(yM),link:dM(yM),monospace:dM(yM),strikethrough:dM(yM),inserted:dM(),deleted:dM(),changed:dM(),invalid:dM(),meta:OM,documentMeta:dM(OM),annotation:dM(OM),processingInstruction:dM(OM),definition:nM.defineModifier(),constant:nM.defineModifier(),function:nM.defineModifier(),standard:nM.defineModifier(),local:nM.defineModifier(),special:nM.defineModifier()};lM([{tag:EM.link,class:"tok-link"},{tag:EM.heading,class:"tok-heading"},{tag:EM.emphasis,class:"tok-emphasis"},{tag:EM.strong,class:"tok-strong"},{tag:EM.keyword,class:"tok-keyword"},{tag:EM.atom,class:"tok-atom"},{tag:EM.bool,class:"tok-bool"},{tag:EM.url,class:"tok-url"},{tag:EM.labelName,class:"tok-labelName"},{tag:EM.inserted,class:"tok-inserted"},{tag:EM.deleted,class:"tok-deleted"},{tag:EM.literal,class:"tok-literal"},{tag:EM.string,class:"tok-string"},{tag:EM.number,class:"tok-number"},{tag:[EM.regexp,EM.escape,EM.special(EM.string)],class:"tok-string2"},{tag:EM.variableName,class:"tok-variableName"},{tag:EM.local(EM.variableName),class:"tok-variableName tok-local"},{tag:EM.definition(EM.variableName),class:"tok-variableName tok-definition"},{tag:EM.special(EM.variableName),class:"tok-variableName2"},{tag:EM.definition(EM.propertyName),class:"tok-propertyName tok-definition"},{tag:EM.typeName,class:"tok-typeName"},{tag:EM.namespace,class:"tok-namespace"},{tag:EM.className,class:"tok-className"},{tag:EM.macroName,class:"tok-macroName"},{tag:EM.propertyName,class:"tok-propertyName"},{tag:EM.operator,class:"tok-operator"},{tag:EM.comment,class:"tok-comment"},{tag:EM.meta,class:"tok-meta"},{tag:EM.invalid,class:"tok-invalid"},{tag:EM.punctuation,class:"tok-punctuation"}]);var AM;const TM=new eM.c;function CM(e){return yw.define({combine:e?t=>t.concat(e):void 0})}const MM=new eM.c;class PM{constructor(e,t,n=[],r=""){this.data=e,this.name=r,ak.prototype.hasOwnProperty("tree")||Object.defineProperty(ak.prototype,"tree",{get(){return IM(this)}}),this.parser=t,this.extension=[QM.of(this),ak.languageData.of((e,t,n)=>{let r=$M(e,t,n),i=r.type.prop(TM);if(!i)return[];let o=e.facet(i),s=r.type.prop(MM);if(s){let i=r.resolve(t-r.from,n);for(let t of s)if(t.test(i,e)){let n=e.facet(t.facet);return"replace"==t.type?n:n.concat(o)}}return o})].concat(n)}isActiveAt(e,t,n=-1){return $M(e,t,n).type.prop(TM)==this.data}findRegions(e){let t=e.facet(QM);if((null==t?void 0:t.data)==this.data)return[{from:0,to:e.doc.length}];if(!t||!t.allowsNesting)return[];let n=[],r=(e,t)=>{if(e.prop(TM)==this.data)return void n.push({from:t,to:t+e.length});let i=e.prop(eM.c.mounted);if(i){if(i.tree.prop(TM)==this.data){if(i.overlay)for(let e of i.overlay)n.push({from:e.from+t,to:e.to+t});else n.push({from:t,to:t+e.length});return}if(i.overlay){let e=n.length;if(r(i.tree,i.overlay[0].from+t),n.length>e)return}}for(let n=0;ne.isTop?t:void 0)]}),e.name)}configure(e,t){return new RM(this.data,this.parser.configure(e),t||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function IM(e){let t=e.field(PM.state,!1);return t?t.tree:eM.h.empty}class DM{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,t){let n=this.cursorPos-this.string.length;return e=this.cursorPos?this.doc.sliceString(e,t):this.string.slice(e-n,t-n)}}let NM=null;class jM{constructor(e,t,n=[],r,i,o,s,a){this.parser=e,this.state=t,this.fragments=n,this.tree=r,this.treeLen=i,this.viewport=o,this.skipped=s,this.scheduleOn=a,this.parse=null,this.tempSkipped=[]}static create(e,t,n){return new jM(e,t,[],eM.h.empty,0,n,[],null)}startParse(){return this.parser.startParse(new DM(this.state.doc),this.fragments)}work(e,t){return null!=t&&t>=this.state.doc.length&&(t=void 0),this.tree!=eM.h.empty&&this.isDone(null!=t?t:this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var n;if("number"==typeof e){let t=Date.now()+e;e=()=>Date.now()>t}for(this.parse||(this.parse=this.startParse()),null!=t&&(null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&t=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(t=this.parse.advance()););}),this.treeLen=e,this.tree=t,this.fragments=this.withoutTempSkipped(eM.i.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let t=NM;NM=this;try{return e()}finally{NM=t}}withoutTempSkipped(e){for(let t;t=this.tempSkipped.pop();)e=LM(e,t.from,t.to);return e}changes(e,t){let{fragments:n,tree:r,treeLen:i,viewport:o,skipped:s}=this;if(this.takeTree(),!e.empty){let t=[];if(e.iterChangedRanges((e,n,r,i)=>t.push({fromA:e,toA:n,fromB:r,toB:i})),n=eM.i.applyChanges(n,t),r=eM.h.empty,i=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){s=[];for(let t of this.skipped){let n=e.mapPos(t.from,1),r=e.mapPos(t.to,-1);ne.from&&(this.fragments=LM(this.fragments,n,r),this.skipped.splice(t--,1))}return!(this.skipped.length>=t)&&(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,t){this.skipped.push({from:e,to:t})}static getSkippingParser(e){return new class extends eM.g{createParse(t,n,r){let i=r[0].from,o=r[r.length-1].to;return{parsedPos:i,advance(){let t=NM;if(t){for(let e of r)t.tempSkipped.push(e);e&&(t.scheduleOn=t.scheduleOn?Promise.all([t.scheduleOn,e]):e)}return this.parsedPos=o,new eM.h(eM.e.none,[],[],o-i)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let t=this.fragments;return this.treeLen>=e&&t.length&&0==t[0].from&&t[0].to>=e}static get(){return NM}}function LM(e,t,n){return eM.i.applyChanges(e,[{fromA:t,toA:n,fromB:t,toB:n}])}class BM{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let t=this.context.changes(e.changes,e.state),n=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),t.viewport.to);return t.work(20,n)||t.takeTree(),new BM(t)}static init(e){let t=Math.min(3e3,e.doc.length),n=jM.create(e.facet(QM).parser,e,{from:0,to:t});return n.work(20,t)||n.takeTree(),new BM(n)}}PM.state=Ew.define({create:BM.init,update(e,t){for(let e of t.effects)if(e.is(PM.setState))return e.value;return t.startState.facet(QM)!=t.state.facet(QM)?BM.init(t.state):e.apply(t)}});let FM=e=>{let t=setTimeout(()=>e(),500);return()=>clearTimeout(t)};"undefined"!=typeof requestIdleCallback&&(FM=e=>{let t=-1,n=setTimeout(()=>{t=requestIdleCallback(e,{timeout:400})},100);return()=>t<0?clearTimeout(n):cancelIdleCallback(t)});const zM="undefined"!=typeof navigator&&(null===(AM=navigator.scheduling)||void 0===AM?void 0:AM.isInputPending)?()=>navigator.scheduling.isInputPending():null,UM=hE.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let t=this.view.state.field(PM.state).context;(t.updateViewport(e.view.viewport)||this.view.viewport.to>t.treeLen)&&this.scheduleWork(),e.docChanged&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(t)}scheduleWork(){if(this.working)return;let{state:e}=this.view,t=e.field(PM.state);t.tree==t.context.tree&&t.context.isDone(e.doc.length)||(this.working=FM(this.work))}work(e){this.working=null;let t=Date.now();if(this.chunkEndr+1e3,a=i.context.work(()=>zM&&zM()||Date.now()>o,r+(s?0:1e5));this.chunkBudget-=Date.now()-t,(a||this.chunkBudget<=0)&&(i.context.takeTree(),this.view.dispatch({effects:PM.setState.of(new BM(i.context))})),this.chunkBudget>0&&(!a||s)&&this.scheduleWork(),this.checkAsyncSchedule(i.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(e=>lE(this.view.state,e)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),QM=yw.define({combine:e=>e.length?e[0]:null,enables:e=>[PM.state,UM,pT.contentAttributes.compute([e],t=>{let n=t.facet(e);return n&&n.name?{"data-language":n.name}:{}})]});class qM{constructor(e,t=[]){this.language=e,this.support=t,this.extension=[e,t]}}const HM=yw.define(),GM=yw.define({combine:e=>{if(!e.length)return" ";let t=e[0];if(!t||/\S/.test(t)||Array.from(t).some(e=>e!=t[0]))throw new Error("Invalid indent unit: "+JSON.stringify(e[0]));return t}});function VM(e){let t=e.facet(GM);return 9==t.charCodeAt(0)?e.tabSize*t.length:t.length}function WM(e,t){let n="",r=e.tabSize,i=e.facet(GM)[0];if("\t"==i){for(;t>=r;)n+="\t",t-=r;i=" "}for(let e=0;e=n.from&&r<=n.to?i&&r==e?{text:"",from:e}:(t<0?r-1&&(i+=o-this.countColumn(n,n.search(/\S|$/))),i}countColumn(e,t=e.length){return Ok(e,this.state.tabSize,t)}lineIndent(e,t=1){let{text:n,from:r}=this.lineAt(e,t),i=this.options.overrideIndentation;if(i){let e=i(r);if(e>-1)return e}return this.countColumn(n,n.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const ZM=new eM.c;function JM(e){let t=e.type.prop(ZM);if(t)return t;let n,r=e.firstChild;if(r&&(n=r.type.prop(eM.c.closedBy))){let t=e.lastChild,r=t&&n.indexOf(t.name)>-1;return e=>iP(e,!0,1,void 0,r&&!function(e){return e.pos==e.options.simulateBreak&&e.options.simulateDoubleBreak}(e)?t.from:void 0)}return null==e.parent?eP:null}function KM(e,t,n){for(;e;e=e.parent){let r=JM(e);if(r)return r(tP.create(n,t,e))}return null}function eP(){return 0}class tP extends YM{constructor(e,t,n){super(e.state,e.options),this.base=e,this.pos=t,this.node=n}static create(e,t,n){return new tP(e,t,n)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){let e=this.state.doc.lineAt(this.node.from);for(;;){let t=this.node.resolve(e.from);for(;t.parent&&t.parent.from==t.from;)t=t.parent;if(nP(t,this.node))break;e=this.state.doc.lineAt(t.from)}return this.lineIndent(e.from)}continue(){let e=this.node.parent;return e?KM(e,this.pos,this.base):0}}function nP(e,t){for(let n=t;n;n=n.parent)if(e==n)return!0;return!1}function rP({closing:e,align:t=!0,units:n=1}){return r=>iP(r,t,n,e)}function iP(e,t,n,r,i){let o=e.textAfter,s=o.match(/^\s*/)[0].length,a=r&&o.slice(s,s+r.length)==r||i==e.pos+s,l=t?function(e){let t=e.node,n=t.childAfter(t.from),r=t.lastChild;if(!n)return null;let i=e.options.simulateBreak,o=e.state.doc.lineAt(n.from),s=null==i||i<=o.from?o.to:Math.min(o.to,i);for(let e=n.to;;){let i=t.childAfter(e);if(!i||i==r)return null;if(!i.type.isSkipped)return i.frome.baseIndent;function sP({except:e,units:t=1}={}){return n=>{let r=e&&e.test(n.textAfter);return n.baseIndent+(r?0:t*n.unit)}}const aP=yw.define(),lP=new eM.c;function cP(e){let t=e.firstChild,n=e.lastChild;return t&&t.ton)continue;if(i&&o.from=t&&r.to>n&&(i=r)}}return i}(e,t,n)}function hP(e,t){let n=t.mapPos(e.from,1),r=t.mapPos(e.to,-1);return n>=r?void 0:{from:n,to:r}}const pP=Xw.define({map:hP}),fP=Xw.define({map:hP});function mP(e){let t=[];for(let{head:n}of e.state.selection.ranges)t.some(e=>e.from<=n&&e.to>=n)||t.push(e.lineBlockAt(n));return t}const gP=Ew.define({create:()=>FO.none,update(e,t){e=e.map(t.changes);for(let n of t.effects)n.is(pP)&&!vP(e,n.value.from,n.value.to)?e=e.update({add:[OP.range(n.value.from,n.value.to)]}):n.is(fP)&&(e=e.update({filter:(e,t)=>n.value.from!=e||n.value.to!=t,filterFrom:n.value.from,filterTo:n.value.to}));if(t.selection){let n=!1,{head:r}=t.selection.main;e.between(r,r,(e,t)=>{er&&(n=!0)}),n&&(e=e.update({filterFrom:r,filterTo:r,filter:(e,t)=>t<=r||e>=r}))}return e},provide:e=>pT.decorations.from(e),toJSON(e,t){let n=[];return e.between(0,t.doc.length,(e,t)=>{n.push(e,t)}),n},fromJSON(e){if(!Array.isArray(e)||e.length%2)throw new RangeError("Invalid JSON for fold state");let t=[];for(let n=0;n{(!i||i.from>e)&&(i={from:e,to:t})}),i}function vP(e,t,n){let r=!1;return e.between(t,t,(e,i)=>{e==t&&i==n&&(r=!0)}),r}function yP(e,t){return e.field(gP,!1)?t:t.concat(Xw.appendConfig.of(kP()))}function _P(e,t,n=!0){let r=e.state.doc.lineAt(t.from).number,i=e.state.doc.lineAt(t.to).number;return pT.announce.of(`${e.state.phrase(n?"Folded lines":"Unfolded lines")} ${r} ${e.state.phrase("to")} ${i}.`)}const SP=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:e=>{for(let t of mP(e)){let n=dP(e.state,t.from,t.to);if(n)return e.dispatch({effects:yP(e.state,[pP.of(n),_P(e,n)])}),!0}return!1}},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:e=>{if(!e.state.field(gP,!1))return!1;let t=[];for(let n of mP(e)){let r=bP(e.state,n.from,n.to);r&&t.push(fP.of(r),_P(e,r,!1))}return t.length&&e.dispatch({effects:t}),t.length>0}},{key:"Ctrl-Alt-[",run:e=>{let{state:t}=e,n=[];for(let r=0;r{let t=e.state.field(gP,!1);if(!t||!t.size)return!1;let n=[];return t.between(0,e.state.doc.length,(e,t)=>{n.push(fP.of({from:e,to:t}))}),e.dispatch({effects:n}),!0}}],xP={placeholderDOM:null,placeholderText:"…"},wP=yw.define({combine:e=>lk(e,xP)});function kP(e){let t=[gP,CP];return e&&t.push(wP.of(e)),t}const OP=FO.replace({widget:new class extends LO{toDOM(e){let{state:t}=e,n=t.facet(wP),r=t=>{let n=e.lineBlockAt(e.posAtDOM(t.target)),r=bP(e.state,n.from,n.to);r&&e.dispatch({effects:fP.of(r)}),t.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(e,r);let i=document.createElement("span");return i.textContent=n.placeholderText,i.setAttribute("aria-label",t.phrase("folded code")),i.title=t.phrase("unfold"),i.className="cm-foldPlaceholder",i.onclick=r,i}}}),EP={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class AP extends $C{constructor(e,t){super(),this.config=e,this.open=t}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let t=document.createElement("span");return t.textContent=this.open?this.config.openText:this.config.closedText,t.title=e.state.phrase(this.open?"Fold line":"Unfold line"),t}}function TP(e={}){let t=Object.assign(Object.assign({},EP),e),n=new AP(t,!0),r=new AP(t,!1),i=hE.fromClass(class{constructor(e){this.from=e.viewport.from,this.markers=this.buildMarkers(e)}update(e){(e.docChanged||e.viewportChanged||e.startState.facet(QM)!=e.state.facet(QM)||e.startState.field(gP,!1)!=e.state.field(gP,!1)||IM(e.startState)!=IM(e.state)||t.foldingChanged(e))&&(this.markers=this.buildMarkers(e.view))}buildMarkers(e){let t=new fk;for(let i of e.viewportLineBlocks){let o=bP(e.state,i.from,i.to)?r:dP(e.state,i.from,i.to)?n:null;o&&t.add(i.from,i.from,o)}return t.finish()}}),{domEventHandlers:o}=t;return[i,NC({class:"cm-foldGutter",markers(e){var t;return(null===(t=e.plugin(i))||void 0===t?void 0:t.markers)||pk.empty},initialSpacer:()=>new AP(t,!1),domEventHandlers:Object.assign(Object.assign({},o),{click:(e,t,n)=>{if(o.click&&o.click(e,t,n))return!0;let r=bP(e.state,t.from,t.to);if(r)return e.dispatch({effects:fP.of(r)}),!0;let i=dP(e.state,t.from,t.to);return!!i&&(e.dispatch({effects:pP.of(i)}),!0)}})}),kP()]}const CP=pT.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class MP{constructor(e,t){let n;function r(e){let t=Mk.newName();return(n||(n=Object.create(null)))["."+t]=e,t}this.specs=e;const i="string"==typeof t.all?t.all:t.all?r(t.all):void 0,o=t.scope;this.scope=o instanceof PM?e=>e.prop(TM)==o.data:o?e=>e==o:void 0,this.style=lM(e.map(e=>({tag:e.tag,class:e.class||r(Object.assign({},e,{tag:null}))})),{all:i}).style,this.module=n?new Mk(n):null,this.themeType=t.themeType}static define(e,t){return new MP(e,t||{})}}const PP=yw.define(),$P=yw.define({combine:e=>e.length?[e[0]]:null});function RP(e){let t=e.facet(PP);return t.length?t:e.facet($P)}function IP(e,t){let n,r=[NP];return e instanceof MP&&(e.module&&r.push(pT.styleModule.of(e.module)),n=e.themeType),(null==t?void 0:t.fallback)?r.push($P.of(e)):n?r.push(PP.computeN([pT.darkTheme],t=>t.facet(pT.darkTheme)==("dark"==n)?[e]:[])):r.push(PP.of(e)),r}class DP{constructor(e){this.markCache=Object.create(null),this.tree=IM(e.state),this.decorations=this.buildDeco(e,RP(e.state))}update(e){let t=IM(e.state),n=RP(e.state),r=n!=RP(e.startState);t.length{n.add(e,t,this.markCache[r]||(this.markCache[r]=FO.mark({class:r})))},r,i);return n.finish()}}const NP=$w.high(hE.fromClass(DP,{decorations:e=>e.decorations})),jP=MP.define([{tag:EM.meta,color:"#404740"},{tag:EM.link,textDecoration:"underline"},{tag:EM.heading,textDecoration:"underline",fontWeight:"bold"},{tag:EM.emphasis,fontStyle:"italic"},{tag:EM.strong,fontWeight:"bold"},{tag:EM.strikethrough,textDecoration:"line-through"},{tag:EM.keyword,color:"#708"},{tag:[EM.atom,EM.bool,EM.url,EM.contentSeparator,EM.labelName],color:"#219"},{tag:[EM.literal,EM.inserted],color:"#164"},{tag:[EM.string,EM.deleted],color:"#a11"},{tag:[EM.regexp,EM.escape,EM.special(EM.string)],color:"#e40"},{tag:EM.definition(EM.variableName),color:"#00f"},{tag:EM.local(EM.variableName),color:"#30a"},{tag:[EM.typeName,EM.namespace],color:"#085"},{tag:EM.className,color:"#167"},{tag:[EM.special(EM.variableName),EM.macroName],color:"#256"},{tag:EM.definition(EM.propertyName),color:"#00c"},{tag:EM.comment,color:"#940"},{tag:EM.invalid,color:"#f00"}]),LP=pT.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),BP=yw.define({combine:e=>lk(e,{afterCursor:!0,brackets:"()[]{}",maxScanDistance:1e4,renderMatch:UP})}),FP=FO.mark({class:"cm-matchingBracket"}),zP=FO.mark({class:"cm-nonmatchingBracket"});function UP(e){let t=[],n=e.matched?FP:zP;return t.push(n.range(e.start.from,e.start.to)),e.end&&t.push(n.range(e.end.from,e.end.to)),t}const QP=[Ew.define({create:()=>FO.none,update(e,t){if(!t.docChanged&&!t.selection)return e;let n=[],r=t.state.facet(BP);for(let e of t.state.selection.ranges){if(!e.empty)continue;let i=WP(t.state,e.head,-1,r)||e.head>0&&WP(t.state,e.head-1,1,r)||r.afterCursor&&(WP(t.state,e.head,1,r)||e.headpT.decorations.from(e)}),LP];function qP(e={}){return[BP.of(e),QP]}const HP=new eM.c;function GP(e,t,n){let r=e.prop(t<0?eM.c.openedBy:eM.c.closedBy);if(r)return r;if(1==e.name.length){let r=n.indexOf(e.name);if(r>-1&&r%2==(t<0?1:0))return[n[r+t]]}return null}function VP(e){let t=e.type.prop(HP);return t?t(e.node):e}function WP(e,t,n,r={}){let i=r.maxScanDistance||1e4,o=r.brackets||"()[]{}",s=IM(e),a=s.resolveInner(t,n);for(let r=a;r;r=r.parent){let i=GP(r.type,n,o);if(i&&r.from0?t>=s.from&&ts.from&&t<=s.to))return XP(e,t,n,r,s,i,o)}}return function(e,t,n,r,i,o,s){let a=n<0?e.sliceDoc(t-1,t):e.sliceDoc(t,t+1),l=s.indexOf(a);if(l<0||l%2==0!=n>0)return null;let c={from:n<0?t-1:t,to:n>0?t+1:t},u=e.doc.iterRange(t,n>0?e.doc.length:0),d=0;for(let e=0;!u.next().done&&e<=o;){let o=u.value;n<0&&(e+=o.length);let a=t+e*n;for(let e=n>0?0:o.length-1,t=n>0?o.length:-1;e!=t;e+=n){let t=s.indexOf(o[e]);if(!(t<0||r.resolveInner(a+e,1).type!=i))if(t%2==0==n>0)d++;else{if(1==d)return{start:c,end:{from:a+e,to:a+e+1},matched:t>>1==l>>1};d--}}n>0&&(e+=o.length)}return u.done?{start:c,matched:!1}:null}(e,t,n,s,a.type,i,o)}function XP(e,t,n,r,i,o,s){let a=r.parent,l={from:i.from,to:i.to},c=0,u=null==a?void 0:a.cursor();if(u&&(n<0?u.childBefore(r.from):u.childAfter(r.to)))do{if(n<0?u.to<=r.from:u.from>=r.to){if(0==c&&o.indexOf(u.type.name)>-1&&u.from-1||(JP.push(e),console.warn(t))}function t$(e,t){let n=null;for(let r of t.split(".")){let t=e[r]||EM[r];t?"function"==typeof t?n?n=t(n):e$(r,`Modifier ${r} used at start of tag`):n?e$(r,`Tag ${r} used as modifier`):n=t:e$(r,"Unknown highlighting tag "+r)}if(!n)return 0;let r=t.replace(/ /g,"_"),i=eM.e.define({id:ZP.length,name:r,props:[oM({[r]:n})]});return ZP.push(i),i.id}function n$(e,t){return({state:n,dispatch:r})=>{if(n.readOnly)return!1;let i=e(t,n);return!!i&&(r(n.update(i)),!0)}}const r$=n$(l$,0),i$=n$(a$,0),o$=n$((e,t)=>a$(e,t,function(e){let t=[];for(let n of e.selection.ranges){let r=e.doc.lineAt(n.from),i=n.to<=r.to?r:e.doc.lineAt(n.to),o=t.length-1;o>=0&&t[o].to>r.from?t[o].to=i.to:t.push({from:r.from+/^\s*/.exec(r.text)[0].length,to:i.to})}return t}(t)),0);function s$(e,t){let n=e.languageDataAt("commentTokens",t);return n.length?n[0]:{}}function a$(e,t,n=t.selection.ranges){let r=n.map(e=>s$(t,e.from).block);if(!r.every(e=>e))return null;let i=n.map((e,n)=>function(e,{open:t,close:n},r,i){let o,s,a=e.sliceDoc(r-50,r),l=e.sliceDoc(i,i+50),c=/\s*$/.exec(a)[0].length,u=/^\s*/.exec(l)[0].length,d=a.length-c;if(a.slice(d-t.length,d)==t&&l.slice(u,u+n.length)==n)return{open:{pos:r-c,margin:c&&1},close:{pos:i+u,margin:u&&1}};i-r<=100?o=s=e.sliceDoc(r,i):(o=e.sliceDoc(r,r+50),s=e.sliceDoc(i-50,i));let h=/^\s*/.exec(o)[0].length,p=/\s*$/.exec(s)[0].length,f=s.length-p-n.length;return o.slice(h,h+t.length)==t&&s.slice(f,f+n.length)==n?{open:{pos:r+h+t.length,margin:/\s/.test(o.charAt(h+t.length))?1:0},close:{pos:i-p-n.length,margin:/\s/.test(s.charAt(f-1))?1:0}}:null}(t,r[n],e.from,e.to));if(2!=e&&!i.every(e=>e))return{changes:t.changes(n.map((e,t)=>i[t]?[]:[{from:e.from,insert:r[t].open+" "},{from:e.to,insert:" "+r[t].close}]))};if(1!=e&&i.some(e=>e)){let e=[];for(let t,n=0;ni&&(e==o||o>l.from)){i=l.from;let e=/^\s*/.exec(l.text)[0].length,t=e==l.length,n=l.text.slice(e,e+a.length)==a?e:-1;ee.comment<0&&(!e.empty||e.single))){let e=[];for(let{line:t,token:n,indent:i,empty:o,single:s}of r)!s&&o||e.push({from:t.from+i,insert:n+" "});let n=t.changes(e);return{changes:n,selection:t.selection.map(n,1)}}if(1!=e&&r.some(e=>e.comment>=0)){let e=[];for(let{line:t,comment:n,token:i}of r)if(n>=0){let r=t.from+n,o=r+i.length;" "==t.text[o-t.from]&&o++,e.push({from:r,to:o})}return{changes:e}}return null}const c$=Gw.define(),u$=Gw.define(),d$=yw.define(),h$=yw.define({combine:e=>lk(e,{minDepth:100,newGroupDelay:500,joinToEvent:(e,t)=>t},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,t)=>(n,r)=>e(n,r)||t(n,r)})});const p$=Ew.define({create:()=>C$.empty,update(e,t){let n=t.state.facet(h$),r=t.annotation(c$);if(r){let i=t.docChanged?gw.single(function(e){let t=0;return e.iterChangedRanges((e,n)=>t=n),t}(t.changes)):void 0,o=_$.fromTransaction(t,i),s=r.side,a=0==s?e.undone:e.done;return a=o?S$(a,a.length,n.minDepth,o):k$(a,t.startState.selection),new C$(0==s?r.rest:a,0==s?a:r.rest)}let i=t.annotation(u$);if("full"!=i&&"before"!=i||(e=e.isolate()),!1===t.annotation(Yw.addToHistory))return t.changes.empty?e:e.addMapping(t.changes.desc);let o=_$.fromTransaction(t),s=t.annotation(Yw.time),a=t.annotation(Yw.userEvent);return o?e=e.addChanges(o,s,a,n,t):t.selection&&(e=e.addSelection(t.startState.selection,s,a,n.newGroupDelay)),"full"!=i&&"after"!=i||(e=e.isolate()),e},toJSON:e=>({done:e.done.map(e=>e.toJSON()),undone:e.undone.map(e=>e.toJSON())}),fromJSON:e=>new C$(e.done.map(_$.fromJSON),e.undone.map(_$.fromJSON))});function f$(e={}){return[p$,h$.of(e),pT.domEventHandlers({beforeinput(e,t){let n="historyUndo"==e.inputType?g$:"historyRedo"==e.inputType?b$:null;return!!n&&(e.preventDefault(),n(t))}})]}function m$(e,t){return function({state:n,dispatch:r}){if(!t&&n.readOnly)return!1;let i=n.field(p$,!1);if(!i)return!1;let o=i.pop(e,n,t);return!!o&&(r(o),!0)}}const g$=m$(0,!1),b$=m$(1,!1),v$=m$(0,!0),y$=m$(1,!0);class _${constructor(e,t,n,r,i){this.changes=e,this.effects=t,this.mapped=n,this.startSelection=r,this.selectionsAfter=i}setSelAfter(e){return new _$(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,t,n;return{changes:null===(e=this.changes)||void 0===e?void 0:e.toJSON(),mapped:null===(t=this.mapped)||void 0===t?void 0:t.toJSON(),startSelection:null===(n=this.startSelection)||void 0===n?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map(e=>e.toJSON())}}static fromJSON(e){return new _$(e.changes&&lw.fromJSON(e.changes),[],e.mapped&&aw.fromJSON(e.mapped),e.startSelection&&gw.fromJSON(e.startSelection),e.selectionsAfter.map(gw.fromJSON))}static fromTransaction(e,t){let n=w$;for(let t of e.startState.facet(d$)){let r=t(e);r.length&&(n=n.concat(r))}return!n.length&&e.changes.empty?null:new _$(e.changes.invert(e.startState.doc),n,void 0,t||e.startState.selection,w$)}static selection(e){return new _$(void 0,w$,void 0,void 0,e)}}function S$(e,t,n,r){let i=t+1>n+20?t-n-1:0,o=e.slice(i,t);return o.push(r),o}function x$(e,t){return e.length?t.length?e.concat(t):e:t}const w$=[];function k$(e,t){if(e.length){let n=e[e.length-1],r=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-200));return r.length&&r[r.length-1].eq(t)?e:(r.push(t),S$(e,e.length-1,1e9,n.setSelAfter(r)))}return[_$.selection([t])]}function O$(e){let t=e[e.length-1],n=e.slice();return n[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),n}function E$(e,t){if(!e.length)return e;let n=e.length,r=w$;for(;n;){let i=A$(e[n-1],t,r);if(i.changes&&!i.changes.empty||i.effects.length){let t=e.slice(0,n);return t[n-1]=i,t}t=i.mapped,n--,r=i.selectionsAfter}return r.length?[_$.selection(r)]:w$}function A$(e,t,n){let r=x$(e.selectionsAfter.length?e.selectionsAfter.map(e=>e.map(t)):w$,n);if(!e.changes)return _$.selection(r);let i=e.changes.map(t),o=t.mapDesc(e.changes,!0),s=e.mapped?e.mapped.composeDesc(o):o;return new _$(i,Xw.mapEffects(e.effects,t),s,e.startSelection.map(o),r)}const T$=/^(input\.type|delete)($|\.)/;class C${constructor(e,t,n=0,r){this.done=e,this.undone=t,this.prevTime=n,this.prevUserEvent=r}isolate(){return this.prevTime?new C$(this.done,this.undone):this}addChanges(e,t,n,r,i){let o=this.done,s=o[o.length-1];return o=s&&s.changes&&!s.changes.empty&&e.changes&&(!n||T$.test(n))&&(!s.selectionsAfter.length&&t-this.prevTimen.push(e,t)),t.iterChangedRanges((e,t,i,o)=>{for(let e=0;e=t&&i<=s&&(r=!0)}}),r}(s.changes,e.changes))||"input.type.compose"==n)?S$(o,o.length-1,r.minDepth,new _$(e.changes.compose(s.changes),x$(e.effects,s.effects),s.mapped,s.startSelection,w$)):S$(o,o.length,r.minDepth,e),new C$(o,w$,t,n)}addSelection(e,t,n,r){let i=this.done.length?this.done[this.done.length-1].selectionsAfter:w$;return i.length>0&&t-this.prevTimee.empty!=s.ranges[t].empty).length)?this:new C$(k$(this.done,e),this.undone,t,n);var o,s}addMapping(e){return new C$(E$(this.done,e),E$(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,t,n){let r=0==e?this.done:this.undone;if(0==r.length)return null;let i=r[r.length-1];if(n&&i.selectionsAfter.length)return t.update({selection:i.selectionsAfter[i.selectionsAfter.length-1],annotations:c$.of({side:e,rest:O$(r)}),userEvent:0==e?"select.undo":"select.redo",scrollIntoView:!0});if(i.changes){let n=1==r.length?w$:r.slice(0,r.length-1);return i.mapped&&(n=E$(n,i.mapped)),t.update({changes:i.changes,selection:i.startSelection,effects:i.effects,annotations:c$.of({side:e,rest:n}),filter:!1,userEvent:0==e?"undo":"redo",scrollIntoView:!0})}return null}}C$.empty=new C$(w$,w$);const M$=[{key:"Mod-z",run:g$,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:b$,preventDefault:!0},{linux:"Ctrl-Shift-z",run:b$,preventDefault:!0},{key:"Mod-u",run:v$,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:y$,preventDefault:!0}];function P$(e,t){return gw.create(e.ranges.map(t),e.mainIndex)}function $$(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function R$({state:e,dispatch:t},n){let r=P$(e.selection,n);return!r.eq(e.selection)&&(t($$(e,r)),!0)}function I$(e,t){return gw.cursor(t?e.to:e.from)}function D$(e,t){return R$(e,n=>n.empty?e.moveByChar(n,t):I$(n,t))}function N$(e){return e.textDirectionAt(e.state.selection.main.head)==xE.LTR}const j$=e=>D$(e,!N$(e)),L$=e=>D$(e,N$(e));function B$(e,t){return R$(e,n=>n.empty?e.moveByGroup(n,t):I$(n,t))}function F$(e,t,n){if(t.type.prop(n))return!0;let r=t.to-t.from;return r&&(r>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function z$(e,t,n){let r,i,o=IM(e).resolveInner(t.head),s=n?eM.c.closedBy:eM.c.openedBy;for(let r=t.head;;){let t=n?o.childAfter(r):o.childBefore(r);if(!t)break;F$(e,t,s)?o=t:r=n?t.to:t.from}return i=o.type.prop(s)&&(r=n?WP(e,o.from,1):WP(e,o.to,-1))&&r.matched?n?r.end.to:r.end.from:n?o.to:o.from,gw.cursor(i,n?-1:1)}function U$(e,t){return R$(e,n=>{if(!n.empty)return I$(n,t);let r=e.moveVertically(n,t);return r.head!=n.head?r:e.moveToLineBoundary(n,t)})}const Q$=e=>U$(e,!1),q$=e=>U$(e,!0);function H$(e){let t,n=e.scrollDOM.clientHeightn.empty?e.moveVertically(n,t,r.height):I$(n,t));if(o.eq(i.selection))return!1;if(r.selfScroll){let t=e.coordsAtPos(i.selection.main.head),s=e.scrollDOM.getBoundingClientRect(),a=s.top+r.marginTop,l=s.bottom-r.marginBottom;t&&t.top>a&&t.bottomG$(e,!1),W$=e=>G$(e,!0);function X$(e,t,n){let r=e.lineBlockAt(t.head),i=e.moveToLineBoundary(t,n);if(i.head==t.head&&i.head!=(n?r.to:r.from)&&(i=e.moveToLineBoundary(t,n,!1)),!n&&i.head==r.from&&r.length){let n=/^\s*/.exec(e.state.sliceDoc(r.from,Math.min(r.from+100,r.to)))[0].length;n&&t.head!=r.from+n&&(i=gw.cursor(r.from+n))}return i}function Y$(e,t,n){let r=!1,i=P$(e.selection,t=>{let i=WP(e,t.head,-1)||WP(e,t.head,1)||t.head>0&&WP(e,t.head-1,1)||t.head{let n=t(e);return gw.range(e.anchor,n.head,n.goalColumn,n.bidiLevel||void 0)});return!n.eq(e.state.selection)&&(e.dispatch($$(e.state,n)),!0)}function J$(e,t){return Z$(e,n=>e.moveByChar(n,t))}const K$=e=>J$(e,!N$(e)),eR=e=>J$(e,N$(e));function tR(e,t){return Z$(e,n=>e.moveByGroup(n,t))}function nR(e,t){return Z$(e,n=>e.moveVertically(n,t))}const rR=e=>nR(e,!1),iR=e=>nR(e,!0);function oR(e,t){return Z$(e,n=>e.moveVertically(n,t,H$(e).height))}const sR=e=>oR(e,!1),aR=e=>oR(e,!0),lR=({state:e,dispatch:t})=>(t($$(e,{anchor:0})),!0),cR=({state:e,dispatch:t})=>(t($$(e,{anchor:e.doc.length})),!0),uR=({state:e,dispatch:t})=>(t($$(e,{anchor:e.selection.main.anchor,head:0})),!0),dR=({state:e,dispatch:t})=>(t($$(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0);function hR(e,t){if(e.state.readOnly)return!1;let n="delete.selection",{state:r}=e,i=r.changeByRange(r=>{let{from:i,to:o}=r;if(i==o){let r=t(i);ri&&(n="delete.forward",r=pR(e,r,!0)),i=Math.min(i,r),o=Math.max(o,r)}else i=pR(e,i,!1),o=pR(e,o,!0);return i==o?{range:r}:{changes:{from:i,to:o},range:gw.cursor(i)}});return!i.changes.empty&&(e.dispatch(r.update(i,{scrollIntoView:!0,userEvent:n,effects:"delete.selection"==n?pT.announce.of(r.phrase("Selection deleted")):void 0})),!0)}function pR(e,t,n){if(e instanceof pT)for(let r of e.state.facet(pT.atomicRanges).map(t=>t(e)))r.between(t,t,(e,r)=>{et&&(t=n?r:e)});return t}const fR=(e,t)=>hR(e,n=>{let r,i,{state:o}=e,s=o.doc.lineAt(n);if(!t&&n>s.from&&nfR(e,!1),gR=e=>fR(e,!0),bR=(e,t)=>hR(e,n=>{let r=n,{state:i}=e,o=i.doc.lineAt(r),s=i.charCategorizer(r);for(let e=null;;){if(r==(t?o.to:o.from)){r==n&&o.number!=(t?i.doc.lines:1)&&(r+=t?1:-1);break}let a=Zx(o.text,r-o.from,t)+o.from,l=o.text.slice(Math.min(r,a)-o.from,Math.max(r,a)-o.from),c=s(l);if(null!=e&&c!=e)break;" "==l&&r==n||(e=c),r=a}return r}),vR=e=>bR(e,!1),yR=e=>hR(e,t=>{let n=e.lineBlockAt(t).to;return t=i.number){let e=t[t.length-1];e.to=o.to,e.ranges.push(r)}else t.push({from:i.from,to:o.to,ranges:[r]});n=o.number+1}return t}function SR(e,t,n){if(e.readOnly)return!1;let r=[],i=[];for(let t of _R(e)){if(n?t.to==e.doc.length:0==t.from)continue;let o=e.doc.lineAt(n?t.to+1:t.from-1),s=o.length+1;if(n){r.push({from:t.to,to:o.to},{from:t.from,insert:o.text+e.lineBreak});for(let n of t.ranges)i.push(gw.range(Math.min(e.doc.length,n.anchor+s),Math.min(e.doc.length,n.head+s)))}else{r.push({from:o.from,to:t.from},{from:t.to,insert:e.lineBreak+o.text});for(let e of t.ranges)i.push(gw.range(e.anchor-s,e.head-s))}}return!!r.length&&(t(e.update({changes:r,scrollIntoView:!0,selection:gw.create(i,e.selection.mainIndex),userEvent:"move.line"})),!0)}function xR(e,t,n){if(e.readOnly)return!1;let r=[];for(let t of _R(e))n?r.push({from:t.from,insert:e.doc.slice(t.from,t.to)+e.lineBreak}):r.push({from:t.to,insert:e.lineBreak+e.doc.slice(t.from,t.to)});return t(e.update({changes:r,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const wR=kR(!1);function kR(e){return({state:t,dispatch:n})=>{if(t.readOnly)return!1;let r=t.changeByRange(n=>{let{from:r,to:i}=n,o=t.doc.lineAt(r),s=!e&&r==i&&function(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let n,r=IM(e).resolveInner(t),i=r.childBefore(t),o=r.childAfter(t);return i&&o&&i.to<=t&&o.from>=t&&(n=i.type.prop(eM.c.closedBy))&&n.indexOf(o.name)>-1&&e.doc.lineAt(i.to).from==e.doc.lineAt(o.from).from?{from:i.to,to:o.from}:null}(t,r);e&&(r=i=(i<=o.to?o:t.doc.lineAt(i)).to);let a=new YM(t,{simulateBreak:r,simulateDoubleBreak:!!s}),l=XM(a,r);for(null==l&&(l=/^\s*/.exec(t.doc.lineAt(r).text)[0].length);io.from&&r{let i=[];for(let o=r.from;o<=r.to;){let s=e.doc.lineAt(o);s.number>n&&(r.empty||r.to>s.from)&&(t(s,i,r),n=s.number),o=s.to+1}let o=e.changes(i);return{changes:i,range:gw.range(o.mapPos(r.anchor,1),o.mapPos(r.head,1))}})}const ER=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(OR(e,(t,n)=>{n.push({from:t.from,insert:e.facet(GM)})}),{userEvent:"input.indent"})),!0),AR=({state:e,dispatch:t})=>!e.readOnly&&(t(e.update(OR(e,(t,n)=>{let r=/^\s*/.exec(t.text)[0];if(!r)return;let i=Ok(r,e.tabSize),o=0,s=WM(e,Math.max(0,i-VM(e)));for(;oR$(e,t=>z$(e.state,t,!N$(e))),shift:e=>Z$(e,t=>z$(e.state,t,!N$(e)))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:e=>R$(e,t=>z$(e.state,t,N$(e))),shift:e=>Z$(e,t=>z$(e.state,t,N$(e)))},{key:"Alt-ArrowUp",run:({state:e,dispatch:t})=>SR(e,t,!1)},{key:"Shift-Alt-ArrowUp",run:({state:e,dispatch:t})=>xR(e,t,!1)},{key:"Alt-ArrowDown",run:({state:e,dispatch:t})=>SR(e,t,!0)},{key:"Shift-Alt-ArrowDown",run:({state:e,dispatch:t})=>xR(e,t,!0)},{key:"Escape",run:({state:e,dispatch:t})=>{let n=e.selection,r=null;return n.ranges.length>1?r=gw.create([n.main]):n.main.empty||(r=gw.create([gw.cursor(n.main.head)])),!!r&&(t($$(e,r)),!0)}},{key:"Mod-Enter",run:kR(!0)},{key:"Alt-l",mac:"Ctrl-l",run:({state:e,dispatch:t})=>{let n=_R(e).map(({from:t,to:n})=>gw.range(t,Math.min(n+1,e.doc.length)));return t(e.update({selection:gw.create(n),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:e,dispatch:t})=>{let n=P$(e.selection,t=>{var n;let r=IM(e).resolveInner(t.head,1);for(;!(r.from=t.to||r.to>t.to&&r.from<=t.from)&&(null===(n=r.parent)||void 0===n?void 0:n.parent);)r=r.parent;return gw.range(r.to,r.from)});return t($$(e,n)),!0},preventDefault:!0},{key:"Mod-[",run:AR},{key:"Mod-]",run:ER},{key:"Mod-Alt-\\",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=Object.create(null),r=new YM(e,{overrideIndentation:e=>{let t=n[e];return null==t?-1:t}}),i=OR(e,(t,i,o)=>{let s=XM(r,t.from);if(null==s)return;/\S/.test(t.text)||(s=0);let a=/^\s*/.exec(t.text)[0],l=WM(e,s);(a!=l||o.from{if(e.state.readOnly)return!1;let{state:t}=e,n=t.changes(_R(t).map(({from:e,to:n})=>(e>0?e--:ne.moveVertically(t,!0)).map(n);return e.dispatch({changes:n,selection:r,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:e,dispatch:t})=>Y$(e,t,!1)},{key:"Mod-/",run:e=>{let{state:t}=e,n=t.doc.lineAt(t.selection.main.from),r=s$(e.state,n.from);return r.line?r$(e):!!r.block&&o$(e)}},{key:"Alt-A",run:i$}].concat([{key:"ArrowLeft",run:j$,shift:K$,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:e=>B$(e,!N$(e)),shift:e=>tR(e,!N$(e)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:e=>R$(e,t=>X$(e,t,!N$(e))),shift:e=>Z$(e,t=>X$(e,t,!N$(e))),preventDefault:!0},{key:"ArrowRight",run:L$,shift:eR,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:e=>B$(e,N$(e)),shift:e=>tR(e,N$(e)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:e=>R$(e,t=>X$(e,t,N$(e))),shift:e=>Z$(e,t=>X$(e,t,N$(e))),preventDefault:!0},{key:"ArrowUp",run:Q$,shift:rR,preventDefault:!0},{mac:"Cmd-ArrowUp",run:lR,shift:uR},{mac:"Ctrl-ArrowUp",run:V$,shift:sR},{key:"ArrowDown",run:q$,shift:iR,preventDefault:!0},{mac:"Cmd-ArrowDown",run:cR,shift:dR},{mac:"Ctrl-ArrowDown",run:W$,shift:aR},{key:"PageUp",run:V$,shift:sR},{key:"PageDown",run:W$,shift:aR},{key:"Home",run:e=>R$(e,t=>X$(e,t,!1)),shift:e=>Z$(e,t=>X$(e,t,!1)),preventDefault:!0},{key:"Mod-Home",run:lR,shift:uR},{key:"End",run:e=>R$(e,t=>X$(e,t,!0)),shift:e=>Z$(e,t=>X$(e,t,!0)),preventDefault:!0},{key:"Mod-End",run:cR,shift:dR},{key:"Enter",run:wR},{key:"Mod-a",run:({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:mR,shift:mR},{key:"Delete",run:gR},{key:"Mod-Backspace",mac:"Alt-Backspace",run:vR},{key:"Mod-Delete",mac:"Alt-Delete",run:e=>bR(e,!0)},{mac:"Mod-Backspace",run:e=>hR(e,t=>{let n=e.lineBlockAt(t).from;return t>n?n:Math.max(0,t-1)})},{mac:"Mod-Delete",run:yR}].concat([{key:"Ctrl-b",run:j$,shift:K$,preventDefault:!0},{key:"Ctrl-f",run:L$,shift:eR},{key:"Ctrl-p",run:Q$,shift:rR},{key:"Ctrl-n",run:q$,shift:iR},{key:"Ctrl-a",run:e=>R$(e,t=>gw.cursor(e.lineBlockAt(t.head).from,1)),shift:e=>Z$(e,t=>gw.cursor(e.lineBlockAt(t.head).from))},{key:"Ctrl-e",run:e=>R$(e,t=>gw.cursor(e.lineBlockAt(t.head).to,-1)),shift:e=>Z$(e,t=>gw.cursor(e.lineBlockAt(t.head).to))},{key:"Ctrl-d",run:gR},{key:"Ctrl-h",run:mR},{key:"Ctrl-k",run:yR},{key:"Ctrl-Alt-h",run:vR},{key:"Ctrl-o",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:Bx.of(["",""])},range:gw.cursor(e.from)}));return t(e.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=e.changeByRange(t=>{if(!t.empty||0==t.from||t.from==e.doc.length)return{range:t};let n=t.from,r=e.doc.lineAt(n),i=n==r.from?n-1:Zx(r.text,n-r.from,!1)+r.from,o=n==r.to?n+1:Zx(r.text,n-r.from,!0)+r.from;return{changes:{from:i,to:o,insert:e.doc.slice(n,o).append(e.doc.slice(i,n))},range:gw.cursor(o)}});return!n.changes.empty&&(t(e.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:W$}].map(e=>({mac:e.key,run:e.run,shift:e.shift})))),CR={key:"Tab",run:ER,shift:AR};function MR(){var e=arguments[0];"string"==typeof e&&(e=document.createElement(e));var t=1,n=arguments[1];if(n&&"object"==typeof n&&null==n.nodeType&&!Array.isArray(n)){for(var r in n)if(Object.prototype.hasOwnProperty.call(n,r)){var i=n[r];"string"==typeof i?e.setAttribute(r,i):null!=i&&(e[r]=i)}t++}for(;te.normalize("NFKD"):e=>e;class RR{constructor(e,t,n=0,r=e.length,i,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(n,r),this.bufferStart=n,this.normalize=i?e=>i($R(e)):$R,this.query=this.normalize(t)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return nw(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let t=rw(e),n=this.bufferStart+this.bufferPos;this.bufferPos+=iw(e);let r=this.normalize(t);for(let e=0,i=n;;e++){let o=r.charCodeAt(e),s=this.match(o,i);if(s)return this.value=s,this;if(e==r.length-1)break;i==n&&ethis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let t=this.matchPos<=this.to&&this.re.exec(this.curLine);if(t){let n=this.curLineStart+t.index,r=n+t[0].length;if(this.matchPos=FR(this.text,r+(n==r?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(nthis.value.to)&&(!this.test||this.test(n,r,t)))return this.value={from:n,to:r,match:t},this;e=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length=n||r.to<=t){let r=new LR(t,e.sliceString(t,n));return jR.set(e,r),r}if(r.from==t&&r.to==n)return r;let{text:i,from:o}=r;return o>t&&(i=e.sliceString(t,o)+i,o=t),r.to=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,t=this.re.exec(this.flat.text);if(t&&!t[0]&&t.index==e&&(this.re.lastIndex=e+1,t=this.re.exec(this.flat.text)),t){let e=this.flat.from+t.index,n=e+t[0].length;if((this.flat.to>=this.to||t.index+t[0].length<=this.flat.text.length-10)&&(!this.test||this.test(e,n,t)))return this.value={from:e,to:n,match:t},this.matchPos=FR(this.text,n+(e==n?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=LR.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function FR(e,t){if(t>=e.length)return t;let n,r=e.lineAt(t);for(;t=56320&&n<57344;)t++;return t}function zR(e){let t=MR("input",{class:"cm-textfield",name:"line"});function n(){let n=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.value);if(!n)return;let{state:r}=e,i=r.doc.lineAt(r.selection.main.head),[,o,s,a,l]=n,c=a?+a.slice(1):0,u=s?+s:i.number;if(s&&l){let e=u/100;o&&(e=e*("-"==o?-1:1)+i.number/r.doc.lines),u=Math.round(r.doc.lines*e)}else s&&o&&(u=u*("-"==o?-1:1)+i.number);let d=r.doc.line(Math.max(1,Math.min(r.doc.lines,u)));e.dispatch({effects:UR.of(!1),selection:gw.cursor(d.from+Math.max(0,Math.min(c,d.length))),scrollIntoView:!0}),e.focus()}return{dom:MR("form",{class:"cm-gotoLine",onkeydown:t=>{27==t.keyCode?(t.preventDefault(),e.dispatch({effects:UR.of(!1)}),e.focus()):13==t.keyCode&&(t.preventDefault(),n())},onsubmit:e=>{e.preventDefault(),n()}},MR("label",e.state.phrase("Go to line"),": ",t)," ",MR("button",{class:"cm-button",type:"submit"},e.state.phrase("go")))}}"undefined"!=typeof Symbol&&(NR.prototype[Symbol.iterator]=BR.prototype[Symbol.iterator]=function(){return this});const UR=Xw.define(),QR=Ew.define({create:()=>!0,update(e,t){for(let n of t.effects)n.is(UR)&&(e=n.value);return e},provide:e=>PC.from(e,e=>e?zR:null)}),qR=pT.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}}),HR={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},GR=yw.define({combine:e=>lk(e,HR,{highlightWordAroundCursor:(e,t)=>e||t,minSelectionLength:Math.min,maxMatches:Math.min})});function VR(e){let t=[JR,ZR];return e&&t.push(GR.of(e)),t}const WR=FO.mark({class:"cm-selectionMatch"}),XR=FO.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function YR(e,t,n,r){return!(0!=n&&e(t.sliceDoc(n-1,n))==rk.Word||r!=t.doc.length&&e(t.sliceDoc(r,r+1))==rk.Word)}const ZR=hE.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet(GR),{state:n}=e,r=n.selection;if(r.ranges.length>1)return FO.none;let i,o=r.main,s=null;if(o.empty){if(!t.highlightWordAroundCursor)return FO.none;let e=n.wordAt(o.head);if(!e)return FO.none;s=n.charCategorizer(o.head),i=n.sliceDoc(e.from,e.to)}else{let e=o.to-o.from;if(e200)return FO.none;if(t.wholeWords){if(i=n.sliceDoc(o.from,o.to),s=n.charCategorizer(o.head),!YR(s,n,o.from,o.to)||!function(e,t,n,r){return e(t.sliceDoc(n,n+1))==rk.Word&&e(t.sliceDoc(r-1,r))==rk.Word}(s,n,o.from,o.to))return FO.none}else if(i=n.sliceDoc(o.from,o.to).trim(),!i)return FO.none}let a=[];for(let r of e.visibleRanges){let e=new RR(n.doc,i,r.from,r.to);for(;!e.next().done;){let{from:r,to:i}=e.value;if((!s||YR(s,n,r,i))&&(o.empty&&r<=o.from&&i>=o.to?a.push(XR.range(r,i)):(r>=o.to||i<=o.from)&&a.push(WR.range(r,i)),a.length>t.maxMatches))return FO.none}}return FO.set(a)}},{decorations:e=>e.decorations}),JR=pT.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}});const KR=yw.define({combine:e=>lk(e,{top:!1,caseSensitive:!1,literal:!1,wholeWord:!1,createPanel:e=>new TI(e),scrollToMatch:e=>pT.scrollIntoView(e)})});class eI{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||function(e){try{return new RegExp(e,DR),!0}catch(e){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(e,t)=>"n"==t?"\n":"r"==t?"\r":"t"==t?"\t":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new aI(this):new rI(this)}getCursor(e,t=0,n){let r=e.doc?e:ak.create({doc:e});return null==n&&(n=r.doc.length),this.regexp?iI(this,r,t,n):nI(this,r,t,n)}}class tI{constructor(e){this.spec=e}}function nI(e,t,n,r){return new RR(t.doc,e.unquoted,n,r,e.caseSensitive?void 0:e=>e.toLowerCase(),e.wholeWord?(i=t.doc,o=t.charCategorizer(t.selection.main.head),(e,t,n,r)=>((r>e||r+n.length=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=nI(this.spec,e,Math.max(0,t-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}}function iI(e,t,n,r){return new NR(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?(i=t.charCategorizer(t.selection.main.head),(e,t,n)=>!n[0].length||(i(oI(n.input,n.index))!=rk.Word||i(sI(n.input,n.index))!=rk.Word)&&(i(sI(n.input,n.index+n[0].length))!=rk.Word||i(oI(n.input,n.index+n[0].length))!=rk.Word)):void 0},n,r);var i}function oI(e,t){return e.slice(Zx(e,t,!1),t)}function sI(e,t){return e.slice(t,Zx(e,t))}class aI extends tI{nextMatch(e,t,n){let r=iI(this.spec,e,n,e.doc.length).next();return r.done&&(r=iI(this.spec,e,0,t).next()),r.done?null:r.value}prevMatchInRange(e,t,n){for(let r=1;;r++){let i=Math.max(t,n-1e4*r),o=iI(this.spec,e,i,n),s=null;for(;!o.next().done;)s=o.value;if(s&&(i==t||s.from>i+10))return s;if(i==t)return null}}prevMatch(e,t,n){return this.prevMatchInRange(e,0,t)||this.prevMatchInRange(e,n,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g,(t,n)=>"$"==n?"$":"&"==n?e.match[0]:"0"!=n&&+n=t)return null;r.push(n.value)}return r}highlight(e,t,n,r){let i=iI(this.spec,e,Math.max(0,t-250),Math.min(n+250,e.doc.length));for(;!i.next().done;)r(i.value.from,i.value.to)}}const lI=Xw.define(),cI=Xw.define(),uI=Ew.define({create:e=>new dI(xI(e).create(),null),update(e,t){for(let n of t.effects)n.is(lI)?e=new dI(n.value.create(),e.panel):n.is(cI)&&(e=new dI(e.query,n.value?SI:null));return e},provide:e=>PC.from(e,e=>e.panel)});class dI{constructor(e,t){this.query=e,this.panel=t}}const hI=FO.mark({class:"cm-searchMatch"}),pI=FO.mark({class:"cm-searchMatch cm-searchMatch-selected"}),fI=hE.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(uI))}update(e){let t=e.state.field(uI);(t!=e.startState.field(uI)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return FO.none;let{view:n}=this,r=new fk;for(let t=0,i=n.visibleRanges,o=i.length;ti[t+1].from-500;)a=i[++t].to;e.highlight(n.state,s,a,(e,t)=>{let i=n.state.selection.ranges.some(n=>n.from==e&&n.to==t);r.add(e,t,i?pI:hI)})}return r.finish()}},{decorations:e=>e.decorations});function mI(e){return t=>{let n=t.state.field(uI,!1);return n&&n.query.spec.valid?e(t,n):OI(t)}}const gI=mI((e,{query:t})=>{let{to:n}=e.state.selection.main,r=t.nextMatch(e.state,n,n);if(!r)return!1;let i=gw.single(r.from,r.to),o=e.state.facet(KR);return e.dispatch({selection:i,effects:[PI(e,r),o.scrollToMatch(i.main,e)],userEvent:"select.search"}),kI(e),!0}),bI=mI((e,{query:t})=>{let{state:n}=e,{from:r}=n.selection.main,i=t.prevMatch(n,r,r);if(!i)return!1;let o=gw.single(i.from,i.to),s=e.state.facet(KR);return e.dispatch({selection:o,effects:[PI(e,i),s.scrollToMatch(o.main,e)],userEvent:"select.search"}),kI(e),!0}),vI=mI((e,{query:t})=>{let n=t.matchAll(e.state,1e3);return!(!n||!n.length)&&(e.dispatch({selection:gw.create(n.map(e=>gw.range(e.from,e.to))),userEvent:"select.search.matches"}),!0)}),yI=mI((e,{query:t})=>{let{state:n}=e,{from:r,to:i}=n.selection.main;if(n.readOnly)return!1;let o=t.nextMatch(n,r,r);if(!o)return!1;let s,a,l=[],c=[];if(o.from==r&&o.to==i&&(a=n.toText(t.getReplacement(o)),l.push({from:o.from,to:o.to,insert:a}),o=t.nextMatch(n,o.from,o.to),c.push(pT.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(r).number)+"."))),o){let t=0==l.length||l[0].from>=o.to?0:o.to-o.from-a.length;s=gw.single(o.from-t,o.to-t),c.push(PI(e,o)),c.push(n.facet(KR).scrollToMatch(s.main,e))}return e.dispatch({changes:l,selection:s,effects:c,userEvent:"input.replace"}),!0}),_I=mI((e,{query:t})=>{if(e.state.readOnly)return!1;let n=t.matchAll(e.state,1e9).map(e=>{let{from:n,to:r}=e;return{from:n,to:r,insert:t.getReplacement(e)}});if(!n.length)return!1;let r=e.state.phrase("replaced $ matches",n.length)+".";return e.dispatch({changes:n,effects:pT.announce.of(r),userEvent:"input.replace.all"}),!0});function SI(e){return e.state.facet(KR).createPanel(e)}function xI(e,t){var n,r,i,o;let s=e.selection.main,a=s.empty||s.to>s.from+100?"":e.sliceDoc(s.from,s.to);if(t&&!a)return t;let l=e.facet(KR);return new eI({search:(null!==(n=null==t?void 0:t.literal)&&void 0!==n?n:l.literal)?a:a.replace(/\n/g,"\\n"),caseSensitive:null!==(r=null==t?void 0:t.caseSensitive)&&void 0!==r?r:l.caseSensitive,literal:null!==(i=null==t?void 0:t.literal)&&void 0!==i?i:l.literal,wholeWord:null!==(o=null==t?void 0:t.wholeWord)&&void 0!==o?o:l.wholeWord})}function wI(e){let t=AC(e,SI);return t&&t.dom.querySelector("[main-field]")}function kI(e){let t=wI(e);t&&t==e.root.activeElement&&t.select()}const OI=e=>{let t=e.state.field(uI,!1);if(t&&t.panel){let n=wI(e);if(n&&n!=e.root.activeElement){let r=xI(e.state,t.query.spec);r.valid&&e.dispatch({effects:lI.of(r)}),n.focus(),n.select()}}else e.dispatch({effects:[cI.of(!0),t?lI.of(xI(e.state,t.query.spec)):Xw.appendConfig.of(RI)]});return!0},EI=e=>{let t=e.state.field(uI,!1);if(!t||!t.panel)return!1;let n=AC(e,SI);return n&&n.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:cI.of(!1)}),!0},AI=[{key:"Mod-f",run:OI,scope:"editor search-panel"},{key:"F3",run:gI,shift:bI,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:gI,shift:bI,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:EI,scope:"editor search-panel"},{key:"Mod-Shift-l",run:({state:e,dispatch:t})=>{let n=e.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:r,to:i}=n.main,o=[],s=0;for(let t=new RR(e.doc,e.sliceDoc(r,i));!t.next().done;){if(o.length>1e3)return!1;t.value.from==r&&(s=o.length),o.push(gw.range(t.value.from,t.value.to))}return t(e.update({selection:gw.create(o,s),userEvent:"select.search.matches"})),!0}},{key:"Alt-g",run:e=>{let t=AC(e,zR);if(!t){let n=[UR.of(!0)];null==e.state.field(QR,!1)&&n.push(Xw.appendConfig.of([QR,qR])),e.dispatch({effects:n}),t=AC(e,zR)}return t&&t.dom.querySelector("input").focus(),!0}},{key:"Mod-d",run:({state:e,dispatch:t})=>{let{ranges:n}=e.selection;if(n.some(e=>e.from===e.to))return(({state:e,dispatch:t})=>{let{selection:n}=e,r=gw.create(n.ranges.map(t=>e.wordAt(t.head)||gw.cursor(t.head)),n.mainIndex);return!r.eq(n)&&(t(e.update({selection:r})),!0)})({state:e,dispatch:t});let r=e.sliceDoc(n[0].from,n[0].to);if(e.selection.ranges.some(t=>e.sliceDoc(t.from,t.to)!=r))return!1;let i=function(e,t){let{main:n,ranges:r}=e.selection,i=e.wordAt(n.head),o=i&&i.from==n.from&&i.to==n.to;for(let n=!1,i=new RR(e.doc,t,r[r.length-1].to);;){if(i.next(),!i.done){if(n&&r.some(e=>e.from==i.value.from))continue;if(o){let t=e.wordAt(i.value.from);if(!t||t.from!=i.value.from||t.to!=i.value.to)continue}return i.value}if(n)return null;i=new RR(e.doc,t,0,Math.max(0,r[r.length-1].from-1)),n=!0}}(e,r);return!!i&&(t(e.update({selection:e.selection.addRange(gw.range(i.from,i.to),!1),effects:pT.scrollIntoView(i.to)})),!0)},preventDefault:!0}];class TI{constructor(e){this.view=e;let t=this.query=e.state.field(uI).query.spec;function n(e,t,n){return MR("button",{class:"cm-button",name:e,onclick:t,type:"button"},n)}this.commit=this.commit.bind(this),this.searchField=MR("input",{value:t.search,placeholder:CI(e,"Find"),"aria-label":CI(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=MR("input",{value:t.replace,placeholder:CI(e,"Replace"),"aria-label":CI(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=MR("input",{type:"checkbox",name:"case",form:"",checked:t.caseSensitive,onchange:this.commit}),this.reField=MR("input",{type:"checkbox",name:"re",form:"",checked:t.regexp,onchange:this.commit}),this.wordField=MR("input",{type:"checkbox",name:"word",form:"",checked:t.wholeWord,onchange:this.commit}),this.dom=MR("div",{onkeydown:e=>this.keydown(e),class:"cm-search"},[this.searchField,n("next",()=>gI(e),[CI(e,"next")]),n("prev",()=>bI(e),[CI(e,"previous")]),n("select",()=>vI(e),[CI(e,"all")]),MR("label",null,[this.caseField,CI(e,"match case")]),MR("label",null,[this.reField,CI(e,"regexp")]),MR("label",null,[this.wordField,CI(e,"by word")]),...e.state.readOnly?[]:[MR("br"),this.replaceField,n("replace",()=>yI(e),[CI(e,"replace")]),n("replaceAll",()=>_I(e),[CI(e,"replace all")])],MR("button",{name:"close",onclick:()=>EI(e),"aria-label":CI(e,"close"),type:"button"},["×"])])}commit(){let e=new eI({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:lI.of(e)}))}keydown(e){var t,n,r;t=this.view,n=e,r="search-panel",OT(wT(t.state),n,t,r)?e.preventDefault():13==e.keyCode&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?bI:gI)(this.view)):13==e.keyCode&&e.target==this.replaceField&&(e.preventDefault(),yI(this.view))}update(e){for(let t of e.transactions)for(let e of t.effects)e.is(lI)&&!e.value.eq(this.query)&&this.setQuery(e.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(KR).top}}function CI(e,t){return e.state.phrase(t)}const MI=/[\s\.,:;?!]/;function PI(e,{from:t,to:n}){let r=e.state.doc.lineAt(t),i=e.state.doc.lineAt(n).to,o=Math.max(r.from,t-30),s=Math.min(i,n+30),a=e.state.sliceDoc(o,s);if(o!=r.from)for(let e=0;e<30;e++)if(!MI.test(a[e+1])&&MI.test(a[e])){a=a.slice(e);break}if(s!=i)for(let e=a.length-1;e>a.length-30;e--)if(!MI.test(a[e-1])&&MI.test(a[e])){a=a.slice(0,e);break}return pT.announce.of(`${e.state.phrase("current match")}. ${a} ${e.state.phrase("on line")} ${r.number}.`)}const $I=pT.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),RI=[uI,$w.lowest(fI),$I];class II{constructor(e,t,n){this.state=e,this.pos=t,this.explicit=n,this.abortListeners=[]}tokenBefore(e){let t=IM(this.state).resolveInner(this.pos,-1);for(;t&&e.indexOf(t.name)<0;)t=t.parent;return t?{from:t.from,to:this.pos,text:this.state.sliceDoc(t.from,this.pos),type:t.type}:null}matchBefore(e){let t=this.state.doc.lineAt(this.pos),n=Math.max(t.from,this.pos-250),r=t.text.slice(n-t.from,this.pos-t.from),i=r.search(BI(e,!1));return i<0?null:{from:n+i,to:this.pos,text:r.slice(i)}}get aborted(){return null==this.abortListeners}addEventListener(e,t){"abort"==e&&this.abortListeners&&this.abortListeners.push(t)}}function DI(e){let t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function NI(e){let t=e.map(e=>"string"==typeof e?{label:e}:e),[n,r]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:function(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}class jI{constructor(e,t,n,r){this.completion=e,this.source=t,this.match=n,this.score=r}}function LI(e){return e.selection.main.from}function BI(e,t){var n;let{source:r}=e,i=t&&"^"!=r[0],o="$"!=r[r.length-1];return i||o?new RegExp(`${i?"^":""}(?:${r})${o?"$":""}`,null!==(n=e.flags)&&void 0!==n?n:e.ignoreCase?"i":""):e}const FI=Gw.define();const zI=new WeakMap;function UI(e){if(!Array.isArray(e))return e;let t=zI.get(e);return t||zI.set(e,t=NI(e)),t}const QI=Xw.define(),qI=Xw.define();class HI{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[];for(let t=0;t=48&&l<=57||l>=97&&l<=122?2:l>=65&&l<=90?1:0:(v=rw(l))!=v.toLowerCase()?1:v!=v.toUpperCase()?2:0;(!r||1==y&&m||0==b&&0!=y)&&(t[u]==l||n[u]==l&&(d=!0)?o[u++]=r:o.length&&(g=!1)),b=y,r+=iw(l)}return u==a&&0==o[0]&&g?this.result((d?-200:0)-100,o,e):h==a&&0==p?[-200-e.length+(f==e.length?0:-100),0,f]:s>-1?[-700-e.length,s,s+this.pattern.length]:h==a?[-900-e.length,p,f]:u==a?this.result((d?-200:0)-100-700+(g?0:-1100),o,e):2==t.length?null:this.result((r[0]?-700:0)-200-1100,r,e)}result(e,t,n){let r=[e-n.length],i=1;for(let e of t){let t=e+(this.astral?iw(nw(n,e)):1);i>1&&r[i-1]==e?r[i-1]=t:(r[i++]=e,r[i++]=t)}return r}}const GI=yw.define({combine:e=>lk(e,{activateOnTyping:!0,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:WI,compareCompletions:(e,t)=>e.label.localeCompare(t.label),interactionDelay:75},{defaultKeymap:(e,t)=>e&&t,closeOnBlur:(e,t)=>e&&t,icons:(e,t)=>e&&t,tooltipClass:(e,t)=>n=>VI(e(n),t(n)),optionClass:(e,t)=>n=>VI(e(n),t(n)),addToOptions:(e,t)=>e.concat(t)})});function VI(e,t){return e?t?e+" "+t:e:t}function WI(e,t,n,r,i){let o,s,a=e.textDirection==xE.RTL,l=a,c=!1,u="top",d=t.left-i.left,h=i.right-t.right,p=r.right-r.left,f=r.bottom-r.top;if(l&&d=f||e>t.top?o=n.bottom-t.top:(u="bottom",o=t.bottom-n.top)}return{style:`${u}: ${o}px; max-width: ${s}px`,class:"cm-completionInfo-"+(c?a?"left-narrow":"right-narrow":l?"left":"right")}}function XI(e,t="option"){return n=>{let r=n.state.field(hD,!1);if(!r||!r.open||r.open.disabled||Date.now()-r.open.timestamp-1?r.open.selected+o*(e?1:-1):e?0:s-1;return a<0?a="page"==t?0:s-1:a>=s&&(a="page"==t?s-1:0),n.dispatch({effects:dD.of(a)}),!0}}class YI{constructor(e,t){this.active=e,this.context=t,this.time=Date.now(),this.updates=[],this.done=void 0}}const ZI=hE.fromClass(class{constructor(e){this.view=e,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.composing=0;for(let t of e.state.field(hD).active)1==t.state&&this.startQuery(t)}update(e){let t=e.state.field(hD);if(!e.selectionSet&&!e.docChanged&&e.startState.field(hD)==t)return;let n=e.transactions.some(e=>(e.selection||e.docChanged)&&!aD(e));for(let t=0;t50&&Date.now()-r.time>1e3){for(let e of r.context.abortListeners)try{e()}catch(e){lE(this.view.state,e)}r.context.abortListeners=null,this.running.splice(t--,1)}else r.updates.push(...e.transactions)}if(this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),this.debounceUpdate=t.active.some(e=>1==e.state&&!this.running.some(t=>t.active.source==e.source))?setTimeout(()=>this.startUpdate(),50):-1,0!=this.composing)for(let t of e.transactions)"input"==aD(t)?this.composing=2:2==this.composing&&t.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1;let{state:e}=this.view,t=e.field(hD);for(let e of t.active)1!=e.state||this.running.some(t=>t.active.source==e.source)||this.startQuery(e)}startQuery(e){let{state:t}=this.view,n=LI(t),r=new II(t,n,e.explicitPos==n),i=new YI(e,r);this.running.push(i),Promise.resolve(e.source(r)).then(e=>{i.context.aborted||(i.done=e||null,this.scheduleAccept())},e=>{this.view.dispatch({effects:qI.of(null)}),lE(this.view.state,e)})}scheduleAccept(){this.running.every(e=>void 0!==e.done)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),50))}accept(){var e;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let t=[],n=this.view.state.facet(GI);for(let r=0;re.source==i.active.source);if(o&&1==o.state)if(null==i.done){let e=new lD(i.active.source,0);for(let t of i.updates)e=e.update(t,n);1!=e.state&&t.push(e)}else this.startQuery(o)}t.length&&this.view.dispatch({effects:uD.of(t)})}},{eventHandlers:{blur(e){let t=this.view.state.field(hD,!1);if(t&&t.tooltip&&this.view.state.facet(GI).closeOnBlur){let n=t.open&&kC(this.view,t.open.tooltip);n&&n.dom.contains(e.relatedTarget)||this.view.dispatch({effects:qI.of(null)})}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout(()=>this.view.dispatch({effects:QI.of(!1)}),20),this.composing=0}}});function JI(e,t){const n=t.completion.apply||t.completion.label;let r=e.state.field(hD).active.find(e=>e.source==t.source);return r instanceof cD&&("string"==typeof n?e.dispatch(Object.assign(Object.assign({},function(e,t,n,r){let{main:i}=e.selection,o=n-i.from,s=r-i.from;return Object.assign(Object.assign({},e.changeByRange(a=>a!=i&&n!=r&&e.sliceDoc(a.from+o,a.from+s)!=e.sliceDoc(n,r)?{range:a}:{changes:{from:a.from+o,to:r==i.from?a.to:a.from+s,insert:t},range:gw.cursor(a.from+o+t.length)})),{userEvent:"input.complete"})}(e.state,n,r.from,r.to)),{annotations:FI.of(t.completion)})):n(e,t.completion,r.from,r.to),!0)}function KI(e,t,n){if(e<=n)return{from:0,to:e};if(t<0&&(t=0),t<=e>>1){let e=Math.floor(t/n);return{from:e*n,to:(e+1)*n}}let r=Math.floor((e-t)/n);return{from:e-(r+1)*n,to:e-r*n}}class eD{constructor(e,t){this.view=e,this.stateField=t,this.info=null,this.placeInfoReq={read:()=>this.measureInfo(),write:e=>this.placeInfo(e),key:this},this.space=null,this.currentClass="";let n=e.state.field(t),{options:r,selected:i}=n.open,o=e.state.facet(GI);this.optionContent=function(e){let t=e.addToOptions.slice();return e.icons&&t.push({render(e){let t=document.createElement("div");return t.classList.add("cm-completionIcon"),e.type&&t.classList.add(...e.type.split(/\s+/g).map(e=>"cm-completionIcon-"+e)),t.setAttribute("aria-hidden","true"),t},position:20}),t.push({render(e,t,n){let r=document.createElement("span");r.className="cm-completionLabel";let{label:i}=e,o=0;for(let e=1;eo&&r.appendChild(document.createTextNode(i.slice(o,t)));let a=r.appendChild(document.createElement("span"));a.appendChild(document.createTextNode(i.slice(t,s))),a.className="cm-completionMatchedText",o=s}return oe.position-t.position).map(e=>e.render)}(o),this.optionClass=o.optionClass,this.tooltipClass=o.tooltipClass,this.range=KI(r.length,i,o.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",t=>{for(let n,i=t.target;i&&i!=this.dom;i=i.parentNode)if("LI"==i.nodeName&&(n=/-(\d+)$/.exec(i.id))&&+n[1]{let n=e.state.field(this.stateField,!1);n&&n.tooltip&&e.state.facet(GI).closeOnBlur&&t.relatedTarget!=e.contentDOM&&e.dispatch({effects:qI.of(null)})}),this.list=this.dom.appendChild(this.createListBox(r,n.id,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}mount(){this.updateSel()}update(e){var t,n,r;let i=e.state.field(this.stateField),o=e.startState.field(this.stateField);this.updateTooltipClass(e.state),i!=o&&(this.updateSel(),(null===(t=i.open)||void 0===t?void 0:t.disabled)!=(null===(n=o.open)||void 0===n?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!(null===(r=i.open)||void 0===r?void 0:r.disabled)))}updateTooltipClass(e){let t=this.tooltipClass(e);if(t!=this.currentClass){for(let e of this.currentClass.split(" "))e&&this.dom.classList.remove(e);for(let e of t.split(" "))e&&this.dom.classList.add(e);this.currentClass=t}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),t=e.open;if((t.selected>-1&&t.selected=this.range.to)&&(this.range=KI(t.options.length,t.selected,this.view.state.facet(GI).maxRenderedOptions),this.list.remove(),this.list=this.dom.appendChild(this.createListBox(t.options,e.id,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})),this.updateSelectedOption(t.selected)){this.info&&(this.info.remove(),this.info=null);let{completion:n}=t.options[t.selected],{info:r}=n;if(!r)return;let i="string"==typeof r?document.createTextNode(r):r(n);if(!i)return;"then"in i?i.then(t=>{t&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(t)}).catch(e=>lE(this.view.state,e,"completion info")):this.addInfoPane(i)}}addInfoPane(e){let t=this.info=document.createElement("div");t.className="cm-tooltip cm-completionInfo",t.appendChild(e),this.dom.appendChild(t),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let t=null;for(let n=this.list.firstChild,r=this.range.from;n;n=n.nextSibling,r++)"LI"==n.nodeName&&n.id?r==e?n.hasAttribute("aria-selected")||(n.setAttribute("aria-selected","true"),t=n):n.hasAttribute("aria-selected")&&n.removeAttribute("aria-selected"):r--;return t&&function(e,t){let n=e.getBoundingClientRect(),r=t.getBoundingClientRect();r.topn.bottom&&(e.scrollTop+=r.bottom-n.bottom)}(this.list,t),t}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let t=this.dom.getBoundingClientRect(),n=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),i=this.space;if(!i){let e=this.dom.ownerDocument.defaultView||window;i={left:0,top:0,right:e.innerWidth,bottom:e.innerHeight}}return r.top>Math.min(i.bottom,t.bottom)-10||r.bottomn.from||0==n.from))if(i=e,"string"!=typeof l&&l.header)r.appendChild(l.header(l));else{r.appendChild(document.createElement("completion-section")).textContent=e}}const c=r.appendChild(document.createElement("li"));c.id=t+"-"+o,c.setAttribute("role","option");let u=this.optionClass(s);u&&(c.className=u);for(let e of this.optionContent){let t=e(s,this.view.state,a);t&&c.appendChild(t)}}return n.from&&r.classList.add("cm-completionListIncompleteTop"),n.to=this.options.length?this:new nD(this.options,oD(t,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,t,n,r,i){let o=function(e,t){let n=[],r=null,i=e=>{n.push(e);let{section:t}=e.completion;if(t){r||(r=[]);let e="string"==typeof t?t:t.name;r.some(t=>t.name==e)||r.push("string"==typeof t?{name:e}:t)}};for(let r of e)if(r.hasResult())if(!1===r.result.filter){let e=r.result.getMatch;for(let t of r.result.options){let o=[1e9-n.length];if(e)for(let n of e(t))o.push(n);i(new jI(t,r.source,o,o[0]))}}else{let e,n=new HI(t.sliceDoc(r.from,r.to));for(let t of r.result.options)(e=n.match(t.label))&&i(new jI(t,r.source,e,e[0]+(t.boost||0)))}if(r){let e=Object.create(null),t=0,i=(e,t)=>{var n,r;return(null!==(n=e.rank)&&void 0!==n?n:1e9)-(null!==(r=t.rank)&&void 0!==r?r:1e9)||(e.namet.score-e.score||a(e.completion,t.completion)))!s||s.label!=e.completion.label||s.detail!=e.completion.detail||null!=s.type&&null!=e.completion.type&&s.type!=e.completion.type||s.apply!=e.completion.apply?o.push(e):tD(e.completion)>tD(s)&&(o[o.length-1]=e),s=e.completion;return o}(e,t);if(!o.length)return r&&e.some(e=>1==e.state)?new nD(r.options,r.attrs,r.tooltip,r.timestamp,r.selected,!0):null;let s=t.facet(GI).selectOnOpen?0:-1;if(r&&r.selected!=s&&-1!=r.selected){let e=r.options[r.selected].completion;for(let t=0;tt.hasResult()?Math.min(e,t.from):e,1e8),create:(a=hD,e=>new eD(e,a)),above:i.aboveCursor},r?r.timestamp:Date.now(),s,!1);var a}map(e){return new nD(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:e.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}}class rD{constructor(e,t,n){this.active=e,this.id=t,this.open=n}static start(){return new rD(sD,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(e){let{state:t}=e,n=t.facet(GI),r=(n.override||t.languageDataAt("autocomplete",LI(t)).map(UI)).map(t=>(this.active.find(e=>e.source==t)||new lD(t,this.active.some(e=>0!=e.state)?1:0)).update(e,n));r.length==this.active.length&&r.every((e,t)=>e==this.active[t])&&(r=this.active);let i=this.open;i&&e.docChanged&&(i=i.map(e.changes)),e.selection||r.some(t=>t.hasResult()&&e.changes.touchesRange(t.from,t.to))||!function(e,t){if(e==t)return!0;for(let n=0,r=0;;){for(;n1==e.state)&&(i=null),!i&&r.every(e=>1!=e.state)&&r.some(e=>e.hasResult())&&(r=r.map(e=>e.hasResult()?new lD(e.source,0):e));for(let t of e.effects)t.is(dD)&&(i=i&&i.setSelected(t.value,this.id));return r==this.active&&i==this.open?this:new rD(r,this.id,i)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:iD}}const iD={"aria-autocomplete":"list"};function oD(e,t){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":e};return t>-1&&(n["aria-activedescendant"]=e+"-"+t),n}const sD=[];function aD(e){return e.isUserEvent("input.type")?"input":e.isUserEvent("delete.backward")?"delete":null}class lD{constructor(e,t,n=-1){this.source=e,this.state=t,this.explicitPos=n}hasResult(){return!1}update(e,t){let n=aD(e),r=this;n?r=r.handleUserEvent(e,n,t):e.docChanged?r=r.handleChange(e):e.selection&&0!=r.state&&(r=new lD(r.source,0));for(let t of e.effects)if(t.is(QI))r=new lD(r.source,1,t.value?LI(e.state):-1);else if(t.is(qI))r=new lD(r.source,0);else if(t.is(uD))for(let e of t.value)e.source==r.source&&(r=e);return r}handleUserEvent(e,t,n){return"delete"!=t&&n.activateOnTyping?new lD(this.source,1):this.map(e.changes)}handleChange(e){return e.changes.touchesRange(LI(e.startState))?new lD(this.source,0):this.map(e.changes)}map(e){return e.empty||this.explicitPos<0?this:new lD(this.source,this.state,e.mapPos(this.explicitPos))}}class cD extends lD{constructor(e,t,n,r,i){super(e,2,t),this.result=n,this.from=r,this.to=i}hasResult(){return!0}handleUserEvent(e,t,n){var r;let i=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),s=LI(e.state);if((this.explicitPos<0?s<=i:so||"delete"==t&&LI(e.startState)==this.from)return new lD(this.source,"input"==t&&n.activateOnTyping?1:0);let a,l=this.explicitPos<0?-1:e.changes.mapPos(this.explicitPos);return function(e,t,n,r){if(!e)return!1;let i=t.sliceDoc(n,r);return"function"==typeof e?e(i,n,r,t):BI(e,!0).test(i)}(this.result.validFor,e.state,i,o)?new cD(this.source,l,this.result,i,o):this.result.update&&(a=this.result.update(this.result,i,o,new II(e.state,s,l>=0)))?new cD(this.source,l,a,a.from,null!==(r=a.to)&&void 0!==r?r:LI(e.state)):new lD(this.source,1,l)}handleChange(e){return e.changes.touchesRange(this.from,this.to)?new lD(this.source,0):this.map(e.changes)}map(e){return e.empty?this:new cD(this.source,this.explicitPos<0?-1:e.mapPos(this.explicitPos),this.result,e.mapPos(this.from),e.mapPos(this.to,1))}}const uD=Xw.define({map:(e,t)=>e.map(e=>e.map(t))}),dD=Xw.define(),hD=Ew.define({create:()=>rD.start(),update:(e,t)=>e.update(t),provide:e=>[bC.from(e,e=>e.tooltip),pT.contentAttributes.from(e,e=>e.attrs)]}),pD=pT.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class fD{constructor(e,t,n,r){this.field=e,this.line=t,this.from=n,this.to=r}}class mD{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(e){let t=e.mapPos(this.from,-1,sw.TrackDel),n=e.mapPos(this.to,1,sw.TrackDel);return null==t||null==n?null:new mD(this.field,t,n)}}class gD{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],r=[t],i=e.doc.lineAt(t),o=/^\s*/.exec(i.text)[0];for(let i of this.lines){if(n.length){let n=o,s=/^\t*/.exec(i)[0].length;for(let t=0;tnew mD(e.field,r[e.line]+e.from,r[e.line]+e.to))}}static parse(e){let t,n=[],r=[],i=[];for(let o of e.split(/\r\n?|\n/)){for(;t=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(o);){let e=t[1]?+t[1]:null,s=t[2]||t[3]||"",a=-1;for(let t=0;t=a&&e.field++}i.push(new fD(a,r.length,t.index,t.index+s.length)),o=o.slice(0,t.index)+s+o.slice(t.index+t[0].length)}for(let e;e=/\\([{}])/.exec(o);){o=o.slice(0,e.index)+e[1]+o.slice(e.index+e[0].length);for(let t of i)t.line==r.length&&t.from>e.index&&(t.from--,t.to--)}r.push(o)}return new gD(r,i)}}let bD=FO.widget({widget:new class extends LO{toDOM(){let e=document.createElement("span");return e.className="cm-snippetFieldPosition",e}ignoreEvent(){return!1}}}),vD=FO.mark({class:"cm-snippetField"});class yD{constructor(e,t){this.ranges=e,this.active=t,this.deco=FO.set(e.map(e=>(e.from==e.to?bD:vD).range(e.from,e.to)))}map(e){let t=[];for(let n of this.ranges){let r=n.map(e);if(!r)return null;t.push(r)}return new yD(t,this.active)}selectionInsideField(e){return e.ranges.every(e=>this.ranges.some(t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))}}const _D=Xw.define({map:(e,t)=>e&&e.map(t)}),SD=Xw.define(),xD=Ew.define({create:()=>null,update(e,t){for(let n of t.effects){if(n.is(_D))return n.value;if(n.is(SD)&&e)return new yD(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>pT.decorations.from(e,e=>e?e.deco:FO.none)});function wD(e,t){return gw.create(e.filter(e=>e.field==t).map(e=>gw.range(e.from,e.to)))}function kD(e){let t=gD.parse(e);return(e,n,r,i)=>{let{text:o,ranges:s}=t.instantiate(e.state,r),a={changes:{from:r,to:i,insert:Bx.of(o)},scrollIntoView:!0,annotations:n?FI.of(n):void 0};if(s.length&&(a.selection=wD(s,0)),s.length>1){let t=new yD(s,0),n=a.effects=[_D.of(t)];void 0===e.state.field(xD,!1)&&n.push(Xw.appendConfig.of([xD,TD,MD,pD]))}e.dispatch(e.state.update(a))}}function OD(e){return({state:t,dispatch:n})=>{let r=t.field(xD,!1);if(!r||e<0&&0==r.active)return!1;let i=r.active+e,o=e>0&&!r.ranges.some(t=>t.field==i+e);return n(t.update({selection:wD(r.ranges,i),effects:_D.of(o?null:new yD(r.ranges,i))})),!0}}const ED=[{key:"Tab",run:OD(1),shift:OD(-1)},{key:"Escape",run:({state:e,dispatch:t})=>!!e.field(xD,!1)&&(t(e.update({effects:_D.of(null)})),!0)}],AD=yw.define({combine:e=>e.length?e[0]:ED}),TD=$w.highest(ST.compute([AD],e=>e.facet(AD)));function CD(e,t){return Object.assign(Object.assign({},t),{apply:kD(e)})}const MD=pT.domEventHandlers({mousedown(e,t){let n,r=t.state.field(xD,!1);if(!r||null==(n=t.posAtCoords({x:e.clientX,y:e.clientY})))return!1;let i=r.ranges.find(e=>e.from<=n&&e.to>=n);return!(!i||i.field==r.active)&&(t.dispatch({selection:wD(r.ranges,i.field),effects:_D.of(r.ranges.some(e=>e.field>i.field)?new yD(r.ranges,i.field):null)}),!0)}});const PD={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},$D=Xw.define({map(e,t){let n=t.mapPos(e,-1,sw.TrackAfter);return null==n?void 0:n}}),RD=new class extends ck{};RD.startSide=1,RD.endSide=-1;const ID=Ew.define({create:()=>pk.empty,update(e,t){if(t.selection){let n=t.state.doc.lineAt(t.selection.main.head).from,r=t.startState.doc.lineAt(t.startState.selection.main.head).from;n!=t.changes.mapPos(r,-1)&&(e=pk.empty)}e=e.map(t.changes);for(let n of t.effects)n.is($D)&&(e=e.update({add:[RD.range(n.value,n.value+1)]}));return e}});function DD(e){for(let t=0;t<"()[]{}<>".length;t+=2)if("()[]{}<>".charCodeAt(t)==e)return"()[]{}<>".charAt(t+1);return rw(e<128?e:e+1)}function ND(e,t){return e.languageDataAt("closeBrackets",t)[0]||PD}const jD="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),LD=pT.inputHandler.of((e,t,n,r)=>{if((jD?e.composing:e.compositionStarted)||e.state.readOnly)return!1;let i=e.state.selection.main;if(r.length>2||2==r.length&&1==iw(nw(r,0))||t!=i.from||n!=i.to)return!1;let o=function(e,t){let n=ND(e,e.selection.main.head),r=n.brackets||PD.brackets;for(let i of r){let o=DD(nw(i,0));if(t==i)return o==i?qD(e,i,r.indexOf(i+i+i)>-1,n):UD(e,i,o,n.before||PD.before);if(t==o&&FD(e,e.selection.main.from))return QD(e,i,o)}return null}(e.state,r);return!!o&&(e.dispatch(o),!0)}),BD=[{key:"Backspace",run:({state:e,dispatch:t})=>{if(e.readOnly)return!1;let n=ND(e,e.selection.main.head).brackets||PD.brackets,r=null,i=e.changeByRange(t=>{if(t.empty){let r=function(e,t){let n=e.sliceString(t-2,t);return iw(nw(n,0))==n.length?n:n.slice(1)}(e.doc,t.head);for(let i of n)if(i==r&&zD(e.doc,t.head)==DD(nw(i,0)))return{changes:{from:t.head-i.length,to:t.head+i.length},range:gw.cursor(t.head-i.length)}}return{range:r=t}});return r||t(e.update(i,{scrollIntoView:!0,userEvent:"delete.backward"})),!r}}];function FD(e,t){let n=!1;return e.field(ID).between(0,e.doc.length,e=>{e==t&&(n=!0)}),n}function zD(e,t){let n=e.sliceString(t,t+2);return n.slice(0,iw(nw(n,0)))}function UD(e,t,n,r){let i=null,o=e.changeByRange(o=>{if(!o.empty)return{changes:[{insert:t,from:o.from},{insert:n,from:o.to}],effects:$D.of(o.to+t.length),range:gw.range(o.anchor+t.length,o.head+t.length)};let s=zD(e.doc,o.head);return!s||/\s/.test(s)||r.indexOf(s)>-1?{changes:{insert:t+n,from:o.head},effects:$D.of(o.head+t.length),range:gw.cursor(o.head+t.length)}:{range:i=o}});return i?null:e.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function QD(e,t,n){let r=null,i=e.changeByRange(t=>t.empty&&zD(e.doc,t.head)==n?{changes:{from:t.head,to:t.head+n.length,insert:n},range:gw.cursor(t.head+n.length)}:r={range:t});return r?null:e.update(i,{scrollIntoView:!0,userEvent:"input.type"})}function qD(e,t,n,r){let i=r.stringPrefixes||PD.stringPrefixes,o=null,s=e.changeByRange(r=>{if(!r.empty)return{changes:[{insert:t,from:r.from},{insert:t,from:r.to}],effects:$D.of(r.to+t.length),range:gw.range(r.anchor+t.length,r.head+t.length)};let s,a=r.head,l=zD(e.doc,a);if(l==t){if(HD(e,a))return{changes:{insert:t+t,from:a},effects:$D.of(a+t.length),range:gw.cursor(a+t.length)};if(FD(e,a)){let r=n&&e.sliceDoc(a,a+3*t.length)==t+t+t?t+t+t:t;return{changes:{from:a,to:a+r.length,insert:r},range:gw.cursor(a+r.length)}}}else{if(n&&e.sliceDoc(a-2*t.length,a)==t+t&&(s=GD(e,a-2*t.length,i))>-1&&HD(e,s))return{changes:{insert:t+t+t+t,from:a},effects:$D.of(a+t.length),range:gw.cursor(a+t.length)};if(e.charCategorizer(a)(l)!=rk.Word&&GD(e,a,i)>-1&&!function(e,t,n,r){let i=IM(e).resolveInner(t,-1),o=r.reduce((e,t)=>Math.max(e,t.length),0);for(let s=0;s<5;s++){let s=e.sliceDoc(i.from,Math.min(i.to,i.from+n.length+o)),a=s.indexOf(n);if(!a||a>-1&&r.indexOf(s.slice(0,a))>-1){let t=i.firstChild;for(;t&&t.from==i.from&&t.to-t.from>n.length+a;){if(e.sliceDoc(t.to-n.length,t.to)==n)return!1;t=t.firstChild}return!0}let l=i.to==t&&i.parent;if(!l)break;i=l}return!1}(e,a,t,i))return{changes:{insert:t+t,from:a},effects:$D.of(a+t.length),range:gw.cursor(a+t.length)}}return{range:o=r}});return o?null:e.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function HD(e,t){let n=IM(e).resolveInner(t+1);return n.parent&&n.from==t}function GD(e,t,n){let r=e.charCategorizer(t);if(r(e.sliceDoc(t-1,t))!=rk.Word)return t;for(let i of n){let n=t-i.length;if(e.sliceDoc(n,t)==i&&r(e.sliceDoc(n-1,n))!=rk.Word)return n}return-1}function VD(e={}){return[hD,GI.of(e),ZI,XD,pD]}const WD=[{key:"Ctrl-Space",run:e=>!!e.state.field(hD,!1)&&(e.dispatch({effects:QI.of(!0)}),!0)},{key:"Escape",run:e=>{let t=e.state.field(hD,!1);return!(!t||!t.active.some(e=>0!=e.state))&&(e.dispatch({effects:qI.of(null)}),!0)}},{key:"ArrowDown",run:XI(!0)},{key:"ArrowUp",run:XI(!1)},{key:"PageDown",run:XI(!0,"page")},{key:"PageUp",run:XI(!1,"page")},{key:"Enter",run:e=>{let t=e.state.field(hD,!1);return!(e.state.readOnly||!t||!t.open||t.open.selected<0||Date.now()-t.open.timestampe.facet(GI).defaultKeymap?[WD]:[]));class YD{constructor(e,t,n){this.from=e,this.to=t,this.diagnostic=n}}class ZD{constructor(e,t,n){this.diagnostics=e,this.panel=t,this.selected=n}static init(e,t,n){let r=e,i=n.facet(uN).markerFilter;i&&(r=i(r));let o=FO.set(r.map(e=>e.from==e.to||e.from==e.to-1&&n.doc.lineAt(e.from).to==e.from?FO.widget({widget:new pN(e),diagnostic:e}).range(e.from):FO.mark({attributes:{class:"cm-lintRange cm-lintRange-"+e.severity},diagnostic:e}).range(e.from,e.to)),!0);return new ZD(o,t,JD(o))}}function JD(e,t=null,n=0){let r=null;return e.between(n,1e9,(e,n,{spec:i})=>{if(!t||i.diagnostic==t)return r=new YD(e,n,i.diagnostic),!1}),r}function KD(e,t){return!(!e.effects.some(e=>e.is(tN))&&!e.changes.touchesRange(t.pos))}function eN(e,t){return e.field(iN,!1)?t:t.concat(Xw.appendConfig.of(yN))}const tN=Xw.define(),nN=Xw.define(),rN=Xw.define(),iN=Ew.define({create:()=>new ZD(FO.none,null,null),update(e,t){if(t.docChanged){let n=e.diagnostics.map(t.changes),r=null;if(e.selected){let i=t.changes.mapPos(e.selected.from,1);r=JD(n,e.selected.diagnostic,i)||JD(n,null,i)}e=new ZD(n,e.panel,r)}for(let n of t.effects)n.is(tN)?e=ZD.init(n.value,e.panel,t.state):n.is(nN)?e=new ZD(e.diagnostics,n.value?mN.open:null,e.selected):n.is(rN)&&(e=new ZD(e.diagnostics,e.panel,n.value));return e},provide:e=>[PC.from(e,e=>e.panel),pT.decorations.from(e,e=>e.diagnostics)]});const oN=FO.mark({class:"cm-lintRange cm-lintRange-active"});function sN(e,t,n){let{diagnostics:r}=e.state.field(iN),i=[],o=2e8,s=0;r.between(t-(n<0?1:0),t+(n>0?1:0),(e,r,{spec:a})=>{t>=e&&t<=r&&(e==r||(t>e||n>0)&&(t({dom:aN(e,i)})}:null}function aN(e,t){return MR("ul",{class:"cm-tooltip-lint"},t.map(t=>hN(e,t,!1)))}const lN=e=>{let t=e.state.field(iN,!1);return!(!t||!t.panel)&&(e.dispatch({effects:nN.of(!1)}),!0)},cN=[{key:"Mod-Shift-m",run:e=>{let t=e.state.field(iN,!1);t&&t.panel||e.dispatch({effects:eN(e.state,[nN.of(!0)])});let n=AC(e,mN.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},preventDefault:!0},{key:"F8",run:e=>{let t=e.state.field(iN,!1);if(!t)return!1;let n=e.state.selection.main,r=t.diagnostics.iter(n.to+1);return!(!r.value&&(r=t.diagnostics.iter(0),!r.value||r.from==n.from&&r.to==n.to))&&(e.dispatch({selection:{anchor:r.from,head:r.to},scrollIntoView:!0}),!0)}}],uN=yw.define({combine:e=>Object.assign({sources:e.map(e=>e.source)},lk(e.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null},{needsRefresh:(e,t)=>e?t?n=>e(n)||t(n):e:t}))});function dN(e){let t=[];if(e)e:for(let{name:n}of e){for(let e=0;ee.toLowerCase()==r.toLowerCase())){t.push(r);continue e}}t.push("")}return t}function hN(e,t,n){var r;let i=n?dN(t.actions):[];return MR("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},MR("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage():t.message),null===(r=t.actions)||void 0===r?void 0:r.map((n,r)=>{let o=!1,s=r=>{if(r.preventDefault(),o)return;o=!0;let i=JD(e.state.field(iN).diagnostics,t);i&&n.apply(e,i.from,i.to)},{name:a}=n,l=i[r]?a.indexOf(i[r]):-1,c=l<0?a:[a.slice(0,l),MR("u",a.slice(l,l+1)),a.slice(l+1)];return MR("button",{type:"button",class:"cm-diagnosticAction",onclick:s,onmousedown:s,"aria-label":` Action: ${a}${l<0?"":` (access key "${i[r]})"`}.`},c)}),t.source&&MR("div",{class:"cm-diagnosticSource"},t.source))}class pN extends LO{constructor(e){super(),this.diagnostic=e}eq(e){return e.diagnostic==this.diagnostic}toDOM(){return MR("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class fN{constructor(e,t){this.diagnostic=t,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=hN(e,t,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class mN{constructor(e){this.view=e,this.items=[];this.list=MR("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:t=>{if(27==t.keyCode)lN(this.view),this.view.focus();else if(38==t.keyCode||33==t.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==t.keyCode||34==t.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==t.keyCode)this.moveSelection(0);else if(35==t.keyCode)this.moveSelection(this.items.length-1);else if(13==t.keyCode)this.view.focus();else{if(!(t.keyCode>=65&&t.keyCode<=90&&this.selectedIndex>=0))return;{let{diagnostic:n}=this.items[this.selectedIndex],r=dN(n.actions);for(let i=0;i{for(let t=0;tlN(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(iN).selected;if(!e)return-1;for(let t=0;t{let a,l=-1;for(let e=n;en&&(this.items.splice(n,l-n),r=!0)),t&&a.diagnostic==t.diagnostic?a.dom.hasAttribute("aria-selected")||(a.dom.setAttribute("aria-selected","true"),i=a):a.dom.hasAttribute("aria-selected")&&a.dom.removeAttribute("aria-selected"),n++});n({sel:i.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:e,panel:t})=>{e.topt.bottom&&(this.list.scrollTop+=e.bottom-t.bottom)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let e=this.list.firstChild;function t(){let t=e;e=t.nextSibling,t.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;e!=n.dom;)t();e=n.dom.nextSibling}else this.list.insertBefore(n.dom,e);for(;e;)t()}moveSelection(e){if(this.selectedIndex<0)return;let t=JD(this.view.state.field(iN).diagnostics,this.items[e].diagnostic);t&&this.view.dispatch({selection:{anchor:t.from,head:t.to},scrollIntoView:!0,effects:rN.of(t)})}static open(e){return new mN(e)}}function gN(e,t='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(e)}')`}function bN(e){return gN(``,'width="6" height="3"')}const vN=pT.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:bN("#d11")},".cm-lintRange-warning":{backgroundImage:bN("orange")},".cm-lintRange-info":{backgroundImage:bN("#999")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});const yN=[iN,pT.decorations.compute([iN],e=>{let{selected:t,panel:n}=e.field(iN);return t&&n&&t.from!=t.to?FO.set([oN.range(t.from,t.to)]):FO.none}),wC(sN,{hideOn:KD}),vN];const _N=(()=>[YC(),KC,JT(),f$(),TP(),DT(),[QT,qT],ak.allowMultipleSelections.of(!0),ak.transactionFilter.of(e=>{if(!e.docChanged||!e.isUserEvent("input.type")&&!e.isUserEvent("input.complete"))return e;let t=e.startState.languageDataAt("indentOnInput",e.startState.selection.main.head);if(!t.length)return e;let n=e.newDoc,{head:r}=e.newSelection.main,i=n.lineAt(r);if(r>i.from+200)return e;let o=n.sliceString(i.from,r);if(!t.some(e=>e.test(o)))return e;let{state:s}=e,a=-1,l=[];for(let{head:e}of s.selection.ranges){let t=s.doc.lineAt(e);if(t.from==a)continue;a=t.from;let n=XM(s,t.from);if(null==n)continue;let r=/^\s*/.exec(t.text)[0],i=WM(s,n);r!=i&&l.push({from:t.from,to:t.from+r.length,insert:i})}return l.length?[e,{changes:l,sequential:!0}]:e}),IP(jP,{fallback:!0}),qP(),[LD,ID],VD(),sC(),cC(),rC,VR(),ST.of([...BD,...TR,...AI,...M$,...SP,...WD,...cN])])();function SN(e){const t=e.selection.main.head;return e.doc.lineAt(t)}function xN(e,t){let n=0;e:for(let r=0;rlk(e,{highlightActiveBlock:!0,hideFirstIndent:!1})});class kN{constructor(e,t,n){this.lines=e,this.state=t,this.map=new Map,this.unitWidth=n;for(const e of this.lines)this.add(e);this.state.facet(wN).highlightActiveBlock&&this.findAndSetActiveLines()}has(e){return this.map.has("number"==typeof e?e:e.number)}get(e){const t=this.map.get("number"==typeof e?e:e.number);if(!t)throw new Error("Line not found in indentation map");return t}set(e,t,n){const r=!e.text.trim().length,i={line:e,col:t,level:n,empty:r};return this.map.set(i.line.number,i),i}add(e){if(this.has(e))return this.get(e);if(!e.length||!e.text.trim().length){if(1===e.number)return this.set(e,0,0);if(e.number===this.state.doc.lines){const t=this.closestNonEmpty(e,-1);return this.set(e,0,t.level)}const t=this.closestNonEmpty(e,-1),n=this.closestNonEmpty(e,1);return t.level>=n.level?this.set(e,0,t.level):t.empty&&0===t.level&&0!==n.level?this.set(e,0,0):n.level>t.level?this.set(e,0,t.level+1):this.set(e,0,n.level)}const t=xN(e.text,this.state.tabSize),n=Math.floor(t/this.unitWidth);return this.set(e,t,n)}closestNonEmpty(e,t){let n=e.number+t;for(;-1===t?n>=1:n<=this.state.doc.lines;){if(this.has(n)){const e=this.get(n);if(!e.empty)return e}const e=this.state.doc.line(n);if(e.text.trim().length){const t=xN(e.text,this.state.tabSize),n=Math.floor(t/this.unitWidth);return this.set(e,t,n)}n+=t}const r=this.state.doc.line(-1===t?1:this.state.doc.lines);return this.set(r,0,0)}findAndSetActiveLines(){const e=SN(this.state);if(!this.has(e))return;let t,n,r=this.get(e);if(this.has(r.line.number+1)){const e=this.get(r.line.number+1);e.level>r.level&&(r=e)}if(this.has(r.line.number-1)){const e=this.get(r.line.number-1);e.level>r.level&&(r=e)}if(0!==r.level){for(r.active=r.level,t=r.line.number;t>1;t--){if(!this.has(t-1))continue;const e=this.get(t-1);if(e.level0&&s.push(EN("--indent-marker-bg-color",t,o,e)),s.push(EN("--indent-marker-active-bg-color",t,i-1,1)),i!==r&&s.push(EN("--indent-marker-bg-color",t,i,r-i))}else s.push(EN("--indent-marker-bg-color",t,o,r-o));return s.join(",")}class TN{constructor(e){this.view=e,this.unitWidth=VM(e.state),this.currentLineNumber=SN(e.state).number,this.generate(e.state)}update(e){const t=VM(e.state),n=t!==this.unitWidth;n&&(this.unitWidth=t);const r=SN(e.state).number,i=r!==this.currentLineNumber;this.currentLineNumber=r;const o=e.state.facet(wN).highlightActiveBlock&&i;(e.docChanged||e.viewportChanged||n||o)&&this.generate(e.state)}generate(e){const t=new fk,n=function(e,t=e.state){const n=new Set;for(const{from:r,to:i}of e.visibleRanges){let e=r;for(;e<=i;){const r=t.doc.lineAt(e);n.has(r)||n.add(r),e=r.to+1}}return n}(this.view,e),r=new kN(n,e,this.unitWidth),{hideFirstIndent:i}=e.facet(wN);for(const e of n){const n=r.get(e.number);if(!(null==n?void 0:n.level))continue;const o=AN(n,this.unitWidth,i);t.add(e.from,e.from,FO.line({class:"cm-indent-markers",attributes:{style:"--indent-markers: "+o}}))}this.decorations=t.finish()}}function CN(e={}){return[wN.of(e),ON,hE.fromClass(TN,{decorations:e=>e.decorations})]}var MN=n(13);const PN={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},$N={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},RN={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function IN(e){return 9==e||10==e||13==e||32==e}let DN=null,NN=null,jN=0;function LN(e,t){let n=e.pos+t;if(jN==n&&NN==e)return DN;let r=e.peek(t);for(;IN(r);)r=e.peek(++t);let i="";for(;45==(o=r)||46==o||58==o||o>=65&&o<=90||95==o||o>=97&&o<=122||o>=161;)i+=String.fromCharCode(r),r=e.peek(++t);var o;return NN=e,jN=n,DN=i?i.toLowerCase():r==BN||r==FN?void 0:null}const BN=63,FN=33;function zN(e,t){this.name=e,this.parent=t,this.hash=t?t.hash:0;for(let t=0;tUN.indexOf(t)>-1?new zN(LN(r,1)||"",e):e,reduce:(e,t)=>20==t&&e?e.parent:e,reuse(e,t,n,r){let i=t.type.id;return 6==i||36==i?new zN(LN(r,1)||"",e):e},hash:e=>e?e.hash:0,strict:!1}),qN=new MN.b((e,t)=>{if(60!=e.next)return void(e.next<0&&t.context&&e.acceptToken(57));e.advance();let n=47==e.next;n&&e.advance();let r=LN(e,0);if(void 0===r)return;if(!r)return e.acceptToken(n?14:6);let i=t.context?t.context.name:null;if(n){if(r==i)return e.acceptToken(11);if(i&&$N[i])return e.acceptToken(57,-2);if(t.dialectEnabled(0))return e.acceptToken(12);for(let e=t.context;e;e=e.parent)if(e.name==r)return;e.acceptToken(13)}else{if("script"==r)return e.acceptToken(7);if("style"==r)return e.acceptToken(8);if("textarea"==r)return e.acceptToken(9);if(PN.hasOwnProperty(r))return e.acceptToken(10);i&&RN[i]&&RN[i][r]?e.acceptToken(57,-1):e.acceptToken(6)}},{contextual:!0}),HN=new MN.b(e=>{for(let t=0,n=0;;n++){if(e.next<0){n&&e.acceptToken(58);break}if(45==e.next)t++;else{if(62==e.next&&t>=2){n>3&&e.acceptToken(58,-2);break}t=0}e.advance()}});const GN=new MN.b((e,t)=>{if(47==e.next&&62==e.peek(1)){let n=t.dialectEnabled(1)||function(e){for(;e;e=e.parent)if("svg"==e.name||"math"==e.name)return!0;return!1}(t.context);e.acceptToken(n?5:4,2)}else 62==e.next&&e.acceptToken(4,1)});function VN(e,t,n){let r=2+e.length;return new MN.b(i=>{for(let o=0,s=0,a=0;;a++){if(i.next<0){a&&i.acceptToken(t);break}if(0==o&&60==i.next||1==o&&47==i.next||o>=2&&os?i.acceptToken(t,-s):i.acceptToken(n,-(s-2));break}if((10==i.next||13==i.next)&&a){i.acceptToken(t,1);break}o=s=0}else s++;i.advance()}})}const WN=VN("script",54,1),XN=VN("style",55,2),YN=VN("textarea",56,3),ZN=oM({"Text RawText":EM.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":EM.angleBracket,TagName:EM.tagName,"MismatchedCloseTag/TagName":[EM.tagName,EM.invalid],AttributeName:EM.attributeName,"AttributeValue UnquotedAttributeValue":EM.attributeValue,Is:EM.definitionOperator,"EntityReference CharacterReference":EM.character,Comment:EM.blockComment,ProcessingInst:EM.processingInstruction,DoctypeDecl:EM.documentMeta}),JN=MN.c.deserialize({version:14,states:",xOVO!rOOO!WQ#tO'#CqO!]Q#tO'#CzO!bQ#tO'#C}O!gQ#tO'#DQO!lQ#tO'#DSO!qOaO'#CpO!|ObO'#CpO#XOdO'#CpO$eO!rO'#CpOOO`'#Cp'#CpO$lO$fO'#DTO$tQ#tO'#DVO$yQ#tO'#DWOOO`'#Dk'#DkOOO`'#DY'#DYQVO!rOOO%OQ&rO,59]O%WQ&rO,59fO%`Q&rO,59iO%hQ&rO,59lO%sQ&rO,59nOOOa'#D^'#D^O%{OaO'#CxO&WOaO,59[OOOb'#D_'#D_O&`ObO'#C{O&kObO,59[OOOd'#D`'#D`O&sOdO'#DOO'OOdO,59[OOO`'#Da'#DaO'WO!rO,59[O'_Q#tO'#DROOO`,59[,59[OOOp'#Db'#DbO'dO$fO,59oOOO`,59o,59oO'lQ#|O,59qO'qQ#|O,59rOOO`-E7W-E7WO'vQ&rO'#CsOOQW'#DZ'#DZO(UQ&rO1G.wOOOa1G.w1G.wO(^Q&rO1G/QOOOb1G/Q1G/QO(fQ&rO1G/TOOOd1G/T1G/TO(nQ&rO1G/WOOO`1G/W1G/WOOO`1G/Y1G/YO(yQ&rO1G/YOOOa-E7[-E7[O)RQ#tO'#CyOOO`1G.v1G.vOOOb-E7]-E7]O)WQ#tO'#C|OOOd-E7^-E7^O)]Q#tO'#DPOOO`-E7_-E7_O)bQ#|O,59mOOOp-E7`-E7`OOO`1G/Z1G/ZOOO`1G/]1G/]OOO`1G/^1G/^O)gQ,UO,59_OOQW-E7X-E7XOOOa7+$c7+$cOOOb7+$l7+$lOOOd7+$o7+$oOOO`7+$r7+$rOOO`7+$t7+$tO)rQ#|O,59eO)wQ#|O,59hO)|Q#|O,59kOOO`1G/X1G/XO*RO7[O'#CvO*dOMhO'#CvOOQW1G.y1G.yOOO`1G/P1G/POOO`1G/S1G/SOOO`1G/V1G/VOOOO'#D['#D[O*uO7[O,59bOOQW,59b,59bOOOO'#D]'#D]O+WOMhO,59bOOOO-E7Y-E7YOOQW1G.|1G.|OOOO-E7Z-E7Z",stateData:"+s~O!^OS~OUSOVPOWQOXROYTO[]O][O^^O`^Oa^Ob^Oc^Ox^O{_O!dZO~OfaO~OfbO~OfcO~OfdO~OfeO~O!WfOPlP!ZlP~O!XiOQoP!ZoP~O!YlORrP!ZrP~OUSOVPOWQOXROYTOZqO[]O][O^^O`^Oa^Ob^Oc^Ox^O!dZO~O!ZrO~P#dO![sO!euO~OfvO~OfwO~OS|OhyO~OS!OOhyO~OS!QOhyO~OS!SOT!TOhyO~OS!TOhyO~O!WfOPlX!ZlX~OP!WO!Z!XO~O!XiOQoX!ZoX~OQ!ZO!Z!XO~O!YlORrX!ZrX~OR!]O!Z!XO~O!Z!XO~P#dOf!_O~O![sO!e!aO~OS!bO~OS!cO~Oi!dOSgXhgXTgX~OS!fOhyO~OS!gOhyO~OS!hOhyO~OS!iOT!jOhyO~OS!jOhyO~Of!kO~Of!lO~Of!mO~OS!nO~Ok!qO!`!oO!b!pO~OS!rO~OS!sO~OS!tO~Oa!uOb!uOc!uO!`!wO!a!uO~Oa!xOb!xOc!xO!b!wO!c!xO~Oa!uOb!uOc!uO!`!{O!a!uO~Oa!xOb!xOc!xO!b!{O!c!xO~OT~bac!dx{!d~",goto:"%p!`PPPPPPPPPPPPPPPPPPPP!a!gP!mPP!yP!|#P#S#Y#]#`#f#i#l#r#x!aP!a!aP$O$U$l$r$x%O%U%[%bPPPPPPPP%hX^OX`pXUOX`pezabcde{}!P!R!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ}bQ!PcQ!RdQ!UeZ!e{}!P!R!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:67,context:QN,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,21,30,33,36,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,29,32,35,37,"OpenTag"],["group",-9,14,17,18,19,20,39,40,41,42,"Entity",16,"Entity TextContent",-3,28,31,34,"TextContent Entity"]],propSources:[ZN],skippedNodes:[0],repeatNodeCount:9,tokenData:"#%g!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs4ysv-_vw5iwxJ^x}-_}!OKP!O!P-_!P!Q$q!Q![-_![!]!!O!]!^-_!^!_!&W!_!`#$o!`!a&X!a!c-_!c!}!!O!}#R-_#R#S!!O#S#T3V#T#o!!O#o#s-_#s$f$q$f%W-_%W%o!!O%o%p-_%p&a!!O&a&b-_&b1p!!O1p4U-_4U4d!!O4d4e-_4e$IS!!O$IS$I`-_$I`$Ib!!O$Ib$Kh-_$Kh%#t!!O%#t&/x-_&/x&Et!!O&Et&FV-_&FV;'S!!O;'S;:j!&Q;:j;=`4s<%l?&r-_?&r?Ah!!O?Ah?BY$q?BY?Mn!!O?MnO$q!Z$|c`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr$qrs&}sv$qvw+Pwx(tx!^$q!^!_*V!_!a&X!a#S$q#S#T&X#T;'S$q;'S;=`+z<%lO$q!R&bX`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&Xq'UV`P!cpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}P'pT`POv'kw!^'k!_;'S'k;'S;=`(P<%lO'kP(SP;=`<%l'kp([S!cpOv(Vx;'S(V;'S;=`(h<%lO(Vp(kP;=`<%l(Vq(qP;=`<%l&}a({W`P!a`Or(trs'ksv(tw!^(t!^!_)e!_;'S(t;'S;=`*P<%lO(t`)jT!a`Or)esv)ew;'S)e;'S;=`)y<%lO)e`)|P;=`<%l)ea*SP;=`<%l(t!Q*^V!a`!cpOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!Q*vP;=`<%l*V!R*|P;=`<%l&XW+UYkWOX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+PW+wP;=`<%l+P!Z+}P;=`<%l$q!a,]``P!a`!cp!^^OX&XXY,QYZ,QZ]&X]^,Q^p&Xpq,Qqr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X!_-ljhS`PkW!a`!cpOX$qXZ&XZ[$q[^&X^p$qpq&Xqr-_rs&}sv-_vw/^wx(tx!P-_!P!Q$q!Q!^-_!^!_1n!_!a&X!a#S-_#S#T3V#T#s-_#s$f$q$f;'S-_;'S;=`4s<%l?Ah-_?Ah?BY$q?BY?Mn-_?MnO$q[/echSkWOX+PZ[+P^p+Pqr/^sw/^x!P/^!P!Q+P!Q!^/^!^!_0p!a#S/^#S#T0p#T#s/^#s$f+P$f;'S/^;'S;=`1h<%l?Ah/^?Ah?BY+P?BY?Mn/^?MnO+PS0uXhSqr0psw0px!P0p!Q!_0p!a#s0p$f;'S0p;'S;=`1b<%l?Ah0p?BY?Mn0pS1eP;=`<%l0p[1kP;=`<%l/^!U1wbhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!U3SP;=`<%l1n!V3bchS`P!a`!cpOq&Xqr3Vrs&}sv3Vvw0pwx(tx!P3V!P!Q&X!Q!^3V!^!_1n!_!a&X!a#s3V#s$f&X$f;'S3V;'S;=`4m<%l?Ah3V?Ah?BY&X?BY?Mn3V?MnO&X!V4pP;=`<%l3V!_4vP;=`<%l-_!Z5SV!`h`P!cpOv&}wx'kx!^&}!^!_(V!_;'S&};'S;=`(n<%lO&}!_5rjhSkWc!ROX7dXZ8qZ[7d[^8q^p7dqr:crs8qst@Ttw:cwx8qx!P:c!P!Q7d!Q!]:c!]!^/^!^!_=p!_!a8q!a#S:c#S#T=p#T#s:c#s$f7d$f;'S:c;'S;=`?}<%l?Ah:c?Ah?BY7d?BY?Mn:c?MnO7d!Z7ibkWOX7dXZ8qZ[7d[^8q^p7dqr7drs8qst+Ptw7dwx8qx!]7d!]!^9f!^!a8q!a#S7d#S#T8q#T;'S7d;'S;=`:]<%lO7d!R8tVOp8qqs8qt!]8q!]!^9Z!^;'S8q;'S;=`9`<%lO8q!R9`Oa!R!R9cP;=`<%l8q!Z9mYkWa!ROX+PZ[+P^p+Pqr+Psw+Px!^+P!a#S+P#T;'S+P;'S;=`+t<%lO+P!Z:`P;=`<%l7d!_:jjhSkWOX7dXZ8qZ[7d[^8q^p7dqr:crs8qst/^tw:cwx8qx!P:c!P!Q7d!Q!]:c!]!^<[!^!_=p!_!a8q!a#S:c#S#T=p#T#s:c#s$f7d$f;'S:c;'S;=`?}<%l?Ah:c?Ah?BY7d?BY?Mn:c?MnO7d!_b#d#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!>kdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#V1n#V#W!?y#W#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!@SdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#h1n#h#i!Ab#i#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!AkdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#m1n#m#n!By#n#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!CSdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#d1n#d#e!Db#e#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!DkdhS!a`!cpOq*Vqr1nrs(Vsv1nvw0pwx)ex!P1n!P!Q*V!Q!_1n!_!a*V!a#X1n#X#Y!5]#Y#s1n#s$f*V$f;'S1n;'S;=`3P<%l?Ah1n?Ah?BY*V?BY?Mn1n?MnO*V!V!FSchS!a`!cpOq!G_qr!Eyrs!HUsv!Eyvw!Ncwx!Jvx!P!Ey!P!Q!G_!Q!_!Ey!_!a!G_!a!b##T!b#s!Ey#s$f!G_$f;'S!Ey;'S;=`#$i<%l?Ah!Ey?Ah?BY!G_?BY?Mn!Ey?MnO!G_!R!GfY!a`!cpOr!G_rs!HUsv!G_vw!Hpwx!Jvx!a!G_!a!b!Lv!b;'S!G_;'S;=`!N]<%lO!G_q!HZV!cpOv!HUvx!Hpx!a!HU!a!b!Iq!b;'S!HU;'S;=`!Jp<%lO!HUP!HsTO!a!Hp!a!b!IS!b;'S!Hp;'S;=`!Ik<%lO!HpP!IVTO!`!Hp!`!a!If!a;'S!Hp;'S;=`!Ik<%lO!HpP!IkOxPP!InP;=`<%l!Hpq!IvV!cpOv!HUvx!Hpx!`!HU!`!a!J]!a;'S!HU;'S;=`!Jp<%lO!HUq!JdS!cpxPOv(Vx;'S(V;'S;=`(h<%lO(Vq!JsP;=`<%l!HUa!J{X!a`Or!Jvrs!Hpsv!Jvvw!Hpw!a!Jv!a!b!Kh!b;'S!Jv;'S;=`!Lp<%lO!Jva!KmX!a`Or!Jvrs!Hpsv!Jvvw!Hpw!`!Jv!`!a!LY!a;'S!Jv;'S;=`!Lp<%lO!Jva!LaT!a`xPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!LsP;=`<%l!Jv!R!L}Y!a`!cpOr!G_rs!HUsv!G_vw!Hpwx!Jvx!`!G_!`!a!Mm!a;'S!G_;'S;=`!N]<%lO!G_!R!MvV!a`!cpxPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!N`P;=`<%l!G_T!NhbhSOq!Hpqr!Ncrs!Hpsw!Ncwx!Hpx!P!Nc!P!Q!Hp!Q!_!Nc!_!a!Hp!a!b# p!b#s!Nc#s$f!Hp$f;'S!Nc;'S;=`#!}<%l?Ah!Nc?Ah?BY!Hp?BY?Mn!Nc?MnO!HpT# ubhSOq!Hpqr!Ncrs!Hpsw!Ncwx!Hpx!P!Nc!P!Q!Hp!Q!_!Nc!_!`!Hp!`!a!If!a#s!Nc#s$f!Hp$f;'S!Nc;'S;=`#!}<%l?Ah!Nc?Ah?BY!Hp?BY?Mn!Nc?MnO!HpT##QP;=`<%l!Nc!V##^chS!a`!cpOq!G_qr!Eyrs!HUsv!Eyvw!Ncwx!Jvx!P!Ey!P!Q!G_!Q!_!Ey!_!`!G_!`!a!Mm!a#s!Ey#s$f!G_$f;'S!Ey;'S;=`#$i<%l?Ah!Ey?Ah?BY!G_?BY?Mn!Ey?MnO!G_!V#$lP;=`<%l!Ey!V#$zXiS`P!a`!cpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[WN,XN,YN,GN,qN,HN,0,1,2,3,4,5],topRules:{Document:[0,15]},dialects:{noMatch:0,selfClosing:485},tokenPrec:487});function KN(e,t){let n=Object.create(null);for(let r of e.getChildren(23)){let e=r.getChild(24),i=r.getChild(26)||r.getChild(27);e&&(n[t.read(e.from,e.to)]=i?26==i.type.id?t.read(i.from+1,i.to-1):t.read(i.from,i.to):"")}return n}function ej(e,t){let n=e.getChild(22);return n?t.read(n.from,n.to):" "}function tj(e,t,n){let r;for(let i of n)if(!i.attrs||i.attrs(r||(r=KN(e.node.parent.firstChild,t))))return{parser:i.parser};return null}function nj(e=[],t=[]){let n=[],r=[],i=[],o=[];for(let t of e){("script"==t.tag?n:"style"==t.tag?r:"textarea"==t.tag?i:o).push(t)}let s=t.length?Object.create(null):null;for(let e of t)(s[e.name]||(s[e.name]=[])).push(e);return Object(eM.j)((e,t)=>{let a=e.type.id;if(28==a)return tj(e,t,n);if(31==a)return tj(e,t,r);if(34==a)return tj(e,t,i);if(20==a&&o.length){let n,r=e.node,i=r.firstChild,s=i&&ej(i,t);if(s)for(let e of o)if(e.tag==s&&(!e.attrs||e.attrs(n||(n=KN(r,t))))){let t=r.lastChild;return{parser:e.parser,overlay:[{from:i.to,to:37==t.type.id?t.from:r.to}]}}}if(s&&23==a){let n,r=e.node;if(n=r.firstChild){let e=s[t.read(n.from,n.to)];if(e)for(let n of e){if(n.tagName&&n.tagName!=ej(r.parent,t))continue;let e=r.lastChild;if(26==e.type.id){let t=e.from+1,r=e.lastChild,i=e.to-(r&&r.isError?0:1);if(i>t)return{parser:n.parser,overlay:[{from:t,to:i}]}}else if(27==e.type.id)return{parser:n.parser,overlay:[{from:e.from,to:e.to}]}}}}return null})}const rj=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288];function ij(e){return e>=65&&e<=90||e>=97&&e<=122||e>=161}const oj=new MN.b((e,t)=>{for(let r=!1,i=0,o=0;;o++){let{next:s}=e;if(!(ij(s)||45==s||95==s||r&&(n=s,n>=48&&n<=57))){r&&e.acceptToken(40==s?95:2==i&&t.canShift(2)?2:96);break}!r&&(45!=s||o>0)&&(r=!0),i===o&&45==s&&i++,e.advance()}var n}),sj=new MN.b(e=>{if(rj.includes(e.peek(-1))){let{next:t}=e;(ij(t)||95==t||35==t||46==t||91==t||58==t||45==t)&&e.acceptToken(94)}}),aj=new MN.b(e=>{if(!rj.includes(e.peek(-1))){let{next:t}=e;if(37==t&&(e.advance(),e.acceptToken(1)),ij(t)){do{e.advance()}while(ij(e.next));e.acceptToken(1)}}}),lj=oM({"AtKeyword import charset namespace keyframes media supports":EM.definitionKeyword,"from to selector":EM.keyword,NamespaceName:EM.namespace,KeyframeName:EM.labelName,TagName:EM.tagName,ClassName:EM.className,PseudoClassName:EM.constant(EM.className),IdName:EM.labelName,"FeatureName PropertyName":EM.propertyName,AttributeName:EM.attributeName,NumberLiteral:EM.number,KeywordQuery:EM.keyword,UnaryQueryOp:EM.operatorKeyword,"CallTag ValueName":EM.atom,VariableName:EM.variableName,Callee:EM.operatorKeyword,Unit:EM.unit,"UniversalSelector NestingSelector":EM.definitionOperator,MatchOp:EM.compareOperator,"ChildOp SiblingOp, LogicOp":EM.logicOperator,BinOp:EM.arithmeticOperator,Important:EM.modifier,Comment:EM.blockComment,ParenthesizedContent:EM.special(EM.name),ColorLiteral:EM.color,StringLiteral:EM.string,":":EM.punctuation,"PseudoOp #":EM.derefOperator,"; ,":EM.separator,"( )":EM.paren,"[ ]":EM.squareBracket,"{ }":EM.brace}),cj={__proto__:null,lang:32,"nth-child":32,"nth-last-child":32,"nth-of-type":32,"nth-last-of-type":32,dir:32,"host-context":32,url:60,"url-prefix":60,domain:60,regexp:60,selector:134},uj={__proto__:null,"@import":114,"@media":138,"@charset":142,"@namespace":146,"@keyframes":152,"@supports":164},dj={__proto__:null,not:128,only:128,from:158,to:160},hj=MN.c.deserialize({version:14,states:"7WQYQ[OOO#_Q[OOOOQP'#Cd'#CdOOQP'#Cc'#CcO#fQ[O'#CfO$YQXO'#CaO$aQ[O'#ChO$lQ[O'#DPO$qQ[O'#DTOOQP'#Ed'#EdO$vQdO'#DeO%bQ[O'#DrO$vQdO'#DtO%sQ[O'#DvO&OQ[O'#DyO&TQ[O'#EPO&cQ[O'#EROOQS'#Ec'#EcOOQS'#ET'#ETQYQ[OOO&jQXO'#CdO'_QWO'#DaO'dQWO'#EjO'oQ[O'#EjQOQWOOOOQP'#Cg'#CgOOQP,59Q,59QO#fQ[O,59QO'yQ[O'#EWO(eQWO,58{O(mQ[O,59SO$lQ[O,59kO$qQ[O,59oO'yQ[O,59sO'yQ[O,59uO'yQ[O,59vO(xQ[O'#D`OOQS,58{,58{OOQP'#Ck'#CkOOQO'#C}'#C}OOQP,59S,59SO)PQWO,59SO)UQWO,59SOOQP'#DR'#DROOQP,59k,59kOOQO'#DV'#DVO)ZQ`O,59oOOQS'#Cp'#CpO$vQdO'#CqO)cQvO'#CsO*pQtO,5:POOQO'#Cx'#CxO)UQWO'#CwO+UQWO'#CyOOQS'#Eg'#EgOOQO'#Dh'#DhO+ZQ[O'#DoO+iQWO'#EkO&TQ[O'#DmO+wQWO'#DpOOQO'#El'#ElO(hQWO,5:^O+|QpO,5:`OOQS'#Dx'#DxO,UQWO,5:bO,ZQ[O,5:bOOQO'#D{'#D{O,cQWO,5:eO,hQWO,5:kO,pQWO,5:mOOQS-E8R-E8RO$vQdO,59{O,xQ[O'#EYO-VQWO,5;UO-VQWO,5;UOOQP1G.l1G.lO-|QXO,5:rOOQO-E8U-E8UOOQS1G.g1G.gOOQP1G.n1G.nO)PQWO1G.nO)UQWO1G.nOOQP1G/V1G/VO.ZQ`O1G/ZO.tQXO1G/_O/[QXO1G/aO/rQXO1G/bO0YQWO,59zO0_Q[O'#DOO0fQdO'#CoOOQP1G/Z1G/ZO$vQdO1G/ZO0mQpO,59]OOQS,59_,59_O$vQdO,59aO0uQWO1G/kOOQS,59c,59cO0zQ!bO,59eO1SQWO'#DhO1_QWO,5:TO1dQWO,5:ZO&TQ[O,5:VO&TQ[O'#EZO1lQWO,5;VO1wQWO,5:XO'yQ[O,5:[OOQS1G/x1G/xOOQS1G/z1G/zOOQS1G/|1G/|O2YQWO1G/|O2_QdO'#D|OOQS1G0P1G0POOQS1G0V1G0VOOQS1G0X1G0XO2mQtO1G/gOOQO,5:t,5:tO3TQ[O,5:tOOQO-E8W-E8WO3bQWO1G0pOOQP7+$Y7+$YOOQP7+$u7+$uO$vQdO7+$uOOQS1G/f1G/fO3mQXO'#EiO3tQWO,59jO3yQtO'#EUO4nQdO'#EfO4xQWO,59ZO4}QpO7+$uOOQS1G.w1G.wOOQS1G.{1G.{OOQS7+%V7+%VO5VQWO1G/PO$vQdO1G/oOOQO1G/u1G/uOOQO1G/q1G/qO5[QWO,5:uOOQO-E8X-E8XO5jQXO1G/vOOQS7+%h7+%hO5qQYO'#CsO(hQWO'#E[O5yQdO,5:hOOQS,5:h,5:hO6XQtO'#EXO$vQdO'#EXO7VQdO7+%ROOQO7+%R7+%ROOQO1G0`1G0`O7jQpO<T![;'S%^;'S;=`%o<%lO%^^;TUoWOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^^;nYoW#[UOy%^z!Q%^!Q![;g![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^^[[oW#[UOy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^_?VSpVOy%^z;'S%^;'S;=`%o<%lO%^^?hWjSOy%^z!O%^!O!P;O!P!Q%^!Q![>T![;'S%^;'S;=`%o<%lO%^_@VU#XPOy%^z!Q%^!Q![;g![;'S%^;'S;=`%o<%lO%^~@nTjSOy%^z{@}{;'S%^;'S;=`%o<%lO%^~ASUoWOy@}yzAfz{Bm{;'S@};'S;=`Co<%lO@}~AiTOzAfz{Ax{;'SAf;'S;=`Bg<%lOAf~A{VOzAfz{Ax{!PAf!P!QBb!Q;'SAf;'S;=`Bg<%lOAf~BgOR~~BjP;=`<%lAf~BrWoWOy@}yzAfz{Bm{!P@}!P!QC[!Q;'S@};'S;=`Co<%lO@}~CcSoWR~Oy%^z;'S%^;'S;=`%o<%lO%^~CrP;=`<%l@}^Cz[#[UOy%^z!O%^!O!P;g!P!Q%^!Q![>T![!g%^!g!h<^!h#X%^#X#Y<^#Y;'S%^;'S;=`%o<%lO%^XDuU]POy%^z![%^![!]EX!];'S%^;'S;=`%o<%lO%^XE`S^PoWOy%^z;'S%^;'S;=`%o<%lO%^_EqS!WVOy%^z;'S%^;'S;=`%o<%lO%^YFSSzQOy%^z;'S%^;'S;=`%o<%lO%^XFeU|POy%^z!`%^!`!aFw!a;'S%^;'S;=`%o<%lO%^XGOS|PoWOy%^z;'S%^;'S;=`%o<%lO%^XG_WOy%^z!c%^!c!}Gw!}#T%^#T#oGw#o;'S%^;'S;=`%o<%lO%^XHO[!YPoWOy%^z}%^}!OGw!O!Q%^!Q![Gw![!c%^!c!}Gw!}#T%^#T#oGw#o;'S%^;'S;=`%o<%lO%^XHySxPOy%^z;'S%^;'S;=`%o<%lO%^^I[SvUOy%^z;'S%^;'S;=`%o<%lO%^XIkUOy%^z#b%^#b#cI}#c;'S%^;'S;=`%o<%lO%^XJSUoWOy%^z#W%^#W#XJf#X;'S%^;'S;=`%o<%lO%^XJmS!`PoWOy%^z;'S%^;'S;=`%o<%lO%^XJ|UOy%^z#f%^#f#gJf#g;'S%^;'S;=`%o<%lO%^XKeS!RPOy%^z;'S%^;'S;=`%o<%lO%^_KvS!QVOy%^z;'S%^;'S;=`%o<%lO%^ZLXU!PPOy%^z!_%^!_!`6y!`;'S%^;'S;=`%o<%lO%^WLnP;=`<%l$}",tokenizers:[sj,aj,oj,0,1,2,3],topRules:{StyleSheet:[0,4],Styles:[1,84]},specialized:[{term:95,get:e=>cj[e]||-1},{term:56,get:e=>uj[e]||-1},{term:96,get:e=>dj[e]||-1}],tokenPrec:1123});let pj=null;function fj(){if(!pj&&"object"==typeof document&&document.body){let{style:e}=document.body,t=[],n=new Set;for(let r in e)"cssText"!=r&&"cssFloat"!=r&&"string"==typeof e[r]&&(/[A-Z]/.test(r)&&(r=r.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())),n.has(r)||(t.push(r),n.add(r)));pj=t.sort().map(e=>({type:"property",label:e}))}return pj||[]}const mj=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(e=>({type:"class",label:e})),gj=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(e=>({type:"keyword",label:e})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(e=>({type:"constant",label:e}))),bj=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(e=>({type:"type",label:e})),vj=/^(\w[\w-]*|-\w[\w-]*|)$/,yj=/^-(-[\w-]*)?$/;const _j=new eM.f,Sj=["Declaration"];function xj(e){for(let t=e;;){if(t.type.isTop)return t;if(!(t=t.parent))return e}}function wj(e,t,n){if(t.to-t.from>4096){let r=_j.get(t);if(r)return r;let i=[],o=new Set,s=t.cursor(eM.b.IncludeAnonymous);if(s.firstChild())do{for(let t of wj(e,s.node,n))o.has(t.label)||(o.add(t.label),i.push(t))}while(s.nextSibling());return _j.set(t,i),i}{let r=[],i=new Set;return t.cursor().iterate(t=>{var o;if(n(t)&&t.matchContext(Sj)&&":"==(null===(o=t.node.nextSibling)||void 0===o?void 0:o.name)){let n=e.sliceString(t.from,t.to);i.has(n)||(i.add(n),r.push({label:n,type:"variable"}))}}),r}}const kj=(e=>t=>{let{state:n,pos:r}=t,i=IM(n).resolveInner(r,-1),o=i.type.isError&&i.from==i.to-1&&"-"==n.doc.sliceString(i.from,i.to);if("PropertyName"==i.name||(o||"TagName"==i.name)&&/^(Block|Styles)$/.test(i.resolve(i.to).name))return{from:i.from,options:fj(),validFor:vj};if("ValueName"==i.name)return{from:i.from,options:gj,validFor:vj};if("PseudoClassName"==i.name)return{from:i.from,options:mj,validFor:vj};if(e(i)||(t.explicit||o)&&function(e,t){var n;if(("("==e.name||e.type.isError)&&(e=e.parent||e),"ArgList"!=e.name)return!1;let r=null===(n=e.parent)||void 0===n?void 0:n.firstChild;return"Callee"==(null==r?void 0:r.name)&&"var"==t.sliceString(r.from,r.to)}(i,n.doc))return{from:e(i)||o?i.from:r,options:wj(n.doc,xj(i),e),validFor:yj};if("TagName"==i.name){for(let{parent:e}=i;e;e=e.parent)if("Block"==e.name)return{from:i.from,options:fj(),validFor:vj};return{from:i.from,options:bj,validFor:vj}}if(!t.explicit)return null;let s=i.resolve(r),a=s.childBefore(r);return a&&":"==a.name&&"PseudoClassSelector"==s.name?{from:r,options:mj,validFor:vj}:a&&":"==a.name&&"Declaration"==s.name||"ArgList"==s.name?{from:r,options:gj,validFor:vj}:"Block"==s.name||"Styles"==s.name?{from:r,options:fj(),validFor:vj}:null})(e=>"VariableName"==e.name),Oj=RM.define({name:"css",parser:hj.configure({props:[ZM.add({Declaration:sP()}),lP.add({Block:cP})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function Ej(){return new qM(Oj,Oj.data.of({autocomplete:kj}))}const Aj=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Tj=new MN.a({start:!1,shift:(e,t)=>3==t||4==t||305==t?e:306==t,strict:!1}),Cj=new MN.b((e,t)=>{let{next:n}=e;(125==n||-1==n||t.context)&&t.canShift(303)&&e.acceptToken(303)},{contextual:!0,fallback:!0}),Mj=new MN.b((e,t)=>{let n,{next:r}=e;Aj.indexOf(r)>-1||(47!=r||47!=(n=e.peek(1))&&42!=n)&&125!=r&&59!=r&&-1!=r&&!t.context&&t.canShift(302)&&e.acceptToken(302)},{contextual:!0}),Pj=new MN.b((e,t)=>{let{next:n}=e;if((43==n||45==n)&&(e.advance(),n==e.next)){e.advance();let n=!t.context&&t.canShift(1);e.acceptToken(n?1:2)}},{contextual:!0}),$j=oM({"get set async static":EM.modifier,"for while do if else switch try catch finally return throw break continue default case":EM.controlKeyword,"in of await yield void typeof delete instanceof":EM.operatorKeyword,"let var const function class extends":EM.definitionKeyword,"import export from":EM.moduleKeyword,"with debugger as new":EM.keyword,TemplateString:EM.special(EM.string),super:EM.atom,BooleanLiteral:EM.bool,this:EM.self,null:EM.null,Star:EM.modifier,VariableName:EM.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":EM.function(EM.variableName),VariableDefinition:EM.definition(EM.variableName),Label:EM.labelName,PropertyName:EM.propertyName,PrivatePropertyName:EM.special(EM.propertyName),"CallExpression/MemberExpression/PropertyName":EM.function(EM.propertyName),"FunctionDeclaration/VariableDefinition":EM.function(EM.definition(EM.variableName)),"ClassDeclaration/VariableDefinition":EM.definition(EM.className),PropertyDefinition:EM.definition(EM.propertyName),PrivatePropertyDefinition:EM.definition(EM.special(EM.propertyName)),UpdateOp:EM.updateOperator,LineComment:EM.lineComment,BlockComment:EM.blockComment,Number:EM.number,String:EM.string,Escape:EM.escape,ArithOp:EM.arithmeticOperator,LogicOp:EM.logicOperator,BitOp:EM.bitwiseOperator,CompareOp:EM.compareOperator,RegExp:EM.regexp,Equals:EM.definitionOperator,Arrow:EM.function(EM.punctuation),": Spread":EM.punctuation,"( )":EM.paren,"[ ]":EM.squareBracket,"{ }":EM.brace,"InterpolationStart InterpolationEnd":EM.special(EM.brace),".":EM.derefOperator,", ;":EM.separator,"@":EM.meta,TypeName:EM.typeName,TypeDefinition:EM.definition(EM.typeName),"type enum interface implements namespace module declare":EM.definitionKeyword,"abstract global Privacy readonly override":EM.modifier,"is keyof unique infer":EM.operatorKeyword,JSXAttributeValue:EM.attributeValue,JSXText:EM.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":EM.angleBracket,"JSXIdentifier JSXNameSpacedName":EM.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":EM.attributeName,"JSXBuiltin/JSXIdentifier":EM.standard(EM.tagName)}),Rj={__proto__:null,export:14,as:19,from:27,default:30,async:35,function:36,extends:46,this:50,true:58,false:58,null:70,void:74,typeof:78,super:96,new:130,delete:146,yield:155,await:159,class:164,public:221,private:221,protected:221,readonly:223,instanceof:242,satisfies:245,in:246,const:248,import:280,keyof:335,unique:339,infer:345,is:381,abstract:401,implements:403,type:405,let:408,var:410,interface:417,enum:421,namespace:427,module:429,declare:433,global:437,for:456,of:465,while:468,with:472,do:476,if:480,else:482,switch:486,case:492,try:498,catch:502,finally:506,return:510,throw:514,break:518,continue:522,debugger:526},Ij={__proto__:null,async:117,get:119,set:121,declare:181,public:183,private:183,protected:183,static:185,abstract:187,override:189,readonly:195,accessor:197,new:385},Dj={__proto__:null,"<":137},Nj=MN.c.deserialize({version:14,states:"$6[O`QUOOO%QQUOOO'TQWOOP(bOSOOO*pQ(CjO'#CfO*wOpO'#CgO+VO!bO'#CgO+eO07`O'#DZO-vQUO'#DaO.WQUO'#DlO%QQUO'#DvO0[QUO'#EOOOQ(CY'#EW'#EWO0uQSO'#ETOOQO'#Ei'#EiOOQO'#Ib'#IbO0}QSO'#GkO1YQSO'#EhO1_QSO'#EhO3aQ(CjO'#JcO6QQ(CjO'#JdO6nQSO'#FWO6sQ#tO'#FoOOQ(CY'#F`'#F`O7OO&jO'#F`O7^Q,UO'#FvO8tQSO'#FuOOQ(CY'#Jd'#JdOOQ(CW'#Jc'#JcOOQQ'#KO'#KOO8yQSO'#IOO9OQ(C[O'#IPOOQQ'#JP'#JPOOQQ'#IT'#ITQ`QUOOO%QQUO'#DnO9WQUO'#DzO%QQUO'#D|O9_QSO'#GkO9dQ,UO'#ClO9rQSO'#EgO9}QSO'#ErO:SQ,UO'#F_O:qQSO'#GkO:vQSO'#GoO;RQSO'#GoO;aQSO'#GrO;aQSO'#GsO;aQSO'#GuO9_QSO'#GxOQQSO'#HnO>VQ(C]O'#HtO%QQUO'#HvO>bQ(C]O'#HxO>mQ(C]O'#HzO9OQ(C[O'#H|O>xQ(CjO'#CfO?zQWO'#DfQOQSOOO@bQSO'#EPO9dQ,UO'#EgO@mQSO'#EgO@xQ`O'#F_OOQQ'#Cd'#CdOOQ(CW'#Dk'#DkOOQ(CW'#Jg'#JgO%QQUO'#JgOOQO'#Jk'#JkOOQO'#I_'#I_OAxQWO'#E`OOQ(CW'#E_'#E_OBtQ(C`O'#E`OCOQWO'#ESOOQO'#Jj'#JjOCdQWO'#JkODqQWO'#ESOCOQWO'#E`PEOO?MpO'#C`POOO)CDn)CDnOOOO'#IU'#IUOEZOpO,59ROOQ(CY,59R,59ROOOO'#IV'#IVOEiO!bO,59RO%QQUO'#D]OOOO'#IX'#IXOEwO07`O,59uOOQ(CY,59u,59uOFVQUO'#IYOFjQSO'#JeOHlQbO'#JeO+sQUO'#JeOHsQSO,59{OIZQSO'#EiOIhQSO'#JsOIsQSO'#JrOIsQSO'#JrOI{QSO,5;VOJQQSO'#JqOOQ(CY,5:W,5:WOJXQUO,5:WOLYQ(CjO,5:bOLyQSO,5:jOMdQ(C[O'#JpOMkQSO'#JoO:vQSO'#JoONPQSO'#JoONXQSO,5;UON^QSO'#JoO!!fQbO'#JdOOQ(CY'#Cf'#CfO%QQUO'#EOO!#UQ`O,5:oOOQO'#Jl'#JlOOQO-E<`-E<`O9_QSO,5=VO!#lQSO,5=VO!#qQUO,5;SO!%tQ,UO'#EdO!'XQSO,5;SO!(qQ,UO'#DpO!(xQUO'#DuO!)SQWO,5;]O!)[QWO,5;]O%QQUO,5;]OOQQ'#FO'#FOOOQQ'#FQ'#FQO%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^O%QQUO,5;^OOQQ'#FU'#FUO!)jQUO,5;oOOQ(CY,5;t,5;tOOQ(CY,5;u,5;uO!+mQSO,5;uOOQ(CY,5;v,5;vO%QQUO'#IfO!+uQ(C[O,5jOOQQ'#JX'#JXOOQQ,5>k,5>kOOQQ-ERQ(C[O'#JYO8tQSO'#JYO!>dQ(C[O,59WO!>oQWO,59WO!>wQ,UO,59WO9dQ,UO,59WO!?SQSO,5;SO!?[QSO'#HWO!?mQSO'#KSO%QQUO,5;wO!?uQWO,5;yO!?zQSO,5=qO!@PQSO,5=qO!@UQSO,5=qO9OQ(C[O,5=qO!@dQSO'#EkO!A^QWO'#ElOOQ(CW'#Jq'#JqO!AeQ(C[O'#KPO9OQ(C[O,5=ZO;aQSO,5=aOOQO'#Cr'#CrO!ApQWO,5=^O!AxQ,UO,5=_O!BTQSO,5=aO!BYQ`O,5=dO>QQSO'#G}O9_QSO'#HPO!BbQSO'#HPO9dQ,UO'#HRO!BgQSO'#HROOQQ,5=g,5=gO!BlQSO'#HSO!BtQSO'#ClO!ByQSO,58|O!CTQSO,58|O!E]QUO,58|OOQQ,58|,58|O!EjQ(C[O,58|O%QQUO,58|O!EuQUO'#HZOOQQ'#H['#H[OOQQ'#H]'#H]O`QUO,5=sO!FVQSO,5=sO`QUO,5=yO`QUO,5={O!F[QSO,5=}O`QUO,5>PO!FaQSO,5>SO!FfQUO,5>YOOQQ,5>`,5>`O%QQUO,5>`O9OQ(C[O,5>bOOQQ,5>d,5>dO!JmQSO,5>dOOQQ,5>f,5>fO!JmQSO,5>fOOQQ,5>h,5>hO!JrQWO'#DXO%QQUO'#JgO!KaQWO'#JgO!LOQWO'#DgO!LaQWO'#DgO!NrQUO'#DgO!NyQSO'#JfO# RQSO,5:QO# WQSO'#EmO# fQSO'#JtO# nQSO,5;WO# sQWO'#DgO#!QQWO'#EROOQ(CY,5:k,5:kO%QQUO,5:kO#!XQSO,5:kO>QQSO,5;RO!>oQWO,5;RO!>wQ,UO,5;RO9dQ,UO,5;RO#!aQSO,5@RO#!fQ!LQO,5:oOOQO-E<]-E<]O##lQ(C`O,5:zOCOQWO,5:nO##vQWO,5:nOCOQWO,5:zO!>dQ(C[O,5:nOOQ(CW'#Ec'#EcOOQO,5:z,5:zO%QQUO,5:zO#$TQ(C[O,5:zO#$`Q(C[O,5:zO!>oQWO,5:nOOQO,5;Q,5;QO#$nQ(C[O,5:zPOOO'#IS'#ISP#%SO?MpO,58zPOOO,58z,58zOOOO-EtO+sQUO,5>tOOQO,5>z,5>zO#%nQUO'#IYOOQO-EdQ(C[O1G.rO!>oQWO1G.rO!>wQ,UO1G.rO$%YQSO1G0nO$%_QSO'#CfO$%jQSO'#KTO$%rQSO,5=rO$%wQSO'#KTO$%|QSO'#KTO$&XQSO'#IsO$&gQSO,5@nO$&oQbO1G1cOOQ(CY1G1e1G1eO9_QSO1G3]O?rQSO1G3]O$&vQSO1G3]O$&{QSO1G3]OOQQ1G3]1G3]O:vQSO'#JrO:vQSO'#EmO%QQUO'#EmO:vQSO'#ImO$'QQ(C[O,5@kOOQQ1G2u1G2uO!BTQSO1G2{O!%tQ,UO1G2xO$']QSO1G2xOOQQ1G2y1G2yO!%tQ,UO1G2yO$'bQSO1G2yO$'jQWO'#GwOOQQ1G2{1G2{O!3cQWO'#IoO!BYQ`O1G3OOOQQ1G3O1G3OOOQQ,5=i,5=iO$'rQ,UO,5=kO9_QSO,5=kO#K`QSO,5=mO8tQSO,5=mO!>oQWO,5=mO!>wQ,UO,5=mO9dQ,UO,5=mO$(QQSO'#KRO$(]QSO,5=nOOQQ1G.h1G.hO$(bQ(C[O1G.hO?rQSO1G.hO$(mQSO1G.hO9OQ(C[O1G.hO$*rQbO,5@pO$+SQSO,5@pO$+_QUO,5=uO$+fQSO,5=uO:vQSO,5@pOOQQ1G3_1G3_O`QUO1G3_OOQQ1G3e1G3eOOQQ1G3g1G3gO={QSO1G3iO$+kQUO1G3kO$/lQUO'#HjOOQQ1G3n1G3nO$/yQSO'#HpO>QQSO'#HrOOQQ1G3t1G3tO$0RQUO1G3tO9OQ(C[O1G3zOOQQ1G3|1G3|OOQ(CW'#GW'#GWO9OQ(C[O1G4OO9OQ(C[O1G4QO$4VQSO,5@RO!)jQUO,5;XO:vQSO,5;XO>QQSO,5:RO!)jQUO,5:RO!>oQWO,5:RO$4[Q$IUO,5:ROOQO,5;X,5;XO$4fQWO'#IZO$4|QSO,5@QOOQ(CY1G/l1G/lO$5UQWO'#IaO$5`QSO,5@`OOQ(CW1G0r1G0rO!LaQWO,5:ROOQO'#I^'#I^O$5hQWO,5:mOOQ(CY,5:m,5:mO#![QSO1G0VOOQ(CY1G0V1G0VO%QQUO1G0VOOQ(CY1G0m1G0mO>QQSO1G0mO!>oQWO1G0mO!>wQ,UO1G0mOOQ(CW1G5m1G5mO!>dQ(C[O1G0YOOQO1G0f1G0fO%QQUO1G0fO$5oQ(C[O1G0fO$5zQ(C[O1G0fO!>oQWO1G0YOCOQWO1G0YO$6YQ(C[O1G0fOOQO1G0Y1G0YO$6nQ(CjO1G0fPOOO-EtO$7[QSO1G5kO$7dQSO1G5xO$7lQbO1G5yO:vQSO,5>zO$7vQ(CjO1G5vO%QQUO1G5vO$8WQ(C[O1G5vO$8iQSO1G5uO$8iQSO1G5uO:vQSO1G5uO$8qQSO,5>}O:vQSO,5>}OOQO,5>},5>}O$9VQSO,5>}O$ mQSO,5>}OOQO-EcQ(CjO,5oQWO,5dQ(C[O7+$^O!>oQWO7+$^O!#qQUO7+&YO$NgQSO'#IrO$N{QSO,5@oOOQO1G3^1G3^O9_QSO,5@oO$N{QSO,5@oO% TQSO,5@oOOQO,5?_,5?_OOQO-EoQWO1G3XO!>wQ,UO1G3XO%$RQSO'#IqO%$^QSO,5@mO%$fQWO,5@mOOQ(CW1G3Y1G3YOOQQ7+$S7+$SO?rQSO7+$SO9OQ(C[O7+$SO%$qQSO7+$SO%QQUO1G6[O%QQUO1G6]O%$vQUO1G3aO%$}QSO1G3aO%%SQUO1G3aO%%ZQ(C[O1G6[OOQQ7+(y7+(yO9OQ(C[O7+)TO`QUO7+)VOOQQ'#KW'#KWOOQQ'#It'#ItO%%eQUO,5>UOOQQ,5>U,5>UO%QQUO'#HkO%%rQSO'#HmOOQQ,5>[,5>[O:vQSO,5>[OOQQ,5>^,5>^OOQQ7+)`7+)`OOQQ7+)f7+)fOOQQ7+)j7+)jOOQQ7+)l7+)lO%%wQWO1G5mO%&]Q$IUO1G0sO%&gQSO1G0sOOQO1G/m1G/mO%&rQ$IUO1G/mO>QQSO1G/mO!)jQUO'#DgOOQO,5>u,5>uOOQO-E{,5>{OOQO-E<_-E<_O!>oQWO1G/mOOQO-E<[-E<[OOQ(CY1G0X1G0XOOQ(CY7+%q7+%qO#![QSO7+%qOOQ(CY7+&X7+&XO>QQSO7+&XO!>oQWO7+&XOOQO7+%t7+%tO$6nQ(CjO7+&QOOQO7+&Q7+&QO%QQUO7+&QO%&|Q(C[O7+&QO!>dQ(C[O7+%tO!>oQWO7+%tO%'XQ(C[O7+&QO%'gQ(CjO7++bO%QQUO7++bO%'wQSO7++aO%'wQSO7++aOOQO1G4i1G4iO:vQSO1G4iO%(PQSO1G4iOOQO7+%y7+%yO#![QSO<vOOQO-EwO%QQUO,5>wOOQO-ESQ(CjO<oQWO1G2bOBoQSO1G2cO%EsQSO1G2dO%E{QSO1G2cO!'^Q,UO7+*}OOQ(CY1G/[1G/[O%FWQSO1G/[OOQ(CY7+'n7+'nO%F]Q,UO7+'uO%FmQ(CjO<dQ(C[O<oQWO7+(sO%JhQSO,5?]OOQO-EVOOQQ,5>X,5>XO%KmQSO1G3vO:vQSO7+&_O!)jQUO7+&_OOQO7+%X7+%XO%KrQ$IUO1G5yO>QQSO7+%XOOQ(CY<QQSO<dQ(C[O<QQSO7+)bO&3ZQSO<zAN>zO%QQUOAN?WOOQO<OQ$IUO7+'uO&?tQ,UOG26{OOQO<QOP$YOX:TOk9wOy#vOz#wO|#xO!e9yO!f#tO!h#uO!l$YO#g9uO#h9vO#i9vO#j9vO#k9xO#l9yO#m9yO#n:SO#o9yO#q9zO#s9|O#u:OO#v:PO(RVO(b$WO(i#yO(j#zO~O#y.dO~P#@_O#X:UO#{:UO#y(WX!W(WX~PNlO^'Ya!V'Ya'k'Ya'i'Ya!g'Ya!S'Yao'Ya!X'Ya%a'Ya!a'Ya~P!6UOP#fiX#fi^#fik#fiz#fi!V#fi!e#fi!f#fi!h#fi!l#fi#g#fi#h#fi#i#fi#j#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi'k#fi(R#fi(b#fi'i#fi!S#fi!g#fio#fi!X#fi%a#fi!a#fi~P#)tO^#zi!V#zi'k#zi'i#zi!S#zi!g#zio#zi!X#zi%a#zi!a#zi~P!6UO$W.iO$Y.iO~O$W.jO$Y.jO~O!a)YO#X.kO!X$^X$T$^X$W$^X$Y$^X$a$^X~O!U.lO~O!X)]O$T.nO$W)[O$Y)[O$a.oO~O!V:QO!W(VX~P#@_O!W.pO~O!a)YO$a(kX~O$a.rO~Oq)lO(S)mO(T.uO~Ol.xO!S.yO'vTO'yUO~O!VcX!acX!gcX!g$sX(bcX~P!.xO!g/PO~P#)tO!V/QO!a#rO(b'bO!g(oX~O!g/VO~O!U)}O't%eO!g(oP~O#d/XO~O!S$sX!V$sX!a$zX~P!.xO!V/YO!S(pX~P#)tO!a/[O~O!S/^O~Ok/bO!a#rO!h%ZO'}%OO(b'bO~O't/dO~O!a*}O~O^%^O!V/hO'k%^O~O!W/jO~P!2vO!]/kO!^/kO'u!iO(U!jO~O|/mO(U!jO~O#T/nO~O't%|Od'_X!V'_X~O!V*gOd(Oa~Od/sO~Oy/tOz/tO|/uOgva(iva(jva!Vva#Xva~Odva#yva~P#L|Oy)qO|)rOg$la(i$la(j$la!V$la#X$la~Od$la#y$la~P#MrOy)qO|)rOg$na(i$na(j$na!V$na#X$na~Od$na#y$na~P#NeO#d/wO~Od$|a!V$|a#X$|a#y$|a~P!0RO!a#rO~O#d/zO~Oy#vOz#wO|#xO!f#tO!h#uO(RVOP!niX!nik!ni!V!ni!e!ni!l!ni#g!ni#h!ni#i!ni#j!ni#k!ni#l!ni#m!ni#n!ni#o!ni#q!ni#s!ni#u!ni#v!ni(b!ni(i!ni(j!ni~O^!ni'k!ni'i!ni!S!ni!g!nio!ni!X!ni%a!ni!a!ni~P$ wOg.PO!X'QO%a.OO~Oi0RO't0QO~P!0sO!a*}O^'|a!X'|a'k'|a!V'|a~O#d0XO~OXYX!VcX!WcX~O!V0YO!W(wX~O!W0[O~OX0]O~O't+VO'vTO'yUO~O!X%nO't%eO]'gX!V'gX~O!V+[O](va~O!g0bO~P!6UOX0eO~O]0fO~O!V+hO^(sa'k(sa~O#X0lO~Og0oO!X$yO~O(U(oO!W(tP~Og0xO!X0uO%a0wO'}%OO~OX1SO!V1QO!W(uX~O!W1TO~O]1VO^%^O'k%^O~O't#jO'vTO'yUO~O#X$bO#{$bOP(WXX(WXk(WXy(WXz(WX|(WX!V(WX!e(WX!h(WX!l(WX#g(WX#h(WX#i(WX#j(WX#k(WX#l(WX#m(WX#n(WX#q(WX#s(WX#u(WX#v(WX(R(WX(b(WX(i(WX(j(WX~O#o1YO&Q1ZO^(WX!f(WX~P$(xO#X$bO#o1YO&Q1ZO~O^1[O~P%QO^1^O~O&Z1bOP&XiQ&XiV&Xi^&Xia&Xib&Xii&Xik&Xil&Xim&Xis&Xiu&Xiw&Xi|&Xi!Q&Xi!R&Xi!X&Xi!c&Xi!h&Xi!k&Xi!l&Xi!m&Xi!o&Xi!q&Xi!t&Xi!x&Xi#p&Xi$Q&Xi$U&Xi%`&Xi%b&Xi%d&Xi%e&Xi%h&Xi%j&Xi%m&Xi%n&Xi%p&Xi%|&Xi&S&Xi&U&Xi&W&Xi&Y&Xi&]&Xi&c&Xi&i&Xi&k&Xi&m&Xi&o&Xi&q&Xi'i&Xi't&Xi'v&Xi'y&Xi(R&Xi(a&Xi(n&Xi!W&Xi_&Xi&`&Xi~O_1hO!W1fO&`1gO~P`O!XXO!h1jO~O&g,eOP&biQ&biV&bi^&bia&bib&bii&bik&bil&bim&bis&biu&biw&bi|&bi!Q&bi!R&bi!X&bi!c&bi!h&bi!k&bi!l&bi!m&bi!o&bi!q&bi!t&bi!x&bi#p&bi$Q&bi$U&bi%`&bi%b&bi%d&bi%e&bi%h&bi%j&bi%m&bi%n&bi%p&bi%|&bi&S&bi&U&bi&W&bi&Y&bi&]&bi&c&bi&i&bi&k&bi&m&bi&o&bi&q&bi'i&bi't&bi'v&bi'y&bi(R&bi(a&bi(n&bi!W&bi&Z&bi_&bi&`&bi~O!S1pO~O!V!Za!W!Za~P#@_Ol!kO|!lO!U1vO(U!jO!V&}X!W&}X~P?fO!V,uO!W(Ya~O!V'TX!W'TX~P!@xO!V,xO!W(ha~O!W1}O~P'TO^%^O#X2WO'k%^O~O^%^O!a#rO#X2WO'k%^O~O^%^O!a#rO!l2[O#X2WO'k%^O(b'bO~O^%^O'k%^O~P!6UO!V$^Oo$ka~O!S&|i!V&|i~P!6UO!V'vO!S(Xi~O!V'}O!S(fi~O!S(gi!V(gi~P!6UO!V(di!g(di^(di'k(di~P!6UO#X2^O!V(di!g(di^(di'k(di~O!V(ZO!g(ci~O|%vO!X%wO!x]O#b2cO#c2bO't%eO~O|%vO!X%wO#c2bO't%eO~Og2jO!X'QO%a2iO~Og2jO!X'QO%a2iO'}%OO~O#dvaPvaXva^vakva!eva!fva!hva!lva#gva#hva#iva#jva#kva#lva#mva#nva#ova#qva#sva#uva#vva'kva(Rva(bva!gva!Sva'ivaova!Xva%ava!ava~P#L|O#d$laP$laX$la^$lak$laz$la!e$la!f$la!h$la!l$la#g$la#h$la#i$la#j$la#k$la#l$la#m$la#n$la#o$la#q$la#s$la#u$la#v$la'k$la(R$la(b$la!g$la!S$la'i$lao$la!X$la%a$la!a$la~P#MrO#d$naP$naX$na^$nak$naz$na!e$na!f$na!h$na!l$na#g$na#h$na#i$na#j$na#k$na#l$na#m$na#n$na#o$na#q$na#s$na#u$na#v$na'k$na(R$na(b$na!g$na!S$na'i$nao$na!X$na%a$na!a$na~P#NeO#d$|aP$|aX$|a^$|ak$|az$|a!V$|a!e$|a!f$|a!h$|a!l$|a#g$|a#h$|a#i$|a#j$|a#k$|a#l$|a#m$|a#n$|a#o$|a#q$|a#s$|a#u$|a#v$|a'k$|a(R$|a(b$|a!g$|a!S$|a'i$|a#X$|ao$|a!X$|a%a$|a!a$|a~P#)tO^#[q!V#[q'k#[q'i#[q!S#[q!g#[qo#[q!X#[q%a#[q!a#[q~P!6UOd'OX!V'OX~P!'^O!V.YOd([a~O!U2rO!V'PX!g'PX~P%QO!V.]O!g(]a~O!V.]O!g(]a~P!6UO!S2uO~O#y!ja!W!ja~PJ`O#y!ba!V!ba!W!ba~P#@_O#y!na!W!na~P!8oO#y!pa!W!pa~P!;YO!X3XO$UfO$_3YO~O!W3^O~Oo3_O~P#)tO^$hq!V$hq'k$hq'i$hq!S$hq!g$hqo$hq!X$hq%a$hq!a$hq~P!6UO!S3`O~Ol.xO'vTO'yUO~Oy)qO|)rO(j)vOg%Xi(i%Xi!V%Xi#X%Xi~Od%Xi#y%Xi~P$GeOy)qO|)rOg%Zi(i%Zi(j%Zi!V%Zi#X%Zi~Od%Zi#y%Zi~P$HWO(b$WO~P#)tO!U3cO't%eO!V'ZX!g'ZX~O!V/QO!g(oa~O!V/QO!a#rO!g(oa~O!V/QO!a#rO(b'bO!g(oa~Od$ui!V$ui#X$ui#y$ui~P!0RO!U3kO't*SO!S']X!V']X~P!0pO!V/YO!S(pa~O!V/YO!S(pa~P#)tO!a#rO#o3sO~Ok3vO!a#rO(b'bO~Od(Pi!V(Pi~P!0RO#X3yOd(Pi!V(Pi~P!0RO!g3|O~O^$iq!V$iq'k$iq'i$iq!S$iq!g$iqo$iq!X$iq%a$iq!a$iq~P!6UO!V4QO!X(qX~P#)tO!f#tO~P3}O^$sX!X$sX%UYX'k$sX!V$sX~P!.xO%U4SO^hXghXyhX|hX!XhX'khX(ihX(jhX!VhX~O%U4SO~O%b4ZO't+VO'vTO'yUO!V'fX!W'fX~O!V0YO!W(wa~OX4_O~O]4`O~O!S4dO~O^%^O'k%^O~P#)tO!X$yO~P#)tO!V4iO#X4kO!W(tX~O!W4lO~Ol!kO|4mO![!uO!]!rO!^!rO!x9mO!|!mO!}!mO#O!mO#P!mO#Q!mO#T4rO#U!vO'u!iO'vTO'yUO(U!jO(a!pO~O!W4qO~P%!VOg4wO!X0uO%a4vO~Og4wO!X0uO%a4vO'}%OO~O't#jO!V'eX!W'eX~O!V1QO!W(ua~O'vTO'yUO(U5QO~O]5UO~O!g5XO~P%QO^5ZO~O^5ZO~P%QO#o5]O&Q5^O~PMOO_1hO!W5bO&`1gO~P`O!a5dO~O!a5fO!V(Zi!W(Zi!a(Zi!h(Zi'}(Zi~O!V#ai!W#ai~P#@_O#X5gO!V#ai!W#ai~O!V!Zi!W!Zi~P#@_O^%^O#X5pO'k%^O~O^%^O!a#rO#X5pO'k%^O~O!V(dq!g(dq^(dq'k(dq~P!6UO!V(ZO!g(cq~O|%vO!X%wO#c5wO't%eO~O!X'QO%a5zO~Og5}O!X'QO%a5zO~O#d%XiP%XiX%Xi^%Xik%Xiz%Xi!e%Xi!f%Xi!h%Xi!l%Xi#g%Xi#h%Xi#i%Xi#j%Xi#k%Xi#l%Xi#m%Xi#n%Xi#o%Xi#q%Xi#s%Xi#u%Xi#v%Xi'k%Xi(R%Xi(b%Xi!g%Xi!S%Xi'i%Xio%Xi!X%Xi%a%Xi!a%Xi~P$GeO#d%ZiP%ZiX%Zi^%Zik%Ziz%Zi!e%Zi!f%Zi!h%Zi!l%Zi#g%Zi#h%Zi#i%Zi#j%Zi#k%Zi#l%Zi#m%Zi#n%Zi#o%Zi#q%Zi#s%Zi#u%Zi#v%Zi'k%Zi(R%Zi(b%Zi!g%Zi!S%Zi'i%Zio%Zi!X%Zi%a%Zi!a%Zi~P$HWO#d$uiP$uiX$ui^$uik$uiz$ui!V$ui!e$ui!f$ui!h$ui!l$ui#g$ui#h$ui#i$ui#j$ui#k$ui#l$ui#m$ui#n$ui#o$ui#q$ui#s$ui#u$ui#v$ui'k$ui(R$ui(b$ui!g$ui!S$ui'i$ui#X$uio$ui!X$ui%a$ui!a$ui~P#)tOd'Oa!V'Oa~P!0RO!V'Pa!g'Pa~P!6UO!V.]O!g(]i~O#y#[i!V#[i!W#[i~P#@_OP$YOy#vOz#wO|#xO!f#tO!h#uO!l$YO(RVOX#fik#fi!e#fi#h#fi#i#fi#j#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi#y#fi(b#fi(i#fi(j#fi!V#fi!W#fi~O#g#fi~P%0fO#g9uO~P%0fOP$YOy#vOz#wO|#xO!f#tO!h#uO!l$YO#g9uO#h9vO#i9vO#j9vO(RVOX#fi!e#fi#k#fi#l#fi#m#fi#n#fi#o#fi#q#fi#s#fi#u#fi#v#fi#y#fi(b#fi(i#fi(j#fi!V#fi!W#fi~Ok#fi~P%2qOk9wO~P%2qOP$YOk9wOy#vOz#wO|#xO!f#tO!h#uO!l$YO#g9uO#h9vO#i9vO#j9vO#k9xO(RVO#q#fi#s#fi#u#fi#v#fi#y#fi(b#fi(i#fi(j#fi!V#fi!W#fi~OX#fi!e#fi#l#fi#m#fi#n#fi#o#fi~P%4|OX:TO!e9yO#l9yO#m9yO#n:SO#o9yO~P%4|OP$YOX:TOk9wOy#vOz#wO|#xO!e9yO!f#tO!h#uO!l$YO#g9uO#h9vO#i9vO#j9vO#k9xO#l9yO#m9yO#n:SO#o9yO#q9zO(RVO#s#fi#u#fi#v#fi#y#fi(b#fi(j#fi!V#fi!W#fi~O(i#fi~P%7hO(i#yO~P%7hOP$YOX:TOk9wOy#vOz#wO|#xO!e9yO!f#tO!h#uO!l$YO#g9uO#h9vO#i9vO#j9vO#k9xO#l9yO#m9yO#n:SO#o9yO#q9zO#s9|O(RVO(i#yO#u#fi#v#fi#y#fi(b#fi!V#fi!W#fi~O(j#fi~P%9sO(j#zO~P%9sOP$YOX:TOk9wOy#vOz#wO|#xO!e9yO!f#tO!h#uO!l$YO#g9uO#h9vO#i9vO#j9vO#k9xO#l9yO#m9yO#n:SO#o9yO#q9zO#s9|O#u:OO(RVO(i#yO(j#zO~O#v#fi#y#fi(b#fi!V#fi!W#fi~P%vO!f#tOP(QXX(QXg(QXk(QXy(QXz(QX|(QX!e(QX!h(QX!l(QX#g(QX#h(QX#i(QX#j(QX#k(QX#l(QX#m(QX#n(QX#o(QX#q(QX#s(QX#u(QX#v(QX#y(QX(R(QX(b(QX(i(QX(j(QX!V(QX!W(QX~O#y#zi!V#zi!W#zi~P#@_O#y!ni!W!ni~P$ wO!W6ZO~O!V'Ya!W'Ya~P#@_O!a#rO(b'bO!V'Za!g'Za~O!V/QO!g(oi~O!V/QO!a#rO!g(oi~Od$uq!V$uq#X$uq#y$uq~P!0RO!S']a!V']a~P#)tO!a6bO~O!V/YO!S(pi~P#)tO!V/YO!S(pi~O!S6fO~O!a#rO#o6kO~Ok6lO!a#rO(b'bO~O!S6nO~Od$wq!V$wq#X$wq#y$wq~P!0RO^$iy!V$iy'k$iy'i$iy!S$iy!g$iyo$iy!X$iy%a$iy!a$iy~P!6UO!V4QO!X(qa~O^#[y!V#[y'k#[y'i#[y!S#[y!g#[yo#[y!X#[y%a#[y!a#[y~P!6UOX6sO~O!V0YO!W(wi~O]6yO~O!a5fO~O(U(oO!V'bX!W'bX~O!V4iO!W(ta~OikO't7QO~P._O!W7TO~P%!VOl!kO|7UO'vTO'yUO(U!jO(a!pO~O!X0uO~O!X0uO%a7WO~Og7ZO!X0uO%a7WO~OX7`O!V'ea!W'ea~O!V1QO!W(ui~O!g7dO~O!g7eO~O!g7fO~O!g7fO~P%QO^7hO~O!a7kO~O!g7lO~O!V(gi!W(gi~P#@_O^%^O#X7tO'k%^O~O!V(dy!g(dy^(dy'k(dy~P!6UO!V(ZO!g(cy~O!X'QO%a7wO~O#d$uqP$uqX$uq^$uqk$uqz$uq!V$uq!e$uq!f$uq!h$uq!l$uq#g$uq#h$uq#i$uq#j$uq#k$uq#l$uq#m$uq#n$uq#o$uq#q$uq#s$uq#u$uq#v$uq'k$uq(R$uq(b$uq!g$uq!S$uq'i$uq#X$uqo$uq!X$uq%a$uq!a$uq~P#)tO#d$wqP$wqX$wq^$wqk$wqz$wq!V$wq!e$wq!f$wq!h$wq!l$wq#g$wq#h$wq#i$wq#j$wq#k$wq#l$wq#m$wq#n$wq#o$wq#q$wq#s$wq#u$wq#v$wq'k$wq(R$wq(b$wq!g$wq!S$wq'i$wq#X$wqo$wq!X$wq%a$wq!a$wq~P#)tO!V'Pi!g'Pi~P!6UO#y#[q!V#[q!W#[q~P#@_Oy/tOz/tO|/uOPvaXvagvakva!eva!fva!hva!lva#gva#hva#iva#jva#kva#lva#mva#nva#ova#qva#sva#uva#vva#yva(Rva(bva(iva(jva!Vva!Wva~Oy)qO|)rOP$laX$lag$lak$laz$la!e$la!f$la!h$la!l$la#g$la#h$la#i$la#j$la#k$la#l$la#m$la#n$la#o$la#q$la#s$la#u$la#v$la#y$la(R$la(b$la(i$la(j$la!V$la!W$la~Oy)qO|)rOP$naX$nag$nak$naz$na!e$na!f$na!h$na!l$na#g$na#h$na#i$na#j$na#k$na#l$na#m$na#n$na#o$na#q$na#s$na#u$na#v$na#y$na(R$na(b$na(i$na(j$na!V$na!W$na~OP$|aX$|ak$|az$|a!e$|a!f$|a!h$|a!l$|a#g$|a#h$|a#i$|a#j$|a#k$|a#l$|a#m$|a#n$|a#o$|a#q$|a#s$|a#u$|a#v$|a#y$|a(R$|a(b$|a!V$|a!W$|a~P%>vO#y$hq!V$hq!W$hq~P#@_O#y$iq!V$iq!W$iq~P#@_O!W8RO~O#y8SO~P!0RO!a#rO!V'Zi!g'Zi~O!a#rO(b'bO!V'Zi!g'Zi~O!V/QO!g(oq~O!S']i!V']i~P#)tO!V/YO!S(pq~O!S8YO~P#)tO!S8YO~Od(Py!V(Py~P!0RO!V'`a!X'`a~P#)tO^%Tq!X%Tq'k%Tq!V%Tq~P#)tOX8_O~O!V0YO!W(wq~O#X8cO!V'ba!W'ba~O!V4iO!W(ti~P#@_OPYXXYXkYXyYXzYX|YX!SYX!VYX!eYX!fYX!hYX!lYX#XYX#dcX#gYX#hYX#iYX#jYX#kYX#lYX#mYX#nYX#oYX#qYX#sYX#uYX#vYX#{YX(RYX(bYX(iYX(jYX~O!a%RX#o%RX~P&/vO!X0uO%a8gO~O'vTO'yUO(U8lO~O!V1QO!W(uq~O!g8oO~O!g8oO~P%QO!g8qO~O!g8rO~O#X8tO!V#ay!W#ay~O!V#ay!W#ay~P#@_O!X'QO%a8yO~O#y#wy!V#wy!W#wy~P#@_OP$uiX$uik$uiz$ui!e$ui!f$ui!h$ui!l$ui#g$ui#h$ui#i$ui#j$ui#k$ui#l$ui#m$ui#n$ui#o$ui#q$ui#s$ui#u$ui#v$ui#y$ui(R$ui(b$ui!V$ui!W$ui~P%>vOy)qO|)rO(j)vOP%XiX%Xig%Xik%Xiz%Xi!e%Xi!f%Xi!h%Xi!l%Xi#g%Xi#h%Xi#i%Xi#j%Xi#k%Xi#l%Xi#m%Xi#n%Xi#o%Xi#q%Xi#s%Xi#u%Xi#v%Xi#y%Xi(R%Xi(b%Xi(i%Xi!V%Xi!W%Xi~Oy)qO|)rOP%ZiX%Zig%Zik%Ziz%Zi!e%Zi!f%Zi!h%Zi!l%Zi#g%Zi#h%Zi#i%Zi#j%Zi#k%Zi#l%Zi#m%Zi#n%Zi#o%Zi#q%Zi#s%Zi#u%Zi#v%Zi#y%Zi(R%Zi(b%Zi(i%Zi(j%Zi!V%Zi!W%Zi~O#y$iy!V$iy!W$iy~P#@_O#y#[y!V#[y!W#[y~P#@_O!a#rO!V'Zq!g'Zq~O!V/QO!g(oy~O!S']q!V']q~P#)tO!S9QO~P#)tO!V0YO!W(wy~O!V4iO!W(tq~O!X0uO%a9XO~O!g9[O~O!X'QO%a9aO~OP$uqX$uqk$uqz$uq!e$uq!f$uq!h$uq!l$uq#g$uq#h$uq#i$uq#j$uq#k$uq#l$uq#m$uq#n$uq#o$uq#q$uq#s$uq#u$uq#v$uq#y$uq(R$uq(b$uq!V$uq!W$uq~P%>vOP$wqX$wqk$wqz$wq!e$wq!f$wq!h$wq!l$wq#g$wq#h$wq#i$wq#j$wq#k$wq#l$wq#m$wq#n$wq#o$wq#q$wq#s$wq#u$wq#v$wq#y$wq(R$wq(b$wq!V$wq!W$wq~P%>vOd%]!Z!V%]!Z#X%]!Z#y%]!Z~P!0RO!V'bq!W'bq~P#@_O!V#a!Z!W#a!Z~P#@_O#d%]!ZP%]!ZX%]!Z^%]!Zk%]!Zz%]!Z!V%]!Z!e%]!Z!f%]!Z!h%]!Z!l%]!Z#g%]!Z#h%]!Z#i%]!Z#j%]!Z#k%]!Z#l%]!Z#m%]!Z#n%]!Z#o%]!Z#q%]!Z#s%]!Z#u%]!Z#v%]!Z'k%]!Z(R%]!Z(b%]!Z!g%]!Z!S%]!Z'i%]!Z#X%]!Zo%]!Z!X%]!Z%a%]!Z!a%]!Z~P#)tOP%]!ZX%]!Zk%]!Zz%]!Z!e%]!Z!f%]!Z!h%]!Z!l%]!Z#g%]!Z#h%]!Z#i%]!Z#j%]!Z#k%]!Z#l%]!Z#m%]!Z#n%]!Z#o%]!Z#q%]!Z#s%]!Z#u%]!Z#v%]!Z#y%]!Z(R%]!Z(b%]!Z!V%]!Z!W%]!Z~P%>vOo(VX~P1gO'u!iO~P!)jO!ScX!VcX#XcX~P&/vOPYXXYXkYXyYXzYX|YX!VYX!VcX!eYX!fYX!hYX!lYX#XYX#XcX#dcX#gYX#hYX#iYX#jYX#kYX#lYX#mYX#nYX#oYX#qYX#sYX#uYX#vYX#{YX(RYX(bYX(iYX(jYX~O!acX!gYX!gcX(bcX~P&E^OP9lOQ9lOa;]Ob!fOikOk9lOlkOmkOskOu9lOw9lO|WO!QkO!RkO!XXO!c9oO!hZO!k9lO!l9lO!m9lO!o9pO!q9qO!t!eO$Q!hO$UfO't)PO'vTO'yUO(RVO(a[O(n;ZO~O!V:QO!W$ka~Oi%POk$qOl$pOm$pOs%QOu%ROw:WO|$xO!X$yO!c;bO!h$uO#c:^O$Q%VO$m:YO$o:[O$r%WO't(gO'vTO'yUO'}%OO(R$rO~O#p)WO~P&JSO!WYX!WcX~P&E^O#d9tO~O!a#rO#d9tO~O#X:UO~O#o9yO~O#X:`O!V(gX!W(gX~O#X:UO!V(eX!W(eX~O#d:aO~Od:cO~P!0RO#d:hO~O#d:iO~O!a#rO#d:jO~O!a#rO#d:aO~O#y:kO~P#@_O#d:lO~O#d:mO~O#d:nO~O#d:oO~O#d:pO~O#d:qO~O#y:rO~P!0RO#y:sO~P!0RO$U~!f!|!}#P#Q#T#b#c#n(n$m$o$r%U%`%a%b%h%j%m%n%p%r~'oR$U(n#h!R'm'u#il#g#jky'n(U'n't$W$Y$W~",goto:"$%Z({PPPP(|P)PP)aP*p.rPPPP5SPP5iP;d>iP>|P>|PPP>|P@lP>|P>|P>|P@pPP@uPA`PFUPPPFYPPPPFYIXPPPI_JYPFYPLgPPPPNuFYPPPFYPFYP!#TFYP!&g!'i!'rP!(e!(i!(ePPPPP!+r!'iPP!,`!-YP!/|FYFY!0R!3Z!7n!7n!;cPPP!;jFYPPPPPPPPPPP!>uP!@WPPFY!AePFYPFYFYFYFYPFY!BwPP!E}P!IPP!IT!I_!Ic!IcP!EzP!Ig!IgP!LiP!LmFYFY!Ls# t>|P>|P>|>|P##O>|>|#$x>|#'V>|#(y>|>|#)g#+c#+c#+g#+o#+c#+wP#+cP>|#,a>|#-i>|>|5SPPP#.tPP#/^#/^P#/^P#/s#/^PP#/yP#/pP#/p#0]#/p#0w#0}5P)P#1Q)PP#1X#1X#1XP)PP)PP)PP)PPP)PP#1_#1bP#1b)PP#1fP#1iP)PP)PP)PP)PP)PP)P)PPP#1o#1u#2P#2V#2]#2c#2i#2w#2}#3T#3_#3e#3o#4O#4U#4u#5X#5_#5e#5s#6Y#7j#7x#8O#8U#8[#8b#8l#8r#8x#9S#9f#9lPPPPPPPPPP#9rPPPPPPP#:f#=mP#>|#?T#?]PPPP#Cg#F]#Lr#Lu#Lx#Mq#Mt#Mw#NO#NWPP#N^#Nb$ Z$!Z$!_$!sPP$!w$!}$#RP$#U$#Y$#]$$R$$i$$n$$q$$t$$z$$}$%R$%VR!xRmpOXr!X#`%]&d&f&g&i,],b1b1eY!rQ'Q,}0u4pQ%ctQ%kwQ%rzQ&[!TS&x!c,uQ'W!fS'^!o!uS*Y$y*_Q+T%lQ+b%tQ+|&UQ,{'PQ-V'XQ-_'_Q/k*aQ1P+}R:_9p$zdOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$^$b%]%c%p&]&`&d&f&g&i&m&u'S'd't'v'|(T(i(m(q)p*s+g,X,],b-R-Z-i-o.].d/u/z0X0x1Y1Z1[1^1b1e1g2W2^2r4m4w5Z5]5^5p7U7Z7h7tS#m]9m!r)R$X$j&y)e,n,q.l1v3X4k5g8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^Q*j%SQ+Y%nQ,O&XQ,V&aQ.S:VQ0O*{Q0S*}Q0_+ZQ1X,TQ2f.PQ4Y0YQ5O1QQ5|2jQ6S:WQ6u4ZR7z5}&xkOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$X$^$b$j%]%c%p&]&`&a&d&f&g&i&m&u&y'S'd't'v'|(T(i(m(q)e)p*s*{+g,X,],b,n,q-R-Z-i-o.P.].d.l/u/z0X0x1Y1Z1[1^1b1e1g1v2W2^2j2r3X4k4m4w5Z5]5^5g5p5}7U7Z7h7t8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^t!kQ!o!r!u!v&x'P'Q'^'_'`,u,{,}-_0u4p4r$Y$pi#r#t$`$a$u$x%T%U%Y)l)u)w)x*P*V*e*f*z*}+l+o.O.Y/X/Y/[/w0l0o0w2i3a3k3s3y4Q4S4v5z6b6k7W7w8S8g8y9X9a:S:T:X:Y:Z:[:]:^:d:e:f:g:h:i:l:m:n:o:r:s;Z;c;d;g;hQ%uzQ&v!cS&|%w,xQ+Y%nS.x)r.zQ/v*nQ0_+ZQ0d+aQ1W,SQ1X,TQ4Y0YQ4c0fQ5R1SQ5S1VQ6u4ZQ6x4`Q7c5UQ8b6yR8m7`pmOXr!T!X#`%]&Z&d&f&g&i,],b1b1eR,Q&]&r^OPXYrstux!X!^!g!l#O#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$X$^$b$j%]%c%p&]&`&a&d&f&g&i&m&u'S'd'v'|(T(i(m(q)e)p*s*{+g,X,],b,n,q-R-Z-i-o.P.].d.l/u/z0X0x1Y1Z1[1^1b1e1g1v2W2^2j2r3X4k4m4w5Z5]5^5g5p5}7U7Z7h7t8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;];^[#XWZ#S#V&y'tQ%fvQ%jwS%oz%t!U%x|}#d#e#h%Z%v'}(X(Y(Z+e+f+h,Z,o-m-s-t-u-w1j2b2c5f5wQ&Q!RQ'T!eQ'V!fQ(b#oS)|$u*QS+S%k%lQ+W%nQ+w&SQ+{&US-U'W'XQ.R(cQ/U)}Q0W+TQ0^+ZQ0`+[Q0c+`Q0z+xS1O+|+}Q2S-VQ3b/QQ4X0YQ4]0]Q4b0eQ4}1PQ6_3cQ6t4ZQ6w4_Q8^6sR9S8_v$wi#t%T%U%Y)u)w*P*e*f.Y/X/w3a3y8S;Z;c;d!S%hw!f!q%j%k%l&w'V'W'X']'g*X+S+T,r-U-V-^/c0W1{2S2Z3uQ*|%fQ+m%}Q+p&OQ+z&UQ.Q(bQ0y+wU0}+{+|+}Q2k.RQ4x0zS4|1O1PQ7_4}!z;_#r$`$a$u$x)l)x*V*z*}+l+o.O/Y/[0l0o0w2i3k3s4Q4S4v5z6b6k7W7w8g8y9X9a:X:Z:]:d:f:h:l:n:r;g;hg;`:S:T:Y:[:^:e:g:i:m:o:sW$|i%O*g;ZS%}!O&ZQ&O!PQ&P!QR+k%{$Z${i#r#t$`$a$u$x%T%U%Y)l)u)w)x*P*V*e*f*z*}+l+o.O.Y/X/Y/[/w0l0o0w2i3a3k3s3y4Q4S4v5z6b6k7W7w8S8g8y9X9a:S:T:X:Y:Z:[:]:^:d:e:f:g:h:i:l:m:n:o:r:s;Z;c;d;g;hT)m$r)nV*k%S:V:WU&|!c%w,xS(p#v#wQ+_%qS-z(^(_Q0p+qQ3z/tR6}4i&xkOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$X$^$b$j%]%c%p&]&`&a&d&f&g&i&m&u&y'S'd't'v'|(T(i(m(q)e)p*s*{+g,X,],b,n,q-R-Z-i-o.P.].d.l/u/z0X0x1Y1Z1[1^1b1e1g1v2W2^2j2r3X4k4m4w5Z5]5^5g5p5}7U7Z7h7t8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^$i$]c#U#a%a%b%d's'y(e(l(t(u(v(w(x(y(z({(|(})O)Q)T)X)c*x+^,s-b-g-l-n.X._.c.e.f.g.v/x1q1t2U2]2q2v2w2x2y2z2{2|2}3O3P3Q3R3S3V3W3]4O4V5i5o5t6Q6R6W6X7P7n7r7{8P8Q8v9U9]9n;QT#PV#Q&ykOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$X$^$b$j%]%c%p&]&`&a&d&f&g&i&m&u&y'S'd't'v'|(T(i(m(q)e)p*s*{+g,X,],b,n,q-R-Z-i-o.P.].d.l/u/z0X0x1Y1Z1[1^1b1e1g1v2W2^2j2r3X4k4m4w5Z5]5^5g5p5}7U7Z7h7t8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^Q&z!cR1w,uv!kQ!c!o!r!u!v&x'P'Q'^'_'`,u,{,}-_0u4p4rS*X$y*_S/c*Y*aQ/l*bQ0r+sQ3u/kR3x/nlpOXr!X#`%]&d&f&g&i,],b1b1eQ&k![Q'h!tS(d#q9tQ+Q%iQ+u&QQ+v&RQ-S'UQ-a'aS.W(i:aS/y*s:jQ0U+RQ0t+tQ1i,dQ1k,eQ1s,pQ2Q-TQ2T-XS4P/z:pQ4T0VS4W0X:qQ5h1uQ5l2RQ5q2YQ6r4UQ7o5jQ7p5mQ7s5rR8s7l$d$[c#U#a%b%d's'y(e(l(t(u(v(w(x(y(z({(|(})O)Q)T)X)c*x+^,s-b-g-l-n.X._.c.f.g.v/x1q1t2U2]2q2v2w2x2y2z2{2|2}3O3P3Q3R3S3V3W3]4O4V5i5o5t6Q6R6W6X7P7n7r7{8P8Q8v9U9]9n;QS(a#l'ZU*d$z(h3US*w%a.eQ2g0OQ5y2fQ7y5|R8z7z$d$Zc#U#a%b%d's'y(e(l(t(u(v(w(x(y(z({(|(})O)Q)T)X)c*x+^,s-b-g-l-n.X._.c.f.g.v/x1q1t2U2]2q2v2w2x2y2z2{2|2}3O3P3Q3R3S3V3W3]4O4V5i5o5t6Q6R6W6X7P7n7r7{8P8Q8v9U9]9n;QS(`#l'ZS(r#w$[S*v%a.eS-{(_(aQ.h)SQ/{*wR2d-|&xkOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$X$^$b$j%]%c%p&]&`&a&d&f&g&i&m&u&y'S'd't'v'|(T(i(m(q)e)p*s*{+g,X,],b,n,q-R-Z-i-o.P.].d.l/u/z0X0x1Y1Z1[1^1b1e1g1v2W2^2j2r3X4k4m4w5Z5]5^5g5p5}7U7Z7h7t8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^S#m]9mQ&f!VQ&g!WQ&i!YQ&j!ZR1a,`Q'R!eQ*y%fQ-Q'TS-}(b*|Q2O-PW2h.Q.R/}0PQ5k2PU5x2e2g2kS7v5y5{S8x7x7yS9_8w8zQ9g9`R9j9hU!sQ'Q,}T4n0u4p!O_OXZ`r!T!X#`#d%Z%]&Z&]&d&f&g&i(Z,],b-t1b1e]!mQ!o'Q,}0u4pT#m]9m%UyOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$^$b%]%c%p&]&`&a&d&f&g&i&m&u'S'd't'v'|(T(i(m(q)p*s*{+g,X,],b-R-Z-i-o.P.].d/u/z0X0x1Y1Z1[1^1b1e1g2W2^2j2r4m4w5Z5]5^5p5}7U7Z7h7tS(p#v#wS-z(^(_!s:w$X$j&y)e,n,q.l1v3X4k5g8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^Y!qQ'Q,}0u4pQ']!oS'g!r!uS'i!v4rS-^'^'_Q-`'`R2Z-_Q'f!qS(V#c1_S-]']'iQ/T)|Q/a*XQ2[-`Q3g/US3p/b/lQ6^3bS6i3v3xQ8U6_R8]6lQ#sbQ'e!qS(U#c1_S(W#i*rQ*t%[Q+O%gQ+U%mU-[']'f'iQ-p(VQ/S)|Q/`*XQ/f*[Q0T+PQ0{+yS2X-]-`Q2a-xS3f/T/US3o/a/lQ3r/eQ3t/gQ4z0|Q5s2[Q6]3bQ6a3gS6e3p3xQ6j3wQ7]4{S8T6^6_Q8X6fQ8Z6iQ8j7^Q9O8UQ9P8YQ9R8]Q9Z8kQ9c9QQ:z:uQ;V;OR;W;PV!sQ'Q,}%UaOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$^$b%]%c%p&]&`&a&d&f&g&i&m&u'S'd't'v'|(T(i(m(q)p*s*{+g,X,],b-R-Z-i-o.P.].d/u/z0X0x1Y1Z1[1^1b1e1g2W2^2j2r4m4w5Z5]5^5p5}7U7Z7h7tS#sx!g!r:t$X$j&y)e,n,q.l1v3X4k5g8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^R:z;]%UbOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$^$b%]%c%p&]&`&a&d&f&g&i&m&u'S'd't'v'|(T(i(m(q)p*s*{+g,X,],b-R-Z-i-o.P.].d/u/z0X0x1Y1Z1[1^1b1e1g2W2^2j2r4m4w5Z5]5^5p5}7U7Z7h7tQ%[j!S%gw!f!q%j%k%l&w'V'W'X']'g*X+S+T,r-U-V-^/c0W1{2S2Z3uS%mx!gQ+P%hQ+y&UW0|+z+{+|+}U4{0}1O1PS7^4|4}Q8k7_!r:u$X$j&y)e,n,q.l1v3X4k5g8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^Q;O;[R;P;]$xeOPXYrstu!X!^!l#O#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$^$b%]%c%p&]&`&d&f&g&i&m&u'S'd'v'|(T(i(m(q)p*s*{+g,X,],b-R-Z-i-o.P.].d/u/z0X0x1Y1Z1[1^1b1e1g2W2^2j2r4m4w5Z5]5^5p5}7U7Z7h7tY#^WZ#S#V't!U%x|}#d#e#h%Z%v'}(X(Y(Z+e+f+h,Z,o-m-s-t-u-w1j2b2c5f5wQ,W&a!p:v$X$j)e,n,q.l1v3X4k5g8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^R:y&yS&}!c%wR1y,x$zdOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$^$b%]%c%p&]&`&d&f&g&i&m&u'S'd't'v'|(T(i(m(q)p*s+g,X,],b-R-Z-i-o.].d/u/z0X0x1Y1Z1[1^1b1e1g2W2^2r4m4w5Z5]5^5p7U7Z7h7t!r)R$X$j&y)e,n,q.l1v3X4k5g8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^Q,V&aQ0O*{Q2f.PQ5|2jR7z5}!f$Rc#U%a's'y(e(l({(|(})O)T)X+^-b-g-l-n.X._.v/x2U2]2q3S4O4V5o5t6Q7r8v9n!T9{)Q)c,s.e1q1t2v3O3P3Q3R3V3]5i6R6W6X7P7n7{8P8Q9U9];Q!b$Tc#U%a's'y(e(l(})O)T)X+^-b-g-l-n.X._.v/x2U2]2q3S4O4V5o5t6Q7r8v9n!P9})Q)c,s.e1q1t2v3Q3R3V3]5i6R6W6X7P7n7{8P8Q9U9];Q!^$Xc#U%a's'y(e(l)T)X+^-b-g-l-n.X._.v/x2U2]2q3S4O4V5o5t6Q7r8v9nQ3a/Oz;^)Q)c,s.e1q1t2v3V3]5i6R6W6X7P7n7{8P8Q9U9];QQ;c;eR;d;f&xkOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$X$^$b$j%]%c%p&]&`&a&d&f&g&i&m&u&y'S'd't'v'|(T(i(m(q)e)p*s*{+g,X,],b,n,q-R-Z-i-o.P.].d.l/u/z0X0x1Y1Z1[1^1b1e1g1v2W2^2j2r3X4k4m4w5Z5]5^5g5p5}7U7Z7h7t8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^S$kh$lR3Y.k'PgOPWXYZhrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$X$^$b$j$l%]%c%p&]&`&a&d&f&g&i&m&u&y'S'd't'v'|(T(i(m(q)e)p*s*{+g,X,],b,n,q-R-Z-i-o.P.].d.k.l/u/z0X0x1Y1Z1[1^1b1e1g1v2W2^2j2r3X4k4m4w5Z5]5^5g5p5}7U7Z7h7t8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^T$gf$mQ$efS)[$h)`R)h$mT$ff$mT)^$h)`'PhOPWXYZhrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$X$^$b$j$l%]%c%p&]&`&a&d&f&g&i&m&u&y'S'd't'v'|(T(i(m(q)e)p*s*{+g,X,],b,n,q-R-Z-i-o.P.].d.k.l/u/z0X0x1Y1Z1[1^1b1e1g1v2W2^2j2r3X4k4m4w5Z5]5^5g5p5}7U7Z7h7t8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^T$kh$lQ$nhR)g$l%UjOPWXYZrstu!X!^!l#O#S#V#`#k#q#u#x#{#|#}$O$P$Q$R$S$T$U$V$^$b%]%c%p&]&`&a&d&f&g&i&m&u'S'd't'v'|(T(i(m(q)p*s*{+g,X,],b-R-Z-i-o.P.].d/u/z0X0x1Y1Z1[1^1b1e1g2W2^2j2r4m4w5Z5]5^5p5}7U7Z7h7t!s;[$X$j&y)e,n,q.l1v3X4k5g8c8t9l9o9p9q9t9u9v9w9x9y9z9{9|9}:O:P:Q:U:_:`:a:c:j:k:p:q;^#alOPXZr!X!^!l#O#`#k#x$j%]&]&`&a&d&f&g&i&m&u'S(q)e*{+g,X,],b-R.P.l/u0x1Y1Z1[1^1b1e1g2j3X4m4w5Z5]5^5}7U7Z7hv$zi#t%T%U%Y)u)w*P*e*f.Y/X/w3a3y8S;Z;c;d!z(h#r$`$a$u$x)l)x*V*z*}+l+o.O/Y/[0l0o0w2i3k3s4Q4S4v5z6b6k7W7w8g8y9X9a:X:Z:]:d:f:h:l:n:r;g;hQ*o%WQ.w)qg3U:S:T:Y:[:^:e:g:i:m:o:sv$vi#t%T%U%Y)u)w*P*e*f.Y/X/w3a3y8S;Z;c;dQ*R$wS*[$y*_Q*p%XQ/g*]!z:|#r$`$a$u$x)l)x*V*z*}+l+o.O/Y/[0l0o0w2i3k3s4Q4S4v5z6b6k7W7w8g8y9X9a:X:Z:]:d:f:h:l:n:r;g;hf:}:S:T:Y:[:^:e:g:i:m:o:sQ;R;_Q;S;`Q;T;aR;U;bv$zi#t%T%U%Y)u)w*P*e*f.Y/X/w3a3y8S;Z;c;d!z(h#r$`$a$u$x)l)x*V*z*}+l+o.O/Y/[0l0o0w2i3k3s4Q4S4v5z6b6k7W7w8g8y9X9a:X:Z:]:d:f:h:l:n:r;g;hg3U:S:T:Y:[:^:e:g:i:m:o:slnOXr!X#`%]&d&f&g&i,],b1b1eQ*U$xQ,k&pQ,l&rR3j/Y$Y${i#r#t$`$a$u$x%T%U%Y)l)u)w)x*P*V*e*f*z*}+l+o.O.Y/X/Y/[/w0l0o0w2i3a3k3s3y4Q4S4v5z6b6k7W7w8S8g8y9X9a:S:T:X:Y:Z:[:]:^:d:e:f:g:h:i:l:m:n:o:r:s;Z;c;d;g;hQ+n&OQ0n+pQ4g0mR6|4hT*^$y*_S*^$y*_T4o0u4pS/e*Z4mT3w/m7UQ+O%gQ/f*[Q0T+PQ0{+yQ4z0|Q7]4{Q8j7^R9Z8kn)u$s(j*q/W/o/p2o3h3}6[6m8}:{;X;Y!W:d(f)V){*T.V.s/O/]/|0k0m2n3i3m4f4h6O6P6c6g6o6q8W8[9b;e;f]:e3T6V7|8{8|9kp)w$s(j*q.|/W/o/p2o3h3}6[6m8}:{;X;Y!Y:f(f)V){*T.V.s/O/]/|0k0m2l2n3i3m4f4h6O6P6c6g6o6q8W8[9b;e;f_:g3T6V7|7}8{8|9kpmOXr!T!X#`%]&Z&d&f&g&i,],b1b1eQ&W!SR,X&apmOXr!T!X#`%]&Z&d&f&g&i,],b1b1eR&W!SQ+r&PR0j+kqmOXr!T!X#`%]&Z&d&f&g&i,],b1b1eQ0v+wS4u0y0zU7V4s4t4xS8f7X7YS9V8e8hQ9d9WR9i9eQ&_!TR,R&ZR5R1SS%oz%tR0`+[Q&d!UR,]&eR,c&jT1c,b1eR,g&kQ,f&kR1l,gQ'k!wR-c'kQrOQ#`XT%`r#`Q!zTR'm!zQ!}UR'o!}Q)n$rR.t)nQ#QVR'q#QQ#TWU'w#T'x-jQ'x#UR-j'yQ,v&zR1x,vQ.Z(jR2p.ZQ.^(lS2s.^2tR2t._Q,}'QR1|,}Y!oQ'Q,}0u4pR'[!oS#ZW%vU(O#Z(P-kQ(P#[R-k'zQ,y&}R1z,yr`OXr!T!X#`%]&Z&]&d&f&g&i,],b1b1eS#dZ%ZU#n`#d-tR-t(ZQ([#fQ-q(WW-y([-q2_5uQ2_-rR5u2`Q)`$hR.m)`Q$lhR)f$lQ$_cU)U$_-f:RQ-f9nR:R)cQ/R)|W3d/R3e6`8VU3e/S/T/US6`3f3gR8V6a#m)s$s(f(j)V){*T*l*m*q.T.U.V.s.|.}/O/W/]/o/p/|0k0m2l2m2n2o3T3h3i3m3}4f4h6O6P6T6U6V6[6c6g6m6o6q7|7}8O8W8[8{8|8}9b9k:{;X;Y;e;fQ/Z*TU3l/Z3n6dQ3n/]R6d3mQ*_$yR/i*_Q*h$}R/r*hQ4R/|R6p4RQ+i%yR0i+iQ4j0pS7O4j8dR8d7PQ+t&QR0s+tQ4p0uR7S4pQ1R,OS5P1R7aR7a5RQ0Z+WW4[0Z4^6v8`Q4^0^Q6v4]R8`6wQ+]%oR0a+]Q1e,bR5a1eWqOXr#`Q&h!XQ*u%]Q,[&dQ,^&fQ,_&gQ,a&iQ1`,]S1c,b1eR5`1bQ%_oQ&l!]Q&o!_Q&q!`Q&s!aQ'c!qQ+Q%iQ+d%uQ+j%zQ,Q&_Q,i&nW-Y']'e'f'iQ-a'aQ/h*^Q0U+RS1U,R,UQ1m,hQ1n,kQ1o,lQ2T-XW2V-[-]-`-bQ4T0VQ4a0dQ4e0kQ4y0{Q5T1WQ5_1aU5n2U2X2[Q5q2YQ6r4UQ6z4cQ6{4fQ7R4oQ7[4zQ7b5SS7q5o5sQ7s5rQ8a6xQ8i7]Q8n7cQ8u7rQ9T8bQ9Y8jQ9^8vR9f9ZQ%iwQ'U!fQ'a!qU+R%j%k%lQ,p&wU-T'V'W'XS-X']'gQ/_*XS0V+S+TQ1u,rS2R-U-VQ2Y-^Q3q/cQ4U0WQ5j1{Q5m2SQ5r2ZR6h3uS$ti;ZR*i%OU$}i%O;ZR/q*gQ$siS(f#r*}Q(j#tS)V$`$aQ){$uQ*T$xQ*l%TQ*m%UQ*q%YQ.T:XQ.U:ZQ.V:]Q.s)lQ.|)uQ.})wQ/O)xQ/W*PQ/]*VQ/o*eQ/p*fh/|*z.O0w2i4v5z7W7w8g8y9X9aQ0k+lQ0m+oQ2l:dQ2m:fQ2n:hQ2o.YS3T:S:TQ3h/XQ3i/YQ3m/[Q3}/wQ4f0lQ4h0oQ6O:lQ6P:nQ6T:YQ6U:[Q6V:^Q6[3aQ6c3kQ6g3sQ6m3yQ6o4QQ6q4SQ7|:iQ7}:eQ8O:gQ8W6bQ8[6kQ8{:mQ8|:oQ8}8SQ9b:rQ9k:sQ:{;ZQ;X;cQ;Y;dQ;e;gR;f;hloOXr!X#`%]&d&f&g&i,],b1b1eQ!dPS#bZ#kQ&n!^U'Y!l4m7UQ'p#OQ(s#xQ)d$jS,U&]&`Q,Y&aQ,h&mQ,m&uQ-P'SQ.a(qQ.q)eQ0P*{Q0g+gQ1],XQ2P-RQ2g.PQ3[.lQ3{/uQ4t0xQ5V1YQ5W1ZQ5Y1[Q5[1^Q5c1gQ5y2jQ6Y3XQ7Y4wQ7g5ZQ7i5]Q7j5^Q7y5}Q8h7ZR8p7h#UcOPXZr!X!^!l#`#k#x%]&]&`&a&d&f&g&i&m&u'S(q*{+g,X,],b-R.P/u0x1Y1Z1[1^1b1e1g2j4m4w5Z5]5^5}7U7Z7hQ#UWQ#aYQ%asQ%btQ%duS's#S'vQ'y#VQ(e#qQ(l#uQ(t#{Q(u#|Q(v#}Q(w$OQ(x$PQ(y$QQ(z$RQ({$SQ(|$TQ(}$UQ)O$VQ)Q$XQ)T$^Q)X$bW)c$j)e.l3XQ*x%cQ+^%pS,s&y1vQ-b'dS-g't-iQ-l'|Q-n(TQ.X(iQ._(mQ.c9lQ.e9oQ.f9pQ.g9qQ.v)pQ/x*sQ1q,nQ1t,qQ2U-ZQ2]-oQ2q.]Q2v9tQ2w9uQ2x9vQ2y9wQ2z9xQ2{9yQ2|9zQ2}9{Q3O9|Q3P9}Q3Q:OQ3R:PQ3S.dQ3V:UQ3W:_Q3]:QQ4O/zQ4V0XQ5i:`Q5o2WQ5t2^Q6Q2rQ6R:aQ6W:cQ6X:jQ7P4kQ7n5gQ7r5pQ7{:kQ8P:pQ8Q:qQ8v7tQ9U8cQ9]8tQ9n#OR;Q;^R#WWR&{!cY!qQ'Q,}0u4pS&w!c,uQ']!oS'g!r!uS'i!v4rS,r&x'PS-^'^'_Q-`'`Q1{,{R2Z-_R(k#tR(n#uQ!dQT,|'Q,}]!nQ!o'Q,}0u4pQ#l]R'Z9mT#gZ%ZS#fZ%ZU%y|},ZU(W#d#e#hS-r(X(YQ-v(ZQ0h+hQ2`-sU2a-t-u-wS5v2b2cR7u5w`#YW#S#V%v't'}+e-mt#cZ|}#d#e#h%Z(X(Y(Z+h-s-t-u-w2b2c5wQ1_,ZQ1r,oQ5e1jQ7m5fT:x&y+fT#]W%vS#[W%vS'u#S'}S'z#V+eS,t&y+fT-h't-mT'O!c%wQ$hfR)j$mT)_$h)`R3Z.kT*O$u*QR*W$xQ/}*zQ2e.OQ4s0wQ5{2iQ7X4vQ7x5zQ8e7WQ8w7wQ9W8gQ9`8yQ9e9XR9h9alpOXr!X#`%]&d&f&g&i,],b1b1eQ&^!TR,Q&ZV%z|},ZR0q+qR,P&XQ%szR+c%tR+X%nT&b!U&eT&c!U&eT1d,b1e",nodeNames:"⚠ ArithOp ArithOp LineComment BlockComment Script ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > TypeParamList TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . ?. PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewExpression new TypeArgList CompareOp < ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies in const CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXStartTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast ArrowFunction TypeParamList SequenceExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:364,context:Tj,nodeProps:[["group",-26,6,14,16,62,199,203,206,207,209,212,215,225,227,233,235,237,239,242,248,254,256,258,260,262,264,265,"Statement",-32,10,11,25,28,29,35,45,48,49,51,56,64,72,76,78,80,81,103,104,113,114,131,134,136,137,138,139,141,142,162,163,165,"Expression",-23,24,26,30,34,36,38,166,168,170,171,173,174,175,177,178,179,181,182,183,193,195,197,198,"Type",-3,84,96,102,"ClassItem"],["openedBy",31,"InterpolationStart",50,"[",54,"{",69,"(",143,"JSXStartTag",155,"JSXStartTag JSXStartCloseTag"],["closedBy",33,"InterpolationEnd",44,"]",55,"}",70,")",144,"JSXSelfCloseEndTag JSXEndTag",160,"JSXEndTag"]],propSources:[$j],skippedNodes:[0,3,4,268],repeatNodeCount:33,tokenData:"$>y(CSR!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tu>PuvBavwDxwxGgxyMvyz! Qz{!![{|!%O|}!&]}!O!%O!O!P!'g!P!Q!1w!Q!R#0t!R![#3T![!]#@T!]!^#Aa!^!_#Bk!_!`#GS!`!a#In!a!b#N{!b!c$$z!c!}>P!}#O$&U#O#P$'`#P#Q$,w#Q#R$.R#R#S>P#S#T$/`#T#o$0j#o#p$4z#p#q$5p#q#r$7Q#r#s$8^#s$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$I|>P$I|$I}$P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(n%d_$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$d&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$d&j'z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU'z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$d&j'wpOY(rYZ&cZr(rrs&cs!^(r!^!_)r!_#O(r#O#P&c#P#o(r#o#p)r#p;'S(r;'S;=`*a<%lO(rp)wU'wpOY)rZr)rs#O)r#P;'S)r;'S;=`*Z<%lO)rp*^P;=`<%l)r'[*dP;=`<%l(r#S*nX'wp'z!bOY*gZr*grs'}sw*gwx)rx#O*g#P;'S*g;'S;=`+Z<%lO*g#S+^P;=`<%l*g(n+dP;=`<%l%Z(CS+rq$d&j'wp'z!b'm(;dOX%ZXY+gYZ&cZ[+g[p%Zpq+gqr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p$f%Z$f$g+g$g#BY%Z#BY#BZ+g#BZ$IS%Z$IS$I_+g$I_$JT%Z$JT$JU+g$JU$KV%Z$KV$KW+g$KW&FU%Z&FU&FV+g&FV;'S%Z;'S;=`+a<%l?HT%Z?HT?HU+g?HUO%Z(CS.ST'x#S$d&j'n(;dO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c(CS.n_$d&j'wp'z!b'n(;dOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#`/x`$d&j!l$Ip'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`0z!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S1V`#q$Id$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`2X!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#S2d_#q$Id$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$2b3l_'v$(n$d&j'z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k*r4r_$d&j'z!bOY4kYZ5qZr4krs7nsw4kwx5qx!^4k!^!_8p!_#O4k#O#P5q#P#o4k#o#p8p#p;'S4k;'S;=`:X<%lO4k)`5vX$d&jOr5qrs6cs!^5q!^!_6y!_#o5q#o#p6y#p;'S5q;'S;=`7h<%lO5q)`6jT$_#t$d&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c#t6|TOr6yrs7]s;'S6y;'S;=`7b<%lO6y#t7bO$_#t#t7eP;=`<%l6y)`7kP;=`<%l5q*r7w]$_#t$d&j'z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}%W8uZ'z!bOY8pYZ6yZr8prs9hsw8pwx6yx#O8p#O#P6y#P;'S8p;'S;=`:R<%lO8p%W9oU$_#t'z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}%W:UP;=`<%l8p*r:[P;=`<%l4k#%|:hg$d&j'wp'z!bOY%ZYZ&cZr%Zrs&}st%Ztu`k$d&j'wp'z!b(U!LY't&;d$W#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P+d@`k$d&j'wp'z!b$W#tOY%ZYZ&cZr%Zrs&}st%Ztu@Tuw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![@T![!^%Z!^!_*g!_!c%Z!c!}@T!}#O%Z#O#P&c#P#R%Z#R#S@T#S#T%Z#T#o@T#o#p*g#p$g%Z$g;'S@T;'S;=`BT<%lO@T+dBWP;=`<%l@T(CSB^P;=`<%l>P%#SBl`$d&j'wp'z!b#i$IdOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_!`Cn!`#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%#SCy_$d&j#{$Id'wp'z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%DfETa(j%Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z$/l#>fi$d&j'wp'z!bl$'|OY%ZYZ&cZr%Zrs&}sw%Zwx(rx!Q%Z!Q![#>Z![!^%Z!^!_*g!_!c%Z!c!i#>Z!i#O%Z#O#P&c#P#R%Z#R#S#>Z#S#T%Z#T#Z#>Z#Z#b%Z#b#c#5T#c#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z%Gh#@b_!a$b$d&j#y%Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$f%Z$f$g+g$g#BY>P#BY#BZ$9h#BZ$IS>P$IS$I_$9h$I_$JT>P$JT$JU$9h$JU$KV>P$KV$KW$9h$KW&FU>P&FU&FV$9h&FV;'S>P;'S;=`BZ<%l?HT>P?HT?HU$9h?HUO>P(CS$=Uk$d&j'wp'z!b'n(;d(U!LY't&;d$W#tOY%ZYZ&cZr%Zrs&}st%Ztu>Puw%Zwx(rx}%Z}!O@T!O!Q%Z!Q![>P![!^%Z!^!_*g!_!c%Z!c!}>P!}#O%Z#O#P&c#P#R%Z#R#S>P#S#T%Z#T#o>P#o#p*g#p$g%Z$g;'S>P;'S;=`BZ<%lO>P",tokenizers:[Mj,Pj,2,3,4,5,6,7,8,9,10,11,12,13,Cj,new MN.d("$S~RRtu[#O#Pg#S#T#|~_P#o#pb~gOq~~jVO#i!P#i#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!O~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(T~~",141,326),new MN.d("j~RQYZXz{^~^O'q~~aP!P!Qd~iO'r~~",25,308)],topRules:{Script:[0,5],SingleExpression:[1,266],SingleClassItem:[2,267]},dialects:{jsx:12686,ts:12688},dynamicPrecedences:{76:1,78:1,163:1,191:1},specialized:[{term:312,get:e=>Rj[e]||-1},{term:328,get:e=>Ij[e]||-1},{term:67,get:e=>Dj[e]||-1}],tokenPrec:12712}),jj=[CD("function ${name}(${params}) {\n\t${}\n}",{label:"function",detail:"definition",type:"keyword"}),CD("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n\t${}\n}",{label:"for",detail:"loop",type:"keyword"}),CD("for (let ${name} of ${collection}) {\n\t${}\n}",{label:"for",detail:"of loop",type:"keyword"}),CD("do {\n\t${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),CD("while (${}) {\n\t${}\n}",{label:"while",detail:"loop",type:"keyword"}),CD("try {\n\t${}\n} catch (${error}) {\n\t${}\n}",{label:"try",detail:"/ catch block",type:"keyword"}),CD("if (${}) {\n\t${}\n}",{label:"if",detail:"block",type:"keyword"}),CD("if (${}) {\n\t${}\n} else {\n\t${}\n}",{label:"if",detail:"/ else block",type:"keyword"}),CD("class ${name} {\n\tconstructor(${params}) {\n\t\t${}\n\t}\n}",{label:"class",detail:"definition",type:"keyword"}),CD('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),CD('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],Lj=new eM.f,Bj=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function Fj(e){return(t,n)=>{let r=t.node.getChild("VariableDefinition");return r&&n(r,e),!0}}const zj=["FunctionDeclaration"],Uj={FunctionDeclaration:Fj("function"),ClassDeclaration:Fj("class"),ClassExpression:()=>!0,EnumDeclaration:Fj("constant"),TypeAliasDeclaration:Fj("type"),NamespaceDeclaration:Fj("namespace"),VariableDefinition(e,t){e.matchContext(zj)||t(e,"variable")},TypeDefinition(e,t){t(e,"type")},__proto__:null};function Qj(e,t){let n=Lj.get(t);if(n)return n;let r=[],i=!0;function o(t,n){let i=e.sliceString(t.from,t.to);r.push({label:i,type:n})}return t.cursor(eM.b.IncludeAnonymous).iterate(t=>{if(i)i=!1;else if(t.name){let e=Uj[t.name];if(e&&e(t,o)||Bj.has(t.name))return!1}else if(t.to-t.from>8192){for(let n of Qj(e,t.node))r.push(n);return!1}}),Lj.set(t,r),r}const qj=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,Hj=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName"];function Gj(e){let t=IM(e.state).resolveInner(e.pos,-1);if(Hj.indexOf(t.name)>-1)return null;let n="VariableName"==t.name||t.to-t.from<20&&qj.test(e.state.sliceDoc(t.from,t.to));if(!n&&!e.explicit)return null;let r=[];for(let n=t;n;n=n.parent)Bj.has(n.name)&&(r=r.concat(Qj(e.state.doc,n)));return{options:r,from:n?t.from:e.pos,validFor:qj}}const Vj=RM.define({name:"javascript",parser:Nj.configure({props:[ZM.add({IfStatement:sP({except:/^\s*({|else\b)/}),TryStatement:sP({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:oP,SwitchBody:e=>{let t=e.textAfter,n=/^\s*\}/.test(t),r=/^\s*(case|default)\b/.test(t);return e.baseIndent+(n?0:r?1:2)*e.unit},Block:rP({closing:"}"}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":sP({except:/^{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag":e=>e.column(e.node.from)+e.unit}),lP.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":cP,BlockComment:e=>({from:e.from+2,to:e.to-2})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),Wj={test:e=>/^JSX/.test(e.name),facet:CM({commentTokens:{block:{open:"{/*",close:"*/}"}}})},Xj=Vj.configure({dialect:"ts"},"typescript"),Yj=Vj.configure({dialect:"jsx",props:[MM.add(e=>e.isTop?[Wj]:void 0)]}),Zj=Vj.configure({dialect:"jsx ts",props:[MM.add(e=>e.isTop?[Wj]:void 0)]},"typescript"),Jj="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(e=>({label:e,type:"keyword"}));function Kj(e={}){let t=e.jsx?e.typescript?Zj:Yj:e.typescript?Xj:Vj;return new qM(t,[Vj.data.of({autocomplete:(n=Hj,r=NI(jj.concat(Jj)),e=>{for(let t=IM(e.state).resolveInner(e.pos,-1);t;t=t.parent){if(n.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return r(e)})}),Vj.data.of({autocomplete:Gj}),e.jsx?nL:[]]);var n,r}function eL(e,t,n=e.length){for(let r=null==t?void 0:t.firstChild;r;r=r.nextSibling)if("JSXIdentifier"==r.name||"JSXBuiltin"==r.name||"JSXNamespacedName"==r.name||"JSXMemberExpression"==r.name)return e.sliceString(r.from,Math.min(r.to,n));return""}const tL="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),nL=pT.inputHandler.of((e,t,n,r)=>{if((tL?e.composing:e.compositionStarted)||e.state.readOnly||t!=n||">"!=r&&"/"!=r||!Vj.isActiveAt(e.state,t,-1))return!1;let{state:i}=e,o=i.changeByRange(e=>{var t;let n,{head:o}=e,s=IM(i).resolveInner(o,-1);if("JSXStartTag"==s.name&&(s=s.parent),"JSXAttributeValue"==s.name&&s.to>o);else{if(">"==r&&"JSXFragmentTag"==s.name)return{range:gw.cursor(o+1),changes:{from:o,insert:">"}};if("/"==r&&"JSXFragmentTag"==s.name){let e=s.parent,r=null==e?void 0:e.parent;if(e.from==o-1&&"JSXEndTag"!=(null===(t=r.lastChild)||void 0===t?void 0:t.name)&&(n=eL(i.doc,null==r?void 0:r.firstChild,o))){let e=`/${n}>`;return{range:gw.cursor(o+e.length),changes:{from:o,insert:e}}}}else if(">"==r){let e=function(e){for(;;){if("JSXOpenTag"==e.name||"JSXSelfClosingTag"==e.name||"JSXFragmentTag"==e.name)return e;if("JSXEscape"==e.name||!e.parent)return null;e=e.parent}}(s);if(e&&(!(a=e.lastChild)||"JSXEndTag"!=a.name&&"JSXSelfCloseEndTag"!=a.name)&&"`}}}}var a;return{range:e}});return!o.changes.empty&&(e.dispatch(o,{userEvent:"input.type",scrollIntoView:!0}),!0)});const rL=["_blank","_self","_top","_parent"],iL=["ascii","utf-8","utf-16","latin1","latin1"],oL=["get","post","put","delete"],sL=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],aL=["true","false"],lL={},cL={a:{attrs:{href:null,ping:null,type:null,media:null,target:rL,hreflang:null}},abbr:lL,address:lL,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:lL,aside:lL,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:lL,base:{attrs:{href:null,target:rL}},bdi:lL,bdo:lL,blockquote:{attrs:{cite:null}},body:lL,br:lL,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:sL,formmethod:oL,formnovalidate:["novalidate"],formtarget:rL,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:lL,center:lL,cite:lL,code:lL,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:lL,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:lL,div:lL,dl:lL,dt:lL,em:lL,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:lL,figure:lL,footer:lL,form:{attrs:{action:null,name:null,"accept-charset":iL,autocomplete:["on","off"],enctype:sL,method:oL,novalidate:["novalidate"],target:rL}},h1:lL,h2:lL,h3:lL,h4:lL,h5:lL,h6:lL,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:lL,hgroup:lL,hr:lL,html:{attrs:{manifest:null}},i:lL,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:sL,formmethod:oL,formnovalidate:["novalidate"],formtarget:rL,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:lL,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:lL,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:lL,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:iL,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:lL,noscript:lL,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:lL,param:{attrs:{name:null,value:null}},pre:lL,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:lL,rt:lL,ruby:lL,samp:lL,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:iL}},section:lL,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:lL,source:{attrs:{src:null,type:null,media:null}},span:lL,strong:lL,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:lL,summary:lL,sup:lL,table:lL,tbody:lL,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:lL,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:lL,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:lL,time:{attrs:{datetime:null}},title:lL,tr:lL,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:lL,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:lL},uL={accesskey:null,class:null,contenteditable:aL,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:aL,autocorrect:aL,autocapitalize:aL,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":aL,"aria-autocomplete":["inline","list","both","none"],"aria-busy":aL,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":aL,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":aL,"aria-hidden":aL,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":aL,"aria-multiselectable":aL,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":aL,"aria-relevant":null,"aria-required":aL,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},dL="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(e=>"on"+e);for(let e of dL)uL[e]=null;class hL{constructor(e,t){this.tags=Object.assign(Object.assign({},cL),e),this.globalAttrs=Object.assign(Object.assign({},uL),t),this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}function pL(e,t,n=e.length){if(!t)return"";let r=t.firstChild,i=r&&r.getChild("TagName");return i?e.sliceString(i.from,Math.min(i.to,n)):""}function fL(e,t=!1){for(let n=e.parent;n;n=n.parent)if("Element"==n.name){if(!t)return n;t=!1}return null}function mL(e,t,n){let r=n.tags[pL(e,fL(t,!0))];return(null==r?void 0:r.children)||n.allTags}function gL(e,t){let n=[];for(let r=t;r=fL(r);){let i=pL(e,r);if(i&&"CloseTag"==r.lastChild.name)break;i&&n.indexOf(i)<0&&("EndTag"==t.name||t.from>=r.firstChild.to)&&n.push(i)}return n}hL.default=new hL;const bL=/^[:\-\.\w\u00b7-\uffff]*$/;function vL(e,t,n,r,i){let o=/\s*>/.test(e.sliceDoc(i,i+5))?"":">";return{from:r,to:i,options:mL(e.doc,n,t).map(e=>({label:e,type:"type"})).concat(gL(e.doc,n).map((e,t)=>({label:"/"+e,apply:"/"+e+o,type:"type",boost:99-t}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function yL(e,t,n,r){let i=/\s*>/.test(e.sliceDoc(r,r+5))?"":">";return{from:n,to:r,options:gL(e.doc,t).map((e,t)=>({label:e,apply:e+i,type:"type",boost:99-t})),validFor:bL}}function _L(e,t){let{state:n,pos:r}=t,i=IM(n).resolveInner(r),o=i.resolve(r,-1);for(let e,t=r;i==o&&(e=o.childBefore(t));){let n=e.lastChild;if(!n||!n.type.isError||n.from({label:e,type:"property"})),validFor:bL}}(n,e,o,"AttributeName"==o.name?o.from:r,r):"Is"==o.name||"AttributeValue"==o.name||"UnquotedAttributeValue"==o.name?function(e,t,n,r,i){var o;let s=null===(o=n.parent)||void 0===o?void 0:o.getChild("AttributeName"),a=[],l=void 0;if(s){let o=e.sliceDoc(s.from,s.to),c=t.globalAttrs[o];if(!c){let r=fL(n),i=r?t.tags[pL(e.doc,r)]:null;c=(null==i?void 0:i.attrs)&&i.attrs[o]}if(c){let t=e.sliceDoc(r,i).toLowerCase(),n='"',o='"';/^['"]/.test(t)?(l='"'==t[0]?/^[^"]*$/:/^[^']*$/,n="",o=e.sliceDoc(i,i+1)==t[0]?"":t[0],t=t.slice(1),r++):l=/^[^\s<>='"]*$/;for(let e of c)a.push({label:e,apply:n+e+o,type:"constant"})}}return{from:r,to:i,options:a,validFor:l}}(n,e,o,"Is"==o.name?r:o.from,r):!t.explicit||"Element"!=i.name&&"Text"!=i.name&&"Document"!=i.name?null:function(e,t,n,r){let i=[],o=0;for(let r of mL(e.doc,n,t))i.push({label:"<"+r,type:"type"});for(let t of gL(e.doc,n))i.push({label:"",type:"type",boost:99-o++});return{from:r,to:r,options:i,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}(n,e,o,r)}function SL(e){let{extraTags:t,extraGlobalAttributes:n}=e,r=n||t?new hL(t,n):hL.default;return e=>_L(r,e)}const xL=[{tag:"script",attrs:e=>"text/typescript"==e.type||"ts"==e.lang,parser:Xj.parser},{tag:"script",attrs:e=>"text/babel"==e.type||"text/jsx"==e.type,parser:Yj.parser},{tag:"script",attrs:e=>"text/typescript-jsx"==e.type,parser:Zj.parser},{tag:"script",attrs:e=>!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type),parser:Vj.parser},{tag:"style",attrs:e=>(!e.lang||"css"==e.lang)&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type)),parser:Oj.parser}],wL=[{name:"style",parser:Oj.parser.configure({top:"Styles"})}].concat(dL.map(e=>({name:e,parser:Vj.parser}))),kL=RM.define({name:"html",parser:JN.configure({props:[ZM.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+t[0].length?e.continue():e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag":e=>e.column(e.node.from)+e.unit,Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].lengthe.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"\x3c!--",close:"--\x3e"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-._"}}),OL=kL.configure({wrap:nj(xL,wL)});function EL(e={}){let t,n="";!1===e.matchClosingTags&&(n="noMatch"),!0===e.selfClosingTags&&(n=(n?n+" ":"")+"selfClosing"),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(t=nj((e.nestedLanguages||[]).concat(xL),(e.nestedAttributes||[]).concat(wL)));let r=t?kL.configure({wrap:t,dialect:n}):n?OL.configure({dialect:n}):OL;return new qM(r,[OL.data.of({autocomplete:SL(e)}),!1!==e.autoCloseTags?TL:[],Kj().support,Ej().support])}const AL=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),TL=pT.inputHandler.of((e,t,n,r)=>{if(e.composing||e.state.readOnly||t!=n||">"!=r&&"/"!=r||!OL.isActiveAt(e.state,t,-1))return!1;let{state:i}=e,o=i.changeByRange(t=>{var n,o,s;let a,{head:l}=t,c=IM(i).resolveInner(l,-1);if("TagName"!=c.name&&"StartTag"!=c.name||(c=c.parent),">"==r&&"OpenTag"==c.name){if("CloseTag"!=(null===(o=null===(n=c.parent)||void 0===n?void 0:n.lastChild)||void 0===o?void 0:o.name)&&(a=pL(i.doc,c.parent,l))&&!AL.has(a)){let t=">"===e.state.doc.sliceString(l,l+1),n=`${t?"":">"}`;return{range:gw.cursor(l+1),changes:{from:l+(t?1:0),insert:n}}}}else if("/"==r&&"OpenTag"==c.name){let t=c.parent,n=null==t?void 0:t.parent;if(t.from==l-1&&"CloseTag"!=(null===(s=n.lastChild)||void 0===s?void 0:s.name)&&(a=pL(i.doc,n,l))&&!AL.has(a)){let t=">"===e.state.doc.sliceString(l,l+1),n=`/${a}${t?"":">"}`,r=l+n.length+(t?1:0);return{range:gw.cursor(r),changes:{from:l,insert:n}}}}return{range:t}});return!o.changes.empty&&(e.dispatch(o,{userEvent:"input.type",scrollIntoView:!0}),!0)}),CL=new Set([27,51,52,270,67,133,58,59,251,64,65,74,62,63,154,155,158,115]);function ML(e){return 10==e||13==e}const PL=new MN.b((e,t)=>{let n;if(e.next<0)e.acceptToken(206);else if(t.context.depth<0)ML(e.next)&&e.acceptToken(205,1);else if(((n=e.peek(-1))<0||ML(n))&&t.canShift(204)){let t=0;for(;32==e.next||9==e.next;)e.advance(),t++;10!=e.next&&13!=e.next&&35!=e.next||e.acceptToken(204,-t)}else ML(e.next)&&e.acceptToken(203,1)},{contextual:!0}),$L=new MN.b((e,t)=>{let n=t.context.depth;if(n<0)return;let r=e.peek(-1);if(10==r||13==r){let t=0,r=0;for(;;){if(32==e.next)t++;else{if(9!=e.next)break;t+=8-t%8}e.advance(),r++}t!=n&&10!=e.next&&13!=e.next&&35!=e.next&&(te.depth<0&&CL.has(t)?e.parent:e,shift:(e,t,n,r)=>201==t?new RL(e,function(e){let t=0;for(let n=0;ne.hash}),NL=new MN.b(e=>{for(let t=0;t<5;t++){if(e.next!="print".charCodeAt(t))return;e.advance()}if(!/\w/.test(String.fromCharCode(e.next)))for(let t=0;;t++){let n=e.peek(t);if(32!=n&&9!=n)return void(40!=n&&46!=n&&10!=n&&13!=n&&35!=n&&e.acceptToken(1))}});function jL(e,t,n,r,i){return new MN.b(o=>{let s=o.pos;for(;!(o.next<0);)if(123==o.next){if(123!=o.peek(1)){if(o.pos==s)return void o.acceptToken(r,1);break}o.advance(2)}else if(92==o.next)o.advance(),o.next>=0&&o.advance();else{if(o.next==e&&(1==t||o.peek(1)==e&&o.peek(2)==e)){if(o.pos==s)return void o.acceptToken(i,t);break}o.advance()}o.pos>s&&o.acceptToken(n)})}const LL=jL(39,1,207,2,208),BL=jL(34,1,209,3,210),FL=jL(39,3,211,4,212),zL=jL(34,3,213,5,214),UL=oM({'async "*" "**" FormatConversion FormatSpec':EM.modifier,"for while if elif else try except finally return raise break continue with pass assert await yield match case":EM.controlKeyword,"in not and or is del":EM.operatorKeyword,"from def class global nonlocal lambda":EM.definitionKeyword,import:EM.moduleKeyword,"with as print":EM.keyword,Boolean:EM.bool,None:EM.null,VariableName:EM.variableName,"CallExpression/VariableName":EM.function(EM.variableName),"FunctionDefinition/VariableName":EM.function(EM.definition(EM.variableName)),"ClassDefinition/VariableName":EM.definition(EM.className),PropertyName:EM.propertyName,"CallExpression/MemberExpression/PropertyName":EM.function(EM.propertyName),Comment:EM.lineComment,Number:EM.number,String:EM.string,FormatString:EM.special(EM.string),UpdateOp:EM.updateOperator,"ArithOp!":EM.arithmeticOperator,BitOp:EM.bitwiseOperator,CompareOp:EM.compareOperator,AssignOp:EM.definitionOperator,Ellipsis:EM.punctuation,At:EM.meta,"( )":EM.paren,"[ ]":EM.squareBracket,"{ }":EM.brace,".":EM.derefOperator,", ;":EM.separator}),QL={__proto__:null,await:48,or:58,and:60,in:64,not:66,is:68,if:74,else:76,lambda:80,yield:98,from:100,async:106,for:108,None:168,True:170,False:170,del:184,pass:188,break:192,continue:196,return:200,raise:208,import:212,as:214,global:218,nonlocal:220,assert:224,type:229,elif:242,while:246,try:252,except:254,finally:256,with:260,def:264,class:274,match:285,case:291},qL=MN.c.deserialize({version:14,states:"#&jO`Q#yOOP$bOSOOO%kQ&nO'#HcOOQS'#Cq'#CqOOQS'#Cr'#CrO'ZQ#xO'#CpO(|Q&nO'#HbOOQS'#Hc'#HcOOQS'#DW'#DWOOQS'#Hb'#HbO)jQ#xO'#DaO)}Q#xO'#DhO*_Q#xO'#DlOOQS'#Dw'#DwO*rO,UO'#DwO*zO7[O'#DwO+SOWO'#DxO+_O`O'#DxO+jOpO'#DxO+uO!bO'#DxO-wQ&nO'#HSOOQS'#HS'#HSO'ZQ#xO'#HRO/ZQ&nO'#HROOQS'#Ee'#EeO/rQ#xO'#EfOOQS'#HQ'#HQO/|Q#xO'#HPOOQV'#HP'#HPO0XQ#xO'#F]OOQS'#Ge'#GeO0^Q#xO'#F[OOQV'#IY'#IYOOQV'#HO'#HOOOQV'#Ft'#FtQ`Q#yOOO'ZQ#xO'#CsO0lQ#xO'#DPO0sQ#xO'#DTO1RQ#xO'#HgO1cQ&nO'#EYO'ZQ#xO'#EZOOQS'#E]'#E]OOQS'#E_'#E_OOQS'#Ea'#EaO1wQ#xO'#EcO2_Q#xO'#EgO0XQ#xO'#EiO2rQ&nO'#EiO0XQ#xO'#ElO/rQ#xO'#EoO0XQ#xO'#EqO/rQ#xO'#EwO/rQ#xO'#EzO2}Q#xO'#E|O3UQ#xO'#FRO3aQ#xO'#E}O/rQ#xO'#FRO0XQ#xO'#FTO0XQ#xO'#FYO3fQ#xO'#F_P3mO#xO'#G}POOO)CBq)CBqOOQS'#Cg'#CgOOQS'#Ch'#ChOOQS'#Ci'#CiOOQS'#Cj'#CjOOQS'#Ck'#CkOOQS'#Cl'#ClOOQS'#Cn'#CnO'ZQ#xO,59QO'ZQ#xO,59QO'ZQ#xO,59QO'ZQ#xO,59QO'ZQ#xO,59QO'ZQ#xO,59QO3xQ#xO'#DqOOQS,5:[,5:[O4]Q#xO'#HqOOQS,5:_,5:_O4jQMlO,5:_O4oQ&nO,59[O0lQ#xO,59dO0lQ#xO,59dO0lQ#xO,59dO7_Q#xO,59dO7dQ#xO,59dO7kQ#xO,59lO7rQ#xO'#HbO8xQ#xO'#HaOOQS'#Ha'#HaOOQS'#D^'#D^O9aQ#xO,59cO'ZQ#xO,59cO9oQ#xO,59cOOQS,59{,59{O9tQ#xO,5:TO'ZQ#xO,5:TOOQS,5:S,5:SO:SQ#xO,5:SO:XQ#xO,5:ZO'ZQ#xO,5:ZO'ZQ#xO,5:XOOQS,5:W,5:WO:jQ#xO,5:WO:oQ#xO,5:YOOOO'#F|'#F|O:tO,UO,5:cOOQS,5:c,5:cOOOO'#F}'#F}O:|O7[O,5:cO;UQ#xO'#DyOOOW'#GO'#GOO;fOWO,5:dOOQS,5:d,5:dO;UQ#xO'#D}OOO`'#GR'#GRO;qO`O,5:dO;UQ#xO'#EOOOOp'#GS'#GSO;|OpO,5:dO;UQ#xO'#EPOOO!b'#GT'#GTOROOQS,5>R,5>RO/rQ#xO'#EUOOQS'#EV'#EVOGZQ#xO'#GWOGkQ#xO,59OOGkQ#xO,59OO)pQ#xO,5:rOGyQ&nO'#HjOOQS,5:u,5:uOOQS,5:},5:}OH^Q#xO,5;ROHoQ#xO,5;TOOQS'#GZ'#GZOH}Q&nO,5;TOI]Q#xO,5;TOIbQ#xO'#IWOOQS,5;W,5;WOIpQ#xO'#ISOOQS,5;Z,5;ZOJRQ#xO,5;]O3aQ#xO,5;cO3aQ#xO,5;fOJZQ&nO'#IZO'ZQ#xO'#IZOJeQ#xO,5;hO2}Q#xO,5;hO/rQ#xO,5;mO0XQ#xO,5;oOJjQ#yO'#ExOKvQ#{O,5;iO! [Q#xO'#I[O3aQ#xO,5;mO! gQ#xO,5;oO! oQ#xO,5;tO! zQ&nO,5;yO'ZQ#xO,5;yPOOO,5=i,5=iP!!ROSO,5=iP!!WO#xO,5=iO!${Q&nO1G.lO!%SQ&nO1G.lO!'sQ&nO1G.lO!'}Q&nO1G.lO!*hQ&nO1G.lO!*{Q&nO1G.lO!+`Q#xO'#HpO!+nQ&nO'#HSO/rQ#xO'#HpO!+xQ#xO'#HoOOQS,5:],5:]O!,QQ#xO,5:]O!,VQ#xO'#HrO!,bQ#xO'#HrO!,uQ#xO,5>]OOQS'#Du'#DuOOQS1G/y1G/yOOQS1G/O1G/OO!-uQ&nO1G/OO!-|Q&nO1G/OO0lQ#xO1G/OO!.iQ#xO1G/WOOQS'#D]'#D]O/rQ#xO,59vOOQS1G.}1G.}O!.pQ#xO1G/gO!/QQ#xO1G/gO!/YQ#xO1G/hO'ZQ#xO'#HiO!/_Q#xO'#HiO!/dQ&nO1G.}O!/tQ#xO,59kO!0zQ#xO,5>XO!1[Q#xO,5>XO!1dQ#xO1G/oO!1iQ&nO1G/oOOQS1G/n1G/nO!1yQ#xO,5>SO!2pQ#xO,5>SO/rQ#xO1G/sO!3_Q#xO1G/uO!3dQ&nO1G/uO!3tQ&nO1G/sOOQS1G/r1G/rOOQS1G/t1G/tOOOO-E9z-E9zOOQS1G/}1G/}OOOO-E9{-E9{O!4UQ#xO'#H|O/rQ#xO'#H|O!4dQ#xO,5:eOOOW-E9|-E9|OOQS1G0O1G0OO!4oQ#xO,5:iOOO`-E:P-E:PO!4zQ#xO,5:jOOOp-E:Q-E:QO!5VQ#xO,5:kOOO!b-E:R-E:ROOQS-E:S-E:SO!5bQ!LUO1G3XO!6RQ&nO1G3XO'ZQ#xO,5oOOQS1G1c1G1cO!7RQ#xO1G1cOOQS'#DX'#DXO/rQ#xO,5>OOOQS,5>O,5>OO!7WQ#xO'#FuO!7cQ#xO,59qO!7kQ#xO1G/ZO!7uQ&nO,5>SOOQS1G3m1G3mOOQS,5:p,5:pO!8fQ#xO'#HROOQS,5UO!9gQ#xO,5>UO/rQ#xO1G0mO/rQ#xO1G0mO0XQ#xO1G0oOOQS-E:X-E:XO!9xQ#xO1G0oO!:TQ#xO1G0oO!:YQ#xO,5>rO!:hQ#xO,5>rO!:vQ#xO,5>nO!;^Q#xO,5>nO!;oQ#xO'#EsO/rQ#xO1G0wO!;zQ#xO1G0wO!uO!BzQ#xO,5>uO!CSQ&nO,5>uO/rQ#xO1G1SO!C^Q#xO1G1SO3aQ#xO1G1XO! gQ#xO1G1ZOOQV,5;d,5;dO!CcQ#zO,5;dO!ChQ#{O1G1TO!F|Q#xO'#GbO3aQ#xO1G1TO3aQ#xO1G1TO!G^Q#xO,5>vO!GkQ#xO,5>vO0XQ#xO,5>vOOQV1G1X1G1XO!GsQ#xO'#FVO!HUQMlO1G1ZO!H^Q#xO1G1ZOOQV1G1`1G1`O3aQ#xO1G1`O!HcQ#xO1G1`O!HkQ#xO'#FaOOQV1G1e1G1eO! zQ&nO1G1ePOOO1G3T1G3TP!HpOSO1G3TOOQS,5>[,5>[OOQS'#Dr'#DrO/rQ#xO,5>[O!HuQ#xO,5>ZO!IYQ#xO,5>ZOOQS1G/w1G/wO!IbQ#xO,5>^O!IrQ#xO,5>^O!IzQ#xO,5>^O!J_Q#xO,5>^O!JoQ#xO,5>^OOQS1G3w1G3wOOQS7+$j7+$jO!7kQ#xO7+$rO!LbQ#xO1G/OO!LiQ#xO1G/OOOQS1G/b1G/bOOQS,5TO'ZQ#xO,5>TOOQS7+$i7+$iO!MVQ#xO7+%RO!M_Q#xO7+%SO!MdQ#xO1G3sOOQS7+%Z7+%ZO!MtQ#xO1G3sO!M|Q#xO7+%ZOOQS,5hO##PQ#xO,5>hO##PQ#xO,5>hO##_O$ISO'#D{O##jO#tO'#H}OOOW1G0P1G0PO##oQ#xO1G0POOO`1G0T1G0TO##wQ#xO1G0TOOOp1G0U1G0UO#$PQ#xO1G0UOOO!b1G0V1G0VO#$XQ#xO1G0VO#$aQ!LUO7+(sO#%QQ&nO1G2]P#%kQ#xO'#GVOOQS,5i,5>iOOOW7+%k7+%kOOO`7+%o7+%oOOOp7+%p7+%pOOO!b7+%q7+%qO#:`Q#xO1G3XO#:yQ#xO1G3XP'ZQ#xO'#FxO/rQ#xO<qO#;mQ#xO,5>qO0XQ#xO,5>qO#pOOQS<sO#sOOQS1G0y1G0yOOQS<xO#DpQ#xO,5>xOOQS,5>x,5>xO#D{Q#xO,5>wO#E^Q#xO,5>wOOQS1G1]1G1]OOQS,5;s,5;sOOQV<XAN>XO#HmQ#xO<eAN>eO/rQ#xO1G2PO#H}Q&nO1G2PP#IXQ#xO'#FyOOQS1G2V1G2VP#IfQ#xO'#GPO#IsQ#xO7+)nO#JZQ#xO,5:hOOOO-E:O-E:OO#JfQ#xO7+(sOOQSAN?_AN?_O#KPQ#xO,5VOOQSANBaANBaOOOO7+%n7+%nOOQS7+'|7+'|O$+jQ#xO<zO$.`Q#xO,5>zO0XQ#xO,5|O$!pQ#xO,5>|OOQS1G1s1G1sO$2WQ&nO,5<_OOQU7+'S7+'SO$$mQ#xO1G/kO$!pQ#xO,5<]O$2_Q#xO,5>}O$2fQ#xO,5>}OOQS1G1v1G1vOOQS7+'V7+'VP$!pQ#xO'#GkO$2nQ#xO1G4hO$2xQ#xO1G4hO$3QQ#xO1G4hOOQS7+%V7+%VO$3`Q#xO1G1wO$3nQ&nO'#FdO$3uQ#xO,5=UOOQS,5=U,5=UO$4TQ#xO1G4iOOQS-E:h-E:hO$!pQ#xO,5=TO$4[Q#xO,5=TO$4aQ#xO7+*SOOQS-E:g-E:gO$4kQ#xO7+*SO$!pQ#xO,5<^P$!pQ#xO'#GjO$4sQ#xO1G2oO$!pQ#xO1G2oP$5RQ#xO'#GiO$5YQ#xO<fPP>i?Z?^PP'a'aPP?vPP'a'aPP'a'a'a'a'a?z@t'aP@wP@}EXHxPH|IYI^IbIf'aPPPIjIs'XP'X'XP'XP'XP'XP'XP'X'X'XP'XPP'XPP'XP'XPIyJVJ_PJfJlPJfPJfJfPPPJfPLzPMTM_MeLzPJfMnPJfPMuM{PNPNe! S! mNPNP! s!!QNPNPNPNP!!f!!l!!o!!t!!w!#R!#X!#e!#w!#}!$X!$_!${!%R!%X!%_!%i!%o!%u!%{!&R!&X!&k!&u!&{!'R!'X!'c!'i!'o!'u!'{!(V!(]!(g!(m!(v!(|!)]!)e!)o!)vPPPPPPPPPPPPPPPPP!)|!*P!*V!*`!*j!*uPPPPPPPPPPPP!/l!1Q!5T!8hPP!8p!9S!9]!:U!9{!:_!:e!:h!:k!:n!:v!;gPPPPPPPPP!;j!;yPPPP!V!>`!?[!?_]jOs#v$w*W,d(TeOTYZ[fistuwy}!O!S!U!V!W!Z!^!h!i!j!k!l!m!n!p!t!u!v!x!y#P#T#X#Y#c#g#j#m#s#v$X$Y$[$^$a$r$t$u$w%O%[%a%h%k%m%p%t%y%{&V&b&d&o&s&|'O'P'W'Z'_'b'i'l'}(O(R(T(U(Y(_(a(e(i(n(o(u(x)V)X)a)d)p)w)y)}*O*S*W*^*b*l*v*y*z*}+T+U+W+Y+]+^+a+d+h+i+l+t+v+w,O,],^,d,l,m,p,z,{,|-O-P-S-U-W-Y-[-^-_-b-y-{.S.V.Y.}/O/o/s0[0z0{0|0}1P1Q1R1S1T1V1Z}!hQ#r$P$b$q$}%r%w%}&O&t'a'x)W)c)|+R+[,[-Z0Y1O!P!iQ#r$P$b$q$}%S%r%w%}&O&t'a'x)W)c)|+R+[,[-Z0Y1O!R!jQ#r$P$b$q$}%S%T%r%w%}&O&t'a'x)W)c)|+R+[,[-Z0Y1O!T!kQ#r$P$b$q$}%S%T%U%r%w%}&O&t'a'x)W)c)|+R+[,[-Z0Y1O!V!lQ#r$P$b$q$}%S%T%U%V%r%w%}&O&t'a'x)W)c)|+R+[,[-Z0Y1O!X!mQ#r$P$b$q$}%S%T%U%V%W%r%w%}&O&t'a'x)W)c)|+R+[,[-Z0Y1O!]!mQ!s#r$P$b$q$}%S%T%U%V%W%X%r%w%}&O&t'a'x)W)c)|+R+[,[-Z0Y1O(TTOTYZ[fistuwy}!O!S!U!V!W!Z!^!h!i!j!k!l!m!n!p!t!u!v!x!y#P#T#X#Y#c#g#j#m#s#v$X$Y$[$^$a$r$t$u$w%O%[%a%h%k%m%p%t%y%{&V&b&d&o&s&|'O'P'W'Z'_'b'i'l'}(O(R(T(U(Y(_(a(e(i(n(o(u(x)V)X)a)d)p)w)y)}*O*S*W*^*b*l*v*y*z*}+T+U+W+Y+]+^+a+d+h+i+l+t+v+w,O,],^,d,l,m,p,z,{,|-O-P-S-U-W-Y-[-^-_-b-y-{.S.V.Y.}/O/o/s0[0z0{0|0}1P1Q1R1S1T1V1Z&iVOYZ[isuw}!O!S!U!V!Z!n!p!t!u!v!x!y#c#g#j#m#s#v$Y$[$^$a$u$w%[%a%h%k%m%t%y%{&V&b&o&s'O'P'W'Z'b'i'l'}(O(R(T(U(Y(a(i(o(u(x)V)X)a)p)w)y*S*W*^*b*l*v*y*z*}+T+U+W+Y+]+^+a+h+i+l+t+w,O,d,l,m,p,z,{,|-O-P-S-U-W-Y-[-^-_-b-y-{.S.V.Y.}/O/s0[0z0{0|0}1P1Q1R1S1V1Z%sXOYZ[isw}!O!S!U!V!Z!n!p#c#g#j#m#s#v$Y$[$^$a$u$w%[%a%k%m%t%y%{&V&b&o&s'O'P'W'Z'b'i'l'}(O(R(T(U(Y(a(i(o(u(x)V)X)a)p)w)y*S*W*^*b*l*v*y*z*}+T+W+Y+]+^+a+h+i+l+t+w,O,d,l,m,p,z,{,|-O-P-S-W-Y-[-^-_-b-y-{.S.V.}/O/s1Q1R1SQ$VvQ/t/SR1W1Y'zeOTYZ[fistuwy}!O!S!U!V!W!Z!^!h!i!j!k!l!m!p!t!u!v!x!y#P#T#X#Y#c#g#j#m#s#v$X$Y$[$^$a$r$t$u$w%O%[%a%h%k%m%p%t%y%{&V&b&d&o&s&|'O'P'W'Z'_'b'i'l'}(R(T(U(Y(_(a(e(i(n(o(u(x)V)X)a)d)p)w)y)}*O*S*W*^*b*l*y*z*}+T+U+W+Y+]+^+a+d+h+i+l+t+v+w,O,],^,d,l,m,p,{,|-O-P-S-U-W-Y-[-^-_-b-y-{.S.V.Y.}/O/o/s0[0z0{0|0}1P1Q1R1S1T1V1ZW#ym!P!Q$hW$Rv&q/S1YQ$j!RQ$n!TQ${![Q$|!]W%Z!n(O*v,zS&p$S$TQ'e$vQ)Y&jQ)h'QU)i'S)j)kU)l'U)m+}W)s'Y,Q-j.dQ*d'nW*e'p,s-}.lQ,P)rS,r*f*gY-d+x-e.a.b/XQ-g+zQ-t,hQ-x,kQ.j-vl.o.R.u.v.x/d/f/k0R0W0]0b0m0r0uQ/W.`Q/l.wQ/x/^Q0T/hU0h0^0k0sX0n0c0o0v0wR&o$R!_!|YZ!U!V!p%a%m%t(R(T(U(a(i)y*y*z*}+T+W+Y,{,|-O-P-S.S.V.}/O/sR%k!{Q#QYQ&W#cQ&Z#gQ&]#jQ&_#mQ&x$^Q&{$aR-`+lT/R.Y0[![!oQ!s#r$P$b$q$}%S%T%U%V%W%X%r%w%}&O&t'a'x)W)c)|+R+[,[-Z0Y1OQ&m#zQ't$|R*p'uR'}%ZQ%d!rR/v/[(SdOTYZ[fistuwy}!O!S!U!V!W!Z!^!h!i!j!k!l!m!n!p!t!u!v!x!y#P#T#X#Y#c#g#j#m#s#v$X$Y$[$^$a$r$t$u$w%O%[%a%h%k%m%p%t%y%{&V&b&d&o&s&|'O'P'W'Z'_'b'i'l'}(O(R(T(U(Y(_(a(e(i(n(o(u(x)V)X)a)d)p)w)y)}*O*S*W*^*b*l*v*y*z*}+T+U+W+Y+]+^+a+d+h+i+l+t+v+w,O,],^,d,l,m,p,z,{,|-O-P-S-U-W-Y-[-^-_-b-y-{.S.V.Y.}/O/o/s0[0z0{0|0}1P1Q1R1S1T1V1ZS#pd#q!P.s.R.u.v.w.x/^/d/f/k0R0W0]0^0b0c0k0m0o0r0s0u0v0w(SdOTYZ[fistuwy}!O!S!U!V!W!Z!^!h!i!j!k!l!m!n!p!t!u!v!x!y#P#T#X#Y#c#g#j#m#s#v$X$Y$[$^$a$r$t$u$w%O%[%a%h%k%m%p%t%y%{&V&b&d&o&s&|'O'P'W'Z'_'b'i'l'}(O(R(T(U(Y(_(a(e(i(n(o(u(x)V)X)a)d)p)w)y)}*O*S*W*^*b*l*v*y*z*}+T+U+W+Y+]+^+a+d+h+i+l+t+v+w,O,],^,d,l,m,p,z,{,|-O-P-S-U-W-Y-[-^-_-b-y-{.S.V.Y.}/O/o/s0[0z0{0|0}1P1Q1R1S1T1V1ZT#pd#qT#d`#ee(|&W&Z&]&_)O)Q)S)U-`._T+m({+nT#ha#iT#kb#lT#nc#oQ$`xQ,P)sR,q*eX$^x$_$`&zQ'[$nQ'r${Q'u$|R*V'eQ)t'YV-i,Q-j.dZlOs$w*W,dXpOs*W,dQ$x!YQ']$oQ'^$pQ'o$zQ's$|Q*T'dQ*['iQ*_'jQ*`'kQ*m'qS*o't'uQ,W)yQ,Y)zQ,Z){Q,_*RS,a*U*nQ,e*YQ,f*ZS,g*]*^Q,w*pQ-l,VQ-m,XQ-o,`S-p,b,cQ-u,iQ-w,jQ.e-nQ.g-qQ.h-sQ.i-tQ/Y.fQ/Z.jQ/p.{R0Z/qWpOs*W,dR#|oQ'q${S*U'e'rR,c*VQ,p*eR-{,qQ*n'qQ,b*UR-q,cZnOos*W,dQ'w$}R*r'xT.P,x.Qu.z.R.u.v.x/^/d/f/k0R0W0]0^0b0k0m0r0s0ut.z.R.u.v.x/^/d/f/k0R0W0]0^0b0k0m0r0s0uQ/l.wX0n0c0o0v0w!P.r.R.u.v.w.x/^/d/f/k0R0W0]0^0b0c0k0m0o0r0s0u0v0wQ/a.qR/}/bg/d.t/e/y0Q0V0e0g0i0t0x0yu.y.R.u.v.x/^/d/f/k0R0W0]0^0b0k0m0r0s0uX/_.o.y/x0hR/z/^V0j0^0k0sR/q.{QsOS$Os,dR,d*WQ&r$UR)_&rS%z#W$WS(p%z(sT(s%}&tQ%n#OQ%u#SW(b%n%u(g(kQ(g%rR(k%wQ&}$bR)e&}Q(v&OQ+_(qT+e(v+_Q(P%]R*w(PS(S%`%aY*{(S*|-Q.W/PU*|(T(U(VU-Q*}+O+PS.W-R-SR/P.XQ#_^R&R#_Q#b_R&T#bQ#e`R&X#eQ(y&US+j(y+kR+k(zQ+n({R-a+nQ#iaR&[#iQ#lbR&^#lQ#ocR&`#oQ#qdR&a#qQ#tgQ&c#rW&f#t&c)b+uQ)b&wR+u1OQ$_xS&y$_&zR&z$`Q'X$lR)q'XQ&k#yR)Z&kQ$h!QR'R$hQ+y)iS-f+y.cR.c-gQ'V$jR)n'VQ,R)tR-k,RQ#wkR&h#wQ)x']R,U)xQ'`$qS*P'`*QR*Q'aQ'h$xR*X'hQ'm$yS*c'm,nR,n*dQ,t*iR.O,tWoOs*W,dR#{oQ.Q,xR.m.Qd/e.t/y0Q0V0e0g0i0t0x0yR0P/eU/].o/x0hR/w/]Q0d0VS0p0d0qR0q0eS0_/y/zR0l0_Q/g.tR0S/gR!`PXrOs*W,dWqOs*W,dR'f$wYkOs$w*W,dR&g#v[xOs#v$w*W,dR&x$^&hQOYZ[isuw}!O!S!U!V!Z!n!p!t!u!v!x!y#c#g#j#m#s#v$Y$[$^$a$u$w%[%a%h%k%m%t%y%{&V&b&o&s'O'P'W'Z'b'i'l'}(O(R(T(U(Y(a(i(o(u(x)V)X)a)p)w)y*S*W*^*b*l*v*y*z*}+T+U+W+Y+]+^+a+h+i+l+t+w,O,d,l,m,p,z,{,|-O-P-S-U-W-Y-[-^-_-b-y-{.S.V.Y.}/O/s0[0z0{0|0}1P1Q1R1S1V1ZQ!sTQ#rfQ$PtU$by%p(eS$q!W$tQ$}!^Q%S!hQ%T!iQ%U!jQ%V!kQ%W!lQ%X!mQ%r#PQ%w#TQ%}#XQ&O#YQ&t$XQ'a$rQ'x%OQ)W&dU)c&|)d+vW)|'_*O,],^Q+R(_Q+[(nQ,[)}Q-Z+dQ0Y/oR1O1TQ#OYQ#SZQ$o!UQ$p!VQ%`!pQ(V%a^(^%m%t(a(i+T+W+Y^*x(R*z-O-P.V/O/sQ+O(TQ+P(UQ,X)yQ,}*yQ-R*}Q.T,{Q.U,|Q.X-SQ.|.SR/r.}[gOs#v$w*W,d!^!{YZ!U!V!p%a%m%t(R(T(U(a(i)y*y*z*}+T+W+Y,{,|-O-P-S.S.V.}/O/sQ#W[Q#uiS$Ww}Q$e!OW$l!S$a'b*SS$y!Z$uW%Y!n(O*v,zY&U#c#g#j#m+l`&e#s&b)V)X)a+t-b1SQ&u$YQ&v$[Q&w$^Q'{%[Q(]%kW(m%y(o+]+aQ(q%{Q(z&VQ)]&oS)`&s1QQ)f'OQ)g'PU)o'W)p,OQ)v'ZQ*]'iY*a'l*b,l,m-yQ*t'}S+Q(Y1RW+c(u+^-W-[W+g(x+i-^-_Q,T)wQ,i*^Q,v*lQ-]+hQ-c+wQ-z,pQ.]-YR.k-{hUOs#s#v$w&b&s(Y)V)X*W,d%Y!zYZ[iw}!O!S!U!V!Z!n!p#c#g#j#m$Y$[$^$a$u%[%a%k%m%t%y%{&V&o'O'P'W'Z'b'i'l'}(O(R(T(U(a(i(o(u(x)a)p)w)y*S*^*b*l*v*y*z*}+T+W+Y+]+^+a+h+i+l+t+w,O,l,m,p,z,{,|-O-P-S-W-Y-[-^-_-b-y-{.S.V.}/O/s1Q1R1SQ$QuW%e!t!x0{1VQ%f!uQ%g!vQ%i!yQ%s0zS(X%h1PQ(Z0|Q([0}Q-T+UQ.[-US/Q.Y0[R1X1ZU$Uv/S1YR)^&q[hOs#v$w*W,da!}Y#c#g#j#m$^$a+lQ#][Q$ZwR$d}Q%o#OQ%v#SQ%|#WQ'{%YQ(h%rQ(l%wQ(t%}Q(w&OQ+`(qQ,y*tQ.Z-TQ/U.[R/u/TQ$cyQ(d%pR+V(eQ/T.YR0f0[R#VZR#[[R%_!nQ%]!nV*u(O*v,z!]!qQ!s#r$P$b$q$}%S%T%U%V%W%X%r%w%}&O&t'a'x)W)c)|+R+[,[-Z0Y1OR%b!pQ&W#cQ&Z#gQ&]#jQ&_#mR-`+lQ(}&WQ)P&ZQ)R&]Q)T&_Q+p)OQ+q)QQ+r)SQ+s)UQ.^-`R/V._Q$m!SQ&{$aQ*R'bR,`*SQ#zmQ$f!PQ$i!QR'T$hQ)h'SR+|)kQ)h'SQ+{)jR+|)kR$k!RR)u'YXqOs*W,dQ$s!WR'c$tQ$z!ZR'd$uR*k'pQ*i'pV-|,s-}.lQ.{.RQ/i.uR/j.vU.t.R.u.vQ/n.xQ/y/^Q0O/dU0Q/f0R0bQ0V/kQ0e0WQ0g0]U0i0^0k0sQ0t0mQ0x0rR0y0uR/m.wR/{/^",nodeNames:"⚠ print { { { { Comment Script AssignStatement * BinaryExpression BitOp BitOp BitOp BitOp ArithOp ArithOp @ ArithOp ** UnaryExpression ArithOp BitOp AwaitExpression await ) ( ParenthesizedExpression BinaryExpression or and CompareOp in not is UnaryExpression ConditionalExpression if else LambdaExpression lambda ParamList VariableName AssignOp , : NamedExpression AssignOp YieldExpression yield from TupleExpression ComprehensionExpression async for LambdaExpression ] [ ArrayExpression ArrayComprehensionExpression } { DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression CallExpression ArgList AssignOp MemberExpression . PropertyName Number String FormatString FormatReplacement FormatConversion FormatSpec FormatReplacement FormatReplacement FormatReplacement FormatReplacement ContinuedString Ellipsis None Boolean TypeDef AssignOp UpdateStatement UpdateOp ExpressionStatement DeleteStatement del PassStatement pass BreakStatement break ContinueStatement continue ReturnStatement return YieldStatement PrintStatement RaiseStatement raise ImportStatement import as ScopeStatement global nonlocal AssertStatement assert TypeDefinition type TypeParamList TypeParam StatementGroup ; IfStatement Body elif WhileStatement while ForStatement TryStatement try except finally WithStatement with FunctionDefinition def ParamList AssignOp TypeDef ClassDefinition class DecoratedStatement Decorator At MatchStatement match MatchBody MatchClause case CapturePattern LiteralPattern ArithOp ArithOp AsPattern OrPattern LogicOp AttributePattern SequencePattern MappingPattern StarPattern ClassPattern PatternArgList KeywordPattern KeywordPattern Guard",maxTerm:283,context:DL,nodeProps:[["group",-15,8,88,90,91,93,95,97,99,101,102,103,105,108,111,113,"Statement Statement",-22,10,20,23,27,42,51,52,58,59,62,63,64,65,66,69,72,73,74,82,83,84,85,"Expression",-10,117,119,122,124,125,129,131,136,138,141,"Statement",-9,146,147,150,151,153,154,155,156,157,"Pattern"],["openedBy",25,"(",56,"[",60,"{"],["closedBy",26,")",57,"]",61,"}"]],propSources:[UL],skippedNodes:[0,6],repeatNodeCount:38,tokenData:"%-W#sR!`OX%TXY=|Y[%T[]=|]p%Tpq=|qr@_rsDOst!+|tu%Tuv!Nnvw#!|wx#$Wxy#:Uyz#;Yz{#<^{|#>x|}#@S}!O#AW!O!P#Ci!P!Q#N_!Q!R$!y!R![$&w![!]$1e!]!^$3s!^!_$4w!_!`$7c!`!a$8m!a!b%T!b!c$;U!c!d$W!e!h$W#V#Y$Q<%lO$Xc&r!b&jS&mW%p!TOX%TXY=|Y[%T[]=|]p%Tpq=|qr%Trs&Vsw%Twx/Xx#O%T#O#P?d#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#s?i[&r!bOY%TYZ=|Z]%T]^=|^#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=P;=`<%l8^<%lO%T!q@hd&r!b&jS&mWOr%Trs&Vsw%Twx/Xx!_%T!_!`Av!`#O%T#O#P7o#P#T%T#T#UBz#U#f%T#f#gBz#g#hBz#h#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T!qBR]oR&r!b&jS&mWOr%Trs&Vsw%Twx/Xx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T!qCV]!nR&r!b&jS&mWOr%Trs&Vsw%Twx/Xx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#cDXa&r!b&jS&hsOYE^YZ%TZ]E^]^%T^rE^rs!)|swE^wxGpx#OE^#O#P!!u#P#oE^#o#p!#d#p#qE^#q#r!#d#r;'SE^;'S;=`!)v<%lOE^#cEia&r!b&jS&mW&hsOYE^YZ%TZ]E^]^%T^rE^rsFnswE^wxGpx#OE^#O#P!!u#P#oE^#o#p!#d#p#qE^#q#r!#d#r;'SE^;'S;=`!)v<%lOE^#cFw]&r!b&jS&hsOr%Trs'Vsw%Twx/Xx#O%T#O#P7o#P#o%T#o#p8^#p#q%T#q#r8^#r;'S%T;'S;=`=v<%lO%T#cGya&r!b&mW&hsOYE^YZ%TZ]E^]^%T^rE^rsFnswE^wxIOx#OE^#O#P!!u#P#oE^#o#p!#d#p#qE^#q#r!#d#r;'SE^;'S;=`!)v<%lOE^#cIXa&r!b&mW&hsOYE^YZ%TZ]E^]^%T^rE^rsFnswE^wxJ^x#OE^#O#P!!u#P#oE^#o#p!#d#p#qE^#q#r!#d#r;'SE^;'S;=`!)v<%lOE^#_Jg_&r!b&mW&hsOYJ^YZ1XZ]J^]^1X^rJ^rsKfs#OJ^#O#PL`#P#oJ^#o#pL}#p#qJ^#q#rL}#r;'SJ^;'S;=`!!o<%lOJ^#_KmZ&r!b&hsOr1Xrs2ys#O1X#O#P3q#P#o1X#o#p4`#p#q1X#q#r4`#r;'S1X;'S;=`7i<%lO1X#_LeW&r!bO#oJ^#o#pL}#p#qJ^#q#rL}#r;'SJ^;'S;=`! r;=`<%lL}<%lOJ^{MUZ&mW&hsOYL}YZ4`Z]L}]^4`^rL}rsMws#OL}#O#PNc#P;'SL};'S;=`! l<%lOL}{M|V&hsOr4`rs5ds#O4`#O#P5y#P;'S4`;'S;=`6t<%lO4`{NfRO;'SL};'S;=`No;=`OL}{Nv[&mW&hsOYL}YZ4`Z]L}]^4`^rL}rsMws#OL}#O#PNc#P;'SL};'S;=`! l;=`<%lL}<%lOL}{! oP;=`<%lL}#_! y[&mW&hsOYL}YZ4`Z]L}]^4`^rL}rsMws#OL}#O#PNc#P;'SL};'S;=`! l;=`<%lJ^<%lOL}#_!!rP;=`<%lJ^#c!!zW&r!bO#oE^#o#p!#d#p#qE^#q#r!#d#r;'SE^;'S;=`!(q;=`<%l!#d<%lOE^!P!#m]&jS&mW&hsOY!#dYZ8^Z]!#d]^8^^r!#drs!$fsw!#dwx!%Yx#O!#d#O#P!'Y#P;'S!#d;'S;=`!(k<%lO!#d!P!$mX&jS&hsOr8^rs9rsw8^wx:dx#O8^#O#P;v#P;'S8^;'S;=`^s#O!=U#O#P!@j#P#o!=U#o#p!Ag#p#q!=U#q#r!Ag#r;'S!=U;'S;=`!FQ<%lO!=U#o!>e_U!T&r!bOY!=UYZ1XZ]!=U]^1X^r!=Urs!?ds#O!=U#O#P!@j#P#o!=U#o#p!Ag#p#q!=U#q#r!Ag#r;'S!=U;'S;=`!FQ<%lO!=U#o!?k_U!T&r!bOY!=UYZ1XZ]!=U]^1X^r!=Urs!3`s#O!=U#O#P!@j#P#o!=U#o#p!Ag#p#q!=U#q#r!Ag#r;'S!=U;'S;=`!FQ<%lO!=U#o!@q[U!T&r!bOY!=UYZ1XZ]!=U]^1X^#o!=U#o#p!Ag#p#q!=U#q#r!Ag#r;'S!=U;'S;=`!Ec;=`<%l4`<%lO!=U!]!AnZU!T&mWOY!AgYZ4`Z]!Ag]^4`^r!Agrs!Bas#O!Ag#O#P!DP#P;'S!Ag;'S;=`!E]<%lO!Ag!]!BfZU!TOY!AgYZ4`Z]!Ag]^4`^r!Agrs!CXs#O!Ag#O#P!DP#P;'S!Ag;'S;=`!E]<%lO!Ag!]!C^ZU!TOY!AgYZ4`Z]!Ag]^4`^r!Agrs!4Ys#O!Ag#O#P!DP#P;'S!Ag;'S;=`!E]<%lO!Ag!]!DUWU!TOY!AgYZ4`Z]!Ag]^4`^;'S!Ag;'S;=`!Dn;=`<%l4`<%lO!Ag!]!DsW&mWOr4`rs4zs#O4`#O#P5y#P;'S4`;'S;=`6t;=`<%l!Ag<%lO4`!]!E`P;=`<%l!Ag#o!EhW&mWOr4`rs4zs#O4`#O#P5y#P;'S4`;'S;=`6t;=`<%l!=U<%lO4`#o!FTP;=`<%l!=U#s!F_[U!T&r!bOY!+|YZ%TZ]!+|]^%T^#o!+|#o#p!GT#p#q!+|#q#r!GT#r;'S!+|;'S;=`!Mq;=`<%l8^<%lO!+|!a!G^]U!T&jS&mWOY!GTYZ8^Z]!GT]^8^^r!GTrs!HVsw!GTwx!JVx#O!GT#O#P!LV#P;'S!GT;'S;=`!Mk<%lO!GT!a!H^]U!T&jSOY!GTYZ8^Z]!GT]^8^^r!GTrs!IVsw!GTwx!JVx#O!GT#O#P!LV#P;'S!GT;'S;=`!Mk<%lO!GT!a!I^]U!T&jSOY!GTYZ8^Z]!GT]^8^^r!GTrs!5wsw!GTwx!JVx#O!GT#O#P!LV#P;'S!GT;'S;=`!Mk<%lO!GT!a!J^]U!T&mWOY!GTYZ8^Z]!GT]^8^^r!GTrs!HVsw!GTwx!KVx#O!GT#O#P!LV#P;'S!GT;'S;=`!Mk<%lO!GT!a!K^]U!T&mWOY!GTYZ8^Z]!GT]^8^^r!GTrs!HVsw!GTwx!Agx#O!GT#O#P!LV#P;'S!GT;'S;=`!Mk<%lO!GT!a!L[WU!TOY!GTYZ8^Z]!GT]^8^^;'S!GT;'S;=`!Lt;=`<%l8^<%lO!GT!a!L{Y&jS&mWOr8^rs9Qsw8^wx:dx#O8^#O#P;v#P;'S8^;'S;=`Q<%lO$TP;=`<%l$ei&r!b&jS&mW&g`&SsOr%Trs$@Ssw%Twx$C`x!Q%T!Q![$Q<%lO$Q<%lO$Q<%lO$Q<%lO$Q<%lO$QL[e]||-1}],tokenPrec:7372}),HL="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),GL="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),VL="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class WL{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function i(e,t,o,s){let a=[],l=/^@(\w+)\b/.exec(e[0]),c=l&&"keyframes"==l[1];if(l&&null==t)return o.push(e[0]+";");for(let n in t){let s=t[n];if(/&/.test(n))i(n.split(/,\s*/).map(t=>e.map(e=>t.replace(/&/,e))).reduce((e,t)=>e.concat(t)),s,o);else if(s&&"object"==typeof s){if(!l)throw new RangeError("The value of a property ("+n+") should be a primitive value.");i(r(n),s,a,c)}else null!=s&&a.push(n.replace(/_.*/,"").replace(/[A-Z]/g,e=>"-"+e.toLowerCase())+": "+s+";")}(a.length||c)&&o.push((!n||l||s?e:e.map(n)).join(", ")+" {"+a.join(" ")+"}")}for(let t in e)i(r(t),e[t],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let e=VL[HL]||1;return VL[HL]=e+1,"ͼ"+e.toString(36)}static mount(e,t,n){let r=e[GL],i=n&&n.nonce;r?i&&r.setNonce(i):r=new YL(e,i),r.mount(Array.isArray(t)?t:[t])}}let XL=new Map;class YL{constructor(e,t){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let t=XL.get(n);if(t)return e.adoptedStyleSheets=[t.sheet,...e.adoptedStyleSheets],e[GL]=t;this.sheet=new r.CSSStyleSheet,e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets],XL.set(n,this)}else{this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);let r=e.head||e;r.insertBefore(this.styleTag,r.firstChild)}this.modules=[],e[GL]=this}mount(e){let t=this.sheet,n=0,r=0;for(let i=0;i-1&&(this.modules.splice(s,1),r--,s=-1),-1==s){if(this.modules.splice(r++,0,o),t)for(let e=0;eMath.max(1,e.scrollHeight-e.clientHeight-4)}class mB{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(e,t){return new mB(e.parentNode,nB(e),t)}static after(e,t){return new mB(e.parentNode,nB(e)+1,t)}}const gB=[];class bB{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let t=this.posAtStart;for(let n of this.children){if(n==e)return t;t+=n.length+n.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,t){if(2&this.flags){let n,r=this.dom,i=null;for(let o of this.children){if(7&o.flags){if(!o.dom&&(n=i?i.nextSibling:r.firstChild)){let e=bB.get(n);(!e||!e.parent&&e.canReuseDOM(o))&&o.reuseDOM(n)}o.sync(e,t),o.flags&=-8}if(n=i?i.nextSibling:r.firstChild,t&&!t.written&&t.node==r&&n!=o.dom&&(t.written=!0),o.dom.parentNode==r)for(;n&&n!=o.dom;)n=vB(n);else r.insertBefore(o.dom,n);i=o.dom}for(n=i?i.nextSibling:r.firstChild,n&&t&&t.node==r&&(t.written=!0);n;)n=vB(n)}else if(1&this.flags)for(let n of this.children)7&n.flags&&(n.sync(e,t),n.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,t){let n;if(e==this.dom)n=this.dom.childNodes[t];else{let r=0==iB(e)?0:0==t?-1:1;for(;;){let t=e.parentNode;if(t==this.dom)break;0==r&&t.firstChild!=t.lastChild&&(r=e==t.firstChild?-1:1),e=t}n=r<0?e:e.nextSibling}if(n==this.dom.firstChild)return 0;for(;n&&!bB.get(n);)n=n.nextSibling;if(!n)return this.length;for(let e=0,t=0;;e++){let r=this.children[e];if(r.dom==n)return t;t+=r.length+r.breakAfter}}domBoundsAround(e,t,n=0){let r=-1,i=-1,o=-1,s=-1;for(let a=0,l=n,c=n;at)return n.domBoundsAround(e,t,l);if(u>=e&&-1==r&&(r=a,i=l),l>t&&n.dom.parentNode==this.dom){o=a,s=c;break}c=u,l=u+n.breakAfter}return{from:i,to:s<0?n+this.length:s,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o=0?this.children[o].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),1&t.flags)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,7&this.flags&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,n=gB){this.markDirty();for(let n=e;nthis.pos||e==this.pos&&(t>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}function _B(e,t,n,r,i,o,s,a,l){let{children:c}=e,u=c.length?c[t]:null,d=o.length?o[o.length-1]:null,h=d?d.breakAfter:s;if(!(t==r&&u&&!s&&!h&&o.length<2&&u.merge(n,i,o.length?d:null,0==n,a,l))){if(r0&&(!s&&o.length&&u.merge(n,u.length,o[0],!1,a,0)?u.breakAfter=o.shift().breakAfter:(n2);var RB={mac:$B||/Mac/.test(xB.platform),windows:/Win/.test(xB.platform),linux:/Linux|X11/.test(xB.platform),ie:AB,ie_version:OB?wB.documentMode||6:EB?+EB[1]:kB?+kB[1]:0,gecko:TB,gecko_version:TB?+(/Firefox\/(\d+)/.exec(xB.userAgent)||[0,0])[1]:0,chrome:!!CB,chrome_version:CB?+CB[1]:0,ios:$B,android:/Android\b/.test(xB.userAgent),webkit:MB,safari:PB,webkit_version:MB?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:null!=wB.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};class IB extends bB{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){3==e.nodeType&&this.createDOM(e)}merge(e,t,n){return!(8&this.flags||n&&(!(n instanceof IB)||this.length-(t-e)+n.length>256||8&n.flags))&&(this.text=this.text.slice(0,e)+(n?n.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new IB(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=8&this.flags,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new mB(this.dom,e)}domBoundsAround(e,t,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return function(e,t,n){let r=e.nodeValue.length;t>r&&(t=r);let i=t,o=t,s=0;0==t&&n<0||t==r&&n>=0?RB.chrome||RB.gecko||(t?(i--,s=1):o=0)?0:a.length-1];RB.safari&&!s&&0==l.width&&(l=Array.prototype.find.call(a,e=>e.width)||l);return s?oB(l,s<0):l||null}(this.dom,e,t)}}class DB extends bB{constructor(e,t=[],n=0){super(),this.mark=e,this.children=t,this.length=n;for(let e of t)e.setParent(this)}setAttrs(e){if(pB(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!(8&(this.flags|e.flags))}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?4&this.flags&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,n,r,i,o){return(!n||!(!(n instanceof DB&&n.mark.eq(this.mark))||e&&i<=0||te&&t.push(n=e&&(r=i),n=s,i++}let o=this.length-e;return this.length=e,r>-1&&(this.children.length=r,this.markDirty()),new DB(this.mark,t,o)}domAtPos(e){return LB(this,e)}coordsAt(e,t){return BB(this,e,t)}}class NB extends bB{static create(e,t,n){return new NB(e,t,n)}constructor(e,t,n){super(),this.widget=e,this.length=t,this.side=n,this.prevWidget=null}split(e){let t=NB.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){this.dom&&this.widget.updateDOM(this.dom,e)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}getSide(){return this.side}merge(e,t,n,r,i,o){return!(n&&(!(n instanceof NB&&this.widget.compare(n.widget))||e>0&&i<=0||t0)?mB.before(this.dom):mB.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let n=this.widget.coordsAt(this.dom,e,t);if(n)return n;let r=this.dom.getClientRects(),i=null;if(!r.length)return null;let o=this.side?this.side<0:e>0;for(let t=o?r.length-1:0;i=r[t],!(e>0?0==t:t==r.length-1||i.top0?mB.before(this.dom):mB.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Bx.empty}get isHidden(){return!0}}function LB(e,t){let n=e.dom,{children:r}=e,i=0;for(let e=0;ie&&t0;e--){let t=r[e-1];if(t.dom.parentNode==n)return t.domAtPos(t.length)}for(let e=i;e=a&&(u.children.length?e(u,a-c):(!o||o.isHidden&&n>0)&&(d>a||c==d&&u.getSide()>0)?(o=u,s=a-c):(c-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let o of r)if(o!=n&&(-1==i.indexOf(o)||e[o]!==t[o]))return!1;return!0}function QB(e,t,n){let r=!1;if(t)for(let i in t)n&&i in n||(r=!0,"style"==i?e.style.cssText="":e.removeAttribute(i));if(n)for(let i in n)t&&t[i]==n[i]||(r=!0,"style"==i?e.style.cssText=n[i]:e.setAttribute(i,n[i]));return r}function qB(e){let t=Object.create(null);for(let n=0;n0&&0==this.children[n-1].length;)this.children[--n].destroy();return this.children.length=n,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){UB(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){!function e(t,n,r){let i,{children:o}=t;r>0&&n instanceof DB&&o.length&&(i=o[o.length-1])instanceof DB&&i.mark.eq(n.mark)?e(i,n.children[0],r-1):(o.push(n),n.setParent(t)),t.length+=n.length}(this,e,t)}addLineDeco(e){let t=e.spec.attributes,n=e.spec.class;t&&(this.attrs=FB(t,this.attrs||{})),n&&(this.attrs=FB({class:n},this.attrs||{}))}domAtPos(e){return LB(this,e)}reuseDOM(e){"DIV"==e.nodeName&&(this.setDOM(e),this.flags|=6)}sync(e,t){var n;this.dom?4&this.flags&&(pB(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(QB(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let r=this.dom.lastChild;for(;r&&bB.get(r)instanceof DB;)r=r.lastChild;if(!(r&&this.length&&("BR"==r.nodeName||0!=(null===(n=bB.get(r))||void 0===n?void 0:n.isEditable)||RB.ios&&this.children.some(e=>e instanceof IB)))){let e=document.createElement("BR");e.cmIgnore=!0,this.dom.appendChild(e)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let e,t=0;for(let n of this.children){if(!(n instanceof IB)||/[^ -~]/.test(n.text))return null;let r=eB(n.dom);if(1!=r.length)return null;t+=r[0].width,e=r[0].height}return t?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:t/this.length,textHeight:e}:null}coordsAt(e,t){let n=BB(this,e,t);if(!this.children.length&&n&&this.parent){let{heightOracle:e}=this.parent.view.viewState,t=n.bottom-n.top;if(Math.abs(t-e.lineHeight)<2&&e.textHeight=t){if(i instanceof HB)return i;if(o>t)break}r=o+i.breakAfter}return null}}class GB extends bB{constructor(e,t,n){super(),this.widget=e,this.length=t,this.deco=n,this.breakAfter=0,this.prevWidget=null}merge(e,t,n,r,i,o){return!(n&&(!(n instanceof GB&&this.widget.compare(n.widget))||e>0&&i<=0||t0)}}class VB{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}destroy(e){}}var WB=function(e){return e[e.Text=0]="Text",e[e.WidgetBefore=1]="WidgetBefore",e[e.WidgetAfter=2]="WidgetAfter",e[e.WidgetRange=3]="WidgetRange",e}(WB||(WB={}));class XB extends ck{constructor(e,t,n,r){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=r}get heightRelevant(){return!1}static mark(e){return new YB(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new JB(e,t,t,n,e.widget||null,!1)}static replace(e){let t,n,r=!!e.block;if(e.isBlockGap)t=-5e8,n=4e8;else{let{start:i,end:o}=KB(e,r);t=(i?r?-3e8:-1:5e8)-1,n=1+(o?r?2e8:1:-6e8)}return new JB(e,t,n,r,e.widget||null,!0)}static line(e){return new ZB(e)}static set(e,t=!1){return pk.of(e,t)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}XB.none=pk.empty;class YB extends XB{constructor(e){let{start:t,end:n}=KB(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,n;return this==e||e instanceof YB&&this.tagName==e.tagName&&(this.class||(null===(t=this.attrs)||void 0===t?void 0:t.class))==(e.class||(null===(n=e.attrs)||void 0===n?void 0:n.class))&&UB(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}YB.prototype.point=!1;class ZB extends XB{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof ZB&&this.spec.class==e.spec.class&&UB(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}ZB.prototype.mapMode=sw.TrackBefore,ZB.prototype.point=!0;class JB extends XB{constructor(e,t,n,r,i,o){super(t,n,i,e),this.block=r,this.isReplace=o,this.mapMode=r?t<=0?sw.TrackBefore:sw.TrackAfter:sw.TrackDel}get type(){return this.startSide!=this.endSide?WB.WidgetRange:this.startSide<=0?WB.WidgetBefore:WB.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof JB&&(t=this.widget,n=e.widget,t==n||!!(t&&n&&t.compare(n)))&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide;var t,n}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}function KB(e,t=!1){let{inclusiveStart:n,inclusiveEnd:r}=e;return null==n&&(n=e.inclusive),null==r&&(r=e.inclusive),{start:null!=n?n:t,end:null!=r?r:t}}function eF(e,t,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=e?n[i]=Math.max(n[i],t):n.push(e,t)}JB.prototype.point=!0;class tF{constructor(e,t,n,r){this.doc=e,this.pos=t,this.end=n,this.disallowBlockEffectsFor=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(0==this.content.length)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof GB&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new HB),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(nF(new jB(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||e&&this.content.length&&this.content[this.content.length-1]instanceof GB||this.getLine()}buildText(e,t,n){for(;e>0;){if(this.textOff==this.text.length){let{value:t,lineBreak:n,done:r}=this.cursor.next(this.skip);if(this.skip=0,r)throw new Error("Ran out of text content when drawing inline views");if(n){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}this.text=t,this.textOff=0}let r=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-n)),this.getLine().append(nF(new IB(this.text.slice(this.textOff,this.textOff+r)),t),n),this.atCursorPos=!0,this.textOff+=r,e-=r,n=0}}span(e,t,n,r){this.buildText(t-e,n,r),this.pos=t,this.openStart<0&&(this.openStart=r)}point(e,t,n,r,i,o){if(this.disallowBlockEffectsFor[o]&&n instanceof JB){if(n.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let s=t-e;if(n instanceof JB)if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new GB(n.widget||new rF("div"),s,n));else{let o=NB.create(n.widget||new rF("span"),s,s?0:n.startSide),a=this.atCursorPos&&!o.isEditable&&i<=r.length&&(e0),l=!o.isEditable&&(er.length||n.startSide<=0),c=this.getLine();2!=this.pendingBuffer||a||o.isEditable||(this.pendingBuffer=0),this.flushBuffer(r),a&&(c.append(nF(new jB(1),r),i),i=r.length+Math.max(0,i-r.length)),c.append(nF(o,r),i),this.atCursorPos=l,this.pendingBuffer=l?er.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);s&&(this.textOff+s<=this.text.length?this.textOff+=s:(this.skip+=s-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=i)}static build(e,t,n,r,i){let o=new tF(e,t,n,i);return o.openEnd=pk.spans(r,t,n,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function nF(e,t){for(let n of t)e=new DB(n,[e],e.length);return e}class rF extends VB{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}const iF=yw.define(),oF=yw.define(),sF=yw.define(),aF=yw.define(),lF=yw.define(),cF=yw.define(),uF=yw.define(),dF=yw.define({combine:e=>e.some(e=>e)}),hF=yw.define({combine:e=>e.some(e=>e)});class pF{constructor(e,t="nearest",n="nearest",r=5,i=5,o=!1){this.range=e,this.y=t,this.x=n,this.yMargin=r,this.xMargin=i,this.isSnapshot=o}map(e){return e.empty?this:new pF(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new pF(gw.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const fF=Xw.define({map:(e,t)=>e.map(t)});function mF(e,t,n){let r=e.facet(aF);r.length?r[0](t):window.onerror?window.onerror(String(t),n,void 0,void 0,t):n?console.error(n+":",t):console.error(t)}const gF=yw.define({combine:e=>!e.length||e[0]});let bF=0;const vF=yw.define();class yF{constructor(e,t,n,r,i){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=r,this.extension=i(this)}static define(e,t){const{eventHandlers:n,eventObservers:r,provide:i,decorations:o}=t||{};return new yF(bF++,e,n,r,e=>{let t=[vF.of(e)];return o&&t.push(wF.of(t=>{let n=t.plugin(e);return n?o(n):XB.none})),i&&t.push(i(e)),t})}static fromClass(e,t){return yF.define(t=>new e(t),t)}}class _F{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(mF(e.state,t,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(e){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){mF(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(null===(t=this.value)||void 0===t?void 0:t.destroy)try{this.value.destroy()}catch(t){mF(e.state,t,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const SF=yw.define(),xF=yw.define(),wF=yw.define(),kF=yw.define(),OF=yw.define();function EF(e,t,n){let r=e.state.facet(OF);if(!r.length)return r;let i=r.map(t=>t instanceof Function?t(e):t),o=[];return pk.spans(i,t,n,{point(){},span(e,t,n,r){let i=o;for(let o=n.length-1;o>=0;o--,r--){let s,a=n[o].spec.bidiIsolate;if(null!=a)if(r>0&&i.length&&(s=i[i.length-1]).to==e&&s.direction==a)s.to=t,i=s.inner;else{let n={from:e,to:t,direction:a,inner:[]};i.push(n),i=n.inner}}}}),o}const AF=yw.define();function TF(e){let t=0,n=0,r=0,i=0;for(let o of e.state.facet(AF)){let s=o(e);s&&(null!=s.left&&(t=Math.max(t,s.left)),null!=s.right&&(n=Math.max(n,s.right)),null!=s.top&&(r=Math.max(r,s.top)),null!=s.bottom&&(i=Math.max(i,s.bottom)))}return{left:t,right:n,top:r,bottom:i}}const CF=yw.define();class MF{constructor(e,t,n,r){this.fromA=e,this.toA=t,this.fromB=n,this.toB=r}join(e){return new MF(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let r=e[t-1];if(!(r.fromA>n.toA)){if(r.toAc)break;i+=2}if(!a)return n;new MF(a.fromA,a.toA,a.fromB,a.toB).addToSet(n),o=a.toA,s=a.toB}}}class PF{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=lw.empty(this.startState.doc.length);for(let e of n)this.changes=this.changes.compose(e.changes);let r=[];this.changes.iterChangedRanges((e,t,n,i)=>r.push(new MF(e,t,n,i))),this.changedRanges=r}static create(e,t,n){return new PF(e,t,n)}get viewportChanged(){return(4&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(10&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return 0==this.flags&&0==this.transactions.length}}var $F=function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e}($F||($F={}));const RF=$F.LTR,IF=$F.RTL;function DF(e){let t=[];for(let n=0;n=t){if(s.level==n)return o;(i<0||(0!=r?r<0?s.fromt:e[i].level>s.level))&&(i=o)}}if(i<0)throw new RangeError("Index out of range");return i}}function UF(e,t){if(e.length!=t.length)return!1;for(let n=0;n=0;e-=3)if(BF[e+1]==-n){let t=BF[e+2],n=2&t?i:4&t?1&t?o:i:0;n&&(QF[s]=QF[BF[e]]=n),a=e;break}}else{if(189==BF.length)break;BF[a++]=s,BF[a++]=t,BF[a++]=l}else if(2==(r=QF[s])||1==r){let e=r==i;l=e?0:1;for(let t=a-3;t>=0;t-=3){let n=BF[t+2];if(2&n)break;if(e)BF[t+2]|=2;else{if(4&n)break;BF[t+2]|=4}}}}}(e,i,o,r,a),function(e,t,n,r){for(let i=0,o=r;i<=n.length;i++){let s=i?n[i-1].to:e,a=il;)t==o&&(t=n[--r].from,o=r?n[r-1].to:e),QF[--t]=u;l=s}else o=s,l++}}}(i,o,r,a),function e(t,n,r,i,o,s,a){let l=i%2?2:1;if(i%2==o%2)for(let c=n,u=0;cc&&a.push(new zF(c,e.from,p)),qF(t,e.direction==RF!=!(p%2)?i+1:i,o,e.inner,e.from,e.to,a),c=e.to}f=e.to}else{if(f==r||(n?QF[f]!=l:QF[f]==l))break;f++}h?e(t,c,f,i+1,o,h,a):cn;){let r=!0,d=!1;if(!u||c>s[u-1].to){let e=QF[c-1];e!=l&&(r=!1,d=16==e)}let h=r||1!=l?null:[],p=r?i:i+1,f=c;e:for(;;)if(u&&f==s[u-1].to){if(d)break e;let e=s[--u];if(!r)for(let t=e.from,r=u;;){if(t==n)break e;if(!r||s[r-1].to!=t){if(QF[t-1]==l)break e;break}t=s[--r].from}if(h)h.push(e);else{e.toQF.length;)QF[QF.length]=256;let r=[],i=t==RF?0:1;return qF(e,i,i,n,0,e.length,r),r}function GF(e){return[new zF(0,e,0)]}let VF="";function WF(e,t,n,r,i){var o;let s=r.head-e.from,a=-1;if(0==s){if(!i||!e.length)return null;t[0].level!=n&&(s=t[0].side(!1,n),a=0)}else if(s==e.length){if(i)return null;let e=t[t.length-1];e.level!=n&&(s=e.side(!0,n),a=t.length-1)}a<0&&(a=zF.find(t,s,null!==(o=r.bidiLevel)&&void 0!==o?o:-1,r.assoc));let l=t[a];s==l.side(i,n)&&(l=t[a+=i?1:-1],s=l.side(!i,n));let c=i==(l.dir==n),u=Zx(e.text,s,c);if(VF=e.text.slice(Math.min(s,u),Math.max(s,u)),u!=l.side(i,n))return gw.cursor(u+e.from,c?-1:1,l.level);let d=a==(i?t.length-1:0)?null:t[a+(i?1:-1)];return d||l.level==n?d&&d.level0&&n.length&&(n.every(({fromA:e,toA:t})=>tthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0);let r=-1;this.view.inputState.composing>=0&&((null===(t=this.domChanged)||void 0===t?void 0:t.newSel)?r=this.domChanged.newSel.head:function(e,t){let n=!1;t&&e.iterChangedRanges((e,r)=>{et.from&&(n=!0)});return n}(e.changes,this.hasComposition)||e.selectionSet||(r=e.state.selection.main.head));let i=r>-1?function(e,t,n){let r=ZF(e,n);if(!r)return null;let{node:i,from:o,to:s}=r,a=i.nodeValue;if(/[\n\r]/.test(a))return null;if(e.state.doc.sliceString(r.from,r.to)!=a)return null;let l=t.invertedDesc,c=new MF(l.mapPos(o),l.mapPos(s),o,s),u=[];for(let t=i.parentNode;;t=t.parentNode){let n=bB.get(t);if(n instanceof DB)u.push({node:t,deco:n.mark});else{if(n instanceof HB||"DIV"==t.nodeName&&t.parentNode==e.contentDOM)return{range:c,text:i,marks:u,line:t};if(t==e.contentDOM)return null;u.push({node:t,deco:new YB({inclusive:!0,attributes:qB(t),tagName:t.tagName.toLowerCase()})})}}}(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:t,to:r}=this.hasComposition;n=new MF(t,r,e.changes.mapPos(t,-1),e.changes.mapPos(r,1)).addToSet(n.slice())}this.hasComposition=i?{from:i.range.fromB,to:i.range.toB}:null,(RB.ie||RB.chrome)&&!i&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=function(e,t,n){let r=new class{constructor(){this.changes=[]}compareRange(e,t){eF(e,t,this.changes)}comparePoint(e,t){eF(e,t,this.changes)}};return pk.compare(e,t,n,r),r.changes}(this.decorations,this.updateDeco(),e.changes);return n=MF.extendWithRanges(n,o),!!(7&this.flags||0!=n.length)&&(this.updateInner(n,e.startState.doc.length,i),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,n){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,n);let{observer:r}=this.view;r.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let e=RB.chrome||RB.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,e),this.flags&=-8,e&&(e.written||r.selectionRange.focusNode!=e.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(e=>e.flags&=-9);let i=[];if(this.view.viewport.from||this.view.viewport.to=0?r[e]:null;if(!t)break;let o,s,a,l,{fromA:c,toA:u,fromB:d,toB:h}=t;if(n&&n.range.fromBd){let e=tF.build(this.view.state.doc,d,n.range.fromB,this.decorations,this.dynamicDecorationMap),t=tF.build(this.view.state.doc,n.range.toB,h,this.decorations,this.dynamicDecorationMap);s=e.breakAtStart,a=e.openStart,l=t.openEnd;let r=this.compositionView(n);t.breakAtStart?r.breakAfter=1:t.content.length&&r.merge(r.length,r.length,t.content[0],!1,t.openStart,0)&&(r.breakAfter=t.content[0].breakAfter,t.content.shift()),e.content.length&&r.merge(0,0,e.content[e.content.length-1],!0,0,e.openEnd)&&e.content.pop(),o=e.content.concat(r).concat(t.content)}else({content:o,breakAtStart:s,openStart:a,openEnd:l}=tF.build(this.view.state.doc,d,h,this.decorations,this.dynamicDecorationMap));let{i:p,off:f}=i.findPos(u,1),{i:m,off:g}=i.findPos(c,-1);_B(this,m,g,p,f,o,s,a,l)}n&&this.fixCompositionDOM(n)}compositionView(e){let t=new IB(e.text.nodeValue);t.flags|=8;for(let{deco:n}of e.marks)t=new DB(n,[t],t.length);let n=new HB;return n.append(t,0),n}fixCompositionDOM(e){let t=(e,t)=>{t.flags|=8|(t.children.some(e=>7&e.flags)?1:0),this.markedForComposition.add(t);let n=bB.get(e);n&&n!=t&&(n.dom=null),t.setDOM(e)},n=this.childPos(e.range.fromB,1),r=this.children[n.i];t(e.line,r);for(let i=e.marks.length-1;i>=-1;i--)n=r.childPos(n.off,1),r=r.children[n.i],t(i>=0?e.marks[i].node:e.text,r)}updateSelection(e=!1,t=!1){!e&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();let n=this.view.root.activeElement,r=n==this.dom,i=!r&&KL(this.dom,this.view.observer.selectionRange)&&!(n&&this.dom.contains(n));if(!(r||t||i))return;let o=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,a=this.moveToLine(this.domAtPos(s.anchor)),l=s.empty?a:this.moveToLine(this.domAtPos(s.head));if(RB.gecko&&s.empty&&!this.hasComposition&&(1==(c=a).node.nodeType&&c.node.firstChild&&(0==c.offset||"false"==c.node.childNodes[c.offset-1].contentEditable)&&(c.offset==c.node.childNodes.length||"false"==c.node.childNodes[c.offset].contentEditable))){let e=document.createTextNode("");this.view.observer.ignore(()=>a.node.insertBefore(e,a.node.childNodes[a.offset]||null)),a=l=new mB(e,0),o=!0}var c;let u=this.view.observer.selectionRange;!o&&u.focusNode&&tB(a.node,a.offset,u.anchorNode,u.anchorOffset)&&tB(l.node,l.offset,u.focusNode,u.focusOffset)||(this.view.observer.ignore(()=>{RB.android&&RB.chrome&&this.dom.contains(u.focusNode)&&function(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(1==n.nodeType&&"false"==n.contentEditable)return!0;return!1}(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let e=ZL(this.view.root);if(e)if(s.empty){if(RB.gecko){let e=(t=a.node,r=a.offset,1!=t.nodeType?0:(r&&"false"==t.childNodes[r-1].contentEditable?1:0)|(rs.head&&([a,l]=[l,a]),t.setEnd(l.node,l.offset),t.setStart(a.node,a.offset),e.removeAllRanges(),e.addRange(t)}else;var t,r;i&&this.view.root.activeElement==this.dom&&(this.dom.blur(),n&&n.focus())}),this.view.observer.setSelectionRange(a,l)),this.impreciseAnchor=a.precise?null:new mB(u.anchorNode,u.anchorOffset),this.impreciseHead=l.precise?null:new mB(u.focusNode,u.focusOffset)}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=ZL(e.root),{anchorNode:r,anchorOffset:i}=e.observer.selectionRange;if(!(n&&t.empty&&t.assoc&&n.modify))return;let o=HB.find(this,t.head);if(!o)return;let s=o.posAtStart;if(t.head==s||t.head==s+o.length)return;let a=this.coordsAt(t.head,-1),l=this.coordsAt(t.head,1);if(!a||!l||a.bottom>l.top)return;let c=this.domAtPos(t.head+t.assoc);n.collapse(c.node,c.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let u=e.observer.selectionRange;e.docView.posFromDOM(u.anchorNode,u.anchorOffset)!=t.from&&n.collapse(r,i)}moveToLine(e){let t,n=this.dom;if(e.node!=n)return e;for(let r=e.offset;!t&&r=0;r--){let e=bB.get(n.childNodes[r]);e instanceof HB&&(t=e.domAtPos(e.length))}return t?new mB(t.node,t.offset,!0):e}nearest(e){for(let t=e;t;){let e=bB.get(t);if(e&&e.rootView==this)return e;t=t.parentNode}return null}posFromDOM(e,t){let n=this.nearest(e);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(e,t)+n.posAtStart}domAtPos(e){let{i:t,off:n}=this.childCursor().findPos(e,-1);for(;t=0;o--){let s=this.children[o],a=i-s.breakAfter,l=a-s.length;if(ae||s.covers(1))&&(!n||s instanceof HB&&!(n instanceof HB&&t>=0))&&(n=s,r=l),i=l}return n?n.coordsAt(e-r,t):null}coordsForChar(e){let{i:t,off:n}=this.childPos(e,1),r=this.children[t];if(!(r instanceof HB))return null;for(;r.children.length;){let{i:e,off:t}=r.childPos(n,1);for(;;e++){if(e==r.children.length)return null;if((r=r.children[e]).length)break}n=t}if(!(r instanceof IB))return null;let i=Zx(r.text,n);if(i==n)return null;let o=dB(r.dom,n,i).getClientRects();for(let e=0;eMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,a=this.view.textDirection==$F.LTR;for(let e=0,l=0;lr)break;if(e>=n){let n=c.dom.getBoundingClientRect();if(t.push(n.height),o){let t=c.dom.lastChild,r=t?eB(t):[];if(r.length){let t=r[r.length-1],o=a?t.right-n.left:n.right-t.left;o>s&&(s=o,this.minWidth=i,this.minWidthFrom=e,this.minWidthTo=u)}}}e=u+c.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return"rtl"==getComputedStyle(this.children[t].dom).direction?$F.RTL:$F.LTR}measureTextSize(){for(let e of this.children)if(e instanceof HB){let t=e.measureTextSize();if(t)return t}let e,t,n,r=document.createElement("div");return r.className="cm-line",r.style.width="99999px",r.style.position="absolute",r.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(r);let i=eB(r.firstChild)[0];e=r.getBoundingClientRect().height,t=i?i.width/27:7,n=i?i.height:e,r.remove()}),{lineHeight:e,charWidth:t,textHeight:n}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new yB(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let i=r==t.viewports.length?null:t.viewports[r],o=i?i.from-1:this.length;if(o>n){let r=(t.lineBlockAt(o).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(XB.replace({widget:new YF(r),block:!0,inclusive:!0,isBlockGap:!0}).range(n,o))}if(!i)break;n=i.to+1}return XB.set(e)}updateDeco(){let e=this.view.state.facet(wF).map((e,t)=>(this.dynamicDecorationMap[t]="function"==typeof e)?e(this.view):e);for(let t=e.length;tn.anchor?-1:1);if(!r)return;!n.empty&&(t=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,t.left),top:Math.min(r.top,t.top),right:Math.max(r.right,t.right),bottom:Math.max(r.bottom,t.bottom)});let i=TF(this.view),o={left:r.left-i.left,top:r.top-i.top,right:r.right+i.right,bottom:r.bottom+i.bottom},{offsetWidth:s,offsetHeight:a}=this.view.scrollDOM;!function(e,t,n,r,i,o,s,a){let l=e.ownerDocument,c=l.defaultView||window;for(let u=e,d=!1;u&&!d;)if(1==u.nodeType){let e,h=u==l.body,p=1,f=1;if(h)e=sB(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(d=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let t=u.getBoundingClientRect();p=t.width/u.offsetWidth,f=t.height/u.offsetHeight,e={left:t.left,right:t.left+u.clientWidth*p,top:t.top,bottom:t.top+u.clientHeight*f}}let m=0,g=0;if("nearest"==i)t.top0&&t.bottom>e.bottom+g&&(g=t.bottom-e.bottom+g+s)):t.bottom>e.bottom&&(g=t.bottom-e.bottom+s,n<0&&t.top-g0&&t.right>e.right+m&&(m=t.right-e.right+m+o)):t.right>e.right&&(m=t.right-e.right+o,n<0&&t.left0))break;n=n.childNodes[r-1],r=iB(n)}if(n>=0)for(let r=e,i=t;;){if(3==r.nodeType)return{node:r,offset:i};if(!(1==r.nodeType&&i=0))break;r=r.childNodes[i],i=0}return null}function KF(e,t){return t.left>e?t.left-e:Math.max(0,e-t.right)}function ez(e,t){return t.top>e?t.top-e:Math.max(0,e-t.bottom)}function tz(e,t){return e.topt.top+1}function nz(e,t){return te.bottom?{top:e.top,left:e.left,right:e.right,bottom:t}:e}function iz(e,t,n){let r=e.nodeValue.length,i=-1,o=1e9,s=0;for(let a=0;an?c.top-n:n-c.bottom)-1;if(c.left-1<=t&&c.right+1>=t&&u=(c.left+c.right)/2,r=n;if(RB.chrome||RB.gecko){dB(e,a).getBoundingClientRect().left==c.right&&(r=!n)}if(u<=0)return{node:e,offset:a+(r?1:0)};i=a+(r?1:0),o=u}}}return{node:e,offset:i>-1?i:s>0?e.nodeValue.length:0}}function oz(e,t,n,r=-1){var i,o;let s,a=e.contentDOM.getBoundingClientRect(),l=a.top+e.viewState.paddingTop,{docHeight:c}=e.viewState,{x:u,y:d}=t,h=d-l;if(h<0)return 0;if(h>c)return e.state.doc.length;for(let t=e.viewState.heightOracle.textHeight/2,i=!1;s=e.elementAtHeight(h),s.type!=WB.Text;)for(;h=r>0?s.bottom+t:s.top-t,!(h>=0&&h<=c);){if(i)return n?null:0;i=!0,r=-r}d=l+h;let p=s.from;if(pe.viewport.to)return e.viewport.to==e.state.doc.length?e.state.doc.length:n?null:sz(e,a,s,u,d);let f=e.dom.ownerDocument,m=e.root.elementFromPoint?e.root:f,g=m.elementFromPoint(u,d);g&&!e.contentDOM.contains(g)&&(g=null),g||(u=Math.max(a.left+1,Math.min(a.right-1,u)),g=m.elementFromPoint(u,d),g&&!e.contentDOM.contains(g)&&(g=null));let b,v=-1;if(g&&0!=(null===(i=e.docView.nearest(g))||void 0===i?void 0:i.isEditable))if(f.caretPositionFromPoint){let e=f.caretPositionFromPoint(u,d);e&&({offsetNode:b,offset:v}=e)}else if(f.caretRangeFromPoint){let t=f.caretRangeFromPoint(u,d);t&&(({startContainer:b,startOffset:v}=t),(!e.contentDOM.contains(b)||RB.safari&&function(e,t,n){let r;if(3!=e.nodeType||t!=(r=e.nodeValue.length))return!1;for(let t=e.nextSibling;t;t=t.nextSibling)if(1!=t.nodeType||"BR"!=t.nodeName)return!1;return dB(e,r-1,r).getBoundingClientRect().left>n}(b,v,u)||RB.chrome&&function(e,t,n){if(0!=t)return!1;for(let t=e;;){let e=t.parentNode;if(!e||1!=e.nodeType||e.firstChild!=t)return!1;if(e.classList.contains("cm-line"))break;t=e}let r=1==e.nodeType?e.getBoundingClientRect():dB(e,0,Math.max(e.nodeValue.length,1)).getBoundingClientRect();return n-r.left>5}(b,v,u))&&(b=void 0))}if(!b||!e.docView.dom.contains(b)){let t=HB.find(e.docView,p);if(!t)return h>s.top+s.height/2?s.to:s.from;({node:b,offset:v}=function e(t,n,r){let i,o,s,a,l,c,u,d,h=!1;for(let p=t.firstChild;p;p=p.nextSibling){let t=eB(p);for(let f=0;fb||a==b&&s>g){i=p,o=m,s=g,a=b;let e=b?r0?f0)}0==g?r>m.bottom&&(!u||u.bottomm.top)&&(c=p,d=m):u&&tz(u,m)?u=rz(u,m.bottom):d&&tz(d,m)&&(d=nz(d,m.top))}}if(u&&u.bottom>=r?(i=l,o=u):d&&d.top<=r&&(i=c,o=d),!i)return{node:t,offset:0};let p=Math.max(o.left,Math.min(o.right,n));return 3==i.nodeType?iz(i,p,r):h&&"false"!=i.contentEditable?e(i,p,r):{node:t,offset:Array.prototype.indexOf.call(t.childNodes,i)+(n>=(o.left+o.right)/2?1:0)}}(t.dom,u,d))}let y=e.docView.nearest(b);if(!y)return null;if(y.isWidget&&1==(null===(o=y.dom)||void 0===o?void 0:o.nodeType)){let e=y.dom.getBoundingClientRect();return t.y1.5*e.defaultLineHeight){let t=e.viewState.heightOracle.textHeight;o+=Math.floor((i-n.top-.5*(e.defaultLineHeight-t))/t)*e.viewState.heightOracle.lineLength}let s=e.state.sliceDoc(n.from,n.to);return n.from+Ek(s,o,e.state.tabSize)}function az(e,t){let n=e.lineBlockAt(t);if(Array.isArray(n.type))for(let e of n.type)if(e.to>t||e.to==t&&(e.to==n.to||e.type==WB.Text))return e;return n}function lz(e,t,n,r){let i=e.state.doc.lineAt(t.head),o=e.bidiSpans(i),s=e.textDirectionAt(i.from);for(let a=t,l=null;;){let t=WF(i,o,s,a,n),c=VF;if(!t){if(i.number==(n?e.state.doc.lines:1))return a;c="\n",i=e.state.doc.line(i.number+(n?1:-1)),o=e.bidiSpans(i),t=gw.cursor(n?i.from:i.to)}if(l){if(!l(c))return a}else{if(!r)return t;l=r(c)}a=t}}function cz(e,t,n){for(;;){let r=0;for(let i of e)i.between(t-1,t+1,(e,i,o)=>{if(t>e&&tt(e)),n.from,t.head>n.from?-1:1);return r==n.from?n:gw.cursor(r,rnull),RB.gecko&&(t=e.contentDOM.ownerDocument,jz.has(t)||(jz.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{})))}handleEvent(e){(function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n,r=t.target;r!=e.contentDOM;r=r.parentNode)if(!r||11==r.nodeType||(n=bB.get(r))&&n.ignoreEvent(t))return!1;return!0})(this.view,e)&&!this.ignoreDuringComposition(e)&&("keydown"==e.type&&this.keydown(e)||this.runHandlers(e.type,e))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let e of n.observers)e(this.view,t);for(let e of n.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=function(e){let t=Object.create(null);function n(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let t of e){let e=t.spec;if(e&&e.domEventHandlers)for(let r in e.domEventHandlers){let i=e.domEventHandlers[r];i&&n(r).handlers.push(hz(t.value,i))}if(e&&e.domEventObservers)for(let r in e.domEventObservers){let i=e.domEventObservers[r];i&&n(r).observers.push(hz(t.value,i))}}for(let e in vz)n(e).handlers.push(vz[e]);for(let e in yz)n(e).observers.push(yz[e]);return t}(e),n=this.handlers,r=this.view.contentDOM;for(let e in t)if("scroll"!=e){let i=!t[e].handlers.length,o=n[e];o&&i!=!o.handlers.length&&(r.removeEventListener(e,this.handleEvent),o=null),o||r.addEventListener(e,this.handleEvent,{passive:i})}for(let e in n)"scroll"==e||t[e]||r.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),9==e.keyCode&&Date.now()t.keyCode==e.keyCode))&&!e.ctrlKey||fz.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(229!=e.keyCode&&this.view.observer.forceFlush(),!1):(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0)}flushIOSKey(){let e=this.pendingIOSKey;return!!e&&(this.pendingIOSKey=void 0,hB(this.view.contentDOM,e.key,e.keyCode))}ignoreDuringComposition(e){return!!/^key/.test(e.type)&&(this.composing>0||!!(RB.safari&&!RB.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function hz(e,t){return(n,r)=>{try{return t.call(e,r,n)}catch(e){mF(n.state,e)}}}const pz=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],fz="dthko",mz=[16,17,18,20,91,92,224,225];function gz(e){return.7*Math.max(0,e)+8}class bz{constructor(e,t,n,r){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParent=function(e){let t=e.ownerDocument;for(let n=e.parentNode;n&&n!=t.body;)if(1==n.nodeType){if(n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)return n;n=n.assignedSlot||n.parentNode}else{if(11!=n.nodeType)break;n=n.host}return null}(e.contentDOM),this.atoms=e.state.facet(kF).map(t=>t(e));let i=e.contentDOM.ownerDocument;i.addEventListener("mousemove",this.move=this.move.bind(this)),i.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(ak.allowMultipleSelections)&&function(e,t){let n=e.state.facet(iF);return n.length?n[0](t):RB.mac?t.metaKey:t.ctrlKey}(e,t),this.dragging=!(!function(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=ZL(e.root);if(!r||0==r.rangeCount)return!0;let i=r.getRangeAt(0).getClientRects();for(let e=0;e=t.clientX&&n.top<=t.clientY&&n.bottom>=t.clientY)return!0}return!1}(e,t)||1!=Pz(t))&&null}start(e){!1===this.dragging&&this.select(e)}move(e){var t,n,r;if(0==e.buttons)return this.destroy();if(this.dragging||null==this.dragging&&(n=this.startEvent,r=e,Math.max(Math.abs(n.clientX-r.clientX),Math.abs(n.clientY-r.clientY))<10))return;this.select(this.lastEvent=e);let i=0,o=0,s=(null===(t=this.scrollParent)||void 0===t?void 0:t.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},a=TF(this.view);e.clientX-a.left<=s.left+6?i=-gz(s.left-e.clientX):e.clientX+a.right>=s.right-6&&(i=gz(e.clientX-s.right)),e.clientY-a.top<=s.top+6?o=-gz(s.top-e.clientY):e.clientY+a.bottom>=s.bottom-6&&(o=gz(e.clientY-s.bottom)),this.setScrollSpeed(i,o)}up(e){null==this.dragging&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),!1===this.dragging&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let n=0;nthis.select(this.lastEvent),20)}}const vz=Object.create(null),yz=Object.create(null),_z=RB.ie&&RB.ie_version<15||RB.ios&&RB.webkit_version<604;function Sz(e,t){let n,{state:r}=e,i=1,o=r.toText(t),s=o.lines==r.selection.ranges.length;if(null!=Rz&&r.selection.ranges.every(e=>e.empty)&&Rz==o.toString()){let e=-1;n=r.changeByRange(n=>{let a=r.doc.lineAt(n.from);if(a.from==e)return{range:n};e=a.from;let l=r.toText((s?o.line(i++).text:t)+r.lineBreak);return{changes:{from:a.from,insert:l},range:gw.cursor(n.from+l.length)}})}else n=s?r.changeByRange(e=>{let t=o.line(i++);return{changes:{from:e.from,to:e.to,insert:t.text},range:gw.cursor(e.from+t.length)}}):r.replaceSelection(o);e.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}function xz(e,t,n,r){if(1==r)return gw.cursor(t,n);if(2==r)return function(e,t,n=1){let r=e.charCategorizer(t),i=e.doc.lineAt(t),o=t-i.from;if(0==i.length)return gw.cursor(t);0==o?n=1:o==i.length&&(n=-1);let s=o,a=o;n<0?s=Zx(i.text,o,!1):a=Zx(i.text,o);let l=r(i.text.slice(s,a));for(;s>0;){let e=Zx(i.text,s,!1);if(r(i.text.slice(e,s))!=l)break;s=e}for(;a{e.inputState.lastScrollTop=e.scrollDOM.scrollTop,e.inputState.lastScrollLeft=e.scrollDOM.scrollLeft},vz.keydown=(e,t)=>(e.inputState.setSelectionOrigin("select"),27==t.keyCode&&(e.inputState.lastEscPress=Date.now()),!1),yz.touchstart=(e,t)=>{e.inputState.lastTouchTime=Date.now(),e.inputState.setSelectionOrigin("select.pointer")},yz.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")},vz.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of e.state.facet(sF))if(n=r(e,t),n)break;if(n||0!=t.button||(n=function(e,t){let n=Ez(e,t),r=Pz(t),i=e.state.selection;return{update(e){e.docChanged&&(n.pos=e.changes.mapPos(n.pos),i=i.map(e.changes))},get(t,o,s){let a,l=Ez(e,t),c=xz(e,l.pos,l.bias,r);if(n.pos!=l.pos&&!o){let t=xz(e,n.pos,n.bias,r),i=Math.min(t.from,c.from),o=Math.max(t.to,c.to);c=i1&&(a=function(e,t){for(let n=0;n=t)return gw.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-(e.mainIndex>n?1:0))}return null}(i,l.pos))?a:s?i.addRange(c):gw.create([c])}}}(e,t)),n){let r=!e.hasFocus;e.inputState.startMouseSelection(new bz(e,t,n,r)),r&&e.observer.ignore(()=>uB(e.contentDOM));let i=e.inputState.mouseSelection;if(i)return i.start(t),!1===i.dragging}return!1};let wz=(e,t)=>e>=t.top&&e<=t.bottom,kz=(e,t,n)=>wz(t,n)&&e>=n.left&&e<=n.right;function Oz(e,t,n,r){let i=HB.find(e.docView,t);if(!i)return 1;let o=t-i.posAtStart;if(0==o)return 1;if(o==i.length)return-1;let s=i.coordsAt(o,-1);if(s&&kz(n,r,s))return-1;let a=i.coordsAt(o,1);return a&&kz(n,r,a)?1:s&&wz(r,s)?-1:1}function Ez(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1);return{pos:n,bias:Oz(e,n,t.clientX,t.clientY)}}const Az=RB.ie&&RB.ie_version<=11;let Tz=null,Cz=0,Mz=0;function Pz(e){if(!Az)return e.detail;let t=Tz,n=Mz;return Tz=e,Mz=Date.now(),Cz=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(Cz+1)%3:1}function $z(e,t,n,r){if(!n)return;let i=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:o}=e.inputState,s=r&&o&&function(e,t){let n=e.state.facet(oF);return n.length?n[0](t):RB.mac?!t.altKey:!t.ctrlKey}(e,t)?{from:o.from,to:o.to}:null,a={from:i,insert:n},l=e.state.changes(s?[s,a]:a);e.focus(),e.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:s?"move.drop":"input.drop"}),e.inputState.draggedContent=null}vz.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let r=e.docView.nearest(t.target);if(r&&r.isWidget){let e=r.posAtStart,t=e+r.length;(e>=n.to||t<=n.from)&&(n=gw.range(e,t))}}let{inputState:r}=e;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData("Text",e.state.sliceDoc(n.from,n.to)),t.dataTransfer.effectAllowed="copyMove"),!1},vz.dragend=e=>(e.inputState.draggedContent=null,!1),vz.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,o=()=>{++i==n.length&&$z(e,t,r.filter(e=>null!=e).join(e.state.lineBreak),!1)};for(let e=0;e{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(r[e]=t.result),o()},t.readAsText(n[e])}return!0}{let n=t.dataTransfer.getData("Text");if(n)return $z(e,t,n,!0),!0}return!1},vz.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=_z?null:t.clipboardData;return n?(Sz(e,n.getData("text/plain")||n.getData("text/uri-text")),!0):(function(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{e.focus(),n.remove(),Sz(e,n.value)},50)}(e),!1)};let Rz=null;vz.copy=vz.cut=(e,t)=>{let{text:n,ranges:r,linewise:i}=function(e){let t=[],n=[],r=!1;for(let r of e.selection.ranges)r.empty||(t.push(e.sliceDoc(r.from,r.to)),n.push(r));if(!t.length){let i=-1;for(let{from:r}of e.selection.ranges){let o=e.doc.lineAt(r);o.number>i&&(t.push(o.text),n.push({from:o.from,to:Math.min(e.doc.length,o.to+1)})),i=o.number}r=!0}return{text:t.join(e.lineBreak),ranges:n,linewise:r}}(e.state);if(!n&&!i)return!1;Rz=i?n:null,"cut"!=t.type||e.state.readOnly||e.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let o=_z?null:t.clipboardData;return o?(o.clearData(),o.setData("text/plain",n),!0):(function(e,t){let n=e.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout(()=>{r.remove(),e.focus()},50)}(e,n),!1)};const Iz=Gw.define();function Dz(e,t){let n=[];for(let r of e.facet(uF)){let i=r(e,t);i&&n.push(i)}return n?e.update({effects:n,annotations:Iz.of(!0)}):null}function Nz(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=Dz(e.state,t);n?e.dispatch(n):e.update([])}},10)}yz.focus=e=>{e.inputState.lastFocusTime=Date.now(),e.scrollDOM.scrollTop||!e.inputState.lastScrollTop&&!e.inputState.lastScrollLeft||(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),Nz(e)},yz.blur=e=>{e.observer.clearSelectionRange(),Nz(e)},yz.compositionstart=yz.compositionupdate=e=>{null==e.inputState.compositionFirstChange&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0)},yz.compositionend=e=>{e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,RB.chrome&&RB.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])},50)},yz.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},vz.beforeinput=(e,t)=>{var n;let r;if(RB.chrome&&RB.android&&(r=pz.find(e=>e.inputType==t.inputType))&&(e.observer.delayAndroidKey(r.key,r.keyCode),"Backspace"==r.key||"Delete"==r.key)){let t=(null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0;setTimeout(()=>{var n;((null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}return!1};const jz=new Set;const Lz=["pre-wrap","normal","pre-line","break-spaces"];class Bz{constructor(e){this.lineWrapping=e,this.doc=Bx.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){if(!this.lineWrapping)return this.lineHeight;return(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return Lz.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n-1,a=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=i,a){this.heightSamples={};for(let e=0;e0}set outdated(e){this.flags=(e?2:0)|-3&this.flags}setHeight(e,t){this.height!=t&&(Math.abs(this.height-t)>.001&&(e.heightChanged=!0),this.height=t)}replace(e,t,n){return Qz.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,r){let i=this,o=n.doc;for(let s=r.length-1;s>=0;s--){let{fromA:a,toA:l,fromB:c,toB:u}=r[s],d=i.lineAt(a,Uz.ByPosNoHeight,n.setDoc(t),0,0),h=d.to>=l?d:i.lineAt(l,Uz.ByPosNoHeight,n,0,0);for(u+=h.to-l,l=h.to;s>0&&d.from<=r[s-1].toA;)a=r[s-1].fromA,c=r[s-1].fromB,s--,a2*i){let i=e[t-1];i.break?e.splice(--t,1,i.left,null,i.right):e.splice(--t,1,i.left,i.right),n+=1+i.break,r-=i.size}else{if(!(i>2*r))break;{let t=e[n];t.break?e.splice(n,1,t.left,null,t.right):e.splice(n,1,t.left,t.right),n+=2+t.break,i-=t.size}}else if(r=i&&o(this.blockAt(0,n,r,i))}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more&&this.setHeight(e,r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Hz extends qz{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,n,r){return new zz(r,this.length,n,this.height,this.breaks)}replace(e,t,n){let r=n[0];return 1==n.length&&(r instanceof Hz||r instanceof Gz&&4&r.flags)&&Math.abs(this.length-r.length)<10?(r instanceof Gz?r=new Hz(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):Qz.of(n)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more?this.setHeight(e,r.heights[r.index++]):(n||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Gz extends Qz{constructor(e){super(e,0)}heightMetrics(e,t){let n,r=e.doc.lineAt(t).number,i=e.doc.lineAt(t+this.length).number,o=i-r+1,s=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*o);n=t/o,this.length>o+1&&(s=(this.height-t)/(this.length-o-1))}else n=this.height/o;return{firstLine:r,lastLine:i,perLine:n,perChar:s}}blockAt(e,t,n,r){let{firstLine:i,lastLine:o,perLine:s,perChar:a}=this.heightMetrics(t,r);if(t.lineWrapping){let i=r+Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length),o=t.doc.lineAt(i),l=s+o.length*a,c=Math.max(n,e-l/2);return new zz(o.from,o.length,c,l,0)}{let r=Math.max(0,Math.min(o-i,Math.floor((e-n)/s))),{from:a,length:l}=t.doc.line(i+r);return new zz(a,l,n+s*r,s,0)}}lineAt(e,t,n,r,i){if(t==Uz.ByHeight)return this.blockAt(e,n,r,i);if(t==Uz.ByPosNoHeight){let{from:t,to:r}=n.doc.lineAt(e);return new zz(t,r-t,0,0,0)}let{firstLine:o,perLine:s,perChar:a}=this.heightMetrics(n,i),l=n.doc.lineAt(e),c=s+l.length*a,u=l.number-o,d=r+s*u+a*(l.from-i-u);return new zz(l.from,l.length,Math.max(r,Math.min(d,r+this.height-c)),c,0)}forEachLine(e,t,n,r,i,o){e=Math.max(e,i),t=Math.min(t,i+this.length);let{firstLine:s,perLine:a,perChar:l}=this.heightMetrics(n,i);for(let c=e,u=r;c<=t;){let t=n.doc.lineAt(c);if(c==e){let n=t.number-s;u+=a*n+l*(e-i-n)}let r=a+l*t.length;o(new zz(t.from,t.length,u,r,0)),u+=r,c=t.to+1}}replace(e,t,n){let r=this.length-t;if(r>0){let e=n[n.length-1];e instanceof Gz?n[n.length-1]=new Gz(e.length+r):n.push(null,new Gz(r-1))}if(e>0){let t=n[0];t instanceof Gz?n[0]=new Gz(e+t.length):n.unshift(new Gz(e-1),null)}return Qz.of(n)}decomposeLeft(e,t){t.push(new Gz(e-1),null)}decomposeRight(e,t){t.push(null,new Gz(this.length-e-1))}updateHeight(e,t=0,n=!1,r){let i=t+this.length;if(r&&r.from<=t+this.length&&r.more){let n=[],o=Math.max(t,r.from),s=-1;for(r.from>t&&n.push(new Gz(r.from-t-1).updateHeight(e,t));o<=i&&r.more;){let t=e.doc.lineAt(o).length;n.length&&n.push(null);let i=r.heights[r.index++];-1==s?s=i:Math.abs(i-s)>=.001&&(s=-2);let a=new Hz(t,i);a.outdated=!1,n.push(a),o+=t+1}o<=i&&n.push(null,new Gz(i-o).updateHeight(e,o));let a=Qz.of(n);return(s<0||Math.abs(a.height-this.height)>=.001||Math.abs(s-this.heightMetrics(e,t).perLine)>=.001)&&(e.heightChanged=!0),a}return(n||this.outdated)&&(this.setHeight(e,e.heightForGap(t,t+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class Vz extends Qz{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return 1&this.flags}blockAt(e,t,n,r){let i=n+this.left.height;return es))return l;let c=t==Uz.ByPosNoHeight?Uz.ByPosNoHeight:Uz.ByPos;return a?l.join(this.right.lineAt(s,c,n,o,s)):this.left.lineAt(s,c,n,r,i).join(l)}forEachLine(e,t,n,r,i,o){let s=r+this.left.height,a=i+this.left.length+this.break;if(this.break)e=a&&this.right.forEachLine(e,t,n,s,a,o);else{let l=this.lineAt(a,Uz.ByPos,n,r,i);e=e&&l.from<=t&&o(l),t>l.to&&this.right.forEachLine(l.to+1,t,n,s,a,o)}}replace(e,t,n){let r=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));let i=[];e>0&&this.decomposeLeft(e,i);let o=i.length;for(let e of n)i.push(e);if(e>0&&Wz(i,o-1),t=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e2*t.size||t.size>2*e.size?Qz.of(this.break?[e,null,t]:[e,t]):(this.left=e,this.right=t,this.height=e.height+t.height,this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,r){let{left:i,right:o}=this,s=t+i.length+this.break,a=null;return r&&r.from<=t+i.length&&r.more?a=i=i.updateHeight(e,t,n,r):i.updateHeight(e,t,n),r&&r.from<=s+o.length&&r.more?a=o=o.updateHeight(e,s,n,r):o.updateHeight(e,s,n),a?this.balanced(i,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Wz(e,t){let n,r;null==e[t]&&(n=e[t-1])instanceof Gz&&(r=e[t+1])instanceof Gz&&e.splice(t-1,3,new Gz(n.length+1+r.length))}class Xz{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof Hz?n.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new Hz(e-this.pos,-1)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e=5)&&this.addLineDeco(r,i,o)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new Hz(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let n=new Gz(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof Hz)return e;let t=new Hz(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let r=this.ensureLine();r.length+=n,r.collapsed+=n,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=t,this.writtenTo=this.pos=this.pos+n}finish(e){let t=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||t instanceof Hz||this.isCovered?(this.writtenTon.clientHeight||n.scrollWidth>n.clientWidth)&&"visible"!=r.overflow){let r=n.getBoundingClientRect();o=Math.max(o,r.left),s=Math.min(s,r.right),a=Math.max(a,r.top),l=t==e.parentNode?r.bottom:Math.min(l,r.bottom)}t="absolute"==r.position||"fixed"==r.position?n.offsetParent:n.parentNode}else{if(11!=t.nodeType)break;t=t.host}return{left:o-n.left,right:Math.max(o,s)-n.left,top:a-(n.top+t),bottom:Math.max(a,l)-(n.top+t)}}function Jz(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}class Kz{constructor(e,t,n){this.from=e,this.to=t,this.size=n}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n"function"!=typeof e&&"cm-lineWrapping"==e.class);this.heightOracle=new Bz(t),this.stateDeco=e.facet(wF).filter(e=>"function"!=typeof e),this.heightMap=Qz.empty().applyChanges(this.stateDeco,Bx.empty,this.heightOracle.setDoc(e.doc),[new MF(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=XB.set(this.lineGaps.map(e=>e.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let r=n?t.head:t.anchor;if(!e.some(({from:e,to:t})=>r>=e&&r<=t)){let{from:t,to:n}=this.lineBlockAt(r);e.push(new nU(t,n))}}this.viewports=e.sort((e,t)=>e.from-t.from),this.scaler=this.heightMap.height<=7e6?sU:new aU(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(1==this.scaler.scale?e:lU(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=this.state.facet(wF).filter(e=>"function"!=typeof e);let r=e.changedRanges,i=MF.extendWithRanges(r,function(e,t,n){let r=new Yz;return pk.compare(e,t,n,r,0),r.changes}(n,this.stateDeco,e?e.changes:lw.empty(this.state.doc.length))),o=this.heightMap.height,s=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),i),this.heightMap.height!=o&&(e.flags|=2),s?(this.scrollAnchorPos=e.changes.mapPos(s.from,-1),this.scrollAnchorHeight=s.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let a=i.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,t));let l=!e.changes.empty||2&e.flags||a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,this.updateForViewport(),l&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(hF)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,i=n.whiteSpace;this.defaultTextDirection="rtl"==n.direction?$F.RTL:$F.LTR;let o=this.heightOracle.mustRefreshForWrapping(i),s=t.getBoundingClientRect(),a=o||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;let l=0,c=0;if(s.width&&s.height){let e=s.width/t.offsetWidth,n=s.height/t.offsetHeight;(e>.995&&e<1.005||!isFinite(e)||Math.abs(s.width-t.offsetWidth)<1)&&(e=1),(n>.995&&n<1.005||!isFinite(n)||Math.abs(s.height-t.offsetHeight)<1)&&(n=1),this.scaleX==e&&this.scaleY==n||(this.scaleX=e,this.scaleY=n,l|=8,o=a=!0)}let u=(parseInt(n.paddingTop)||0)*this.scaleY,d=(parseInt(n.paddingBottom)||0)*this.scaleY;this.paddingTop==u&&this.paddingBottom==d||(this.paddingTop=u,this.paddingBottom=d,l|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(a=!0),this.editorWidth=e.scrollDOM.clientWidth,l|=8);let h=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=h&&(this.scrollAnchorHeight=-1,this.scrollTop=h),this.scrolledToBottom=fB(e.scrollDOM);let p=(this.printing?Jz:Zz)(t,this.paddingTop),f=p.top-this.pixelViewport.top,m=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;let g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView&&(this.inView=g,g&&(a=!0)),!this.inView&&!this.scrollTarget)return 0;let b=s.width;if(this.contentDOMWidth==b&&this.editorHeight==e.scrollDOM.clientHeight||(this.contentDOMWidth=s.width,this.editorHeight=e.scrollDOM.clientHeight,l|=8),a){let t=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(t)&&(o=!0),o||r.lineWrapping&&Math.abs(b-this.contentDOMWidth)>r.charWidth){let{lineHeight:n,charWidth:s,textHeight:a}=e.docView.measureTextSize();o=n>0&&r.refresh(i,n,s,a,b/s,t),o&&(e.docView.minWidth=0,l|=8)}f>0&&m>0?c=Math.max(f,m):f<0&&m<0&&(c=Math.min(f,m)),r.heightChanged=!1;for(let n of this.viewports){let i=n.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(n);this.heightMap=(o?Qz.empty().applyChanges(this.stateDeco,Bx.empty,this.heightOracle,[new MF(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,o,new Fz(n.from,i))}r.heightChanged&&(l|=2)}let v=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return v&&(this.viewport=this.getViewport(c,this.scrollTarget)),this.updateForViewport(),(2&l||v)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),l|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),l}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:o,visibleBottom:s}=this,a=new nU(r.lineAt(o-1e3*n,Uz.ByHeight,i,0,0).from,r.lineAt(s+1e3*(1-n),Uz.ByHeight,i,0,0).to);if(t){let{head:e}=t.range;if(ea.to){let n,o=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),s=r.lineAt(e,Uz.ByPos,i,0,0);n="center"==t.y?(s.top+s.bottom)/2-o/2:"start"==t.y||"nearest"==t.y&&e=s+Math.max(10,Math.min(n,250)))&&r>o-2e3&&i>1,o=r<<1;if(this.defaultTextDirection!=$F.LTR&&!n)return[];let s=[],a=(r,o,l,c)=>{if(o-rr&&ee.from>=l.from&&e.to<=l.to&&Math.abs(e.from-r)e.fromt));if(!h){if(oe.from<=o&&e.to>=o)){let e=t.moveToLineBoundary(gw.cursor(o),!1,!0).head;e>r&&(o=e)}h=new Kz(r,o,this.gapSize(l,r,o,c))}s.push(h)};for(let e of this.viewportLines){if(e.lengthe.from&&a(e.from,i,e,t),se.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];pk.spans(e,this.viewport.from,this.viewport.to,{span(e,n){t.push({from:e,to:n})},point(){}},20);let n=t.length!=this.visibleRanges.length||this.visibleRanges.some((e,n)=>e.from!=t[n].from||e.to!=t[n].to);return this.visibleRanges=t,n?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||lU(this.heightMap.lineAt(e,Uz.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return lU(this.heightMap.lineAt(this.scaler.fromDOM(e),Uz.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return lU(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class nU{constructor(e,t){this.from=e,this.to=t}}function rU(e,t,n){let r=[],i=e,o=0;return pk.spans(n,e,t,{span(){},point(e,t){e>i&&(r.push({from:i,to:e}),o+=e-i),i=t}},20),i=1)return t[t.length-1].to;let r=Math.floor(e*n);for(let e=0;;e++){let{from:n,to:i}=t[e],o=i-n;if(r<=o)return n+r;r-=o}}function oU(e,t){let n=0;for(let{from:r,to:i}of e.ranges){if(t<=i){n+=t-r;break}n+=i-r}return n/e.total}const sU={toDOM:e=>e,fromDOM:e=>e,scale:1};class aU{constructor(e,t,n){let r=0,i=0,o=0;this.viewports=n.map(({from:n,to:i})=>{let o=t.lineAt(n,Uz.ByPos,e,0,0).top,s=t.lineAt(i,Uz.ByPos,e,0,0).bottom;return r+=s-o,{from:n,to:i,top:o,bottom:s,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(t.height-r);for(let e of this.viewports)e.domTop=o+(e.top-i)*this.scale,o=e.domBottom=e.domTop+(e.bottom-e.top),i=e.bottom}toDOM(e){for(let t=0,n=0,r=0;;t++){let i=tlU(e,t)):e._content)}const cU=yw.define({combine:e=>e.join(" ")}),uU=yw.define({combine:e=>e.indexOf(!0)>-1}),dU=WL.newName(),hU=WL.newName(),pU=WL.newName(),fU={"&light":"."+hU,"&dark":"."+pU};function mU(e,t,n){return new WL(t,{finish:t=>/&/.test(t)?t.replace(/&\w*/,t=>{if("&"==t)return e;if(!n||!n[t])throw new RangeError("Unsupported selector: "+t);return n[t]}):e+" "+t})}const gU=mU("."+dU,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},fU);class bU{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(ak.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+="￿"}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let r=e;;){this.findPointBefore(n,r);let e=this.text.length;this.readNode(r);let i=r.nextSibling;if(i==t)break;let o=bB.get(r),s=bB.get(i);(o&&s?o.breakAfter:(o?o.breakAfter:yU(r))||yU(i)&&("BR"!=r.nodeName||r.cmIgnore)&&this.text.length>e)&&this.lineBreak(),r=i}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i,o=-1,s=1;if(this.lineSeparator?(o=t.indexOf(this.lineSeparator,n),s=this.lineSeparator.length):(i=r.exec(t))&&(o=i.index,s=i[0].length),this.append(t.slice(n,o<0?t.length:o)),o<0)break;if(this.lineBreak(),s>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=s-1);n=o+s}}readNode(e){if(e.cmIgnore)return;let t=bB.get(e),n=t&&t.overrideDOMText;if(null!=n){this.findPointInside(e,n.length);for(let e=n.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else 3==e.nodeType?this.readTextNode(e):"BR"==e.nodeName?e.nextSibling&&this.lineBreak():1==e.nodeType&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(3==e.nodeType?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(vU(e,n.node,n.offset)?t:0))}}function vU(e,t,n){for(;;){if(!t||n-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,n,0))){let t=i||o?[]:function(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}=e.observer.selectionRange;n&&(t.push(new _U(n,r)),i==n&&o==r||t.push(new _U(i,o)));return t}(e),n=new bU(t,e.state);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=function(e,t){if(0==e.length)return null;let n=e[0].pos,r=2==e.length?e[1].pos:n;return n>-1&&r>-1?gw.single(n+t,r+t):null}(t,this.bounds.from)}else{let t=e.observer.selectionRange,n=i&&i.node==t.focusNode&&i.offset==t.focusOffset||!JL(e.contentDOM,t.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),r=o&&o.node==t.anchorNode&&o.offset==t.anchorOffset||!JL(e.contentDOM,t.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset);this.newSel=gw.single(r,n)}}}function xU(e,t){let n,{newSel:r}=t,i=e.state.selection.main,o=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:r,to:s}=t.bounds,a=i.from,l=null;(8===o||RB.android&&t.text.length0&&a>0&&e.charCodeAt(s-1)==t.charCodeAt(a-1);)s--,a--;if("end"==r){let e=Math.max(0,o-Math.min(s,a));n-=s+e-o}if(s=s?o-n:0,a=o+(a-s),s=o}else if(a=a?o-n:0,s=o+(s-a),a=o}return{from:o,toA:s,toB:a}}(e.state.doc.sliceString(r,s,"￿"),t.text,a-r,l);c&&(RB.chrome&&13==o&&c.toB==c.from+2&&"￿￿"==t.text.slice(c.from,c.toB)&&c.toB--,n={from:r+c.from,to:r+c.toA,insert:Bx.of(t.text.slice(c.from,c.toB).split("￿"))})}else r&&(!e.hasFocus&&e.state.facet(gF)||r.main.eq(i))&&(r=null);if(!n&&!r)return!1;if(!n&&t.typeOver&&!i.empty&&r&&r.main.empty?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,i.to)}:n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,n.from).append(n.insert).append(e.state.doc.slice(n.to,i.to))}:(RB.mac||RB.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&"off"==e.contentDOM.getAttribute("autocorrect")?(r&&2==n.insert.length&&(r=gw.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:Bx.of([" "])}):RB.chrome&&n&&n.from==n.to&&n.from==i.head&&"\n "==n.insert.toString()&&e.lineWrapping&&(r&&(r=gw.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:Bx.of([" "])}),n){if(RB.ios&&e.inputState.flushIOSKey())return!0;if(RB.android&&(n.from==i.from&&n.to==i.to&&1==n.insert.length&&2==n.insert.lines&&hB(e.contentDOM,"Enter",13)||(n.from==i.from-1&&n.to==i.to&&0==n.insert.length||8==o&&n.insert.lengthi.head)&&hB(e.contentDOM,"Backspace",8)||n.from==i.from&&n.to==i.to+1&&0==n.insert.length&&hB(e.contentDOM,"Delete",46)))return!0;let t,s=n.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let a=()=>t||(t=function(e,t,n){let r,i=e.state,o=i.selection.main;if(t.from>=o.from&&t.to<=o.to&&t.to-t.from>=(o.to-o.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let n=o.fromt.to?i.sliceDoc(t.to,o.to):"";r=i.replaceSelection(e.state.toText(n+t.insert.sliceString(0,void 0,e.state.lineBreak)+s))}else{let s=i.changes(t),a=n&&n.main.to<=s.newLength?n.main:void 0;if(i.selection.ranges.length>1&&e.inputState.composing>=0&&t.to<=o.to&&t.to>=o.to-10){let l,c=e.state.sliceDoc(t.from,t.to),u=n&&ZF(e,n.main.head);if(u){let e=t.insert.length-(t.to-t.from);l={from:u.from,to:u.to-e}}else l=e.state.doc.lineAt(o.head);let d=o.to-t.to,h=o.to-o.from;r=i.changeByRange(n=>{if(n.from==o.from&&n.to==o.to)return{changes:s,range:a||n.map(s)};let r=n.to-d,u=r-c.length;if(n.to-n.from!=h||e.state.sliceDoc(u,r)!=c||n.to>=l.from&&n.from<=l.to)return{range:n};let p=i.changes({from:u,to:r,insert:t.insert}),f=n.to-o.to;return{changes:p,range:a?gw.range(Math.max(0,a.anchor+f),Math.max(0,a.head+f)):n.map(p)}})}else r={changes:s,selection:a&&i.selection.replaceRange(a)}}let s="input.type";(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,s+=".compose",e.inputState.compositionFirstChange&&(s+=".start",e.inputState.compositionFirstChange=!1));return i.update(r,{userEvent:s,scrollIntoView:!0})}(e,n,r));return e.state.facet(cF).some(t=>t(e,n.from,n.to,s,a))||e.dispatch(a()),!0}if(r&&!r.main.eq(i)){let t=!1,n="select";return e.inputState.lastSelectionTime>Date.now()-50&&("select"==e.inputState.lastSelectionOrigin&&(t=!0),n=e.inputState.lastSelectionOrigin),e.dispatch({selection:r,scrollIntoView:t,userEvent:n}),!0}return!1}const wU={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},kU=RB.ie&&RB.ie_version<=11;class OU{constructor(e){this.view=e,this.active=!1,this.selectionRange=new aB,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let e of t)this.queue.push(e);(RB.ie&&RB.ie_version<=11||RB.ios&&e.composing)&&t.some(e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),kU&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver(()=>{var e;(null===(e=this.view.docView)||void 0===e?void 0:e.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,r=this.selectionRange;if(n.state.facet(gF)?n.root.activeElement!=this.dom:!KL(n.dom,r))return;let i=r.anchorNode&&n.docView.nearest(r.anchorNode);i&&i.ignoreEvent(e)?t||(this.selectionChanged=!1):(RB.ie&&RB.ie_version<=11||RB.android&&RB.chrome)&&!n.state.selection.main.empty&&r.focusNode&&tB(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=RB.safari&&11==e.root.nodeType&&function(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}(this.dom.ownerDocument)==this.dom&&function(e){let t=null;function n(e){e.preventDefault(),e.stopImmediatePropagation(),t=e.getTargetRanges()[0]}if(e.contentDOM.addEventListener("beforeinput",n,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",n,!0),!t)return null;let r=t.startContainer,i=t.startOffset,o=t.endContainer,s=t.endOffset,a=e.docView.domAtPos(e.state.selection.main.anchor);tB(a.node,a.offset,o,s)&&([r,i,o,s]=[o,s,r,i]);return{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:s}}(this.view)||ZL(e.root);if(!t||this.selectionRange.eq(t))return!1;let n=KL(this.dom,t);return n&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let e=this.delayedAndroidKey;if(e){this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&e.force&&hB(this.dom,e.key,e.keyCode)}};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}this.delayedAndroidKey&&"Enter"!=e||(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,r=!1;for(let i of e){let e=this.readMutation(i);e&&(e.typeOver&&(r=!0),-1==t?({from:t,to:n}=e):(t=Math.min(e.from,t),n=Math.max(e.to,n)))}return{from:t,to:n,typeOver:r}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),r=this.selectionChanged&&KL(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new SU(this.view,e,t,n);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,r=xU(this.view,t);return this.view.state==n&&this.view.update([]),r}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty("attributes"==e.type),"attributes"==e.type&&(t.flags|=4),"childList"==e.type){let n=EU(t,e.previousSibling||e.target.previousSibling,-1),r=EU(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}return"characterData"==e.type?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,t,n;this.stop(),null===(e=this.intersection)||void 0===e||e.disconnect(),null===(t=this.gapIntersection)||void 0===t||t.disconnect(),null===(n=this.resizeScroll)||void 0===n||n.disconnect();for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function EU(e,t,n){for(;t;){let r=bB.get(t);if(r&&r.parent==e)return r;let i=t.parentNode;t=i!=e.dom?i:n>0?t.nextSibling:t.previousSibling}return null}class AU{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM);let{dispatch:t}=e;this.dispatchTransactions=e.dispatchTransactions||t&&(e=>e.forEach(e=>t(e,this)))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||function(e){for(;e;){if(e&&(9==e.nodeType||11==e.nodeType&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}(e.parent)||document,this.viewState=new tU(e.state||ak.create(e)),e.scrollTo&&e.scrollTo.is(fF)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(vF).map(e=>new _F(e));for(let e of this.plugins)e.update(this);this.observer=new OU(this),this.inputState=new dz(this),this.inputState.ensureHandlers(this.plugins),this.docView=new XF(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}dispatch(...e){let t=1==e.length&&e[0]instanceof Yw?e:1==e.length&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t,n=!1,r=!1,i=this.state;for(let t of e){if(t.startState!=i)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");i=t.state}if(this.destroyed)return void(this.viewState.state=i);let o=this.hasFocus,s=0,a=null;e.some(e=>e.annotation(Iz))?(this.inputState.notifiedFocused=o,s=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,a=Dz(i,o),a||(s=1));let l=this.observer.delayedAndroidKey,c=null;if(l?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(i.doc)||!this.state.selection.eq(i.selection))&&(c=null)):this.observer.clear(),i.facet(ak.phrases)!=this.state.facet(ak.phrases))return this.setState(i);t=PF.create(this,i,e),t.flags|=s;let u=this.viewState.scrollTarget;try{this.updateState=2;for(let t of e){if(u&&(u=u.map(t.changes)),t.scrollIntoView){let{main:e}=t.state.selection;u=new pF(e.empty?e:gw.cursor(e.head,e.head>e.anchor?-1:1))}for(let e of t.effects)e.is(fF)&&(u=e.value.clip(this.state))}this.viewState.update(t,u),this.bidiCache=MU.update(this.bidiCache,t.changes),t.empty||(this.updatePlugins(t),this.inputState.update(t)),n=this.docView.update(t),this.state.facet(CF)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(e=>e.isUserEvent("select.pointer")))}finally{this.updateState=0}if(t.startState.facet(cU)!=t.state.facet(cU)&&(this.viewState.mustMeasureContent=!0),(n||r||u||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!t.empty)for(let e of this.state.facet(lF))try{e(t)}catch(e){mF(this.state,e,"update listener")}(a||c)&&Promise.resolve().then(()=>{a&&this.state==a.startState&&this.dispatch(a),c&&!xU(this,c)&&l.force&&hB(this.contentDOM,l.key,l.keyCode)})}setState(e){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=e);this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new tU(e),this.plugins=e.facet(vF).map(e=>new _F(e)),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView=new XF(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(vF),n=e.state.facet(vF);if(t!=n){let r=[];for(let i of n){let n=t.indexOf(i);if(n<0)r.push(new _F(i));else{let t=this.plugins[n];t.mustUpdate=e,r.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey)return this.measureScheduled=-1,void this.requestMeasure();this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.scrollDOM,r=n.scrollTop*this.scaleY,{scrollAnchorPos:i,scrollAnchorHeight:o}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(o<0)if(fB(n))i=-1,o=this.viewState.heightMap.height;else{let e=this.viewState.scrollAnchorAt(r);i=e.from,o=e.top}this.updateState=1;let s=this.viewState.measure(this);if(!s&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(e>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let a=[];4&s||([this.measureRequests,a]=[a,this.measureRequests]);let l=a.map(e=>{try{return e.read(this)}catch(e){return mF(this.state,e),CU}}),c=PF.create(this,this.state,[]),u=!1;c.flags|=s,t?t.flags|=s:t=c,this.updateState=2,c.empty||(this.updatePlugins(c),this.inputState.update(c),this.updateAttrs(),u=this.docView.update(c));for(let e=0;e1||e<-1){r+=e,n.scrollTop=r/this.scaleY,o=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(lF))e(t)}get themeClasses(){return dU+" "+(this.state.facet(uU)?pU:hU)+" "+this.state.facet(cU)}updateAttrs(){let e=PU(this,SF,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(gF)?"true":"false",class:"cm-content",style:`${RB.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),PU(this,xF,t);let n=this.observer.ignore(()=>{let n=QB(this.contentDOM,this.contentAttrs,t),r=QB(this.dom,this.editorAttrs,e);return n||r});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(e){let t=!0;for(let n of e)for(let e of n.effects)if(e.is(AU.announce)){t&&(this.announceDOM.textContent=""),t=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=e.value}}mountStyles(){this.styleModules=this.state.facet(CF);let e=this.state.facet(AU.cspNonce);WL.mount(this.root,this.styleModules.concat(gU).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(null!=e.key)for(let t=0;tt.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return uz(this,e,lz(this,e,t,n))}moveByGroup(e,t){return uz(this,e,lz(this,e,t,t=>function(e,t,n){let r=e.state.charCategorizer(t),i=r(n);return e=>{let t=r(e);return i==rk.Space&&(i=t),i==t}}(this,e.head,t)))}moveToLineBoundary(e,t,n=!0){return function(e,t,n,r){let i=az(e,t.head),o=r&&i.type==WB.Text&&(e.lineWrapping||i.widgetLineBreaks)?e.coordsAtPos(t.assoc<0&&t.head>i.from?t.head-1:t.head):null;if(o){let t=e.dom.getBoundingClientRect(),r=e.textDirectionAt(i.from),s=e.posAtCoords({x:n==(r==$F.LTR)?t.right-1:t.left+1,y:(o.top+o.bottom)/2});if(null!=s)return gw.cursor(s,n?-1:1)}return gw.cursor(n?i.to:i.from,n?-1:1)}(this,e,t,n)}moveVertically(e,t,n){return uz(this,e,function(e,t,n,r){let i=t.head,o=n?1:-1;if(i==(n?e.state.doc.length:0))return gw.cursor(i,t.assoc);let s,a=t.goalColumn,l=e.contentDOM.getBoundingClientRect(),c=e.coordsAtPos(i,t.assoc||-1),u=e.documentTop;if(c)null==a&&(a=c.left-l.left),s=o<0?c.top:c.bottom;else{let t=e.viewState.lineBlockAt(i);null==a&&(a=Math.min(l.right-l.left,e.defaultCharacterWidth*(i-t.from))),s=(o<0?t.top:t.bottom)+u}let d=l.left+a,h=null!=r?r:e.viewState.heightOracle.textHeight>>1;for(let t=0;;t+=10){let n=s+(h+t)*o,r=oz(e,{x:d,y:n},!1,o);if(nl.bottom||(o<0?ri)){let t=e.docView.coordsForChar(r),i=!t||n0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(dF)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>TU)return GF(e.length);let t,n=this.textDirectionAt(e.from);for(let r of this.bidiCache)if(r.from==e.from&&r.dir==n&&(r.fresh||UF(r.isolates,t=EF(this,e.from,e.to))))return r.order;t||(t=EF(this,e.from,e.to));let r=HF(e.text,n,t);return this.bidiCache.push(new MU(e.from,e.to,n,t,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||RB.safari&&(null===(e=this.inputState)||void 0===e?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{uB(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((9==e.nodeType?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return fF.of(new pF("number"==typeof e?gw.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return fF.of(new pF(gw.cursor(n.from),"start","start",n.top-e,t,!0))}static domEventHandlers(e){return yF.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return yF.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=WL.newName(),r=[cU.of(n),CF.of(mU("."+n,e))];return t&&t.dark&&r.push(uU.of(!0)),r}static baseTheme(e){return $w.lowest(CF.of(mU("."+dU,e,fU)))}static findFromDOM(e){var t;let n=e.querySelector(".cm-content"),r=n&&bB.get(n)||bB.get(e);return(null===(t=null==r?void 0:r.rootView)||void 0===t?void 0:t.view)||null}}AU.styleModule=CF,AU.inputHandler=cF,AU.focusChangeEffect=uF,AU.perLineTextDirection=dF,AU.exceptionSink=aF,AU.updateListener=lF,AU.editable=gF,AU.mouseSelectionStyle=sF,AU.dragMovesSelection=oF,AU.clickAddsSelectionRange=iF,AU.decorations=wF,AU.atomicRanges=kF,AU.bidiIsolatedRanges=OF,AU.scrollMargins=AF,AU.darkTheme=uU,AU.cspNonce=yw.define({combine:e=>e.length?e[0]:""}),AU.contentAttributes=xF,AU.editorAttributes=SF,AU.lineWrapping=AU.contentAttributes.of({class:"cm-lineWrapping"}),AU.announce=Xw.define();const TU=4096,CU={};class MU{constructor(e,t,n,r,i,o){this.from=e,this.to=t,this.dir=n,this.isolates=r,this.fresh=i,this.order=o}static update(e,t){if(t.empty&&!e.some(e=>e.fresh))return e;let n=[],r=e.length?e[e.length-1].dir:$F.LTR;for(let i=Math.max(0,e.length-10);i=0;i--){let t=r[i],o="function"==typeof t?t(e):t;o&&FB(o,n)}return n}const $U=RB.mac?"mac":RB.windows?"win":RB.linux?"linux":"key";function RU(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}const IU=$w.default(AU.domEventHandlers({keydown:(e,t)=>BU(jU(t.state),e,t,"editor")})),DU=yw.define({enables:IU}),NU=new WeakMap;function jU(e){let t=e.facet(DU),n=NU.get(t);return n||NU.set(t,n=function(e,t=$U){let n=Object.create(null),r=Object.create(null),i=(e,t)=>{let n=r[e];if(null==n)r[e]=t;else if(n!=t)throw new Error("Key binding "+e+" is used both as a regular binding and as a multi-stroke prefix")},o=(e,r,o,s,a)=>{var l,c;let u=n[e]||(n[e]=Object.create(null)),d=r.split(/ (?!$)/).map(e=>function(e,t){const n=e.split(/-(?!$)/);let r,i,o,s,a=n[n.length-1];"Space"==a&&(a=" ");for(let e=0;e{let r=LU={view:t,prefix:n,scope:e};return setTimeout(()=>{LU==r&&(LU=null)},4e3),!0}]})}let h=d.join(" ");i(h,!1);let p=u[h]||(u[h]={preventDefault:!1,stopPropagation:!1,run:(null===(c=null===(l=u._any)||void 0===l?void 0:l.run)||void 0===c?void 0:c.slice())||[]});o&&p.run.push(o),s&&(p.preventDefault=!0),a&&(p.stopPropagation=!0)};for(let r of e){let e=r.scope?r.scope.split(" "):["editor"];if(r.any)for(let t of e){let e=n[t]||(n[t]=Object.create(null));e._any||(e._any={preventDefault:!1,stopPropagation:!1,run:[]});for(let t in e)e[t].run.push(r.any)}let i=r[t]||r.key;if(i)for(let t of e)o(t,i,r.run,r.preventDefault,r.stopPropagation),r.shift&&o(t,"Shift-"+i,r.shift,r.preventDefault,r.stopPropagation)}return n}(t.reduce((e,t)=>e.concat(t),[]))),n}let LU=null;function BU(e,t,n,r){let i=zk(t),o=iw(nw(i,0))==i.length&&" "!=i,s="",a=!1,l=!1,c=!1;LU&&LU.view==n&&LU.scope==r&&(s=LU.prefix+" ",mz.indexOf(t.keyCode)<0&&(l=!0,LU=null));let u,d,h=new Set,p=e=>{if(e){for(let r of e.run)if(!h.has(r)&&(h.add(r),r(n,t)))return e.stopPropagation&&(c=!0),!0;e.preventDefault&&(e.stopPropagation&&(c=!0),l=!0)}return!1},f=e[r];return f&&(p(f[s+RU(i,t,!o)])?a=!0:o&&(t.altKey||t.metaKey||t.ctrlKey)&&!(RB.windows&&t.ctrlKey&&t.altKey)&&(u=Rk[t.keyCode])&&u!=i?(p(f[s+RU(u,t,!0)])||t.shiftKey&&(d=Ik[t.keyCode])!=i&&d!=u&&p(f[s+RU(d,t,!1)]))&&(a=!0):o&&t.shiftKey&&p(f[s+RU(i,t,!0)])&&(a=!0),!a&&p(f._any)&&(a=!0)),l&&(a=!0),a&&c&&t.stopPropagation(),a}const FU=!RB.ios;const zU={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};FU&&(zU[".cm-line"].caretColor="transparent !important");class UU extends ck{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}UU.prototype.elementClass="",UU.prototype.toDOM=void 0,UU.prototype.mapMode=sw.TrackBefore,UU.prototype.startSide=UU.prototype.endSide=-1,UU.prototype.point=!0;function QU(e){let t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function qU(e){let t=e.map(e=>"string"==typeof e?{label:e}:e),[n,r]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:function(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}function HU(e,t){return n=>{for(let t=IM(n.state).resolveInner(n.pos,-1);t;t=t.parent){if(e.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return t(n)}}const GU=Gw.define();const VU=AU.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class WU{constructor(e,t,n,r){this.field=e,this.line=t,this.from=n,this.to=r}}class XU{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(e){let t=e.mapPos(this.from,-1,sw.TrackDel),n=e.mapPos(this.to,1,sw.TrackDel);return null==t||null==n?null:new XU(this.field,t,n)}}class YU{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],r=[t],i=e.doc.lineAt(t),o=/^\s*/.exec(i.text)[0];for(let i of this.lines){if(n.length){let n=o,s=/^\t*/.exec(i)[0].length;for(let t=0;tnew XU(e.field,r[e.line]+e.from,r[e.line]+e.to))}}static parse(e){let t,n=[],r=[],i=[];for(let o of e.split(/\r\n?|\n/)){for(;t=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(o);){let e=t[1]?+t[1]:null,s=t[2]||t[3]||"",a=-1;for(let t=0;t=a&&e.field++}i.push(new WU(a,r.length,t.index,t.index+s.length)),o=o.slice(0,t.index)+s+o.slice(t.index+t[0].length)}for(let e;e=/\\([{}])/.exec(o);){o=o.slice(0,e.index)+e[1]+o.slice(e.index+e[0].length);for(let t of i)t.line==r.length&&t.from>e.index&&(t.from--,t.to--)}r.push(o)}return new YU(r,i)}}let ZU=XB.widget({widget:new class extends VB{toDOM(){let e=document.createElement("span");return e.className="cm-snippetFieldPosition",e}ignoreEvent(){return!1}}}),JU=XB.mark({class:"cm-snippetField"});class KU{constructor(e,t){this.ranges=e,this.active=t,this.deco=XB.set(e.map(e=>(e.from==e.to?ZU:JU).range(e.from,e.to)))}map(e){let t=[];for(let n of this.ranges){let r=n.map(e);if(!r)return null;t.push(r)}return new KU(t,this.active)}selectionInsideField(e){return e.ranges.every(e=>this.ranges.some(t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))}}const eQ=Xw.define({map:(e,t)=>e&&e.map(t)}),tQ=Xw.define(),nQ=Ew.define({create:()=>null,update(e,t){for(let n of t.effects){if(n.is(eQ))return n.value;if(n.is(tQ)&&e)return new KU(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>AU.decorations.from(e,e=>e?e.deco:XB.none)});function rQ(e,t){return gw.create(e.filter(e=>e.field==t).map(e=>gw.range(e.from,e.to)))}function iQ(e){let t=YU.parse(e);return(e,n,r,i)=>{let{text:o,ranges:s}=t.instantiate(e.state,r),a={changes:{from:r,to:i,insert:Bx.of(o)},scrollIntoView:!0,annotations:n?GU.of(n):void 0};if(s.length&&(a.selection=rQ(s,0)),s.length>1){let t=new KU(s,0),n=a.effects=[eQ.of(t)];void 0===e.state.field(nQ,!1)&&n.push(Xw.appendConfig.of([nQ,lQ,uQ,VU]))}e.dispatch(e.state.update(a))}}function oQ(e){return({state:t,dispatch:n})=>{let r=t.field(nQ,!1);if(!r||e<0&&0==r.active)return!1;let i=r.active+e,o=e>0&&!r.ranges.some(t=>t.field==i+e);return n(t.update({selection:rQ(r.ranges,i),effects:eQ.of(o?null:new KU(r.ranges,i)),scrollIntoView:!0})),!0}}const sQ=[{key:"Tab",run:oQ(1),shift:oQ(-1)},{key:"Escape",run:({state:e,dispatch:t})=>!!e.field(nQ,!1)&&(t(e.update({effects:eQ.of(null)})),!0)}],aQ=yw.define({combine:e=>e.length?e[0]:sQ}),lQ=$w.highest(DU.compute([aQ],e=>e.facet(aQ)));function cQ(e,t){return Object.assign(Object.assign({},t),{apply:iQ(e)})}const uQ=AU.domEventHandlers({mousedown(e,t){let n,r=t.state.field(nQ,!1);if(!r||null==(n=t.posAtCoords({x:e.clientX,y:e.clientY})))return!1;let i=r.ranges.find(e=>e.from<=n&&e.to>=n);return!(!i||i.field==r.active)&&(t.dispatch({selection:rQ(r.ranges,i.field),effects:eQ.of(r.ranges.some(e=>e.field>i.field)?new KU(r.ranges,i.field):null),scrollIntoView:!0}),!0)}});const dQ=new class extends ck{};dQ.startSide=1,dQ.endSide=-1;"object"==typeof navigator&&navigator.userAgent;const hQ=new eM.f,pQ=new Set(["Script","Body","FunctionDefinition","ClassDefinition","LambdaExpression","ForStatement","MatchClause"]);function fQ(e){return(t,n,r)=>{if(r)return!1;let i=t.node.getChild("VariableName");return i&&n(i,e),!0}}const mQ={FunctionDefinition:fQ("function"),ClassDefinition:fQ("class"),ForStatement(e,t,n){if(n)for(let n=e.node.firstChild;n;n=n.nextSibling)if("VariableName"==n.name)t(n,"variable");else if("in"==n.name)break},ImportStatement(e,t){var n,r;let{node:i}=e,o="from"==(null===(n=i.firstChild)||void 0===n?void 0:n.name);for(let e=i.getChild("import");e;e=e.nextSibling)"VariableName"==e.name&&"as"!=(null===(r=e.nextSibling)||void 0===r?void 0:r.name)&&t(e,o?"variable":"namespace")},AssignStatement(e,t){for(let n=e.node.firstChild;n;n=n.nextSibling)if("VariableName"==n.name)t(n,"variable");else if(":"==n.name||"AssignOp"==n.name)break},ParamList(e,t){for(let n=null,r=e.node.firstChild;r;r=r.nextSibling)"VariableName"!=r.name||n&&/\*|AssignOp/.test(n.name)||t(r,"variable"),n=r},CapturePattern:fQ("variable"),AsPattern:fQ("variable"),__proto__:null};function gQ(e,t){let n=hQ.get(t);if(n)return n;let r=[],i=!0;function o(t,n){let i=e.sliceString(t.from,t.to);r.push({label:i,type:n})}return t.cursor(eM.b.IncludeAnonymous).iterate(t=>{if(t.name){let e=mQ[t.name];if(e&&e(t,o,i)||!i&&pQ.has(t.name))return!1;i=!1}else if(t.to-t.from>8192){for(let n of gQ(e,t.node))r.push(n);return!1}}),hQ.set(t,r),r}const bQ=/^[\w\xa1-\uffff][\w\d\xa1-\uffff]*$/,vQ=["String","FormatString","Comment","PropertyName"];function yQ(e){let t=IM(e.state).resolveInner(e.pos,-1);if(vQ.indexOf(t.name)>-1)return null;let n="VariableName"==t.name||t.to-t.from<20&&bQ.test(e.state.sliceDoc(t.from,t.to));if(!n&&!e.explicit)return null;let r=[];for(let n=t;n;n=n.parent)pQ.has(n.name)&&(r=r.concat(gQ(e.state.doc,n)));return{options:r,from:n?t.from:e.pos,validFor:bQ}}const _Q=["__annotations__","__builtins__","__debug__","__doc__","__import__","__name__","__loader__","__package__","__spec__","False","None","True"].map(e=>({label:e,type:"constant"})).concat(["ArithmeticError","AssertionError","AttributeError","BaseException","BlockingIOError","BrokenPipeError","BufferError","BytesWarning","ChildProcessError","ConnectionAbortedError","ConnectionError","ConnectionRefusedError","ConnectionResetError","DeprecationWarning","EOFError","Ellipsis","EncodingWarning","EnvironmentError","Exception","FileExistsError","FileNotFoundError","FloatingPointError","FutureWarning","GeneratorExit","IOError","ImportError","ImportWarning","IndentationError","IndexError","InterruptedError","IsADirectoryError","KeyError","KeyboardInterrupt","LookupError","MemoryError","ModuleNotFoundError","NameError","NotADirectoryError","NotImplemented","NotImplementedError","OSError","OverflowError","PendingDeprecationWarning","PermissionError","ProcessLookupError","RecursionError","ReferenceError","ResourceWarning","RuntimeError","RuntimeWarning","StopAsyncIteration","StopIteration","SyntaxError","SyntaxWarning","SystemError","SystemExit","TabError","TimeoutError","TypeError","UnboundLocalError","UnicodeDecodeError","UnicodeEncodeError","UnicodeError","UnicodeTranslateError","UnicodeWarning","UserWarning","ValueError","Warning","ZeroDivisionError"].map(e=>({label:e,type:"type"}))).concat(["bool","bytearray","bytes","classmethod","complex","float","frozenset","int","list","map","memoryview","object","range","set","staticmethod","str","super","tuple","type"].map(e=>({label:e,type:"class"}))).concat(["abs","aiter","all","anext","any","ascii","bin","breakpoint","callable","chr","compile","delattr","dict","dir","divmod","enumerate","eval","exec","exit","filter","format","getattr","globals","hasattr","hash","help","hex","id","input","isinstance","issubclass","iter","len","license","locals","max","min","next","oct","open","ord","pow","print","property","quit","repr","reversed","round","setattr","slice","sorted","sum","vars","zip"].map(e=>({label:e,type:"function"}))),SQ=[cQ("def ${name}(${params}):\n\t${}",{label:"def",detail:"function",type:"keyword"}),cQ("for ${name} in ${collection}:\n\t${}",{label:"for",detail:"loop",type:"keyword"}),cQ("while ${}:\n\t${}",{label:"while",detail:"loop",type:"keyword"}),cQ("try:\n\t${}\nexcept ${error}:\n\t${}",{label:"try",detail:"/ except block",type:"keyword"}),cQ("if ${}:\n\t\n",{label:"if",detail:"block",type:"keyword"}),cQ("if ${}:\n\t${}\nelse:\n\t${}",{label:"if",detail:"/ else block",type:"keyword"}),cQ("class ${name}:\n\tdef __init__(self, ${params}):\n\t\t\t${}",{label:"class",detail:"definition",type:"keyword"}),cQ("import ${module}",{label:"import",detail:"statement",type:"keyword"}),cQ("from ${module} import ${names}",{label:"from",detail:"import",type:"keyword"})],xQ=HU(vQ,qU(_Q.concat(SQ)));function wQ(e,t){let n=e.lineIndent(t.from),r=e.lineAt(e.pos,-1),i=r.from+r.text.length;return/^\s*($|#)/.test(r.text)&&e.node.ton?null:n+e.unit}const kQ=RM.define({name:"python",parser:qL.configure({props:[ZM.add({Body:e=>{var t;return null!==(t=wQ(e,e.node))&&void 0!==t?t:e.continue()},IfStatement:e=>/^\s*(else:|elif )/.test(e.textAfter)?e.baseIndent:e.continue(),TryStatement:e=>/^\s*(except |finally:|else:)/.test(e.textAfter)?e.baseIndent:e.continue(),"TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression":rP({closing:")"}),"DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression":rP({closing:"}"}),"ArrayExpression ArrayComprehensionExpression":rP({closing:"]"}),"String FormatString":()=>null,Script:e=>{if(e.pos+/\s*/.exec(e.textAfter)[0].length>=e.node.to){let t=null;for(let n=e.node,r=n.to;n=n.lastChild,n&&n.to==r;)"Body"==n.type.name&&(t=n);if(t){let n=wQ(e,t);if(null!=n)return n}}return e.continue()}}),lP.add({"ArrayExpression DictionaryExpression SetExpression TupleExpression":cP,Body:(e,t)=>({from:e.from+1,to:e.to-(e.to==t.doc.length?0:1)})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"'''",'"""'],stringPrefixes:["f","fr","rf","r","u","b","br","rb","F","FR","RF","R","U","B","BR","RB"]},commentTokens:{line:"#"},indentOnInput:/^\s*([\}\]\)]|else:|elif |except |finally:)$/}});const OQ="undefined"==typeof Symbol?"__ͼ":Symbol.for("ͼ"),EQ="undefined"==typeof Symbol?"__styleSet"+Math.floor(1e8*Math.random()):Symbol("styleSet"),AQ="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:{};class TQ{constructor(e,t){this.rules=[];let{finish:n}=t||{};function r(e){return/^@/.test(e)?[e]:e.split(/,\s*/)}function i(e,t,o,s){let a=[],l=/^@(\w+)\b/.exec(e[0]),c=l&&"keyframes"==l[1];if(l&&null==t)return o.push(e[0]+";");for(let n in t){let s=t[n];if(/&/.test(n))i(n.split(/,\s*/).map(t=>e.map(e=>t.replace(/&/,e))).reduce((e,t)=>e.concat(t)),s,o);else if(s&&"object"==typeof s){if(!l)throw new RangeError("The value of a property ("+n+") should be a primitive value.");i(r(n),s,a,c)}else null!=s&&a.push(n.replace(/_.*/,"").replace(/[A-Z]/g,e=>"-"+e.toLowerCase())+": "+s+";")}(a.length||c)&&o.push((!n||l||s?e:e.map(n)).join(", ")+" {"+a.join(" ")+"}")}for(let t in e)i(r(t),e[t],this.rules)}getRules(){return this.rules.join("\n")}static newName(){let e=AQ[OQ]||1;return AQ[OQ]=e+1,"ͼ"+e.toString(36)}static mount(e,t,n){let r=e[EQ],i=n&&n.nonce;r?i&&r.setNonce(i):r=new MQ(e,i),r.mount(Array.isArray(t)?t:[t])}}let CQ=new Map;class MQ{constructor(e,t){let n=e.ownerDocument||e,r=n.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let t=CQ.get(n);if(t)return e.adoptedStyleSheets=[t.sheet,...e.adoptedStyleSheets],e[EQ]=t;this.sheet=new r.CSSStyleSheet,e.adoptedStyleSheets=[this.sheet,...e.adoptedStyleSheets],CQ.set(n,this)}else{this.styleTag=n.createElement("style"),t&&this.styleTag.setAttribute("nonce",t);let r=e.head||e;r.insertBefore(this.styleTag,r.firstChild)}this.modules=[],e[EQ]=this}mount(e){let t=this.sheet,n=0,r=0;for(let i=0;i-1&&(this.modules.splice(s,1),r--,s=-1),-1==s){if(this.modules.splice(r++,0,o),t)for(let e=0;eMath.max(1,e.scrollHeight-e.clientHeight-4)}class XQ{constructor(e,t,n=!0){this.node=e,this.offset=t,this.precise=n}static before(e,t){return new XQ(e.parentNode,NQ(e),t)}static after(e,t){return new XQ(e.parentNode,NQ(e)+1,t)}}const YQ=[];class ZQ{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let t=this.posAtStart;for(let n of this.children){if(n==e)return t;t+=n.length+n.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,t){if(2&this.flags){let n,r=this.dom,i=null;for(let o of this.children){if(7&o.flags){if(!o.dom&&(n=i?i.nextSibling:r.firstChild)){let e=ZQ.get(n);(!e||!e.parent&&e.canReuseDOM(o))&&o.reuseDOM(n)}o.sync(e,t),o.flags&=-8}if(n=i?i.nextSibling:r.firstChild,t&&!t.written&&t.node==r&&n!=o.dom&&(t.written=!0),o.dom.parentNode==r)for(;n&&n!=o.dom;)n=JQ(n);else r.insertBefore(o.dom,n);i=o.dom}for(n=i?i.nextSibling:r.firstChild,n&&t&&t.node==r&&(t.written=!0);n;)n=JQ(n)}else if(1&this.flags)for(let n of this.children)7&n.flags&&(n.sync(e,t),n.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,t){let n;if(e==this.dom)n=this.dom.childNodes[t];else{let r=0==LQ(e)?0:0==t?-1:1;for(;;){let t=e.parentNode;if(t==this.dom)break;0==r&&t.firstChild!=t.lastChild&&(r=e==t.firstChild?-1:1),e=t}n=r<0?e:e.nextSibling}if(n==this.dom.firstChild)return 0;for(;n&&!ZQ.get(n);)n=n.nextSibling;if(!n)return this.length;for(let e=0,t=0;;e++){let r=this.children[e];if(r.dom==n)return t;t+=r.length+r.breakAfter}}domBoundsAround(e,t,n=0){let r=-1,i=-1,o=-1,s=-1;for(let a=0,l=n,c=n;at)return n.domBoundsAround(e,t,l);if(u>=e&&-1==r&&(r=a,i=l),l>t&&n.dom.parentNode==this.dom){o=a,s=c;break}c=u,l=u+n.breakAfter}return{from:i,to:s<0?n+this.length:s,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o=0?this.children[o].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let t=this.parent;t;t=t.parent){if(e&&(t.flags|=2),1&t.flags)return;t.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,7&this.flags&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let t=e.parent;if(!t)return e;e=t}}replaceChildren(e,t,n=YQ){this.markDirty();for(let n=e;nthis.pos||e==this.pos&&(t>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let n=this.children[--this.i];this.pos-=n.length+n.breakAfter}}}function eq(e,t,n,r,i,o,s,a,l){let{children:c}=e,u=c.length?c[t]:null,d=o.length?o[o.length-1]:null,h=d?d.breakAfter:s;if(!(t==r&&u&&!s&&!h&&o.length<2&&u.merge(n,i,o.length?d:null,0==n,a,l))){if(r0&&(!s&&o.length&&u.merge(n,u.length,o[0],!1,a,0)?u.breakAfter=o.shift().breakAfter:(n2);var pq={mac:hq||/Mac/.test(nq.platform),windows:/Win/.test(nq.platform),linux:/Linux|X11/.test(nq.platform),ie:aq,ie_version:oq?rq.documentMode||6:sq?+sq[1]:iq?+iq[1]:0,gecko:lq,gecko_version:lq?+(/Firefox\/(\d+)/.exec(nq.userAgent)||[0,0])[1]:0,chrome:!!cq,chrome_version:cq?+cq[1]:0,ios:hq,android:/Android\b/.test(nq.userAgent),webkit:uq,safari:dq,webkit_version:uq?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,tabSize:null!=rq.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};class fq extends ZQ{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,t){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(t&&t.node==this.dom&&(t.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){3==e.nodeType&&this.createDOM(e)}merge(e,t,n){return!(8&this.flags||n&&(!(n instanceof fq)||this.length-(t-e)+n.length>256||8&n.flags))&&(this.text=this.text.slice(0,e)+(n?n.text:"")+this.text.slice(t),this.markDirty(),!0)}split(e){let t=new fq(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),t.flags|=8&this.flags,t}localPosFromDOM(e,t){return e==this.dom?t:t?this.text.length:0}domAtPos(e){return new XQ(this.dom,e)}domBoundsAround(e,t,n){return{from:n,to:n+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,t){return function(e,t,n){let r=e.nodeValue.length;t>r&&(t=r);let i=t,o=t,s=0;0==t&&n<0||t==r&&n>=0?pq.chrome||pq.gecko||(t?(i--,s=1):o=0)?0:a.length-1];pq.safari&&!s&&0==l.width&&(l=Array.prototype.find.call(a,e=>e.width)||l);return s?BQ(l,s<0):l||null}(this.dom,e,t)}}class mq extends ZQ{constructor(e,t=[],n=0){super(),this.mark=e,this.children=t,this.length=n;for(let e of t)e.setParent(this)}setAttrs(e){if(VQ(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let t in this.mark.attrs)e.setAttribute(t,this.mark.attrs[t]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!(8&(this.flags|e.flags))}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,t){this.dom?4&this.flags&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,t)}merge(e,t,n,r,i,o){return(!n||!(!(n instanceof mq&&n.mark.eq(this.mark))||e&&i<=0||te&&t.push(n=e&&(r=i),n=s,i++}let o=this.length-e;return this.length=e,r>-1&&(this.children.length=r,this.markDirty()),new mq(this.mark,t,o)}domAtPos(e){return vq(this,e)}coordsAt(e,t){return yq(this,e,t)}}class gq extends ZQ{static create(e,t,n){return new gq(e,t,n)}constructor(e,t,n){super(),this.widget=e,this.length=t,this.side=n,this.prevWidget=null}split(e){let t=gq.create(this.widget,this.length-e,this.side);return this.length-=e,t}sync(e){this.dom&&this.widget.updateDOM(this.dom,e)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.dom.contentEditable="false")}getSide(){return this.side}merge(e,t,n,r,i,o){return!(n&&(!(n instanceof gq&&this.widget.compare(n.widget))||e>0&&i<=0||t0)?XQ.before(this.dom):XQ.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,t){let n=this.widget.coordsAt(this.dom,e,t);if(n)return n;let r=this.dom.getClientRects(),i=null;if(!r.length)return null;let o=this.side?this.side<0:e>0;for(let t=o?r.length-1:0;i=r[t],!(e>0?0==t:t==r.length-1||i.top0?XQ.before(this.dom):XQ.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return Bx.empty}get isHidden(){return!0}}function vq(e,t){let n=e.dom,{children:r}=e,i=0;for(let e=0;ie&&t0;e--){let t=r[e-1];if(t.dom.parentNode==n)return t.domAtPos(t.length)}for(let e=i;e=a&&(u.children.length?e(u,a-c):(!o||o.isHidden&&n>0)&&(d>a||c==d&&u.getSide()>0)?(o=u,s=a-c):(c-1?1:0)!=i.length-(n&&i.indexOf(n)>-1?1:0))return!1;for(let o of r)if(o!=n&&(-1==i.indexOf(o)||e[o]!==t[o]))return!1;return!0}function wq(e,t,n){let r=!1;if(t)for(let i in t)n&&i in n||(r=!0,"style"==i?e.style.cssText="":e.removeAttribute(i));if(n)for(let i in n)t&&t[i]==n[i]||(r=!0,"style"==i?e.style.cssText=n[i]:e.setAttribute(i,n[i]));return r}function kq(e){let t=Object.create(null);for(let n=0;n0&&0==this.children[n-1].length;)this.children[--n].destroy();return this.children.length=n,this.markDirty(),this.length=e,t}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){xq(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,t){!function e(t,n,r){let i,{children:o}=t;r>0&&n instanceof mq&&o.length&&(i=o[o.length-1])instanceof mq&&i.mark.eq(n.mark)?e(i,n.children[0],r-1):(o.push(n),n.setParent(t)),t.length+=n.length}(this,e,t)}addLineDeco(e){let t=e.spec.attributes,n=e.spec.class;t&&(this.attrs=_q(t,this.attrs||{})),n&&(this.attrs=_q({class:n},this.attrs||{}))}domAtPos(e){return vq(this,e)}reuseDOM(e){"DIV"==e.nodeName&&(this.setDOM(e),this.flags|=6)}sync(e,t){var n;this.dom?4&this.flags&&(VQ(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(wq(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,t);let r=this.dom.lastChild;for(;r&&ZQ.get(r)instanceof mq;)r=r.lastChild;if(!(r&&this.length&&("BR"==r.nodeName||0!=(null===(n=ZQ.get(r))||void 0===n?void 0:n.isEditable)||pq.ios&&this.children.some(e=>e instanceof fq)))){let e=document.createElement("BR");e.cmIgnore=!0,this.dom.appendChild(e)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let e,t=0;for(let n of this.children){if(!(n instanceof fq)||/[^ -~]/.test(n.text))return null;let r=IQ(n.dom);if(1!=r.length)return null;t+=r[0].width,e=r[0].height}return t?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:t/this.length,textHeight:e}:null}coordsAt(e,t){let n=yq(this,e,t);if(!this.children.length&&n&&this.parent){let{heightOracle:e}=this.parent.view.viewState,t=n.bottom-n.top;if(Math.abs(t-e.lineHeight)<2&&e.textHeight=t){if(i instanceof Oq)return i;if(o>t)break}r=o+i.breakAfter}return null}}class Eq extends ZQ{constructor(e,t,n){super(),this.widget=e,this.length=t,this.deco=n,this.breakAfter=0,this.prevWidget=null}merge(e,t,n,r,i,o){return!(n&&(!(n instanceof Eq&&this.widget.compare(n.widget))||e>0&&i<=0||t0)}}class Aq{eq(e){return!1}updateDOM(e,t){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,t,n){return null}get isHidden(){return!1}destroy(e){}}var Tq=function(e){return e[e.Text=0]="Text",e[e.WidgetBefore=1]="WidgetBefore",e[e.WidgetAfter=2]="WidgetAfter",e[e.WidgetRange=3]="WidgetRange",e}(Tq||(Tq={}));class Cq extends ck{constructor(e,t,n,r){super(),this.startSide=e,this.endSide=t,this.widget=n,this.spec=r}get heightRelevant(){return!1}static mark(e){return new Mq(e)}static widget(e){let t=Math.max(-1e4,Math.min(1e4,e.side||0)),n=!!e.block;return t+=n&&!e.inlineOrder?t>0?3e8:-4e8:t>0?1e8:-1e8,new $q(e,t,t,n,e.widget||null,!1)}static replace(e){let t,n,r=!!e.block;if(e.isBlockGap)t=-5e8,n=4e8;else{let{start:i,end:o}=Rq(e,r);t=(i?r?-3e8:-1:5e8)-1,n=1+(o?r?2e8:1:-6e8)}return new $q(e,t,n,r,e.widget||null,!0)}static line(e){return new Pq(e)}static set(e,t=!1){return pk.of(e,t)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}Cq.none=pk.empty;class Mq extends Cq{constructor(e){let{start:t,end:n}=Rq(e);super(t?-1:5e8,n?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var t,n;return this==e||e instanceof Mq&&this.tagName==e.tagName&&(this.class||(null===(t=this.attrs)||void 0===t?void 0:t.class))==(e.class||(null===(n=e.attrs)||void 0===n?void 0:n.class))&&xq(this.attrs,e.attrs,"class")}range(e,t=e){if(e>=t)throw new RangeError("Mark decorations may not be empty");return super.range(e,t)}}Mq.prototype.point=!1;class Pq extends Cq{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Pq&&this.spec.class==e.spec.class&&xq(this.spec.attributes,e.spec.attributes)}range(e,t=e){if(t!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,t)}}Pq.prototype.mapMode=sw.TrackBefore,Pq.prototype.point=!0;class $q extends Cq{constructor(e,t,n,r,i,o){super(t,n,i,e),this.block=r,this.isReplace=o,this.mapMode=r?t<=0?sw.TrackBefore:sw.TrackAfter:sw.TrackDel}get type(){return this.startSide!=this.endSide?Tq.WidgetRange:this.startSide<=0?Tq.WidgetBefore:Tq.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof $q&&(t=this.widget,n=e.widget,t==n||!!(t&&n&&t.compare(n)))&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide;var t,n}range(e,t=e){if(this.isReplace&&(e>t||e==t&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&t!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,t)}}function Rq(e,t=!1){let{inclusiveStart:n,inclusiveEnd:r}=e;return null==n&&(n=e.inclusive),null==r&&(r=e.inclusive),{start:null!=n?n:t,end:null!=r?r:t}}function Iq(e,t,n,r=0){let i=n.length-1;i>=0&&n[i]+r>=e?n[i]=Math.max(n[i],t):n.push(e,t)}$q.prototype.point=!0;class Dq{constructor(e,t,n,r){this.doc=e,this.pos=t,this.end=n,this.disallowBlockEffectsFor=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=t}posCovered(){if(0==this.content.length)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof Eq&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Oq),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(Nq(new bq(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||e&&this.content.length&&this.content[this.content.length-1]instanceof Eq||this.getLine()}buildText(e,t,n){for(;e>0;){if(this.textOff==this.text.length){let{value:t,lineBreak:n,done:r}=this.cursor.next(this.skip);if(this.skip=0,r)throw new Error("Ran out of text content when drawing inline views");if(n){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}this.text=t,this.textOff=0}let r=Math.min(this.text.length-this.textOff,e,512);this.flushBuffer(t.slice(t.length-n)),this.getLine().append(Nq(new fq(this.text.slice(this.textOff,this.textOff+r)),t),n),this.atCursorPos=!0,this.textOff+=r,e-=r,n=0}}span(e,t,n,r){this.buildText(t-e,n,r),this.pos=t,this.openStart<0&&(this.openStart=r)}point(e,t,n,r,i,o){if(this.disallowBlockEffectsFor[o]&&n instanceof $q){if(n.block)throw new RangeError("Block decorations may not be specified via plugins");if(t>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let s=t-e;if(n instanceof $q)if(n.block)n.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Eq(n.widget||new jq("div"),s,n));else{let o=gq.create(n.widget||new jq("span"),s,s?0:n.startSide),a=this.atCursorPos&&!o.isEditable&&i<=r.length&&(e0),l=!o.isEditable&&(er.length||n.startSide<=0),c=this.getLine();2!=this.pendingBuffer||a||o.isEditable||(this.pendingBuffer=0),this.flushBuffer(r),a&&(c.append(Nq(new bq(1),r),i),i=r.length+Math.max(0,i-r.length)),c.append(Nq(o,r),i),this.atCursorPos=l,this.pendingBuffer=l?er.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(n);s&&(this.textOff+s<=this.text.length?this.textOff+=s:(this.skip+=s-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=t),this.openStart<0&&(this.openStart=i)}static build(e,t,n,r,i){let o=new Dq(e,t,n,i);return o.openEnd=pk.spans(r,t,n,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function Nq(e,t){for(let n of t)e=new mq(n,[e],e.length);return e}class jq extends Aq{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}const Lq=yw.define(),Bq=yw.define(),Fq=yw.define(),zq=yw.define(),Uq=yw.define(),Qq=yw.define(),qq=yw.define(),Hq=yw.define({combine:e=>e.some(e=>e)}),Gq=yw.define({combine:e=>e.some(e=>e)});class Vq{constructor(e,t="nearest",n="nearest",r=5,i=5,o=!1){this.range=e,this.y=t,this.x=n,this.yMargin=r,this.xMargin=i,this.isSnapshot=o}map(e){return e.empty?this:new Vq(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new Vq(gw.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Wq=Xw.define({map:(e,t)=>e.map(t)});function Xq(e,t,n){let r=e.facet(zq);r.length?r[0](t):window.onerror?window.onerror(String(t),n,void 0,void 0,t):n?console.error(n+":",t):console.error(t)}const Yq=yw.define({combine:e=>!e.length||e[0]});let Zq=0;const Jq=yw.define();class Kq{constructor(e,t,n,r,i){this.id=e,this.create=t,this.domEventHandlers=n,this.domEventObservers=r,this.extension=i(this)}static define(e,t){const{eventHandlers:n,eventObservers:r,provide:i,decorations:o}=t||{};return new Kq(Zq++,e,n,r,e=>{let t=[Jq.of(e)];return o&&t.push(rH.of(t=>{let n=t.plugin(e);return n?o(n):Cq.none})),i&&t.push(i(e)),t})}static fromClass(e,t){return Kq.define(t=>new e(t),t)}}class eH{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}update(e){if(this.value){if(this.mustUpdate){let e=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(e)}catch(t){if(Xq(e.state,t,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(e){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(e)}catch(t){Xq(e.state,t,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var t;if(null===(t=this.value)||void 0===t?void 0:t.destroy)try{this.value.destroy()}catch(t){Xq(e.state,t,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const tH=yw.define(),nH=yw.define(),rH=yw.define(),iH=yw.define(),oH=yw.define();function sH(e,t,n){let r=e.state.facet(oH);if(!r.length)return r;let i=r.map(t=>t instanceof Function?t(e):t),o=[];return pk.spans(i,t,n,{point(){},span(e,t,n,r){let i=o;for(let o=n.length-1;o>=0;o--,r--){let s,a=n[o].spec.bidiIsolate;if(null!=a)if(r>0&&i.length&&(s=i[i.length-1]).to==e&&s.direction==a)s.to=t,i=s.inner;else{let n={from:e,to:t,direction:a,inner:[]};i.push(n),i=n.inner}}}}),o}const aH=yw.define();function lH(e){let t=0,n=0,r=0,i=0;for(let o of e.state.facet(aH)){let s=o(e);s&&(null!=s.left&&(t=Math.max(t,s.left)),null!=s.right&&(n=Math.max(n,s.right)),null!=s.top&&(r=Math.max(r,s.top)),null!=s.bottom&&(i=Math.max(i,s.bottom)))}return{left:t,right:n,top:r,bottom:i}}const cH=yw.define();class uH{constructor(e,t,n,r){this.fromA=e,this.toA=t,this.fromB=n,this.toB=r}join(e){return new uH(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let t=e.length,n=this;for(;t>0;t--){let r=e[t-1];if(!(r.fromA>n.toA)){if(r.toAc)break;i+=2}if(!a)return n;new uH(a.fromA,a.toA,a.fromB,a.toB).addToSet(n),o=a.toA,s=a.toB}}}class dH{constructor(e,t,n){this.view=e,this.state=t,this.transactions=n,this.flags=0,this.startState=e.state,this.changes=lw.empty(this.startState.doc.length);for(let e of n)this.changes=this.changes.compose(e.changes);let r=[];this.changes.iterChangedRanges((e,t,n,i)=>r.push(new uH(e,t,n,i))),this.changedRanges=r}static create(e,t,n){return new dH(e,t,n)}get viewportChanged(){return(4&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(10&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return 0==this.flags&&0==this.transactions.length}}var hH=function(e){return e[e.LTR=0]="LTR",e[e.RTL=1]="RTL",e}(hH||(hH={}));const pH=hH.LTR,fH=hH.RTL;function mH(e){let t=[];for(let n=0;n=t){if(s.level==n)return o;(i<0||(0!=r?r<0?s.fromt:e[i].level>s.level))&&(i=o)}}if(i<0)throw new RangeError("Index out of range");return i}}function xH(e,t){if(e.length!=t.length)return!1;for(let n=0;n=0;e-=3)if(yH[e+1]==-n){let t=yH[e+2],n=2&t?i:4&t?1&t?o:i:0;n&&(wH[s]=wH[yH[e]]=n),a=e;break}}else{if(189==yH.length)break;yH[a++]=s,yH[a++]=t,yH[a++]=l}else if(2==(r=wH[s])||1==r){let e=r==i;l=e?0:1;for(let t=a-3;t>=0;t-=3){let n=yH[t+2];if(2&n)break;if(e)yH[t+2]|=2;else{if(4&n)break;yH[t+2]|=4}}}}}(e,i,o,r,a),function(e,t,n,r){for(let i=0,o=r;i<=n.length;i++){let s=i?n[i-1].to:e,a=il;)t==o&&(t=n[--r].from,o=r?n[r-1].to:e),wH[--t]=u;l=s}else o=s,l++}}}(i,o,r,a),function e(t,n,r,i,o,s,a){let l=i%2?2:1;if(i%2==o%2)for(let c=n,u=0;cc&&a.push(new SH(c,e.from,p)),kH(t,e.direction==pH!=!(p%2)?i+1:i,o,e.inner,e.from,e.to,a),c=e.to}f=e.to}else{if(f==r||(n?wH[f]!=l:wH[f]==l))break;f++}h?e(t,c,f,i+1,o,h,a):cn;){let r=!0,d=!1;if(!u||c>s[u-1].to){let e=wH[c-1];e!=l&&(r=!1,d=16==e)}let h=r||1!=l?null:[],p=r?i:i+1,f=c;e:for(;;)if(u&&f==s[u-1].to){if(d)break e;let e=s[--u];if(!r)for(let t=e.from,r=u;;){if(t==n)break e;if(!r||s[r-1].to!=t){if(wH[t-1]==l)break e;break}t=s[--r].from}if(h)h.push(e);else{e.towH.length;)wH[wH.length]=256;let r=[],i=t==pH?0:1;return kH(e,i,i,n,0,e.length,r),r}function EH(e){return[new SH(0,e,0)]}let AH="";function TH(e,t,n,r,i){var o;let s=r.head-e.from,a=-1;if(0==s){if(!i||!e.length)return null;t[0].level!=n&&(s=t[0].side(!1,n),a=0)}else if(s==e.length){if(i)return null;let e=t[t.length-1];e.level!=n&&(s=e.side(!0,n),a=t.length-1)}a<0&&(a=SH.find(t,s,null!==(o=r.bidiLevel)&&void 0!==o?o:-1,r.assoc));let l=t[a];s==l.side(i,n)&&(l=t[a+=i?1:-1],s=l.side(!i,n));let c=i==(l.dir==n),u=Zx(e.text,s,c);if(AH=e.text.slice(Math.min(s,u),Math.max(s,u)),u!=l.side(i,n))return gw.cursor(u+e.from,c?-1:1,l.level);let d=a==(i?t.length-1:0)?null:t[a+(i?1:-1)];return d||l.level==n?d&&d.level0&&n.length&&(n.every(({fromA:e,toA:t})=>tthis.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0);let r=-1;this.view.inputState.composing>=0&&((null===(t=this.domChanged)||void 0===t?void 0:t.newSel)?r=this.domChanged.newSel.head:function(e,t){let n=!1;t&&e.iterChangedRanges((e,r)=>{et.from&&(n=!0)});return n}(e.changes,this.hasComposition)||e.selectionSet||(r=e.state.selection.main.head));let i=r>-1?function(e,t,n){let r=PH(e,n);if(!r)return null;let{node:i,from:o,to:s}=r,a=i.nodeValue;if(/[\n\r]/.test(a))return null;if(e.state.doc.sliceString(r.from,r.to)!=a)return null;let l=t.invertedDesc,c=new uH(l.mapPos(o),l.mapPos(s),o,s),u=[];for(let t=i.parentNode;;t=t.parentNode){let n=ZQ.get(t);if(n instanceof mq)u.push({node:t,deco:n.mark});else{if(n instanceof Oq||"DIV"==t.nodeName&&t.parentNode==e.contentDOM)return{range:c,text:i,marks:u,line:t};if(t==e.contentDOM)return null;u.push({node:t,deco:new Mq({inclusive:!0,attributes:kq(t),tagName:t.tagName.toLowerCase()})})}}}(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:t,to:r}=this.hasComposition;n=new uH(t,r,e.changes.mapPos(t,-1),e.changes.mapPos(r,1)).addToSet(n.slice())}this.hasComposition=i?{from:i.range.fromB,to:i.range.toB}:null,(pq.ie||pq.chrome)&&!i&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=function(e,t,n){let r=new class{constructor(){this.changes=[]}compareRange(e,t){Iq(e,t,this.changes)}comparePoint(e,t){Iq(e,t,this.changes)}};return pk.compare(e,t,n,r),r.changes}(this.decorations,this.updateDeco(),e.changes);return n=uH.extendWithRanges(n,o),!!(7&this.flags||0!=n.length)&&(this.updateInner(n,e.startState.doc.length,i),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,t,n){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,t,n);let{observer:r}=this.view;r.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let e=pq.chrome||pq.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,e),this.flags&=-8,e&&(e.written||r.selectionRange.focusNode!=e.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(e=>e.flags&=-9);let i=[];if(this.view.viewport.from||this.view.viewport.to=0?r[e]:null;if(!t)break;let o,s,a,l,{fromA:c,toA:u,fromB:d,toB:h}=t;if(n&&n.range.fromBd){let e=Dq.build(this.view.state.doc,d,n.range.fromB,this.decorations,this.dynamicDecorationMap),t=Dq.build(this.view.state.doc,n.range.toB,h,this.decorations,this.dynamicDecorationMap);s=e.breakAtStart,a=e.openStart,l=t.openEnd;let r=this.compositionView(n);t.breakAtStart?r.breakAfter=1:t.content.length&&r.merge(r.length,r.length,t.content[0],!1,t.openStart,0)&&(r.breakAfter=t.content[0].breakAfter,t.content.shift()),e.content.length&&r.merge(0,0,e.content[e.content.length-1],!0,0,e.openEnd)&&e.content.pop(),o=e.content.concat(r).concat(t.content)}else({content:o,breakAtStart:s,openStart:a,openEnd:l}=Dq.build(this.view.state.doc,d,h,this.decorations,this.dynamicDecorationMap));let{i:p,off:f}=i.findPos(u,1),{i:m,off:g}=i.findPos(c,-1);eq(this,m,g,p,f,o,s,a,l)}n&&this.fixCompositionDOM(n)}compositionView(e){let t=new fq(e.text.nodeValue);t.flags|=8;for(let{deco:n}of e.marks)t=new mq(n,[t],t.length);let n=new Oq;return n.append(t,0),n}fixCompositionDOM(e){let t=(e,t)=>{t.flags|=8|(t.children.some(e=>7&e.flags)?1:0),this.markedForComposition.add(t);let n=ZQ.get(e);n&&n!=t&&(n.dom=null),t.setDOM(e)},n=this.childPos(e.range.fromB,1),r=this.children[n.i];t(e.line,r);for(let i=e.marks.length-1;i>=-1;i--)n=r.childPos(n.off,1),r=r.children[n.i],t(i>=0?e.marks[i].node:e.text,r)}updateSelection(e=!1,t=!1){!e&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();let n=this.view.root.activeElement,r=n==this.dom,i=!r&&RQ(this.dom,this.view.observer.selectionRange)&&!(n&&this.dom.contains(n));if(!(r||t||i))return;let o=this.forceSelection;this.forceSelection=!1;let s=this.view.state.selection.main,a=this.moveToLine(this.domAtPos(s.anchor)),l=s.empty?a:this.moveToLine(this.domAtPos(s.head));if(pq.gecko&&s.empty&&!this.hasComposition&&(1==(c=a).node.nodeType&&c.node.firstChild&&(0==c.offset||"false"==c.node.childNodes[c.offset-1].contentEditable)&&(c.offset==c.node.childNodes.length||"false"==c.node.childNodes[c.offset].contentEditable))){let e=document.createTextNode("");this.view.observer.ignore(()=>a.node.insertBefore(e,a.node.childNodes[a.offset]||null)),a=l=new XQ(e,0),o=!0}var c;let u=this.view.observer.selectionRange;!o&&u.focusNode&&DQ(a.node,a.offset,u.anchorNode,u.anchorOffset)&&DQ(l.node,l.offset,u.focusNode,u.focusOffset)||(this.view.observer.ignore(()=>{pq.android&&pq.chrome&&this.dom.contains(u.focusNode)&&function(e,t){for(let n=e;n&&n!=t;n=n.assignedSlot||n.parentNode)if(1==n.nodeType&&"false"==n.contentEditable)return!0;return!1}(u.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let e=PQ(this.view.root);if(e)if(s.empty){if(pq.gecko){let e=(t=a.node,r=a.offset,1!=t.nodeType?0:(r&&"false"==t.childNodes[r-1].contentEditable?1:0)|(rs.head&&([a,l]=[l,a]),t.setEnd(l.node,l.offset),t.setStart(a.node,a.offset),e.removeAllRanges(),e.addRange(t)}else;var t,r;i&&this.view.root.activeElement==this.dom&&(this.dom.blur(),n&&n.focus())}),this.view.observer.setSelectionRange(a,l)),this.impreciseAnchor=a.precise?null:new XQ(u.anchorNode,u.anchorOffset),this.impreciseHead=l.precise?null:new XQ(u.focusNode,u.focusOffset)}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,t=e.state.selection.main,n=PQ(e.root),{anchorNode:r,anchorOffset:i}=e.observer.selectionRange;if(!(n&&t.empty&&t.assoc&&n.modify))return;let o=Oq.find(this,t.head);if(!o)return;let s=o.posAtStart;if(t.head==s||t.head==s+o.length)return;let a=this.coordsAt(t.head,-1),l=this.coordsAt(t.head,1);if(!a||!l||a.bottom>l.top)return;let c=this.domAtPos(t.head+t.assoc);n.collapse(c.node,c.offset),n.modify("move",t.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let u=e.observer.selectionRange;e.docView.posFromDOM(u.anchorNode,u.anchorOffset)!=t.from&&n.collapse(r,i)}moveToLine(e){let t,n=this.dom;if(e.node!=n)return e;for(let r=e.offset;!t&&r=0;r--){let e=ZQ.get(n.childNodes[r]);e instanceof Oq&&(t=e.domAtPos(e.length))}return t?new XQ(t.node,t.offset,!0):e}nearest(e){for(let t=e;t;){let e=ZQ.get(t);if(e&&e.rootView==this)return e;t=t.parentNode}return null}posFromDOM(e,t){let n=this.nearest(e);if(!n)throw new RangeError("Trying to find position for a DOM position outside of the document");return n.localPosFromDOM(e,t)+n.posAtStart}domAtPos(e){let{i:t,off:n}=this.childCursor().findPos(e,-1);for(;t=0;o--){let s=this.children[o],a=i-s.breakAfter,l=a-s.length;if(ae||s.covers(1))&&(!n||s instanceof Oq&&!(n instanceof Oq&&t>=0))&&(n=s,r=l),i=l}return n?n.coordsAt(e-r,t):null}coordsForChar(e){let{i:t,off:n}=this.childPos(e,1),r=this.children[t];if(!(r instanceof Oq))return null;for(;r.children.length;){let{i:e,off:t}=r.childPos(n,1);for(;;e++){if(e==r.children.length)return null;if((r=r.children[e]).length)break}n=t}if(!(r instanceof fq))return null;let i=Zx(r.text,n);if(i==n)return null;let o=HQ(r.dom,n,i).getClientRects();for(let e=0;eMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,s=-1,a=this.view.textDirection==hH.LTR;for(let e=0,l=0;lr)break;if(e>=n){let n=c.dom.getBoundingClientRect();if(t.push(n.height),o){let t=c.dom.lastChild,r=t?IQ(t):[];if(r.length){let t=r[r.length-1],o=a?t.right-n.left:n.right-t.left;o>s&&(s=o,this.minWidth=i,this.minWidthFrom=e,this.minWidthTo=u)}}}e=u+c.breakAfter}return t}textDirectionAt(e){let{i:t}=this.childPos(e,1);return"rtl"==getComputedStyle(this.children[t].dom).direction?hH.RTL:hH.LTR}measureTextSize(){for(let e of this.children)if(e instanceof Oq){let t=e.measureTextSize();if(t)return t}let e,t,n,r=document.createElement("div");return r.className="cm-line",r.style.width="99999px",r.style.position="absolute",r.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(r);let i=IQ(r.firstChild)[0];e=r.getBoundingClientRect().height,t=i?i.width/27:7,n=i?i.height:e,r.remove()}),{lineHeight:e,charWidth:t,textHeight:n}}childCursor(e=this.length){let t=this.children.length;return t&&(e-=this.children[--t].length),new KQ(this.children,e,t)}computeBlockGapDeco(){let e=[],t=this.view.viewState;for(let n=0,r=0;;r++){let i=r==t.viewports.length?null:t.viewports[r],o=i?i.from-1:this.length;if(o>n){let r=(t.lineBlockAt(o).bottom-t.lineBlockAt(n).top)/this.view.scaleY;e.push(Cq.replace({widget:new MH(r),block:!0,inclusive:!0,isBlockGap:!0}).range(n,o))}if(!i)break;n=i.to+1}return Cq.set(e)}updateDeco(){let e=this.view.state.facet(rH).map((e,t)=>(this.dynamicDecorationMap[t]="function"==typeof e)?e(this.view):e);for(let t=e.length;tn.anchor?-1:1);if(!r)return;!n.empty&&(t=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(r={left:Math.min(r.left,t.left),top:Math.min(r.top,t.top),right:Math.max(r.right,t.right),bottom:Math.max(r.bottom,t.bottom)});let i=lH(this.view),o={left:r.left-i.left,top:r.top-i.top,right:r.right+i.right,bottom:r.bottom+i.bottom},{offsetWidth:s,offsetHeight:a}=this.view.scrollDOM;!function(e,t,n,r,i,o,s,a){let l=e.ownerDocument,c=l.defaultView||window;for(let u=e,d=!1;u&&!d;)if(1==u.nodeType){let e,h=u==l.body,p=1,f=1;if(h)e=FQ(c);else{if(/^(fixed|sticky)$/.test(getComputedStyle(u).position)&&(d=!0),u.scrollHeight<=u.clientHeight&&u.scrollWidth<=u.clientWidth){u=u.assignedSlot||u.parentNode;continue}let t=u.getBoundingClientRect();p=t.width/u.offsetWidth,f=t.height/u.offsetHeight,e={left:t.left,right:t.left+u.clientWidth*p,top:t.top,bottom:t.top+u.clientHeight*f}}let m=0,g=0;if("nearest"==i)t.top0&&t.bottom>e.bottom+g&&(g=t.bottom-e.bottom+g+s)):t.bottom>e.bottom&&(g=t.bottom-e.bottom+s,n<0&&t.top-g0&&t.right>e.right+m&&(m=t.right-e.right+m+o)):t.right>e.right&&(m=t.right-e.right+o,n<0&&t.left0))break;n=n.childNodes[r-1],r=LQ(n)}if(n>=0)for(let r=e,i=t;;){if(3==r.nodeType)return{node:r,offset:i};if(!(1==r.nodeType&&i=0))break;r=r.childNodes[i],i=0}return null}function RH(e,t){return t.left>e?t.left-e:Math.max(0,e-t.right)}function IH(e,t){return t.top>e?t.top-e:Math.max(0,e-t.bottom)}function DH(e,t){return e.topt.top+1}function NH(e,t){return te.bottom?{top:e.top,left:e.left,right:e.right,bottom:t}:e}function LH(e,t,n){let r=e.nodeValue.length,i=-1,o=1e9,s=0;for(let a=0;an?c.top-n:n-c.bottom)-1;if(c.left-1<=t&&c.right+1>=t&&u=(c.left+c.right)/2,r=n;if(pq.chrome||pq.gecko){HQ(e,a).getBoundingClientRect().left==c.right&&(r=!n)}if(u<=0)return{node:e,offset:a+(r?1:0)};i=a+(r?1:0),o=u}}}return{node:e,offset:i>-1?i:s>0?e.nodeValue.length:0}}function BH(e,t,n,r=-1){var i,o;let s,a=e.contentDOM.getBoundingClientRect(),l=a.top+e.viewState.paddingTop,{docHeight:c}=e.viewState,{x:u,y:d}=t,h=d-l;if(h<0)return 0;if(h>c)return e.state.doc.length;for(let t=e.viewState.heightOracle.textHeight/2,i=!1;s=e.elementAtHeight(h),s.type!=Tq.Text;)for(;h=r>0?s.bottom+t:s.top-t,!(h>=0&&h<=c);){if(i)return n?null:0;i=!0,r=-r}d=l+h;let p=s.from;if(pe.viewport.to)return e.viewport.to==e.state.doc.length?e.state.doc.length:n?null:FH(e,a,s,u,d);let f=e.dom.ownerDocument,m=e.root.elementFromPoint?e.root:f,g=m.elementFromPoint(u,d);g&&!e.contentDOM.contains(g)&&(g=null),g||(u=Math.max(a.left+1,Math.min(a.right-1,u)),g=m.elementFromPoint(u,d),g&&!e.contentDOM.contains(g)&&(g=null));let b,v=-1;if(g&&0!=(null===(i=e.docView.nearest(g))||void 0===i?void 0:i.isEditable))if(f.caretPositionFromPoint){let e=f.caretPositionFromPoint(u,d);e&&({offsetNode:b,offset:v}=e)}else if(f.caretRangeFromPoint){let t=f.caretRangeFromPoint(u,d);t&&(({startContainer:b,startOffset:v}=t),(!e.contentDOM.contains(b)||pq.safari&&function(e,t,n){let r;if(3!=e.nodeType||t!=(r=e.nodeValue.length))return!1;for(let t=e.nextSibling;t;t=t.nextSibling)if(1!=t.nodeType||"BR"!=t.nodeName)return!1;return HQ(e,r-1,r).getBoundingClientRect().left>n}(b,v,u)||pq.chrome&&function(e,t,n){if(0!=t)return!1;for(let t=e;;){let e=t.parentNode;if(!e||1!=e.nodeType||e.firstChild!=t)return!1;if(e.classList.contains("cm-line"))break;t=e}let r=1==e.nodeType?e.getBoundingClientRect():HQ(e,0,Math.max(e.nodeValue.length,1)).getBoundingClientRect();return n-r.left>5}(b,v,u))&&(b=void 0))}if(!b||!e.docView.dom.contains(b)){let t=Oq.find(e.docView,p);if(!t)return h>s.top+s.height/2?s.to:s.from;({node:b,offset:v}=function e(t,n,r){let i,o,s,a,l,c,u,d,h=!1;for(let p=t.firstChild;p;p=p.nextSibling){let t=IQ(p);for(let f=0;fb||a==b&&s>g){i=p,o=m,s=g,a=b;let e=b?r0?f0)}0==g?r>m.bottom&&(!u||u.bottomm.top)&&(c=p,d=m):u&&DH(u,m)?u=jH(u,m.bottom):d&&DH(d,m)&&(d=NH(d,m.top))}}if(u&&u.bottom>=r?(i=l,o=u):d&&d.top<=r&&(i=c,o=d),!i)return{node:t,offset:0};let p=Math.max(o.left,Math.min(o.right,n));return 3==i.nodeType?LH(i,p,r):h&&"false"!=i.contentEditable?e(i,p,r):{node:t,offset:Array.prototype.indexOf.call(t.childNodes,i)+(n>=(o.left+o.right)/2?1:0)}}(t.dom,u,d))}let y=e.docView.nearest(b);if(!y)return null;if(y.isWidget&&1==(null===(o=y.dom)||void 0===o?void 0:o.nodeType)){let e=y.dom.getBoundingClientRect();return t.y1.5*e.defaultLineHeight){let t=e.viewState.heightOracle.textHeight;o+=Math.floor((i-n.top-.5*(e.defaultLineHeight-t))/t)*e.viewState.heightOracle.lineLength}let s=e.state.sliceDoc(n.from,n.to);return n.from+Ek(s,o,e.state.tabSize)}function zH(e,t){let n=e.lineBlockAt(t);if(Array.isArray(n.type))for(let e of n.type)if(e.to>t||e.to==t&&(e.to==n.to||e.type==Tq.Text))return e;return n}function UH(e,t,n,r){let i=e.state.doc.lineAt(t.head),o=e.bidiSpans(i),s=e.textDirectionAt(i.from);for(let a=t,l=null;;){let t=TH(i,o,s,a,n),c=AH;if(!t){if(i.number==(n?e.state.doc.lines:1))return a;c="\n",i=e.state.doc.line(i.number+(n?1:-1)),o=e.bidiSpans(i),t=gw.cursor(n?i.from:i.to)}if(l){if(!l(c))return a}else{if(!r)return t;l=r(c)}a=t}}function QH(e,t,n){for(;;){let r=0;for(let i of e)i.between(t-1,t+1,(e,i,o)=>{if(t>e&&tt(e)),n.from,t.head>n.from?-1:1);return r==n.from?n:gw.cursor(r,rnull),pq.gecko&&(t=e.contentDOM.ownerDocument,bG.has(t)||(bG.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{})))}handleEvent(e){(function(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n,r=t.target;r!=e.contentDOM;r=r.parentNode)if(!r||11==r.nodeType||(n=ZQ.get(r))&&n.ignoreEvent(t))return!1;return!0})(this.view,e)&&!this.ignoreDuringComposition(e)&&("keydown"==e.type&&this.keydown(e)||this.runHandlers(e.type,e))}runHandlers(e,t){let n=this.handlers[e];if(n){for(let e of n.observers)e(this.view,t);for(let e of n.handlers){if(t.defaultPrevented)break;if(e(this.view,t)){t.preventDefault();break}}}}ensureHandlers(e){let t=function(e){let t=Object.create(null);function n(e){return t[e]||(t[e]={observers:[],handlers:[]})}for(let t of e){let e=t.spec;if(e&&e.domEventHandlers)for(let r in e.domEventHandlers){let i=e.domEventHandlers[r];i&&n(r).handlers.push(GH(t.value,i))}if(e&&e.domEventObservers)for(let r in e.domEventObservers){let i=e.domEventObservers[r];i&&n(r).observers.push(GH(t.value,i))}}for(let e in JH)n(e).handlers.push(JH[e]);for(let e in KH)n(e).observers.push(KH[e]);return t}(e),n=this.handlers,r=this.view.contentDOM;for(let e in t)if("scroll"!=e){let i=!t[e].handlers.length,o=n[e];o&&i!=!o.handlers.length&&(r.removeEventListener(e,this.handleEvent),o=null),o||r.addEventListener(e,this.handleEvent,{passive:i})}for(let e in n)"scroll"==e||t[e]||r.removeEventListener(e,this.handleEvent);this.handlers=t}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),9==e.keyCode&&Date.now()t.keyCode==e.keyCode))&&!e.ctrlKey||WH.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(229!=e.keyCode&&this.view.observer.forceFlush(),!1):(this.pendingIOSKey=t||e,setTimeout(()=>this.flushIOSKey(),250),!0)}flushIOSKey(){let e=this.pendingIOSKey;return!!e&&(this.pendingIOSKey=void 0,GQ(this.view.contentDOM,e.key,e.keyCode))}ignoreDuringComposition(e){return!!/^key/.test(e.type)&&(this.composing>0||!!(pq.safari&&!pq.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function GH(e,t){return(n,r)=>{try{return t.call(e,r,n)}catch(e){Xq(n.state,e)}}}const VH=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],WH="dthko",XH=[16,17,18,20,91,92,224,225];function YH(e){return.7*Math.max(0,e)+8}class ZH{constructor(e,t,n,r){this.view=e,this.startEvent=t,this.style=n,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=t,this.scrollParent=function(e){let t=e.ownerDocument;for(let n=e.parentNode;n&&n!=t.body;)if(1==n.nodeType){if(n.scrollHeight>n.clientHeight||n.scrollWidth>n.clientWidth)return n;n=n.assignedSlot||n.parentNode}else{if(11!=n.nodeType)break;n=n.host}return null}(e.contentDOM),this.atoms=e.state.facet(iH).map(t=>t(e));let i=e.contentDOM.ownerDocument;i.addEventListener("mousemove",this.move=this.move.bind(this)),i.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=t.shiftKey,this.multiple=e.state.facet(ak.allowMultipleSelections)&&function(e,t){let n=e.state.facet(Lq);return n.length?n[0](t):pq.mac?t.metaKey:t.ctrlKey}(e,t),this.dragging=!(!function(e,t){let{main:n}=e.state.selection;if(n.empty)return!1;let r=PQ(e.root);if(!r||0==r.rangeCount)return!0;let i=r.getRangeAt(0).getClientRects();for(let e=0;e=t.clientX&&n.top<=t.clientY&&n.bottom>=t.clientY)return!0}return!1}(e,t)||1!=dG(t))&&null}start(e){!1===this.dragging&&this.select(e)}move(e){var t,n,r;if(0==e.buttons)return this.destroy();if(this.dragging||null==this.dragging&&(n=this.startEvent,r=e,Math.max(Math.abs(n.clientX-r.clientX),Math.abs(n.clientY-r.clientY))<10))return;this.select(this.lastEvent=e);let i=0,o=0,s=(null===(t=this.scrollParent)||void 0===t?void 0:t.getBoundingClientRect())||{left:0,top:0,right:this.view.win.innerWidth,bottom:this.view.win.innerHeight},a=lH(this.view);e.clientX-a.left<=s.left+6?i=-YH(s.left-e.clientX):e.clientX+a.right>=s.right-6&&(i=YH(e.clientX-s.right)),e.clientY-a.top<=s.top+6?o=-YH(s.top-e.clientY):e.clientY+a.bottom>=s.bottom-6&&(o=YH(e.clientY-s.bottom)),this.setScrollSpeed(i,o)}up(e){null==this.dragging&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,t){this.scrollSpeed={x:e,y:t},e||t?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){this.scrollParent?(this.scrollParent.scrollLeft+=this.scrollSpeed.x,this.scrollParent.scrollTop+=this.scrollSpeed.y):this.view.win.scrollBy(this.scrollSpeed.x,this.scrollSpeed.y),!1===this.dragging&&this.select(this.lastEvent)}skipAtoms(e){let t=null;for(let n=0;nthis.select(this.lastEvent),20)}}const JH=Object.create(null),KH=Object.create(null),eG=pq.ie&&pq.ie_version<15||pq.ios&&pq.webkit_version<604;function tG(e,t){let n,{state:r}=e,i=1,o=r.toText(t),s=o.lines==r.selection.ranges.length;if(null!=pG&&r.selection.ranges.every(e=>e.empty)&&pG==o.toString()){let e=-1;n=r.changeByRange(n=>{let a=r.doc.lineAt(n.from);if(a.from==e)return{range:n};e=a.from;let l=r.toText((s?o.line(i++).text:t)+r.lineBreak);return{changes:{from:a.from,insert:l},range:gw.cursor(n.from+l.length)}})}else n=s?r.changeByRange(e=>{let t=o.line(i++);return{changes:{from:e.from,to:e.to,insert:t.text},range:gw.cursor(e.from+t.length)}}):r.replaceSelection(o);e.dispatch(n,{userEvent:"input.paste",scrollIntoView:!0})}function nG(e,t,n,r){if(1==r)return gw.cursor(t,n);if(2==r)return function(e,t,n=1){let r=e.charCategorizer(t),i=e.doc.lineAt(t),o=t-i.from;if(0==i.length)return gw.cursor(t);0==o?n=1:o==i.length&&(n=-1);let s=o,a=o;n<0?s=Zx(i.text,o,!1):a=Zx(i.text,o);let l=r(i.text.slice(s,a));for(;s>0;){let e=Zx(i.text,s,!1);if(r(i.text.slice(e,s))!=l)break;s=e}for(;a{e.inputState.lastScrollTop=e.scrollDOM.scrollTop,e.inputState.lastScrollLeft=e.scrollDOM.scrollLeft},JH.keydown=(e,t)=>(e.inputState.setSelectionOrigin("select"),27==t.keyCode&&(e.inputState.lastEscPress=Date.now()),!1),KH.touchstart=(e,t)=>{e.inputState.lastTouchTime=Date.now(),e.inputState.setSelectionOrigin("select.pointer")},KH.touchmove=e=>{e.inputState.setSelectionOrigin("select.pointer")},JH.mousedown=(e,t)=>{if(e.observer.flush(),e.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let r of e.state.facet(Fq))if(n=r(e,t),n)break;if(n||0!=t.button||(n=function(e,t){let n=sG(e,t),r=dG(t),i=e.state.selection;return{update(e){e.docChanged&&(n.pos=e.changes.mapPos(n.pos),i=i.map(e.changes))},get(t,o,s){let a,l=sG(e,t),c=nG(e,l.pos,l.bias,r);if(n.pos!=l.pos&&!o){let t=nG(e,n.pos,n.bias,r),i=Math.min(t.from,c.from),o=Math.max(t.to,c.to);c=i1&&(a=function(e,t){for(let n=0;n=t)return gw.create(e.ranges.slice(0,n).concat(e.ranges.slice(n+1)),e.mainIndex==n?0:e.mainIndex-(e.mainIndex>n?1:0))}return null}(i,l.pos))?a:s?i.addRange(c):gw.create([c])}}}(e,t)),n){let r=!e.hasFocus;e.inputState.startMouseSelection(new ZH(e,t,n,r)),r&&e.observer.ignore(()=>qQ(e.contentDOM));let i=e.inputState.mouseSelection;if(i)return i.start(t),!1===i.dragging}return!1};let rG=(e,t)=>e>=t.top&&e<=t.bottom,iG=(e,t,n)=>rG(t,n)&&e>=n.left&&e<=n.right;function oG(e,t,n,r){let i=Oq.find(e.docView,t);if(!i)return 1;let o=t-i.posAtStart;if(0==o)return 1;if(o==i.length)return-1;let s=i.coordsAt(o,-1);if(s&&iG(n,r,s))return-1;let a=i.coordsAt(o,1);return a&&iG(n,r,a)?1:s&&rG(r,s)?-1:1}function sG(e,t){let n=e.posAtCoords({x:t.clientX,y:t.clientY},!1);return{pos:n,bias:oG(e,n,t.clientX,t.clientY)}}const aG=pq.ie&&pq.ie_version<=11;let lG=null,cG=0,uG=0;function dG(e){if(!aG)return e.detail;let t=lG,n=uG;return lG=e,uG=Date.now(),cG=!t||n>Date.now()-400&&Math.abs(t.clientX-e.clientX)<2&&Math.abs(t.clientY-e.clientY)<2?(cG+1)%3:1}function hG(e,t,n,r){if(!n)return;let i=e.posAtCoords({x:t.clientX,y:t.clientY},!1),{draggedContent:o}=e.inputState,s=r&&o&&function(e,t){let n=e.state.facet(Bq);return n.length?n[0](t):pq.mac?!t.altKey:!t.ctrlKey}(e,t)?{from:o.from,to:o.to}:null,a={from:i,insert:n},l=e.state.changes(s?[s,a]:a);e.focus(),e.dispatch({changes:l,selection:{anchor:l.mapPos(i,-1),head:l.mapPos(i,1)},userEvent:s?"move.drop":"input.drop"}),e.inputState.draggedContent=null}JH.dragstart=(e,t)=>{let{selection:{main:n}}=e.state;if(t.target.draggable){let r=e.docView.nearest(t.target);if(r&&r.isWidget){let e=r.posAtStart,t=e+r.length;(e>=n.to||t<=n.from)&&(n=gw.range(e,t))}}let{inputState:r}=e;return r.mouseSelection&&(r.mouseSelection.dragging=!0),r.draggedContent=n,t.dataTransfer&&(t.dataTransfer.setData("Text",e.state.sliceDoc(n.from,n.to)),t.dataTransfer.effectAllowed="copyMove"),!1},JH.dragend=e=>(e.inputState.draggedContent=null,!1),JH.drop=(e,t)=>{if(!t.dataTransfer)return!1;if(e.state.readOnly)return!0;let n=t.dataTransfer.files;if(n&&n.length){let r=Array(n.length),i=0,o=()=>{++i==n.length&&hG(e,t,r.filter(e=>null!=e).join(e.state.lineBreak),!1)};for(let e=0;e{/[\x00-\x08\x0e-\x1f]{2}/.test(t.result)||(r[e]=t.result),o()},t.readAsText(n[e])}return!0}{let n=t.dataTransfer.getData("Text");if(n)return hG(e,t,n,!0),!0}return!1},JH.paste=(e,t)=>{if(e.state.readOnly)return!0;e.observer.flush();let n=eG?null:t.clipboardData;return n?(tG(e,n.getData("text/plain")||n.getData("text/uri-text")),!0):(function(e){let t=e.dom.parentNode;if(!t)return;let n=t.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{e.focus(),n.remove(),tG(e,n.value)},50)}(e),!1)};let pG=null;JH.copy=JH.cut=(e,t)=>{let{text:n,ranges:r,linewise:i}=function(e){let t=[],n=[],r=!1;for(let r of e.selection.ranges)r.empty||(t.push(e.sliceDoc(r.from,r.to)),n.push(r));if(!t.length){let i=-1;for(let{from:r}of e.selection.ranges){let o=e.doc.lineAt(r);o.number>i&&(t.push(o.text),n.push({from:o.from,to:Math.min(e.doc.length,o.to+1)})),i=o.number}r=!0}return{text:t.join(e.lineBreak),ranges:n,linewise:r}}(e.state);if(!n&&!i)return!1;pG=i?n:null,"cut"!=t.type||e.state.readOnly||e.dispatch({changes:r,scrollIntoView:!0,userEvent:"delete.cut"});let o=eG?null:t.clipboardData;return o?(o.clearData(),o.setData("text/plain",n),!0):(function(e,t){let n=e.dom.parentNode;if(!n)return;let r=n.appendChild(document.createElement("textarea"));r.style.cssText="position: fixed; left: -10000px; top: 10px",r.value=t,r.focus(),r.selectionEnd=t.length,r.selectionStart=0,setTimeout(()=>{r.remove(),e.focus()},50)}(e,n),!1)};const fG=Gw.define();function mG(e,t){let n=[];for(let r of e.facet(qq)){let i=r(e,t);i&&n.push(i)}return n?e.update({effects:n,annotations:fG.of(!0)}):null}function gG(e){setTimeout(()=>{let t=e.hasFocus;if(t!=e.inputState.notifiedFocused){let n=mG(e.state,t);n?e.dispatch(n):e.update([])}},10)}KH.focus=e=>{e.inputState.lastFocusTime=Date.now(),e.scrollDOM.scrollTop||!e.inputState.lastScrollTop&&!e.inputState.lastScrollLeft||(e.scrollDOM.scrollTop=e.inputState.lastScrollTop,e.scrollDOM.scrollLeft=e.inputState.lastScrollLeft),gG(e)},KH.blur=e=>{e.observer.clearSelectionRange(),gG(e)},KH.compositionstart=KH.compositionupdate=e=>{null==e.inputState.compositionFirstChange&&(e.inputState.compositionFirstChange=!0),e.inputState.composing<0&&(e.inputState.composing=0)},KH.compositionend=e=>{e.inputState.composing=-1,e.inputState.compositionEndedAt=Date.now(),e.inputState.compositionPendingKey=!0,e.inputState.compositionPendingChange=e.observer.pendingRecords().length>0,e.inputState.compositionFirstChange=null,pq.chrome&&pq.android?e.observer.flushSoon():e.inputState.compositionPendingChange?Promise.resolve().then(()=>e.observer.flush()):setTimeout(()=>{e.inputState.composing<0&&e.docView.hasComposition&&e.update([])},50)},KH.contextmenu=e=>{e.inputState.lastContextMenu=Date.now()},JH.beforeinput=(e,t)=>{var n;let r;if(pq.chrome&&pq.android&&(r=VH.find(e=>e.inputType==t.inputType))&&(e.observer.delayAndroidKey(r.key,r.keyCode),"Backspace"==r.key||"Delete"==r.key)){let t=(null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0;setTimeout(()=>{var n;((null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0)>t+10&&e.hasFocus&&(e.contentDOM.blur(),e.focus())},100)}return!1};const bG=new Set;const vG=["pre-wrap","normal","pre-line","break-spaces"];class yG{constructor(e){this.lineWrapping=e,this.doc=Bx.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30,this.heightChanged=!1}heightForGap(e,t){let n=this.doc.lineAt(t).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(n+=Math.max(0,Math.ceil((t-e-n*this.lineLength*.5)/this.lineLength))),this.lineHeight*n}heightForLine(e){if(!this.lineWrapping)return this.lineHeight;return(1+Math.max(0,Math.ceil((e-this.lineLength)/(this.lineLength-5))))*this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return vG.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let t=!1;for(let n=0;n-1,a=Math.round(t)!=Math.round(this.lineHeight)||this.lineWrapping!=s;if(this.lineWrapping=s,this.lineHeight=t,this.charWidth=n,this.textHeight=r,this.lineLength=i,a){this.heightSamples={};for(let e=0;e0}set outdated(e){this.flags=(e?2:0)|-3&this.flags}setHeight(e,t){this.height!=t&&(Math.abs(this.height-t)>.001&&(e.heightChanged=!0),this.height=t)}replace(e,t,n){return wG.of(n)}decomposeLeft(e,t){t.push(this)}decomposeRight(e,t){t.push(this)}applyChanges(e,t,n,r){let i=this,o=n.doc;for(let s=r.length-1;s>=0;s--){let{fromA:a,toA:l,fromB:c,toB:u}=r[s],d=i.lineAt(a,xG.ByPosNoHeight,n.setDoc(t),0,0),h=d.to>=l?d:i.lineAt(l,xG.ByPosNoHeight,n,0,0);for(u+=h.to-l,l=h.to;s>0&&d.from<=r[s-1].toA;)a=r[s-1].fromA,c=r[s-1].fromB,s--,a2*i){let i=e[t-1];i.break?e.splice(--t,1,i.left,null,i.right):e.splice(--t,1,i.left,i.right),n+=1+i.break,r-=i.size}else{if(!(i>2*r))break;{let t=e[n];t.break?e.splice(n,1,t.left,null,t.right):e.splice(n,1,t.left,t.right),n+=2+t.break,i-=t.size}}else if(r=i&&o(this.blockAt(0,n,r,i))}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more&&this.setHeight(e,r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class OG extends kG{constructor(e,t){super(e,t,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,t,n,r){return new SG(r,this.length,n,this.height,this.breaks)}replace(e,t,n){let r=n[0];return 1==n.length&&(r instanceof OG||r instanceof EG&&4&r.flags)&&Math.abs(this.length-r.length)<10?(r instanceof EG?r=new OG(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):wG.of(n)}updateHeight(e,t=0,n=!1,r){return r&&r.from<=t&&r.more?this.setHeight(e,r.heights[r.index++]):(n||this.outdated)&&this.setHeight(e,Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class EG extends wG{constructor(e){super(e,0)}heightMetrics(e,t){let n,r=e.doc.lineAt(t).number,i=e.doc.lineAt(t+this.length).number,o=i-r+1,s=0;if(e.lineWrapping){let t=Math.min(this.height,e.lineHeight*o);n=t/o,this.length>o+1&&(s=(this.height-t)/(this.length-o-1))}else n=this.height/o;return{firstLine:r,lastLine:i,perLine:n,perChar:s}}blockAt(e,t,n,r){let{firstLine:i,lastLine:o,perLine:s,perChar:a}=this.heightMetrics(t,r);if(t.lineWrapping){let i=r+Math.round(Math.max(0,Math.min(1,(e-n)/this.height))*this.length),o=t.doc.lineAt(i),l=s+o.length*a,c=Math.max(n,e-l/2);return new SG(o.from,o.length,c,l,0)}{let r=Math.max(0,Math.min(o-i,Math.floor((e-n)/s))),{from:a,length:l}=t.doc.line(i+r);return new SG(a,l,n+s*r,s,0)}}lineAt(e,t,n,r,i){if(t==xG.ByHeight)return this.blockAt(e,n,r,i);if(t==xG.ByPosNoHeight){let{from:t,to:r}=n.doc.lineAt(e);return new SG(t,r-t,0,0,0)}let{firstLine:o,perLine:s,perChar:a}=this.heightMetrics(n,i),l=n.doc.lineAt(e),c=s+l.length*a,u=l.number-o,d=r+s*u+a*(l.from-i-u);return new SG(l.from,l.length,Math.max(r,Math.min(d,r+this.height-c)),c,0)}forEachLine(e,t,n,r,i,o){e=Math.max(e,i),t=Math.min(t,i+this.length);let{firstLine:s,perLine:a,perChar:l}=this.heightMetrics(n,i);for(let c=e,u=r;c<=t;){let t=n.doc.lineAt(c);if(c==e){let n=t.number-s;u+=a*n+l*(e-i-n)}let r=a+l*t.length;o(new SG(t.from,t.length,u,r,0)),u+=r,c=t.to+1}}replace(e,t,n){let r=this.length-t;if(r>0){let e=n[n.length-1];e instanceof EG?n[n.length-1]=new EG(e.length+r):n.push(null,new EG(r-1))}if(e>0){let t=n[0];t instanceof EG?n[0]=new EG(e+t.length):n.unshift(new EG(e-1),null)}return wG.of(n)}decomposeLeft(e,t){t.push(new EG(e-1),null)}decomposeRight(e,t){t.push(null,new EG(this.length-e-1))}updateHeight(e,t=0,n=!1,r){let i=t+this.length;if(r&&r.from<=t+this.length&&r.more){let n=[],o=Math.max(t,r.from),s=-1;for(r.from>t&&n.push(new EG(r.from-t-1).updateHeight(e,t));o<=i&&r.more;){let t=e.doc.lineAt(o).length;n.length&&n.push(null);let i=r.heights[r.index++];-1==s?s=i:Math.abs(i-s)>=.001&&(s=-2);let a=new OG(t,i);a.outdated=!1,n.push(a),o+=t+1}o<=i&&n.push(null,new EG(i-o).updateHeight(e,o));let a=wG.of(n);return(s<0||Math.abs(a.height-this.height)>=.001||Math.abs(s-this.heightMetrics(e,t).perLine)>=.001)&&(e.heightChanged=!0),a}return(n||this.outdated)&&(this.setHeight(e,e.heightForGap(t,t+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class AG extends wG{constructor(e,t,n){super(e.length+t+n.length,e.height+n.height,t|(e.outdated||n.outdated?2:0)),this.left=e,this.right=n,this.size=e.size+n.size}get break(){return 1&this.flags}blockAt(e,t,n,r){let i=n+this.left.height;return es))return l;let c=t==xG.ByPosNoHeight?xG.ByPosNoHeight:xG.ByPos;return a?l.join(this.right.lineAt(s,c,n,o,s)):this.left.lineAt(s,c,n,r,i).join(l)}forEachLine(e,t,n,r,i,o){let s=r+this.left.height,a=i+this.left.length+this.break;if(this.break)e=a&&this.right.forEachLine(e,t,n,s,a,o);else{let l=this.lineAt(a,xG.ByPos,n,r,i);e=e&&l.from<=t&&o(l),t>l.to&&this.right.forEachLine(l.to+1,t,n,s,a,o)}}replace(e,t,n){let r=this.left.length+this.break;if(tthis.left.length)return this.balanced(this.left,this.right.replace(e-r,t-r,n));let i=[];e>0&&this.decomposeLeft(e,i);let o=i.length;for(let e of n)i.push(e);if(e>0&&TG(i,o-1),t=n&&t.push(null)),e>n&&this.right.decomposeLeft(e-n,t)}decomposeRight(e,t){let n=this.left.length,r=n+this.break;if(e>=r)return this.right.decomposeRight(e-r,t);e2*t.size||t.size>2*e.size?wG.of(this.break?[e,null,t]:[e,t]):(this.left=e,this.right=t,this.height=e.height+t.height,this.outdated=e.outdated||t.outdated,this.size=e.size+t.size,this.length=e.length+this.break+t.length,this)}updateHeight(e,t=0,n=!1,r){let{left:i,right:o}=this,s=t+i.length+this.break,a=null;return r&&r.from<=t+i.length&&r.more?a=i=i.updateHeight(e,t,n,r):i.updateHeight(e,t,n),r&&r.from<=s+o.length&&r.more?a=o=o.updateHeight(e,s,n,r):o.updateHeight(e,s,n),a?this.balanced(i,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function TG(e,t){let n,r;null==e[t]&&(n=e[t-1])instanceof EG&&(r=e[t+1])instanceof EG&&e.splice(t-1,3,new EG(n.length+1+r.length))}class CG{constructor(e,t){this.pos=e,this.oracle=t,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,t){if(this.lineStart>-1){let e=Math.min(t,this.lineEnd),n=this.nodes[this.nodes.length-1];n instanceof OG?n.length+=e-this.pos:(e>this.pos||!this.isCovered)&&this.nodes.push(new OG(e-this.pos,-1)),this.writtenTo=e,t>e&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=t}point(e,t,n){if(e=5)&&this.addLineDeco(r,i,o)}else t>e&&this.span(e,t);this.lineEnd>-1&&this.lineEnd-1)return;let{from:e,to:t}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=t,this.writtenToe&&this.nodes.push(new OG(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,t){let n=new EG(t-e);return this.oracle.doc.lineAt(e).to==t&&(n.flags|=4),n}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof OG)return e;let t=new OG(0,-1);return this.nodes.push(t),t}addBlock(e){this.enterLine();let t=e.deco;t&&t.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,t&&t.endSide>0&&(this.covering=e)}addLineDeco(e,t,n){let r=this.ensureLine();r.length+=n,r.collapsed+=n,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=t,this.writtenTo=this.pos=this.pos+n}finish(e){let t=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||t instanceof OG||this.isCovered?(this.writtenTon.clientHeight||n.scrollWidth>n.clientWidth)&&"visible"!=r.overflow){let r=n.getBoundingClientRect();o=Math.max(o,r.left),s=Math.min(s,r.right),a=Math.max(a,r.top),l=t==e.parentNode?r.bottom:Math.min(l,r.bottom)}t="absolute"==r.position||"fixed"==r.position?n.offsetParent:n.parentNode}else{if(11!=t.nodeType)break;t=t.host}return{left:o-n.left,right:Math.max(o,s)-n.left,top:a-(n.top+t),bottom:Math.max(a,l)-(n.top+t)}}function $G(e,t){let n=e.getBoundingClientRect();return{left:0,right:n.right-n.left,top:t,bottom:n.bottom-(n.top+t)}}class RG{constructor(e,t,n){this.from=e,this.to=t,this.size=n}static same(e,t){if(e.length!=t.length)return!1;for(let n=0;n"function"!=typeof e&&"cm-lineWrapping"==e.class);this.heightOracle=new yG(t),this.stateDeco=e.facet(rH).filter(e=>"function"!=typeof e),this.heightMap=wG.empty().applyChanges(this.stateDeco,Bx.empty,this.heightOracle.setDoc(e.doc),[new uH(0,0,0,e.doc.length)]),this.viewport=this.getViewport(0,null),this.updateViewportLines(),this.updateForViewport(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=Cq.set(this.lineGaps.map(e=>e.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:t}=this.state.selection;for(let n=0;n<=1;n++){let r=n?t.head:t.anchor;if(!e.some(({from:e,to:t})=>r>=e&&r<=t)){let{from:t,to:n}=this.lineBlockAt(r);e.push(new NG(t,n))}}this.viewports=e.sort((e,t)=>e.from-t.from),this.scaler=this.heightMap.height<=7e6?FG:new zG(this.heightOracle,this.heightMap,this.viewports)}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(1==this.scaler.scale?e:UG(e,this.scaler))})}update(e,t=null){this.state=e.state;let n=this.stateDeco;this.stateDeco=this.state.facet(rH).filter(e=>"function"!=typeof e);let r=e.changedRanges,i=uH.extendWithRanges(r,function(e,t,n){let r=new MG;return pk.compare(e,t,n,r,0),r.changes}(n,this.stateDeco,e?e.changes:lw.empty(this.state.doc.length))),o=this.heightMap.height,s=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),i),this.heightMap.height!=o&&(e.flags|=2),s?(this.scrollAnchorPos=e.changes.mapPos(s.from,-1),this.scrollAnchorHeight=s.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let a=i.length?this.mapViewport(this.viewport,e.changes):this.viewport;(t&&(t.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,t));let l=!e.changes.empty||2&e.flags||a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,this.updateForViewport(),l&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(),t&&(this.scrollTarget=t),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(Gq)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let t=e.contentDOM,n=window.getComputedStyle(t),r=this.heightOracle,i=n.whiteSpace;this.defaultTextDirection="rtl"==n.direction?hH.RTL:hH.LTR;let o=this.heightOracle.mustRefreshForWrapping(i),s=t.getBoundingClientRect(),a=o||this.mustMeasureContent||this.contentDOMHeight!=s.height;this.contentDOMHeight=s.height,this.mustMeasureContent=!1;let l=0,c=0;if(s.width&&s.height){let e=s.width/t.offsetWidth,n=s.height/t.offsetHeight;(e>.995&&e<1.005||!isFinite(e)||Math.abs(s.width-t.offsetWidth)<1)&&(e=1),(n>.995&&n<1.005||!isFinite(n)||Math.abs(s.height-t.offsetHeight)<1)&&(n=1),this.scaleX==e&&this.scaleY==n||(this.scaleX=e,this.scaleY=n,l|=8,o=a=!0)}let u=(parseInt(n.paddingTop)||0)*this.scaleY,d=(parseInt(n.paddingBottom)||0)*this.scaleY;this.paddingTop==u&&this.paddingBottom==d||(this.paddingTop=u,this.paddingBottom=d,l|=10),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(a=!0),this.editorWidth=e.scrollDOM.clientWidth,l|=8);let h=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=h&&(this.scrollAnchorHeight=-1,this.scrollTop=h),this.scrolledToBottom=WQ(e.scrollDOM);let p=(this.printing?$G:PG)(t,this.paddingTop),f=p.top-this.pixelViewport.top,m=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;let g=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(g!=this.inView&&(this.inView=g,g&&(a=!0)),!this.inView&&!this.scrollTarget)return 0;let b=s.width;if(this.contentDOMWidth==b&&this.editorHeight==e.scrollDOM.clientHeight||(this.contentDOMWidth=s.width,this.editorHeight=e.scrollDOM.clientHeight,l|=8),a){let t=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(t)&&(o=!0),o||r.lineWrapping&&Math.abs(b-this.contentDOMWidth)>r.charWidth){let{lineHeight:n,charWidth:s,textHeight:a}=e.docView.measureTextSize();o=n>0&&r.refresh(i,n,s,a,b/s,t),o&&(e.docView.minWidth=0,l|=8)}f>0&&m>0?c=Math.max(f,m):f<0&&m<0&&(c=Math.min(f,m)),r.heightChanged=!1;for(let n of this.viewports){let i=n.from==this.viewport.from?t:e.docView.measureVisibleLineHeights(n);this.heightMap=(o?wG.empty().applyChanges(this.stateDeco,Bx.empty,this.heightOracle,[new uH(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,o,new _G(n.from,i))}r.heightChanged&&(l|=2)}let v=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return v&&(this.viewport=this.getViewport(c,this.scrollTarget)),this.updateForViewport(),(2&l||v)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),l|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),l}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,t){let n=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,i=this.heightOracle,{visibleTop:o,visibleBottom:s}=this,a=new NG(r.lineAt(o-1e3*n,xG.ByHeight,i,0,0).from,r.lineAt(s+1e3*(1-n),xG.ByHeight,i,0,0).to);if(t){let{head:e}=t.range;if(ea.to){let n,o=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),s=r.lineAt(e,xG.ByPos,i,0,0);n="center"==t.y?(s.top+s.bottom)/2-o/2:"start"==t.y||"nearest"==t.y&&e=s+Math.max(10,Math.min(n,250)))&&r>o-2e3&&i>1,o=r<<1;if(this.defaultTextDirection!=hH.LTR&&!n)return[];let s=[],a=(r,o,l,c)=>{if(o-rr&&ee.from>=l.from&&e.to<=l.to&&Math.abs(e.from-r)e.fromt));if(!h){if(oe.from<=o&&e.to>=o)){let e=t.moveToLineBoundary(gw.cursor(o),!1,!0).head;e>r&&(o=e)}h=new RG(r,o,this.gapSize(l,r,o,c))}s.push(h)};for(let e of this.viewportLines){if(e.lengthe.from&&a(e.from,i,e,t),se.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(){let e=this.stateDeco;this.lineGaps.length&&(e=e.concat(this.lineGapDeco));let t=[];pk.spans(e,this.viewport.from,this.viewport.to,{span(e,n){t.push({from:e,to:n})},point(){}},20);let n=t.length!=this.visibleRanges.length||this.visibleRanges.some((e,n)=>e.from!=t[n].from||e.to!=t[n].to);return this.visibleRanges=t,n?4:0}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(t=>t.from<=e&&t.to>=e)||UG(this.heightMap.lineAt(e,xG.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return UG(this.heightMap.lineAt(this.scaler.fromDOM(e),xG.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let t=this.lineBlockAtHeight(e+8);return t.from>=this.viewport.from||this.viewportLines[0].top-e>200?t:this.viewportLines[0]}elementAtHeight(e){return UG(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class NG{constructor(e,t){this.from=e,this.to=t}}function jG(e,t,n){let r=[],i=e,o=0;return pk.spans(n,e,t,{span(){},point(e,t){e>i&&(r.push({from:i,to:e}),o+=e-i),i=t}},20),i=1)return t[t.length-1].to;let r=Math.floor(e*n);for(let e=0;;e++){let{from:n,to:i}=t[e],o=i-n;if(r<=o)return n+r;r-=o}}function BG(e,t){let n=0;for(let{from:r,to:i}of e.ranges){if(t<=i){n+=t-r;break}n+=i-r}return n/e.total}const FG={toDOM:e=>e,fromDOM:e=>e,scale:1};class zG{constructor(e,t,n){let r=0,i=0,o=0;this.viewports=n.map(({from:n,to:i})=>{let o=t.lineAt(n,xG.ByPos,e,0,0).top,s=t.lineAt(i,xG.ByPos,e,0,0).bottom;return r+=s-o,{from:n,to:i,top:o,bottom:s,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(t.height-r);for(let e of this.viewports)e.domTop=o+(e.top-i)*this.scale,o=e.domBottom=e.domTop+(e.bottom-e.top),i=e.bottom}toDOM(e){for(let t=0,n=0,r=0;;t++){let i=tUG(e,t)):e._content)}const QG=yw.define({combine:e=>e.join(" ")}),qG=yw.define({combine:e=>e.indexOf(!0)>-1}),HG=TQ.newName(),GG=TQ.newName(),VG=TQ.newName(),WG={"&light":"."+GG,"&dark":"."+VG};function XG(e,t,n){return new TQ(t,{finish:t=>/&/.test(t)?t.replace(/&\w*/,t=>{if("&"==t)return e;if(!n||!n[t])throw new RangeError("Unsupported selector: "+t);return n[t]}):e+" "+t})}const YG=XG("."+HG,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#444"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace:before":{content:"attr(data-display)",position:"absolute",pointerEvents:"none",color:"#888"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},WG);class ZG{constructor(e,t){this.points=e,this.text="",this.lineSeparator=t.facet(ak.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+="￿"}readRange(e,t){if(!e)return this;let n=e.parentNode;for(let r=e;;){this.findPointBefore(n,r);let e=this.text.length;this.readNode(r);let i=r.nextSibling;if(i==t)break;let o=ZQ.get(r),s=ZQ.get(i);(o&&s?o.breakAfter:(o?o.breakAfter:KG(r))||KG(i)&&("BR"!=r.nodeName||r.cmIgnore)&&this.text.length>e)&&this.lineBreak(),r=i}return this.findPointBefore(n,t),this}readTextNode(e){let t=e.nodeValue;for(let n of this.points)n.node==e&&(n.pos=this.text.length+Math.min(n.offset,t.length));for(let n=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let i,o=-1,s=1;if(this.lineSeparator?(o=t.indexOf(this.lineSeparator,n),s=this.lineSeparator.length):(i=r.exec(t))&&(o=i.index,s=i[0].length),this.append(t.slice(n,o<0?t.length:o)),o<0)break;if(this.lineBreak(),s>1)for(let t of this.points)t.node==e&&t.pos>this.text.length&&(t.pos-=s-1);n=o+s}}readNode(e){if(e.cmIgnore)return;let t=ZQ.get(e),n=t&&t.overrideDOMText;if(null!=n){this.findPointInside(e,n.length);for(let e=n.iter();!e.next().done;)e.lineBreak?this.lineBreak():this.append(e.value)}else 3==e.nodeType?this.readTextNode(e):"BR"==e.nodeName?e.nextSibling&&this.lineBreak():1==e.nodeType&&this.readRange(e.firstChild,null)}findPointBefore(e,t){for(let n of this.points)n.node==e&&e.childNodes[n.offset]==t&&(n.pos=this.text.length)}findPointInside(e,t){for(let n of this.points)(3==e.nodeType?n.node==e:e.contains(n.node))&&(n.pos=this.text.length+(JG(e,n.node,n.offset)?t:0))}}function JG(e,t,n){for(;;){if(!t||n-1)this.newSel=null;else if(t>-1&&(this.bounds=e.docView.domBoundsAround(t,n,0))){let t=i||o?[]:function(e){let t=[];if(e.root.activeElement!=e.contentDOM)return t;let{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:o}=e.observer.selectionRange;n&&(t.push(new eV(n,r)),i==n&&o==r||t.push(new eV(i,o)));return t}(e),n=new ZG(t,e.state);n.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=n.text,this.newSel=function(e,t){if(0==e.length)return null;let n=e[0].pos,r=2==e.length?e[1].pos:n;return n>-1&&r>-1?gw.single(n+t,r+t):null}(t,this.bounds.from)}else{let t=e.observer.selectionRange,n=i&&i.node==t.focusNode&&i.offset==t.focusOffset||!$Q(e.contentDOM,t.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(t.focusNode,t.focusOffset),r=o&&o.node==t.anchorNode&&o.offset==t.anchorOffset||!$Q(e.contentDOM,t.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(t.anchorNode,t.anchorOffset);this.newSel=gw.single(r,n)}}}function nV(e,t){let n,{newSel:r}=t,i=e.state.selection.main,o=e.inputState.lastKeyTime>Date.now()-100?e.inputState.lastKeyCode:-1;if(t.bounds){let{from:r,to:s}=t.bounds,a=i.from,l=null;(8===o||pq.android&&t.text.length0&&a>0&&e.charCodeAt(s-1)==t.charCodeAt(a-1);)s--,a--;if("end"==r){let e=Math.max(0,o-Math.min(s,a));n-=s+e-o}if(s=s?o-n:0,a=o+(a-s),s=o}else if(a=a?o-n:0,s=o+(s-a),a=o}return{from:o,toA:s,toB:a}}(e.state.doc.sliceString(r,s,"￿"),t.text,a-r,l);c&&(pq.chrome&&13==o&&c.toB==c.from+2&&"￿￿"==t.text.slice(c.from,c.toB)&&c.toB--,n={from:r+c.from,to:r+c.toA,insert:Bx.of(t.text.slice(c.from,c.toB).split("￿"))})}else r&&(!e.hasFocus&&e.state.facet(Yq)||r.main.eq(i))&&(r=null);if(!n&&!r)return!1;if(!n&&t.typeOver&&!i.empty&&r&&r.main.empty?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,i.to)}:n&&n.from>=i.from&&n.to<=i.to&&(n.from!=i.from||n.to!=i.to)&&i.to-i.from-(n.to-n.from)<=4?n={from:i.from,to:i.to,insert:e.state.doc.slice(i.from,n.from).append(n.insert).append(e.state.doc.slice(n.to,i.to))}:(pq.mac||pq.android)&&n&&n.from==n.to&&n.from==i.head-1&&/^\. ?$/.test(n.insert.toString())&&"off"==e.contentDOM.getAttribute("autocorrect")?(r&&2==n.insert.length&&(r=gw.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:Bx.of([" "])}):pq.chrome&&n&&n.from==n.to&&n.from==i.head&&"\n "==n.insert.toString()&&e.lineWrapping&&(r&&(r=gw.single(r.main.anchor-1,r.main.head-1)),n={from:i.from,to:i.to,insert:Bx.of([" "])}),n){if(pq.ios&&e.inputState.flushIOSKey())return!0;if(pq.android&&(n.from==i.from&&n.to==i.to&&1==n.insert.length&&2==n.insert.lines&&GQ(e.contentDOM,"Enter",13)||(n.from==i.from-1&&n.to==i.to&&0==n.insert.length||8==o&&n.insert.lengthi.head)&&GQ(e.contentDOM,"Backspace",8)||n.from==i.from&&n.to==i.to+1&&0==n.insert.length&&GQ(e.contentDOM,"Delete",46)))return!0;let t,s=n.insert.toString();e.inputState.composing>=0&&e.inputState.composing++;let a=()=>t||(t=function(e,t,n){let r,i=e.state,o=i.selection.main;if(t.from>=o.from&&t.to<=o.to&&t.to-t.from>=(o.to-o.from)/3&&(!n||n.main.empty&&n.main.from==t.from+t.insert.length)&&e.inputState.composing<0){let n=o.fromt.to?i.sliceDoc(t.to,o.to):"";r=i.replaceSelection(e.state.toText(n+t.insert.sliceString(0,void 0,e.state.lineBreak)+s))}else{let s=i.changes(t),a=n&&n.main.to<=s.newLength?n.main:void 0;if(i.selection.ranges.length>1&&e.inputState.composing>=0&&t.to<=o.to&&t.to>=o.to-10){let l,c=e.state.sliceDoc(t.from,t.to),u=n&&PH(e,n.main.head);if(u){let e=t.insert.length-(t.to-t.from);l={from:u.from,to:u.to-e}}else l=e.state.doc.lineAt(o.head);let d=o.to-t.to,h=o.to-o.from;r=i.changeByRange(n=>{if(n.from==o.from&&n.to==o.to)return{changes:s,range:a||n.map(s)};let r=n.to-d,u=r-c.length;if(n.to-n.from!=h||e.state.sliceDoc(u,r)!=c||n.to>=l.from&&n.from<=l.to)return{range:n};let p=i.changes({from:u,to:r,insert:t.insert}),f=n.to-o.to;return{changes:p,range:a?gw.range(Math.max(0,a.anchor+f),Math.max(0,a.head+f)):n.map(p)}})}else r={changes:s,selection:a&&i.selection.replaceRange(a)}}let s="input.type";(e.composing||e.inputState.compositionPendingChange&&e.inputState.compositionEndedAt>Date.now()-50)&&(e.inputState.compositionPendingChange=!1,s+=".compose",e.inputState.compositionFirstChange&&(s+=".start",e.inputState.compositionFirstChange=!1));return i.update(r,{userEvent:s,scrollIntoView:!0})}(e,n,r));return e.state.facet(Qq).some(t=>t(e,n.from,n.to,s,a))||e.dispatch(a()),!0}if(r&&!r.main.eq(i)){let t=!1,n="select";return e.inputState.lastSelectionTime>Date.now()-50&&("select"==e.inputState.lastSelectionOrigin&&(t=!0),n=e.inputState.lastSelectionOrigin),e.dispatch({selection:r,scrollIntoView:t,userEvent:n}),!0}return!1}const rV={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},iV=pq.ie&&pq.ie_version<=11;class oV{constructor(e){this.view=e,this.active=!1,this.selectionRange=new zQ,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(t=>{for(let e of t)this.queue.push(e);(pq.ie&&pq.ie_version<=11||pq.ios&&e.composing)&&t.some(e=>"childList"==e.type&&e.removedNodes.length||"characterData"==e.type&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():this.flush()}),iV&&(this.onCharData=e=>{this.queue.push({target:e.target,type:"characterData",oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver(()=>{var e;(null===(e=this.view.docView)||void 0===e?void 0:e.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),e.length>0&&e[e.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(e=>{e.length>0&&e[e.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(){this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500)}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((t,n)=>t!=e[n]))){this.gapIntersection.disconnect();for(let t of e)this.gapIntersection.observe(t);this.gaps=e}}onSelectionChange(e){let t=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:n}=this,r=this.selectionRange;if(n.state.facet(Yq)?n.root.activeElement!=this.dom:!RQ(n.dom,r))return;let i=r.anchorNode&&n.docView.nearest(r.anchorNode);i&&i.ignoreEvent(e)?t||(this.selectionChanged=!1):(pq.ie&&pq.ie_version<=11||pq.android&&pq.chrome)&&!n.state.selection.main.empty&&r.focusNode&&DQ(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,t=pq.safari&&11==e.root.nodeType&&function(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}(this.dom.ownerDocument)==this.dom&&function(e){let t=null;function n(e){e.preventDefault(),e.stopImmediatePropagation(),t=e.getTargetRanges()[0]}if(e.contentDOM.addEventListener("beforeinput",n,!0),e.dom.ownerDocument.execCommand("indent"),e.contentDOM.removeEventListener("beforeinput",n,!0),!t)return null;let r=t.startContainer,i=t.startOffset,o=t.endContainer,s=t.endOffset,a=e.docView.domAtPos(e.state.selection.main.anchor);DQ(a.node,a.offset,o,s)&&([r,i,o,s]=[o,s,r,i]);return{anchorNode:r,anchorOffset:i,focusNode:o,focusOffset:s}}(this.view)||PQ(e.root);if(!t||this.selectionRange.eq(t))return!1;let n=RQ(this.dom,t);return n&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime{let e=this.delayedAndroidKey;if(e){this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=e.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&e.force&&GQ(this.dom,e.key,e.keyCode)}};this.flushingAndroidKey=this.view.win.requestAnimationFrame(e)}this.delayedAndroidKey&&"Enter"!=e||(this.delayedAndroidKey={key:e,keyCode:t,force:this.lastChange{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let t=-1,n=-1,r=!1;for(let i of e){let e=this.readMutation(i);e&&(e.typeOver&&(r=!0),-1==t?({from:t,to:n}=e):(t=Math.min(e.from,t),n=Math.max(e.to,n)))}return{from:t,to:n,typeOver:r}}readChange(){let{from:e,to:t,typeOver:n}=this.processRecords(),r=this.selectionChanged&&RQ(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let i=new tV(this.view,e,t,n);return this.view.docView.domChanged={newSel:i.newSel?i.newSel.main:null},i}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let t=this.readChange();if(!t)return this.view.requestMeasure(),!1;let n=this.view.state,r=nV(this.view,t);return this.view.state==n&&this.view.update([]),r}readMutation(e){let t=this.view.docView.nearest(e.target);if(!t||t.ignoreMutation(e))return null;if(t.markDirty("attributes"==e.type),"attributes"==e.type&&(t.flags|=4),"childList"==e.type){let n=sV(t,e.previousSibling||e.target.previousSibling,-1),r=sV(t,e.nextSibling||e.target.nextSibling,1);return{from:n?t.posAfter(n):t.posAtStart,to:r?t.posBefore(r):t.posAtEnd,typeOver:!1}}return"characterData"==e.type?{from:t.posAtStart,to:t.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}destroy(){var e,t,n;this.stop(),null===(e=this.intersection)||void 0===e||e.disconnect(),null===(t=this.gapIntersection)||void 0===t||t.disconnect(),null===(n=this.resizeScroll)||void 0===n||n.disconnect();for(let e of this.scrollTargets)e.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey)}}function sV(e,t,n){for(;t;){let r=ZQ.get(t);if(r&&r.parent==e)return r;let i=t.parentNode;t=i!=e.dom?i:n>0?t.nextSibling:t.previousSibling}return null}class aV{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.style.cssText="position: fixed; top: -10000px",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM);let{dispatch:t}=e;this.dispatchTransactions=e.dispatchTransactions||t&&(e=>e.forEach(e=>t(e,this)))||(e=>this.update(e)),this.dispatch=this.dispatch.bind(this),this._root=e.root||function(e){for(;e;){if(e&&(9==e.nodeType||11==e.nodeType&&e.host))return e;e=e.assignedSlot||e.parentNode}return null}(e.parent)||document,this.viewState=new DG(e.state||ak.create(e)),e.scrollTo&&e.scrollTo.is(Wq)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(Jq).map(e=>new eH(e));for(let e of this.plugins)e.update(this);this.observer=new oV(this),this.inputState=new HH(this),this.inputState.ensureHandlers(this.plugins),this.docView=new CH(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),e.parent&&e.parent.appendChild(this.dom)}dispatch(...e){let t=1==e.length&&e[0]instanceof Yw?e:1==e.length&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(t,this)}update(e){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let t,n=!1,r=!1,i=this.state;for(let t of e){if(t.startState!=i)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");i=t.state}if(this.destroyed)return void(this.viewState.state=i);let o=this.hasFocus,s=0,a=null;e.some(e=>e.annotation(fG))?(this.inputState.notifiedFocused=o,s=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,a=mG(i,o),a||(s=1));let l=this.observer.delayedAndroidKey,c=null;if(l?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(i.doc)||!this.state.selection.eq(i.selection))&&(c=null)):this.observer.clear(),i.facet(ak.phrases)!=this.state.facet(ak.phrases))return this.setState(i);t=dH.create(this,i,e),t.flags|=s;let u=this.viewState.scrollTarget;try{this.updateState=2;for(let t of e){if(u&&(u=u.map(t.changes)),t.scrollIntoView){let{main:e}=t.state.selection;u=new Vq(e.empty?e:gw.cursor(e.head,e.head>e.anchor?-1:1))}for(let e of t.effects)e.is(Wq)&&(u=e.value.clip(this.state))}this.viewState.update(t,u),this.bidiCache=uV.update(this.bidiCache,t.changes),t.empty||(this.updatePlugins(t),this.inputState.update(t)),n=this.docView.update(t),this.state.facet(cH)!=this.styleModules&&this.mountStyles(),r=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(e=>e.isUserEvent("select.pointer")))}finally{this.updateState=0}if(t.startState.facet(QG)!=t.state.facet(QG)&&(this.viewState.mustMeasureContent=!0),(n||r||u||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),!t.empty)for(let e of this.state.facet(Uq))try{e(t)}catch(e){Xq(this.state,e,"update listener")}(a||c)&&Promise.resolve().then(()=>{a&&this.state==a.startState&&this.dispatch(a),c&&!nV(this,c)&&l.force&&GQ(this.contentDOM,l.key,l.keyCode)})}setState(e){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=e);this.updateState=2;let t=this.hasFocus;try{for(let e of this.plugins)e.destroy(this);this.viewState=new DG(e),this.plugins=e.facet(Jq).map(e=>new eH(e)),this.pluginMap.clear();for(let e of this.plugins)e.update(this);this.docView=new CH(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}t&&this.focus(),this.requestMeasure()}updatePlugins(e){let t=e.startState.facet(Jq),n=e.state.facet(Jq);if(t!=n){let r=[];for(let i of n){let n=t.indexOf(i);if(n<0)r.push(new eH(i));else{let t=this.plugins[n];t.mustUpdate=e,r.push(t)}}for(let t of this.plugins)t.mustUpdate!=e&&t.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let t of this.plugins)t.mustUpdate=e;for(let e=0;e-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey)return this.measureScheduled=-1,void this.requestMeasure();this.measureScheduled=0,e&&this.observer.forceFlush();let t=null,n=this.scrollDOM,r=n.scrollTop*this.scaleY,{scrollAnchorPos:i,scrollAnchorHeight:o}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let e=0;;e++){if(o<0)if(WQ(n))i=-1,o=this.viewState.heightMap.height;else{let e=this.viewState.scrollAnchorAt(r);i=e.from,o=e.top}this.updateState=1;let s=this.viewState.measure(this);if(!s&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(e>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let a=[];4&s||([this.measureRequests,a]=[a,this.measureRequests]);let l=a.map(e=>{try{return e.read(this)}catch(e){return Xq(this.state,e),cV}}),c=dH.create(this,this.state,[]),u=!1;c.flags|=s,t?t.flags|=s:t=c,this.updateState=2,c.empty||(this.updatePlugins(c),this.inputState.update(c),this.updateAttrs(),u=this.docView.update(c));for(let e=0;e1||e<-1){r+=e,n.scrollTop=r/this.scaleY,o=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(t&&!t.empty)for(let e of this.state.facet(Uq))e(t)}get themeClasses(){return HG+" "+(this.state.facet(qG)?VG:GG)+" "+this.state.facet(QG)}updateAttrs(){let e=dV(this,tH,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),t={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(Yq)?"true":"false",class:"cm-content",style:`${pq.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(t["aria-readonly"]="true"),dV(this,nH,t);let n=this.observer.ignore(()=>{let n=wq(this.contentDOM,this.contentAttrs,t),r=wq(this.dom,this.editorAttrs,e);return n||r});return this.editorAttrs=e,this.contentAttrs=t,n}showAnnouncements(e){let t=!0;for(let n of e)for(let e of n.effects)if(e.is(aV.announce)){t&&(this.announceDOM.textContent=""),t=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=e.value}}mountStyles(){this.styleModules=this.state.facet(cH);let e=this.state.facet(aV.cspNonce);TQ.mount(this.root,this.styleModules.concat(YG).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(null!=e.key)for(let t=0;tt.spec==e)||null),t&&t.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,t,n){return qH(this,e,UH(this,e,t,n))}moveByGroup(e,t){return qH(this,e,UH(this,e,t,t=>function(e,t,n){let r=e.state.charCategorizer(t),i=r(n);return e=>{let t=r(e);return i==rk.Space&&(i=t),i==t}}(this,e.head,t)))}moveToLineBoundary(e,t,n=!0){return function(e,t,n,r){let i=zH(e,t.head),o=r&&i.type==Tq.Text&&(e.lineWrapping||i.widgetLineBreaks)?e.coordsAtPos(t.assoc<0&&t.head>i.from?t.head-1:t.head):null;if(o){let t=e.dom.getBoundingClientRect(),r=e.textDirectionAt(i.from),s=e.posAtCoords({x:n==(r==hH.LTR)?t.right-1:t.left+1,y:(o.top+o.bottom)/2});if(null!=s)return gw.cursor(s,n?-1:1)}return gw.cursor(n?i.to:i.from,n?-1:1)}(this,e,t,n)}moveVertically(e,t,n){return qH(this,e,function(e,t,n,r){let i=t.head,o=n?1:-1;if(i==(n?e.state.doc.length:0))return gw.cursor(i,t.assoc);let s,a=t.goalColumn,l=e.contentDOM.getBoundingClientRect(),c=e.coordsAtPos(i,t.assoc||-1),u=e.documentTop;if(c)null==a&&(a=c.left-l.left),s=o<0?c.top:c.bottom;else{let t=e.viewState.lineBlockAt(i);null==a&&(a=Math.min(l.right-l.left,e.defaultCharacterWidth*(i-t.from))),s=(o<0?t.top:t.bottom)+u}let d=l.left+a,h=null!=r?r:e.viewState.heightOracle.textHeight>>1;for(let t=0;;t+=10){let n=s+(h+t)*o,r=BH(e,{x:d,y:n},!1,o);if(nl.bottom||(o<0?ri)){let t=e.docView.coordsForChar(r),i=!t||n0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(Hq)||ethis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>lV)return EH(e.length);let t,n=this.textDirectionAt(e.from);for(let r of this.bidiCache)if(r.from==e.from&&r.dir==n&&(r.fresh||xH(r.isolates,t=sH(this,e.from,e.to))))return r.order;t||(t=sH(this,e.from,e.to));let r=OH(e.text,n,t);return this.bidiCache.push(new uV(e.from,e.to,n,t,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||pq.safari&&(null===(e=this.inputState)||void 0===e?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{qQ(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((9==e.nodeType?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,t={}){return Wq.of(new Vq("number"==typeof e?gw.cursor(e):e,t.y,t.x,t.yMargin,t.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:t}=this.scrollDOM,n=this.viewState.scrollAnchorAt(e);return Wq.of(new Vq(gw.cursor(n.from),"start","start",n.top-e,t,!0))}static domEventHandlers(e){return Kq.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Kq.define(()=>({}),{eventObservers:e})}static theme(e,t){let n=TQ.newName(),r=[QG.of(n),cH.of(XG("."+n,e))];return t&&t.dark&&r.push(qG.of(!0)),r}static baseTheme(e){return $w.lowest(cH.of(XG("."+HG,e,WG)))}static findFromDOM(e){var t;let n=e.querySelector(".cm-content"),r=n&&ZQ.get(n)||ZQ.get(e);return(null===(t=null==r?void 0:r.rootView)||void 0===t?void 0:t.view)||null}}aV.styleModule=cH,aV.inputHandler=Qq,aV.focusChangeEffect=qq,aV.perLineTextDirection=Hq,aV.exceptionSink=zq,aV.updateListener=Uq,aV.editable=Yq,aV.mouseSelectionStyle=Fq,aV.dragMovesSelection=Bq,aV.clickAddsSelectionRange=Lq,aV.decorations=rH,aV.atomicRanges=iH,aV.bidiIsolatedRanges=oH,aV.scrollMargins=aH,aV.darkTheme=qG,aV.cspNonce=yw.define({combine:e=>e.length?e[0]:""}),aV.contentAttributes=nH,aV.editorAttributes=tH,aV.lineWrapping=aV.contentAttributes.of({class:"cm-lineWrapping"}),aV.announce=Xw.define();const lV=4096,cV={};class uV{constructor(e,t,n,r,i,o){this.from=e,this.to=t,this.dir=n,this.isolates=r,this.fresh=i,this.order=o}static update(e,t){if(t.empty&&!e.some(e=>e.fresh))return e;let n=[],r=e.length?e[e.length-1].dir:hH.LTR;for(let i=Math.max(0,e.length-10);i=0;i--){let t=r[i],o="function"==typeof t?t(e):t;o&&_q(o,n)}return n}const hV=pq.mac?"mac":pq.windows?"win":pq.linux?"linux":"key";function pV(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}const fV=$w.default(aV.domEventHandlers({keydown:(e,t)=>yV(bV(t.state),e,t,"editor")})),mV=yw.define({enables:fV}),gV=new WeakMap;function bV(e){let t=e.facet(mV),n=gV.get(t);return n||gV.set(t,n=function(e,t=hV){let n=Object.create(null),r=Object.create(null),i=(e,t)=>{let n=r[e];if(null==n)r[e]=t;else if(n!=t)throw new Error("Key binding "+e+" is used both as a regular binding and as a multi-stroke prefix")},o=(e,r,o,s,a)=>{var l,c;let u=n[e]||(n[e]=Object.create(null)),d=r.split(/ (?!$)/).map(e=>function(e,t){const n=e.split(/-(?!$)/);let r,i,o,s,a=n[n.length-1];"Space"==a&&(a=" ");for(let e=0;e{let r=vV={view:t,prefix:n,scope:e};return setTimeout(()=>{vV==r&&(vV=null)},4e3),!0}]})}let h=d.join(" ");i(h,!1);let p=u[h]||(u[h]={preventDefault:!1,stopPropagation:!1,run:(null===(c=null===(l=u._any)||void 0===l?void 0:l.run)||void 0===c?void 0:c.slice())||[]});o&&p.run.push(o),s&&(p.preventDefault=!0),a&&(p.stopPropagation=!0)};for(let r of e){let e=r.scope?r.scope.split(" "):["editor"];if(r.any)for(let t of e){let e=n[t]||(n[t]=Object.create(null));e._any||(e._any={preventDefault:!1,stopPropagation:!1,run:[]});for(let t in e)e[t].run.push(r.any)}let i=r[t]||r.key;if(i)for(let t of e)o(t,i,r.run,r.preventDefault,r.stopPropagation),r.shift&&o(t,"Shift-"+i,r.shift,r.preventDefault,r.stopPropagation)}return n}(t.reduce((e,t)=>e.concat(t),[]))),n}let vV=null;function yV(e,t,n,r){let i=zk(t),o=iw(nw(i,0))==i.length&&" "!=i,s="",a=!1,l=!1,c=!1;vV&&vV.view==n&&vV.scope==r&&(s=vV.prefix+" ",XH.indexOf(t.keyCode)<0&&(l=!0,vV=null));let u,d,h=new Set,p=e=>{if(e){for(let r of e.run)if(!h.has(r)&&(h.add(r),r(n,t)))return e.stopPropagation&&(c=!0),!0;e.preventDefault&&(e.stopPropagation&&(c=!0),l=!0)}return!1},f=e[r];return f&&(p(f[s+pV(i,t,!o)])?a=!0:o&&(t.altKey||t.metaKey||t.ctrlKey)&&!(pq.windows&&t.ctrlKey&&t.altKey)&&(u=Rk[t.keyCode])&&u!=i?(p(f[s+pV(u,t,!0)])||t.shiftKey&&(d=Ik[t.keyCode])!=i&&d!=u&&p(f[s+pV(d,t,!1)]))&&(a=!0):o&&t.shiftKey&&p(f[s+pV(i,t,!0)])&&(a=!0),!a&&p(f._any)&&(a=!0)),l&&(a=!0),a&&c&&t.stopPropagation(),a}const _V=!pq.ios;const SV={".cm-line":{"& ::selection":{backgroundColor:"transparent !important"},"&::selection":{backgroundColor:"transparent !important"}}};_V&&(SV[".cm-line"].caretColor="transparent !important");class xV extends ck{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}xV.prototype.elementClass="",xV.prototype.toDOM=void 0,xV.prototype.mapMode=sw.TrackBefore,xV.prototype.startSide=xV.prototype.endSide=-1,xV.prototype.point=!0;function wV(e){let t=Object.keys(e).join(""),n=/\w/.test(t);return n&&(t=t.replace(/\w/g,"")),`[${n?"\\w":""}${t.replace(/[^\w\s]/g,"\\$&")}]`}function kV(e){let t=e.map(e=>"string"==typeof e?{label:e}:e),[n,r]=t.every(e=>/^\w+$/.test(e.label))?[/\w*$/,/\w+$/]:function(e){let t=Object.create(null),n=Object.create(null);for(let{label:r}of e){t[r[0]]=!0;for(let e=1;e{let i=e.matchBefore(r);return i||e.explicit?{from:i?i.from:e.pos,options:t,validFor:n}:null}}const OV=Gw.define();const EV=aV.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class AV{constructor(e,t,n,r){this.field=e,this.line=t,this.from=n,this.to=r}}class TV{constructor(e,t,n){this.field=e,this.from=t,this.to=n}map(e){let t=e.mapPos(this.from,-1,sw.TrackDel),n=e.mapPos(this.to,1,sw.TrackDel);return null==t||null==n?null:new TV(this.field,t,n)}}class CV{constructor(e,t){this.lines=e,this.fieldPositions=t}instantiate(e,t){let n=[],r=[t],i=e.doc.lineAt(t),o=/^\s*/.exec(i.text)[0];for(let i of this.lines){if(n.length){let n=o,s=/^\t*/.exec(i)[0].length;for(let t=0;tnew TV(e.field,r[e.line]+e.from,r[e.line]+e.to))}}static parse(e){let t,n=[],r=[],i=[];for(let o of e.split(/\r\n?|\n/)){for(;t=/[#$]\{(?:(\d+)(?::([^}]*))?|([^}]*))\}/.exec(o);){let e=t[1]?+t[1]:null,s=t[2]||t[3]||"",a=-1;for(let t=0;t=a&&e.field++}i.push(new AV(a,r.length,t.index,t.index+s.length)),o=o.slice(0,t.index)+s+o.slice(t.index+t[0].length)}for(let e;e=/\\([{}])/.exec(o);){o=o.slice(0,e.index)+e[1]+o.slice(e.index+e[0].length);for(let t of i)t.line==r.length&&t.from>e.index&&(t.from--,t.to--)}r.push(o)}return new CV(r,i)}}let MV=Cq.widget({widget:new class extends Aq{toDOM(){let e=document.createElement("span");return e.className="cm-snippetFieldPosition",e}ignoreEvent(){return!1}}}),PV=Cq.mark({class:"cm-snippetField"});class $V{constructor(e,t){this.ranges=e,this.active=t,this.deco=Cq.set(e.map(e=>(e.from==e.to?MV:PV).range(e.from,e.to)))}map(e){let t=[];for(let n of this.ranges){let r=n.map(e);if(!r)return null;t.push(r)}return new $V(t,this.active)}selectionInsideField(e){return e.ranges.every(e=>this.ranges.some(t=>t.field==this.active&&t.from<=e.from&&t.to>=e.to))}}const RV=Xw.define({map:(e,t)=>e&&e.map(t)}),IV=Xw.define(),DV=Ew.define({create:()=>null,update(e,t){for(let n of t.effects){if(n.is(RV))return n.value;if(n.is(IV)&&e)return new $V(e.ranges,n.value)}return e&&t.docChanged&&(e=e.map(t.changes)),e&&t.selection&&!e.selectionInsideField(t.selection)&&(e=null),e},provide:e=>aV.decorations.from(e,e=>e?e.deco:Cq.none)});function NV(e,t){return gw.create(e.filter(e=>e.field==t).map(e=>gw.range(e.from,e.to)))}function jV(e){let t=CV.parse(e);return(e,n,r,i)=>{let{text:o,ranges:s}=t.instantiate(e.state,r),a={changes:{from:r,to:i,insert:Bx.of(o)},scrollIntoView:!0,annotations:n?OV.of(n):void 0};if(s.length&&(a.selection=NV(s,0)),s.length>1){let t=new $V(s,0),n=a.effects=[RV.of(t)];void 0===e.state.field(DV,!1)&&n.push(Xw.appendConfig.of([DV,zV,QV,EV]))}e.dispatch(e.state.update(a))}}function LV(e){return({state:t,dispatch:n})=>{let r=t.field(DV,!1);if(!r||e<0&&0==r.active)return!1;let i=r.active+e,o=e>0&&!r.ranges.some(t=>t.field==i+e);return n(t.update({selection:NV(r.ranges,i),effects:RV.of(o?null:new $V(r.ranges,i))})),!0}}const BV=[{key:"Tab",run:LV(1),shift:LV(-1)},{key:"Escape",run:({state:e,dispatch:t})=>!!e.field(DV,!1)&&(t(e.update({effects:RV.of(null)})),!0)}],FV=yw.define({combine:e=>e.length?e[0]:BV}),zV=$w.highest(mV.compute([FV],e=>e.facet(FV)));function UV(e,t){return Object.assign(Object.assign({},t),{apply:jV(e)})}const QV=aV.domEventHandlers({mousedown(e,t){let n,r=t.state.field(DV,!1);if(!r||null==(n=t.posAtCoords({x:e.clientX,y:e.clientY})))return!1;let i=r.ranges.find(e=>e.from<=n&&e.to>=n);return!(!i||i.field==r.active)&&(t.dispatch({selection:NV(r.ranges,i.field),effects:RV.of(r.ranges.some(e=>e.field>i.field)?new $V(r.ranges,i.field):null)}),!0)}});const qV=new class extends ck{};qV.startSide=1,qV.endSide=-1;"object"==typeof navigator&&navigator.userAgent;const HV=[UV("function ${name}(${params}) {\n\t${}\n}",{label:"function",detail:"definition",type:"keyword"}),UV("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n\t${}\n}",{label:"for",detail:"loop",type:"keyword"}),UV("for (let ${name} of ${collection}) {\n\t${}\n}",{label:"for",detail:"of loop",type:"keyword"}),UV("do {\n\t${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),UV("while (${}) {\n\t${}\n}",{label:"while",detail:"loop",type:"keyword"}),UV("try {\n\t${}\n} catch (${error}) {\n\t${}\n}",{label:"try",detail:"/ catch block",type:"keyword"}),UV("if (${}) {\n\t${}\n}",{label:"if",detail:"block",type:"keyword"}),UV("if (${}) {\n\t${}\n} else {\n\t${}\n}",{label:"if",detail:"/ else block",type:"keyword"}),UV("class ${name} {\n\tconstructor(${params}) {\n\t\t${}\n\t}\n}",{label:"class",detail:"definition",type:"keyword"}),UV('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),UV('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],GV=HV.concat([UV("interface ${name} {\n\t${}\n}",{label:"interface",detail:"definition",type:"keyword"}),UV("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),UV("enum ${name} {\n\t${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),VV=new eM.f,WV=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function XV(e){return(t,n)=>{let r=t.node.getChild("VariableDefinition");return r&&n(r,e),!0}}const YV=["FunctionDeclaration"],ZV={FunctionDeclaration:XV("function"),ClassDeclaration:XV("class"),ClassExpression:()=>!0,EnumDeclaration:XV("constant"),TypeAliasDeclaration:XV("type"),NamespaceDeclaration:XV("namespace"),VariableDefinition(e,t){e.matchContext(YV)||t(e,"variable")},TypeDefinition(e,t){t(e,"type")},__proto__:null};function JV(e,t){let n=VV.get(t);if(n)return n;let r=[],i=!0;function o(t,n){let i=e.sliceString(t.from,t.to);r.push({label:i,type:n})}return t.cursor(eM.b.IncludeAnonymous).iterate(t=>{if(i)i=!1;else if(t.name){let e=ZV[t.name];if(e&&e(t,o)||WV.has(t.name))return!1}else if(t.to-t.from>8192){for(let n of JV(e,t.node))r.push(n);return!1}}),VV.set(t,r),r}const KV=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,eW=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName",".","?."];function tW(e){let t=IM(e.state).resolveInner(e.pos,-1);if(eW.indexOf(t.name)>-1)return null;let n="VariableName"==t.name||t.to-t.from<20&&KV.test(e.state.sliceDoc(t.from,t.to));if(!n&&!e.explicit)return null;let r=[];for(let n=t;n;n=n.parent)WV.has(n.name)&&(r=r.concat(JV(e.state.doc,n)));return{options:r,from:n?t.from:e.pos,validFor:KV}}const nW=RM.define({name:"javascript",parser:Nj.configure({props:[ZM.add({IfStatement:sP({except:/^\s*({|else\b)/}),TryStatement:sP({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:oP,SwitchBody:e=>{let t=e.textAfter,n=/^\s*\}/.test(t),r=/^\s*(case|default)\b/.test(t);return e.baseIndent+(n?0:r?1:2)*e.unit},Block:rP({closing:"}"}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":sP({except:/^{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag":e=>e.column(e.node.from)+e.unit}),lP.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":cP,BlockComment:e=>({from:e.from+2,to:e.to-2})})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),rW={test:e=>/^JSX/.test(e.name),facet:CM({commentTokens:{block:{open:"{/*",close:"*/}"}}})},iW=nW.configure({dialect:"ts"},"typescript"),oW=nW.configure({dialect:"jsx",props:[MM.add(e=>e.isTop?[rW]:void 0)]}),sW=nW.configure({dialect:"jsx ts",props:[MM.add(e=>e.isTop?[rW]:void 0)]},"typescript");let aW=e=>({label:e,type:"keyword"});const lW="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(aW),cW=lW.concat(["declare","implements","private","protected","public"].map(aW));function uW(e,t,n=e.length){for(let r=null==t?void 0:t.firstChild;r;r=r.nextSibling)if("JSXIdentifier"==r.name||"JSXBuiltin"==r.name||"JSXNamespacedName"==r.name||"JSXMemberExpression"==r.name)return e.sliceString(r.from,Math.min(r.to,n));return""}const dW="object"==typeof navigator&&/Android\b/.test(navigator.userAgent),hW=aV.inputHandler.of((e,t,n,r,i)=>{if((dW?e.composing:e.compositionStarted)||e.state.readOnly||t!=n||">"!=r&&"/"!=r||!nW.isActiveAt(e.state,t,-1))return!1;let o=i(),{state:s}=o,a=s.changeByRange(e=>{var t;let n,{head:i}=e,o=IM(s).resolveInner(i-1,-1);if("JSXStartTag"==o.name&&(o=o.parent),s.doc.sliceString(i-1,i)!=r||"JSXAttributeValue"==o.name&&o.to>i);else{if(">"==r&&"JSXFragmentTag"==o.name)return{range:e,changes:{from:i,insert:""}};if("/"==r&&"JSXStartCloseTag"==o.name){let e=o.parent,r=e.parent;if(r&&e.from==i-2&&((n=uW(s.doc,r.firstChild,i))||"JSXFragmentTag"==(null===(t=r.firstChild)||void 0===t?void 0:t.name))){let e=n+">";return{range:gw.cursor(i+e.length,-1),changes:{from:i,insert:e}}}}else if(">"==r){let t=function(e){for(;;){if("JSXOpenTag"==e.name||"JSXSelfClosingTag"==e.name||"JSXFragmentTag"==e.name)return e;if("JSXEscape"==e.name||!e.parent)return null;e=e.parent}}(o);if(t&&!/^\/?>|^<\//.test(s.doc.sliceString(i,i+2))&&(n=uW(s.doc,t,i)))return{range:e,changes:{from:i,insert:``}}}}return{range:e}});return!a.changes.empty&&(e.dispatch([o,s.update(a,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});const pW=pT.theme({".cm-activeLine":{"background-color":"inherit"},".cm-activeLineGutter":{"background-color":"inherit",color:"inherit"},".cm-gutters":{border:"none",color:"black","background-color":"white"},".cm-line .cm-indentation-marker":{background:"none","border-inline-start":"solid lightgrey","&.active":{background:"none","border-inline-start":"solid grey"}},".ͼf":{color:"#AA1111"}},{dark:!1});n(411),n(412),n(413);const fW=pT.theme({".cm-gutters":{"background-color":"#2A2B32",color:"white",border:"none"},".cm-activeLine":{"background-color":"inherit"},".cm-activeLineGutter":{"background-color":"inherit",color:"inherit"},"&.cm-focused .cm-selectionBackground, ::selection":{background:"#144866"},"&.cm-focused .cm-cursor":{borderLeftColor:"white"},".cm-line .cm-indentation-marker":{background:"none","border-inline-start":"solid grey","&.active":{background:"none","border-inline-start":"solid lightgrey"}},".ͼ5":{color:"#FFCA99"},".ͼb":{color:"#EECCFF"},".ͼc":{color:"#9EE8FF"},".ͼd":{color:"#9EE8FF"},".ͼe":{color:"#94F9AF"},".ͼf":{color:"#94F9AF"},".ͼg":{color:"#9EE8FF"},".ͼi":{color:"#EECCFF"},".ͼj":{color:"#9EE8FF"},".ͼm":{color:"#FFCA99"}},{dark:!0});var mW=e=>{let{extension:t="html",fileName:n="index"}=e;const r=Object(i.useRef)(),s=Qn(e=>e.editor.project),[a]=Sg(["theme","fontSize"]),l=Bn(),{t:c}=Gi(),u=Object(i.useContext)(Mo),d=pT.contentAttributes.of({"aria-label":c("editorPanel.ariaLabel")}),h=pT.updateListener.of(e=>{var r;e.docChanged&&(r=e.state.doc.toString(),l(jr({extension:t,name:n,code:r})))}),p=()=>{switch(t){case"html":return EL();case"css":return Ej();case"py":return new qM(kQ,[kQ.data.of({autocomplete:yQ}),kQ.data.of({autocomplete:xQ})]);case"js":return function(e={}){let t=e.jsx?e.typescript?sW:oW:e.typescript?iW:nW,n=e.typescript?GV.concat(cW):HV.concat(lW);return new qM(t,[nW.data.of({autocomplete:(r=eW,i=kV(n),e=>{for(let t=IM(e.state).resolveInner(e.pos,-1);t;t=t.parent){if(r.indexOf(t.name)>-1)return null;if(t.type.isTop)break}return i(e)})}),nW.data.of({autocomplete:tW}),e.jsx?hW:[]]);var r,i}();default:return EL()}},f="dark"===a.theme||!a.theme&&window.matchMedia("(prefers-color-scheme:dark)").matches?fW:pW;return Object(i.useEffect)(()=>{const e=s.components.find(e=>e.extension===t&&e.name===n);if(!e)return;const i=e.content,o=p();let a=" ";"py"===t&&(a=" ");const l=ak.create({doc:i,extensions:[_N,ST.of([TR,CR]),o,d,h,f,CN(),GM.of(a)]}),c=new pT({lineWrapping:!0,state:l,parent:r.current});c.scrollDOM.setAttribute("aria-hidden","true");const u=c.contentDOM.getElementsByClassName("cm-widgetBuffer");for(let e of u)e.setAttribute("role","presentation");return()=>{c.destroy()}},[a]),o.a.createElement("div",{className:"editor editor--".concat(u.fontSize),ref:r})};n(162);const gW=e=>{let{children:t,panelIndex:n,fileIndex:r,...i}=e;const s=Qn(e=>e.editor.webComponent),a=Qn(e=>e.editor.openFiles)[n].length,l=Bn(),c=(e,t)=>{l(gr({panelIndex:e,fileIndex:t}))},u=()=>o.a.createElement(ko,Object.assign({onClick:e=>{e.stopPropagation(),c(n,r)},onKeyDown:e=>((e,t,n)=>{"ArrowRight"===e.code?c(t,(n+1)%a):"ArrowLeft"===e.code&&c(t,(n+a-1)%a)})(e,n,r)},i),t);return s?o.a.createElement(u,null):o.a.createElement(hx,{draggableId:"draggable".concat(n,"_").concat(r),index:r},e=>{let{innerRef:t,draggableProps:n,dragHandleProps:r}=e;return o.a.createElement("div",Object.assign({className:"draggable-tab",ref:t},n,r,{style:n.style}),o.a.createElement(u,null))})};gW.tabsRole="Tab";var bW=gW;const vW=e=>{let{children:t,index:n,...r}=e;return o.a.createElement(_o,r,o.a.createElement(Lx,{direction:"horizontal",droppableId:n.toString()},e=>{let{innerRef:n,droppableProps:r,placeholder:i}=e;return o.a.createElement("div",Object.assign({className:"droppable-tab-list"},r,{ref:n}),t,i)}))};vW.tabsRole="TabList";var yW=vW;n(417);var _W=()=>{const e=Qn(e=>e.editor.project),t=Qn(e=>e.editor.openFiles),n=Qn(e=>e.editor.focussedFileIndices),r=Bn(),s=Object(ui.useMediaQuery)({query:Co}),[a,l]=Object(i.useState)(e.components.length);let c=Object(i.useRef)(e.components.map(i.createRef));return Object(i.useEffect)(()=>{l(e.components.length),Array(e.components.length).fill().forEach((e,t)=>{c.current[t]=c.current[t]||o.a.createRef()})},[e.components.length]),Object(i.useEffect)(()=>{n.forEach((n,r)=>{const i=t[r][n],o=e.components.findIndex(e=>"".concat(e.name,".").concat(e.extension)===i),s=c.current[o];s&&s.current&&s.current.parentElement.scrollIntoView()})},[n,t,a,e]),o.a.createElement(XS,{onDragStart:e=>(e=>{const{source:t}=e;r(gr({panelIndex:parseInt(t.droppableId),fileIndex:t.index}))})(e),onDragEnd:e=>(e=>{const{source:n,destination:i}=e;if(!i)return;let o=[...t],s=[...o[n.droppableId]];const[a]=s.splice(n.index,1);o[n.droppableId]=[...s];let l=[...o[i.droppableId]];l.splice(i.index,0,a),o[i.droppableId]=[...l],r(fr(o)),r(gr({panelIndex:parseInt(i.droppableId),fileIndex:i.index})),i.droppableId!==n.droppableId&&r(gr({panelIndex:parseInt(n.droppableId),fileIndex:Math.max(n.index-1,0)}))})(e)},o.a.createElement("div",{className:"editor-input"},t.map((t,i)=>o.a.createElement(go,{key:i,selectedIndex:n[i],onSelect:()=>{}},o.a.createElement("div",{className:"react-tabs__tab-container"},o.a.createElement(yW,{index:i},t.map((t,n)=>o.a.createElement(bW,{key:n,fileIndex:n,panelIndex:i},o.a.createElement("span",{className:pi()("react-tabs__tab-text",{"react-tabs__tab-text--split":!["main.py","index.html"].includes(t)}),ref:c.current[e.components.findIndex(e=>"".concat(e.name,".").concat(e.extension)===t)]},t),["main.py","index.html"].includes(t)?null:o.a.createElement(xc,{className:"btn--tertiary react-tabs__tab-close-btn",label:"close",onClickHandler:e=>((e,t)=>{e.stopPropagation(),r(hr(t))})(e,t),ButtonIcon:()=>o.a.createElement(zh,{scaleFactor:.85})})))),s?o.a.createElement($c,{skinny:!0}):null),t.map((e,t)=>o.a.createElement(To,{key:t},o.a.createElement(mW,{fileName:e.split(".")[0],extension:e.split(".").slice(1).join(".")}))),s?null:o.a.createElement(cu,null)))))};const SW={"width-larger-than-720":{minWidth:720},"width-smaller-than-600":{maxWidth:600}};var xW=e=>{const t=Qn(e=>e.editor.webComponent),{nameEditable:n=!0,withProjectbar:r=!0,withSidebar:s=!0,sidebarOptions:a=[]}=e,l=Qn(e=>e.editor.saving),c=Qn(e=>e.editor.lastSaveAutosave);Object(i.useEffect)(()=>{"success"===l&&!1===c&&Yu(Fh.t("notifications.projectSaved"),{...Uh,icon:td})},[l,c]);const[u,d]=Object(di.useContainerQuery)(SW),[h,p]=Object(i.useState)("auto"),[f,m]=Object(i.useState)("auto"),[g,b]=Object(i.useState)("100%"),[v,y]=Object(i.useState)("right"),[_,S]=Object(i.useState)(!0);return Object(i.useMemo)(()=>{const e=u["width-larger-than-720"];p(e?"50%":"100%"),m(e?"100%":"50%"),b(e?"75%":"100%"),y(e?"right":"bottom")},[u["width-larger-than-720"]]),Object(i.useEffect)(()=>{S(!1)},[]),o.a.createElement("div",{className:"proj","data-testid":"project"},o.a.createElement("div",{className:pi()("proj-container",{"proj-container--wc":t})},s&&o.a.createElement(hb,{options:a}),o.a.createElement("div",{className:"project-wrapper",ref:d},r&&o.a.createElement(Of,{nameEditable:n}),!_&&o.a.createElement("div",{className:"proj-editor-wrapper"},o.a.createElement(zm,{"data-testid":"proj-editor-container",className:"proj-editor-container",defaultWidth:h,defaultHeight:f,handleDirection:v,minWidth:"25%",maxWidth:g},o.a.createElement(_W,null)),o.a.createElement(uu,null)))))};n(418);var wW,kW=()=>{const e=Qn(e=>e.editor.project.name),t=Qn(e=>e.editor.lastSavedTime);return o.a.createElement("div",{className:"mobile-project-bar"},o.a.createElement("p",{className:"mobile-project-bar__name"},e),t?o.a.createElement(yp,{isMobile:!0}):null)};n(419);function OW(){return(OW=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let{withSidebar:t,sidebarOptions:n=[]}=e;const r=Qn(e=>e.editor.project.project_type),s=Qn(e=>e.editor.sidebarShowing),a=Qn(e=>e.editor.codeRunTriggered),l=n.includes("instructions"),[c,u]=Object(i.useState)(1),{t:d}=Gi(),h=Bn();return Object(i.useEffect)(()=>{a?u(t?2:1):s||u(t?1:0)},[a,s,t]),o.a.createElement("div",{className:"proj-container proj-editor-container proj-container--mobile","data-testid":"mobile-project"},o.a.createElement(go,{forceRenderTabPanel:!0,selectedIndex:c,onSelect:e=>u(e)},t&&o.a.createElement(To,null,o.a.createElement(hb,{options:n})),o.a.createElement(To,null,o.a.createElement(_W,null)),o.a.createElement(To,null,o.a.createElement(uu,null)),o.a.createElement(kW,null),o.a.createElement("div",{className:"react-tabs__tab-container mobile-nav"},o.a.createElement(_o,null,t&&o.a.createElement(ko,{onClick:()=>h(oi())},l?o.a.createElement(Jg,null):o.a.createElement(MW,null),o.a.createElement("span",{className:"react-tabs__tab-text"},d(l?"mobile.steps":"mobile.menu"))),o.a.createElement(ko,null,o.a.createElement(AW,null),o.a.createElement("span",{className:"react-tabs__tab-text"},d("mobile.code"))),o.a.createElement(ko,null,o.a.createElement($W,null),o.a.createElement("span",{className:"react-tabs__tab-text"},d("html"===r?"mobile.preview":"mobile.output")))))))};var IW=e=>{let{withProjectbar:t=!1,nameEditable:n=!1,withSidebar:r=!1,sidebarOptions:s=[],outputOnly:a=!1,outputPanels:l=["text","visual"],outputSplitView:c=!1}=e;const u=Qn(e=>e.editor.loading),d=Qn(e=>e.editor.project),h=Qn(e=>e.editor.project.identifier),p=Qn(e=>e.editor.codeRunTriggered),f=Qn(e=>e.editor.error),m=Qn(e=>e.editor.errorDetails),g=Qn(e=>e.editor.codeHasBeenRun),b=Qn(e=>e.instructions.currentStepPosition),v=Object(ui.useMediaQuery)({query:Co}),[y,_]=Object(i.useState)(g),S=Bn();return S(xr(c)),S(Or(!0)),S(yr(a)),Object(i.useEffect)(()=>{_(!1);const e=setTimeout(()=>{document.dispatchEvent(ff)},2e3);return()=>clearTimeout(e)},[d]),Object(i.useEffect)(()=>{h&&document.dispatchEvent(pf("editor-projectIdentifierChanged",h))},[h]),Object(i.useEffect)(()=>{if(p)document.dispatchEvent(mf),_(!0);else if(y){const e=Cs.a.sense_hat?Cs.a.sense_hat.mz_criteria:{...gl},t=a?{errorDetails:m}:{isErrorFree:""===f,...e};document.dispatchEvent(pf("editor-runCompleted",t))}},[p,y,a,f,m]),Object(i.useEffect)(()=>{document.dispatchEvent(pf("editor-stepChanged",b))},[b]),o.a.createElement(o.a.Fragment,null,!a&&(v?o.a.createElement(RW,{withSidebar:r,sidebarOptions:s}):o.a.createElement(xW,{nameEditable:n,withProjectbar:t,withSidebar:r,sidebarOptions:s})),a&&o.a.createElement("div",{className:"embedded-viewer","data-testid":"output-only"},"success"===u&&o.a.createElement(uu,{outputPanels:l})))};const DW={project_type:"python",name:Fh.t("project.untitled"),locale:null,components:[{extension:"py",name:"main",content:"",default:!0}],image_list:[]},NW=(Fh.t("project.untitled"),e=>{let{assetsIdentifier:t=null,projectIdentifier:n=null,code:r=null,accessToken:o=null,loadRemix:s=!1,loadCache:a=!0,remixLoadFailed:l=!1}=e;const c=Qn(e=>e.editor.loading),u=Qn(e=>e.editor.isEmbedded),d=Qn(e=>e.editor.browserPreview),h=Qn(e=>e.editor.project),p=e=>u&&!d?null:JSON.parse(localStorage.getItem(e||"project")),[f,m]=Object(i.useState)(p(n)),{i18n:g}=Gi(),b=Bn();Object(i.useEffect)(()=>{m(p(n))},[n]),Object(i.useEffect)(()=>{if(!s){const e=n&&f&&f.identifier===n,i=!n&&f;if(a&&(e||i))return void b(Er(f));if(t)return void b(sr("load")({identifier:t,locale:g.language,accessToken:o,assetsOnly:!0}));if(n)return void b(sr("load")({identifier:n,locale:g.language,accessToken:o}));if(r){return void b(Er({name:"Blank project",project_type:"python",components:[{name:"main",extension:"py",content:r}]}))}b(Er(DW))}},[r,n,f,g.language,o,s]),Object(i.useEffect)(()=>{n&&s&&(!o||l)&&b(sr("load")({identifier:n,locale:g.language,accessToken:o}))},[n,g.language,o,l]),Object(i.useEffect)(()=>{!n||!s||l||!o||null!=h&&h.user_id||b(sr("loadRemix")({identifier:n,accessToken:o}))},[n,o,s,l]),Object(i.useEffect)(()=>{if(r&&"success"===c){var e,t;const n="html"===h.project_type?"index":"main",i="html"===h.project_type?"html":"py",o=(null===(e=h.components)||void 0===e?void 0:e.find(e=>e.name===n&&e.extension===i))||{name:n,extension:i,content:""},s=(null===(t=h.components)||void 0===t?void 0:t.filter(e=>!(e.name===n&&e.extension===i)))||[],a={...h,project_type:h.project_type||"python",components:[...s,{...o,content:r}]};b(Er(a))}},[r,c])}),jW=e=>{let{user:t,project:n={},justLoaded:r,hasShownSavePrompt:o,saveTriggered:s}=e;const a=Bn();Object(i.useEffect)(()=>{0!==Object.keys(n).length&&(s||t&&localStorage.getItem("awaitingSave"))&&(yf(t,n)?a(sr("save")({project:n,accessToken:t.access_token,autosave:!1})):t&&n.identifier?a(sr("remix")({project:n,accessToken:t.access_token})):a(Hr()),localStorage.removeItem("awaitingSave"))},[s,n,t,a]),Object(i.useEffect)(()=>{let e=setTimeout(()=>{n&&(yf(t,n)&&n.identifier?(r&&a(dr()),a(sr("save")({project:n,accessToken:t.access_token,autosave:!0}))):r?a(dr()):(localStorage.setItem(n.identifier||"project",JSON.stringify(n)),o||(Yu(t?Fh.t("notifications.savePrompt"):Fh.t("notifications.loginPrompt"),{...Qh,className:"".concat(Qh.className," toast--info"),icon:Ku}),a(kr()))))},2e3);return()=>clearTimeout(e)},[a,n,t,o])},LW={python:["py","csv","txt"],html:["html","css","js"]},BW=(e,t)=>{const n=LW[e];return 1===n.length?"'.".concat(n[0],"'"):"'.".concat(n.slice(0,-1).join("', '."),"' ").concat(t("filePanel.errors.or")," '.").concat(n[n.length-1],"'")},FW=(e,t,n)=>{const r=e.split(".").slice(1).join(".");return!(!LW[t].includes(r)||n.includes(e)||1!==e.split(" ").length)},zW=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"python",n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0,i=arguments.length>4?arguments[4]:void 0,o=arguments.length>5?arguments[5]:void 0,s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null;const a=e.split(".").slice(1).join(".");FW(e,t,n)||s&&e===s?o():n.includes(e)?r(wr(i("filePanel.errors.notUnique"))):e.split(" ").length>1?r(wr(i("filePanel.errors.containsSpaces"))):LW[t].includes(a)?r(wr(i("filePanel.errors.generalError"))):r(wr(i("filePanel.errors.unsupportedExtension",{allowedExtensions:BW(t,i)})))};var UW=n(86),QW=n.n(UW);n(108);var qW=e=>{let{buttons:t=[],children:n,defaultCallback:r,heading:i,isOpen:s,text:a=[],withCloseButton:l=!1,closeModal:c}=e;const{t:u}=Gi();return o.a.createElement("div",{onKeyDown:e=>{"Enter"===e.key&&r&&(e.preventDefault(),r())}},o.a.createElement(QW.a,{isOpen:s,onRequestClose:c,className:"modal-content",overlayClassName:"modal-overlay",contentLabel:i,parentSelector:()=>document.querySelector("#app")||document.querySelector("editor-wc").shadowRoot.querySelector("#wc"),appElement:document.querySelector("editor-wc")||document.getElementById("app")||void 0},o.a.createElement("div",{className:"modal-content__header"},o.a.createElement("h2",{className:"modal-content__heading"},i),l?o.a.createElement(xc,{className:"btn--tertiary",onClickHandler:c,ButtonIcon:zh,label:u("modals.close"),title:u("modals.close")}):null),o.a.createElement("div",{className:"modal-content__body"},a.map((e,t)=>"subheading"===e.type?o.a.createElement("h3",{className:"modal-content__subheading",key:t},e.content):o.a.createElement("p",{className:"modal-content__text",key:t},e.content)),n),o.a.createElement("div",{className:"modal-content__buttons"},t)))};var HW=()=>{const e=Qn(e=>e.editor.nameError);return e?o.a.createElement("div",{className:"error-message"},o.a.createElement("p",{className:"error-message__content"},e)):null};var GW=e=>{let{inputs:t,...n}=e;const r=Object(i.useCallback)(e=>{e&&e.select()},[]);return o.a.createElement(qW,n,o.a.createElement("div",{className:"modal-content__inputs"},t.map((e,t)=>o.a.createElement("div",{key:t},"radio"===e.type?o.a.createElement(Eg,{label:e.label,options:e.options,value:e.value,setValue:e.setValue}):o.a.createElement("div",{className:"modal-content__input-section"},o.a.createElement("label",{htmlFor:t},e.label,o.a.createElement("p",{className:"modal-content__help-text"},e.helpText)),o.a.createElement("div",{className:"modal-content__input"},e.validateName?o.a.createElement(HW,null):null,o.a.createElement("input",{ref:0===t?r:null,type:"text",id:t,onChange:t=>e.setValue(t.target.value),value:e.value})))))))};var VW=()=>{const{t:e}=Gi(),t=Bn(),n=Qn(e=>e.editor.project.project_type),r=Qn(e=>e.editor.project.components).map(e=>"".concat(e.name,".").concat(e.extension)),s=Qn(e=>e.editor.newFileModalShowing),a=()=>t(Xr()),[l,c]=Object(i.useState)(""),u=()=>{const i=l.split(".")[0],o=l.split(".").slice(1).join(".");zW(l,n,r,t,e,()=>{t(lr({extension:o,name:i})),t(pr(l)),a()})};return o.a.createElement(GW,{isOpen:s,closeModal:a,withCloseButton:!0,heading:e("filePanel.newFileModal.heading"),inputs:[{label:e("filePanel.newFileModal.inputLabel"),helpText:e("filePanel.newFileModal.helpText",{examples:e("filePanel.newFileModal.helpTextExample.".concat(n))}),value:l,setValue:c,validateName:!0}],defaultCallback:u,buttons:[o.a.createElement(xc,{key:"create",className:"btn--primary",buttonText:e("filePanel.newFileModal.addFile"),onClickHandler:u}),o.a.createElement(xc,{key:"close",className:"btn--secondary",buttonText:e("filePanel.newFileModal.cancel"),onClickHandler:a})]})};var WW=e=>{let{errorType:t,additionalOnClose:n}=e;const r=Bn(),{t:i}=Gi(),s=Qn(e=>e.editor.error),a=Qn(e=>e.editor.errorModalShowing),l=()=>{r(qr()),n&&n(),r(Sr(null))};return o.a.createElement(o.a.Fragment,null,o.a.createElement(QW.a,{isOpen:a,onRequestClose:l,className:"modal-content",overlayClassName:"modal-overlay",contentLabel:"Error",parentSelector:()=>document.querySelector("#app")||document.querySelector("editor-wc").shadowRoot.querySelector("#wc"),appElement:document.querySelector("editor-wc")||document.getElementById("app")||void 0},o.a.createElement("div",{className:"modal-content__header"},o.a.createElement("h2",{className:"modal-content__heading"},i("modal.error.heading"))),i("modal.error.".concat(t||s,".message"),{defaultValue:null})&&o.a.createElement("div",{className:"modal-content__body"},o.a.createElement("p",{className:"modal-content__text"},i("modal.error.".concat(t||s,".message")))),o.a.createElement("div",{className:"modal-content__buttons"},o.a.createElement(xc,{className:"btn--primary",buttonText:i("modal.close"),onClickHandler:l}))))};var XW=()=>{const e=Bn(),{t:t}=Gi(),n=Qn(e=>e.editor.project.project_type),r=Qn(e=>e.editor.project.components),s=Qn(e=>e.editor.renameFileModalShowing),{name:a,ext:l,fileKey:c}=Qn(e=>e.editor.modals.renameFile),u=r.map(e=>"".concat(e.name,".").concat(e.extension)),d=()=>e(Zr()),[h,p]=Object(i.useState)("".concat(a,".").concat(l)),f=()=>{const r=h.split(".")[0],i=h.split(".").slice(1).join(".");zW(h,n,u,e,t,()=>{e(Dr({key:c,extension:i,name:r})),d()},"".concat(a,".").concat(l))};return o.a.createElement(GW,{isOpen:s,closeModal:d,withCloseButton:!0,heading:t("filePanel.renameFileModal.heading"),inputs:[{label:t("filePanel.renameFileModal.inputLabel"),value:h,setValue:p,validateName:!0}],defaultCallback:f,buttons:[o.a.createElement(xc,{key:"rename",className:"btn--primary",buttonText:t("filePanel.renameFileModal.save"),onClickHandler:f}),o.a.createElement(xc,{key:"close",className:"btn--secondary",buttonText:t("filePanel.renameFileModal.cancel"),onClickHandler:d})]})};var YW=e=>{let{closeToast:t}=e;return o.a.createElement(xc,{className:"btn btn--tertiary",onClickHandler:t,ButtonIcon:()=>o.a.createElement(zh,{scaleFactor:.75})})},ZW=n(186),JW=n(187),KW=n(188),eX=(n(429),n(189)),tX=n.n(eX);var nX=e=>{const{assetsIdentifier:t,authKey:n,identifier:r,code:s,senseHatAlwaysEnabled:a=!1,instructions:l,withProjectbar:c=!1,projectNameEditable:u=!1,withSidebar:d=!1,sidebarOptions:h=[],theme:p,outputPanels:f=["text","visual"],embedded:m=!1,hostStyles:g,showSavePrompt:b=!1,loadRemixDisabled:v=!1,outputOnly:y=!1,outputSplitView:_=!1,useEditorStyles:S=!1}=e,x=Bn(),{t:w}=Gi(),[k,O]=Object(i.useState)(r);localStorage.setItem("authKey",n);const E=n?JSON.parse(localStorage.getItem(n)):null,A=Qn(e=>e.auth.user||E),[T,C]=Object(i.useState)(!A),[M,P]=Object(i.useState)(!!A),$=Qn(e=>e.editor.project),R=Qn(e=>e.editor.loading),I=Qn(e=>e.editor.justLoaded),D=Qn(e=>e.editor.remixLoadFailed),N=Qn(e=>e.editor.hasShownSavePrompt),j=Qn(e=>e.editor.saveTriggered),L=Qn(e=>e.editor.modals),B=Qn(e=>e.editor.errorModalShowing),F=Qn(e=>e.editor.newFileModalShowing),z=Qn(e=>e.editor.renameFileModalShowing),[U,Q]=Sg(["theme","fontSize"]),q=window.matchMedia("(prefers-color-scheme:dark)").matches?"dark":"light";return function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=Bn();Object(i.useEffect)(()=>{e&&t(vr())},[])}(m),Object(i.useEffect)(()=>{p&&(x(ai()),Q("theme",p,{path:"/"}))},[p,Q,x]),Object(i.useEffect)(()=>{D?(C(!0),P(!1)):(C(!A),P(!!A))},[A,$,D]),Object(i.useEffect)(()=>{"idle"===R&&$.identifier&&O($.identifier)},[R,$]),NW({projectIdentifier:k,assetsIdentifier:t,code:s,accessToken:null==A?void 0:A.access_token,loadRemix:M&&!v,loadCache:T,remixLoadFailed:D}),jW({user:A,project:$,justLoaded:I,hasShownSavePrompt:N||!b,saveTriggered:j}),Object(i.useEffect)(()=>{x(Ar(a))},[a,x]),Object(i.useEffect)(()=>{x(Cr(v))},[v,x]),Object(i.useEffect)(()=>{l&&x(jc(l))},[l,x]),"success"===R?o.a.createElement(o.a.Fragment,null,o.a.createElement(Mo.Provider,{value:{theme:U.theme||q,fontSize:U.fontSize||"small"}},o.a.createElement("style",null,JW.a.toString()),S&&o.a.createElement("style",null,KW.a.toString()),g&&o.a.createElement("style",null,g),o.a.createElement(tX.a,null,ZW.a.toString(),o.a.createElement("div",{id:"wc",className:"--".concat(U.theme||q)},o.a.createElement(ju,{enableMultiContainer:!0,containerId:"top-center",position:"top-center",className:"toast--top-center",closeButton:YW}),o.a.createElement(IW,{withProjectbar:c,nameEditable:u,withSidebar:d,sidebarOptions:h,outputOnly:y,outputPanels:f,outputSplitView:_}),B&&o.a.createElement(WW,null),F&&o.a.createElement(VW,null),z&&L.renameFile&&o.a.createElement(XW,null))))):o.a.createElement(o.a.Fragment,null,o.a.createElement("p",null,w("webComponent.loading")))};const rX={setUser:(e,t)=>{e.user=t.payload},removeUser:e=>{e.user=null}},iX=Object(qn.c)({name:"auth",initialState:{},reducers:rX}),{setUser:oX,removeUser:sX}=iX.actions;var aX=iX.reducer;var lX=e=>t=>n=>r=>{if(r.type.startsWith("editor")){const n=localStorage.getItem("authKey");if(n){const r=JSON.parse(localStorage.getItem(n));JSON.stringify(t.getState().auth.user)!==JSON.stringify(r)&&t.dispatch(e(r))}}n(r)};var cX,uX=Object(qn.a)({reducer:{editor:ci,instructions:Lc,auth:aX},middleware:e=>e({serializableCheck:{ignoredActions:["redux-oidc/USER_FOUND","redux-odic/SILENT_RENEW_ERROR"],ignoredPaths:["auth.user"]}}).concat(lX(oX))}),dX=n(190),hX=n.n(dX);(cX={dsn:"https://a6d7b79c7a474a6499ace73acf792a83@o17504.ingest.sentry.io/4504055099621376",integrations:[new _n],environment:"production",tracesSampleRate:1})._metadata=cX._metadata||{},cX._metadata.sdk=cX._metadata.sdk||{name:"sentry.javascript.react",packages:[{name:"npm:@sentry/react",version:"7.16.0"}],version:"7.16.0"},Nt(cX);class pX extends HTMLElement{constructor(){super(...arguments),this.componentAttributes={},this.componentProperties={}}connectedCallback(){this.mountReactApp()}disconnectedCallback(){a.a.unmountComponentAtNode(this.mountPoint)}static get observedAttributes(){return["host_styles","assets_identifier","auth_key","identifier","code","sense_hat_always_enabled","instructions","with_projectbar","project_name_editable","with_sidebar","output_only","output_panels","sidebar_options","theme","embedded","show_save_prompt","load_remix_disabled","output_split_view","use_editor_styles"]}attributeChangedCallback(e,t,n){let r;r=["sense_hat_always_enabled","with_sidebar","with_projectbar","project_name_editable","show_save_prompt","load_remix_disabled","output_only","embedded","output_split_view","use_editor_styles"].includes(e)?"false"!==n:["instructions","sidebar_options","host_styles","output_panels"].includes(e)?JSON.parse(n):n,this.componentAttributes[hX()(e)]=r,this.mountReactApp()}get editorCode(){return uX.getState().editor.project.components[0].content}get menuItems(){return this.componentProperties.menuItems}set menuItems(e){console.log("menu items set"),this.componentProperties.menuItems=e,this.mountReactApp()}stopCode(){const e=uX.getState();(e.editor.codeRunTriggered||e.editor.drawTriggered)&&(uX.dispatch(Mr()),uX.dispatch(Pr()))}runCode(){uX.dispatch($r())}rerunCode(){this.stopCode(),new Promise(e=>{let t=setInterval(()=>{let n=uX.getState();n.codeRunTriggered||n.drawTriggered||(clearInterval(t),e())},50)}).then(()=>{this.runCode()})}reactProps(){return{...this.componentAttributes,...this.componentProperties}}mountReactApp(){this.mountPoint||(this.mountPoint=document.createElement("div"),this.mountPoint.setAttribute("id","root"),this.mountPoint.setAttribute("part","editor-root"),this.attachShadow({mode:"open"}).appendChild(this.mountPoint),this.root=l.createRoot(this.mountPoint)),this.root.render(o.a.createElement(o.a.StrictMode,null,o.a.createElement(Tn,{store:uX},o.a.createElement(gc,null,o.a.createElement(nX,this.reactProps())))))}}window.customElements.define("editor-wc",pX)},function(e,t,n){"use strict";n.r(t),n.d(t,"compile",(function(){return Wt})),n.d(t,"_compileUnsafe",(function(){return Xt})),n.d(t,"_compileToken",(function(){return Yt})),n.d(t,"prepareContext",(function(){return Jt})),n.d(t,"selectAll",(function(){return Kt})),n.d(t,"selectOne",(function(){return en})),n.d(t,"is",(function(){return tn})),n.d(t,"filters",(function(){return wt})),n.d(t,"pseudos",(function(){return Ot})),n.d(t,"aliases",(function(){return At}));var r,i={};n.r(i),n.d(i,"getOuterHTML",(function(){return te})),n.d(i,"getInnerHTML",(function(){return ne})),n.d(i,"getText",(function(){return re})),n.d(i,"textContent",(function(){return ie})),n.d(i,"innerText",(function(){return oe})),n.d(i,"getChildren",(function(){return se})),n.d(i,"getParent",(function(){return ae})),n.d(i,"getSiblings",(function(){return le})),n.d(i,"getAttributeValue",(function(){return ce})),n.d(i,"hasAttrib",(function(){return ue})),n.d(i,"getName",(function(){return de})),n.d(i,"nextElementSibling",(function(){return he})),n.d(i,"prevElementSibling",(function(){return pe})),n.d(i,"removeElement",(function(){return fe})),n.d(i,"replaceElement",(function(){return me})),n.d(i,"appendChild",(function(){return ge})),n.d(i,"append",(function(){return be})),n.d(i,"prependChild",(function(){return ve})),n.d(i,"prepend",(function(){return ye})),n.d(i,"filter",(function(){return _e})),n.d(i,"find",(function(){return Se})),n.d(i,"findOneChild",(function(){return xe})),n.d(i,"findOne",(function(){return we})),n.d(i,"existsOne",(function(){return ke})),n.d(i,"findAll",(function(){return Oe})),n.d(i,"testElement",(function(){return Me})),n.d(i,"getElements",(function(){return Pe})),n.d(i,"getElementById",(function(){return $e})),n.d(i,"getElementsByTagName",(function(){return Re})),n.d(i,"getElementsByTagType",(function(){return Ie})),n.d(i,"removeSubsets",(function(){return De})),n.d(i,"DocumentPosition",(function(){return Ne})),n.d(i,"compareDocumentPosition",(function(){return je})),n.d(i,"uniqueSort",(function(){return Le})),n.d(i,"getFeed",(function(){return Be})),n.d(i,"isTag",(function(){return f})),n.d(i,"isCDATA",(function(){return m})),n.d(i,"isText",(function(){return g})),n.d(i,"isComment",(function(){return b})),n.d(i,"isDocument",(function(){return v})),n.d(i,"hasChildren",(function(){return y})),function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"}(r||(r={}));const o=r.Root,s=r.Text,a=r.Directive,l=r.Comment,c=r.Script,u=r.Style,d=r.Tag,h=r.CDATA,p=r.Doctype;function f(e){return(t=e).type===r.Tag||t.type===r.Script||t.type===r.Style;var t}function m(e){return e.type===r.CDATA}function g(e){return e.type===r.Text}function b(e){return e.type===r.Comment}function v(e){return e.type===r.Root}function y(e){return Object.prototype.hasOwnProperty.call(e,"children")}var _,S=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),x=new Uint16Array("Ȁaglq\tɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));const w=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),k=null!==(_=String.fromCodePoint)&&void 0!==_?_:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|1023&e),t+=String.fromCharCode(e),t};function O(e){var t;return e>=55296&&e<=57343||e>1114111?65533:null!==(t=w.get(e))&&void 0!==t?t:e}var E;!function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"}(E||(E={}));var A,T,C;function M(e){return e>=E.ZERO&&e<=E.NINE}function P(e){return e===E.EQUALS||function(e){return e>=E.UPPER_A&&e<=E.UPPER_Z||e>=E.LOWER_A&&e<=E.LOWER_Z||M(e)}(e)}!function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"}(A||(A={})),function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"}(T||(T={})),function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"}(C||(C={}));class ${constructor(e,t,n){this.decodeTree=e,this.emitCodePoint=t,this.errors=n,this.state=T.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=C.Strict}startEntity(e){this.decodeMode=e,this.state=T.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(e,t){switch(this.state){case T.EntityStart:return e.charCodeAt(t)===E.NUM?(this.state=T.NumericStart,this.consumed+=1,this.stateNumericStart(e,t+1)):(this.state=T.NamedEntity,this.stateNamedEntity(e,t));case T.NumericStart:return this.stateNumericStart(e,t);case T.NumericDecimal:return this.stateNumericDecimal(e,t);case T.NumericHex:return this.stateNumericHex(e,t);case T.NamedEntity:return this.stateNamedEntity(e,t)}}stateNumericStart(e,t){return t>=e.length?-1:(32|e.charCodeAt(t))===E.LOWER_X?(this.state=T.NumericHex,this.consumed+=1,this.stateNumericHex(e,t+1)):(this.state=T.NumericDecimal,this.stateNumericDecimal(e,t))}addToNumericResult(e,t,n,r){if(t!==n){const i=n-t;this.result=this.result*Math.pow(r,i)+parseInt(e.substr(t,i),r),this.consumed+=i}}stateNumericHex(e,t){const n=t;for(;t=E.UPPER_A&&r<=E.UPPER_F||r>=E.LOWER_A&&r<=E.LOWER_F)))return this.addToNumericResult(e,n,t,16),this.emitNumericEntity(i,3);t+=1}var r;return this.addToNumericResult(e,n,t,16),-1}stateNumericDecimal(e,t){const n=t;for(;t>14;for(;t>14,0!==i){if(o===E.SEMI)return this.emitNamedEntityData(this.treeIndex,i,this.consumed+this.excess);this.decodeMode!==C.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var e;const{result:t,decodeTree:n}=this,r=(n[t]&A.VALUE_LENGTH)>>14;return this.emitNamedEntityData(t,r,this.consumed),null===(e=this.errors)||void 0===e||e.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(e,t,n){const{decodeTree:r}=this;return this.emitCodePoint(1===t?r[e]&~A.VALUE_LENGTH:r[e+1],n),3===t&&this.emitCodePoint(r[e+2],n),n}end(){var e;switch(this.state){case T.NamedEntity:return 0===this.result||this.decodeMode===C.Attribute&&this.result!==this.treeIndex?0:this.emitNotTerminatedNamedEntity();case T.NumericDecimal:return this.emitNumericEntity(0,2);case T.NumericHex:return this.emitNumericEntity(0,3);case T.NumericStart:return null===(e=this.errors)||void 0===e||e.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case T.EntityStart:return 0}}}function R(e){let t="";const n=new $(e,e=>t+=k(e));return function(e,r){let i=0,o=0;for(;(o=e.indexOf("&",o))>=0;){t+=e.slice(i,o),n.startEntity(r);const s=n.write(e,o+1);if(s<0){i=o+n.end();break}i=o+s,o=0===s?i+1:i}const s=t+e.slice(i);return t="",s}}function I(e,t,n,r){const i=(t&A.BRANCH_LENGTH)>>7,o=t&A.JUMP_TABLE;if(0===i)return 0!==o&&r===o?n:-1;if(o){const t=r-o;return t<0||t>=i?-1:e[n+t]-1}let s=n,a=s+i-1;for(;s<=a;){const t=s+a>>>1,n=e[t];if(nr))return e[t+i];a=t-1}}return-1}R(S),R(x);function D(e){for(let t=1;t$\x80-\uFFFF]/g,j=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]),L=null!=String.prototype.codePointAt?(e,t)=>e.codePointAt(t):(e,t)=>55296==(64512&e.charCodeAt(t))?1024*(e.charCodeAt(t)-55296)+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t);function B(e){let t,n="",r=0;for(;null!==(t=N.exec(e));){const i=t.index,o=e.charCodeAt(i),s=j.get(o);void 0!==s?(n+=e.substring(r,i)+s,r=i+1):(n+=`${e.substring(r,i)}&#x${L(e,i).toString(16)};`,r=N.lastIndex+=Number(55296==(64512&o)))}return n+e.substr(r)}function F(e,t){return function(n){let r,i=0,o="";for(;r=e.exec(n);)i!==r.index&&(o+=n.substring(i,r.index)),o+=t.get(r[0].charCodeAt(0)),i=r.index+1;return o+n.substring(i)}}F(/[&<>'"]/g,j);const z=F(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),U=F(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]));var Q,q;!function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"}(Q||(Q={})),function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"}(q||(q={}));const H=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),G=new Map(["definitionURL","attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),V=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);function W(e){return e.replace(/"/g,""")}const X=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);function Y(e,t={}){const n="length"in e?e:[e];let r="";for(let e=0;e`;case l:return function(e){return`\x3c!--${e.data}--\x3e`}(e);case h:return function(e){return``}(e);case c:case u:case d:return function(e,t){var n;"foreign"===t.xmlMode&&(e.name=null!==(n=H.get(e.name))&&void 0!==n?n:e.name,e.parent&&K.has(e.parent.name)&&(t={...t,xmlMode:!1}));!t.xmlMode&&ee.has(e.name)&&(t={...t,xmlMode:"foreign"});let r="<"+e.name;const i=function(e,t){var n;if(!e)return;const r=!1===(null!==(n=t.encodeEntities)&&void 0!==n?n:t.decodeEntities)?W:t.xmlMode||"utf8"!==t.encodeEntities?B:z;return Object.keys(e).map(n=>{var i,o;const s=null!==(i=e[n])&&void 0!==i?i:"";return"foreign"===t.xmlMode&&(n=null!==(o=G.get(n))&&void 0!==o?o:n),t.emptyAttrs||t.xmlMode||""!==s?`${n}="${r(s)}"`:n}).join(" ")}(e.attribs,t);i&&(r+=" "+i);0===e.children.length&&(t.xmlMode?!1!==t.selfClosingTags:t.selfClosingTags&&X.has(e.name))?(t.xmlMode||(r+=" "),r+="/>"):(r+=">",e.children.length>0&&(r+=Y(e.children,t)),!t.xmlMode&&X.has(e.name)||(r+=``));return r}(e,t);case s:return function(e,t){var n;let r=e.data||"";!1===(null!==(n=t.encodeEntities)&&void 0!==n?n:t.decodeEntities)||!t.xmlMode&&e.parent&&V.has(e.parent.name)||(r=t.xmlMode||"utf8"!==t.encodeEntities?B(r):U(r));return r}(e,t)}}const K=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),ee=new Set(["svg","math"]);function te(e,t){return Z(e,t)}function ne(e,t){return y(e)?e.children.map(e=>te(e,t)).join(""):""}function re(e){return Array.isArray(e)?e.map(re).join(""):f(e)?"br"===e.name?"\n":re(e.children):m(e)?re(e.children):g(e)?e.data:""}function ie(e){return Array.isArray(e)?e.map(ie).join(""):y(e)&&!b(e)?ie(e.children):g(e)?e.data:""}function oe(e){return Array.isArray(e)?e.map(oe).join(""):y(e)&&(e.type===r.Tag||m(e))?oe(e.children):g(e)?e.data:""}function se(e){return y(e)?e.children:[]}function ae(e){return e.parent||null}function le(e){const t=ae(e);if(null!=t)return se(t);const n=[e];let{prev:r,next:i}=e;for(;null!=r;)n.unshift(r),({prev:r}=r);for(;null!=i;)n.push(i),({next:i}=i);return n}function ce(e,t){var n;return null===(n=e.attribs)||void 0===n?void 0:n[t]}function ue(e,t){return null!=e.attribs&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&null!=e.attribs[t]}function de(e){return e.name}function he(e){let{next:t}=e;for(;null!==t&&!f(t);)({next:t}=t);return t}function pe(e){let{prev:t}=e;for(;null!==t&&!f(t);)({prev:t}=t);return t}function fe(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){const t=e.parent.children,n=t.lastIndexOf(e);n>=0&&t.splice(n,1)}e.next=null,e.prev=null,e.parent=null}function me(e,t){const n=t.prev=e.prev;n&&(n.next=t);const r=t.next=e.next;r&&(r.prev=t);const i=t.parent=e.parent;if(i){const n=i.children;n[n.lastIndexOf(e)]=t,e.parent=null}}function ge(e,t){if(fe(t),t.next=null,t.parent=e,e.children.push(t)>1){const n=e.children[e.children.length-2];n.next=t,t.prev=n}else t.prev=null}function be(e,t){fe(t);const{parent:n}=e,r=e.next;if(t.next=r,t.prev=e,e.next=t,t.parent=n,r){if(r.prev=t,n){const e=n.children;e.splice(e.lastIndexOf(r),0,t)}}else n&&n.children.push(t)}function ve(e,t){if(fe(t),t.parent=e,t.prev=null,1!==e.children.unshift(t)){const n=e.children[1];n.prev=t,t.next=n}else t.next=null}function ye(e,t){fe(t);const{parent:n}=e;if(n){const r=n.children;r.splice(r.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=n,t.prev=e.prev,t.next=e,e.prev=t}function _e(e,t,n=!0,r=1/0){return Se(e,Array.isArray(t)?t:[t],n,r)}function Se(e,t,n,r){const i=[],o=[t],s=[0];for(;;){if(s[0]>=o[0].length){if(1===s.length)return i;o.shift(),s.shift();continue}const t=o[0][s[0]++];if(e(t)&&(i.push(t),--r<=0))return i;n&&y(t)&&t.children.length>0&&(s.unshift(0),o.unshift(t.children))}}function xe(e,t){return t.find(e)}function we(e,t,n=!0){let r=null;for(let i=0;i0&&(r=we(e,o.children,!0)))}return r}function ke(e,t){return t.some(t=>f(t)&&(e(t)||ke(e,t.children)))}function Oe(e,t){const n=[],r=[t],i=[0];for(;;){if(i[0]>=r[0].length){if(1===r.length)return n;r.shift(),i.shift();continue}const t=r[0][i[0]++];f(t)&&(e(t)&&n.push(t),t.children.length>0&&(i.unshift(0),r.unshift(t.children)))}}const Ee={tag_name:e=>"function"==typeof e?t=>f(t)&&e(t.name):"*"===e?f:t=>f(t)&&t.name===e,tag_type:e=>"function"==typeof e?t=>e(t.type):t=>t.type===e,tag_contains:e=>"function"==typeof e?t=>g(t)&&e(t.data):t=>g(t)&&t.data===e};function Ae(e,t){return"function"==typeof t?n=>f(n)&&t(n.attribs[e]):n=>f(n)&&n.attribs[e]===t}function Te(e,t){return n=>e(n)||t(n)}function Ce(e){const t=Object.keys(e).map(t=>{const n=e[t];return Object.prototype.hasOwnProperty.call(Ee,t)?Ee[t](n):Ae(t,n)});return 0===t.length?null:t.reduce(Te)}function Me(e,t){const n=Ce(e);return!n||n(t)}function Pe(e,t,n,r=1/0){const i=Ce(e);return i?_e(i,t,n,r):[]}function $e(e,t,n=!0){return Array.isArray(t)||(t=[t]),we(Ae("id",e),t,n)}function Re(e,t,n=!0,r=1/0){return _e(Ee.tag_name(e),t,n,r)}function Ie(e,t,n=!0,r=1/0){return _e(Ee.tag_type(e),t,n,r)}function De(e){let t=e.length;for(;--t>=0;){const n=e[t];if(t>0&&e.lastIndexOf(n,t-1)>=0)e.splice(t,1);else for(let r=n.parent;r;r=r.parent)if(e.includes(r)){e.splice(t,1);break}}return e}var Ne;function je(e,t){const n=[],r=[];if(e===t)return 0;let i=y(e)?e:e.parent;for(;i;)n.unshift(i),i=i.parent;for(i=y(t)?t:t.parent;i;)r.unshift(i),i=i.parent;const o=Math.min(n.length,r.length);let s=0;for(;sl.indexOf(u)?a===t?Ne.FOLLOWING|Ne.CONTAINED_BY:Ne.FOLLOWING:a===e?Ne.PRECEDING|Ne.CONTAINS:Ne.PRECEDING}function Le(e){return(e=e.filter((e,t,n)=>!n.includes(e,t+1))).sort((e,t)=>{const n=je(e,t);return n&Ne.PRECEDING?-1:n&Ne.FOLLOWING?1:0}),e}function Be(e){const t=Qe(Ge,e);return t?"feed"===t.name?function(e){var t;const n=e.children,r={type:"atom",items:Re("entry",n).map(e=>{var t;const{children:n}=e,r={media:Ue(n)};He(r,"id","id",n),He(r,"title","title",n);const i=null===(t=Qe("link",n))||void 0===t?void 0:t.attribs.href;i&&(r.link=i);const o=qe("summary",n)||qe("content",n);o&&(r.description=o);const s=qe("updated",n);return s&&(r.pubDate=new Date(s)),r})};He(r,"id","id",n),He(r,"title","title",n);const i=null===(t=Qe("link",n))||void 0===t?void 0:t.attribs.href;i&&(r.link=i);He(r,"description","subtitle",n);const o=qe("updated",n);o&&(r.updated=new Date(o));return He(r,"author","email",n,!0),r}(t):function(e){var t,n;const r=null!==(n=null===(t=Qe("channel",e.children))||void 0===t?void 0:t.children)&&void 0!==n?n:[],i={type:e.name.substr(0,3),id:"",items:Re("item",e.children).map(e=>{const{children:t}=e,n={media:Ue(t)};He(n,"id","guid",t),He(n,"title","title",t),He(n,"link","link",t),He(n,"description","description",t);const r=qe("pubDate",t)||qe("dc:date",t);return r&&(n.pubDate=new Date(r)),n})};He(i,"title","title",r),He(i,"link","link",r),He(i,"description","description",r);const o=qe("lastBuildDate",r);o&&(i.updated=new Date(o));return He(i,"author","managingEditor",r,!0),i}(t):null}!function(e){e[e.DISCONNECTED=1]="DISCONNECTED",e[e.PRECEDING=2]="PRECEDING",e[e.FOLLOWING=4]="FOLLOWING",e[e.CONTAINS=8]="CONTAINS",e[e.CONTAINED_BY=16]="CONTAINED_BY"}(Ne||(Ne={}));const Fe=["url","type","lang"],ze=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function Ue(e){return Re("media:content",e).map(e=>{const{attribs:t}=e,n={medium:t.medium,isDefault:!!t.isDefault};for(const e of Fe)t[e]&&(n[e]=t[e]);for(const e of ze)t[e]&&(n[e]=parseInt(t[e],10));return t.expression&&(n.expression=t.expression),n})}function Qe(e,t){return Re(e,t,!0,1)[0]}function qe(e,t,n=!1){return ie(Re(e,t,n,1)).trim()}function He(e,t,n,r,i=!1){const o=qe(n,r,i);o&&(e[t]=o)}function Ge(e){return"rss"===e||"feed"===e||"rdf:RDF"===e}var Ve,We=n(6),Xe=n.n(We);!function(e){e.Attribute="attribute",e.Pseudo="pseudo",e.PseudoElement="pseudo-element",e.Tag="tag",e.Universal="universal",e.Adjacent="adjacent",e.Child="child",e.Descendant="descendant",e.Parent="parent",e.Sibling="sibling",e.ColumnCombinator="column-combinator"}(Ve||(Ve={}));var Ye;!function(e){e.Any="any",e.Element="element",e.End="end",e.Equals="equals",e.Exists="exists",e.Hyphen="hyphen",e.Not="not",e.Start="start"}(Ye||(Ye={}));const Ze=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,Je=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,Ke=new Map([[126,Ye.Element],[94,Ye.Start],[36,Ye.End],[42,Ye.Any],[33,Ye.Not],[124,Ye.Hyphen]]),et=new Set(["has","not","matches","is","where","host","host-context"]);const tt=new Set(["contains","icontains"]);function nt(e,t,n){const r=parseInt(t,16)-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)}function rt(e){return e.replace(Je,nt)}function it(e){return 39===e||34===e}function ot(e){return 32===e||9===e||10===e||12===e||13===e}function st(e){const t=[],n=function e(t,n,r){let i=[];function o(e){const t=n.slice(r+e).match(Ze);if(!t)throw new Error("Expected name, found "+n.slice(r));const[i]=t;return r+=e+i.length,rt(i)}function s(e){for(r+=e;r0&&r0&&function(e){switch(e.type){case Ve.Adjacent:case Ve.Child:case Ve.Descendant:case Ve.Parent:case Ve.Sibling:case Ve.ColumnCombinator:return!0;default:return!1}}(i[i.length-1]))throw new Error("Did not expect successive traversals.")}function u(e){i.length>0&&i[i.length-1].type===Ve.Descendant?i[i.length-1].type=e:(c(),i.push({type:e}))}function d(e,t){i.push({type:Ve.Attribute,name:e,action:t,value:o(1),namespace:null,ignoreCase:"quirks"})}function h(){if(i.length&&i[i.length-1].type===Ve.Descendant&&i.pop(),0===i.length)throw new Error("Empty sub-selector");t.push(i)}if(s(0),n.length===r)return r;e:for(;r=0&&r>=1)):e.type===Ve.Pseudo&&(e.data?"has"===e.name||"contains"===e.name?r=0:Array.isArray(e.data)?(r=Math.min(...e.data.map(e=>Math.min(...e.map(dt)))),r<0&&(r=0)):r=2:r=3),r}const ht=/[-[\]{}()*+?.,\\^$|#\s]/g;function pt(e){return e.replace(ht,"\\$&")}const ft=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function mt(e,t){return"boolean"==typeof e.ignoreCase?e.ignoreCase:"quirks"===e.ignoreCase?!!t.quirksMode:!t.xmlMode&&ft.has(e.name)}const gt={equals(e,t,n){const{adapter:r}=n,{name:i}=t;let{value:o}=t;return mt(t,n)?(o=o.toLowerCase(),t=>{const n=r.getAttributeValue(t,i);return null!=n&&n.length===o.length&&n.toLowerCase()===o&&e(t)}):t=>r.getAttributeValue(t,i)===o&&e(t)},hyphen(e,t,n){const{adapter:r}=n,{name:i}=t;let{value:o}=t;const s=o.length;return mt(t,n)?(o=o.toLowerCase(),function(t){const n=r.getAttributeValue(t,i);return null!=n&&(n.length===s||"-"===n.charAt(s))&&n.substr(0,s).toLowerCase()===o&&e(t)}):function(t){const n=r.getAttributeValue(t,i);return null!=n&&(n.length===s||"-"===n.charAt(s))&&n.substr(0,s)===o&&e(t)}},element(e,t,n){const{adapter:r}=n,{name:i,value:o}=t;if(/\s/.test(o))return Xe.a.falseFunc;const s=new RegExp(`(?:^|\\s)${pt(o)}(?:$|\\s)`,mt(t,n)?"i":"");return function(t){const n=r.getAttributeValue(t,i);return null!=n&&n.length>=o.length&&s.test(n)&&e(t)}},exists:(e,{name:t},{adapter:n})=>r=>n.hasAttrib(r,t)&&e(r),start(e,t,n){const{adapter:r}=n,{name:i}=t;let{value:o}=t;const s=o.length;return 0===s?Xe.a.falseFunc:mt(t,n)?(o=o.toLowerCase(),t=>{const n=r.getAttributeValue(t,i);return null!=n&&n.length>=s&&n.substr(0,s).toLowerCase()===o&&e(t)}):t=>{var n;return!!(null===(n=r.getAttributeValue(t,i))||void 0===n?void 0:n.startsWith(o))&&e(t)}},end(e,t,n){const{adapter:r}=n,{name:i}=t;let{value:o}=t;const s=-o.length;return 0===s?Xe.a.falseFunc:mt(t,n)?(o=o.toLowerCase(),t=>{var n;return(null===(n=r.getAttributeValue(t,i))||void 0===n?void 0:n.substr(s).toLowerCase())===o&&e(t)}):t=>{var n;return!!(null===(n=r.getAttributeValue(t,i))||void 0===n?void 0:n.endsWith(o))&&e(t)}},any(e,t,n){const{adapter:r}=n,{name:i,value:o}=t;if(""===o)return Xe.a.falseFunc;if(mt(t,n)){const t=new RegExp(pt(o),"i");return function(n){const s=r.getAttributeValue(n,i);return null!=s&&s.length>=o.length&&t.test(s)&&e(n)}}return t=>{var n;return!!(null===(n=r.getAttributeValue(t,i))||void 0===n?void 0:n.includes(o))&&e(t)}},not(e,t,n){const{adapter:r}=n,{name:i}=t;let{value:o}=t;return""===o?t=>!!r.getAttributeValue(t,i)&&e(t):mt(t,n)?(o=o.toLowerCase(),t=>{const n=r.getAttributeValue(t,i);return(null==n||n.length!==o.length||n.toLowerCase()!==o)&&e(t)}):t=>r.getAttributeValue(t,i)!==o&&e(t)}},bt=new Set([9,10,12,13,32]),vt="0".charCodeAt(0),yt="9".charCodeAt(0);function _t(e){if("even"===(e=e.trim().toLowerCase()))return[2,0];if("odd"===e)return[2,1];let t=0,n=0,r=o(),i=s();if(t=vt&&e.charCodeAt(t)<=yt;)r=10*r+(e.charCodeAt(t)-vt),t++;return t===n?null:r}function a(){for(;te<=n;if(0===t)return e=>e===n;if(1===t)return n<0?Xe.a.trueFunc:e=>e>=n;const r=Math.abs(t),i=(n%r+r)%r;return t>1?e=>e>=n&&e%r===i:e=>e<=n&&e%r===i}(_t(e))}function xt(e,t){return n=>{const r=t.getParent(n);return null!=r&&t.isTag(r)&&e(n)}}const wt={contains:(e,t,{adapter:n})=>function(r){return e(r)&&n.getText(r).includes(t)},icontains(e,t,{adapter:n}){const r=t.toLowerCase();return function(t){return e(t)&&n.getText(t).toLowerCase().includes(r)}},"nth-child"(e,t,{adapter:n,equals:r}){const i=St(t);return i===Xe.a.falseFunc?Xe.a.falseFunc:i===Xe.a.trueFunc?xt(e,n):function(t){const o=n.getSiblings(t);let s=0;for(let e=0;e=0&&!r(t,o[e]);e--)n.isTag(o[e])&&s++;return i(s)&&e(t)}},"nth-of-type"(e,t,{adapter:n,equals:r}){const i=St(t);return i===Xe.a.falseFunc?Xe.a.falseFunc:i===Xe.a.trueFunc?xt(e,n):function(t){const o=n.getSiblings(t);let s=0;for(let e=0;e=0;e--){const i=o[e];if(r(t,i))break;n.isTag(i)&&n.getName(i)===n.getName(t)&&s++}return i(s)&&e(t)}},root:(e,t,{adapter:n})=>t=>{const r=n.getParent(t);return(null==r||!n.isTag(r))&&e(t)},scope(e,t,n,r){const{equals:i}=n;return r&&0!==r.length?1===r.length?t=>i(r[0],t)&&e(t):t=>r.includes(t)&&e(t):wt.root(e,t,n)},hover:kt("isHovered"),visited:kt("isVisited"),active:kt("isActive")};function kt(e){return function(t,n,{adapter:r}){const i=r[e];return"function"!=typeof i?Xe.a.falseFunc:function(e){return i(e)&&t(e)}}}const Ot={empty:(e,{adapter:t})=>!t.getChildren(e).some(e=>t.isTag(e)||""!==t.getText(e)),"first-child"(e,{adapter:t,equals:n}){if(t.prevElementSibling)return null==t.prevElementSibling(e);const r=t.getSiblings(e).find(e=>t.isTag(e));return null!=r&&n(e,r)},"last-child"(e,{adapter:t,equals:n}){const r=t.getSiblings(e);for(let i=r.length-1;i>=0;i--){if(n(e,r[i]))return!0;if(t.isTag(r[i]))break}return!1},"first-of-type"(e,{adapter:t,equals:n}){const r=t.getSiblings(e),i=t.getName(e);for(let o=0;o=0;o--){const s=r[o];if(n(e,s))return!0;if(t.isTag(s)&&t.getName(s)===i)break}return!1},"only-of-type"(e,{adapter:t,equals:n}){const r=t.getName(e);return t.getSiblings(e).every(i=>n(e,i)||!t.isTag(i)||t.getName(i)!==r)},"only-child":(e,{adapter:t,equals:n})=>t.getSiblings(e).every(r=>n(e,r)||!t.isTag(r))};function Et(e,t,n,r){if(null===n){if(e.length>r)throw new Error(`Pseudo-class :${t} requires an argument`)}else if(e.length===r)throw new Error(`Pseudo-class :${t} doesn't have any arguments`)}const At={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:":is(\n :is(button, input, select, textarea, optgroup, option)[disabled],\n optgroup[disabled] > option,\n fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *)\n )",enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"},Tt={};function Ct(e,t){return e===Xe.a.falseFunc?Xe.a.falseFunc:n=>t.isTag(n)&&e(n)}function Mt(e,t){const n=t.getSiblings(e);if(n.length<=1)return[];const r=n.indexOf(e);return r<0||r===n.length-1?[]:n.slice(r+1).filter(t.isTag)}function Pt(e){return{xmlMode:!!e.xmlMode,lowerCaseAttributeNames:!!e.lowerCaseAttributeNames,lowerCaseTags:!!e.lowerCaseTags,quirksMode:!!e.quirksMode,cacheResults:!!e.cacheResults,pseudos:e.pseudos,adapter:e.adapter,equals:e.equals}}const $t=(e,t,n,r,i)=>{const o=i(t,Pt(n),r);return o===Xe.a.trueFunc?e:o===Xe.a.falseFunc?Xe.a.falseFunc:t=>o(t)&&e(t)},Rt={is:$t,matches:$t,where:$t,not(e,t,n,r,i){const o=i(t,Pt(n),r);return o===Xe.a.falseFunc?e:o===Xe.a.trueFunc?Xe.a.falseFunc:t=>!o(t)&&e(t)},has(e,t,n,r,i){const{adapter:o}=n,s=Pt(n);s.relativeSelector=!0;const a=t.some(e=>e.some(lt))?[Tt]:void 0,l=i(t,s,a);if(l===Xe.a.falseFunc)return Xe.a.falseFunc;const c=Ct(l,o);if(a&&l!==Xe.a.trueFunc){const{shouldTestNextSiblings:t=!1}=l;return n=>{if(!e(n))return!1;a[0]=n;const r=o.getChildren(n),i=t?[...r,...Mt(n,o)]:r;return o.existsOne(c,i)}}return t=>e(t)&&o.existsOne(c,o.getChildren(t))}};function It(e,t){const n=t.getParent(e);return n&&t.isTag(n)?n:null}function Dt(e,t,n,r,i){const{adapter:o,equals:s}=n;switch(t.type){case Ve.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case Ve.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case Ve.Attribute:if(null!=t.namespace)throw new Error("Namespaced attributes are not yet supported by css-select");return n.xmlMode&&!n.lowerCaseAttributeNames||(t.name=t.name.toLowerCase()),gt[t.action](e,t,n);case Ve.Pseudo:return function(e,t,n,r,i){var o;const{name:s,data:a}=t;if(Array.isArray(a)){if(!(s in Rt))throw new Error(`Unknown pseudo-class :${s}(${a})`);return Rt[s](e,a,n,r,i)}const l=null===(o=n.pseudos)||void 0===o?void 0:o[s],c="string"==typeof l?l:At[s];if("string"==typeof c){if(null!=a)throw new Error(`Pseudo ${s} doesn't have any arguments`);const t=st(c);return Rt.is(e,t,n,r,i)}if("function"==typeof l)return Et(l,s,a,1),t=>l(t,a)&&e(t);if(s in wt)return wt[s](e,a,n,r);if(s in Ot){const t=Ot[s];return Et(t,s,a,2),r=>t(r,n,a)&&e(r)}throw new Error("Unknown pseudo-class :"+s)}(e,t,n,r,i);case Ve.Tag:{if(null!=t.namespace)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:r}=t;return n.xmlMode&&!n.lowerCaseTags||(r=r.toLowerCase()),function(t){return o.getName(t)===r&&e(t)}}case Ve.Descendant:{if(!1===n.cacheResults||"undefined"==typeof WeakSet)return function(t){let n=t;for(;n=It(n,o);)if(e(n))return!0;return!1};const t=new WeakSet;return function(n){let r=n;for(;r=It(r,o);)if(!t.has(r)){if(o.isTag(r)&&e(r))return!0;t.add(r)}return!1}}case"_flexibleDescendant":return function(t){let n=t;do{if(e(n))return!0}while(n=It(n,o));return!1};case Ve.Parent:return function(t){return o.getChildren(t).some(t=>o.isTag(t)&&e(t))};case Ve.Child:return function(t){const n=o.getParent(t);return null!=n&&o.isTag(n)&&e(n)};case Ve.Sibling:return function(t){const n=o.getSiblings(t);for(let r=0;re.some(Lt)))}const Bt={type:Ve.Descendant},Ft={type:"_flexibleDescendant"},zt={type:Ve.Pseudo,name:"scope",data:null};function Ut(e,t,n){var r;e.forEach(ut),n=null!==(r=t.context)&&void 0!==r?r:n;const i=Array.isArray(n),o=n&&(Array.isArray(n)?n:[n]);if(!1!==t.relativeSelector)!function(e,{adapter:t},n){const r=!!(null==n?void 0:n.every(e=>{const n=t.isTag(e)&&t.getParent(e);return e===Tt||n&&t.isTag(n)}));for(const t of e){if(t.length>0&<(t[0])&&t[0].type!==Ve.Descendant);else{if(!r||t.some(Lt))continue;t.unshift(Bt)}t.unshift(zt)}}(e,t,o);else if(e.some(e=>e.length>0&<(e[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let s=!1;const a=e.map(e=>{if(e.length>=2){const[t,n]=e;t.type!==Ve.Pseudo||"scope"!==t.name||(i&&n.type===Ve.Descendant?e[1]=Ft:n.type!==Ve.Adjacent&&n.type!==Ve.Sibling||(s=!0))}return function(e,t,n){var r;return e.reduce((e,r)=>e===Xe.a.falseFunc?Xe.a.falseFunc:Dt(e,r,t,n,Ut),null!==(r=t.rootFunc)&&void 0!==r?r:Xe.a.trueFunc)}(e,t,o)}).reduce(Qt,Xe.a.falseFunc);return a.shouldTestNextSiblings=s,a}function Qt(e,t){return t===Xe.a.falseFunc||e===Xe.a.trueFunc?e:e===Xe.a.falseFunc||t===Xe.a.trueFunc?t:function(n){return e(n)||t(n)}}const qt=(e,t)=>e===t,Ht={adapter:i,equals:qt};function Gt(e){var t,n,r,o;const s=null!=e?e:Ht;return null!==(t=s.adapter)&&void 0!==t||(s.adapter=i),null!==(n=s.equals)&&void 0!==n||(s.equals=null!==(o=null===(r=s.adapter)||void 0===r?void 0:r.equals)&&void 0!==o?o:qt),s}function Vt(e){return function(t,n,r){const i=Gt(n);return e(t,i,r)}}const Wt=Vt(Nt),Xt=Vt(jt),Yt=Vt(Ut);function Zt(e){return function(t,n,r){const i=Gt(r);"function"!=typeof t&&(t=jt(t,i,n));const o=Jt(n,i.adapter,t.shouldTestNextSiblings);return e(t,o,i)}}function Jt(e,t,n=!1){return n&&(e=function(e,t){const n=Array.isArray(e)?e.slice(0):[e],r=n.length;for(let e=0;ee!==Xe.a.falseFunc&&t&&0!==t.length?n.adapter.findAll(e,t):[]),en=Zt((e,t,n)=>e!==Xe.a.falseFunc&&t&&0!==t.length?n.adapter.findOne(e,t):null);function tn(e,t,n){const r=Gt(n);return("function"==typeof t?t:Nt(t,r))(e)}t.default=Kt},,,,,,,,,,function(e,t,n){"use strict";function r(e){let t=void 0,n=e[0],r=1;for(;rn.call(t,...e)),t=void 0)}return n}n.d(t,"a",(function(){return r}))}]); \ No newline at end of file diff --git a/game/templates/game/game.html b/game/templates/game/game.html index 2c996e2b0..796239093 100644 --- a/game/templates/game/game.html +++ b/game/templates/game/game.html @@ -122,6 +122,7 @@ + - + + + @@ -122,7 +124,6 @@ - - - From 2c255f15c81f9940f9334e5a5ff1aea56c2a63b5 Mon Sep 17 00:00:00 2001 From: Eve Martin Date: Fri, 16 Aug 2024 12:16:02 +0000 Subject: [PATCH 19/22] address PR comments --- game/static/game/css/game.css | 5 ----- 1 file changed, 5 deletions(-) diff --git a/game/static/game/css/game.css b/game/static/game/css/game.css index 6fbc26da3..06ace4670 100644 --- a/game/static/game/css/game.css +++ b/game/static/game/css/game.css @@ -417,8 +417,3 @@ div > .navigation_button_kurono { ::part(editor-root) { height: 1000px; } - -:root { - --rpf-button-primary-background-color: #ffd23b !important; - --rpf-button-primary-text-color: black !important; -} \ No newline at end of file From e083f5e3a8aed81a9505092c61857049966c33e7 Mon Sep 17 00:00:00 2001 From: faucomte97 Date: Mon, 19 Aug 2024 14:58:15 +0100 Subject: [PATCH 20/22] Remove unnecessary classes and exit button --- game/static/game/css/backgrounds.css | 16 ---------------- game/static/game/image/python_den_header.svg | 2 -- game/static/game/js/game.js | 6 ------ game/templates/game/game.html | 19 +++++++++---------- 4 files changed, 9 insertions(+), 34 deletions(-) diff --git a/game/static/game/css/backgrounds.css b/game/static/game/css/backgrounds.css index 7256fbc36..2a68c5250 100644 --- a/game/static/game/css/backgrounds.css +++ b/game/static/game/css/backgrounds.css @@ -16,26 +16,10 @@ background-color: #c90548; } -.bg--hard { - background-color: #8967d3; -} - -.bg--advanced { - background-color: #754fc8; -} - .bg--shared-levels { background-color: #f6be00; } -.bg--loops { - background-color: #3F3F3F; -} - -.bg--loops-coming-soon { - background-color: #CBCBCB; -} - .bg--split-python { background-color: #213CE7; } diff --git a/game/static/game/image/python_den_header.svg b/game/static/game/image/python_den_header.svg index bc58666f1..a324e4504 100644 --- a/game/static/game/image/python_den_header.svg +++ b/game/static/game/image/python_den_header.svg @@ -10,8 +10,6 @@ - - diff --git a/game/static/game/js/game.js b/game/static/game/js/game.js index 7122b8965..f760b80df 100644 --- a/game/static/game/js/game.js +++ b/game/static/game/js/game.js @@ -877,12 +877,6 @@ ocargo.Game.prototype._setupPythonTab = function () { }.bind(this) ) - $('#header_exit_button').click( - function (e) { - window.location.href = RETURN_URL - }.bind(this) - ) - $('#convert_from_blockly').click( function (e) { ocargo.pythonControl.appendCode( diff --git a/game/templates/game/game.html b/game/templates/game/game.html index d09abc9be..00318e078 100644 --- a/game/templates/game/game.html +++ b/game/templates/game/game.html @@ -154,7 +154,6 @@
{% if level.pythonViewEnabled or level.pythonEnabled %} - {% endif %} @@ -555,12 +554,12 @@

- 100% @@ -585,13 +584,13 @@

- +
{% if level.pythonViewEnabled or level.pythonEnabled %} {% endif %}
-
- - -
-
+
+
+ + +
+