n+r||(c=s.s*i<=n?0:(s.s*i-n)/r,f=s.e*i>=n+r?1:(s.e*i-n)/r,l.push([c,f]))}return l.length||l.push([0,0]),l},TrimModifier.prototype.releasePathsData=function(e){var t,r=e.length;for(t=0;t1?1+o:this.s.v<0?0+o:this.s.v+o)>(r=this.e.v>1?1+o:this.e.v<0?0+o:this.e.v+o)){var a=t;t=r,r=a}t=1e-4*Math.round(1e4*t),r=1e-4*Math.round(1e4*r),this.sValue=t,this.eValue=r}else t=this.sValue,r=this.eValue;var s,l,u,c,f,p=this.shapes.length,h=0;if(r===t)for(i=0;i=0;i-=1)if((d=this.shapes[i]).shape._mdf){for((m=d.localShapeCollection).releaseShapes(),2===this.m&&p>1?(g=this.calculateShapeEdges(t,r,d.totalShapeLength,x,h),x+=d.totalShapeLength):g=[[v,b]],l=g.length,s=0;s=1?y.push({s:d.totalShapeLength*(v-1),e:d.totalShapeLength*(b-1)}):(y.push({s:d.totalShapeLength*v,e:d.totalShapeLength}),y.push({s:0,e:d.totalShapeLength*(b-1)}));var w=this.addShapes(d,y[0]);if(y[0].s!==y[0].e){if(y.length>1)if(d.shape.paths.shapes[d.shape.paths._length-1].c){var k=w.pop();this.addPaths(w,m),w=this.addShapes(d,y[1],k)}else this.addPaths(w,m),w=this.addShapes(d,y[1]);this.addPaths(w,m)}}d.shape.paths=m}}},TrimModifier.prototype.addPaths=function(e,t){var r,n=e.length;for(r=0;rt.e){r.c=!1;break}t.s<=d&&t.e>=d+a.addedLength?(this.addSegment(p[n].v[i-1],p[n].o[i-1],p[n].i[i],p[n].v[i],r,s,y),y=!1):(u=bez.getNewSegment(p[n].v[i-1],p[n].v[i],p[n].o[i-1],p[n].i[i],(t.s-d)/a.addedLength,(t.e-d)/a.addedLength,l[i-1]),this.addSegmentFromArray(u,r,s,y),y=!1,r.c=!1),d+=a.addedLength,s+=1}if(p[n].c&&l.length){if(a=l[i-1],d<=t.e){var g=l[i-1].addedLength;t.s<=d&&t.e>=d+g?(this.addSegment(p[n].v[i-1],p[n].o[i-1],p[n].i[0],p[n].v[0],r,s,y),y=!1):(u=bez.getNewSegment(p[n].v[i-1],p[n].v[0],p[n].o[i-1],p[n].i[0],(t.s-d)/g,(t.e-d)/g,l[i-1]),this.addSegmentFromArray(u,r,s,y),y=!1,r.c=!1)}else r.c=!1;d+=a.addedLength,s+=1}if(r._length&&(r.setXYAt(r.v[c][0],r.v[c][1],"i",c),r.setXYAt(r.v[r._length-1][0],r.v[r._length-1][1],"o",r._length-1)),d>t.e)break;n=this.p.keyframes[this.p.keyframes.length-1].t?(n=this.p.getValueAtTime(this.p.keyframes[this.p.keyframes.length-1].t/r,0),i=this.p.getValueAtTime((this.p.keyframes[this.p.keyframes.length-1].t-.05)/r,0)):(n=this.p.pv,i=this.p.getValueAtTime((this.p._caching.lastFrame+this.p.offsetTime-.01)/r,this.p.offsetTime));else if(this.px&&this.px.keyframes&&this.py.keyframes&&this.px.getValueAtTime&&this.py.getValueAtTime){n=[],i=[];var o=this.px,a=this.py;o._caching.lastFrame+o.offsetTime<=o.keyframes[0].t?(n[0]=o.getValueAtTime((o.keyframes[0].t+.01)/r,0),n[1]=a.getValueAtTime((a.keyframes[0].t+.01)/r,0),i[0]=o.getValueAtTime(o.keyframes[0].t/r,0),i[1]=a.getValueAtTime(a.keyframes[0].t/r,0)):o._caching.lastFrame+o.offsetTime>=o.keyframes[o.keyframes.length-1].t?(n[0]=o.getValueAtTime(o.keyframes[o.keyframes.length-1].t/r,0),n[1]=a.getValueAtTime(a.keyframes[a.keyframes.length-1].t/r,0),i[0]=o.getValueAtTime((o.keyframes[o.keyframes.length-1].t-.01)/r,0),i[1]=a.getValueAtTime((a.keyframes[a.keyframes.length-1].t-.01)/r,0)):(n=[o.pv,a.pv],i[0]=o.getValueAtTime((o._caching.lastFrame+o.offsetTime-.01)/r,o.offsetTime),i[1]=a.getValueAtTime((a._caching.lastFrame+a.offsetTime-.01)/r,a.offsetTime))}else n=i=e;this.v.rotate(-Math.atan2(n[1]-i[1],n[0]-i[0]))}this.data.p&&this.data.p.s?this.data.p.z?this.v.translate(this.px.v,this.py.v,-this.pz.v):this.v.translate(this.px.v,this.py.v,0):this.v.translate(this.p.v[0],this.p.v[1],-this.p.v[2])}this.frameId=this.elem.globalData.frameId}},precalculateMatrix:function(){if(this.appliedTransformations=0,this.pre.reset(),!this.a.effectsSequence.length&&(this.pre.translate(-this.a.v[0],-this.a.v[1],this.a.v[2]),this.appliedTransformations=1,!this.s.effectsSequence.length)){if(this.pre.scale(this.s.v[0],this.s.v[1],this.s.v[2]),this.appliedTransformations=2,this.sk){if(this.sk.effectsSequence.length||this.sa.effectsSequence.length)return;this.pre.skewFromAxis(-this.sk.v,this.sa.v),this.appliedTransformations=3}this.r?this.r.effectsSequence.length||(this.pre.rotate(-this.r.v),this.appliedTransformations=4):this.rz.effectsSequence.length||this.ry.effectsSequence.length||this.rx.effectsSequence.length||this.or.effectsSequence.length||(this.pre.rotateZ(-this.rz.v).rotateY(this.ry.v).rotateX(this.rx.v).rotateZ(-this.or.v[2]).rotateY(this.or.v[1]).rotateX(this.or.v[0]),this.appliedTransformations=4)}},autoOrient:function(){}},extendPrototype([DynamicPropertyContainer],t),t.prototype.addDynamicProperty=function(e){this._addDynamicProperty(e),this.elem.addDynamicProperty(e),this._isDirty=!0},t.prototype._addDynamicProperty=DynamicPropertyContainer.prototype.addDynamicProperty,{getTransformProperty:function(e,r,n){return new t(e,r,n)}}}();function RepeaterModifier(){}function RoundCornersModifier(){}function floatEqual(e,t){return 1e5*Math.abs(e-t)<=Math.min(Math.abs(e),Math.abs(t))}function floatZero(e){return Math.abs(e)<=1e-5}function lerp(e,t,r){return e*(1-r)+t*r}function lerpPoint(e,t,r){return[lerp(e[0],t[0],r),lerp(e[1],t[1],r)]}function quadRoots(e,t,r){if(0===e)return[];var n=t*t-4*e*r;if(n<0)return[];var i=-t/(2*e);if(0===n)return[i];var o=Math.sqrt(n)/(2*e);return[i-o,i+o]}function polynomialCoefficients(e,t,r,n){return[3*t-e-3*r+n,3*e-6*t+3*r,-3*e+3*t,e]}function singlePoint(e){return new PolynomialBezier(e,e,e,e,!1)}function PolynomialBezier(e,t,r,n,i){i&&pointEqual(e,t)&&(t=lerpPoint(e,n,1/3)),i&&pointEqual(r,n)&&(r=lerpPoint(e,n,2/3));var o=polynomialCoefficients(e[0],t[0],r[0],n[0]),a=polynomialCoefficients(e[1],t[1],r[1],n[1]);this.a=[o[0],a[0]],this.b=[o[1],a[1]],this.c=[o[2],a[2]],this.d=[o[3],a[3]],this.points=[e,t,r,n]}function extrema(e,t){var r=e.points[0][t],n=e.points[e.points.length-1][t];if(r>n){var i=n;n=r,r=i}for(var o=quadRoots(3*e.a[t],2*e.b[t],e.c[t]),a=0;a0&&o[a]<1){var s=e.point(o[a])[t];sn&&(n=s)}return{min:r,max:n}}function intersectData(e,t,r){var n=e.boundingBox();return{cx:n.cx,cy:n.cy,width:n.width,height:n.height,bez:e,t:(t+r)/2,t1:t,t2:r}}function splitData(e){var t=e.bez.split(.5);return[intersectData(t[0],e.t1,e.t),intersectData(t[1],e.t,e.t2)]}function boxIntersect(e,t){return 2*Math.abs(e.cx-t.cx)=o||e.width<=n&&e.height<=n&&t.width<=n&&t.height<=n)i.push([e.t,t.t]);else{var a=splitData(e),s=splitData(t);intersectsImpl(a[0],s[0],r+1,n,i,o),intersectsImpl(a[0],s[1],r+1,n,i,o),intersectsImpl(a[1],s[0],r+1,n,i,o),intersectsImpl(a[1],s[1],r+1,n,i,o)}}function crossProduct(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function lineIntersection(e,t,r,n){var i=[e[0],e[1],1],o=[t[0],t[1],1],a=[r[0],r[1],1],s=[n[0],n[1],1],l=crossProduct(crossProduct(i,o),crossProduct(a,s));return floatZero(l[2])?null:[l[0]/l[2],l[1]/l[2]]}function polarOffset(e,t,r){return[e[0]+Math.cos(t)*r,e[1]-Math.sin(t)*r]}function pointDistance(e,t){return Math.hypot(e[0]-t[0],e[1]-t[1])}function pointEqual(e,t){return floatEqual(e[0],t[0])&&floatEqual(e[1],t[1])}function ZigZagModifier(){}function setPoint(e,t,r,n,i,o,a){var s=r-Math.PI/2,l=r+Math.PI/2,u=t[0]+Math.cos(r)*n*i,c=t[1]-Math.sin(r)*n*i;e.setTripleAt(u,c,u+Math.cos(s)*o,c-Math.sin(s)*o,u+Math.cos(l)*a,c-Math.sin(l)*a,e.length())}function getPerpendicularVector(e,t){var r=[t[0]-e[0],t[1]-e[1]],n=.5*-Math.PI;return[Math.cos(n)*r[0]-Math.sin(n)*r[1],Math.sin(n)*r[0]+Math.cos(n)*r[1]]}function getProjectingAngle(e,t){var r=0===t?e.length()-1:t-1,n=(t+1)%e.length(),i=getPerpendicularVector(e.v[r],e.v[n]);return Math.atan2(0,1)-Math.atan2(i[1],i[0])}function zigZagCorner(e,t,r,n,i,o,a){var s=getProjectingAngle(t,r),l=t.v[r%t._length],u=t.v[0===r?t._length-1:r-1],c=t.v[(r+1)%t._length],f=2===o?Math.sqrt(Math.pow(l[0]-u[0],2)+Math.pow(l[1]-u[1],2)):0,p=2===o?Math.sqrt(Math.pow(l[0]-c[0],2)+Math.pow(l[1]-c[1],2)):0;setPoint(e,t.v[r%t._length],s,a,n,p/(2*(i+1)),f/(2*(i+1)),o)}function zigZagSegment(e,t,r,n,i,o){for(var a=0;a1&&t.length>1&&(i=getIntersection(e[0],t[t.length-1]))?[[e[0].split(i[0])[0]],[t[t.length-1].split(i[1])[1]]]:[r,n]}function pruneIntersections(e){for(var t,r=1;r1&&(t=pruneSegmentIntersection(e[e.length-1],e[0]),e[e.length-1]=t[0],e[0]=t[1]),e}function offsetSegmentSplit(e,t){var r,n,i,o,a=e.inflectionPoints();if(0===a.length)return[offsetSegment(e,t)];if(1===a.length||floatEqual(a[1],1))return r=(i=e.split(a[0]))[0],n=i[1],[offsetSegment(r,t),offsetSegment(n,t)];r=(i=e.split(a[0]))[0];var s=(a[1]-a[0])/(1-a[0]);return o=(i=i[1].split(s))[0],n=i[1],[offsetSegment(r,t),offsetSegment(o,t),offsetSegment(n,t)]}function OffsetPathModifier(){}function getFontProperties(e){for(var t=e.fStyle?e.fStyle.split(" "):[],r="normal",n="normal",i=t.length,o=0;o0;)r-=1,this._elements.unshift(t[r]);this.dynamicProperties.length?this.k=!0:this.getValue(!0)},RepeaterModifier.prototype.resetElements=function(e){var t,r=e.length;for(t=0;t0?Math.floor(p):Math.ceil(p),m=this.pMatrix.props,y=this.rMatrix.props,g=this.sMatrix.props;this.pMatrix.reset(),this.rMatrix.reset(),this.sMatrix.reset(),this.tMatrix.reset(),this.matrix.reset();var v,b,x=0;if(p>0){for(;xd;)this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!0),x-=1;h&&(this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,-h,!0),x-=h)}for(n=1===this.data.m?0:this._currentCopies-1,i=1===this.data.m?1:-1,o=this._currentCopies;o;){if(b=(r=(t=this.elemsData[n].it)[t.length-1].transform.mProps.v.props).length,t[t.length-1].transform.mProps._mdf=!0,t[t.length-1].transform.op._mdf=!0,t[t.length-1].transform.op.v=1===this._currentCopies?this.so.v:this.so.v+(this.eo.v-this.so.v)*(n/(this._currentCopies-1)),0!==x){for((0!==n&&1===i||n!==this._currentCopies-1&&-1===i)&&this.applyTransforms(this.pMatrix,this.rMatrix,this.sMatrix,this.tr,1,!1),this.matrix.transform(y[0],y[1],y[2],y[3],y[4],y[5],y[6],y[7],y[8],y[9],y[10],y[11],y[12],y[13],y[14],y[15]),this.matrix.transform(g[0],g[1],g[2],g[3],g[4],g[5],g[6],g[7],g[8],g[9],g[10],g[11],g[12],g[13],g[14],g[15]),this.matrix.transform(m[0],m[1],m[2],m[3],m[4],m[5],m[6],m[7],m[8],m[9],m[10],m[11],m[12],m[13],m[14],m[15]),v=0;v0&&n<1?[t]:[]:[t-n,t+n].filter((function(e){return e>0&&e<1}))},PolynomialBezier.prototype.split=function(e){if(e<=0)return[singlePoint(this.points[0]),this];if(e>=1)return[this,singlePoint(this.points[this.points.length-1])];var t=lerpPoint(this.points[0],this.points[1],e),r=lerpPoint(this.points[1],this.points[2],e),n=lerpPoint(this.points[2],this.points[3],e),i=lerpPoint(t,r,e),o=lerpPoint(r,n,e),a=lerpPoint(i,o,e);return[new PolynomialBezier(this.points[0],t,i,a,!0),new PolynomialBezier(a,o,n,this.points[3],!0)]},PolynomialBezier.prototype.bounds=function(){return{x:extrema(this,0),y:extrema(this,1)}},PolynomialBezier.prototype.boundingBox=function(){var e=this.bounds();return{left:e.x.min,right:e.x.max,top:e.y.min,bottom:e.y.max,width:e.x.max-e.x.min,height:e.y.max-e.y.min,cx:(e.x.max+e.x.min)/2,cy:(e.y.max+e.y.min)/2}},PolynomialBezier.prototype.intersections=function(e,t,r){void 0===t&&(t=2),void 0===r&&(r=7);var n=[];return intersectsImpl(intersectData(this,0,1),intersectData(e,0,1),0,t,n,r),n},PolynomialBezier.shapeSegment=function(e,t){var r=(t+1)%e.length();return new PolynomialBezier(e.v[t],e.o[t],e.i[r],e.v[r],!0)},PolynomialBezier.shapeSegmentInverted=function(e,t){var r=(t+1)%e.length();return new PolynomialBezier(e.v[r],e.i[r],e.o[t],e.v[t],!0)},extendPrototype([ShapeModifier],ZigZagModifier),ZigZagModifier.prototype.initModifierProperties=function(e,t){this.getValue=this.processKeys,this.amplitude=PropertyFactory.getProp(e,t.s,0,null,this),this.frequency=PropertyFactory.getProp(e,t.r,0,null,this),this.pointsType=PropertyFactory.getProp(e,t.pt,0,null,this),this._isAnimated=0!==this.amplitude.effectsSequence.length||0!==this.frequency.effectsSequence.length||0!==this.pointsType.effectsSequence.length},ZigZagModifier.prototype.processPath=function(e,t,r,n){var i=e._length,o=shapePool.newElement();if(o.c=e.c,e.c||(i-=1),0===i)return o;var a=-1,s=PolynomialBezier.shapeSegment(e,0);zigZagCorner(o,e,0,t,r,n,a);for(var l=0;l=0;o-=1)s=PolynomialBezier.shapeSegmentInverted(e,o),u.push(offsetSegmentSplit(s,t));u=pruneIntersections(u);var c=null,f=null;for(o=0;o=55296&&r<=56319){var n=e.charCodeAt(1);n>=56320&&n<=57343&&(t=1024*(r-55296)+n-56320+65536)}return t}function u(e){var t=l(e);return t>=n&&t<=i}var c=function(){this.fonts=[],this.chars=null,this.typekitLoaded=0,this.isLoaded=!1,this._warned=!1,this.initTime=Date.now(),this.setIsLoadedBinded=this.setIsLoaded.bind(this),this.checkLoadedFontsBinded=this.checkLoadedFonts.bind(this)};c.isModifier=function(e,t){var r=e.toString(16)+t.toString(16);return-1!==o.indexOf(r)},c.isZeroWidthJoiner=function(e){return 8205===e},c.isFlagEmoji=function(e){return u(e.substr(0,2))&&u(e.substr(2,2))},c.isRegionalCode=u,c.isCombinedCharacter=function(e){return-1!==t.indexOf(e)},c.isRegionalFlag=function(e,t){var n=l(e.substr(t,2));if(n!==r)return!1;var i=0;for(t+=2;i<5;){if((n=l(e.substr(t,2)))<917601||n>917626)return!1;i+=1,t+=2}return 917631===l(e.substr(t,2))},c.isVariationSelector=function(e){return 65039===e},c.BLACK_FLAG_CODE_POINT=r;var f={addChars:function(e){if(e){var t;this.chars||(this.chars=[]);var r,n,i=e.length,o=this.chars.length;for(t=0;t0&&(c=!1),c){var f=createTag("style");f.setAttribute("f-forigin",n[r].fOrigin),f.setAttribute("f-origin",n[r].origin),f.setAttribute("f-family",n[r].fFamily),f.type="text/css",f.innerText="@font-face {font-family: "+n[r].fFamily+"; font-style: normal; src: url('"+n[r].fPath+"');}",t.appendChild(f)}}else if("g"===n[r].fOrigin||1===n[r].origin){for(l=document.querySelectorAll('link[f-forigin="g"], link[f-origin="1"]'),u=0;ue?!0!==this.isInRange&&(this.globalData._mdf=!0,this._mdf=!0,this.isInRange=!0,this.show()):!1!==this.isInRange&&(this.globalData._mdf=!0,this.isInRange=!1,this.hide())},renderRenderable:function(){var e,t=this.renderableComponents.length;for(e=0;e.1)&&this.audio.seek(this._currentTime/this.globalData.frameRate):(this.audio.play(),this.audio.seek(this._currentTime/this.globalData.frameRate),this._isPlaying=!0))},AudioElement.prototype.show=function(){},AudioElement.prototype.hide=function(){this.audio.pause(),this._isPlaying=!1},AudioElement.prototype.pause=function(){this.audio.pause(),this._isPlaying=!1,this._canPlay=!1},AudioElement.prototype.resume=function(){this._canPlay=!0},AudioElement.prototype.setRate=function(e){this.audio.rate(e)},AudioElement.prototype.volume=function(e){this._volumeMultiplier=e,this._previousVolume=e*this._volume,this.audio.volume(this._previousVolume)},AudioElement.prototype.getBaseElement=function(){return null},AudioElement.prototype.destroy=function(){},AudioElement.prototype.sourceRectAtTime=function(){},AudioElement.prototype.initExpressions=function(){},BaseRenderer.prototype.checkLayers=function(e){var t,r,n=this.layers.length;for(this.completeLayers=!0,t=n-1;t>=0;t-=1)this.elements[t]||(r=this.layers[t]).ip-r.st<=e-this.layers[t].st&&r.op-r.st>e-this.layers[t].st&&this.buildItem(t),this.completeLayers=!!this.elements[t]&&this.completeLayers;this.checkPendingElements()},BaseRenderer.prototype.createItem=function(e){switch(e.ty){case 2:return this.createImage(e);case 0:return this.createComp(e);case 1:return this.createSolid(e);case 3:default:return this.createNull(e);case 4:return this.createShape(e);case 5:return this.createText(e);case 6:return this.createAudio(e);case 13:return this.createCamera(e);case 15:return this.createFootage(e)}},BaseRenderer.prototype.createCamera=function(){throw new Error("You're using a 3d camera. Try the html renderer.")},BaseRenderer.prototype.createAudio=function(e){return new AudioElement(e,this.globalData,this)},BaseRenderer.prototype.createFootage=function(e){return new FootageElement(e,this.globalData,this)},BaseRenderer.prototype.buildAllItems=function(){var e,t=this.layers.length;for(e=0;e0&&(this.maskElement.setAttribute("id",y),this.element.maskedElement.setAttribute(v,"url("+getLocationHref()+"#"+y+")"),o.appendChild(this.maskElement)),this.viewData.length&&this.element.addRenderableComponent(this)}TransformElement.prototype={initTransform:function(){var e=new Matrix;this.finalTransform={mProp:this.data.ks?TransformPropertyFactory.getTransformProperty(this,this.data.ks,this):{o:0},_matMdf:!1,_localMatMdf:!1,_opMdf:!1,mat:e,localMat:e,localOpacity:1},this.data.ao&&(this.finalTransform.mProp.autoOriented=!0),this.data.ty},renderTransform:function(){if(this.finalTransform._opMdf=this.finalTransform.mProp.o._mdf||this._isFirstFrame,this.finalTransform._matMdf=this.finalTransform.mProp._mdf||this._isFirstFrame,this.hierarchy){var e,t=this.finalTransform.mat,r=0,n=this.hierarchy.length;if(!this.finalTransform._matMdf)for(;r1&&(o+=" C"+t.o[n-1][0]+","+t.o[n-1][1]+" "+t.i[0][0]+","+t.i[0][1]+" "+t.v[0][0]+","+t.v[0][1]),r.lastPath!==o){var a="";r.elem&&(t.c&&(a=e.inv?this.solidPath+o:o),r.elem.setAttribute("d",a)),r.lastPath=o}},MaskElement.prototype.destroy=function(){this.element=null,this.globalData=null,this.maskElement=null,this.data=null,this.masksProperties=null};var filtersFactory=function(){var e={createFilter:function(e,t){var r=createNS("filter");return r.setAttribute("id",e),!0!==t&&(r.setAttribute("filterUnits","objectBoundingBox"),r.setAttribute("x","0%"),r.setAttribute("y","0%"),r.setAttribute("width","100%"),r.setAttribute("height","100%")),r},createAlphaToLuminanceFilter:function(){var e=createNS("feColorMatrix");return e.setAttribute("type","matrix"),e.setAttribute("color-interpolation-filters","sRGB"),e.setAttribute("values","0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1"),e}};return e}(),featureSupport=function(){var e={maskType:!0,svgLumaHidden:!0,offscreenCanvas:"undefined"!=typeof OffscreenCanvas};return(/MSIE 10/i.test(navigator.userAgent)||/MSIE 9/i.test(navigator.userAgent)||/rv:11.0/i.test(navigator.userAgent)||/Edge\/\d./i.test(navigator.userAgent))&&(e.maskType=!1),/firefox/i.test(navigator.userAgent)&&(e.svgLumaHidden=!1),e}(),registeredEffects$1={},idPrefix="filter_result_";function SVGEffects(e){var t,r,n="SourceGraphic",i=e.data.ef?e.data.ef.length:0,o=createElementID(),a=filtersFactory.createFilter(o,!0),s=0;for(this.filters=[],t=0;t=0&&!this.shapeModifiers[e].processShapes(this._isFirstFrame);e-=1);}},searchProcessedElement:function(e){for(var t=this.processedElements,r=0,n=t.length;r.01)return!1;r+=1}return!0},GradientProperty.prototype.checkCollapsable=function(){if(this.o.length/2!=this.c.length/4)return!1;if(this.data.k.k[0].s)for(var e=0,t=this.data.k.k.length;e0;)l=n.transformers[d].mProps._mdf||l,h-=1,d-=1;if(l)for(h=y-n.styles[c].lvl,d=n.transformers.length-1;h>0;)p.multiply(n.transformers[d].mProps.v),h-=1,d-=1}else p=e;if(a=(f=n.sh.paths)._length,l){for(s="",o=0;o=1?v=.99:v<=-1&&(v=-.99);var b=s*v,x=Math.cos(g+t.a.v)*b+c[0],w=Math.sin(g+t.a.v)*b+c[1];l.setAttribute("fx",x),l.setAttribute("fy",w),u&&!t.g._collapsable&&(t.of.setAttribute("fx",x),t.of.setAttribute("fy",w))}}function l(e,t,r){var n=t.style,i=t.d;i&&(i._mdf||r)&&i.dashStr&&(n.pElem.setAttribute("stroke-dasharray",i.dashStr),n.pElem.setAttribute("stroke-dashoffset",i.dashoffset[0])),t.c&&(t.c._mdf||r)&&n.pElem.setAttribute("stroke","rgb("+bmFloor(t.c.v[0])+","+bmFloor(t.c.v[1])+","+bmFloor(t.c.v[2])+")"),(t.o._mdf||r)&&n.pElem.setAttribute("stroke-opacity",t.o.v),(t.w._mdf||r)&&(n.pElem.setAttribute("stroke-width",t.w.v),n.msElem&&n.msElem.setAttribute("stroke-width",t.w.v))}return{createRenderFunction:function(e){switch(e.ty){case"fl":return o;case"gf":return s;case"gs":return a;case"st":return l;case"sh":case"el":case"rc":case"sr":return i;case"tr":return r;case"no":return n;default:return null}}}}();function SVGShapeElement(e,t,r){this.shapes=[],this.shapesData=e.shapes,this.stylesList=[],this.shapeModifiers=[],this.itemsData=[],this.processedElements=[],this.animatedContents=[],this.initElement(e,t,r),this.prevViewData=[]}function LetterProps(e,t,r,n,i,o){this.o=e,this.sw=t,this.sc=r,this.fc=n,this.m=i,this.p=o,this._mdf={o:!0,sw:!!t,sc:!!r,fc:!!n,m:!0,p:!0}}function TextProperty(e,t){this._frameId=initialDefaultFrame,this.pv="",this.v="",this.kf=!1,this._isFirstFrame=!0,this._mdf=!1,t.d&&t.d.sid&&(t.d=e.globalData.slotManager.getProp(t.d)),this.data=t,this.elem=e,this.comp=this.elem.comp,this.keysIndex=0,this.canResize=!1,this.minimumFontSize=1,this.effectsSequence=[],this.currentData={ascent:0,boxWidth:this.defaultBoxWidth,f:"",fStyle:"",fWeight:"",fc:"",j:"",justifyOffset:"",l:[],lh:0,lineWidths:[],ls:"",of:"",s:"",sc:"",sw:0,t:0,tr:0,sz:0,ps:null,fillColorAnim:!1,strokeColorAnim:!1,strokeWidthAnim:!1,yOffset:0,finalSize:0,finalText:[],finalLineHeight:0,__complete:!1},this.copyData(this.currentData,this.data.d.k[0].s),this.searchProperty()||this.completeTextData(this.currentData)}extendPrototype([BaseElement,TransformElement,SVGBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableDOMElement],SVGShapeElement),SVGShapeElement.prototype.initSecondaryElement=function(){},SVGShapeElement.prototype.identityMatrix=new Matrix,SVGShapeElement.prototype.buildExpressionInterface=function(){},SVGShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.layerElement,0,[],!0),this.filterUniqueShapes()},SVGShapeElement.prototype.filterUniqueShapes=function(){var e,t,r,n,i=this.shapes.length,o=this.stylesList.length,a=[],s=!1;for(r=0;r1&&s&&this.setShapesAsAnimated(a)}},SVGShapeElement.prototype.setShapesAsAnimated=function(e){var t,r=e.length;for(t=0;t=0;s-=1){if((p=this.searchProcessedElement(e[s]))?t[s]=r[p-1]:e[s]._render=a,"fl"===e[s].ty||"st"===e[s].ty||"gf"===e[s].ty||"gs"===e[s].ty||"no"===e[s].ty)p?t[s].style.closed=!1:t[s]=this.createStyleElement(e[s],i),e[s]._render&&t[s].style.pElem.parentNode!==n&&n.appendChild(t[s].style.pElem),m.push(t[s].style);else if("gr"===e[s].ty){if(p)for(u=t[s].it.length,l=0;l1,this.kf&&this.addEffect(this.getKeyframeValue.bind(this)),this.kf},TextProperty.prototype.addEffect=function(e){this.effectsSequence.push(e),this.elem.addDynamicProperty(this)},TextProperty.prototype.getValue=function(e){if(this.elem.globalData.frameId!==this.frameId&&this.effectsSequence.length||e){this.currentData.t=this.data.d.k[this.keysIndex].s.t;var t=this.currentData,r=this.keysIndex;if(this.lock)this.setCurrentData(this.currentData);else{var n;this.lock=!0,this._mdf=!1;var i=this.effectsSequence.length,o=e||this.data.d.k[this.keysIndex].s;for(n=0;nt);)r+=1;return this.keysIndex!==r&&(this.keysIndex=r),this.data.d.k[this.keysIndex].s},TextProperty.prototype.buildFinalText=function(e){for(var t,r,n=[],i=0,o=e.length,a=!1,s=!1,l="";i=55296&&t<=56319?FontManager.isRegionalFlag(e,i)?l=e.substr(i,14):(r=e.charCodeAt(i+1))>=56320&&r<=57343&&(FontManager.isModifier(t,r)?(l=e.substr(i,2),a=!0):l=FontManager.isFlagEmoji(e.substr(i,4))?e.substr(i,4):e.substr(i,2)):t>56319?(r=e.charCodeAt(i+1),FontManager.isVariationSelector(t)&&(a=!0)):FontManager.isZeroWidthJoiner(t)&&(a=!0,s=!0),a?(n[n.length-1]+=l,a=!1):n.push(l),i+=l.length;return n},TextProperty.prototype.completeTextData=function(e){e.__complete=!0;var t,r,n,i,o,a,s,l=this.elem.globalData.fontManager,u=this.data,c=[],f=0,p=u.m.g,h=0,d=0,m=0,y=[],g=0,v=0,b=l.getFontByName(e.f),x=0,w=getFontProperties(b);e.fWeight=w.weight,e.fStyle=w.style,e.finalSize=e.s,e.finalText=this.buildFinalText(e.t),r=e.finalText.length,e.finalLineHeight=e.lh;var k,_=e.tr/1e3*e.finalSize;if(e.sz)for(var S,E,C=!0,P=e.sz[0],O=e.sz[1];C;){S=0,g=0,r=(E=this.buildFinalText(e.t)).length,_=e.tr/1e3*e.finalSize;var A=-1;for(t=0;tP&&" "!==E[t]?(-1===A?r+=1:t=A,S+=e.finalLineHeight||1.2*e.finalSize,E.splice(t,A===t?1:0,"\r"),A=-1,g=0):(g+=x,g+=_);S+=b.ascent*e.finalSize/100,this.canResize&&e.finalSize>this.minimumFontSize&&Ov?g:v,g=-2*_,i="",n=!0,m+=1):i=M,l.chars?(s=l.getCharData(M,b.fStyle,l.getFontByName(e.f).fFamily),x=n?0:s.w*e.finalSize/100):x=l.measureText(i,e.f,e.finalSize)," "===M?T+=x+_:(g+=x+_+T,T=0),c.push({l:x,an:x,add:h,n,anIndexes:[],val:i,line:m,animatorJustifyOffset:0}),2==p){if(h+=x,""===i||" "===i||t===r-1){for(""!==i&&" "!==i||(h-=x);d<=t;)c[d].an=h,c[d].ind=f,c[d].extra=x,d+=1;f+=1,h=0}}else if(3==p){if(h+=x,""===i||t===r-1){for(""===i&&(h-=x);d<=t;)c[d].an=h,c[d].ind=f,c[d].extra=x,d+=1;h=0,f+=1}}else c[f].ind=f,c[f].extra=0,f+=1;if(e.l=c,v=g>v?g:v,y.push(g),e.sz)e.boxWidth=e.sz[0],e.justifyOffset=0;else switch(e.boxWidth=v,e.j){case 1:e.justifyOffset=-e.boxWidth;break;case 2:e.justifyOffset=-e.boxWidth/2;break;default:e.justifyOffset=0}e.lineWidths=y;var L,j,I,D,R=u.a;a=R.length;var F=[];for(o=0;o0?i=this.ne.v/100:o=-this.ne.v/100,this.xe.v>0?a=1-this.xe.v/100:s=1+this.xe.v/100;var l=BezierFactory.getBezierEasing(i,o,a,s).get,u=0,c=this.finalS,f=this.finalE,p=this.data.sh;if(2===p)u=l(u=f===c?n>=f?1:0:e(0,t(.5/(f-c)+(n-c)/(f-c),1)));else if(3===p)u=l(u=f===c?n>=f?0:1:1-e(0,t(.5/(f-c)+(n-c)/(f-c),1)));else if(4===p)f===c?u=0:(u=e(0,t(.5/(f-c)+(n-c)/(f-c),1)))<.5?u*=2:u=1-2*(u-.5),u=l(u);else if(5===p){if(f===c)u=0;else{var h=f-c,d=-h/2+(n=t(e(0,n+.5-c),f-c)),m=h/2;u=Math.sqrt(1-d*d/(m*m))}u=l(u)}else 6===p?(f===c?u=0:(n=t(e(0,n+.5-c),f-c),u=(1+Math.cos(Math.PI+2*Math.PI*n/(f-c)))/2),u=l(u)):(n>=r(c)&&(u=e(0,t(n-c<0?t(f,1)-(c-n):f-n,1))),u=l(u));if(100!==this.sm.v){var y=.01*this.sm.v;0===y&&(y=1e-8);var g=.5-.5*y;u1&&(u=1)}return u*this.a.v},getValue:function(e){this.iterateDynamicProperties(),this._mdf=e||this._mdf,this._currentTextLength=this.elem.textProperty.currentData.l.length||0,e&&2===this.data.r&&(this.e.v=this._currentTextLength);var t=2===this.data.r?1:100/this.data.totalChars,r=this.o.v/t,n=this.s.v/t+r,i=this.e.v/t+r;if(n>i){var o=n;n=i,i=o}this.finalS=n,this.finalE=i}},extendPrototype([DynamicPropertyContainer],n),{getTextSelectorProp:function(e,t,r){return new n(e,t,r)}}}();function TextAnimatorDataProperty(e,t,r){var n={propType:!1},i=PropertyFactory.getProp,o=t.a;this.a={r:o.r?i(e,o.r,0,degToRads,r):n,rx:o.rx?i(e,o.rx,0,degToRads,r):n,ry:o.ry?i(e,o.ry,0,degToRads,r):n,sk:o.sk?i(e,o.sk,0,degToRads,r):n,sa:o.sa?i(e,o.sa,0,degToRads,r):n,s:o.s?i(e,o.s,1,.01,r):n,a:o.a?i(e,o.a,1,0,r):n,o:o.o?i(e,o.o,0,.01,r):n,p:o.p?i(e,o.p,1,0,r):n,sw:o.sw?i(e,o.sw,0,0,r):n,sc:o.sc?i(e,o.sc,1,0,r):n,fc:o.fc?i(e,o.fc,1,0,r):n,fh:o.fh?i(e,o.fh,0,0,r):n,fs:o.fs?i(e,o.fs,0,.01,r):n,fb:o.fb?i(e,o.fb,0,.01,r):n,t:o.t?i(e,o.t,0,0,r):n},this.s=TextSelectorProp.getTextSelectorProp(e,t.s,r),this.s.t=t.s.t}function TextAnimatorProperty(e,t,r){this._isFirstFrame=!0,this._hasMaskedPath=!1,this._frameId=-1,this._textData=e,this._renderType=t,this._elem=r,this._animatorsData=createSizedArray(this._textData.a.length),this._pathData={},this._moreOptions={alignment:{}},this.renderedLetters=[],this.lettersChangedFlag=!1,this.initDynamicPropertyContainer(r)}function ITextElement(){}TextAnimatorProperty.prototype.searchProperties=function(){var e,t,r=this._textData.a.length,n=PropertyFactory.getProp;for(e=0;e=s+se||!d?(v=(s+se-u)/l.partialLength,N=h.point[0]+(l.point[0]-h.point[0])*v,B=h.point[1]+(l.point[1]-h.point[1])*v,S.translate(-w[0]*P[i].an*.005,-w[1]*D*.01),c=!1):d&&(u+=l.partialLength,(f+=1)>=d.length&&(f=0,m[p+=1]?d=m[p].points:x.v.c?(f=0,d=m[p=0].points):(u-=l.partialLength,d=null)),d&&(h=l,y=(l=d[f]).partialLength));F=P[i].an/2-P[i].add,S.translate(-F,0,0)}else F=P[i].an/2-P[i].add,S.translate(-F,0,0),S.translate(-w[0]*P[i].an*.005,-w[1]*D*.01,0);for(T=0;Te?this.textSpans[e].span:createNS(l?"g":"text"),y<=e){if(a.setAttribute("stroke-linecap","butt"),a.setAttribute("stroke-linejoin","round"),a.setAttribute("stroke-miterlimit","4"),this.textSpans[e].span=a,l){var g=createNS("g");a.appendChild(g),this.textSpans[e].childSpan=g}this.textSpans[e].span=a,this.layerElement.appendChild(a)}a.style.display="inherit"}if(u.reset(),c&&(s[e].n&&(f=-d,p+=r.yOffset,p+=h?1:0,h=!1),this.applyTextPropertiesToMatrix(r,u,s[e].line,f,p),f+=s[e].l||0,f+=d),l){var v;if(1===(m=this.globalData.fontManager.getCharData(r.finalText[e],n.fStyle,this.globalData.fontManager.getFontByName(r.f).fFamily)).t)v=new SVGCompElement(m.data,this.globalData,this);else{var b=emptyShapeData;m.data&&m.data.shapes&&(b=this.buildShapeData(m.data,r.finalSize)),v=new SVGShapeElement(b,this.globalData,this)}if(this.textSpans[e].glyph){var x=this.textSpans[e].glyph;this.textSpans[e].childSpan.removeChild(x.layerElement),x.destroy()}this.textSpans[e].glyph=v,v._debug=!0,v.prepareFrame(0),v.renderFrame(),this.textSpans[e].childSpan.appendChild(v.layerElement),1===m.t&&this.textSpans[e].childSpan.setAttribute("transform","scale("+r.finalSize/100+","+r.finalSize/100+")")}else c&&a.setAttribute("transform","translate("+u.props[12]+","+u.props[13]+")"),a.textContent=s[e].val,a.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve")}c&&a&&a.setAttribute("d","")}else{var w=this.textContainer,k="start";switch(r.j){case 1:k="end";break;case 2:k="middle";break;default:k="start"}w.setAttribute("text-anchor",k),w.setAttribute("letter-spacing",d);var _=this.buildTextContents(r.finalText);for(t=_.length,p=r.ps?r.ps[1]+r.ascent:0,e=0;e=0;t-=1)(this.completeLayers||this.elements[t])&&this.elements[t].prepareFrame(e-this.layers[t].st);if(this.globalData._mdf)for(t=0;t=0;r-=1)(this.completeLayers||this.elements[r])&&(this.elements[r].prepareFrame(this.renderedFrame-this.layers[r].st),this.elements[r]._mdf&&(this._mdf=!0))}},ICompElement.prototype.renderInnerContent=function(){var e,t=this.layers.length;for(e=0;e=0;r-=1)e.finalTransform.multiply(e.transforms[r].transform.mProps.v);e._mdf=i},processSequences:function(e){var t,r=this.sequenceList.length;for(t=0;t=1){this.buffers=[];var e=this.globalData.canvasContext,t=assetLoader.createCanvas(e.canvas.width,e.canvas.height);this.buffers.push(t);var r=assetLoader.createCanvas(e.canvas.width,e.canvas.height);this.buffers.push(r),this.data.tt>=3&&!document._isProxy&&assetLoader.loadLumaCanvas()}this.canvasContext=this.globalData.canvasContext,this.transformCanvas=this.globalData.transformCanvas,this.renderableEffectsManager=new CVEffects(this),this.searchEffectTransforms()},createContent:function(){},setBlendMode:function(){var e=this.globalData;if(e.blendMode!==this.data.bm){e.blendMode=this.data.bm;var t=getBlendMode(this.data.bm);e.canvasContext.globalCompositeOperation=t}},createRenderableComponents:function(){this.maskManager=new CVMaskElement(this.data,this),this.transformEffects=this.renderableEffectsManager.getEffects(effectTypes.TRANSFORM_EFFECT)},hideElement:function(){this.hidden||this.isInRange&&!this.isTransparent||(this.hidden=!0)},showElement:function(){this.isInRange&&!this.isTransparent&&(this.hidden=!1,this._isFirstFrame=!0,this.maskManager._isFirstFrame=!0)},clearCanvas:function(e){e.clearRect(this.transformCanvas.tx,this.transformCanvas.ty,this.transformCanvas.w*this.transformCanvas.sx,this.transformCanvas.h*this.transformCanvas.sy)},prepareLayer:function(){if(this.data.tt>=1){var e=this.buffers[0].getContext("2d");this.clearCanvas(e),e.drawImage(this.canvasContext.canvas,0,0),this.currentTransform=this.canvasContext.getTransform(),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform)}},exitLayer:function(){if(this.data.tt>=1){var e=this.buffers[1],t=e.getContext("2d");if(this.clearCanvas(t),t.drawImage(this.canvasContext.canvas,0,0),this.canvasContext.setTransform(1,0,0,1,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.setTransform(this.currentTransform),this.comp.getElementById("tp"in this.data?this.data.tp:this.data.ind-1).renderFrame(!0),this.canvasContext.setTransform(1,0,0,1,0,0),this.data.tt>=3&&!document._isProxy){var r=assetLoader.getLumaCanvas(this.canvasContext.canvas);r.getContext("2d").drawImage(this.canvasContext.canvas,0,0),this.clearCanvas(this.canvasContext),this.canvasContext.drawImage(r,0,0)}this.canvasContext.globalCompositeOperation=operationsMap[this.data.tt],this.canvasContext.drawImage(e,0,0),this.canvasContext.globalCompositeOperation="destination-over",this.canvasContext.drawImage(this.buffers[0],0,0),this.canvasContext.setTransform(this.currentTransform),this.canvasContext.globalCompositeOperation="source-over"}},renderFrame:function(e){if(!this.hidden&&!this.data.hd&&(1!==this.data.td||e)){this.renderTransform(),this.renderRenderable(),this.renderLocalTransform(),this.setBlendMode();var t=0===this.data.ty;this.prepareLayer(),this.globalData.renderer.save(t),this.globalData.renderer.ctxTransform(this.finalTransform.localMat.props),this.globalData.renderer.ctxOpacity(this.finalTransform.localOpacity),this.renderInnerContent(),this.globalData.renderer.restore(t),this.exitLayer(),this.maskManager.hasMasks&&this.globalData.renderer.restore(!0),this._isFirstFrame&&(this._isFirstFrame=!1)}},destroy:function(){this.canvasContext=null,this.data=null,this.globalData=null,this.maskManager.destroy()},mHelper:new Matrix},CVBaseElement.prototype.hide=CVBaseElement.prototype.hideElement,CVBaseElement.prototype.show=CVBaseElement.prototype.showElement,CVShapeData.prototype.setAsAnimated=SVGShapeData.prototype.setAsAnimated,extendPrototype([BaseElement,TransformElement,CVBaseElement,IShapeElement,HierarchyElement,FrameElement,RenderableElement],CVShapeElement),CVShapeElement.prototype.initElement=RenderableDOMElement.prototype.initElement,CVShapeElement.prototype.transformHelper={opacity:1,_opMdf:!1},CVShapeElement.prototype.dashResetter=[],CVShapeElement.prototype.createContent=function(){this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,!0,[])},CVShapeElement.prototype.createStyleElement=function(e,t){var r={data:e,type:e.ty,preTransforms:this.transformsManager.addTransformSequence(t),transforms:[],elements:[],closed:!0===e.hd},n={};if("fl"===e.ty||"st"===e.ty?(n.c=PropertyFactory.getProp(this,e.c,1,255,this),n.c.k||(r.co="rgb("+bmFloor(n.c.v[0])+","+bmFloor(n.c.v[1])+","+bmFloor(n.c.v[2])+")")):"gf"!==e.ty&&"gs"!==e.ty||(n.s=PropertyFactory.getProp(this,e.s,1,null,this),n.e=PropertyFactory.getProp(this,e.e,1,null,this),n.h=PropertyFactory.getProp(this,e.h||{k:0},0,.01,this),n.a=PropertyFactory.getProp(this,e.a||{k:0},0,degToRads,this),n.g=new GradientProperty(this,e.g,this)),n.o=PropertyFactory.getProp(this,e.o,0,.01,this),"st"===e.ty||"gs"===e.ty){if(r.lc=lineCapEnum[e.lc||2],r.lj=lineJoinEnum[e.lj||2],1==e.lj&&(r.ml=e.ml),n.w=PropertyFactory.getProp(this,e.w,0,null,this),n.w.k||(r.wi=n.w.v),e.d){var i=new DashProperty(this,e.d,"canvas",this);n.d=i,n.d.k||(r.da=n.d.dashArray,r.do=n.d.dashoffset[0])}}else r.r=2===e.r?"evenodd":"nonzero";return this.stylesList.push(r),n.style=r,n},CVShapeElement.prototype.createGroupElement=function(){return{it:[],prevViewData:[]}},CVShapeElement.prototype.createTransformElement=function(e){return{transform:{opacity:1,_opMdf:!1,key:this.transformsManager.getNewKey(),op:PropertyFactory.getProp(this,e.o,0,.01,this),mProps:TransformPropertyFactory.getTransformProperty(this,e,this)}}},CVShapeElement.prototype.createShapeElement=function(e){var t=new CVShapeData(this,e,this.stylesList,this.transformsManager);return this.shapes.push(t),this.addShapeToModifiers(t),t},CVShapeElement.prototype.reloadShapes=function(){var e;this._isFirstFrame=!0;var t=this.itemsData.length;for(e=0;e=0;o-=1){if((l=this.searchProcessedElement(e[o]))?t[o]=r[l-1]:e[o]._shouldRender=n,"fl"===e[o].ty||"st"===e[o].ty||"gf"===e[o].ty||"gs"===e[o].ty)l?t[o].style.closed=!1:t[o]=this.createStyleElement(e[o],d),p.push(t[o].style);else if("gr"===e[o].ty){if(l)for(s=t[o].it.length,a=0;a=0;i-=1)"tr"===t[i].ty?(o=r[i].transform,this.renderShapeTransform(e,o)):"sh"===t[i].ty||"el"===t[i].ty||"rc"===t[i].ty||"sr"===t[i].ty?this.renderPath(t[i],r[i]):"fl"===t[i].ty?this.renderFill(t[i],r[i],o):"st"===t[i].ty?this.renderStroke(t[i],r[i],o):"gf"===t[i].ty||"gs"===t[i].ty?this.renderGradientFill(t[i],r[i],o):"gr"===t[i].ty?this.renderShape(o,t[i].it,r[i].it):t[i].ty;n&&this.drawLayer()},CVShapeElement.prototype.renderStyledShape=function(e,t){if(this._isFirstFrame||t._mdf||e.transforms._mdf){var r,n,i,o=e.trNodes,a=t.paths,s=a._length;o.length=0;var l=e.transforms.finalTransform;for(i=0;i=1?f=.99:f<=-1&&(f=-.99);var p=u*f,h=Math.cos(c+t.a.v)*p+s[0],d=Math.sin(c+t.a.v)*p+s[1];n=a.createRadialGradient(h,d,0,s[0],s[1],u)}var m=e.g.p,y=t.g.c,g=1;for(o=0;os&&"xMidYMid slice"===l||ai&&"meet"===s||oi&&"slice"===s)?(r-this.transformCanvas.w*(n/this.transformCanvas.h))/2*this.renderConfig.dpr:"xMax"===u&&(oi&&"slice"===s)?(r-this.transformCanvas.w*(n/this.transformCanvas.h))*this.renderConfig.dpr:0,this.transformCanvas.ty="YMid"===c&&(o>i&&"meet"===s||oi&&"meet"===s||o=0;e-=1)this.elements[e]&&this.elements[e].destroy&&this.elements[e].destroy();this.elements.length=0,this.globalData.canvasContext=null,this.animationItem.container=null,this.destroyed=!0},CanvasRendererBase.prototype.renderFrame=function(e,t){if((this.renderedFrame!==e||!0!==this.renderConfig.clearCanvas||t)&&!this.destroyed&&-1!==e){var r;this.renderedFrame=e,this.globalData.frameNum=e-this.animationItem._isFirstFrame,this.globalData.frameId+=1,this.globalData._mdf=!this.renderConfig.clearCanvas||t,this.globalData.projectInterface.currentFrame=e;var n=this.layers.length;for(this.completeLayers||this.checkLayers(e),r=n-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].prepareFrame(e-this.layers[r].st);if(this.globalData._mdf){for(!0===this.renderConfig.clearCanvas?this.canvasContext.clearRect(0,0,this.transformCanvas.w,this.transformCanvas.h):this.save(),r=n-1;r>=0;r-=1)(this.completeLayers||this.elements[r])&&this.elements[r].renderFrame();!0!==this.renderConfig.clearCanvas&&this.restore()}}},CanvasRendererBase.prototype.buildItem=function(e){var t=this.elements;if(!t[e]&&99!==this.layers[e].ty){var r=this.createItem(this.layers[e],this,this.globalData);t[e]=r,r.initExpressions()}},CanvasRendererBase.prototype.checkPendingElements=function(){for(;this.pendingElements.length;)this.pendingElements.pop().checkParenting()},CanvasRendererBase.prototype.hide=function(){this.animationItem.container.style.display="none"},CanvasRendererBase.prototype.show=function(){this.animationItem.container.style.display="block"},CVContextData.prototype.duplicate=function(){var e=2*this._length,t=0;for(t=this._length;t=0;e-=1)(this.completeLayers||this.elements[e])&&this.elements[e].renderFrame()},CVCompElement.prototype.destroy=function(){var e;for(e=this.layers.length-1;e>=0;e-=1)this.elements[e]&&this.elements[e].destroy();this.layers=null,this.elements=null},CVCompElement.prototype.createComp=function(e){return new CVCompElement(e,this.globalData,this)},extendPrototype([CanvasRendererBase],CanvasRenderer),CanvasRenderer.prototype.createComp=function(e){return new CVCompElement(e,this.globalData,this)},HBaseElement.prototype={checkBlendMode:function(){},initRendererElement:function(){this.baseElement=createTag(this.data.tg||"div"),this.data.hasMask?(this.svgElement=createNS("svg"),this.layerElement=createNS("g"),this.maskedElement=this.layerElement,this.svgElement.appendChild(this.layerElement),this.baseElement.appendChild(this.svgElement)):this.layerElement=this.baseElement,styleDiv(this.baseElement)},createContainerElements:function(){this.renderableEffectsManager=new CVEffects(this),this.transformedElement=this.baseElement,this.maskedElement=this.layerElement,this.data.ln&&this.layerElement.setAttribute("id",this.data.ln),this.data.cl&&this.layerElement.setAttribute("class",this.data.cl),0!==this.data.bm&&this.setBlendMode()},renderElement:function(){var e=this.transformedElement?this.transformedElement.style:{};if(this.finalTransform._matMdf){var t=this.finalTransform.mat.toCSS();e.transform=t,e.webkitTransform=t}this.finalTransform._opMdf&&(e.opacity=this.finalTransform.mProp.o.v)},renderFrame:function(){this.data.hd||this.hidden||(this.renderTransform(),this.renderRenderable(),this.renderElement(),this.renderInnerContent(),this._isFirstFrame&&(this._isFirstFrame=!1))},destroy:function(){this.layerElement=null,this.transformedElement=null,this.matteElement&&(this.matteElement=null),this.maskManager&&(this.maskManager.destroy(),this.maskManager=null)},createRenderableComponents:function(){this.maskManager=new MaskElement(this.data,this,this.globalData)},addEffects:function(){},setMatte:function(){}},HBaseElement.prototype.getBaseElement=SVGBaseElement.prototype.getBaseElement,HBaseElement.prototype.destroyBaseElement=HBaseElement.prototype.destroy,HBaseElement.prototype.buildElementParenting=BaseRenderer.prototype.buildElementParenting,extendPrototype([BaseElement,TransformElement,HBaseElement,HierarchyElement,FrameElement,RenderableDOMElement],HSolidElement),HSolidElement.prototype.createContent=function(){var e;this.data.hasMask?((e=createNS("rect")).setAttribute("width",this.data.sw),e.setAttribute("height",this.data.sh),e.setAttribute("fill",this.data.sc),this.svgElement.setAttribute("width",this.data.sw),this.svgElement.setAttribute("height",this.data.sh)):((e=createTag("div")).style.width=this.data.sw+"px",e.style.height=this.data.sh+"px",e.style.backgroundColor=this.data.sc),this.layerElement.appendChild(e)},extendPrototype([BaseElement,TransformElement,HSolidElement,SVGShapeElement,HBaseElement,HierarchyElement,FrameElement,RenderableElement],HShapeElement),HShapeElement.prototype._renderShapeFrame=HShapeElement.prototype.renderInnerContent,HShapeElement.prototype.createContent=function(){var e;if(this.baseElement.style.fontSize=0,this.data.hasMask)this.layerElement.appendChild(this.shapesContainer),e=this.svgElement;else{e=createNS("svg");var t=this.comp.data?this.comp.data:this.globalData.compSize;e.setAttribute("width",t.w),e.setAttribute("height",t.h),e.appendChild(this.shapesContainer),this.layerElement.appendChild(e)}this.searchShapes(this.shapesData,this.itemsData,this.prevViewData,this.shapesContainer,0,[],!0),this.filterUniqueShapes(),this.shapeCont=e},HShapeElement.prototype.getTransformedPoint=function(e,t){var r,n=e.length;for(r=0;r0&&s<1&&f[p].push(this.calculateF(s,e,t,r,n,p)):(l=o*o-4*a*i)>=0&&((u=(-o+bmSqrt(l))/(2*i))>0&&u<1&&f[p].push(this.calculateF(u,e,t,r,n,p)),(c=(-o-bmSqrt(l))/(2*i))>0&&c<1&&f[p].push(this.calculateF(c,e,t,r,n,p))));this.shapeBoundingBox.left=bmMin.apply(null,f[0]),this.shapeBoundingBox.top=bmMin.apply(null,f[1]),this.shapeBoundingBox.right=bmMax.apply(null,f[0]),this.shapeBoundingBox.bottom=bmMax.apply(null,f[1])},HShapeElement.prototype.calculateF=function(e,t,r,n,i,o){return bmPow(1-e,3)*t[o]+3*bmPow(1-e,2)*e*r[o]+3*(1-e)*bmPow(e,2)*n[o]+bmPow(e,3)*i[o]},HShapeElement.prototype.calculateBoundingBox=function(e,t){var r,n=e.length;for(r=0;rr&&(r=i)}r*=e.mult}else r=e.v*e.mult;t.x-=r,t.xMax+=r,t.y-=r,t.yMax+=r},HShapeElement.prototype.currentBoxContains=function(e){return this.currentBBox.x<=e.x&&this.currentBBox.y<=e.y&&this.currentBBox.width+this.currentBBox.x>=e.x+e.width&&this.currentBBox.height+this.currentBBox.y>=e.y+e.height},HShapeElement.prototype.renderInnerContent=function(){if(this._renderShapeFrame(),!this.hidden&&(this._isFirstFrame||this._mdf)){var e=this.tempBoundingBox,t=999999;if(e.x=t,e.xMax=-t,e.y=t,e.yMax=-t,this.calculateBoundingBox(this.itemsData,e),e.width=e.xMax=0;e-=1){var n=this.hierarchy[e].finalTransform.mProp;this.mat.translate(-n.p.v[0],-n.p.v[1],n.p.v[2]),this.mat.rotateX(-n.or.v[0]).rotateY(-n.or.v[1]).rotateZ(n.or.v[2]),this.mat.rotateX(-n.rx.v).rotateY(-n.ry.v).rotateZ(n.rz.v),this.mat.scale(1/n.s.v[0],1/n.s.v[1],1/n.s.v[2]),this.mat.translate(n.a.v[0],n.a.v[1],n.a.v[2])}if(this.p?this.mat.translate(-this.p.v[0],-this.p.v[1],this.p.v[2]):this.mat.translate(-this.px.v,-this.py.v,this.pz.v),this.a){var i;i=this.p?[this.p.v[0]-this.a.v[0],this.p.v[1]-this.a.v[1],this.p.v[2]-this.a.v[2]]:[this.px.v-this.a.v[0],this.py.v-this.a.v[1],this.pz.v-this.a.v[2]];var o=Math.sqrt(Math.pow(i[0],2)+Math.pow(i[1],2)+Math.pow(i[2],2)),a=[i[0]/o,i[1]/o,i[2]/o],s=Math.sqrt(a[2]*a[2]+a[0]*a[0]),l=Math.atan2(a[1],s),u=Math.atan2(a[0],-a[2]);this.mat.rotateY(u).rotateX(-l)}this.mat.rotateX(-this.rx.v).rotateY(-this.ry.v).rotateZ(this.rz.v),this.mat.rotateX(-this.or.v[0]).rotateY(-this.or.v[1]).rotateZ(this.or.v[2]),this.mat.translate(this.globalData.compSize.w/2,this.globalData.compSize.h/2,0),this.mat.translate(0,0,this.pe.v);var c=!this._prevMat.equals(this.mat);if((c||this.pe._mdf)&&this.comp.threeDElements){var f,p,h;for(t=this.comp.threeDElements.length,e=0;e=e)return this.threeDElements[t].perspectiveElem;t+=1}return null},HybridRendererBase.prototype.createThreeDContainer=function(e,t){var r,n,i=createTag("div");styleDiv(i);var o=createTag("div");if(styleDiv(o),"3d"===t){(r=i.style).width=this.globalData.compSize.w+"px",r.height=this.globalData.compSize.h+"px";var a="50% 50%";r.webkitTransformOrigin=a,r.mozTransformOrigin=a,r.transformOrigin=a;var s="matrix3d(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)";(n=o.style).transform=s,n.webkitTransform=s}i.appendChild(o);var l={container:o,perspectiveElem:i,startPos:e,endPos:e,type:t};return this.threeDElements.push(l),l},HybridRendererBase.prototype.build3dContainers=function(){var e,t,r=this.layers.length,n="";for(e=0;e=0;e-=1)this.resizerElem.appendChild(this.threeDElements[e].perspectiveElem)},HybridRendererBase.prototype.addTo3dContainer=function(e,t){for(var r=0,n=this.threeDElements.length;ra?(e=i/this.globalData.compSize.w,t=i/this.globalData.compSize.w,r=0,n=(o-this.globalData.compSize.h*(i/this.globalData.compSize.w))/2):(e=o/this.globalData.compSize.h,t=o/this.globalData.compSize.h,r=(i-this.globalData.compSize.w*(o/this.globalData.compSize.h))/2,n=0);var s=this.resizerElem.style;s.webkitTransform="matrix3d("+e+",0,0,0,0,"+t+",0,0,0,0,1,0,"+r+","+n+",0,1)",s.transform=s.webkitTransform},HybridRendererBase.prototype.renderFrame=SVGRenderer.prototype.renderFrame,HybridRendererBase.prototype.hide=function(){this.resizerElem.style.display="none"},HybridRendererBase.prototype.show=function(){this.resizerElem.style.display="block"},HybridRendererBase.prototype.initItems=function(){if(this.buildAllItems(),this.camera)this.camera.setup();else{var e,t=this.globalData.compSize.w,r=this.globalData.compSize.h,n=this.threeDElements.length;for(e=0;e=l;)e/=2,t/=2,r>>>=1;return(e+r)/t};return x.int32=function(){return 0|b.g(4)},x.quick=function(){return b.g(4)/4294967296},x.double=x,h(d(b.S),e),(m.pass||y||function(e,r,n,i){return i&&(i.S&&f(i,b),e.state=function(){return f(b,{})}),n?(t[o]=e,r):e})(x,v,"global"in m?m.global:this==t,m.state)},h(t.random(),e)}function initialize$2(e){seedRandom([],e)}var propTypes={SHAPE:"shape"};function _typeof$1(e){return _typeof$1="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},_typeof$1(e)}var ExpressionManager=function(){var ob={},Math=BMMath,window=null,document=null,XMLHttpRequest=null,fetch=null,frames=null,_lottieGlobal={};function resetFrame(){_lottieGlobal={}}function $bm_isInstanceOfArray(e){return e.constructor===Array||e.constructor===Float32Array}function isNumerable(e,t){return"number"===e||t instanceof Number||"boolean"===e||"string"===e}function $bm_neg(e){var t=_typeof$1(e);if("number"===t||e instanceof Number||"boolean"===t)return-e;if($bm_isInstanceOfArray(e)){var r,n=e.length,i=[];for(r=0;rr){var n=r;r=t,t=n}return Math.min(Math.max(e,t),r)}function radiansToDegrees(e){return e/degToRads}var radians_to_degrees=radiansToDegrees;function degreesToRadians(e){return e*degToRads}var degrees_to_radians=radiansToDegrees,helperLengthArray=[0,0,0,0,0,0];function length(e,t){if("number"==typeof e||e instanceof Number)return t=t||0,Math.abs(e-t);var r;t||(t=helperLengthArray);var n=Math.min(e.length,t.length),i=0;for(r=0;r.5?u/(2-a-s):u/(a+s),a){case n:t=(i-o)/u+(i1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function hslToRgb(e){var t,r,n,i=e[0],o=e[1],a=e[2];if(0===o)t=a,n=a,r=a;else{var s=a<.5?a*(1+o):a+o-a*o,l=2*a-s;t=hue2rgb(l,s,i+1/3),r=hue2rgb(l,s,i),n=hue2rgb(l,s,i-1/3)}return[t,r,n,e[3]]}function linear(e,t,r,n,i){if(void 0!==n&&void 0!==i||(n=t,i=r,t=0,r=1),r=r)return i;var a,s=r===t?0:(e-t)/(r-t);if(!n.length)return n+(i-n)*s;var l=n.length,u=createTypedArray("float32",l);for(a=0;a1){for(n=0;n1?t=1:t<0&&(t=0);var a=e(t);if($bm_isInstanceOfArray(i)){var s,l=i.length,u=createTypedArray("float32",l);for(s=0;sdata.k[t].t&&edata.k[t+1].t-e?(r=t+2,n=data.k[t+1].t):(r=t+1,n=data.k[t].t);break}}-1===r&&(r=t+1,n=data.k[t].t)}else r=0,n=0;var o={};return o.index=r,o.time=n/elem.comp.globalData.frameRate,o}function key(e){var t,r,n;if(!data.k.length||"number"==typeof data.k[0])throw new Error("The property has no keyframe at index "+e);e-=1,t={time:data.k[e].t/elem.comp.globalData.frameRate,value:[]};var i=Object.prototype.hasOwnProperty.call(data.k[e],"s")?data.k[e].s:data.k[e-1].e;for(n=i.length,r=0;ru.length-1)&&(t=u.length-1),n=c-(i=u[u.length-1-t].t)),"pingpong"===e){if(Math.floor((l-i)/n)%2!=0)return this.getValueAtTime((n-(l-i)%n+i)/this.comp.globalData.frameRate,0)}else{if("offset"===e){var f=this.getValueAtTime(i/this.comp.globalData.frameRate,0),p=this.getValueAtTime(c/this.comp.globalData.frameRate,0),h=this.getValueAtTime(((l-i)%n+i)/this.comp.globalData.frameRate,0),d=Math.floor((l-i)/n);if(this.pv.length){for(a=(s=new Array(f.length)).length,o=0;o=c)return this.pv;if(r?i=c+(n=t?Math.abs(this.elem.comp.globalData.frameRate*t):Math.max(0,this.elem.data.op-c)):((!t||t>u.length-1)&&(t=u.length-1),n=(i=u[t].t)-c),"pingpong"===e){if(Math.floor((c-l)/n)%2==0)return this.getValueAtTime(((c-l)%n+c)/this.comp.globalData.frameRate,0)}else{if("offset"===e){var f=this.getValueAtTime(c/this.comp.globalData.frameRate,0),p=this.getValueAtTime(i/this.comp.globalData.frameRate,0),h=this.getValueAtTime((n-(c-l)%n+c)/this.comp.globalData.frameRate,0),d=Math.floor((c-l)/n)+1;if(this.pv.length){for(a=(s=new Array(f.length)).length,o=0;o1?(i+e-o)/(t-1):1,s=0,l=0;for(r=this.pv.length?createTypedArray("float32",this.pv.length):0;sa){var c=s,f=r.c&&s===l-1?0:s+1,p=(a-u)/o[s].addedLength;n=bez.getPointInSegment(r.v[c],r.v[f],r.o[c],r.i[f],p,o[s]);break}u+=o[s].addedLength,s+=1}return n||(n=r.c?[r.v[0][0],r.v[0][1]]:[r.v[r._length-1][0],r.v[r._length-1][1]]),n},vectorOnPath:function(e,t,r){1==e?e=this.v.c:0==e&&(e=.999);var n=this.pointOnPath(e,t),i=this.pointOnPath(e+.001,t),o=i[0]-n[0],a=i[1]-n[1],s=Math.sqrt(Math.pow(o,2)+Math.pow(a,2));return 0===s?[0,0]:"tangent"===r?[o/s,a/s]:[-a/s,o/s]},tangentOnPath:function(e,t){return this.vectorOnPath(e,t,"tangent")},normalOnPath:function(e,t){return this.vectorOnPath(e,t,"normal")},setGroupProperty:expressionHelpers.setGroupProperty,getValueAtTime:expressionHelpers.getStaticValueAtTime},extendPrototype([u],s),extendPrototype([u],l),l.prototype.getValueAtTime=function(e){return this._cachingAtTime||(this._cachingAtTime={shapeValue:shapePool.clone(this.pv),lastIndex:0,lastTime:initialDefaultFrame}),e*=this.elem.globalData.frameRate,(e-=this.offsetTime)!==this._cachingAtTime.lastTime&&(this._cachingAtTime.lastIndex=this._cachingAtTime.lastTime=u?h<0?n:i:n+p*Math.pow((o-e)/h,1/r),c[f]=a,f+=1,s+=256/255;return c.join(" ")},SVGProLevelsFilter.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){var t,r=this.filterManager.effectElements;this.feFuncRComposed&&(e||r[3].p._mdf||r[4].p._mdf||r[5].p._mdf||r[6].p._mdf||r[7].p._mdf)&&(t=this.getTableValue(r[3].p.v,r[4].p.v,r[5].p.v,r[6].p.v,r[7].p.v),this.feFuncRComposed.setAttribute("tableValues",t),this.feFuncGComposed.setAttribute("tableValues",t),this.feFuncBComposed.setAttribute("tableValues",t)),this.feFuncR&&(e||r[10].p._mdf||r[11].p._mdf||r[12].p._mdf||r[13].p._mdf||r[14].p._mdf)&&(t=this.getTableValue(r[10].p.v,r[11].p.v,r[12].p.v,r[13].p.v,r[14].p.v),this.feFuncR.setAttribute("tableValues",t)),this.feFuncG&&(e||r[17].p._mdf||r[18].p._mdf||r[19].p._mdf||r[20].p._mdf||r[21].p._mdf)&&(t=this.getTableValue(r[17].p.v,r[18].p.v,r[19].p.v,r[20].p.v,r[21].p.v),this.feFuncG.setAttribute("tableValues",t)),this.feFuncB&&(e||r[24].p._mdf||r[25].p._mdf||r[26].p._mdf||r[27].p._mdf||r[28].p._mdf)&&(t=this.getTableValue(r[24].p.v,r[25].p.v,r[26].p.v,r[27].p.v,r[28].p.v),this.feFuncB.setAttribute("tableValues",t)),this.feFuncA&&(e||r[31].p._mdf||r[32].p._mdf||r[33].p._mdf||r[34].p._mdf||r[35].p._mdf)&&(t=this.getTableValue(r[31].p.v,r[32].p.v,r[33].p.v,r[34].p.v,r[35].p.v),this.feFuncA.setAttribute("tableValues",t))}},extendPrototype([SVGComposableEffect],SVGDropShadowEffect),SVGDropShadowEffect.prototype.renderFrame=function(e){if(e||this.filterManager._mdf){if((e||this.filterManager.effectElements[4].p._mdf)&&this.feGaussianBlur.setAttribute("stdDeviation",this.filterManager.effectElements[4].p.v/4),e||this.filterManager.effectElements[0].p._mdf){var t=this.filterManager.effectElements[0].p.v;this.feFlood.setAttribute("flood-color",rgbToHex(Math.round(255*t[0]),Math.round(255*t[1]),Math.round(255*t[2])))}if((e||this.filterManager.effectElements[1].p._mdf)&&this.feFlood.setAttribute("flood-opacity",this.filterManager.effectElements[1].p.v/255),e||this.filterManager.effectElements[2].p._mdf||this.filterManager.effectElements[3].p._mdf){var r=this.filterManager.effectElements[3].p.v,n=(this.filterManager.effectElements[2].p.v-90)*degToRads,i=r*Math.cos(n),o=r*Math.sin(n);this.feOffset.setAttribute("dx",i),this.feOffset.setAttribute("dy",o)}}};var _svgMatteSymbols=[];function SVGMatte3Effect(e,t,r){this.initialized=!1,this.filterManager=t,this.filterElem=e,this.elem=r,r.matteElement=createNS("g"),r.matteElement.appendChild(r.layerElement),r.matteElement.appendChild(r.transformedElement),r.baseElement=r.matteElement}function SVGGaussianBlurEffect(e,t,r,n){e.setAttribute("x","-100%"),e.setAttribute("y","-100%"),e.setAttribute("width","300%"),e.setAttribute("height","300%"),this.filterManager=t;var i=createNS("feGaussianBlur");i.setAttribute("result",n),e.appendChild(i),this.feGaussianBlur=i}function TransformEffect(){}function SVGTransformEffect(e,t){this.init(t)}function CVTransformEffect(e){this.init(e)}return SVGMatte3Effect.prototype.findSymbol=function(e){for(var t=0,r=_svgMatteSymbols.length;t{"use strict";r.r(t)},92872:(e,t,r)=>{"use strict";r.r(t)},68039:(e,t,r)=>{"use strict";r.r(t)},8003:(e,t,r)=>{"use strict";r.r(t)},5501:(e,t,r)=>{"use strict";r.r(t)},64474:(e,t,r)=>{"use strict";r.r(t)},44158:(e,t,r)=>{"use strict";r.r(t)},31198:(e,t,r)=>{"use strict";r.r(t)},31733:(e,t,r)=>{"use strict";r.r(t)},14389:(e,t,r)=>{"use strict";r.r(t)},60937:(e,t,r)=>{"use strict";r.r(t)},64591:(e,t,r)=>{"use strict";r.r(t)},97147:(e,t,r)=>{"use strict";r.r(t)},12524:(e,t,r)=>{"use strict";r.r(t)},29518:(e,t,r)=>{"use strict";r.r(t)},43089:(e,t,r)=>{"use strict";r.r(t)},19860:(e,t,r)=>{"use strict";r.r(t)},1772:(e,t,r)=>{"use strict";r.r(t)},99598:(e,t,r)=>{"use strict";r.r(t)},51403:(e,t,r)=>{"use strict";r.r(t)},654:(e,t,r)=>{"use strict";r.r(t)},33347:(e,t,r)=>{"use strict";r.r(t)},23426:(e,t,r)=>{"use strict";r.r(t)},67259:(e,t,r)=>{"use strict";r.r(t)},75:function(e){(function(){var t,r,n,i,o,a;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(e.exports=function(){return(t()-o)/1e6},r=process.hrtime,i=(t=function(){var e;return 1e9*(e=r())[0]+e[1]})(),a=1e9*process.uptime(),o=i-a):Date.now?(e.exports=function(){return Date.now()-n},n=Date.now()):(e.exports=function(){return(new Date).getTime()-n},n=(new Date).getTime())}).call(this)},92703:(e,t,r)=>{"use strict";var n=r(50414);function i(){}function o(){}o.resetWarningCache=i,e.exports=function(){function e(e,t,r,i,o,a){if(a!==n){var s=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 s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var r={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 r.PropTypes=r,r}},45697:(e,t,r)=>{e.exports=r(92703)()},50414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},54087:(e,t,r)=>{for(var n=r(75),i="undefined"==typeof window?r.g:window,o=["moz","webkit"],a="AnimationFrame",s=i["request"+a],l=i["cancel"+a]||i["cancelRequest"+a],u=0;!s&&u{"use strict";r.r(t),r.d(t,{default:()=>oe});var n=r(87363),i=r.n(n),o=r(41227),a=r(14301),s=function(){if("undefined"!=typeof Map)return Map;function e(e,t){var r=-1;return e.some((function(e,n){return e[0]===t&&(r=n,!0)})),r}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var r=e(this.__entries__,t),n=this.__entries__[r];return n&&n[1]},t.prototype.set=function(t,r){var n=e(this.__entries__,t);~n?this.__entries__[n][1]=r:this.__entries__.push([t,r])},t.prototype.delete=function(t){var r=this.__entries__,n=e(r,t);~n&&r.splice(n,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var r=0,n=this.__entries__;r0},e.prototype.connect_=function(){l&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),p?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){l&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,r=void 0===t?"":t;f.some((function(e){return!!~r.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),d=function(e,t){for(var r=0,n=Object.keys(t);r0},e}(),C="undefined"!=typeof WeakMap?new WeakMap:new s,P=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var r=h.getInstance(),n=new E(t,r,this);C.set(this,n)};["observe","unobserve","disconnect"].forEach((function(e){P.prototype[e]=function(){var t;return(t=C.get(this))[e].apply(t,arguments)}}));const O=void 0!==u.ResizeObserver?u.ResizeObserver:P;function A(){return A=Object.assign||function(e){for(var t=1;t=2?(new G).handleDrawStart(t,r):e.handleDrawMove(t,r):(new U).handleDrawStart(t,r)})),R(this,"handleDrawMove",(function(t,r){if(t.preventDefault(),t.touches&&t.touches.length>=2)return(new G).handleDrawStart(t,r);var n=Y(t);if((e.deferredPoints.push(n),(new Date).valueOf()-e.startTimestamp<250)&&(null===e.startClientPoint&&(e.startClientPoint=n),Math.abs(n.clientX-e.startClientPoint.clientX)+Math.abs(n.clientY-e.startClientPoint.clientY)<10))return e;return e.issueDeferredPoints(r)})),R(this,"handleDrawEnd",(function(t,r){return e.issueDeferredPoints(r).handleDrawEnd(t,r)})),R(this,"issueDeferredPoints",(function(t){for(var r=new U,n=0;n=10)return new W(e).handleDrawMove(t,r);var a=i.clientX-e.start.centroid.clientX,s=i.clientY-e.start.centroid.clientY;return Math.abs(a)+Math.abs(s)>=10?new H(e).handleDrawMove(t,r):e})),R(this,"handleDrawEnd",(function(){return new N})),R(this,"getTouchMetrics",(function(e){var t=Y(e.touches[0]),r=t.clientX,n=t.clientY,i=Y(e.touches[1]),o=i.clientX,a=i.clientY,s=o-r,l=a-n;return{t1:{clientX:r,clientY:n},t2:{clientX:o,clientY:a},distance:Math.sqrt(s*s+l*l),centroid:{clientX:(r+o)/2,clientY:(n+a)/2}}}))},H=function(e){var t=this;R(this,"handleMouseWheel",F.bind(this)),R(this,"handleDrawStart",(function(){return t})),R(this,"handleDrawMove",(function(e,r){if(e.preventDefault(),!e.touches||e.touches.length<2)return new N;var n=t.scaleOrPanState,i=n.recentMetrics=n.getTouchMetrics(e),o=i.centroid,a=(i.distance,o.clientX-n.start.centroid.clientX),s=o.clientY-n.start.centroid.clientY;return r.setView({x:n.panStart.x+a,y:n.panStart.y+s}),t})),R(this,"handleDrawEnd",(function(){return new N})),this.scaleOrPanState=e},W=function(e){var t=this;R(this,"handleMouseWheel",F.bind(this)),R(this,"handleDrawStart",(function(){return t})),R(this,"handleDrawMove",(function(e,r){if(e.preventDefault(),!e.touches||e.touches.length<2)return new N;var n=t.scaleOrPanState,i=n.recentMetrics=n.getTouchMetrics(e),o=i.centroid,a=i.distance,s=n.scaleStart*(a/n.start.distance)-r.coordSystem.scale;return r.coordSystem.scaleAtClientPoint(s,o),t})),R(this,"handleDrawEnd",(function(){return new N})),this.scaleOrPanState=e},U=function(){var e=this;R(this,"handleMouseWheel",F.bind(this)),R(this,"handleDrawStart",(function(t,r){if(t.preventDefault(),t.touches&&t.touches.length){var n=$(r.coordSystem,t),i=n.x,o=n.y;r.lazy.update({x:i,y:o},{both:!0})}return e.handleDrawMove(t,r)})),R(this,"handleDrawMove",(function(t,r){t.preventDefault();var n=$(r.coordSystem,t),i=n.x,o=n.y;r.lazy.update({x:i,y:o});var a=!r.lazy.isEnabled();return e.isDrawing&&!a||(r.points.push(r.clampPointToDocument(r.lazy.brush.toObject())),e.isDrawing=!0),r.points.push(r.clampPointToDocument(r.lazy.brush.toObject())),r.drawPoints({points:r.points,brushColor:r.props.brushColor,brushRadius:r.props.brushRadius}),e})),R(this,"handleDrawEnd",(function(t,r){return t.preventDefault(),e.handleDrawMove(t,r),r.saveLine(),new N})),this.isDrawing=!1},q=function(e){var t=e.clientX,r=e.clientY;R(this,"preventDefault",(function(){})),this.clientX=t,this.clientY=r,this.touches=[{clientX:t,clientY:r}]};function Y(e){var t=e.clientX,r=e.clientY;return e.changedTouches&&e.changedTouches.length>0&&(t=e.changedTouches[0].clientX,r=e.changedTouches[0].clientY),{clientX:t,clientY:r}}function $(e,t){return e.clientPointToViewPoint(Y(t))}var K=!1;try{var Z={get passive(){return K=!0,!1}};window.addEventListener("test",Z,Z),window.removeEventListener("test",Z,Z)}catch(e){K=!1}function Q(e,t){var r;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return X(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return X(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0;return function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)}function X(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r1&&(l=1),u>1&&(u=1);var c,f,p,h,d=n.width,m=n.height,y=Math.min(a/d,s/m),g=d*y,v=m*y,b=1;gd&&(p=d),h>m&&(h=m),r.drawImage(n,c,f,p,h,i,o,a,s)}({ctx:r.ctx.grid,img:r.image})})),te(ee(r),"simulateDrawingLines",(function(e){var t=e.lines,n=e.immediate,i=0,o=n?0:r.props.loadTimeOffset;t.forEach((function(e){var t=e.points,a=e.brushColor,s=e.brushRadius;if(n)return r.drawPoints({points:t,brushColor:a,brushRadius:s}),r.points=t,void r.saveLine({brushColor:a,brushRadius:s});for(var l=function(e){i+=o,window.setTimeout((function(){r.drawPoints({points:t.slice(0,e+1),brushColor:a,brushRadius:s})}),i)},u=1;u{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}(r(87363)),i=e=>"checkbox"===e.type,o=e=>e instanceof Date,a=e=>null==e;const s=e=>"object"==typeof e;var l=e=>!a(e)&&!Array.isArray(e)&&s(e)&&!o(e),u=e=>l(e)&&e.target?i(e.target)?e.target.checked:e.target.value:e,c=(e,t)=>e.has((e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e)(t)),f="undefined"!=typeof window&&void 0!==window.HTMLElement&&"undefined"!=typeof document;function p(e){let t;const r=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(f&&(e instanceof Blob||e instanceof FileList)||!r&&!l(e))return e;if(t=r?[]:{},r||(e=>{const t=e.constructor&&e.constructor.prototype;return l(t)&&t.hasOwnProperty("isPrototypeOf")})(e))for(const r in e)e.hasOwnProperty(r)&&(t[r]=p(e[r]));else t=e}return t}var h=e=>Array.isArray(e)?e.filter(Boolean):[],d=e=>void 0===e,m=(e,t,r)=>{if(!t||!l(e))return r;const n=h(t.split(/[,[\].]+?/)).reduce(((e,t)=>a(e)?e:e[t]),e);return d(n)||n===e?d(e[t])?r:e[t]:n};const y="blur",g="onChange",v="onSubmit",b="all",x="pattern",w="required",k=n.default.createContext(null),_=()=>n.default.useContext(k);var S=(e,t,r,n=!0)=>{const i={defaultValues:t._defaultValues};for(const o in e)Object.defineProperty(i,o,{get:()=>{const i=o;return t._proxyFormState[i]!==b&&(t._proxyFormState[i]=!n||b),r&&(r[i]=!0),e[i]}});return i},E=e=>l(e)&&!Object.keys(e).length,C=(e,t,r,n)=>{r(e);const{name:i,...o}=e;return E(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find((e=>t[e]===(!n||b)))},P=e=>Array.isArray(e)?e:[e],O=(e,t,r)=>r&&t?e===t:!e||!t||e===t||P(e).some((e=>e&&(e.startsWith(t)||t.startsWith(e))));function A(e){const t=n.default.useRef(e);t.current=e,n.default.useEffect((()=>{const r=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{r&&r.unsubscribe()}}),[e.disabled])}function M(e){const t=_(),{control:r=t.control,disabled:i,name:o,exact:a}=e||{},[s,l]=n.default.useState(r._formState),u=n.default.useRef(!0),c=n.default.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),f=n.default.useRef(o);return f.current=o,A({disabled:i,next:e=>u.current&&O(f.current,e.name,a)&&C(e,c.current,r._updateFormState)&&l({...r._formState,...e}),subject:r._subjects.state}),n.default.useEffect((()=>(u.current=!0,c.current.isValid&&r._updateValid(!0),()=>{u.current=!1})),[r]),S(s,r,c.current,!1)}var T=e=>"string"==typeof e,L=(e,t,r,n,i)=>T(e)?(n&&t.watch.add(e),m(r,e,i)):Array.isArray(e)?e.map((e=>(n&&t.watch.add(e),m(r,e)))):(n&&(t.watchAll=!0),r);function j(e){const t=_(),{control:r=t.control,name:i,defaultValue:o,disabled:a,exact:s}=e||{},l=n.default.useRef(i);l.current=i,A({disabled:a,subject:r._subjects.values,next:e=>{O(l.current,e.name,s)&&c(p(L(l.current,r._names,e.values||r._formValues,!1,o)))}});const[u,c]=n.default.useState(r._getWatch(i,o));return n.default.useEffect((()=>r._removeUnmounted())),u}var I=e=>/^\w*$/.test(e),D=e=>h(e.replace(/["|']|\]/g,"").split(/\.|\[/));function R(e,t,r){let n=-1;const i=I(t)?[t]:D(t),o=i.length,a=o-1;for(;++n{const e=i._options.shouldUnregister||o,t=(e,t)=>{const r=m(i._fields,e);r&&(r._f.mount=t)};if(t(r,!0),e){const e=p(m(i._options.defaultValues,r));R(i._defaultValues,r,e),d(m(i._formValues,r))&&R(i._formValues,r,e)}return()=>{(a?e&&!i._state.action:e)?i.unregister(r):t(r,!1)}}),[r,i,a,o]),{field:{name:r,value:s,onChange:n.default.useCallback((e=>f.current.onChange({target:{value:u(e),name:r},type:"change"})),[r]),onBlur:n.default.useCallback((()=>f.current.onBlur({target:{value:m(i._formValues,r),name:r},type:y})),[r,i]),ref:e=>{const t=m(i._fields,r);t&&e&&(t._f.ref={focus:()=>e.focus(),select:()=>e.select(),setCustomValidity:t=>e.setCustomValidity(t),reportValidity:()=>e.reportValidity()})}},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!m(l.errors,r)},isDirty:{enumerable:!0,get:()=>!!m(l.dirtyFields,r)},isTouched:{enumerable:!0,get:()=>!!m(l.touchedFields,r)},error:{enumerable:!0,get:()=>m(l.errors,r)}})}}const N="post";var B=(e,t,r,n,i)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[n]:i||!0}}:{};const V=(e,t,r)=>{for(const n of r||Object.keys(e)){const r=m(e,n);if(r){const{_f:e,...n}=r;if(e&&t(e.name)){if(e.ref.focus){e.ref.focus();break}if(e.refs&&e.refs[0].focus){e.refs[0].focus();break}}else l(n)&&V(n,t)}}};var z=()=>{const e="undefined"==typeof performance?Date.now():1e3*performance.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(t=>{const r=(16*Math.random()+e)%16|0;return("x"==t?r:3&r|8).toString(16)}))},G=(e,t,r={})=>r.shouldFocus||d(r.shouldFocus)?r.focusName||`${e}.${d(r.focusIndex)?t:r.focusIndex}.`:"",H=e=>({isOnSubmit:!e||e===v,isOnBlur:"onBlur"===e,isOnChange:e===g,isOnAll:e===b,isOnTouch:"onTouched"===e}),W=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some((t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))))),U=(e,t,r)=>{const n=h(m(e,r));return R(n,"root",t[r]),R(e,r,n),e},q=e=>"boolean"==typeof e,Y=e=>"file"===e.type,$=e=>"function"==typeof e,K=e=>{if(!f)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Z=e=>T(e),Q=e=>"radio"===e.type,X=e=>e instanceof RegExp;const J={value:!1,isValid:!1},ee={value:!0,isValid:!0};var te=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter((e=>e&&e.checked&&!e.disabled)).map((e=>e.value));return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!d(e[0].attributes.value)?d(e[0].value)||""===e[0].value?ee:{value:e[0].value,isValid:!0}:ee:J}return J};const re={isValid:!1,value:null};var ne=e=>Array.isArray(e)?e.reduce(((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e),re):re;function ie(e,t,r="validate"){if(Z(e)||Array.isArray(e)&&e.every(Z)||q(e)&&!e)return{type:r,message:Z(e)?e:"",ref:t}}var oe=e=>l(e)&&!X(e)?e:{value:e,message:""},ae=async(e,t,r,n,o)=>{const{ref:s,refs:u,required:c,maxLength:f,minLength:p,min:h,max:y,pattern:g,validate:v,name:b,valueAsNumber:k,mount:_,disabled:S}=e._f,C=m(t,b);if(!_||S)return{};const P=u?u[0]:s,O=e=>{n&&P.reportValidity&&(P.setCustomValidity(q(e)?"":e||""),P.reportValidity())},A={},M=Q(s),L=i(s),j=M||L,I=(k||Y(s))&&d(s.value)&&d(C)||K(s)&&""===s.value||""===C||Array.isArray(C)&&!C.length,D=B.bind(null,b,r,A),R=(e,t,r,n="maxLength",i="minLength")=>{const o=e?t:r;A[b]={type:e?n:i,message:o,ref:s,...D(e?n:i,o)}};if(o?!Array.isArray(C)||!C.length:c&&(!j&&(I||a(C))||q(C)&&!C||L&&!te(u).isValid||M&&!ne(u).isValid)){const{value:e,message:t}=Z(c)?{value:!!c,message:c}:oe(c);if(e&&(A[b]={type:w,message:t,ref:P,...D(w,t)},!r))return O(t),A}if(!(I||a(h)&&a(y))){let e,t;const n=oe(y),i=oe(h);if(a(C)||isNaN(C)){const r=s.valueAsDate||new Date(C),o=e=>new Date((new Date).toDateString()+" "+e),a="time"==s.type,l="week"==s.type;T(n.value)&&C&&(e=a?o(C)>o(n.value):l?C>n.value:r>new Date(n.value)),T(i.value)&&C&&(t=a?o(C)n.value),a(i.value)||(t=r+e.value,i=!a(t.value)&&C.length<+t.value;if((n||i)&&(R(n,e.message,t.message),!r))return O(A[b].message),A}if(g&&!I&&T(C)){const{value:e,message:t}=oe(g);if(X(e)&&!C.match(e)&&(A[b]={type:x,message:t,ref:s,...D(x,t)},!r))return O(t),A}if(v)if($(v)){const e=ie(await v(C,t),P);if(e&&(A[b]={...e,...D("validate",e.message)},!r))return O(e.message),A}else if(l(v)){let e={};for(const n in v){if(!E(e)&&!r)break;const i=ie(await v[n](C,t),P,n);i&&(e={...i,...D(n,i.message)},O(i.message),r&&(A[b]=e))}if(!E(e)&&(A[b]={ref:P,...e},!r))return A}return O(!0),A};function se(e,t){return[...e,...P(t)]}var le=e=>Array.isArray(e)?e.map((()=>{})):void 0;function ue(e,t,r){return[...e.slice(0,t),...P(r),...e.slice(t)]}var ce=(e,t,r)=>Array.isArray(e)?(d(e[r])&&(e[r]=void 0),e.splice(r,0,e.splice(t,1)[0]),e):[];function fe(e,t){return[...P(t),...P(e)]}var pe=(e,t)=>d(t)?[]:function(e,t){let r=0;const n=[...e];for(const e of t)n.splice(e-r,1),r++;return h(n).length?n:[]}(e,P(t).sort(((e,t)=>e-t))),he=(e,t,r)=>{e[t]=[e[r],e[r]=e[t]][0]};function de(e,t){const r=Array.isArray(t)?t:I(t)?[t]:D(t),n=1===r.length?e:function(e,t){const r=t.slice(0,-1).length;let n=0;for(;n(e[t]=r,e);function ye(){let e=[];return{get observers(){return e},next:t=>{for(const r of e)r.next&&r.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter((e=>e!==t))}}),unsubscribe:()=>{e=[]}}}var ge=e=>a(e)||!s(e);function ve(e,t){if(ge(e)||ge(t))return e===t;if(o(e)&&o(t))return e.getTime()===t.getTime();const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(const i of r){const r=e[i];if(!n.includes(i))return!1;if("ref"!==i){const e=t[i];if(o(r)&&o(e)||l(r)&&l(e)||Array.isArray(r)&&Array.isArray(e)?!ve(r,e):r!==e)return!1}}return!0}var be=e=>"select-multiple"===e.type,xe=e=>K(e)&&e.isConnected,we=e=>{for(const t in e)if($(e[t]))return!0;return!1};function ke(e,t={}){const r=Array.isArray(e);if(l(e)||r)for(const r in e)Array.isArray(e[r])||l(e[r])&&!we(e[r])?(t[r]=Array.isArray(e[r])?[]:{},ke(e[r],t[r])):a(e[r])||(t[r]=!0);return t}function _e(e,t,r){const n=Array.isArray(e);if(l(e)||n)for(const n in e)Array.isArray(e[n])||l(e[n])&&!we(e[n])?d(t)||ge(r[n])?r[n]=Array.isArray(e[n])?ke(e[n],[]):{...ke(e[n])}:_e(e[n],a(t)?{}:t[n],r[n]):r[n]=!ve(e[n],t[n]);return r}var Se=(e,t)=>_e(e,t,ke(t)),Ee=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:n})=>d(e)?e:t?""===e?NaN:e?+e:e:r&&T(e)?new Date(e):n?n(e):e;function Ce(e){const t=e.ref;if(!(e.refs?e.refs.every((e=>e.disabled)):t.disabled))return Y(t)?t.files:Q(t)?ne(e.refs).value:be(t)?[...t.selectedOptions].map((({value:e})=>e)):i(t)?te(e.refs).value:Ee(d(t.value)?e.ref.value:t.value,e)}var Pe=e=>d(e)?e:X(e)?e.source:l(e)?X(e.value)?e.value.source:e.value:e;function Oe(e,t,r){const n=m(e,r);if(n||I(r))return{error:n,name:r};const i=r.split(".");for(;i.length;){const n=i.join("."),o=m(t,n),a=m(e,n);if(o&&!Array.isArray(o)&&r!==n)return{name:r};if(a&&a.type)return{name:n,error:a};i.pop()}return{name:r}}const Ae={mode:v,reValidateMode:g,shouldFocusError:!0};function Me(e={},t){let r,n={...Ae,...e},s={submitCount:0,isDirty:!1,isLoading:$(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},g={},v=(l(n.defaultValues)||l(n.values))&&p(n.defaultValues||n.values)||{},x=n.shouldUnregister?{}:p(v),w={action:!1,mount:!1,watch:!1},k={mount:new Set,unMount:new Set,array:new Set,watch:new Set},_=0;const S={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},C={values:ye(),array:ye(),state:ye()},O=e.resetOptions&&e.resetOptions.keepDirtyValues,A=H(n.mode),M=H(n.reValidateMode),j=n.criteriaMode===b,I=async e=>{if(S.isValid||e){const e=n.resolver?E((await z()).errors):await G(g,!0);e!==s.isValid&&C.state.next({isValid:e})}},D=e=>S.isValidating&&C.state.next({isValidating:e}),F=(e,t,r,n)=>{const i=m(g,e);if(i){const o=m(x,e,d(r)?m(v,e):r);d(o)||n&&n.defaultChecked||t?R(x,e,t?o:Ce(i._f)):J(e,o),w.mount&&I()}},N=(e,t,r,n,i)=>{let o=!1,a=!1;const l={name:e};if(!r||n){S.isDirty&&(a=s.isDirty,s.isDirty=l.isDirty=Z(),o=a!==l.isDirty);const r=ve(m(v,e),t);a=m(s.dirtyFields,e),r?de(s.dirtyFields,e):R(s.dirtyFields,e,!0),l.dirtyFields=s.dirtyFields,o=o||S.dirtyFields&&a!==!r}if(r){const t=m(s.touchedFields,e);t||(R(s.touchedFields,e,r),l.touchedFields=s.touchedFields,o=o||S.touchedFields&&t!==r)}return o&&i&&C.state.next(l),o?l:{}},B=(t,n,i,o)=>{const a=m(s.errors,t),l=S.isValid&&q(n)&&s.isValid!==n;var u;if(e.delayError&&i?(u=()=>((e,t)=>{R(s.errors,e,t),C.state.next({errors:s.errors})})(t,i),r=e=>{clearTimeout(_),_=setTimeout(u,e)},r(e.delayError)):(clearTimeout(_),r=null,i?R(s.errors,t,i):de(s.errors,t)),(i?!ve(a,i):a)||!E(o)||l){const e={...o,...l&&q(n)?{isValid:n}:{},errors:s.errors,name:t};s={...s,...e},C.state.next(e)}D(!1)},z=async e=>n.resolver(x,n.context,((e,t,r,n)=>{const i={};for(const r of e){const e=m(t,r);e&&R(i,r,e._f)}return{criteriaMode:r,names:[...e],fields:i,shouldUseNativeValidation:n}})(e||k.mount,g,n.criteriaMode,n.shouldUseNativeValidation)),G=async(e,t,r={valid:!0})=>{for(const i in e){const o=e[i];if(o){const{_f:e,...i}=o;if(e){const i=k.array.has(e.name),a=await ae(o,x,j,n.shouldUseNativeValidation&&!t,i);if(a[e.name]&&(r.valid=!1,t))break;!t&&(m(a,e.name)?i?U(s.errors,a,e.name):R(s.errors,e.name,a[e.name]):de(s.errors,e.name))}i&&await G(i,t,r)}}return r.valid},Z=(e,t)=>(e&&t&&R(x,e,t),!ve(ie(),v)),X=(e,t,r)=>L(e,k,{...w.mount?x:d(t)?v:T(e)?{[e]:t}:t},r,t),J=(e,t,r={})=>{const n=m(g,e);let o=t;if(n){const r=n._f;r&&(!r.disabled&&R(x,e,Ee(t,r)),o=K(r.ref)&&a(t)?"":t,be(r.ref)?[...r.ref.options].forEach((e=>e.selected=o.includes(e.value))):r.refs?i(r.ref)?r.refs.length>1?r.refs.forEach((e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(o)?!!o.find((t=>t===e.value)):o===e.value))):r.refs[0]&&(r.refs[0].checked=!!o):r.refs.forEach((e=>e.checked=e.value===o)):Y(r.ref)?r.ref.value="":(r.ref.value=o,r.ref.type||C.values.next({name:e,values:{...x}})))}(r.shouldDirty||r.shouldTouch)&&N(e,o,r.shouldTouch,r.shouldDirty,!0),r.shouldValidate&&ne(e)},ee=(e,t,r)=>{for(const n in t){const i=t[n],a=`${e}.${n}`,s=m(g,a);!k.array.has(e)&&ge(i)&&(!s||s._f)||o(i)?J(a,i,r):ee(a,i,r)}},te=(e,r,n={})=>{const i=m(g,e),o=k.array.has(e),l=p(r);R(x,e,l),o?(C.array.next({name:e,values:{...x}}),(S.isDirty||S.dirtyFields)&&n.shouldDirty&&C.state.next({name:e,dirtyFields:Se(v,x),isDirty:Z(e,l)})):!i||i._f||a(l)?J(e,l,n):ee(e,l,n),W(e,k)&&C.state.next({...s}),C.values.next({name:e,values:{...x}}),!w.mount&&t()},re=async e=>{const t=e.target;let i=t.name,o=!0;const a=m(g,i);if(a){let c,f;const p=t.type?Ce(a._f):u(e),h=e.type===y||"focusout"===e.type,d=!((l=a._f).mount&&(l.required||l.min||l.max||l.maxLength||l.minLength||l.pattern||l.validate)||n.resolver||m(s.errors,i)||a._f.deps)||((e,t,r,n,i)=>!i.isOnAll&&(!r&&i.isOnTouch?!(t||e):(r?n.isOnBlur:i.isOnBlur)?!e:!(r?n.isOnChange:i.isOnChange)||e))(h,m(s.touchedFields,i),s.isSubmitted,M,A),v=W(i,k,h);R(x,i,p),h?(a._f.onBlur&&a._f.onBlur(e),r&&r(0)):a._f.onChange&&a._f.onChange(e);const b=N(i,p,h,!1),w=!E(b)||v;if(!h&&C.values.next({name:i,type:e.type,values:{...x}}),d)return S.isValid&&I(),w&&C.state.next({name:i,...v?{}:b});if(!h&&v&&C.state.next({...s}),D(!0),n.resolver){const{errors:e}=await z([i]),t=Oe(s.errors,g,i),r=Oe(e,g,t.name||i);c=r.error,i=r.name,f=E(e)}else c=(await ae(a,x,j,n.shouldUseNativeValidation))[i],o=isNaN(p)||p===m(x,i,p),o&&(c?f=!1:S.isValid&&(f=await G(g,!0)));o&&(a._f.deps&&ne(a._f.deps),B(i,f,c,b))}var l},ne=async(e,t={})=>{let r,i;const o=P(e);if(D(!0),n.resolver){const t=await(async e=>{const{errors:t}=await z();if(e)for(const r of e){const e=m(t,r);e?R(s.errors,r,e):de(s.errors,r)}else s.errors=t;return t})(d(e)?e:o);r=E(t),i=e?!o.some((e=>m(t,e))):r}else e?(i=(await Promise.all(o.map((async e=>{const t=m(g,e);return await G(t&&t._f?{[e]:t}:t)})))).every(Boolean),(i||s.isValid)&&I()):i=r=await G(g);return C.state.next({...!T(e)||S.isValid&&r!==s.isValid?{}:{name:e},...n.resolver||!e?{isValid:r}:{},errors:s.errors,isValidating:!1}),t.shouldFocus&&!i&&V(g,(e=>e&&m(s.errors,e)),e?o:k.mount),i},ie=e=>{const t={...v,...w.mount?x:{}};return d(e)?t:T(e)?m(t,e):e.map((e=>m(t,e)))},oe=(e,t)=>({invalid:!!m((t||s).errors,e),isDirty:!!m((t||s).dirtyFields,e),isTouched:!!m((t||s).touchedFields,e),error:m((t||s).errors,e)}),se=(e,t,r)=>{const n=(m(g,e,{_f:{}})._f||{}).ref;R(s.errors,e,{...t,ref:n}),C.state.next({name:e,errors:s.errors,isValid:!1}),r&&r.shouldFocus&&n&&n.focus&&n.focus()},le=(e,t={})=>{for(const r of e?P(e):k.mount)k.mount.delete(r),k.array.delete(r),t.keepValue||(de(g,r),de(x,r)),!t.keepError&&de(s.errors,r),!t.keepDirty&&de(s.dirtyFields,r),!t.keepTouched&&de(s.touchedFields,r),!n.shouldUnregister&&!t.keepDefaultValue&&de(v,r);C.values.next({values:{...x}}),C.state.next({...s,...t.keepDirty?{isDirty:Z()}:{}}),!t.keepIsValid&&I()},ue=(e,t={})=>{let r=m(g,e);const o=q(t.disabled);return R(g,e,{...r||{},_f:{...r&&r._f?r._f:{ref:{name:e}},name:e,mount:!0,...t}}),k.mount.add(e),r?o&&R(x,e,t.disabled?void 0:m(x,e,Ce(r._f))):F(e,!0,t.value),{...o?{disabled:t.disabled}:{},...n.progressive?{required:!!t.required,min:Pe(t.min),max:Pe(t.max),minLength:Pe(t.minLength),maxLength:Pe(t.maxLength),pattern:Pe(t.pattern)}:{},name:e,onChange:re,onBlur:re,ref:o=>{if(o){ue(e,t),r=m(g,e);const n=d(o.value)&&o.querySelectorAll&&o.querySelectorAll("input,select,textarea")[0]||o,a=(e=>Q(e)||i(e))(n),s=r._f.refs||[];if(a?s.find((e=>e===n)):n===r._f.ref)return;R(g,e,{_f:{...r._f,...a?{refs:[...s.filter(xe),n,...Array.isArray(m(v,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),F(e,!1,void 0,n)}else r=m(g,e,{}),r._f&&(r._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!c(k.array,e)||!w.action)&&k.unMount.add(e)}}},ce=()=>n.shouldFocusError&&V(g,(e=>e&&m(s.errors,e)),k.mount),fe=(e,t)=>async r=>{r&&(r.preventDefault&&r.preventDefault(),r.persist&&r.persist());let i=p(x);if(C.state.next({isSubmitting:!0}),n.resolver){const{errors:e,values:t}=await z();s.errors=e,i=t}else await G(g);de(s.errors,"root"),E(s.errors)?(C.state.next({errors:{}}),await e(i,r)):(t&&await t({...s.errors},r),ce(),setTimeout(ce)),C.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:E(s.errors),submitCount:s.submitCount+1,errors:s.errors})},pe=(r,n={})=>{const i=r||v,o=p(i),a=r&&!E(r)?o:v;if(n.keepDefaultValues||(v=i),!n.keepValues){if(n.keepDirtyValues||O)for(const e of k.mount)m(s.dirtyFields,e)?R(a,e,m(x,e)):te(e,m(a,e));else{if(f&&d(r))for(const e of k.mount){const t=m(g,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(K(e)){const t=e.closest("form");if(t){t.reset();break}}}}g={}}x=e.shouldUnregister?n.keepDefaultValues?p(v):{}:p(a),C.array.next({values:{...a}}),C.values.next({values:{...a}})}k={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!w.mount&&t(),w.mount=!S.isValid||!!n.keepIsValid,w.watch=!!e.shouldUnregister,C.state.next({submitCount:n.keepSubmitCount?s.submitCount:0,isDirty:n.keepDirty?s.isDirty:!(!n.keepDefaultValues||ve(r,v)),isSubmitted:!!n.keepIsSubmitted&&s.isSubmitted,dirtyFields:n.keepDirtyValues?s.dirtyFields:n.keepDefaultValues&&r?Se(v,r):{},touchedFields:n.keepTouched?s.touchedFields:{},errors:n.keepErrors?s.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},he=(e,t)=>pe($(e)?e(x):e,t);return{control:{register:ue,unregister:le,getFieldState:oe,handleSubmit:fe,setError:se,_executeSchema:z,_getWatch:X,_getDirty:Z,_updateValid:I,_removeUnmounted:()=>{for(const e of k.unMount){const t=m(g,e);t&&(t._f.refs?t._f.refs.every((e=>!xe(e))):!xe(t._f.ref))&&le(e)}k.unMount=new Set},_updateFieldArray:(e,t=[],r,n,i=!0,o=!0)=>{if(n&&r){if(w.action=!0,o&&Array.isArray(m(g,e))){const t=r(m(g,e),n.argA,n.argB);i&&R(g,e,t)}if(o&&Array.isArray(m(s.errors,e))){const t=r(m(s.errors,e),n.argA,n.argB);i&&R(s.errors,e,t),((e,t)=>{!h(m(e,t)).length&&de(e,t)})(s.errors,e)}if(S.touchedFields&&o&&Array.isArray(m(s.touchedFields,e))){const t=r(m(s.touchedFields,e),n.argA,n.argB);i&&R(s.touchedFields,e,t)}S.dirtyFields&&(s.dirtyFields=Se(v,x)),C.state.next({name:e,isDirty:Z(e,t),dirtyFields:s.dirtyFields,errors:s.errors,isValid:s.isValid})}else R(x,e,t)},_getFieldArray:t=>h(m(w.mount?x:v,t,e.shouldUnregister?m(v,t,[]):[])),_reset:pe,_resetDefaultValues:()=>$(n.defaultValues)&&n.defaultValues().then((e=>{he(e,n.resetOptions),C.state.next({isLoading:!1})})),_updateFormState:e=>{s={...s,...e}},_subjects:C,_proxyFormState:S,get _fields(){return g},get _formValues(){return x},get _state(){return w},set _state(e){w=e},get _defaultValues(){return v},get _names(){return k},set _names(e){k=e},get _formState(){return s},set _formState(e){s=e},get _options(){return n},set _options(e){n={...n,...e}}},trigger:ne,register:ue,handleSubmit:fe,watch:(e,t)=>$(e)?C.values.subscribe({next:r=>e(X(void 0,t),r)}):X(e,t,!0),setValue:te,getValues:ie,reset:he,resetField:(e,t={})=>{m(g,e)&&(d(t.defaultValue)?te(e,m(v,e)):(te(e,t.defaultValue),R(v,e,t.defaultValue)),t.keepTouched||de(s.touchedFields,e),t.keepDirty||(de(s.dirtyFields,e),s.isDirty=t.defaultValue?Z(e,m(v,e)):Z()),t.keepError||(de(s.errors,e),S.isValid&&I()),C.state.next({...s}))},clearErrors:e=>{e&&P(e).forEach((e=>de(s.errors,e))),C.state.next({errors:e?s.errors:{}})},unregister:le,setError:se,setFocus:(e,t={})=>{const r=m(g,e),n=r&&r._f;if(n){const e=n.refs?n.refs[0]:n.ref;e.focus&&(e.focus(),t.shouldSelect&&e.select())}},getFieldState:oe}}t.Controller=e=>e.render(F(e)),t.Form=function(e){const t=_(),[r,i]=n.default.useState(!1),{control:o=t.control,onSubmit:a,children:s,action:l,method:u=N,headers:c,encType:f,onError:p,render:h,onSuccess:d,validateStatus:y,...g}=e,v=async t=>{let r=!1,n="";await o.handleSubmit((async e=>{const i=new FormData;let s="";try{s=JSON.stringify(e)}catch(e){}for(const t of o._names.mount)i.append(t,m(e,t));if(a&&a({data:e,event:t,method:u,formData:i,formDataJson:s}),l)try{const e=[c&&c["Content-Type"],f].some((e=>e&&e.includes("json"))),t=await fetch(l,{method:u,headers:{...c,...f?{"Content-Type":f}:{}},body:e?s:i});t&&(y?!y(t.status):t.status<200||t.status>=300)?(r=!0,p&&p({response:t}),n=String(t.status)):d&&d({response:t})}catch(e){r=!0,p&&p({error:e})}}))(t),r&&e.control&&(e.control._subjects.state.next({isSubmitSuccessful:!1}),e.control.setError("root.server",{type:n}))};return n.default.useEffect((()=>{i(!0)}),[]),h?n.default.createElement(n.default.Fragment,null,h({submit:v})):n.default.createElement("form",{noValidate:r,action:l,method:u,encType:f,onSubmit:v,...g},s)},t.FormProvider=e=>{const{children:t,...r}=e;return n.default.createElement(k.Provider,{value:r},t)},t.appendErrors=B,t.get=m,t.set=R,t.useController=F,t.useFieldArray=function(e){const t=_(),{control:r=t.control,name:i,keyName:o="id",shouldUnregister:a}=e,[s,l]=n.default.useState(r._getFieldArray(i)),u=n.default.useRef(r._getFieldArray(i).map(z)),c=n.default.useRef(s),f=n.default.useRef(i),h=n.default.useRef(!1);f.current=i,c.current=s,r._names.array.add(i),e.rules&&r.register(i,e.rules),A({next:({values:e,name:t})=>{if(t===f.current||!t){const t=m(e,f.current);Array.isArray(t)&&(l(t),u.current=t.map(z))}},subject:r._subjects.array});const d=n.default.useCallback((e=>{h.current=!0,r._updateFieldArray(i,e)}),[r,i]);return n.default.useEffect((()=>{if(r._state.action=!1,W(i,r._names)&&r._subjects.state.next({...r._formState}),h.current&&(!H(r._options.mode).isOnSubmit||r._formState.isSubmitted))if(r._options.resolver)r._executeSchema([i]).then((e=>{const t=m(e.errors,i),n=m(r._formState.errors,i);(n?!t&&n.type||t&&(n.type!==t.type||n.message!==t.message):t&&t.type)&&(t?R(r._formState.errors,i,t):de(r._formState.errors,i),r._subjects.state.next({errors:r._formState.errors}))}));else{const e=m(r._fields,i);e&&e._f&&ae(e,r._formValues,r._options.criteriaMode===b,r._options.shouldUseNativeValidation,!0).then((e=>!E(e)&&r._subjects.state.next({errors:U(r._formState.errors,e,i)})))}r._subjects.values.next({name:i,values:{...r._formValues}}),r._names.focus&&V(r._fields,(e=>!!e&&e.startsWith(r._names.focus||""))),r._names.focus="",r._updateValid()}),[s,i,r]),n.default.useEffect((()=>(!m(r._formValues,i)&&r._updateFieldArray(i),()=>{(r._options.shouldUnregister||a)&&r.unregister(i)})),[i,r,o,a]),{swap:n.default.useCallback(((e,t)=>{const n=r._getFieldArray(i);he(n,e,t),he(u.current,e,t),d(n),l(n),r._updateFieldArray(i,n,he,{argA:e,argB:t},!1)}),[d,i,r]),move:n.default.useCallback(((e,t)=>{const n=r._getFieldArray(i);ce(n,e,t),ce(u.current,e,t),d(n),l(n),r._updateFieldArray(i,n,ce,{argA:e,argB:t},!1)}),[d,i,r]),prepend:n.default.useCallback(((e,t)=>{const n=P(p(e)),o=fe(r._getFieldArray(i),n);r._names.focus=G(i,0,t),u.current=fe(u.current,n.map(z)),d(o),l(o),r._updateFieldArray(i,o,fe,{argA:le(e)})}),[d,i,r]),append:n.default.useCallback(((e,t)=>{const n=P(p(e)),o=se(r._getFieldArray(i),n);r._names.focus=G(i,o.length-1,t),u.current=se(u.current,n.map(z)),d(o),l(o),r._updateFieldArray(i,o,se,{argA:le(e)})}),[d,i,r]),remove:n.default.useCallback((e=>{const t=pe(r._getFieldArray(i),e);u.current=pe(u.current,e),d(t),l(t),r._updateFieldArray(i,t,pe,{argA:e})}),[d,i,r]),insert:n.default.useCallback(((e,t,n)=>{const o=P(p(t)),a=ue(r._getFieldArray(i),e,o);r._names.focus=G(i,e,n),u.current=ue(u.current,e,o.map(z)),d(a),l(a),r._updateFieldArray(i,a,ue,{argA:e,argB:le(t)})}),[d,i,r]),update:n.default.useCallback(((e,t)=>{const n=p(t),o=me(r._getFieldArray(i),e,n);u.current=[...o].map(((t,r)=>t&&r!==e?u.current[r]:z())),d(o),l([...o]),r._updateFieldArray(i,o,me,{argA:e,argB:n},!0,!1)}),[d,i,r]),replace:n.default.useCallback((e=>{const t=P(p(e));u.current=t.map(z),d([...t]),l([...t]),r._updateFieldArray(i,[...t],(e=>e),{},!0,!1)}),[d,i,r]),fields:n.default.useMemo((()=>s.map(((e,t)=>({...e,[o]:u.current[t]||z()})))),[s,o])}},t.useForm=function(e={}){const t=n.default.useRef(),[r,i]=n.default.useState({isDirty:!1,isValidating:!1,isLoading:$(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:$(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...Me(e,(()=>i((e=>({...e}))))),formState:r});const o=t.current.control;return o._options=e,A({subject:o._subjects.state,next:e=>{C(e,o._proxyFormState,o._updateFormState,!0)&&i({...o._formState})}}),n.default.useEffect((()=>{e.values&&!ve(e.values,o._defaultValues)?o._reset(e.values,o._options.resetOptions):o._resetDefaultValues()}),[e.values,o]),n.default.useEffect((()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()})),t.current.formState=S(r,o),t.current},t.useFormContext=_,t.useFormState=M,t.useWatch=j},69921:(e,t)=>{"use strict";var r="function"==typeof Symbol&&Symbol.for,n=r?Symbol.for("react.element"):60103,i=r?Symbol.for("react.portal"):60106,o=r?Symbol.for("react.fragment"):60107,a=r?Symbol.for("react.strict_mode"):60108,s=r?Symbol.for("react.profiler"):60114,l=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,c=r?Symbol.for("react.async_mode"):60111,f=r?Symbol.for("react.concurrent_mode"):60111,p=r?Symbol.for("react.forward_ref"):60112,h=r?Symbol.for("react.suspense"):60113,d=r?Symbol.for("react.suspense_list"):60120,m=r?Symbol.for("react.memo"):60115,y=r?Symbol.for("react.lazy"):60116,g=r?Symbol.for("react.block"):60121,v=r?Symbol.for("react.fundamental"):60117,b=r?Symbol.for("react.responder"):60118,x=r?Symbol.for("react.scope"):60119;function w(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case c:case f:case o:case s:case a:case h:return e;default:switch(e=e&&e.$$typeof){case u:case p:case y:case m:case l:return e;default:return t}}case i:return t}}}function k(e){return w(e)===f}t.AsyncMode=c,t.ConcurrentMode=f,t.ContextConsumer=u,t.ContextProvider=l,t.Element=n,t.ForwardRef=p,t.Fragment=o,t.Lazy=y,t.Memo=m,t.Portal=i,t.Profiler=s,t.StrictMode=a,t.Suspense=h,t.isAsyncMode=function(e){return k(e)||w(e)===c},t.isConcurrentMode=k,t.isContextConsumer=function(e){return w(e)===u},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===n},t.isForwardRef=function(e){return w(e)===p},t.isFragment=function(e){return w(e)===o},t.isLazy=function(e){return w(e)===y},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===i},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===a},t.isSuspense=function(e){return w(e)===h},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===o||e===f||e===s||e===a||e===h||e===d||"object"==typeof e&&null!==e&&(e.$$typeof===y||e.$$typeof===m||e.$$typeof===l||e.$$typeof===u||e.$$typeof===p||e.$$typeof===v||e.$$typeof===b||e.$$typeof===x||e.$$typeof===g)},t.typeOf=w},59864:(e,t,r)=>{"use strict";e.exports=r(69921)},89144:(e,t,r)=>{"use strict";t.__esModule=!0;var n=Object.assign||function(e){for(var t=1;t10*d&&(i.accumulatedTime=0),0===i.accumulatedTime)return i.animationID=null,void i.startAnimationIfNecessary();var o=(i.accumulatedTime-Math.floor(i.accumulatedTime/d)*d)/d,a=Math.floor(i.accumulatedTime/d),s={},c={},p={},h={};for(var m in t)if(Object.prototype.hasOwnProperty.call(t,m)){var y=t[m];if("number"==typeof y)p[m]=y,h[m]=0,s[m]=y,c[m]=0;else{for(var g=i.state.lastIdealStyle[m],v=i.state.lastIdealVelocity[m],b=0;b{"use strict";t.__esModule=!0;var n=Object.assign||function(e){for(var t=1;t10*d&&(i.accumulatedTime=0),0===i.accumulatedTime)return i.animationID=null,void i.startAnimationIfNecessary();for(var o=(i.accumulatedTime-Math.floor(i.accumulatedTime/d)*d)/d,a=Math.floor(i.accumulatedTime/d),s=[],c=[],p=[],h=[],m=0;m{"use strict";t.__esModule=!0;var n=Object.assign||function(e){for(var t=1;t10*m&&(i.accumulatedTime=0),0===i.accumulatedTime)return i.animationID=null,void i.startAnimationIfNecessary();for(var a=(i.accumulatedTime-Math.floor(i.accumulatedTime/m)*m)/m,s=Math.floor(i.accumulatedTime/m),u=g(i.props.willEnter,i.props.willLeave,i.props.didLeave,i.state.mergedPropsStyles,r,i.state.currentStyles,i.state.currentVelocities,i.state.lastIdealStyles,i.state.lastIdealVelocities),f=u[0],h=u[1],d=u[2],v=u[3],b=u[4],x=0;x{"use strict";t.__esModule=!0,t.default=function(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=0);return t},e.exports=t.default},48505:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e,t,r){for(var n={},i=0;in[c])return-1;if(i>o[c]&&ln[c])return 1;if(a>o[c]&&s{"use strict";t.__esModule=!0,t.default={noWobble:{stiffness:170,damping:26},gentle:{stiffness:120,damping:14},wobbly:{stiffness:180,damping:12},stiff:{stiffness:210,damping:20}},e.exports=t.default},37727:(e,t,r)=>{"use strict";function n(e){return e&&e.__esModule?e.default:e}t.__esModule=!0;var i=r(89144);t.Motion=n(i);var o=r(26506);t.StaggeredMotion=n(o);var a=r(921);t.TransitionMotion=n(a);var s=r(20124);t.spring=n(s);var l=r(72392);t.presets=n(l);var u=r(79483);t.stripStyle=n(u);var c=r(49566);t.reorderKeys=n(c)},49566:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(){0};e.exports=t.default},27739:(e,t)=>{"use strict";t.__esModule=!0,t.default=function(e,t,r){for(var n in t)if(Object.prototype.hasOwnProperty.call(t,n)){if(0!==r[n])return!1;var i="number"==typeof t[n]?t[n]:t[n].val;if(e[n]!==i)return!1}return!0},e.exports=t.default},20124:(e,t,r)=>{"use strict";t.__esModule=!0;var n=Object.assign||function(e){for(var t=1;t{"use strict";t.__esModule=!0,t.default=function(e,t,n,i,o,a,s){var l=n+(-o*(t-i)+-a*n)*e,u=t+l*e;if(Math.abs(l){"use strict";t.__esModule=!0,t.default=function(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]="number"==typeof e[r]?e[r]:e[r].val);return t},e.exports=t.default},34246:function(e){(function(){var t,r,n;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:"undefined"!=typeof process&&null!==process&&process.hrtime?(e.exports=function(){return(t()-n)/1e6},r=process.hrtime,n=(t=function(){var e;return 1e9*(e=r())[0]+e[1]})()):Date.now?(e.exports=function(){return Date.now()-n},n=Date.now()):(e.exports=function(){return(new Date).getTime()-n},n=(new Date).getTime())}).call(this)},36113:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Provider:()=>V,ReactReduxContext:()=>c,batch:()=>o.unstable_batchedUpdates,connect:()=>B,createDispatchHook:()=>H,createSelectorHook:()=>m,createStoreHook:()=>z,shallowEqual:()=>j,useDispatch:()=>W,useSelector:()=>y,useStore:()=>G});var n=r(61688),i=r(52798),o=r(61533);let a=function(e){e()};const s=()=>a;var l=r(87363),u=r.n(l);const c=(0,l.createContext)(null);function f(){return(0,l.useContext)(c)}const p=()=>{throw new Error("uSES not initialized!")};let h=p;const d=(e,t)=>e===t;function m(e=c){const t=e===c?f:()=>(0,l.useContext)(e);return function(e,r=d){const{store:n,subscription:i,getServerState:o}=t(),a=h(i.addNestedSub,n.getState,o||n.getState,e,r);return(0,l.useDebugValue)(a),a}}const y=m();function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(i[r]=e[r]);return i}var b=r(8679),x=r.n(b),w=r(72973);const k=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function _(e,t,r,n,{areStatesEqual:i,areOwnPropsEqual:o,areStatePropsEqual:a}){let s,l,u,c,f,p=!1;function h(p,h){const d=!o(h,l),m=!i(p,s,h,l);return s=p,l=h,d&&m?(u=e(s,l),t.dependsOnOwnProps&&(c=t(n,l)),f=r(u,c,l),f):d?(e.dependsOnOwnProps&&(u=e(s,l)),t.dependsOnOwnProps&&(c=t(n,l)),f=r(u,c,l),f):m?function(){const t=e(s,l),n=!a(t,u);return u=t,n&&(f=r(u,c,l)),f}():f}return function(i,o){return p?h(i,o):(s=i,l=o,u=e(s,l),c=t(n,l),f=r(u,c,l),p=!0,f)}}function S(e){return function(t){const r=e(t);function n(){return r}return n.dependsOnOwnProps=!1,n}}function E(e){return e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function C(e,t){return function(t,{displayName:r}){const n=function(e,t){return n.dependsOnOwnProps?n.mapToProps(e,t):n.mapToProps(e,void 0)};return n.dependsOnOwnProps=!0,n.mapToProps=function(t,r){n.mapToProps=e,n.dependsOnOwnProps=E(e);let i=n(t,r);return"function"==typeof i&&(n.mapToProps=i,n.dependsOnOwnProps=E(i),i=n(t,r)),i},n}}function P(e,t){return(r,n)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${n.wrappedComponentName}.`)}}function O(e,t,r){return g({},r,e,t)}const A={notify(){},get:()=>[]};function M(e,t){let r,n=A;function i(){a.onStateChange&&a.onStateChange()}function o(){r||(r=t?t.addNestedSub(i):e.subscribe(i),n=function(){const e=s();let t=null,r=null;return{clear(){t=null,r=null},notify(){e((()=>{let e=t;for(;e;)e.callback(),e=e.next}))},get(){let e=[],r=t;for(;r;)e.push(r),r=r.next;return e},subscribe(e){let n=!0,i=r={callback:e,next:null,prev:r};return i.prev?i.prev.next=i:t=i,function(){n&&null!==t&&(n=!1,i.next?i.next.prev=i.prev:r=i.prev,i.prev?i.prev.next=i.next:t=i.next)}}}}())}const a={addNestedSub:function(e){return o(),n.subscribe(e)},notifyNestedSubs:function(){n.notify()},handleChangeWrapper:i,isSubscribed:function(){return Boolean(r)},trySubscribe:o,tryUnsubscribe:function(){r&&(r(),r=void 0,n.clear(),n=A)},getListeners:()=>n};return a}const T=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement)?l.useLayoutEffect:l.useEffect;function L(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function j(e,t){if(L(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(let n=0;n({})))}(e),m=function(e){return e&&"object"==typeof e?S((t=>function(e,t){const r={};for(const n in e){const i=e[n];"function"==typeof i&&(r[n]=(...e)=>t(i(...e)))}return r}(e,t))):e?"function"==typeof e?C(e):P(e,"mapDispatchToProps"):S((e=>({dispatch:e})))}(t),y=function(e){return e?"function"==typeof e?function(e){return function(t,{displayName:r,areMergedPropsEqual:n}){let i,o=!1;return function(t,r,a){const s=e(t,r,a);return o?n(s,i)||(i=s):(o=!0,i=s),i}}}(e):P(e,"mergeProps"):()=>O}(r),b=Boolean(e);return e=>{const t=e.displayName||e.name||"Component",r=`Connect(${t})`,n={shouldHandleStateChanges:b,displayName:r,wrappedComponentName:t,WrappedComponent:e,initMapStateToProps:d,initMapDispatchToProps:m,initMergeProps:y,areStatesEqual:i,areStatePropsEqual:a,areOwnPropsEqual:o,areMergedPropsEqual:s};function c(t){const[r,i,o]=(0,l.useMemo)((()=>{const{reactReduxForwardedRef:e}=t,r=v(t,I);return[t.context,e,r]}),[t]),a=(0,l.useMemo)((()=>r&&r.Consumer&&(0,w.isContextConsumer)(u().createElement(r.Consumer,null))?r:h),[r,h]),s=(0,l.useContext)(a),c=Boolean(t.store)&&Boolean(t.store.getState)&&Boolean(t.store.dispatch),f=Boolean(s)&&Boolean(s.store);const p=c?t.store:s.store,d=f?s.getServerState:p.getState,m=(0,l.useMemo)((()=>function(e,t){let{initMapStateToProps:r,initMapDispatchToProps:n,initMergeProps:i}=t,o=v(t,k);return _(r(e,o),n(e,o),i(e,o),e,o)}(p.dispatch,n)),[p]),[y,x]=(0,l.useMemo)((()=>{if(!b)return R;const e=M(p,c?void 0:s.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[p,c,s]),S=(0,l.useMemo)((()=>c?s:g({},s,{subscription:y})),[c,s,y]),E=(0,l.useRef)(),C=(0,l.useRef)(o),P=(0,l.useRef)(),O=(0,l.useRef)(!1),A=((0,l.useRef)(!1),(0,l.useRef)(!1)),L=(0,l.useRef)();T((()=>(A.current=!0,()=>{A.current=!1})),[]);const j=(0,l.useMemo)((()=>()=>P.current&&o===C.current?P.current:m(p.getState(),o)),[p,o]),N=(0,l.useMemo)((()=>e=>y?function(e,t,r,n,i,o,a,s,l,u,c){if(!e)return()=>{};let f=!1,p=null;const h=()=>{if(f||!s.current)return;const e=t.getState();let r,h;try{r=n(e,i.current)}catch(e){h=e,p=e}h||(p=null),r===o.current?a.current||u():(o.current=r,l.current=r,a.current=!0,c())};return r.onStateChange=h,r.trySubscribe(),h(),()=>{if(f=!0,r.tryUnsubscribe(),r.onStateChange=null,p)throw p}}(b,p,y,m,C,E,O,A,P,x,e):()=>{}),[y]);var B,V,z;let G;B=F,V=[C,E,O,o,P,x],T((()=>B(...V)),z);try{G=D(N,j,d?()=>m(d(),o):j)}catch(e){throw L.current&&(e.message+=`\nThe error may be correlated with this previous error:\n${L.current.stack}\n\n`),e}T((()=>{L.current=void 0,P.current=void 0,E.current=G}));const H=(0,l.useMemo)((()=>u().createElement(e,g({},G,{ref:i}))),[i,e,G]);return(0,l.useMemo)((()=>b?u().createElement(a.Provider,{value:S},H):H),[a,H,S])}const p=u().memo(c);if(p.WrappedComponent=e,p.displayName=c.displayName=r,f){const t=u().forwardRef((function(e,t){return u().createElement(p,g({},e,{reactReduxForwardedRef:t}))}));return t.displayName=r,t.WrappedComponent=e,x()(t,e)}return x()(p,e)}};const V=function({store:e,context:t,children:r,serverState:n}){const i=(0,l.useMemo)((()=>{const t=M(e);return{store:e,subscription:t,getServerState:n?()=>n:void 0}}),[e,n]),o=(0,l.useMemo)((()=>e.getState()),[e]);T((()=>{const{subscription:t}=i;return t.onStateChange=t.notifyNestedSubs,t.trySubscribe(),o!==e.getState()&&t.notifyNestedSubs(),()=>{t.tryUnsubscribe(),t.onStateChange=void 0}}),[i,o]);const a=t||c;return u().createElement(a.Provider,{value:i},r)};function z(e=c){const t=e===c?f:()=>(0,l.useContext)(e);return function(){const{store:e}=t();return e}}const G=z();function H(e=c){const t=e===c?G:z(e);return function(){return t().dispatch}}const W=H();var U,q;U=i.useSyncExternalStoreWithSelector,h=U,(e=>{D=e})(n.useSyncExternalStore),q=o.unstable_batchedUpdates,a=q},88359:(e,t)=>{"use strict";var r,n=Symbol.for("react.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.server_context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),h=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),y=Symbol.for("react.offscreen");function g(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case o:case s:case a:case p:case h:return e;default:switch(e=e&&e.$$typeof){case c:case u:case f:case m:case d:case l:return e;default:return t}}case i:return t}}}r=Symbol.for("react.module.reference"),t.isContextConsumer=function(e){return g(e)===u}},72973:(e,t,r)=>{"use strict";e.exports=r(88359)},75251:(e,t,r)=>{"use strict";var n=r(87363),i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,r){var n,o={},u=null,c=null;for(n in void 0!==r&&(u=""+r),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(c=t.ref),t)a.call(t,n)&&!l.hasOwnProperty(n)&&(o[n]=t[n]);if(e&&e.defaultProps)for(n in t=e.defaultProps)void 0===o[n]&&(o[n]=t[n]);return{$$typeof:i,type:e,key:u,ref:c,props:o,_owner:s.current}}t.Fragment=o,t.jsx=u,t.jsxs=u},85893:(e,t,r)=>{"use strict";e.exports=r(75251)},14791:(e,t,r)=>{"use strict";function n(e){return 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},n(e)}function i(e){var t=function(e,t){if("object"!==n(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!==n(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===n(t)?t:String(t)}function o(e,t,r){return(t=i(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function s(e){for(var t=1;tf,md:()=>b,DE:()=>g,UY:()=>m,qC:()=>v,MT:()=>h,jB:()=>d});var u="function"==typeof Symbol&&Symbol.observable||"@@observable",c=function(){return Math.random().toString(36).substring(7).split("").join(".")},f={INIT:"@@redux/INIT"+c(),REPLACE:"@@redux/REPLACE"+c(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+c()}};function p(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function h(e,t,r){var n;if("function"==typeof t&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw new Error(l(0));if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw new Error(l(1));return r(h)(e,t)}if("function"!=typeof e)throw new Error(l(2));var i=e,o=t,a=[],s=a,c=!1;function d(){s===a&&(s=a.slice())}function m(){if(c)throw new Error(l(3));return o}function y(e){if("function"!=typeof e)throw new Error(l(4));if(c)throw new Error(l(5));var t=!0;return d(),s.push(e),function(){if(t){if(c)throw new Error(l(6));t=!1,d();var r=s.indexOf(e);s.splice(r,1),a=null}}}function g(e){if(!p(e))throw new Error(l(7));if(void 0===e.type)throw new Error(l(8));if(c)throw new Error(l(9));try{c=!0,o=i(o,e)}finally{c=!1}for(var t=a=s,r=0;r{"use strict";r.d(t,{PW:()=>o});var n="NOT_FOUND";var i=function(e,t){return e===t};function o(e,t){var r,o,a="object"==typeof t?t:{equalityCheck:t},s=a.equalityCheck,l=void 0===s?i:s,u=a.maxSize,c=void 0===u?1:u,f=a.resultEqualityCheck,p=function(e){return function(t,r){if(null===t||null===r||t.length!==r.length)return!1;for(var n=t.length,i=0;i-1){var o=r[i];return i>0&&(r.splice(i,1),r.unshift(o)),o.value}return n}return{get:i,put:function(t,o){i(t)===n&&(r.unshift({key:t,value:o}),r.length>e&&r.pop())},getEntries:function(){return r},clear:function(){r=[]}}}(c,p);function d(){var t=h.get(arguments);if(t===n){if(t=e.apply(null,arguments),f){var r=h.getEntries().find((function(e){return f(e.value,t)}));r&&(t=r.value)}h.put(arguments,t)}return t}return d.clearCache=function(){return h.clear()},d}},22222:(e,t,r)=>{"use strict";function n(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;ni});var i=n(r(44815).PW)},99543:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Component:()=>k,SpinnerCircular:()=>d,SpinnerCircularFixed:()=>y,SpinnerCircularSplit:()=>v,SpinnerDiamond:()=>D,SpinnerDotted:()=>_,SpinnerInfinity:()=>x,SpinnerRomb:()=>I,SpinnerRound:()=>E,SpinnerRoundFilled:()=>T,SpinnerRoundOutlined:()=>O});var n=r(87363),i=r.n(n),o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r{"use strict";r.r(t),r.d(t,{default:()=>g});var n=r(93379),i=r.n(n),o=r(7795),a=r.n(o),s=r(90569),l=r.n(s),u=r(3565),c=r.n(u),f=r(19216),p=r.n(f),h=r(44589),d=r.n(h),m=r(4925),y={};y.styleTagTransform=d(),y.setAttributes=c(),y.insert=l().bind(null,"head"),y.domAPI=a(),y.insertStyleElement=p();i()(m.Z,y);const g=m.Z&&m.Z.locals?m.Z.locals:void 0},93379:e=>{"use strict";var t=[];function r(e){for(var r=-1,n=0;n{"use strict";var t={};e.exports=function(e,r){var n=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},19216:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},3565:(e,t,r)=>{"use strict";e.exports=function(e){var t=r.nc;t&&e.setAttribute("nonce",t)}},7795:e=>{"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(r){!function(e,t,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var i=void 0!==r.layer;i&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,i&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var o=r.sourceMap;o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},44589:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},53250:(e,t,r)=>{"use strict";var n=r(87363);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=n.useState,a=n.useEffect,s=n.useLayoutEffect,l=n.useDebugValue;function u(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch(e){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=o({inst:{value:r,getSnapshot:t}}),i=n[0].inst,c=n[1];return s((function(){i.value=r,i.getSnapshot=t,u(i)&&c({inst:i})}),[e,r,t]),a((function(){return u(i)&&c({inst:i}),e((function(){u(i)&&c({inst:i})}))}),[e]),l(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:c},50139:(e,t,r)=>{"use strict";var n=r(87363),i=r(61688);var o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=i.useSyncExternalStore,s=n.useRef,l=n.useEffect,u=n.useMemo,c=n.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,r,n,i){var f=s(null);if(null===f.current){var p={hasValue:!1,value:null};f.current=p}else p=f.current;f=u((function(){function e(e){if(!l){if(l=!0,a=e,e=n(e),void 0!==i&&p.hasValue){var t=p.value;if(i(t,e))return s=t}return s=e}if(t=s,o(a,e))return t;var r=n(e);return void 0!==i&&i(t,r)?t:(a=e,s=r)}var a,s,l=!1,u=void 0===r?null:r;return[function(){return e(t())},null===u?void 0:function(){return e(u())}]}),[t,r,n,i]);var h=a(e,f[0],f[1]);return l((function(){p.hasValue=!0,p.value=h}),[h]),c(h),h}},61688:(e,t,r)=>{"use strict";e.exports=r(53250)},52798:(e,t,r)=>{"use strict";e.exports=r(50139)},94480:e=>{!function(){"use strict";var t={}.hasOwnProperty;function r(){for(var e=[],n=0;n{var t=function(){"use strict";function e(e,t){return null!=t&&e instanceof t}var t,r,n;try{t=Map}catch(e){t=function(){}}try{r=Set}catch(e){r=function(){}}try{n=Promise}catch(e){n=function(){}}function i(o,s,l,u,c){"object"==typeof s&&(l=s.depth,u=s.prototype,c=s.includeNonEnumerable,s=s.circular);var f=[],p=[],h="undefined"!=typeof Buffer;return void 0===s&&(s=!0),void 0===l&&(l=1/0),function o(l,d){if(null===l)return null;if(0===d)return l;var m,y;if("object"!=typeof l)return l;if(e(l,t))m=new t;else if(e(l,r))m=new r;else if(e(l,n))m=new n((function(e,t){l.then((function(t){e(o(t,d-1))}),(function(e){t(o(e,d-1))}))}));else if(i.__isArray(l))m=[];else if(i.__isRegExp(l))m=new RegExp(l.source,a(l)),l.lastIndex&&(m.lastIndex=l.lastIndex);else if(i.__isDate(l))m=new Date(l.getTime());else{if(h&&Buffer.isBuffer(l))return m=Buffer.allocUnsafe?Buffer.allocUnsafe(l.length):new Buffer(l.length),l.copy(m),m;e(l,Error)?m=Object.create(l):void 0===u?(y=Object.getPrototypeOf(l),m=Object.create(y)):(m=Object.create(u),y=u)}if(s){var g=f.indexOf(l);if(-1!=g)return p[g];f.push(l),p.push(m)}for(var v in e(l,t)&&l.forEach((function(e,t){var r=o(t,d-1),n=o(e,d-1);m.set(r,n)})),e(l,r)&&l.forEach((function(e){var t=o(e,d-1);m.add(t)})),l){var b;y&&(b=Object.getOwnPropertyDescriptor(y,v)),b&&null==b.set||(m[v]=o(l[v],d-1))}if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(l);for(v=0;v{"use strict";function n(e){var t,r,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;ti,default:()=>o});const o=i},36283:(e,t,r)=>{r(3458).defineExtension("colorpicker",(function(){var e,t,r,n,i,o,a,s,l,u,c,f,p,h,d,m,y,g,v,b,x,w,k,_,S,E,C,P,O,A,M,T,L,j,I,D,R,F,N,B={trim:function(e){return e.replace(/^\s+|\s+$/g,"")},format:function(e,t){if("hex"==t){var r=e.r.toString(16);e.r<16&&(r="0"+r);var n=e.g.toString(16);e.g<16&&(n="0"+n);var i=e.b.toString(16);return e.b<16&&(i="0"+i),"#"+[r,n,i].join("")}return"rgb"==t?void 0===e.a?"rgb("+[e.r,e.g,e.b].join(",")+")":"rgba("+[e.r,e.g,e.b,e.a].join(",")+")":"hsl"==t?void 0===e.a?"hsl("+[e.h,e.s+"%",e.l+"%"].join(",")+")":"hsla("+[e.h,e.s+"%",e.l+"%",e.a].join(",")+")":e},parse:function(e){if("string"==typeof e){if(e.indexOf("rgb(")>-1){for(var t=0,r=(o=e.replace("rgb(","").replace(")","").split(",")).length;t-1){for(t=0,r=(o=e.replace("rgba(","").replace(")","").split(",")).length;t-1){for(t=0,r=(o=e.replace("hsl(","").replace(")","").split(",")).length;t-1){for(t=0,r=(o=e.replace("hsla(","").replace(")","").split(",")).length;t.5?l/(2-o-a):l/(o+a),o){case e:n=(t-r)/l+(t1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e},HSLtoRGB:function(e,t,r){var n,i,o;if(e/=360,r/=100,0==(t/=100))n=i=o=r;else{var a=r<.5?r*(1+t):r+t-r*t,s=2*r-a;n=this.HUEtoRGB(s,a,e+1/3),i=this.HUEtoRGB(s,a,e),o=this.HUEtoRGB(s,a,e-1/3)}return{r:255*n,g:255*i,b:255*o}}},V=[{rgb:"#ff0000",start:0},{rgb:"#ffff00",start:.17},{rgb:"#00ff00",start:.33},{rgb:"#00ffff",start:.5},{rgb:"#0000ff",start:.67},{rgb:"#ff00ff",start:.83},{rgb:"#ff0000",start:1}],z=(ce(),function(){}),G=0,H={},W=!1,U=2e3,q={},Y=[{name:"Material",edit:!0,colors:["#fff","#f00","#0ff","#f0f","#fff","#f00","#0ff","#f0f","#fff","#f00","#0ff","#f0f"]},{name:"Custom",edit:!0,colors:[]},{name:"Pages",edit:!0,colors:["#fff","#f00","#0ff","#f0f"]}];function $(e,t,r){if("string"!=typeof e)this.el=e;else{var n=document.createElement(e);for(var i in this.uniqId=G++,n.className=t,r=r||{})n.setAttribute(i,r[i]);this.el=n}}function K(e,t,r){M.val(e),T.val(t),L.val(r),j.val(E)}function Z(e,t,r){I.val(e),D.val(t+"%"),R.val(r+"%"),F.val(E)}function Q(){return B.format({r:M.int(),g:T.int(),b:L.int()},"hex")}function X(){return B.HSVtoRGB(C,P,O)}function J(){return B.format(X(),"hex")}function ee(){var e=B.HSVtoRGB(C,P,O);return B.RGBtoHSL(e.r,e.g,e.b)}function te(e){if("rgb"==(e=e||"hex"))return(r=X()).a=1==E?void 0:E,B.format(r,"rgb");if("hsl"==e){var t=ee();return t.a=1==E?void 0:E,B.format(t,"hsl")}var r=X();return B.format(r,"hex")}function re(e){c.css("background-color",e)}function ne(){var e=g.data("format")||"hex",t=null;if("hex"==e)A.val(J());else if("rgb"==e)K((t=X()).r,t.g,t.b);else if("hsl"==e){var r=ee();Z(r.h,r.s,r.l)}re(te("rgb")),t=X(),fe(B.format(t,"rgb")),"function"==typeof z&&(isNaN(E)||z(te(e)))}function ie(e){e.preventDefault();var r=t.position(),i=n.width(),o=n.height(),s=e.clientX-r.left,l=e.clientY-r.top;s<0?s=0:s>i&&(s=i),l<0?l=0:l>o&&(l=o),a.css({left:s-5+"px",top:l-5+"px"}),a.data("pos",{x:s,y:l}),de(),ne()}function oe(e,t,r){var n={r:parseInt(e.r+(t.r-e.r)*r,10),g:parseInt(e.g+(t.g-e.g)*r,10),b:parseInt(e.b+(t.b-e.b)*r,10)};return B.format(n,"hex")}function ae(e){for(var t,r,n=0;n=e){t=V[n-1],r=V[n];break}return t&&r?oe(t,r,(e-t.start)/(r.start-t.start)):V[0].rgb}function se(e){n.css("background-color",e)}function le(e){C=e}function ue(e){var t,r=f.offset().left,n=r+f.width(),i=e?me(e).clientX:r+C/360*(n-r);t=in?100:(i-r)/(n-r)*100;var o=f.width()*(t/100);s.css({left:o-Math.ceil(s.width()/2)+"px"}),s.data("pos",{x:o}),se(ae(t/100)),le(t/100*360),ne()}function ce(){for(var e="",t=["","-o-","-ms-","-moz-","-webkit-"],r=document.createElement("div"),n=0;nn?100:(i-r)/(n-r)*100;var o=h.width()*(t/100);y.css({left:o-Math.ceil(y.width()/2)+"px"}),y.data("pos",{x:o}),he(),Be(),ne()}function he(){var e=y.data("pos")||{x:0},t=Math.round(e.x/h.width()*100)/100;E=isNaN(t)?1:t}function de(){var e=a.data("pos")||{x:0,y:0},t=s.data("pos")||{x:0},r=n.width(),i=n.height(),o=t.x/f.width()*360,l=e.x/r,u=(i-e.y)/i;0==r&&(o=0,l=0,u=0),C=o,P=l,O=u}function me(e){return e.touches&&e.touches[0]?e.touches[0]:e}function ye(e){var t=e.which,r=!1;return 37!=t&&39!=t&&8!=t&&46!=t&&9!=t||(r=!0),!(!r&&(t<48||t>57))}function ge(e){var t=M.val(),r=T.val(),n=L.val();""!=t&&""!=r&&""!=n&&(parseInt(t)>255?M.val(255):M.val(parseInt(t)),parseInt(r)>255?T.val(255):T.val(parseInt(r)),parseInt(n)>255?L.val(255):L.val(parseInt(n)),we(Q()))}function ve(){var e=n.width()*P,t=n.height()*(1-O);a.css({left:e-5+"px",top:t-5+"px"}),a.data("pos",{x:e,y:t});var r=f.width()*(C/360);s.css({left:r-7.5+"px"}),s.data("pos",{x:r});var i=h.width()*(E||0);y.css({left:i-7.5+"px"}),y.data("pos",{x:i})}function be(e,t,r,n){E=n,C=e,P=t,O=r}function xe(e){g.data("format",e),Ve()}function we(e){var t=e||"#FF0000",r=B.parse(t);xe(r.type),se(t);var n=B.RGBtoHSV(r.r,r.g,r.b);be(n.h,n.s,n.v,r.a),ve(),ue(),ne()}function ke(e,t,r){e.addEventListener(t,r)}function _e(e,t,r){e.removeEventListener(t,r)}function Se(e){n.data("isDown",!0),ie(e)}function Ee(e){n.data("isDown",!1)}function Ce(e){e.preventDefault(),r.data("isDown",!0)}function Pe(e){e.preventDefault(),p.data("isDown",!0)}function Oe(e){r.data("isDown",!0),ue(e)}function Ae(e){p.data("isDown",!0),pe(e)}function Me(e){if(e.which<65||e.which>70)return ye(e)}function Te(e){var t=A.val();"#"==t.charAt(0)&&7==t.length&&we(t)}function Le(e){ze()}function je(){ke(n.el,"mousedown",Se),ke(n.el,"mouseup",Ee),ke(s.el,"mousedown",Ce),ke(y.el,"mousedown",Pe),ke(f.el,"mousedown",Oe),ke(h.el,"mousedown",Ae),ke(A.el,"keydown",Me),ke(A.el,"keyup",Te),ke(M.el,"keydown",ye),ke(M.el,"keyup",ge),ke(T.el,"keydown",ye),ke(T.el,"keyup",ge),ke(L.el,"keydown",ye),ke(L.el,"keyup",ge),ke(document,"mouseup",Re),ke(document,"mousemove",Fe),ke(m.el,"click",Le)}function Ie(e){var t=new $(e).closest("codemirror-colorview"),r=new $(e).closest("codemirror-colorpicker"),n=new $(e).closest("CodeMirror");return e.nodeName,!!(r||t||n)}function De(e){return"HTML"==e.nodeName}function Re(e){n.data("isDown",!1),r.data("isDown",!1),p.data("isDown",!1),De(e.target)||0==Ie(e.target)&&Xe()}function Fe(e){n.data("isDown")&&ie(e),r.data("isDown")&&ue(e),p.data("isDown")&&pe(e)}function Ne(){_e(n.el,"mousedown",Se),_e(n.el,"mouseup",Ee),_e(s.el,"mousedown",Ce),_e(y.el,"mousedown",Pe),_e(f.el,"mousedown",Oe),_e(h.el,"mousedown",Ae),_e(A.el,"keydown",Me),_e(A.el,"keyup",Te),_e(M.el,"keydown",ye),_e(M.el,"keyup",ge),_e(T.el,"keydown",ye),_e(T.el,"keyup",ge),_e(L.el,"keydown",ye),_e(L.el,"keyup",ge),_e(document,"mouseup",Re),_e(document,"mousemove",Fe),_e(m.el,"click",Le),z=void 0}function Be(){var e=g.data("format")||"hex";if(E<1&&"hex"==e){var t="rgb";g.removeClass(e),g.addClass(t),g.data("format",t),ne()}}function Ve(){var e=g.data("format")||"hex";g.removeClass("hex"),g.removeClass("rgb"),g.removeClass("hsl"),g.addClass(e)}function ze(){var e=g.data("format")||"hex",t="hex";"hex"==e?t="rgb":"rgb"==e?t="hsl":"hsl"==e&&(t=1==E?"hex":"rgb"),g.removeClass(e),g.addClass(t),g.data("format",t),ne()}function Ge(e){var t=new $("div","information-item "+e);if("hex"==e){var r=new $("div","input-field hex");A=new $("input","input",{type:"text"}),r.append(A),r.append(new $("div","title").html("HEX")),t.append(r)}else"rgb"==e?(r=new $("div","input-field rgb-r"),M=new $("input","input",{type:"text"}),r.append(M),r.append(new $("div","title").html("R")),t.append(r),r=new $("div","input-field rgb-g"),T=new $("input","input",{type:"text"}),r.append(T),r.append(new $("div","title").html("G")),t.append(r),r=new $("div","input-field rgb-b"),L=new $("input","input",{type:"text"}),r.append(L),r.append(new $("div","title").html("B")),t.append(r),r=new $("div","input-field rgb-a"),j=new $("input","input",{type:"text"}),r.append(j),r.append(new $("div","title").html("A")),t.append(r)):"hsl"==e&&(r=new $("div","input-field hsl-h"),I=new $("input","input",{type:"text"}),r.append(I),r.append(new $("div","title").html("H")),t.append(r),r=new $("div","input-field hsl-s"),D=new $("input","input",{type:"text"}),r.append(D),r.append(new $("div","title").html("S")),t.append(r),r=new $("div","input-field hsl-l"),R=new $("input","input",{type:"text"}),r.append(R),r.append(new $("div","title").html("L")),t.append(r),r=new $("div","input-field hsl-a"),F=new $("input","input",{type:"text"}),r.append(F),r.append(new $("div","title").html("A")),t.append(r));return t}function He(e){q=e?Y.filter((function(t){return t.name==e}))[0]:Y[0]}function We(){for(var e=new $("div","current-color-sets"),t=0,r=q.colors.length;twindow.innerWidth&&(o-=n+o-window.innerWidth),o<0&&(o=0);var a=r.top-e.el.scrollTop;i+a>window.innerHeight&&(a-=i+a-window.innerHeight),a<0&&(a=0),t.css({left:o+"px",top:a+"px"})}function Ze(e,r,n){Ne(),je(),t.appendTo(document.body),t.css({position:"fixed",left:"-10000px",top:"-10000px"}),t.show(),Ke(e),W=e.isShortCut||!1,we(r),z=function(e){n(e)},(U=e.hideDelay||2e3)>0&&Qe(U)}function Qe(e){e=e||0,_e(t.el,"mouseenter"),_e(t.el,"mouseleave"),ke(t.el,"mouseenter",(function(){clearTimeout(N)})),ke(t.el,"mouseleave",(function(){clearTimeout(N),N=setTimeout(Xe,e)})),clearTimeout(N),N=setTimeout(Xe,e)}function Xe(){}return $.prototype.closest=function(e){for(var t=this,r=!1;!(r=t.hasClass(e));){if(!t.el.parentNode)return null;t=new $(t.el.parentNode)}return r?t:null},$.prototype.removeClass=function(e){this.el.className=B.trim((" "+this.el.className+" ").replace(" "+e+" "," "))},$.prototype.hasClass=function(e){return!!this.el.className&&(" "+this.el.className+" ").indexOf(" "+e+" ")>-1},$.prototype.addClass=function(e){this.hasClass(e)||(this.el.className=this.el.className+" "+e)},$.prototype.html=function(e){return this.el.innerHTML=e,this},$.prototype.empty=function(){return this.html("")},$.prototype.append=function(e){return"string"==typeof e?this.el.appendChild(document.createTextNode(e)):this.el.appendChild(e.el||e),this},$.prototype.appendTo=function(e){return(e.el?e.el:e).appendChild(this.el),this},$.prototype.remove=function(){return this.el.parentNode&&this.el.parentNode.removeChild(this.el),this},$.prototype.text=function(){return this.el.textContent},$.prototype.css=function(e,t){if(2==arguments.length)this.el.style[e]=t;else if(1==arguments.length){if("string"==typeof e)return getComputedStyle(this.el)[e];var r=e||{};for(var n in r)this.el.style[n]=r[n]}return this},$.prototype.offset=function(){var e=this.el.getBoundingClientRect();return{top:e.top+document.body.scrollTop,left:e.left+document.body.scrollLeft}},$.prototype.position=function(){return{top:parseFloat(this.el.style.top),left:parseFloat(this.el.style.left)}},$.prototype.width=function(){return this.el.offsetWidth},$.prototype.height=function(){return this.el.offsetHeight},$.prototype.dataKey=function(e){return this.uniqId+"."+e},$.prototype.data=function(e,t){if(2!=arguments.length){if(1==arguments.length)return H[this.dataKey(e)];var r=Object.keys(H),n=this.uniqId+".";return r.filter((function(e){return 0==e.indexOf(n)})).map((function(e){return H[e]}))}return H[this.dataKey(e)]=t,this},$.prototype.val=function(e){return 0==arguments.length?this.el.value:(1==arguments.length&&(this.el.value=e),this)},$.prototype.int=function(){return parseInt(this.val(),10)},$.prototype.show=function(){return this.css("display","block")},$.prototype.hide=function(){return this.css("display","none")},Ue(),{isShortCut:function(){return W},$root:t,show:Ze,hide:Xe,setColor:Ye,getColor:$e}}))},41347:(e,t,r)=>{!function(e){"use strict";var t={aliceblue:"rgb(240, 248, 255)",antiquewhite:"rgb(250, 235, 215)",aqua:"rgb(0, 255, 255)",aquamarine:"rgb(127, 255, 212)",azure:"rgb(240, 255, 255)",beige:"rgb(245, 245, 220)",bisque:"rgb(255, 228, 196)",black:"rgb(0, 0, 0)",blanchedalmond:"rgb(255, 235, 205)",blue:"rgb(0, 0, 255)",blueviolet:"rgb(138, 43, 226)",brown:"rgb(165, 42, 42)",burlywood:"rgb(222, 184, 135)",cadetblue:"rgb(95, 158, 160)",chartreuse:"rgb(127, 255, 0)",chocolate:"rgb(210, 105, 30)",coral:"rgb(255, 127, 80)",cornflowerblue:"rgb(100, 149, 237)",cornsilk:"rgb(255, 248, 220)",crimson:"rgb(237, 20, 61)",cyan:"rgb(0, 255, 255)",darkblue:"rgb(0, 0, 139)",darkcyan:"rgb(0, 139, 139)",darkgoldenrod:"rgb(184, 134, 11)",darkgray:"rgb(169, 169, 169)",darkgrey:"rgb(169, 169, 169)",darkgreen:"rgb(0, 100, 0)",darkkhaki:"rgb(189, 183, 107)",darkmagenta:"rgb(139, 0, 139)",darkolivegreen:"rgb(85, 107, 47)",darkorange:"rgb(255, 140, 0)",darkorchid:"rgb(153, 50, 204)",darkred:"rgb(139, 0, 0)",darksalmon:"rgb(233, 150, 122)",darkseagreen:"rgb(143, 188, 143)",darkslateblue:"rgb(72, 61, 139)",darkslategray:"rgb(47, 79, 79)",darkslategrey:"rgb(47, 79, 79)",darkturquoise:"rgb(0, 206, 209)",darkviolet:"rgb(148, 0, 211)",deeppink:"rgb(255, 20, 147)",deepskyblue:"rgb(0, 191, 255)",dimgray:"rgb(105, 105, 105)",dimgrey:"rgb(105, 105, 105)",dodgerblue:"rgb(30, 144, 255)",firebrick:"rgb(178, 34, 34)",floralwhite:"rgb(255, 250, 240)",forestgreen:"rgb(34, 139, 34)",fuchsia:"rgb(255, 0, 255)",gainsboro:"rgb(220, 220, 220)",ghostwhite:"rgb(248, 248, 255)",gold:"rgb(255, 215, 0)",goldenrod:"rgb(218, 165, 32)",gray:"rgb(128, 128, 128)",grey:"rgb(128, 128, 128)",green:"rgb(0, 128, 0)",greenyellow:"rgb(173, 255, 47)",honeydew:"rgb(240, 255, 240)",hotpink:"rgb(255, 105, 180)",indianred:"rgb(205, 92, 92)",indigo:"rgb(75, 0, 130)",ivory:"rgb(255, 255, 240)",khaki:"rgb(240, 230, 140)",lavender:"rgb(230, 230, 250)",lavenderblush:"rgb(255, 240, 245)",lawngreen:"rgb(124, 252, 0)",lemonchiffon:"rgb(255, 250, 205)",lightblue:"rgb(173, 216, 230)",lightcoral:"rgb(240, 128, 128)",lightcyan:"rgb(224, 255, 255)",lightgoldenrodyellow:"rgb(250, 250, 210)",lightgreen:"rgb(144, 238, 144)",lightgray:"rgb(211, 211, 211)",lightgrey:"rgb(211, 211, 211)",lightpink:"rgb(255, 182, 193)",lightsalmon:"rgb(255, 160, 122)",lightseagreen:"rgb(32, 178, 170)",lightskyblue:"rgb(135, 206, 250)",lightslategray:"rgb(119, 136, 153)",lightslategrey:"rgb(119, 136, 153)",lightsteelblue:"rgb(176, 196, 222)",lightyellow:"rgb(255, 255, 224)",lime:"rgb(0, 255, 0)",limegreen:"rgb(50, 205, 50)",linen:"rgb(250, 240, 230)",magenta:"rgb(255, 0, 255)",maroon:"rgb(128, 0, 0)",mediumaquamarine:"rgb(102, 205, 170)",mediumblue:"rgb(0, 0, 205)",mediumorchid:"rgb(186, 85, 211)",mediumpurple:"rgb(147, 112, 219)",mediumseagreen:"rgb(60, 179, 113)",mediumslateblue:"rgb(123, 104, 238)",mediumspringgreen:"rgb(0, 250, 154)",mediumturquoise:"rgb(72, 209, 204)",mediumvioletred:"rgb(199, 21, 133)",midnightblue:"rgb(25, 25, 112)",mintcream:"rgb(245, 255, 250)",mistyrose:"rgb(255, 228, 225)",moccasin:"rgb(255, 228, 181)",navajowhite:"rgb(255, 222, 173)",navy:"rgb(0, 0, 128)",oldlace:"rgb(253, 245, 230)",olive:"rgb(128, 128, 0)",olivedrab:"rgb(107, 142, 35)",orange:"rgb(255, 165, 0)",orangered:"rgb(255, 69, 0)",orchid:"rgb(218, 112, 214)",palegoldenrod:"rgb(238, 232, 170)",palegreen:"rgb(152, 251, 152)",paleturquoise:"rgb(175, 238, 238)",palevioletred:"rgb(219, 112, 147)",papayawhip:"rgb(255, 239, 213)",peachpuff:"rgb(255, 218, 185)",peru:"rgb(205, 133, 63)",pink:"rgb(255, 192, 203)",plum:"rgb(221, 160, 221)",powderblue:"rgb(176, 224, 230)",purple:"rgb(128, 0, 128)",rebeccapurple:"rgb(102, 51, 153)",red:"rgb(255, 0, 0)",rosybrown:"rgb(188, 143, 143)",royalblue:"rgb(65, 105, 225)",saddlebrown:"rgb(139, 69, 19)",salmon:"rgb(250, 128, 114)",sandybrown:"rgb(244, 164, 96)",seagreen:"rgb(46, 139, 87)",seashell:"rgb(255, 245, 238)",sienna:"rgb(160, 82, 45)",silver:"rgb(192, 192, 192)",skyblue:"rgb(135, 206, 235)",slateblue:"rgb(106, 90, 205)",slategray:"rgb(112, 128, 144)",slategrey:"rgb(112, 128, 144)",snow:"rgb(255, 250, 250)",springgreen:"rgb(0, 255, 127)",steelblue:"rgb(70, 130, 180)",tan:"rgb(210, 180, 140)",teal:"rgb(0, 128, 128)",thistle:"rgb(216, 191, 216)",tomato:"rgb(255, 99, 71)",turquoise:"rgb(64, 224, 208)",violet:"rgb(238, 130, 238)",wheat:"rgb(245, 222, 179)",white:"rgb(255, 255, 255)",whitesmoke:"rgb(245, 245, 245)",yellow:"rgb(255, 255, 0)",yellowgreen:"rgb(154, 205, 50)",transparent:"rgba(0, 0, 0, 0)"},r="codemirror-colorview",n="codemirror-colorview-background",i=["comment","builtin"];function o(e,t){"setValue"==t.origin?(e.state.colorpicker.close_color_picker(),e.state.colorpicker.init_color_update(),e.state.colorpicker.style_color_update()):e.state.colorpicker.style_color_update(e.getCursor().line)}function a(e,t){e.state.colorpicker.isUpdate||(e.state.colorpicker.isUpdate=!0,e.state.colorpicker.close_color_picker(),e.state.colorpicker.init_color_update(),e.state.colorpicker.style_color_update())}function s(e,t){o(e,{origin:"setValue"})}function l(e,t){e.state.colorpicker.keyup(t)}function u(e,t){e.state.colorpicker.is_edit_mode()&&e.state.colorpicker.check_mousedown(t)}function c(e,t){o(e,{origin:"setValue"})}function f(e){e.state.colorpicker.close_color_picker()}function p(e,t){var r=void 0;return function(n,i){r&&clearTimeout(r),r=setTimeout((function(){e(n,i)}),t||300)}}function h(e,t){return!(!e||!e.className)&&(" "+e.className+" ").indexOf(" "+t+" ")>-1}function d(e,t){t="boolean"==typeof t?{mode:"view"}:Object.assign({mode:"view"},t||{}),this.opt=t,this.cm=e,this.markers={},i=this.opt.excluded_token||i,this.cm.colorpicker?this.colorpicker=this.cm.colorpicker():this.opt.colorpicker&&(this.colorpicker=this.opt.colorpicker),this.init_event()}e.defineOption("colorpicker",!1,(function(t,r,n){n&&n!=e.Init&&t.state.colorpicker&&(t.state.colorpicker.destroy(),t.state.colorpicker=null),r&&(t.state.colorpicker=new d(t,r))})),d.prototype.init_event=function(){var e,t;this.cm.on("mousedown",u),this.cm.on("keyup",l),this.cm.on("change",o),this.cm.on("update",a),this.cm.on("refresh",s),this.onPasteCallback=(e=this.cm,t=c,function(r){t.call(this,e,r)}),this.cm.getWrapperElement().addEventListener("paste",this.onPasteCallback),this.is_edit_mode()&&this.cm.on("scroll",p(f,50))},d.prototype.is_edit_mode=function(){return"edit"==this.opt.mode},d.prototype.is_view_mode=function(){return"view"==this.opt.mode},d.prototype.destroy=function(){this.cm.off("mousedown",u),this.cm.off("keyup",l),this.cm.off("change",o),this.cm.getWrapperElement().removeEventListener("paste",this.onPasteCallback),this.is_edit_mode()&&this.cm.off("scroll")},d.prototype.hasClass=function(e,t){return!!e.className&&(" "+e.className+" ").indexOf(" "+t+" ")>-1},d.prototype.check_mousedown=function(e){this.hasClass(e.target,n)?this.open_color_picker(e.target.parentNode):this.close_color_picker()},d.prototype.popup_color_picker=function(e){var t=this.cm.getCursor(),r=this,n={lineNo:t.line,ch:t.ch,color:e||"#FFFFFF",isShortCut:!0};Object.keys(this.markers).forEach((function(e){if(("#"+e).indexOf("#"+n.lineNo+":")>-1){var t=r.markers[e];t.ch<=n.ch&&n.ch<=t.ch+t.color.length&&(n.ch=t.ch,n.color=t.color,n.nameColor=t.nameColor)}})),this.open_color_picker(n)},d.prototype.open_color_picker=function(e){var t=e.lineNo,r=e.ch,n=e.nameColor,i=e.color;if(this.colorpicker){var o=this,a=i,s=this.cm.charCoords({line:t,ch:r});this.colorpicker.show({left:s.left,top:s.bottom,isShortCut:e.isShortCut||!1,hideDelay:o.opt.hideDelay||2e3},n||i,(function(e){o.cm.replaceRange(e,{line:t,ch:r},{line:t,ch:r+a.length},"*colorpicker"),a=e}))}},d.prototype.close_color_picker=function(e){this.colorpicker&&this.colorpicker.hide()},d.prototype.key=function(e,t){return[e,t].join(":")},d.prototype.keyup=function(e){this.colorpicker&&("Escape"==e.key||0==this.colorpicker.isShortCut())&&this.colorpicker.hide()},d.prototype.init_color_update=function(){this.markers={}},d.prototype.style_color_update=function(e){if(e)this.match(e);else for(var t=this.cm.lineCount(),r=0;r-1||n[o].indexOf("rgb")>-1||n[o].indexOf("hsl")>-1)this.render(i,e,r,n[o]);else{var s=t[n[o]];s&&this.render(i,e,r,n[o],s)}},d.prototype.match=function(e){var t=this.cm.getLineHandle(e),r=this;this.cm.operation((function(){r.submatch(e,t)}))},d.prototype.make_element=function(){var e=document.createElement("div");return e.className=r,this.is_edit_mode()?e.title="open color picker":e.title="",e.back_element=this.make_background_element(),e.appendChild(e.back_element),e},d.prototype.make_background_element=function(){var e=document.createElement("div");return e.className=n,e},d.prototype.set_state=function(e,t,r,n){var i=this.create_marker(e,t);return i.lineNo=e,i.ch=t,i.color=r,i.nameColor=n,i},d.prototype.create_marker=function(e,t){var r=this.key(e,t);return this.markers[r]||(this.markers[r]=this.make_element()),this.markers[r]},d.prototype.has_marker=function(e,t){var r=this.key(e,t);return!!this.markers[r]},d.prototype.update_element=function(e,t){e.back_element.style.backgroundColor=t},d.prototype.set_mark=function(e,t,r){this.cm.setBookmark({line:e,ch:t},{widget:r,handleMouseEvents:!0})},d.prototype.is_excluded_token=function(e,t){var r=this.cm.getTokenAt({line:e,ch:t},!0),n=r.type,o=r.state.state;if(null==n&&"block"==o)return!0;if(null==n&&"top"==o)return!0;for(var a=0,s=0,l=i.length;s0},d.prototype.render=function(e,t,r,n,i){var o=r.text.indexOf(n,e.next);if(!0!==this.is_excluded_token(t,o)){if(e.next=o+n.length,this.has_marker(t,o))return this.update_element(this.create_marker(t,o),i||n),void this.set_state(t,o,n,i);var a=this.create_marker(t,o);this.update_element(a,i||n),this.set_state(t,o,n,i||n),this.set_mark(t,o,a)}}}(r(3458))},31528:(e,t,r)=>{!function(e){function t(t,r,n){var i,o=t.getWrapperElement();return(i=o.appendChild(document.createElement("div"))).className=n?"CodeMirror-dialog CodeMirror-dialog-bottom":"CodeMirror-dialog CodeMirror-dialog-top","string"==typeof r?i.innerHTML=r:i.appendChild(r),e.addClass(o,"dialog-opened"),i}function r(e,t){e.state.currentNotificationClose&&e.state.currentNotificationClose(),e.state.currentNotificationClose=t}e.defineExtension("openDialog",(function(n,i,o){o||(o={}),r(this,null);var a=t(this,n,o.bottom),s=!1,l=this;function u(t){if("string"==typeof t)f.value=t;else{if(s)return;s=!0,e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a),l.focus(),o.onClose&&o.onClose(a)}}var c,f=a.getElementsByTagName("input")[0];return f?(f.focus(),o.value&&(f.value=o.value,!1!==o.selectValueOnOpen&&f.select()),o.onInput&&e.on(f,"input",(function(e){o.onInput(e,f.value,u)})),o.onKeyUp&&e.on(f,"keyup",(function(e){o.onKeyUp(e,f.value,u)})),e.on(f,"keydown",(function(t){o&&o.onKeyDown&&o.onKeyDown(t,f.value,u)||((27==t.keyCode||!1!==o.closeOnEnter&&13==t.keyCode)&&(f.blur(),e.e_stop(t),u()),13==t.keyCode&&i(f.value,t))})),!1!==o.closeOnBlur&&e.on(a,"focusout",(function(e){null!==e.relatedTarget&&u()}))):(c=a.getElementsByTagName("button")[0])&&(e.on(c,"click",(function(){u(),l.focus()})),!1!==o.closeOnBlur&&e.on(c,"blur",u),c.focus()),u})),e.defineExtension("openConfirm",(function(n,i,o){r(this,null);var a=t(this,n,o&&o.bottom),s=a.getElementsByTagName("button"),l=!1,u=this,c=1;function f(){l||(l=!0,e.rmClass(a.parentNode,"dialog-opened"),a.parentNode.removeChild(a),u.focus())}s[0].focus();for(var p=0;p{!function(e){function t(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function r(e){t(e);var r=e.state.placeholder=document.createElement("pre");r.style.cssText="height: 0; overflow: visible",r.style.direction=e.getOption("direction"),r.className="CodeMirror-placeholder CodeMirror-line-like";var n=e.getOption("placeholder");"string"==typeof n&&(n=document.createTextNode(n)),r.appendChild(n),e.display.lineSpace.insertBefore(r,e.display.lineSpace.firstChild)}function n(e){setTimeout((function(){var n=!1;if(1==e.lineCount()){var i=e.getInputField();n="TEXTAREA"==i.nodeName?!e.getLine(0).length:!/[^\u200b]/.test(i.querySelector(".CodeMirror-line").textContent)}n?r(e):t(e)}),20)}function i(e){a(e)&&r(e)}function o(e){var n=e.getWrapperElement(),i=a(e);n.className=n.className.replace(" CodeMirror-empty","")+(i?" CodeMirror-empty":""),i?r(e):t(e)}function a(e){return 1===e.lineCount()&&""===e.getLine(0)}e.defineOption("placeholder","",(function(r,a,s){var l=s&&s!=e.Init;if(a&&!l)r.on("blur",i),r.on("change",o),r.on("swapDoc",o),e.on(r.getInputField(),"compositionupdate",r.state.placeholderCompose=function(){n(r)}),o(r);else if(!a&&l){r.off("blur",i),r.off("change",o),r.off("swapDoc",o),e.off(r.getInputField(),"compositionupdate",r.state.placeholderCompose),t(r);var u=r.getWrapperElement();u.className=u.className.replace(" CodeMirror-empty","")}a&&!r.hasFocus()&&i(r)}))}(r(3458))},61413:(e,t,r)=>{!function(e){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},r=e.Pos;function n(e,r){return"pairs"==r&&"string"==typeof e?e:"object"==typeof e&&null!=e[r]?e[r]:t[r]}e.defineOption("autoCloseBrackets",!1,(function(t,r,a){a&&a!=e.Init&&(t.removeKeyMap(i),t.state.closeBrackets=null),r&&(o(n(r,"pairs")),t.state.closeBrackets=r,t.addKeyMap(i))}));var i={Backspace:l,Enter:u};function o(e){for(var t=0;t=0;l--){var c=a[l].head;t.replaceRange("",r(c.line,c.ch-1),r(c.line,c.ch+1),"+delete")}}function u(t){var r=s(t),i=r&&n(r,"explode");if(!i||t.getOption("disableInput"))return e.Pass;for(var o=t.listSelections(),a=0;a0?{line:a.head.line,ch:a.head.ch+t}:{line:a.head.line-1};r.push({anchor:s,head:s})}e.setSelections(r,i)}function f(t){var n=e.cmpPos(t.anchor,t.head)>0;return{anchor:new r(t.anchor.line,t.anchor.ch+(n?-1:1)),head:new r(t.head.line,t.head.ch+(n?1:-1))}}function p(t,i){var o=s(t);if(!o||t.getOption("disableInput"))return e.Pass;var a=n(o,"pairs"),l=a.indexOf(i);if(-1==l)return e.Pass;for(var u,p=n(o,"closeBefore"),h=n(o,"triples"),m=a.charAt(l+1)==i,y=t.listSelections(),g=l%2==0,v=0;v1&&h.indexOf(i)>=0&&t.getRange(r(w.line,w.ch-2),w)==i+i){if(w.ch>2&&/\bstring/.test(t.getTokenTypeAt(r(w.line,w.ch-2))))return e.Pass;b="addFour"}else if(m){var _=0==w.ch?" ":t.getRange(r(w.line,w.ch-1),w);if(e.isWordChar(k)||_==i||e.isWordChar(_))return e.Pass;b="both"}else{if(!g||!(0===k.length||/\s/.test(k)||p.indexOf(k)>-1))return e.Pass;b="both"}else b=m&&d(t,w)?"both":h.indexOf(i)>=0&&t.getRange(w,r(w.line,w.ch+3))==i+i+i?"skipThree":"skip";if(u){if(u!=b)return e.Pass}else u=b}var S=l%2?a.charAt(l-1):i,E=l%2?i:a.charAt(l+1);t.operation((function(){if("skip"==u)c(t,1);else if("skipThree"==u)c(t,3);else if("surround"==u){for(var e=t.getSelections(),r=0;r{!function(e){e.defineOption("autoCloseTags",!1,(function(t,r,i){if(i!=e.Init&&i&&t.removeKeyMap("autoCloseTags"),r){var a={name:"autoCloseTags"};"object"==typeof r&&!1===r.whenClosing||(a["'/'"]=function(e){return o(e)}),"object"==typeof r&&!1===r.whenOpening||(a["'>'"]=function(e){return n(e)}),t.addKeyMap(a)}}));var t=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],r=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function n(n){if(n.getOption("disableInput"))return e.Pass;for(var i=n.listSelections(),o=[],l=n.getOption("autoCloseTags"),u=0;uc.ch&&(m=m.slice(0,m.length-f.end+c.ch));var b=m.toLowerCase();if(!m||"string"==f.type&&(f.end!=c.ch||!/[\"\']/.test(f.string.charAt(f.string.length-1))||1==f.string.length)||"tag"==f.type&&d.close||f.string.indexOf("/")==c.ch-f.start-1||g&&a(g,b)>-1||s(n,p.mode.xmlCurrentContext&&p.mode.xmlCurrentContext(h)||[],m,c,!0))return e.Pass;var x="object"==typeof l&&l.emptyTags;if(x&&a(x,m)>-1)o[u]={text:"/>",newPos:e.Pos(c.line,c.ch+2)};else{var w=v&&a(v,b)>-1;o[u]={indent:w,text:">"+(w?"\n\n":"")+""+m+">",newPos:w?e.Pos(c.line+1,0):e.Pos(c.line,c.ch+1)}}}var k="object"==typeof l&&l.dontIndentOnAutoClose;for(u=i.length-1;u>=0;u--){var _=o[u];n.replaceRange(_.text,i[u].head,i[u].anchor,"+insert");var S=n.listSelections().slice(0);S[u]={head:_.newPos,anchor:_.newPos},n.setSelections(S),!k&&_.indent&&(n.indentLine(_.newPos.line,null,!0),n.indentLine(_.newPos.line+1,null,!0))}}function i(t,r){for(var n=t.listSelections(),i=[],o=r?"/":"",a=t.getOption("autoCloseTags"),l="object"==typeof a&&a.dontIndentOnSlash,u=0;u"!=t.getLine(c.line).charAt(f.end)&&(d+=">"),i[u]=d}if(t.replaceSelections(i),n=t.listSelections(),!l)for(u=0;u=0&&r[u]==n;u--)++l;for(i=s.to,u=1;u{!function(e){var t=/MSIE \d/.test(navigator.userAgent)&&(null==document.documentMode||document.documentMode<8),r=e.Pos,n={"(":")>",")":"(<","[":"]>","]":"[<","{":"}>","}":"{<","<":">>",">":"<<"};function i(e){return e&&e.bracketRegex||/[(){}[\]]/}function o(e,t,o){var s=e.getLineHandle(t.line),l=t.ch-1,u=o&&o.afterCursor;null==u&&(u=/(^| )cm-fat-cursor($| )/.test(e.getWrapperElement().className));var c=i(o),f=!u&&l>=0&&c.test(s.text.charAt(l))&&n[s.text.charAt(l)]||c.test(s.text.charAt(l+1))&&n[s.text.charAt(++l)];if(!f)return null;var p=">"==f.charAt(1)?1:-1;if(o&&o.strict&&p>0!=(l==t.ch))return null;var h=e.getTokenTypeAt(r(t.line,l+1)),d=a(e,r(t.line,l+(p>0?1:0)),p,h,o);return null==d?null:{from:r(t.line,l),to:d&&d.pos,match:d&&d.ch==f.charAt(0),forward:p>0}}function a(e,t,o,a,s){for(var l=s&&s.maxScanLineLength||1e4,u=s&&s.maxScanLines||1e3,c=[],f=i(s),p=o>0?Math.min(t.line+u,e.lastLine()+1):Math.max(e.firstLine()-1,t.line-u),h=t.line;h!=p;h+=o){var d=e.getLine(h);if(d){var m=o>0?0:d.length-1,y=o>0?d.length:-1;if(!(d.length>l))for(h==t.line&&(m=t.ch-(o<0?1:0));m!=y;m+=o){var g=d.charAt(m);if(f.test(g)&&(void 0===a||(e.getTokenTypeAt(r(h,m+1))||"")==(a||""))){var v=n[g];if(v&&">"==v.charAt(1)==o>0)c.push(g);else{if(!c.length)return{pos:r(h,m),ch:g};c.pop()}}}}}return h-o!=(o>0?e.lastLine():e.firstLine())&&null}function s(e,n,i){for(var a=e.state.matchBrackets.maxHighlightLineLength||1e3,s=i&&i.highlightNonMatching,l=[],u=e.listSelections(),c=0;c{!function(e){"use strict";function t(e){e.state.tagHit&&e.state.tagHit.clear(),e.state.tagOther&&e.state.tagOther.clear(),e.state.tagHit=e.state.tagOther=null}function r(r){r.state.failedTagMatch=!1,r.operation((function(){if(t(r),!r.somethingSelected()){var n=r.getCursor(),i=r.getViewport();i.from=Math.min(i.from,n.line),i.to=Math.max(n.line+1,i.to);var o=e.findMatchingTag(r,n,i);if(o){if(r.state.matchBothTags){var a="open"==o.at?o.open:o.close;a&&(r.state.tagHit=r.markText(a.from,a.to,{className:"CodeMirror-matchingtag"}))}var s="close"==o.at?o.open:o.close;s?r.state.tagOther=r.markText(s.from,s.to,{className:"CodeMirror-matchingtag"}):r.state.failedTagMatch=!0}}}))}function n(e){e.state.failedTagMatch&&r(e)}e.defineOption("matchTags",!1,(function(i,o,a){a&&a!=e.Init&&(i.off("cursorActivity",r),i.off("viewportChange",n),t(i)),o&&(i.state.matchBothTags="object"==typeof o&&o.bothTags,i.on("cursorActivity",r),i.on("viewportChange",n),r(i))})),e.commands.toMatchingTag=function(t){var r=e.findMatchingTag(t,t.getCursor());if(r){var n="close"==r.at?r.open:r.close;n&&t.extendSelection(n.to,n.from)}}}(r(3458),r(72895))},72895:(e,t,r)=>{!function(e){"use strict";var t=e.Pos;function r(e,t){return e.line-t.line||e.ch-t.ch}var n="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",i=new RegExp("<(/?)(["+n+"]["+n+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function o(e,t,r,n){this.line=t,this.ch=r,this.cm=e,this.text=e.getLine(t),this.min=n?Math.max(n.from,e.firstLine()):e.firstLine(),this.max=n?Math.min(n.to-1,e.lastLine()):e.lastLine()}function a(e,r){var n=e.cm.getTokenTypeAt(t(e.line,r));return n&&/\btag\b/.test(n)}function s(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function l(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function u(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(s(e))continue;return}if(a(e,t+1)){var r=e.text.lastIndexOf("/",t),n=r>-1&&!/\S/.test(e.text.slice(r+1,t));return e.ch=t+1,n?"selfClose":"regular"}e.ch=t+1}}function c(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(l(e))continue;return}if(a(e,t+1)){i.lastIndex=t,e.ch=t;var r=i.exec(e.text);if(r&&r.index==t)return r}else e.ch=t}}function f(e){for(;;){i.lastIndex=e.ch;var t=i.exec(e.text);if(!t){if(s(e))continue;return}if(a(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}function p(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(l(e))continue;return}if(a(e,t+1)){var r=e.text.lastIndexOf("/",t),n=r>-1&&!/\S/.test(e.text.slice(r+1,t));return e.ch=t+1,n?"selfClose":"regular"}e.ch=t}}function h(e,r){for(var n=[];;){var i,o=f(e),a=e.line,s=e.ch-(o?o[0].length:0);if(!o||!(i=u(e)))return;if("selfClose"!=i)if(o[1]){for(var l=n.length-1;l>=0;--l)if(n[l]==o[2]){n.length=l;break}if(l<0&&(!r||r==o[2]))return{tag:o[2],from:t(a,s),to:t(e.line,e.ch)}}else n.push(o[2])}}function d(e,r){for(var n=[];;){var i=p(e);if(!i)return;if("selfClose"!=i){var o=e.line,a=e.ch,s=c(e);if(!s)return;if(s[1])n.push(s[2]);else{for(var l=n.length-1;l>=0;--l)if(n[l]==s[2]){n.length=l;break}if(l<0&&(!r||r==s[2]))return{tag:s[2],from:t(e.line,e.ch),to:t(o,a)}}}else c(e)}}e.registerHelper("fold","xml",(function(e,n){for(var i=new o(e,n.line,0);;){var a=f(i);if(!a||i.line!=n.line)return;var s=u(i);if(!s)return;if(!a[1]&&"selfClose"!=s){var l=t(i.line,i.ch),c=h(i,a[2]);return c&&r(c.from,l)>0?{from:l,to:c.from}:null}}})),e.findMatchingTag=function(e,n,i){var a=new o(e,n.line,n.ch,i);if(-1!=a.text.indexOf(">")||-1!=a.text.indexOf("<")){var s=u(a),l=s&&t(a.line,a.ch),f=s&&c(a);if(s&&f&&!(r(a,n)>0)){var p={from:t(a.line,a.ch),to:l,tag:f[2]};return"selfClose"==s?{open:p,close:null,at:"open"}:f[1]?{open:d(a,f[2]),close:p,at:"close"}:{open:p,close:h(a=new o(e,l.line,l.ch,i),f[2]),at:"open"}}}},e.findEnclosingTag=function(e,t,r,n){for(var i=new o(e,t.line,t.ch,r);;){var a=d(i,n);if(!a)break;var s=h(new o(e,t.line,t.ch,r),a.tag);if(s)return{open:a,close:s}}},e.scanForClosingTag=function(e,t,r,n){return h(new o(e,t.line,t.ch,n?{from:0,to:n}:null),r)}}(r(3458))},94491:(e,t,r)=>{!function(e){"use strict";var t={active:1,after:1,before:1,checked:1,default:1,disabled:1,empty:1,enabled:1,"first-child":1,"first-letter":1,"first-line":1,"first-of-type":1,focus:1,hover:1,"in-range":1,indeterminate:1,invalid:1,lang:1,"last-child":1,"last-of-type":1,link:1,not:1,"nth-child":1,"nth-last-child":1,"nth-last-of-type":1,"nth-of-type":1,"only-of-type":1,"only-child":1,optional:1,"out-of-range":1,placeholder:1,"read-only":1,"read-write":1,required:1,root:1,selection:1,target:1,valid:1,visited:1};e.registerHelper("hint","css",(function(r){var n=r.getCursor(),i=r.getTokenAt(n),o=e.innerMode(r.getMode(),i.state);if("css"==o.mode.name){if("keyword"==i.type&&0=="!important".indexOf(i.string))return{list:["!important"],from:e.Pos(n.line,i.start),to:e.Pos(n.line,i.end)};var a=i.start,s=n.ch,l=i.string.slice(0,s-a);/[^\w$_-]/.test(l)&&(l="",a=s=n.ch);var u=e.resolveMode("text/css"),c=[],f=o.state.state;return"pseudo"==f||"variable-3"==i.type?p(t):"block"==f||"maybeprop"==f?p(u.propertyKeywords):"prop"==f||"parens"==f||"at"==f||"params"==f?(p(u.valueKeywords),p(u.colorKeywords)):"media"!=f&&"media_parens"!=f||(p(u.mediaTypes),p(u.mediaFeatures)),c.length?{list:c,from:e.Pos(n.line,a),to:e.Pos(n.line,s)}:void 0}function p(e){for(var t in e)l&&0!=t.lastIndexOf(l,0)||c.push(t)}}))}(r(3458),r(77530))},45812:(e,t,r)=>{!function(e){"use strict";var t="ab aa af ak sq am ar an hy as av ae ay az bm ba eu be bn bh bi bs br bg my ca ch ce ny zh cv kw co cr hr cs da dv nl dz en eo et ee fo fj fi fr ff gl ka de el gn gu ht ha he hz hi ho hu ia id ie ga ig ik io is it iu ja jv kl kn kr ks kk km ki rw ky kv kg ko ku kj la lb lg li ln lo lt lu lv gv mk mg ms ml mt mi mr mh mn na nv nb nd ne ng nn no ii nr oc oj cu om or os pa pi fa pl ps pt qu rm rn ro ru sa sc sd se sm sg sr gd sn si sk sl so st es su sw ss sv ta te tg th ti bo tk tl tn to tr ts tt tw ty ug uk ur uz ve vi vo wa cy wo fy xh yi yo za zu".split(" "),r=["_blank","_self","_top","_parent"],n=["ascii","utf-8","utf-16","latin1","latin1"],i=["get","post","put","delete"],o=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],a=["all","screen","print","embossed","braille","handheld","print","projection","screen","tty","tv","speech","3d-glasses","resolution [>][<][=] [X]","device-aspect-ratio: X/Y","orientation:portrait","orientation:landscape","device-height: [X]","device-width: [X]"],s={attrs:{}},l={a:{attrs:{href:null,ping:null,type:null,media:a,target:r,hreflang:t}},abbr:s,acronym:s,address:s,applet:s,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:a,hreflang:t,type:null,shape:["default","rect","circle","poly"]}},article:s,aside:s,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["","autoplay"],loop:["","loop"],controls:["","controls"]}},b:s,base:{attrs:{href:null,target:r}},basefont:s,bdi:s,bdo:s,big:s,blockquote:{attrs:{cite:null}},body:s,br:s,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["","autofocus"],disabled:["","autofocus"],formenctype:o,formmethod:i,formnovalidate:["","novalidate"],formtarget:r,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:s,center:s,cite:s,code:s,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:s,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["","open"]}},dfn:s,dir:s,div:s,dialog:{attrs:{open:null}},dl:s,dt:s,em:s,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["","disabled"],form:null,name:null}},figcaption:s,figure:s,font:s,footer:s,form:{attrs:{action:null,name:null,"accept-charset":n,autocomplete:["on","off"],enctype:o,method:i,novalidate:["","novalidate"],target:r}},frame:s,frameset:s,h1:s,h2:s,h3:s,h4:s,h5:s,h6:s,head:{attrs:{},children:["title","base","link","style","meta","script","noscript","command"]},header:s,hgroup:s,hr:s,html:{attrs:{manifest:null},children:["head","body"]},i:s,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:o,formmethod:i,formnovalidate:["","novalidate"],formtarget:r,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:s,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["","autofocus"],disabled:["","disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:s,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:t,media:a,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:s,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:n,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:s,noframes:s,noscript:s,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"]}},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:s,param:{attrs:{name:null,value:null}},pre:s,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:s,rt:s,ruby:s,s,samp:s,script:{attrs:{type:["text/javascript"],src:null,async:["","async"],defer:["","defer"],charset:n}},section:s,select:{attrs:{form:null,name:null,size:null,autofocus:["","autofocus"],disabled:["","disabled"],multiple:["","multiple"]}},small:s,source:{attrs:{src:null,type:null,media:null}},span:s,strike:s,strong:s,style:{attrs:{type:["text/css"],media:a,scoped:null}},sub:s,summary:s,sup:s,table:s,tbody:s,td:{attrs:{colspan:null,rowspan:null,headers:null}},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:s,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:s,time:{attrs:{datetime:null}},title:s,tr:s,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:t}},tt:s,u:s,ul:s,var:s,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:s},u={accesskey:["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","7","8","9"],class:null,contenteditable:["true","false"],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:["en","es"],spellcheck:["true","false"],autocorrect:["true","false"],autocapitalize:["true","false"],style:null,tabindex:["1","2","3","4","5","6","7","8","9"],title:null,translate:["yes","no"],onclick:null,rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"]};function c(e){for(var t in u)u.hasOwnProperty(t)&&(e.attrs[t]=u[t])}for(var f in c(s),l)l.hasOwnProperty(f)&&l[f]!=s&&c(l[f]);function p(t,r){var n={schemaInfo:l};if(r)for(var i in r)n[i]=r[i];return e.hint.xml(t,n)}e.htmlSchema=l,e.registerHelper("hint","html",p)}(r(3458),r(27321))},86728:(e,t,r)=>{!function(e){"use strict";var t="CodeMirror-hint",r="CodeMirror-hint-active";function n(e,t){if(this.cm=e,this.options=t,this.widget=null,this.debounce=0,this.tick=0,this.startPos=this.cm.getCursor("start"),this.startLen=this.cm.getLine(this.startPos.line).length-this.cm.getSelection().length,this.options.updateOnCursorActivity){var r=this;e.on("cursorActivity",this.activityFunc=function(){r.cursorActivity()})}}e.showHint=function(e,t,r){if(!t)return e.showHint(r);r&&r.async&&(t.async=!0);var n={hint:t};if(r)for(var i in r)n[i]=r[i];return e.showHint(n)},e.defineExtension("showHint",(function(t){t=a(this,this.getCursor("start"),t);var r=this.listSelections();if(!(r.length>1)){if(this.somethingSelected()){if(!t.hint.supportsSelection)return;for(var i=0;ip.clientHeight+1;if(setTimeout((function(){T=a.getScrollInfo()})),L.bottom-M>0){var I=L.bottom-L.top;if(x.top-(x.bottom-L.top)-I>0)p.style.top=(k=x.top-I-E)+"px",_=!1;else if(I>M){p.style.height=M-5+"px",p.style.top=(k=x.bottom-L.top-E)+"px";var D=a.getCursor();i.from.ch!=D.ch&&(x=a.cursorCoords(D),p.style.left=(w=x.left-S)+"px",L=p.getBoundingClientRect())}}var R,F=L.right-A;if(j&&(F+=a.display.nativeBarWidth),F>0&&(L.right-L.left>A&&(p.style.width=A-5+"px",F-=L.right-L.left-A),p.style.left=(w=x.left-F-S)+"px"),j)for(var N=p.firstChild;N;N=N.nextSibling)N.style.paddingRight=a.display.nativeBarWidth+"px";a.addKeyMap(this.keyMap=l(n,{moveFocus:function(e,t){o.changeActive(o.selectedHint+e,t)},setFocus:function(e){o.changeActive(e)},menuSize:function(){return o.screenAmount()},length:d.length,close:function(){n.close()},pick:function(){o.pick()},data:i})),n.options.closeOnUnfocus&&(a.on("blur",this.onBlur=function(){R=setTimeout((function(){n.close()}),100)}),a.on("focus",this.onFocus=function(){clearTimeout(R)})),a.on("scroll",this.onScroll=function(){var e=a.getScrollInfo(),t=a.getWrapperElement().getBoundingClientRect();T||(T=a.getScrollInfo());var r=k+T.top-e.top,i=r-(f.pageYOffset||(c.documentElement||c.body).scrollTop);if(_||(i+=p.offsetHeight),i<=t.top||i>=t.bottom)return n.close();p.style.top=r+"px",p.style.left=w+T.left-e.left+"px"}),e.on(p,"dblclick",(function(e){var t=u(p,e.target||e.srcElement);t&&null!=t.hintId&&(o.changeActive(t.hintId),o.pick())})),e.on(p,"click",(function(e){var t=u(p,e.target||e.srcElement);t&&null!=t.hintId&&(o.changeActive(t.hintId),n.options.completeOnSingleClick&&o.pick())})),e.on(p,"mousedown",(function(){setTimeout((function(){a.focus()}),20)}));var B=this.getSelectedHintRange();return 0===B.from&&0===B.to||this.scrollToActive(),e.signal(i,"select",d[this.selectedHint],p.childNodes[this.selectedHint]),!0}function f(e,t){if(!e.somethingSelected())return t;for(var r=[],n=0;n0?t(e):o(i+1)}))}o(0)};return o.async=!0,o.supportsSelection=!0,o}return(n=t.getHelper(t.getCursor(),"hintWords"))?function(t){return e.hint.fromList(t,{words:n})}:e.hint.anyword?function(t,r){return e.hint.anyword(t,r)}:function(){}}n.prototype={close:function(){this.active()&&(this.cm.state.completionActive=null,this.tick=null,this.options.updateOnCursorActivity&&this.cm.off("cursorActivity",this.activityFunc),this.widget&&this.data&&e.signal(this.data,"close"),this.widget&&this.widget.close(),e.signal(this.cm,"endCompletion",this.cm))},active:function(){return this.cm.state.completionActive==this},pick:function(t,r){var n=t.list[r],i=this;this.cm.operation((function(){n.hint?n.hint(i.cm,t,n):i.cm.replaceRange(s(n),n.from||t.from,n.to||t.to,"complete"),e.signal(t,"pick",n),i.cm.scrollIntoView()})),this.options.closeOnPick&&this.close()},cursorActivity:function(){this.debounce&&(o(this.debounce),this.debounce=0);var e=this.startPos;this.data&&(e=this.data.from);var t=this.cm.getCursor(),r=this.cm.getLine(t.line);if(t.line!=this.startPos.line||r.length-t.ch!=this.startLen-this.startPos.ch||t.ch=this.data.list.length?t=n?this.data.list.length-1:0:t<0&&(t=n?0:this.data.list.length-1),this.selectedHint!=t){var i=this.hints.childNodes[this.selectedHint];i&&(i.className=i.className.replace(" "+r,""),i.removeAttribute("aria-selected")),(i=this.hints.childNodes[this.selectedHint=t]).className+=" "+r,i.setAttribute("aria-selected","true"),this.completion.cm.getInputField().setAttribute("aria-activedescendant",i.id),this.scrollToActive(),e.signal(this.data,"select",this.data.list[this.selectedHint],i)}},scrollToActive:function(){var e=this.getSelectedHintRange(),t=this.hints.childNodes[e.from],r=this.hints.childNodes[e.to],n=this.hints.firstChild;t.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=r.offsetTop+r.offsetHeight-this.hints.clientHeight+n.offsetTop)},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1},getSelectedHintRange:function(){var e=this.completion.options.scrollMargin||0;return{from:Math.max(0,this.selectedHint-e),to:Math.min(this.data.list.length-1,this.selectedHint+e)}}},e.registerHelper("hint","auto",{resolve:h}),e.registerHelper("hint","fromList",(function(t,r){var n,i=t.getCursor(),o=t.getTokenAt(i),a=e.Pos(i.line,o.start),s=i;o.start