-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathviper.bundle.js
2 lines (2 loc) · 406 KB
/
viper.bundle.js
1
2
/*! For license information please see viper.bundle.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["viper-charts"]=t():e["viper-charts"]=t()}(self,(function(){return(()=>{var e={349:(e,t,n)=>{"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.r(t),n.d(t,{default:()=>Ci});const a={uniqueId:function(){return Math.random().toString(36).substr(2,13)},getMinAndMax:function(e){for(var t=e.length,n=-1/0,r=1/0;t--;)n=e[t]>n?e[t]:n,r=e[t]<r?e[t]:r;return[r,n]},getAbsoluteMax:function(e,t){return e<0?Math.min(e,-t):Math.max(e,t)},randomHexColor:function(){return"#".concat(Math.floor(16777215*Math.random()).toString(16),"00000").substring(0,7)},getAllTimestampsIn:function(e,t,n){var r=((t+=n-t%n)-(e-=e%n))/n;return r%1!=0||0===r?[]:new Array(r).fill().map((function(t,r){return e+n*r}))},getTimestampByXCoord:function(e,t,n,r){return e+r/n*(t-e)},getXCoordByTimestamp:function(e,t,n,r){var o=(r-e)/(t-e);return Math.floor(o*n)},getYCoordByPrice:function(e,t,n,r){var o=(r-e)/(t-e);return-Math.floor(o*n-n)},getPriceByYCoord:function(e,t,n,r){return e+(1-r/n)*(t-e)},wipeObject:function(e){for(var t in e)delete e[t];return e},toFixed:function(e,t){return+parseFloat(e).toFixed(t)},getDecimalPlaces:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1/0;if(isNaN(e))return 0;var n=e.toString();if(n.indexOf("e-")>-1){var r=n.split("e-"),i=o(r,2),a=(i[0],i[1]);return Math.min(parseInt(a,10),t)}return Math.floor(e)!==e?Math.min(e.toString().split(".")[1].length||0,t):0},isColorLight:function(e){var t,n,r;return e.match(/^rgb/)?(t=(e=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+(?:\.\d+)?))?\)$/))[1],n=e[2],r=e[3]):(t=(e=+("0x"+e.slice(1).replace(e.length<5&&/./g,"$&$&")))>>16,n=e>>8&255,r=255&e),Math.sqrt(t*t*.299+n*n*.587+r*r*.114)>127.5},aZ:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return"0000000000000000".concat(e).substr(-t)},DateWrapper:function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.value=new Date(t)}var t,n;return t=e,(n=[{key:"time",value:function(){return this.value.getTime()}},{key:"ms",value:function(){return this.value.getMilliseconds()}},{key:"s",value:function(){return this.value.getSeconds()}},{key:"m",value:function(){return this.value.getMinutes()}},{key:"h",value:function(){return this.value.getHours()}},{key:"d",value:function(){return Math.floor(this.value.getTime()/864e5)}}])&&r(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),formatTimeLeft:function(e,t){var n=this.aZ,r=t-e%t,o=new this.DateWrapper(r);return r<6e4?"".concat(n(o.s()),".").concat(n(o.ms(),4)):r<36e5?"".concat(n(o.m()),"m:").concat(n(o.s()),"s"):r<864e5?"".concat(n(o.h()),"h:").concat(n(o.m()),"m"):"".concat(n(o.d()),"d:").concat(n(o.h()),"h")}};function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var l=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._events={}}var t,n;return t=e,n=[{key:"addEventListener",value:function(e,t){var n=a.uniqueId();return void 0!==this._events[e]?this._events[e].push(t):this._events[e]=[t],n}},{key:"removeEventListener",value:function(e,t){var n=this._events[e];if(n){var r=n.indexOf(t);-1!==r&&n.splice(r,1)}}},{key:"fireEvent",value:function(e){var t=Object.values(this._events[e]||{});if(t&&t.length){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];for(var i=0,a=t;i<a.length;i++){var u=a[i];u.apply(void 0,r)}}}}],n&&u(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}(),s=1e3,c=6e4,f=36e5,d=24*f,h=7*d,p=4*h,y=365*d,v={ms:1,s,m:c,h:f,d,w:h,mo:p,y};const m={MILLISECOND:1,MILLISECOND100:100,SECOND:s,MINUTE:c,MINUTE5:3e5,MINUTE15:9e5,HOUR:f,HOUR4:144e5,HOUR12:432e5,DAY:d,WEEK:h,MONTH:p,YEAR:y,TIMESCALES:[10*y,5*y,3*y,2*y,y,6*p,4*p,3*p,2*p,p,15*d,10*d,7*d,5*d,3*d,2*d,d,12*f,6*f,4*f,2*f,f,18e5,9e5,6e5,3e5,12e4,c,3e4,15e3,1e4,5e3,2e3,s,500,250,100,50,1],TIMEFRAMES:v,MONTHS:[{short:"Jan",long:"January"},{short:"Feb",long:"February"},{short:"Mar",long:"March"},{short:"Apr",long:"April"},{short:"May",long:"May"},{short:"Jun",long:"June"},{short:"Jul",long:"July"},{short:"Aug",long:"August"},{short:"Sep",long:"September"},{short:"Oct",long:"October"},{short:"Nov",long:"November"},{short:"Dec",long:"December"}],getTimeframeText:function(e){for(var t=Object.keys(v),n=0;n<t.length;n++)if(e/v[t[n]]<1){var r=t[n-1];return"".concat(e/v[r]).concat(r)}}};function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function w(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function k(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return x(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?x(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var S={"volume-bar":{version:"1.0.0",name:"Volume",dependencies:["ohlc","volume"],draw:function(e){var t=e.open,n=e.close,r=e.plotVolume,o=n>=t?this.upColor:this.downColor;r({volume:S,color:o})}}},_={bases:{line:{version:"1.0.0",name:"Line",dependencies:["value"],draw:function(e){var t=e.value;(0,e.plot)({value:t,title:"Line",color:this.color,linewidth:2,ylabel:!0})}},candlestick:{version:"1.0.0",name:"Candlestick",dependencies:["ohlc"],draw:function(e){var t=e.open,n=e.high,r=e.low,o=e.close,i=o>=t?"#C4FF49":"#FE3A64";(0,e.plotCandle)({open:t,high:n,low:r,close:o,title:"Candlestick",color:i,wickcolor:i,ylabel:!0})}},volumeBySide:{version:"1.0.0",name:"Volume By Side",dependencies:["volumeBySide"],draw:function(e){var t=e.buyVolume,n=e.sellVolume,r=e.plotBox,o=t-n,i=t+n;0!==i&&r({top:i,bottom:0,width:.9,center:!0,color:o>=0?"#C4FF4966":"#FE3A6466"}),0!==o&&r({top:Math.abs(o),bottom:0,width:.9,center:!0,color:o>=0?"#C4FF49":"#FE3A64"})}},footprint:{version:"1.0.0",name:"Footprint",dependencies:["footprint"],draw:function(e){var t=e.spread,n=e.prices,r=e.plotBox;for(var o in n){var i=n[o=+o],a=i.buy,u=i.sell;a&&r({top:o+t,bottom:o,width:a/3,color:"#C4FF49",text:a}),u&&r({top:o+t,bottom:o,width:-u/3,color:"#FE3A64",text:u})}}}},volume:S,indicators:{sma:{version:"1.0.0",name:"SMA",dependencies:["value"],draw:function(e){(0,e.plot)({value:(0,e.sma)({source:"value",length:20}),title:"MA20",color:this.color,linewidth:2})}},"ma-slope":{version:"1.0.0",name:"MA Slope",dependencies:["value"],draw:function(e){var t=e.plot,n=e.sma,r=e.math,o=e.setVar,i=e.getVar,a=n({source:"value",length:20});o({name:"ma20",value:a}),t({value:r.sub(a,i({name:"ma20",lookback:1})),title:"MA20 Slope",color:this.color,linewidth:2,ylabel:!0})}},bbands:{version:"1.0.0",name:"Bollinger Bands",dependencies:["value"],draw:function(e){var t=e.plot,n=e.fill,r=k((0,e.bbands)({source:"value",length:20,multiplier:2}),3),o=r[0],i=r[1],a=r[2];n({value1:i,value2:a,color:"#5142f511"}),t({value:o,color:"#ba7d13",linewidth:1}),t({value:i,color:"#5142f5",linewidth:1}),t({value:a,color:"#5142f5",linewidth:1})}},bbw:{version:"1.0.0",name:"Bollinger Bands Width",dependencies:["value"],draw:function(e){var t=e.plot,n=e.bbands,r=e.math,o=k(n({source:"value",length:20,multiplier:2}),3),i=o[0],a=o[1],u=o[2];t({value:+r.divide(r.sub(a,u),i).toFixed(4),color:this.color,linewidth:2,ylabel:!0})}},cvd:{version:"1.0.0",name:"Cumulative Volume Delta",dependencies:["volumeBySide"],draw:function(e){for(var t=e.plot,n=e.cum,r=n({source:"buyVolume"}),o=n({source:"sellVolume"}),i=0,a=0;a<r.length;a++)i+=r[a]-o[a];t({value:+i.toFixed(4),color:this.color,linewidth:2,ylabel:!0})}},"delta-bars":{version:"1.0.0",name:"Delta Bars",dependencies:["value"],draw:function(e){var t=e.plotBox,n=e.value;t({top:n>=0?n:0,bottom:n>=0?0:n,width:.9,center:!0,color:n>=0?"#C4FF49":"#FE3A64"})}},deltafootprint:{version:"1.0.0",name:"Delta Footprint",dependencies:["footprint"],draw:function(e){var t=e.spread,n=e.prices,r=e.plotBox;for(var o in n){var i=n[o=+o],a=i.buy-i.sell;r({top:o+t,bottom:o,width:Math.abs(a)/3,color:a>=0?"#C4FF49":"#FE3A64"})}}},volumePerTick:{version:"1.0.0",name:"Volume Per Tick",dependencies:["footprint"],draw:function(e){var t=e.spread,n=e.prices,r=e.plotBox,o=Object.keys(n),i=Math.max(Math.abs(o[0]-o[o.length-1])/t,t),a=0,u=0;for(var l in n)a+=n[l].buy,u+=n[l].sell;var s=a+u,c=a/i*s,f=u/i*s,d=c-f;r({top:Math.floor(c),bottom:0,width:.9,center:!0,color:"#C4FF4966"}),r({top:0,bottom:-Math.ceil(f),width:.9,center:!0,color:"#FE3A6466"}),r({top:d>0?Math.floor(d):0,bottom:d>0?0:Math.floor(d),width:.9,center:!0,color:d>0?"#C4FF49":"#FE3A64"})}},volumeProfileSession:{version:"1.0.0",name:"Volume Profile Session",dependencies:["footprint"],draw:function(e){var t=e.spread,n=e.prices,r=e.plotBox,o=e.math,i=0,a={};for(var u in n){var l=n[u],s=l.buy,c=l.sell,f=o.add(s,c),d=o.sub(s,c);a[u]={total:f,delta:d},f>i&&(i=f)}for(var h in a){var p=a[h=+h],y=p.total,v=p.delta;r({top:h+t,bottom:h,width:y/i*.9,color:v>=0?"#C4FF49AA":"#FE3A64AA"}),r({top:h+t,bottom:h,width:Math.abs(v)/i*.9,color:v>=0?"#C4FF49":"#FE3A64",text:"T:".concat(y," D:").concat(v)})}}},ohlcChange:{version:"1.0.0",name:"OHLC Change",dependencies:["ohlc"],draw:function(e){var t=e.open,n=e.high,r=e.low,o=e.close,i=e.plotBox,a=Math.max(n-t,0),u=Math.min(r-t,0),l=o-t;i({top:a,bottom:0,width:.9,center:!0,color:"#C4FF4966"}),i({top:0,bottom:u,width:.9,center:!0,color:"#FE3A6466"}),i({top:l,bottom:0,width:.9,center:!0,color:l>0?"#C4FF49":"#FE3A64"})}}}};for(var E in _)for(var O in _[E]){var C=_[E][O];C.id=O,C.type=E}const j=b(b({},_),{},{getIndicatorById:function(e){for(var t in _)for(var n in _[t])if(n===e)return _[t][n]}});var P=n(486),R=n.n(P);const T={main:{background:{},values:{},plots:{}},yScale:{background:{},scales:[],plots:{},crosshair:{}},xScale:{background:{},scales:[],crosshair:{}}};const I={scaleText:function(e,t){return"percent"===t?"".concat(e>=0?"+":"").concat(e,"%"):"".concat(e)}};function $(e){return $="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},$(e)}function L(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||D(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function M(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=D(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function D(e,t){if(e){if("string"==typeof e)return N(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?N(e,t):void 0}}function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function A(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var z=function(){function e(t){var n=t.canvas,r=t.$state,o=t.type;t.settings,function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$state=r,this.canvas=n,this.type=o,this.overlayQueue=new Map,this.renderingOrder=[],this.initDraw()}var t,n;return t=e,n=[{key:"initDraw",value:function(){requestAnimationFrame(this.recursiveDraw.bind(this))}},{key:"recursiveDraw",value:function(){this.draw(),requestAnimationFrame(this.recursiveDraw.bind(this))}},{key:"draw",value:function(){var e,t=this,n=this.$state.chart.instructions[this.type],r=this.$state.global.layout.chartDimensions[this.$state.chart.id];if(this.canvas.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),"yScale"===this.type){var o=Date.now(),i=!1;this.canvas.drawBox("#080019",[0,0,r.yScale.width,r.yScale.height]);var u=0;for(var l in n.scales){var s,c=M(n.scales[l]);try{for(c.s();!(s=c.n()).done;){var f=s.value,d=f.x,h=f.y,p=f.color,y=f.text;this.canvas.drawText(p,[d,h],y)}}catch(e){c.e(e)}finally{c.f()}}for(var v in n.plots)if(n.plots[v]){var g=n.plots[v],b=(g.layerId,g.values);if(b&&b.length){var w=L(b,2),k=w[0],x=w[1],S=this.canvas.ctx,_=Math.ceil(S.measureText(x.text).width);if(_>u&&(u=_),this.canvas.drawBox(k.color,[k.x,k.y,k.w,k.h]),this.canvas.drawText(x.color,[x.x,x.y],x.text,{font:x.font}),!i){var E=k.y+k.h,O=a.formatTimeLeft(o,this.$state.chart.timeframe);this.canvas.drawBox(k.color,[k.x,E,k.w,k.h]),this.canvas.drawText(x.color,[x.x,E+k.h/2],O,{font:x.font}),i=!0}}}u=Math.max(u+=10,50),Math.floor(u/5)!==Math.floor(r.yScale.width/5)&&(r.setYScaleWidth(u),this.$state.chart.setVisibleRange({}));var C=this.$state.global.crosshair.price,j=this.$state.global.crosshair.crosshairs[this.$state.chart.id].y;if(this.$state.global.crosshair.visible){var P=r.yScale.width;for(var R in j){var T=this.$state.chart.ranges.y[R];if(T){var A=I.scaleText(C,T.scaleType);this.canvas.drawBox("#424242",[0,j[R]-10,P,20]),this.canvas.drawText("#fff",[P/2,j[R]+3],A)}}}var z=r.main,B=z.width,F=z.layers;for(var U in this.canvas.drawBox("#2E2E2E",[0,0,B,2]),F){var G=F[U],W=G.top,V=G.height;this.canvas.drawBox("#2E2E2E",[0,W+V-2,B,4])}}if("xScale"===this.type){this.canvas.drawBox("#080019",[0,0,r.xScale.width,r.xScale.height]);var q,Q=M(n.scales);try{for(Q.s();!(q=Q.n()).done;){var H=q.value,Y=H.color,Z=H.x,K=H.y,X=H.text;this.canvas.drawText(Y,[Z,K],X)}}catch(e){Q.e(e)}finally{Q.f()}var J=this.$state.global.crosshair;if(J.visible){var ee=new Date(J.timestamp),te="0".concat(ee.getDate()).slice(-2),ne=m.MONTHS[ee.getMonth()].short,re=ee.getFullYear().toString().substr(2,2),oe=ee.getHours(),ie="0".concat(ee.getMinutes()).slice(-2),ae="".concat(te," ").concat(ne," '").concat(re," ").concat(oe,":").concat(ie),ue=J.crosshairs[this.$state.chart.id].x;this.canvas.drawBox("#424242",[ue-45,0,90,30]),this.canvas.drawText("#fff",[ue,15],ae)}}if("main"===this.type){this.canvas.drawBox("#080019",[0,0,r.main.width,r.main.height]),function(){var e,n=r.main,o=n.height,i=n.width,a=t.$state.chart.instructions,u=a.xScale,l=a.yScale,s="#43434377",c=M(u.scales);try{for(c.s();!(e=c.n()).done;){var f=e.value.x;t.canvas.drawLine(s,[f,0,f,o])}}catch(e){c.e(e)}finally{c.f()}for(var d in l.scales){var h,p=M(l.scales[d]);try{for(p.s();!(h=p.n()).done;){var y=h.value.y;t.canvas.drawLine(s,[0,y,i,y])}}catch(e){p.e(e)}finally{p.f()}}}();var le,se=function(e){if(Array.isArray(e))return N(e)}(e=this.renderingOrder)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||D(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),ce=M(se);try{var fe=function(){var e=le.value,r=t.overlayQueue.get(e);if(r){var o=r.overlay;return o.drawFunc.bind(o)(),"continue"}if(!n.values[e])return"continue";var i=n.values[e],a=(i.layerId,i.values);if(!a)return"continue";for(var u=Object.keys(a),l=function(e,n,r){if("line"===e.type){if(void 0===n||void 0===r)return;var o=a[u[n+1]];if(!o)return;if(!(o=o[r]))return;t.canvas.drawLine(e.color,[e.x,e.y,o.x,o.y],e.linewidth)}else if("fill"===e.type){if(void 0===n||void 0===r)return;var i=a[u[n+1]];if(!i)return;i=i[r],t.canvas.drawPolygon(e.color,[i.x,i.y1,e.x,e.y1,e.x,e.y2,i.x,i.y2])}else"polygon"===e.type?t.canvas.drawPolygon(e.color,e.coords):"box"===e.type?t.canvas.drawBox(e.color,[e.x,e.y,e.w,e.h]):"single-line"===e.type?t.canvas.drawLine(e.color,[e.x,e.y,e.x2,e.y2]):"text"===e.type&&t.canvas.drawText(e.color,[e.x,e.y],e.text,{font:e.font,textAlign:e.textAlign,stroke:e.stroke})},s=0;s<u.length;s++)for(var c=a[u[s]],f=0;f<c.length;f++)l(c[f],s,f)};for(ce.s();!(le=ce.n()).done;)fe()}catch(e){ce.e(e)}finally{ce.f()}var de=this.$state.chart,he=de.datasetGroups[de.selectedDatasetGroup];if(null!=he&&he.visible){var pe=he.datasets[0],ye=pe.source,ve=pe.name,me=this.$state.global.orders.datasets["".concat(ye,":").concat(ve)];if("object"===$(me))for(var ge in me){var be=me[ge],we=be.price,ke=be.side,xe=be.quantity,Se=this.$state.chart.getYCoordByPrice(we),_e=(r.yScale.width,r.xScale.width),Ee="buy"===ke?"#C4FF49":"#FE3A64";this.canvas.drawLine(Ee,[0,Se,_e,Se],1);var Oe="".concat(ke," ").concat(xe," at ").concat(we);this.canvas.drawText("#FFF",[_e-5*Oe.length,Se+10],Oe)}}var Ce,je=M(se);try{for(je.s();!(Ce=je.n()).done;){var Pe=Ce.value;if(n.plots[Pe]){var Re=n.plots[Pe],Te=(Re.layerId,Re.values);if(Te&&Te.length){var Ie=L(Te,2),$e=Ie[0],Le=Ie[1];this.canvas.drawBox($e.color,[$e.x,$e.y,$e.w,$e.h]),this.canvas.drawText(Le.color,[Le.x,Le.y],Le.text,{font:Le.font})}}}}catch(e){je.e(e)}finally{je.f()}var Me=this.$state.chart.ranges.y,De=Object.values(Me).find((function(e){return e.fullscreen}))?"#0a6102":"#2E2E2E",Ne=r.main,Ae=Ne.width,ze=Ne.height,Be=Ne.layers;for(var Fe in this.canvas.drawBox(De,[0,0,2,ze]),this.canvas.drawBox(De,[0,0,Ae,2]),this.canvas.drawBox(De,[Ae-2,0,2,ze]),Be){var Ue=Be[Fe],Ge=Ue.top,We=Ue.height;this.canvas.drawBox(De,[0,Ge+We-2,Ae,4])}}}},{key:"addToRenderingOrder",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.renderingOrder.length;this.renderingOrder.join(),this.renderingOrder.splice(t,0,e)}},{key:"removeFromRenderingOrder",value:function(e){var t=this.renderingOrder.indexOf(e);delete T[e],this.renderingOrder.splice(t,1)}},{key:"adjustInstructions",value:function(e){var t=e.newRange,n=e.oldRange,r=this.canvas;r.width,r.height,t.end,t.start,t.max,t.min,n.start,t.start,n.end,t.end,t.start,n.start,t.min,n.min}},{key:"addOverlay",value:function(e){var t=a.uniqueId();do{t=a.uniqueId()}while(this.renderingOrder.includes(t));return this.overlayQueue.set(t,{overlay:e,visible:!0}),this.addToRenderingOrder(t),t}}],n&&A(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function B(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function F(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function U(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return G(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?G(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function W(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var V=function(){function e(t){var n=t.$state,r=t.canvas,o=t.type,i=void 0===o?"":o,a=t.cursor,u=void 0===a?"default":a;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$state=n,this.canvas=null,this.ctx=null,this.RE=null,this.type=i,this.cursor=u,this.isMouseDown=!1,this.width=0,this.height=0,this.setCanvasElement(r),this.init()}var t,n;return t=e,n=[{key:"init",value:function(){this.RE=new z({canvas:this,$state:this.$state,type:this.type})}},{key:"destroy",value:function(){this.canvas.removeEventListener("mousedown",this.onCanvasMouseDown),this.$state.global.events.removeEventListener("mouseup",this.onEventMouseUp)}},{key:"setCursor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.cursor=e,this.canvas.style.cursor=e}},{key:"setCanvasElement",value:function(e){var t=this;this.ctx=e.getContext("2d"),e.style.cursor=this.cursor,e.width=e.clientWidth,this.width=e.clientWidth,e.height=e.clientHeight,this.height=e.clientHeight,this.onCanvasMouseDown=function(){return t.isMouseDown=!0}.bind(this),e.addEventListener("mousedown",this.onCanvasMouseDown),this.onEventMouseUp=function(){return t.isMouseDown=!1}.bind(this),this.$state.global.events.addEventListener("mouseup",this.onEventMouseUp),this.canvas=e}},{key:"drawBox",value:function(e,t){var n=U(t,4),r=n[0],o=n[1],i=n[2],u=n[3];this.ctx.fillStyle=e,this.ctx.fillRect(r,o,a.getAbsoluteMax(i,1),a.getAbsoluteMax(u,1))}},{key:"drawText",value:function(e,t,n,r){var o=U(t,2),i=o[0],a=o[1];r=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach((function(t){F(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({textAlign:"center",font:"10px Arial",stroke:!1},r),this.ctx.textAlign=r.textAlign,this.ctx.font=r.font,this.ctx.fillStyle=e,r.stroke?this.ctx.strokeText(n,i,a):this.ctx.fillText(n,i,a)}},{key:"drawBoxByPriceAndPercWidthOfTime",value:function(e,t,n){var r=this.$state.chart.pixelsPerElement*n,o=this.$state.chart.getXCoordByTimestamp(t[0]),i=this.$state.chart.getYCoordByPrice(t[1]),a=this.$state.chart.getYCoordByPrice(t[2])-i;a>=0?this.drawBox(e,[o-r/2,i,Math.max(r,1),Math.max(a,1)]):this.drawBox(e,[o-r/2,i,Math.max(r,1),Math.min(a,1)])}},{key:"drawLine",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;this.ctx.strokeStyle=e,this.ctx.lineWidth=n,this.ctx.beginPath(),this.ctx.moveTo(Math.floor(t[0]),Math.floor(t[1])),this.ctx.lineTo(Math.floor(t[2]),Math.floor(t[3])),this.ctx.stroke(),this.ctx.closePath()}},{key:"drawPolygon",value:function(e,t){this.ctx.beginPath(),this.ctx.fillStyle=e,this.ctx.moveTo(t[0],t[1]);for(var n=2;n<t.length;n+=2)this.ctx.lineTo(t[n],t[n+1]);this.ctx.fill(),this.ctx.closePath()}},{key:"drawLineByPriceAndTime",value:function(e,t){this.ctx.strokeStyle=e,this.ctx.beginPath();var n=this.$state.chart.getXCoordByTimestamp(t[0]),r=this.$state.chart.getYCoordByPrice(t[1]);this.ctx.moveTo(n,r);var o=this.$state.chart.getXCoordByTimestamp(t[2]),i=this.$state.chart.getYCoordByPrice(t[3]);this.ctx.lineTo(o,i),this.ctx.stroke(),this.ctx.closePath()}},{key:"drawTextAtPriceAndTime",value:function(e,t,n){this.ctx.textAlign="center",this.ctx.fillStyle=e;var r=this.$state.chart.getXCoordByTimestamp(t[0]);this.ctx.fillText(n,r,t[1])}},{key:"setWidth",value:function(e){this.width=e,this.canvas.width=e,this.canvas.style.width="".concat(e,"px"),this.RE&&this.RE.draw()}},{key:"setHeight",value:function(e){this.height=e,this.canvas.height=e,this.canvas.style.height="".concat(e,"px"),this.RE&&this.RE.draw()}},{key:"onMouseDown",value:function(){this.isMouseDown=!0}},{key:"onMouseUp",value:function(){this.isMouseDown=!1}}],n&&W(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function q(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Q(e,t,n){return t&&q(e.prototype,t),n&&q(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function H(e){return H="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},H(e)}function Y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Z(e,t){return Z=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Z(e,t)}function K(e,t){if(t&&("object"===H(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function X(e){return X=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},X(e)}var J=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Z(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=X(r);if(o){var n=X(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return K(this,e)});function a(e){var t,n=e.canvas,r=e.$state;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this)).$state=r,t.canvas=n,t}return t=a,(n=[{key:"init",value:function(e){this.drawImplementation=e,this.canvas.RE.addOverlay(this)}},{key:"drawFunc",value:function(){this.drawImplementation()}}])&&Y(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(Q((function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)})));function ee(e){return ee="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},ee(e)}function te(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ne(e,t){return ne=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ne(e,t)}function re(e,t){if(t&&("object"===ee(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return oe(e)}function oe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ie(e){return ie=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ie(e)}var ae=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ne(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ie(r);if(o){var n=ie(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return re(this,e)});function a(e){var t,n=e.$state,r=e.canvas;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this,{canvas:r,$state:n})).init(t.draw.bind(oe(t))),t}return t=a,(n=[{key:"draw",value:function(){if(this.$state.global.crosshair.visible){var e=this.$state.global.crosshair.crosshairs[this.$state.chart.id],t=e.x,n=e.y;for(var r in this.canvas.drawLine("#ffffff88",[t,0,t,this.canvas.height]),n)this.canvas.drawLine("#ffffff88",[0,n[r],this.canvas.width,n[r]])}}}])&&te(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(J);function ue(e){return ue="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},ue(e)}function le(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function se(e,t){return se=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},se(e,t)}function ce(e,t){if(t&&("object"===ue(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return fe(e)}function fe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function de(e){return de=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},de(e)}var he=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&se(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=de(r);if(o){var n=de(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ce(this,e)});function a(e){var t,n=e.$state,r=e.canvas;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this,{$state:n,canvas:r})).upColor="#C4FF4966",t.downColor="#FE3A6466",t.init(t.draw.bind(fe(t))),t}return t=a,(n=[{key:"draw",value:function(){}}])&&le(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(J);function pe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var ye=function(){function e(t){var n=t.$state;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$state=n,this.canvas=null,this.scrollListener=null,this.mousemoveListener=null,this.mouseleaveListener=null,this.layerToMove=-1,this.change={x:0,y:0},this.debounceSetVisibleRange=R().throttle(this.calculateNewVisibleRange.bind(this),16)}var t,n;return t=e,n=[{key:"init",value:function(){var e=this,t=this.$state.global.ui.charts[this.$state.chart.id].subcharts;this.setCanvasElement(t.main.current),new he({$state:this.$state,canvas:this.canvas}),new ae({$state:this.$state,canvas:this.canvas}),this.onResizeChart=function(t){var n=t.main;e.canvas.setWidth(n.width),e.canvas.setHeight(n.height),e.$state.chart.setVisibleRange()}.bind(this),this.$state.global.layout.addEventListener("resize-".concat(this.$state.chart.id),this.onResizeChart),this.onResizeYScale=function(t){var n=t.main;e.canvas.setWidth(n.width)}.bind(this),this.$state.global.layout.addEventListener("resize-y-scale-".concat(this.$state.chart.id),this.onResizeYScale),this.onWindowMouseMoveListener=this.onWindowMouseMove.bind(this),this.$state.global.events.addEventListener("mousemove",this.onWindowMouseMoveListener)}},{key:"destroy",value:function(){this.$state.global.layout.removeEventListener("resize-".concat(this.$state.chart.id),this.onResizeChart),this.$state.global.layout.removeEventListener("resize-y-scale-".concat(this.$state.chart.id),this.onResizeYScale),this.$state.global.events.removeEventListener("mousemove",this.onWindowMouseMoveListener),this.removeCanvasListeners(this.canvas.canvas)}},{key:"setCanvasElement",value:function(e){this.canvas&&this.canvas.canvas&&this.removeCanvasListeners(this.canvas.canvas),this.canvas||(this.canvas=new V({$state:this.$state,id:"canvas-".concat(this.$state.chart.id,"-main"),canvas:e,type:"main",height:this.$state.dimensions.height-20,width:this.$state.dimensions.width-50,cursor:"crosshair"})),this.scrollListener=this.onScroll.bind(this),e.addEventListener("wheel",this.scrollListener),this.mousemoveListener=this.onMouseMove.bind(this),e.addEventListener("mousemove",this.mousemoveListener),this.mouseLeaveListener=this.onMouseLeave.bind(this),e.addEventListener("mouseleave",this.mouseLeaveListener),this.mouseEnterListener=this.onMouseEnter.bind(this),e.addEventListener("mouseenter",this.mouseEnterListener),this.canvas.setCanvasElement(e)}},{key:"removeCanvasListeners",value:function(e){e.removeEventListener("wheel",this.scrollListener),e.removeEventListener("mousemove",this.mousemoveListener),e.removeEventListener("mouseleave",this.mouseLeaveListener),e.removeEventListener("mouseenter",this.mouseEnterListener)}},{key:"onScroll",value:function(e){e.preventDefault();var t=e.deltaX,n=e.deltaY,r=e.offsetX,o=e.offsetY,i=this.$state.chart.id,a=this.$state.global.layout.chartDimensions[i].main,u=a.width;if(0!==t){var l=this.$state.chart,s=u/l.pixelsPerElement*(t>0?100*t:-100*-t)*(l.timeframe/6e4),c=this.$state.chart.ranges.x,f=c.start,d=c.end;f+=s,d+=s,this.$state.chart.setVisibleRange({start:f,end:d})}else if(0!==n){var h=this.$state.chart.getLayerByYCoord(o),p=this.$state.chart.ranges.y[h],y=this.$state.chart.ranges.x,v=y.start,m=y.end,g=p.range,b=g.min,w=g.max;if(this.$state.global.events.keys.Control||this.$state.global.events.keys.Shift){p.lockedYScale=!1;var k=a.layers[h],x=(o-k.top)/k.height,S=1-x,_=w-b;this.$state.global.events.keys.Shift&&(n=-n),n<0?(w-=_*x/10,b+=_*S/10):(w+=_*x/10,b-=_*S/10)}if(!this.$state.global.events.keys.Shift){var E=r/u,O=1-E,C=m-v;n>0?(v-=C*E/10,m+=C*O/10):(v+=C*E/10,m-=C*O/10)}this.$state.chart.setVisibleRange({start:v,end:m,min:b,max:w},h)}}},{key:"onMouseMove",value:function(e){this.$state.global.crosshair.updateCrosshair(this.$state.chart,e.offsetX,e.offsetY)}},{key:"onMouseLeave",value:function(e){this.$state.global.crosshair.visible=!1}},{key:"onMouseEnter",value:function(){this.$state.global.crosshair.visible=!0}},{key:"onWindowMouseMove",value:function(e){var t=e.movementX,n=e.movementY,r=e.layerY;if(this.canvas.isMouseDown){if(-1===this.layerToMove){var o=this.$state.chart.getLayerByYCoord(r);this.layerToMove=o}this.change.x+=t,this.change.y+=n,this.debounceSetVisibleRange()}else this.layerToMove=-1}},{key:"calculateNewVisibleRange",value:function(){var e=this.change,t=e.x,n=e.y;this.change={x:0,y:0};var r=this.$state.chart.id,o=this.$state.global.layout.chartDimensions[r].main.layers,i=this.$state.chart.ranges.x,a=i.start,u=i.end,l=this.$state.chart.ranges.y[this.layerToMove];if(l){var s=l.range,c=s.min,f=s.max,d=t/this.$state.chart.pixelsPerElement,h=this.$state.chart.timeframe*d;if(a-=h,u-=h,!this.$state.chart.ranges.y[this.layerToMove].lockedYScale){var p=n/(o[this.layerToMove].height/(f-c));c+=p,f+=p}this.$state.chart.setVisibleRange({start:a,end:u,min:c,max:f},this.layerToMove)}}}],n&&pe(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function ve(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var me=function(){function e(t){var n=t.$state;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$state=n,this.canvas=null}var t,n;return t=e,(n=[{key:"init",value:function(){var e=this;this.canvas=new V({$state:this.$state,id:"canvas-timescale",canvas:this.$state.global.ui.charts[this.$state.chart.id].subcharts.xScale.current,type:"xScale",height:20,width:this.$state.dimensions.width-50,cursor:"e-resize",position:"bottom"}),this.onResizeChartListener=function(t){var n=t.xScale;e.canvas.setWidth(n.width),e.canvas.setHeight(n.height)}.bind(this),this.$state.global.layout.addEventListener("resize-".concat(this.$state.chart.id),this.onResizeChartListener),this.mouseMoveListener=this.onWindowMouseMove.bind(this),this.$state.global.events.addEventListener("mousemove",this.mouseMoveListener)}},{key:"onWindowMouseMove",value:function(e){var t=e.movementX;if(this.canvas.isMouseDown&&0!==t){var n=-(t>0?-10*-t:10*t);this.$state.chart.resizeXRange(n)}}},{key:"destroy",value:function(){this.$state.global.layout.removeEventListener("resize-".concat(this.$state.chart.id),this.onResizeChartListener),this.$state.global.events.removeEventListener("mousemove",this.mouseMoveListener)}}])&&ve(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function ge(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var be=function(){function e(t){var n=t.$state;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.$state=n,this.canvas=null,this.layerToMove=-1}var t,n;return t=e,n=[{key:"init",value:function(){var e=this;this.canvas=new V({$state:this.$state,id:"canvas-pricescale",canvas:this.$state.global.ui.charts[this.$state.chart.id].subcharts.yScale.current,type:"yScale",height:this.$state.dimensions.height-20,width:50,cursor:"n-resize",position:"right"}),this.resizeChartLayoutListener=function(t){var n=t.yScale;e.canvas.setHeight(n.height),e.canvas.setWidth(n.width)}.bind(this),this.$state.global.layout.addEventListener("resize-".concat(this.$state.chart.id),this.resizeChartLayoutListener),this.onResizeYScale=function(t){var n=t.yScale;e.canvas.setHeight(n.height),e.canvas.setWidth(n.width)}.bind(this),this.$state.global.layout.addEventListener("resize-y-scale-".concat(this.$state.chart.id),this.onResizeYScale),this.mouseMoveListener=this.onWindowMouseMove.bind(this),this.$state.global.events.addEventListener("mousemove",this.mouseMoveListener)}},{key:"destroy",value:function(){this.$state.global.events.removeEventListener("mousemove",this.mouseMoveListener),this.$state.global.layout.removeEventListener("resize-".concat(this.$state.chart.id),this.resizeChartLayoutListener),this.$state.global.layout.removeEventListener("resize-y-scale-".concat(this.$state.chart.id),this.onResizeYScale)}},{key:"onWindowMouseMove",value:function(e){var t=e.movementY,n=e.layerY;if(this.canvas.isMouseDown){if(0!==t){var r=this.$state.chart;if(-1===this.layerToMove){var o=r.getLayerByYCoord(n);this.layerToMove=o}var i=r.ranges.y[this.layerToMove].range,a=i.min,u=i.max,l=.01*(u-a)*-t;a+=l,u-=l,r.ranges.y[this.layerToMove].lockedYScale=!1,r.setVisibleRange({min:a,max:u},this.layerToMove)}}else this.layerToMove=-1}}],n&&ge(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),e}();function we(e){return we="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},we(e)}function ke(e,t,n,r,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void n(e)}u.done?t(l):Promise.resolve(l).then(r,o)}function xe(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ke(i,r,o,a,u,"next",e)}function u(e){ke(i,r,o,a,u,"throw",e)}a(void 0)}))}}function Se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _e(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Se(Object(n),!0).forEach((function(t){Ee(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Oe(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ce(e,t){return Ce=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ce(e,t)}function je(e,t){if(t&&("object"===we(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Pe(e)}function Pe(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Re(e){return Re=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Re(e)}var Te=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ce(e,t)}(s,e);var t,n,r,o,i,u,l=(i=s,u=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Re(i);if(u){var n=Re(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return je(this,e)});function s(e){var t,n=e.$global,r=e.id,o=void 0===r?a.uniqueId():r,i=e.name,u=void 0===i?"":i,c=e.ranges,f=void 0===c?{x:{start:0,end:0},y:{}}:c,d=e.pixelsPerElement,h=void 0===d?10:d,p=e.timeframe,y=void 0===p?m.HOUR:p,v=e.settings,g=void 0===v?{}:v;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(t=l.call(this)).$global=n,t.isInitialized=!1,t.id=o,t.timeframe=0,t.datasets={},t.datasetGroups={},t.selectedDatasetGroup="",t.maxDecimalPlaces=0,t.instructions=T,t.computedState=t.$global.workers.createComputedState(Pe(t)),t.subcharts={main:void 0,xScale:void 0,yScale:void 0},t.ranges=JSON.parse(JSON.stringify(f)),t.renderedRanges=JSON.parse(JSON.stringify(f)),t.settings=_e({syncRange:!1,syncWithCrosshair:""},g),t.$global.settings.onChartAdd(t.id,{settings:t.settings}),t.setPixelsPerElement(h),t.setTimeframe(y),t.setName(u),t}return t=s,n=[{key:"init",value:function(){var e=this;if(!this.isInitialized){this.onResizeListener=function(){return e.resizeXRange(0)}.bind(this),this.$global.layout.addEventListener("resize-".concat(this.id),this.onResizeListener);var t={chart:this,global:this.$global,dimensions:this.$global.layout.chartDimensions[this.id]};Object.keys(this.ranges.y).length||this.addLayer(10),this.$global.crosshair.addCrosshair(this.id),this.subcharts={main:new ye({$state:t}),xScale:new me({$state:t}),yScale:new be({$state:t})},this.setInitialVisibleRange(),this.subcharts.main.init(),this.subcharts.xScale.init(),this.subcharts.yScale.init(),this.isInitialized=!0,this.fireEvent("init")}}},{key:"destroy",value:function(){null!==this.newTimeInterval&&clearInterval(this.newTimeInterval),this.$global.removeEventListener("resize-".concat(this.id),this.onResizeListener),this.subcharts.main.destroy(),this.subcharts.yScale.destroy(),this.subcharts.xScale.destroy(),this.$global.layout.removeChart(this.id),this.$global.settings.onChartDelete(this.id),delete this.$global.charts[this.id]}},{key:"setName",value:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=0,n=Object.values(this.$global.charts);t<n.length;t++){var r=n[t];if(r.name===e)return{error:"A chart with that name already exists."}}this.name=e,this.$global.settings.onChartChangeName(this.id,e),this.fireEvent("set-name",this.name)}},{key:"createDatasetGroup",value:function(e,t){var n=this,r=t.visible,o=void 0===r||r,i=t.synced,u=void 0===i?{}:i,l=a.uniqueId();return e=e.map((function(e){var t=n.$global.data.addOrGetDataset({source:e.source,name:e.name,timeframe:n.timeframe});return{source:t.source,name:t.name}})),this.datasetGroups[l]={id:l,visible:o,datasets:e,indicators:{},synced:u},this.selectedDatasetGroup.length||this.setSelectedDatasetGroup(l),this.$global.ui.charts[this.id].updateDatasetGroups(this.datasetGroups),this.datasetGroups[l]}},{key:"updateDatasetGroup",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.updateUI,i=void 0===o||o,a=this.datasetGroups[e],u="".concat(a.datasets[0].source,":").concat(a.datasets[0].name),l=this.datasets[u],s=this.$global.data.addOrGetDataset({source:t[0].source,name:t[0].name,timeframe:this.timeframe}),c=s.getTimeframeAgnosticId(),f=[],d={},h=function(e){f=l.removeSubscriber(n.id,e);var t=a.indicators[e];for(var r in t.datasetId=c,n.$global.data.sources)if(r===s.source){var o=n.$global.data.sources[r][s.name];if(!o)throw new Error("Couldn't find dataset ".concat(datasetId," in sources model."));var i=o.models[t.model.id];if(i=i?JSON.parse(JSON.stringify(i)):_e(_e({},t.model),{},{notFound:!0}),Array.isArray(i.model)){var u=i.model.find((function(e){return e.id===t.model.childId}));if(!u)throw new Error("Couldn't find childModel ".concat(t.model.childId));i.model=u,i.label=u.label,i.childId=u.id}t.model=i;break}t.model.notFound||(d[e]={datasetId:c,model:t.model},s.addSubscriber(n.id,e,[t.model.id])),n.computedState.emptySet({renderingQueueId:e})};for(var p in a.indicators)h(p);f&&!Object.keys(f).length&&delete this.datasets[u],this.datasets[c]=s,a.datasets=t.map((function(e){return{source:e.source,name:e.name}})),this.computedState.updateIndicators(d),i&&this.$global.ui.charts[this.id].updateDatasetGroups(this.datasetGroups),this.$global.settings.onChartDatasetGroupsChange(this.id,this.datasetGroups),this.computedState.generateAllInstructions(),this.fireEvent("update-dataset-group",a)}},{key:"addIndicator",value:(o=xe(regeneratorRuntime.mark((function e(t,n,r,o){var i,u,l,s,c,f,d,h,p,y,v,m,g,b,w,k,x,S,_=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=o.visible,u=void 0===i||i,l=o.layerId,s=void 0===l?Object.keys(this.ranges.y)[0]:l,c=_.length>4&&void 0!==_[4]?_[4]:{},f=c.updateUI,d=void 0===f||f,"string"==typeof t&&(t=j.getIndicatorById(t)),s&&this.ranges.y[s]||(s=this.addLayer(3)),h=this.datasetGroups[n],p=h.datasets[0],y=p.source,v=p.name,m=this.$global.data.addOrGetDataset({source:y,name:v,timeframe:this.timeframe}),g=m.getTimeframeAgnosticId(),b=a.randomHexColor(),t=_e(_e({},t),{},{visible:u,datasetId:g,model:r,color:b,layerId:s}),e.next=13,this.computedState.addToQueue({indicator:_e(_e({},t),{},{draw:void 0})});case 13:return w=e.sent,k=w.renderingQueueId,t.renderingQueueId=k,this.ranges.y[s].indicators[k]={visible:u},(x=Object.keys(m.data)).length&&this.computedState.calculateOneSet({renderingQueueId:k,timestamps:x,dataset:{source:m.source,name:m.name,timeframe:m.timeframe,data:m.data}}),t.model.notFound||m.addSubscriber(this.id,k,[r.id]),this.datasets[g]=m,h.indicators[k]=t,this.datasetGroups[h.id]=h,d&&this.$global.ui.charts[this.id].updateDatasetGroups(this.datasetGroups),S=100*this.timeframe,this.$global.data.requestDataPoints({dataset:m,start:this.ranges.x.start-S,end:this.ranges.x.end+S}),this.$global.settings.onChartDatasetGroupsChange(this.id,this.datasetGroups),e.abrupt("return",t);case 28:case"end":return e.stop()}}),e,this)}))),function(e,t,n,r){return o.apply(this,arguments)})},{key:"addLayer",value:function(e){var t=a.uniqueId();return this.ranges.y[t]={heightUnit:e,lockedYScale:!0,visible:!0,fullscreen:!1,scaleType:"default",indicators:{},range:{min:1/0,max:-1/0}},this.renderedRanges.y[t]={range:{min:1/0,max:-1/0}},this.$global.layout.chartDimensions[this.id].updateLayers(),this.$global.settings.onChartChangeRangeOrTimeframe(this.id,{ranges:JSON.parse(JSON.stringify(this.ranges))}),t}},{key:"addDataModelGroup",value:function(){a.uniqueId()}},{key:"toggleLayerFullScreen",value:function(e){var t=this.ranges.y[e];if(t.fullscreen=!t.fullscreen,t.fullscreen)for(var n in this.ranges.y)n!==e&&(this.ranges.y[n].fullscreen=!1);this.$global.layout.chartDimensions[this.id].updateLayers(),this.setVisibleRange({})}},{key:"setLayerScaleType",value:function(e,t){this.ranges.y[e].scaleType=t,this.ranges.y[e].lockedYScale=!0,this.setVisibleRange({})}},{key:"removeLayer",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=Object.keys(this.ranges.y);if(1!==r.length){var o=[],i=function(e){var n=Object.values(t.datasetGroups).find((function(t){return!!t.indicators[e]}));t.removeIndicator(n.id,e,!1),o.push(e)};for(var a in this.ranges.y[e].indicators)i(a);delete this.ranges.y[e],r.splice(r.indexOf(e),1),1===r.length&&(this.ranges.y[r[0]].heightUnit=10),this.$global.layout.chartDimensions[this.id].updateLayers(),this.$global.settings.onChartChangeRangeOrTimeframe(this.id,{ranges:JSON.parse(JSON.stringify(this.ranges))}),this.computedState.removeFromQueue({renderingQueueIds:o}),n&&this.setVisibleRange()}}},{key:"setTimeframe",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.id;if(e!==this.timeframe){for(var n={},r=0,o=Object.values(this.datasets);r<o.length;r++){var i=o[r];n[i.getTimeframeAgnosticId()]=i}if(this.datasets={},this.timeframe=e,this.setNewTimeInterval(),this.computedState.emptyAllSets(),this.isInitialized){var a=this.$global.layout.chartDimensions[this.id].main.width,u=this.ranges,l=this.pixelsPerElement;u.x.start=u.x.end-e*(a/l),this.setInitialVisibleRange()}for(var s=0,c=Object.values(n);s<c.length;s++){var f=c[s],d=this.$global.data.addOrGetDataset({source:f.source,name:f.name,timeframe:e}),h=_e({},f.subscribers[this.id]);for(var p in h)d.addSubscriber(this.id,p,h[p]),f.removeSubscriber(this.id,p);this.datasets[d.getTimeframeAgnosticId()]=d;var y=100*this.timeframe;this.$global.data.requestDataPoints({dataset:d,start:this.ranges.x.start-y,end:this.ranges.x.end+y})}if(this.settings.syncRange&&t===this.id)for(var v in this.$global.charts){var m=this.$global.charts[v];m.settings.syncRange&&m.timeframe!==this.timeframe&&m.setTimeframe(this.timeframe,this.id)}this.$global.settings.onChartChangeRangeOrTimeframe(this.id,{timeframe:e}),this.fireEvent("set-timeframe",e)}}},{key:"setNewTimeInterval",value:function(){var e=this;null!==this.newTimeInterval&&(clearInterval(this.newTimeInterval),this.newTimeInterval=null);var t=Date.now(),n=t-t%this.timeframe,r=n+this.timeframe;this.newTimeInterval=setInterval((function(){var t=e.ranges.x,r=t.start,o=t.end;r<n&&o>=n&&e.setVisibleRange({start:r+e.timeframe,end:o+e.timeframe}),setTimeout(e.setNewTimeInterval.bind(e),0)}),r-t)}},{key:"toggleDatasetGroupVisibility",value:function(e){var t=this,n=this.datasetGroups[e];n.visible=!n.visible,this.datasetGroups[n.id]=n,this.$global.ui.charts[this.id].updateDatasetGroups(this.datasetGroups),Object.keys(n.indicators).forEach((function(e){t.toggleIndicatorVisibility(n.id,e,n.visible)}))}},{key:"toggleIndicatorVisibility",value:function(e,t,n){var r=this.datasetGroups[e],o=r.indicators[t];o.visible=void 0===n?!o.visible:n,this.computedState.setVisibility({renderingQueueId:t,visible:o.visible}),r.indicators[t]=o,this.$global.ui.charts[this.id].updateDatasetGroups(this.datasetGroups),this.$global.settings.onChartDatasetGroupsChange(this.id,this.datasetGroups);var i=this.ranges.y[o.layerId];i.indicators[t].visible=o.visible;for(var a=Object.keys(i.indicators),u=0;u<a.length;u++){if(i.indicators[a[u]].visible){i.visible=!0;break}u===a.length-1&&(i.visible=!1)}if(this.$global.layout.chartDimensions[this.id].updateLayers(),o.visible){var l=this.datasets[o.datasetId],s=Object.keys(l.data);s.length&&this.computedState.calculateOneSet({renderingQueueId:t,timestamps:s,dataset:{source:l.source,name:l.name,timeframe:l.timeframe,data:l.data}})}}},{key:"removeDatasetGroup",value:function(e){var t=this,n=[];if(Object.keys(this.datasetGroups[e].indicators).forEach((function(r){t.removeIndicator(e,r,!1),n.push(r)})),delete this.datasetGroups[e],this.selectedDatasetGroup===e){var r=Object.keys(this.datasetGroups)[0]||"";this.setSelectedDatasetGroup(r)}this.$global.ui.charts[this.id].updateDatasetGroups(this.datasetGroups),this.$global.settings.onChartDatasetGroupsChange(this.id,this.datasetGroups),this.computedState.removeFromQueue({renderingQueueIds:n}),this.setVisibleRange()}},{key:"removeIndicator",value:function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=this.datasetGroups[e],o=r.indicators[t],i=this.datasets[o.datasetId];if(!o.model.notFound){var a=i.removeSubscriber(this.id,t);Object.keys(a).length||delete this.datasets[i.getTimeframeAgnosticId()]}delete r.indicators[t],this.$global.ui.charts[this.id].updateDatasetGroups(this.datasetGroups),this.$global.settings.onChartDatasetGroupsChange(this.id,this.datasetGroups),delete this.ranges.y[o.layerId].indicators[t],Object.keys(this.ranges.y[o.layerId].indicators).length||this.removeLayer(o.layerId,!1),n&&(this.computedState.removeFromQueue({renderingQueueIds:[t]}),this.setVisibleRange())}},{key:"setVisibleRange",value:(r=xe(regeneratorRuntime.mark((function e(){var t,n,r,o,i,a,u,l,s,c,f,d,h,p,y,v,m,g=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=g.length>0&&void 0!==g[0]?g[0]:{},n=g.length>1&&void 0!==g[1]?g[1]:Object.keys(this.ranges.y)[0],r=g.length>2&&void 0!==g[2]?g[2]:this.id,o=t.start,i=void 0===o?this.ranges.x.start:o,a=t.end,u=void 0===a?this.ranges.x.end:a,l=t.min,s=void 0===l?this.ranges.y[n].range.min:l,c=t.max,f=void 0===c?this.ranges.y[n].range.max:c,this.ranges.x={start:i,end:u},this.ranges.y[n].range={min:s,max:f},!this.settings.syncRange||r!==this.id){e.next=25;break}e.t0=regeneratorRuntime.keys(this.$global.charts);case 8:if((e.t1=e.t0()).done){e.next=25;break}if((d=e.t1.value)!==this.id){e.next=12;break}return e.abrupt("continue",8);case 12:if((h=this.$global.charts[d]).settings.syncRange){e.next=15;break}return e.abrupt("continue",8);case 15:if((p=this.$global.layout.chartDimensions)[h.id]){e.next=18;break}return e.abrupt("continue",8);case 18:y=p[h.id].main.width,v=p[this.id].main.width,m=y/v,h.setPixelsPerElement(this.pixelsPerElement*m),h.setVisibleRange({start:i,end:u},void 0,r),e.next=8;break;case 25:this.computedState.generateAllInstructions();case 26:case"end":return e.stop()}}),e,this)}))),function(){return r.apply(this,arguments)})},{key:"onGenerateAllInstructions",value:function(e){var t=e.instructions,n=e.visibleRanges,r=e.pixelsPerElement,o=e.maxDecimalPlaces;for(var i in this.setPixelsPerElement(r),this.maxDecimalPlaces=o,this.instructions=t,this.renderedRanges.x=n.x,n.y)this.ranges.y[i].range.min=n.y[i].min,this.ranges.y[i].range.max=n.y[i].max,this.renderedRanges.y[i].range.min=n.y[i].min,this.renderedRanges.y[i].range.max=n.y[i].max;for(var a in this.$global.crosshair.updateCrosshairTimeAndPrice(this),this.$global.settings.onChartChangeRangeOrTimeframe(this.id,{ranges:JSON.parse(JSON.stringify(this.ranges))}),this.datasets){var u=100*this.timeframe;this.$global.data.requestDataPoints({dataset:this.datasets[a],start:this.ranges.x.start-u,end:this.ranges.x.end+u})}}},{key:"setInitialVisibleRange",value:function(){var e,t=this.$global.layout.chartDimensions[this.id].main.width,n=this.ranges.x,r=n.start,o=n.end;if(this.datasets.length){var i="".concat(this.datasets[0],":").concat(this.timeframe),a=this.$global.data.datasets[i].data;e=a[a.length-1].time}void 0!==e&&void 0!==r&&void 0!==o||(e=Math.floor(Date.now()/this.timeframe)*this.timeframe),this.pixelsPerElement=10,r=(o=e+10*this.timeframe)-t/this.pixelsPerElement*this.timeframe,this.setVisibleRange({start:r,end:o})}},{key:"resizeXRange",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.5,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.5,r=this.$global.layout.chartDimensions[this.id].main.width,o=this.ranges.x,i=o.start,a=o.end,u=a-i;e<0?(i-=u*t/10,a+=u*n/10):e>0&&(i+=u*t/10,a-=u*n/10);var l=r/((a-i)/this.timeframe);l<1||l>1e3||this.setVisibleRange({start:i,end:a})}},{key:"setDefaultRangeBounds",value:function(e){var t=e.start,n=e.end,r=e.min,o=e.max;this.defaultRangeBounds||(this.defaultRangeBounds={}),t&&(this.defaultRangeBounds.start=t),n&&(this.defaultRangeBounds.end=n),r&&(this.defaultRangeBounds.min=r),o&&(this.defaultRangeBounds.max=o)}},{key:"setSelectedDatasetGroup",value:function(e){this.selectedDatasetGroup=e,this.fireEvent("set-selected-dataset-group",e)}},{key:"setPixelsPerElement",value:function(e){this.pixelsPerElement=e,this.$global.settings.onChartChangeRangeOrTimeframe(this.id,{pixelsPerElement:e})}},{key:"getTimestampByXCoord",value:function(e){return a.getTimestampByXCoord(this.renderedRanges.x.start,this.renderedRanges.x.end,this.$global.layout.chartDimensions[this.id].main.width,e)}},{key:"getXCoordByTimestamp",value:function(e){return a.getXCoordByTimestamp(this.renderedRanges.x.start,this.renderedRanges.x.end,this.$global.layout.chartDimensions[this.id].main.width,e)}},{key:"getYCoordByPrice",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object.keys(this.ranges.y)[0],n=this.$global.layout.chartDimensions[this.id].main,r=n.layers[t],o=r.top,i=r.height,u=this.renderedRanges.y[t].range;return o+a.getYCoordByPrice(u.min,u.max,i,e)}},{key:"getPriceByYCoord",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Object.keys(this.ranges.y)[0],n=this.$global.layout.chartDimensions[this.id].main,r=n.layers[t],o=r.top,i=r.height,u=this.renderedRanges.y[t].range;return a.getPriceByYCoord(u.min,u.max,i,e-o)}},{key:"onNewCanvas",value:function(){var e=this.$global.ui.charts[this.id].subcharts,t=e.main,n=e.xScale,r=e.yScale;this.$global.layout.resize(),this.subcharts.main.setCanvasElement(t.current),this.subcharts.xScale.canvas.setCanvasElement(n.current),this.subcharts.yScale.canvas.setCanvasElement(r.current)}},{key:"getLayerByYCoord",value:function(e){for(var t=this.$global.layout.chartDimensions[this.id].main.layers,n=Object.keys(t).filter((function(e){return t[e].height>0})),r=0;r<n.length;r++){var o=t[n[r]],i=t[n[r+1]];if(!i)return n[r];if(e>=o.top&&e<=i.top)return n[r]}}},{key:"updateSettings",value:function(e){if(e.syncRange)for(var t in this.$global.charts){var n=this.$global.charts[t];n.settings.syncRange&&(n.timeframe!==this.timeframe&&n.setTimeframe(this.timeframe),n.setVisibleRange(this.ranges.x))}Object.assign(this.settings,e),this.fireEvent("update-settings",this.settings),this.$global.settings.onChartChangeSettings(this.id,this.settings)}}],n&&Oe(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),s}(l);function Ie(e){return Ie="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},Ie(e)}function $e(e,t){return $e=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},$e(e,t)}function Le(e,t){if(t&&("object"===Ie(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Me(e){return Me=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Me(e)}function De(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ne(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ne(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function Ne(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ae(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ze(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Be(e,t,n){return t&&ze(e.prototype,t),n&&ze(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var Fe=function(){function e(t,n,r,o){Ae(this,e),this.$global=t,this.id=n,this.width,this.height,this.main={},this.xScale={width:r-50,height:20},this.yScale={width:50,height:o-20},this.setDimensions(r,o)}return Be(e,[{key:"setDimensions",value:function(e,t){this.width=e,this.height=t,this.main={width:e-this.yScale.width,height:t-this.xScale.height,layers:{}},this.xScale.width=e-this.yScale.width,this.yScale.height=t-this.xScale.height,this.updateLayers()}},{key:"updateLayers",value:function(){var e=this.$global.charts[this.id].ranges.y,t=Object.keys(e);if(t.length){for(var n=0,r=0,o="",i={},a=0,u=t;a<u.length;a++){var l=u[a],s=e[l];i[l]={top:0,height:0},s.fullscreen&&(o=l),s.visible&&(r+=s.heightUnit)}if(o.length)i[o].height=this.main.height;else{var c,f=De(t);try{for(f.s();!(c=f.n()).done;){var d=c.value,h=e[d];i[d].top=n,i[d].height=h.visible?this.main.height*(h.heightUnit/r):0,n+=i[d].height}}catch(e){f.e(e)}finally{f.f()}}this.main.layers=i}}},{key:"setYScaleWidth",value:function(e){this.yScale.width=e,this.xScale.width=this.width-e,this.main.width=this.width-e,this.$global.layout.fireEvent("resize-y-scale-".concat(this.id),this)}}]),e}(),Ue=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$e(e,t)}(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Me(t);if(n){var o=Me(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return Le(this,e)});function o(e){var t,n=e.$global;return Ae(this,o),(t=r.call(this)).$global=n,t.height=0,t.width=0,t.layout=[],t.chartDimensions={},t}return Be(o,[{key:"init",value:function(){this.resizeListener=this.resize.bind(this),window.addEventListener("resize",this.resizeListener),setTimeout(this.resizeListener)}},{key:"destroy",value:function(){window.removeEventListener("resize",this.resizeListener)}},{key:"setInitialLayout",value:function(e){if(!e.length){var t=this.$global.createChart().id;e=[{id:a.uniqueId(),chartId:t,top:0,left:0,width:100,height:100,children:[]}]}this.setLayout(e)}},{key:"addChartBoxToSide",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:50,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=function t(n){if(n.id===e||n.chartId===e)return n;var r,o=De(n.children);try{for(o.s();!(r=o.n()).done;){var i=t(r.value);if(i)return i}}catch(e){o.e(e)}finally{o.f()}},i=o(this.layout[0]);if(i){var u={id:a.uniqueId(),top:0,left:0,width:100,height:100,chartId:i.chartId,children:[]},l={side:t,id:a.uniqueId(),top:0,left:0,width:100,height:100,children:[]},s=100-n;"left"===t?(u.side="right",u.left=s,u.width=s,l.width=n):"top"===t?(u.side="bottom",u.top=s,u.height=s,l.height=n):"right"===t?(u.side="left",l.left=s,u.width=s,l.width=n):"bottom"===t&&(u.side="top",l.top=s,u.height=s,l.height=n);var c=this.$global.createChart(r);return l.chartId=c.id,delete i.chartId,i.children="top"===t||"left"===t?[l,u]:[u,l],this.setLayout(this.layout),{box:i,box1:u,box2:l,chart:c}}console.error("No box with box id of chart id of ".concat(e," found in layout config"))}},{key:"setLayout",value:function(e){this.layout=e,this.fireEvent("set-layout",this.layout),this.$global.settings.onSetLayout(this.layout)}},{key:"removeChart",value:function(e){var t=this.layout,n=function t(n,r){if(r.chartId===e)return{parent:n,child:r};if(r.children){var o,i=De(r.children);try{for(i.s();!(o=i.n()).done;){var a=t(r,o.value);if(a)return a}}catch(e){i.e(e)}finally{i.f()}}}(t,t[0]),r=n.parent,o=n.child,i=r.children.indexOf(o),a=r.children[Number(!i)];r.chartId=a.chartId,r.children=a.children,this.setLayout(t)}},{key:"resize",value:function(){var e=this.$global.ui.app.chartsElement.current;this.height=e.clientHeight,this.width=e.clientWidth;for(var t=0,n=Object.values(this.chartDimensions);t<n.length;t++){var r=n[t],o=this.$global.ui.charts[r.id].chartContainer.current;o&&this.updateSize(r.id,o.clientWidth,o.clientHeight)}this.fireEvent("resize",{height:this.height,width:this.width})}},{key:"updateSize",value:function(e,t,n){this.chartDimensions[e].setDimensions(t,n),this.fireEvent("resize-".concat(e),this.chartDimensions[e])}},{key:"addChart",value:function(e,t,n){this.chartDimensions[e]=new Fe(this.$global,e,t,n)}}]),o}(l);function Ge(e){return Ge="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},Ge(e)}function We(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ve(e,t){return Ve=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ve(e,t)}function qe(e,t){if(t&&("object"===Ge(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Qe(e){return Qe=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Qe(e)}var He=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ve(e,t)}(u,e);var t,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Qe(r);if(o){var n=Qe(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return qe(this,e)});function u(e){var t,n=e.$global;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(t=i.call(this)).$global=n,t.visible=!1,t.timestamp=-1,t.price=-1,t.crosshairs={},t}return t=u,n=[{key:"init",value:function(){}},{key:"addCrosshair",value:function(e){this.crosshairs[e]={x:-1,y:-1}}},{key:"updateCrosshair",value:function(e,t,n){if(this.visible)for(var r in this.updateCrosshairTimeAndPrice(e,t,n),this.$global.charts)if((e=this.$global.charts[r]).isInitialized){this.crosshairs[e.id]={x:e.getXCoordByTimestamp(this.timestamp),y:{}};var o=this.$global.layout.chartDimensions[r].main.layers;for(var i in e.ranges.y){var a=o[i],u=a.top,l=a.height,s=e.getYCoordByPrice(this.price,i);s<u||s>u+l||(this.crosshairs[e.id].y[i]=s)}}}},{key:"updateCrosshairTimeAndPrice",value:function(e,t,n){t&&n||(t=this.crosshairs[e.id].x,n=this.crosshairs[e.id].y);var r=e.getTimestampByXCoord(t),o=r%e.timeframe;o<e.timeframe/2?r-=o:r+=e.timeframe-o;var i=e.getLayerByYCoord(n),u=e.getPriceByYCoord(n,i);this.timestamp=r,this.price=a.toFixed(u,e.maxDecimalPlaces)}}],n&&We(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),u}(l),Ye=n(294),Ze=n(935),Ke=n(379),Xe=n.n(Ke),Je=n(795),et=n.n(Je),tt=n(569),nt=n.n(tt),rt=n(565),ot=n.n(rt),it=n(216),at=n.n(it),ut=n(589),lt=n.n(ut),st=n(155),ct={};function ft(e){return ft="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},ft(e)}function dt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ht(e,t){return ht=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ht(e,t)}function pt(e,t){if(t&&("object"===ft(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function yt(e){return yt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},yt(e)}ct.styleTagTransform=lt(),ct.setAttributes=ot(),ct.insert=nt().bind(null,"head"),ct.domAPI=et(),ct.insertStyleElement=at(),Xe()(st.Z,ct),st.Z&&st.Z.locals&&st.Z.locals;const vt={title:"Plot Data",width:100,height:100,component:function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ht(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=yt(r);if(o){var n=yt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return pt(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this,e)).$global=e.$global,t.chart=t.$global.charts[t.$global.selectedChartId],t}return t=a,(n=[{key:"render",value:function(){var e=this,t=this.chart.datasetGroups;return Ye.createElement("div",null,Ye.createElement("h4",{className:"datset-group-list-title"},"Select a data source or create a new one."),Ye.createElement("div",null,Object.keys(t).map((function(n){var r=t[n].datasets[0],o="".concat(r.source,":").concat(r.name);return Ye.createElement("button",{onClick:function(){return e.$global.ui.app.setModal("indicators",{datasetGroupId:n})},key:n,className:"grouped-list-item"},o)})),Ye.createElement("button",{onClick:function(){return e.$global.ui.app.setModal("dataset-group")},className:"grouped-list-item",style:{marginTop:"16px"}},"Create New Group")))}}])&&dt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(Ye.Component)};n.p;var mt=n(42),gt={};function bt(e){return bt="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},bt(e)}function wt(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return kt(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?kt(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function kt(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function xt(e,t,n,r,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void n(e)}u.done?t(l):Promise.resolve(l).then(r,o)}function St(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _t(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?St(Object(n),!0).forEach((function(t){Et(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):St(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Et(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ot(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ct(e,t){return Ct=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ct(e,t)}function jt(e,t){if(t&&("object"===bt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Pt(e){return Pt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Pt(e)}gt.styleTagTransform=lt(),gt.setAttributes=ot(),gt.insert=nt().bind(null,"head"),gt.domAPI=et(),gt.insertStyleElement=at(),Xe()(mt.Z,gt),mt.Z&&mt.Z.locals&&mt.Z.locals;const Rt={title:"Indicators",width:100,height:100,component:function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ct(e,t)}(l,e);var t,n,r,o,i,a,u=(i=l,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Pt(i);if(a){var n=Pt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return jt(this,e)});function l(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=u.call(this,e)).$global=e.$global,t.chart=t.$global.charts[t.$global.selectedChartId],t.group=t.chart.datasetGroups[e.data.datasetGroupId];var n=t.group.datasets[0],r=n.source,o=n.name;return t.dataSource=t.$global.data.getDataSource(r,o),t.state={model:t.dataSource.models[Object.keys(t.dataSource.models)[0]],childModel:null},t}return t=l,n=[{key:"setModel",value:function(e){this.setState({model:e})}},{key:"setChildModel",value:function(e){this.setState({childModel:e})}},{key:"addIndicator",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.state.model;this.state.childModel&&(n=_t(_t({},this.state.childModel),{},{id:n.id,childId:this.state.childModel.id})),this.chart.addIndicator(e,this.group.id,n,{visible:!0,layerId:t?"new":Object.keys(this.chart.ranges.y)[0]})}},{key:"addModelGroup",value:(r=regeneratorRuntime.mark((function e(){var t,n,r,o,i,a,u=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=u.length>0&&void 0!==u[0]&&u[0],n=t?"new":Object.keys(this.chart.ranges.y)[0],r=wt(this.state.model.model),e.prev=3,r.s();case 5:if((o=r.n()).done){e.next=13;break}return i=o.value,e.next=9,this.chart.addIndicator(i.indicators[0],this.group.id,_t(_t({},i),{},{id:this.state.model.id,childId:i.id}),{visible:!0,layerId:n});case 9:a=e.sent,"new"===n&&(n=a.layerId);case 11:e.next=5;break;case 13:e.next=18;break;case 15:e.prev=15,e.t0=e.catch(3),r.e(e.t0);case 18:return e.prev=18,r.f(),e.finish(18);case 21:case"end":return e.stop()}}),e,this,[[3,15,18,21]])})),o=function(){var e=this,t=arguments;return new Promise((function(n,o){var i=r.apply(e,t);function a(e){xt(i,n,o,a,u,"next",e)}function u(e){xt(i,n,o,a,u,"throw",e)}a(void 0)}))},function(){return o.apply(this,arguments)})},{key:"isIndicatorSupported",value:function(e){var t=e.dependencies,n=this.state.model.model,r=function(e){return"value"===t[0]&&"ohlc"===e||e===t[0]};if("string"==typeof n)return r(n);if(Array.isArray(n))return null!==this.state.childModel&&r(this.state.childModel.model);throw new Error("Unreachable code reached. dataModel is not a valid type.")}},{key:"render",value:function(){var e=this,t=Object.values(j.bases).filter(this.isIndicatorSupported.bind(this)),n=Object.values(j.indicators).filter(this.isIndicatorSupported.bind(this));return Ye.createElement("div",{className:"indicators-modal"},Ye.createElement("div",{className:"dataset-models"},Ye.createElement("div",null,Object.values(this.dataSource.models).map((function(t){return Ye.createElement("button",{onClick:function(){return e.setModel(t)},key:t.id,className:"button ".concat(t.id===e.state.model.id?"button-selected":""),style:{padding:"6px",marginRight:"6px"}},t.name)}))),Array.isArray(this.state.model.model)?Ye.createElement("div",{className:"dataset-models-children"},"Child Datasets",Ye.createElement("div",null,Ye.createElement("button",{onClick:function(){return e.setChildModel(null)},className:"button ".concat(null===this.state.childModel?"button-selected":""),style:{padding:"6px",marginRight:"6px"}},"All"),this.state.model.model.map((function(t){var n;return Ye.createElement("button",{onClick:function(){return e.setChildModel(t)},key:t.id,className:"button button-sm ".concat(t.id===(null===(n=e.state.childModel)||void 0===n?void 0:n.id)?"button-selected":""),style:{padding:"6px",marginRight:"6px"}},t.name)})))):null),t.length?Ye.createElement("div",{style:{margin:"12px 0px"}},Ye.createElement("span",null,"Bases"),t.map((function(t){return Ye.createElement("div",{className:"indicator-list-item grouped-list-item",style:{display:"flex"},key:t.id},Ye.createElement("button",{onClick:function(){return e.addIndicator(t.id)},className:"add-indicator-btn-main"},t.name),Ye.createElement("button",{onClick:function(){return e.addIndicator(t.id,!0)}},"Off Chart"))}))):null,n.length?Ye.createElement("div",null,Ye.createElement("span",null,"Indicators"),n.map((function(t){return Ye.createElement("div",{className:"indicator-list-item grouped-list-item",key:t.id,style:{display:"flex"}},Ye.createElement("button",{onClick:function(){return e.addIndicator(t.id)},className:"add-indicator-btn-main"},t.name),Ye.createElement("button",{onClick:function(){return e.addIndicator(t.id,!0)}},"Off Chart"))}))):null,Array.isArray(this.state.model.model)&&null===this.state.childModel?Ye.createElement("div",null,Ye.createElement("div",{className:"indicator-list-item grouped-list-item",style:{display:"flex"}},Ye.createElement("button",{onClick:function(){return e.addModelGroup()},className:"add-indicator-btn-main"},"Add Group"),Ye.createElement("button",{onClick:function(){return e.addModelGroup(!0)}},"Off Chart"))):null)}}],n&&Ot(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(Ye.Component)};function Tt(e){return Tt="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},Tt(e)}function It(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return $t(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?$t(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function $t(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Lt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Mt(e,t){return Mt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Mt(e,t)}function Dt(e,t){if(t&&("object"===Tt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Nt(e)}function Nt(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function At(e){return At=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},At(e)}var zt=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Mt(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=At(r);if(o){var n=At(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Dt(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this,e)).$global=e.$global,t.state={sources:t.$global.data.sources,search:t.props.search||"",searchResults:[],keywords:Bt(t.$global.data.sources)},t.onClickSource=e.onClickSource,t.setAllDataSourcesListener=function(e){t.setState({sources:e,keywords:Bt(e)}),t.updateSearchResults(t.state.search)}.bind(Nt(t)),t.$global.data.addEventListener("set-all-data-sources",t.setAllDataSourcesListener),t}return t=a,n=[{key:"componentDidMount",value:function(){this.updateSearchResults(this.state.search)}},{key:"componentWillUnmount",value:function(){this.$global.data.removeEventListener("set-all-data-sources",this.setAllDataSourcesListener)}},{key:"onSearchInput",value:function(e){var t=e.target.value.toLowerCase();this.setState({search:t}),this.updateSearchResults(t)}},{key:"updateSearchResults",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=[],r=new RegExp(t.replace(/[\W_]+/g,"."),"ig"),o=It(this.state.keywords);try{for(o.s();!(e=o.n()).done;){var i,a=e.value,u=a.match,l=a.matches,s=It(l);try{for(s.s();!(i=s.n()).done;){var c=i.value;if(r.test(c)){n.push(u);break}}}catch(e){s.e(e)}finally{s.f()}}}catch(e){o.e(e)}finally{o.f()}this.setState({searchResults:n})}},{key:"render",value:function(){var e=this;return Ye.createElement("div",null,Ye.createElement("div",{className:"markets-search-box"},Ye.createElement("input",{value:this.state.search,onChange:this.onSearchInput.bind(this),type:"text",placeholder:"Search for a data source here...",style:{textTransform:this.state.search.length?"uppercase":"none"}})),Ye.createElement("div",{className:"datasets"},this.state.searchResults.map((function(t){return Ye.createElement("button",{onClick:function(){return e.onClickSource(t)},className:"dataset grouped-list-item",key:"".concat(t.source,":").concat(t.name)},Ye.createElement("h3",{className:"dataset-name"},t.source,Ye.createElement("span",{style:{opacity:"0.75"}},t.name)),Ye.createElement("i",{style:{opacity:"0.5"}},Object.values(t.models).map((function(e){return e.name})).join(", ")))}))))}}],n&&Lt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(Ye.Component);function Bt(e){var t=[];for(var n in e){var r=e[n];for(var o in r){var i=r[o].models,a=[];for(var u in i){var l=i[u];a.push("".concat(n,":").concat(o,":").concat(l.name).replaceAll(/\W:/g,""))}t.push({matches:a,match:r[o]})}}return t}var Ft=n(407),Ut={};function Gt(e){return Gt="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},Gt(e)}function Wt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Vt(e,t){return Vt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Vt(e,t)}function qt(e,t){if(t&&("object"===Gt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Qt(e){return Qt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Qt(e)}Ut.styleTagTransform=lt(),Ut.setAttributes=ot(),Ut.insert=nt().bind(null,"head"),Ut.domAPI=et(),Ut.insertStyleElement=at(),Xe()(Ft.Z,Ut),Ft.Z&&Ft.Z.locals&&Ft.Z.locals;const Ht={title:"Add Dataset",width:100,height:100,component:function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vt(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Qt(r);if(o){var n=Qt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return qt(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this,e)).$global=e.$global,t}return t=a,(n=[{key:"addDatsetGroup",value:function(e){var t=this.$global.charts[this.$global.selectedChartId].createDatasetGroup([e],{visible:!0}).id;this.$global.ui.app.setModal("indicators",{datasetGroupId:t})}},{key:"render",value:function(){return Ye.createElement(zt,{$global:this.$global,search:this.props.data.search,onClickSource:this.addDatsetGroup.bind(this)})}}])&&Wt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(Ye.Component)};function Yt(e){return Yt="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},Yt(e)}function Zt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Kt(e,t){return Kt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Kt(e,t)}function Xt(e,t){if(t&&("object"===Yt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Jt(e){return Jt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Jt(e)}const en={title:"Change Dataset",width:100,height:100,component:function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Kt(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Jt(r);if(o){var n=Jt(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Xt(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this,e)).datasetGroupId=e.data.datasetGroupId,t.$global=e.$global,t}return t=a,(n=[{key:"changeDataset",value:function(e){this.$global.charts[this.$global.selectedChartId].updateDatasetGroup(this.datasetGroupId,[e]),this.$global.ui.app.setModal("")}},{key:"render",value:function(){return Ye.createElement(zt,{$global:this.$global,search:this.props.data.search,onClickSource:this.changeDataset.bind(this)})}}])&&Zt(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(Ye.Component)};var tn=n(526),nn={};function rn(e){return rn="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},rn(e)}function on(e,t,n,r,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void n(e)}u.done?t(l):Promise.resolve(l).then(r,o)}function an(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){on(i,r,o,a,u,"next",e)}function u(e){on(i,r,o,a,u,"throw",e)}a(void 0)}))}}function un(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ln(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?un(Object(n),!0).forEach((function(t){sn(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):un(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function sn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function cn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function fn(e,t){return fn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},fn(e,t)}function dn(e,t){if(t&&("object"===rn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function hn(e){return hn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},hn(e)}nn.styleTagTransform=lt(),nn.setAttributes=ot(),nn.insert=nt().bind(null,"head"),nn.domAPI=et(),nn.insertStyleElement=at(),Xe()(tn.Z,nn),tn.Z&&tn.Z.locals&&tn.Z.locals;const pn={title:"Templates",width:100,height:100,component:function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fn(e,t)}(l,e);var t,n,r,o,i,a,u=(i=l,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=hn(i);if(a){var n=hn(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return dn(this,e)});function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=u.call(this,e)).$global=e.$global,t.state={templates:t.$global.settings.templates,activeTemplateId:t.$global.settings.settings.activeTemplateId,isLoading:!0,newTemplateName:""},t}return t=l,n=[{key:"loadTemplate",value:function(e){this.$global.api.onSaveViperSettings(ln(ln({},this.$global.api.settings),{},{activeTemplateId:e})),location.reload()}},{key:"addTemplate",value:(o=an(regeneratorRuntime.mark((function e(t){var n;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.preventDefault(),n={id:-1,name:this.state.newTemplateName,config:{layout:[{id:"dxzu2xbsy2",top:0,left:0,width:100,height:100,children:[],chartId:"fupc7matbzp"}],charts:{fupc7matbzp:{name:"",timeframe:36e5,ranges:{x:{},y:{}},pixelsPerElement:10,datasetGroups:{},settings:{syncRange:!1,syncWithCrosshair:""}}}}},e.next=4,this.$global.api.onSaveTemplate(-1,n);case 4:n=e.sent,this.$global.settings.templates.push(n),this.$global.settings.setSettings({activeTemplateId:n.id}),this.setState({tempaltes:this.$global.settings.templates,activeTemplateId:this.$global.settings.settings.activeTemplateId,newTemplateName:""}),this.$global.api.onSaveViperSettings(ln(ln({},this.$global.api.settings),{},{activeTemplateId:n.id})),location.reload();case 10:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"deleteTemplate",value:(r=an(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.$global.settings.onDeleteTemplate(t),this.setState({templates:this.$global.settings.templates});case 2:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"render",value:function(){var e=this;return Ye.createElement("div",{className:"templates-model"},Ye.createElement("div",{className:"templates-list"},this.state.templates.length>0?this.state.templates.map((function(t,n){return Ye.createElement("div",{className:"indicator-list-item grouped-list-item",style:{display:"flex"},key:t.id},Ye.createElement("button",{onClick:function(){return e.loadTemplate(t.id)},className:"add-indicator-btn-main"},t.name,e.state.activeTemplateId===t.id&&Ye.createElement("i",null," (Selected)")),Ye.createElement("button",{disabled:e.state.activeTemplateId===t.id,onClick:function(){return e.deleteTemplate(t.id)},title:"You can't delete a template when it's selected"},"Delete"))})):Ye.createElement("div",{className:"no-saved-templates"},"You haven't saved any templates yet")),Ye.createElement("div",{className:"templates-add"},Ye.createElement("h3",null,"Create New Template From Scratch"),Ye.createElement("form",{onSubmit:this.addTemplate.bind(this)},Ye.createElement("input",{type:"text",value:this.state.newTemplateName,onChange:function(t){return e.setState({newTemplateName:t.target.value})},placeholder:"Enter your template name..."}),Ye.createElement("button",null,"Create"))))}}],n&&cn(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(Ye.Component)};var yn=n(180),vn={};function mn(e){return mn="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},mn(e)}function gn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function bn(e,t){return bn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},bn(e,t)}function wn(e,t){if(t&&("object"===mn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function kn(e){return kn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},kn(e)}vn.styleTagTransform=lt(),vn.setAttributes=ot(),vn.insert=nt().bind(null,"head"),vn.domAPI=et(),vn.insertStyleElement=at(),Xe()(yn.Z,vn),yn.Z&&yn.Z.locals&&yn.Z.locals;var xn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&bn(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=kn(r);if(o){var n=kn(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return wn(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this,e)).$global=e.$global,t.modalRef=Ye.createRef(),t}return t=a,n=[{key:"componentDidMount",value:function(){var e=this;setTimeout((function(){var t=e.modalRef.current.querySelector("input");t&&t.focus()}),1)}},{key:"close",value:function(){this.$global.ui.app.setModal("")}},{key:"render",value:function(){var e=function(e){switch(e){case"indicators":return Rt;case"add-data":return vt;case"dataset-group":return Ht;case"change-dataset":return en;case"templates":return pn}}(this.props.id),t=e.title,n=e.component,r=e.height,o=void 0===r?0:r,i=e.width,a=void 0===i?0:i;return Ye.createElement("div",{className:"modal-container",ref:this.modalRef},Ye.createElement("div",{className:"modal",style:{height:"".concat(o,"%"),width:"".concat(a,"%")}},Ye.createElement("div",{className:"modal-top"},Ye.createElement("h1",null,t),Ye.createElement("button",null,Ye.createElement("i",{onClick:this.close.bind(this),className:"gg-close"}))),Ye.createElement("div",{className:"modal-body"},Ye.createElement(n,{$global:this.$global,data:this.$global.ui.app.state.modalData}))))}}],n&&gn(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(Ye.Component),Sn=n(833),_n={};function En(e){return En="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},En(e)}function On(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Cn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function jn(e,t,n){return t&&Cn(e.prototype,t),n&&Cn(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Pn(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rn(e,t)}function Rn(e,t){return Rn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Rn(e,t)}function Tn(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=$n(e);if(t){var o=$n(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return In(this,n)}}function In(e,t){if(t&&("object"===En(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function $n(e){return $n=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},$n(e)}_n.styleTagTransform=lt(),_n.setAttributes=ot(),_n.insert=nt().bind(null,"head"),_n.domAPI=et(),_n.insertStyleElement=at(),Xe()(Sn.Z,_n),Sn.Z&&Sn.Z.locals&&Sn.Z.locals;var Ln=function(e){Pn(n,e);var t=Tn(n);function n(e){var r;return On(this,n),(r=t.call(this,e)).$global=e.$global,r}return jn(n,[{key:"render",value:function(){var e=this.props,t=e.id,n=e.data,r=Mn[t];return r?Ye.createElement("div",{className:"context-menu"},Ye.createElement(r,{$global:this.$global,data:n})):null}}]),n}(Ye.Component),Mn={main:function(e){Pn(n,e);var t=Tn(n);function n(e){var r;return On(this,n),(r=t.call(this,e)).$global=e.$global,r.chartId=e.data.chartId,r.layerId=e.data.layerId,r.chart=r.$global.charts[r.chartId],r.layer=r.chart.ranges.y[r.layerId],r}return jn(n,[{key:"resetScale",value:function(){this.layer.lockedYScale=!0,this.chart.setVisibleRange({},this.layerId)}},{key:"resetChart",value:function(){for(var e in this.chart.ranges.y)this.chart.ranges.y[e].lockedYScale=!0;this.chart.setInitialVisibleRange()}},{key:"toggleFullScreen",value:function(){this.chart.toggleLayerFullScreen(this.layerId)}},{key:"clearChart",value:function(){for(var e in this.chart.datasetGroups)this.chart.removeDatasetGroup(e)}},{key:"deleteLayer",value:function(){this.chart.removeLayer(this.layerId)}},{key:"deleteChart",value:function(){this.$global.setSelectedChartId(this.chartId),this.$global.deleteSelectedChart()}},{key:"render",value:function(){return Ye.createElement("div",null,Ye.createElement("button",{onClick:this.resetScale.bind(this)},"Reset Scale"),Ye.createElement("button",{onClick:this.resetChart.bind(this)},"Reset Chart View"),Ye.createElement("button",{onClick:this.toggleFullScreen.bind(this)},this.layer.fullscreen?Ye.createElement("i",{className:"gg-check"}):null,"FullScreen"),Ye.createElement("button",{onClick:this.clearChart.bind(this)},"Clear Chart"),Ye.createElement("button",{onClick:this.deleteLayer.bind(this)},"Delete Layer"),Ye.createElement("button",{onClick:this.deleteChart.bind(this),disabled:1===Object.keys(this.$global.charts).length},"Delete Chart"))}}]),n}(Ye.Component),yScale:function(e){Pn(n,e);var t=Tn(n);function n(e){var r;return On(this,n),(r=t.call(this,e)).$global=e.$global,r.chartId=e.data.chartId,r.layerId=e.data.layerId,r.chart=r.$global.charts[r.chartId],r.layer=r.chart.ranges.y[r.layerId],r}return jn(n,[{key:"setChartScaleType",value:function(e){this.chart.setLayerScaleType(this.layerId,e)}},{key:"render",value:function(){var e=this;return Ye.createElement("div",null,Ye.createElement("button",{onClick:function(){return e.setChartScaleType("default")}},"default"===this.layer.scaleType?Ye.createElement("i",{className:"gg-check"}):null,"Default"),Ye.createElement("button",{onClick:function(){return e.setChartScaleType("percent")}},"percent"===this.layer.scaleType?Ye.createElement("i",{className:"gg-check"}):null,"Percent"),Ye.createElement("button",{onClick:function(){return e.setChartScaleType("normalized")}},"normalized"===this.layer.scaleType?Ye.createElement("i",{className:"gg-check"}):null,"Normalized"))}}]),n}(Ye.Component),datasetGroup:function(e){Pn(n,e);var t=Tn(n);function n(e){return On(this,n),t.call(this,e)}return jn(n,[{key:"render",value:function(){var e=this,t=this.props.data.datasetGroupId;return Ye.createElement("div",null,Ye.createElement("button",{onClick:function(){e.props.$global.ui.app.setModal("change-dataset",{datasetGroupId:t})}},"Change Dataset"),Ye.createElement("button",{onClick:function(){e.props.$global.ui.app.setModal("indicators",{datasetGroupId:t})}},"Add Indicator"))}}]),n}(Ye.Component),indicator:function(e){Pn(n,e);var t=Tn(n);function n(e){return On(this,n),t.call(this,e)}return jn(n,[{key:"render",value:function(){var e=this.props;return e.chart,e.indicator,Ye.createElement("div",null,Ye.createElement("button",null,"Change Indicator"))}}]),n}(Ye.Component)},Dn=n(393),Nn={};function An(e){return An="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},An(e)}function zn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Bn(e,t){return Bn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Bn(e,t)}function Fn(e,t){if(t&&("object"===An(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Un(e){return Un=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Un(e)}Nn.styleTagTransform=lt(),Nn.setAttributes=ot(),Nn.insert=nt().bind(null,"head"),Nn.domAPI=et(),Nn.insertStyleElement=at(),Xe()(Dn.Z,Nn),Dn.Z&&Dn.Z.locals&&Dn.Z.locals;var Gn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bn(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Un(r);if(o){var n=Un(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Fn(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this,e)).$global=e.$global,t.chart=t.$global.charts[e.chartId],t.state={isMouseOver:!1},t}return t=a,n=[{key:"toggleVisibility",value:function(){this.chart.toggleIndicatorVisibility(this.props.datasetGroupId,this.props.renderingQueueId)}},{key:"remove",value:function(){this.chart.removeIndicator(this.props.datasetGroupId,this.props.renderingQueueId)}},{key:"render",value:function(){var e=this,t=this.props,n=t.indicator,r=t.pendingRequests,o=n.visible,i=n.model.notFound,a=this.state.isMouseOver;return Ye.createElement("div",{onMouseOver:function(){return e.setState({isMouseOver:!0})},onMouseOut:function(){return e.setState({isMouseOver:!1})},onContextMenu:function(t){return e.$global.ui.app.setContextMenu(t,"indicator",{chart:e.chart,indicator:n})},className:"indicator v-noselect ".concat(o?"":"invisible"," ").concat(i?"invisible not-found":"")},Ye.createElement("span",{className:"indicator-model"},n.model.name),Ye.createElement("span",{className:"indicator-name"},n.name),i&&Ye.createElement("span",{className:"not-found-text",title:"This data model is not available on this dataset"},"N/A"),r>0?Ye.createElement("div",{className:"indicator-loading"},Ye.createElement("svg",{version:"1.1",id:"L4",xmlns:"http://www.w3.org/2000/svg",x:"0px",y:"0px",height:"24px",width:"24px",viewBox:"0 0 100 100",enableBackground:"new 0 0 0 0"},Ye.createElement("circle",{fill:"#fff",stroke:"none",cx:"6",cy:"50",r:"6"},Ye.createElement("animate",{attributeName:"opacity",dur:"1s",values:"0;1;0",repeatCount:"indefinite",begin:"0.1"})),Ye.createElement("circle",{fill:"#fff",stroke:"none",cx:"26",cy:"50",r:"6"},Ye.createElement("animate",{attributeName:"opacity",dur:"1s",values:"0;1;0",repeatCount:"indefinite",begin:"0.2"})),Ye.createElement("circle",{fill:"#fff",stroke:"none",cx:"46",cy:"50",r:"6"},Ye.createElement("animate",{attributeName:"opacity",dur:"1s",values:"0;1;0",repeatCount:"indefinite",begin:"0.3"})))):null,Ye.createElement("div",{className:"indicator-controls",style:{visibility:a?"visible":"hidden"}},Ye.createElement("button",{onClick:this.toggleVisibility.bind(this)},o?Ye.createElement("i",{className:"gg-eye"}):Ye.createElement("i",{className:"gg-eye-alt"})),Ye.createElement("button",{onClick:this.remove.bind(this)},Ye.createElement("i",{className:"gg-close"}))))}}],n&&zn(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(Ye.Component),Wn=n(344),Vn={};function qn(e){return qn="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},qn(e)}function Qn(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Hn(e,t){return Hn=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Hn(e,t)}function Yn(e,t){if(t&&("object"===qn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Zn(e){return Zn=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Zn(e)}Vn.styleTagTransform=lt(),Vn.setAttributes=ot(),Vn.insert=nt().bind(null,"head"),Vn.domAPI=et(),Vn.insertStyleElement=at(),Xe()(Wn.Z,Vn),Wn.Z&&Wn.Z.locals&&Wn.Z.locals;var Kn=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Hn(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Zn(r);if(o){var n=Zn(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Yn(this,e)});function a(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this,e)).$global=e.$global;var n=t.props.datasetGroup.datasets;return t.chart=t.$global.charts[e.chartId],t.datasetId="".concat(n[0].source,":").concat(n[0].name,":").concat(t.chart.timeframe),t.dataset=t.$global.data.datasets[t.datasetId],t.state={isMouseOver:!1,pendingRequests:t.dataset.pendingRequests},t.pendingRequestsListener=t.dataset.addEventListener("pending-requests",(function(e){return t.setState({pendingRequests:e})})),t.timeframeChangeListener=t.chart.addEventListener("set-timeframe",(function(e){var n=t.dataset.getTimeframeAgnosticId();t.dataset.removeEventListener("pending-requests",t.pendingRequestsListener),t.datasetId="".concat(n,":").concat(e),t.dataset=t.$global.data.datasets[t.datasetId],t.dataset.removeEventListener("pending-requests",t.pendingRequestsListener),t.pendingRequestsListener=t.dataset.addEventListener("pending-requests",(function(e){return t.setState({pendingRequests:e})}))})),t.updateDatasetGroupListener=t.chart.addEventListener("update-dataset-group",(function(e){var n=e.datasets[0],r=n.source,o=n.name;t.datasetId="".concat(r,":").concat(o,":").concat(t.dataset.timeframe),t.dataset=t.$global.data.datasets[t.datasetId],t.dataset.removeEventListener("pending-requests",t.pendingRequestsListener),t.pendingRequestsListener=t.dataset.addEventListener("pending-requests",(function(e){return t.setState({pendingRequests:e})}))})),t}return t=a,n=[{key:"componentWillUnmount",value:function(){this.dataset.removeEventListener("pending-requests",this.pendingRequestsListener),this.chart.removeEventListener("set-timeframe",this.timeframeChangeListener),this.chart.removeEventListener("update-dataset-group",this.updateDatasetGroupListener)}},{key:"toggleVisibility",value:function(){this.chart.toggleDatasetGroupVisibility(this.props.datasetGroup.id)}},{key:"remove",value:function(){this.chart.removeDatasetGroup(this.props.datasetGroup.id)}},{key:"render",value:function(){var e=this,t=this.props,n=t.datasetGroup,r=t.chartId,o=t.isSelected,i=n.visible,a=n.datasets[0],u=Object.keys(n.indicators),l=this.state.isMouseOver;return Ye.createElement("div",{onMouseOver:function(){return e.setState({isMouseOver:!0})},onMouseOut:function(){return e.setState({isMouseOver:!1})},onContextMenu:function(t){return e.$global.ui.app.setContextMenu(t,"datasetGroup",{datasetGroupId:n.id})},className:"dataset-group v-noselect ".concat(o?"dataset-group-selected":""," ").concat(i?"":"invisible")},Ye.createElement("div",{className:"dataset-group-info"},Ye.createElement("div",{className:"dataset-group-title"},"".concat(a.source,":").concat(a.name)),Ye.createElement("div",{className:"dataset-group-controls",style:{visibility:l?"visible":"hidden"}},Ye.createElement("button",{onClick:this.toggleVisibility.bind(this)},i?Ye.createElement("i",{className:"gg-eye"}):Ye.createElement("i",{className:"gg-eye-alt"})),Ye.createElement("button",{onClick:this.remove.bind(this)},Ye.createElement("i",{className:"gg-close"})))),u.map((function(t){var o=n.indicators[t];return Ye.createElement(Gn,{$global:e.$global,chartId:r,datasetGroupId:n.id,indicator:o,pendingRequests:e.state.pendingRequests[o.model.id],renderingQueueId:t,key:t})})))}}],n&&Qn(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(Ye.Component),Xn=n(981),Jn={};function er(e){return er="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},er(e)}function tr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function nr(e,t){return nr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},nr(e,t)}function rr(e,t){if(t&&("object"===er(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return or(e)}function or(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ir(e){return ir=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ir(e)}Jn.styleTagTransform=lt(),Jn.setAttributes=ot(),Jn.insert=nt().bind(null,"head"),Jn.domAPI=et(),Jn.insertStyleElement=at(),Xe()(Xn.Z,Jn),Xn.Z&&Xn.Z.locals&&Xn.Z.locals;var ar=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nr(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ir(r);if(o){var n=ir(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return rr(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this,e)).$global=e.$global,t.chart=t.$global.charts[t.props.chartId],t.state={settings:t.chart.settings,isSyncTimeButton:Object.keys(t.$global.charts).length>1},t.updateSettingsListener=function(){return t.forceUpdate()}.bind(or(t)),t.chart.addEventListener("update-settings",t.updateSettingsListener),t.chartsChangeListener=function(){return t.setState({isSyncTimeButton:Object.keys(t.$global.charts).length>1})},t.$global.addEventListener("charts-change",t.chartsChangeListener),t}return t=a,(n=[{key:"updateChartSetting",value:function(e,t){this.chart.updateSettings(function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}({},e,t))}},{key:"componentWillUnmount",value:function(){this.chart.removeEventListener("update-settings",this.updateSettingsListener),this.$global.removeEventListener("charts-change",this.chartsChangeListener)}},{key:"render",value:function(){var e=this,t=this.state.isSyncTimeButton;return Ye.createElement("div",{className:"chart-settings"},t?Ye.createElement("label",null,Ye.createElement("input",{checked:this.state.settings.syncRange,onChange:function(){return e.updateChartSetting("syncRange",!e.state.settings.syncRange)},type:"checkbox"}),"Sync Time"):null)}}])&&tr(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(Ye.Component);function ur(e){return ur="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},ur(e)}function lr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function sr(e,t){return sr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},sr(e,t)}function cr(e,t){if(t&&("object"===ur(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function fr(e){return fr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},fr(e)}var dr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&sr(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=fr(r);if(o){var n=fr(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return cr(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this,e)).state={name:e.name,isNameEditMode:!1},t}return t=a,(n=[{key:"render",value:function(){var e=m.getTimeframeText(this.props.timeframe);return Ye.createElement("div",{className:"chart-info"},Ye.createElement("div",null,this.state.name," • ",e))}}])&&lr(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(Ye.Component),hr=n(783),pr={};function yr(e){return yr="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},yr(e)}function vr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function mr(e,t){return mr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},mr(e,t)}function gr(e,t){if(t&&("object"===yr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return br(e)}function br(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wr(e){return wr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},wr(e)}pr.styleTagTransform=lt(),pr.setAttributes=ot(),pr.insert=nt().bind(null,"head"),pr.domAPI=et(),pr.insertStyleElement=at(),Xe()(hr.Z,pr),hr.Z&&hr.Z.locals&&hr.Z.locals;var kr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&mr(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=wr(r);if(o){var n=wr(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return gr(this,e)});function a(e){var t;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this,e)).$global=e.$global,t.$global.ui.charts[t.props.id]=br(t),t.chart=t.$global.charts[t.props.id];var n="Untitled Chart ".concat(Object.keys(t.$global.charts).indexOf(t.chart.id)+1);return t.state={id:t.props.id,name:t.chart.name||n,timeframe:t.chart.timeframe,datasetGroups:t.chart.datasetGroups,selectedDatasetGroup:t.chart.selectedDatasetGroup,isFocused:t.$global.selectedChartId===t.props.id},t.subcharts={main:new Ye.createRef,xScale:new Ye.createRef,yScale:new Ye.createRef},t.chartContainer=new Ye.createRef,t.setSelectedChartListener=function(e){t.state.id===e?t.setState({isFocused:!0}):t.state.isFocused&&t.setState({isFocused:!1})}.bind(br(t)),t.$global.addEventListener("set-selected-chart-id",t.setSelectedChartListener),t.setChartTimeframeListener=function(e){return t.setState({timeframe:e})}.bind(br(t)),t.chart.addEventListener("set-timeframe",t.setChartTimeframeListener),t.setSelectedDatasetGroupListener=function(e){return t.setState({selectedDatasetGroup:e})}.bind(br(t)),t.chart.addEventListener("set-selected-dataset-group",t.setSelectedDatasetGroupListener),t.setChartNameListener=function(e){return t.setState({name:e})}.bind(br(t)),t.chart.addEventListener("set-name",t.setChartNameListener),t}return t=a,n=[{key:"componentDidMount",value:function(){var e=this.chartContainer.current,t=e.clientWidth,n=e.clientHeight;this.$global.layout.addChart(this.state.id,t,n),this.chart=this.$global.charts[this.state.id],this.chart.isInitialized?this.chart.onNewCanvas():this.chart.init()}},{key:"componentDidUpdate",value:function(){var e=this.chartContainer.current,t=e.clientWidth,n=e.clientHeight,r=this.$global.layout.chartDimensions[this.state.id],o=r.width,i=r.height;o===t&&i===n||this.$global.layout.updateSize(this.state.id,t,n)}},{key:"componentWillUnmount",value:function(){this.$global.removeEventListener("set-selected-chart-id",this.setSelectedChartListener),this.chart.removeEventListener("set-name",this.setChartNameListener),this.chart.removeEventListener("set-timeframe",this.setChartTimeframeListener),this.chart.removeEventListener("set-selected-dataset-group",this.setSelectedDatasetGroupListener)}},{key:"updateDatasetGroups",value:function(e){this.setState({datasetGroups:e})}},{key:"onFocusChart",value:function(){this.state.isFocused||this.$global.setSelectedChartId(this.state.id)}},{key:"onDoubleClick",value:function(e,t){var n=e.clientY;if("main"===t){var r=this.chart.getLayerByYCoord(n);this.chart.toggleLayerFullScreen(r)}else if("yScale"===t){var o=this.chart.getLayerByYCoord(n),i=this.chart.ranges.y[o];!1===i.lockedYScale&&(i.lockedYScale=!0,this.chart.setVisibleRange(this.chart.ranges.x))}else"xScale"===t&&this.chart.setInitialVisibleRange()}},{key:"onMainChartContextMenu",value:function(e){this.$global.ui.app.setContextMenu(e,"main",{chartId:this.state.id,layerId:this.chart.getLayerByYCoord(e.clientY)})}},{key:"onYScaleContextMenu",value:function(e){this.$global.ui.app.setContextMenu(e,"yScale",{chartId:this.state.id,layerId:this.chart.getLayerByYCoord(e.clientY)})}},{key:"render",value:function(){var e=this;return Ye.createElement("div",{onMouseDown:this.onFocusChart.bind(this),ref:this.chartContainer,className:"chart v-noselect"},this.renderFocusedChart(),Ye.createElement("div",{className:"overlay-padding"},Ye.createElement("div",{className:"overlay"},Ye.createElement("div",{className:"top-left"},Ye.createElement(dr,{name:this.state.name,timeframe:this.state.timeframe}),Ye.createElement("div",{className:"indicator-list"},this.renderDatasetGroups())),Ye.createElement("div",{className:"top-right"},Ye.createElement(ar,{$global:this.$global,chartId:this.state.id})))),Ye.createElement("div",{className:"chart-chart"},Ye.createElement("canvas",{onDoubleClick:function(t){return e.onDoubleClick(t,"main")},className:"chart-main",onContextMenuCapture:this.onMainChartContextMenu.bind(this),ref:this.subcharts.main}),Ye.createElement("canvas",{onDoubleClick:function(t){return e.onDoubleClick(t,"xScale")},className:"chart-x-axis",ref:this.subcharts.xScale}),Ye.createElement("canvas",{onDoubleClick:function(t){return e.onDoubleClick(t,"yScale")},className:"chart-y-axis",ref:this.subcharts.yScale,onContextMenuCapture:this.onYScaleContextMenu.bind(this)})))}},{key:"renderFocusedChart",value:function(){var e=Object.keys(this.$global.charts).length>1;return this.state.isFocused&&e?Ye.createElement("div",{className:"chart__focused"}):null}},{key:"renderDatasetGroups",value:function(){var e=this,t=Object.keys(this.state.datasetGroups);if(t.length)return t.map((function(t){return Ye.createElement(Kn,{$global:e.$global,chartId:e.state.id,datasetGroup:e.state.datasetGroups[t],isSelected:e.state.selectedDatasetGroup===t,key:t})}))}}],n&&vr(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(Ye.Component),xr=n(322),Sr={};function _r(e){return _r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_r(e)}function Er(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Or(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Cr(e,t){return Cr=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Cr(e,t)}function jr(e,t){if(t&&("object"===_r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Pr(e)}function Pr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Rr(e){return Rr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Rr(e)}Sr.styleTagTransform=lt(),Sr.setAttributes=ot(),Sr.insert=nt().bind(null,"head"),Sr.domAPI=et(),Sr.insertStyleElement=at(),Xe()(xr.Z,Sr),xr.Z&&xr.Z.locals&&xr.Z.locals;var Tr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cr(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Rr(r);if(o){var n=Rr(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return jr(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this,e)).$global=e.$global,t.state={selectedChart:null,timeframe:0,timeframes:[m.MINUTE,m.MINUTE5,m.MINUTE15,m.HOUR,m.HOUR4,m.DAY],timeframeLabels:{},isIndicatorsButton:!1,globalSettings:t.$global.settings.settings.global,isGridEditMode:t.$global.ui.isGridEditMode},t.onSetSelectedChartId=function(e){t.setSelectedChart(t.$global.charts[e])}.bind(Pr(t)),t.$global.addEventListener("set-selected-chart-id",t.onSetSelectedChartId),t.onSetIsGridEditMode=function(e){t.setState({isGridEditMode:e})}.bind(Pr(t)),t.$global.ui.addEventListener("set-is-grid-edit-mode",t.onSetIsGridEditMode),t.setAllDataSourcesListener=function(e){t.setState({isIndicatorsButton:e&&Object.keys(e).length})}.bind(Pr(t)),t.$global.data.addEventListener("set-all-data-sources",t.setAllDataSourcesListener),t.setTimeframeListener=null,t}return t=a,n=[{key:"componentDidMount",value:function(){this.buildTimeframeLabels()}},{key:"componentWillUnmount",value:function(){this.$global.removeEventListener("set-selected-chart-id",this.onSetSelectedChartId),this.$global.ui.removeEventListener("set-is-grid-edit-mode",this.onSetIsGridEditMode),this.$global.data.removeEventListener("set-all-data-sources",this.setAllDataSourcesListener)}},{key:"setSelectedChart",value:function(e){this.state.selectedChart&&this.onSetTimeframe&&this.state.selectedChart.removeEventListener("set-timeframe",this.setTimeframeListener),this.setTimeframeListener=this.onSetTimeframe.bind(this),e.addEventListener("set-timeframe",this.setTimeframeListener),this.onSetTimeframe(e.timeframe),this.setState({selectedChart:e})}},{key:"onSetTimeframe",value:function(e){this.setState({timeframe:e})}},{key:"buildTimeframeLabels",value:function(){var e,t={},n=m.TIMEFRAMES,r=Object.keys(n),o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Er(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Er(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}(this.state.timeframes);try{for(o.s();!(e=o.n()).done;)for(var i=e.value,a=0;a<r.length;a++){var u=r[a],l=n[u],s=n[r[a+1]];if(i>=l&&i<s){var c=i/l;if(Math.round(c)!==c)return void console.error("Decimal based timeframes now allowed");var f="".concat(c).concat(u);t[f]={label:f,value:i}}}}catch(e){o.e(e)}finally{o.f()}this.setState({timeframeLabels:t})}},{key:"showAddDataModal",value:function(){this.$global.ui.app.setModal("add-data")}},{key:"setTimeframe",value:function(e){this.state.selectedChart.setTimeframe(e)}},{key:"setIsGridEditMode",value:function(){this.$global.ui.setIsGridEditMode(!this.state.isGridEditMode)}},{key:"render",value:function(){var e=this,t=this.state,n=t.isIndicatorsButton,r=t.isGridEditMode;return Ye.createElement("div",{className:"top-bar"},Ye.createElement("button",{className:"top-bar-item"},"🐍"),n?Ye.createElement("button",{onClick:this.showAddDataModal.bind(this),className:"top-bar-item"},Ye.createElement("i",{className:"gg-add"}),"Plot Data"):null,this.renderTimeframes(),Ye.createElement("button",{onClick:function(){return e.$global.ui.app.setModal("templates")},className:"top-bar-item"},Ye.createElement("i",{className:"gg-layout-grid"}),"Templates"),Ye.createElement("div",{className:"top-bar-seperator"}),this.state.globalSettings.gridEdit?Ye.createElement("button",{onClick:this.setIsGridEditMode.bind(this),className:"top-bar-item"},Ye.createElement("i",{className:"gg-display-grid"}),r?"Grid Edit":"Grid Locked"):null)}},{key:"renderTimeframes",value:function(){var e=this;return Object.keys(this.state.timeframeLabels).map((function(t){var n=e.state.timeframeLabels[t],r=n.value===e.state.timeframe;return Ye.createElement("button",{key:t,onClick:function(){return e.setTimeframe(n.value)},className:"top-bar-item ".concat(r?"timeframe__active":"")},t)}))}}],n&&Or(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(Ye.Component),Ir=n(522),$r={};function Lr(e){return Lr="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},Lr(e)}function Mr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Dr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mr(Object(n),!0).forEach((function(t){Nr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Nr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ar(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||zr(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zr(e,t){if(e){if("string"==typeof e)return Br(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Br(e,t):void 0}}function Br(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Fr(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ur(e,t){return Ur=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ur(e,t)}function Gr(e,t){if(t&&("object"===Lr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Wr(e)}function Wr(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Vr(e){return Vr=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Vr(e)}$r.styleTagTransform=lt(),$r.setAttributes=ot(),$r.insert=nt().bind(null,"head"),$r.domAPI=et(),$r.insertStyleElement=at(),Xe()(Ir.Z,$r),Ir.Z&&Ir.Z.locals&&Ir.Z.locals;var qr=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ur(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Vr(r);if(o){var n=Vr(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Gr(this,e)});function a(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this,e)).$global=e.$global,t.state={boxes:[],layout:[],showAddChartHooks:!1,breakpointResizingBox:void 0},t.grid=Ye.createRef(),t.boxRefs={},t.setLayoutListener=t.onSetLayout.bind(Wr(t)),t.$global.layout.addEventListener("set-layout",t.setLayoutListener),t.onSetIsGridEditMode=function(){return t.forceUpdate()}.bind(Wr(t)),t.$global.ui.addEventListener("set-is-grid-edit-mode",t.onSetIsGridEditMode),t.mouseUpListener=function(){return t.breakpointResizingBox=void 0}.bind(Wr(t)),t.$global.events.addEventListener("mouseup",t.mouseUpListener),t}return t=a,n=[{key:"componentWillUnmount",value:function(){this.$global.layout.removeEventListener("set-layout",this.setLayoutListener),this.$global.events.removeEventListener("mouseup",this.mouseUpListener),this.$global.ui.removeEventListener("set-is-grid-edit-mode",this.onSetIsGridEditMode)}},{key:"onSetLayout",value:function(e){var t=this;this.setState({boxes:function e(n){var r,o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=zr(e))){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}(n);try{for(o.s();!(r=o.n()).done;){var i=r.value;t.boxRefs[i.id]=Ye.createRef(),i.children.length&&e(i.children)}}catch(e){o.e(e)}finally{o.f()}return n}(e)})}},{key:"addBoxToSide",value:function(e,t){var n=this.$global.charts[this.$global.selectedChartId],r=this.$global.layout.addChartBoxToSide(e,t,50,{timeframe:n.timeframe,range:n.range,pixelsPerElement:n.pixelsPerElement}).box2;this.boxRefs[r.id]=Ye.createRef()}},{key:"onClickBreakpoint",value:function(e){this.breakpointResizingBox=e}},{key:"onMouseMove",value:function(e){var t=e.movementX,n=e.movementY;if(this.breakpointResizingBox){var r=Ar(this.breakpointResizingBox.children,2),o=r[0],i=r[1];if("left"===o.side){var a=this.boxRefs[o.id].current.clientWidth,u=this.boxRefs[i.id].current.clientWidth,l=a+u;(t<0||t>0)&&(a+=t,u-=t);var s=a/l*100;this.breakpointResizingBox.children=[Dr(Dr({},o),{},{width:s}),Dr(Dr({},i),{},{left:s,width:u/l*100})]}else{var c=this.boxRefs[o.id].current.clientHeight,f=this.boxRefs[i.id].current.clientHeight,d=c+f;(n<0||n>0)&&(c+=n,f-=n);var h=c/d*100;this.breakpointResizingBox.children=[Dr(Dr({},o),{},{height:h}),Dr(Dr({},i),{},{top:h,height:f/d*100})]}this.forceUpdate()}}},{key:"render",value:function(){return Object.keys(this.props.charts).length?Ye.createElement("div",{ref:this.grid,onMouseMove:this.onMouseMove.bind(this),className:"grid"},this.state.boxes.map(this.renderBox.bind(this))):Ye.createElement("div",null)}},{key:"renderBox",value:function(e,t){var n=this;return Ye.createElement("div",{className:"grid-box",ref:this.boxRefs[e.id],key:e.id,style:{top:"".concat(e.top,"%"),left:"".concat(e.left,"%"),width:"".concat(e.width,"%"),height:"".concat(e.height,"%")}},this.$global.ui.isGridEditMode&&!e.children.length?Ye.createElement("div",{className:"grid-box-controls"},Ye.createElement("div",{onClick:function(){return n.addBoxToSide(e.id,"left")},className:"grid-box-controls-left"}),Ye.createElement("div",{onClick:function(){return n.addBoxToSide(e.id,"top")},className:"grid-box-controls-top"}),Ye.createElement("div",{onClick:function(){return n.addBoxToSide(e.id,"right")},className:"grid-box-controls-right"}),Ye.createElement("div",{onClick:function(){return n.addBoxToSide(e.id,"bottom")},className:"grid-box-controls-bottom"})):null,Ye.createElement("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"}},Ye.createElement("div",{className:"grid"},e.chartId?Ye.createElement("div",{style:{width:"100%",height:"100%"}},Ye.createElement(kr,{$global:this.$global,id:e.chartId})):null,e.children.length?this.renderBreakpoint(e):null,e.children.map(this.renderBox.bind(this)))))}},{key:"renderBreakpoint",value:function(e){var t=this,n=Ar(e.children,1)[0],r={top:0,left:0,width:0,height:0,cursor:""};return"left"===n.side?(r.left=n.width,r.height=n.height,r.cursor="ew-resize"):"top"===n.side&&(r.top=n.height,r.width=n.width,r.cursor="ns-resize"),Ye.createElement("div",{className:"grid-breakpoint",onMouseDown:function(){return t.onClickBreakpoint(e)},style:{top:"calc(".concat(r.top,"% - 2px)"),left:"calc(".concat(r.left,"% - 2px)"),width:r.width>0?"".concat(r.width,"%"):"4px",height:r.height>0?"".concat(r.height,"%"):"4px",cursor:r.cursor}})}}],n&&Fr(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(Ye.Component),Qr=n(936),Hr={};function Yr(e){return Yr="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},Yr(e)}function Zr(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Kr(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Zr(Object(n),!0).forEach((function(t){Xr(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Zr(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Xr(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Jr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function eo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function to(e,t,n){return t&&eo(e.prototype,t),n&&eo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function no(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ro(e,t)}function ro(e,t){return ro=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ro(e,t)}function oo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=uo(e);if(t){var o=uo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return io(this,n)}}function io(e,t){if(t&&("object"===Yr(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ao(e)}function ao(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function uo(e){return uo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},uo(e)}Hr.styleTagTransform=lt(),Hr.setAttributes=ot(),Hr.insert=nt().bind(null,"head"),Hr.domAPI=et(),Hr.insertStyleElement=at(),Xe()(Qr.Z,Hr),Qr.Z&&Qr.Z.locals&&Qr.Z.locals;var lo=function(e){no(n,e);var t=oo(n);function n(e){var r;return Jr(this,n),(r=t.call(this,e)).$global=e.$global,r.state={charts:{},modal:"",modalData:{},contextmenu:{id:"",pos:[0,0],data:{}}},r.appElement=Ye.createRef(),r.chartsElement=Ye.createRef(),r.contextMenusElement=Ye.createRef(),r.$global.ui.app=ao(r),e.onReady(),r}return to(n,[{key:"addChart",value:function(e){this.setState({charts:Kr(Kr({},this.state.charts),{},Xr({},e.id,e))})}},{key:"setModal",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.setState({modal:e,modalData:t})}},{key:"setContextMenu",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};e.stopPropagation(),e.preventDefault();var o=[0,0];this.setState({contextmenu:{id:t,pos:o,data:r}},(function(){var i=n.contextMenusElement.current.clientWidth,a=n.contextMenusElement.current.clientHeight,u=n.appElement.current.clientWidth,l=n.appElement.current.clientHeight;o[0]=Math.min(e.clientX,u-i),o[1]=Math.min(e.clientY,l-a),n.setState({contextmenu:{id:t,pos:o,data:r}})}))}},{key:"closeContextMenu",value:function(){this.setState({contextmenu:{id:"",pos:[],data:{}}})}},{key:"render",value:function(){var e=this.state,t=e.modal,n=e.contextmenu;return Ye.createElement("div",{ref:this.appElement,className:"viper",style:{position:"relative",display:"flex",flexDirection:"column",width:"100%",height:"100%"}},Ye.createElement("link",{href:"https://cdn.jsdelivr.net/npm/css.gg/icons/all.css",rel:"stylesheet"}),t.length?Ye.createElement(xn,{$global:this.$global,id:t}):null,Ye.createElement("div",{style:{position:"absolute",top:n.pos[1],left:n.pos[0],zIndex:1e3,visibility:this.state.contextmenu.id.length?"visible":"none"},ref:this.contextMenusElement},Ye.createElement(Ln,{$global:this.$global,id:n.id,pos:n.pos,data:n.data})),Ye.createElement(Tr,{$global:this.$global}),Ye.createElement("div",{ref:this.chartsElement,style:{width:"100%",height:"100%"}},Ye.createElement(qr,{$global:this.$global,charts:this.state.charts})))}},{key:"renderCharts",value:function(){var e=Object.keys(this.state.charts);return e.length?e.map((function(e){return Ye.createElement("div",{key:e,"data-grid":{x:0,y:0,w:12,h:2}},Ye.createElement(kr,{id:e,style:{width:"100%",height:"100%"}}))})):Ye.createElement("div",null)}}]),n}(Ye.Component),so=function(e){no(n,e);var t=oo(n);function n(e){var r,o=e.$global;return Jr(this,n),(r=t.call(this)).$global=o,r.app=void 0,r.charts={},r.isGridEditMode=!1,r}return to(n,[{key:"init",value:function(){var e=this;return new Promise((function(t){Ze.render(Ye.createElement(lo,{$global:e.$global,onReady:t}),e.$global.api.element)}))}},{key:"destroy",value:function(){Ze.unmountComponentAtNode(this.$global.api.element)}},{key:"setIsGridEditMode",value:function(e){this.isGridEditMode=e,this.fireEvent("set-is-grid-edit-mode",e)}}]),n}(l);function co(e){return co="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},co(e)}function fo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,u=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(e){u=!0,o=e}finally{try{a||null==n.return||n.return()}finally{if(u)throw o}}return i}}(e,t)||po(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ho(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=po(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function po(e,t){if(e){if("string"==typeof e)return yo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yo(e,t):void 0}}function yo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function vo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function go(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function bo(e,t,n){return t&&go(e.prototype,t),n&&go(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function wo(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ko(e,t)}function ko(e,t){return ko=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ko(e,t)}function xo(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Eo(e);if(t){var o=Eo(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return So(this,n)}}function So(e,t){if(t&&("object"===co(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return _o(e)}function _o(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Eo(e){return Eo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Eo(e)}var Oo=function(e){wo(n,e);var t=xo(n);function n(e,r,o,i,a){var u;return mo(this,n),(u=t.call(this)).$global=e,u.source=r,u.name=o,u.timeframe=i,u.data=a,u.pendingRequests={},u.subscribers={},u.minTime=1/0,u.maxTime=-1/0,u.dependencies=new Set,u}return bo(n,[{key:"getId",value:function(){return"".concat(this.source,":").concat(this.name,":").concat(this.timeframe)}},{key:"getTimeframeAgnosticId",value:function(){return"".concat(this.source,":").concat(this.name)}},{key:"updateDataset",value:function(e,t){var n=new Set;for(var r in e){var o=r;"string"==typeof o&&(o=new Date(o).getTime()),n.add(o),o<this.minTime&&(this.minTime=o),o>this.maxTime&&(this.maxTime=o),this.data[o]?this.data[o][t]=e[r]:this.data[o]=vo({},t,e[r])}for(var i in n=Array.from(n.keys()).sort((function(e,t){return e-t})),this.subscribers){var a=this.$global.charts[i];for(var u in this.subscribers[i])a.computedState.calculateOneSet({renderingQueueId:u,timestamps:n,dataset:{source:this.source,name:this.name,timeframe:this.timeframe,data:this.data,minTime:this.minTime,maxTime:this.maxTime,orders:this.orders}})}}},{key:"addSubscriber",value:function(e,t,n){var r=this,o=this.subscribers[e];o||(o={}),o[t]=n,n.forEach((function(e){r.dependencies.add(e),r.pendingRequests[e]=0})),this.fireEvent("pending-requests",this.pendingRequests),this.subscribers[e]=o}},{key:"removeSubscriber",value:function(e,t){var n=this.subscribers[e];if(n){delete n[t],0===Object.keys(n).length&&delete this.subscribers[e],Object.keys(this.subscribers).length||delete this.$global.data.datasets[this.getId()];var r=Array.from(this.dependencies.keys());for(var o in this.dependencies.clear(),this.subscribers){var i=this.subscribers[o];for(var a in i){var u,l=ho(i[a]);try{for(l.s();!(u=l.n()).done;){var s=u.value;this.dependencies.add(s)}}catch(e){l.e(e)}finally{l.f()}}}for(var c=0,f=r;c<f.length;c++){var d=f[c];if(!this.dependencies.has(d)){for(var h in delete this.pendingRequests[d],this.data)delete this.data[h][d];var p=this.source,y=this.name,v=this.timeframe;this.$global.api.onRemoveDatasetModel({source:p,name:y,timeframe:v,dataModel:d})}}return this.fireEvent("pending-requests",this.pendingRequests),this.subscribers[e]||{}}}}]),n}(l),Co=function(e){wo(n,e);var t=xo(n);function n(e){var r,o=e.$global;return mo(this,n),(r=t.call(this)).$global=o,r.datasets={},r.sources={},r.allRequestedPoints={},r.requestInterval=setInterval(r.fireRequest.bind(_o(r)),250),r}return bo(n,[{key:"init",value:function(){}},{key:"setAllDataSources",value:function(e){this.sources=e,this.fireEvent("set-all-data-sources",this.sources)}},{key:"getDataSource",value:function(e,t){return this.sources[e][t]}},{key:"addOrGetDataset",value:function(e){var t,n=e.source,r=e.name,o=e.timeframe,i=e.data,a=void 0===i?{}:i,u="".concat(n,":").concat(r,":").concat(o);return this.datasets[u]?t=this.datasets[u]:(t=new Oo(this.$global,n,r,o,a),this.datasets[u]=t),this.fireEvent("add-dataset",t),t}},{key:"requestDataPoints",value:function(e){var t,n=e.dataset,r=e.start,o=e.end,i=n.timeframe,u=n.getId(),l=Date.now(),s=[1/0,-1/0,new Set],c=Array.from(n.dependencies.keys()),f=this.sources[n.source][n.name].maxItemsPerRequest,d=i*(void 0===f?300:f),h=r-r%d,p=o-o%d+d,y=ho(a.getAllTimestampsIn(h,p,i));try{for(y.s();!(t=y.n()).done;){var v=t.value;if(v>l-l%i+i)break;var m=[];if(void 0===n.data[v])m=c;else{var g,b=ho(c);try{for(b.s();!(g=b.n()).done;){var w=g.value;void 0===n.data[v][w]&&m.push(w)}}catch(e){b.e(e)}finally{b.f()}}m.length&&(m.forEach((function(e){return s[2].add(e)})),v<s[0]&&(s[0]=v),v>s[1]&&(s[1]=v))}}catch(e){y.e(e)}finally{y.f()}s[0]!==1/0&&s[1]!==-1/0&&(s[2]=Array.from(s[2].keys()),s[0]=Math.floor(s[0]/d)*d,s[1]=Math.ceil(s[1]/d)*d,this.allRequestedPoints[u]=s)}},{key:"fireRequest",value:function(){var e=this,t=JSON.parse(JSON.stringify(this.allRequestedPoints));this.allRequestedPoints={};var n=Object.keys(t);if(n.length){for(var r=0,o=n;r<o.length;r++){var i,u=o[r],l=fo(t[u],3),s=l[0],c=l[1],f=l[2],d=this.datasets[u],h=d.timeframe,p=ho(a.getAllTimestampsIn(s,c,h));try{for(p.s();!(i=p.n()).done;){var y=i.value;d.data[y]||(d.data[y]={});var v,m=ho(f);try{for(m.s();!(v=m.n()).done;){var g=v.value;d.data[y][g]=null}}catch(e){m.e(e)}finally{m.f()}}}catch(e){p.e(e)}finally{p.f()}}for(var b=[],w=function(){for(var n=x[k],r=fo(t[n],3),o=r[0],i=r[1],a=r[2],u=e.datasets[n],l=u.source,s=u.name,c=u.timeframe,f=e.sources[l][s].maxItemsPerRequest,d=void 0===f?300:f,h=o===i?1:(i-o)/(c*d);h>0;h--){var p=h<=1?o:i-c*d;a.forEach((function(e){return u.pendingRequests[e]++})),p!==i&&(b.push({id:n,source:l,name:s,dataModels:a,timeframe:c,start:p,end:i}),i-=c*d)}e.$global.orders.requestOrdersIfNeeded("".concat(l,":").concat(s)),u.fireEvent("pending-requests",u.pendingRequests)},k=0,x=n;k<x.length;k++)w();b=b.sort((function(e,t){return t.end-e.end})),this.$global.api.onRequestHistoricalData({requests:b})}}}]),n}(l);function jo(e){return jo="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},jo(e)}function Po(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ro(e,t){return Ro=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ro(e,t)}function To(e,t){if(t&&("object"===jo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Io(e){return Io=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Io(e)}var $o=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ro(e,t)}(u,e);var t,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Io(r);if(o){var n=Io(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return To(this,e)});function u(e){var t,n=e.$global;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(t=i.call(this)).$global=n,t.keys={},t.mousedown=!1,t.keyBinds={},t}return t=u,n=[{key:"init",value:function(){this.mouseDownListener=this.onMouseDown.bind(this),window.addEventListener("mousedown",this.mouseDownListener),this.mouseUpListener=this.onMouseUp.bind(this),window.addEventListener("mouseup",this.mouseUpListener),this.mouseMoveListener=this.onMouseMove.bind(this),window.addEventListener("mousemove",this.mouseMoveListener),this.keyDownListener=this.onKeyDown.bind(this),window.addEventListener("keydown",this.keyDownListener),this.keyUpListener=this.onKeyUp.bind(this),window.addEventListener("keyup",this.keyUpListener),this.visibilitychangeListener=this.onVisibilityChange.bind(this),window.addEventListener("visibilitychange",this.visibilitychangeListener),this.contextMenuListener=this.onContextMenu.bind(this),this.$global.api.element.addEventListener("contextmenu",this.contextMenuListener)}},{key:"destroy",value:function(){window.removeEventListener("mousedown",this.mouseDownListener),window.removeEventListener("mouseup",this.mouseUpListener),window.removeEventListener("mousemove",this.mouseMoveListener),window.removeEventListener("keydown",this.keyDownListener),window.removeEventListener("keyup",this.keyUpListener),window.removeEventListener("visibilitychange",this.visibilitychangeListener),this.$global.api.element.removeEventListener("contextmenu",this.contextMenuListener)}},{key:"onMouseDown",value:function(e){this.fireEvent("mousedown",e);var t=this.$global.ui.app;1===e.which&&""!==t.state.contextmenu.id&&setTimeout(t.closeContextMenu.bind(t),100)}},{key:"onMouseUp",value:function(e){this.fireEvent("mouseup",e)}},{key:"onMouseMove",value:function(e){this.fireEvent("mousemove",e)}},{key:"addKeyBind",value:function(e,t){var n=a.uniqueId();return this.keyBinds[n]={keys:e,callback:t},n}},{key:"onKeyDown",value:function(e){var t=e.key,n=e.which,r=e.target;if(this.keys[t]=!0,!this.keys.Control&&!this.keys.Alt){if("INPUT"!==r.nodeName&&n>=65&&n<=90&&/[a-z]/.test(t)){var o=this.$global.charts[this.$global.selectedChartId];o.selectedDatasetGroup?this.$global.ui.app.setModal("change-dataset",{datasetGroupId:o.selectedDatasetGroup,search:t}):this.$global.ui.app.setModal("dataset-group",{search:t})}if("/"===t){var i=this.$global.charts[this.$global.selectedChartId];i.selectedDatasetGroup&&this.$global.ui.app.setModal("indicators",{datasetGroupId:i.selectedDatasetGroup})}}if("Escape"===t&&this.$global.ui.app.setModal(""),"INPUT"!==r.nodeName&&this.keys.Shift&&n>=49&&n<=57){var a=n-49,u=this.$global.charts[this.$global.selectedChartId],l=Object.keys(u.datasetGroups)[a];void 0!==l?u.setSelectedDatasetGroup(l):this.$global.ui.app.setModal("dataset-group",{search:""})}}},{key:"onKeyUp",value:function(e){var t=e.code,n=e.key;this.keys[n]=!1,"Delete"===t&&this.$global.deleteSelectedChart(),this.fireEvent("keyup",e)}},{key:"onVisibilityChange",value:function(){for(var e in this.keys)this.keys[e]=!1}},{key:"onContextMenu",value:function(e){e.preventDefault()}}],n&&Po(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),u}(l);function Lo(e){return Lo="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},Lo(e)}function Mo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Do(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Mo(Object(n),!0).forEach((function(t){No(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Mo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function No(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ao(e,t,n,r,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void n(e)}u.done?t(l):Promise.resolve(l).then(r,o)}function zo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Bo(e,t){return Bo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Bo(e,t)}function Fo(e,t){if(t&&("object"===Lo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Uo(e){return Uo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Uo(e)}var Go=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bo(e,t)}(l,e);var t,n,r,o,i,a,u=(i=l,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Uo(i);if(a){var n=Uo(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Fo(this,e)});function l(e){var t,n=e.$global;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(t=u.call(this)).$global=n,t.layout=[],t.charts={},t.templates=[],t.settings={global:{maxCharts:1/0,gridEdit:!0},activeTemplateId:1},t.needsToUpdate=!1,t.checkIfNeedsToUpdateInterval=setInterval((function(){if(t.needsToUpdate){var e=t.templates.find((function(e){return e.id===t.settings.activeTemplateId}));e.config={layout:t.layout,charts:t.charts},t.$global.api.onSaveTemplate(t.settings.activeTemplateId,e),t.$global.api.onSaveViperSettings(t.settings),t.needsToUpdate=!1}}),1e3),t}return t=l,n=[{key:"init",value:function(){}},{key:"destroy",value:function(){clearInterval(this.checkIfNeedsToUpdateInterval)}},{key:"setSettings",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("object"===e.global)for(var t in e.global)this.settings.global[t]=e.global[t];"number"==typeof e.activeTemplateId&&(this.settings.activeTemplateId=e.activeTemplateId),this.needsToUpdate=!0,this.loadTemplates()}},{key:"loadTemplates",value:(r=regeneratorRuntime.mark((function e(){var t,n,r,o,i,a,u,l=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.$global.api.onRequestTemplates();case 2:if((t=e.sent)&&Array.isArray(t)){e.next=5;break}return e.abrupt("return");case 5:for(u in this.templates=t,(n=t.find((function(e){return e.id===l.settings.activeTemplateId})))||(n={id:this.settings.activeTemplateId,name:"My first template",config:{layout:[{id:"dxzu2xbsy2",top:0,left:0,width:100,height:100,children:[],chartId:"fupc7matbzp"}],charts:{fupc7matbzp:{name:"",timeframe:36e5,ranges:{x:{},y:{}},pixelsPerElement:10,datasetGroups:{},settings:{syncRange:!1,syncWithCrosshair:""}}}}},this.templates.push(n)),r=n.config,o=r.layout,i=r.charts,a=function(e){var t=i[e];l.$global.createChart(Do({id:e},t));var n=l.$global.charts[e];"object"===Lo(t.datasetGroups)&&n.addEventListener("init",(function(){n.setVisibleRange(t.range);for(var e=0,r=Object.values(t.datasetGroups);e<r.length;e++)for(var o=r[e],i=o.datasets,a=o.visible,u=o.synced,l=o.indicators,s=n.createDatasetGroup(i,{visible:a,synced:u},{updateUI:!1}),c=0,f=Object.values(l);c<f.length;c++){var d=f[c];n.addIndicator(j.getIndicatorById(d.id),s.id,d.model,{visible:d.visible,layerId:d.layerId},{updateUI:!1})}}))},i)a(u);this.$global.layout.setInitialLayout(o);case 12:case"end":return e.stop()}}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(n,o){var i=r.apply(e,t);function a(e){Ao(i,n,o,a,u,"next",e)}function u(e){Ao(i,n,o,a,u,"throw",e)}a(void 0)}))},function(){return o.apply(this,arguments)})},{key:"onChartAdd",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t=Do({name:"",timeframe:0,ranges:{x:{},y:{}},pixelsPerElement:0,datasetGroups:{},settings:{}},t),this.charts[e]=t,this.needsToUpdate=!0}},{key:"onChartChangeName",value:function(e,t){var n=this.charts[e];n?(n.name=t,this.needsToUpdate=!0):console.error("Chart id ".concat(e," not found in Viper settings state"))}},{key:"onChartChangeRangeOrTimeframe",value:function(e,t){var n=t.ranges,r=t.timeframe,o=t.pixelsPerElement,i=this.charts[e];if(i){if(n){for(var a in n.y)n.y[a].indicators={};i.ranges=n}r&&(i.timeframe=r),o&&(i.pixelsPerElement=o),this.needsToUpdate=!0}else console.error("Chart id ".concat(e," not found in Viper settings state"))}},{key:"onChartDatasetGroupsChange",value:function(e,t){var n=this.charts[e];if(n){for(var r in t=JSON.parse(JSON.stringify(t))){var o=t[r];for(var i in o.indicators)delete o.indicators[i].draw}n.datasetGroups=t,this.needsToUpdate=!0}else console.error("Chart id ".concat(e," not found in Viper settings state"))}},{key:"onChartChangeSettings",value:function(e,t){var n=this.charts[e];n?(n.settings=t,this.needsToUpdate=!0):console.error("Chart id ".concat(e," not found in Viper settings state"))}},{key:"onChartDelete",value:function(e){delete this.charts[e],this.needsToUpdate=!0}},{key:"onSetLayout",value:function(e){this.layout=e,this.needsToUpdate=!0}},{key:"onDeleteTemplate",value:function(e){var t=this.templates.findIndex((function(t){return t.id===e}));this.templates.splice(t,1),this.$global.api.onDeleteTemplate(e)}}],n&&zo(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(l);function Wo(e){return Wo="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},Wo(e)}function Vo(e,t){return Vo=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Vo(e,t)}function qo(e,t){if(t&&("object"===Wo(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Qo(e){return Qo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Qo(e)}function Ho(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Yo(e,t,n,r,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void n(e)}u.done?t(l):Promise.resolve(l).then(r,o)}function Zo(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){Yo(i,r,o,a,u,"next",e)}function u(e){Yo(i,r,o,a,u,"throw",e)}a(void 0)}))}}function Ko(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Jo(e,t,n){return t&&Xo(e.prototype,t),n&&Xo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var ei=function(e){return JSON.parse(JSON.stringify(e))},ti=function(){function e(t){var n=t.$global,r=t.chart,o=t.worker;Ko(this,e),this.$global=n,this.chart=r,this.worker=o,this.isRequestingToGenerateAllInstructions=!1,this.isGeneratingAllInstrutions=!1}var t,n,r,o,i;return Jo(e,[{key:"addPixelInstructionsOffset",value:function(e){var t=e.newRange,n=e.oldRange,r=this.$global.layout.chartDimensions[this.chart.id].main,o=r.width,i=r.height;this.worker.postMessage(ei({type:"runComputedStateMethod",data:{chartId:this.chart.id,method:"addPixelInstructionsOffset",params:{newRange:t,oldRange:n,width:o,height:i}}}))}},{key:"addToQueue",value:(i=Zo(regeneratorRuntime.mark((function e(t){var n,r,o,i=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.indicator,e.next=3,new Promise((function(e){var t=i.$global.workers.addToResolveQueue(e);i.worker.postMessage(ei({type:"runComputedStateMethod",data:{method:"addToQueue",resolveId:t,chartId:i.chart.id,params:{indicator:n}}}))}));case 3:return r=e.sent,o=r.renderingQueueId,this.chart.subcharts.main.canvas.RE.addToRenderingOrder(o),e.abrupt("return",{renderingQueueId:o});case 8:case"end":return e.stop()}}),e,this)}))),function(e){return i.apply(this,arguments)})},{key:"setVisibility",value:(o=Zo(regeneratorRuntime.mark((function e(t){var n,r,o=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.renderingQueueId,r=t.visible,e.next=3,new Promise((function(e){var t=o.$global.workers.addToResolveQueue(e);o.worker.postMessage(ei({type:"runComputedStateMethod",data:{method:"setVisibility",resolveId:t,chartId:o.chart.id,params:{renderingQueueId:n,visible:r}}}))}));case 3:return e.next=5,this.generateAllInstructions();case 5:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"calculateOneSet",value:(r=Zo(regeneratorRuntime.mark((function e(t){var n,r,o,i=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.renderingQueueId,r=t.timestamps,o=t.dataset,e.next=3,new Promise((function(e){var t=i.$global.workers.addToResolveQueue(e);i.worker.postMessage(ei({type:"runComputedStateMethod",data:{method:"calculateOneSet",resolveId:t,chartId:i.chart.id,params:{renderingQueueId:n,timestamps:r,dataset:o}}}))}));case 3:return e.next=5,this.generateAllInstructions();case 5:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"generateInstructions",value:(n=Zo(regeneratorRuntime.mark((function e(t){var n,r,o,i,a,u=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.renderingQueueId,r=t.timestamps,e.next=3,new Promise((function(e){var t=u.$global.workers.addToResolveQueue(e),o=u.$global.layout.chartDimensions[u.chart.id];u.worker.postMessage(ei({type:"runComputedStateMethod",data:{method:"generateInstructions",resolveId:t,chartId:u.chart.id,params:{renderingQueueId:n,timestamps:r,visibleRange:u.chart.range,timeframe:u.chart.timeframe,chartDimensions:{main:o.main,yScale:o.yScale,xScale:o.xScale},pixelsPerElement:u.chart.pixelsPerElement}}}))}));case 3:o=e.sent,i=o.instructions,(a=this.chart.subcharts.main.canvas.RE).instructions[n]||(a.instructions[n]={}),Object.assign(a.instructions[n],i.main);case 8:case"end":return e.stop()}}),e,this)}))),function(e){return n.apply(this,arguments)})},{key:"generateAllInstructions",value:(t=Zo(regeneratorRuntime.mark((function e(){var t,n,r,o,i,a=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!this.isGeneratingAllInstrutions){e.next=3;break}return this.isRequestingToGenerateAllInstructions=!0,e.abrupt("return",{throwback:!0});case 3:return this.isGeneratingAllInstrutions=!0,e.next=6,new Promise((function(e){var t=a.$global.workers.addToResolveQueue(e),n=a.$global.layout.chartDimensions[a.chart.id];a.worker.postMessage(ei({type:"runComputedStateMethod",data:{method:"generateAllInstructions",resolveId:t,chartId:a.chart.id,params:{requestedRanges:a.chart.ranges,timeframe:a.chart.timeframe,chartDimensions:{main:n.main,yScale:n.yScale,xScale:n.xScale},pixelsPerElement:a.chart.pixelsPerElement}}}))}));case 6:t=e.sent,n=t.instructions,r=t.visibleRanges,o=t.pixelsPerElement,i=t.maxDecimalPlaces,this.chart.onGenerateAllInstructions({instructions:n,visibleRanges:r,pixelsPerElement:o,maxDecimalPlaces:i}),this.isGeneratingAllInstrutions=!1,this.isRequestingToGenerateAllInstructions&&(this.isRequestingToGenerateAllInstructions=!1,setTimeout((function(){return a.generateAllInstructions()})));case 14:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"updateIndicators",value:function(e){this.worker.postMessage(ei({type:"runComputedStateMethod",data:{method:"updateIndicators",chartId:this.chart.id,params:{updates:e}}}))}},{key:"emptySet",value:function(e){var t=e.renderingQueueId;this.worker.postMessage(ei({type:"runComputedStateMethod",data:{method:"emptySet",chartId:this.chart.id,params:{renderingQueueId:t}}}))}},{key:"emptyAllSets",value:function(){this.worker.postMessage(ei({type:"runComputedStateMethod",data:{method:"emptyAllSets",chartId:this.chart.id,params:{}}}))}},{key:"removeFromQueue",value:function(e){var t=e.renderingQueueIds;this.worker.postMessage(ei({type:"runComputedStateMethod",data:{method:"removeFromQueue",chartId:this.chart.id,params:{renderingQueueIds:t}}}));var n,r=this.chart.subcharts.main.canvas,o=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return Ho(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ho(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){u=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}(t);try{for(o.s();!(n=o.n()).done;){var i=n.value;r.RE.removeFromRenderingOrder(i)}}catch(e){o.e(e)}finally{o.f()}}}]),e}(),ni=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vo(e,t)}(o,e);var t,n,r=(t=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,r=Qo(t);if(n){var o=Qo(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return qo(this,e)});function o(e){var t,n=e.$global;return Ko(this,o),(t=r.call(this)).$global=n,t.workersSupported=!1,t.workers={},t.resolveQueue={},t.lastUsedWorkerIndex=-1,t}return Jo(o,[{key:"init",value:function(){if(window.Worker){this.workersSupported=!0;for(var e=0;e<window.navigator.hardwareConcurrency;e++)this.createWorker()}}},{key:"createWorker",value:function(){var e,t=this.$global.api.workerScriptURL,n=new Blob(['importScripts("'.concat(t,'")')],{type:"text/javascript"}),r=URL.createObjectURL(n);(e=new Worker(r)).onmessage=this.onWorkerMessage.bind(this),e.onerror=this.onWorkerError.bind(this);var o=a.uniqueId();e.postMessage(ei({type:"id",data:o})),this.workers[o]=e}},{key:"createComputedState",value:function(e){var t=Object.keys(this.workers);this.lastUsedWorkerIndex++,this.lastUsedWorkerIndex===t.length&&(this.lastUsedWorkerIndex=0);var n=this.workers[t[this.lastUsedWorkerIndex]];return n.postMessage(ei({type:"addComputedState",data:{chartId:e.id}})),new ti({$global:this.$global,chart:e,worker:n})}},{key:"addToResolveQueue",value:function(e){var t=a.uniqueId();return this.resolveQueue[t]=e,t}},{key:"onWorkerMessage",value:function(e){var t=e.data,n=t.type,r=t.data,o=t.resolveId,i=t.res;switch(n){case"updateInstructions":this.$global.charts[r.chartId].instructions=r.instructions;break;case"resolve":this.resolveQueue[o](i),delete this.resolveQueue[o]}}},{key:"onWorkerError",value:function(e){console.error(e)}}]),o}(l);function ri(e){return ri="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},ri(e)}function oi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ii(e,t){return ii=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},ii(e,t)}function ai(e,t){if(t&&("object"===ri(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function ui(e){return ui=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},ui(e)}var li=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ii(e,t)}(a,e);var t,n,r,o,i=(r=a,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ui(r);if(o){var n=ui(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return ai(this,e)});function a(e){var t,n=e.$global;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),(t=i.call(this)).$global=n,t.datasets={},t}return t=a,(n=[{key:"requestOrdersIfNeeded",value:function(e){void 0===this.datasets[e]&&(this.datasets[e]=null,this.$global.api.onRequestOrders(e))}},{key:"addOrUpdateOrder",value:function(e,t){var n=t.orderId,r=t.side,o=t.price,i=t.quantity,a=this.datasets[e];a||(a={},this.datasets[e]=a),a[n]={orderId:n,side:r,price:+o,quantity:+i},0===i&&delete a[n]}}])&&oi(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),a}(l);function si(e){return si="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},si(e)}function ci(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function fi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ci(Object(n),!0).forEach((function(t){di(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ci(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function di(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function hi(e,t,n,r,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void n(e)}u.done?t(l):Promise.resolve(l).then(r,o)}function pi(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function yi(e,t){return yi=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},yi(e,t)}function vi(e,t){if(t&&("object"===si(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return mi(e)}function mi(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function gi(e){return gi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},gi(e)}var bi=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&yi(e,t)}(l,e);var t,n,r,o,i,a,u=(i=l,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=gi(i);if(a){var n=gi(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return vi(this,e)});function l(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(e=u.call(this)).selectedChartId=null,e.api=null,e.charts={},e.settings=new Go({$global:mi(e)}),e.crosshair=new He({$global:mi(e)}),e.ui=new so({$global:mi(e)}),e.layout=new Ue({$global:mi(e)}),e.data=new Co({$global:mi(e)}),e.events=new $o({$global:mi(e)}),e.workers=new ni({$global:mi(e)}),e.orders=new li({$global:mi(e)}),e}return t=l,n=[{key:"init",value:(r=regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.settings.init(),this.crosshair.init(),e.next=4,this.ui.init();case 4:this.layout.init(),this.data.init(),this.events.init(),this.workers.init();case 8:case"end":return e.stop()}}),e,this)})),o=function(){var e=this,t=arguments;return new Promise((function(n,o){var i=r.apply(e,t);function a(e){hi(i,n,o,a,u,"next",e)}function u(e){hi(i,n,o,a,u,"throw",e)}a(void 0)}))},function(){return o.apply(this,arguments)})},{key:"createChart",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new Te(fi(fi({},e),{},{$global:this}));return this.charts[t.id]=t,this.ui.app.addChart(t),this.setSelectedChartId(t.id),this.fireEvent("charts-change",this.charts),this.charts[t.id]}},{key:"resetSelectedChart",value:function(){this.charts[this.selectedChartId].setInitialVisibleRange()}},{key:"deleteSelectedChart",value:function(){if(1!==Object.keys(this.charts).length){var e=this.selectedChartId;this.charts[e].destroy(),this.setSelectedChartId(Object.keys(this.charts)[0]),this.fireEvent("charts-change",this.charts)}}},{key:"setSelectedChartId",value:function(e){this.selectedChartId=e,this.fireEvent("set-selected-chart-id",e)}}],n&&pi(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),l}(l);function wi(e){return wi="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},wi(e)}function ki(e,t,n,r,o,i,a){try{var u=e[i](a),l=u.value}catch(e){return void n(e)}u.done?t(l):Promise.resolve(l).then(r,o)}function xi(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){ki(i,r,o,a,u,"next",e)}function u(e){ki(i,r,o,a,u,"throw",e)}a(void 0)}))}}function Si(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function _i(e,t){return _i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},_i(e,t)}function Ei(e,t){if(t&&("object"===wi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Oi(e){return Oi=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Oi(e)}var Ci=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_i(e,t)}(u,e);var t,n,r,o,i,a=(o=u,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Oi(o);if(i){var n=Oi(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return Ei(this,e)});function u(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(t=a.call(this)).init(e),t}return t=u,n=[{key:"init",value:(r=xi(regeneratorRuntime.mark((function e(t){var n,r,o,i,a,u,l,s,c,f,d,h,p,y,v,g,b,w,k,x;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.element,r=t.sources,o=t.settings,i=void 0===o?{}:o,a=t.onRequestHistoricalData,u=void 0===a?xi(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))):a,l=t.onRequestOrders,s=void 0===l?xi(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))):l,c=t.onRemoveDatasetModel,f=void 0===c?function(){}:c,d=t.onSaveViperSettings,h=void 0===d?function(){}:d,p=t.onRequestTemplates,y=void 0===p?function(){}:p,v=t.onSaveTemplate,g=void 0===v?function(){}:v,b=t.onDeleteTemplate,w=void 0===b?function(){}:b,k=t.workerScriptURL,x=void 0===k?"https://cdn.jsdelivr.net/gh/ViperCharts/viper-charts-js@master/.worker-releases/viper.bundle.".concat("1.0.22",".worker.js"):k,n){e.next=4;break}return console.error("No 'element' provided in Viper constructor"),e.abrupt("return");case 4:return this.element=n,this.$global=new bi,this.$global.api=this,this.onRequestHistoricalData=u,this.onRequestOrders=s,this.onRemoveDatasetModel=f,this.onSaveViperSettings=h,this.onRequestTemplates=y,this.onSaveTemplate=g,this.onDeleteTemplate=w,this.workerScriptURL=x,e.next=17,this.$global.init();case 17:this.setAllDataSources(r),this.$global.settings.setSettings(i),this.Constants=m,this.PlotTypes=j;case 21:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"getSelectedChart",value:function(){return this.$global.charts[this.$global.selectedChartId]}},{key:"getChartByName",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";for(var t in this.$global.charts){var n=this.$global.charts[t];if(n.name===e)return n}}},{key:"addDataset",value:function(e){var t=e.source,n=e.name,r=e.timeframe,o=e.data;t&&t.length?n&&n.length?r&&"number"==typeof r?o&&"object"===wi(o)?this.$global.data.addOrGetDataset({source:t,name:n,timeframe:r,data:o}):console.error("No dataset data provided"):console.error("No timeframe provided or not numeric value"):console.error("No dataset name provided"):console.error("No dataset source provided")}},{key:"setAllDataSources",value:function(e){this.$global.data.setAllDataSources(e)}},{key:"addData",value:function(e){var t=e.source,n=e.name,r=e.timeframe,o=e.dataModel,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},u=a.noResolve,l=void 0!==u&&u,s=a.updateVisibleRange,c=void 0!==s&&s,f="".concat(t,":").concat(n,":").concat(r),d=this.$global.data.datasets[f];if(d&&(d.updateDataset.bind(d)(i,o),l||(d.pendingRequests[o]--,d.fireEvent("pending-requests",d.pendingRequests)),c))for(var h in d.subscribers);}},{key:"addOrUpdateOrder",value:function(e,t){this.$global.orders.addOrUpdateOrder(e,t)}},{key:"destroy",value:function(){this.$global.events.destroy(),this.$global.layout.destroy(),this.$global.ui.destroy(),this.$global.settings.destroy()}}],n&&Si(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),u}(l)},981:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(81),o=n.n(r),i=n(645),a=n.n(i)()(o());a.push([e.id,'.chart-settings {\n pointer-events: all;\n}\n\n.chart-settings label {\n display: flex;\n align-items: center;\n border-radius: 4px;\n border: 1px solid transparent;\n cursor: pointer;\n padding: 2px 4px;\n pointer-events: all;\n font-size: 12px;\n color: rgb(172, 172, 172);\n padding: 4px 6px;\n}\n\n.chart-settings label:hover {\n border: 1px solid rgb(172, 172, 172, 0.5);\n}\n\n.chart-settings label input[type="checkbox"] {\n margin-right: 4px;\n}\n',""]);const u=a},783:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(81),o=n.n(r),i=n(645),a=n.n(i)()(o());a.push([e.id,".chart {\n position: relative;\n width: 100%;\n height: 100%;\n background: black;\n z-index: 10;\n}\n\n.chart__focused {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: 2px solid rgba(37, 180, 56, 0.76);\n z-index: 11;\n pointer-events: none;\n}\n\n.overlay-padding {\n position: absolute;\n top: 0;\n left: 0;\n padding: 24px;\n width: 100%;\n height: 100%;\n}\n\n.overlay {\n position: relative;\n width: 100%;\n height: 100%;\n z-index: 11;\n pointer-events: none;\n}\n\n.top-left {\n position: absolute;\n top: 0;\n left: 0;\n pointer-events: all;\n overflow-y: hidden;\n max-height: 50%;\n scrollbar-width: 0.25rem;\n scrollbar-color: #ffffff66 transparent;\n}\n\n.top-left:hover {\n overflow-y: scroll;\n}\n\n/* Chrome, Edge, and Safari */\n.top-left::-webkit-scrollbar {\n width: 0.25rem;\n}\n\n.top-left::-webkit-scrollbar-track {\n background: transparent;\n}\n\n.top-left::-webkit-scrollbar-thumb {\n background-color: #ffffff66;\n border-radius: 10px;\n border: 3px solid transparent;\n}\n\n.top-right {\n position: absolute;\n top: 0;\n right: 0;\n}\n\n.chart-info {\n display: flex;\n align-items: center;\n font-size: 16px;\n font-weight: bold;\n color: #cccccc;\n margin-bottom: 8px;\n margin: 4px;\n}\n\n.indicator-list {\n display: flex;\n flex-direction: column;\n align-items: start;\n}\n\n.chart-chart {\n position: relative;\n width: 100%;\n height: 100%;\n}\n\n.chart-main {\n position: absolute;\n top: 0;\n left: 0;\n width: calc(100% - 50px);\n height: calc(100% - 20px);\n}\n\n.chart-x-axis {\n position: absolute;\n bottom: 0;\n left: 0;\n width: calc(100% - 50px);\n height: 20px;\n}\n\n.chart-y-axis {\n position: absolute;\n top: 0;\n right: 0;\n width: 50px;\n height: calc(100% - 20px);\n}\n",""]);const u=a},344:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(81),o=n.n(r),i=n(645),a=n.n(i)()(o());a.push([e.id,".dataset-group {\n border-radius: 4px;\n border: 1px solid transparent;\n cursor: pointer;\n margin: 2px 4px;\n padding-left: 8px;\n pointer-events: all;\n font-size: 12px;\n background: #08001966;\n}\n\n.dataset-group-info {\n display: flex;\n align-items: center;\n}\n\n.dataset-group-controls {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.dataset-group:hover {\n border: 1px solid rgb(172, 172, 172, 0.5);\n}\n\n.dataset-group-selected {\n border-left: 1px solid rgba(37, 180, 56, 1);\n}\n\n.dataset-group-title {\n color: rgb(172, 172, 172);\n font-weight: bold;\n font-size: 10px;\n}\n\n.dataset-group-controls button {\n background: transparent;\n border: 0;\n padding: 0;\n margin: 0;\n margin-left: 6px;\n color: rgb(172, 172, 172);\n cursor: pointer;\n}\n\n.dataset-group-controls > button > i {\n transform: scale(-0.65);\n}\n",""]);const u=a},393:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(81),o=n.n(r),i=n(645),a=n.n(i)()(o());a.push([e.id,".indicator {\n display: flex;\n align-items: center;\n border-radius: 4px;\n border: 1px solid transparent;\n cursor: pointer;\n pointer-events: all;\n font-size: 12px;\n}\n\n.indicator:hover {\n border: 1px solid rgb(172, 172, 172, 0.5);\n}\n\n.invisible {\n opacity: 0.5;\n}\n\n.not-found {\n text-decoration: line-through;\n}\n\n.not-found-text {\n color: #fff;\n font-size: 8px;\n margin-left: 4px;\n}\n\n.indicator-model {\n color: rgb(172, 172, 172);\n margin: 0px 4px;\n font-size: 10px;\n}\n\n.indicator-name {\n color: rgb(126, 126, 126);\n font-size: 10px;\n}\n\n.indicator-loading {\n color: rgb(126, 126, 126);\n font-size: 8px;\n padding: 0px 4px;\n}\n\n.indicator-controls {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n.indicator-controls button {\n background: transparent;\n border: 0;\n padding: 0;\n margin: 0;\n color: rgb(172, 172, 172);\n cursor: pointer;\n}\n\n.indicator-controls > button > i {\n transform: scale(-0.55);\n}\n",""]);const u=a},833:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(81),o=n.n(r),i=n(645),a=n.n(i)()(o());a.push([e.id,".context-menu {\n background: #2e2e2e;\n color: rgb(216, 215, 215);\n\n border-radius: 4px;\n}\n\n.context-menu button {\n display: flex;\n align-items: center;\n border: 0;\n background: transparent;\n font-weight: bold;\n color: rgb(216, 215, 215);\n width: 100%;\n margin: 0;\n cursor: pointer;\n padding: 0.5rem;\n}\n\n.context-menu button:hover {\n background: rgb(71, 71, 71);\n}\n",""]);const u=a},522:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(81),o=n.n(r),i=n(645),a=n.n(i)()(o());a.push([e.id,".grid {\n position: relative;\n width: 100%;\n height: 100%;\n background: black;\n}\n\n.grid-box {\n position: absolute;\n background: lightgray;\n padding: 2px;\n}\n\n.grid-breakpoint {\n position: absolute;\n z-index: 15;\n}\n\n.grid-box-controls {\n position: relative;\n width: 100%;\n height: 100%;\n}\n\n.grid-box-controls > div {\n position: absolute;\n cursor: pointer;\n transition-duration: 50ms;\n z-index: 99;\n}\n\n.grid-box-controls > div:hover {\n background: rgba(37, 180, 56);\n}\n\n.grid-box-controls-left {\n position: absolute;\n left: 0;\n height: 100%;\n width: 24px;\n}\n\n.grid-box-controls-top {\n position: absolute;\n top: 0;\n height: 24px;\n width: 100%;\n}\n\n.grid-box-controls-right {\n position: absolute;\n right: 0;\n height: 100%;\n width: 24px;\n}\n\n.grid-box-controls-bottom {\n position: absolute;\n bottom: 0;\n height: 24px;\n width: 100%;\n}\n",""]);const u=a},936:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(81),o=n.n(r),i=n(645),a=n.n(i)()(o());a.push([e.id,".viper * {\n box-sizing: border-box;\n}\n\n.viper {\n width: 100vw;\n height: 100vh;\n font-family: sans-serif;\n}\n\n.viper .button {\n background: rgb(75, 75, 75);\n border: 0;\n color: rgb(160, 160, 160);\n cursor: pointer;\n margin-bottom: 4px;\n border-radius: 4px;\n font-weight: bold;\n text-align: left;\n}\n\n.viper .button-sm {\n font-size: 0.75rem;\n}\n\n.viper .button-selected {\n background: rgb(160, 160, 160);\n color: rgb(75, 75, 75);\n}\n\n.viper button:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n}\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\np {\n color: rgb(160, 160, 160);\n}\n\n.v-noselect {\n -webkit-touch-callout: none; /* iOS Safari */\n -webkit-user-select: none; /* Safari */\n -khtml-user-select: none; /* Konqueror HTML */\n -moz-user-select: none; /* Old versions of Firefox */\n -ms-user-select: none; /* Internet Explorer/Edge */\n user-select: none; /* Non-prefixed version, currently\n supported by Chrome, Edge, Opera and Firefox */\n}\n\n.react-resizable-handle {\n z-index: 1000;\n}\n\n.grouped-list-item {\n background: rgb(75, 75, 75);\n border: 0;\n color: rgb(160, 160, 160);\n cursor: pointer;\n padding: 12px;\n margin-bottom: 4px;\n border-radius: 4px;\n font-weight: bold;\n display: block;\n width: 100%;\n text-align: left;\n}\n\n.grouped-list-item:hover {\n background: rgb(78, 78, 78);\n}\n",""]);const u=a},180:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(81),o=n.n(r),i=n(645),a=n.n(i)()(o());a.push([e.id,".modal-container {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n pointer-events: none;\n z-index: 100;\n}\n\n.modal {\n display: flex;\n flex-direction: column;\n max-height: 70%;\n max-width: 70%;\n overflow-y: auto;\n min-height: 200px;\n min-width: 300px;\n border-radius: 2px;\n background: rgb(94, 94, 94);\n pointer-events: all;\n}\n\n.modal-top {\n display: flex;\n align-items: center;\n color: rgb(173, 173, 173);\n height: 40px;\n padding: 32px 16px;\n}\n\n.modal-top h1 {\n flex-grow: 1;\n font-size: 24px;\n line-height: 0;\n}\n\n.modal-top button {\n color: rgb(173, 173, 173);\n background: transparent;\n border: 0;\n cursor: pointer;\n}\n\n.modal-body {\n flex-grow: 1;\n padding: 1rem;\n padding-top: 0;\n}\n",""]);const u=a},155:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(81),o=n.n(r),i=n(645),a=n.n(i)()(o());a.push([e.id,".datset-group-list-title {\n margin: 0;\n margin-bottom: 16px;\n}\n",""]);const u=a},407:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(81),o=n.n(r),i=n(645),a=n.n(i)()(o());a.push([e.id,".markets-search-box input {\n width: 100%;\n padding: 8px 12px;\n border-radius: 2px;\n background: rgb(75, 75, 75);\n border: 0;\n color: rgb(160, 160, 160);\n font-size: 24px;\n border-radius: 4px;\n}\n\n.datasets {\n margin: 2px 0;\n margin-top: 12px;\n}\n\n.dataset-name {\n margin: 0;\n}\n\n.dataset-name > * {\n margin-left: 0.5rem;\n}\n",""]);const u=a},42:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(81),o=n.n(r),i=n(645),a=n.n(i)()(o());a.push([e.id,".dataset-models {\n}\n\n.dataset-models-children {\n margin: 10px 0;\n}\n\n.indicator-list-item {\n display: flex;\n align-items: center;\n padding: 0 !important;\n}\n\n.indicator-list-item > button {\n text-align: left;\n cursor: pointer;\n background: rgb(75, 75, 75);\n border: 0;\n color: rgb(160, 160, 160);\n padding: 12px;\n border-radius: 4px;\n font-weight: bold;\n}\n\n.indicator-list-item > button:hover {\n background: rgb(78, 78, 78);\n}\n\n.indicator-list-item .add-indicator-btn-main {\n flex-grow: 1;\n}\n",""]);const u=a},526:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(81),o=n.n(r),i=n(645),a=n.n(i)()(o());a.push([e.id,".templates-model {\n display: flex;\n flex-direction: column;\n height: 100%;\n}\n\n.templates-list {\n flex-grow: 1;\n}\n\n.templates-add {\n}\n\n.templates-add form {\n display: flex;\n}\n\n.templates-add form {\n width: 100%;\n padding: 8px 12px;\n border-radius: 2px;\n background: rgb(75, 75, 75);\n border: 0;\n color: rgb(160, 160, 160);\n font-size: 24px;\n border-radius: 4px;\n}\n\n.templates-add form input {\n width: 100%;\n background: transparent;\n border: none;\n color: rgb(189, 189, 189);\n}\n\n.templates-add form input:focus {\n border: none;\n outline: 0;\n}\n\n.templates-add form button {\n flex-shrink: 0;\n padding: 4px 8px;\n background: #5e5e5e;\n color: white;\n border-radius: 4px;\n border: 0;\n outline: 0;\n cursor: pointer;\n}\n\n.no-saved-templates {\n text-align: center;\n color: rgb(160, 160, 160);\n}\n",""]);const u=a},322:(e,t,n)=>{"use strict";n.d(t,{Z:()=>u});var r=n(81),o=n.n(r),i=n(645),a=n.n(i)()(o());a.push([e.id,".top-bar {\n display: flex;\n align-items: center;\n width: 100%;\n height: 32px;\n background: rgb(46, 46, 46);\n}\n\n.top-bar-item {\n padding: 4px;\n}\n\nbutton.top-bar-item {\n display: flex;\n align-items: center;\n color: rgb(173, 173, 173);\n /* font-weight: bold; */\n border: 0;\n background: transparent;\n margin: 0;\n cursor: pointer;\n height: 32px;\n padding: 4px 8px;\n min-width: 32px;\n}\n\n.top-bar-seperator {\n flex-grow: 1;\n}\n\nbutton.top-bar-item:hover {\n background: rgb(70, 70, 70);\n}\n\nbutton.top-bar-item i {\n transform: scale(-0.6);\n}\n\nbutton.top-bar-item.timeframe__active {\n color: rgba(37, 180, 56, 0.76);\n font-weight: bold;\n}\n",""]);const u=a},645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,i){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var u=0;u<this.length;u++){var l=this[u][0];null!=l&&(a[l]=!0)}for(var s=0;s<e.length;s++){var c=[].concat(e[s]);r&&a[c[0]]||(void 0!==i&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=i),n&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=n):c[2]=n),o&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=o):c[4]="".concat(o)),t.push(c))}},t}},81:e=>{"use strict";e.exports=function(e){return e[1]}},486:function(e,t,n){var r;e=n.nmd(e),function(){var o,i="Expected a function",a="__lodash_hash_undefined__",u="__lodash_placeholder__",l=32,s=128,c=1/0,f=9007199254740991,d=NaN,h=4294967295,p=[["ary",s],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",l],["partialRight",64],["rearg",256]],y="[object Arguments]",v="[object Array]",m="[object Boolean]",g="[object Date]",b="[object Error]",w="[object Function]",k="[object GeneratorFunction]",x="[object Map]",S="[object Number]",_="[object Object]",E="[object Promise]",O="[object RegExp]",C="[object Set]",j="[object String]",P="[object Symbol]",R="[object WeakMap]",T="[object ArrayBuffer]",I="[object DataView]",$="[object Float32Array]",L="[object Float64Array]",M="[object Int8Array]",D="[object Int16Array]",N="[object Int32Array]",A="[object Uint8Array]",z="[object Uint8ClampedArray]",B="[object Uint16Array]",F="[object Uint32Array]",U=/\b__p \+= '';/g,G=/\b(__p \+=) '' \+/g,W=/(__e\(.*?\)|\b__t\)) \+\n'';/g,V=/&(?:amp|lt|gt|quot|#39);/g,q=/[&<>"']/g,Q=RegExp(V.source),H=RegExp(q.source),Y=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,K=/<%=([\s\S]+?)%>/g,X=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,ee=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/[\\^$.*+?()[\]{}|]/g,ne=RegExp(te.source),re=/^\s+/,oe=/\s/,ie=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ae=/\{\n\/\* \[wrapped with (.+)\] \*/,ue=/,? & /,le=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,se=/[()=,{}\[\]\/\s]/,ce=/\\(\\)?/g,fe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,de=/\w*$/,he=/^[-+]0x[0-9a-f]+$/i,pe=/^0b[01]+$/i,ye=/^\[object .+?Constructor\]$/,ve=/^0o[0-7]+$/i,me=/^(?:0|[1-9]\d*)$/,ge=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,be=/($^)/,we=/['\n\r\u2028\u2029\\]/g,ke="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",xe="a-z\\xdf-\\xf6\\xf8-\\xff",Se="A-Z\\xc0-\\xd6\\xd8-\\xde",_e="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ee="["+_e+"]",Oe="["+ke+"]",Ce="\\d+",je="["+xe+"]",Pe="[^\\ud800-\\udfff"+_e+Ce+"\\u2700-\\u27bf"+xe+Se+"]",Re="\\ud83c[\\udffb-\\udfff]",Te="[^\\ud800-\\udfff]",Ie="(?:\\ud83c[\\udde6-\\uddff]){2}",$e="[\\ud800-\\udbff][\\udc00-\\udfff]",Le="["+Se+"]",Me="(?:"+je+"|"+Pe+")",De="(?:"+Le+"|"+Pe+")",Ne="(?:['’](?:d|ll|m|re|s|t|ve))?",Ae="(?:['’](?:D|LL|M|RE|S|T|VE))?",ze="(?:"+Oe+"|"+Re+")?",Be="[\\ufe0e\\ufe0f]?",Fe=Be+ze+"(?:\\u200d(?:"+[Te,Ie,$e].join("|")+")"+Be+ze+")*",Ue="(?:"+["[\\u2700-\\u27bf]",Ie,$e].join("|")+")"+Fe,Ge="(?:"+[Te+Oe+"?",Oe,Ie,$e,"[\\ud800-\\udfff]"].join("|")+")",We=RegExp("['’]","g"),Ve=RegExp(Oe,"g"),qe=RegExp(Re+"(?="+Re+")|"+Ge+Fe,"g"),Qe=RegExp([Le+"?"+je+"+"+Ne+"(?="+[Ee,Le,"$"].join("|")+")",De+"+"+Ae+"(?="+[Ee,Le+Me,"$"].join("|")+")",Le+"?"+Me+"+"+Ne,Le+"+"+Ae,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ce,Ue].join("|"),"g"),He=RegExp("[\\u200d\\ud800-\\udfff"+ke+"\\ufe0e\\ufe0f]"),Ye=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ze=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Ke=-1,Xe={};Xe[$]=Xe[L]=Xe[M]=Xe[D]=Xe[N]=Xe[A]=Xe[z]=Xe[B]=Xe[F]=!0,Xe[y]=Xe[v]=Xe[T]=Xe[m]=Xe[I]=Xe[g]=Xe[b]=Xe[w]=Xe[x]=Xe[S]=Xe[_]=Xe[O]=Xe[C]=Xe[j]=Xe[R]=!1;var Je={};Je[y]=Je[v]=Je[T]=Je[I]=Je[m]=Je[g]=Je[$]=Je[L]=Je[M]=Je[D]=Je[N]=Je[x]=Je[S]=Je[_]=Je[O]=Je[C]=Je[j]=Je[P]=Je[A]=Je[z]=Je[B]=Je[F]=!0,Je[b]=Je[w]=Je[R]=!1;var et={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tt=parseFloat,nt=parseInt,rt="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,ot="object"==typeof self&&self&&self.Object===Object&&self,it=rt||ot||Function("return this")(),at=t&&!t.nodeType&&t,ut=at&&e&&!e.nodeType&&e,lt=ut&&ut.exports===at,st=lt&&rt.process,ct=function(){try{return ut&&ut.require&&ut.require("util").types||st&&st.binding&&st.binding("util")}catch(e){}}(),ft=ct&&ct.isArrayBuffer,dt=ct&&ct.isDate,ht=ct&&ct.isMap,pt=ct&&ct.isRegExp,yt=ct&&ct.isSet,vt=ct&&ct.isTypedArray;function mt(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function gt(e,t,n,r){for(var o=-1,i=null==e?0:e.length;++o<i;){var a=e[o];t(r,a,n(a),e)}return r}function bt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function wt(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function kt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function xt(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}function St(e,t){return!(null==e||!e.length)&&$t(e,t,0)>-1}function _t(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}function Et(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n<r;)o[n]=t(e[n],n,e);return o}function Ot(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}function Ct(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o<i;)n=t(n,e[o],o,e);return n}function jt(e,t,n,r){var o=null==e?0:e.length;for(r&&o&&(n=e[--o]);o--;)n=t(n,e[o],o,e);return n}function Pt(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var Rt=Nt("length");function Tt(e,t,n){var r;return n(e,(function(e,n,o){if(t(e,n,o))return r=n,!1})),r}function It(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}function $t(e,t,n){return t==t?function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}(e,t,n):It(e,Mt,n)}function Lt(e,t,n,r){for(var o=n-1,i=e.length;++o<i;)if(r(e[o],t))return o;return-1}function Mt(e){return e!=e}function Dt(e,t){var n=null==e?0:e.length;return n?Bt(e,t)/n:d}function Nt(e){return function(t){return null==t?o:t[e]}}function At(e){return function(t){return null==e?o:e[t]}}function zt(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}function Bt(e,t){for(var n,r=-1,i=e.length;++r<i;){var a=t(e[r]);a!==o&&(n=n===o?a:n+a)}return n}function Ft(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function Ut(e){return e?e.slice(0,un(e)+1).replace(re,""):e}function Gt(e){return function(t){return e(t)}}function Wt(e,t){return Et(t,(function(t){return e[t]}))}function Vt(e,t){return e.has(t)}function qt(e,t){for(var n=-1,r=e.length;++n<r&&$t(t,e[n],0)>-1;);return n}function Qt(e,t){for(var n=e.length;n--&&$t(t,e[n],0)>-1;);return n}function Ht(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}var Yt=At({À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"}),Zt=At({"&":"&","<":"<",">":">",'"':""","'":"'"});function Kt(e){return"\\"+et[e]}function Xt(e){return He.test(e)}function Jt(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}function en(e,t){return function(n){return e(t(n))}}function tn(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n];a!==t&&a!==u||(e[n]=u,i[o++]=n)}return i}function nn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}function rn(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=[e,e]})),n}function on(e){return Xt(e)?function(e){for(var t=qe.lastIndex=0;qe.test(e);)++t;return t}(e):Rt(e)}function an(e){return Xt(e)?function(e){return e.match(qe)||[]}(e):function(e){return e.split("")}(e)}function un(e){for(var t=e.length;t--&&oe.test(e.charAt(t)););return t}var ln=At({"&":"&","<":"<",">":">",""":'"',"'":"'"}),sn=function e(t){var n,r=(t=null==t?it:sn.defaults(it.Object(),t,sn.pick(it,Ze))).Array,oe=t.Date,ke=t.Error,xe=t.Function,Se=t.Math,_e=t.Object,Ee=t.RegExp,Oe=t.String,Ce=t.TypeError,je=r.prototype,Pe=xe.prototype,Re=_e.prototype,Te=t["__core-js_shared__"],Ie=Pe.toString,$e=Re.hasOwnProperty,Le=0,Me=(n=/[^.]+$/.exec(Te&&Te.keys&&Te.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",De=Re.toString,Ne=Ie.call(_e),Ae=it._,ze=Ee("^"+Ie.call($e).replace(te,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Be=lt?t.Buffer:o,Fe=t.Symbol,Ue=t.Uint8Array,Ge=Be?Be.allocUnsafe:o,qe=en(_e.getPrototypeOf,_e),He=_e.create,et=Re.propertyIsEnumerable,rt=je.splice,ot=Fe?Fe.isConcatSpreadable:o,at=Fe?Fe.iterator:o,ut=Fe?Fe.toStringTag:o,st=function(){try{var e=ci(_e,"defineProperty");return e({},"",{}),e}catch(e){}}(),ct=t.clearTimeout!==it.clearTimeout&&t.clearTimeout,Rt=oe&&oe.now!==it.Date.now&&oe.now,At=t.setTimeout!==it.setTimeout&&t.setTimeout,cn=Se.ceil,fn=Se.floor,dn=_e.getOwnPropertySymbols,hn=Be?Be.isBuffer:o,pn=t.isFinite,yn=je.join,vn=en(_e.keys,_e),mn=Se.max,gn=Se.min,bn=oe.now,wn=t.parseInt,kn=Se.random,xn=je.reverse,Sn=ci(t,"DataView"),_n=ci(t,"Map"),En=ci(t,"Promise"),On=ci(t,"Set"),Cn=ci(t,"WeakMap"),jn=ci(_e,"create"),Pn=Cn&&new Cn,Rn={},Tn=zi(Sn),In=zi(_n),$n=zi(En),Ln=zi(On),Mn=zi(Cn),Dn=Fe?Fe.prototype:o,Nn=Dn?Dn.valueOf:o,An=Dn?Dn.toString:o;function zn(e){if(nu(e)&&!Va(e)&&!(e instanceof Gn)){if(e instanceof Un)return e;if($e.call(e,"__wrapped__"))return Bi(e)}return new Un(e)}var Bn=function(){function e(){}return function(t){if(!tu(t))return{};if(He)return He(t);e.prototype=t;var n=new e;return e.prototype=o,n}}();function Fn(){}function Un(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=o}function Gn(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=h,this.__views__=[]}function Wn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Vn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function qn(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Qn(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new qn;++t<n;)this.add(e[t])}function Hn(e){var t=this.__data__=new Vn(e);this.size=t.size}function Yn(e,t){var n=Va(e),r=!n&&Wa(e),o=!n&&!r&&Ya(e),i=!n&&!r&&!o&&cu(e),a=n||r||o||i,u=a?Ft(e.length,Oe):[],l=u.length;for(var s in e)!t&&!$e.call(e,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||mi(s,l))||u.push(s);return u}function Zn(e){var t=e.length;return t?e[qr(0,t-1)]:o}function Kn(e,t){return Li(jo(e),ar(t,0,e.length))}function Xn(e){return Li(jo(e))}function Jn(e,t,n){(n!==o&&!Fa(e[t],n)||n===o&&!(t in e))&&or(e,t,n)}function er(e,t,n){var r=e[t];$e.call(e,t)&&Fa(r,n)&&(n!==o||t in e)||or(e,t,n)}function tr(e,t){for(var n=e.length;n--;)if(Fa(e[n][0],t))return n;return-1}function nr(e,t,n,r){return fr(e,(function(e,o,i){t(r,e,n(e),i)})),r}function rr(e,t){return e&&Po(t,Iu(t),e)}function or(e,t,n){"__proto__"==t&&st?st(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function ir(e,t){for(var n=-1,i=t.length,a=r(i),u=null==e;++n<i;)a[n]=u?o:Cu(e,t[n]);return a}function ar(e,t,n){return e==e&&(n!==o&&(e=e<=n?e:n),t!==o&&(e=e>=t?e:t)),e}function ur(e,t,n,r,i,a){var u,l=1&t,s=2&t,c=4&t;if(n&&(u=i?n(e,r,i,a):n(e)),u!==o)return u;if(!tu(e))return e;var f=Va(e);if(f){if(u=function(e){var t=e.length,n=new e.constructor(t);return t&&"string"==typeof e[0]&&$e.call(e,"index")&&(n.index=e.index,n.input=e.input),n}(e),!l)return jo(e,u)}else{var d=hi(e),h=d==w||d==k;if(Ya(e))return xo(e,l);if(d==_||d==y||h&&!i){if(u=s||h?{}:yi(e),!l)return s?function(e,t){return Po(e,di(e),t)}(e,function(e,t){return e&&Po(t,$u(t),e)}(u,e)):function(e,t){return Po(e,fi(e),t)}(e,rr(u,e))}else{if(!Je[d])return i?e:{};u=function(e,t,n){var r,o=e.constructor;switch(t){case T:return So(e);case m:case g:return new o(+e);case I:return function(e,t){var n=t?So(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}(e,n);case $:case L:case M:case D:case N:case A:case z:case B:case F:return _o(e,n);case x:return new o;case S:case j:return new o(e);case O:return function(e){var t=new e.constructor(e.source,de.exec(e));return t.lastIndex=e.lastIndex,t}(e);case C:return new o;case P:return r=e,Nn?_e(Nn.call(r)):{}}}(e,d,l)}}a||(a=new Hn);var p=a.get(e);if(p)return p;a.set(e,u),uu(e)?e.forEach((function(r){u.add(ur(r,t,n,r,e,a))})):ru(e)&&e.forEach((function(r,o){u.set(o,ur(r,t,n,o,e,a))}));var v=f?o:(c?s?ri:ni:s?$u:Iu)(e);return bt(v||e,(function(r,o){v&&(r=e[o=r]),er(u,o,ur(r,t,n,o,e,a))})),u}function lr(e,t,n){var r=n.length;if(null==e)return!r;for(e=_e(e);r--;){var i=n[r],a=t[i],u=e[i];if(u===o&&!(i in e)||!a(u))return!1}return!0}function sr(e,t,n){if("function"!=typeof e)throw new Ce(i);return Ri((function(){e.apply(o,n)}),t)}function cr(e,t,n,r){var o=-1,i=St,a=!0,u=e.length,l=[],s=t.length;if(!u)return l;n&&(t=Et(t,Gt(n))),r?(i=_t,a=!1):t.length>=200&&(i=Vt,a=!1,t=new Qn(t));e:for(;++o<u;){var c=e[o],f=null==n?c:n(c);if(c=r||0!==c?c:0,a&&f==f){for(var d=s;d--;)if(t[d]===f)continue e;l.push(c)}else i(t,f,r)||l.push(c)}return l}zn.templateSettings={escape:Y,evaluate:Z,interpolate:K,variable:"",imports:{_:zn}},zn.prototype=Fn.prototype,zn.prototype.constructor=zn,Un.prototype=Bn(Fn.prototype),Un.prototype.constructor=Un,Gn.prototype=Bn(Fn.prototype),Gn.prototype.constructor=Gn,Wn.prototype.clear=function(){this.__data__=jn?jn(null):{},this.size=0},Wn.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},Wn.prototype.get=function(e){var t=this.__data__;if(jn){var n=t[e];return n===a?o:n}return $e.call(t,e)?t[e]:o},Wn.prototype.has=function(e){var t=this.__data__;return jn?t[e]!==o:$e.call(t,e)},Wn.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=jn&&t===o?a:t,this},Vn.prototype.clear=function(){this.__data__=[],this.size=0},Vn.prototype.delete=function(e){var t=this.__data__,n=tr(t,e);return!(n<0||(n==t.length-1?t.pop():rt.call(t,n,1),--this.size,0))},Vn.prototype.get=function(e){var t=this.__data__,n=tr(t,e);return n<0?o:t[n][1]},Vn.prototype.has=function(e){return tr(this.__data__,e)>-1},Vn.prototype.set=function(e,t){var n=this.__data__,r=tr(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},qn.prototype.clear=function(){this.size=0,this.__data__={hash:new Wn,map:new(_n||Vn),string:new Wn}},qn.prototype.delete=function(e){var t=li(this,e).delete(e);return this.size-=t?1:0,t},qn.prototype.get=function(e){return li(this,e).get(e)},qn.prototype.has=function(e){return li(this,e).has(e)},qn.prototype.set=function(e,t){var n=li(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Qn.prototype.add=Qn.prototype.push=function(e){return this.__data__.set(e,a),this},Qn.prototype.has=function(e){return this.__data__.has(e)},Hn.prototype.clear=function(){this.__data__=new Vn,this.size=0},Hn.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Hn.prototype.get=function(e){return this.__data__.get(e)},Hn.prototype.has=function(e){return this.__data__.has(e)},Hn.prototype.set=function(e,t){var n=this.__data__;if(n instanceof Vn){var r=n.__data__;if(!_n||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new qn(r)}return n.set(e,t),this.size=n.size,this};var fr=Io(br),dr=Io(wr,!0);function hr(e,t){var n=!0;return fr(e,(function(e,r,o){return n=!!t(e,r,o)})),n}function pr(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],u=t(a);if(null!=u&&(l===o?u==u&&!su(u):n(u,l)))var l=u,s=a}return s}function yr(e,t){var n=[];return fr(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}function vr(e,t,n,r,o){var i=-1,a=e.length;for(n||(n=vi),o||(o=[]);++i<a;){var u=e[i];t>0&&n(u)?t>1?vr(u,t-1,n,r,o):Ot(o,u):r||(o[o.length]=u)}return o}var mr=$o(),gr=$o(!0);function br(e,t){return e&&mr(e,t,Iu)}function wr(e,t){return e&&gr(e,t,Iu)}function kr(e,t){return xt(t,(function(t){return Xa(e[t])}))}function xr(e,t){for(var n=0,r=(t=go(t,e)).length;null!=e&&n<r;)e=e[Ai(t[n++])];return n&&n==r?e:o}function Sr(e,t,n){var r=t(e);return Va(e)?r:Ot(r,n(e))}function _r(e){return null==e?e===o?"[object Undefined]":"[object Null]":ut&&ut in _e(e)?function(e){var t=$e.call(e,ut),n=e[ut];try{e[ut]=o;var r=!0}catch(e){}var i=De.call(e);return r&&(t?e[ut]=n:delete e[ut]),i}(e):function(e){return De.call(e)}(e)}function Er(e,t){return e>t}function Or(e,t){return null!=e&&$e.call(e,t)}function Cr(e,t){return null!=e&&t in _e(e)}function jr(e,t,n){for(var i=n?_t:St,a=e[0].length,u=e.length,l=u,s=r(u),c=1/0,f=[];l--;){var d=e[l];l&&t&&(d=Et(d,Gt(t))),c=gn(d.length,c),s[l]=!n&&(t||a>=120&&d.length>=120)?new Qn(l&&d):o}d=e[0];var h=-1,p=s[0];e:for(;++h<a&&f.length<c;){var y=d[h],v=t?t(y):y;if(y=n||0!==y?y:0,!(p?Vt(p,v):i(f,v,n))){for(l=u;--l;){var m=s[l];if(!(m?Vt(m,v):i(e[l],v,n)))continue e}p&&p.push(v),f.push(y)}}return f}function Pr(e,t,n){var r=null==(e=Oi(e,t=go(t,e)))?e:e[Ai(Ki(t))];return null==r?o:mt(r,e,n)}function Rr(e){return nu(e)&&_r(e)==y}function Tr(e,t,n,r,i){return e===t||(null==e||null==t||!nu(e)&&!nu(t)?e!=e&&t!=t:function(e,t,n,r,i,a){var u=Va(e),l=Va(t),s=u?v:hi(e),c=l?v:hi(t),f=(s=s==y?_:s)==_,d=(c=c==y?_:c)==_,h=s==c;if(h&&Ya(e)){if(!Ya(t))return!1;u=!0,f=!1}if(h&&!f)return a||(a=new Hn),u||cu(e)?ei(e,t,n,r,i,a):function(e,t,n,r,o,i,a){switch(n){case I:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case T:return!(e.byteLength!=t.byteLength||!i(new Ue(e),new Ue(t)));case m:case g:case S:return Fa(+e,+t);case b:return e.name==t.name&&e.message==t.message;case O:case j:return e==t+"";case x:var u=Jt;case C:var l=1&r;if(u||(u=nn),e.size!=t.size&&!l)return!1;var s=a.get(e);if(s)return s==t;r|=2,a.set(e,t);var c=ei(u(e),u(t),r,o,i,a);return a.delete(e),c;case P:if(Nn)return Nn.call(e)==Nn.call(t)}return!1}(e,t,s,n,r,i,a);if(!(1&n)){var p=f&&$e.call(e,"__wrapped__"),w=d&&$e.call(t,"__wrapped__");if(p||w){var k=p?e.value():e,E=w?t.value():t;return a||(a=new Hn),i(k,E,n,r,a)}}return!!h&&(a||(a=new Hn),function(e,t,n,r,i,a){var u=1&n,l=ni(e),s=l.length;if(s!=ni(t).length&&!u)return!1;for(var c=s;c--;){var f=l[c];if(!(u?f in t:$e.call(t,f)))return!1}var d=a.get(e),h=a.get(t);if(d&&h)return d==t&&h==e;var p=!0;a.set(e,t),a.set(t,e);for(var y=u;++c<s;){var v=e[f=l[c]],m=t[f];if(r)var g=u?r(m,v,f,t,e,a):r(v,m,f,e,t,a);if(!(g===o?v===m||i(v,m,n,r,a):g)){p=!1;break}y||(y="constructor"==f)}if(p&&!y){var b=e.constructor,w=t.constructor;b==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(p=!1)}return a.delete(e),a.delete(t),p}(e,t,n,r,i,a))}(e,t,n,r,Tr,i))}function Ir(e,t,n,r){var i=n.length,a=i,u=!r;if(null==e)return!a;for(e=_e(e);i--;){var l=n[i];if(u&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<a;){var s=(l=n[i])[0],c=e[s],f=l[1];if(u&&l[2]){if(c===o&&!(s in e))return!1}else{var d=new Hn;if(r)var h=r(c,f,s,e,t,d);if(!(h===o?Tr(f,c,3,r,d):h))return!1}}return!0}function $r(e){return!(!tu(e)||(t=e,Me&&Me in t))&&(Xa(e)?ze:ye).test(zi(e));var t}function Lr(e){return"function"==typeof e?e:null==e?ol:"object"==typeof e?Va(e)?zr(e[0],e[1]):Ar(e):hl(e)}function Mr(e){if(!xi(e))return vn(e);var t=[];for(var n in _e(e))$e.call(e,n)&&"constructor"!=n&&t.push(n);return t}function Dr(e,t){return e<t}function Nr(e,t){var n=-1,o=Qa(e)?r(e.length):[];return fr(e,(function(e,r,i){o[++n]=t(e,r,i)})),o}function Ar(e){var t=si(e);return 1==t.length&&t[0][2]?_i(t[0][0],t[0][1]):function(n){return n===e||Ir(n,e,t)}}function zr(e,t){return bi(e)&&Si(t)?_i(Ai(e),t):function(n){var r=Cu(n,e);return r===o&&r===t?ju(n,e):Tr(t,r,3)}}function Br(e,t,n,r,i){e!==t&&mr(t,(function(a,u){if(i||(i=new Hn),tu(a))!function(e,t,n,r,i,a,u){var l=ji(e,n),s=ji(t,n),c=u.get(s);if(c)Jn(e,n,c);else{var f=a?a(l,s,n+"",e,t,u):o,d=f===o;if(d){var h=Va(s),p=!h&&Ya(s),y=!h&&!p&&cu(s);f=s,h||p||y?Va(l)?f=l:Ha(l)?f=jo(l):p?(d=!1,f=xo(s,!0)):y?(d=!1,f=_o(s,!0)):f=[]:iu(s)||Wa(s)?(f=l,Wa(l)?f=gu(l):tu(l)&&!Xa(l)||(f=yi(s))):d=!1}d&&(u.set(s,f),i(f,s,r,a,u),u.delete(s)),Jn(e,n,f)}}(e,t,u,n,Br,r,i);else{var l=r?r(ji(e,u),a,u+"",e,t,i):o;l===o&&(l=a),Jn(e,u,l)}}),$u)}function Fr(e,t){var n=e.length;if(n)return mi(t+=t<0?n:0,n)?e[t]:o}function Ur(e,t,n){t=t.length?Et(t,(function(e){return Va(e)?function(t){return xr(t,1===e.length?e[0]:e)}:e})):[ol];var r=-1;t=Et(t,Gt(ui()));var o=Nr(e,(function(e,n,o){var i=Et(t,(function(t){return t(e)}));return{criteria:i,index:++r,value:e}}));return function(e,t){var r=e.length;for(e.sort((function(e,t){return function(e,t,n){for(var r=-1,o=e.criteria,i=t.criteria,a=o.length,u=n.length;++r<a;){var l=Eo(o[r],i[r]);if(l)return r>=u?l:l*("desc"==n[r]?-1:1)}return e.index-t.index}(e,t,n)}));r--;)e[r]=e[r].value;return e}(o)}function Gr(e,t,n){for(var r=-1,o=t.length,i={};++r<o;){var a=t[r],u=xr(e,a);n(u,a)&&Kr(i,go(a,e),u)}return i}function Wr(e,t,n,r){var o=r?Lt:$t,i=-1,a=t.length,u=e;for(e===t&&(t=jo(t)),n&&(u=Et(e,Gt(n)));++i<a;)for(var l=0,s=t[i],c=n?n(s):s;(l=o(u,c,l,r))>-1;)u!==e&&rt.call(u,l,1),rt.call(e,l,1);return e}function Vr(e,t){for(var n=e?t.length:0,r=n-1;n--;){var o=t[n];if(n==r||o!==i){var i=o;mi(o)?rt.call(e,o,1):so(e,o)}}return e}function qr(e,t){return e+fn(kn()*(t-e+1))}function Qr(e,t){var n="";if(!e||t<1||t>f)return n;do{t%2&&(n+=e),(t=fn(t/2))&&(e+=e)}while(t);return n}function Hr(e,t){return Ti(Ei(e,t,ol),e+"")}function Yr(e){return Zn(Fu(e))}function Zr(e,t){var n=Fu(e);return Li(n,ar(t,0,n.length))}function Kr(e,t,n,r){if(!tu(e))return e;for(var i=-1,a=(t=go(t,e)).length,u=a-1,l=e;null!=l&&++i<a;){var s=Ai(t[i]),c=n;if("__proto__"===s||"constructor"===s||"prototype"===s)return e;if(i!=u){var f=l[s];(c=r?r(f,s,l):o)===o&&(c=tu(f)?f:mi(t[i+1])?[]:{})}er(l,s,c),l=l[s]}return e}var Xr=Pn?function(e,t){return Pn.set(e,t),e}:ol,Jr=st?function(e,t){return st(e,"toString",{configurable:!0,enumerable:!1,value:tl(t),writable:!0})}:ol;function eo(e){return Li(Fu(e))}function to(e,t,n){var o=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(n=n>i?i:n)<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=r(i);++o<i;)a[o]=e[o+t];return a}function no(e,t){var n;return fr(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n}function ro(e,t,n){var r=0,o=null==e?r:e.length;if("number"==typeof t&&t==t&&o<=2147483647){for(;r<o;){var i=r+o>>>1,a=e[i];null!==a&&!su(a)&&(n?a<=t:a<t)?r=i+1:o=i}return o}return oo(e,t,ol,n)}function oo(e,t,n,r){var i=0,a=null==e?0:e.length;if(0===a)return 0;for(var u=(t=n(t))!=t,l=null===t,s=su(t),c=t===o;i<a;){var f=fn((i+a)/2),d=n(e[f]),h=d!==o,p=null===d,y=d==d,v=su(d);if(u)var m=r||y;else m=c?y&&(r||h):l?y&&h&&(r||!p):s?y&&h&&!p&&(r||!v):!p&&!v&&(r?d<=t:d<t);m?i=f+1:a=f}return gn(a,4294967294)}function io(e,t){for(var n=-1,r=e.length,o=0,i=[];++n<r;){var a=e[n],u=t?t(a):a;if(!n||!Fa(u,l)){var l=u;i[o++]=0===a?0:a}}return i}function ao(e){return"number"==typeof e?e:su(e)?d:+e}function uo(e){if("string"==typeof e)return e;if(Va(e))return Et(e,uo)+"";if(su(e))return An?An.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function lo(e,t,n){var r=-1,o=St,i=e.length,a=!0,u=[],l=u;if(n)a=!1,o=_t;else if(i>=200){var s=t?null:Ho(e);if(s)return nn(s);a=!1,o=Vt,l=new Qn}else l=t?[]:u;e:for(;++r<i;){var c=e[r],f=t?t(c):c;if(c=n||0!==c?c:0,a&&f==f){for(var d=l.length;d--;)if(l[d]===f)continue e;t&&l.push(f),u.push(c)}else o(l,f,n)||(l!==u&&l.push(f),u.push(c))}return u}function so(e,t){return null==(e=Oi(e,t=go(t,e)))||delete e[Ai(Ki(t))]}function co(e,t,n,r){return Kr(e,t,n(xr(e,t)),r)}function fo(e,t,n,r){for(var o=e.length,i=r?o:-1;(r?i--:++i<o)&&t(e[i],i,e););return n?to(e,r?0:i,r?i+1:o):to(e,r?i+1:0,r?o:i)}function ho(e,t){var n=e;return n instanceof Gn&&(n=n.value()),Ct(t,(function(e,t){return t.func.apply(t.thisArg,Ot([e],t.args))}),n)}function po(e,t,n){var o=e.length;if(o<2)return o?lo(e[0]):[];for(var i=-1,a=r(o);++i<o;)for(var u=e[i],l=-1;++l<o;)l!=i&&(a[i]=cr(a[i]||u,e[l],t,n));return lo(vr(a,1),t,n)}function yo(e,t,n){for(var r=-1,i=e.length,a=t.length,u={};++r<i;){var l=r<a?t[r]:o;n(u,e[r],l)}return u}function vo(e){return Ha(e)?e:[]}function mo(e){return"function"==typeof e?e:ol}function go(e,t){return Va(e)?e:bi(e,t)?[e]:Ni(bu(e))}var bo=Hr;function wo(e,t,n){var r=e.length;return n=n===o?r:n,!t&&n>=r?e:to(e,t,n)}var ko=ct||function(e){return it.clearTimeout(e)};function xo(e,t){if(t)return e.slice();var n=e.length,r=Ge?Ge(n):new e.constructor(n);return e.copy(r),r}function So(e){var t=new e.constructor(e.byteLength);return new Ue(t).set(new Ue(e)),t}function _o(e,t){var n=t?So(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function Eo(e,t){if(e!==t){var n=e!==o,r=null===e,i=e==e,a=su(e),u=t!==o,l=null===t,s=t==t,c=su(t);if(!l&&!c&&!a&&e>t||a&&u&&s&&!l&&!c||r&&u&&s||!n&&s||!i)return 1;if(!r&&!a&&!c&&e<t||c&&n&&i&&!r&&!a||l&&n&&i||!u&&i||!s)return-1}return 0}function Oo(e,t,n,o){for(var i=-1,a=e.length,u=n.length,l=-1,s=t.length,c=mn(a-u,0),f=r(s+c),d=!o;++l<s;)f[l]=t[l];for(;++i<u;)(d||i<a)&&(f[n[i]]=e[i]);for(;c--;)f[l++]=e[i++];return f}function Co(e,t,n,o){for(var i=-1,a=e.length,u=-1,l=n.length,s=-1,c=t.length,f=mn(a-l,0),d=r(f+c),h=!o;++i<f;)d[i]=e[i];for(var p=i;++s<c;)d[p+s]=t[s];for(;++u<l;)(h||i<a)&&(d[p+n[u]]=e[i++]);return d}function jo(e,t){var n=-1,o=e.length;for(t||(t=r(o));++n<o;)t[n]=e[n];return t}function Po(e,t,n,r){var i=!n;n||(n={});for(var a=-1,u=t.length;++a<u;){var l=t[a],s=r?r(n[l],e[l],l,n,e):o;s===o&&(s=e[l]),i?or(n,l,s):er(n,l,s)}return n}function Ro(e,t){return function(n,r){var o=Va(n)?gt:nr,i=t?t():{};return o(n,e,ui(r,2),i)}}function To(e){return Hr((function(t,n){var r=-1,i=n.length,a=i>1?n[i-1]:o,u=i>2?n[2]:o;for(a=e.length>3&&"function"==typeof a?(i--,a):o,u&&gi(n[0],n[1],u)&&(a=i<3?o:a,i=1),t=_e(t);++r<i;){var l=n[r];l&&e(t,l,r,a)}return t}))}function Io(e,t){return function(n,r){if(null==n)return n;if(!Qa(n))return e(n,r);for(var o=n.length,i=t?o:-1,a=_e(n);(t?i--:++i<o)&&!1!==r(a[i],i,a););return n}}function $o(e){return function(t,n,r){for(var o=-1,i=_e(t),a=r(t),u=a.length;u--;){var l=a[e?u:++o];if(!1===n(i[l],l,i))break}return t}}function Lo(e){return function(t){var n=Xt(t=bu(t))?an(t):o,r=n?n[0]:t.charAt(0),i=n?wo(n,1).join(""):t.slice(1);return r[e]()+i}}function Mo(e){return function(t){return Ct(Xu(Wu(t).replace(We,"")),e,"")}}function Do(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var n=Bn(e.prototype),r=e.apply(n,t);return tu(r)?r:n}}function No(e){return function(t,n,r){var i=_e(t);if(!Qa(t)){var a=ui(n,3);t=Iu(t),n=function(e){return a(i[e],e,i)}}var u=e(t,n,r);return u>-1?i[a?t[u]:u]:o}}function Ao(e){return ti((function(t){var n=t.length,r=n,a=Un.prototype.thru;for(e&&t.reverse();r--;){var u=t[r];if("function"!=typeof u)throw new Ce(i);if(a&&!l&&"wrapper"==ii(u))var l=new Un([],!0)}for(r=l?r:n;++r<n;){var s=ii(u=t[r]),c="wrapper"==s?oi(u):o;l=c&&wi(c[0])&&424==c[1]&&!c[4].length&&1==c[9]?l[ii(c[0])].apply(l,c[3]):1==u.length&&wi(u)?l[s]():l.thru(u)}return function(){var e=arguments,r=e[0];if(l&&1==e.length&&Va(r))return l.plant(r).value();for(var o=0,i=n?t[o].apply(this,e):r;++o<n;)i=t[o].call(this,i);return i}}))}function zo(e,t,n,i,a,u,l,c,f,d){var h=t&s,p=1&t,y=2&t,v=24&t,m=512&t,g=y?o:Do(e);return function o(){for(var s=arguments.length,b=r(s),w=s;w--;)b[w]=arguments[w];if(v)var k=ai(o),x=Ht(b,k);if(i&&(b=Oo(b,i,a,v)),u&&(b=Co(b,u,l,v)),s-=x,v&&s<d){var S=tn(b,k);return qo(e,t,zo,o.placeholder,n,b,S,c,f,d-s)}var _=p?n:this,E=y?_[e]:e;return s=b.length,c?b=Ci(b,c):m&&s>1&&b.reverse(),h&&f<s&&(b.length=f),this&&this!==it&&this instanceof o&&(E=g||Do(E)),E.apply(_,b)}}function Bo(e,t){return function(n,r){return function(e,t,n,r){return br(e,(function(e,o,i){t(r,n(e),o,i)})),r}(n,e,t(r),{})}}function Fo(e,t){return function(n,r){var i;if(n===o&&r===o)return t;if(n!==o&&(i=n),r!==o){if(i===o)return r;"string"==typeof n||"string"==typeof r?(n=uo(n),r=uo(r)):(n=ao(n),r=ao(r)),i=e(n,r)}return i}}function Uo(e){return ti((function(t){return t=Et(t,Gt(ui())),Hr((function(n){var r=this;return e(t,(function(e){return mt(e,r,n)}))}))}))}function Go(e,t){var n=(t=t===o?" ":uo(t)).length;if(n<2)return n?Qr(t,e):t;var r=Qr(t,cn(e/on(t)));return Xt(t)?wo(an(r),0,e).join(""):r.slice(0,e)}function Wo(e){return function(t,n,i){return i&&"number"!=typeof i&&gi(t,n,i)&&(n=i=o),t=pu(t),n===o?(n=t,t=0):n=pu(n),function(e,t,n,o){for(var i=-1,a=mn(cn((t-e)/(n||1)),0),u=r(a);a--;)u[o?a:++i]=e,e+=n;return u}(t,n,i=i===o?t<n?1:-1:pu(i),e)}}function Vo(e){return function(t,n){return"string"==typeof t&&"string"==typeof n||(t=mu(t),n=mu(n)),e(t,n)}}function qo(e,t,n,r,i,a,u,s,c,f){var d=8&t;t|=d?l:64,4&(t&=~(d?64:l))||(t&=-4);var h=[e,t,i,d?a:o,d?u:o,d?o:a,d?o:u,s,c,f],p=n.apply(o,h);return wi(e)&&Pi(p,h),p.placeholder=r,Ii(p,e,t)}function Qo(e){var t=Se[e];return function(e,n){if(e=mu(e),(n=null==n?0:gn(yu(n),292))&&pn(e)){var r=(bu(e)+"e").split("e");return+((r=(bu(t(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return t(e)}}var Ho=On&&1/nn(new On([,-0]))[1]==c?function(e){return new On(e)}:sl;function Yo(e){return function(t){var n=hi(t);return n==x?Jt(t):n==C?rn(t):function(e,t){return Et(t,(function(t){return[t,e[t]]}))}(t,e(t))}}function Zo(e,t,n,a,c,f,d,h){var p=2&t;if(!p&&"function"!=typeof e)throw new Ce(i);var y=a?a.length:0;if(y||(t&=-97,a=c=o),d=d===o?d:mn(yu(d),0),h=h===o?h:yu(h),y-=c?c.length:0,64&t){var v=a,m=c;a=c=o}var g=p?o:oi(e),b=[e,t,n,a,c,v,m,f,d,h];if(g&&function(e,t){var n=e[1],r=t[1],o=n|r,i=o<131,a=r==s&&8==n||r==s&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(!i&&!a)return e;1&r&&(e[2]=t[2],o|=1&n?0:4);var l=t[3];if(l){var c=e[3];e[3]=c?Oo(c,l,t[4]):l,e[4]=c?tn(e[3],u):t[4]}(l=t[5])&&(c=e[5],e[5]=c?Co(c,l,t[6]):l,e[6]=c?tn(e[5],u):t[6]),(l=t[7])&&(e[7]=l),r&s&&(e[8]=null==e[8]?t[8]:gn(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=o}(b,g),e=b[0],t=b[1],n=b[2],a=b[3],c=b[4],!(h=b[9]=b[9]===o?p?0:e.length:mn(b[9]-y,0))&&24&t&&(t&=-25),t&&1!=t)w=8==t||16==t?function(e,t,n){var i=Do(e);return function a(){for(var u=arguments.length,l=r(u),s=u,c=ai(a);s--;)l[s]=arguments[s];var f=u<3&&l[0]!==c&&l[u-1]!==c?[]:tn(l,c);return(u-=f.length)<n?qo(e,t,zo,a.placeholder,o,l,f,o,o,n-u):mt(this&&this!==it&&this instanceof a?i:e,this,l)}}(e,t,h):t!=l&&33!=t||c.length?zo.apply(o,b):function(e,t,n,o){var i=1&t,a=Do(e);return function t(){for(var u=-1,l=arguments.length,s=-1,c=o.length,f=r(c+l),d=this&&this!==it&&this instanceof t?a:e;++s<c;)f[s]=o[s];for(;l--;)f[s++]=arguments[++u];return mt(d,i?n:this,f)}}(e,t,n,a);else var w=function(e,t,n){var r=1&t,o=Do(e);return function t(){return(this&&this!==it&&this instanceof t?o:e).apply(r?n:this,arguments)}}(e,t,n);return Ii((g?Xr:Pi)(w,b),e,t)}function Ko(e,t,n,r){return e===o||Fa(e,Re[n])&&!$e.call(r,n)?t:e}function Xo(e,t,n,r,i,a){return tu(e)&&tu(t)&&(a.set(t,e),Br(e,t,o,Xo,a),a.delete(t)),e}function Jo(e){return iu(e)?o:e}function ei(e,t,n,r,i,a){var u=1&n,l=e.length,s=t.length;if(l!=s&&!(u&&s>l))return!1;var c=a.get(e),f=a.get(t);if(c&&f)return c==t&&f==e;var d=-1,h=!0,p=2&n?new Qn:o;for(a.set(e,t),a.set(t,e);++d<l;){var y=e[d],v=t[d];if(r)var m=u?r(v,y,d,t,e,a):r(y,v,d,e,t,a);if(m!==o){if(m)continue;h=!1;break}if(p){if(!Pt(t,(function(e,t){if(!Vt(p,t)&&(y===e||i(y,e,n,r,a)))return p.push(t)}))){h=!1;break}}else if(y!==v&&!i(y,v,n,r,a)){h=!1;break}}return a.delete(e),a.delete(t),h}function ti(e){return Ti(Ei(e,o,qi),e+"")}function ni(e){return Sr(e,Iu,fi)}function ri(e){return Sr(e,$u,di)}var oi=Pn?function(e){return Pn.get(e)}:sl;function ii(e){for(var t=e.name+"",n=Rn[t],r=$e.call(Rn,t)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==e)return o.name}return t}function ai(e){return($e.call(zn,"placeholder")?zn:e).placeholder}function ui(){var e=zn.iteratee||il;return e=e===il?Lr:e,arguments.length?e(arguments[0],arguments[1]):e}function li(e,t){var n,r,o=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof t?"string":"hash"]:o.map}function si(e){for(var t=Iu(e),n=t.length;n--;){var r=t[n],o=e[r];t[n]=[r,o,Si(o)]}return t}function ci(e,t){var n=function(e,t){return null==e?o:e[t]}(e,t);return $r(n)?n:o}var fi=dn?function(e){return null==e?[]:(e=_e(e),xt(dn(e),(function(t){return et.call(e,t)})))}:vl,di=dn?function(e){for(var t=[];e;)Ot(t,fi(e)),e=qe(e);return t}:vl,hi=_r;function pi(e,t,n){for(var r=-1,o=(t=go(t,e)).length,i=!1;++r<o;){var a=Ai(t[r]);if(!(i=null!=e&&n(e,a)))break;e=e[a]}return i||++r!=o?i:!!(o=null==e?0:e.length)&&eu(o)&&mi(a,o)&&(Va(e)||Wa(e))}function yi(e){return"function"!=typeof e.constructor||xi(e)?{}:Bn(qe(e))}function vi(e){return Va(e)||Wa(e)||!!(ot&&e&&e[ot])}function mi(e,t){var n=typeof e;return!!(t=null==t?f:t)&&("number"==n||"symbol"!=n&&me.test(e))&&e>-1&&e%1==0&&e<t}function gi(e,t,n){if(!tu(n))return!1;var r=typeof t;return!!("number"==r?Qa(n)&&mi(t,n.length):"string"==r&&t in n)&&Fa(n[t],e)}function bi(e,t){if(Va(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!su(e))||J.test(e)||!X.test(e)||null!=t&&e in _e(t)}function wi(e){var t=ii(e),n=zn[t];if("function"!=typeof n||!(t in Gn.prototype))return!1;if(e===n)return!0;var r=oi(n);return!!r&&e===r[0]}(Sn&&hi(new Sn(new ArrayBuffer(1)))!=I||_n&&hi(new _n)!=x||En&&hi(En.resolve())!=E||On&&hi(new On)!=C||Cn&&hi(new Cn)!=R)&&(hi=function(e){var t=_r(e),n=t==_?e.constructor:o,r=n?zi(n):"";if(r)switch(r){case Tn:return I;case In:return x;case $n:return E;case Ln:return C;case Mn:return R}return t});var ki=Te?Xa:ml;function xi(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Re)}function Si(e){return e==e&&!tu(e)}function _i(e,t){return function(n){return null!=n&&n[e]===t&&(t!==o||e in _e(n))}}function Ei(e,t,n){return t=mn(t===o?e.length-1:t,0),function(){for(var o=arguments,i=-1,a=mn(o.length-t,0),u=r(a);++i<a;)u[i]=o[t+i];i=-1;for(var l=r(t+1);++i<t;)l[i]=o[i];return l[t]=n(u),mt(e,this,l)}}function Oi(e,t){return t.length<2?e:xr(e,to(t,0,-1))}function Ci(e,t){for(var n=e.length,r=gn(t.length,n),i=jo(e);r--;){var a=t[r];e[r]=mi(a,n)?i[a]:o}return e}function ji(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var Pi=$i(Xr),Ri=At||function(e,t){return it.setTimeout(e,t)},Ti=$i(Jr);function Ii(e,t,n){var r=t+"";return Ti(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(n>1?"& ":"")+t[r],t=t.join(n>2?", ":" "),e.replace(ie,"{\n/* [wrapped with "+t+"] */\n")}(r,function(e,t){return bt(p,(function(n){var r="_."+n[0];t&n[1]&&!St(e,r)&&e.push(r)})),e.sort()}(function(e){var t=e.match(ae);return t?t[1].split(ue):[]}(r),n)))}function $i(e){var t=0,n=0;return function(){var r=bn(),i=16-(r-n);if(n=r,i>0){if(++t>=800)return arguments[0]}else t=0;return e.apply(o,arguments)}}function Li(e,t){var n=-1,r=e.length,i=r-1;for(t=t===o?r:t;++n<t;){var a=qr(n,i),u=e[a];e[a]=e[n],e[n]=u}return e.length=t,e}var Mi,Di,Ni=(Mi=Ma((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(ee,(function(e,n,r,o){t.push(r?o.replace(ce,"$1"):n||e)})),t}),(function(e){return 500===Di.size&&Di.clear(),e})),Di=Mi.cache,Mi);function Ai(e){if("string"==typeof e||su(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function zi(e){if(null!=e){try{return Ie.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function Bi(e){if(e instanceof Gn)return e.clone();var t=new Un(e.__wrapped__,e.__chain__);return t.__actions__=jo(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var Fi=Hr((function(e,t){return Ha(e)?cr(e,vr(t,1,Ha,!0)):[]})),Ui=Hr((function(e,t){var n=Ki(t);return Ha(n)&&(n=o),Ha(e)?cr(e,vr(t,1,Ha,!0),ui(n,2)):[]})),Gi=Hr((function(e,t){var n=Ki(t);return Ha(n)&&(n=o),Ha(e)?cr(e,vr(t,1,Ha,!0),o,n):[]}));function Wi(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:yu(n);return o<0&&(o=mn(r+o,0)),It(e,ui(t,3),o)}function Vi(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return n!==o&&(i=yu(n),i=n<0?mn(r+i,0):gn(i,r-1)),It(e,ui(t,3),i,!0)}function qi(e){return null!=e&&e.length?vr(e,1):[]}function Qi(e){return e&&e.length?e[0]:o}var Hi=Hr((function(e){var t=Et(e,vo);return t.length&&t[0]===e[0]?jr(t):[]})),Yi=Hr((function(e){var t=Ki(e),n=Et(e,vo);return t===Ki(n)?t=o:n.pop(),n.length&&n[0]===e[0]?jr(n,ui(t,2)):[]})),Zi=Hr((function(e){var t=Ki(e),n=Et(e,vo);return(t="function"==typeof t?t:o)&&n.pop(),n.length&&n[0]===e[0]?jr(n,o,t):[]}));function Ki(e){var t=null==e?0:e.length;return t?e[t-1]:o}var Xi=Hr(Ji);function Ji(e,t){return e&&e.length&&t&&t.length?Wr(e,t):e}var ea=ti((function(e,t){var n=null==e?0:e.length,r=ir(e,t);return Vr(e,Et(t,(function(e){return mi(e,n)?+e:e})).sort(Eo)),r}));function ta(e){return null==e?e:xn.call(e)}var na=Hr((function(e){return lo(vr(e,1,Ha,!0))})),ra=Hr((function(e){var t=Ki(e);return Ha(t)&&(t=o),lo(vr(e,1,Ha,!0),ui(t,2))})),oa=Hr((function(e){var t=Ki(e);return t="function"==typeof t?t:o,lo(vr(e,1,Ha,!0),o,t)}));function ia(e){if(!e||!e.length)return[];var t=0;return e=xt(e,(function(e){if(Ha(e))return t=mn(e.length,t),!0})),Ft(t,(function(t){return Et(e,Nt(t))}))}function aa(e,t){if(!e||!e.length)return[];var n=ia(e);return null==t?n:Et(n,(function(e){return mt(t,o,e)}))}var ua=Hr((function(e,t){return Ha(e)?cr(e,t):[]})),la=Hr((function(e){return po(xt(e,Ha))})),sa=Hr((function(e){var t=Ki(e);return Ha(t)&&(t=o),po(xt(e,Ha),ui(t,2))})),ca=Hr((function(e){var t=Ki(e);return t="function"==typeof t?t:o,po(xt(e,Ha),o,t)})),fa=Hr(ia),da=Hr((function(e){var t=e.length,n=t>1?e[t-1]:o;return n="function"==typeof n?(e.pop(),n):o,aa(e,n)}));function ha(e){var t=zn(e);return t.__chain__=!0,t}function pa(e,t){return t(e)}var ya=ti((function(e){var t=e.length,n=t?e[0]:0,r=this.__wrapped__,i=function(t){return ir(t,e)};return!(t>1||this.__actions__.length)&&r instanceof Gn&&mi(n)?((r=r.slice(n,+n+(t?1:0))).__actions__.push({func:pa,args:[i],thisArg:o}),new Un(r,this.__chain__).thru((function(e){return t&&!e.length&&e.push(o),e}))):this.thru(i)})),va=Ro((function(e,t,n){$e.call(e,n)?++e[n]:or(e,n,1)})),ma=No(Wi),ga=No(Vi);function ba(e,t){return(Va(e)?bt:fr)(e,ui(t,3))}function wa(e,t){return(Va(e)?wt:dr)(e,ui(t,3))}var ka=Ro((function(e,t,n){$e.call(e,n)?e[n].push(t):or(e,n,[t])})),xa=Hr((function(e,t,n){var o=-1,i="function"==typeof t,a=Qa(e)?r(e.length):[];return fr(e,(function(e){a[++o]=i?mt(t,e,n):Pr(e,t,n)})),a})),Sa=Ro((function(e,t,n){or(e,n,t)}));function _a(e,t){return(Va(e)?Et:Nr)(e,ui(t,3))}var Ea=Ro((function(e,t,n){e[n?0:1].push(t)}),(function(){return[[],[]]})),Oa=Hr((function(e,t){if(null==e)return[];var n=t.length;return n>1&&gi(e,t[0],t[1])?t=[]:n>2&&gi(t[0],t[1],t[2])&&(t=[t[0]]),Ur(e,vr(t,1),[])})),Ca=Rt||function(){return it.Date.now()};function ja(e,t,n){return t=n?o:t,t=e&&null==t?e.length:t,Zo(e,s,o,o,o,o,t)}function Pa(e,t){var n;if("function"!=typeof t)throw new Ce(i);return e=yu(e),function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=o),n}}var Ra=Hr((function(e,t,n){var r=1;if(n.length){var o=tn(n,ai(Ra));r|=l}return Zo(e,r,t,n,o)})),Ta=Hr((function(e,t,n){var r=3;if(n.length){var o=tn(n,ai(Ta));r|=l}return Zo(t,r,e,n,o)}));function Ia(e,t,n){var r,a,u,l,s,c,f=0,d=!1,h=!1,p=!0;if("function"!=typeof e)throw new Ce(i);function y(t){var n=r,i=a;return r=a=o,f=t,l=e.apply(i,n)}function v(e){return f=e,s=Ri(g,t),d?y(e):l}function m(e){var n=e-c;return c===o||n>=t||n<0||h&&e-f>=u}function g(){var e=Ca();if(m(e))return b(e);s=Ri(g,function(e){var n=t-(e-c);return h?gn(n,u-(e-f)):n}(e))}function b(e){return s=o,p&&r?y(e):(r=a=o,l)}function w(){var e=Ca(),n=m(e);if(r=arguments,a=this,c=e,n){if(s===o)return v(c);if(h)return ko(s),s=Ri(g,t),y(c)}return s===o&&(s=Ri(g,t)),l}return t=mu(t)||0,tu(n)&&(d=!!n.leading,u=(h="maxWait"in n)?mn(mu(n.maxWait)||0,t):u,p="trailing"in n?!!n.trailing:p),w.cancel=function(){s!==o&&ko(s),f=0,r=c=a=s=o},w.flush=function(){return s===o?l:b(Ca())},w}var $a=Hr((function(e,t){return sr(e,1,t)})),La=Hr((function(e,t,n){return sr(e,mu(t)||0,n)}));function Ma(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new Ce(i);var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=e.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Ma.Cache||qn),n}function Da(e){if("function"!=typeof e)throw new Ce(i);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}Ma.Cache=qn;var Na=bo((function(e,t){var n=(t=1==t.length&&Va(t[0])?Et(t[0],Gt(ui())):Et(vr(t,1),Gt(ui()))).length;return Hr((function(r){for(var o=-1,i=gn(r.length,n);++o<i;)r[o]=t[o].call(this,r[o]);return mt(e,this,r)}))})),Aa=Hr((function(e,t){var n=tn(t,ai(Aa));return Zo(e,l,o,t,n)})),za=Hr((function(e,t){var n=tn(t,ai(za));return Zo(e,64,o,t,n)})),Ba=ti((function(e,t){return Zo(e,256,o,o,o,t)}));function Fa(e,t){return e===t||e!=e&&t!=t}var Ua=Vo(Er),Ga=Vo((function(e,t){return e>=t})),Wa=Rr(function(){return arguments}())?Rr:function(e){return nu(e)&&$e.call(e,"callee")&&!et.call(e,"callee")},Va=r.isArray,qa=ft?Gt(ft):function(e){return nu(e)&&_r(e)==T};function Qa(e){return null!=e&&eu(e.length)&&!Xa(e)}function Ha(e){return nu(e)&&Qa(e)}var Ya=hn||ml,Za=dt?Gt(dt):function(e){return nu(e)&&_r(e)==g};function Ka(e){if(!nu(e))return!1;var t=_r(e);return t==b||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!iu(e)}function Xa(e){if(!tu(e))return!1;var t=_r(e);return t==w||t==k||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ja(e){return"number"==typeof e&&e==yu(e)}function eu(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=f}function tu(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function nu(e){return null!=e&&"object"==typeof e}var ru=ht?Gt(ht):function(e){return nu(e)&&hi(e)==x};function ou(e){return"number"==typeof e||nu(e)&&_r(e)==S}function iu(e){if(!nu(e)||_r(e)!=_)return!1;var t=qe(e);if(null===t)return!0;var n=$e.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&Ie.call(n)==Ne}var au=pt?Gt(pt):function(e){return nu(e)&&_r(e)==O},uu=yt?Gt(yt):function(e){return nu(e)&&hi(e)==C};function lu(e){return"string"==typeof e||!Va(e)&&nu(e)&&_r(e)==j}function su(e){return"symbol"==typeof e||nu(e)&&_r(e)==P}var cu=vt?Gt(vt):function(e){return nu(e)&&eu(e.length)&&!!Xe[_r(e)]},fu=Vo(Dr),du=Vo((function(e,t){return e<=t}));function hu(e){if(!e)return[];if(Qa(e))return lu(e)?an(e):jo(e);if(at&&e[at])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[at]());var t=hi(e);return(t==x?Jt:t==C?nn:Fu)(e)}function pu(e){return e?(e=mu(e))===c||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function yu(e){var t=pu(e),n=t%1;return t==t?n?t-n:t:0}function vu(e){return e?ar(yu(e),0,h):0}function mu(e){if("number"==typeof e)return e;if(su(e))return d;if(tu(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=tu(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Ut(e);var n=pe.test(e);return n||ve.test(e)?nt(e.slice(2),n?2:8):he.test(e)?d:+e}function gu(e){return Po(e,$u(e))}function bu(e){return null==e?"":uo(e)}var wu=To((function(e,t){if(xi(t)||Qa(t))Po(t,Iu(t),e);else for(var n in t)$e.call(t,n)&&er(e,n,t[n])})),ku=To((function(e,t){Po(t,$u(t),e)})),xu=To((function(e,t,n,r){Po(t,$u(t),e,r)})),Su=To((function(e,t,n,r){Po(t,Iu(t),e,r)})),_u=ti(ir),Eu=Hr((function(e,t){e=_e(e);var n=-1,r=t.length,i=r>2?t[2]:o;for(i&&gi(t[0],t[1],i)&&(r=1);++n<r;)for(var a=t[n],u=$u(a),l=-1,s=u.length;++l<s;){var c=u[l],f=e[c];(f===o||Fa(f,Re[c])&&!$e.call(e,c))&&(e[c]=a[c])}return e})),Ou=Hr((function(e){return e.push(o,Xo),mt(Mu,o,e)}));function Cu(e,t,n){var r=null==e?o:xr(e,t);return r===o?n:r}function ju(e,t){return null!=e&&pi(e,t,Cr)}var Pu=Bo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=De.call(t)),e[t]=n}),tl(ol)),Ru=Bo((function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=De.call(t)),$e.call(e,t)?e[t].push(n):e[t]=[n]}),ui),Tu=Hr(Pr);function Iu(e){return Qa(e)?Yn(e):Mr(e)}function $u(e){return Qa(e)?Yn(e,!0):function(e){if(!tu(e))return function(e){var t=[];if(null!=e)for(var n in _e(e))t.push(n);return t}(e);var t=xi(e),n=[];for(var r in e)("constructor"!=r||!t&&$e.call(e,r))&&n.push(r);return n}(e)}var Lu=To((function(e,t,n){Br(e,t,n)})),Mu=To((function(e,t,n,r){Br(e,t,n,r)})),Du=ti((function(e,t){var n={};if(null==e)return n;var r=!1;t=Et(t,(function(t){return t=go(t,e),r||(r=t.length>1),t})),Po(e,ri(e),n),r&&(n=ur(n,7,Jo));for(var o=t.length;o--;)so(n,t[o]);return n})),Nu=ti((function(e,t){return null==e?{}:function(e,t){return Gr(e,t,(function(t,n){return ju(e,n)}))}(e,t)}));function Au(e,t){if(null==e)return{};var n=Et(ri(e),(function(e){return[e]}));return t=ui(t),Gr(e,n,(function(e,n){return t(e,n[0])}))}var zu=Yo(Iu),Bu=Yo($u);function Fu(e){return null==e?[]:Wt(e,Iu(e))}var Uu=Mo((function(e,t,n){return t=t.toLowerCase(),e+(n?Gu(t):t)}));function Gu(e){return Ku(bu(e).toLowerCase())}function Wu(e){return(e=bu(e))&&e.replace(ge,Yt).replace(Ve,"")}var Vu=Mo((function(e,t,n){return e+(n?"-":"")+t.toLowerCase()})),qu=Mo((function(e,t,n){return e+(n?" ":"")+t.toLowerCase()})),Qu=Lo("toLowerCase"),Hu=Mo((function(e,t,n){return e+(n?"_":"")+t.toLowerCase()})),Yu=Mo((function(e,t,n){return e+(n?" ":"")+Ku(t)})),Zu=Mo((function(e,t,n){return e+(n?" ":"")+t.toUpperCase()})),Ku=Lo("toUpperCase");function Xu(e,t,n){return e=bu(e),(t=n?o:t)===o?function(e){return Ye.test(e)}(e)?function(e){return e.match(Qe)||[]}(e):function(e){return e.match(le)||[]}(e):e.match(t)||[]}var Ju=Hr((function(e,t){try{return mt(e,o,t)}catch(e){return Ka(e)?e:new ke(e)}})),el=ti((function(e,t){return bt(t,(function(t){t=Ai(t),or(e,t,Ra(e[t],e))})),e}));function tl(e){return function(){return e}}var nl=Ao(),rl=Ao(!0);function ol(e){return e}function il(e){return Lr("function"==typeof e?e:ur(e,1))}var al=Hr((function(e,t){return function(n){return Pr(n,e,t)}})),ul=Hr((function(e,t){return function(n){return Pr(e,n,t)}}));function ll(e,t,n){var r=Iu(t),o=kr(t,r);null!=n||tu(t)&&(o.length||!r.length)||(n=t,t=e,e=this,o=kr(t,Iu(t)));var i=!(tu(n)&&"chain"in n&&!n.chain),a=Xa(e);return bt(o,(function(n){var r=t[n];e[n]=r,a&&(e.prototype[n]=function(){var t=this.__chain__;if(i||t){var n=e(this.__wrapped__),o=n.__actions__=jo(this.__actions__);return o.push({func:r,args:arguments,thisArg:e}),n.__chain__=t,n}return r.apply(e,Ot([this.value()],arguments))})})),e}function sl(){}var cl=Uo(Et),fl=Uo(kt),dl=Uo(Pt);function hl(e){return bi(e)?Nt(Ai(e)):function(e){return function(t){return xr(t,e)}}(e)}var pl=Wo(),yl=Wo(!0);function vl(){return[]}function ml(){return!1}var gl,bl=Fo((function(e,t){return e+t}),0),wl=Qo("ceil"),kl=Fo((function(e,t){return e/t}),1),xl=Qo("floor"),Sl=Fo((function(e,t){return e*t}),1),_l=Qo("round"),El=Fo((function(e,t){return e-t}),0);return zn.after=function(e,t){if("function"!=typeof t)throw new Ce(i);return e=yu(e),function(){if(--e<1)return t.apply(this,arguments)}},zn.ary=ja,zn.assign=wu,zn.assignIn=ku,zn.assignInWith=xu,zn.assignWith=Su,zn.at=_u,zn.before=Pa,zn.bind=Ra,zn.bindAll=el,zn.bindKey=Ta,zn.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return Va(e)?e:[e]},zn.chain=ha,zn.chunk=function(e,t,n){t=(n?gi(e,t,n):t===o)?1:mn(yu(t),0);var i=null==e?0:e.length;if(!i||t<1)return[];for(var a=0,u=0,l=r(cn(i/t));a<i;)l[u++]=to(e,a,a+=t);return l},zn.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,o=[];++t<n;){var i=e[t];i&&(o[r++]=i)}return o},zn.concat=function(){var e=arguments.length;if(!e)return[];for(var t=r(e-1),n=arguments[0],o=e;o--;)t[o-1]=arguments[o];return Ot(Va(n)?jo(n):[n],vr(t,1))},zn.cond=function(e){var t=null==e?0:e.length,n=ui();return e=t?Et(e,(function(e){if("function"!=typeof e[1])throw new Ce(i);return[n(e[0]),e[1]]})):[],Hr((function(n){for(var r=-1;++r<t;){var o=e[r];if(mt(o[0],this,n))return mt(o[1],this,n)}}))},zn.conforms=function(e){return function(e){var t=Iu(e);return function(n){return lr(n,e,t)}}(ur(e,1))},zn.constant=tl,zn.countBy=va,zn.create=function(e,t){var n=Bn(e);return null==t?n:rr(n,t)},zn.curry=function e(t,n,r){var i=Zo(t,8,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},zn.curryRight=function e(t,n,r){var i=Zo(t,16,o,o,o,o,o,n=r?o:n);return i.placeholder=e.placeholder,i},zn.debounce=Ia,zn.defaults=Eu,zn.defaultsDeep=Ou,zn.defer=$a,zn.delay=La,zn.difference=Fi,zn.differenceBy=Ui,zn.differenceWith=Gi,zn.drop=function(e,t,n){var r=null==e?0:e.length;return r?to(e,(t=n||t===o?1:yu(t))<0?0:t,r):[]},zn.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?to(e,0,(t=r-(t=n||t===o?1:yu(t)))<0?0:t):[]},zn.dropRightWhile=function(e,t){return e&&e.length?fo(e,ui(t,3),!0,!0):[]},zn.dropWhile=function(e,t){return e&&e.length?fo(e,ui(t,3),!0):[]},zn.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&gi(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=yu(n))<0&&(n=-n>i?0:i+n),(r=r===o||r>i?i:yu(r))<0&&(r+=i),r=n>r?0:vu(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},zn.filter=function(e,t){return(Va(e)?xt:yr)(e,ui(t,3))},zn.flatMap=function(e,t){return vr(_a(e,t),1)},zn.flatMapDeep=function(e,t){return vr(_a(e,t),c)},zn.flatMapDepth=function(e,t,n){return n=n===o?1:yu(n),vr(_a(e,t),n)},zn.flatten=qi,zn.flattenDeep=function(e){return null!=e&&e.length?vr(e,c):[]},zn.flattenDepth=function(e,t){return null!=e&&e.length?vr(e,t=t===o?1:yu(t)):[]},zn.flip=function(e){return Zo(e,512)},zn.flow=nl,zn.flowRight=rl,zn.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var o=e[t];r[o[0]]=o[1]}return r},zn.functions=function(e){return null==e?[]:kr(e,Iu(e))},zn.functionsIn=function(e){return null==e?[]:kr(e,$u(e))},zn.groupBy=ka,zn.initial=function(e){return null!=e&&e.length?to(e,0,-1):[]},zn.intersection=Hi,zn.intersectionBy=Yi,zn.intersectionWith=Zi,zn.invert=Pu,zn.invertBy=Ru,zn.invokeMap=xa,zn.iteratee=il,zn.keyBy=Sa,zn.keys=Iu,zn.keysIn=$u,zn.map=_a,zn.mapKeys=function(e,t){var n={};return t=ui(t,3),br(e,(function(e,r,o){or(n,t(e,r,o),e)})),n},zn.mapValues=function(e,t){var n={};return t=ui(t,3),br(e,(function(e,r,o){or(n,r,t(e,r,o))})),n},zn.matches=function(e){return Ar(ur(e,1))},zn.matchesProperty=function(e,t){return zr(e,ur(t,1))},zn.memoize=Ma,zn.merge=Lu,zn.mergeWith=Mu,zn.method=al,zn.methodOf=ul,zn.mixin=ll,zn.negate=Da,zn.nthArg=function(e){return e=yu(e),Hr((function(t){return Fr(t,e)}))},zn.omit=Du,zn.omitBy=function(e,t){return Au(e,Da(ui(t)))},zn.once=function(e){return Pa(2,e)},zn.orderBy=function(e,t,n,r){return null==e?[]:(Va(t)||(t=null==t?[]:[t]),Va(n=r?o:n)||(n=null==n?[]:[n]),Ur(e,t,n))},zn.over=cl,zn.overArgs=Na,zn.overEvery=fl,zn.overSome=dl,zn.partial=Aa,zn.partialRight=za,zn.partition=Ea,zn.pick=Nu,zn.pickBy=Au,zn.property=hl,zn.propertyOf=function(e){return function(t){return null==e?o:xr(e,t)}},zn.pull=Xi,zn.pullAll=Ji,zn.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?Wr(e,t,ui(n,2)):e},zn.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?Wr(e,t,o,n):e},zn.pullAt=ea,zn.range=pl,zn.rangeRight=yl,zn.rearg=Ba,zn.reject=function(e,t){return(Va(e)?xt:yr)(e,Da(ui(t,3)))},zn.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,o=[],i=e.length;for(t=ui(t,3);++r<i;){var a=e[r];t(a,r,e)&&(n.push(a),o.push(r))}return Vr(e,o),n},zn.rest=function(e,t){if("function"!=typeof e)throw new Ce(i);return Hr(e,t=t===o?t:yu(t))},zn.reverse=ta,zn.sampleSize=function(e,t,n){return t=(n?gi(e,t,n):t===o)?1:yu(t),(Va(e)?Kn:Zr)(e,t)},zn.set=function(e,t,n){return null==e?e:Kr(e,t,n)},zn.setWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:Kr(e,t,n,r)},zn.shuffle=function(e){return(Va(e)?Xn:eo)(e)},zn.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n&&"number"!=typeof n&&gi(e,t,n)?(t=0,n=r):(t=null==t?0:yu(t),n=n===o?r:yu(n)),to(e,t,n)):[]},zn.sortBy=Oa,zn.sortedUniq=function(e){return e&&e.length?io(e):[]},zn.sortedUniqBy=function(e,t){return e&&e.length?io(e,ui(t,2)):[]},zn.split=function(e,t,n){return n&&"number"!=typeof n&&gi(e,t,n)&&(t=n=o),(n=n===o?h:n>>>0)?(e=bu(e))&&("string"==typeof t||null!=t&&!au(t))&&!(t=uo(t))&&Xt(e)?wo(an(e),0,n):e.split(t,n):[]},zn.spread=function(e,t){if("function"!=typeof e)throw new Ce(i);return t=null==t?0:mn(yu(t),0),Hr((function(n){var r=n[t],o=wo(n,0,t);return r&&Ot(o,r),mt(e,this,o)}))},zn.tail=function(e){var t=null==e?0:e.length;return t?to(e,1,t):[]},zn.take=function(e,t,n){return e&&e.length?to(e,0,(t=n||t===o?1:yu(t))<0?0:t):[]},zn.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?to(e,(t=r-(t=n||t===o?1:yu(t)))<0?0:t,r):[]},zn.takeRightWhile=function(e,t){return e&&e.length?fo(e,ui(t,3),!1,!0):[]},zn.takeWhile=function(e,t){return e&&e.length?fo(e,ui(t,3)):[]},zn.tap=function(e,t){return t(e),e},zn.throttle=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new Ce(i);return tu(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Ia(e,t,{leading:r,maxWait:t,trailing:o})},zn.thru=pa,zn.toArray=hu,zn.toPairs=zu,zn.toPairsIn=Bu,zn.toPath=function(e){return Va(e)?Et(e,Ai):su(e)?[e]:jo(Ni(bu(e)))},zn.toPlainObject=gu,zn.transform=function(e,t,n){var r=Va(e),o=r||Ya(e)||cu(e);if(t=ui(t,4),null==n){var i=e&&e.constructor;n=o?r?new i:[]:tu(e)&&Xa(i)?Bn(qe(e)):{}}return(o?bt:br)(e,(function(e,r,o){return t(n,e,r,o)})),n},zn.unary=function(e){return ja(e,1)},zn.union=na,zn.unionBy=ra,zn.unionWith=oa,zn.uniq=function(e){return e&&e.length?lo(e):[]},zn.uniqBy=function(e,t){return e&&e.length?lo(e,ui(t,2)):[]},zn.uniqWith=function(e,t){return t="function"==typeof t?t:o,e&&e.length?lo(e,o,t):[]},zn.unset=function(e,t){return null==e||so(e,t)},zn.unzip=ia,zn.unzipWith=aa,zn.update=function(e,t,n){return null==e?e:co(e,t,mo(n))},zn.updateWith=function(e,t,n,r){return r="function"==typeof r?r:o,null==e?e:co(e,t,mo(n),r)},zn.values=Fu,zn.valuesIn=function(e){return null==e?[]:Wt(e,$u(e))},zn.without=ua,zn.words=Xu,zn.wrap=function(e,t){return Aa(mo(t),e)},zn.xor=la,zn.xorBy=sa,zn.xorWith=ca,zn.zip=fa,zn.zipObject=function(e,t){return yo(e||[],t||[],er)},zn.zipObjectDeep=function(e,t){return yo(e||[],t||[],Kr)},zn.zipWith=da,zn.entries=zu,zn.entriesIn=Bu,zn.extend=ku,zn.extendWith=xu,ll(zn,zn),zn.add=bl,zn.attempt=Ju,zn.camelCase=Uu,zn.capitalize=Gu,zn.ceil=wl,zn.clamp=function(e,t,n){return n===o&&(n=t,t=o),n!==o&&(n=(n=mu(n))==n?n:0),t!==o&&(t=(t=mu(t))==t?t:0),ar(mu(e),t,n)},zn.clone=function(e){return ur(e,4)},zn.cloneDeep=function(e){return ur(e,5)},zn.cloneDeepWith=function(e,t){return ur(e,5,t="function"==typeof t?t:o)},zn.cloneWith=function(e,t){return ur(e,4,t="function"==typeof t?t:o)},zn.conformsTo=function(e,t){return null==t||lr(e,t,Iu(t))},zn.deburr=Wu,zn.defaultTo=function(e,t){return null==e||e!=e?t:e},zn.divide=kl,zn.endsWith=function(e,t,n){e=bu(e),t=uo(t);var r=e.length,i=n=n===o?r:ar(yu(n),0,r);return(n-=t.length)>=0&&e.slice(n,i)==t},zn.eq=Fa,zn.escape=function(e){return(e=bu(e))&&H.test(e)?e.replace(q,Zt):e},zn.escapeRegExp=function(e){return(e=bu(e))&&ne.test(e)?e.replace(te,"\\$&"):e},zn.every=function(e,t,n){var r=Va(e)?kt:hr;return n&&gi(e,t,n)&&(t=o),r(e,ui(t,3))},zn.find=ma,zn.findIndex=Wi,zn.findKey=function(e,t){return Tt(e,ui(t,3),br)},zn.findLast=ga,zn.findLastIndex=Vi,zn.findLastKey=function(e,t){return Tt(e,ui(t,3),wr)},zn.floor=xl,zn.forEach=ba,zn.forEachRight=wa,zn.forIn=function(e,t){return null==e?e:mr(e,ui(t,3),$u)},zn.forInRight=function(e,t){return null==e?e:gr(e,ui(t,3),$u)},zn.forOwn=function(e,t){return e&&br(e,ui(t,3))},zn.forOwnRight=function(e,t){return e&&wr(e,ui(t,3))},zn.get=Cu,zn.gt=Ua,zn.gte=Ga,zn.has=function(e,t){return null!=e&&pi(e,t,Or)},zn.hasIn=ju,zn.head=Qi,zn.identity=ol,zn.includes=function(e,t,n,r){e=Qa(e)?e:Fu(e),n=n&&!r?yu(n):0;var o=e.length;return n<0&&(n=mn(o+n,0)),lu(e)?n<=o&&e.indexOf(t,n)>-1:!!o&&$t(e,t,n)>-1},zn.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var o=null==n?0:yu(n);return o<0&&(o=mn(r+o,0)),$t(e,t,o)},zn.inRange=function(e,t,n){return t=pu(t),n===o?(n=t,t=0):n=pu(n),function(e,t,n){return e>=gn(t,n)&&e<mn(t,n)}(e=mu(e),t,n)},zn.invoke=Tu,zn.isArguments=Wa,zn.isArray=Va,zn.isArrayBuffer=qa,zn.isArrayLike=Qa,zn.isArrayLikeObject=Ha,zn.isBoolean=function(e){return!0===e||!1===e||nu(e)&&_r(e)==m},zn.isBuffer=Ya,zn.isDate=Za,zn.isElement=function(e){return nu(e)&&1===e.nodeType&&!iu(e)},zn.isEmpty=function(e){if(null==e)return!0;if(Qa(e)&&(Va(e)||"string"==typeof e||"function"==typeof e.splice||Ya(e)||cu(e)||Wa(e)))return!e.length;var t=hi(e);if(t==x||t==C)return!e.size;if(xi(e))return!Mr(e).length;for(var n in e)if($e.call(e,n))return!1;return!0},zn.isEqual=function(e,t){return Tr(e,t)},zn.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:o)?n(e,t):o;return r===o?Tr(e,t,o,n):!!r},zn.isError=Ka,zn.isFinite=function(e){return"number"==typeof e&&pn(e)},zn.isFunction=Xa,zn.isInteger=Ja,zn.isLength=eu,zn.isMap=ru,zn.isMatch=function(e,t){return e===t||Ir(e,t,si(t))},zn.isMatchWith=function(e,t,n){return n="function"==typeof n?n:o,Ir(e,t,si(t),n)},zn.isNaN=function(e){return ou(e)&&e!=+e},zn.isNative=function(e){if(ki(e))throw new ke("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return $r(e)},zn.isNil=function(e){return null==e},zn.isNull=function(e){return null===e},zn.isNumber=ou,zn.isObject=tu,zn.isObjectLike=nu,zn.isPlainObject=iu,zn.isRegExp=au,zn.isSafeInteger=function(e){return Ja(e)&&e>=-9007199254740991&&e<=f},zn.isSet=uu,zn.isString=lu,zn.isSymbol=su,zn.isTypedArray=cu,zn.isUndefined=function(e){return e===o},zn.isWeakMap=function(e){return nu(e)&&hi(e)==R},zn.isWeakSet=function(e){return nu(e)&&"[object WeakSet]"==_r(e)},zn.join=function(e,t){return null==e?"":yn.call(e,t)},zn.kebabCase=Vu,zn.last=Ki,zn.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==o&&(i=(i=yu(n))<0?mn(r+i,0):gn(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):It(e,Mt,i,!0)},zn.lowerCase=qu,zn.lowerFirst=Qu,zn.lt=fu,zn.lte=du,zn.max=function(e){return e&&e.length?pr(e,ol,Er):o},zn.maxBy=function(e,t){return e&&e.length?pr(e,ui(t,2),Er):o},zn.mean=function(e){return Dt(e,ol)},zn.meanBy=function(e,t){return Dt(e,ui(t,2))},zn.min=function(e){return e&&e.length?pr(e,ol,Dr):o},zn.minBy=function(e,t){return e&&e.length?pr(e,ui(t,2),Dr):o},zn.stubArray=vl,zn.stubFalse=ml,zn.stubObject=function(){return{}},zn.stubString=function(){return""},zn.stubTrue=function(){return!0},zn.multiply=Sl,zn.nth=function(e,t){return e&&e.length?Fr(e,yu(t)):o},zn.noConflict=function(){return it._===this&&(it._=Ae),this},zn.noop=sl,zn.now=Ca,zn.pad=function(e,t,n){e=bu(e);var r=(t=yu(t))?on(e):0;if(!t||r>=t)return e;var o=(t-r)/2;return Go(fn(o),n)+e+Go(cn(o),n)},zn.padEnd=function(e,t,n){e=bu(e);var r=(t=yu(t))?on(e):0;return t&&r<t?e+Go(t-r,n):e},zn.padStart=function(e,t,n){e=bu(e);var r=(t=yu(t))?on(e):0;return t&&r<t?Go(t-r,n)+e:e},zn.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),wn(bu(e).replace(re,""),t||0)},zn.random=function(e,t,n){if(n&&"boolean"!=typeof n&&gi(e,t,n)&&(t=n=o),n===o&&("boolean"==typeof t?(n=t,t=o):"boolean"==typeof e&&(n=e,e=o)),e===o&&t===o?(e=0,t=1):(e=pu(e),t===o?(t=e,e=0):t=pu(t)),e>t){var r=e;e=t,t=r}if(n||e%1||t%1){var i=kn();return gn(e+i*(t-e+tt("1e-"+((i+"").length-1))),t)}return qr(e,t)},zn.reduce=function(e,t,n){var r=Va(e)?Ct:zt,o=arguments.length<3;return r(e,ui(t,4),n,o,fr)},zn.reduceRight=function(e,t,n){var r=Va(e)?jt:zt,o=arguments.length<3;return r(e,ui(t,4),n,o,dr)},zn.repeat=function(e,t,n){return t=(n?gi(e,t,n):t===o)?1:yu(t),Qr(bu(e),t)},zn.replace=function(){var e=arguments,t=bu(e[0]);return e.length<3?t:t.replace(e[1],e[2])},zn.result=function(e,t,n){var r=-1,i=(t=go(t,e)).length;for(i||(i=1,e=o);++r<i;){var a=null==e?o:e[Ai(t[r])];a===o&&(r=i,a=n),e=Xa(a)?a.call(e):a}return e},zn.round=_l,zn.runInContext=e,zn.sample=function(e){return(Va(e)?Zn:Yr)(e)},zn.size=function(e){if(null==e)return 0;if(Qa(e))return lu(e)?on(e):e.length;var t=hi(e);return t==x||t==C?e.size:Mr(e).length},zn.snakeCase=Hu,zn.some=function(e,t,n){var r=Va(e)?Pt:no;return n&&gi(e,t,n)&&(t=o),r(e,ui(t,3))},zn.sortedIndex=function(e,t){return ro(e,t)},zn.sortedIndexBy=function(e,t,n){return oo(e,t,ui(n,2))},zn.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=ro(e,t);if(r<n&&Fa(e[r],t))return r}return-1},zn.sortedLastIndex=function(e,t){return ro(e,t,!0)},zn.sortedLastIndexBy=function(e,t,n){return oo(e,t,ui(n,2),!0)},zn.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=ro(e,t,!0)-1;if(Fa(e[n],t))return n}return-1},zn.startCase=Yu,zn.startsWith=function(e,t,n){return e=bu(e),n=null==n?0:ar(yu(n),0,e.length),t=uo(t),e.slice(n,n+t.length)==t},zn.subtract=El,zn.sum=function(e){return e&&e.length?Bt(e,ol):0},zn.sumBy=function(e,t){return e&&e.length?Bt(e,ui(t,2)):0},zn.template=function(e,t,n){var r=zn.templateSettings;n&&gi(e,t,n)&&(t=o),e=bu(e),t=xu({},t,r,Ko);var i,a,u=xu({},t.imports,r.imports,Ko),l=Iu(u),s=Wt(u,l),c=0,f=t.interpolate||be,d="__p += '",h=Ee((t.escape||be).source+"|"+f.source+"|"+(f===K?fe:be).source+"|"+(t.evaluate||be).source+"|$","g"),p="//# sourceURL="+($e.call(t,"sourceURL")?(t.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ke+"]")+"\n";e.replace(h,(function(t,n,r,o,u,l){return r||(r=o),d+=e.slice(c,l).replace(we,Kt),n&&(i=!0,d+="' +\n__e("+n+") +\n'"),u&&(a=!0,d+="';\n"+u+";\n__p += '"),r&&(d+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),c=l+t.length,t})),d+="';\n";var y=$e.call(t,"variable")&&t.variable;if(y){if(se.test(y))throw new ke("Invalid `variable` option passed into `_.template`")}else d="with (obj) {\n"+d+"\n}\n";d=(a?d.replace(U,""):d).replace(G,"$1").replace(W,"$1;"),d="function("+(y||"obj")+") {\n"+(y?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(a?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+d+"return __p\n}";var v=Ju((function(){return xe(l,p+"return "+d).apply(o,s)}));if(v.source=d,Ka(v))throw v;return v},zn.times=function(e,t){if((e=yu(e))<1||e>f)return[];var n=h,r=gn(e,h);t=ui(t),e-=h;for(var o=Ft(r,t);++n<e;)t(n);return o},zn.toFinite=pu,zn.toInteger=yu,zn.toLength=vu,zn.toLower=function(e){return bu(e).toLowerCase()},zn.toNumber=mu,zn.toSafeInteger=function(e){return e?ar(yu(e),-9007199254740991,f):0===e?e:0},zn.toString=bu,zn.toUpper=function(e){return bu(e).toUpperCase()},zn.trim=function(e,t,n){if((e=bu(e))&&(n||t===o))return Ut(e);if(!e||!(t=uo(t)))return e;var r=an(e),i=an(t);return wo(r,qt(r,i),Qt(r,i)+1).join("")},zn.trimEnd=function(e,t,n){if((e=bu(e))&&(n||t===o))return e.slice(0,un(e)+1);if(!e||!(t=uo(t)))return e;var r=an(e);return wo(r,0,Qt(r,an(t))+1).join("")},zn.trimStart=function(e,t,n){if((e=bu(e))&&(n||t===o))return e.replace(re,"");if(!e||!(t=uo(t)))return e;var r=an(e);return wo(r,qt(r,an(t))).join("")},zn.truncate=function(e,t){var n=30,r="...";if(tu(t)){var i="separator"in t?t.separator:i;n="length"in t?yu(t.length):n,r="omission"in t?uo(t.omission):r}var a=(e=bu(e)).length;if(Xt(e)){var u=an(e);a=u.length}if(n>=a)return e;var l=n-on(r);if(l<1)return r;var s=u?wo(u,0,l).join(""):e.slice(0,l);if(i===o)return s+r;if(u&&(l+=s.length-l),au(i)){if(e.slice(l).search(i)){var c,f=s;for(i.global||(i=Ee(i.source,bu(de.exec(i))+"g")),i.lastIndex=0;c=i.exec(f);)var d=c.index;s=s.slice(0,d===o?l:d)}}else if(e.indexOf(uo(i),l)!=l){var h=s.lastIndexOf(i);h>-1&&(s=s.slice(0,h))}return s+r},zn.unescape=function(e){return(e=bu(e))&&Q.test(e)?e.replace(V,ln):e},zn.uniqueId=function(e){var t=++Le;return bu(e)+t},zn.upperCase=Zu,zn.upperFirst=Ku,zn.each=ba,zn.eachRight=wa,zn.first=Qi,ll(zn,(gl={},br(zn,(function(e,t){$e.call(zn.prototype,t)||(gl[t]=e)})),gl),{chain:!1}),zn.VERSION="4.17.21",bt(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(e){zn[e].placeholder=zn})),bt(["drop","take"],(function(e,t){Gn.prototype[e]=function(n){n=n===o?1:mn(yu(n),0);var r=this.__filtered__&&!t?new Gn(this):this.clone();return r.__filtered__?r.__takeCount__=gn(n,r.__takeCount__):r.__views__.push({size:gn(n,h),type:e+(r.__dir__<0?"Right":"")}),r},Gn.prototype[e+"Right"]=function(t){return this.reverse()[e](t).reverse()}})),bt(["filter","map","takeWhile"],(function(e,t){var n=t+1,r=1==n||3==n;Gn.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:ui(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}})),bt(["head","last"],(function(e,t){var n="take"+(t?"Right":"");Gn.prototype[e]=function(){return this[n](1).value()[0]}})),bt(["initial","tail"],(function(e,t){var n="drop"+(t?"":"Right");Gn.prototype[e]=function(){return this.__filtered__?new Gn(this):this[n](1)}})),Gn.prototype.compact=function(){return this.filter(ol)},Gn.prototype.find=function(e){return this.filter(e).head()},Gn.prototype.findLast=function(e){return this.reverse().find(e)},Gn.prototype.invokeMap=Hr((function(e,t){return"function"==typeof e?new Gn(this):this.map((function(n){return Pr(n,e,t)}))})),Gn.prototype.reject=function(e){return this.filter(Da(ui(e)))},Gn.prototype.slice=function(e,t){e=yu(e);var n=this;return n.__filtered__&&(e>0||t<0)?new Gn(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==o&&(n=(t=yu(t))<0?n.dropRight(-t):n.take(t-e)),n)},Gn.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Gn.prototype.toArray=function(){return this.take(h)},br(Gn.prototype,(function(e,t){var n=/^(?:filter|find|map|reject)|While$/.test(t),r=/^(?:head|last)$/.test(t),i=zn[r?"take"+("last"==t?"Right":""):t],a=r||/^find/.test(t);i&&(zn.prototype[t]=function(){var t=this.__wrapped__,u=r?[1]:arguments,l=t instanceof Gn,s=u[0],c=l||Va(t),f=function(e){var t=i.apply(zn,Ot([e],u));return r&&d?t[0]:t};c&&n&&"function"==typeof s&&1!=s.length&&(l=c=!1);var d=this.__chain__,h=!!this.__actions__.length,p=a&&!d,y=l&&!h;if(!a&&c){t=y?t:new Gn(this);var v=e.apply(t,u);return v.__actions__.push({func:pa,args:[f],thisArg:o}),new Un(v,d)}return p&&y?e.apply(this,u):(v=this.thru(f),p?r?v.value()[0]:v.value():v)})})),bt(["pop","push","shift","sort","splice","unshift"],(function(e){var t=je[e],n=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",r=/^(?:pop|shift)$/.test(e);zn.prototype[e]=function(){var e=arguments;if(r&&!this.__chain__){var o=this.value();return t.apply(Va(o)?o:[],e)}return this[n]((function(n){return t.apply(Va(n)?n:[],e)}))}})),br(Gn.prototype,(function(e,t){var n=zn[t];if(n){var r=n.name+"";$e.call(Rn,r)||(Rn[r]=[]),Rn[r].push({name:t,func:n})}})),Rn[zo(o,2).name]=[{name:"wrapper",func:o}],Gn.prototype.clone=function(){var e=new Gn(this.__wrapped__);return e.__actions__=jo(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=jo(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=jo(this.__views__),e},Gn.prototype.reverse=function(){if(this.__filtered__){var e=new Gn(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},Gn.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=Va(e),r=t<0,o=n?e.length:0,i=function(e,t,n){for(var r=-1,o=n.length;++r<o;){var i=n[r],a=i.size;switch(i.type){case"drop":e+=a;break;case"dropRight":t-=a;break;case"take":t=gn(t,e+a);break;case"takeRight":e=mn(e,t-a)}}return{start:e,end:t}}(0,o,this.__views__),a=i.start,u=i.end,l=u-a,s=r?u:a-1,c=this.__iteratees__,f=c.length,d=0,h=gn(l,this.__takeCount__);if(!n||!r&&o==l&&h==l)return ho(e,this.__actions__);var p=[];e:for(;l--&&d<h;){for(var y=-1,v=e[s+=t];++y<f;){var m=c[y],g=m.iteratee,b=m.type,w=g(v);if(2==b)v=w;else if(!w){if(1==b)continue e;break e}}p[d++]=v}return p},zn.prototype.at=ya,zn.prototype.chain=function(){return ha(this)},zn.prototype.commit=function(){return new Un(this.value(),this.__chain__)},zn.prototype.next=function(){this.__values__===o&&(this.__values__=hu(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?o:this.__values__[this.__index__++]}},zn.prototype.plant=function(e){for(var t,n=this;n instanceof Fn;){var r=Bi(n);r.__index__=0,r.__values__=o,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},zn.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof Gn){var t=e;return this.__actions__.length&&(t=new Gn(this)),(t=t.reverse()).__actions__.push({func:pa,args:[ta],thisArg:o}),new Un(t,this.__chain__)}return this.thru(ta)},zn.prototype.toJSON=zn.prototype.valueOf=zn.prototype.value=function(){return ho(this.__wrapped__,this.__actions__)},zn.prototype.first=zn.prototype.head,at&&(zn.prototype[at]=function(){return this}),zn}();it._=sn,(r=function(){return sn}.call(t,n,t,e))===o||(e.exports=r)}.call(this)},418:e=>{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;function o(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,i){for(var a,u,l=o(e),s=1;s<arguments.length;s++){for(var c in a=Object(arguments[s]))n.call(a,c)&&(l[c]=a[c]);if(t){u=t(a);for(var f=0;f<u.length;f++)r.call(a,u[f])&&(l[u[f]]=a[u[f]])}}return l}},448:(e,t,n)=>{"use strict";var r=n(294),o=n(418),i=n(840);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}if(!r)throw Error(a(227));var u=new Set,l={};function s(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(l[e]=t,e=0;e<t.length;e++)u.add(t[e])}var f=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),d=/^[: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][: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\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,h=Object.prototype.hasOwnProperty,p={},y={};function v(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var m={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){m[e]=new v(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];m[t]=new v(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){m[e]=new v(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){m[e]=new v(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){m[e]=new v(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){m[e]=new v(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){m[e]=new v(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){m[e]=new v(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){m[e]=new v(e,5,!1,e.toLowerCase(),null,!1,!1)}));var g=/[\-:]([a-z])/g;function b(e){return e[1].toUpperCase()}function w(e,t,n,r){var o=m.hasOwnProperty(t)?m[t]:null;(null!==o?0===o.type:!r&&2<t.length&&("o"===t[0]||"O"===t[0])&&("n"===t[1]||"N"===t[1]))||(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!h.call(y,e)||!h.call(p,e)&&(d.test(e)?y[e]=!0:(p[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(g,b);m[t]=new v(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(g,b);m[t]=new v(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(g,b);m[t]=new v(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){m[e]=new v(e,1,!1,e.toLowerCase(),null,!1,!1)})),m.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){m[e]=new v(e,1,!1,e.toLowerCase(),null,!0,!0)}));var k=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=60103,S=60106,_=60107,E=60108,O=60114,C=60109,j=60110,P=60112,R=60113,T=60120,I=60115,$=60116,L=60121,M=60128,D=60129,N=60130,A=60131;if("function"==typeof Symbol&&Symbol.for){var z=Symbol.for;x=z("react.element"),S=z("react.portal"),_=z("react.fragment"),E=z("react.strict_mode"),O=z("react.profiler"),C=z("react.provider"),j=z("react.context"),P=z("react.forward_ref"),R=z("react.suspense"),T=z("react.suspense_list"),I=z("react.memo"),$=z("react.lazy"),L=z("react.block"),z("react.scope"),M=z("react.opaque.id"),D=z("react.debug_trace_mode"),N=z("react.offscreen"),A=z("react.legacy_hidden")}var B,F="function"==typeof Symbol&&Symbol.iterator;function U(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=F&&e[F]||e["@@iterator"])?e:null}function G(e){if(void 0===B)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);B=t&&t[1]||""}return"\n"+B+e}var W=!1;function V(e,t){if(!e||W)return"";W=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(e){if(e&&r&&"string"==typeof e.stack){for(var o=e.stack.split("\n"),i=r.stack.split("\n"),a=o.length-1,u=i.length-1;1<=a&&0<=u&&o[a]!==i[u];)u--;for(;1<=a&&0<=u;a--,u--)if(o[a]!==i[u]){if(1!==a||1!==u)do{if(a--,0>--u||o[a]!==i[u])return"\n"+o[a].replace(" at new "," at ")}while(1<=a&&0<=u);break}}}finally{W=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?G(e):""}function q(e){switch(e.tag){case 5:return G(e.type);case 16:return G("Lazy");case 13:return G("Suspense");case 19:return G("SuspenseList");case 0:case 2:case 15:return V(e.type,!1);case 11:return V(e.type.render,!1);case 22:return V(e.type._render,!1);case 1:return V(e.type,!0);default:return""}}function Q(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case _:return"Fragment";case S:return"Portal";case O:return"Profiler";case E:return"StrictMode";case R:return"Suspense";case T:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case j:return(e.displayName||"Context")+".Consumer";case C:return(e._context.displayName||"Context")+".Provider";case P:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case I:return Q(e.type);case L:return Q(e._render);case $:t=e._payload,e=e._init;try{return Q(e(t))}catch(e){}}return null}function H(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function Y(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function Z(e){e._valueTracker||(e._valueTracker=function(e){var t=Y(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function K(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Y(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function X(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function J(e,t){var n=t.checked;return o({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function ee(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=H(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function te(e,t){null!=(t=t.checked)&&w(e,"checked",t,!1)}function ne(e,t){te(e,t);var n=H(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?oe(e,t.type,n):t.hasOwnProperty("defaultValue")&&oe(e,t.type,H(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function re(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function oe(e,t,n){"number"===t&&X(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function ie(e,t){return e=o({children:void 0},t),(t=function(e){var t="";return r.Children.forEach(e,(function(e){null!=e&&(t+=e)})),t}(t.children))&&(e.children=t),e}function ae(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+H(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function ue(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return o({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function le(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(Array.isArray(n)){if(!(1>=n.length))throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:H(n)}}function se(e,t){var n=H(t.value),r=H(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ce(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}var fe="http://www.w3.org/1999/xhtml";function de(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function he(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?de(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var pe,ye,ve=(ye=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((pe=pe||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=pe.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ye(e,t)}))}:ye);function me(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var ge={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},be=["Webkit","ms","Moz","O"];function we(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||ge.hasOwnProperty(e)&&ge[e]?(""+t).trim():t+"px"}function ke(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=we(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(ge).forEach((function(e){be.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),ge[t]=ge[e]}))}));var xe=o({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Se(e,t){if(t){if(xe[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62))}}function _e(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function Ee(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Oe=null,Ce=null,je=null;function Pe(e){if(e=no(e)){if("function"!=typeof Oe)throw Error(a(280));var t=e.stateNode;t&&(t=oo(t),Oe(e.stateNode,e.type,t))}}function Re(e){Ce?je?je.push(e):je=[e]:Ce=e}function Te(){if(Ce){var e=Ce,t=je;if(je=Ce=null,Pe(e),t)for(e=0;e<t.length;e++)Pe(t[e])}}function Ie(e,t){return e(t)}function $e(e,t,n,r,o){return e(t,n,r,o)}function Le(){}var Me=Ie,De=!1,Ne=!1;function Ae(){null===Ce&&null===je||(Le(),Te())}function ze(e,t){var n=e.stateNode;if(null===n)return null;var r=oo(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}var Be=!1;if(f)try{var Fe={};Object.defineProperty(Fe,"passive",{get:function(){Be=!0}}),window.addEventListener("test",Fe,Fe),window.removeEventListener("test",Fe,Fe)}catch(ye){Be=!1}function Ue(e,t,n,r,o,i,a,u,l){var s=Array.prototype.slice.call(arguments,3);try{t.apply(n,s)}catch(e){this.onError(e)}}var Ge=!1,We=null,Ve=!1,qe=null,Qe={onError:function(e){Ge=!0,We=e}};function He(e,t,n,r,o,i,a,u,l){Ge=!1,We=null,Ue.apply(Qe,arguments)}function Ye(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(1026&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Ze(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function Ke(e){if(Ye(e)!==e)throw Error(a(188))}function Xe(e){if(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ye(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var i=o.alternate;if(null===i){if(null!==(r=o.return)){n=r;continue}break}if(o.child===i.child){for(i=o.child;i;){if(i===n)return Ke(o),e;if(i===r)return Ke(o),t;i=i.sibling}throw Error(a(188))}if(n.return!==r.return)n=o,r=i;else{for(var u=!1,l=o.child;l;){if(l===n){u=!0,n=o,r=i;break}if(l===r){u=!0,r=o,n=i;break}l=l.sibling}if(!u){for(l=i.child;l;){if(l===n){u=!0,n=i,r=o;break}if(l===r){u=!0,r=i,n=o;break}l=l.sibling}if(!u)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e),!e)return null;for(var t=e;;){if(5===t.tag||6===t.tag)return t;if(t.child)t.child.return=t,t=t.child;else{if(t===e)break;for(;!t.sibling;){if(!t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}}return null}function Je(e,t){for(var n=e.alternate;null!==t;){if(t===e||t===n)return!0;t=t.return}return!1}var et,tt,nt,rt,ot=!1,it=[],at=null,ut=null,lt=null,st=new Map,ct=new Map,ft=[],dt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function ht(e,t,n,r,o){return{blockedOn:e,domEventName:t,eventSystemFlags:16|n,nativeEvent:o,targetContainers:[r]}}function pt(e,t){switch(e){case"focusin":case"focusout":at=null;break;case"dragenter":case"dragleave":ut=null;break;case"mouseover":case"mouseout":lt=null;break;case"pointerover":case"pointerout":st.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":ct.delete(t.pointerId)}}function yt(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e=ht(t,n,r,o,i),null!==t&&null!==(t=no(t))&&tt(t),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function vt(e){var t=to(e.target);if(null!==t){var n=Ye(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Ze(n)))return e.blockedOn=t,void rt(e.lanePriority,(function(){i.unstable_runWithPriority(e.priority,(function(){nt(n)}))}))}else if(3===t&&n.stateNode.hydrate)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function mt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Xt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=no(n))&&tt(t),e.blockedOn=n,!1;t.shift()}return!0}function gt(e,t,n){mt(e)&&n.delete(t)}function bt(){for(ot=!1;0<it.length;){var e=it[0];if(null!==e.blockedOn){null!==(e=no(e.blockedOn))&&et(e);break}for(var t=e.targetContainers;0<t.length;){var n=Xt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n){e.blockedOn=n;break}t.shift()}null===e.blockedOn&&it.shift()}null!==at&&mt(at)&&(at=null),null!==ut&&mt(ut)&&(ut=null),null!==lt&&mt(lt)&&(lt=null),st.forEach(gt),ct.forEach(gt)}function wt(e,t){e.blockedOn===t&&(e.blockedOn=null,ot||(ot=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,bt)))}function kt(e){function t(t){return wt(t,e)}if(0<it.length){wt(it[0],e);for(var n=1;n<it.length;n++){var r=it[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==at&&wt(at,e),null!==ut&&wt(ut,e),null!==lt&&wt(lt,e),st.forEach(t),ct.forEach(t),n=0;n<ft.length;n++)(r=ft[n]).blockedOn===e&&(r.blockedOn=null);for(;0<ft.length&&null===(n=ft[0]).blockedOn;)vt(n),null===n.blockedOn&&ft.shift()}function xt(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var St={animationend:xt("Animation","AnimationEnd"),animationiteration:xt("Animation","AnimationIteration"),animationstart:xt("Animation","AnimationStart"),transitionend:xt("Transition","TransitionEnd")},_t={},Et={};function Ot(e){if(_t[e])return _t[e];if(!St[e])return e;var t,n=St[e];for(t in n)if(n.hasOwnProperty(t)&&t in Et)return _t[e]=n[t];return e}f&&(Et=document.createElement("div").style,"AnimationEvent"in window||(delete St.animationend.animation,delete St.animationiteration.animation,delete St.animationstart.animation),"TransitionEvent"in window||delete St.transitionend.transition);var Ct=Ot("animationend"),jt=Ot("animationiteration"),Pt=Ot("animationstart"),Rt=Ot("transitionend"),Tt=new Map,It=new Map,$t=["abort","abort",Ct,"animationEnd",jt,"animationIteration",Pt,"animationStart","canplay","canPlay","canplaythrough","canPlayThrough","durationchange","durationChange","emptied","emptied","encrypted","encrypted","ended","ended","error","error","gotpointercapture","gotPointerCapture","load","load","loadeddata","loadedData","loadedmetadata","loadedMetadata","loadstart","loadStart","lostpointercapture","lostPointerCapture","playing","playing","progress","progress","seeking","seeking","stalled","stalled","suspend","suspend","timeupdate","timeUpdate",Rt,"transitionEnd","waiting","waiting"];function Lt(e,t){for(var n=0;n<e.length;n+=2){var r=e[n],o=e[n+1];o="on"+(o[0].toUpperCase()+o.slice(1)),It.set(r,t),Tt.set(r,o),s(o,[r])}}(0,i.unstable_now)();var Mt=8;function Dt(e){if(0!=(1&e))return Mt=15,1;if(0!=(2&e))return Mt=14,2;if(0!=(4&e))return Mt=13,4;var t=24&e;return 0!==t?(Mt=12,t):0!=(32&e)?(Mt=11,32):0!=(t=192&e)?(Mt=10,t):0!=(256&e)?(Mt=9,256):0!=(t=3584&e)?(Mt=8,t):0!=(4096&e)?(Mt=7,4096):0!=(t=4186112&e)?(Mt=6,t):0!=(t=62914560&e)?(Mt=5,t):67108864&e?(Mt=4,67108864):0!=(134217728&e)?(Mt=3,134217728):0!=(t=805306368&e)?(Mt=2,t):0!=(1073741824&e)?(Mt=1,1073741824):(Mt=8,e)}function Nt(e,t){var n=e.pendingLanes;if(0===n)return Mt=0;var r=0,o=0,i=e.expiredLanes,a=e.suspendedLanes,u=e.pingedLanes;if(0!==i)r=i,o=Mt=15;else if(0!=(i=134217727&n)){var l=i&~a;0!==l?(r=Dt(l),o=Mt):0!=(u&=i)&&(r=Dt(u),o=Mt)}else 0!=(i=n&~a)?(r=Dt(i),o=Mt):0!==u&&(r=Dt(u),o=Mt);if(0===r)return 0;if(r=n&((0>(r=31-Gt(r))?0:1<<r)<<1)-1,0!==t&&t!==r&&0==(t&a)){if(Dt(t),o<=Mt)return t;Mt=o}if(0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-Gt(t)),r|=e[n],t&=~o;return r}function At(e){return 0!=(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function zt(e,t){switch(e){case 15:return 1;case 14:return 2;case 12:return 0===(e=Bt(24&~t))?zt(10,t):e;case 10:return 0===(e=Bt(192&~t))?zt(8,t):e;case 8:return 0===(e=Bt(3584&~t))&&0===(e=Bt(4186112&~t))&&(e=512),e;case 2:return 0===(t=Bt(805306368&~t))&&(t=268435456),t}throw Error(a(358,e))}function Bt(e){return e&-e}function Ft(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ut(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,(e=e.eventTimes)[t=31-Gt(t)]=n}var Gt=Math.clz32?Math.clz32:function(e){return 0===e?32:31-(Wt(e)/Vt|0)|0},Wt=Math.log,Vt=Math.LN2,qt=i.unstable_UserBlockingPriority,Qt=i.unstable_runWithPriority,Ht=!0;function Yt(e,t,n,r){De||Le();var o=Kt,i=De;De=!0;try{$e(o,e,t,n,r)}finally{(De=i)||Ae()}}function Zt(e,t,n,r){Qt(qt,Kt.bind(null,e,t,n,r))}function Kt(e,t,n,r){var o;if(Ht)if((o=0==(4&t))&&0<it.length&&-1<dt.indexOf(e))e=ht(null,e,t,n,r),it.push(e);else{var i=Xt(e,t,n,r);if(null===i)o&&pt(e,r);else{if(o){if(-1<dt.indexOf(e))return e=ht(i,e,t,n,r),void it.push(e);if(function(e,t,n,r,o){switch(t){case"focusin":return at=yt(at,e,t,n,r,o),!0;case"dragenter":return ut=yt(ut,e,t,n,r,o),!0;case"mouseover":return lt=yt(lt,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return st.set(i,yt(st.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,ct.set(i,yt(ct.get(i)||null,e,t,n,r,o)),!0}return!1}(i,e,t,n,r))return;pt(e,r)}Lr(e,t,r,null,n)}}}function Xt(e,t,n,r){var o=Ee(r);if(null!==(o=to(o))){var i=Ye(o);if(null===i)o=null;else{var a=i.tag;if(13===a){if(null!==(o=Ze(i)))return o;o=null}else if(3===a){if(i.stateNode.hydrate)return 3===i.tag?i.stateNode.containerInfo:null;o=null}else i!==o&&(o=null)}}return Lr(e,t,r,o,n),null}var Jt=null,en=null,tn=null;function nn(){if(tn)return tn;var e,t,n=en,r=n.length,o="value"in Jt?Jt.value:Jt.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return tn=o.slice(e,1<t?1-t:void 0)}function rn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function on(){return!0}function an(){return!1}function un(e){function t(t,n,r,o,i){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(o):o[a]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?on:an,this.isPropagationStopped=an,this}return o(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=on)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=on)},persist:function(){},isPersistent:on}),t}var ln,sn,cn,fn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},dn=un(fn),hn=o({},fn,{view:0,detail:0}),pn=un(hn),yn=o({},hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Cn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==cn&&(cn&&"mousemove"===e.type?(ln=e.screenX-cn.screenX,sn=e.screenY-cn.screenY):sn=ln=0,cn=e),ln)},movementY:function(e){return"movementY"in e?e.movementY:sn}}),vn=un(yn),mn=un(o({},yn,{dataTransfer:0})),gn=un(o({},hn,{relatedTarget:0})),bn=un(o({},fn,{animationName:0,elapsedTime:0,pseudoElement:0})),wn=o({},fn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),kn=un(wn),xn=un(o({},fn,{data:0})),Sn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_n={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},En={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function On(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=En[e])&&!!t[e]}function Cn(){return On}var jn=o({},hn,{key:function(e){if(e.key){var t=Sn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=rn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?_n[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Cn,charCode:function(e){return"keypress"===e.type?rn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?rn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Pn=un(jn),Rn=un(o({},yn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Tn=un(o({},hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Cn})),In=un(o({},fn,{propertyName:0,elapsedTime:0,pseudoElement:0})),$n=o({},yn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Ln=un($n),Mn=[9,13,27,32],Dn=f&&"CompositionEvent"in window,Nn=null;f&&"documentMode"in document&&(Nn=document.documentMode);var An=f&&"TextEvent"in window&&!Nn,zn=f&&(!Dn||Nn&&8<Nn&&11>=Nn),Bn=String.fromCharCode(32),Fn=!1;function Un(e,t){switch(e){case"keyup":return-1!==Mn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Gn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Wn=!1,Vn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function qn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Vn[e.type]:"textarea"===t}function Qn(e,t,n,r){Re(r),0<(t=Dr(t,"onChange")).length&&(n=new dn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Hn=null,Yn=null;function Zn(e){jr(e,0)}function Kn(e){if(K(ro(e)))return e}function Xn(e,t){if("change"===e)return t}var Jn=!1;if(f){var er;if(f){var tr="oninput"in document;if(!tr){var nr=document.createElement("div");nr.setAttribute("oninput","return;"),tr="function"==typeof nr.oninput}er=tr}else er=!1;Jn=er&&(!document.documentMode||9<document.documentMode)}function rr(){Hn&&(Hn.detachEvent("onpropertychange",or),Yn=Hn=null)}function or(e){if("value"===e.propertyName&&Kn(Yn)){var t=[];if(Qn(t,Yn,e,Ee(e)),e=Zn,De)e(t);else{De=!0;try{Ie(e,t)}finally{De=!1,Ae()}}}}function ir(e,t,n){"focusin"===e?(rr(),Yn=n,(Hn=t).attachEvent("onpropertychange",or)):"focusout"===e&&rr()}function ar(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Kn(Yn)}function ur(e,t){if("click"===e)return Kn(t)}function lr(e,t){if("input"===e||"change"===e)return Kn(t)}var sr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},cr=Object.prototype.hasOwnProperty;function fr(e,t){if(sr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++)if(!cr.call(t,n[r])||!sr(e[n[r]],t[n[r]]))return!1;return!0}function dr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function hr(e,t){var n,r=dr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=dr(r)}}function pr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?pr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function yr(){for(var e=window,t=X();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=X((e=t.contentWindow).document)}return t}function vr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}var mr=f&&"documentMode"in document&&11>=document.documentMode,gr=null,br=null,wr=null,kr=!1;function xr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;kr||null==gr||gr!==X(r)||(r="selectionStart"in(r=gr)&&vr(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},wr&&fr(wr,r)||(wr=r,0<(r=Dr(br,"onSelect")).length&&(t=new dn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gr)))}Lt("cancel cancel click click close close contextmenu contextMenu copy copy cut cut auxclick auxClick dblclick doubleClick dragend dragEnd dragstart dragStart drop drop focusin focus focusout blur input input invalid invalid keydown keyDown keypress keyPress keyup keyUp mousedown mouseDown mouseup mouseUp paste paste pause pause play play pointercancel pointerCancel pointerdown pointerDown pointerup pointerUp ratechange rateChange reset reset seeked seeked submit submit touchcancel touchCancel touchend touchEnd touchstart touchStart volumechange volumeChange".split(" "),0),Lt("drag drag dragenter dragEnter dragexit dragExit dragleave dragLeave dragover dragOver mousemove mouseMove mouseout mouseOut mouseover mouseOver pointermove pointerMove pointerout pointerOut pointerover pointerOver scroll scroll toggle toggle touchmove touchMove wheel wheel".split(" "),1),Lt($t,2);for(var Sr="change selectionchange textInput compositionstart compositionend compositionupdate".split(" "),_r=0;_r<Sr.length;_r++)It.set(Sr[_r],0);c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),s("onBeforeInput",["compositionend","keypress","textInput","paste"]),s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Er="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Or=new Set("cancel close invalid load scroll toggle".split(" ").concat(Er));function Cr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,i,u,l,s){if(He.apply(this,arguments),Ge){if(!Ge)throw Error(a(198));var c=We;Ge=!1,We=null,Ve||(Ve=!0,qe=c)}}(r,t,void 0,e),e.currentTarget=null}function jr(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var u=r[a],l=u.instance,s=u.currentTarget;if(u=u.listener,l!==i&&o.isPropagationStopped())break e;Cr(o,u,s),i=l}else for(a=0;a<r.length;a++){if(l=(u=r[a]).instance,s=u.currentTarget,u=u.listener,l!==i&&o.isPropagationStopped())break e;Cr(o,u,s),i=l}}}if(Ve)throw e=qe,Ve=!1,qe=null,e}function Pr(e,t){var n=io(t),r=e+"__bubble";n.has(r)||($r(t,e,2,!1),n.add(r))}var Rr="_reactListening"+Math.random().toString(36).slice(2);function Tr(e){e[Rr]||(e[Rr]=!0,u.forEach((function(t){Or.has(t)||Ir(t,!1,e,null),Ir(t,!0,e,null)})))}function Ir(e,t,n,r){var o=4<arguments.length&&void 0!==arguments[4]?arguments[4]:0,i=n;if("selectionchange"===e&&9!==n.nodeType&&(i=n.ownerDocument),null!==r&&!t&&Or.has(e)){if("scroll"!==e)return;o|=2,i=r}var a=io(i),u=e+"__"+(t?"capture":"bubble");a.has(u)||(t&&(o|=4),$r(i,e,o,t),a.add(u))}function $r(e,t,n,r){var o=It.get(t);switch(void 0===o?2:o){case 0:o=Yt;break;case 1:o=Zt;break;default:o=Kt}n=o.bind(null,t,n,e),o=void 0,!Be||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Lr(e,t,n,r,o){var i=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var u=r.stateNode.containerInfo;if(u===o||8===u.nodeType&&u.parentNode===o)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===o||8===l.nodeType&&l.parentNode===o))return;a=a.return}for(;null!==u;){if(null===(a=to(u)))return;if(5===(l=a.tag)||6===l){r=i=a;continue e}u=u.parentNode}}r=r.return}!function(e,t,n){if(Ne)return e();Ne=!0;try{Me(e,t,n)}finally{Ne=!1,Ae()}}((function(){var r=i,o=Ee(n),a=[];e:{var u=Tt.get(e);if(void 0!==u){var l=dn,s=e;switch(e){case"keypress":if(0===rn(n))break e;case"keydown":case"keyup":l=Pn;break;case"focusin":s="focus",l=gn;break;case"focusout":s="blur",l=gn;break;case"beforeblur":case"afterblur":l=gn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=vn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=mn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Tn;break;case Ct:case jt:case Pt:l=bn;break;case Rt:l=In;break;case"scroll":l=pn;break;case"wheel":l=Ln;break;case"copy":case"cut":case"paste":l=kn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Rn}var c=0!=(4&t),f=!c&&"scroll"===e,d=c?null!==u?u+"Capture":null:u;c=[];for(var h,p=r;null!==p;){var y=(h=p).stateNode;if(5===h.tag&&null!==y&&(h=y,null!==d&&null!=(y=ze(p,d))&&c.push(Mr(p,y,h))),f)break;p=p.return}0<c.length&&(u=new l(u,s,null,n,o),a.push({event:u,listeners:c}))}}if(0==(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(u="mouseover"===e||"pointerover"===e)||0!=(16&t)||!(s=n.relatedTarget||n.fromElement)||!to(s)&&!s[Jr])&&(l||u)&&(u=o.window===o?o:(u=o.ownerDocument)?u.defaultView||u.parentWindow:window,l?(l=r,null!==(s=(s=n.relatedTarget||n.toElement)?to(s):null)&&(s!==(f=Ye(s))||5!==s.tag&&6!==s.tag)&&(s=null)):(l=null,s=r),l!==s)){if(c=vn,y="onMouseLeave",d="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(c=Rn,y="onPointerLeave",d="onPointerEnter",p="pointer"),f=null==l?u:ro(l),h=null==s?u:ro(s),(u=new c(y,p+"leave",l,n,o)).target=f,u.relatedTarget=h,y=null,to(o)===r&&((c=new c(d,p+"enter",s,n,o)).target=h,c.relatedTarget=f,y=c),f=y,l&&s)e:{for(d=s,p=0,h=c=l;h;h=Nr(h))p++;for(h=0,y=d;y;y=Nr(y))h++;for(;0<p-h;)c=Nr(c),p--;for(;0<h-p;)d=Nr(d),h--;for(;p--;){if(c===d||null!==d&&c===d.alternate)break e;c=Nr(c),d=Nr(d)}c=null}else c=null;null!==l&&Ar(a,u,l,c,!1),null!==s&&null!==f&&Ar(a,f,s,c,!0)}if("select"===(l=(u=r?ro(r):window).nodeName&&u.nodeName.toLowerCase())||"input"===l&&"file"===u.type)var v=Xn;else if(qn(u))if(Jn)v=lr;else{v=ar;var m=ir}else(l=u.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===u.type||"radio"===u.type)&&(v=ur);switch(v&&(v=v(e,r))?Qn(a,v,n,o):(m&&m(e,u,r),"focusout"===e&&(m=u._wrapperState)&&m.controlled&&"number"===u.type&&oe(u,"number",u.value)),m=r?ro(r):window,e){case"focusin":(qn(m)||"true"===m.contentEditable)&&(gr=m,br=r,wr=null);break;case"focusout":wr=br=gr=null;break;case"mousedown":kr=!0;break;case"contextmenu":case"mouseup":case"dragend":kr=!1,xr(a,n,o);break;case"selectionchange":if(mr)break;case"keydown":case"keyup":xr(a,n,o)}var g;if(Dn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Wn?Un(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(zn&&"ko"!==n.locale&&(Wn||"onCompositionStart"!==b?"onCompositionEnd"===b&&Wn&&(g=nn()):(en="value"in(Jt=o)?Jt.value:Jt.textContent,Wn=!0)),0<(m=Dr(r,b)).length&&(b=new xn(b,e,null,n,o),a.push({event:b,listeners:m}),(g||null!==(g=Gn(n)))&&(b.data=g))),(g=An?function(e,t){switch(e){case"compositionend":return Gn(t);case"keypress":return 32!==t.which?null:(Fn=!0,Bn);case"textInput":return(e=t.data)===Bn&&Fn?null:e;default:return null}}(e,n):function(e,t){if(Wn)return"compositionend"===e||!Dn&&Un(e,t)?(e=nn(),tn=en=Jt=null,Wn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return zn&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(r=Dr(r,"onBeforeInput")).length&&(o=new xn("onBeforeInput","beforeinput",null,n,o),a.push({event:o,listeners:r}),o.data=g)}jr(a,t)}))}function Mr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Dr(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;5===o.tag&&null!==i&&(o=i,null!=(i=ze(e,n))&&r.unshift(Mr(e,i,o)),null!=(i=ze(e,t))&&r.push(Mr(e,i,o))),e=e.return}return r}function Nr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Ar(e,t,n,r,o){for(var i=t._reactName,a=[];null!==n&&n!==r;){var u=n,l=u.alternate,s=u.stateNode;if(null!==l&&l===r)break;5===u.tag&&null!==s&&(u=s,o?null!=(l=ze(n,i))&&a.unshift(Mr(n,l,u)):o||null!=(l=ze(n,i))&&a.push(Mr(n,l,u))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}function zr(){}var Br=null,Fr=null;function Ur(e,t){switch(e){case"button":case"input":case"select":case"textarea":return!!t.autoFocus}return!1}function Gr(e,t){return"textarea"===e||"option"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Wr="function"==typeof setTimeout?setTimeout:void 0,Vr="function"==typeof clearTimeout?clearTimeout:void 0;function qr(e){(1===e.nodeType||9===e.nodeType&&null!=(e=e.body))&&(e.textContent="")}function Qr(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break}return e}function Hr(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var Yr=0,Zr=Math.random().toString(36).slice(2),Kr="__reactFiber$"+Zr,Xr="__reactProps$"+Zr,Jr="__reactContainer$"+Zr,eo="__reactEvents$"+Zr;function to(e){var t=e[Kr];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Jr]||n[Kr]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=Hr(e);null!==e;){if(n=e[Kr])return n;e=Hr(e)}return t}n=(e=n).parentNode}return null}function no(e){return!(e=e[Kr]||e[Jr])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function ro(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function oo(e){return e[Xr]||null}function io(e){var t=e[eo];return void 0===t&&(t=e[eo]=new Set),t}var ao=[],uo=-1;function lo(e){return{current:e}}function so(e){0>uo||(e.current=ao[uo],ao[uo]=null,uo--)}function co(e,t){uo++,ao[uo]=e.current,e.current=t}var fo={},ho=lo(fo),po=lo(!1),yo=fo;function vo(e,t){var n=e.type.contextTypes;if(!n)return fo;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function mo(e){return null!=e.childContextTypes}function go(){so(po),so(ho)}function bo(e,t,n){if(ho.current!==fo)throw Error(a(168));co(ho,t),co(po,n)}function wo(e,t,n){var r=e.stateNode;if(e=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in e))throw Error(a(108,Q(t)||"Unknown",i));return o({},n,r)}function ko(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||fo,yo=ho.current,co(ho,e),co(po,po.current),!0}function xo(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=wo(e,t,yo),r.__reactInternalMemoizedMergedChildContext=e,so(po),so(ho),co(ho,e)):so(po),co(po,n)}var So=null,_o=null,Eo=i.unstable_runWithPriority,Oo=i.unstable_scheduleCallback,Co=i.unstable_cancelCallback,jo=i.unstable_shouldYield,Po=i.unstable_requestPaint,Ro=i.unstable_now,To=i.unstable_getCurrentPriorityLevel,Io=i.unstable_ImmediatePriority,$o=i.unstable_UserBlockingPriority,Lo=i.unstable_NormalPriority,Mo=i.unstable_LowPriority,Do=i.unstable_IdlePriority,No={},Ao=void 0!==Po?Po:function(){},zo=null,Bo=null,Fo=!1,Uo=Ro(),Go=1e4>Uo?Ro:function(){return Ro()-Uo};function Wo(){switch(To()){case Io:return 99;case $o:return 98;case Lo:return 97;case Mo:return 96;case Do:return 95;default:throw Error(a(332))}}function Vo(e){switch(e){case 99:return Io;case 98:return $o;case 97:return Lo;case 96:return Mo;case 95:return Do;default:throw Error(a(332))}}function qo(e,t){return e=Vo(e),Eo(e,t)}function Qo(e,t,n){return e=Vo(e),Oo(e,t,n)}function Ho(){if(null!==Bo){var e=Bo;Bo=null,Co(e)}Yo()}function Yo(){if(!Fo&&null!==zo){Fo=!0;var e=0;try{var t=zo;qo(99,(function(){for(;e<t.length;e++){var n=t[e];do{n=n(!0)}while(null!==n)}})),zo=null}catch(t){throw null!==zo&&(zo=zo.slice(e+1)),Oo(Io,Ho),t}finally{Fo=!1}}}var Zo=k.ReactCurrentBatchConfig;function Ko(e,t){if(e&&e.defaultProps){for(var n in t=o({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Xo=lo(null),Jo=null,ei=null,ti=null;function ni(){ti=ei=Jo=null}function ri(e){var t=Xo.current;so(Xo),e.type._context._currentValue=t}function oi(e,t){for(;null!==e;){var n=e.alternate;if((e.childLanes&t)===t){if(null===n||(n.childLanes&t)===t)break;n.childLanes|=t}else e.childLanes|=t,null!==n&&(n.childLanes|=t);e=e.return}}function ii(e,t){Jo=e,ti=ei=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(Da=!0),e.firstContext=null)}function ai(e,t){if(ti!==e&&!1!==t&&0!==t)if("number"==typeof t&&1073741823!==t||(ti=e,t=1073741823),t={context:e,observedBits:t,next:null},null===ei){if(null===Jo)throw Error(a(308));ei=t,Jo.dependencies={lanes:0,firstContext:t,responders:null}}else ei=ei.next=t;return e._currentValue}var ui=!1;function li(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null},effects:null}}function si(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ci(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function fi(e,t){if(null!==(e=e.updateQueue)){var n=(e=e.shared).pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}}function di(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===i?o=i=a:i=i.next=a,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function hi(e,t,n,r){var i=e.updateQueue;ui=!1;var a=i.firstBaseUpdate,u=i.lastBaseUpdate,l=i.shared.pending;if(null!==l){i.shared.pending=null;var s=l,c=s.next;s.next=null,null===u?a=c:u.next=c,u=s;var f=e.alternate;if(null!==f){var d=(f=f.updateQueue).lastBaseUpdate;d!==u&&(null===d?f.firstBaseUpdate=c:d.next=c,f.lastBaseUpdate=s)}}if(null!==a){for(d=i.baseState,u=0,f=c=s=null;;){l=a.lane;var h=a.eventTime;if((r&l)===l){null!==f&&(f=f.next={eventTime:h,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var p=e,y=a;switch(l=t,h=n,y.tag){case 1:if("function"==typeof(p=y.payload)){d=p.call(h,d,l);break e}d=p;break e;case 3:p.flags=-4097&p.flags|64;case 0:if(null==(l="function"==typeof(p=y.payload)?p.call(h,d,l):p))break e;d=o({},d,l);break e;case 2:ui=!0}}null!==a.callback&&(e.flags|=32,null===(l=i.effects)?i.effects=[a]:l.push(a))}else h={eventTime:h,lane:l,tag:a.tag,payload:a.payload,callback:a.callback,next:null},null===f?(c=f=h,s=d):f=f.next=h,u|=l;if(null===(a=a.next)){if(null===(l=i.shared.pending))break;a=l.next,l.next=null,i.lastBaseUpdate=l,i.shared.pending=null}}null===f&&(s=d),i.baseState=s,i.firstBaseUpdate=c,i.lastBaseUpdate=f,Au|=u,e.lanes=u,e.memoizedState=d}}function pi(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!=typeof o)throw Error(a(191,o));o.call(r)}}}var yi=(new r.Component).refs;function vi(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:o({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var mi={isMounted:function(e){return!!(e=e._reactInternals)&&Ye(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=sl(),o=cl(e),i=ci(r,o);i.payload=t,null!=n&&(i.callback=n),fi(e,i),fl(e,o,r)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=sl(),o=cl(e),i=ci(r,o);i.tag=1,i.payload=t,null!=n&&(i.callback=n),fi(e,i),fl(e,o,r)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=sl(),r=cl(e),o=ci(n,r);o.tag=2,null!=t&&(o.callback=t),fi(e,o),fl(e,r,n)}};function gi(e,t,n,r,o,i,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!(t.prototype&&t.prototype.isPureReactComponent&&fr(n,r)&&fr(o,i))}function bi(e,t,n){var r=!1,o=fo,i=t.contextType;return"object"==typeof i&&null!==i?i=ai(i):(o=mo(t)?yo:ho.current,i=(r=null!=(r=t.contextTypes))?vo(e,o):fo),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=mi,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function wi(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&mi.enqueueReplaceState(t,t.state,null)}function ki(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=yi,li(e);var i=t.contextType;"object"==typeof i&&null!==i?o.context=ai(i):(i=mo(t)?yo:ho.current,o.context=vo(e,i)),hi(e,n,o,r),o.state=e.memoizedState,"function"==typeof(i=t.getDerivedStateFromProps)&&(vi(e,t,i,n),o.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof o.getSnapshotBeforeUpdate||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||(t=o.state,"function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&mi.enqueueReplaceState(o,o.state,null),hi(e,n,o,r),o.state=e.memoizedState),"function"==typeof o.componentDidMount&&(e.flags|=4)}var xi=Array.isArray;function Si(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=r.refs;t===yi&&(t=r.refs={}),null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function _i(e,t){if("textarea"!==e.type)throw Error(a(31,"[object Object]"===Object.prototype.toString.call(t)?"object with keys {"+Object.keys(t).join(", ")+"}":t))}function Ei(e){function t(t,n){if(e){var r=t.lastEffect;null!==r?(r.nextEffect=n,t.lastEffect=n):t.firstEffect=t.lastEffect=n,n.nextEffect=null,n.flags=8}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Gl(e,t)).index=0,e.sibling=null,e}function i(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags=2,n):r:(t.flags=2,n):n}function u(t){return e&&null===t.alternate&&(t.flags=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Ql(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function s(e,t,n,r){return null!==t&&t.elementType===n.type?((r=o(t,n.props)).ref=Si(e,t,n),r.return=e,r):((r=Wl(n.type,n.key,n.props,null,e.mode,r)).ref=Si(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Hl(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function f(e,t,n,r,i){return null===t||7!==t.tag?((t=Vl(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t||"number"==typeof t)return(t=Ql(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case x:return(n=Wl(t.type,t.key,t.props,null,e.mode,n)).ref=Si(e,null,t),n.return=e,n;case S:return(t=Hl(t,e.mode,n)).return=e,t}if(xi(t)||U(t))return(t=Vl(t,e.mode,n,null)).return=e,t;_i(e,t)}return null}function h(e,t,n,r){var o=null!==t?t.key:null;if("string"==typeof n||"number"==typeof n)return null!==o?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case x:return n.key===o?n.type===_?f(e,t,n.props.children,r,o):s(e,t,n,r):null;case S:return n.key===o?c(e,t,n,r):null}if(xi(n)||U(n))return null!==o?null:f(e,t,n,r,null);_i(e,n)}return null}function p(e,t,n,r,o){if("string"==typeof r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,o);if("object"==typeof r&&null!==r){switch(r.$$typeof){case x:return e=e.get(null===r.key?n:r.key)||null,r.type===_?f(t,e,r.props.children,o,r.key):s(t,e,r,o);case S:return c(t,e=e.get(null===r.key?n:r.key)||null,r,o)}if(xi(r)||U(r))return f(t,e=e.get(n)||null,r,o,null);_i(t,r)}return null}function y(o,a,u,l){for(var s=null,c=null,f=a,y=a=0,v=null;null!==f&&y<u.length;y++){f.index>y?(v=f,f=null):v=f.sibling;var m=h(o,f,u[y],l);if(null===m){null===f&&(f=v);break}e&&f&&null===m.alternate&&t(o,f),a=i(m,a,y),null===c?s=m:c.sibling=m,c=m,f=v}if(y===u.length)return n(o,f),s;if(null===f){for(;y<u.length;y++)null!==(f=d(o,u[y],l))&&(a=i(f,a,y),null===c?s=f:c.sibling=f,c=f);return s}for(f=r(o,f);y<u.length;y++)null!==(v=p(f,o,y,u[y],l))&&(e&&null!==v.alternate&&f.delete(null===v.key?y:v.key),a=i(v,a,y),null===c?s=v:c.sibling=v,c=v);return e&&f.forEach((function(e){return t(o,e)})),s}function v(o,u,l,s){var c=U(l);if("function"!=typeof c)throw Error(a(150));if(null==(l=c.call(l)))throw Error(a(151));for(var f=c=null,y=u,v=u=0,m=null,g=l.next();null!==y&&!g.done;v++,g=l.next()){y.index>v?(m=y,y=null):m=y.sibling;var b=h(o,y,g.value,s);if(null===b){null===y&&(y=m);break}e&&y&&null===b.alternate&&t(o,y),u=i(b,u,v),null===f?c=b:f.sibling=b,f=b,y=m}if(g.done)return n(o,y),c;if(null===y){for(;!g.done;v++,g=l.next())null!==(g=d(o,g.value,s))&&(u=i(g,u,v),null===f?c=g:f.sibling=g,f=g);return c}for(y=r(o,y);!g.done;v++,g=l.next())null!==(g=p(y,o,v,g.value,s))&&(e&&null!==g.alternate&&y.delete(null===g.key?v:g.key),u=i(g,u,v),null===f?c=g:f.sibling=g,f=g);return e&&y.forEach((function(e){return t(o,e)})),c}return function(e,r,i,l){var s="object"==typeof i&&null!==i&&i.type===_&&null===i.key;s&&(i=i.props.children);var c="object"==typeof i&&null!==i;if(c)switch(i.$$typeof){case x:e:{for(c=i.key,s=r;null!==s;){if(s.key===c){if(7===s.tag){if(i.type===_){n(e,s.sibling),(r=o(s,i.props.children)).return=e,e=r;break e}}else if(s.elementType===i.type){n(e,s.sibling),(r=o(s,i.props)).ref=Si(e,s,i),r.return=e,e=r;break e}n(e,s);break}t(e,s),s=s.sibling}i.type===_?((r=Vl(i.props.children,e.mode,l,i.key)).return=e,e=r):((l=Wl(i.type,i.key,i.props,null,e.mode,l)).ref=Si(e,r,i),l.return=e,e=l)}return u(e);case S:e:{for(s=i.key;null!==r;){if(r.key===s){if(4===r.tag&&r.stateNode.containerInfo===i.containerInfo&&r.stateNode.implementation===i.implementation){n(e,r.sibling),(r=o(r,i.children||[])).return=e,e=r;break e}n(e,r);break}t(e,r),r=r.sibling}(r=Hl(i,e.mode,l)).return=e,e=r}return u(e)}if("string"==typeof i||"number"==typeof i)return i=""+i,null!==r&&6===r.tag?(n(e,r.sibling),(r=o(r,i)).return=e,e=r):(n(e,r),(r=Ql(i,e.mode,l)).return=e,e=r),u(e);if(xi(i))return y(e,r,i,l);if(U(i))return v(e,r,i,l);if(c&&_i(e,i),void 0===i&&!s)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(a(152,Q(e.type)||"Component"))}return n(e,r)}}var Oi=Ei(!0),Ci=Ei(!1),ji={},Pi=lo(ji),Ri=lo(ji),Ti=lo(ji);function Ii(e){if(e===ji)throw Error(a(174));return e}function $i(e,t){switch(co(Ti,t),co(Ri,e),co(Pi,ji),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:he(null,"");break;default:t=he(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}so(Pi),co(Pi,t)}function Li(){so(Pi),so(Ri),so(Ti)}function Mi(e){Ii(Ti.current);var t=Ii(Pi.current),n=he(t,e.type);t!==n&&(co(Ri,e),co(Pi,n))}function Di(e){Ri.current===e&&(so(Pi),so(Ri))}var Ni=lo(0);function Ai(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var zi=null,Bi=null,Fi=!1;function Ui(e,t){var n=Fl(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Gi(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);default:return!1}}function Wi(e){if(Fi){var t=Bi;if(t){var n=t;if(!Gi(e,t)){if(!(t=Qr(n.nextSibling))||!Gi(e,t))return e.flags=-1025&e.flags|2,Fi=!1,void(zi=e);Ui(zi,n)}zi=e,Bi=Qr(t.firstChild)}else e.flags=-1025&e.flags|2,Fi=!1,zi=e}}function Vi(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;zi=e}function qi(e){if(e!==zi)return!1;if(!Fi)return Vi(e),Fi=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!Gr(t,e.memoizedProps))for(t=Bi;t;)Ui(e,t),t=Qr(t.nextSibling);if(Vi(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Bi=Qr(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Bi=null}}else Bi=zi?Qr(e.stateNode.nextSibling):null;return!0}function Qi(){Bi=zi=null,Fi=!1}var Hi=[];function Yi(){for(var e=0;e<Hi.length;e++)Hi[e]._workInProgressVersionPrimary=null;Hi.length=0}var Zi=k.ReactCurrentDispatcher,Ki=k.ReactCurrentBatchConfig,Xi=0,Ji=null,ea=null,ta=null,na=!1,ra=!1;function oa(){throw Error(a(321))}function ia(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sr(e[n],t[n]))return!1;return!0}function aa(e,t,n,r,o,i){if(Xi=i,Ji=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Zi.current=null===e||null===e.memoizedState?Ia:$a,e=n(r,o),ra){i=0;do{if(ra=!1,!(25>i))throw Error(a(301));i+=1,ta=ea=null,t.updateQueue=null,Zi.current=La,e=n(r,o)}while(ra)}if(Zi.current=Ta,t=null!==ea&&null!==ea.next,Xi=0,ta=ea=Ji=null,na=!1,t)throw Error(a(300));return e}function ua(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ta?Ji.memoizedState=ta=e:ta=ta.next=e,ta}function la(){if(null===ea){var e=Ji.alternate;e=null!==e?e.memoizedState:null}else e=ea.next;var t=null===ta?Ji.memoizedState:ta.next;if(null!==t)ta=t,ea=e;else{if(null===e)throw Error(a(310));e={memoizedState:(ea=e).memoizedState,baseState:ea.baseState,baseQueue:ea.baseQueue,queue:ea.queue,next:null},null===ta?Ji.memoizedState=ta=e:ta=ta.next=e}return ta}function sa(e,t){return"function"==typeof t?t(e):t}function ca(e){var t=la(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=ea,o=r.baseQueue,i=n.pending;if(null!==i){if(null!==o){var u=o.next;o.next=i.next,i.next=u}r.baseQueue=o=i,n.pending=null}if(null!==o){o=o.next,r=r.baseState;var l=u=i=null,s=o;do{var c=s.lane;if((Xi&c)===c)null!==l&&(l=l.next={lane:0,action:s.action,eagerReducer:s.eagerReducer,eagerState:s.eagerState,next:null}),r=s.eagerReducer===e?s.eagerState:e(r,s.action);else{var f={lane:c,action:s.action,eagerReducer:s.eagerReducer,eagerState:s.eagerState,next:null};null===l?(u=l=f,i=r):l=l.next=f,Ji.lanes|=c,Au|=c}s=s.next}while(null!==s&&s!==o);null===l?i=r:l.next=u,sr(r,t.memoizedState)||(Da=!0),t.memoizedState=r,t.baseState=i,t.baseQueue=l,n.lastRenderedState=r}return[t.memoizedState,n.dispatch]}function fa(e){var t=la(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,i=t.memoizedState;if(null!==o){n.pending=null;var u=o=o.next;do{i=e(i,u.action),u=u.next}while(u!==o);sr(i,t.memoizedState)||(Da=!0),t.memoizedState=i,null===t.baseQueue&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function da(e,t,n){var r=t._getVersion;r=r(t._source);var o=t._workInProgressVersionPrimary;if(null!==o?e=o===r:(e=e.mutableReadLanes,(e=(Xi&e)===e)&&(t._workInProgressVersionPrimary=r,Hi.push(t))),e)return n(t._source);throw Hi.push(t),Error(a(350))}function ha(e,t,n,r){var o=Ru;if(null===o)throw Error(a(349));var i=t._getVersion,u=i(t._source),l=Zi.current,s=l.useState((function(){return da(o,t,n)})),c=s[1],f=s[0];s=ta;var d=e.memoizedState,h=d.refs,p=h.getSnapshot,y=d.source;d=d.subscribe;var v=Ji;return e.memoizedState={refs:h,source:t,subscribe:r},l.useEffect((function(){h.getSnapshot=n,h.setSnapshot=c;var e=i(t._source);if(!sr(u,e)){e=n(t._source),sr(f,e)||(c(e),e=cl(v),o.mutableReadLanes|=e&o.pendingLanes),e=o.mutableReadLanes,o.entangledLanes|=e;for(var r=o.entanglements,a=e;0<a;){var l=31-Gt(a),s=1<<l;r[l]|=e,a&=~s}}}),[n,t,r]),l.useEffect((function(){return r(t._source,(function(){var e=h.getSnapshot,n=h.setSnapshot;try{n(e(t._source));var r=cl(v);o.mutableReadLanes|=r&o.pendingLanes}catch(e){n((function(){throw e}))}}))}),[t,r]),sr(p,n)&&sr(y,t)&&sr(d,r)||((e={pending:null,dispatch:null,lastRenderedReducer:sa,lastRenderedState:f}).dispatch=c=Ra.bind(null,Ji,e),s.queue=e,s.baseQueue=null,f=da(o,t,n),s.memoizedState=s.baseState=f),f}function pa(e,t,n){return ha(la(),e,t,n)}function ya(e){var t=ua();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e=(e=t.queue={pending:null,dispatch:null,lastRenderedReducer:sa,lastRenderedState:e}).dispatch=Ra.bind(null,Ji,e),[t.memoizedState,e]}function va(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Ji.updateQueue)?(t={lastEffect:null},Ji.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function ma(e){return e={current:e},ua().memoizedState=e}function ga(){return la().memoizedState}function ba(e,t,n,r){var o=ua();Ji.flags|=e,o.memoizedState=va(1|t,n,void 0,void 0===r?null:r)}function wa(e,t,n,r){var o=la();r=void 0===r?null:r;var i=void 0;if(null!==ea){var a=ea.memoizedState;if(i=a.destroy,null!==r&&ia(r,a.deps))return void va(t,n,i,r)}Ji.flags|=e,o.memoizedState=va(1|t,n,i,r)}function ka(e,t){return ba(516,4,e,t)}function xa(e,t){return wa(516,4,e,t)}function Sa(e,t){return wa(4,2,e,t)}function _a(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ea(e,t,n){return n=null!=n?n.concat([e]):null,wa(4,2,_a.bind(null,t,e),n)}function Oa(){}function Ca(e,t){var n=la();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ia(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ja(e,t){var n=la();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ia(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Pa(e,t){var n=Wo();qo(98>n?98:n,(function(){e(!0)})),qo(97<n?97:n,(function(){var n=Ki.transition;Ki.transition=1;try{e(!1),t()}finally{Ki.transition=n}}))}function Ra(e,t,n){var r=sl(),o=cl(e),i={lane:o,action:n,eagerReducer:null,eagerState:null,next:null},a=t.pending;if(null===a?i.next=i:(i.next=a.next,a.next=i),t.pending=i,a=e.alternate,e===Ji||null!==a&&a===Ji)ra=na=!0;else{if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var u=t.lastRenderedState,l=a(u,n);if(i.eagerReducer=a,i.eagerState=l,sr(l,u))return}catch(e){}fl(e,o,r)}}var Ta={readContext:ai,useCallback:oa,useContext:oa,useEffect:oa,useImperativeHandle:oa,useLayoutEffect:oa,useMemo:oa,useReducer:oa,useRef:oa,useState:oa,useDebugValue:oa,useDeferredValue:oa,useTransition:oa,useMutableSource:oa,useOpaqueIdentifier:oa,unstable_isNewReconciler:!1},Ia={readContext:ai,useCallback:function(e,t){return ua().memoizedState=[e,void 0===t?null:t],e},useContext:ai,useEffect:ka,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,ba(4,2,_a.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ba(4,2,e,t)},useMemo:function(e,t){var n=ua();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ua();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e=(e=r.queue={pending:null,dispatch:null,lastRenderedReducer:e,lastRenderedState:t}).dispatch=Ra.bind(null,Ji,e),[r.memoizedState,e]},useRef:ma,useState:ya,useDebugValue:Oa,useDeferredValue:function(e){var t=ya(e),n=t[0],r=t[1];return ka((function(){var t=Ki.transition;Ki.transition=1;try{r(e)}finally{Ki.transition=t}}),[e]),n},useTransition:function(){var e=ya(!1),t=e[0];return ma(e=Pa.bind(null,e[1])),[e,t]},useMutableSource:function(e,t,n){var r=ua();return r.memoizedState={refs:{getSnapshot:t,setSnapshot:null},source:e,subscribe:n},ha(r,e,t,n)},useOpaqueIdentifier:function(){if(Fi){var e=!1,t=function(e){return{$$typeof:M,toString:e,valueOf:e}}((function(){throw e||(e=!0,n("r:"+(Yr++).toString(36))),Error(a(355))})),n=ya(t)[1];return 0==(2&Ji.mode)&&(Ji.flags|=516,va(5,(function(){n("r:"+(Yr++).toString(36))}),void 0,null)),t}return ya(t="r:"+(Yr++).toString(36)),t},unstable_isNewReconciler:!1},$a={readContext:ai,useCallback:Ca,useContext:ai,useEffect:xa,useImperativeHandle:Ea,useLayoutEffect:Sa,useMemo:ja,useReducer:ca,useRef:ga,useState:function(){return ca(sa)},useDebugValue:Oa,useDeferredValue:function(e){var t=ca(sa),n=t[0],r=t[1];return xa((function(){var t=Ki.transition;Ki.transition=1;try{r(e)}finally{Ki.transition=t}}),[e]),n},useTransition:function(){var e=ca(sa)[0];return[ga().current,e]},useMutableSource:pa,useOpaqueIdentifier:function(){return ca(sa)[0]},unstable_isNewReconciler:!1},La={readContext:ai,useCallback:Ca,useContext:ai,useEffect:xa,useImperativeHandle:Ea,useLayoutEffect:Sa,useMemo:ja,useReducer:fa,useRef:ga,useState:function(){return fa(sa)},useDebugValue:Oa,useDeferredValue:function(e){var t=fa(sa),n=t[0],r=t[1];return xa((function(){var t=Ki.transition;Ki.transition=1;try{r(e)}finally{Ki.transition=t}}),[e]),n},useTransition:function(){var e=fa(sa)[0];return[ga().current,e]},useMutableSource:pa,useOpaqueIdentifier:function(){return fa(sa)[0]},unstable_isNewReconciler:!1},Ma=k.ReactCurrentOwner,Da=!1;function Na(e,t,n,r){t.child=null===e?Ci(t,null,n,r):Oi(t,e.child,n,r)}function Aa(e,t,n,r,o){n=n.render;var i=t.ref;return ii(t,o),r=aa(e,t,n,r,i,o),null===e||Da?(t.flags|=1,Na(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,nu(e,t,o))}function za(e,t,n,r,o,i){if(null===e){var a=n.type;return"function"!=typeof a||Ul(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Wl(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Ba(e,t,a,r,o,i))}return a=e.child,0==(o&i)&&(o=a.memoizedProps,(n=null!==(n=n.compare)?n:fr)(o,r)&&e.ref===t.ref)?nu(e,t,i):(t.flags|=1,(e=Gl(a,r)).ref=t.ref,e.return=t,t.child=e)}function Ba(e,t,n,r,o,i){if(null!==e&&fr(e.memoizedProps,r)&&e.ref===t.ref){if(Da=!1,0==(i&o))return t.lanes=e.lanes,nu(e,t,i);0!=(16384&e.flags)&&(Da=!0)}return Ga(e,t,n,r,i)}function Fa(e,t,n){var r=t.pendingProps,o=r.children,i=null!==e?e.memoizedState:null;if("hidden"===r.mode||"unstable-defer-without-hiding"===r.mode)if(0==(4&t.mode))t.memoizedState={baseLanes:0},bl(0,n);else{if(0==(1073741824&n))return e=null!==i?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e},bl(0,e),null;t.memoizedState={baseLanes:0},bl(0,null!==i?i.baseLanes:n)}else null!==i?(r=i.baseLanes|n,t.memoizedState=null):r=n,bl(0,r);return Na(e,t,o,n),t.child}function Ua(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=128)}function Ga(e,t,n,r,o){var i=mo(n)?yo:ho.current;return i=vo(t,i),ii(t,o),n=aa(e,t,n,r,i,o),null===e||Da?(t.flags|=1,Na(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-517,e.lanes&=~o,nu(e,t,o))}function Wa(e,t,n,r,o){if(mo(n)){var i=!0;ko(t)}else i=!1;if(ii(t,o),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),bi(t,n,r),ki(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,u=t.memoizedProps;a.props=u;var l=a.context,s=n.contextType;s="object"==typeof s&&null!==s?ai(s):vo(t,s=mo(n)?yo:ho.current);var c=n.getDerivedStateFromProps,f="function"==typeof c||"function"==typeof a.getSnapshotBeforeUpdate;f||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(u!==r||l!==s)&&wi(t,a,r,s),ui=!1;var d=t.memoizedState;a.state=d,hi(t,r,a,o),l=t.memoizedState,u!==r||d!==l||po.current||ui?("function"==typeof c&&(vi(t,n,c,r),l=t.memoizedState),(u=ui||gi(t,n,u,r,d,l,s))?(f||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4)):("function"==typeof a.componentDidMount&&(t.flags|=4),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=s,r=u):("function"==typeof a.componentDidMount&&(t.flags|=4),r=!1)}else{a=t.stateNode,si(e,t),u=t.memoizedProps,s=t.type===t.elementType?u:Ko(t.type,u),a.props=s,f=t.pendingProps,d=a.context,l="object"==typeof(l=n.contextType)&&null!==l?ai(l):vo(t,l=mo(n)?yo:ho.current);var h=n.getDerivedStateFromProps;(c="function"==typeof h||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(u!==f||d!==l)&&wi(t,a,r,l),ui=!1,d=t.memoizedState,a.state=d,hi(t,r,a,o);var p=t.memoizedState;u!==f||d!==p||po.current||ui?("function"==typeof h&&(vi(t,n,h,r),p=t.memoizedState),(s=ui||gi(t,n,s,r,d,p,l))?(c||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=256)):("function"!=typeof a.componentDidUpdate||u===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||u===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=l,r=s):("function"!=typeof a.componentDidUpdate||u===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||u===e.memoizedProps&&d===e.memoizedState||(t.flags|=256),r=!1)}return Va(e,t,n,r,i,o)}function Va(e,t,n,r,o,i){Ua(e,t);var a=0!=(64&t.flags);if(!r&&!a)return o&&xo(t,n,!1),nu(e,t,i);r=t.stateNode,Ma.current=t;var u=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Oi(t,e.child,null,i),t.child=Oi(t,null,u,i)):Na(e,t,u,i),t.memoizedState=r.state,o&&xo(t,n,!0),t.child}function qa(e){var t=e.stateNode;t.pendingContext?bo(0,t.pendingContext,t.pendingContext!==t.context):t.context&&bo(0,t.context,!1),$i(e,t.containerInfo)}var Qa,Ha,Ya,Za={dehydrated:null,retryLane:0};function Ka(e,t,n){var r,o=t.pendingProps,i=Ni.current,a=!1;return(r=0!=(64&t.flags))||(r=(null===e||null!==e.memoizedState)&&0!=(2&i)),r?(a=!0,t.flags&=-65):null!==e&&null===e.memoizedState||void 0===o.fallback||!0===o.unstable_avoidThisFallback||(i|=1),co(Ni,1&i),null===e?(void 0!==o.fallback&&Wi(t),e=o.children,i=o.fallback,a?(e=Xa(t,e,i,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Za,e):"number"==typeof o.unstable_expectedLoadTime?(e=Xa(t,e,i,n),t.child.memoizedState={baseLanes:n},t.memoizedState=Za,t.lanes=33554432,e):((n=ql({mode:"visible",children:e},t.mode,n,null)).return=t,t.child=n)):(e.memoizedState,a?(o=function(e,t,n,r,o){var i=t.mode,a=e.child;e=a.sibling;var u={mode:"hidden",children:n};return 0==(2&i)&&t.child!==a?((n=t.child).childLanes=0,n.pendingProps=u,null!==(a=n.lastEffect)?(t.firstEffect=n.firstEffect,t.lastEffect=a,a.nextEffect=null):t.firstEffect=t.lastEffect=null):n=Gl(a,u),null!==e?r=Gl(e,r):(r=Vl(r,i,o,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}(e,t,o.children,o.fallback,n),a=t.child,i=e.child.memoizedState,a.memoizedState=null===i?{baseLanes:n}:{baseLanes:i.baseLanes|n},a.childLanes=e.childLanes&~n,t.memoizedState=Za,o):(n=function(e,t,n,r){var o=e.child;return e=o.sibling,n=Gl(o,{mode:"visible",children:n}),0==(2&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(e.nextEffect=null,e.flags=8,t.firstEffect=t.lastEffect=e),t.child=n}(e,t,o.children,n),t.memoizedState=null,n))}function Xa(e,t,n,r){var o=e.mode,i=e.child;return t={mode:"hidden",children:t},0==(2&o)&&null!==i?(i.childLanes=0,i.pendingProps=t):i=ql(t,o,0,null),n=Vl(n,o,r,null),i.return=e,n.return=e,i.sibling=n,e.child=i,n}function Ja(e,t){e.lanes|=t;var n=e.alternate;null!==n&&(n.lanes|=t),oi(e.return,t)}function eu(e,t,n,r,o,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o,lastEffect:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=o,a.lastEffect=i)}function tu(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(Na(e,t,r.children,n),0!=(2&(r=Ni.current)))r=1&r|2,t.flags|=64;else{if(null!==e&&0!=(64&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ja(e,n);else if(19===e.tag)Ja(e,n);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(co(Ni,r),0==(2&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===Ai(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),eu(t,!1,o,n,i,t.lastEffect);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===Ai(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}eu(t,!0,n,null,i,t.lastEffect);break;case"together":eu(t,!1,null,null,void 0,t.lastEffect);break;default:t.memoizedState=null}return t.child}function nu(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Au|=t.lanes,0!=(n&t.childLanes)){if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Gl(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Gl(e,e.pendingProps)).return=t;n.sibling=null}return t.child}return null}function ru(e,t){if(!Fi)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ou(e,t,n){var r=t.pendingProps;switch(t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return null;case 1:case 17:return mo(t.type)&&go(),null;case 3:return Li(),so(po),so(ho),Yi(),(r=t.stateNode).pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(qi(t)?t.flags|=4:r.hydrate||(t.flags|=256)),null;case 5:Di(t);var i=Ii(Ti.current);if(n=t.type,null!==e&&null!=t.stateNode)Ha(e,t,n,r),e.ref!==t.ref&&(t.flags|=128);else{if(!r){if(null===t.stateNode)throw Error(a(166));return null}if(e=Ii(Pi.current),qi(t)){r=t.stateNode,n=t.type;var u=t.memoizedProps;switch(r[Kr]=t,r[Xr]=u,n){case"dialog":Pr("cancel",r),Pr("close",r);break;case"iframe":case"object":case"embed":Pr("load",r);break;case"video":case"audio":for(e=0;e<Er.length;e++)Pr(Er[e],r);break;case"source":Pr("error",r);break;case"img":case"image":case"link":Pr("error",r),Pr("load",r);break;case"details":Pr("toggle",r);break;case"input":ee(r,u),Pr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!u.multiple},Pr("invalid",r);break;case"textarea":le(r,u),Pr("invalid",r)}for(var s in Se(n,u),e=null,u)u.hasOwnProperty(s)&&(i=u[s],"children"===s?"string"==typeof i?r.textContent!==i&&(e=["children",i]):"number"==typeof i&&r.textContent!==""+i&&(e=["children",""+i]):l.hasOwnProperty(s)&&null!=i&&"onScroll"===s&&Pr("scroll",r));switch(n){case"input":Z(r),re(r,u,!0);break;case"textarea":Z(r),ce(r);break;case"select":case"option":break;default:"function"==typeof u.onClick&&(r.onclick=zr)}r=e,t.updateQueue=r,null!==r&&(t.flags|=4)}else{switch(s=9===i.nodeType?i:i.ownerDocument,e===fe&&(e=de(n)),e===fe?"script"===n?((e=s.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),"select"===n&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[Kr]=t,e[Xr]=r,Qa(e,t),t.stateNode=e,s=_e(n,r),n){case"dialog":Pr("cancel",e),Pr("close",e),i=r;break;case"iframe":case"object":case"embed":Pr("load",e),i=r;break;case"video":case"audio":for(i=0;i<Er.length;i++)Pr(Er[i],e);i=r;break;case"source":Pr("error",e),i=r;break;case"img":case"image":case"link":Pr("error",e),Pr("load",e),i=r;break;case"details":Pr("toggle",e),i=r;break;case"input":ee(e,r),i=J(e,r),Pr("invalid",e);break;case"option":i=ie(e,r);break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=o({},r,{value:void 0}),Pr("invalid",e);break;case"textarea":le(e,r),i=ue(e,r),Pr("invalid",e);break;default:i=r}Se(n,i);var c=i;for(u in c)if(c.hasOwnProperty(u)){var f=c[u];"style"===u?ke(e,f):"dangerouslySetInnerHTML"===u?null!=(f=f?f.__html:void 0)&&ve(e,f):"children"===u?"string"==typeof f?("textarea"!==n||""!==f)&&me(e,f):"number"==typeof f&&me(e,""+f):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(l.hasOwnProperty(u)?null!=f&&"onScroll"===u&&Pr("scroll",e):null!=f&&w(e,u,f,s))}switch(n){case"input":Z(e),re(e,r,!1);break;case"textarea":Z(e),ce(e);break;case"option":null!=r.value&&e.setAttribute("value",""+H(r.value));break;case"select":e.multiple=!!r.multiple,null!=(u=r.value)?ae(e,!!r.multiple,u,!1):null!=r.defaultValue&&ae(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=zr)}Ur(n,r)&&(t.flags|=4)}null!==t.ref&&(t.flags|=128)}return null;case 6:if(e&&null!=t.stateNode)Ya(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(a(166));n=Ii(Ti.current),Ii(Pi.current),qi(t)?(r=t.stateNode,n=t.memoizedProps,r[Kr]=t,r.nodeValue!==n&&(t.flags|=4)):((r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[Kr]=t,t.stateNode=r)}return null;case 13:return so(Ni),r=t.memoizedState,0!=(64&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?void 0!==t.memoizedProps.fallback&&qi(t):n=null!==e.memoizedState,r&&!n&&0!=(2&t.mode)&&(null===e&&!0!==t.memoizedProps.unstable_avoidThisFallback||0!=(1&Ni.current)?0===Mu&&(Mu=3):(0!==Mu&&3!==Mu||(Mu=4),null===Ru||0==(134217727&Au)&&0==(134217727&zu)||yl(Ru,Iu))),(r||n)&&(t.flags|=4),null);case 4:return Li(),null===e&&Tr(t.stateNode.containerInfo),null;case 10:return ri(t),null;case 19:if(so(Ni),null===(r=t.memoizedState))return null;if(u=0!=(64&t.flags),null===(s=r.rendering))if(u)ru(r,!1);else{if(0!==Mu||null!==e&&0!=(64&e.flags))for(e=t.child;null!==e;){if(null!==(s=Ai(e))){for(t.flags|=64,ru(r,!1),null!==(u=s.updateQueue)&&(t.updateQueue=u,t.flags|=4),null===r.lastEffect&&(t.firstEffect=null),t.lastEffect=r.lastEffect,r=n,n=t.child;null!==n;)e=r,(u=n).flags&=2,u.nextEffect=null,u.firstEffect=null,u.lastEffect=null,null===(s=u.alternate)?(u.childLanes=0,u.lanes=e,u.child=null,u.memoizedProps=null,u.memoizedState=null,u.updateQueue=null,u.dependencies=null,u.stateNode=null):(u.childLanes=s.childLanes,u.lanes=s.lanes,u.child=s.child,u.memoizedProps=s.memoizedProps,u.memoizedState=s.memoizedState,u.updateQueue=s.updateQueue,u.type=s.type,e=s.dependencies,u.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return co(Ni,1&Ni.current|2),t.child}e=e.sibling}null!==r.tail&&Go()>Gu&&(t.flags|=64,u=!0,ru(r,!1),t.lanes=33554432)}else{if(!u)if(null!==(e=Ai(s))){if(t.flags|=64,u=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),ru(r,!0),null===r.tail&&"hidden"===r.tailMode&&!s.alternate&&!Fi)return null!==(t=t.lastEffect=r.lastEffect)&&(t.nextEffect=null),null}else 2*Go()-r.renderingStartTime>Gu&&1073741824!==n&&(t.flags|=64,u=!0,ru(r,!1),t.lanes=33554432);r.isBackwards?(s.sibling=t.child,t.child=s):(null!==(n=r.last)?n.sibling=s:t.child=s,r.last=s)}return null!==r.tail?(n=r.tail,r.rendering=n,r.tail=n.sibling,r.lastEffect=t.lastEffect,r.renderingStartTime=Go(),n.sibling=null,t=Ni.current,co(Ni,u?1&t|2:1&t),n):null;case 23:case 24:return wl(),null!==e&&null!==e.memoizedState!=(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==r.mode&&(t.flags|=4),null}throw Error(a(156,t.tag))}function iu(e){switch(e.tag){case 1:mo(e.type)&&go();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(Li(),so(po),so(ho),Yi(),0!=(64&(t=e.flags)))throw Error(a(285));return e.flags=-4097&t|64,e;case 5:return Di(e),null;case 13:return so(Ni),4096&(t=e.flags)?(e.flags=-4097&t|64,e):null;case 19:return so(Ni),null;case 4:return Li(),null;case 10:return ri(e),null;case 23:case 24:return wl(),null;default:return null}}function au(e,t){try{var n="",r=t;do{n+=q(r),r=r.return}while(r);var o=n}catch(e){o="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:o}}function uu(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}Qa=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Ha=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Ii(Pi.current);var a,u=null;switch(n){case"input":i=J(e,i),r=J(e,r),u=[];break;case"option":i=ie(e,i),r=ie(e,r),u=[];break;case"select":i=o({},i,{value:void 0}),r=o({},r,{value:void 0}),u=[];break;case"textarea":i=ue(e,i),r=ue(e,r),u=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=zr)}for(f in Se(n,r),n=null,i)if(!r.hasOwnProperty(f)&&i.hasOwnProperty(f)&&null!=i[f])if("style"===f){var s=i[f];for(a in s)s.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==f&&"children"!==f&&"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&"autoFocus"!==f&&(l.hasOwnProperty(f)?u||(u=[]):(u=u||[]).push(f,null));for(f in r){var c=r[f];if(s=null!=i?i[f]:void 0,r.hasOwnProperty(f)&&c!==s&&(null!=c||null!=s))if("style"===f)if(s){for(a in s)!s.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&s[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(u||(u=[]),u.push(f,n)),n=c;else"dangerouslySetInnerHTML"===f?(c=c?c.__html:void 0,s=s?s.__html:void 0,null!=c&&s!==c&&(u=u||[]).push(f,c)):"children"===f?"string"!=typeof c&&"number"!=typeof c||(u=u||[]).push(f,""+c):"suppressContentEditableWarning"!==f&&"suppressHydrationWarning"!==f&&(l.hasOwnProperty(f)?(null!=c&&"onScroll"===f&&Pr("scroll",e),u||s===c||(u=[])):"object"==typeof c&&null!==c&&c.$$typeof===M?c.toString():(u=u||[]).push(f,c))}n&&(u=u||[]).push("style",n);var f=u;(t.updateQueue=f)&&(t.flags|=4)}},Ya=function(e,t,n,r){n!==r&&(t.flags|=4)};var lu="function"==typeof WeakMap?WeakMap:Map;function su(e,t,n){(n=ci(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Qu||(Qu=!0,Hu=r),uu(0,t)},n}function cu(e,t,n){(n=ci(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return uu(0,t),r(o)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===Yu?Yu=new Set([this]):Yu.add(this),uu(0,t));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}var fu="function"==typeof WeakSet?WeakSet:Set;function du(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Nl(e,t)}else t.current=null}function hu(e,t){switch(t.tag){case 0:case 11:case 15:case 22:case 5:case 6:case 4:case 17:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,r=e.memoizedState;t=(e=t.stateNode).getSnapshotBeforeUpdate(t.elementType===t.type?n:Ko(t.type,n),r),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&qr(t.stateNode.containerInfo))}throw Error(a(163))}function pu(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{if(3==(3&e.tag)){var r=e.create;e.destroy=r()}e=e.next}while(e!==t)}if(null!==(t=null!==(t=n.updateQueue)?t.lastEffect:null)){e=t=t.next;do{var o=e;r=o.next,0!=(4&(o=o.tag))&&0!=(1&o)&&(Ll(n,e),$l(n,e)),e=r}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(r=n.elementType===n.type?t.memoizedProps:Ko(n.type,t.memoizedProps),e.componentDidUpdate(r,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&pi(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:case 1:e=n.child.stateNode}pi(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&Ur(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:case 19:case 17:case 20:case 21:case 23:case 24:return;case 13:return void(null===n.memoizedState&&(n=n.alternate,null!==n&&(n=n.memoizedState,null!==n&&(n=n.dehydrated,null!==n&&kt(n)))))}throw Error(a(163))}function yu(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)"function"==typeof(r=r.style).setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var o=n.memoizedProps.style;o=null!=o&&o.hasOwnProperty("display")?o.display:null,r.style.display=we("display",o)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function vu(e,t){if(_o&&"function"==typeof _o.onCommitFiberUnmount)try{_o.onCommitFiberUnmount(So,t)}catch(e){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,o=r.destroy;if(r=r.tag,void 0!==o)if(0!=(4&r))Ll(t,n);else{r=t;try{o()}catch(e){Nl(r,e)}}n=n.next}while(n!==e)}break;case 1:if(du(t),"function"==typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(e){Nl(t,e)}break;case 5:du(t);break;case 4:xu(e,t)}}function mu(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function gu(e){return 5===e.tag||3===e.tag||4===e.tag}function bu(e){e:{for(var t=e.return;null!==t;){if(gu(t))break e;t=t.return}throw Error(a(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var r=!1;break;case 3:case 4:t=t.containerInfo,r=!0;break;default:throw Error(a(161))}16&n.flags&&(me(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||gu(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}r?wu(e,n,t):ku(e,n,t)}function wu(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=zr));else if(4!==r&&null!==(e=e.child))for(wu(e,t,n),e=e.sibling;null!==e;)wu(e,t,n),e=e.sibling}function ku(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(ku(e,t,n),e=e.sibling;null!==e;)ku(e,t,n),e=e.sibling}function xu(e,t){for(var n,r,o=t,i=!1;;){if(!i){i=o.return;e:for(;;){if(null===i)throw Error(a(160));switch(n=i.stateNode,i.tag){case 5:r=!1;break e;case 3:case 4:n=n.containerInfo,r=!0;break e}i=i.return}i=!0}if(5===o.tag||6===o.tag){e:for(var u=e,l=o,s=l;;)if(vu(u,s),null!==s.child&&4!==s.tag)s.child.return=s,s=s.child;else{if(s===l)break e;for(;null===s.sibling;){if(null===s.return||s.return===l)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}r?(u=n,l=o.stateNode,8===u.nodeType?u.parentNode.removeChild(l):u.removeChild(l)):n.removeChild(o.stateNode)}else if(4===o.tag){if(null!==o.child){n=o.stateNode.containerInfo,r=!0,o.child.return=o,o=o.child;continue}}else if(vu(e,o),null!==o.child){o.child.return=o,o=o.child;continue}if(o===t)break;for(;null===o.sibling;){if(null===o.return||o.return===t)return;4===(o=o.return).tag&&(i=!1)}o.sibling.return=o.return,o=o.sibling}}function Su(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var r=n=n.next;do{3==(3&r.tag)&&(e=r.destroy,r.destroy=void 0,void 0!==e&&e()),r=r.next}while(r!==n)}return;case 1:case 12:case 17:return;case 5:if(null!=(n=t.stateNode)){r=t.memoizedProps;var o=null!==e?e.memoizedProps:r;e=t.type;var i=t.updateQueue;if(t.updateQueue=null,null!==i){for(n[Xr]=r,"input"===e&&"radio"===r.type&&null!=r.name&&te(n,r),_e(e,o),t=_e(e,r),o=0;o<i.length;o+=2){var u=i[o],l=i[o+1];"style"===u?ke(n,l):"dangerouslySetInnerHTML"===u?ve(n,l):"children"===u?me(n,l):w(n,u,l,t)}switch(e){case"input":ne(n,r);break;case"textarea":se(n,r);break;case"select":e=n._wrapperState.wasMultiple,n._wrapperState.wasMultiple=!!r.multiple,null!=(i=r.value)?ae(n,!!r.multiple,i,!1):e!==!!r.multiple&&(null!=r.defaultValue?ae(n,!!r.multiple,r.defaultValue,!0):ae(n,!!r.multiple,r.multiple?[]:"",!1))}}}return;case 6:if(null===t.stateNode)throw Error(a(162));return void(t.stateNode.nodeValue=t.memoizedProps);case 3:return void((n=t.stateNode).hydrate&&(n.hydrate=!1,kt(n.containerInfo)));case 13:return null!==t.memoizedState&&(Uu=Go(),yu(t.child,!0)),void _u(t);case 19:return void _u(t);case 23:case 24:return void yu(t,null!==t.memoizedState)}throw Error(a(163))}function _u(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new fu),t.forEach((function(t){var r=zl.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Eu(e,t){return null!==e&&(null===(e=e.memoizedState)||null!==e.dehydrated)&&null!==(t=t.memoizedState)&&null===t.dehydrated}var Ou=Math.ceil,Cu=k.ReactCurrentDispatcher,ju=k.ReactCurrentOwner,Pu=0,Ru=null,Tu=null,Iu=0,$u=0,Lu=lo(0),Mu=0,Du=null,Nu=0,Au=0,zu=0,Bu=0,Fu=null,Uu=0,Gu=1/0;function Wu(){Gu=Go()+500}var Vu,qu=null,Qu=!1,Hu=null,Yu=null,Zu=!1,Ku=null,Xu=90,Ju=[],el=[],tl=null,nl=0,rl=null,ol=-1,il=0,al=0,ul=null,ll=!1;function sl(){return 0!=(48&Pu)?Go():-1!==ol?ol:ol=Go()}function cl(e){if(0==(2&(e=e.mode)))return 1;if(0==(4&e))return 99===Wo()?1:2;if(0===il&&(il=Nu),0!==Zo.transition){0!==al&&(al=null!==Fu?Fu.pendingLanes:0),e=il;var t=4186112&~al;return 0==(t&=-t)&&0==(t=(e=4186112&~e)&-e)&&(t=8192),t}return e=Wo(),e=zt(0!=(4&Pu)&&98===e?12:e=function(e){switch(e){case 99:return 15;case 98:return 10;case 97:case 96:return 8;case 95:return 2;default:return 0}}(e),il)}function fl(e,t,n){if(50<nl)throw nl=0,rl=null,Error(a(185));if(null===(e=dl(e,t)))return null;Ut(e,t,n),e===Ru&&(zu|=t,4===Mu&&yl(e,Iu));var r=Wo();1===t?0!=(8&Pu)&&0==(48&Pu)?vl(e):(hl(e,n),0===Pu&&(Wu(),Ho())):(0==(4&Pu)||98!==r&&99!==r||(null===tl?tl=new Set([e]):tl.add(e)),hl(e,n)),Fu=e}function dl(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function hl(e,t){for(var n=e.callbackNode,r=e.suspendedLanes,o=e.pingedLanes,i=e.expirationTimes,u=e.pendingLanes;0<u;){var l=31-Gt(u),s=1<<l,c=i[l];if(-1===c){if(0==(s&r)||0!=(s&o)){c=t,Dt(s);var f=Mt;i[l]=10<=f?c+250:6<=f?c+5e3:-1}}else c<=t&&(e.expiredLanes|=s);u&=~s}if(r=Nt(e,e===Ru?Iu:0),t=Mt,0===r)null!==n&&(n!==No&&Co(n),e.callbackNode=null,e.callbackPriority=0);else{if(null!==n){if(e.callbackPriority===t)return;n!==No&&Co(n)}15===t?(n=vl.bind(null,e),null===zo?(zo=[n],Bo=Oo(Io,Yo)):zo.push(n),n=No):14===t?n=Qo(99,vl.bind(null,e)):(n=function(e){switch(e){case 15:case 14:return 99;case 13:case 12:case 11:case 10:return 98;case 9:case 8:case 7:case 6:case 4:case 5:return 97;case 3:case 2:case 1:return 95;case 0:return 90;default:throw Error(a(358,e))}}(t),n=Qo(n,pl.bind(null,e))),e.callbackPriority=t,e.callbackNode=n}}function pl(e){if(ol=-1,al=il=0,0!=(48&Pu))throw Error(a(327));var t=e.callbackNode;if(Il()&&e.callbackNode!==t)return null;var n=Nt(e,e===Ru?Iu:0);if(0===n)return null;var r=n,o=Pu;Pu|=16;var i=Sl();for(Ru===e&&Iu===r||(Wu(),kl(e,r));;)try{Ol();break}catch(t){xl(e,t)}if(ni(),Cu.current=i,Pu=o,null!==Tu?r=0:(Ru=null,Iu=0,r=Mu),0!=(Nu&zu))kl(e,0);else if(0!==r){if(2===r&&(Pu|=64,e.hydrate&&(e.hydrate=!1,qr(e.containerInfo)),0!==(n=At(e))&&(r=_l(e,n))),1===r)throw t=Du,kl(e,0),yl(e,n),hl(e,Go()),t;switch(e.finishedWork=e.current.alternate,e.finishedLanes=n,r){case 0:case 1:throw Error(a(345));case 2:case 5:Pl(e);break;case 3:if(yl(e,n),(62914560&n)===n&&10<(r=Uu+500-Go())){if(0!==Nt(e,0))break;if(((o=e.suspendedLanes)&n)!==n){sl(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=Wr(Pl.bind(null,e),r);break}Pl(e);break;case 4:if(yl(e,n),(4186112&n)===n)break;for(r=e.eventTimes,o=-1;0<n;){var u=31-Gt(n);i=1<<u,(u=r[u])>o&&(o=u),n&=~i}if(n=o,10<(n=(120>(n=Go()-n)?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Ou(n/1960))-n)){e.timeoutHandle=Wr(Pl.bind(null,e),n);break}Pl(e);break;default:throw Error(a(329))}}return hl(e,Go()),e.callbackNode===t?pl.bind(null,e):null}function yl(e,t){for(t&=~Bu,t&=~zu,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-Gt(t),r=1<<n;e[n]=-1,t&=~r}}function vl(e){if(0!=(48&Pu))throw Error(a(327));if(Il(),e===Ru&&0!=(e.expiredLanes&Iu)){var t=Iu,n=_l(e,t);0!=(Nu&zu)&&(n=_l(e,t=Nt(e,t)))}else n=_l(e,t=Nt(e,0));if(0!==e.tag&&2===n&&(Pu|=64,e.hydrate&&(e.hydrate=!1,qr(e.containerInfo)),0!==(t=At(e))&&(n=_l(e,t))),1===n)throw n=Du,kl(e,0),yl(e,t),hl(e,Go()),n;return e.finishedWork=e.current.alternate,e.finishedLanes=t,Pl(e),hl(e,Go()),null}function ml(e,t){var n=Pu;Pu|=1;try{return e(t)}finally{0===(Pu=n)&&(Wu(),Ho())}}function gl(e,t){var n=Pu;Pu&=-2,Pu|=8;try{return e(t)}finally{0===(Pu=n)&&(Wu(),Ho())}}function bl(e,t){co(Lu,$u),$u|=t,Nu|=t}function wl(){$u=Lu.current,so(Lu)}function kl(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Vr(n)),null!==Tu)for(n=Tu.return;null!==n;){var r=n;switch(r.tag){case 1:null!=(r=r.type.childContextTypes)&&go();break;case 3:Li(),so(po),so(ho),Yi();break;case 5:Di(r);break;case 4:Li();break;case 13:case 19:so(Ni);break;case 10:ri(r);break;case 23:case 24:wl()}n=n.return}Ru=e,Tu=Gl(e.current,null),Iu=$u=Nu=t,Mu=0,Du=null,Bu=zu=Au=0}function xl(e,t){for(;;){var n=Tu;try{if(ni(),Zi.current=Ta,na){for(var r=Ji.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}na=!1}if(Xi=0,ta=ea=Ji=null,ra=!1,ju.current=null,null===n||null===n.return){Mu=1,Du=t,Tu=null;break}e:{var i=e,a=n.return,u=n,l=t;if(t=Iu,u.flags|=2048,u.firstEffect=u.lastEffect=null,null!==l&&"object"==typeof l&&"function"==typeof l.then){var s=l;if(0==(2&u.mode)){var c=u.alternate;c?(u.updateQueue=c.updateQueue,u.memoizedState=c.memoizedState,u.lanes=c.lanes):(u.updateQueue=null,u.memoizedState=null)}var f=0!=(1&Ni.current),d=a;do{var h;if(h=13===d.tag){var p=d.memoizedState;if(null!==p)h=null!==p.dehydrated;else{var y=d.memoizedProps;h=void 0!==y.fallback&&(!0!==y.unstable_avoidThisFallback||!f)}}if(h){var v=d.updateQueue;if(null===v){var m=new Set;m.add(s),d.updateQueue=m}else v.add(s);if(0==(2&d.mode)){if(d.flags|=64,u.flags|=16384,u.flags&=-2981,1===u.tag)if(null===u.alternate)u.tag=17;else{var g=ci(-1,1);g.tag=2,fi(u,g)}u.lanes|=1;break e}l=void 0,u=t;var b=i.pingCache;if(null===b?(b=i.pingCache=new lu,l=new Set,b.set(s,l)):void 0===(l=b.get(s))&&(l=new Set,b.set(s,l)),!l.has(u)){l.add(u);var w=Al.bind(null,i,s,u);s.then(w,w)}d.flags|=4096,d.lanes=t;break e}d=d.return}while(null!==d);l=Error((Q(u.type)||"A React component")+" suspended while rendering, but no fallback UI was specified.\n\nAdd a <Suspense fallback=...> component higher in the tree to provide a loading indicator or placeholder to display.")}5!==Mu&&(Mu=2),l=au(l,u),d=a;do{switch(d.tag){case 3:i=l,d.flags|=4096,t&=-t,d.lanes|=t,di(d,su(0,i,t));break e;case 1:i=l;var k=d.type,x=d.stateNode;if(0==(64&d.flags)&&("function"==typeof k.getDerivedStateFromError||null!==x&&"function"==typeof x.componentDidCatch&&(null===Yu||!Yu.has(x)))){d.flags|=4096,t&=-t,d.lanes|=t,di(d,cu(d,i,t));break e}}d=d.return}while(null!==d)}jl(n)}catch(e){t=e,Tu===n&&null!==n&&(Tu=n=n.return);continue}break}}function Sl(){var e=Cu.current;return Cu.current=Ta,null===e?Ta:e}function _l(e,t){var n=Pu;Pu|=16;var r=Sl();for(Ru===e&&Iu===t||kl(e,t);;)try{El();break}catch(t){xl(e,t)}if(ni(),Pu=n,Cu.current=r,null!==Tu)throw Error(a(261));return Ru=null,Iu=0,Mu}function El(){for(;null!==Tu;)Cl(Tu)}function Ol(){for(;null!==Tu&&!jo();)Cl(Tu)}function Cl(e){var t=Vu(e.alternate,e,$u);e.memoizedProps=e.pendingProps,null===t?jl(e):Tu=t,ju.current=null}function jl(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(2048&t.flags)){if(null!==(n=ou(n,t,$u)))return void(Tu=n);if(24!==(n=t).tag&&23!==n.tag||null===n.memoizedState||0!=(1073741824&$u)||0==(4&n.mode)){for(var r=0,o=n.child;null!==o;)r|=o.lanes|o.childLanes,o=o.sibling;n.childLanes=r}null!==e&&0==(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1<t.flags&&(null!==e.lastEffect?e.lastEffect.nextEffect=t:e.firstEffect=t,e.lastEffect=t))}else{if(null!==(n=iu(t)))return n.flags&=2047,void(Tu=n);null!==e&&(e.firstEffect=e.lastEffect=null,e.flags|=2048)}if(null!==(t=t.sibling))return void(Tu=t);Tu=t=e}while(null!==t);0===Mu&&(Mu=5)}function Pl(e){var t=Wo();return qo(99,Rl.bind(null,e,t)),null}function Rl(e,t){do{Il()}while(null!==Ku);if(0!=(48&Pu))throw Error(a(327));var n=e.finishedWork;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null;var r=n.lanes|n.childLanes,o=r,i=e.pendingLanes&~o;e.pendingLanes=o,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=o,e.mutableReadLanes&=o,e.entangledLanes&=o,o=e.entanglements;for(var u=e.eventTimes,l=e.expirationTimes;0<i;){var s=31-Gt(i),c=1<<s;o[s]=0,u[s]=-1,l[s]=-1,i&=~c}if(null!==tl&&0==(24&r)&&tl.has(e)&&tl.delete(e),e===Ru&&(Tu=Ru=null,Iu=0),1<n.flags?null!==n.lastEffect?(n.lastEffect.nextEffect=n,r=n.firstEffect):r=n:r=n.firstEffect,null!==r){if(o=Pu,Pu|=32,ju.current=null,Br=Ht,vr(u=yr())){if("selectionStart"in u)l={start:u.selectionStart,end:u.selectionEnd};else e:if(l=(l=u.ownerDocument)&&l.defaultView||window,(c=l.getSelection&&l.getSelection())&&0!==c.rangeCount){l=c.anchorNode,i=c.anchorOffset,s=c.focusNode,c=c.focusOffset;try{l.nodeType,s.nodeType}catch(e){l=null;break e}var f=0,d=-1,h=-1,p=0,y=0,v=u,m=null;t:for(;;){for(var g;v!==l||0!==i&&3!==v.nodeType||(d=f+i),v!==s||0!==c&&3!==v.nodeType||(h=f+c),3===v.nodeType&&(f+=v.nodeValue.length),null!==(g=v.firstChild);)m=v,v=g;for(;;){if(v===u)break t;if(m===l&&++p===i&&(d=f),m===s&&++y===c&&(h=f),null!==(g=v.nextSibling))break;m=(v=m).parentNode}v=g}l=-1===d||-1===h?null:{start:d,end:h}}else l=null;l=l||{start:0,end:0}}else l=null;Fr={focusedElem:u,selectionRange:l},Ht=!1,ul=null,ll=!1,qu=r;do{try{Tl()}catch(e){if(null===qu)throw Error(a(330));Nl(qu,e),qu=qu.nextEffect}}while(null!==qu);ul=null,qu=r;do{try{for(u=e;null!==qu;){var b=qu.flags;if(16&b&&me(qu.stateNode,""),128&b){var w=qu.alternate;if(null!==w){var k=w.ref;null!==k&&("function"==typeof k?k(null):k.current=null)}}switch(1038&b){case 2:bu(qu),qu.flags&=-3;break;case 6:bu(qu),qu.flags&=-3,Su(qu.alternate,qu);break;case 1024:qu.flags&=-1025;break;case 1028:qu.flags&=-1025,Su(qu.alternate,qu);break;case 4:Su(qu.alternate,qu);break;case 8:xu(u,l=qu);var x=l.alternate;mu(l),null!==x&&mu(x)}qu=qu.nextEffect}}catch(e){if(null===qu)throw Error(a(330));Nl(qu,e),qu=qu.nextEffect}}while(null!==qu);if(k=Fr,w=yr(),b=k.focusedElem,u=k.selectionRange,w!==b&&b&&b.ownerDocument&&pr(b.ownerDocument.documentElement,b)){null!==u&&vr(b)&&(w=u.start,void 0===(k=u.end)&&(k=w),"selectionStart"in b?(b.selectionStart=w,b.selectionEnd=Math.min(k,b.value.length)):(k=(w=b.ownerDocument||document)&&w.defaultView||window).getSelection&&(k=k.getSelection(),l=b.textContent.length,x=Math.min(u.start,l),u=void 0===u.end?x:Math.min(u.end,l),!k.extend&&x>u&&(l=u,u=x,x=l),l=hr(b,x),i=hr(b,u),l&&i&&(1!==k.rangeCount||k.anchorNode!==l.node||k.anchorOffset!==l.offset||k.focusNode!==i.node||k.focusOffset!==i.offset)&&((w=w.createRange()).setStart(l.node,l.offset),k.removeAllRanges(),x>u?(k.addRange(w),k.extend(i.node,i.offset)):(w.setEnd(i.node,i.offset),k.addRange(w))))),w=[];for(k=b;k=k.parentNode;)1===k.nodeType&&w.push({element:k,left:k.scrollLeft,top:k.scrollTop});for("function"==typeof b.focus&&b.focus(),b=0;b<w.length;b++)(k=w[b]).element.scrollLeft=k.left,k.element.scrollTop=k.top}Ht=!!Br,Fr=Br=null,e.current=n,qu=r;do{try{for(b=e;null!==qu;){var S=qu.flags;if(36&S&&pu(b,qu.alternate,qu),128&S){w=void 0;var _=qu.ref;if(null!==_){var E=qu.stateNode;qu.tag,w=E,"function"==typeof _?_(w):_.current=w}}qu=qu.nextEffect}}catch(e){if(null===qu)throw Error(a(330));Nl(qu,e),qu=qu.nextEffect}}while(null!==qu);qu=null,Ao(),Pu=o}else e.current=n;if(Zu)Zu=!1,Ku=e,Xu=t;else for(qu=r;null!==qu;)t=qu.nextEffect,qu.nextEffect=null,8&qu.flags&&((S=qu).sibling=null,S.stateNode=null),qu=t;if(0===(r=e.pendingLanes)&&(Yu=null),1===r?e===rl?nl++:(nl=0,rl=e):nl=0,n=n.stateNode,_o&&"function"==typeof _o.onCommitFiberRoot)try{_o.onCommitFiberRoot(So,n,void 0,64==(64&n.current.flags))}catch(e){}if(hl(e,Go()),Qu)throw Qu=!1,e=Hu,Hu=null,e;return 0!=(8&Pu)||Ho(),null}function Tl(){for(;null!==qu;){var e=qu.alternate;ll||null===ul||(0!=(8&qu.flags)?Je(qu,ul)&&(ll=!0):13===qu.tag&&Eu(e,qu)&&Je(qu,ul)&&(ll=!0));var t=qu.flags;0!=(256&t)&&hu(e,qu),0==(512&t)||Zu||(Zu=!0,Qo(97,(function(){return Il(),null}))),qu=qu.nextEffect}}function Il(){if(90!==Xu){var e=97<Xu?97:Xu;return Xu=90,qo(e,Ml)}return!1}function $l(e,t){Ju.push(t,e),Zu||(Zu=!0,Qo(97,(function(){return Il(),null})))}function Ll(e,t){el.push(t,e),Zu||(Zu=!0,Qo(97,(function(){return Il(),null})))}function Ml(){if(null===Ku)return!1;var e=Ku;if(Ku=null,0!=(48&Pu))throw Error(a(331));var t=Pu;Pu|=32;var n=el;el=[];for(var r=0;r<n.length;r+=2){var o=n[r],i=n[r+1],u=o.destroy;if(o.destroy=void 0,"function"==typeof u)try{u()}catch(e){if(null===i)throw Error(a(330));Nl(i,e)}}for(n=Ju,Ju=[],r=0;r<n.length;r+=2){o=n[r],i=n[r+1];try{var l=o.create;o.destroy=l()}catch(e){if(null===i)throw Error(a(330));Nl(i,e)}}for(l=e.current.firstEffect;null!==l;)e=l.nextEffect,l.nextEffect=null,8&l.flags&&(l.sibling=null,l.stateNode=null),l=e;return Pu=t,Ho(),!0}function Dl(e,t,n){fi(e,t=su(0,t=au(n,t),1)),t=sl(),null!==(e=dl(e,1))&&(Ut(e,1,t),hl(e,t))}function Nl(e,t){if(3===e.tag)Dl(e,e,t);else for(var n=e.return;null!==n;){if(3===n.tag){Dl(n,e,t);break}if(1===n.tag){var r=n.stateNode;if("function"==typeof n.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Yu||!Yu.has(r))){var o=cu(n,e=au(t,e),1);if(fi(n,o),o=sl(),null!==(n=dl(n,1)))Ut(n,1,o),hl(n,o);else if("function"==typeof r.componentDidCatch&&(null===Yu||!Yu.has(r)))try{r.componentDidCatch(t,e)}catch(e){}break}}n=n.return}}function Al(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=sl(),e.pingedLanes|=e.suspendedLanes&n,Ru===e&&(Iu&n)===n&&(4===Mu||3===Mu&&(62914560&Iu)===Iu&&500>Go()-Uu?kl(e,0):Bu|=n),hl(e,t)}function zl(e,t){var n=e.stateNode;null!==n&&n.delete(t),0==(t=0)&&(0==(2&(t=e.mode))?t=1:0==(4&t)?t=99===Wo()?1:2:(0===il&&(il=Nu),0===(t=Bt(62914560&~il))&&(t=4194304))),n=sl(),null!==(e=dl(e,t))&&(Ut(e,t,n),hl(e,n))}function Bl(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function Fl(e,t,n,r){return new Bl(e,t,n,r)}function Ul(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Gl(e,t){var n=e.alternate;return null===n?((n=Fl(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Wl(e,t,n,r,o,i){var u=2;if(r=e,"function"==typeof e)Ul(e)&&(u=1);else if("string"==typeof e)u=5;else e:switch(e){case _:return Vl(n.children,o,i,t);case D:u=8,o|=16;break;case E:u=8,o|=1;break;case O:return(e=Fl(12,n,t,8|o)).elementType=O,e.type=O,e.lanes=i,e;case R:return(e=Fl(13,n,t,o)).type=R,e.elementType=R,e.lanes=i,e;case T:return(e=Fl(19,n,t,o)).elementType=T,e.lanes=i,e;case N:return ql(n,o,i,t);case A:return(e=Fl(24,n,t,o)).elementType=A,e.lanes=i,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case C:u=10;break e;case j:u=9;break e;case P:u=11;break e;case I:u=14;break e;case $:u=16,r=null;break e;case L:u=22;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Fl(u,n,t,o)).elementType=e,t.type=r,t.lanes=i,t}function Vl(e,t,n,r){return(e=Fl(7,e,r,t)).lanes=n,e}function ql(e,t,n,r){return(e=Fl(23,e,r,t)).elementType=N,e.lanes=n,e}function Ql(e,t,n){return(e=Fl(6,e,null,t)).lanes=n,e}function Hl(e,t,n){return(t=Fl(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Yl(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=Ft(0),this.expirationTimes=Ft(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ft(0),this.mutableSourceEagerHydrationData=null}function Zl(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:S,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Kl(e,t,n,r){var o=t.current,i=sl(),u=cl(o);e:if(n){t:{if(Ye(n=n._reactInternals)!==n||1!==n.tag)throw Error(a(170));var l=n;do{switch(l.tag){case 3:l=l.stateNode.context;break t;case 1:if(mo(l.type)){l=l.stateNode.__reactInternalMemoizedMergedChildContext;break t}}l=l.return}while(null!==l);throw Error(a(171))}if(1===n.tag){var s=n.type;if(mo(s)){n=wo(n,s,l);break e}}n=l}else n=fo;return null===t.context?t.context=n:t.pendingContext=n,(t=ci(i,u)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),fi(o,t),fl(o,u,i),u}function Xl(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Jl(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function es(e,t){Jl(e,t),(e=e.alternate)&&Jl(e,t)}function ts(e,t,n){var r=null!=n&&null!=n.hydrationOptions&&n.hydrationOptions.mutableSources||null;if(n=new Yl(e,t,null!=n&&!0===n.hydrate),t=Fl(3,null,null,2===t?7:1===t?3:0),n.current=t,t.stateNode=n,li(t),e[Jr]=n.current,Tr(8===e.nodeType?e.parentNode:e),r)for(e=0;e<r.length;e++){var o=(t=r[e])._getVersion;o=o(t._source),null==n.mutableSourceEagerHydrationData?n.mutableSourceEagerHydrationData=[t,o]:n.mutableSourceEagerHydrationData.push(t,o)}this._internalRoot=n}function ns(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function rs(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i._internalRoot;if("function"==typeof o){var u=o;o=function(){var e=Xl(a);u.call(e)}}Kl(t,a,e,o)}else{if(i=n._reactRootContainer=function(e,t){if(t||(t=!(!(t=e?9===e.nodeType?e.documentElement:e.firstChild:null)||1!==t.nodeType||!t.hasAttribute("data-reactroot"))),!t)for(var n;n=e.lastChild;)e.removeChild(n);return new ts(e,0,t?{hydrate:!0}:void 0)}(n,r),a=i._internalRoot,"function"==typeof o){var l=o;o=function(){var e=Xl(a);l.call(e)}}gl((function(){Kl(t,a,e,o)}))}return Xl(a)}function os(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!ns(t))throw Error(a(200));return Zl(e,t,null,n)}Vu=function(e,t,n){var r=t.lanes;if(null!==e)if(e.memoizedProps!==t.pendingProps||po.current)Da=!0;else{if(0==(n&r)){switch(Da=!1,t.tag){case 3:qa(t),Qi();break;case 5:Mi(t);break;case 1:mo(t.type)&&ko(t);break;case 4:$i(t,t.stateNode.containerInfo);break;case 10:r=t.memoizedProps.value;var o=t.type._context;co(Xo,o._currentValue),o._currentValue=r;break;case 13:if(null!==t.memoizedState)return 0!=(n&t.child.childLanes)?Ka(e,t,n):(co(Ni,1&Ni.current),null!==(t=nu(e,t,n))?t.sibling:null);co(Ni,1&Ni.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(64&e.flags)){if(r)return tu(e,t,n);t.flags|=64}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),co(Ni,Ni.current),r)break;return null;case 23:case 24:return t.lanes=0,Fa(e,t,n)}return nu(e,t,n)}Da=0!=(16384&e.flags)}else Da=!1;switch(t.lanes=0,t.tag){case 2:if(r=t.type,null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=vo(t,ho.current),ii(t,n),o=aa(null,t,r,e,o,n),t.flags|=1,"object"==typeof o&&null!==o&&"function"==typeof o.render&&void 0===o.$$typeof){if(t.tag=1,t.memoizedState=null,t.updateQueue=null,mo(r)){var i=!0;ko(t)}else i=!1;t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,li(t);var u=r.getDerivedStateFromProps;"function"==typeof u&&vi(t,r,u,e),o.updater=mi,t.stateNode=o,o._reactInternals=t,ki(t,r,e,n),t=Va(null,t,r,!0,i,n)}else t.tag=0,Na(null,t,o,n),t=t.child;return t;case 16:o=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,o=(i=o._init)(o._payload),t.type=o,i=t.tag=function(e){if("function"==typeof e)return Ul(e)?1:0;if(null!=e){if((e=e.$$typeof)===P)return 11;if(e===I)return 14}return 2}(o),e=Ko(o,e),i){case 0:t=Ga(null,t,o,e,n);break e;case 1:t=Wa(null,t,o,e,n);break e;case 11:t=Aa(null,t,o,e,n);break e;case 14:t=za(null,t,o,Ko(o.type,e),r,n);break e}throw Error(a(306,o,""))}return t;case 0:return r=t.type,o=t.pendingProps,Ga(e,t,r,o=t.elementType===r?o:Ko(r,o),n);case 1:return r=t.type,o=t.pendingProps,Wa(e,t,r,o=t.elementType===r?o:Ko(r,o),n);case 3:if(qa(t),r=t.updateQueue,null===e||null===r)throw Error(a(282));if(r=t.pendingProps,o=null!==(o=t.memoizedState)?o.element:null,si(e,t),hi(t,r,null,n),(r=t.memoizedState.element)===o)Qi(),t=nu(e,t,n);else{if((i=(o=t.stateNode).hydrate)&&(Bi=Qr(t.stateNode.containerInfo.firstChild),zi=t,i=Fi=!0),i){if(null!=(e=o.mutableSourceEagerHydrationData))for(o=0;o<e.length;o+=2)(i=e[o])._workInProgressVersionPrimary=e[o+1],Hi.push(i);for(n=Ci(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|1024,n=n.sibling}else Na(e,t,r,n),Qi();t=t.child}return t;case 5:return Mi(t),null===e&&Wi(t),r=t.type,o=t.pendingProps,i=null!==e?e.memoizedProps:null,u=o.children,Gr(r,o)?u=null:null!==i&&Gr(r,i)&&(t.flags|=16),Ua(e,t),Na(e,t,u,n),t.child;case 6:return null===e&&Wi(t),null;case 13:return Ka(e,t,n);case 4:return $i(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Oi(t,null,r,n):Na(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,Aa(e,t,r,o=t.elementType===r?o:Ko(r,o),n);case 7:return Na(e,t,t.pendingProps,n),t.child;case 8:case 12:return Na(e,t,t.pendingProps.children,n),t.child;case 10:e:{r=t.type._context,o=t.pendingProps,u=t.memoizedProps,i=o.value;var l=t.type._context;if(co(Xo,l._currentValue),l._currentValue=i,null!==u)if(l=u.value,0==(i=sr(l,i)?0:0|("function"==typeof r._calculateChangedBits?r._calculateChangedBits(l,i):1073741823))){if(u.children===o.children&&!po.current){t=nu(e,t,n);break e}}else for(null!==(l=t.child)&&(l.return=t);null!==l;){var s=l.dependencies;if(null!==s){u=l.child;for(var c=s.firstContext;null!==c;){if(c.context===r&&0!=(c.observedBits&i)){1===l.tag&&((c=ci(-1,n&-n)).tag=2,fi(l,c)),l.lanes|=n,null!==(c=l.alternate)&&(c.lanes|=n),oi(l.return,n),s.lanes|=n;break}c=c.next}}else u=10===l.tag&&l.type===t.type?null:l.child;if(null!==u)u.return=l;else for(u=l;null!==u;){if(u===t){u=null;break}if(null!==(l=u.sibling)){l.return=u.return,u=l;break}u=u.return}l=u}Na(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=(i=t.pendingProps).children,ii(t,n),r=r(o=ai(o,i.unstable_observedBits)),t.flags|=1,Na(e,t,r,n),t.child;case 14:return i=Ko(o=t.type,t.pendingProps),za(e,t,o,i=Ko(o.type,i),r,n);case 15:return Ba(e,t,t.type,t.pendingProps,r,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Ko(r,o),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,mo(r)?(e=!0,ko(t)):e=!1,ii(t,n),bi(t,r,o),ki(t,r,o,n),Va(null,t,r,!0,e,n);case 19:return tu(e,t,n);case 23:case 24:return Fa(e,t,n)}throw Error(a(156,t.tag))},ts.prototype.render=function(e){Kl(e,this._internalRoot,null,null)},ts.prototype.unmount=function(){var e=this._internalRoot,t=e.containerInfo;Kl(null,e,null,(function(){t[Jr]=null}))},et=function(e){13===e.tag&&(fl(e,4,sl()),es(e,4))},tt=function(e){13===e.tag&&(fl(e,67108864,sl()),es(e,67108864))},nt=function(e){if(13===e.tag){var t=sl(),n=cl(e);fl(e,n,t),es(e,n)}},rt=function(e,t){return t()},Oe=function(e,t,n){switch(t){case"input":if(ne(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=oo(r);if(!o)throw Error(a(90));K(r),ne(r,o)}}}break;case"textarea":se(e,n);break;case"select":null!=(t=n.value)&&ae(e,!!n.multiple,t,!1)}},Ie=ml,$e=function(e,t,n,r,o){var i=Pu;Pu|=4;try{return qo(98,e.bind(null,t,n,r,o))}finally{0===(Pu=i)&&(Wu(),Ho())}},Le=function(){0==(49&Pu)&&(function(){if(null!==tl){var e=tl;tl=null,e.forEach((function(e){e.expiredLanes|=24&e.pendingLanes,hl(e,Go())}))}Ho()}(),Il())},Me=function(e,t){var n=Pu;Pu|=2;try{return e(t)}finally{0===(Pu=n)&&(Wu(),Ho())}};var is={Events:[no,ro,oo,Re,Te,Il,{current:!1}]},as={findFiberByHostInstance:to,bundleType:0,version:"17.0.2",rendererPackageName:"react-dom"},us={bundleType:as.bundleType,version:as.version,rendererPackageName:as.rendererPackageName,rendererConfig:as.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:k.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Xe(e))?null:e.stateNode},findFiberByHostInstance:as.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var ls=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ls.isDisabled&&ls.supportsFiber)try{So=ls.inject(us),_o=ls}catch(ye){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=is,t.createPortal=os,t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw Error(a(268,Object.keys(e)))}return null===(e=Xe(t))?null:e.stateNode},t.flushSync=function(e,t){var n=Pu;if(0!=(48&n))return e(t);Pu|=1;try{if(e)return qo(99,e.bind(null,t))}finally{Pu=n,Ho()}},t.hydrate=function(e,t,n){if(!ns(t))throw Error(a(200));return rs(null,e,t,!0,n)},t.render=function(e,t,n){if(!ns(t))throw Error(a(200));return rs(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!ns(e))throw Error(a(40));return!!e._reactRootContainer&&(gl((function(){rs(null,null,e,!1,(function(){e._reactRootContainer=null,e[Jr]=null}))})),!0)},t.unstable_batchedUpdates=ml,t.unstable_createPortal=function(e,t){return os(e,t,2<arguments.length&&void 0!==arguments[2]?arguments[2]:null)},t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!ns(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return rs(e,t,n,!1,r)},t.version="17.0.2"},935:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(448)},408:(e,t,n)=>{"use strict";var r=n(418),o=60103,i=60106;t.Fragment=60107,t.StrictMode=60108,t.Profiler=60114;var a=60109,u=60110,l=60112;t.Suspense=60113;var s=60115,c=60116;if("function"==typeof Symbol&&Symbol.for){var f=Symbol.for;o=f("react.element"),i=f("react.portal"),t.Fragment=f("react.fragment"),t.StrictMode=f("react.strict_mode"),t.Profiler=f("react.profiler"),a=f("react.provider"),u=f("react.context"),l=f("react.forward_ref"),t.Suspense=f("react.suspense"),s=f("react.memo"),c=f("react.lazy")}var d="function"==typeof Symbol&&Symbol.iterator;function h(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},y={};function v(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||p}function m(){}function g(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||p}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error(h(85));this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},m.prototype=v.prototype;var b=g.prototype=new m;b.constructor=g,r(b,v.prototype),b.isPureReactComponent=!0;var w={current:null},k=Object.prototype.hasOwnProperty,x={key:!0,ref:!0,__self:!0,__source:!0};function S(e,t,n){var r,i={},a=null,u=null;if(null!=t)for(r in void 0!==t.ref&&(u=t.ref),void 0!==t.key&&(a=""+t.key),t)k.call(t,r)&&!x.hasOwnProperty(r)&&(i[r]=t[r]);var l=arguments.length-2;if(1===l)i.children=n;else if(1<l){for(var s=Array(l),c=0;c<l;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in l=e.defaultProps)void 0===i[r]&&(i[r]=l[r]);return{$$typeof:o,type:e,key:a,ref:u,props:i,_owner:w.current}}function _(e){return"object"==typeof e&&null!==e&&e.$$typeof===o}var E=/\/+/g;function O(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function C(e,t,n,r,a){var u=typeof e;"undefined"!==u&&"boolean"!==u||(e=null);var l=!1;if(null===e)l=!0;else switch(u){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case o:case i:l=!0}}if(l)return a=a(l=e),e=""===r?"."+O(l,0):r,Array.isArray(a)?(n="",null!=e&&(n=e.replace(E,"$&/")+"/"),C(a,t,n,"",(function(e){return e}))):null!=a&&(_(a)&&(a=function(e,t){return{$$typeof:o,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,n+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(E,"$&/")+"/")+e)),t.push(a)),1;if(l=0,r=""===r?".":r+":",Array.isArray(e))for(var s=0;s<e.length;s++){var c=r+O(u=e[s],s);l+=C(u,t,n,c,a)}else if(c=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=d&&e[d]||e["@@iterator"])?e:null}(e),"function"==typeof c)for(e=c.call(e),s=0;!(u=e.next()).done;)l+=C(u=u.value,t,n,c=r+O(u,s++),a);else if("object"===u)throw t=""+e,Error(h(31,"[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t));return l}function j(e,t,n){if(null==e)return e;var r=[],o=0;return C(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function P(e){if(-1===e._status){var t=e._result;t=t(),e._status=0,e._result=t,t.then((function(t){0===e._status&&(t=t.default,e._status=1,e._result=t)}),(function(t){0===e._status&&(e._status=2,e._result=t)}))}if(1===e._status)return e._result;throw e._result}var R={current:null};function T(){var e=R.current;if(null===e)throw Error(h(321));return e}var I={ReactCurrentDispatcher:R,ReactCurrentBatchConfig:{transition:0},ReactCurrentOwner:w,IsSomeRendererActing:{current:!1},assign:r};t.Children={map:j,forEach:function(e,t,n){j(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return j(e,(function(){t++})),t},toArray:function(e){return j(e,(function(e){return e}))||[]},only:function(e){if(!_(e))throw Error(h(143));return e}},t.Component=v,t.PureComponent=g,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=I,t.cloneElement=function(e,t,n){if(null==e)throw Error(h(267,e));var i=r({},e.props),a=e.key,u=e.ref,l=e._owner;if(null!=t){if(void 0!==t.ref&&(u=t.ref,l=w.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(c in t)k.call(t,c)&&!x.hasOwnProperty(c)&&(i[c]=void 0===t[c]&&void 0!==s?s[c]:t[c])}var c=arguments.length-2;if(1===c)i.children=n;else if(1<c){s=Array(c);for(var f=0;f<c;f++)s[f]=arguments[f+2];i.children=s}return{$$typeof:o,type:e.type,key:a,ref:u,props:i,_owner:l}},t.createContext=function(e,t){return void 0===t&&(t=null),(e={$$typeof:u,_calculateChangedBits:t,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:a,_context:e},e.Consumer=e},t.createElement=S,t.createFactory=function(e){var t=S.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:l,render:e}},t.isValidElement=_,t.lazy=function(e){return{$$typeof:c,_payload:{_status:-1,_result:e},_init:P}},t.memo=function(e,t){return{$$typeof:s,type:e,compare:void 0===t?null:t}},t.useCallback=function(e,t){return T().useCallback(e,t)},t.useContext=function(e,t){return T().useContext(e,t)},t.useDebugValue=function(){},t.useEffect=function(e,t){return T().useEffect(e,t)},t.useImperativeHandle=function(e,t,n){return T().useImperativeHandle(e,t,n)},t.useLayoutEffect=function(e,t){return T().useLayoutEffect(e,t)},t.useMemo=function(e,t){return T().useMemo(e,t)},t.useReducer=function(e,t,n){return T().useReducer(e,t,n)},t.useRef=function(e){return T().useRef(e)},t.useState=function(e){return T().useState(e)},t.version="17.0.2"},294:(e,t,n)=>{"use strict";e.exports=n(408)},666:e=>{var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof v?t:v,i=Object.create(o.prototype),a=new j(r||[]);return i._invoke=function(e,t,n){var r=f;return function(o,i){if(r===h)throw new Error("Generator is already running");if(r===p){if("throw"===o)throw i;return R()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var u=E(a,n);if(u){if(u===y)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=h;var l=c(e,t,n);if("normal"===l.type){if(r=n.done?p:d,l.arg===y)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r=p,n.method="throw",n.arg=l.arg)}}}(e,n,a),i}function c(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var f="suspendedStart",d="suspendedYield",h="executing",p="completed",y={};function v(){}function m(){}function g(){}var b={};l(b,i,(function(){return this}));var w=Object.getPrototypeOf,k=w&&w(w(P([])));k&&k!==n&&r.call(k,i)&&(b=k);var x=g.prototype=v.prototype=Object.create(b);function S(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function n(o,i,a,u){var l=c(e[o],e,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,u)}),(function(e){n("throw",e,a,u)})):t.resolve(f).then((function(e){s.value=e,a(s)}),(function(e){return n("throw",e,a,u)}))}u(l.arg)}var o;this._invoke=function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}}function E(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,E(e,n),"throw"===n.method))return y;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return y}var o=c(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function P(e){if(e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o<e.length;)if(r.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return a.next=a}}return{next:R}}function R(){return{value:t,done:!0}}return m.prototype=g,l(x,"constructor",g),l(g,"constructor",m),m.displayName=l(g,u,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===m||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,l(e,u,"GeneratorFunction")),e.prototype=Object.create(x),e},e.awrap=function(e){return{__await:e}},S(_.prototype),l(_.prototype,a,(function(){return this})),e.AsyncIterator=_,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new _(s(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},S(x),l(x,u,"Generator"),l(x,i,(function(){return this})),l(x,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=P,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(C),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(r,o){return u.type="throw",u.arg=e,n.next=r,o&&(n.method="next",n.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var l=r.call(a,"catchLoc"),s=r.call(a,"finallyLoc");if(l&&s){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;C(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:P(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),y}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}},53:(e,t)=>{"use strict";var n,r,o,i;if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var u=Date,l=u.now();t.unstable_now=function(){return u.now()-l}}if("undefined"==typeof window||"function"!=typeof MessageChannel){var s=null,c=null,f=function(){if(null!==s)try{var e=t.unstable_now();s(!0,e),s=null}catch(e){throw setTimeout(f,0),e}};n=function(e){null!==s?setTimeout(n,0,e):(s=e,setTimeout(f,0))},r=function(e,t){c=setTimeout(e,t)},o=function(){clearTimeout(c)},t.unstable_shouldYield=function(){return!1},i=t.unstable_forceFrameRate=function(){}}else{var d=window.setTimeout,h=window.clearTimeout;if("undefined"!=typeof console){var p=window.cancelAnimationFrame;"function"!=typeof window.requestAnimationFrame&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills"),"function"!=typeof p&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills")}var y=!1,v=null,m=-1,g=5,b=0;t.unstable_shouldYield=function(){return t.unstable_now()>=b},i=function(){},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):g=0<e?Math.floor(1e3/e):5};var w=new MessageChannel,k=w.port2;w.port1.onmessage=function(){if(null!==v){var e=t.unstable_now();b=e+g;try{v(!0,e)?k.postMessage(null):(y=!1,v=null)}catch(e){throw k.postMessage(null),e}}else y=!1},n=function(e){v=e,y||(y=!0,k.postMessage(null))},r=function(e,n){m=d((function(){e(t.unstable_now())}),n)},o=function(){h(m),m=-1}}function x(e,t){var n=e.length;e.push(t);e:for(;;){var r=n-1>>>1,o=e[r];if(!(void 0!==o&&0<E(o,t)))break e;e[r]=t,e[n]=o,n=r}}function S(e){return void 0===(e=e[0])?null:e}function _(e){var t=e[0];if(void 0!==t){var n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length;r<o;){var i=2*(r+1)-1,a=e[i],u=i+1,l=e[u];if(void 0!==a&&0>E(a,n))void 0!==l&&0>E(l,a)?(e[r]=l,e[u]=n,r=u):(e[r]=a,e[i]=n,r=i);else{if(!(void 0!==l&&0>E(l,n)))break e;e[r]=l,e[u]=n,r=u}}}return t}return null}function E(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}var O=[],C=[],j=1,P=null,R=3,T=!1,I=!1,$=!1;function L(e){for(var t=S(C);null!==t;){if(null===t.callback)_(C);else{if(!(t.startTime<=e))break;_(C),t.sortIndex=t.expirationTime,x(O,t)}t=S(C)}}function M(e){if($=!1,L(e),!I)if(null!==S(O))I=!0,n(D);else{var t=S(C);null!==t&&r(M,t.startTime-e)}}function D(e,n){I=!1,$&&($=!1,o()),T=!0;var i=R;try{for(L(n),P=S(O);null!==P&&(!(P.expirationTime>n)||e&&!t.unstable_shouldYield());){var a=P.callback;if("function"==typeof a){P.callback=null,R=P.priorityLevel;var u=a(P.expirationTime<=n);n=t.unstable_now(),"function"==typeof u?P.callback=u:P===S(O)&&_(O),L(n)}else _(O);P=S(O)}if(null!==P)var l=!0;else{var s=S(C);null!==s&&r(M,s.startTime-n),l=!1}return l}finally{P=null,R=i,T=!1}}var N=i;t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){I||T||(I=!0,n(D))},t.unstable_getCurrentPriorityLevel=function(){return R},t.unstable_getFirstCallbackNode=function(){return S(O)},t.unstable_next=function(e){switch(R){case 1:case 2:case 3:var t=3;break;default:t=R}var n=R;R=t;try{return e()}finally{R=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=N,t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=R;R=e;try{return t()}finally{R=n}},t.unstable_scheduleCallback=function(e,i,a){var u=t.unstable_now();switch(a="object"==typeof a&&null!==a&&"number"==typeof(a=a.delay)&&0<a?u+a:u,e){case 1:var l=-1;break;case 2:l=250;break;case 5:l=1073741823;break;case 4:l=1e4;break;default:l=5e3}return e={id:j++,callback:i,priorityLevel:e,startTime:a,expirationTime:l=a+l,sortIndex:-1},a>u?(e.sortIndex=a,x(C,e),null===S(O)&&e===S(C)&&($?o():$=!0,r(M,a-u))):(e.sortIndex=l,x(O,e),I||T||(I=!0,n(D))),e},t.unstable_wrapCallback=function(e){var t=R;return function(){var n=R;R=t;try{return e.apply(this,arguments)}finally{R=n}}}},840:(e,t,n)=>{"use strict";e.exports=n(53)},379:e=>{"use strict";var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var i={},a=[],u=0;u<e.length;u++){var l=e[u],s=r.base?l[0]+r.base:l[0],c=i[s]||0,f="".concat(s," ").concat(c);i[s]=c+1;var d=n(f),h={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==d)t[d].references++,t[d].updater(h);else{var p=o(h,r);r.byIndex=u,t.splice(u,0,{identifier:f,updater:p,references:1})}a.push(f)}return a}function o(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var i=r(e=e||[],o=o||{});return function(e){e=e||[];for(var a=0;a<i.length;a++){var u=n(i[a]);t[u].references--}for(var l=r(e,o),s=0;s<i.length;s++){var c=n(i[s]);0===t[c].references&&(t[c].updater(),t.splice(c,1))}i=l}}},569:e=>{"use strict";var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},216:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},565:(e,t,n)=>{"use strict";e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},795:e=>{"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var i=n.sourceMap;i&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},589: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))}}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.loaded=!0,i.exports}return n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var r=t.getElementsByTagName("script");r.length&&(e=r[r.length-1].src)}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),n(666),n(349)})()}));