1/*! For license information please see 715.44c82121.js.LICENSE.txt */ 2(self.webpackChunk=self.webpackChunk||[]).push([[715],{2715:(t,e,i)=>{"use strict";i.r(e);var a={};i.r(a),i.d(a,{addClass:()=>p,append:()=>b,clamp:()=>u,create:()=>x,drawCanvas:()=>d,each:()=>z,formatTime:()=>l,hasClass:()=>S,insert:()=>k,lazyLoader:()=>h,off:()=>C,on:()=>A,randomId:()=>D,removeClass:()=>f,replaceClass:()=>m,saveFile:()=>c,select:()=>M,setAttributes:()=>w,style:()=>g,toggleClass:()=>_,toggleEvent:()=>y,toggleStyle:()=>v});var r={};i.r(r),i.d(r,{Area:()=>F,Axis:()=>I,Bisect:()=>j,Chart:()=>J,CheckPoint:()=>H,Colors:()=>E,Domain:()=>X,Grid:()=>O,LegendItem:()=>P,Path:()=>T,PositionMarker:()=>N,Range:()=>R,Ruler:()=>G,Scale:()=>U,Tooltip:()=>B});i(24812),i(25369),i(83112),i(83710),i(41539),i(39714),i(88674),i(43290),i(26541),i(74916),i(23123);var n=6e4,o=60*n,s=24*o;function l(t){var e=Math.floor(t/s),i=Math.floor((t-e*s)/o),a=Math.floor((t-e*s-i*o)/n),r=Math.round((t-e*s-i*o-a*n)/1e3);return 60===r&&(a++,r=0),60===a&&(i++,a=0),24===i&&(e++,i=0),(e?e+"d ":"")+i.toString().padStart(2,0)+":"+a.toString().padStart(2,0)+"'"+r.toString().padStart(2,0)+'"'}function c(t,e){var i=x("a","",{href:t,target:"_new",download:e||"",style:"display:none;"}),a=document.body;a.appendChild(i),i.click(),a.removeChild(i)}function h(t,e,i){return!1===e?Promise.resolve():i instanceof Promise?i:new Promise((function(e,i){var a=document.createElement("script");a.addEventListener("load",e,{once:!0}),a.src=t,document.head.appendChild(a)}))}function d(t,e){e.classed("canvas-path",!0),t.beginPath(),t.moveTo(0,0);var i=new Path2D(e.attr("d"));t.strokeStyle=e.attr("stroke"),t.fillStyle=e.attr("fill"),t.lineWidth=1.25,t.globalCompositeOperation="source-over",t.globalAlpha=e.attr("stroke-opacity")||.3,t.stroke(i),t.globalAlpha=e.attr("fill-opacity")||.45,t.fill(i),t.globalAlpha=1,t.closePath()}function u(t,e){return e?t<e[0]?e[0]:t>e[1]?e[1]:t:t}function p(t,e){t&&e.split(" ").every((function(e){return e&&L.DomUtil.addClass(t,e)}))}function f(t,e){t&&e.split(" ").every((function(e){return e&&L.DomUtil.removeClass(t,e)}))}function _(t,e,i){return(i?p:f).call(null,t,e)}function m(t,e,i){e&&f(t,e),i&&p(t,i)}function g(t,e,i){return void 0===i?L.DomUtil.getStyle(t,e):t.style.setProperty(e,i)}function v(t,e,i,a){return g(t,e,a?i:"")}function y(t,e,i,a){return t[a?"on":"off"](e,i)}function x(t,e,i,a){var r=L.DomUtil.create(t,e||"");return i&&w(r,i),a&&b(a,r),r}function b(t,e){return t.appendChild(e)}function k(t,e,i){return t.insertAdjacentElement(i,e)}function w(t,e){for(var i in e)t.setAttribute(i,e[i])}function M(t,e){return(e||document).querySelector(t)}var A=L.DomEvent.on,C=L.DomEvent.off,S=L.DomUtil.hasClass;function D(){return Math.random().toString(36).substr(2,9)}function z(t,e){for(var i in t)e(t[i],i)}i(68309),i(15306),i(69600),i(89554),i(54747),i(2707),i(47941),i(92222);var E={lightblue:{area:"#3366CC",alpha:.45,stroke:"#3366CC"},magenta:{area:"#FF005E"},yellow:{area:"#FF0"},purple:{area:"#732C7B"},steelblue:{area:"#4682B4"},red:{area:"#F00"},lime:{area:"#9CC222",line:"#566B13"}},F=function(t){t.width;var e=t.height,i=t.xAttr,a=t.yAttr,r=t.scaleX,n=t.scaleY,o=t.interpolation,s=void 0===o?"curveLinear":o;return d3.area().curve("string"==typeof s?d3[s]:s).x((function(t){return t.xDiagCoord=r(t[i])})).y0(e).y1((function(t){return n(t[a])}))},T=function(t){var e=t.name,i=t.color,a=t.strokeColor,r=t.strokeOpacity,n=t.fillOpacity,o=d3.create("svg:path");return e&&o.classed(e,!0),o.style("pointer-events","none"),o.attr("fill",i||"#3366CC").attr("stroke",a||"#000").attr("stroke-opacity",r||"1").attr("fill-opacity",n||"0.8"),o},I=function(t){var e=t.type,i=void 0===e?"axis":e,a=t.tickSize,r=void 0===a?6:a,n=t.tickPadding,o=void 0===n?3:n,s=t.position,l=t.height,c=t.width,h=t.axis,d=t.scale,u=t.ticks,p=t.tickFormat,f=t.label,_=t.labelX,m=t.labelY,g=t.name,v=void 0===g?"":g,y=t.onAxisMount;return function(t){var e=0,a=0;"bottom"==s&&(a=l),"right"==s&&(e=c),"x"==h&&"grid"==i?r=-l:"y"==h&&"grid"==i&&(r=-c);var n=d3["axis"+s.replace(/\b\w/g,(function(t){return t.toUpperCase()}))]().scale(d).ticks(u).tickPadding(o).tickSize(r).tickFormat(p),g=t.append("g").attr("class",[h,i,s,v].join(" ")).attr("transform","translate("+e+","+a+")").call(n);return f&&g.append("svg:text").attr("x",_).attr("y",m).text(f),y&&g.call(y),g}},O=function(t){return t.type="grid",I(t)},N=function(t){var e=t.theme,i=t.xCoord,a=void 0===i?0:i,r=t.yCoord,n=void 0===r?0:r,o=t.labels,s=void 0===o?{}:o,l=t.item,c=void 0===l?{}:l,h=t.length,d=void 0===h?0:h;return function(t){t.attr("class","height-focus-group");var i,r=t.select(".height-focus.line"),o=t.select(".height-focus.circle-lower"),l=t.select(".height-focus-label");return r.node()||(r=t.append("svg:line")),o.node()||(o=t.append("svg:circle")),l.node()||(l=t.append("svg:text")),isNaN(a)||isNaN(n)||(o.attr("class",e+" height-focus circle-lower").attr("transform","translate("+a+","+n+")").attr("r",6).attr("cx",0).attr("cy",0),r.attr("class",e+" height-focus line").attr("x1",a).attr("x2",a).attr("y1",n).attr("y2",d),l.attr("class",e+" height-focus-label").style("pointer-events","none").attr("x",a+5).attr("y",d),Object.keys(s).sort((function(t,e){return s[t].order-s[e].order}
2)).forEach((function(t){(i=l.select(".height-focus-"+s[t].name)).size()||(i=l.append("svg:tspan").attr("class","height-focus-"+s[t].name).attr("dy","1.5em")),i.text("function"!=typeof s[t].value?s[t].value:s[t].value(c))})),l.select("tspan").attr("dy",l.selectAll("tspan").size()>1?"-1.5em":"0em"),l.selectAll("tspan").attr("x",a+5)),t}},P=function(t){var e=t.name,i=t.label,a=t.width,r=t.height,n=t.margins,o=void 0===n?{}:n,s=t.color,l=t.path;return function(t){return t.attr("class","legend-item legend-"+e.toLowerCase()).attr("data-name",e),t.on("click.legend",(function(){return d3.select(t.node().ownerSVGElement||t).dispatch("legend_clicked",{detail:{path:l.node(),name:e,legend:t.node(),enabled:!l.classed("leaflet-hidden")}})})),t.append("svg:rect").attr("x",a/2-50).attr("y",r+o.bottom/2).attr("width",50).attr("height",10).attr("fill",s).attr("stroke","#000").attr("stroke-opacity","0.5").attr("fill-opacity","0.25"),t.append("svg:text").text(L._(i||e)).attr("x",a/2+5).attr("font-size",10).style("text-decoration-thickness","2px").style("font-weight","700").attr("y",r+o.bottom/2).attr("dy","0.75em"),t}},B=function(t){var e=t.xCoord,i=t.yCoord,a=t.width,r=t.height,n=t.labels,o=void 0===n?{}:n,s=t.item,l=void 0===s?{}:s;return function(t){var n=t.select(".mouse-focus-line"),s=t.select(".mouse-focus-label");n.node()||(n=t.append("svg:line")),s.node()||(s=t.append("g"));var c=s.select(".mouse-focus-label-rect"),h=s.select(".mouse-focus-label-text");c.node()||(c=s.append("svg:rect")),h.node()||(h=s.append("svg:text"));var d,u=0,p=0,f={width:0,height:0};try{f=h.node().getBBox()}catch(e){return t}return e&&(u=e+(e<a/2?10:-f.width-10)),i&&(p=Math.max(i-f.height,L.Browser.webkit?0:-1/0)),n.attr("class","mouse-focus-line").attr("x2",e).attr("y2",0).attr("x1",e).attr("y1",r),s.attr("class","mouse-focus-label"),c.attr("class","mouse-focus-label-rect").attr("x",u-5).attr("y",p-5).attr("width",f.width+10).attr("height",f.height+10).attr("rx",3).attr("ry",3),h.attr("class","mouse-focus-label-text").style("font-weight","700").attr("y",p),Object.keys(o).sort((function(t,e){return o[t].order-o[e].order})).forEach((function(t){(d=h.select(".mouse-focus-label-"+o[t].name)).size()||(d=h.append("svg:tspan",".mouse-focus-label-x").attr("class","mouse-focus-label-"+o[t].name).attr("dy","1.5em")),d.text("function"!=typeof o[t].value?o[t].value:o[t].value(l))})),h.select("tspan").attr("dy","1em"),h.selectAll("tspan").attr("x",u),t}},G=function(t){var e=t.height,i=t.width;return function(t){t.data([{x:0,y:e}]).attr("transform",(function(t){return"translate("+t.x+","+t.y+")"}));var a=t.selectAll(".horizontal-drag-rect").data([{w:i}]),r=t.selectAll(".horizontal-drag-line").data([{w:i}]),n=t.selectAll(".horizontal-drag-label").data([{w:i-8}]),o=t.selectAll(".horizontal-drag-symbol").data([{type:d3.symbolTriangle,x:i+7,y:0,angle:-90,size:50}]);return a.exit().remove(),r.exit().remove(),n.exit().remove(),o.exit().remove(),a.enter().append("svg:rect").attr("class","horizontal-drag-rect").attr("x",0).attr("y",-8).attr("height",8).attr("fill","none").attr("pointer-events","all").merge(a).attr("width",(function(t){return t.w})),r.enter().append("svg:line").attr("class","horizontal-drag-line").attr("x1",0).merge(r).attr("x2",(function(t){return t.w})),n.enter().append("svg:text").attr("class","horizontal-drag-label").attr("text-anchor","end").attr("y",-8).merge(n).attr("x",(function(t){return t.w})),o.enter().append("svg:path").attr("class","horizontal-drag-symbol").merge(o).attr("d",d3.symbol().type((function(t){return t.type})).size((function(t){return t.size}))).attr("transform",(function(t){return"translate("+t.x+","+t.y+") rotate("+t.angle+")"})),t}},H=function(t){var e=t.point,i=t.height,a=t.width,r=t.x,n=t.y;return function(t){return isNaN(r)||isNaN(n)||(e.item&&e.item.property("isConnected")||(e.position=e.position||"bottom",e.item=t.append("g"),e.item.append("svg:line").attr("y1",0).attr("x1",0).attr("style","stroke: rgb(51, 51, 51); stroke-width: 0.5; stroke-dasharray: 2, 2;"),e.item.append("svg:circle").attr("class"," height-focus circle-lower").attr("r",3),e.label&&e.item.append("svg:text").attr("dx","4px").attr("dy","-4px")),e.item.datum({pos:e.position,x:r,y:n}).attr("class",(function(t){return"point "+t.pos})).attr("transform",(function(t){return"translate("+t.x+","+t.y+")"}
2)),e.item.select("line").datum({y2:{top:-n,bottom:i-n}[e.position],x2:{left:-r,right:a-r}[e.position]||0}).attr("y2",(function(t){return t.y2})).attr("x2",(function(t){return t.x2})),e.label&&e.item.select("text").text(e.label)),t}},X=function(t){var e=t.min,i=t.max,a=t.attr,r=t.name,n=t.forceBounds,o=t.scale;return function(t){a=a||r,o&&o.attr&&(a=o.attr);var s=t&&t.length?d3.extent(t,(function(t){return t[a]})):[0,1];return void 0!==e&&(e<s[0]||n)&&(s[0]=e),void 0!==i&&(i>s[1]||n)&&(s[1]=i),s}},R=function(t){var e=t.axis;return function(t,i){return"x"==e?[0,t]:"y"==e?[i,0]:void 0}},U=function(t){var e=t.data,i=t.attr,a=t.min,r=t.max,n=t.forceBounds,o=t.range;return d3.scaleLinear().range(o).domain(X({min:a,max:r,attr:i,forceBounds:n})(e))},j=function(t){var e=t.data,i=void 0===e?[0,1]:e,a=t.scale,r=t.x,n=t.attr;return d3.bisector((function(t){return t[n]})).left(i,a.invert(r))},J=function(t){var e=t.width,i=t.height,a=t.margins,r=void 0===a?{}:a,n=(t.ruler,e-r.left-r.right),o=i-r.top-r.bottom,s=d3.create("svg:svg").attr("class","background"),l=s.append("g"),c={grid:l.append("g").attr("class","grid"),area:l.append("g").attr("class","area"),axis:l.append("g").attr("class","axis"),point:l.append("g").attr("class","point"),brush:l.append("g").attr("class","brush"),tooltip:l.append("g").attr("class","tooltip").attr("display","none"),ruler:l.append("g").attr("class","ruler"),legend:l.append("g").attr("class","legend")},h=c.area.append("svg:mask").attr("id","elevation-clipper").attr("fill-opacity",1),d=h.append("svg:rect").attr("class","zoom").attr("fill","white"),u=c.area.append("svg:foreignObject").attr("mask","url(#"+h.attr("id")+")"),p=u.append("xhtml:canvas").attr("class","canvas-plot"),f=p.node().getContext("2d");c.tooltip.call(B({xCoord:0,yCoord:0,height:o,width:n,labels:{}}));var _=d3.brushX().on("start.cursor end.cursor brush.cursor",(function(){return c.brush.select(".overlay").attr("cursor",null)})),m={mask:h,canvas:p,context:f,brush:_},g={svg:s,g:l,panes:c,utils:m,scale:function(t){return{x:U(t.x),y:U(t.y)}},_resize:function(t){var e=t.width,i=t.height,a=t.margins,r=void 0===a?{}:a,n=t.ruler,o=e-r.left-r.right,h=i-r.top-r.bottom;s.attr("viewBox","0 0 ".concat(e," ").concat(i)).attr("width",e).attr("height",i),l.attr("transform","translate("+r.left+","+r.top+")"),/Mac|iPod|iPhone|iPad/.test(navigator.platform)&&/AppleWebkit/i.test(navigator.userAgent)&&p.style("transform","translate("+r.left+"px,"+r.top+"px)"),d.attr("x",0).attr("y",0).attr("width",o).attr("height",h),u.attr("width",o).attr("height",h),p.attr("width",o).attr("height",h),n&&c.ruler.call(G({height:h,width:o})),c.brush.call(_.extent([[0,0],[o,h]])),c.brush.select(".overlay").attr("cursor",null),g._width=o,g._height=h,g.svg.dispatch("resize",{detail:{width:o,height:h}})},pane:function(t){return c[t]||(c[t]=l.append("g").attr("class",t)),c[t]},get:function(t){return m[t]}};return g._resize({width:e,height:i,margins:r}),g},Y=(i(57327),i(82772),i(21249),i(52420),i(65069),i(47042),i(85827),L.Class.extend({includes:L.Evented?L.Evented.prototype:L.Mixin.Events,initialize:function(t,e){var i=this;this.options=t,this.control=e,this._data=[],this._props={scales:{},paths:{},areas:{},grids:{},axes:{},legendItems:{},tooltipItems:{}},this._scales={},this._domains={},this._ranges={},this._paths={},this._brushEnabled=t.dragging,this._zoomEnabled=t.zooming;var a=this._chart=J(t);this._container=a.svg;this._grid=a.pane("grid"),this._area=a.pane("area"),this._point=a.pane("point"),this._axis=a.pane("axis"),this._legend=a.pane("legend"),this._tooltip=a.pane("tooltip"),this._ruler=a.pane("ruler"),this._initScale(),this._mask=a.get("mask"),this._context=a.get("context"),this._brush=a.get("brush"),this._zoom=d3.zoom(),this._drag=d3.drag(),this._initInteractions(),this._maskGaps=[],e.on("eletrack_added",(function(t){i._maskGaps.push(t.index),e.once("eledata_updated",(function(t){return i._maskGaps.push(t.index)}))}))},update:function(t){return t&&(t.data&&(this._data=t.data),t.options&&(this.options=t.options)),this._updateScale(),this._updateArea(),this._updateAxis(),this._updateLegend(),this._updateClipper(),this},render:function(){var t=this;return function(e){return e.append((function(){return t._container.node()}))}},clear:function(){this._resetDrag(),this._hideDiagramIndicator(),this._area.selectAll("path").attr("d","M0 0"),this._context.clearRect(0,0,this._width(),this._height()),this._maskGaps=[],this._mask.selectAll(".gap").remove()},_drawPath:function(t){var e=this._paths[t],i=this._props.areas[t];e.datum(this._data).attr("d",F(L.extend({},i,{width:this._width(),height:this._height(),scaleX:this._scales[i.scaleX],scaleY:this._scales[i.scaleY]}))),e.classed("leaflet-hidden")||(this.options.preferCanvas?d(this._context,e):this._area.append((function(){return e.no
2de()})))},_hasActiveLayers:function(){var t=this._paths;for(var e in t)if(!t[e].classed("leaflet-hidden"))return!0;return!1},_initBrush:function(t){var e=this,i=function(t){if(e._data.length&&("brush"!=t.type||t.sourceEvent)){var i=e._chart.panes.brush.select(".overlay").node(),a=d3.pointers(t,i)[0][0],r=e._data[e._findIndexForXCoord(a)];e.fire("mouse_move",{item:r,xCoord:a})}};this._brush.filter((function(t){return e._brushEnabled&&!t.shiftKey&&!t.button})).on("end.update",(function(t){if(e._data.length){var i=t.selection;if(i){var a=e._findIndexForXCoord(i[0]),r=e._findIndexForXCoord(i[1]);e.fire("dragged",{dragstart:e._data[a],dragend:e._data[r]})}}})).on("brush.update",i),this._chart.panes.brush.on("mouseenter.focus touchstart.focus",this.fire.bind(this,"mouse_enter")).on("mouseout.focus touchend.focus",this.fire.bind(this,"mouse_out")).on("mousemove.focus touchmove.focus",i)},_initClipper:function(){var t=this,e=this._container,i=this.options.margins,a=this._zoom;a.scaleExtent([1,10]).extent([[i.left,0],[this._width()-i.right,this._height()]]).translateExtent([[i.left,-1/0],[this._width()-i.right,1/0]]).filter((function(e){return t._zoomEnabled&&(e.shiftKey||4==e.buttons)})).on("start",(function(i){i.sourceEvent&&"mousedown"==i.sourceEvent.type&&e.style("cursor","grabbing"),1==i.transform.k&&0==i.transform.x&&(t._container.classed("zoomed",!0),t._mask&&t._point.attr("mask","url(#"+t._mask.attr("id")+")")),t.zooming=!0})).on("end",(function(i){1==i.transform.k&&0==i.transform.x&&(t._container.classed("zoomed",!1),t._mask&&t._point.attr("mask",null)),t.zooming=!1,e.style("cursor","")})).on("zoom",(function(e){t.zooming=!1,t._updateScale(),t.zooming=!0,t._scales.distance=t._x=e.transform.rescaleX(t._x),t._scales.time&&(t._scales.time=e.transform.rescaleX(t._scales.time)),t._resetDrag(),e.sourceEvent&&"mousemove"==e.sourceEvent.type&&t._hideDiagramIndicator(),t.fire("zoom")})),e.call(a)},_initInteractions:function(){this._initBrush(),this._initRuler(),this._initClipper(),this._initLegend()},_initLegend:function(){var t=this;this._container.on("legend_clicked",(function(e){var i=e.detail,a=i.path,r=i.legend,n=i.name,o=i.enabled;if(a){var s=M("text",r),l=M("rect",r);v(s,"text-decoration-line","line-through",o),v(l,"fill-opacity","0",o),_(a,"leaflet-hidden",o),t._updateArea(),t.fire("elepath_toggle",{path:a,name:n,legend:r,enabled:o})}}))},_initRuler:function(){var t=this;if(this.options.ruler){var e=d3.format(".0f"),i=this._drag;i.on("start end",(function(e,i){var a=t._height(),r=t._ruler.data()[0].y;(r>=a||r<=0)&&t._ruler.select(".horizontal-drag-label").text(""),t._hideDiagramIndicator()})).on("drag",(function(i,a){var r=t._height(),n=d3.pointers(i,t._area.node())[0][1],o=n>0?n<r?n:r:0,s=t._y.invert(o),l=L.extend(t._ruler.data()[0],{y:o});t._ruler.data([l]).attr("transform",(function(t){return"translate("+t.x+","+t.y+")"})).classed("active",o<r),t._container.select(".horizontal-drag-label").text(e(s)+" "+(t.options.imperial?"ft":"m")),t.fire("ruler_filter",{coords:n<r&&n>0?t._findCoordsForY(n):[]})})),this._ruler.call(i)}},_initScale:function(){var t=this.options;this._registerAxisScale({axis:"x",position:"bottom",attr:t.xAttr,min:t.xAxisMin,max:t.xAxisMax,name:"distance"}),this._registerAxisScale({axis:"y",position:"left",attr:t.yAttr,min:t.yAxisMin,max:t.yAxisMax,name:"altitude"}),this._x=this._scales.distance,this._y=this._scales.altitude},_registerAreaPath:function(t){"y"==t.scale?t.scale=this._y:"x"==t.scale&&(t.scale=this._x);var e=this.options;t.xAttr||(t.xAttr=e.xAttr),t.yAttr||(t.yAttr=e.yAttr),void 0===t.preferCanvas&&(t.preferCanvas=e.preferCanvas);var i=T(t);this._paths[t.name]=i,this._props.areas[t.name]=t,e.legend&&(this._props.legendItems[t.name]={name:t.name,label:t.label,color:t.color,path:i})},_registerAxisGrid:function(t){"y"==t.scale?t.scale=this._y:"x"==t.scale&&(t.scale=this._x),this._props.grids[t.name||t.axis]=t},_registerAxisScale:function(t){"y"==t.scale?t.scale=this._y:"x"==t.scale&&(t.scale=this._x);var e=this.options,i=t.scale;if("function"==typeof this._scales[t.name])t.scale=this._scales[t.name];else if("function"!=typeof i){(i=L.extend({data:this._data,forceBounds:e.forceAxisBounds}
2,i)).attr=i.attr||t.name;var a=this._domains[t.name]=X(t),r=this._ranges[t.name]=R(t);i.range=i.range||r(this._width(),this._height()),i.domain=i.domain||a(this._data),this._props.scales[t.name]=i,t.scale=this._scales[t.name]=U(i)}return t.ticks||("x"==t.axis?t.ticks=e.xTicks:"y"==t.axis&&(t.ticks=e.yTicks)),this._props.axes[t.name]=t,i},_registerCheckPoint:function(t){var e,i,a;this._data.length&&(t.latlng?(e=this._data[this._findIndexForLatLng(t.latlng)],i=this._x(e.dist),a=this._y(e.z)):isNaN(t.dist)||(i=this._x(t.dist),e=this._data[this._findIndexForXCoord(i)],a=this._y(e.z)),this._point.call(H({point:t,width:this._width(),height:this._height(),x:i,y:a})))},_registerTooltip:function(t){var e;t.order=null!==(e=t.order)&&void 0!==e?e:100,this._props.tooltipItems[t.name]=t},_updateArea:function(){var t=this._paths;for(var e in this._context.clearRect(0,0,this._width(),this._height()),t)t[e].classed("leaflet-hidden")||this._drawPath(e)},_updateAxis:function(){var t=this.options;this._grid.selectAll("g").remove(),this._axis.selectAll("g").remove();var e,i,a,r=this._props.grids,n=this._props.axes,o={width:this._width(),height:this._height(),tickFormat:""},s={width:this._width(),height:this._height()};for(var l in r)e=L.extend({},o,r[l]),a=O(e),this._grid.call(a);for(var c in n)!1!==t[c]&&"summary"!==t[c]&&(e=L.extend({},s,n[c]),i=I(e),this._axis.call(i));this._axis.selectAll(".y.axis.right").each((function(t,e,i){var a=d3.select(i[e]),r=a.attr("transform"),n=r.substring(r.indexOf("(")+1,r.indexOf(")")).split(",");a.attr("transform","translate("+(+n[0]+40*e)+","+n[1]+")"),e>0&&(a.select(":scope > path").attr("opacity",.25),a.selectAll(":scope > .tick line").attr("opacity",.75))}))},_updateClipper:function(){var t=this,e=this.options.margins;this._zoom.scaleExtent([1,10]).extent([[e.left,0],[this._width()-e.right,this._height()]]).translateExtent([[e.left,-1/0],[this._width()-e.right,1/0]]),this._mask.selectAll(".gap").remove(),this._maskGaps.forEach((function(e,i){if(!(i>=t._maskGaps.length-2)){var a=t._data[t._maskGaps[i]],r=t._data[t._maskGaps[i+1]],n=t._x(t._data[t._findIndexForLatLng(a.latlng)].dist),o=t._x(t._data[t._findIndexForLatLng(r.latlng)].dist);t._mask.append("rect").attr("x",n).attr("y",0).attr("width",o-n).attr("height",t._height()).attr("class","gap").attr("fill-opacity","0.8").attr("fill","black")}}))},_updateLegend:function(){var t=this;if(!1!==this.options.legend){var e,i=this._props.legendItems;for(var a in this._legend.selectAll("g").remove(),i)e=P(L.extend({width:this._width(),height:this._height(),margins:this.options.margins},i[a])),this._legend.append("g").call(e);var r=this._legend.selectAll(".legend-item"),n=r.nodes().length,o=Array(Math.floor(n/2)).fill(null).map((function(t,e){return 2*(e+1)-(1-Math.sign(n%2))})),s=o.slice().reverse().map((function(t){return-t}));n%2!=0&&s.push(0),o=s.concat(o);var l=this._axis.selectAll(".x.axis.bottom").nodes().length,c=30+2*l,h=30*n;n&&this.options.margins.right<h&&(this.options.margins.right=h,this.fire("margins_updated")),l&&this.options.margins.bottom<c&&(this.options.margins.bottom=c,this.fire("margins_updated")),r.each((function(e,i,a){var r=d3.select(a[i]),n=(r.select("rect"),r.attr("data-name")),s=t._paths[n],c=55*o[i],h=2*l;r.attr("transform","translate("+c+", "+h+")"),n in t.options&&"disabled"==t.options[n]&&(s.classed("leaflet-hidden",!0),r.select("text").style("text-decoration-line","line-through"),r.select("rect").style("fill-opacity","0")),t._mask&&s.attr("mask","url(#"+t._mask.attr("id")+")")}))}},_updateScale:function(){if(this.zooming)return{x:this._x,y:this._y};for(var t in this._scales)this._scales[t].domain(this._domains[t](this._data)).range(this._ranges[t](this._width(),this._height()));return{x:this._x,y:this._y}},_width:function(){return this._chart._width},_height:function(){return this._chart._height},_findCoordsForY:function(t){var e,i=this._data,a=this._y.invert(t),r=i.reduce((function(t,e,i){return e.z>=a&&t.push(i),t}),[]),n=0;return r.reduce((function(t,a,o){return r[e=o+1]===r[o]+1&&e!==r.length||(t.push(r.slice(n,e).map((function(t){return i[t].latlng}))),n=e),t}),[])},_findIndexForXCoord:function(t){var e=this;return d3.bisector((function(t){return t[e.options.xAttr]})).left(this._data||[0,1],this._x.invert(t))},_findIndexForLatLng:function(t){var e=null,i=1/0;return this._data.forEach((function(a,r){var n=t.distanceTo(a.latlng);n<i&&(i=n,e=r)})),e},_resetDrag:function(){this._chart.panes.brush.select(".selection").attr("width")&&(this._chart.panes.brush.call(this._brush.clear),this._hideDiagramIndicator(),this.fire("reset_drag"))},_resetZoom:function(){this._zoom&&this._zoom.transform(this._chart.svg,d3.zoomIdentity)},_showDiagramIndicator:function(t,e){this._tooltip.attr("display",null).call(B({xCoord:e,yCoord:this._y(t[this.options.yAttr]),height:this._height(),width:this._width(),labels:this._props.tooltipItems,item:t}))},_hideDiagramIndicator:function(){this._tooltip.attr("display","none")}}));function V(t){return V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},V(t)}i(26699),i(73210),i(69826),i(91038),i(78783),i(40561);var W=L.Class.extend({initialize:function(t){switch(this.options=t,this.options.marker){case"elevation-line":break;case"position-marker":this._marker=L.marker([0,0],{icon:this.options.markerIcon,zIndexOffset:1e6,interactive:!1})}return this._labels={},this},addTo:function(t){switch(this._map=t,this.options.marker){case"elevation-line":this._container=d3.select(t.getPane("elevationPane")).select("svg > g").call(N({}));break;case"position-marker":this._marker.addTo(t,{pane:"overlayPane"})}return this},update:function(t){if(t?this._props=t:t=this._props,t)switch(t.options&&(this.options=t.options),this._map||this.addTo(t.map),this._latlng=t.item.latlng,this.options.marker){case"elevation-line":if(this._container){var e=this._map.latLngToLayerPoint(this._latlng);e=L.extend({},t.item,this._map._rotate?this._map.rotatedPointToMapPanePoint(e):e),this._container.classed("leaflet-hidden",!1),this._container.call(N({theme:this.options.theme,xCoord:e.x,yCoord:e.y,length:e.y-this._height()/t.maxElevation*e.z,labels:this._labels,item:e}))}break;case"position-marker":f(this._marker.getElement(),"leaflet-hidden"),this._marker.setLatLng(this._latlng)}},remove:function(){switch(this._props=null,this.options.marker){case"elevation-line":this._container&&this._container.classed("leaflet-hidden",!0);break;case"position-marker":p(this._marker.getElement(),"leaflet-hidden")}},getLatLng:function(){return this._latlng},_height:function(){var t=this.options;return t.height-t.margins.top-t.margins.bottom},_registerTooltip:function(t){this._labels[t.name]=t}}),$=L.Class.extend({initialize:function(t,e){this.options=t,this.control=e,this.labels={},g(this._container=x("div","elevation-summary "+(t.summary?t.summary+"-summary":"")),"max-width",t.width?t.width+"px":"")},render:function(){var t=this;return function(e){return e.append((function(){return t._container}))}},reset:function(){this._container.innerHTML=""}
2,append:function(t,e,i){return this._container.innerHTML+='<span class="'.concat(t,'"><span class="summarylabel">').concat(e,'</span><span class="summaryvalue">').concat(i,"</span></span>"),this},update:function(){var t=this;Object.keys(this.labels).sort((function(e,i){return t.labels[e].order-t.labels[i].order})).forEach((function(e){t.append(e,L._(t.labels[e].label),"function"!=typeof t.labels[e].value?t.labels[e].value:t.labels[e].value(t.control.track_info))}))},_registerSummary:function(t){for(var e in t){var i;t[e].order=null!==(i=t[e].order)&&void 0!==i?i:100,this.labels[e]=t[e]}}}),Z={autofitBounds:!0,autohide:!L.Browser.mobile,autohideMarker:!0,almostover:!0,altitude:!0,collapsed:!1,detached:!0,distance:!0,distanceMarkers:{lazy:!0,distance:!0,direction:!0},decimalsX:2,decimalsY:0,dragging:!L.Browser.mobile,downloadLink:"link",elevationDiv:"#elevation-div",followMarker:!0,forceAxisBounds:!1,height:200,imperial:!1,interpolation:"curveLinear",lazyLoadJS:!0,legend:!0,margins:{top:30,right:30,bottom:30,left:40},marker:"elevation-line",markerIcon:L.divIcon({className:"elevation-position-marker",html:'<i class="elevation-position-icon"></i>',iconSize:[32,32],iconAnchor:[16,16]}),position:"topright",polyline:{className:"elevation-polyline",color:"#000",opacity:.75,weight:5,lineCap:"round"},polylineSegments:{className:"elevation-polyline-segments",color:"#F00",interactive:!1},preferCanvas:!1,reverseCoords:!1,ruler:!0,skipNullZCoords:!1,theme:"lightblue-theme",summary:"inline",slope:!1,slopeDeltaMax:void 0,slopeRange:void 0,speed:!1,speedDeltaMax:void 0,speedRange:void 0,time:!1,timeFactor:3600,timeFormat:!1,timestamps:!1,width:600,waypoints:!0,wptIcons:{"":L.divIcon({className:"elevation-waypoint-marker",html:'<i class="elevation-waypoint-icon default"></i>',iconSize:[30,30],iconAnchor:[8,30]})},wptLabels:!0,xAttr:"dist",xLabel:"km",xTicks:void 0,yAttr:"z",yAxisMax:void 0,yAxisMin:void 0,yLabel:"m",yTicks:void 0,zFollow:!1,zooming:!L.Browser.Mobile},K=L.Control.Elevation=L.Control.extend({includes:L.Evented?L.Evented.prototype:L.Mixin.Events,options:Z,__mileFactor:.621371,__footFactor:3.28084,__D3:"https://unpkg.com/[email protected]/dist/d3.min.js",__TOGEOJSON:"https://unpkg.com/@tmcw/[email protected]/dist/togeojson.umd.js",__LGEOMUTIL:"https://unpkg.com/[email protected]/src/leaflet.geometryutil.js",__LALMOSTOVER:"https://unpkg.com/[email protected]/src/leaflet.almostover.js",__LDISTANCEM:"https://unpkg.com/@raruto/[email protected]/libs/leaflet-distance-marker.min.js",addData:function(t,e){var i=this;this.lazyLoad(this.__D3).then((function(){void 0===e&&t.on&&(e=t),i._addData(t),i._addLayer(e),i._fireEvt("eledata_added",{data:t,layer:e,track_info:i.track_info})}))},addTo:function(t){if(this.options.detached){var e=this._initElevationDiv();e.isConnected||k(t.getContainer(),e,"afterend"),b(e,this.onAdd(t))}else L.Control.prototype.addTo.call(this,t);return this},clear:function(){this._marker&&this._marker.remove(),this._chart&&this._clearChart(),this._layers&&this._clearLayers(),this._markers&&this._clearMarkers(),this._data=[],this.track_info={},this._fireEvt("eledata_clear"),this._updateChart()},_clearChart:function(){var t=this;this._events&&this._events.elechart_updated&&this._events.elechart_updated.forEach((function(e){return t.off("elechart_updated",e.fn,e.ctx)})),this._chart&&this._chart._container&&(this._chart._container.selectAll("g.point .point").remove(),this._chart.clear())},_clearLayers:function(){this._layers&&this._layers.eachLayer&&(this._layers.eachLayer((function(t){return t.remove()})),this._layers.clearLayers())},_clearMarkers:function(){this._markers&&this._markers.eachLayer&&(this._markers.eachLayer((function(t){return t.remove()})),this._markers.clearLayers())},disableBrush:function(){this._chart._brushEnabled=!1,this._resetDrag()},enableBrush:function(){this._chart._brushEnabled=!0},disableZoom:function(){this._chart._zoomEnabled=!1,this._chart._resetZoom()},enableZoom:function(){this._chart._zoomEnabled=!0},fitBounds:function(t){t=t||this.getBounds(),this._map&&t.isValid()&&this._map.fitBounds(t)},getBounds:function(t){return t=t||this._data,L.latLngBounds(t.map((function(t){return t.latlng})))},getZFollow:function(){return this.options.zFollow},hide:function(){g(this._container,"display","none")},initialize:function(t){this._data=[],this._layers=L.featureGroup(),this._markers=L.featureGroup(),this._markedSegments=L.polyline([]),this._chartEnabled=!0,this.track_info={},this.handlers=[],L.setOptions(this,t),this.options.followMarker&&(this._setMapView=L.Util.throttle(this._setMapView,300,this)),this.options.legend&&(this.options.margins.bottom+=30),this.options.theme&&(this.options.polylineSegments.className+=" "+this.options.theme),!0===this.options.wptIcons&&(this.options.wptIcons=Z.wptIcons),!0===this.options.distanceMarkers&&(this.options.distanceMarkers=Z.distanceMarkers),this._markedSegments.setStyle(this.options.polylineSegments),L.extend(E,this.options.colors||{}),this._fixCanvasPaths(),this._fixTooltipSize()},lazyLoad:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";if(!this.options.lazyLoadJS)return Promise.resolve();switch(t){case this.__D3:i="_d3LazyLoader",e="object"!==("undefined"==typeof d3?"undefined":V(d3));break;case this.__TOGEOJSON:i="_togeojsonLazyLoader",e="object"!==("undefined"==typeof toGeoJSON?"undefined":V(toGeoJSON));break;case this.__LGEOMUTIL:i="_geomutilLazyLoader",e="object"!==V(L.GeometryUtil);break;case this.__LALMOSTOVER:i="_almostoverLazyLoader",e="function"!=typeof L.Handler.AlmostOver;break;case this.__LDISTANCEM:i="_distanceMarkersLazyLoader",e="function"!=typeof L.DistanceMarkers}return L.Control.Elevation[i]=h(t,e,L.Control.Elevation[i])},load:function(t){var e=this;this._parseFromString(t).then((function(i){return i?e._loadLayer(i):e._loadFile(t)}))},onAdd:function(t){var e=this;this._map=t;var i=this._container=x("div","elevation-control elevation "+this.options.theme+" "+(this.options.detached?"":"leaflet-control"));return this.lazyLoad(this.__D3).then((function(){e._initButton(i),e._initChart(i),e._initSummary(i),e._initMarker(t),e._initLayer(t),t.on("zoom viewreset zoomanim",e._hideMarker,e).on("resize",e._resetView,e).on("resize",e._resizeChart,e).on("rotate",e._rotateMarker,e).on("mousedown",e._resetDrag,e),A(t.getContainer(),"mousewheel",e._resetDrag,e),A(t.getContainer(),"touchstart",e._resetDrag,e),A(document,"keydown",e._keydownHandler,e),e.on("eledata_added eledata_loaded",e._updateChart,e).on("eledata_added eledata_loaded",e._updateSummary,e),e._updateChart(),e._updateSummary()})),i},onRemove:function(t){this._container=null,t.off("zoom viewreset zoomanim",this._hideMarker,this).off("resize",this._resetView,this).off("resize",this._resizeChart,this).off("mousedown",this._resetDrag,this),C(t.getContainer(),"mousewheel",this._resetDrag,this),C(t.getContainer(),"touchstart",this._resetDrag,this),C(document,"keydown",this._key
2downHandler,this),this.off("eledata_added eledata_loaded",this._updateChart,this).off("eledata_added eledata_loaded",this._updateSummary,this)},redraw:function(){this._resizeChart()},setZFollow:function(t){this.options.zFollow=t},show:function(){g(this._container,"display","block")},_addData:function(t){var e=this;if(t){var i=t.geometry;if(i)switch(i.type){case"LineString":this._addGeoJSONData(i.coordinates);break;case"MultiLineString":z(i.coordinates,(function(t){return e._addGeoJSONData(t)}));break;default:console.warn("Unsopperted GeoJSON feature geometry type:"+i.type)}"FeatureCollection"===t.type&&z(t.features,(function(t){return e._addData(t)})),t._latlngs&&this._addGeoJSONData(t._latlngs,t.feature&&t.feature.properties)}},_addGeoJSONData:function(t,e){var i=this;t.forEach((function(t,a){var r,n,o,s,l;t.meta=null!==(r=t.meta)&&void 0!==r?r:{time:null,ele:null,hr:null,cad:null,atemp:null};var c=e&&e.coordinateProperties||e;i.fire("elepoint_init",{point:t,props:c,id:a}),i._addPoint(null!==(n=t.lat)&&void 0!==n?n:t[1],null!==(o=t.lng)&&void 0!==o?o:t[0],null!==(s=null!==(l=t.alt)&&void 0!==l?l:t.meta.ele)&&void 0!==s?s:t[2]),i.fire("elepoint_added",{point:t,index:i._data.length-1})})),this.fire("eletrack_added",{coords:t,index:this._data.length-1})},_addPoint:function(t,e,i){if(this.options.reverseCoords){var a=[e,t];t=a[0],e=a[1]}this._data.push({x:t,y:e,z:i,latlng:L.latLng(t,e,i)}),this.fire("eledata_updated",{index:this._data.length-1})},_addLayer:function(t){t&&this._layers.addLayer(t),t&&this.options.distanceMarkers&&this.options.distanceMarkers.lazy&&t.on("add remove",(function(t){return L.DistanceMarkers&&t.target instanceof L.Polyline&&t.target[t.type+"DistanceMarkers"]()}))},_addMarker:function(t){t&&this._markers.addLayer(t)},_initAlmostOverHandler:function(t,e){var i=this;t&&this.options.almostOver&&this.lazyLoad(this.__LGEOMUTIL).then((function(){return i.lazyLoad(i.__LALMOSTOVER)})).then((function(){t.addHandler("almostOver",L.Handler.AlmostOver),L.GeometryUtil&&t.almostOver&&t.almostOver.enabled()&&(t.almostOver.addLayer(e),t.on("almost:move",(function(t){return i._mousemoveLayerHandler(t)})).on("almost:out",(function(t){return i._mouseoutHandler(t)})))}))},_initDistanceMarkers:function(t,e){var i=this;t&&(this.options.distanceMarkers?this.lazyLoad(this.__LGEOMUTIL).then((function(){return i.lazyLoad(i.__LDISTANCEM)})).then((function(){return i.options.polyline&&e.addTo(t)})):this.options.polyline&&e.addTo(t))},_initElevationDiv:function(){var t=M(this.options.elevationDiv);return t||(this.options.elevationDiv="#elevation-div_"+D(),t=x("div","leaflet-control elevation elevation-div",{id:this.options.elevationDiv.substr(1)})),this.options.detached&&m(t,"leaflet-control","elevation-detached"),this.eleDiv=t},_initMapIntegrations:function(t,e){var i=t._map;t._map?(i.once("layeradd",(function(i){return t.options.autofitBounds&&t.fitBounds(e.getBounds())})),L.Browser.mobile?t.options.polyline&&e.addTo(i):(t._initAlmostOverHandler(i,e),t._initDistanceMarkers(i,e))):console.warn("Undefined elevation map object")},_collapse:function(){m(this._container,"elevation-expanded","elevation-collapsed")},_expand:function(){m(this._container,"elevation-collapsed","elevation-expanded")},_fixCanvasPaths:function(){var t=L.Canvas.prototype._fillStroke,e=this;L.Canvas.include({_fillStroke:function(i,a){if(e._layers.hasLayer(a)){var r=e.options.theme.replace("-theme",""),n=E[r]||{},o=a.options;if(o.color=n.line||n.area||r,o.stroke=!!o.color,t.call(this,i,a),o.stroke&&0!==o.weight){var s=i.globalCompositeOperation||"source-over";i.globalCompositeOperation="destination-over",i.strokeStyle=n.outline||"#FFF",i.lineWidth=1.75*o.weight,i.stroke(),i.globalCompositeOperation=s}}else t.call(this,i,a)}})},_fixTooltipSize:function(){var t=this;this.on("elechart_init",(function(){return t.once("elechart_change elechart_hover",(function(e){t._chartEnabled&&(t._chart._showDiagramIndicator(e.data,e.xCoord),t._chart._showDiagramIndicator(e.data,e.xCoord)),t._updateMarker(e.data)}))}))},_findItemForLatLng:function(t){return this._data[this._chart._findIndexForLatLng(t)]},_findItemForX:function(t){return this._data[this._chart._findIndexForXCoord(t)]}
2,_fireEvt:function(t,e,i){this.fire&&this.fire(t,e,i),this._map&&this._map.fire(t,e,i)},_height:function(){if(this._chart)return this._chart._height();var t=this.options;return t.height-t.margins.top-t.margins.bottom},_hideMarker:function(){this.options.autohideMarker&&this._marker.remove()},_initChart:function(t){var e=this.options;if(e.xTicks=this._xTicks(),e.yTicks=this._yTicks(),e.detached){var i=this.eleDiv,a=i.offsetWidth,r=i.offsetHeight;a>0&&(e.width=a),r>20&&(e.height=r-20)}else{var n=this._map.getContainer().clientWidth;e._maxWidth=e._maxWidth>e.width?e._maxWidth:e.width,this._container.style.maxWidth=e._maxWidth+"px",e._maxWidth>n&&(e.width=n-30)}var o=this._chart=new Y(e,this);this._x=this._chart._x,this._y=this._chart._y,d3.select(t).call(o.render()),o.on("reset_drag",this._hideMarker,this).on("mouse_enter",this._mouseenterHandler,this).on("dragged",this._dragendHandler,this).on("mouse_move",this._mousemoveHandler,this).on("mouse_out",this._mouseoutHandler,this).on("ruler_filter",this._rulerFilterHandler,this).on("zoom",this._updateChart,this).on("elepath_toggle",this._toggleChartHandler,this).on("margins_updated",this._resizeChart,this),this.fire("elechart_axis"),this.options.legend&&this.fire("elechart_legend"),this.fire("elechart_init")},_initLayer:function(){var t=this;this._layers.on("layeradd layerremove",(function(e){var i=e.layer;_(i.getElement&&i.getElement(),t.options.polyline.className+" "+t.options.theme,"layeradd"==e.type),y(i,"mousemove",t._mousemoveLayerHandler.bind(t),"layeradd"==e.type),y(i,"mouseout",t._mouseoutHandler.bind(t),"layeradd"==e.type)}))},_initMarker:function(t){var e=t.getPane("elevationPane");e||((e=this._pane=t.createPane("elevationPane",t.getPane("norotatePane")||t.getPane("mapPane"))).style.zIndex=625,e.style.pointerEvents="none"),this._renderer&&this._renderer.remove(),this._renderer=L.svg({pane:"elevationPane"}).addTo(this._map),this._marker=new W(this.options),this.fire("elechart_marker")},_initButton:function(t){if(!L.Browser.mobile&&this.options.detached||L.DomEvent.disableClickPropagation(t).disableScrollPropagation(t),!this.options.detached){var e=this._button=x("a","elevation-toggle elevation-toggle-icon"+(this.options.autohide?"":" close-button"),{href:"#",title:L._("Elevation")},t);this.options.collapsed&&(this._collapse(),this.options.autohide?(A(t,"mouseover",this._expand,this),A(t,"mouseout",this._collapse,this)):(A(e,"click",L.DomEvent.stop),A(e,"click",this._toggle,this)),A(e,"focus",this._toggle,this),this._map.on("click",this._collapse,this))}},_initSummary:function(t){this._summary=new $({summary:this.options.summary},this),d3.select(t).call(this._summary.render())},_keydownHandler:function(t){this.options.detached||"Escape"!==t.key||this._collapse()},_loadFile:function(t){var e=this;fetch(t).then((function(t){return t.text()})).then((function(i){e._downloadURL=t,e._parseFromString(i).then((function(t){return t&&e._loadLayer(t)}))})).catch((function(t){return console.warn(t)}))},_loadLayer:function(t){var e=this,i=e.options,a=i.wptIcons,r=i.wptLabels,n=L.geoJson(t,{distanceMarkers:e.options.distanceMarkers,style:function(t){var i=L.extend({},e.options.polyline);return e.options.theme&&(i.className+=" "+e.options.theme),i},pointToLayer:function(t,i){var n,o,s;if(e.options.waypoints){var l=t.properties,c=null!==(n=l.desc)&&void 0!==n?n:"",h=null!==(o=l.name)&&void 0!==o?o:"",d=(null!==(s=l.sym)&&void 0!==s?s:h).replace(" ","-").replace('"',"").replace("'","").toLowerCase();if([!0,"dots"].includes(e.options.waypoints)&&e._registerCheckPoint({latlng:i,label:[!0,"dots"].includes(r)?h:""}),[!0,"markers"].includes(e.options.waypoints)&&0!=a){a.hasOwnProperty(d)||(a[d]=L.divIcon(L.extend({},a[""].options,{html:'<i class="elevation-waypoint-icon '+d+'"></i>'})));var u=L.marker(i,{icon:a[d]});if([!0,"markers"].includes(r)&&(h||c)){var p=decodeURI("<b>"+h+"</b>"+(c.length>0?"<br>"+c:""));u.bindPopup(p,{className:"elevation-popup",keepInView:!0}).openPopup(),u.bindTooltip(p,{className:"elevation-tooltip",direction:"auto",sticky:!0,opacity:1}).openTooltip()}return e._addMarker(u),e.fire("waypoint_added",{point:u,element:i,properties:l}),u}}},onEachFeature:function(i,a){i.geometry&&"Point"!=i.geometry.type&&(e.addData(a),e.track_info=L.extend({},e.track_info,{name:t.name}))}});return e.lazyLoad(e.__D3).then((function(){e._initMapIntegrations(e,n),e._fireEvt("eledata_loaded",{data:t,layer:n,name:e.track_info.name,track_info:e.track_info})}
2)),n},_dragendHandler:function(t){this._hideMarker(),this.fitBounds(L.latLngBounds([t.dragstart.latlng,t.dragend.latlng])),this.fire("elechart_dragged")},_mouseenterHandler:function(t){this.fire("elechart_enter")},_mousemoveHandler:function(t){if(this._data.length&&this._chartEnabled){var e=this._findItemForX(t.xCoord);if(e){var i=t.xCoord;this._chartEnabled&&this._chart._showDiagramIndicator(e,i),this._updateMarker(e),this._setMapView(e),this._map&&p(this._map.getContainer(),"elechart-hover"),this.fire("elechart_change",{data:e,xCoord:i}),this.fire("elechart_hover",{data:e,xCoord:i})}}},_mousemoveLayerHandler:function(t){if(this._data.length){var e=this._findItemForLatLng(t.latlng);if(e){var i=e.xDiagCoord;this._chartEnabled&&this._chart._showDiagramIndicator(e,i),this._updateMarker(e),this.fire("elechart_change",{data:e,xCoord:i})}}},_mouseoutHandler:function(){this.options.detached||(this._hideMarker(),this._chart._hideDiagramIndicator()),this._map&&f(this._map.getContainer(),"elechart-hover"),this.fire("elechart_leave")},_parseFromGeoJSONString:function(t){try{return JSON.parse(t)}catch(t){}},_parseFromString:function(t){var e=this;return new Promise((function(i){return e.lazyLoad(e.__TOGEOJSON).then((function(){var a;try{a=e._parseFromXMLString(t.trim())}catch(i){a=e._parseFromGeoJSONString(t.toString())}a&&(a=e._prepareMultiLineStrings(a),a=e._prepareAdditionalProperties(a)),i(a)}))}))},_parseFromXMLString:function(t){var e;if(0!=t.indexOf("<"))throw"Invalid XML";var i=(new DOMParser).parseFromString(t,"text/xml"),a=i.documentElement.tagName.toLowerCase(),r=i.getElementsByTagName("name");if(i.getElementsByTagName("parsererror").length)throw"Invalid XML";a in toGeoJSON||(a="TrainingCenterDatabase"==i.documentElement.tagName?"tcx":"gpx");var n=toGeoJSON[a](i);return n.name=r.length>0?(null!==(e=Array.from(r).find((function(t){return"trk"==t.parentElement.tagName})))&&void 0!==e?e:r[0]).textContent:"",n},_prepareAdditionalProperties:function(t){return!t.name&&this._downloadURL&&(t.name=this._downloadURL.split("/").pop().split("#")[0].split("?")[0]),t},_prepareMultiLineStrings:function(t){return t.features.forEach((function(e){"MultiLineString"==e.geometry.type&&e.geometry.coordinates.forEach((function(i){t.features.push({geometry:{type:"LineString",coordinates:i},properties:e.properties,type:"Feature"})}))})),t.features.filter((function(t){return"MultiLineString"!=t.geometry.type}))},_registerAreaPath:function(t){var e=this;this.on("elechart_init",(function(){return e._chart._registerAreaPath(t)}))},_registerAxisGrid:function(t){var e=this;this.on("elechart_axis",(function(){return e._chart._registerAxisGrid(t)}))},_registerAxisScale:function(t){var e=this;this.on("elechart_axis",(function(){return e._chart._registerAxisScale(t)}))},_registerCheckPoint:function(t){var e=this;this.on("elechart_updated",(function(){return e._chart._registerCheckPoint(t)}))},_registerDataAttribute:function(t){var e=this,i=null;t.init&&this.on("elepoint_init",(function(i){return t.init.call(e,i)})),this.on("elepoint_added",(function(a){if(!1===t.skipNull){var r=e._data[a.index][t.name];if(a.index>0){var n=e._data[a.index-1][t.name];if(isNaN(n)){if(isNaN(i)||isNaN(r)?isNaN(i)?isNaN(r)||(n=r):n=i:n=(i+r)/2,!isNaN(n))return e._data.splice(a.index-1,1);e._data[a.index-1][t.name]=n}}isNaN(r)||(i=r)}e._data[a.index][t.name]=t.fetch.call(e,a.index,a.point),t.update&&(e._data[a.index][t.name]=t.update.call(e,e._data[a.index][t.name],a.index,a.point))}))},_registerTooltip:function(t){var e=this;if(t.chart){var i=L.extend({},t,{value:t.chart});this.on("elechart_init",(function(){return e._chart._registerTooltip(i)}))}if(t.marker){var a=L.extend({},t,{value:t.marker});this.on("elechart_marker",(function(){return e._marker._registerTooltip(a)}))}},_registerSummary:function(t){var e=this;this.on("elechart_summary",(function(){return e._summary._registerSummary(t)}))},_resetDrag:function(){this._chart._resetDrag(),this._hideMarker()},_resetView:function(){this._map&&this._map._isFullscreen||(this._resetDrag(),this._hideMarker(),this.options.autofitBounds&&this.fitBounds())},_resizeChart:function(){if(this._container&&"none"!=g(this._container,"display")){var t,e=this.options;if(e.detached)t=(this.eleDiv||this._container).offsetWidth;else{var i=this._map.getContainer().clientWidth;t=e._maxWidth>i?i-30:e._maxWidth}if(t){var a=this._chart;e.width=t,a&&a._chart&&(a._chart._resize(e),e.xTicks=this._xTicks(),e.yTicks=this._yTicks(),this._updateChart())}this._updateMapSegments()}},_rulerFilterHandler:function(t){this._updateMapSegments(t.coords)},_toggle:function(){S(this._container,"elevation-expanded")?this._collapse():this._expand()},_setMapView:function(t){if(this.options.followMarker&&this._map){var e=this._map.getZoom(),i=this.options.zFollow;
2"number"==typeof i?this._map.setView(t.latlng,e<i?i:e,{animate:!0,duration:.25}):this._map.getBounds().contains(t.latlng)||this._map.setView(t.latlng,e,{animate:!0,duration:.25})}},_toggleChartHandler:function(t){var e=this,i=t.name,a=t.enabled;this._chartEnabled=this._chart._hasActiveLayers(),this._layers.eachLayer((function(t){return _(t.getElement&&t.getElement(),e.options.polyline.className+" "+e.options.theme,e._chartEnabled)})),this.options[i]=a||"disabled"!=this.options[i]?"disabled":"enabled",this._chartEnabled||(this._chart._hideDiagramIndicator(),this._marker.remove())},_updateChart:function(){this._chart&&this._container&&(this.fire("elechart_axis"),this.fire("elechart_area"),this._chart.update({data:this._data,options:this.options}),this._x=this._chart._x,this._y=this._chart._y,this.fire("elechart_updated"))},_updateMarker:function(t){this._marker&&this._marker.update({map:this._map,item:t,maxElevation:this.track_info.elevation_max||0,options:this.options})},_rotateMarker:function(){this._marker&&this._marker.update()},_updateMapSegments:function(t){this._markedSegments.setLatLngs(t||[]),t&&this._map&&!this._map.hasLayer(this._markedSegments)&&this._markedSegments.addTo(this._map)},_updateSummary:function(){var t=this;this._summary.reset(),this.options.summary&&(this.fire("elechart_summary"),this._summary.update()),this.options.downloadLink&&this._downloadURL&&(this._summary._container.innerHTML+='<span class="download"><a href="#">'+L._("Download")+"</a></span>",M(".download a",this._summary._container).onclick=function(e){e.preventDefault();var i={downloadLink:t.options.downloadLink,confirm:c.bind(t,t._downloadURL)};"modal"==t.options.downloadLink&&"function"==typeof CustomEvent?document.dispatchEvent(new CustomEvent("eletrack_download",{detail:i})):"link"!=t.options.downloadLink&&!0!==t.options.downloadLink||i.confirm(),t.fire("eletrack_download",i)})},_width:function(){if(this._chart)return this._chart._width();var t=this.options;return t.width-t.margins.left-t.margins.right},_xTicks:function(){return this.__xTicks&&(this.__xTicks=this.options.xTicks),this.__xTicks||Math.round(this._width()/75)},_yTicks:function(){return this.__yTicks&&(this.__yTicks=this.options.yTicks),this.__yTicks||Math.round(this._height()/30)}});i(56977);K.addInitHook((function(){var t=this,e=this.options,i={};e.imperial?(e.distanceFactor=this.__mileFactor,i.label="mi"):(e.distanceFactor=e.distanceFactor||1,i.label=e.xLabel),this._registerDataAttribute({name:"dist",init:function(){},fetch:function(i){var a=t._data[i].latlng.distanceTo(t._data[i>0?i-1:i].latlng)*e.distanceFactor;return Math.round(a/1e3*1e5)/1e5},update:function(e){return t.track_info.distance=t.track_info.distance||0,t.track_info.distance+=e,t.track_info.distance}}),"summary"!=this.options.distance&&this._registerAxisScale({axis:"x",position:"bottom",scale:"x",label:i.label,labelY:25,labelX:function(){return t._width()+6},name:"distance"}),this._registerAxisGrid({axis:"x",position:"bottom",scale:"x"}),this._registerTooltip({name:"x",chart:function(t){return L._("x: ")+d3.format("."+e.decimalsX+"f")(t[e.xAttr])+" "+i.label},order:20}),this._registerSummary({totlen:{label:"Total Length: ",value:function(t){return(t.distance||0).toFixed(2)+" "+i.label},order:10}})}));var q;i(27207),i(3843);K.addInitHook((function(){var t=this,e=this.options,i={};i.label=e.timeLabel||"t",e.timeFactor=e.timeFactor||3600,this._timeAVGSpeed=(e.timeAVGSpeed||3.6)*(e.speedFactor||1),e.timeFormat?"time"==e.timeFormat?e.timeFormat=function(t){return new Date(t).toLocaleTimeString()}:"date"==e.timeFormat&&(e.timeFormat=function(t){return new Date(t).toLocaleDateString()}):e.timeFormat=function(t){return new Date(t).toLocaleString().replaceAll("/","-").replaceAll(","," ")},e.xTimeFormat=e.xTimeFormat||function(t){return l(t).split("'")[0]},this._registerDataAttribute({name:"time",init:function(t){var e=t.point,i=t.props,a=t.id;i&&("coordTimes"in i?e.meta.time=new Date(Date.parse(i.coordTimes[a])):"times"in i?e.meta.time=new Date(Date.parse(i.times[a])):"time"in i&&(e.meta.time=new Date(Date.parse("object"===V(i.time)?i.time[a]:i.time))))},fetch:function(t,e){if(!e.meta||!e.meta.time)if(e.meta=e.meta||{},t>0){var i=this._data[t].dist-this._data[t-1].dist,a=this._data[t-1].time.getTime(),r=i/this._timeAVGSpeed*this.options.timeFactor*1e3;e.meta.time=new Date(a+r)}else e.meta.time=new Date(Date.now());var n=e.meta.time;return n.getTime()-60*n.getTimezoneOffset()*1e3==0&&(n=0),n},update:function(t,e){return this.track_info.time=(this.track_info.time||0)+Math.abs(this._data[e].time-this._data[e>0?e-1:e].time),this._data[e].duration=this.track_info.time,t}}),e.time&&"summary"!=e.time&&!L.Browser.mobile&&this._registerAxisScale({axis:"x",position:"top",scale:{attr:"duration",min:0},label:i.label,labelY:-10,labelX:function(){return t._width()},name:"time",tickFormat:function(t){return 0==t?"":e.xTimeFormat(t)},onAxisMount:function(e){e.select(".domain").remove(),e.selectAll("text").attr("opacity",.65).style("font-family","Monospace").style("font-size","110%"),e.selectAll(".tick line").attr("y2",t._height()).attr("stroke-dasharray",2).attr("opacity",.75)}}),this.options.timestamps&&this._registerTooltip({name:"date",chart:function(e){return L._("t: ")+t.options.timeFormat(e.time)},order:20}),this.options.time&&(this._registerTooltip({name:"time",chart:function(t){return L._("T: ")+l(t.duration||0)},order:20}),this._registerSummary({tottime:{label:"Total Time: ",value:function(t){return l(t.time||0)},order:20}}))})),K.addInitHook((function(){var t=this,e=this.options,i={},a=e.theme.replace("-theme",""),r=E[a]||{};e.imperial?(e.altitudeFactor=this.__footFactor,i.label="ft"):(e.altitudeFactor=e.heightFactor||e.altitudeFactor||1,i.label=e.yLabel),this._registerDataAttribute({name:"z",skipNull:this.options.skipNullZCoords,init:function(t){var e=t.point;"alt"in e&&(e.meta.ele=e.alt)},fetch:function(i){return t._data[i].z*e.altitudeFactor},update:function(e,i){t.track_info.elevation_max=t.track_info.elevation_max||-1/0,t.track_info.elevation_min=t.track_info.elevation_max||1/0,t.track_info.elevation_avg=t.track_info.elevation_avg||0;var a=t._data,r=t.track_info;if(t.options.altitudeDeltaMax){var n=e-a[i>0?i-1:i].z,o=t.options.altitudeDeltaMax;Math.abs(n)>o&&(e=a[i-1].z+o*Math.sign(n))}return(e=u(e,t.options.altitudeRange))>r.elevation_max&&(r.elevation_max=e),e<r.elevation_min&&(r.elevation_min=e),r.elevation_avg=(e+r.elevation_avg)/2,e}}),this._registerAxisScale({axis:"y",position:"left",scale:"y",label:i.label,labelX:-3,labelY:-8,n
2ame:"altitude",visbile:"summary"!=this.options.altitude}),this._registerAxisGrid({axis:"y",position:"left",scale:"y"}),this._registerAreaPath({name:"altitude",label:"Altitude",scaleX:"distance",scaleY:"altitude",color:r.area||a,strokeColor:e.detached?r.stroke:"#000",strokeOpacity:"1",fillOpacity:e.detached?r.alpha||"0.8":1,preferCanvas:e.preferCanvas,visbile:"summary"!=this.options.altitude}),this._registerTooltip({name:"y",chart:function(t){return L._("y: ")+d3.format("."+e.decimalsY+"f")(t[e.yAttr])+" "+i.label},marker:function(t){return d3.format("."+e.decimalsY+"f")(t[e.yAttr])+" "+i.label},order:10}),this._registerSummary({maxele:{label:"Max Elevation: ",value:function(t){return(t.elevation_max||0).toFixed(2)+" "+i.label},order:30},minele:{label:"Min Elevation: ",value:function(t){return(t.elevation_min||0).toFixed(2)+" "+i.label},order:30},avgele:{label:"Avg Elevation: ",value:function(t){return(t.elevation_avg||0).toFixed(2)+" "+i.label},order:30}})})),K.addInitHook((function(){var t=this;if(this.options.slope){var e=this.options,i={};i.label=e.slopeLabel||"%",this._registerDataAttribute({name:"slope",fetch:function(e){var i=t._data,a=1e3*(i[e].dist-i[e>0?e-1:e].dist),r=i[e].z-i[e>0?e-1:e].z;return isNaN(r)||0===a?0:r/a*100},update:function(e,i){t.track_info.ascent=t.track_info.ascent||0,t.track_info.descent=t.track_info.descent||0,t.track_info.slope_max=t.track_info.slope_max||-1/0,t.track_info.slope_min=t.track_info.slope_min||1/0,t.track_info.slope_avg=t.track_info.slope_avg||0;var a=t.track_info,r=t._data,n=r[i].z-r[i>0?i-1:i].z;if(t.options.slopeDeltaMax){var o=slop-r[i>0?i-1:i].slope,s=t.options.slopeDeltaMax;Math.abs(o)>s&&(e=r[i-1].slope+s*Math.sign(o))}return e=u(e,t.options.slopeRange),n>0?t.track_info.ascent+=n:n<0&&(t.track_info.descent-=n),e>a.slope_max&&(a.slope_max=e),e<a.slope_min&&(a.slope_min=e),a.slope_avg=(e+a.slope_avg)/2,L.Util.formatNum(e,2)}}),this._registerAxisScale({axis:"y",position:"right",scale:{min:-1,max:1},tickPadding:16,label:i.label,labelX:25,labelY:-8,name:"slope",visbile:"summary"!=this.options.slope}),this._registerAreaPath({name:"slope",label:"Slope",yAttr:"slope",scaleX:"distance",scaleY:"slope",color:"#F00",strokeColor:"#000",strokeOpacity:"0.5",fillOpacity:"0.25",visbile:"summary"!=this.options.slope}),this._registerTooltip({name:"slope",chart:function(t){return L._("m: ")+t.slope+i.label},marker:function(t){return Math.round(t.slope)+i.label},order:40}),this._registerSummary({ascent:{label:"Total Ascent: ",value:function(e){return Math.round(e.ascent||0)+" "+(t.options.imperial?"ft":"m")},order:40},descent:{label:"Total Descent: ",value:function(e){return Math.round(e.descent||0)+" "+(t.options.imperial?"ft":"m")},order:40},minslope:{label:"Min Slope: ",value:function(t){return Math.round(t.slope_min||0)+" "+i.label},order:40},maxslope:{label:"Max Slope: ",value:function(t){return Math.round(t.slope_max||0)+" "+i.label},order:40},avgslope:{label:"Avg Slope: ",value:function(t){return Math.round(t.slope_avg||0)+" "+i.label},order:40}})}})),K.addInitHook((function(){var t=this;if(this.options.speed||this.options.acceleration){var e=this.options,i={};i.label=e.speedLabel||L._(e.imperial?"mph":"km/h"),e.speedFactor=e.speedFactor||1,this._registerDataAttribute({name:"speed",init:function(){},fetch:function(i){var a=t._data,r=1e3*(a[i].dist-a[i>0?i-1:i].dist),n=a[i].time-a[i>0?i-1:i].time;return n>0?Math.abs(r/n*e.timeFactor)*e.speedFactor:0},update:function(e,i){t.track_info.speed_max=t.track_info.speed_max||-1/0,t.track_info.speed_min=t.track_info.speed_min||1/0,t.track_info.speed_avg=t.track_info.speed_avg||0;var a=t._data,r=t.track_info;if(t.options.speedDeltaMax){var n=e-a[i>0?i-1:i].speed,o=t.options.speedDeltaMax;Math.abs(n)>o&&(e=a[i-1].speed+o*Math.sign(n))}return(e=u(e,t.options.speedRange))>r.speed_max&&(r.speed_max=e),e<r.speed_min&&(r.speed_min=e),r.speed_avg=(e+r.speed_avg)/2,L.Util.formatNum(e,2)}}),this.options.speed&&"summary"!=this.options.speed&&(this._registerAxisScale({axis:"y",position:"right",scale:{min:0,max:1}
2,tickPadding:16,label:i.label,labelX:25,labelY:-8,name:"speed"}),this._registerAreaPath({name:"speed",label:"Speed",yAttr:"speed",scaleX:"distance",scaleY:"speed",color:"#03ffff",strokeColor:"#000",strokeOpacity:"0.5",fillOpacity:"0.25"})),this.options.speed&&(this._registerTooltip({name:"speed",chart:function(t){return L._("v: ")+t.speed+" "+i.label},marker:function(t){return Math.round(t.speed)+" "+i.label},order:50}),this._registerSummary({minspeed:{label:"Min Speed: ",value:function(t){return Math.round(t.speed_min||0)+" "+i.label},order:50},maxspeed:{label:"Max Speed: ",value:function(t){return Math.round(t.speed_max||0)+" "+i.label},order:50},avgspeed:{label:"Avg Speed: ",value:function(t){return Math.round(t.speed_avg||0)+" "+i.label},order:50}}))}})),K.addInitHook((function(){var t=this;if(this.options.acceleration){var e=this.options,i={};i.label=e.accelerationLabel||L._(e.imperial?"ft/s²":"m/s²"),e.accelerationFactor=e.accelerationFactor||1,this._registerDataAttribute({name:"acceleration",init:function(){},fetch:function(i){var a=t._data,r=(a[i].speed-a[i>0?i-1:i].speed)*(1e3/e.timeFactor),n=(a[i].time-a[i>0?i-1:i].time)/1e3;return n>0?Math.abs(r/n)*e.accelerationFactor:0},update:function(e,i){t.track_info.acceleration_max=t.track_info.acceleration_max||-1/0,t.track_info.acceleration_min=t.track_info.acceleration_min||1/0,t.track_info.acceleration_avg=t.track_info.acceleration_avg||0;var a=t._data,r=t.track_info;if(t.options.accelerationDeltaMax){var n=e-a[i>0?i-1:i].acceleration,o=t.options.accelerationDeltaMax;Math.abs(n)>o&&(e=a[i-1].acceleration+o*Math.sign(n))}return(e=u(e,t.options.accelerationRange))>r.acceleration_max&&(r.acceleration_max=e),e<r.acceleration_min&&(r.acceleration_min=e),r.acceleration_avg=(e+r.acceleration_avg)/2,L.Util.formatNum(e,2)}}),"summary"!=this.options.acceleration&&(this._registerAxisScale({axis:"y",position:"right",scale:{min:0,max:1},tickPadding:16,label:i.label,labelX:25,labelY:-8,name:"acceleration"}),this._registerAreaPath({name:"acceleration",label:"Acceleration",yAttr:"acceleration",scaleX:"distance",scaleY:"acceleration",color:"#050402",strokeColor:"#000",strokeOpacity:"0.5",fillOpacity:"0.25"})),this._registerTooltip({name:"acceleration",chart:function(t){return L._("a: ")+t.acceleration+" "+i.label},marker:function(t){return Math.round(t.acceleration)+" "+i.label},order:60}),this._registerSummary({minacceleration:{label:"Min Acceleration: ",value:function(t){return Math.round(t.acceleration_min||0)+" "+i.label},order:60},maxacceleration:{label:"Max Acceleration: ",value:function(t){return Math.round(t.acceleration_max||0)+" "+i.label},order:60},avgacceleration:{label:"Avg Acceleration: ",value:function(t){return Math.round(t.acceleration_avg||0)+" "+i.label},order:60}})}})),K.Utils=a,K.Components=r,K.Chart=Y,q=L.i18n.bind({}),L.i18n=L._=function(t,e){return L.locale&&L.locales[L.locale]&&""==L.locales[L.locale][t]&&(L.locales[L.locale][t]="â"),q.call(null,t,e)},K.addInitHook((function(){this.enableDragging=this.enableBrush,this.disableDragging=this.disableBrush,this.loadChart=this.addTo,this.loadData=this.load,this.loadGPX=this.load,this.loadGeoJSON=this.load,this.loadXML=this.load,this.loadFile=this.load,this._addGPXData=this._addGeoJSONData,this._registerFocusLabel=this._registerTooltip})),L.control.elevation=function(t){return new K(t)}},21285:(t,e,i)=>{"use strict";var a=i(47908),r=i(51400),n=i(26244);t.exports=function(t){for(var e=a(this),i=n(e),o=arguments.length,s=r(o>1?arguments[1]:void 0,i),l=o>2?arguments[2]:void 0,c=void 0===l?i:r(l,i);c>s;)e[s++]=t;return e}},48457:(t,e,i)=>{"use strict";var a=i(17854),r=i(49974),n=i(46916),o=i(47908),s=i(53411),l=i(97659),c=i(4411),h=i(26244),d=i(86135),u=i(18554),p=i(71246),f=a.Array;t.exports=function(t){var e=o(t),i=c(this),a=arguments.length,_=a>1?arguments[1]:void 0,m=void 0!==_;m&&(_=r(_,a>2?arguments[2]:void 0));var g,v,y,x,b,k,L=p(e),w=0;if(!L||this==f&&l(L))for(g=h(e),v=i?new this(g):f(g);g>w;w++)k=m?_(e[w],w):e[w],d(v,w,k);else for(b=(x=u(e,L)).next,v=i?new this:[];!(y=n(b,x)).done;w++)k=m?s(x,_,[y.value,w],!0):y.value,d(v,w,k);return v.length=w,v}},81194:(t,e,i)=>{var a=i(47293),r=i(5112),n=i(7392),o=r("species");t.exports=function(t){return n>=51||!a((function(){var e=[];return(e.constructor={})[o]=function(){return{foo:1}
2},1!==e[t](Boolean).foo}))}},53671:(t,e,i)=>{var a=i(17854),r=i(19662),n=i(47908),o=i(68361),s=i(26244),l=a.TypeError,c=function(t){return function(e,i,a,c){r(i);var h=n(e),d=o(h),u=s(h),p=t?u-1:0,f=t?-1:1;if(a<2)for(;;){if(p in d){c=d[p],p+=f;break}if(p+=f,t?p<0:u<=p)throw l("Reduce of empty array with no initial value")}for(;t?p>=0:u>p;p+=f)p in d&&(c=i(c,d[p],p,h));return c}};t.exports={left:c(!1),right:c(!0)}},94362:(t,e,i)=>{var a=i(41589),r=Math.floor,n=function(t,e){var i=t.length,l=r(i/2);return i<8?o(t,e):s(t,n(a(t,0,l),e),n(a(t,l),e),e)},o=function(t,e){for(var i,a,r=t.length,n=1;n<r;){for(a=n,i=t[n];a&&e(t[a-1],i)>0;)t[a]=t[--a];a!==n++&&(t[a]=i)}return t},s=function(t,e,i,a){for(var r=e.length,n=i.length,o=0,s=0;o<r||s<n;)t[o+s]=o<r&&s<n?a(e[o],i[s])<=0?e[o++]:i[s++]:o<r?e[o++]:i[s++];return t};t.exports=n},53411:(t,e,i)=>{var a=i(19670),r=i(99212);t.exports=function(t,e,i,n){try{return n?e(a(i)[0],i[1]):e(i)}catch(e){r(t,"throw",e)}}},68886:(t,e,i)=>{var a=i(88113).match(/firefox\/(\d+)/i);t.exports=!!a&&+a[1]},30256:(t,e,i)=>{var a=i(88113);t.exports=/MSIE|Trident/.test(a)},98008:(t,e,i)=>{var a=i(88113).match(/AppleWebKit\/(\d+)\./);t.exports=!!a&&+a[1]},10647:(t,e,i)=>{var a=i(1702),r=i(47908),n=Math.floor,o=a("".charAt),s=a("".replace),l=a("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,h=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,i,a,d,u){var p=i+t.length,f=a.length,_=h;return void 0!==d&&(d=r(d),_=c),s(u,_,(function(r,s){var c;switch(o(s,0)){case"$":return"$";case"&":return t;case"`":return l(e,0,i);case"'":return l(e,p);case"<":c=d[l(s,1,-1)];break;default:var h=+s;if(0===h)return r;if(h>f){var u=n(h/10);return 0===u?r:u<=f?void 0===a[u-1]?o(s,1):a[u-1]+o(s,1):r}c=a[h-1]}return void 0===c?"":c}))}},47850:(t,e,i)=>{var a=i(70111),r=i(84326),n=i(5112)("match");t.exports=function(t){var e;return a(t)&&(void 0!==(e=t[n])?!!e:"RegExp"==r(t))}},64310:t=>{t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},54986:(t,e,i)=>{var a=i(88113);t.exports=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(a)},76650:(t,e,i)=>{var a=i(1702),r=i(17466),n=i(41340),o=i(38415),s=i(84488),l=a(o),c=a("".slice),h=Math.ceil,d=function(t){return function(e,i,a){var o,d,u=n(s(e)),p=r(i),f=u.length,_=void 0===a?" ":n(a);return p<=f||""==_?u:((d=l(_,h((o=p-f)/_.length))).length>o&&(d=c(d,0,o)),t?u+d:d+u)}};t.exports={start:d(!1),end:d(!0)}},38415:(t,e,i)=>{"use strict";var a=i(17854),r=i(19303),n=i(41340),o=i(84488),s=a.RangeError;t.exports=function(t){var e=n(o(this)),i="",a=r(t);if(a<0||a==1/0)throw s("Wrong number of repetitions");for(;a>0;(a>>>=1)&&(e+=e))1&a&&(i+=e);return i}},76091:(t,e,i)=>{var a=i(76530).PROPER,r=i(47293),n=i(81361);t.exports=function(t){return r((function(){return!!n[t]()||"âÂ
á "!=="âÂ
á "[t]()||a&&n[t].name!==t}))}},92222:(t,e,i)=>{"use strict";var a=i(82109),r=i(17854),n=i(47293),o=i(43157),s=i(70111),l=i(47908),c=i(26244),h=i(86135),d=i(65417),u=i(81194),p=i(5112),f=i(7392),_=p("isConcatSpreadable"),m=9007199254740991,g="Maximum allowed index exceeded",v=r.TypeError,y=f>=51||!n((function(){var t=[];return t[_]=!1,t.concat()[0]!==t})),x=u("concat"),b=function(t){if(!s(t))return!1;var e=t[_];return void 0!==e?!!e:o(t)};a({target:"Array",proto:!0,forced:!y||!x},{concat:function(t){var e,i,a,r,n,o=l(this),s=d(o,0),u=0;for(e=-1,a=arguments.length;e<a;e++)if(b(n=-1===e?o:arguments[e])){if(u+(r=c(n))>m)throw v(g);for(i=0;i<r;i++,u++)i in n&&h(s,u,n[i])}else{if(u>=m)throw v(g);h(s,u++,n)}return s.length=u,s}})},26541:(t,e,i)=>{"use strict";var a=i(82109),r=i(42092).every;a({target:"Array",proto:!0,forced:!i(9341)("every")},{every:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},43290:(t,e,i)=>{var a=i(82109),r=i(21285),n=i(51223);a({target:"Array",proto:!0},{fill:r}),n("fill")},57327:(t,e,i)=>{"use strict";var a=i(82109),r=i(42092).filter;a({target:"Array",proto:!0,forced:!i(81194)("filter")},{filter:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},91038:(t,e,i)=>{var a=i(82109),r=i(48457);a({target:"Array",stat:!0,forced:!i(17072)((function(t){Array.from(t)}))},{from:r})},26699:(t,e,i)=>{"use strict";var a=i(82109),r=i(41318).includes,n=i(51223);a({target:"Array",proto:!0},{includes:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}}),n("includes")},69600:(t,e,i)=>{"use strict";var a=i(82109),r=i(1702),n=i(68361),o=i(45656),s=i(9341),l=r([].join),c=n!=Object,h=s("join",",");a({target:"Array",proto:!0,forced:c||!h},{join:function(t){return l(o(this),void 0===t?",":t)}})},21249:(t,e,i)=>{"use strict";var a=i(82109),r=i(42092).map;a({target:"Array",proto:!0,forced:!i(81194)("map")},{map:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},85827:(t,e,i)=>{"use strict";var a=i(82109),r=i(53671).left,n=i(9341),o=i(7392),s=i(35268);a({target:"Array",proto:!0,forced:!n("reduce")||!s&&o>79&&o<83},{reduce:function(t){var e=arguments.length;return r(this,t,e,e>1?arguments[1]:void 0)}})},65069:(t,e,i)=>{"use strict";var a=i(82109),r=i(1702),n=i(43157),o=r([].reverse),s=[1,2];a({target:"Array",proto:!0,forced:String(s)===String(s.reverse())},{reverse:function(){return n(this)&&(this.length=this.length),o(this)}})},47042:(t,e,i)=>{"use strict";var a=i(82109),r=i(17854),n=i(43157),o=i(4411),s=i(70111),l=i(51400),c=i(26244),h=i(456
vendor: 4,536 bytes, line 2
256),d=i(86135),u=i(5112),p=i(81194),f=i(50206),_=p("slice"),m=u("species"),g=r.Array,v=Math.max;a({target:"Array",proto:!0,forced:!_},{slice:function(t,e){var i,a,r,u=h(this),p=c(u),_=l(t,p),y=l(void 0===e?p:e,p);if(n(u)&&(i=u.constructor,(o(i)&&(i===g||n(i.prototype))||s(i)&&null===(i=i[m]))&&(i=void 0),i===g||void 0===i))return f(u,_,y);for(a=new(void 0===i?g:i)(v(y-_,0)),r=0;_<y;_++,r++)_ in u&&d(a,r,u[_]);return a.length=r,a}})},2707:(t,e,i)=>{"use strict";var a=i(82109),r=i(1702),n=i(19662),o=i(47908),s=i(26244),l=i(41340),c=i(47293),h=i(94362),d=i(9341),u=i(68886),p=i(30256),f=i(7392),_=i(98008),m=[],g=r(m.sort),v=r(m.push),y=c((function(){m.sort(void 0)})),x=c((function(){m.sort(null)})),b=d("sort"),k=!c((function(){if(f)return f<70;if(!(u&&u>3)){if(p)return!0;if(_)return _<603;var t,e,i,a,r="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:i=3;break;case 68:case 71:i=4;break;default:i=2}for(a=0;a<47;a++)m.push({k:e+a,v:i})}for(m.sort((function(t,e){return e.v-t.v})),a=0;a<m.length;a++)e=m[a].k.charAt(0),r.charAt(r.length-1)!==e&&(r+=e);return"DGBEFHACIJK"!==r}}));a({target:"Array",proto:!0,forced:y||!x||!b||!k},{sort:function(t){void 0!==t&&n(t);var e=o(this);if(k)return void 0===t?g(e):g(e,t);var i,a,r=[],c=s(e);for(a=0;a<c;a++)a in e&&v(r,e[a]);for(h(r,function(t){return function(e,i){return void 0===i?-1:void 0===e?1:void 0!==t?+t(e,i)||0:l(e)>l(i)?1:-1}}(t)),i=r.length,a=0;a<i;)e[a]=r[a++];for(;a<c;)delete e[a++];return e}})},40561:(t,e,i)=>{"use strict";var a=i(82109),r=i(17854),n=i(51400),o=i(19303),s=i(26244),l=i(47908),c=i(65417),h=i(86135),d=i(81194)("splice"),u=r.TypeError,p=Math.max,f=Math.min,_=9007199254740991,m="Maximum allowed length exceeded";a({target:"Array",proto:!0,forced:!d},{splice:function(t,e){var i,a,r,d,g,v,y=l(this),x=s(y),b=n(t,x),k=arguments.length;if(0===k?i=a=0:1===k?(i=0,a=x-b):(i=k-2,a=f(p(o(e),0),x-b)),x+i-a>_)throw u(m);for(r=c(y,a),d=0;d<a;d++)(g=b+d)in y&&h(r,d,y[g]);if(r.length=a,i<a){for(d=b;d<x-a;d++)v=d+i,(g=d+a)in y?y[v]=y[g]:delete y[v];for(d=x;d>x-a+i;d--)delete y[d-1]}else if(i>a)for(d=x-a;d>b;d--)v=d+i-1,(g=d+a-1)in y?y[v]=y[g]:delete y[v];for(d=0;d<i;d++)y[d+b]=arguments[d+2];return y.length=x-a+i,r}})},3843:(t,e,i)=>{var a=i(82109),r=i(17854),n=i(1702),o=r.Date,s=n(o.prototype.getTime);a({target:"Date",stat:!0},{now:function(){return s(new o)}})},68309:(t,e,i)=>{var a=i(19781),r=i(76530).EXISTS,n=i(1702),o=i(3070).f,s=Function.prototype,l=n(s.toString),c=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,h=n(c.exec);a&&!r&&o(s,"name",{configurable:!0,get:function(){try{return h(c,l(this))[1]}catch(t){return""}}})},52420:(t,e,i)=>{i(82109)({target:"Math",stat:!0},{sign:i(64310)})},56977:(t,e,i)=>{"use strict";var a=i(82109),r=i(17854),n=i(1702),o=i(19303),s=i(50863),l=i(38415),c=i(47293),h=r.RangeError,d=r.String,u=Math.floor,p=n(l),f=n("".slice),_=n(1..toFixed),m=function(t,e,i){return 0===e?i:e%2==1?m(t,e-1,i*t):m(t*t,e/2,i)},g=function(t,e,i){for(var a=-1,r=i;++a<6;)r+=e*t[a],t[a]=r%1e7,r=u(r/1e7)},v=function(t,e){for(var i=6,a=0;--i>=0;)a+=t[i],t[i]=u(a/e),a=a%e*1e7},y=function(t){for(var e=6,i="";--e>=0;)if(""!==i||0===e||0!==t[e]){var a=d(t[e]);i=""===i?a:i+p("0",7-a.length)+a}return i};a({target:"Number",proto:!0,forced:c((function(){return"0.000"!==_(8e-5,3)||"1"!==_(.9,0)||"1.25"!==_(1.255,2)||"1000000000000000128"!==_(0xde0b6b3a7640080,0)}))||!c((function(){_({})}))},{toFixed:function(t){var e,i,a,r,n=s(this),l=o(t),c=[0,0,0,0,0,0],u="",_="0";if(l<0||l>20)throw h("Incorrect fraction digits");if(n!=n)return"NaN";if(n<=-1e21||n>=1e21)return d(n);if(n<0&&(u="-",n=-n),n>1e-21)if(i=(e=function(t){for(var e=0,i=t;i>=4096;)e+=12,i/=4096;for(;i>=2;)e+=1,i/=2;return e}(n*m(2,69,1))-69)<0?n*m(2,-e,1):n/m(2,e,1),i*=4503599627370496,(e=52-e)>0){for(g(c,0,i),a=l;a>=7;)g(c,1e7,0),a-=7;for(g(c,m(10,a,1),0),a=e-1;a>=23;)v(c,1<<23),a-=23;v(c,1<<a),g(c,1,1),v(c,2),_=y(c)}else g(c,0,i),g(c,1<<-e,0),_=y(c)+p("0",l);return _=l>0?u+((r=_.length)<=l?"0."+p("0",l-r)+_:f(_,0,r-l)+"."+f(_,r-l)):u+_}})},47941:(t,e,i)=>{var a=i(82109),r=i(47908),n=i(81956);a({target:"Object",stat:!0,forced:i(47293)((function(){n(1)}))},{keys:function(t){return n(r(t))}})},83112:(t,e,i)=>{"use strict";var a=i(82109),r=i(76650).start;a({target:"String",proto:!0,forced:i(54986)},{padStart:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}})},68757:(t,e,i)=>{"use strict";var a=i(82109),r=i(17854),n=i(46916),o=i(1702),s=i(84488),l=i(60614),c=i(47850),h=i(41340),d=i(
vendor: 3,431 bytes, line 2
258173),u=i(81401),p=i(10647),f=i(5112),_=i(31913),m=f("replace"),g=r.TypeError,v=o("".indexOf),y=o("".replace),x=o("".slice),b=Math.max,k=function(t,e,i){return i>t.length?-1:""===e?i:v(t,e,i)};a({target:"String",proto:!0},{replaceAll:function(t,e){var i,a,r,o,f,L,w,M,A,C=s(this),S=0,D=0,z="";if(null!=t){if((i=c(t))&&(a=h(s(u(t))),!~v(a,"g")))throw g("`.replaceAll` does not allow non-global regexes");if(r=d(t,m))return n(r,t,C,e);if(_&&i)return y(h(C),t,e)}for(o=h(C),f=h(t),(L=l(e))||(e=h(e)),w=f.length,M=b(1,w),S=k(o,f,0);-1!==S;)A=L?h(e(f,S,o)):p(f,o,S,[],void 0,e),z+=x(o,D,S)+A,D=S+w,S=k(o,f,S+M);return D<o.length&&(z+=x(o,D)),z}})},15306:(t,e,i)=>{"use strict";var a=i(22104),r=i(46916),n=i(1702),o=i(27007),s=i(47293),l=i(19670),c=i(60614),h=i(19303),d=i(17466),u=i(41340),p=i(84488),f=i(31530),_=i(58173),m=i(10647),g=i(97651),v=i(5112)("replace"),y=Math.max,x=Math.min,b=n([].concat),k=n([].push),L=n("".indexOf),w=n("".slice),M="$0"==="a".replace(/./,"$0"),A=!!/./[v]&&""===/./[v]("a","$0");o("replace",(function(t,e,i){var n=A?"$":"$0";return[function(t,i){var a=p(this),n=null==t?void 0:_(t,v);return n?r(n,t,a,i):r(e,u(a),t,i)},function(t,r){var o=l(this),s=u(t);if("string"==typeof r&&-1===L(r,n)&&-1===L(r,"$<")){var p=i(e,o,s,r);if(p.done)return p.value}var _=c(r);_||(r=u(r));var v=o.global;if(v){var M=o.unicode;o.lastIndex=0}for(var A=[];;){var C=g(o,s);if(null===C)break;if(k(A,C),!v)break;""===u(C[0])&&(o.lastIndex=f(s,d(o.lastIndex),M))}for(var S,D="",z=0,E=0;E<A.length;E++){for(var F=u((C=A[E])[0]),T=y(x(h(C.index),s.length),0),I=[],O=1;O<C.length;O++)k(I,void 0===(S=C[O])?S:String(S));var N=C.groups;if(_){var P=b([F],I,T,s);void 0!==N&&k(P,N);var B=u(a(r,void 0,P))}else B=m(F,s,T,I,N,r);T>=z&&(D+=w(s,z,T)+B,z=T+F.length)}return D+w(s,z)}]}),!!s((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!M||A)},23123:(t,e,i)=>{"use strict";var a=i(22104),r=i(46916),n=i(1702),o=i(27007),s=i(47850),l=i(19670),c=i(84488),h=i(36707),d=i(31530),u=i(17466),p=i(41340),f=i(58173),_=i(41589),m=i(97651),g=i(22261),v=i(9054),y=i(47293),x=v.UNSUPPORTED_Y,b=4294967295,k=Math.min,L=[].push,w=n(/./.exec),M=n(L),A=n("".slice);o("split",(function(t,e,i){var n;return n="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,i){var n=p(c(this)),o=void 0===i?b:i>>>0;if(0===o)return[];if(void 0===t)return[n];if(!s(t))return r(e,n,t,o);for(var l,h,d,u=[],f=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),m=0,v=new RegExp(t.source,f+"g");(l=r(g,v,n))&&!((h=v.lastIndex)>m&&(M(u,A(n,m,l.index)),l.length>1&&l.index<n.length&&a(L,u,_(l,1)),d=l[0].length,m=h,u.length>=o));)v.lastIndex===l.index&&v.lastIndex++;return m===n.length?!d&&w(v,"")||M(u,""):M(u,A(n,m)),u.length>o?_(u,0,o):u}:"0".split(void 0,0).length?function(t,i){return void 0===t&&0===i?[]:r(e,this,t,i)}:e,[function(e,i){var a=c(this),o=null==e?void 0:f(e,t);return o?r(o,e,a,i):r(n,p(a),e,i)},function(t,a){var r=l(this),o=p(t),s=i(n,r,o,a,n!==e);if(s.done)return s.value;var c=h(r,RegExp),f=r.unicode,_=(r.ignoreCase?"i":"")+(r.multiline?"m":"")+(r.unicode?"u":"")+(x?"g":"y"),g=new c(x?"^(?:"+r.source+")":r,_),v=void 0===a?b:a>>>0;if(0===v)return[];if(0===o.length)return null===m(g,o)?[o]:[];for(var y=0,L=0,w=[];
2L<o.length;){g.lastIndex=x?0:L;var C,S=m(g,x?A(o,L):o);if(null===S||(C=k(u(g.lastIndex+(x?L:0)),o.length))===y)L=d(o,L,f);else{if(M(w,A(o,y,L)),w.length===v)return w;for(var D=1;D<=S.length-1;D++)if(M(w,S[D]),w.length===v)return w;L=y=C}}return M(w,A(o,y)),w}]}),!!y((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var i="ab".split(t);return 2!==i.length||"a"!==i[0]||"b"!==i[1]})),x)},73210:(t,e,i)=>{"use strict";var a=i(82109),r=i(53111).trim;a({target:"String",proto:!0,forced:i(76091)("trim")},{trim:function(){return r(this)}})},27207:(t,e,i)=>{i(68757)},25369:(t,e,i)=>{var a,r,n;!function(o,s){r=[i(45243)],void 0===(n="function"==typeof(a=o)?a.apply(e,r):a)||(t.exports=n),void 0!==s&&s.L&&o(s.L)}((function(t){return t.locales={},t.locale=null,t.registerLocale=function(e,i){t.locales[e]=t.Util.extend({},t.locales[e],i)},t.setLocale=function(e){t.locale=e},t.i18n=t._=function(e,i){t.locale&&t.locales[t.locale]&&t.locales[t.locale][e]&&(e=t.locales[t.locale][e]);try{e=t.Util.template(e,i)}catch(t){}return e}}),window)}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.