From f634c6959ce6848dcf8645612d1dae8c09cc349f Mon Sep 17 00:00:00 2001 From: TrevorBurgoyne Date: Fri, 20 Sep 2024 16:01:07 -0500 Subject: [PATCH] Rework distance_from to store polyline_id --- api_spec.md | 12 ++++++++---- changelog.md | 1 + dist/ulabel.js | 2 +- dist/ulabel.min.js | 2 +- index.d.ts | 19 ++++++++++++------- src/annotation.ts | 4 ++-- src/annotation_operators.ts | 38 +++++++++++++++++++++---------------- src/configuration.ts | 2 +- src/overlays.ts | 32 +++++++------------------------ src/toolbox.ts | 22 +++++++++++---------- 10 files changed, 67 insertions(+), 67 deletions(-) diff --git a/api_spec.md b/api_spec.md index 281674b9..6da813d0 100644 --- a/api_spec.md +++ b/api_spec.md @@ -351,9 +351,13 @@ enum AllowedToolboxItem { Brush // 9 } -type AnnotationClassDistanceData = { - "single": number, - [key: number]?: number +type DistanceFromPolyline = { + distance: number // distance in pixels +} + +type DistanceFromPolylineClasses = { + "closest_row": DistanceFromPolyline, // value used in single-class mode + [key: number]?: DistanceFromPolyline // values for each polyline class id, used in multi-class mode } type FilterDistanceConfig = { @@ -361,7 +365,7 @@ type FilterDistanceConfig = { "component_name"?: string, // Default: filter-distance-from-row "filter_min"?: number, // Default: 0 (px) "filter_max"?: number, // Default: 400 (px) - "default_values"?: AnnotationClassDistanceData, // Default: { "single": 40 (px) } + "default_values"?: DistanceFromPolylineClasses, // Default: {"closest_row": {"distance": 40}} "step_value"?: number, // Default: 2 (px) "multi_class_mode"?: boolean, // Default: false "disable_multi_class_mode"?: boolean, // Default: false diff --git a/changelog.md b/changelog.md index 93683363..db34f487 100644 --- a/changelog.md +++ b/changelog.md @@ -13,6 +13,7 @@ Nothing yet. - Renamed `FilterDistanceConfig` arg `show_overlay_on_load` -> `show_overlay` for internal consistency. - Added `disable_multi_class_mode` flag to `FilterDistanceConfig`, which defaults to `false`. When `true`, the multi-class mode will be disabled and the checkbox will not be shown. - Added `filter_during_polyline_move` flag to `FilterDistanceConfig`, which defaults to `true`. When `false`, the filter/overlay will not be updated until polyline moves/edits are completed. This can be useful for boosting performance when working with many annotations. +- Changed format of `default_values` arg in `FilterDistanceConfig`. The name for the single class mode default has changed from `"single"` -> `"closest_row"`, and each entry in the object should be a `DistanceFromPolyline` object (`{distance: }`), rather than a single number. See the updated `api_spec.md` for more details. ## [0.11.0] - Sept 19th, 2024 - Fix bug where class counts wouldn't update when changing subtasks. diff --git a/dist/ulabel.js b/dist/ulabel.js index cc66648a..116f1c6e 100644 --- a/dist/ulabel.js +++ b/dist/ulabel.js @@ -1,2 +1,2 @@ /*! For license information please see ulabel.js.LICENSE.txt */ -(()=>{var t={5573:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ULabelAnnotation=e.NONSPATIAL_MODES=e.MODES_3D=e.DELETE_CLASS_ID=e.DELETE_MODES=void 0;var i=n(6697);e.DELETE_MODES=["delete_polygon","delete_bbox"],e.DELETE_CLASS_ID=-1,e.MODES_3D=["global","bbox3"],e.NONSPATIAL_MODES=["whole-image","global"];var r=function(){function t(t,e,n,i,r,o,s,a,l,u,c,p,h,f,d,g,_,y,m){void 0===t&&(t=null),void 0===e&&(e=!1),void 0===n&&(n={human:!1}),void 0===i&&(i=!0),void 0===r&&(r=null),void 0===o&&(o=""),this.annotation_meta=t,this.deprecated=e,this.deprecated_by=n,this.is_new=i,this.parent_id=r,this.text_payload=o,this.subtask_key=s,this.classification_payloads=a,this.containing_box=l,this.created_by=u,this.distance_from=c,this.frame=p,this.line_size=h,this.id=f,this.canvas_id=d,this.spatial_payload=g,this.spatial_type=_,this.spatial_payload_holes=y,this.spatial_payload_child_indices=m}return t.prototype.ensure_compatible_classification_payloads=function(t){var n,i=[],r=null,o=1;for(this.classification_payloads=this.classification_payloads.filter((function(t){return t.class_id!==e.DELETE_CLASS_ID})),n=0;n{"use strict";function n(t){var e,n;return t.classification_payloads.forEach((function(t){(void 0===n||t.confidence>n)&&(e=t.class_id,n=t.confidence)})),e.toString()}function i(t,e,n){void 0===n&&(n="human"),void 0===t.deprecated_by&&(t.deprecated_by={}),t.deprecated_by[n]=e,Object.values(t.deprecated_by).some((function(t){return t}))?t.deprecated=!0:t.deprecated=!1}function r(t,e){return t>e}function o(t,e,n,i,r,o){var s,a,l,u=r-n,c=o-i,p=u*u+c*c;0!=p&&(s=((t-n)*u+(e-i)*c)/p),void 0===s||s<0?(a=n,l=i):s>1?(a=r,l=o):(a=n+s*u,l=i+s*c);var h=t-a,f=e-l;return Math.sqrt(h*h+f*f)}function s(t,e,i){void 0===i&&(i=null),t.forEach((function(t){var r={single:void 0};void 0!==t.distance_from&&(r=t.distance_from),e.forEach((function(e){var s=n(e),a=function(t,e,n){void 0===n&&(n=null);for(var i,r=t.spatial_payload[0][0],s=t.spatial_payload[0][1],a=0;ae&&(e=t.classification_payloads[n].confidence);return e},e.get_annotation_class_id=n,e.mark_deprecated=i,e.value_is_lower_than_filter=function(t,e){return tf.single,"distance_from_row"),b[t.subtask_key].push(t.id)})),l)for(var x in b)t.redraw_multiple_spatial_annotations(b[x],x);null===t.filter_distance_overlay||void 0===t.filter_distance_overlay?console.warn("\n filter_distance_overlay currently does not exist.\n As such, unable to update distance overlay\n "):(t.filter_distance_overlay.update_annotations(p),t.filter_distance_overlay.update_distances(f),t.filter_distance_overlay.update_mode(h?"multi":"single"),t.filter_distance_overlay.update_display_overlay(o),t.filter_distance_overlay.draw_overlay(n))},e.findAllPolylineClassDefinitions=function(t){var e=[];for(var n in t.subtasks){var i=t.subtasks[n];i.allowed_modes.includes("polyline")&&i.class_defs.forEach((function(t){e.push(t)}))}return e}},4392:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.VALID_HTML_COLORS=void 0,e.VALID_HTML_COLORS={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}},496:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Configuration=e.DEFAULT_FILTER_DISTANCE_CONFIG=e.TARGET_MAX_N_CANVASES_PER_SUBTASK=e.DEFAULT_N_ANNOS_PER_CANVAS=e.AllowedToolboxItem=void 0;var i,r=n(3045),o=n(8286);!function(t){t[t.ModeSelect=0]="ModeSelect",t[t.ZoomPan=1]="ZoomPan",t[t.AnnotationResize=2]="AnnotationResize",t[t.AnnotationID=3]="AnnotationID",t[t.RecolorActive=4]="RecolorActive",t[t.ClassCounter=5]="ClassCounter",t[t.KeypointSlider=6]="KeypointSlider",t[t.SubmitButtons=7]="SubmitButtons",t[t.FilterDistance=8]="FilterDistance",t[t.Brush=9]="Brush"}(i||(e.AllowedToolboxItem=i={})),e.DEFAULT_N_ANNOS_PER_CANVAS=100,e.TARGET_MAX_N_CANVASES_PER_SUBTASK=8,e.DEFAULT_FILTER_DISTANCE_CONFIG={name:"Filter Distance From Row",component_name:"filter-distance-from-row",filter_min:0,filter_max:400,default_values:{single:40},step_value:2,multi_class_mode:!1,disable_multi_class_mode:!1,filter_on_load:!0,show_options:!0,show_overlay:!1,toggle_overlay_keybind:"p",filter_during_polyline_move:!0};var s=function(){function t(){for(var t=[],n=0;n{"use strict";e.SA=function(t,e,n,o){if(!1===$("#gradient-toggle").prop("checked"))return e;if(null===t.classification_payloads)return e;var s=n(t);if(s>=o)return e;var a,l=(a=e).toLowerCase()in i.VALID_HTML_COLORS?i.VALID_HTML_COLORS[a.toLowerCase()]:a,u=function(t,e,n,i){var o=parseInt(t.slice(1,3),16),s=parseInt(t.slice(3,5),16),a=parseInt(t.slice(5,7),16);return"#"+r(o,e,n,i)+r(s,e,n,i)+r(a,e,n,i)}(l,.85,s,o);return 7!==u.length?l:u};var i=n(4392);function r(t,e,n,i){var r=Math.round((1-e)*t+255*e),o=Math.round((1-n/i)*r+n/i*t).toString(16);return 1==o.length&&(o="0"+o),o}},6697:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.GeometricUtils=void 0;var i=n(3855),r=n(9004),o=function(){function t(){}return t.l2_norm=function(t,e){for(var n=t.length,i=0,r=0;r1||p<0||p>1)return null;var h=Math.abs(o*t+s*e+a)/Math.sqrt(o*o+s*s),f=Math.sqrt((r[0]-i[0])*(r[0]-i[0])+(r[1]-i[1])*(r[1]-i[1]));return{dst:h,prop:Math.sqrt((l-i[0])*(l-i[0])+(u-i[1])*(u-i[1]))/f}},t.line_segments_are_on_same_line=function(e,n){var i=t.get_line_equation_through_points(e[0],e[1]),r=t.get_line_equation_through_points(n[0],n[1]);return i.a===r.a&&i.b===r.b&&i.c===r.c},t.turf_simplify_polyline=function(e,n){return void 0===n&&(n=t.TURF_SIMPLIFY_TOLERANCE_PX),i.simplify(i.lineString(e),{tolerance:n}).geometry.coordinates},t.subtract_simple_polygon_from_polyline=function(e,n){var r=i.lineString(e),o=i.polygon([n]),s=i.lineSplit(r,o);if(void 0===s.features||0===s.features.length)return t.point_is_within_simple_polygon(e[0],n)?[]:e;var a=i.featureCollection(s.features.filter((function(e){var i=Math.floor(e.geometry.coordinates.length/2);return!t.point_is_within_simple_polygon(e.geometry.coordinates[i],n)})));return a.features.sort((function(t,e){return i.length(e)-i.length(t)})),a.features[0].geometry.coordinates},t.merge_polygons_at_intersection=function(e,n){var i=t.get_polygon_intersection_single(e,n);if(null===i)return null;try{var o=r.difference([n],[i]);return[r.union([e],o)[0][0],i]}catch(t){return console.warn("Failed to merge polygons at intersection: ",t),null}},t.merge_polygons=function(e,n){var r;return e=t.ensure_valid_turf_complex_polygon(e),n=t.ensure_valid_turf_complex_polygon(n),void 0===(r=i.union(i.polygon(e),i.polygon(n)).geometry.coordinates)[0][0][0][0]?t.turf_simplify_complex_polygon(r):e},t.subtract_polygons=function(e,n){var r;e=t.ensure_valid_turf_complex_polygon(e),n=t.ensure_valid_turf_complex_polygon(n);var o=i.difference(i.polygon(e),i.polygon(n));return null===o?null:(r=void 0===(o=o.geometry.coordinates)[0][0][0][0]?o:o[0].concat(o[1]),t.turf_simplify_complex_polygon(r))},t.ensure_valid_turf_complex_polygon=function(t){for(var e=0,n=t;e2)try{e=t[0][0]===t.at(-1)[0]&&t[0][1]===t.at(-1)[1]}catch(t){}return e},t.polygons_are_equal=function(t,e){if(t.length!==e.length)return!1;for(var n=0;n{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SliderHandler=void 0,e.add_style_to_document=function(t){var e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");e.appendChild(n),n.appendChild(document.createTextNode((0,s.get_init_style)(t.config.container_id)))},e.prep_window_html=function(t,e){void 0===e&&(e=null);var n=function(t){for(var e,n="",i=0;i\n ');return n}(t),o=function(t){var e="",n=0;for(var i in t.subtasks)(t.subtasks[i].allowed_modes.includes("whole-image")||t.subtasks[i].allowed_modes.includes("global"))&&(n+=1);var r=0;for(var i in t.subtasks)if((t.subtasks[i].allowed_modes.includes("whole-image")||t.subtasks[i].allowed_modes.includes("global"))&&(e+='\n
\n
\n
\n
\n
\n
').concat(t.subtasks[i].display_name,'
\n
\n
\n
\n
\n
\n +\n
\n
\n
\n
\n
\n
\n '),(r+=1)>4))throw new Error("At most 4 subtasks can have allow 'whole-image' or 'global' annotations.");return e}(t),l=new i.Toolbox([],i.Toolbox.create_toolbox(t,e)),u=l.setup_toolbox_html(t,o,n,r.ULABEL_VERSION);$("#"+t.config.container_id).html(u);var c,p=Object.keys(t.subtasks)[0],h=t.config.toolbox_id,f=t.subtasks[p].state.annotation_mode,d=[a("bbox","Bounding Box",s.BBOX_SVG,f,t.subtasks),a("point","Point",s.POINT_SVG,f,t.subtasks),a("polygon","Polygon",s.POLYGON_SVG,f,t.subtasks),a("tbar","T-Bar",s.TBAR_SVG,f,t.subtasks),a("polyline","Polyline",s.POLYLINE_SVG,f,t.subtasks),a("contour","Contour",s.CONTOUR_SVG,f,t.subtasks),a("bbox3","Bounding Cube",s.BBOX3_SVG,f,t.subtasks),a("whole-image","Whole Frame",s.WHOLE_IMAGE_SVG,f,t.subtasks),a("global","Global",s.GLOBAL_SVG,f,t.subtasks),a("delete_polygon","Delete",s.DELETE_POLYGON_SVG,f,t.subtasks),a("delete_bbox","Delete",s.DELETE_BBOX_SVG,f,t.subtasks)];$("#"+h+" .toolbox_inner_cls .mode-selection").append(d.join("\x3c!-- --\x3e")),t.show_annotation_mode(null),$("#"+t.config.toolbox_id+" .toolbox_inner_cls").height()>$("#"+t.config.container_id).height()&&$("#"+t.config.toolbox_id).css("overflow-y","scroll"),t.toolbox=l,function(t){if(0==t.length)return!1;for(var e in t)if(t[e]instanceof i.ZoomPanToolboxItem)return!0;return!1}(t.toolbox.items)&&(null!=(c=t.config.initial_crop)&&("width"in c&&"height"in c&&"left"in c&&"top"in c||(t.raise_error("initial_crop missing necessary properties. Ignoring."),0))?document.getElementById("recenter-button").innerHTML="Initial Crop":document.getElementById("recenter-whole-image-button").style.display="none")},e.build_class_change_svg=l,e.get_idd_string=u,e.build_id_dialogs=function(t){var e='
',n=t.config.outer_diameter,i=t.config.inner_prop*n/2,r=.5*n,s=t.config.toolbox_id;for(var a in t.subtasks){var l=t.subtasks[a].state.idd_id,c=t.subtasks[a].state.idd_id_front,p=t.color_info,h=$("#dialogs__"+a),f=$("#front_dialogs__"+a),d=u(l,n,t.subtasks[a].class_ids,i,p),g=u(c,n,t.subtasks[a].class_ids,i,p),_='
'),y=JSON.parse(JSON.stringify(t.subtasks[a].class_ids));t.subtasks[a].class_defs.at(-1).id===o.DELETE_CLASS_ID&&y.push(o.DELETE_CLASS_ID);for(var m=0;m\n
').concat(x,"\n \n ")}_+="\n
",f.append(g),h.append(d),e+=_,t.subtasks[a].state.visible_dialogs[l]={left:0,top:0,pin:"center"}}$("#"+t.config.toolbox_id+" div.id-toolbox-app").html(e),$("#"+t.config.container_id+" a.id-dialog-clickable-indicator").css({height:"".concat(n,"px"),width:"".concat(n,"px"),"border-radius":"".concat(r,"px")})},e.build_edit_suggestion=function(t){for(var e in t.subtasks){var n="edit_suggestion__".concat(e),i="global_edit_suggestion__".concat(e),r=$("#dialogs__"+e);r.append('\n \n ')),$("#"+n).css({height:t.config.edit_handle_size+"px",width:t.config.edit_handle_size+"px","border-radius":t.config.edit_handle_size/2+"px"});var o="",s="";t.subtasks[e].single_class_mode||(o='--\x3e\x3c!--',s=" mcm"),r.append('\n
\n \n \n \x3c!--\n ').concat(o,'\n --\x3e\n ×\n \n
\n ')),t.subtasks[e].state.visible_dialogs[n]={left:0,top:0,pin:"center"},t.subtasks[e].state.visible_dialogs[i]={left:0,top:0,pin:"center"}}},e.build_confidence_dialog=function(t){for(var e in t.subtasks){var n="annotation_confidence__".concat(e),i="global_annotation_confidence__".concat(e),r=$("#dialogs__"+e),o=$("#global_edit_suggestion__"+e);r.append('\n

\n ')),$("#"+n).css({height:t.config.edit_handle_size+"px",width:t.config.edit_handle_size+"px"});var s="";t.subtasks[e].single_class_mode||(s=" mcm"),o.append('\n
\n

Annotation Confidence:

\n

\n ').concat(t.subtasks[t.state.current_subtask].active_annotation,"\n

\n
\n ")),$("#"+i).css({"background-color":"black",color:"white",opacity:"0.6",height:"3em",width:"14.5em","margin-top":"-9.5em","border-radius":"1em","font-size":"1.2em","margin-left":"-1.4em"})}};var i=n(3045),r=n(1424),o=n(5573),s=n(2748);function a(t,e,n,i,r){var o="",s=' href="#"';i==t&&(o=" sel",s="");var a="";for(var l in r)r[l].allowed_modes.includes(t)&&(a+=" md-en4--"+l);return'
\n \n ').concat(n,"\n \n
")}function l(t,e,n,i){var r,o,s;void 0===i&&(i={});for(var a=null!==(r=i.width)&&void 0!==r?r:500,l=null!==(o=i.inner_radius)&&void 0!==o?o:.3,u=null!==(s=i.opacity)&&void 0!==s?s:.4,c=.5*a,p=a/2,h=1/t.length,f=1-h,d=l+(c-l)/2,g=2*Math.PI*d*h,_=c-l,y=2*Math.PI*d*f,m=l+h*(c-l)/2,v=2*Math.PI*m*h,b=h*(c-l),x=2*Math.PI*m*f,w=''),k=0;k\n ')}return w+""}function u(t,e,n,i,r){var o='\n
\n '),s=.5*e;return(o+=l(n,r,t,{width:e,inner_radius:i}))+'
')}var c=function(){function t(t){var e=this;this.label_units="",this.min="0",this.max="100",this.step="1",this.step_as_number=1,this.default_value=t.default_value,this.id=t.id,this.slider_event=t.slider_event,void 0!==t.class&&(this.class=t.class),void 0!==t.main_label&&(this.main_label=t.main_label),void 0!==t.label_units&&(this.label_units=t.label_units),void 0!==t.min&&(this.min=t.min),void 0!==t.max&&(this.max=t.max),void 0!==t.step&&(this.step=t.step),this.step_as_number=Number(this.step),this.add_styles(),$(document).on("input.ulabel","#".concat(this.id),(function(t){e.updateLabel(),e.slider_event(t.currentTarget.valueAsNumber)})),$(document).on("click.ulabel","#".concat(this.id,"-inc-button"),(function(){return e.incrementSlider()})),$(document).on("click.ulabel","#".concat(this.id,"-dec-button"),(function(){return e.decrementSlider()}))}return t.prototype.add_styles=function(){var t="slider-handler-styles";if(!document.getElementById(t)){var e=document.head||document.querySelector("head"),n=document.createElement("style");n.appendChild(document.createTextNode("\n #toolbox div.ulabel-slider-container {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n margin: 0 1.5rem 0.5rem;\n }\n \n #toolbox div.ulabel-slider-container label.ulabel-filter-row-distance-name-label {\n width: 100%; /* Ensure title takes up full width of container */\n font-size: 0.95rem;\n align-items: center;\n }\n \n #toolbox div.ulabel-slider-container > *:not(label.ulabel-filter-row-distance-name-label) {\n flex: 1;\n }\n \n /* \n .ulabel-night #toolbox div.ulabel-slider-container label {\n color: white;\n }\n */\n #toolbox div.ulabel-slider-container label.ulabel-slider-value-label {\n font-size: 0.9rem;\n }\n \n \n #toolbox div.ulabel-slider-container div.ulabel-slider-decrement-button-text {\n position: relative;\n bottom: 1.5px;\n }")),n.id=t,e.appendChild(n)}},t.prototype.updateLabel=function(){var t=document.querySelector("#".concat(this.id));document.querySelector("#".concat(this.id,"-value-label")).innerText=t.value+this.label_units},t.prototype.incrementSlider=function(){var t=document.querySelector("#".concat(this.id)),e=t.valueAsNumber+this.step_as_number;t.value=e.toString(),this.updateLabel(),this.slider_event(t.value)},t.prototype.decrementSlider=function(){var t=document.querySelector("#".concat(this.id)),e=t.valueAsNumber-this.step_as_number;t.value=e.toString(),this.updateLabel(),this.slider_event(t.value)},t.prototype.getSliderHTML=function(){return'\n
\n '.concat(this.main_label?'"):"",'\n \n \n
\n \n \n
\n
\n ')},t}();e.SliderHandler=c},8505:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});Object.defineProperty(e,"__esModule",{value:!0}),e.FilterDistanceOverlay=void 0;var o=n(2571),s=function(t){function e(e,n,i,r){var o=t.call(this,e,n,r)||this;return o.distances={single:null},o.canvas.setAttribute("id","ulabel-filter-distance-overlay"),o.polyline_annotations=i,o}return r(e,t),e.prototype.calculate_normal_vector=function(t,e){var n=t.y-e.y,i=e.x-t.x,r=Math.sqrt(Math.pow(n,2)+Math.pow(i,2));return 0===r?(console.error("claculateNormalVector divide by 0 error"),null):{x:n/=r,y:i/=r}},e.prototype.draw_parallelogram_around_line_segment=function(t,e,n,i){var r=n.x*i*this.px_per_px,o=n.y*i*this.px_per_px,s=[t.x-r,t.y-o],a=[t.x+r,t.y+o],l=[e.x+r,e.y+o],u=[e.x-r,e.y-o];this.context.beginPath(),this.context.moveTo(s[0],s[1]),this.context.lineTo(a[0],a[1]),this.context.lineTo(l[0],l[1]),this.context.lineTo(u[0],u[1]),this.context.fill()},e.prototype.update_annotations=function(t){this.polyline_annotations=t},e.prototype.update_distances=function(t){for(var e in t)this.distances[e]=t[e]},e.prototype.update_mode=function(t){"multi"===t?this.multi_class_mode=!0:"single"===t?this.multi_class_mode=!1:console.error("FilterDistanceOverlay.update_mode recieved unknown mode type")},e.prototype.get_mode=function(){return console.log(this.multi_class_mode),this.multi_class_mode?"multi":"single"},e.prototype.update_display_overlay=function(t){this.display_overlay=t},e.prototype.get_display_overlay=function(){return this.display_overlay},e.prototype.draw_overlay=function(t){var e=this;void 0===t&&(t=null),this.clear_canvas(),this.display_overlay&&(this.context.globalCompositeOperation="source-over",this.context.fillStyle="#000000",this.context.globalAlpha=.5,this.context.fillRect(0,0,this.canvas.width,this.canvas.height),this.context.globalCompositeOperation="destination-out",this.context.globalAlpha=1,this.polyline_annotations.forEach((function(n){for(var i=n.spatial_payload,r=(0,o.get_annotation_class_id)(n),s=e.multi_class_mode?e.distances[r]:e.distances.single,a=0;a{"use strict";e.D=void 0;var n=function(){function t(t,e,n,i,r,o,s,a){void 0===a&&(a=.4),this.display_name=t,this.classes=e,this.allowed_modes=n,this.resume_from=i,this.task_meta=r,this.annotation_meta=o,this.read_only=s,this.inactive_opacity=a,this.class_ids=[],this.actions={stream:[],undone_stack:[]}}return t.from_json=function(e,n){var i=new t(n.display_name,n.classes,n.allowed_modes,n.resume_from,n.task_meta,n.annotation_meta);return i.read_only="read_only"in n&&!0===n.read_only,"inactive_opacity"in n&&"number"==typeof n.inactive_opacity&&(i.inactive_opacity=Math.min(Math.max(n.inactive_opacity,0),1)),i},t}();e.D=n},3045:function(t,e,n){"use strict";var i,r=this&&this.__extends||(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),o=this&&this.__awaiter||function(t,e,n,i){return new(n||(n=Promise))((function(r,o){function s(t){try{l(i.next(t))}catch(t){o(t)}}function a(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(s,a)}l((i=i.apply(t,e||[])).next())}))},s=this&&this.__generator||function(t,e){var n,i,r,o={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(l){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(n=1,i&&(r=2&a[0]?i.return:a[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,a[1])).done)return r;switch(i=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,i=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((r=(r=o.trys).length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]\n
\n ').concat(n,'\n
\n
\n
\n
\n

ULabel v').concat(i,'

\x3c!--\n --\x3e\n
\n
\n ');for(var o in this.items)r+=this.items[o].get_html()+"
";return r+'\n
\n
\n '.concat(this.get_toolbox_tabs(t),"\n
\n
\n ")},t.prototype.get_toolbox_tabs=function(t){var e="";for(var n in t.subtasks){var i=n==t.state.current_subtask,r=t.subtasks[n],o=new g([],r,n,i);e+=o.html,this.tabs.push(o)}return e},t.prototype.redraw_update_items=function(t){for(var e=0,n=this.items;e\n ').concat(this.subtask.display_name,'\x3c!--\n --\x3e\n \n

\n Mode:\n \n

\n \n '},e.prototype.after_init=function(){},e.prototype.get_toolbox_item_type=function(){return"ModeSelection"},e}(_);e.ModeSelectionToolboxItem=y;var m=function(t){function e(e){var n=t.call(this)||this;return n.ulabel=e,n.add_styles(),n.add_event_listeners(),n}return r(e,t),e.prototype.add_styles=function(){var t="brush-toolbox-item-styles";if(!document.getElementById(t)){var e=document.head||document.querySelector("head"),n=document.createElement("style");n.appendChild(document.createTextNode("\n #toolbox div.brush button:not(.circle) {\n padding: 1rem 0.5rem;\n border: 1px solid gray;\n border-radius: 10px\n }\n\n #toolbox div.brush div.brush-button-holder {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n margin-bottom: 1rem;\n }\n\n #toolbox div.brush span.brush-mode {\n display: flex;\n } \n ")),n.id=t,e.appendChild(n)}},e.prototype.add_event_listeners=function(){var t=this;$(document).on("click.ulabel",".brush-button",(function(e){switch($(e.currentTarget).attr("id")){case"brush-mode":t.ulabel.toggle_brush_mode(e);break;case"erase-mode":t.ulabel.toggle_erase_mode(e);break;case"brush-inc":t.ulabel.change_brush_size(1.1);break;case"brush-dec":t.ulabel.change_brush_size(1/1.1)}}))},e.prototype.get_html=function(){return'\n
\n

Brush Tool

\n
\n \n \n \n \n \n \n \n \n
\n
\n '},e.show_brush_toolbox_item=function(){$(".brush").removeClass("ulabel-hidden")},e.hide_brush_toolbox_item=function(){$(".brush").addClass("ulabel-hidden")},e.prototype.after_init=function(){"polygon"!==this.ulabel.subtasks[this.ulabel.state.current_subtask].state.annotation_mode&&e.hide_brush_toolbox_item()},e.prototype.get_toolbox_item_type=function(){return"Brush"},e}(_);e.BrushToolboxItem=m;var v=function(t){function e(e){var n=t.call(this)||this;return n.ulabel=e,n.set_frame_range(e),n.add_styles(),n.add_event_listeners(),n}return r(e,t),e.prototype.add_styles=function(){var t="zoom-pan-toolbox-item-styles";if(!document.getElementById(t)){var e=document.head||document.querySelector("head"),n=document.createElement("style");n.appendChild(document.createTextNode('\n #toolbox div.zoom-pan {\n padding: 10px 30px;\n display: grid;\n grid-template-rows: auto 1.25rem auto;\n grid-template-columns: 1fr 1fr;\n grid-template-areas:\n "zoom pan"\n "zoom-tip pan-tip"\n "recenter recenter";\n }\n \n #toolbox div.zoom-pan > * {\n place-self: center;\n }\n \n #toolbox div.zoom-pan button {\n background-color: lightgray;\n }\n\n #toolbox div.zoom-pan button:hover {\n background-color: rgba(0, 128, 255, 0.9);\n }\n \n #toolbox div.zoom-pan div.set-zoom {\n grid-area: zoom;\n }\n \n #toolbox div.zoom-pan div.set-pan {\n grid-area: pan;\n }\n \n #toolbox div.zoom-pan div.set-pan div.pan-container {\n display: inline-flex;\n align-items: center;\n }\n \n #toolbox div.zoom-pan p.shortcut-tip {\n margin: 2px 0;\n font-size: 10px;\n color: white;\n }\n\n #toolbox div.zoom-pan:hover p.shortcut-tip {\n color: black;\n }\n\n .ulabel-night #toolbox div.zoom-pan p.shortcut-tip {\n margin: 0;\n font-size: 10px;\n color: black;\n }\n\n .ulabel-night #toolbox div.zoom-pan:hover p.shortcut-tip {\n color: white;\n }\n \n #toolbox.ulabel-night div.zoom-pan:hover p.pan-shortcut-tip {\n color: white;\n }\n \n #toolbox div.zoom-pan p.zoom-shortcut-tip {\n grid-area: zoom-tip;\n }\n \n #toolbox div.zoom-pan p.pan-shortcut-tip {\n grid-area: pan-tip;\n }\n \n #toolbox div.zoom-pan span.pan-label {\n margin-right: 10px;\n }\n \n #toolbox div.zoom-pan span.pan-button-holder {\n display: inline-grid;\n position: relative;\n grid-template-rows: 28px 28px;\n grid-template-columns: 28px 28px;\n grid-template-areas:\n "left top"\n "bottom right";\n transform: rotate(-45deg);\n gap: 1px;\n }\n \n #toolbox div.zoom-pan span.pan-button-holder > * {\n border: 1px solid gray;\n }\n \n #toolbox div.zoom-pan button.ulabel-pan:hover {\n background-color: cornflowerblue;\n }\n \n #toolbox div.zoom-pan button.ulabel-pan-left {\n grid-area: left;\n border-radius: 100% 0 0 0;\n }\n \n #toolbox div.zoom-pan button.ulabel-pan-right {\n grid-area: right;\n border-radius: 0 0 100% 0;\n }\n \n #toolbox div.zoom-pan button.ulabel-pan-up {\n grid-area: top;\n border-radius: 0 100% 0 0;\n }\n \n #toolbox div.zoom-pan button.ulabel-pan-down {\n grid-area: bottom;\n border-radius: 0 0 0 100%;\n }\n \n #toolbox div.zoom-pan span.spokes {\n background-color: white;\n width: 16px;\n height: 16px;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n border-radius: 50%;\n }\n \n .ulabel-night #toolbox div.zoom-pan span.spokes {\n background-color: black;\n }\n\n #toolbox div.zoom-pan div.recenter-container {\n grid-area: recenter;\n }\n \n .ulabel-night #toolbox div.zoom-pan a {\n color: lightblue;\n }\n\n .ulabel-night #toolbox div.zoom-pan a:active {\n color: white;\n }\n ')),n.id=t,e.appendChild(n)}},e.prototype.add_event_listeners=function(){var t=this,e=this.ulabel.config.image_data.frames.length>1;$(document).on("click.ulabel",".ulabel-zoom-button",(function(e){var n;$(e.currentTarget).hasClass("ulabel-zoom-out")?t.ulabel.state.zoom_val/=1.1:$(e.currentTarget).hasClass("ulabel-zoom-in")&&(t.ulabel.state.zoom_val*=1.1),t.ulabel.rezoom(),null===(n=t.ulabel.filter_distance_overlay)||void 0===n||n.draw_overlay()})),$(document).on("click.ulabel",".ulabel-pan",(function(e){var n=$("#"+t.ulabel.config.annbox_id);$(e.currentTarget).hasClass("ulabel-pan-up")?n.scrollTop(n.scrollTop()-20):$(e.currentTarget).hasClass("ulabel-pan-down")?n.scrollTop(n.scrollTop()+20):$(e.currentTarget).hasClass("ulabel-pan-left")?n.scrollLeft(n.scrollLeft()-20):$(e.currentTarget).hasClass("ulabel-pan-right")&&n.scrollLeft(n.scrollLeft()+20)})),e?$(document).on("keypress.ulabel",(function(e){switch(e.preventDefault(),e.key){case"ArrowRight":case"ArrowDown":t.ulabel.update_frame(1);break;case"ArrowUp":case"ArrowLeft":t.ulabel.update_frame(-1)}})):$(document).on("keydown.ulabel",(function(e){var n=$("#"+t.ulabel.config.annbox_id);switch(e.key){case"ArrowLeft":n.scrollLeft(n.scrollLeft()-20),e.preventDefault();break;case"ArrowRight":n.scrollLeft(n.scrollLeft()+20),e.preventDefault();break;case"ArrowUp":n.scrollTop(n.scrollTop()-20),e.preventDefault();break;case"ArrowDown":n.scrollTop(n.scrollTop()+20),e.preventDefault()}})),$(document).on("click.ulabel","#recenter-button",(function(){t.ulabel.show_initial_crop()})),$(document).on("click.ulabel","#recenter-whole-image-button",(function(){t.ulabel.show_whole_image()})),$(document).on("keypress.ulabel",(function(e){e.key==t.ulabel.config.change_zoom_keybind.toLowerCase()&&document.getElementById("recenter-button").click(),e.key==t.ulabel.config.change_zoom_keybind.toUpperCase()&&document.getElementById("recenter-whole-image-button").click()}))},e.prototype.set_frame_range=function(t){1!=t.config.image_data.frames.length?this.frame_range='\n
\n

scroll to switch frames

\n
\n
\n Frame  \n \n
\n Zoom\n \n \n \n \n
\n

ctrl+scroll or shift+drag

\n
\n
\n Pan\n \n \n \n \n \n \n \n
\n
\n

scrollclick+drag or ctrl+drag

\n \n '.concat(this.frame_range,"\n
\n ")},e.prototype.after_init=function(){},e.prototype.get_toolbox_item_type=function(){return"ZoomPan"},e}(_);e.ZoomPanToolboxItem=v;var b=function(t){function e(e){var n=t.call(this)||this;return n.ulabel=e,n.set_instructions(e),n.add_styles(),n}return r(e,t),e.prototype.add_styles=function(){var t="annotation-id-toolbox-item-styles";if(!document.getElementById(t)){var e=document.head||document.querySelector("head"),n=document.createElement("style");n.appendChild(document.createTextNode("\n #toolbox div.classification div.id-toolbox-app {\n margin-bottom: 1rem;\n }\n ")),n.id=t,e.appendChild(n)}},e.prototype.set_instructions=function(t){this.instructions="",null!=t.config.instructions_url&&(this.instructions='\n Instructions\n '))},e.prototype.get_html=function(){return'\n
\n

Annotation ID

\n
\n
\n
\n '.concat(this.instructions,"\n
\n ")},e.prototype.after_init=function(){},e.prototype.get_toolbox_item_type=function(){return"AnnotationID"},e}(_);e.AnnotationIDToolboxItem=b;var x=function(t){function e(){for(var e=[],n=0;n0){r[s.class_id]+=1;break}var u,c,p="";for(e=0;e"));this.inner_HTML='

Annotation Count

'+"

".concat(p,"

")}},e.prototype.get_html=function(){return'\n
'+this.inner_HTML+"
"},e.prototype.after_init=function(){},e.prototype.redraw_update=function(t){this.update_toolbox_counter(t.subtasks[t.state.current_subtask]),$("#"+t.config.toolbox_id+" div.toolbox-class-counter").html(this.inner_HTML)},e.prototype.get_toolbox_item_type=function(){return"ClassCounter"},e}(_);e.ClassCounterToolboxItem=x;var w=function(t){function e(e){var n=t.call(this)||this;for(var i in n.cached_size=1.5,n.ulabel=e,n.keybind_configuration=e.config.default_keybinds,e.subtasks){var r=e.subtasks[i].display_name.replaceLowerConcat(" ","-","-cached-size"),o=n.read_size_cookie(e.subtasks[i]);null!=o&&"NaN"!=o?(n.update_annotation_size(e,e.subtasks[i],Number(o)),n[r]=Number(o)):null!=e.config.default_annotation_size?(n.update_annotation_size(e,e.subtasks[i],e.config.default_annotation_size),n[r]=e.config.default_annotation_size):(n.update_annotation_size(e,e.subtasks[i],5),n[r]=5)}return n.add_styles(),n.add_event_listeners(),n}return r(e,t),e.prototype.add_styles=function(){var t="resize-annotation-toolbox-item-styles";if(!document.getElementById(t)){var e=document.head||document.querySelector("head"),n=document.createElement("style");n.appendChild(document.createTextNode("\n #toolbox div.annotation-resize button:not(.circle) {\n padding: 1rem 0.5rem;\n border: 1px solid gray;\n border-radius: 10px\n }\n\n #toolbox div.annotation-resize div.annotation-resize-button-holder {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.5rem;\n margin-bottom: 1rem;\n }\n\n #toolbox div.annotation-resize span.annotation-vanish:hover,\n #toolbox div.annotation-resize span.annotation-size:hover {\n border-radius: 10px;\n box-shadow: 0 0 4px 2px lightgray, 0 0 white;\n }\n\n /* No box-shadow in night-mode */\n .ulabel-night #toolbox div.annotation-resize span.annotation-vanish:hover,\n .ulabel-night #toolbox div.annotation-resize span.annotation-size:hover {\n box-shadow: initial;\n }\n\n #toolbox div.annotation-resize span.annotation-size {\n display: flex;\n }\n\n #toolbox div.annotation-resize span.annotation-size #annotation-resize-s {\n border-radius: 10px 0 0 10px;\n }\n\n #toolbox div.annotation-resize span.annotation-size #annotation-resize-l {\n border-radius: 0 10px 10px 0;\n }\n \n #toolbox div.annotation-resize span.annotation-inc {\n display: flex;\n flex-direction: column;\n gap: 0.25rem;\n }\n\n #toolbox div.annotation-resize button.locked {\n background-color: #1c2d4d;\n }\n \n ")),n.id=t,e.appendChild(n)}},e.prototype.add_event_listeners=function(){var t=this;$(document).on("click.ulabel",".annotation-resize-button",(function(e){var n=t.ulabel.state.current_subtask,i=t.ulabel.subtasks[n],r=$(e.currentTarget).attr("id").slice(18);t.update_annotation_size(t.ulabel,i,r),t.ulabel.redraw_all_annotations(n,null,!1)})),$(document).on("keydown.ulabel",(function(e){var n=t.ulabel.state.current_subtask,i=t.ulabel.subtasks[n];switch(e.key){case t.keybind_configuration.annotation_vanish.toUpperCase():t.update_all_subtask_annotation_size(t.ulabel,a.VANISH);break;case t.keybind_configuration.annotation_vanish.toLowerCase():t.update_annotation_size(t.ulabel,i,a.VANISH);break;case t.keybind_configuration.annotation_size_small:t.update_annotation_size(t.ulabel,i,a.SMALL);break;case t.keybind_configuration.annotation_size_large:t.update_annotation_size(t.ulabel,i,a.LARGE);break;case t.keybind_configuration.annotation_size_minus:t.update_annotation_size(t.ulabel,i,a.DECREMENT);break;case t.keybind_configuration.annotation_size_plus:t.update_annotation_size(t.ulabel,i,a.INCREMENT);break;default:return}t.ulabel.redraw_all_annotations(null,null,!1)}))},e.prototype.update_annotation_size=function(t,e,n){if(null!==e){var i=.5,r=.01,o=e.display_name.replaceLowerConcat(" ","-","-cached-size"),s=e.display_name.replaceLowerConcat(" ","-","-vanished");if(!this[s]||"v"===n)if("number"!=typeof n){switch(n){case a.SMALL:this.loop_through_annotations(e,1.5,"="),this[o]=1.5;break;case a.LARGE:this.loop_through_annotations(e,5,"="),this[o]=5;break;case a.DECREMENT:this.loop_through_annotations(e,i,"-"),this[o]-i>r?this[o]-=i:this[o]=r;break;case a.INCREMENT:this.loop_through_annotations(e,i,"+"),this[o]+=i;break;case a.VANISH:this[s]?(this.loop_through_annotations(e,this[o],"="),this[s]=!this[s],$("#annotation-resize-v").removeClass("locked")):(this.loop_through_annotations(e,r,"="),this[s]=!this[s],$("#annotation-resize-v").addClass("locked"));break;default:console.error("update_annotation_size called with unknown size")}null!==t.state.line_size&&(t.state.line_size=this[o])}else this.loop_through_annotations(e,n,"=")}},e.prototype.loop_through_annotations=function(t,e,n){for(var i in t.annotations.access)switch(n){case"=":t.annotations.access[i].line_size=e;break;case"+":t.annotations.access[i].line_size+=e;break;case"-":t.annotations.access[i].line_size-e<=.01?t.annotations.access[i].line_size=.01:t.annotations.access[i].line_size-=e;break;default:throw Error("Invalid Operation given to loop_through_annotations")}t.annotations.ordering.length>0&&this.set_size_cookie(t.annotations.access[t.annotations.ordering[0]].line_size,t)},e.prototype.update_all_subtask_annotation_size=function(t,e){for(var n in t.subtasks)this.update_annotation_size(t,t.subtasks[n],e)},e.prototype.set_size_cookie=function(t,e){var n=new Date;n.setTime(n.getTime()+864e9);var i=e.display_name.replaceLowerConcat(" ","_");document.cookie=i+"_size="+t+";"+n.toUTCString()+";path=/"},e.prototype.read_size_cookie=function(t){for(var e=t.display_name.replaceLowerConcat(" ","_")+"_size=",n=document.cookie.split(";"),i=0;i\n

Change Annotation Size

\n
\n \n \n \n \n \n \n \n \n \n \n \n
\n
\n '},e.prototype.after_init=function(){},e.prototype.get_toolbox_item_type=function(){return"AnnotationResize"},e}(_);e.AnnotationResizeItem=w;var k=function(t){function e(e){var n,i=t.call(this)||this;return i.most_recent_redraw_time=0,i.ulabel=e,i.config=i.ulabel.config.recolor_active_toolbox_item,i.add_styles(),i.add_event_listeners(),i.read_local_storage(),null!==(n=i.gradient_turned_on)&&void 0!==n||(i.gradient_turned_on=i.config.gradient_turned_on),i}return r(e,t),e.prototype.save_local_storage_color=function(t,e){localStorage.setItem("RecolorActiveItem-".concat(t),e)},e.prototype.save_local_storage_gradient=function(t){localStorage.setItem("RecolorActiveItem-Gradient",t.toString())},e.prototype.read_local_storage=function(){for(var t=0,e=this.ulabel.valid_class_ids;t div"));i&&(i.style.backgroundColor=e),this.replace_color_pie(),n&&this.save_local_storage_color(t,e)},e.prototype.add_styles=function(){var t="recolor-toolbox-item-styles";if(!document.getElementById(t)){var e=document.head||document.querySelector("head"),n=document.createElement("style");n.appendChild(document.createTextNode('\n #toolbox div.recolor-active {\n padding: 0 2rem;\n }\n\n #toolbox div.recolor-active div.recolor-tbi-gradient {\n font-size: 80%;\n }\n\n #toolbox div.recolor-active div.gradient-toggle-container {\n text-align: left;\n display: flex;\n align-items: center;\n }\n\n #toolbox div.recolor-active div.gradient-slider-container {\n display: flex;\n align-items: center;\n }\n\n #toolbox div.recolor-active div.gradient-slider-container > input {\n width: 50%;\n }\n\n #toolbox div.recolor-active div.annotation-recolor-button-holder {\n margin: 0.5rem;\n display: grid;\n grid-template-columns: 2fr 1fr;\n grid-template-rows: 1fr 1fr 1fr;\n grid-template-areas:\n "yellow picker"\n "red picker"\n "cyan picker";\n gap: 0.25rem 0.75rem;\n }\n\n #toolbox div.recolor-active div.annotation-recolor-button-holder .color-change-btn {\n height: 1.5rem;\n border-radius: 0.5rem;\n }\n\n #toolbox div.recolor-active div.annotation-recolor-button-holder #color-change-yellow {\n grid-area: yellow;\n background-color: yellow;\n border: 1px solid rgb(200, 200, 0);\n }\n\n #toolbox div.recolor-active div.annotation-recolor-button-holder #color-change-red {\n grid-area: red;\n background-color: red;\n border: 1px solid rgb(200, 0, 0);\n }\n\n #toolbox div.recolor-active div.annotation-recolor-button-holder #color-change-cyan {\n grid-area: cyan;\n background-color: cyan;\n border: 1px solid rgb(0, 200, 200);\n }\n\n #toolbox div.recolor-active div.annotation-recolor-button-holder div.color-picker-border {\n grid-area: picker;\n background: linear-gradient(to bottom right, red, orange, yellow, green, blue, indigo, violet);\n border: 1px solid black;\n border-radius: 0.5rem;\n }\n\n #toolbox div.recolor-active div.annotation-recolor-button-holder div.color-picker-border div.color-picker-container {\n width: calc(100% - 8px);\n height: calc(100% - 8px);\n margin: 3px;\n background-color: black;\n border: 1px solid black;\n border-radius: 0.5rem;\n }\n\n #toolbox div.recolor-active div.color-picker-container input.color-change-picker {\n width: 100%;\n height: 100%;\n padding: 0;\n opacity: 0;\n }')),n.id=t,e.appendChild(n)}},e.prototype.add_event_listeners=function(){var t=this;$(document).on("click.ulabel",".color-change-btn",(function(e){var n=e.target.id.slice(13),i=(0,f.get_active_class_id)(t.ulabel);t.update_color(i,n),t.redraw(0)})),$(document).on("input.ulabel","input.color-change-picker",(function(e){var n=e.currentTarget.value,i=(0,f.get_active_class_id)(t.ulabel);t.update_color(i,n),document.getElementById("color-picker-container").style.backgroundColor=n,t.redraw()})),$(document).on("input.ulabel","#gradient-toggle",(function(e){t.redraw(0),t.save_local_storage_gradient(e.target.checked)})),$(document).on("input.ulabel","#gradient-slider",(function(e){$("div.gradient-slider-value-display").text(e.currentTarget.value+"%"),t.redraw(100,!0)}))},e.prototype.redraw=function(t,e){if(void 0===t&&(t=100),void 0===e&&(e=!1),!(Date.now()-this.most_recent_redraw_time\n

Recolor Annotations

\n
\n
\n \n \n
\n
\n \n \n
100%
\n
\n
\n
\n \n \n \n
\n
\n \n
\n
\n
\n
\n ')},e.prototype.after_init=function(){},e.prototype.get_toolbox_item_type=function(){return"RecolorActive"},e}(_);e.RecolorActiveItem=k;var E=function(t){function e(e,n){var i=t.call(this)||this;return i.filter_value=0,i.inner_HTML='

Keypoint Slider

',i.ulabel=e,void 0!==n?(i.name=n.name,i.filter_function=n.filter_function,i.get_confidence=n.confidence_function,i.mark_deprecated=n.mark_deprecated,i.keybinds=n.keybinds):(i.name="Keypoint Slider",i.filter_function=c.value_is_lower_than_filter,i.get_confidence=c.get_annotation_confidence,i.mark_deprecated=c.mark_deprecated,i.keybinds={increment:"2",decrement:"1"},n={}),i.slider_bar_id=i.name.replaceLowerConcat(" ","-"),i.ulabel.config.hasOwnProperty(i.name.replaceLowerConcat(" ","_","_default_value"))&&(i.filter_value=i.ulabel.config[i.name.replaceLowerConcat(" ","_","_default_value")]),i.ulabel.config.filter_annotations_on_load&&i.filter_annotations(i.ulabel,i.filter_value),i.add_styles(),i}return r(e,t),e.prototype.add_styles=function(){var t="keypoint-slider-toolbox-item-styles";if(!document.getElementById(t)){var e=document.head||document.querySelector("head"),n=document.createElement("style");n.appendChild(document.createTextNode("\n /* Component has no css?? */\n ")),n.id=t,e.appendChild(n)}},e.prototype.filter_annotations=function(t,e){var n=t.subtasks[t.state.current_subtask];for(var i in n.annotations.access){var r=n.annotations.access[i],o=this.get_confidence(r);o=Math.round(100*o);var s=this.filter_function(o,e);this.mark_deprecated(r,s,"confidence_filter")}},e.prototype.get_html=function(){var t=this,e=new p.SliderHandler({id:this.name.replaceLowerConcat(" ","-"),class:"keypoint-slider",default_value:Math.round(100*this.filter_value).toString(),label_units:"%",slider_event:function(e){t.filter_annotations(t.ulabel,e),t.ulabel.redraw_all_annotations(),t.ulabel.toolbox.redraw_update_items(t.ulabel)}});return'\n
\n

'.concat(this.name,"

\n ")+e.getSliderHTML()+"\n
\n "},e.prototype.after_init=function(){},e.prototype.get_toolbox_item_type=function(){return"KeypointSlider"},e}(_);e.KeypointSliderItem=E;var S=function(t){function e(e,n){void 0===n&&(n=null);var i=t.call(this)||this;for(var r in i.ulabel=e,i.config=i.ulabel.config.distance_filter_toolbox_item,l.DEFAULT_FILTER_DISTANCE_CONFIG)i.config.hasOwnProperty(r)||(i.config[r]=l.DEFAULT_FILTER_DISTANCE_CONFIG[r]);for(var o in i.config)i[o]=i.config[o];return i.disable_multi_class_mode&&(i.multi_class_mode=!1),i.collapse_options="true"===window.localStorage.getItem("filterDistanceCollapseOptions"),i.create_overlay(),null!==window.localStorage.getItem("filterDistanceShowOverlay")&&(i.show_overlay="true"===window.localStorage.getItem("filterDistanceShowOverlay")),i.overlay.update_display_overlay(i.show_overlay),i.add_styles(),i.add_event_listeners(),i}return r(e,t),e.prototype.add_styles=function(){var t="filter-distance-from-row-toolbox-item-styles";if(!document.getElementById(t)){var e=document.head||document.querySelector("head"),n=document.createElement("style");n.appendChild(document.createTextNode('\n #toolbox div.filter-row-distance {\n text-align: left;\n }\n\n #toolbox p.tb-header {\n margin: 0.75rem 0 0.5rem;\n }\n\n #toolbox div.filter-row-distance fieldset.filter-row-distance-options {\n display: inline-block;\n position: relative;\n left: 1rem;\n margin-bottom: 0.5rem;\n font-size: 80%;\n user-select: none;\n }\n\n #toolbox div.filter-row-distance fieldset.filter-row-distance-options * {\n text-align: left;\n }\n\n #toolbox div.filter-row-distance fieldset.filter-row-distance-options.ulabel-collapsed {\n border: none;\n margin-bottom: 0;\n padding: 0; /* Padding takes up too much space without the content */\n\n /* Needed to prevent the element from moving when ulabel-collapsed is toggled \n 0.75em comes from the previous padding, 2px comes from the removed border */\n padding-left: calc(0.75em + 2px)\n }\n\n #toolbox div.filter-row-distance fieldset.filter-row-distance-options legend {\n border-radius: 0.1rem;\n padding: 0.1rem 0.3rem;\n cursor: pointer;\n }\n\n #toolbox div.filter-row-distance fieldset.filter-row-distance-options.ulabel-collapsed legend {\n padding: 0.1rem 0.28rem;\n }\n\n #toolbox div.filter-row-distance fieldset.filter-row-distance-options.ulabel-collapsed :not(legend) {\n display: none;\n }\n\n #toolbox div.filter-row-distance fieldset.filter-row-distance-options legend:hover {\n background-color: rgba(128, 128, 128, 0.3)\n }\n\n #toolbox div.filter-row-distance fieldset.filter-row-distance-options input[type="checkbox"] {\n margin: 0;\n }\n\n #toolbox div.filter-row-distance fieldset.filter-row-distance-options label {\n position: relative;\n top: -0.2rem;\n font-size: smaller;\n }')),n.id=t,e.appendChild(n)}},e.prototype.add_event_listeners=function(){var t=this;$(document).on("click.ulabel","fieldset.filter-row-distance-options > legend",(function(){return t.toggleCollapsedOptions()})),$(document).on("click.ulabel","#filter-slider-distance-multi-checkbox",(function(){t.multi_class_mode=!t.multi_class_mode,t.switchFilterMode(),t.overlay.update_mode(t.multi_class_mode?"multi":"single");var e=t.multi_class_mode;(0,c.filter_points_distance_from_line)(t.ulabel,e)})),$(document).on("change.ulabel","#filter-slider-distance-toggle-overlay-checkbox",(function(e){t.overlay.update_display_overlay(e.currentTarget.checked),t.overlay.draw_overlay(),window.localStorage.setItem("filterDistanceShowOverlay",e.currentTarget.checked.toString())})),$(document).on("keypress.ulabel",(function(e){e.key===t.toggle_overlay_keybind&&document.querySelector("#filter-slider-distance-toggle-overlay-checkbox").click()}))},e.prototype.switchFilterMode=function(){$("#filter-single-class-mode").toggleClass("ulabel-hidden"),$("#filter-multi-class-mode").toggleClass("ulabel-hidden")},e.prototype.toggleCollapsedOptions=function(){$("fieldset.filter-row-distance-options").toggleClass("ulabel-collapsed"),this.collapse_options=!this.collapse_options,window.localStorage.setItem("filterDistanceCollapseOptions",this.collapse_options.toString())},e.prototype.create_overlay=function(){for(var t=(0,c.get_point_and_line_annotations)(this.ulabel)[1],e={single:void 0},n=document.querySelectorAll(".filter-row-distance-slider"),i=0;i\n \n Multi-Class Filtering\n \n ')),'\n
\n

'.concat(this.name,'

\n
\n \n Options ˅\n \n ')+i+'\n
\n \n \n Show Filter Range\n \n
\n
\n
\n ').concat(n.getSliderHTML(),'\n
\n
\n ')+e+"\n
\n
\n "},e.prototype.after_init=function(){},e.prototype.get_toolbox_item_type=function(){return"FilterDistance"},e}(_);e.FilterPointDistanceFromRow=S;var C=function(t){function e(e){var n=t.call(this)||this;n.submit_buttons=e.config.submit_buttons,n.add_styles(),n.add_event_listeners(),"function"==typeof n.submit_buttons&&(n.submit_buttons=[{name:"Submit",hook:n.submit_buttons,row_number:0}]),n.submit_buttons_by_row=n.sort_buttons_by_row_number();var i=function(t){$(document).on("click.ulabel","#"+r.submit_buttons[t].name.replaceLowerConcat(" ","-"),(function(i){return o(n,void 0,void 0,(function(){var n,i,r,o,a,l,c;return s(this,(function(s){switch(s.label){case 0:for(c in n=document.getElementById(this.submit_buttons[t].name.replaceLowerConcat(" ","-")),i=Array.from(document.getElementsByClassName("submit-button")))i[c].disabled=!0,i[c].style.filter="opacity(0.7)";for(a in n.innerText="",(r=document.createElement("div")).className="lds-dual-ring",n.appendChild(r),o={task_meta:e.config.task_meta,annotations:{}},e.subtasks)for(o.annotations[a]=[],c=0;c';for(var i=0,r=n[e];i\n ').concat(o.name,"\n \n ")}t+=""}return t+""},e.prototype.after_init=function(){},e.prototype.get_toolbox_item_type=function(){return"SubmitButtons"},e}(_);e.SubmitButtons=C},8286:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.is_object_and_not_array=function(t){return"object"==typeof t&&!Array.isArray(t)&&null!==t},e.time_function=function(t,e,n){return void 0===e&&(e=""),void 0===n&&(n=!1),function(){for(var i=[],r=0;r2)&&console.log("".concat(e," took ").concat(a,"ms to complete.")),s}},e.get_active_class_id=function(t){var e=t.state.current_subtask,n=t.subtasks[e];if(n.single_class_mode)return n.class_ids[0];if(i.DELETE_MODES.includes(n.state.annotation_mode))return i.DELETE_CLASS_ID;for(var r=0,o=n.state.id_payload;r0)return console.log("payload: ".concat(s)),s.class_id}console.error("get_active_class_id was unable to determine an active class id.\n current_subtask: ".concat(JSON.stringify(n)))};var i=n(5573)},9399:function(t,e,n){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(1288)),o=i(n(4202)),s=i(n(9391)),a=n(8967),l=n(8506);e.default=function(t,e,n){void 0===n&&(n={});for(var i=l.getGeom(t).coordinates,u=0,c=0;c=u&&c===i.length-1);c++){if(u>=e){var p=e-u;if(p){var h=r.default(i[c],i[c-1])-180;return o.default(i[c],p,h,n)}return a.point(i[c])}u+=s.default(i[c],i[c+1],n)}return a.point(i[i.length-1])}},4309:function(t,e,n){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(1288)),o=n(8967),s=i(n(2307));e.default=function(t,e,n,i){if(void 0===i&&(i={}),!o.isObject(i))throw new Error("options is invalid");if(!t)throw new Error("startPoint is required");if(!e)throw new Error("midPoint is required");if(!n)throw new Error("endPoint is required");var a=t,l=e,u=n,c=o.bearingToAzimuth(!0!==i.mercator?r.default(a,l):s.default(a,l)),p=o.bearingToAzimuth(!0!==i.mercator?r.default(u,l):s.default(u,l)),h=Math.abs(c-p);return!0===i.explementary?360-h:h}},7849:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8421),r=6378137;function o(t){var e=0;if(t&&t.length>0){e+=Math.abs(s(t[0]));for(var n=1;n2){for(l=0;l{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8967),r=n(8506),o=n(4828);function s(t,e){for(var n=[],i=0,r=t;i0&&(a[0][0]===a[a.length-1][0]&&a[0][1]===a[a.length-1][1]||a.push(a[0]),a.length>=4&&n.push(a))}return n}e.default=function(t,e){var n=r.getGeom(t),a=n.type,l="Feature"===t.type?t.properties:{},u=n.coordinates;switch(a){case"LineString":case"MultiLineString":var c=[];return"LineString"===a&&(u=[u]),u.forEach((function(t){o.lineclip(t,e,c)})),1===c.length?i.lineString(c[0],l):i.multiLineString(c,l);case"Polygon":return i.polygon(s(u,e),l);case"MultiPolygon":return i.multiPolygon(u.map((function(t){return s(t,e)})),l);default:throw new Error("geometry "+a+" not supported")}}},4828:(t,e)=>{"use strict";function n(t,e,n,i){return 8&n?[t[0]+(e[0]-t[0])*(i[3]-t[1])/(e[1]-t[1]),i[3]]:4&n?[t[0]+(e[0]-t[0])*(i[1]-t[1])/(e[1]-t[1]),i[1]]:2&n?[i[2],t[1]+(e[1]-t[1])*(i[2]-t[0])/(e[0]-t[0])]:1&n?[i[0],t[1]+(e[1]-t[1])*(i[0]-t[0])/(e[0]-t[0])]:null}function i(t,e){var n=0;return t[0]e[2]&&(n|=2),t[1]e[3]&&(n|=8),n}Object.defineProperty(e,"__esModule",{value:!0}),e.lineclip=function(t,e,r){var o,s,a,l,u,c=t.length,p=i(t[0],e),h=[];for(r||(r=[]),o=1;o{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8967);e.default=function(t,e){void 0===e&&(e={});var n=Number(t[0]),r=Number(t[1]),o=Number(t[2]),s=Number(t[3]);if(6===t.length)throw new Error("@turf/bbox-polygon does not support BBox with 6 positions");var a=[n,r],l=[n,s],u=[o,s],c=[o,r];return i.polygon([[a,c,u,l,a]],e.properties,{bbox:t,id:e.id})}},4383:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8421);function r(t){var e=[1/0,1/0,-1/0,-1/0];return i.coordEach(t,(function(t){e[0]>t[0]&&(e[0]=t[0]),e[1]>t[1]&&(e[1]=t[1]),e[2]{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8967),r=n(8506);e.default=function t(e,n,o){if(void 0===o&&(o={}),!0===o.final)return function(e,n){var i=t(n,e);return(i+180)%360}(e,n);var s=r.getCoord(e),a=r.getCoord(n),l=i.degreesToRadians(s[0]),u=i.degreesToRadians(a[0]),c=i.degreesToRadians(s[1]),p=i.degreesToRadians(a[1]),h=Math.sin(u-l)*Math.cos(p),f=Math.cos(c)*Math.sin(p)-Math.sin(c)*Math.cos(p)*Math.cos(u-l);return i.radiansToDegrees(Math.atan2(h,f))}},301:function(t,e,n){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=n(8967),o=n(8506),s=i(n(9164));e.default=function(t,e){void 0===e&&(e={});for(var n=e.resolution||1e4,i=e.sharpness||.85,a=[],l=o.getGeom(t).coordinates.map((function(t){return{x:t[0],y:t[1]}})),u=new s.default({duration:n,points:l,sharpness:i}),c=function(t){var e=u.pos(t);Math.floor(t/100)%2==0&&a.push([e.x,e.y])},p=0;p{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t){this.points=t.points||[],this.duration=t.duration||1e4,this.sharpness=t.sharpness||.85,this.centers=[],this.controls=[],this.stepLength=t.stepLength||60,this.length=this.points.length,this.delay=0;for(var e=0;et&&(e.push(i),n=r)}return e},t.prototype.vector=function(t){var e=this.pos(t+10),n=this.pos(t-10);return{angle:180*Math.atan2(e.y-n.y,e.x-n.x)/3.14,speed:Math.sqrt((n.x-e.x)*(n.x-e.x)+(n.y-e.y)*(n.y-e.y)+(n.z-e.z)*(n.z-e.z))}},t.prototype.pos=function(t){var e=t-this.delay;e<0&&(e=0),e>this.duration&&(e=this.duration-1);var n=e/this.duration;if(n>=1)return this.points[this.length-1];var i=Math.floor((this.points.length-1)*n);return function(t,e,n,i,r){var o=function(t){var e=t*t;return[e*t,3*e*(1-t),3*t*(1-t)*(1-t),(1-t)*(1-t)*(1-t)]}(t);return{x:r.x*o[0]+i.x*o[1]+n.x*o[2]+e.x*o[3],y:r.y*o[0]+i.y*o[1]+n.y*o[2]+e.y*o[3],z:r.z*o[0]+i.z*o[1]+n.z*o[2]+e.z*o[3]}}((this.length-1)*n-i,this.points[i],this.controls[i][1],this.controls[i+1][0],this.points[i+1])},t}();e.default=n},7333:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8506);e.default=function(t){for(var e,n,r=i.getCoords(t),o=0,s=1;s0}},3974:function(t,e,n){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(4383)),o=i(n(2446)),s=i(n(5378)),a=n(8506);function l(t,e){var n,i=!1;for(n=0;ne[0]||t[2]e[1]||t[3]0}function p(t,e){for(var n=!1,i=!1,r=t.coordinates.length,o=0;o=Math.abs(a)?s>0?t[0]<=n[0]&&n[0]<=e[0]:e[0]<=n[0]&&n[0]<=t[0]:a>0?t[1]<=n[1]&&n[1]<=e[1]:e[1]<=n[1]&&n[1]<=t[1]:Math.abs(s)>=Math.abs(a)?s>0?t[0]0?t[1]0)for(var n=0;n0}function c(t,e,n){var i=n[0]-t[0],r=n[1]-t[1],o=e[0]-t[0],s=e[1]-t[1];return 0==i*s-r*o&&(Math.abs(o)>=Math.abs(s)?o>0?t[0]<=n[0]&&n[0]<=e[0]:e[0]<=n[0]&&n[0]<=t[0]:s>0?t[1]<=n[1]&&n[1]<=e[1]:e[1]<=n[1]&&n[1]<=t[1])}e.default=function(t,e){var n=!0;return s.flattenEach(t,(function(t){s.flattenEach(e,(function(e){if(!1===n)return!1;n=function(t,e){switch(t.type){case"Point":switch(e.type){case"Point":return s=t.coordinates,c=e.coordinates,!(s[0]===c[0]&&s[1]===c[1]);case"LineString":return!l(e,t);case"Polygon":return!r.default(t,e)}break;case"LineString":switch(e.type){case"Point":return!l(t,e);case"LineString":return n=t,i=e,!(o.default(n,i).features.length>0);case"Polygon":return!u(e,t)}break;case"Polygon":switch(e.type){case"Point":return!r.default(e,t);case"LineString":return!u(t,e);case"Polygon":return!function(t,e){for(var n=0,i=t.coordinates[0];n0}(e,t)}}var n,i,s,c;return!1}(t.geometry,e.geometry)}))})),n}},7447:function(t,e,n){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(8635)),o=i(n(2086)),s=n(8506);e.default=function(t,e){return s.getGeom(t).type===s.getGeom(e).type&&new r.default({precision:6}).compare(o.default(t),o.default(e))}},9353:function(t,e,n){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(1323)),o=n(8421);e.default=function(t,e){var n=!1;return o.flattenEach(t,(function(t){o.flattenEach(e,(function(e){if(!0===n)return!0;n=!r.default(t.geometry,e.geometry)}))})),n}},8436:function(t,e,n){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=n(8421),o=n(8506),s=i(n(4300)),a=i(n(3154)),l=i(n(8635));e.default=function(t,e){var n=o.getGeom(t),i=o.getGeom(e),u=n.type,c=i.type;if("MultiPoint"===u&&"MultiPoint"!==c||("LineString"===u||"MultiLineString"===u)&&"LineString"!==c&&"MultiLineString"!==c||("Polygon"===u||"MultiPolygon"===u)&&"Polygon"!==c&&"MultiPolygon"!==c)throw new Error("features must be of the same type");if("Point"===u)throw new Error("Point geometry not supported");if(new l.default({precision:6}).compare(t,e))return!1;var p=0;switch(u){case"MultiPoint":for(var h=0;h0}},3980:function(t,e,n){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(2086)),o=i(n(7042)),s=i(n(2307)),a=n(8967);function l(t,e){return a.bearingToAzimuth(s.default(t[0],t[1]))===a.bearingToAzimuth(s.default(e[0],e[1]))}function u(t,e){if(t.geometry&&t.geometry.type)return t.geometry.type;if(t.type)return t.type;throw new Error("Invalid GeoJSON object for "+e)}e.default=function(t,e){if(!t)throw new Error("line1 is required");if(!e)throw new Error("line2 is required");if("LineString"!==u(t,"line1"))throw new Error("line1 must be a LineString");if("LineString"!==u(e,"line2"))throw new Error("line2 must be a LineString");for(var n=o.default(r.default(t)).features,i=o.default(r.default(e)).features,s=0;s{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8506);function r(t,e,n){var i=!1;e[0][0]===e[e.length-1][0]&&e[0][1]===e[e.length-1][1]&&(e=e.slice(0,e.length-1));for(var r=0,o=e.length-1;rt[1]!=u>t[1]&&t[0]<(l-s)*(t[1]-a)/(u-a)+s&&(i=!i)}return i}e.default=function(t,e,n){if(void 0===n&&(n={}),!t)throw new Error("point is required");if(!e)throw new Error("polygon is required");var o=i.getCoord(t),s=i.getGeom(e),a=s.type,l=e.bbox,u=s.coordinates;if(l&&!1===function(t,e){return e[0]<=t[0]&&e[1]<=t[1]&&e[2]>=t[0]&&e[3]>=t[1]}(o,l))return!1;"Polygon"===a&&(u=[u]);for(var c=!1,p=0;p{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8506);function r(t,e,n,i,r){var o=n[0],s=n[1],a=t[0],l=t[1],u=e[0],c=e[1],p=u-a,h=c-l,f=(n[0]-a)*h-(n[1]-l)*p;if(null!==r){if(Math.abs(f)>r)return!1}else if(0!==f)return!1;return i?"start"===i?Math.abs(p)>=Math.abs(h)?p>0?a0?l=Math.abs(h)?p>0?a<=o&&o0?l<=s&&s=Math.abs(h)?p>0?a0?l=Math.abs(h)?p>0?a<=o&&o<=u:u<=o&&o<=a:h>0?l<=s&&s<=c:c<=s&&s<=l}e.default=function(t,e,n){void 0===n&&(n={});for(var o=i.getCoord(t),s=i.getCoords(e),a=0;ae[0]||t[2]e[1]||t[3]{"use strict";var i=n(6649),r=n(39),o=n(8421),s=n(1715),a=n(8967);function l(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var u=l(i);function c(t,e,n){var i=(n=n||{}).units||"kilometers",r=n.steps||8;if(!t)throw new Error("geojson is required");if("object"!=typeof n)throw new Error("options must be an object");if("number"!=typeof r)throw new Error("steps must be an number");if(void 0===e)throw new Error("radius is required");if(r<=0)throw new Error("steps must be greater than 0");var s=[];switch(t.type){case"GeometryCollection":return o.geomEach(t,(function(t){var n=p(t,e,i,r);n&&s.push(n)})),a.featureCollection(s);case"FeatureCollection":return o.featureEach(t,(function(t){var n=p(t,e,i,r);n&&o.featureEach(n,(function(t){t&&s.push(t)}))})),a.featureCollection(s)}return p(t,e,i,r)}function p(t,e,n,i){var l=t.properties||{},c="Feature"===t.type?t.geometry:t;if("GeometryCollection"===c.type){var g=[];return o.geomEach(t,(function(t){var r=p(t,e,n,i);r&&g.push(r)})),a.featureCollection(g)}var _=function(t){var e=u.default(t).geometry.coordinates,n=[-e[0],-e[1]];return s.geoAzimuthalEquidistant().rotate(n).scale(a.earthRadius)}(c),y={type:c.type,coordinates:f(c.coordinates,_)},m=(new r.GeoJSONReader).read(y),v=a.radiansToLength(a.lengthToRadians(e,n),"meters"),b=r.BufferOp.bufferOp(m,v,i);if(!h((b=(new r.GeoJSONWriter).write(b)).coordinates)){var x={type:b.type,coordinates:d(b.coordinates,_)};return a.feature(x,l)}}function h(t){return Array.isArray(t[0])?h(t[0]):isNaN(t[0])}function f(t,e){return"object"!=typeof t[0]?e(t):t.map((function(t){return f(t,e)}))}function d(t,e){return"object"!=typeof t[0]?e.invert(t):t.map((function(t){return d(t,e)}))}t.exports=c,t.exports.default=c},2779:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8421),r=n(8967);e.default=function(t,e){void 0===e&&(e={});var n=0,o=0,s=0;return i.geomEach(t,(function(t,a,l){var u=e.weight?null==l?void 0:l[e.weight]:void 0;if(u=null==u?1:u,!r.isNumber(u))throw new Error("weight value must be a number for feature index "+a);(u=Number(u))>0&&i.coordEach(t,(function(t){n+=t[0]*u,o+=t[1]*u,s+=u}))})),r.point([n/s,o/s],e.properties,e)}},6724:function(t,e,n){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(2779)),o=i(n(9391)),s=i(n(4408)),a=n(8967),l=n(8421);function u(t,e,n,i,r){var s=i.tolerance||.001,c=0,p=0,h=0,f=0;if(l.featureEach(n,(function(e){var n,i=null===(n=e.properties)||void 0===n?void 0:n.weight,r=null==i?1:i;if(r=Number(r),!a.isNumber(r))throw new Error("weight value must be a number");if(r>0){f+=1;var s=r*o.default(e,t);0===s&&(s=1);var l=r/s;c+=e.geometry.coordinates[0]*l,p+=e.geometry.coordinates[1]*l,h+=l}})),f<1)throw new Error("no features to measure");var d=c/h,g=p/h;return 1===f||0===r||Math.abs(d-e[0]){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8421),r=n(8967);e.default=function(t,e){void 0===e&&(e={});var n=0,o=0,s=0;return i.coordEach(t,(function(t){n+=t[0],o+=t[1],s++}),!0),r.point([n/s,o/s],e.properties)}},5764:function(t,e,n){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(4202)),o=n(8967);e.default=function(t,e,n){void 0===n&&(n={});for(var i=n.steps||64,s=n.properties?n.properties:!Array.isArray(t)&&"Feature"===t.type&&t.properties?t.properties:{},a=[],l=0;l{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8967),r=n(8506);function o(t){var e=r.getCoords(t);if(2===e.length&&!s(e[0],e[1]))return e;var n=[],i=e.length-1,o=n.length;n.push(e[0]);for(var l=1;l2&&a(n[o-3],n[o-1],n[o-2])&&n.splice(n.length-2,1))}if(n.push(e[e.length-1]),o=n.length,s(e[0],e[e.length-1])&&o<4)throw new Error("invalid polygon");return a(n[o-3],n[o-1],n[o-2])&&n.splice(n.length-2,1),n}function s(t,e){return t[0]===e[0]&&t[1]===e[1]}function a(t,e,n){var i=n[0],r=n[1],o=t[0],s=t[1],a=e[0],l=e[1],u=a-o,c=l-s;return 0==(i-o)*c-(r-s)*u&&(Math.abs(u)>=Math.abs(c)?u>0?o<=i&&i<=a:a<=i&&i<=o:c>0?s<=r&&r<=l:l<=r&&r<=s)}e.default=function(t,e){void 0===e&&(e={});var n="object"==typeof e?e.mutate:e;if(!t)throw new Error("geojson is required");var s=r.getType(t),a=[];switch(s){case"LineString":a=o(t);break;case"MultiLineString":case"Polygon":r.getCoords(t).forEach((function(t){a.push(o(t))}));break;case"MultiPolygon":r.getCoords(t).forEach((function(t){var e=[];t.forEach((function(t){e.push(o(t))})),a.push(e)}));break;case"Point":return t;case"MultiPoint":var l={};r.getCoords(t).forEach((function(t){var e=t.join("-");Object.prototype.hasOwnProperty.call(l,e)||(a.push(t),l[e]=!0)}));break;default:throw new Error(s+" geometry not supported")}return t.coordinates?!0===n?(t.coordinates=a,t):{type:s,coordinates:a}:!0===n?(t.geometry.coordinates=a,t):i.feature({type:s,coordinates:a},t.properties,{bbox:t.bbox,id:t.id})}},3711:(t,e)=>{"use strict";function n(t){var e={type:"Feature"};return Object.keys(t).forEach((function(n){switch(n){case"type":case"properties":case"geometry":return;default:e[n]=t[n]}})),e.properties=i(t.properties),e.geometry=r(t.geometry),e}function i(t){var e={};return t?(Object.keys(t).forEach((function(n){var r=t[n];"object"==typeof r?null===r?e[n]=null:Array.isArray(r)?e[n]=r.map((function(t){return t})):e[n]=i(r):e[n]=r})),e):e}function r(t){var e={type:t.type};return t.bbox&&(e.bbox=t.bbox),"GeometryCollection"===t.type?(e.geometries=t.geometries.map((function(t){return r(t)})),e):(e.coordinates=o(t.coordinates),e)}function o(t){var e=t;return"object"!=typeof e[0]?e.slice():e.map((function(t){return o(t)}))}Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(t){if(!t)throw new Error("geojson is required");switch(t.type){case"Feature":return n(t);case"FeatureCollection":return function(t){var e={type:"FeatureCollection"};return Object.keys(t).forEach((function(n){switch(n){case"type":case"features":return;default:e[n]=t[n]}})),e.features=t.features.map((function(t){return n(t)})),e}(t);case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":case"GeometryCollection":return r(t);default:throw new Error("unknown GeoJSON type")}}},8703:function(t,e,n){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(3711)),o=i(n(9391)),s=n(8421),a=n(8967),l=i(n(6112));e.default=function(t,e,n){void 0===n&&(n={}),!0!==n.mutate&&(t=r.default(t)),n.minPoints=n.minPoints||3;var i=new l.default.DBSCAN,u=i.run(s.coordAll(t),a.convertLength(e,n.units),n.minPoints,o.default),c=-1;return u.forEach((function(e){c++,e.forEach((function(e){var n=t.features[e];n.properties||(n.properties={}),n.properties.cluster=c,n.properties.dbscan="core"}))})),i.noise.forEach((function(e){var n=t.features[e];n.properties||(n.properties={}),n.properties.cluster?n.properties.dbscan="edge":n.properties.dbscan="noise"})),t}},7521:function(t,e,n){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(3711)),o=n(8421),s=i(n(1756));e.default=function(t,e){void 0===e&&(e={});var n=t.features.length;e.numberOfClusters=e.numberOfClusters||Math.round(Math.sqrt(n/2)),e.numberOfClusters>n&&(e.numberOfClusters=n),!0!==e.mutate&&(t=r.default(t));var i=o.coordAll(t),a=i.slice(0,e.numberOfClusters),l=s.default(i,e.numberOfClusters,a),u={};return l.centroids.forEach((function(t,e){u[e]=t})),o.featureEach(t,(function(t,e){var n=l.idxs[e];t.properties.cluster=n,t.properties.centroid=u[n]})),t}},5943:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8421),r=n(8967);function o(t,e,n){if(!t)throw new Error("geojson is required");if("FeatureCollection"!==t.type)throw new Error("geojson must be a FeatureCollection");if(null==e)throw new Error("property is required");for(var i=s(t,e),o=Object.keys(i),a=0;ar;){if(o-r>600){var a=o-r+1,l=i-r+1,u=Math.log(a),c=.5*Math.exp(2*u/3),p=.5*Math.sqrt(u*c*(a-c)/a)*(l-a/2<0?-1:1);t(n,i,Math.max(r,Math.floor(i-l*c/a+p)),Math.min(o,Math.floor(i+(a-l)*c/a+p)),s)}var h=n[i],f=r,d=o;for(e(n,r,i),s(n[o],h)>0&&e(n,r,o);f0;)d--}0===s(n[r],h)?e(n,r,d):e(n,++d,o),d<=i&&(r=d+1),i<=d&&(o=d-1)}}function e(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function n(t,e){return te?1:0}return function(e,i,r,o,s){t(e,i,r||0,o||e.length-1,s||n)}}()},2903:(t,e,n)=>{"use strict";t.exports=r,t.exports.default=r;var i=n(3351);function r(t,e){if(!(this instanceof r))return new r(t,e);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&this._initFormat(e),this.clear()}function o(t,e,n){if(!n)return e.indexOf(t);for(var i=0;i=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function _(t,e,n,r,o){for(var s,a=[e,n];a.length;)(n=a.pop())-(e=a.pop())<=r||(s=e+Math.ceil((n-e)/r/2)*r,i(t,s,e,n,o),a.push(e,s,s,n))}r.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,n=[],i=this.toBBox;if(!d(t,e))return n;for(var r,o,s,a,l=[];e;){for(r=0,o=e.children.length;r=0&&o[e].children.length>this._maxEntries;)this._split(o,e),e--;this._adjustParentBBoxes(r,o,e)},_split:function(t,e){var n=t[e],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);var o=this._chooseSplitIndex(n,r,i),a=g(n.children.splice(o,n.children.length-o));a.height=n.height,a.leaf=n.leaf,s(n,this.toBBox),s(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,s(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,n){var i,r,o,s,l,u,c,h,f,d,g,_,y,m;for(u=c=1/0,i=e;i<=n-e;i++)f=r=a(t,0,i,this.toBBox),d=o=a(t,i,n,this.toBBox),void 0,void 0,void 0,void 0,g=Math.max(f.minX,d.minX),_=Math.max(f.minY,d.minY),y=Math.min(f.maxX,d.maxX),m=Math.min(f.maxY,d.maxY),s=Math.max(0,y-g)*Math.max(0,m-_),l=p(r)+p(o),s=e;r--)o=t.children[r],l(c,t.leaf?s(o):o),p+=h(c);return p},_adjustParentBBoxes:function(t,e,n){for(var i=n;i>=0;i--)l(e[i],t)},_condense:function(t){for(var e,n=t.length-1;n>=0;n--)0===t[n].children.length?n>0?(e=t[n-1].children).splice(e.indexOf(t[n]),1):this.clear():s(t[n],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}},2583:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8967),r=n(8421);e.default=function(t){var e={MultiPoint:{coordinates:[],properties:[]},MultiLineString:{coordinates:[],properties:[]},MultiPolygon:{coordinates:[],properties:[]}};return r.featureEach(t,(function(t){var n,i,r,o;switch(null===(o=t.geometry)||void 0===o?void 0:o.type){case"Point":e.MultiPoint.coordinates.push(t.geometry.coordinates),e.MultiPoint.properties.push(t.properties);break;case"MultiPoint":(n=e.MultiPoint.coordinates).push.apply(n,t.geometry.coordinates),e.MultiPoint.properties.push(t.properties);break;case"LineString":e.MultiLineString.coordinates.push(t.geometry.coordinates),e.MultiLineString.properties.push(t.properties);break;case"MultiLineString":(i=e.MultiLineString.coordinates).push.apply(i,t.geometry.coordinates),e.MultiLineString.properties.push(t.properties);break;case"Polygon":e.MultiPolygon.coordinates.push(t.geometry.coordinates),e.MultiPolygon.properties.push(t.properties);break;case"MultiPolygon":(r=e.MultiPolygon.coordinates).push.apply(r,t.geometry.coordinates),e.MultiPolygon.properties.push(t.properties)}})),i.featureCollection(Object.keys(e).filter((function(t){return e[t].coordinates.length})).sort().map((function(t){var n={type:t,coordinates:e[t].coordinates},r={collectedProperties:e[t].properties};return i.feature(n,r)})))}},347:function(t,e,n){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(9391)),o=n(8967),s=n(8421),a=i(n(2141)),l=i(n(8118));e.default=function(t,e){void 0===e&&(e={});var n=e.maxEdge||1/0,i=function(t){var e=[],n={};return s.featureEach(t,(function(t){if(t.geometry){var i=t.geometry.coordinates.join("-");Object.prototype.hasOwnProperty.call(n,i)||(e.push(t),n[i]=!0)}})),o.featureCollection(e)}(t),u=a.default(i);if(u.features=u.features.filter((function(t){var i=t.geometry.coordinates[0][0],o=t.geometry.coordinates[0][1],s=t.geometry.coordinates[0][2],a=r.default(i,o,e),l=r.default(o,s,e),u=r.default(i,s,e);return a<=n&&l<=n&&u<=n})),u.features.length<1)return null;var c=l.default(u);return 1===c.coordinates.length&&(c.coordinates=c.coordinates[0],c.type="Polygon"),o.feature(c)}},8118:function(t,e,n){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(3711)),o=n(8967),s=n(8506),a=n(8421),l=i(n(5335)),u=i(n(9099));e.default=function(t,e){if(void 0===e&&(e={}),e=e||{},!o.isObject(e))throw new Error("options is invalid");var n=e.mutate;if("FeatureCollection"!==s.getType(t))throw new Error("geojson must be a FeatureCollection");if(!t.features.length)throw new Error("geojson is empty");!1!==n&&void 0!==n||(t=r.default(t));var i=function(t){var e={};a.flattenEach(t,(function(t){e[t.geometry.type]=!0}));var n=Object.keys(e);return 1===n.length?n[0]:null}(t);if(!i)throw new Error("geojson must be homogenous");var c=t;switch(i){case"LineString":return l.default(c,e);case"Polygon":return u.default(c,e);default:throw new Error(i+" is not supported")}}},5335:function(t,e,n){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(3711)),o=n(8967),s=n(8506),a=n(8421);function l(t){return t[0].toString()+","+t[1].toString()}e.default=function(t,e){if(void 0===e&&(e={}),e=e||{},!o.isObject(e))throw new Error("options is invalid");var n=e.mutate;if("FeatureCollection"!==s.getType(t))throw new Error("geojson must be a FeatureCollection");if(!t.features.length)throw new Error("geojson is empty");!1!==n&&void 0!==n||(t=r.default(t));var i=[],u=a.lineReduce(t,(function(t,e){return function(t,e){var n,i=t.geometry.coordinates,r=e.geometry.coordinates,s=l(i[0]),a=l(i[i.length-1]),u=l(r[0]),c=l(r[r.length-1]);if(s===c)n=r.concat(i.slice(1));else if(u===a)n=i.concat(r.slice(1));else if(s===u)n=i.slice(1).reverse().concat(r);else{if(a!==c)return null;n=i.concat(r.reverse().slice(1))}return o.lineString(n)}(t,e)||(i.push(t),e)}));return u&&i.push(u),i.length?1===i.length?i[0]:o.multiLineString(i.map((function(t){return t.coordinates}))):null}},9099:function(t,e,n){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(3711)),o=n(8967),s=n(8506),a=n(8421),l=n(5681),u=n(6888);e.default=function(t,e){if(void 0===e&&(e={}),"FeatureCollection"!==s.getType(t))throw new Error("geojson must be a FeatureCollection");if(!t.features.length)throw new Error("geojson is empty");!1!==e.mutate&&void 0!==e.mutate||(t=r.default(t));var n=[];a.flattenEach(t,(function(t){n.push(t.geometry)}));var i=u.topology({geoms:o.geometryCollection(n).geometry});return l.merge(i,i.objects.geoms.geometries)}},1207:function(t,e,n){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=n(8967),o=n(8421),s=i(n(1582));e.default=function(t,e){void 0===e&&(e={}),e.concavity=e.concavity||1/0;var n=[];if(o.coordEach(t,(function(t){n.push([t[0],t[1]])})),!n.length)return null;var i=s.default(n,e.concavity);return i.length>3?r.polygon([i]):null}},4202:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8967),r=n(8506);e.default=function(t,e,n,o){void 0===o&&(o={});var s=r.getCoord(t),a=i.degreesToRadians(s[0]),l=i.degreesToRadians(s[1]),u=i.degreesToRadians(n),c=i.lengthToRadians(e,o.units),p=Math.asin(Math.sin(l)*Math.cos(c)+Math.cos(l)*Math.sin(c)*Math.cos(u)),h=a+Math.atan2(Math.sin(u)*Math.sin(c)*Math.cos(l),Math.cos(c)-Math.sin(l)*Math.sin(p)),f=i.radiansToDegrees(h),d=i.radiansToDegrees(p);return i.point([f,d],o.properties)}},4927:(t,e,n)=>{"use strict";var i=n(9004),r=n(8967),o=n(8506);function s(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var a=s(i);function l(t,e){var n=o.getGeom(t),i=o.getGeom(e),s=t.properties||{},l=a.default.difference(n.coordinates,i.coordinates);return 0===l.length?null:1===l.length?r.polygon(l[0],s):r.multiPolygon(l,s)}t.exports=l,t.exports.default=l},7095:(t,e,n)=>{"use strict";var i=n(8967),r=n(8506),o=n(8421),s=n(4036),a=n(9004);function l(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var u=l(s),c=l(a);function p(t,e){if(e=e||{},!i.isObject(e))throw new Error("options is invalid");var n=e.propertyName;r.collectionOf(t,"Polygon","dissolve");var s=[];if(!e.propertyName)return u.default(i.multiPolygon(c.default.union.apply(null,t.features.map((function(t){return t.geometry.coordinates})))));var a={};o.featureEach(t,(function(t){Object.prototype.hasOwnProperty.call(a,t.properties[n])||(a[t.properties[n]]=[]),a[t.properties[n]].push(t)}));for(var l=Object.keys(a),p=0;p{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8506),r=n(8967);e.default=function(t,e,n){void 0===n&&(n={});var o=i.getCoord(t),s=i.getCoord(e),a=r.degreesToRadians(s[1]-o[1]),l=r.degreesToRadians(s[0]-o[0]),u=r.degreesToRadians(o[1]),c=r.degreesToRadians(s[1]),p=Math.pow(Math.sin(a/2),2)+Math.pow(Math.sin(l/2),2)*Math.cos(u)*Math.cos(c);return r.radiansToLength(2*Math.atan2(Math.sqrt(p),Math.sqrt(1-p)),n.units)}},7420:(t,e,n)=>{"use strict";var i=n(8967),r=n(7153),o=n(7948),s=n(8506);function a(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var l=a(r),u=a(o);function c(t,e,n,r){var o=(r=r||{}).steps||64,a=r.units||"kilometers",c=r.angle||0,h=r.pivot||t,f=r.properties||t.properties||{};if(!t)throw new Error("center is required");if(!e)throw new Error("xSemiAxis is required");if(!n)throw new Error("ySemiAxis is required");if(!i.isObject(r))throw new Error("options must be an object");if(!i.isNumber(o))throw new Error("steps must be a number");if(!i.isNumber(c))throw new Error("angle must be a number");var d=s.getCoord(t);if("degrees"===a)var g=i.degreesToRadians(c);else e=l.default(t,e,90,{units:a}),n=l.default(t,n,0,{units:a}),e=s.getCoord(e)[0]-d[0],n=s.getCoord(n)[1]-d[1];for(var _=[],y=0;y=-270&&(v=-v),m<-180&&m>=-360&&(b=-b),"degrees"===a){var x=v*Math.cos(g)+b*Math.sin(g),w=b*Math.cos(g)-v*Math.sin(g);v=x,b=w}_.push([v+d[0],b+d[1]])}return _.push(_[0]),"degrees"===a?i.polygon([_],f):u.default(i.polygon([_],f),c,{pivot:h})}function p(t){var e=t*Math.PI/180;return Math.tan(e)}t.exports=c,t.exports.default=c},2120:(t,e,n)=>{"use strict";var i=n(4383),r=n(3932);function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var s=o(i),a=o(r);function l(t){return a.default(s.default(t))}t.exports=l,t.exports.default=l},3707:(t,e,n)=>{"use strict";var i=n(8421),r=n(8967);function o(t){var e=[];return"FeatureCollection"===t.type?i.featureEach(t,(function(t){i.coordEach(t,(function(n){e.push(r.point(n,t.properties))}))})):i.coordEach(t,(function(n){e.push(r.point(n,t.properties))})),r.featureCollection(e)}t.exports=o,t.exports.default=o},4036:(t,e,n)=>{"use strict";var i=n(8421),r=n(8967);function o(t){if(!t)throw new Error("geojson is required");var e=[];return i.flattenEach(t,(function(t){e.push(t)})),r.featureCollection(e)}t.exports=o,t.exports.default=o},9387:(t,e,n)=>{"use strict";var i=n(8421),r=n(8967);function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var s=o(n(3711));function a(t,e){if(e=e||{},!r.isObject(e))throw new Error("options is invalid");var n=e.mutate;if(!t)throw new Error("geojson is required");return!1!==n&&void 0!==n||(t=s.default(t)),i.coordEach(t,(function(t){var e=t[0],n=t[1];t[0]=n,t[1]=e})),t}t.exports=a,t.exports.default=a},2352:(t,e,n)=>{"use strict";var i=n(8506),r=Math.PI/180,o=180/Math.PI,s=function(t,e){this.lon=t,this.lat=e,this.x=r*t,this.y=r*e};s.prototype.view=function(){return String(this.lon).slice(0,4)+","+String(this.lat).slice(0,4)},s.prototype.antipode=function(){var t=-1*this.lat,e=this.lon<0?180+this.lon:-1*(180-this.lon);return new s(e,t)};var a=function(){this.coords=[],this.length=0};a.prototype.move_to=function(t){this.length++,this.coords.push(t)};var l=function(t){this.properties=t||{},this.geometries=[]};l.prototype.json=function(){if(this.geometries.length<=0)return{geometry:{type:"LineString",coordinates:null},type:"Feature",properties:this.properties};if(1===this.geometries.length)return{geometry:{type:"LineString",coordinates:this.geometries[0].coords},type:"Feature",properties:this.properties};for(var t=[],e=0;ed&&(y>h&&_h&&yc&&(c=m)}var v=[];if(u&&c0&&Math.abs(w-n[x-1][0])>d){var k=parseFloat(n[x-1][0]),E=parseFloat(n[x-1][1]),S=parseFloat(n[x][0]),C=parseFloat(n[x][1]);if(k>-180&&k-180&&n[x-1][0]h&&k<180&&-180===S&&x+1h&&n[x-1][0]<180){b.push([180,n[x][1]]),x++,b.push([n[x][0],n[x][1]]);continue}if(kh){var I=k;k=S,S=I;var N=E;E=C,C=N}if(k>h&&S=180&&kh?180:-180,P]),(b=[]).push([n[x-1][0]>h?-180:180,P]),v.push(b)}else b=[],v.push(b);b.push([w,n[x][1]])}else b.push([n[x][0],n[x][1]])}}else{var O=[];v.push(O);for(var L=0;L{"use strict";function n(t,e,n){void 0===n&&(n={});var i={type:"Feature"};return(0===n.id||n.id)&&(i.id=n.id),n.bbox&&(i.bbox=n.bbox),i.properties=e||{},i.geometry=t,i}function i(t,e,i){if(void 0===i&&(i={}),!t)throw new Error("coordinates is required");if(!Array.isArray(t))throw new Error("coordinates must be an Array");if(t.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!f(t[0])||!f(t[1]))throw new Error("coordinates must contain numbers");return n({type:"Point",coordinates:t},e,i)}function r(t,e,i){void 0===i&&(i={});for(var r=0,o=t;r=0))throw new Error("precision must be a positive number");var n=Math.pow(10,e||0);return Math.round(t*n)/n},e.radiansToLength=c,e.lengthToRadians=p,e.lengthToDegrees=function(t,e){return h(p(t,e))},e.bearingToAzimuth=function(t){var e=t%360;return e<0&&(e+=360),e},e.radiansToDegrees=h,e.degreesToRadians=function(t){return t%360*Math.PI/180},e.convertLength=function(t,e,n){if(void 0===e&&(e="kilometers"),void 0===n&&(n="kilometers"),!(t>=0))throw new Error("length must be a positive number");return c(p(t,e),n)},e.convertArea=function(t,n,i){if(void 0===n&&(n="meters"),void 0===i&&(i="kilometers"),!(t>=0))throw new Error("area must be a positive number");var r=e.areaFactors[n];if(!r)throw new Error("invalid original units");var o=e.areaFactors[i];if(!o)throw new Error("invalid final units");return t/r*o},e.isNumber=f,e.isObject=function(t){return!!t&&t.constructor===Object},e.validateBBox=function(t){if(!t)throw new Error("bbox is required");if(!Array.isArray(t))throw new Error("bbox must be an Array");if(4!==t.length&&6!==t.length)throw new Error("bbox must be an Array of 4 or 6 numbers");t.forEach((function(t){if(!f(t))throw new Error("bbox must only contain numbers")}))},e.validateId=function(t){if(!t)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof t))throw new Error("id must be a number or a string")}},7564:function(t,e,n){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(9391)),o=i(n(9627)),s=n(8967);function a(t,e,n,i,r,o){for(var a=[],l=0;l<6;l++){var u=t[0]+e*r[l],c=t[1]+n*o[l];a.push([u,c])}return a.push(a[0].slice()),s.polygon([a],i)}function l(t,e,n,i,r,o){for(var a=[],l=0;l<6;l++){var u=[];u.push(t),u.push([t[0]+e*r[l],t[1]+n*o[l]]),u.push([t[0]+e*r[(l+1)%6],t[1]+n*o[(l+1)%6]]),u.push(t),a.push(s.polygon([u],i))}return a}e.default=function(t,e,n){void 0===n&&(n={});var i=JSON.stringify(n.properties||{}),u=t[0],c=t[1],p=t[2],h=t[3],f=(c+h)/2,d=(u+p)/2,g=2*e/r.default([u,f],[p,f],n)*(p-u),_=2*e/r.default([d,c],[d,h],n)*(h-c),y=g/2,m=2*y,v=Math.sqrt(3)/2*_,b=p-u,x=h-c,w=3/4*m,k=v,E=(b-m)/(m-y/2),S=Math.floor(E),C=(S*w-y/2-b)/2-y/2+w/2,I=Math.floor((x-v)/v),N=(x-I*v)/2,M=I*v-x>v/2;M&&(N-=v/4);for(var P=[],O=[],L=0;L<6;L++){var T=2*Math.PI/6*L;P.push(Math.cos(T)),O.push(Math.sin(T))}for(var A=[],D=0;D<=S;D++)for(var R=0;R<=I;R++){var F=D%2==1;if(!(0===R&&F||0===R&&M)){var j=D*w+u-C,z=R*k+c+N;if(F&&(z-=v/2),!0===n.triangles)l([j,z],g/2,_/2,JSON.parse(i),P,O).forEach((function(t){n.mask?o.default(n.mask,t)&&A.push(t):A.push(t)}));else{var q=a([j,z],g/2,_/2,JSON.parse(i),P,O);n.mask?o.default(n.mask,q)&&A.push(q):A.push(q)}}}return s.featureCollection(A)}},9933:(t,e,n)=>{"use strict";var i=n(4383),r=n(7564),o=n(7497),s=n(9391),a=n(4408),l=n(4512),u=n(9269),c=n(3711),p=n(8967),h=n(8421),f=n(8506);function d(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var g=d(i),_=d(r),y=d(o),m=d(s),v=d(a),b=d(l),x=d(u),w=d(c);function k(t,e,n){if("object"!=typeof(n=n||{}))throw new Error("options is invalid");var i=n.gridType,r=n.property,o=n.weight;if(!t)throw new Error("points is required");if(f.collectionOf(t,"Point","input must contain Points"),!e)throw new Error("cellSize is required");if(void 0!==o&&"number"!=typeof o)throw new Error("weight must be a number");r=r||"elevation",i=i||"square",o=o||1;var s,a=g.default(t);switch(i){case"point":case"points":s=y.default(a,e,n);break;case"square":case"squares":s=b.default(a,e,n);break;case"hex":case"hexes":s=_.default(a,e,n);break;case"triangle":case"triangles":s=x.default(a,e,n);break;default:throw new Error("invalid gridType")}var l=[];return h.featureEach(s,(function(e){var s=0,a=0;h.featureEach(t,(function(t){var l,u="point"===i?e:v.default(e),c=m.default(u,t,n);if(void 0!==r&&(l=t.properties[r]),void 0===l&&(l=t.geometry.coordinates[2]),void 0===l)throw new Error("zValue is missing");0===c&&(s=l);var p=1/Math.pow(c,o);a+=p,s+=p*l}));var u=w.default(e);u.properties[r]=s/a,l.push(u)})),p.featureCollection(l)}t.exports=k,t.exports.default=k},9627:function(t,e,n){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=n(8967),o=n(8506),s=i(n(9004));e.default=function(t,e,n){void 0===n&&(n={});var i=o.getGeom(t),a=o.getGeom(e),l=s.default.intersection(i.coordinates,a.coordinates);return 0===l.length?null:1===l.length?r.polygon(l[0],n.properties):r.multiPolygon(l,n.properties)}},8506:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8967);e.getCoord=function(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if("Feature"===t.type&&null!==t.geometry&&"Point"===t.geometry.type)return t.geometry.coordinates;if("Point"===t.type)return t.coordinates}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")},e.getCoords=function(t){if(Array.isArray(t))return t;if("Feature"===t.type){if(null!==t.geometry)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw new Error("coords must be GeoJSON Feature, Geometry Object or an Array")},e.containsNumber=function t(e){if(e.length>1&&i.isNumber(e[0])&&i.isNumber(e[1]))return!0;if(Array.isArray(e[0])&&e[0].length)return t(e[0]);throw new Error("coordinates must only contain numbers")},e.geojsonType=function(t,e,n){if(!e||!n)throw new Error("type and name required");if(!t||t.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+t.type)},e.featureOf=function(t,e,n){if(!t)throw new Error("No feature passed");if(!n)throw new Error(".featureOf() requires a name");if(!t||"Feature"!==t.type||!t.geometry)throw new Error("Invalid input to "+n+", Feature with geometry required");if(!t.geometry||t.geometry.type!==e)throw new Error("Invalid input to "+n+": must be a "+e+", given "+t.geometry.type)},e.collectionOf=function(t,e,n){if(!t)throw new Error("No featureCollection passed");if(!n)throw new Error(".collectionOf() requires a name");if(!t||"FeatureCollection"!==t.type)throw new Error("Invalid input to "+n+", FeatureCollection required");for(var i=0,r=t.features;i{"use strict";var i=n(4383),r=n(7849),o=n(2446),s=n(3707),a=n(8506),l=n(8967),u=n(5228),c=n(8421);function p(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var h=p(i),f=p(r),d=p(o),g=p(s),_=p(u);var y={successCallback:null,verbose:!1,polygons:!1},m={};function v(t,e,n,i){i=i||{};for(var r=Object.keys(y),o=0;os?128:64,u|=ps?32:16,u|=hs?8:4;var d=+(u|=fs?2:1),g=0;if(17===u||18===u||33===u||34===u||38===u||68===u||72===u||98===u||102===u||132===u||136===u||137===u||152===u||153===u){var _=(c+p+h+f)/4;g=_>s?2:_0?(u=156,g=4):u=152:33===u?g>0?(u=139,g=4):u=137:72===u?g>0?(u=99,g=4):u=98:132===u&&(g>0?(u=39,g=4):u=38)}if(0!=u&&170!=u){var y,m,v,b,x,w,k,E;y=m=v=b=x=w=k=E=.5;var S=[];1===u?(v=1-pt(e,h,f),E=1-pt(e,c,f),S.push(ot[u])):169===u?(v=pt(s,f,h),E=pt(s,f,c),S.push(ot[u])):4===u?(w=1-pt(e,p,h),b=pt(e,f,h),S.push(it[u])):166===u?(w=pt(s,h,p),b=1-pt(s,h,f),S.push(it[u])):16===u?(x=pt(e,h,p),m=pt(e,c,p),S.push(nt[u])):154===u?(x=1-pt(s,p,h),m=1-pt(s,p,c),S.push(nt[u])):64===u?(k=pt(e,f,c),y=1-pt(e,p,c),S.push(at[u])):106===u?(k=1-pt(s,c,f),y=pt(s,c,p),S.push(at[u])):168===u?(b=pt(s,f,h),v=pt(e,f,h),E=pt(e,f,c),k=pt(s,f,c),S.push(rt[u]),S.push(ot[u])):2===u?(b=1-pt(e,h,f),v=1-pt(s,h,f),E=1-pt(s,c,f),k=1-pt(e,c,f),S.push(rt[u]),S.push(ot[u])):162===u?(x=pt(s,h,p),w=pt(e,h,p),b=1-pt(e,h,f),v=1-pt(s,h,f),S.push(rt[u]),S.push(ot[u])):8===u?(x=1-pt(e,p,h),w=1-pt(s,p,h),b=pt(s,f,h),v=pt(e,f,h),S.push(nt[u]),S.push(it[u])):138===u?(x=1-pt(e,p,h),w=1-pt(s,p,h),y=1-pt(s,p,c),m=1-pt(e,p,c),S.push(nt[u]),S.push(it[u])):32===u?(x=pt(s,h,p),w=pt(e,h,p),y=pt(e,c,p),m=pt(s,c,p),S.push(nt[u]),S.push(it[u])):42===u?(E=1-pt(s,c,f),k=1-pt(e,c,f),y=pt(e,c,p),m=pt(s,c,p),S.push(st[u]),S.push(at[u])):128===u&&(E=pt(e,f,c),k=pt(s,f,c),y=1-pt(s,p,c),m=1-pt(e,p,c),S.push(st[u]),S.push(at[u])),5===u?(w=1-pt(e,p,h),E=1-pt(e,c,f),S.push(it[u])):165===u?(w=pt(s,h,p),E=pt(s,f,c),S.push(it[u])):20===u?(b=pt(e,f,h),m=pt(e,c,p),S.push(rt[u])):150===u?(b=1-pt(s,h,f),m=1-pt(s,p,c),S.push(rt[u])):80===u?(x=pt(e,h,p),k=pt(e,f,c),S.push(nt[u])):90===u?(x=1-pt(s,p,h),k=1-pt(s,c,f),S.push(nt[u])):65===u?(v=1-pt(e,h,f),y=1-pt(e,p,c),S.push(ot[u])):105===u?(v=pt(s,f,h),y=pt(s,c,p),S.push(ot[u])):160===u?(x=pt(s,h,p),w=pt(e,h,p),E=pt(e,f,c),k=pt(s,f,c),S.push(nt[u]),S.push(it[u])):10===u?(x=1-pt(e,p,h),w=1-pt(s,p,h),E=1-pt(s,c,f),k=1-pt(e,c,f),S.push(nt[u]),S.push(it[u])):130===u?(b=1-pt(e,h,f),v=1-pt(s,h,f),y=1-pt(s,p,c),m=1-pt(e,p,c),S.push(rt[u]),S.push(ot[u])):40===u?(b=pt(s,f,h),v=pt(e,f,h),y=pt(e,c,p),m=pt(s,c,p),S.push(rt[u]),S.push(ot[u])):101===u?(w=pt(s,h,p),y=pt(s,c,p),S.push(it[u])):69===u?(w=1-pt(e,p,h),y=1-pt(e,p,c),S.push(it[u])):149===u?(E=pt(s,f,c),m=1-pt(s,p,c),S.push(st[u])):21===u?(E=1-pt(e,c,f),m=pt(e,c,p),S.push(st[u])):86===u?(b=1-pt(s,h,f),k=1-pt(s,c,f),S.push(rt[u])):84===u?(b=pt(e,f,h),k=pt(e,f,c),S.push(rt[u])):89===u?(x=1-pt(s,p,h),v=pt(s,f,h),S.push(ot[u])):81===u?(x=pt(e,h,p),v=1-pt(e,h,f),S.push(ot[u])):96===u?(x=pt(s,h,p),w=pt(e,h,p),k=pt(e,f,c),y=pt(s,c,p),S.push(nt[u]),S.push(it[u])):74===u?(x=1-pt(e,p,h),w=1-pt(s,p,h),k=1-pt(s,c,f),y=1-pt(e,p,c),S.push(nt[u]),S.push(it[u])):24===u?(x=1-pt(s,p,h),b=pt(s,f,h),v=pt(e,f,h),m=pt(e,c,p),S.push(nt[u]),S.push(ot[u])):146===u?(x=pt(e,h,p),b=1-pt(e,h,f),v=1-pt(s,h,f),m=1-pt(s,p,c),S.push(nt[u]),S.push(ot[u])):6===u?(w=1-pt(e,p,h),b=1-pt(s,h,f),E=1-pt(s,c,f),k=1-pt(e,c,f),S.push(it[u]),S.push(rt[u])):164===u?(w=pt(s,h,p),b=pt(e,f,h),E=pt(e,f,c),k=pt(s,f,c),S.push(it[u]),S.push(rt[u])):129===u?(v=1-pt(e,h,f),E=pt(s,f,c),y=1-pt(s,p,c),m=1-pt(e,p,c),S.push(ot[u]),S.push(st[u])):41===u?(v=pt(s,f,h),E=1-pt(e,c,f),y=pt(e,c,p),m=pt(s,c,p),S.push(ot[u]),S.push(st[u])):66===u?(b=1-pt(e,h,f),v=1-pt(s,h,f),k=1-pt(s,c,f),y=1-pt(e,p,c),S.push(rt[u]),S.push(ot[u])):104===u?(b=pt(s,f,h),v=pt(e,f,h),k=pt(e,f,c),y=pt(s,c,p),S.push(ot[u]),S.push(lt[u])):144===u?(x=pt(e,h,p),E=pt(e,f,c),k=pt(s,f,c),m=1-pt(s,p,c),S.push(nt[u]),S.push(at[u])):26===u?(x=1-pt(s,p,h),E=1-pt(s,c,f),k=1-pt(e,c,f),m=pt(e,c,p),S.push(nt[u]),S.push(at[u])):36===u?(w=pt(s,h,p),b=pt(e,f,h),y=pt(e,c,p),m=pt(s,c,p),S.push(it[u]),S.push(rt[u])):134===u?(w=1-pt(e,p,h),b=1-pt(s,h,f),y=1-pt(s,p,c),m=1-pt(e,p,c),S.push(it[u]),S.push(rt[u])):9===u?(x=1-pt(e,p,h),w=1-pt(s,p,h),v=pt(s,f,h),E=1-pt(e,c,f),S.push(nt[u]),S.push(it[u])):161===u?(x=pt(s,h,p),w=pt(e,h,p),v=1-pt(e,h,f),E=pt(s,f,c),S.push(nt[u]),S.push(it[u])):37===u?(w=pt(s,h,p),E=1-pt(e,c,f),y=pt(e,c,p),m=pt(s,c,p),S.push(it[u]),S.push(st[u])):133===u?(w=1-pt(e,p,h),E=pt(s,f,c),y=1-pt(s,p,c),m=1-pt(e,p,c),S.push(it[u]),S.push(st[u])):148===u?(b=pt(e,f,h),E=pt(e,f,c),k=pt(s,f,c),m=1-pt(s,p,c),S.push(rt[u]),S.push(at[u])):22===u?(b=1-pt(s,h,f),E=1-pt(s,c,f),k=1-pt(e,c,f),m=pt(e,c,p),S.push(rt[u]),S.push(at[u])):82===u?(x=pt(e,h,p),b=1-pt(e,h,f),v=1-pt(s,h,f),k=1-pt(s,c,f),S.push(nt[u]),S.push(ot[u])):88===u?(x=1-pt(s,p,h),b=pt(s,f,h),v=pt(e,f,h),k=pt(e,f,c),S.push(nt[u]),S.push(ot[u])):73===u?(x=1-pt(e,p,h),w=1-pt(s,p,h),v=pt(s,f,h),y=1-pt(e,p,c),S.push(nt[u]),S.push(it[u])):97===u?(x=pt(s,h,p),w=pt(e,h,p),v=1-pt(e,h,f),y=pt(s,c,p),S.push(nt[u]),S.push(it[u])):145===u?(x=pt(e,h,p),v=1-pt(e,h,f),E=pt(s,f,c),m=1-pt(s,p,c),S.push(nt[u]),S.push(st[u])):25===u?(x=1-pt(s,p,h),v=pt(s,f,h),E=1-pt(e,c,f),m=pt(e,c,p),S.push(nt[u]),S.push(st[u])):70===u?(w=1-pt(e,p,h),b=1-pt(s,h,f),k=1-pt(s,c,f),y=1-pt(e,p,c),S.push(it[u]),S.push(rt[u])):100===u?(w=pt(s,h,p),b=pt(e,f,h),k=pt(e,f,c),y=pt(s,c,p),S.push(it[u]),S.push(rt[u])):34===u?(0===g?(x=1-pt(e,p,h),w=1-pt(s,p,h),b=pt(s,f,h),v=pt(e,f,h),E=pt(e,f,c),k=pt(s,f,c),y=1-pt(s,p,c),m=1-pt(e,p,c)):(x=pt(s,h,p),w=pt(e,h,p),b=1-pt(e,h,f),v=1-pt(s,h,f),E=1-pt(s,c,f),k=1-pt(e,c,f),y=pt(e,c,p),m=pt(s,c,p)),S.push(nt[u]),S.push(it[u]),S.push(st[u]),S.push(at[u])):35===u?(4===g?(x=1-pt(e,p,h),w=1-pt(s,p,h),b=pt(s,f,h),v=pt(e,f,h),E=pt(e,f,c),k=pt(s,f,c),y=1-pt(s,p,c),m=1-pt(e,p,c)):(x=pt(s,h,p),w=pt(e,h,p),b=1-pt(e,h,f),v=1-pt(s,h,f),E=1-pt(s,c,f),k=1-pt(e,c,f),y=pt(e,c,p),m=pt(s,c,p)),S.push(nt[u]),S.push(it[u]),S.push(ot[u]),S.push(at[u])):136===u?(0===g?(x=pt(s,h,p),w=pt(e,h,p),b=1-pt(e,h,f),v=1-pt(s,h,f),E=1-pt(s,c,f),k=1-pt(e,c,f),y=pt(e,c,p),m=pt(s,c,p)):(x=1-pt(e,p,h),w=1-pt(s,p,h),b=pt(s,f,h),v=pt(e,f,h),E=pt(e,f,c),k=pt(s,f,c),y=1-pt(s,p,c),m=1-pt(e,p,c)),S.push(nt[u]),S.push(it[u]),S.push(st[u]),S.push(at[u])):153===u?(0===g?(x=pt(e,h,p),v=1-pt(e,h,f),E=1-pt(e,c,f),m=pt(e,c,p)):(x=1-pt(s,p,h),v=pt(s,f,h),E=pt(s,f,c),m=1-pt(s,p,c)),S.push(nt[u]),S.push(ot[u])):102===u?(0===g?(w=1-pt(e,p,h),b=pt(e,f,h),k=pt(e,f,c),y=1-pt(e,p,c)):(w=pt(s,h,p),b=1-pt(s,h,f),k=1-pt(s,c,f),y=pt(s,c,p)),S.push(it[u]),S.push(at[u])):155===u?(4===g?(x=pt(e,h,p),v=1-pt(e,h,f),E=1-pt(e,c,f),m=pt(e,c,p)):(x=1-pt(s,p,h),v=pt(s,f,h),E=pt(s,f,c),m=1-pt(s,p,c)),S.push(nt[u]),S.push(st[u])):103===u?(4===g?(w=1-pt(e,p,h),b=pt(e,f,h),k=pt(e,f,c),y=1-pt(e,p,c)):(w=pt(s,h,p),b=1-pt(s,h,f),k=1-pt(s,c,f),y=pt(s,c,p)),S.push(it[u]),S.push(rt[u])):152===u?(0===g?(x=pt(e,h,p),b=1-pt(e,h,f),v=1-pt(s,h,f),E=1-pt(s,c,f),k=1-pt(e,c,f),m=pt(e,c,p)):(x=1-pt(s,p,h),b=pt(s,f,h),v=pt(e,f,h),E=pt(e,f,c),k=pt(s,f,c),m=1-pt(s,p,c)),S.push(nt[u]),S.push(rt[u]),S.push(ot[u])):156===u?(4===g?(x=pt(e,h,p),b=1-pt(e,h,f),v=1-pt(s,h,f),E=1-pt(s,c,f),k=1-pt(e,c,f),m=pt(e,c,p)):(x=1-pt(s,p,h),b=pt(s,f,h),v=pt(e,f,h),E=pt(e,f,c),k=pt(s,f,c),m=1-pt(s,p,c)),S.push(nt[u]),S.push(ot[u]),S.push(at[u])):137===u?(0===g?(x=pt(s,h,p),w=pt(e,h,p),v=1-pt(e,h,f),E=1-pt(e,c,f),y=pt(e,c,p),m=pt(s,c,p)):(x=1-pt(e,p,h),w=1-pt(s,p,h),v=pt(s,f,h),E=pt(s,f,c),y=1-pt(s,p,c),m=1-pt(e,p,c)),S.push(nt[u]),S.push(it[u]),S.push(ot[u])):139===u?(4===g?(x=pt(s,h,p),w=pt(e,h,p),v=1-pt(e,h,f),E=1-pt(e,c,f),y=pt(e,c,p),m=pt(s,c,p)):(x=1-pt(e,p,h),w=1-pt(s,p,h),v=pt(s,f,h),E=pt(s,f,c),y=1-pt(s,p,c),m=1-pt(e,p,c)),S.push(nt[u]),S.push(it[u]),S.push(st[u])):98===u?(0===g?(x=1-pt(e,p,h),w=1-pt(s,p,h),b=pt(s,f,h),v=pt(e,f,h),k=pt(e,f,c),y=1-pt(e,p,c)):(x=pt(s,h,p),w=pt(e,h,p),b=1-pt(e,h,f),v=1-pt(s,h,f),k=1-pt(s,c,f),y=pt(s,c,p)),S.push(nt[u]),S.push(it[u]),S.push(at[u])):99===u?(4===g?(x=1-pt(e,p,h),w=1-pt(s,p,h),b=pt(s,f,h),v=pt(e,f,h),k=pt(e,f,c),y=1-pt(e,p,c)):(x=pt(s,h,p),w=pt(e,h,p),b=1-pt(e,h,f),v=1-pt(s,h,f),k=1-pt(s,c,f),y=pt(s,c,p)),S.push(nt[u]),S.push(it[u]),S.push(ot[u])):38===u?(0===g?(w=1-pt(e,p,h),b=pt(e,f,h),E=pt(e,f,c),k=pt(s,f,c),y=1-pt(s,p,c),m=1-pt(e,p,c)):(w=pt(s,h,p),b=1-pt(s,h,f),E=1-pt(s,c,f),k=1-pt(e,c,f),y=pt(e,c,p),m=pt(s,c,p)),S.push(it[u]),S.push(st[u]),S.push(at[u])):39===u?(4===g?(w=1-pt(e,p,h),b=pt(e,f,h),E=pt(e,f,c),k=pt(s,f,c),y=1-pt(s,p,c),m=1-pt(e,p,c)):(w=pt(s,h,p),b=1-pt(s,h,f),E=1-pt(s,c,f),k=1-pt(e,c,f),y=pt(e,c,p),m=pt(s,c,p)),S.push(it[u]),S.push(rt[u]),S.push(at[u])):85===u&&(x=1,w=0,b=1,v=0,E=0,k=1,y=0,m=1),(y<0||y>1||m<0||m>1||x<0||x>1||b<0||b>1||E<0||E>1||k<0||k>1)&&console.log("MarchingSquaresJS-isoBands: "+u+" "+d+" "+c+","+p+","+h+","+f+" "+g+" "+y+" "+m+" "+x+" "+w+" "+b+" "+v+" "+E+" "+k),o.cells[a][l]={cval:u,cval_real:d,flipped:g,topleft:y,topright:m,righttop:x,rightbottom:w,bottomright:b,bottomleft:v,leftbottom:E,lefttop:k,edges:S}}}}}return o}(t,e,n);return m.polygons?(m.verbose&&console.log("MarchingSquaresJS-isoBands: returning single polygons for each grid cell"),l=function(t){var e=[],n=0;return t.cells.forEach((function(t,i){t.forEach((function(t,r){if(void 0!==t){var o=ct[t.cval](t);"object"==typeof o&&ht(o)?"object"==typeof o[0]&&ht(o[0])?"object"==typeof o[0][0]&&ht(o[0][0])?o.forEach((function(t){t.forEach((function(t){t[0]+=r,t[1]+=i})),e[n++]=t})):(o.forEach((function(t){t[0]+=r,t[1]+=i})),e[n++]=o):console.log("MarchingSquaresJS-isoBands: bandcell polygon with malformed coordinates"):console.log("MarchingSquaresJS-isoBands: bandcell polygon with null coordinates")}}))})),e}(u)):(m.verbose&&console.log("MarchingSquaresJS-isoBands: returning polygon paths for entire data grid"),l=function(t){for(var e=[],n=t.rows,i=t.cols,r=[],o=0;o0){var a=dt(t.cells[o][s]),l=null,u=s,c=o;null!==a&&r.push([a.p[0]+u,a.p[1]+c]);do{if(null===(l=gt(t.cells[c][u],a.x,a.y,a.o)))break;if(r.push([l.p[0]+u,l.p[1]+c]),u+=l.x,a=l,(c+=l.y)<0||c>=n||u<0||u>=i||void 0===t.cells[c][u]){var p=ft(t,u-=l.x,c-=l.y,l.x,l.y,l.o);if(null===p)break;p.path.forEach((function(t){r.push(t)})),u=p.i,c=p.j,a=p}}while(void 0!==t.cells[c][u]&&t.cells[c][u].edges.length>0);e.push(r),r=[],t.cells[o][s].edges.length>0&&s--}return e}(u)),"function"==typeof m.successCallback&&m.successCallback(l),l}var b=64,x=16,w=4,k=1,E=[],S=[],C=[],I=[],N=[],M=[],P=[],O=[],L=[],T=[],A=[],D=[],R=[],F=[],j=[],z=[],q=[],B=[],G=[],U=[],X=[],Y=[],V=[],$=[];P[85]=T[85]=-1,O[85]=A[85]=0,L[85]=D[85]=1,G[85]=Y[85]=1,U[85]=V[85]=0,X[85]=$[85]=1,E[85]=I[85]=0,S[85]=N[85]=-1,C[85]=j[85]=0,z[85]=R[85]=0,q[85]=F[85]=1,M[85]=B[85]=1,Y[1]=Y[169]=0,V[1]=V[169]=-1,$[1]=$[169]=0,R[1]=R[169]=-1,F[1]=F[169]=0,j[1]=j[169]=0,T[4]=T[166]=0,A[4]=A[166]=-1,D[4]=D[166]=1,z[4]=z[166]=1,q[4]=q[166]=0,B[4]=B[166]=0,P[16]=P[154]=0,O[16]=O[154]=1,L[16]=L[154]=1,I[16]=I[154]=1,N[16]=N[154]=0,M[16]=M[154]=1,G[64]=G[106]=0,U[64]=U[106]=1,X[64]=X[106]=0,E[64]=E[106]=-1,S[64]=S[106]=0,C[64]=C[106]=1,G[2]=G[168]=0,U[2]=U[168]=-1,X[2]=X[168]=1,Y[2]=Y[168]=0,V[2]=V[168]=-1,$[2]=$[168]=0,R[2]=R[168]=-1,F[2]=F[168]=0,j[2]=j[168]=0,z[2]=z[168]=-1,q[2]=q[168]=0,B[2]=B[168]=1,P[8]=P[162]=0,O[8]=O[162]=-1,L[8]=L[162]=0,T[8]=T[162]=0,A[8]=A[162]=-1,D[8]=D[162]=1,R[8]=R[162]=1,F[8]=F[162]=0,j[8]=j[162]=1,z[8]=z[162]=1,q[8]=q[162]=0,B[8]=B[162]=0,P[32]=P[138]=0,O[32]=O[138]=1,L[32]=L[138]=1,T[32]=T[138]=0,A[32]=A[138]=1,D[32]=D[138]=0,E[32]=E[138]=1,S[32]=S[138]=0,C[32]=C[138]=0,I[32]=I[138]=1,N[32]=N[138]=0,M[32]=M[138]=1,Y[128]=Y[42]=0,V[128]=V[42]=1,$[128]=$[42]=1,G[128]=G[42]=0,U[128]=U[42]=1,X[128]=X[42]=0,E[128]=E[42]=-1,S[128]=S[42]=0,C[128]=C[42]=1,I[128]=I[42]=-1,N[128]=N[42]=0,M[128]=M[42]=0,T[5]=T[165]=-1,A[5]=A[165]=0,D[5]=D[165]=0,Y[5]=Y[165]=1,V[5]=V[165]=0,$[5]=$[165]=0,z[20]=z[150]=0,q[20]=q[150]=1,B[20]=B[150]=1,I[20]=I[150]=0,N[20]=N[150]=-1,M[20]=M[150]=1,P[80]=P[90]=-1,O[80]=O[90]=0,L[80]=L[90]=1,G[80]=G[90]=1,U[80]=U[90]=0,X[80]=X[90]=1,R[65]=R[105]=0,F[65]=F[105]=1,j[65]=j[105]=0,E[65]=E[105]=0,S[65]=S[105]=-1,C[65]=C[105]=0,P[160]=P[10]=-1,O[160]=O[10]=0,L[160]=L[10]=1,T[160]=T[10]=-1,A[160]=A[10]=0,D[160]=D[10]=0,Y[160]=Y[10]=1,V[160]=V[10]=0,$[160]=$[10]=0,G[160]=G[10]=1,U[160]=U[10]=0,X[160]=X[10]=1,z[130]=z[40]=0,q[130]=q[40]=1,B[130]=B[40]=1,R[130]=R[40]=0,F[130]=F[40]=1,j[130]=j[40]=0,E[130]=E[40]=0,S[130]=S[40]=-1,C[130]=C[40]=0,I[130]=I[40]=0,N[130]=N[40]=-1,M[130]=M[40]=1,T[37]=T[133]=0,A[37]=A[133]=1,D[37]=D[133]=1,Y[37]=Y[133]=0,V[37]=V[133]=1,$[37]=$[133]=0,E[37]=E[133]=-1,S[37]=S[133]=0,C[37]=C[133]=0,I[37]=I[133]=1,N[37]=N[133]=0,M[37]=M[133]=0,z[148]=z[22]=-1,q[148]=q[22]=0,B[148]=B[22]=0,Y[148]=Y[22]=0,V[148]=V[22]=-1,$[148]=$[22]=1,G[148]=G[22]=0,U[148]=U[22]=1,X[148]=X[22]=1,I[148]=I[22]=-1,N[148]=N[22]=0,M[148]=M[22]=1,P[82]=P[88]=0,O[82]=O[88]=-1,L[82]=L[88]=1,z[82]=z[88]=1,q[82]=q[88]=0,B[82]=B[88]=1,R[82]=R[88]=-1,F[82]=F[88]=0,j[82]=j[88]=1,G[82]=G[88]=0,U[82]=U[88]=-1,X[82]=X[88]=0,P[73]=P[97]=0,O[73]=O[97]=1,L[73]=L[97]=0,T[73]=T[97]=0,A[73]=A[97]=-1,D[73]=D[97]=0,R[73]=R[97]=1,F[73]=F[97]=0,j[73]=j[97]=0,E[73]=E[97]=1,S[73]=S[97]=0,C[73]=C[97]=1,P[145]=P[25]=0,O[145]=O[25]=-1,L[145]=L[25]=0,R[145]=R[25]=1,F[145]=F[25]=0,j[145]=j[25]=1,Y[145]=Y[25]=0,V[145]=V[25]=1,$[145]=$[25]=1,I[145]=I[25]=-1,N[145]=N[25]=0,M[145]=M[25]=0,T[70]=T[100]=0,A[70]=A[100]=1,D[70]=D[100]=0,z[70]=z[100]=-1,q[70]=q[100]=0,B[70]=B[100]=1,G[70]=G[100]=0,U[70]=U[100]=-1,X[70]=X[100]=1,E[70]=E[100]=1,S[70]=S[100]=0,C[70]=C[100]=0,T[101]=T[69]=0,A[101]=A[69]=1,D[101]=D[69]=0,E[101]=E[69]=1,S[101]=S[69]=0,C[101]=C[69]=0,Y[149]=Y[21]=0,V[149]=V[21]=1,$[149]=$[21]=1,I[149]=I[21]=-1,N[149]=N[21]=0,M[149]=M[21]=0,z[86]=z[84]=-1,q[86]=q[84]=0,B[86]=B[84]=1,G[86]=G[84]=0,U[86]=U[84]=-1,X[86]=X[84]=1,P[89]=P[81]=0,O[89]=O[81]=-1,L[89]=L[81]=0,R[89]=R[81]=1,F[89]=F[81]=0,j[89]=j[81]=1,P[96]=P[74]=0,O[96]=O[74]=1,L[96]=L[74]=0,T[96]=T[74]=-1,A[96]=A[74]=0,D[96]=D[74]=1,G[96]=G[74]=1,U[96]=U[74]=0,X[96]=X[74]=0,E[96]=E[74]=1,S[96]=S[74]=0,C[96]=C[74]=1,P[24]=P[146]=0,O[24]=O[146]=-1,L[24]=L[146]=1,z[24]=z[146]=1,q[24]=q[146]=0,B[24]=B[146]=1,R[24]=R[146]=0,F[24]=F[146]=1,j[24]=j[146]=1,I[24]=I[146]=0,N[24]=N[146]=-1,M[24]=M[146]=0,T[6]=T[164]=-1,A[6]=A[164]=0,D[6]=D[164]=1,z[6]=z[164]=-1,q[6]=q[164]=0,B[6]=B[164]=0,Y[6]=Y[164]=0,V[6]=V[164]=-1,$[6]=$[164]=1,G[6]=G[164]=1,U[6]=U[164]=0,X[6]=X[164]=0,R[129]=R[41]=0,F[129]=F[41]=1,j[129]=j[41]=1,Y[129]=Y[41]=0,V[129]=V[41]=1,$[129]=$[41]=0,E[129]=E[41]=-1,S[129]=S[41]=0,C[129]=C[41]=0,I[129]=I[41]=0,N[129]=N[41]=-1,M[129]=M[41]=0,z[66]=z[104]=0,q[66]=q[104]=1,B[66]=B[104]=0,R[66]=R[104]=-1,F[66]=F[104]=0,j[66]=j[104]=1,G[66]=G[104]=0,U[66]=U[104]=-1,X[66]=X[104]=0,E[66]=E[104]=0,S[66]=S[104]=-1,C[66]=C[104]=1,P[144]=P[26]=-1,O[144]=O[26]=0,L[144]=L[26]=0,Y[144]=Y[26]=1,V[144]=V[26]=0,$[144]=$[26]=1,G[144]=G[26]=0,U[144]=U[26]=1,X[144]=X[26]=1,I[144]=I[26]=-1,N[144]=N[26]=0,M[144]=M[26]=1,T[36]=T[134]=0,A[36]=A[134]=1,D[36]=D[134]=1,z[36]=z[134]=0,q[36]=q[134]=1,B[36]=B[134]=0,E[36]=E[134]=0,S[36]=S[134]=-1,C[36]=C[134]=1,I[36]=I[134]=1,N[36]=N[134]=0,M[36]=M[134]=0,P[9]=P[161]=-1,O[9]=O[161]=0,L[9]=L[161]=0,T[9]=T[161]=0,A[9]=A[161]=-1,D[9]=D[161]=0,R[9]=R[161]=1,F[9]=F[161]=0,j[9]=j[161]=0,Y[9]=Y[161]=1,V[9]=V[161]=0,$[9]=$[161]=1,P[136]=0,O[136]=1,L[136]=1,T[136]=0,A[136]=1,D[136]=0,z[136]=-1,q[136]=0,B[136]=1,R[136]=-1,F[136]=0,j[136]=0,Y[136]=0,V[136]=-1,$[136]=0,G[136]=0,U[136]=-1,X[136]=1,E[136]=1,S[136]=0,C[136]=0,I[136]=1,N[136]=0,M[136]=1,P[34]=0,O[34]=-1,L[34]=0,T[34]=0,A[34]=-1,D[34]=1,z[34]=1,q[34]=0,B[34]=0,R[34]=1,F[34]=0,j[34]=1,Y[34]=0,V[34]=1,$[34]=1,G[34]=0,U[34]=1,X[34]=0,E[34]=-1,S[34]=0,C[34]=1,I[34]=-1,N[34]=0,M[34]=0,P[35]=0,O[35]=1,L[35]=1,T[35]=0,A[35]=-1,D[35]=1,z[35]=1,q[35]=0,B[35]=0,R[35]=-1,F[35]=0,j[35]=0,Y[35]=0,V[35]=-1,$[35]=0,G[35]=0,U[35]=1,X[35]=0,E[35]=-1,S[35]=0,C[35]=1,I[35]=1,N[35]=0,M[35]=1,P[153]=0,O[153]=1,L[153]=1,R[153]=-1,F[153]=0,j[153]=0,Y[153]=0,V[153]=-1,$[153]=0,I[153]=1,N[153]=0,M[153]=1,T[102]=0,A[102]=-1,D[102]=1,z[102]=1,q[102]=0,B[102]=0,G[102]=0,U[102]=1,X[102]=0,E[102]=-1,S[102]=0,C[102]=1,P[155]=0,O[155]=-1,L[155]=0,R[155]=1,F[155]=0,j[155]=1,Y[155]=0,V[155]=1,$[155]=1,I[155]=-1,N[155]=0,M[155]=0,T[103]=0,A[103]=1,D[103]=0,z[103]=-1,q[103]=0,B[103]=1,G[103]=0,U[103]=-1,X[103]=1,E[103]=1,S[103]=0,C[103]=0,P[152]=0,O[152]=1,L[152]=1,z[152]=-1,q[152]=0,B[152]=1,R[152]=-1,F[152]=0,j[152]=0,Y[152]=0,V[152]=-1,$[152]=0,G[152]=0,U[152]=-1,X[152]=1,I[152]=1,N[152]=0,M[152]=1,P[156]=0,O[156]=-1,L[156]=1,z[156]=1,q[156]=0,B[156]=1,R[156]=-1,F[156]=0,j[156]=0,Y[156]=0,V[156]=-1,$[156]=0,G[156]=0,U[156]=1,X[156]=1,I[156]=-1,N[156]=0,M[156]=1,P[137]=0,O[137]=1,L[137]=1,T[137]=0,A[137]=1,D[137]=0,R[137]=-1,F[137]=0,j[137]=0,Y[137]=0,V[137]=-1,$[137]=0,E[137]=1,S[137]=0,C[137]=0,I[137]=1,N[137]=0,M[137]=1,P[139]=0,O[139]=1,L[139]=1,T[139]=0,A[139]=-1,D[139]=0,R[139]=1,F[139]=0,j[139]=0,Y[139]=0,V[139]=1,$[139]=0,E[139]=-1,S[139]=0,C[139]=0,I[139]=1,N[139]=0,M[139]=1,P[98]=0,O[98]=-1,L[98]=0,T[98]=0,A[98]=-1,D[98]=1,z[98]=1,q[98]=0,B[98]=0,R[98]=1,F[98]=0,j[98]=1,G[98]=0,U[98]=1,X[98]=0,E[98]=-1,S[98]=0,C[98]=1,P[99]=0,O[99]=1,L[99]=0,T[99]=0,A[99]=-1,D[99]=1,z[99]=1,q[99]=0,B[99]=0,R[99]=-1,F[99]=0,j[99]=1,G[99]=0,U[99]=-1,X[99]=0,E[99]=1,S[99]=0,C[99]=1,T[38]=0,A[38]=-1,D[38]=1,z[38]=1,q[38]=0,B[38]=0,Y[38]=0,V[38]=1,$[38]=1,G[38]=0,U[38]=1,X[38]=0,E[38]=-1,S[38]=0,C[38]=1,I[38]=-1,N[38]=0,M[38]=0,T[39]=0,A[39]=1,D[39]=1,z[39]=-1,q[39]=0,B[39]=0,Y[39]=0,V[39]=-1,$[39]=1,G[39]=0,U[39]=1,X[39]=0,E[39]=-1,S[39]=0,C[39]=1,I[39]=1,N[39]=0,M[39]=0;var H=function(t){return[[t.bottomleft,0],[0,0],[0,t.leftbottom]]},W=function(t){return[[1,t.rightbottom],[1,0],[t.bottomright,0]]},J=function(t){return[[t.topright,1],[1,1],[1,t.righttop]]},K=function(t){return[[0,t.lefttop],[0,1],[t.topleft,1]]},Z=function(t){return[[t.bottomright,0],[t.bottomleft,0],[0,t.leftbottom],[0,t.lefttop]]},Q=function(t){return[[t.bottomright,0],[t.bottomleft,0],[1,t.righttop],[1,t.rightbottom]]},tt=function(t){return[[1,t.righttop],[1,t.rightbottom],[t.topleft,1],[t.topright,1]]},et=function(t){return[[0,t.leftbottom],[0,t.lefttop],[t.topleft,1],[t.topright,1]]},nt=[],it=[],rt=[],ot=[],st=[],at=[],lt=[],ut=[];ot[1]=st[1]=18,ot[169]=st[169]=18,rt[4]=it[4]=12,rt[166]=it[166]=12,nt[16]=ut[16]=4,nt[154]=ut[154]=4,at[64]=lt[64]=22,at[106]=lt[106]=22,rt[2]=at[2]=17,ot[2]=st[2]=18,rt[168]=at[168]=17,ot[168]=st[168]=18,nt[8]=ot[8]=9,it[8]=rt[8]=12,nt[162]=ot[162]=9,it[162]=rt[162]=12,nt[32]=ut[32]=4,it[32]=lt[32]=1,nt[138]=ut[138]=4,it[138]=lt[138]=1,st[128]=ut[128]=21,at[128]=lt[128]=22,st[42]=ut[42]=21,at[42]=lt[42]=22,it[5]=st[5]=14,it[165]=st[165]=14,rt[20]=ut[20]=6,rt[150]=ut[150]=6,nt[80]=at[80]=11,nt[90]=at[90]=11,ot[65]=lt[65]=3,ot[105]=lt[105]=3,nt[160]=at[160]=11,it[160]=st[160]=14,nt[10]=at[10]=11,it[10]=st[10]=14,rt[130]=ut[130]=6,ot[130]=lt[130]=3,rt[40]=ut[40]=6,ot[40]=lt[40]=3,it[101]=lt[101]=1,it[69]=lt[69]=1,st[149]=ut[149]=21,st[21]=ut[21]=21,rt[86]=at[86]=17,rt[84]=at[84]=17,nt[89]=ot[89]=9,nt[81]=ot[81]=9,nt[96]=lt[96]=0,it[96]=at[96]=15,nt[74]=lt[74]=0,it[74]=at[74]=15,nt[24]=rt[24]=8,ot[24]=ut[24]=7,nt[146]=rt[146]=8,ot[146]=ut[146]=7,it[6]=at[6]=15,rt[6]=st[6]=16,it[164]=at[164]=15,rt[164]=st[164]=16,ot[129]=ut[129]=7,st[129]=lt[129]=20,ot[41]=ut[41]=7,st[41]=lt[41]=20,rt[66]=lt[66]=2,ot[66]=at[66]=19,rt[104]=lt[104]=2,ot[104]=at[104]=19,nt[144]=st[144]=10,at[144]=ut[144]=23,nt[26]=st[26]=10,at[26]=ut[26]=23,it[36]=ut[36]=5,rt[36]=lt[36]=2,it[134]=ut[134]=5,rt[134]=lt[134]=2,nt[9]=st[9]=10,it[9]=ot[9]=13,nt[161]=st[161]=10,it[161]=ot[161]=13,it[37]=ut[37]=5,st[37]=lt[37]=20,it[133]=ut[133]=5,st[133]=lt[133]=20,rt[148]=st[148]=16,at[148]=ut[148]=23,rt[22]=st[22]=16,at[22]=ut[22]=23,nt[82]=rt[82]=8,ot[82]=at[82]=19,nt[88]=rt[88]=8,ot[88]=at[88]=19,nt[73]=lt[73]=0,it[73]=ot[73]=13,nt[97]=lt[97]=0,it[97]=ot[97]=13,nt[145]=ot[145]=9,st[145]=ut[145]=21,nt[25]=ot[25]=9,st[25]=ut[25]=21,it[70]=lt[70]=1,rt[70]=at[70]=17,it[100]=lt[100]=1,rt[100]=at[100]=17,nt[34]=ot[34]=9,it[34]=rt[34]=12,st[34]=ut[34]=21,at[34]=lt[34]=22,nt[136]=ut[136]=4,it[136]=lt[136]=1,rt[136]=at[136]=17,ot[136]=st[136]=18,nt[35]=ut[35]=4,it[35]=rt[35]=12,ot[35]=st[35]=18,at[35]=lt[35]=22,nt[153]=ut[153]=4,ot[153]=st[153]=18,it[102]=rt[102]=12,at[102]=lt[102]=22,nt[155]=ot[155]=9,st[155]=ut[155]=23,it[103]=lt[103]=1,rt[103]=at[103]=17,nt[152]=ut[152]=4,rt[152]=at[152]=17,ot[152]=st[152]=18,nt[156]=rt[156]=8,ot[156]=st[156]=18,at[156]=ut[156]=23,nt[137]=ut[137]=4,it[137]=lt[137]=1,ot[137]=st[137]=18,nt[139]=ut[139]=4,it[139]=ot[139]=13,st[139]=lt[139]=20,nt[98]=ot[98]=9,it[98]=rt[98]=12,at[98]=lt[98]=22,nt[99]=lt[99]=0,it[99]=rt[99]=12,ot[99]=at[99]=19,it[38]=rt[38]=12,st[38]=ut[38]=21,at[38]=lt[38]=22,it[39]=ut[39]=5,rt[39]=st[39]=16,at[39]=lt[39]=22;var ct=[];function pt(t,e,n){return(t-e)/(n-e)}function ht(t){return t.constructor.toString().indexOf("Array")>-1}function ft(t,e,n,i,r,o){for(var s=t.cells[n][e],a=s.cval_real,l=e+i,u=n+r,c=[],p=!1;!p;){if(void 0===t.cells[u]||void 0===t.cells[u][l])if(u-=r,l-=i,a=(s=t.cells[u][l]).cval_real,-1===r)if(0===o)if(a&k)c.push([l,u]),i=-1,r=0,o=0;else{if(!(a&w)){c.push([l+s.bottomright,u]),i=0,r=1,o=1,p=!0;break}c.push([l+1,u]),i=1,r=0,o=0}else{if(!(a&k)){if(a&w){c.push([l+s.bottomright,u]),i=0,r=1,o=1,p=!0;break}c.push([l+s.bottomleft,u]),i=0,r=1,o=0,p=!0;break}c.push([l,u]),i=-1,r=0,o=0}else if(1===r)if(0===o){if(!(a&x)){if(a&b){c.push([l+s.topleft,u+1]),i=0,r=-1,o=0,p=!0;break}c.push([l+s.topright,u+1]),i=0,r=-1,o=1,p=!0;break}c.push([l+1,u+1]),i=1,r=0,o=1}else c.push([l+1,u+1]),i=1,r=0,o=1;else if(-1===i)if(0===o){if(!(a&b)){if(a&k){c.push([l,u+s.leftbottom]),i=1,r=0,o=0,p=!0;break}c.push([l,u+s.lefttop]),i=1,r=0,o=1,p=!0;break}c.push([l,u+1]),i=0,r=1,o=0}else{if(!(a&b)){console.log("MarchingSquaresJS-isoBands: wtf");break}c.push([l,u+1]),i=0,r=1,o=0}else{if(1!==i){console.log("MarchingSquaresJS-isoBands: we came from nowhere!");break}if(0===o){if(!(a&w)){c.push([l+1,u+s.rightbottom]),i=-1,r=0,o=0,p=!0;break}c.push([l+1,u]),i=0,r=-1,o=1}else{if(!(a&w)){if(a&x){c.push([l+1,u+s.righttop]),i=-1,r=0,o=1;break}c.push([l+1,u+s.rightbottom]),i=-1,r=0,o=0,p=!0;break}c.push([l+1,u]),i=0,r=-1,o=1}}else if(a=(s=t.cells[u][l]).cval_real,-1===i)if(0===o)if(void 0!==t.cells[u-1]&&void 0!==t.cells[u-1][l])i=0,r=-1,o=1;else{if(!(a&k)){c.push([l+s.bottomright,u]),i=0,r=1,o=1,p=!0;break}c.push([l,u])}else{if(!(a&b)){console.log("MarchingSquaresJS-isoBands: found entry from top at "+l+","+u);break}console.log("MarchingSquaresJS-isoBands: proceeding in x-direction!")}else if(1===i){if(0===o){console.log("MarchingSquaresJS-isoBands: wtf");break}if(void 0!==t.cells[u+1]&&void 0!==t.cells[u+1][l])i=0,r=1,o=0;else{if(!(a&x)){c.push([l+s.topleft,u+1]),i=0,r=-1,o=0,p=!0;break}c.push([l+1,u+1]),i=1,r=0,o=1}}else if(-1===r){if(1!==o){console.log("MarchingSquaresJS-isoBands: wtf");break}if(void 0!==t.cells[u][l+1])i=1,r=0,o=1;else{if(!(a&w)){c.push([l+1,u+s.righttop]),i=-1,r=0,o=1,p=!0;break}c.push([l+1,u]),i=0,r=-1,o=1}}else{if(1!==r){console.log("MarchingSquaresJS-isoBands: where did we came from???");break}if(0!==o){console.log("MarchingSquaresJS-isoBands: wtf");break}if(void 0!==t.cells[u][l-1])i=-1,r=0,o=0;else{if(!(a&b)){c.push([l,u+s.leftbottom]),i=1,r=0,o=0,p=!0;break}c.push([l,u+1]),i=0,r=1,o=0}}if(u+=r,(l+=i)===e&&u===n)break}return{path:c,i:l,j:u,x:i,y:r,o}}function dt(t){if(t.edges.length>0){var e=t.edges[t.edges.length-1],n=t.cval_real;switch(e){case 0:return n&x?{p:[1,t.righttop],x:-1,y:0,o:1}:{p:[t.topleft,1],x:0,y:-1,o:0};case 1:return n&w?{p:[t.topleft,1],x:0,y:-1,o:0}:{p:[1,t.rightbottom],x:-1,y:0,o:0};case 2:return n&w?{p:[t.bottomright,0],x:0,y:1,o:1}:{p:[t.topleft,1],x:0,y:-1,o:0};case 3:return n&k?{p:[t.topleft,1],x:0,y:-1,o:0}:{p:[t.bottomleft,0],x:0,y:1,o:0};case 4:return n&x?{p:[1,t.righttop],x:-1,y:0,o:1}:{p:[t.topright,1],x:0,y:-1,o:1};case 5:return n&w?{p:[t.topright,1],x:0,y:-1,o:1}:{p:[1,t.rightbottom],x:-1,y:0,o:0};case 6:return n&w?{p:[t.bottomright,0],x:0,y:1,o:1}:{p:[t.topright,1],x:0,y:-1,o:1};case 7:return n&k?{p:[t.topright,1],x:0,y:-1,o:1}:{p:[t.bottomleft,0],x:0,y:1,o:0};case 8:return n&w?{p:[t.bottomright,0],x:0,y:1,o:1}:{p:[1,t.righttop],x:-1,y:0,o:1};case 9:return n&k?{p:[1,t.righttop],x:-1,y:0,o:1}:{p:[t.bottomleft,0],x:0,y:1,o:0};case 10:return n&k?{p:[0,t.leftbottom],x:1,y:0,o:0}:{p:[1,t.righttop],x:-1,y:0,o:1};case 11:return n&b?{p:[1,t.righttop],x:-1,y:0,o:1}:{p:[0,t.lefttop],x:1,y:0,o:1};case 12:return n&w?{p:[t.bottomright,0],x:0,y:1,o:1}:{p:[1,t.rightbottom],x:-1,y:0,o:0};case 13:return n&k?{p:[1,t.rightbottom],x:-1,y:0,o:0}:{p:[t.bottomleft,0],x:0,y:1,o:0};case 14:return n&k?{p:[0,t.leftbottom],x:1,y:0,o:0}:{p:[1,t.rightbottom],x:-1,y:0,o:0};case 15:return n&b?{p:[1,t.rightbottom],x:-1,y:0,o:0}:{p:[0,t.lefttop],x:1,y:0,o:1};case 16:return n&w?{p:[t.bottomright,0],x:0,y:1,o:1}:{p:[0,t.leftbottom],x:1,y:0,o:0};case 17:return n&b?{p:[t.bottomright,0],x:0,y:1,o:1}:{p:[0,t.lefttop],x:1,y:0,o:1};case 18:return n&k?{p:[0,t.leftbottom],x:1,y:0,o:0}:{p:[t.bottomleft,0],x:0,y:1,o:0};case 19:return n&b?{p:[t.bottomleft,0],x:0,y:1,o:0}:{p:[0,t.lefttop],x:1,y:0,o:1};case 20:return n&b?{p:[t.topleft,1],x:0,y:-1,o:0}:{p:[0,t.leftbottom],x:1,y:0,o:0};case 21:return n&x?{p:[0,t.leftbottom],x:1,y:0,o:0}:{p:[t.topright,1],x:0,y:-1,o:1};case 22:return n&b?{p:[t.topleft,1],x:0,y:-1,o:0}:{p:[0,t.lefttop],x:1,y:0,o:1};case 23:return n&x?{p:[0,t.lefttop],x:1,y:0,o:1}:{p:[t.topright,1],x:0,y:-1,o:1};default:console.log("MarchingSquaresJS-isoBands: edge index out of range!"),console.log(t)}}return null}function gt(t,e,n,i){var r,o,s,a,l,u=t.cval;switch(e){case-1:0===i?(r=it[u],s=T[u],a=A[u],l=D[u]):(r=nt[u],s=P[u],a=O[u],l=L[u]);break;case 1:0===i?(r=st[u],s=Y[u],a=V[u],l=$[u]):(r=at[u],s=G[u],a=U[u],l=X[u]);break;default:switch(n){case-1:0===i?(r=lt[u],s=E[u],a=S[u],l=C[u]):(r=ut[u],s=I[u],a=N[u],l=M[u]);break;case 1:0===i?(r=ot[u],s=R[u],a=F[u],l=j[u]):(r=rt[u],s=z[u],a=q[u],l=B[u])}}if(o=t.edges.indexOf(r),void 0===t.edges[o])return null;switch(function(t,e){delete t.edges[e];for(var n=e+1;n{"use strict";var i=n(4383),r=n(8421),o=n(8506),s=n(8967),a=n(5228);function l(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var u=l(i),c=l(a),p={successCallback:null,verbose:!1},h={};function f(t,e,n){n=n||{};for(var i=Object.keys(p),r=0;r=e?8:0,a|=u>=e?4:0,a|=c>=e?2:0;var h,f,g,_,y=!1;if(5==(a|=p>=e?1:0)||10===a){var m=(l+u+c+p)/4;5===a&&m=0&&g>=0&&g=0;c--)if(Math.abs(l[c][0][0]-o)<=1e-7&&Math.abs(l[c][0][1]-s)<=1e-7){for(var p=i.path.length-2;p>=0;--p)l[c].unshift(i.path[p]);r=!0;break}r||(l[u++]=i.path)}var h}))})),l);return"function"==typeof h.successCallback&&h.successCallback(c),c}function d(t,e,n){return(t-e)/(n-e)}function g(t){return 0===t.cval||15===t.cval}function _(t){g(t)||5===t.cval||10===t.cval||(t.cval=15)}function y(t,e){return"top"===e?[t.top,1]:"bottom"===e?[t.bottom,0]:"right"===e?[1,t.right]:"left"===e?[0,t.left]:void 0}function m(t,e,n){if(n=n||{},!s.isObject(n))throw new Error("options is invalid");var i=n.zProperty||"elevation",a=n.commonProperties||{},l=n.breaksProperties||[];if(o.collectionOf(t,"Point","Input must contain Points"),!e)throw new Error("breaks is required");if(!Array.isArray(e))throw new Error("breaks must be an Array");if(!s.isObject(a))throw new Error("commonProperties must be an Object");if(!Array.isArray(l))throw new Error("breaksProperties must be an Array");var p=function(t,e){if(e=e||{},!s.isObject(e))throw new Error("options is invalid");var n=e.zProperty||"elevation",i=e.flip,a=e.flags;o.collectionOf(t,"Point","input must contain Points");for(var l=function(t,e){var n={};return r.featureEach(t,(function(t){var e=o.getCoords(t)[1];n[e]||(n[e]=[]),n[e].push(t)})),Object.keys(n).map((function(t){return n[t].sort((function(t,e){return o.getCoords(t)[0]-o.getCoords(e)[0]}))})).sort((function(t,n){return e?o.getCoords(t[0])[1]-o.getCoords(n[0])[1]:o.getCoords(n[0])[1]-o.getCoords(t[0])[1]}))}(t,i),u=[],c=0;c{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8967);e.default=function(t){var e,n,r={type:"FeatureCollection",features:[]};if("LineString"===(n="Feature"===t.type?t.geometry:t).type)e=[n.coordinates];else if("MultiLineString"===n.type)e=n.coordinates;else if("MultiPolygon"===n.type)e=[].concat.apply([],n.coordinates);else{if("Polygon"!==n.type)throw new Error("Input must be a LineString, MultiLineString, Polygon, or MultiPolygon Feature or Geometry");e=n.coordinates}return e.forEach((function(t){e.forEach((function(e){for(var n=0;n=0&&_<=1&&(v.onLine1=!0),y>=0&&y<=1&&(v.onLine2=!0),!(!v.onLine1||!v.onLine2)&&[v.x,v.y]));s&&r.features.push(i.point([s[0],s[1]]))}var a,l,u,c,p,h,f,d,g,_,y,m,v}))})),r}},8840:function(t,e,n){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(9391)),o=n(8421);e.default=function(t,e){return void 0===e&&(e={}),o.segmentReduce(t,(function(t,n){var i=n.geometry.coordinates;return t+r.default(i[0],i[1],e)}),0)}},375:function(t,e,n){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(5764)),o=i(n(4202)),s=n(8967);function a(t){var e=t%360;return e<0&&(e+=360),e}e.default=function(t,e,n,i,l){void 0===l&&(l={});var u=l.steps||64,c=a(n),p=a(i),h=Array.isArray(t)||"Feature"!==t.type?{}:t.properties;if(c===p)return s.lineString(r.default(t,e,l).geometry.coordinates[0],h);for(var f=c,d=cd&&_.push(o.default(t,e,d,l).geometry.coordinates),s.lineString(_,h)}},2222:(t,e,n)=>{"use strict";var i=n(8840),r=n(4957),o=n(8421),s=n(8967);function a(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var l=a(i),u=a(r);function c(t,e,n){if(n=n||{},!s.isObject(n))throw new Error("options is invalid");var i=n.units,r=n.reverse;if(!t)throw new Error("geojson is required");if(e<=0)throw new Error("segmentLength must be greater than 0");var a=[];return o.flattenEach(t,(function(t){r&&(t.geometry.coordinates=t.geometry.coordinates.reverse()),function(t,e,n,i){var r=l.default(t,{units:n});if(r<=e)return i(t);var o=r/e;Number.isInteger(o)||(o=Math.floor(o)+1);for(var s=0;s line1 must only contain 2 coordinates");if(2!==i.length)throw new Error(" line2 must only contain 2 coordinates");var s=n[0][0],a=n[0][1],l=n[1][0],u=n[1][1],c=i[0][0],p=i[0][1],h=i[1][0],f=i[1][1],d=(f-p)*(l-s)-(h-c)*(u-a);if(0===d)return null;var g=((h-c)*(a-p)-(f-p)*(s-c))/d,_=((l-s)*(a-p)-(u-a)*(s-c))/d;if(g>=0&&g<=1&&_>=0&&_<=1){var y=s+g*(l-s),m=a+g*(u-a);return r.point([y,m])}return null}e.default=function(t,e){var n={},i=[];if("LineString"===t.type&&(t=r.feature(t)),"LineString"===e.type&&(e=r.feature(e)),"Feature"===t.type&&"Feature"===e.type&&null!==t.geometry&&null!==e.geometry&&"LineString"===t.geometry.type&&"LineString"===e.geometry.type&&2===t.geometry.coordinates.length&&2===e.geometry.coordinates.length){var c=u(t,e);return c&&i.push(c),r.featureCollection(i)}var p=l.default();return p.load(s.default(e)),a.featureEach(s.default(t),(function(t){a.featureEach(p.search(t),(function(e){var r=u(t,e);if(r){var s=o.getCoords(r).join(",");n[s]||(n[s]=!0,i.push(r))}}))})),r.featureCollection(i)}},1972:(t,e,n)=>{"use strict";var i=n(8421),r=n(8506),o=n(8967);function s(t){var e=t[0],n=t[1];return[n[0]-e[0],n[1]-e[1]]}function a(t,e){return t[0]*e[1]-e[0]*t[1]}function l(t,e,n){if(n=n||{},!o.isObject(n))throw new Error("options is invalid");var s=n.units;if(!t)throw new Error("geojson is required");if(null==e||isNaN(e))throw new Error("distance is required");var a=r.getType(t),l=t.properties;switch(a){case"LineString":return u(t,e,s);case"MultiLineString":var c=[];return i.flattenEach(t,(function(t){c.push(u(t,e,s).geometry.coordinates)})),o.multiLineString(c,l);default:throw new Error("geometry "+a+" is not supported")}}function u(t,e,n){var i=[],l=o.lengthToDegrees(e,n),u=r.getCoords(t),c=[];return u.forEach((function(t,e){if(e!==u.length-1){var n=(f=t,d=u[e+1],g=l,_=Math.sqrt((f[0]-d[0])*(f[0]-d[0])+(f[1]-d[1])*(f[1]-d[1])),y=f[0]+g*(d[1]-f[1])/_,m=d[0]+g*(d[1]-f[1])/_,[[y,f[1]+g*(f[0]-d[0])/_],[m,d[1]+g*(f[0]-d[0])/_]]);if(i.push(n),e>0){var r=i[e-1],o=!function(t,e){return 0===a(s(t),s(e))}(p=n,h=r)&&function(t,e){var n,i,r=t[0],o=s(t),l=e[0],u=s(e),c=a(o,u),p=function(t,e){return[t[0]+e[0],t[1]+e[1]]}(r,function(t,e){return[t*e[0],t*e[1]]}(a((i=r,[(n=l)[0]-i[0],n[1]-i[1]]),u)/c,o));return p}(p,h);!1!==o&&(r[1]=o,n[0]=o),c.push(r[0]),e===u.length-2&&(c.push(n[0]),c.push(n[1]))}2===u.length&&(c.push(n[0]),c.push(n[1]))}var p,h,f,d,g,_,y,m})),o.lineString(c,t.properties)}t.exports=l,t.exports.default=l},4300:function(t,e,n){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(4945)),o=i(n(7042)),s=i(n(7696)),a=i(n(5378)),l=n(8506),u=n(8421),c=n(8967),p=i(n(4982));function h(t,e){var n=l.getCoords(e),i=l.getCoords(t),r=i[0],o=i[i.length-1],s=t.geometry.coordinates;return p.default(n[0],r)?s.unshift(n[1]):p.default(n[0],o)?s.push(n[1]):p.default(n[1],r)?s.unshift(n[0]):p.default(n[1],o)&&s.push(n[0]),t}e.default=function(t,e,n){if(void 0===n&&(n={}),n=n||{},!c.isObject(n))throw new Error("options is invalid");var i,f=n.tolerance||0,d=[],g=r.default(),_=o.default(t);return g.load(_),u.segmentEach(e,(function(t){var e=!1;t&&(u.featureEach(g.search(t),(function(n){if(!1===e){var r=l.getCoords(t).sort(),o=l.getCoords(n).sort();p.default(r,o)||(0===f?a.default(r[0],n)&&a.default(r[1],n):s.default(n,r[0]).properties.dist<=f&&s.default(n,r[1]).properties.dist<=f)?(e=!0,i=i?h(i,t):t):(0===f?a.default(o[0],t)&&a.default(o[1],t):s.default(t,o[0]).properties.dist<=f&&s.default(t,o[1]).properties.dist<=f)&&(i=i?h(i,n):n)}})),!1===e&&i&&(d.push(i),i=void 0))})),i&&d.push(i),c.featureCollection(d)}},7042:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8967),r=n(8506),o=n(8421);e.default=function(t){if(!t)throw new Error("geojson is required");var e=[];return o.flattenEach(t,(function(t){!function(t,e){var n=[],o=t.geometry;if(null!==o){switch(o.type){case"Polygon":n=r.getCoords(o);break;case"LineString":n=[r.getCoords(o)]}n.forEach((function(n){var r=function(t,e){var n=[];return t.reduce((function(t,r){var o,s,a,l,u,c,p=i.lineString([t,r],e);return p.bbox=(s=r,a=(o=t)[0],l=o[1],[a<(u=s[0])?a:u,l<(c=s[1])?l:c,a>u?a:u,l>c?l:c]),n.push(p),r})),n}(n,t.properties);r.forEach((function(t){t.id=e.length,e.push(t)}))}))}}(t,e)})),i.featureCollection(e)}},4957:(t,e,n)=>{"use strict";var i=n(1288),r=n(9391),o=n(4202),s=n(8967);function a(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var l=a(i),u=a(r),c=a(o);function p(t,e,n,i){if(i=i||{},!s.isObject(i))throw new Error("options is invalid");var r,o=[];if("Feature"===t.type)r=t.geometry.coordinates;else{if("LineString"!==t.type)throw new Error("input must be a LineString Feature or Geometry");r=t.coordinates}for(var a,p,h,f=r.length,d=0,g=0;g=d&&g===r.length-1);g++){if(d>e&&0===o.length){if(!(a=e-d))return o.push(r[g]),s.lineString(o);p=l.default(r[g],r[g-1])-180,h=c.default(r[g],a,p,i),o.push(h.geometry.coordinates)}if(d>=n)return(a=n-d)?(p=l.default(r[g],r[g-1])-180,h=c.default(r[g],a,p,i),o.push(h.geometry.coordinates),s.lineString(o)):(o.push(r[g]),s.lineString(o));if(d>=e&&o.push(r[g]),g===r.length-1)return s.lineString(o);d+=u.default(r[g],r[g+1],i)}if(d{"use strict";var i=n(8506),r=n(8967);function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var s=o(n(7696));function a(t,e,n){var o=i.getCoords(n);if("LineString"!==i.getType(n))throw new Error("line must be a LineString");for(var a,l=s.default(n,t),u=s.default(n,e),c=[(a=l.properties.index<=u.properties.index?[l,u]:[u,l])[0].geometry.coordinates],p=a[0].properties.index+1;p{"use strict";var i=n(4945),r=n(2363),o=n(4383),s=n(6834),a=n(7042),l=n(3154),u=n(7696),c=n(8506),p=n(8421),h=n(8967);function f(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var d=f(i),g=f(r),_=f(o),y=f(s),m=f(a),v=f(l),b=f(u);function x(t,e){if(!t)throw new Error("line is required");if(!e)throw new Error("splitter is required");var n=c.getType(t),i=c.getType(e);if("LineString"!==n)throw new Error("line must be LineString");if("FeatureCollection"===i)throw new Error("splitter cannot be a FeatureCollection");if("GeometryCollection"===i)throw new Error("splitter cannot be a GeometryCollection");var r=y.default(e,{precision:7});switch(i){case"Point":return k(t,r);case"MultiPoint":return w(t,r);case"LineString":case"MultiLineString":case"Polygon":case"MultiPolygon":return w(t,v.default(t,r))}}function w(t,e){var n=[],i=d.default();return p.flattenEach(e,(function(e){if(n.forEach((function(t,e){t.id=e})),n.length){var r=i.search(e);if(r.features.length){var o=E(e,r);n=n.filter((function(t){return t.id!==o.id})),i.remove(o),p.featureEach(k(o,e),(function(t){n.push(t),i.insert(t)}))}}else(n=k(t,e).features).forEach((function(t){t.bbox||(t.bbox=g.default(_.default(t)))})),i.load(h.featureCollection(n))})),h.featureCollection(n)}function k(t,e){var n=[],i=c.getCoords(t)[0],r=c.getCoords(t)[t.geometry.coordinates.length-1];if(S(i,c.getCoord(e))||S(r,c.getCoord(e)))return h.featureCollection([t]);var o=d.default(),s=m.default(t);o.load(s);var a=o.search(e);if(!a.features.length)return h.featureCollection([t]);var l=E(e,a),u=[i],f=p.featureReduce(s,(function(t,i,r){var o=c.getCoords(i)[1],s=c.getCoord(e);return r===l.id?(t.push(s),n.push(h.lineString(t)),S(s,o)?[s]:[s,o]):(t.push(o),t)}),u);return f.length>1&&n.push(h.lineString(f)),h.featureCollection(n)}function E(t,e){if(!e.features.length)throw new Error("lines must contain features");if(1===e.features.length)return e.features[0];var n,i=1/0;return p.featureEach(e,(function(e){var r=b.default(e,t).properties.dist;rh?(p.unshift(t),h=e):p.push(t)}else p.push(t);var o,a,l,c,f})),s.polygon(p,e);default:throw new Error("geometry type "+c+" is not supported")}}function u(t){var e=t[0],n=e[0],i=e[1],r=t[t.length-1],o=r[0],s=r[1];return n===o&&i===s||t.push(e),t}e.default=function(t,e){var n,i,r;void 0===e&&(e={});var u=e.properties,c=null===(n=e.autoComplete)||void 0===n||n,p=null===(i=e.orderCoords)||void 0===i||i;if(null!==(r=e.mutate)&&void 0!==r&&r||(t=a.default(t)),"FeatureCollection"===t.type){var h=[];return t.features.forEach((function(t){h.push(o.getCoords(l(t,{},c,p)))})),s.multiPolygon(h,u)}return l(t,u,c,p)}},7300:(t,e,n)=>{"use strict";var i=n(8967);function r(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o=r(n(9004));function s(t,e){var n,r=function(t){var e=t&&t.geometry.coordinates||[[[180,90],[-180,90],[-180,-90],[180,-90],[180,90]]];return i.polygon(e)}(e);return("FeatureCollection"===t.type?a(2===(n=t).features.length?o.default.union(n.features[0].geometry.coordinates,n.features[1].geometry.coordinates):o.default.union.apply(o.default,n.features.map((function(t){return t.geometry.coordinates})))):a(o.default.union(t.geometry.coordinates))).geometry.coordinates.forEach((function(t){r.geometry.coordinates.push(t[0])})),r}function a(t){return i.multiPolygon(t)}t.exports=s,t.exports.default=s},8421:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8967);function r(t,e,n){if(null!==t)for(var i,o,s,a,l,u,c,p,h=0,f=0,d=t.type,g="FeatureCollection"===d,_="Feature"===d,y=g?t.features.length:1,m=0;mu||f>c||d>p)return l=r,u=n,c=f,p=d,void(s=0);var g=i.lineString([l,r],t.properties);if(!1===e(g,n,o,d,s))return!1;s++,l=r}))&&void 0}}}))}function c(t,e){if(!t)throw new Error("geojson is required");l(t,(function(t,n,r){if(null!==t.geometry){var o=t.geometry.type,s=t.geometry.coordinates;switch(o){case"LineString":if(!1===e(t,n,r,0,0))return!1;break;case"Polygon":for(var a=0;a{"use strict";var i=n(1288),r=n(4202),o=n(9391);function s(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var a=s(i),l=s(r),u=s(o);function c(t,e){var n=u.default(t,e),i=a.default(t,e);return l.default(t,n/2,i)}t.exports=c,t.exports.default=c},7938:function(t,e,n){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(7484)),o=n(8421);function s(t){for(var e=0,n=0,i=t;n0&&((x=b.features[0]).properties.dist=o.default(e,x,n),x.properties.location=p+o.default(f,x,n)),f.properties.dist{"use strict";var i=n(8506);function r(t,e){var n=i.getCoord(t),r=i.getGeom(e).coordinates[0];if(r.length<4)throw new Error("OuterRing of a Polygon must have 4 or more Positions.");var o=e.properties||{},s=o.a,a=o.b,l=o.c,u=n[0],c=n[1],p=r[0][0],h=r[0][1],f=void 0!==s?s:r[0][2],d=r[1][0],g=r[1][1],_=void 0!==a?a:r[1][2],y=r[2][0],m=r[2][1],v=void 0!==l?l:r[2][2];return(v*(u-p)*(c-g)+f*(u-d)*(c-m)+_*(u-y)*(c-h)-_*(u-p)*(c-m)-v*(u-d)*(c-h)-f*(u-y)*(c-g))/((u-p)*(c-g)+(u-d)*(c-m)+(u-y)*(c-h)-(u-p)*(c-m)-(u-d)*(c-h)-(u-y)*(c-g))}t.exports=r,t.exports.default=r},7497:function(t,e,n){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(4960)),o=i(n(9391)),s=n(8967);e.default=function(t,e,n){void 0===n&&(n={}),n.mask&&!n.units&&(n.units="kilometers");for(var i=[],a=t[0],l=t[1],u=t[2],c=t[3],p=e/o.default([a,l],[u,l],n)*(u-a),h=e/o.default([a,l],[a,c],n)*(c-l),f=u-a,d=c-l,g=Math.floor(f/p),_=(d-Math.floor(d/h)*h)/2,y=a+(f-g*p)/2;y<=u;){for(var m=l+_;m<=c;){var v=s.point([y,m],n.properties);n.mask?r.default(v,n.mask)&&i.push(v):i.push(v),m+=h}y+=p}return s.featureCollection(i)}},6979:(t,e,n)=>{"use strict";var i=n(3707),r=n(6649),o=n(9791),s=n(2446),a=n(8967);function l(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var u=l(i),c=l(r),p=l(o),h=l(s);function f(t){for(var e=function(t){return"FeatureCollection"!==t.type?"Feature"!==t.type?a.featureCollection([a.feature(t)]):a.featureCollection([t]):t}(t),n=c.default(e),i=!1,r=0;!i&&r{"use strict";var i=n(2446),r=n(8967),o=n(8421);function s(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var a=s(i);function l(t,e){var n=[];return o.featureEach(t,(function(t){var i=!1;if("Point"===t.geometry.type)o.geomEach(e,(function(e){a.default(t,e)&&(i=!0)})),i&&n.push(t);else{if("MultiPoint"!==t.geometry.type)throw new Error("Input geometry must be a Point or MultiPoint");var s=[];o.geomEach(e,(function(e){o.coordEach(t,(function(t){a.default(t,e)&&(i=!0,s.push(t))}))})),i&&n.push(r.multiPoint(s))}})),r.featureCollection(n)}t.exports=l,t.exports.default=l},6775:(t,e,n)=>{"use strict";var i=n(8421),r=n(8967);function o(t,e){var n=[],o=e.iterations||1;if(!t)throw new Error("inputPolys is required");return i.geomEach(t,(function(t,e,i){var l,u,c;switch(t.type){case"Polygon":l=[[]];for(var p=0;p0&&(u=r.polygon(l).geometry),s(u,c),l=c.slice(0);n.push(r.polygon(l,i));break;case"MultiPolygon":l=[[[]]];for(var h=0;h0&&(u=r.multiPolygon(l).geometry),a(u,c),l=c.slice(0);n.push(r.multiPolygon(l,i));break;default:throw new Error("geometry is invalid, must be Polygon or MultiPolygon")}})),r.featureCollection(n)}function s(t,e){var n=0,r=0;i.coordEach(t,(function(i,o,s,a,l){l>n&&(n=l,r=o,e.push([]));var u=o-r,c=t.coordinates[l][u+1],p=i[0],h=i[1],f=c[0],d=c[1];e[l].push([.75*p+.25*f,.75*h+.25*d]),e[l].push([.25*p+.75*f,.25*h+.75*d])}),!0),e.forEach((function(t){t.push(t[0])}))}function a(t,e){var n=0,r=0,o=0;i.coordEach(t,(function(i,s,a,l,u){l>o&&(o=l,r=s,e.push([[]])),u>n&&(n=u,r=s,e[l].push([]));var c=s-r,p=t.coordinates[l][u][c+1],h=i[0],f=i[1],d=p[0],g=p[1];e[l][u].push([.75*h+.25*d,.75*f+.25*g]),e[l][u].push([.25*h+.75*d,.25*f+.75*g])}),!0),e.forEach((function(t){t.forEach((function(t){t.push(t[0])}))}))}t.exports=o,t.exports.default=o},4951:(t,e,n)=>{"use strict";var i=n(8506),r=n(8967),o=n(4383),s=n(3707),a=n(9791);function l(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var u=l(o),c=l(s),p=l(a);function h(t,e){var n,o,s,a,l=i.getCoords(t),h=i.getCoords(e),g=u.default(e),_=0,y=null;switch(l[0]>g[0]&&l[0]g[1]&&l[1]0?d(e,a,r)<0||(r=a):n>0&&i<=0&&(d(e,a,o)>0||(o=a)),n=i}return[r,o]}function d(t,e,n){return(e[0]-t[0])*(n[1]-t[1])-(n[0]-t[0])*(e[1]-t[1])}t.exports=h,t.exports.default=h},4527:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8967),r=n(8506);function o(t,e){return void 0===e&&(e={}),a(r.getGeom(t).coordinates,e.properties?e.properties:"Feature"===t.type?t.properties:{})}function s(t,e){void 0===e&&(e={});var n=r.getGeom(t).coordinates,o=e.properties?e.properties:"Feature"===t.type?t.properties:{},s=[];return n.forEach((function(t){s.push(a(t,o))})),i.featureCollection(s)}function a(t,e){return t.length>1?i.multiLineString(t,e):i.lineString(t[0],e)}e.default=function(t,e){void 0===e&&(e={});var n=r.getGeom(t);switch(e.properties||"Feature"!==t.type||(e.properties=t.properties),n.type){case"Polygon":return o(n,e);case"MultiPolygon":return s(n,e);default:throw new Error("invalid poly")}},e.polygonToLine=o,e.multiPolygonToLine=s,e.coordsToLine=a},7804:function(t,e,n){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=n(8967),o=i(n(8828)),s=i(n(9977));e.default=function(t){var e=o.default.fromGeoJson(t);e.deleteDangles(),e.deleteCutEdges();var n=[],i=[];return e.getEdgeRings().filter((function(t){return t.isValid()})).forEach((function(t){t.isHole()?n.push(t):i.push(t)})),n.forEach((function(t){s.default.findEdgeRingContaining(t,i)&&i.push(t)})),r.featureCollection(i.map((function(t){return t.toPolygon()})))}},6088:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8967),r=n(4898),o=function(){function t(t,e){this.from=t,this.to=e,this.next=void 0,this.label=void 0,this.symetric=void 0,this.ring=void 0,this.from.addOuterEdge(this),this.to.addInnerEdge(this)}return t.prototype.getSymetric=function(){return this.symetric||(this.symetric=new t(this.to,this.from),this.symetric.symetric=this),this.symetric},t.prototype.deleteEdge=function(){this.from.removeOuterEdge(this),this.to.removeInnerEdge(this)},t.prototype.isEqual=function(t){return this.from.id===t.from.id&&this.to.id===t.to.id},t.prototype.toString=function(){return"Edge { "+this.from.id+" -> "+this.to.id+" }"},t.prototype.toLineString=function(){return i.lineString([this.from.coordinates,this.to.coordinates])},t.prototype.compareTo=function(t){return r.orientationIndex(t.from.coordinates,t.to.coordinates,this.to.coordinates)},t}();e.default=o},9977:function(t,e,n){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=n(4898),o=n(8967),s=i(n(2120)),a=i(n(2446)),l=function(){function t(){this.edges=[],this.polygon=void 0,this.envelope=void 0}return t.prototype.push=function(t){this.edges.push(t),this.polygon=this.envelope=void 0},t.prototype.get=function(t){return this.edges[t]},Object.defineProperty(t.prototype,"length",{get:function(){return this.edges.length},enumerable:!0,configurable:!0}),t.prototype.forEach=function(t){this.edges.forEach(t)},t.prototype.map=function(t){return this.edges.map(t)},t.prototype.some=function(t){return this.edges.some(t)},t.prototype.isValid=function(){return!0},t.prototype.isHole=function(){var t=this,e=this.edges.reduce((function(e,n,i){return n.from.coordinates[1]>t.edges[e].from.coordinates[1]&&(e=i),e}),0),n=(0===e?this.length:e)-1,i=(e+1)%this.length,o=r.orientationIndex(this.edges[n].from.coordinates,this.edges[e].from.coordinates,this.edges[i].from.coordinates);return 0===o?this.edges[n].from.coordinates[0]>this.edges[i].from.coordinates[0]:o>0},t.prototype.toMultiPoint=function(){return o.multiPoint(this.edges.map((function(t){return t.from.coordinates})))},t.prototype.toPolygon=function(){if(this.polygon)return this.polygon;var t=this.edges.map((function(t){return t.from.coordinates}));return t.push(this.edges[0].from.coordinates),this.polygon=o.polygon([t])},t.prototype.getEnvelope=function(){return this.envelope?this.envelope:this.envelope=s.default(this.toPolygon())},t.findEdgeRingContaining=function(t,e){var n,i,s=t.getEnvelope();return e.forEach((function(e){var a=e.getEnvelope();if(i&&(n=i.getEnvelope()),!r.envelopeIsEqual(a,s)&&r.envelopeContains(a,s)){for(var l=t.map((function(t){return t.from.coordinates})),u=void 0,c=function(t){e.some((function(e){return r.coordinatesEqual(t,e.from.coordinates)}))||(u=t)},p=0,h=l;p=0;--o){var s=r[o],a=s.symetric,l=void 0,u=void 0;s.label===e&&(l=s),a.label===e&&(u=a),l&&u&&(u&&(i=u),l&&(i&&(i.next=l,i=void 0),n||(n=l)))}i&&(i.next=n)},t.prototype._findLabeledEdgeRings=function(){var t=[],e=0;return this.edges.forEach((function(n){if(!(n.label>=0)){t.push(n);var i=n;do{i.label=e,i=i.next}while(!n.isEqual(i));e++}})),t},t.prototype.getEdgeRings=function(){var t=this;this._computeNextCWEdges(),this.edges.forEach((function(t){t.label=void 0})),this._findLabeledEdgeRings().forEach((function(e){t._findIntersectionNodes(e).forEach((function(n){t._computeNextCCWEdges(n,e.label)}))}));var e=[];return this.edges.forEach((function(n){n.ring||e.push(t._findEdgeRing(n))})),e},t.prototype._findIntersectionNodes=function(t){var e=[],n=t,i=function(){var i=0;n.from.getOuterEdges().forEach((function(e){e.label===t.label&&++i})),i>1&&e.push(n.from),n=n.next};do{i()}while(!t.isEqual(n));return e},t.prototype._findEdgeRing=function(t){var e=t,n=new s.default;do{n.push(e),e.ring=n,e=e.next}while(!t.isEqual(e));return n},t.prototype.removeNode=function(t){var e=this;t.getOuterEdges().forEach((function(t){return e.removeEdge(t)})),t.innerEdges.forEach((function(t){return e.removeEdge(t)})),delete this.nodes[t.id]},t.prototype.removeEdge=function(t){this.edges=this.edges.filter((function(e){return!e.isEqual(t)})),t.deleteEdge()},t}();e.default=u},6518:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(4898),r=function(){function t(e){this.id=t.buildId(e),this.coordinates=e,this.innerEdges=[],this.outerEdges=[],this.outerEdgesSorted=!1}return t.buildId=function(t){return t.join(",")},t.prototype.removeInnerEdge=function(t){this.innerEdges=this.innerEdges.filter((function(e){return e.from.id!==t.from.id}))},t.prototype.removeOuterEdge=function(t){this.outerEdges=this.outerEdges.filter((function(e){return e.to.id!==t.to.id}))},t.prototype.addOuterEdge=function(t){this.outerEdges.push(t),this.outerEdgesSorted=!1},t.prototype.sortOuterEdges=function(){var t=this;this.outerEdgesSorted||(this.outerEdges.sort((function(e,n){var r=e.to,o=n.to;if(r.coordinates[0]-t.coordinates[0]>=0&&o.coordinates[0]-t.coordinates[0]<0)return 1;if(r.coordinates[0]-t.coordinates[0]<0&&o.coordinates[0]-t.coordinates[0]>=0)return-1;if(r.coordinates[0]-t.coordinates[0]==0&&o.coordinates[0]-t.coordinates[0]==0)return r.coordinates[1]-t.coordinates[1]>=0||o.coordinates[1]-t.coordinates[1]>=0?r.coordinates[1]-o.coordinates[1]:o.coordinates[1]-r.coordinates[1];var s=i.orientationIndex(t.coordinates,r.coordinates,o.coordinates);return s<0?1:s>0?-1:Math.pow(r.coordinates[0]-t.coordinates[0],2)+Math.pow(r.coordinates[1]-t.coordinates[1],2)-(Math.pow(o.coordinates[0]-t.coordinates[0],2)+Math.pow(o.coordinates[1]-t.coordinates[1],2))})),this.outerEdgesSorted=!0)},t.prototype.getOuterEdges=function(){return this.sortOuterEdges(),this.outerEdges},t.prototype.getOuterEdge=function(t){return this.sortOuterEdges(),this.outerEdges[t]},t.prototype.addInnerEdge=function(t){this.innerEdges.push(t)},t}();e.default=r},4898:function(t,e,n){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(2446)),o=n(8967);e.orientationIndex=function(t,e,n){var i,r=e[0]-t[0],o=e[1]-t[1],s=n[0]-e[0];return((i=r*(n[1]-e[1])-s*o)>0)-(i<0)||+i},e.envelopeIsEqual=function(t,e){var n=t.geometry.coordinates[0].map((function(t){return t[0]})),i=t.geometry.coordinates[0].map((function(t){return t[1]})),r=e.geometry.coordinates[0].map((function(t){return t[0]})),o=e.geometry.coordinates[0].map((function(t){return t[1]}));return Math.max.apply(null,n)===Math.max.apply(null,r)&&Math.max.apply(null,i)===Math.max.apply(null,o)&&Math.min.apply(null,n)===Math.min.apply(null,r)&&Math.min.apply(null,i)===Math.min.apply(null,o)},e.envelopeContains=function(t,e){return e.geometry.coordinates[0].every((function(e){return r.default(o.point(e),t)}))},e.coordinatesEqual=function(t,e){return t[0]===e[0]&&t[1]===e[1]}},1101:function(t,e,n){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=n(8421),o=n(8967),s=i(n(3711));function a(t,e,n){void 0===n&&(n={});var i=(n=n||{}).mutate;if(!t)throw new Error("geojson is required");return Array.isArray(t)&&o.isNumber(t[0])?t="mercator"===e?l(t):u(t):(!0!==i&&(t=s.default(t)),r.coordEach(t,(function(t){var n="mercator"===e?l(t):u(t);t[0]=n[0],t[1]=n[1]}))),t}function l(t){var e,n=Math.PI/180,i=6378137,r=20037508.342789244,o=[i*(Math.abs(t[0])<=180?t[0]:t[0]-360*((e=t[0])<0?-1:e>0?1:0))*n,i*Math.log(Math.tan(.25*Math.PI+.5*t[1]*n))];return o[0]>r&&(o[0]=r),o[0]<-r&&(o[0]=-r),o[1]>r&&(o[1]=r),o[1]<-r&&(o[1]=-r),o}function u(t){var e=180/Math.PI,n=6378137;return[t[0]*e/n,(.5*Math.PI-2*Math.atan(Math.exp(-t[1]/n)))*e]}e.toMercator=function(t,e){return void 0===e&&(e={}),a(t,"mercator",e)},e.toWgs84=function(t,e){return void 0===e&&(e={}),a(t,"wgs84",e)}},4575:function(t,e,n){"use strict";var i=this&&this.__spreadArrays||function(){for(var t=0,e=0,n=arguments.length;e0?t+n[e-1]:t})),l.forEach((function(t){t=2*t*Math.PI/l[l.length-1];var n=Math.random();a.push([n*(e.max_radial_length||10)*Math.sin(t),n*(e.max_radial_length||10)*Math.cos(t)])})),a[a.length-1]=a[0],a=a.map((s=o(e.bbox),function(t){return[t[0]+s[0],t[1]+s[1]]})),n.push(r.polygon([a]))},a=0;a{"use strict";var i=n(3711),r=n(7333),o=n(8421),s=n(8506),a=n(8967);function l(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var u=l(i),c=l(r);function p(t,e){if(e=e||{},!a.isObject(e))throw new Error("options is invalid");var n=e.reverse||!1,i=e.mutate||!1;if(!t)throw new Error(" is required");if("boolean"!=typeof n)throw new Error(" must be a boolean");if("boolean"!=typeof i)throw new Error(" must be a boolean");!1===i&&(t=u.default(t));var r=[];switch(t.type){case"GeometryCollection":return o.geomEach(t,(function(t){h(t,n)})),t;case"FeatureCollection":return o.featureEach(t,(function(t){o.featureEach(h(t,n),(function(t){r.push(t)}))})),a.featureCollection(r)}return h(t,n)}function h(t,e){switch("Feature"===t.type?t.geometry.type:t.type){case"GeometryCollection":return o.geomEach(t,(function(t){h(t,e)})),t;case"LineString":return f(s.getCoords(t),e),t;case"Polygon":return d(s.getCoords(t),e),t;case"MultiLineString":return s.getCoords(t).forEach((function(t){f(t,e)})),t;case"MultiPolygon":return s.getCoords(t).forEach((function(t){d(t,e)})),t;case"Point":case"MultiPoint":return t}}function f(t,e){c.default(t)===e&&t.reverse()}function d(t,e){c.default(t[0])!==e&&t[0].reverse();for(var n=1;n{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8967),r=n(8506);function o(t,e){var n=i.degreesToRadians(t[1]),r=i.degreesToRadians(e[1]),o=i.degreesToRadians(e[0]-t[0]);o>Math.PI&&(o-=2*Math.PI),o<-Math.PI&&(o+=2*Math.PI);var s=Math.log(Math.tan(r/2+Math.PI/4)/Math.tan(n/2+Math.PI/4)),a=Math.atan2(o,s);return(i.radiansToDegrees(a)+360)%360}e.default=function(t,e,n){var i;return void 0===n&&(n={}),(i=n.final?o(r.getCoord(e),r.getCoord(t)):o(r.getCoord(t),r.getCoord(e)))>180?-(360-i):i}},7153:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8967),r=n(8506);e.default=function(t,e,n,o){void 0===o&&(o={});var s=e<0,a=i.convertLength(Math.abs(e),o.units,"meters");s&&(a=-Math.abs(a));var l=r.getCoord(t),u=function(t,e,n,r){var o=e/(r=void 0===r?i.earthRadius:Number(r)),s=t[0]*Math.PI/180,a=i.degreesToRadians(t[1]),l=i.degreesToRadians(n),u=o*Math.cos(l),c=a+u;Math.abs(c)>Math.PI/2&&(c=c>0?Math.PI-c:-Math.PI-c);var p=Math.log(Math.tan(c/2+Math.PI/4)/Math.tan(a/2+Math.PI/4)),h=Math.abs(p)>1e-11?u/p:Math.cos(a);return[(180*(s+o*Math.sin(l)/h)/Math.PI+540)%360-180,180*c/Math.PI]}(l,a,n);return u[0]+=u[0]-l[0]>180?-360:l[0]-u[0]>180?360:0,i.point(u,o.properties)}},9778:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8967),r=n(8506);e.default=function(t,e,n){void 0===n&&(n={});var o=r.getCoord(t),s=r.getCoord(e);s[0]+=s[0]-o[0]>180?-360:o[0]-s[0]>180?360:0;var a=function(t,e,n){var r=n=void 0===n?i.earthRadius:Number(n),o=t[1]*Math.PI/180,s=e[1]*Math.PI/180,a=s-o,l=Math.abs(e[0]-t[0])*Math.PI/180;l>Math.PI&&(l-=2*Math.PI);var u=Math.log(Math.tan(s/2+Math.PI/4)/Math.tan(o/2+Math.PI/4)),c=Math.abs(u)>1e-11?a/u:Math.cos(o);return Math.sqrt(a*a+c*c*l*l)*r}(o,s);return i.convertLength(a,"meters",n.units)}},9730:(t,e,n)=>{"use strict";var i=n(8967);function r(t,e){if(!t)throw new Error("featurecollection is required");if(null==e)throw new Error("num is required");if("number"!=typeof e)throw new Error("num must be a number");return i.featureCollection(function(t,e){for(var n,i,r=t.slice(0),o=t.length,s=o-e;o-- >s;)n=r[i=Math.floor((o+1)*Math.random())],r[i]=r[o],r[o]=n;return r.slice(s)}(t.features,e))}t.exports=r,t.exports.default=r},1786:(t,e,n)=>{"use strict";var i=n(5764),r=n(375),o=n(8421),s=n(8967),a=n(8506);function l(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var u=l(i),c=l(r);function p(t,e,n,i,r){if(r=r||{},!s.isObject(r))throw new Error("options is invalid");var l=r.properties;if(!t)throw new Error("center is required");if(null==n)throw new Error("bearing1 is required");if(null==i)throw new Error("bearing2 is required");if(!e)throw new Error("radius is required");if("object"!=typeof r)throw new Error("options must be an object");if(h(n)===h(i))return u.default(t,e,r);var p=a.getCoords(t),f=c.default(t,e,n,i,r),d=[[p]];return o.coordEach(f,(function(t){d[0].push(t)})),d[0].push(p),s.polygon(d,l)}function h(t){var e=t%360;return e<0&&(e+=360),e}t.exports=p,t.exports.default=p},9736:(t,e,n)=>{"use strict";var i=n(4383),r=n(2446),o=n(9391),s=n(1925),a=n(2086),l=n(3932),u=n(8506),c=n(8967);function p(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var h=p(i),f=p(r),d=p(o),g=p(s),_=p(a),y=p(l);function m(t){for(var e=t,n=[];e.parent;)n.unshift(e),e=e.parent;return n}var v={search:function(t,e,n,i){t.cleanDirty();var r=(i=i||{}).heuristic||v.heuristics.manhattan,o=i.closest||!1,s=new w((function(t){return t.f})),a=e;for(e.h=r(e,n),s.push(e);s.size()>0;){var l=s.pop();if(l===n)return m(l);l.closed=!0;for(var u=t.neighbors(l),c=0,p=u.length;c=m;){for(var z=[],q=[],B=f+P,G=0;B<=x;){var U=c.point([B,F]),X=E(U,o);z.push(X?0:1),q.push(B+"|"+F);var Y=d.default(U,t);!X&&Y0&&(this.content[0]=e,this.bubbleUp(0)),t},remove:function(t){var e=this.content.indexOf(t),n=this.content.pop();e!==this.content.length-1&&(this.content[e]=n,this.scoreFunction(n)0;){var n=(t+1>>1)-1,i=this.content[n];if(!(this.scoreFunction(e){"use strict";var i=n(2086),r=n(3711),o=n(8421),s=n(8967);function a(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var l=a(i),u=a(r);function c(t,e,n){var i=e.x,r=e.y,o=n.x-i,s=n.y-r;if(0!==o||0!==s){var a=((t.x-i)*o+(t.y-r)*s)/(o*o+s*s);a>1?(i=n.x,r=n.y):a>0&&(i+=o*a,r+=s*a)}return(o=t.x-i)*o+(s=t.y-r)*s}function p(t,e,n,i,r){for(var o,s=i,a=e+1;as&&(o=a,s=l)}s>i&&(o-e>1&&p(t,e,o,i,r),r.push(t[o]),n-o>1&&p(t,o,n,i,r))}function h(t,e){var n=t.length-1,i=[t[0]];return p(t,0,n,e,i),i.push(t[n]),i}function f(t,e,n){if(t.length<=2)return t;var i=void 0!==e?e*e:1;return t=n?t:function(t,e){for(var n,i,r,o,s,a=t[0],l=[a],u=1,c=t.length;ue&&(l.push(n),a=n);return a!==n&&l.push(n),l}(t,i),h(t,i)}function d(t,e){if(e=e||{},!s.isObject(e))throw new Error("options is invalid");var n=void 0!==e.tolerance?e.tolerance:1,i=e.highQuality||!1,r=e.mutate||!1;if(!t)throw new Error("geojson is required");if(n&&n<0)throw new Error("invalid tolerance");return!0!==r&&(t=u.default(t)),o.geomEach(t,(function(t){!function(t,e,n){var i=t.type;if("Point"===i||"MultiPoint"===i)return t;l.default(t,!0);var r=t.coordinates;switch(i){case"LineString":t.coordinates=g(r,e,n);break;case"MultiLineString":t.coordinates=r.map((function(t){return g(t,e,n)}));break;case"Polygon":t.coordinates=_(r,e,n);break;case"MultiPolygon":t.coordinates=r.map((function(t){return _(t,e,n)}))}}(t,n,i)})),t}function g(t,e,n){return f(t.map((function(t){return{x:t[0],y:t[1],z:t[2]}})),e,n).map((function(t){return t.z?[t.x,t.y,t.z]:[t.x,t.y]}))}function _(t,e,n){return t.map((function(t){var i=t.map((function(t){return{x:t[0],y:t[1]}}));if(i.length<4)throw new Error("invalid polygon");for(var r=f(i,e,n).map((function(t){return[t.x,t.y]}));!y(r);)r=f(i,e-=.01*e,n).map((function(t){return[t.x,t.y]}));return r[r.length-1][0]===r[0][0]&&r[r.length-1][1]===r[0][1]||r.push(r[0]),r}))}function y(t){return!(t.length<3||3===t.length&&t[2][0]===t[0][0]&&t[2][1]===t[0][1])}t.exports=d,t.exports.default=d},4512:function(t,e,n){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(7112));e.default=function(t,e,n){return void 0===n&&(n={}),r.default(t,e,e,n)}},2363:(t,e,n)=>{"use strict";function i(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var r=i(n(9391));function o(t){var e=t[0],n=t[1],i=t[2],o=t[3];if(r.default(t.slice(0,2),[i,n])>=r.default(t.slice(0,2),[e,o])){var s=(n+o)/2;return[e,s-(i-e)/2,i,s+(i-e)/2]}var a=(e+i)/2;return[a-(o-n)/2,n,a+(o-n)/2,o]}t.exports=o,t.exports.default=o},4333:(t,e,n)=>{"use strict";var i=n(8421),r=n(8506),o=n(8967),s=n(2779),a=n(6432),l=n(7420);function u(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var c=u(s),p=u(a),h=u(l);function f(t,e){if(e=e||{},!o.isObject(e))throw new Error("options is invalid");var n=e.steps||64,s=e.weight,a=e.properties||{};if(!o.isNumber(n))throw new Error("steps must be a number");if(!o.isObject(a))throw new Error("properties must be a number");var l=i.coordAll(t).length,u=c.default(t,{weight:s}),f=0,g=0,_=0;i.featureEach(t,(function(t){var e=t.properties[s]||1,n=d(r.getCoords(t),r.getCoords(u));f+=Math.pow(n.x,2)*e,g+=Math.pow(n.y,2)*e,_+=n.x*n.y*e}));var y=f-g,m=Math.sqrt(Math.pow(y,2)+4*Math.pow(_,2)),v=2*_,b=Math.atan((y+m)/v),x=180*b/Math.PI,w=0,k=0,E=0;i.featureEach(t,(function(t){var e=t.properties[s]||1,n=d(r.getCoords(t),r.getCoords(u));w+=Math.pow(n.x*Math.cos(b)-n.y*Math.sin(b),2)*e,k+=Math.pow(n.x*Math.sin(b)+n.y*Math.cos(b),2)*e,E+=e}));var S=Math.sqrt(2*w/E),C=Math.sqrt(2*k/E),I=h.default(u,S,C,{units:"degrees",angle:x,steps:n,properties:a}),N=p.default(t,o.featureCollection([I])),M={meanCenterCoordinates:r.getCoords(u),semiMajorAxis:S,semiMinorAxis:C,numberOfFeatures:l,angle:x,percentageWithinEllipse:100*i.coordAll(N).length/l};return I.properties.standardDeviationalEllipse=M,I}function d(t,e){return{x:t[0]-e[0],y:t[1]-e[1]}}t.exports=f,t.exports.default=f},7974:(t,e,n)=>{"use strict";var i=n(2446),r=n(3711),o=n(8421);function s(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var a=s(i),l=s(r);function u(t,e,n,i){return t=l.default(t),e=l.default(e),o.featureEach(t,(function(t){t.properties||(t.properties={}),o.featureEach(e,(function(e){void 0===t.properties[i]&&a.default(t,e)&&(t.properties[i]=e.properties[n])}))})),t}t.exports=u,t.exports.default=u},3414:(t,e,n)=>{"use strict";var i=n(6570),r=n(8967);function o(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var s=o(i);function a(t){if(!t.geometry||"Polygon"!==t.geometry.type&&"MultiPolygon"!==t.geometry.type)throw new Error("input must be a Polygon or MultiPolygon");var e={type:"FeatureCollection",features:[]};return"Polygon"===t.geometry.type?e.features=l(t.geometry.coordinates):t.geometry.coordinates.forEach((function(t){e.features=e.features.concat(l(t))})),e}function l(t){var e=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},i=0,r=0;r0&&(i+=t[r-1].length,n.holes.push(i))}return n}(t),n=s.default(e.vertices,e.holes,2),i=[],o=[];n.forEach((function(t,i){var r=n[i];o.push([e.vertices[2*r],e.vertices[2*r+1]])}));for(var a=0;a{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8967);e.default=function(t,e){var n=!1;return i.featureCollection(function(t){if(t.length<3)return[];t.sort(o);for(var e,n,i,a,l,u,c=t.length-1,p=t[c].x,h=t[0].x,f=t[c].y,d=f;c--;)t[c].yd&&(d=t[c].y);var g,_=h-p,y=d-f,m=_>y?_:y,v=.5*(h+p),b=.5*(d+f),x=[new r({__sentinel:!0,x:v-20*m,y:b-m},{__sentinel:!0,x:v,y:b+20*m},{__sentinel:!0,x:v+20*m,y:b-m})],w=[],k=[];for(c=t.length;c--;){for(k.length=0,g=x.length;g--;)(_=t[c].x-x[g].x)>0&&_*_>x[g].r?(w.push(x[g]),x.splice(g,1)):_*_+(y=t[c].y-x[g].y)*y>x[g].r||(k.push(x[g].a,x[g].b,x[g].b,x[g].c,x[g].c,x[g].a),x.splice(g,1));for(s(k),g=k.length;g;)n=k[--g],e=k[--g],i=t[c],a=n.x-e.x,l=n.y-e.y,u=2*(a*(i.y-n.y)-l*(i.x-n.x)),Math.abs(u)>1e-12&&x.push(new r(e,n,i))}for(Array.prototype.push.apply(w,x),c=w.length;c--;)(w[c].a.__sentinel||w[c].b.__sentinel||w[c].c.__sentinel)&&w.splice(c,1);return w}(t.features.map((function(t){var i={x:t.geometry.coordinates[0],y:t.geometry.coordinates[1]};return e?i.z=t.properties[e]:3===t.geometry.coordinates.length&&(n=!0,i.z=t.geometry.coordinates[2]),i}))).map((function(t){var e=[t.a.x,t.a.y],r=[t.b.x,t.b.y],o=[t.c.x,t.c.y],s={};return n?(e.push(t.a.z),r.push(t.b.z),o.push(t.c.z)):s={a:t.a.z,b:t.b.z,c:t.c.z},i.polygon([[e,r,o,e]],s)})))};var r=function(t,e,n){this.a=t,this.b=e,this.c=n;var i,r,o=e.x-t.x,s=e.y-t.y,a=n.x-t.x,l=n.y-t.y,u=o*(t.x+e.x)+s*(t.y+e.y),c=a*(t.x+n.x)+l*(t.y+n.y),p=2*(o*(n.y-e.y)-s*(n.x-e.x));this.x=(l*u-s*c)/p,this.y=(o*c-a*u)/p,i=this.x-t.x,r=this.y-t.y,this.r=i*i+r*r};function o(t,e){return e.x-t.x}function s(t){var e,n,i,r,o,s=t.length;t:for(;s;)for(n=t[--s],e=t[--s],i=s;i;)if(o=t[--i],e===(r=t[--i])&&n===o||e===o&&n===r){t.splice(s,2),t.splice(i,2),s-=2;continue t}}},7948:(t,e,n)=>{"use strict";var i=n(4408),r=n(2307),o=n(9778),s=n(7153),a=n(3711),l=n(8421),u=n(8506),c=n(8967);function p(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var h=p(i),f=p(r),d=p(o),g=p(s),_=p(a);function y(t,e,n){if(n=n||{},!c.isObject(n))throw new Error("options is invalid");var i=n.pivot,r=n.mutate;if(!t)throw new Error("geojson is required");if(null==e||isNaN(e))throw new Error("angle is required");return 0===e||(i||(i=h.default(t)),!1!==r&&void 0!==r||(t=_.default(t)),l.coordEach(t,(function(t){var n=f.default(i,t)+e,r=d.default(i,t),o=u.getCoords(g.default(i,r,n));t[0]=o[0],t[1]=o[1]}))),t}t.exports=y,t.exports.default=y},1925:(t,e,n)=>{"use strict";var i=n(3711),r=n(6649),o=n(4408),s=n(4383),a=n(2307),l=n(9778),u=n(7153),c=n(8421),p=n(8967),h=n(8506);function f(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var d=f(i),g=f(r),_=f(o),y=f(s),m=f(a),v=f(l),b=f(u);function x(t,e,n){if(n=n||{},!p.isObject(n))throw new Error("options is invalid");var i=n.origin,r=n.mutate;if(!t)throw new Error("geojson required");if("number"!=typeof e||0===e)throw new Error("invalid factor");var o=Array.isArray(i)||"object"==typeof i;return!0!==r&&(t=d.default(t)),"FeatureCollection"!==t.type||o?w(t,e,i):(c.featureEach(t,(function(n,r){t.features[r]=w(n,e,i)})),t)}function w(t,e,n){var i="Point"===h.getType(t);return n=function(t,e){if(null==e&&(e="centroid"),Array.isArray(e)||"object"==typeof e)return h.getCoord(e);var n=t.bbox?t.bbox:y.default(t),i=n[0],r=n[1],o=n[2],s=n[3];switch(e){case"sw":case"southwest":case"westsouth":case"bottomleft":return p.point([i,r]);case"se":case"southeast":case"eastsouth":case"bottomright":return p.point([o,r]);case"nw":case"northwest":case"westnorth":case"topleft":return p.point([i,s]);case"ne":case"northeast":case"eastnorth":case"topright":return p.point([o,s]);case"center":return g.default(t);case void 0:case null:case"centroid":return _.default(t);default:throw new Error("invalid origin")}}(t,n),1===e||i||c.coordEach(t,(function(t){var i=v.default(n,t),r=m.default(n,t),o=i*e,s=h.getCoords(b.default(n,o,r));t[0]=s[0],t[1]=s[1],3===t.length&&(t[2]*=e)})),t}t.exports=x,t.exports.default=x},8509:(t,e,n)=>{"use strict";var i=n(8421),r=n(8967),o=n(8506),s=n(3711),a=n(7153);function l(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var u=l(s),c=l(a);function p(t,e,n,s){if(s=s||{},!r.isObject(s))throw new Error("options is invalid");var a=s.units,l=s.zTranslation,p=s.mutate;if(!t)throw new Error("geojson is required");if(null==e||isNaN(e))throw new Error("distance is required");if(l&&"number"!=typeof l&&isNaN(l))throw new Error("zTranslation is not a number");if(l=void 0!==l?l:0,0===e&&0===l)return t;if(null==n||isNaN(n))throw new Error("direction is required");return e<0&&(e=-e,n+=180),!1!==p&&void 0!==p||(t=u.default(t)),i.coordEach(t,(function(t){var i=o.getCoords(c.default(t,e,n,{units:a}));t[0]=i[0],t[1]=i[1],l&&3===t.length&&(t[2]+=l)})),t}t.exports=p,t.exports.default=p},9269:function(t,e,n){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(9391)),o=i(n(9627)),s=n(8967);e.default=function(t,e,n){void 0===n&&(n={});for(var i=[],a=e/r.default([t[0],t[1]],[t[2],t[1]],n)*(t[2]-t[0]),l=e/r.default([t[0],t[1]],[t[0],t[3]],n)*(t[3]-t[1]),u=0,c=t[0];c<=t[2];){for(var p=0,h=t[1];h<=t[3];){var f=null,d=null;u%2==0&&p%2==0?(f=s.polygon([[[c,h],[c,h+l],[c+a,h],[c,h]]],n.properties),d=s.polygon([[[c,h+l],[c+a,h+l],[c+a,h],[c,h+l]]],n.properties)):u%2==0&&p%2==1?(f=s.polygon([[[c,h],[c+a,h+l],[c+a,h],[c,h]]],n.properties),d=s.polygon([[[c,h],[c,h+l],[c+a,h+l],[c,h]]],n.properties)):p%2==0&&u%2==1?(f=s.polygon([[[c,h],[c,h+l],[c+a,h+l],[c,h]]],n.properties),d=s.polygon([[[c,h],[c+a,h+l],[c+a,h],[c,h]]],n.properties)):p%2==1&&u%2==1&&(f=s.polygon([[[c,h],[c,h+l],[c+a,h],[c,h]]],n.properties),d=s.polygon([[[c,h+l],[c+a,h+l],[c+a,h],[c,h+l]]],n.properties)),n.mask?(o.default(n.mask,f)&&i.push(f),o.default(n.mask,d)&&i.push(d)):(i.push(f),i.push(d)),h+=l,p++}u++,c+=a}return s.featureCollection(i)}},6834:(t,e,n)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(8421);e.default=function(t,e){void 0===e&&(e={});var n=e.precision,r=e.coordinates,o=e.mutate;if(n=null==n||isNaN(n)?6:n,r=null==r||isNaN(r)?3:r,!t)throw new Error(" is required");if("number"!=typeof n)throw new Error(" must be a number");if("number"!=typeof r)throw new Error(" must be a number");!1!==o&&void 0!==o||(t=JSON.parse(JSON.stringify(t)));var s=Math.pow(10,n);return i.coordEach(t,(function(t){!function(t,e,n){t.length>n&&t.splice(n,t.length);for(var i=0;i{"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=n(5784),r=n(1207),o=n(6432),s=n(347),a=n(1484),l=n(9387),u=n(1111),c=n(301),p=n(7974),h=n(9730),f=n(2120),d=n(2363),g=n(5764),_=n(8748),y=n(6649),m=n(6320),v=n(4408),b=n(2583),x=n(9391),w=n(3707),k=n(4383),E=n(3414),S=n(3932),C=n(2446),I=n(9791),N=n(7696),M=n(3284),P=n(8220),O=n(2141),L=n(1288),T=n(4202),A=n(5518),D=n(6979),R=n(7849),F=n(9399),j=n(8840),z=n(7969),q=n(4957),B=n(7497),G=n(6834),U=n(4036),X=n(3154),Y=n(2222),V=n(7911),$=n(2352),H=n(7042),W=n(5848),J=n(375),K=n(4527),Z=n(8785),Q=n(3574),tt=n(4300),et=n(1786),nt=n(2307),it=n(9778),rt=n(7153),ot=n(4951),st=n(2163),at=n(1279),lt=n(7948),ut=n(1925),ct=n(8509),pt=n(1972),ht=n(7804),ft=n(1323),dt=n(3974),gt=n(7971),_t=n(7333),yt=n(8436),mt=n(5378),vt=n(7447),bt=n(4960),xt=n(9353),wt=n(3711),kt=n(2086),Et=n(8703),St=n(7521),Ct=n(3183),It=n(3980),Nt=n(9736),Mt=n(1356),Pt=n(7420),Ot=n(2779),Lt=n(6724),Tt=n(4333),At=n(4309),Dt=n(6775),Rt=n(7938),Ft=n(7484),jt=n(1101),zt=n(4575),qt=n(5943),Bt=n(8967),Gt=n(8506),Ut=n(8421),Xt=n(4927),Yt=n(7262),Vt=n(2057),$t=n(9627),Ht=n(7095),Wt=n(7564),Jt=n(7300),Kt=n(4512),Zt=n(9269),Qt=n(9933);function te(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}function ee(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var ne=te(i),ie=te(r),re=te(o),oe=te(s),se=te(a),ae=te(l),le=te(u),ue=te(c),ce=te(p),pe=te(h),he=te(f),fe=te(d),de=te(g),ge=te(_),_e=te(y),ye=te(m),me=te(v),ve=te(b),be=te(x),xe=te(w),we=te(k),ke=te(E),Ee=te(S),Se=te(C),Ce=te(I),Ie=te(N),Ne=te(M),Me=te(P),Pe=te(O),Oe=te(L),Le=te(T),Te=te(A),Ae=te(D),De=te(R),Re=te(F),Fe=te(j),je=te(z),ze=te(q),qe=te(B),Be=te(G),Ge=te(U),Ue=te(X),Xe=te(Y),Ye=te(V),Ve=te($),$e=te(H),He=te(W),We=te(J),Je=te(K),Ke=te(Z),Ze=te(Q),Qe=te(tt),tn=te(et),en=te(nt),nn=te(it),rn=te(rt),on=te(ot),sn=te(st),an=te(at),ln=te(lt),un=te(ut),cn=te(ct),pn=te(pt),hn=te(ht),fn=te(ft),dn=te(dt),gn=te(gt),_n=te(_t),yn=te(yt),mn=te(mt),vn=te(vt),bn=te(bt),xn=te(xt),wn=te(wt),kn=te(kt),En=te(Et),Sn=te(St),Cn=te(Ct),In=te(It),Nn=te(Nt),Mn=te(Mt),Pn=te(Pt),On=te(Ot),Ln=te(Lt),Tn=te(Tt),An=te(At),Dn=te(Dt),Rn=te(Rt),Fn=te(Ft),jn=ee(jt),zn=ee(zt),qn=ee(qt),Bn=ee(Bt),Gn=ee(Gt),Un=ee(Ut),Xn=te(Xt),Yn=te(Yt),Vn=te(Vt),$n=te($t),Hn=te(Ht),Wn=te(Wt),Jn=te(Jt),Kn=te(Kt),Zn=te(Zt),Qn=te(Qt);Object.keys(jt).forEach((function(t){"default"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return jt[t]}})})),Object.keys(zt).forEach((function(t){"default"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return zt[t]}})})),Object.keys(qt).forEach((function(t){"default"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return qt[t]}})})),Object.keys(Bt).forEach((function(t){"default"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return Bt[t]}})})),Object.keys(Gt).forEach((function(t){"default"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return Gt[t]}})})),Object.keys(Ut).forEach((function(t){"default"!==t&&Object.defineProperty(e,t,{enumerable:!0,get:function(){return Ut[t]}})})),Object.defineProperty(e,"isolines",{enumerable:!0,get:function(){return ne.default}}),Object.defineProperty(e,"convex",{enumerable:!0,get:function(){return ie.default}}),Object.defineProperty(e,"pointsWithinPolygon",{enumerable:!0,get:function(){return re.default}}),Object.defineProperty(e,"within",{enumerable:!0,get:function(){return re.default}}),Object.defineProperty(e,"concave",{enumerable:!0,get:function(){return oe.default}}),Object.defineProperty(e,"collect",{enumerable:!0,get:function(){return se.default}}),Object.defineProperty(e,"flip",{enumerable:!0,get:function(){return ae.default}}),Object.defineProperty(e,"simplify",{enumerable:!0,get:function(){return le.default}}),Object.defineProperty(e,"bezier",{enumerable:!0,get:function(){return ue.default}}),Object.defineProperty(e,"bezierSpline",{enumerable:!0,get:function(){return ue.default}}),Object.defineProperty(e,"tag",{enumerable:!0,get:function(){return ce.default}}),Object.defineProperty(e,"sample",{enumerable:!0,get:function(){return pe.default}}),Object.defineProperty(e,"envelope",{enumerable:!0,get:function(){return he.default}}),Object.defineProperty(e,"square",{enumerable:!0,get:function(){return fe.default}}),Object.defineProperty(e,"circle",{enumerable:!0,get:function(){return de.default}}),Object.defineProperty(e,"midpoint",{enumerable:!0,get:function(){return ge.default}}),Object.defineProperty(e,"center",{enumerable:!0,get:function(){return _e.default}}),Object.defineProperty(e,"centerOfMass",{enumerable:!0,get:function(){return ye.default}}),Object.defineProperty(e,"centroid",{enumerable:!0,get:function(){return me.default}}),Object.defineProperty(e,"combine",{enumerable:!0,get:function(){return ve.default}}),Object.defineProperty(e,"distance",{enumerable:!0,get:function(){return be.default}}),Object.defineProperty(e,"explode",{enumerable:!0,get:function(){return xe.default}}),Object.defineProperty(e,"bbox",{enumerable:!0,get:function(){return we.default}}),Object.defineProperty(e,"tesselate",{enumerable:!0,get:function(){return ke.default}}),Object.defineProperty(e,"bboxPolygon",{enumerable:!0,get:function(){return Ee.default}}),Object.defineProperty(e,"booleanPointInPolygon",{enumerable:!0,get:function(){return Se.default}}),Object.defineProperty(e,"inside",{enumerable:!0,get:function(){return Se.default}}),Object.defineProperty(e,"nearest",{enumerable:!0,get:function(){return Ce.default}}),Object.defineProperty(e,"nearestPoint",{enumerable:!0,get:function(){return Ce.default}}),Object.defineProperty(e,"nearestPointOnLine",{enumerable:!0,get:function(){return Ie.default}}),Object.defineProperty(e,"pointOnLine",{enumerable:!0,get:function(){return Ie.default}}),Object.defineProperty(e,"nearestPointToLine",{enumerable:!0,get:function(){return Ne.default}}),Object.defineProperty(e,"planepoint",{enumerable:!0,get:function(){return Me.default}}),Object.defineProperty(e,"tin",{enumerable:!0,get:function(){return Pe.default}}),Object.defineProperty(e,"bearing",{enumerable:!0,get:function(){return Oe.default}}),Object.defineProperty(e,"destination",{enumerable:!0,get:function(){return Le.default}}),Object.defineProperty(e,"kinks",{enumerable:!0,get:function(){return Te.default}}),Object.defineProperty(e,"pointOnFeature",{enumerable:!0,get:function(){return Ae.default}}),Object.defineProperty(e,"pointOnSurface",{enumerable:!0,get:function(){return Ae.default}}),Object.defineProperty(e,"area",{enumerable:!0,get:function(){return De.default}}),Object.defineProperty(e,"along",{enumerable:!0,get:function(){return Re.default}}),Object.defineProperty(e,"length",{enumerable:!0,get:function(){return Fe.default}}),Object.defineProperty(e,"lineDistance",{enumerable:!0,get:function(){return Fe.default}}),Object.defineProperty(e,"lineSlice",{enumerable:!0,get:function(){return je.default}}),Object.defineProperty(e,"lineSliceAlong",{enumerable:!0,get:function(){return ze.default}}),Object.defineProperty(e,"pointGrid",{enumerable:!0,get:function(){return qe.default}}),Object.defineProperty(e,"truncate",{enumerable:!0,get:function(){return Be.default}}),Object.defineProperty(e,"flatten",{enumerable:!0,get:function(){return Ge.default}}),Object.defineProperty(e,"lineIntersect",{enumerable:!0,get:function(){return Ue.default}}),Object.defineProperty(e,"lineChunk",{enumerable:!0,get:function(){return Xe.default}}),Object.defineProperty(e,"unkinkPolygon",{enumerable:!0,get:function(){return Ye.default}}),Object.defineProperty(e,"greatCircle",{enumerable:!0,get:function(){return Ve.default}}),Object.defineProperty(e,"lineSegment",{enumerable:!0,get:function(){return $e.default}}),Object.defineProperty(e,"lineSplit",{enumerable:!0,get:function(){return He.default}}),Object.defineProperty(e,"lineArc",{enumerable:!0,get:function(){return We.default}}),Object.defineProperty(e,"polygonToLine",{enumerable:!0,get:function(){return Je.default}}),Object.defineProperty(e,"polygonToLineString",{enumerable:!0,get:function(){return Je.default}}),Object.defineProperty(e,"lineStringToPolygon",{enumerable:!0,get:function(){return Ke.default}}),Object.defineProperty(e,"lineToPolygon",{enumerable:!0,get:function(){return Ke.default}}),Object.defineProperty(e,"bboxClip",{enumerable:!0,get:function(){return Ze.default}}),Object.defineProperty(e,"lineOverlap",{enumerable:!0,get:function(){return Qe.default}}),Object.defineProperty(e,"sector",{enumerable:!0,get:function(){return tn.default}}),Object.defineProperty(e,"rhumbBearing",{enumerable:!0,get:function(){return en.default}}),Object.defineProperty(e,"rhumbDistance",{enumerable:!0,get:function(){return nn.default}}),Object.defineProperty(e,"rhumbDestination",{enumerable:!0,get:function(){return rn.default}}),Object.defineProperty(e,"polygonTangents",{enumerable:!0,get:function(){return on.default}}),Object.defineProperty(e,"rewind",{enumerable:!0,get:function(){return sn.default}}),Object.defineProperty(e,"isobands",{enumerable:!0,get:function(){return an.default}}),Object.defineProperty(e,"transformRotate",{enumerable:!0,get:function(){return ln.default}}),Object.defineProperty(e,"transformScale",{enumerable:!0,get:function(){return un.default}}),Object.defineProperty(e,"transformTranslate",{enumerable:!0,get:function(){return cn.default}}),Object.defineProperty(e,"lineOffset",{enumerable:!0,get:function(){return pn.default}}),Object.defineProperty(e,"polygonize",{enumerable:!0,get:function(){return hn.default}}),Object.defineProperty(e,"booleanDisjoint",{enumerable:!0,get:function(){return fn.default}}),Object.defineProperty(e,"booleanContains",{enumerable:!0,get:function(){return dn.default}}),Object.defineProperty(e,"booleanCrosses",{enumerable:!0,get:function(){return gn.default}}),Object.defineProperty(e,"booleanClockwise",{enumerable:!0,get:function(){return _n.default}}),Object.defineProperty(e,"booleanOverlap",{enumerable:!0,get:function(){return yn.default}}),Object.defineProperty(e,"booleanPointOnLine",{enumerable:!0,get:function(){return mn.default}}),Object.defineProperty(e,"booleanEqual",{enumerable:!0,get:function(){return vn.default}}),Object.defineProperty(e,"booleanWithin",{enumerable:!0,get:function(){return bn.default}}),Object.defineProperty(e,"booleanIntersects",{enumerable:!0,get:function(){return xn.default}}),Object.defineProperty(e,"clone",{enumerable:!0,get:function(){return wn.default}}),Object.defineProperty(e,"cleanCoords",{enumerable:!0,get:function(){return kn.default}}),Object.defineProperty(e,"clustersDbscan",{enumerable:!0,get:function(){return En.default}}),Object.defineProperty(e,"clustersKmeans",{enumerable:!0,get:function(){return Sn.default}}),Object.defineProperty(e,"pointToLineDistance",{enumerable:!0,get:function(){return Cn.default}}),Object.defineProperty(e,"booleanParallel",{enumerable:!0,get:function(){return In.default}}),Object.defineProperty(e,"shortestPath",{enumerable:!0,get:function(){return Nn.default}}),Object.defineProperty(e,"voronoi",{enumerable:!0,get:function(){return Mn.default}}),Object.defineProperty(e,"ellipse",{enumerable:!0,get:function(){return Pn.default}}),Object.defineProperty(e,"centerMean",{enumerable:!0,get:function(){return On.default}}),Object.defineProperty(e,"centerMedian",{enumerable:!0,get:function(){return Ln.default}}),Object.defineProperty(e,"standardDeviationalEllipse",{enumerable:!0,get:function(){return Tn.default}}),Object.defineProperty(e,"angle",{enumerable:!0,get:function(){return An.default}}),Object.defineProperty(e,"polygonSmooth",{enumerable:!0,get:function(){return Dn.default}}),Object.defineProperty(e,"moranIndex",{enumerable:!0,get:function(){return Rn.default}}),Object.defineProperty(e,"distanceWeight",{enumerable:!0,get:function(){return Fn.default}}),e.projection=jn,e.random=zn,e.clusters=qn,Object.defineProperty(e,"bearingToAngle",{enumerable:!0,get:function(){return Bt.bearingToAzimuth}}),Object.defineProperty(e,"convertDistance",{enumerable:!0,get:function(){return Bt.convertLength}}),Object.defineProperty(e,"degrees2radians",{enumerable:!0,get:function(){return Bt.degreesToRadians}}),Object.defineProperty(e,"distanceToDegrees",{enumerable:!0,get:function(){return Bt.lengthToDegrees}}),Object.defineProperty(e,"distanceToRadians",{enumerable:!0,get:function(){return Bt.lengthToRadians}}),e.helpers=Bn,Object.defineProperty(e,"radians2degrees",{enumerable:!0,get:function(){return Bt.radiansToDegrees}}),Object.defineProperty(e,"radiansToDistance",{enumerable:!0,get:function(){return Bt.radiansToLength}}),e.invariant=Gn,e.meta=Un,Object.defineProperty(e,"difference",{enumerable:!0,get:function(){return Xn.default}}),Object.defineProperty(e,"buffer",{enumerable:!0,get:function(){return Yn.default}}),Object.defineProperty(e,"union",{enumerable:!0,get:function(){return Vn.default}}),Object.defineProperty(e,"intersect",{enumerable:!0,get:function(){return $n.default}}),Object.defineProperty(e,"dissolve",{enumerable:!0,get:function(){return Hn.default}}),Object.defineProperty(e,"hexGrid",{enumerable:!0,get:function(){return Wn.default}}),Object.defineProperty(e,"mask",{enumerable:!0,get:function(){return Jn.default}}),Object.defineProperty(e,"squareGrid",{enumerable:!0,get:function(){return Kn.default}}),Object.defineProperty(e,"triangleGrid",{enumerable:!0,get:function(){return Zn.default}}),Object.defineProperty(e,"interpolate",{enumerable:!0,get:function(){return Qn.default}})},2057:function(t,e,n){"use strict";var i=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});var r=i(n(9004)),o=n(8506),s=n(8967);e.default=function(t,e,n){void 0===n&&(n={});var i=o.getGeom(t),a=o.getGeom(e),l=r.default.union(i.coordinates,a.coordinates);return 0===l.length?null:1===l.length?s.polygon(l[0],n.properties):s.multiPolygon(l,n.properties)}},7911:(t,e,n)=>{"use strict";var i=n(8421),r=n(8967),o=n(7314),s=n(7849),a=n(2446);function l(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var u=l(o),c=l(s),p=l(a);function h(t,e){if(!t||!e)return!1;if(t.length!==e.length)return!1;for(var n=0,i=t.length;n=1||l<=0||u>=1||u<=0))){var _=g,y=!o[_];y&&(o[_]=!0),e?r.push(e(g,t,n,c,p,l,s,a,f,d,u,y)):r.push(g)}}function y(t,e){var n,r,o,s,a=i[t][e],l=i[t][e+1];return a[0]w[e.isect].coord?-1:1})),f=[];O.length>0;){var R=O.pop(),F=R.isect,j=R.parent,z=R.winding,q=f.length,B=[w[F].coord],G=F;if(w[F].ringAndEdge1Walkable)var U=w[F].ringAndEdge1,X=w[F].nxtIsectAlongRingAndEdge1;else U=w[F].ringAndEdge2,X=w[F].nxtIsectAlongRingAndEdge2;for(;!m(w[F].coord,w[X].coord);){B.push(w[X].coord);var Y=void 0;for(i=0;i1)for(e=0;e=0==e}function y(t){for(var e=0,n=0;nr;){if(o-r>600){var a=o-r+1,l=i-r+1,u=Math.log(a),c=.5*Math.exp(2*u/3),p=.5*Math.sqrt(u*c*(a-c)/a)*(l-a/2<0?-1:1);t(n,i,Math.max(r,Math.floor(i-l*c/a+p)),Math.min(o,Math.floor(i+(a-l)*c/a+p)),s)}var h=n[i],f=r,d=o;for(e(n,r,i),s(n[o],h)>0&&e(n,r,o);f0;)d--}0===s(n[r],h)?e(n,r,d):e(n,++d,o),d<=i&&(r=d+1),i<=d&&(o=d-1)}}function e(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function n(t,e){return te?1:0}return function(e,i,r,o,s){t(e,i,r||0,o||e.length-1,s||n)}}()},7314:(t,e,n)=>{"use strict";t.exports=r,t.exports.default=r;var i=n(7342);function r(t,e){if(!(this instanceof r))return new r(t,e);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),e&&this._initFormat(e),this.clear()}function o(t,e,n){if(!n)return e.indexOf(t);for(var i=0;i=t.minX&&e.maxY>=t.minY}function g(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function _(t,e,n,r,o){for(var s,a=[e,n];a.length;)(n=a.pop())-(e=a.pop())<=r||(s=e+Math.ceil((n-e)/r/2)*r,i(t,s,e,n,o),a.push(e,s,s,n))}r.prototype={all:function(){return this._all(this.data,[])},search:function(t){var e=this.data,n=[],i=this.toBBox;if(!d(t,e))return n;for(var r,o,s,a,l=[];e;){for(r=0,o=e.children.length;r=0&&o[e].children.length>this._maxEntries;)this._split(o,e),e--;this._adjustParentBBoxes(r,o,e)},_split:function(t,e){var n=t[e],i=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,i);var o=this._chooseSplitIndex(n,r,i),a=g(n.children.splice(o,n.children.length-o));a.height=n.height,a.leaf=n.leaf,s(n,this.toBBox),s(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(n,a)},_splitRoot:function(t,e){this.data=g([t,e]),this.data.height=t.height+1,this.data.leaf=!1,s(this.data,this.toBBox)},_chooseSplitIndex:function(t,e,n){var i,r,o,s,l,u,c,h,f,d,g,_,y,m;for(u=c=1/0,i=e;i<=n-e;i++)f=r=a(t,0,i,this.toBBox),d=o=a(t,i,n,this.toBBox),void 0,void 0,void 0,void 0,g=Math.max(f.minX,d.minX),_=Math.max(f.minY,d.minY),y=Math.min(f.maxX,d.maxX),m=Math.min(f.maxY,d.maxY),s=Math.max(0,y-g)*Math.max(0,m-_),l=p(r)+p(o),s=e;r--)o=t.children[r],l(c,t.leaf?s(o):o),p+=h(c);return p},_adjustParentBBoxes:function(t,e,n){for(var i=n;i>=0;i--)l(e[i],t)},_condense:function(t){for(var e,n=t.length-1;n>=0;n--)0===t[n].children.length?n>0?(e=t[n-1].children).splice(e.indexOf(t[n]),1):this.clear():s(t[n],this.toBBox)},_initFormat:function(t){var e=["return a"," - b",";"];this.compareMinX=new Function("a","b",e.join(t[0])),this.compareMinY=new Function("a","b",e.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}},1356:(t,e,n)=>{"use strict";var i=n(8967),r=n(8506),o=n(3227);function s(t){return(t=t.slice()).push(t[0]),i.polygon([t])}function a(t,e){if(e=e||{},!i.isObject(e))throw new Error("options is invalid");var n=e.bbox||[-180,-85,180,85];if(!t)throw new Error("points is required");if(!Array.isArray(n))throw new Error("bbox is invalid");return r.collectionOf(t,"Point","points"),i.featureCollection(o.voronoi().x((function(t){return t.geometry.coordinates[0]})).y((function(t){return t.geometry.coordinates[1]})).extent([[n[0],n[1]],[n[2],n[3]]]).polygons(t.features).map(s))}t.exports=a,t.exports.default=a},8075:(t,e,n)=>{"use strict";var i=n(453),r=n(487),o=r(i("String.prototype.indexOf"));t.exports=function(t,e){var n=i(t,!!e);return"function"==typeof n&&o(t,".prototype.")>-1?r(n):n}},487:(t,e,n)=>{"use strict";var i=n(717),r=n(453),o=n(6897),s=r("%TypeError%"),a=r("%Function.prototype.apply%"),l=r("%Function.prototype.call%"),u=r("%Reflect.apply%",!0)||i.call(l,a),c=r("%Object.defineProperty%",!0),p=r("%Math.max%");if(c)try{c({},"a",{value:1})}catch(t){c=null}t.exports=function(t){if("function"!=typeof t)throw new s("a function is required");var e=u(i,l,arguments);return o(e,1+p(0,t.length-(arguments.length-1)),!0)};var h=function(){return u(i,a,arguments)};c?c(t.exports,"apply",{value:h}):t.exports.apply=h},8211:t=>{"use strict";var e=Object.prototype.toString,n=Math.max,i=function(t,e){for(var n=[],i=0;i{"use strict";var i=n(8211);t.exports=Function.prototype.bind||i},1582:(t,e,n)=>{"use strict";var i=n(5341),r=n(4262),o=n(1476),s=n(3467).orient2d;function a(t,e,n){e=Math.max(0,void 0===e?2:e),n=n||0;var r=function(t){for(var e=t[0],n=t[0],i=t[0],r=t[0],s=0;si[0]&&(i=a),a[1]r[1]&&(r=a)}var l=[e,n,i,r],u=l.slice();for(s=0;s=2&&f(e[e.length-2],e[e.length-1],t[n])<=0;)e.pop();e.push(t[n])}for(var i=[],r=t.length-1;r>=0;r--){for(;i.length>=2&&f(i[i.length-2],i[i.length-1],t[r])<=0;)i.pop();i.push(t[r])}return i.pop(),e.pop(),e.concat(i)}(u)}(t),s=new i(16);s.toBBox=function(t){return{minX:t[0],minY:t[1],maxX:t[0],maxY:t[1]}},s.compareMinX=function(t,e){return t[0]-e[0]},s.compareMinY=function(t,e){return t[1]-e[1]},s.load(t);for(var a,u=[],c=0;cs||l.push({node:d,dist:g})}for(;l.length&&!l.peek().node.children;){var _=l.pop(),m=_.node,v=y(m,e,n),b=y(m,i,o);if(_.dist=e.minX&&t[0]<=e.maxX&&t[1]>=e.minY&&t[1]<=e.maxY}function h(t,e,n){for(var i,r,o,s,a=Math.min(t[0],e[0]),l=Math.min(t[1],e[1]),u=Math.max(t[0],e[0]),c=Math.max(t[1],e[1]),p=n.search({minX:a,minY:l,maxX:u,maxY:c}),h=0;h0!=f(i,r,s)>0&&f(o,s,i)>0!=f(o,s,r)>0)return!1;return!0}function f(t,e,n){return s(t[0],t[1],e[0],e[1],n[0],n[1])}function d(t){var e=t.p,n=t.next.p;return t.minX=Math.min(e[0],n[0]),t.minY=Math.min(e[1],n[1]),t.maxX=Math.max(e[0],n[0]),t.maxY=Math.max(e[1],n[1]),t}function g(t,e){var n={p:t,prev:null,next:null,minX:0,minY:0,maxX:0,maxY:0};return e?(n.next=e.next,n.prev=e,e.next.prev=n,e.next=n):(n.prev=n,n.next=n),n}function _(t,e){var n=t[0]-e[0],i=t[1]-e[1];return n*n+i*i}function y(t,e,n){var i=e[0],r=e[1],o=n[0]-i,s=n[1]-r;if(0!==o||0!==s){var a=((t[0]-i)*o+(t[1]-r)*s)/(o*o+s*s);a>1?(i=n[0],r=n[1]):a>0&&(i+=o*a,r+=s*a)}return(o=t[0]-i)*o+(s=t[1]-r)*s}function m(t,e,n,i,r,o,s,a){var l,u,c,p,h=n-t,f=i-e,d=s-r,g=a-o,_=t-r,y=e-o,m=h*h+f*f,v=h*d+f*g,b=d*d+g*g,x=h*_+f*y,w=d*_+g*y,k=m*b-v*v,E=k,S=k;0===k?(u=0,E=1,p=w,S=b):(p=m*w-v*x,(u=v*w-b*x)<0?(u=0,p=w,S=b):u>E&&(u=E,p=w+v,S=b)),p<0?(p=0,-x<0?u=0:-x>m?u=E:(u=-x,E=m)):p>S&&(p=S,-x+v<0?u=0:-x+v>m?u=E:(u=-x+v,E=m));var C=(1-(c=0===p?0:p/S))*r+c*s-((1-(l=0===u?0:u/E))*t+l*n),I=(1-c)*o+c*a-((1-l)*e+l*i);return C*C+I*I}function v(t,e){return t[0]===e[0]?t[1]-e[1]:t[0]-e[0]}r.default&&(r=r.default),t.exports=a,t.exports.default=a},1715:(t,e,n)=>{"use strict";function i(){return new r}function r(){this.reset()}n.r(e),n.d(e,{geoAlbers:()=>wi,geoAlbersUsa:()=>ki,geoArea:()=>W,geoAzimuthalEqualArea:()=>Ii,geoAzimuthalEqualAreaRaw:()=>Ci,geoAzimuthalEquidistant:()=>Mi,geoAzimuthalEquidistantRaw:()=>Ni,geoBounds:()=>Bt,geoCentroid:()=>ee,geoCircle:()=>he,geoClipExtent:()=>Se,geoConicConformal:()=>Di,geoConicConformalRaw:()=>Ai,geoConicEqualArea:()=>xi,geoConicEqualAreaRaw:()=>bi,geoConicEquidistant:()=>zi,geoConicEquidistantRaw:()=>ji,geoContains:()=>He,geoDistance:()=>ze,geoEquirectangular:()=>Fi,geoEquirectangularRaw:()=>Ri,geoGnomonic:()=>Bi,geoGnomonicRaw:()=>qi,geoGraticule:()=>Ke,geoGraticule10:()=>Ze,geoIdentity:()=>Ui,geoInterpolate:()=>Qe,geoLength:()=>Re,geoMercator:()=>Oi,geoMercatorRaw:()=>Pi,geoNaturalEarth1:()=>Yi,geoNaturalEarth1Raw:()=>Xi,geoOrthographic:()=>$i,geoOrthographicRaw:()=>Vi,geoPath:()=>ii,geoProjection:()=>yi,geoProjectionMutator:()=>mi,geoRotation:()=>ue,geoStereographic:()=>Wi,geoStereographicRaw:()=>Hi,geoStream:()=>R,geoTransform:()=>li,geoTransverseMercator:()=>Ki,geoTransverseMercatorRaw:()=>Ji}),r.prototype={constructor:r,reset:function(){this.s=this.t=0},add:function(t){s(o,t,this.t),s(this,o.s,this.s),this.s?this.t+=o.t:this.s=o.t},valueOf:function(){return this.s}};var o=new r;function s(t,e,n){var i=t.s=e+n,r=i-e,o=i-r;t.t=e-o+(n-r)}var a=1e-6,l=1e-12,u=Math.PI,c=u/2,p=u/4,h=2*u,f=180/u,d=u/180,g=Math.abs,_=Math.atan,y=Math.atan2,m=Math.cos,v=Math.ceil,b=Math.exp,x=(Math.floor,Math.log),w=Math.pow,k=Math.sin,E=Math.sign||function(t){return t>0?1:t<0?-1:0},S=Math.sqrt,C=Math.tan;function I(t){return t>1?0:t<-1?u:Math.acos(t)}function N(t){return t>1?c:t<-1?-c:Math.asin(t)}function M(t){return(t=k(t/2))*t}function P(){}function O(t,e){t&&T.hasOwnProperty(t.type)&&T[t.type](t,e)}var L={Feature:function(t,e){O(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,i=-1,r=n.length;++i=0?1:-1,r=i*n,o=m(e=(e*=d)/2+p),s=k(e),a=B*s,l=q*o+a*m(r),u=a*i*k(r);G.add(y(u,l)),z=t,q=o,B=s}function W(t){return U.reset(),R(t,X),2*U}function J(t){return[y(t[1],t[0]),N(t[2])]}function K(t){var e=t[0],n=t[1],i=m(n);return[i*m(e),i*k(e),k(n)]}function Z(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Q(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function tt(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function et(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function nt(t){var e=S(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var it,rt,ot,st,at,lt,ut,ct,pt,ht,ft,dt,gt,_t,yt,mt,vt,bt,xt,wt,kt,Et,St,Ct,It,Nt,Mt=i(),Pt={point:Ot,lineStart:Tt,lineEnd:At,polygonStart:function(){Pt.point=Dt,Pt.lineStart=Rt,Pt.lineEnd=Ft,Mt.reset(),X.polygonStart()},polygonEnd:function(){X.polygonEnd(),Pt.point=Ot,Pt.lineStart=Tt,Pt.lineEnd=At,G<0?(it=-(ot=180),rt=-(st=90)):Mt>a?st=90:Mt<-a&&(rt=-90),ht[0]=it,ht[1]=ot}};function Ot(t,e){pt.push(ht=[it=t,ot=t]),est&&(st=e)}function Lt(t,e){var n=K([t*d,e*d]);if(ct){var i=Q(ct,n),r=Q([i[1],-i[0],0],i);nt(r),r=J(r);var o,s=t-at,a=s>0?1:-1,l=r[0]*f*a,u=g(s)>180;u^(a*atst&&(st=o):u^(a*at<(l=(l+360)%360-180)&&lst&&(st=e)),u?tjt(it,ot)&&(ot=t):jt(t,ot)>jt(it,ot)&&(it=t):ot>=it?(tot&&(ot=t)):t>at?jt(it,t)>jt(it,ot)&&(ot=t):jt(t,ot)>jt(it,ot)&&(it=t)}else pt.push(ht=[it=t,ot=t]);est&&(st=e),ct=n,at=t}function Tt(){Pt.point=Lt}function At(){ht[0]=it,ht[1]=ot,Pt.point=Ot,ct=null}function Dt(t,e){if(ct){var n=t-at;Mt.add(g(n)>180?n+(n>0?360:-360):n)}else lt=t,ut=e;X.point(t,e),Lt(t,e)}function Rt(){X.lineStart()}function Ft(){Dt(lt,ut),X.lineEnd(),g(Mt)>a&&(it=-(ot=180)),ht[0]=it,ht[1]=ot,ct=null}function jt(t,e){return(e-=t)<0?e+360:e}function zt(t,e){return t[0]-e[0]}function qt(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:ejt(i[0],i[1])&&(i[1]=r[1]),jt(r[0],i[1])>jt(i[0],i[1])&&(i[0]=r[0])):o.push(i=r);for(s=-1/0,e=0,i=o[n=o.length-1];e<=n;i=r,++e)r=o[e],(a=jt(i[1],r[0]))>s&&(s=a,it=r[0],ot=i[1])}return pt=ht=null,it===1/0||rt===1/0?[[NaN,NaN],[NaN,NaN]]:[[it,rt],[ot,st]]}var Gt,Ut,Xt={sphere:P,point:Yt,lineStart:$t,lineEnd:Jt,polygonStart:function(){Xt.lineStart=Kt,Xt.lineEnd=Zt},polygonEnd:function(){Xt.lineStart=$t,Xt.lineEnd=Jt}};function Yt(t,e){t*=d;var n=m(e*=d);Vt(n*m(t),n*k(t),k(e))}function Vt(t,e,n){++ft,gt+=(t-gt)/ft,_t+=(e-_t)/ft,yt+=(n-yt)/ft}function $t(){Xt.point=Ht}function Ht(t,e){t*=d;var n=m(e*=d);Ct=n*m(t),It=n*k(t),Nt=k(e),Xt.point=Wt,Vt(Ct,It,Nt)}function Wt(t,e){t*=d;var n=m(e*=d),i=n*m(t),r=n*k(t),o=k(e),s=y(S((s=It*o-Nt*r)*s+(s=Nt*i-Ct*o)*s+(s=Ct*r-It*i)*s),Ct*i+It*r+Nt*o);dt+=s,mt+=s*(Ct+(Ct=i)),vt+=s*(It+(It=r)),bt+=s*(Nt+(Nt=o)),Vt(Ct,It,Nt)}function Jt(){Xt.point=Yt}function Kt(){Xt.point=Qt}function Zt(){te(Et,St),Xt.point=Yt}function Qt(t,e){Et=t,St=e,t*=d,e*=d,Xt.point=te;var n=m(e);Ct=n*m(t),It=n*k(t),Nt=k(e),Vt(Ct,It,Nt)}function te(t,e){t*=d;var n=m(e*=d),i=n*m(t),r=n*k(t),o=k(e),s=It*o-Nt*r,a=Nt*i-Ct*o,l=Ct*r-It*i,u=S(s*s+a*a+l*l),c=N(u),p=u&&-c/u;xt+=p*s,wt+=p*a,kt+=p*l,dt+=c,mt+=c*(Ct+(Ct=i)),vt+=c*(It+(It=r)),bt+=c*(Nt+(Nt=o)),Vt(Ct,It,Nt)}function ee(t){ft=dt=gt=_t=yt=mt=vt=bt=xt=wt=kt=0,R(t,Xt);var e=xt,n=wt,i=kt,r=e*e+n*n+i*i;return ru?t-h:t<-u?t+h:t,e]}function oe(t,e,n){return(t%=h)?e||n?ie(ae(t),le(e,n)):ae(t):e||n?le(e,n):re}function se(t){return function(e,n){return[(e+=t)>u?e-h:e<-u?e+h:e,n]}}function ae(t){var e=se(t);return e.invert=se(-t),e}function le(t,e){var n=m(t),i=k(t),r=m(e),o=k(e);function s(t,e){var s=m(e),a=m(t)*s,l=k(t)*s,u=k(e),c=u*n+a*i;return[y(l*r-c*o,a*n-u*i),N(c*r+l*o)]}return s.invert=function(t,e){var s=m(e),a=m(t)*s,l=k(t)*s,u=k(e),c=u*r-l*o;return[y(l*r+u*o,a*n+c*i),N(c*n-a*i)]},s}function ue(t){function e(e){return(e=t(e[0]*d,e[1]*d))[0]*=f,e[1]*=f,e}return t=oe(t[0]*d,t[1]*d,t.length>2?t[2]*d:0),e.invert=function(e){return(e=t.invert(e[0]*d,e[1]*d))[0]*=f,e[1]*=f,e},e}function ce(t,e,n,i,r,o){if(n){var s=m(e),a=k(e),l=i*n;null==r?(r=e+i*h,o=e-l/2):(r=pe(s,r),o=pe(s,o),(i>0?ro)&&(r+=i*h));for(var u,c=r;i>0?c>o:c1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function de(t,e){return g(t[0]-e[0])=0;--o)r.point((c=u[o])[0],c[1]);else i(h.x,h.p.x,-1,r);h=h.p}u=(h=h.o).z,f=!f}while(!h.v);r.lineEnd()}}}function ye(t){if(e=t.length){for(var e,n,i=0,r=t[0];++ie?1:t>=e?0:NaN}re.invert=re,1===(Gt=me).length&&(Ut=Gt,Gt=function(t,e){return me(Ut(t),e)});var ve=Array.prototype;function be(t){for(var e,n,i,r=t.length,o=-1,s=0;++o=0;)for(e=(i=t[r]).length;--e>=0;)n[--s]=i[e];return n}function xe(t,e,n){t=+t,e=+e,n=(r=arguments.length)<2?(e=t,t=0,1):r<3?1:+n;for(var i=-1,r=0|Math.max(0,Math.ceil((e-t)/n)),o=new Array(r);++i0)do{l.point(0===c||3===c?t:n,c>1?i:e)}while((c=(c+a+4)%4)!==p);else l.point(o[0],o[1])}function s(i,r){return g(i[0]-t)0?0:3:g(i[0]-n)0?2:1:g(i[1]-e)0?1:0:r>0?3:2}function l(t,e){return u(t.x,e.x)}function u(t,e){var n=s(t,1),i=s(e,1);return n!==i?n-i:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(s){var a,u,c,p,h,f,d,g,_,y,m,v=s,b=fe(),x={point:w,lineStart:function(){x.point=k,u&&u.push(c=[]),y=!0,_=!1,d=g=NaN},lineEnd:function(){a&&(k(p,h),f&&_&&b.rejoin(),a.push(b.result())),x.point=w,_&&v.lineEnd()},polygonStart:function(){v=b,a=[],u=[],m=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,r=u.length;ni&&(h-o)*(i-s)>(f-s)*(t-o)&&++e:f<=i&&(h-o)*(i-s)<(f-s)*(t-o)&&--e;return e}(),n=m&&e,r=(a=be(a)).length;(n||r)&&(s.polygonStart(),n&&(s.lineStart(),o(null,null,1,s),s.lineEnd()),r&&_e(a,l,e,o,s),s.polygonEnd()),v=s,a=u=c=null}};function w(t,e){r(t,e)&&v.point(t,e)}function k(o,s){var a=r(o,s);if(u&&c.push([o,s]),y)p=o,h=s,f=a,y=!1,a&&(v.lineStart(),v.point(o,s));else if(a&&_)v.point(o,s);else{var l=[d=Math.max(ke,Math.min(we,d)),g=Math.max(ke,Math.min(we,g))],b=[o=Math.max(ke,Math.min(we,o)),s=Math.max(ke,Math.min(we,s))];!function(t,e,n,i,r,o){var s,a=t[0],l=t[1],u=0,c=1,p=e[0]-a,h=e[1]-l;if(s=n-a,p||!(s>0)){if(s/=p,p<0){if(s0){if(s>c)return;s>u&&(u=s)}if(s=r-a,p||!(s<0)){if(s/=p,p<0){if(s>c)return;s>u&&(u=s)}else if(p>0){if(s0)){if(s/=h,h<0){if(s0){if(s>c)return;s>u&&(u=s)}if(s=o-l,h||!(s<0)){if(s/=h,h<0){if(s>c)return;s>u&&(u=s)}else if(h>0){if(s0&&(t[0]=a+u*p,t[1]=l+u*h),c<1&&(e[0]=a+c*p,e[1]=l+c*h),!0}}}}}(l,b,t,e,n,i)?a&&(v.lineStart(),v.point(o,s),m=!1):(_||(v.lineStart(),v.point(l[0],l[1])),v.point(b[0],b[1]),a||v.lineEnd(),m=!1)}d=o,g=s,_=a}return x}}function Se(){var t,e,n,i=0,r=0,o=960,s=500;return n={stream:function(n){return t&&e===n?t:t=Ee(i,r,o,s)(e=n)},extent:function(a){return arguments.length?(i=+a[0][0],r=+a[0][1],o=+a[1][0],s=+a[1][1],t=e=null,n):[[i,r],[o,s]]}}}var Ce=i();function Ie(t,e){var n=e[0],i=e[1],r=[k(n),-m(n),0],o=0,s=0;Ce.reset();for(var l=0,c=t.length;l=0?1:-1,L=O*P,T=L>u,A=b*I;if(Ce.add(y(A*O*k(L),x*M+A*m(L))),o+=T?P+O*h:P,T^_>=n^S>=n){var D=Q(K(g),K(E));nt(D);var R=Q(r,D);nt(R);var F=(T^P>=0?-1:1)*N(R[2]);(i>F||i===F&&(D[0]||D[1]))&&(s+=T^P>=0?1:-1)}}return(o<-a||oa})).map(u)).concat(xe(v(o/d)*d,r,d).filter((function(t){return g(t%y)>a})).map(c))}return b.lines=function(){return x().map((function(t){return{type:"LineString",coordinates:t}}))},b.outline=function(){return{type:"Polygon",coordinates:[p(i).concat(h(s).slice(1),p(n).reverse().slice(1),h(l).reverse().slice(1))]}},b.extent=function(t){return arguments.length?b.extentMajor(t).extentMinor(t):b.extentMinor()},b.extentMajor=function(t){return arguments.length?(i=+t[0][0],n=+t[1][0],l=+t[0][1],s=+t[1][1],i>n&&(t=i,i=n,n=t),l>s&&(t=l,l=s,s=t),b.precision(m)):[[i,l],[n,s]]},b.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],o=+n[0][1],r=+n[1][1],e>t&&(n=e,e=t,t=n),o>r&&(n=o,o=r,r=n),b.precision(m)):[[e,o],[t,r]]},b.step=function(t){return arguments.length?b.stepMajor(t).stepMinor(t):b.stepMinor()},b.stepMajor=function(t){return arguments.length?(_=+t[0],y=+t[1],b):[_,y]},b.stepMinor=function(t){return arguments.length?(f=+t[0],d=+t[1],b):[f,d]},b.precision=function(a){return arguments.length?(m=+a,u=We(o,r,90),c=Je(e,t,m),p=We(l,s,90),h=Je(i,n,m),b):m},b.extentMajor([[-180,-90+a],[180,90-a]]).extentMinor([[-180,-80-a],[180,80+a]])}function Ze(){return Ke()()}function Qe(t,e){var n=t[0]*d,i=t[1]*d,r=e[0]*d,o=e[1]*d,s=m(i),a=k(i),l=m(o),u=k(o),c=s*m(n),p=s*k(n),h=l*m(r),g=l*k(r),_=2*N(S(M(o-i)+s*l*M(r-n))),v=k(_),b=_?function(t){var e=k(t*=_)/v,n=k(_-t)/v,i=n*c+e*h,r=n*p+e*g,o=n*a+e*u;return[y(r,i)*f,y(o,S(i*i+r*r))*f]}:function(){return[n*f,i*f]};return b.distance=_,b}function tn(t){return t}var en,nn,rn,on,sn=i(),an=i(),ln={point:P,lineStart:P,lineEnd:P,polygonStart:function(){ln.lineStart=un,ln.lineEnd=hn},polygonEnd:function(){ln.lineStart=ln.lineEnd=ln.point=P,sn.add(g(an)),an.reset()},result:function(){var t=sn/2;return sn.reset(),t}};function un(){ln.point=cn}function cn(t,e){ln.point=pn,en=rn=t,nn=on=e}function pn(t,e){an.add(on*t-rn*e),rn=t,on=e}function hn(){pn(en,nn)}const fn=ln;var dn=1/0,gn=dn,_n=-dn,yn=_n,mn={point:function(t,e){t_n&&(_n=t),eyn&&(yn=e)},lineStart:P,lineEnd:P,polygonStart:P,polygonEnd:P,result:function(){var t=[[dn,gn],[_n,yn]];return _n=yn=-(gn=dn=1/0),t}};const vn=mn;var bn,xn,wn,kn,En=0,Sn=0,Cn=0,In=0,Nn=0,Mn=0,Pn=0,On=0,Ln=0,Tn={point:An,lineStart:Dn,lineEnd:jn,polygonStart:function(){Tn.lineStart=zn,Tn.lineEnd=qn},polygonEnd:function(){Tn.point=An,Tn.lineStart=Dn,Tn.lineEnd=jn},result:function(){var t=Ln?[Pn/Ln,On/Ln]:Mn?[In/Mn,Nn/Mn]:Cn?[En/Cn,Sn/Cn]:[NaN,NaN];return En=Sn=Cn=In=Nn=Mn=Pn=On=Ln=0,t}};function An(t,e){En+=t,Sn+=e,++Cn}function Dn(){Tn.point=Rn}function Rn(t,e){Tn.point=Fn,An(wn=t,kn=e)}function Fn(t,e){var n=t-wn,i=e-kn,r=S(n*n+i*i);In+=r*(wn+t)/2,Nn+=r*(kn+e)/2,Mn+=r,An(wn=t,kn=e)}function jn(){Tn.point=An}function zn(){Tn.point=Bn}function qn(){Gn(bn,xn)}function Bn(t,e){Tn.point=Gn,An(bn=wn=t,xn=kn=e)}function Gn(t,e){var n=t-wn,i=e-kn,r=S(n*n+i*i);In+=r*(wn+t)/2,Nn+=r*(kn+e)/2,Mn+=r,Pn+=(r=kn*t-wn*e)*(wn+t),On+=r*(kn+e),Ln+=3*r,An(wn=t,kn=e)}const Un=Tn;function Xn(t){this._context=t}Xn.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,h)}},result:P};var Yn,Vn,$n,Hn,Wn,Jn=i(),Kn={point:P,lineStart:function(){Kn.point=Zn},lineEnd:function(){Yn&&Qn(Vn,$n),Kn.point=P},polygonStart:function(){Yn=!0},polygonEnd:function(){Yn=null},result:function(){var t=+Jn;return Jn.reset(),t}};function Zn(t,e){Kn.point=Qn,Vn=Hn=t,$n=Wn=e}function Qn(t,e){Hn-=t,Wn-=e,Jn.add(S(Hn*Hn+Wn*Wn)),Hn=t,Wn=e}const ti=Kn;function ei(){this._string=[]}function ni(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function ii(t,e){var n,i,r=4.5;function o(t){return t&&("function"==typeof r&&i.pointRadius(+r.apply(this,arguments)),R(t,n(i))),i.result()}return o.area=function(t){return R(t,n(fn)),fn.result()},o.measure=function(t){return R(t,n(ti)),ti.result()},o.bounds=function(t){return R(t,n(vn)),vn.result()},o.centroid=function(t){return R(t,n(Un)),Un.result()},o.projection=function(e){return arguments.length?(n=null==e?(t=null,tn):(t=e).stream,o):t},o.context=function(t){return arguments.length?(i=null==t?(e=null,new ei):new Xn(e=t),"function"!=typeof r&&i.pointRadius(r),o):e},o.pointRadius=function(t){return arguments.length?(r="function"==typeof t?t:(i.pointRadius(+t),+t),o):r},o.projection(t).context(e)}function ri(t,e,n,i){return function(r,o){var s,a,l,u=e(o),c=r.invert(i[0],i[1]),p=fe(),h=e(p),f=!1,d={point:g,lineStart:y,lineEnd:m,polygonStart:function(){d.point=v,d.lineStart=b,d.lineEnd=x,a=[],s=[]},polygonEnd:function(){d.point=g,d.lineStart=y,d.lineEnd=m,a=be(a);var t=Ie(s,c);a.length?(f||(o.polygonStart(),f=!0),_e(a,si,t,n,o)):t&&(f||(o.polygonStart(),f=!0),o.lineStart(),n(null,null,1,o),o.lineEnd()),f&&(o.polygonEnd(),f=!1),a=s=null},sphere:function(){o.polygonStart(),o.lineStart(),n(null,null,1,o),o.lineEnd(),o.polygonEnd()}};function g(e,n){var i=r(e,n);t(e=i[0],n=i[1])&&o.point(e,n)}function _(t,e){var n=r(t,e);u.point(n[0],n[1])}function y(){d.point=_,u.lineStart()}function m(){d.point=g,u.lineEnd()}function v(t,e){l.push([t,e]);var n=r(t,e);h.point(n[0],n[1])}function b(){h.lineStart(),l=[]}function x(){v(l[0][0],l[0][1]),h.lineEnd();var t,e,n,i,r=h.clean(),u=p.result(),c=u.length;if(l.pop(),s.push(l),l=null,c)if(1&r){if((e=(n=u[0]).length-1)>0){for(f||(o.polygonStart(),f=!0),o.lineStart(),t=0;t1&&2&r&&u.push(u.pop().concat(u.shift())),a.push(u.filter(oi))}return d}}function oi(t){return t.length>1}function si(t,e){return((t=t.x)[0]<0?t[1]-c-a:c-t[1])-((e=e.x)[0]<0?e[1]-c-a:c-e[1])}ei.prototype={_radius:4.5,_circle:ni(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=ni(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};const ai=ri((function(){return!0}),(function(t){var e,n=NaN,i=NaN,r=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,s){var l=o>0?u:-u,p=g(o-n);g(p-u)0?c:-c),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(l,i),t.point(o,i),e=0):r!==l&&p>=u&&(g(n-r)a?_((k(e)*(o=m(i))*k(n)-k(i)*(r=m(e))*k(t))/(r*o*s)):(e+i)/2}(n,i,o,s),t.point(r,i),t.lineEnd(),t.lineStart(),t.point(l,i),e=0),t.point(n=o,i=s),r=l},lineEnd:function(){t.lineEnd(),n=i=NaN},clean:function(){return 2-e}}}),(function(t,e,n,i){var r;if(null==t)r=n*c,i.point(-u,r),i.point(0,r),i.point(u,r),i.point(u,0),i.point(u,-r),i.point(0,-r),i.point(-u,-r),i.point(-u,0),i.point(-u,r);else if(g(t[0]-e[0])>a){var o=t[0]4*e&&m--){var k=s+f,E=l+d,C=u+_,I=S(k*k+E*E+C*C),M=N(C/=I),P=g(g(C)-1)e||g((b*A+x*D)/w-.5)>.3||s*f+l*d+u*_0,r=g(n)>a;function o(t,e){return m(t)*m(e)>n}function s(t,e,i){var r=[1,0,0],o=Q(K(t),K(e)),s=Z(o,o),l=o[0],c=s-l*l;if(!c)return!i&&t;var p=n*s/c,h=-n*l/c,f=Q(r,o),d=et(r,p);tt(d,et(o,h));var _=f,y=Z(d,_),m=Z(_,_),v=y*y-m*(Z(d,d)-1);if(!(v<0)){var b=S(v),x=et(_,(-y-b)/m);if(tt(x,d),x=J(x),!i)return x;var w,k=t[0],E=e[0],C=t[1],I=e[1];E0^x[1]<(g(x[0]-k)u^(k<=x[0]&&x[0]<=E)){var P=et(_,(-y+b)/m);return tt(P,d),[x,J(P)]}}}function l(e,n){var r=i?t:u-t,o=0;return e<-r?o|=1:e>r&&(o|=2),n<-r?o|=4:n>r&&(o|=8),o}return ri(o,(function(t){var e,n,c,p,h;return{lineStart:function(){p=c=!1,h=1},point:function(f,d){var g,_=[f,d],y=o(f,d),m=i?y?0:l(f,d):y?l(f+(f<0?u:-u),d):0;if(!e&&(p=c=y)&&t.lineStart(),y!==c&&(!(g=s(e,_))||de(e,g)||de(_,g))&&(_[0]+=a,_[1]+=a,y=o(_[0],_[1])),y!==c)h=0,y?(t.lineStart(),g=s(_,e),t.point(g[0],g[1])):(g=s(e,_),t.point(g[0],g[1]),t.lineEnd()),e=g;else if(r&&e&&i^y){var v;m&n||!(v=s(_,e,!0))||(h=0,i?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!y||e&&de(e,_)||t.point(_[0],_[1]),e=_,c=y,n=m},lineEnd:function(){c&&t.lineEnd(),e=null},clean:function(){return h|(p&&c)<<1}}}),(function(n,i,r,o){ce(o,t,e,r,n,i)}),i?[0,-t]:[-u,t-u])}(C=t*d,6*d):(C=null,ai),R()):C*f},L.clipExtent=function(t){return arguments.length?(M=null==t?(N=s=l=c=null,tn):Ee(N=+t[0][0],s=+t[0][1],l=+t[1][0],c=+t[1][1]),R()):null==N?null:[[N,s],[l,c]]},L.scale=function(t){return arguments.length?(_=+t,D()):_},L.translate=function(t){return arguments.length?(y=+t[0],v=+t[1],D()):[y,v]},L.center=function(t){return arguments.length?(b=t[0]%360*d,x=t[1]%360*d,D()):[b*f,x*f]},L.rotate=function(t){return arguments.length?(w=t[0]%360*d,k=t[1]%360*d,E=t.length>2?t[2]%360*d:0,D()):[w*f,k*f,E*f]},L.precision=function(t){return arguments.length?(O=gi(A,P=t*t),R()):S(P)},L.fitExtent=function(t,e){return pi(L,t,e)},L.fitSize=function(t,e){return hi(L,t,e)},function(){return e=t.apply(this,arguments),L.invert=e.invert&&T,D()}}function vi(t){var e=0,n=u/3,i=mi(t),r=i(e,n);return r.parallels=function(t){return arguments.length?i(e=t[0]*d,n=t[1]*d):[e*f,n*f]},r}function bi(t,e){var n=k(t),i=(n+k(e))/2;if(g(i)=.12&&r<.234&&i>=-.425&&i<-.214?l:r>=.166&&r<.234&&i>=-.214&&i<-.115?u:s).invert(t)},p.stream=function(n){return t&&e===n?t:(i=[s.stream(e=n),l.stream(n),u.stream(n)],r=i.length,t={point:function(t,e){for(var n=-1;++n0?e<-c+a&&(e=-c+a):e>c-a&&(e=c-a);var n=r/w(Ti(e),i);return[n*k(i*t),r-n*m(i*t)]}return o.invert=function(t,e){var n=r-e,o=E(i)*S(t*t+n*n);return[y(t,g(n))/i*E(n),2*_(w(r/o,1/i))-c]},o}function Di(){return vi(Ai).scale(109.5).parallels([30,30])}function Ri(t,e){return[t,e]}function Fi(){return yi(Ri).scale(152.63)}function ji(t,e){var n=m(t),i=t===e?k(t):(n-m(e))/(e-t),r=n/i+t;if(g(i)2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}Ni.invert=Si((function(t){return t})),Pi.invert=function(t,e){return[t,2*_(b(e))-c]},Ri.invert=Ri,qi.invert=Si(_),Xi.invert=function(t,e){var n,i=e,r=25;do{var o=i*i,s=o*o;i-=n=(i*(1.007226+o*(.015085+s*(.028874*o-.044475-.005916*s)))-e)/(1.007226+o*(.045255+s*(.259866*o-.311325-.005916*11*s)))}while(g(n)>a&&--r>0);return[t/(.8707+(o=i*i)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),i]},Vi.invert=Si(N),Hi.invert=Si((function(t){return 2*_(t)})),Ji.invert=function(t,e){return[-e,2*_(b(t))-c]}},3227:(t,e,n)=>{"use strict";function i(t){return function(){return t}}function r(t){return t[0]}function o(t){return t[1]}function s(){this._=null}function a(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function l(t,e){var n=e,i=e.R,r=n.U;r?r.L===n?r.L=i:r.R=i:t._=i,i.U=r,n.U=i,n.R=i.L,n.R&&(n.R.U=n),i.L=n}function u(t,e){var n=e,i=e.L,r=n.U;r?r.L===n?r.L=i:r.R=i:t._=i,i.U=r,n.U=i,n.L=i.R,n.L&&(n.L.U=n),i.R=n}function c(t){for(;t.L;)t=t.L;return t}n.r(e),n.d(e,{voronoi:()=>B}),s.prototype={constructor:s,insert:function(t,e){var n,i,r;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=c(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(i=n.U).L?(r=i.R)&&r.C?(n.C=r.C=!1,i.C=!0,t=i):(t===n.R&&(l(this,n),n=(t=n).U),n.C=!1,i.C=!0,u(this,i)):(r=i.L)&&r.C?(n.C=r.C=!1,i.C=!0,t=i):(t===n.L&&(u(this,n),n=(t=n).U),n.C=!1,i.C=!0,l(this,i)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,i,r=t.U,o=t.L,s=t.R;if(n=o?s?c(s):o:s,r?r.L===t?r.L=n:r.R=n:this._=n,o&&s?(i=n.C,n.C=t.C,n.L=o,o.U=n,n!==s?(r=n.U,n.U=t.U,t=n.R,r.L=t,n.R=s,s.U=n):(n.U=r,r=n,t=n.R)):(i=t.C,t=n),t&&(t.U=r),!i)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===r.L){if((e=r.R).C&&(e.C=!1,r.C=!0,l(this,r),e=r.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,u(this,e),e=r.R),e.C=r.C,r.C=e.R.C=!1,l(this,r),t=this._;break}}else if((e=r.L).C&&(e.C=!1,r.C=!0,u(this,r),e=r.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,l(this,e),e=r.L),e.C=r.C,r.C=e.L.C=!1,u(this,r),t=this._;break}e.C=!0,t=r,r=r.U}while(!t.C);t&&(t.C=!1)}}};const p=s;function h(t,e,n,i){var r=[null,null],o=R.push(r)-1;return r.left=t,r.right=e,n&&d(r,t,e,n),i&&d(r,e,t,i),A[t.index].halfedges.push(o),A[e.index].halfedges.push(o),r}function f(t,e,n){var i=[e,n];return i.left=t,i}function d(t,e,n,i){t[0]||t[1]?t.left===n?t[1]=i:t[0]=i:(t[0]=i,t.left=e,t.right=n)}function g(t,e,n,i,r){var o,s=t[0],a=t[1],l=s[0],u=s[1],c=0,p=1,h=a[0]-l,f=a[1]-u;if(o=e-l,h||!(o>0)){if(o/=h,h<0){if(o0){if(o>p)return;o>c&&(c=o)}if(o=i-l,h||!(o<0)){if(o/=h,h<0){if(o>p)return;o>c&&(c=o)}else if(h>0){if(o0)){if(o/=f,f<0){if(o0){if(o>p)return;o>c&&(c=o)}if(o=r-u,f||!(o<0)){if(o/=f,f<0){if(o>p)return;o>c&&(c=o)}else if(f>0){if(o0||p<1)||(c>0&&(t[0]=[l+c*h,u+c*f]),p<1&&(t[1]=[l+p*h,u+p*f]),!0)}}}}}function _(t,e,n,i,r){var o=t[1];if(o)return!0;var s,a,l=t[0],u=t.left,c=t.right,p=u[0],h=u[1],f=c[0],d=c[1],g=(p+f)/2,_=(h+d)/2;if(d===h){if(g=i)return;if(p>f){if(l){if(l[1]>=r)return}else l=[g,n];o=[g,r]}else{if(l){if(l[1]1)if(p>f){if(l){if(l[1]>=r)return}else l=[(n-a)/s,n];o=[(r-a)/s,r]}else{if(l){if(l[1]=i)return}else l=[e,s*e+a];o=[i,s*i+a]}else{if(l){if(l[0]=-j)){var f=l*l+u*u,d=c*c+p*p,g=(p*f-u*d)/h,_=(l*d-c*f)/h,y=x.pop()||new w;y.arc=t,y.site=r,y.x=g+s,y.y=(y.cy=_+a)+Math.sqrt(g*g+_*_),t.circle=y;for(var m=null,v=D._;v;)if(y.yF)a=a.L;else{if(!((r=o-L(a,s))>F)){i>-F?(e=a.P,n=a):r>-F?(e=a,n=a.N):e=n=a;break}if(!a.R){e=a;break}a=a.R}!function(t){A[t.index]={site:t,halfedges:[]}}(t);var l=I(t);if(T.insert(e,l),e||n){if(e===n)return E(e),n=I(e.site),T.insert(l,n),l.edge=n.edge=h(e.site,l.site),k(e),void k(n);if(n){E(e),E(n);var u=e.site,c=u[0],p=u[1],f=t[0]-c,g=t[1]-p,_=n.site,y=_[0]-c,m=_[1]-p,v=2*(f*m-g*y),b=f*f+g*g,x=y*y+m*m,w=[(m*b-g*x)/v+c,(f*x-y*b)/v+p];d(n.edge,u,_,w),l.edge=h(u,t,null,w),n.edge=h(t,_,null,w),k(e),k(n)}else l.edge=h(e.site,l.site)}}function O(t,e){var n=t.site,i=n[0],r=n[1],o=r-e;if(!o)return i;var s=t.P;if(!s)return-1/0;var a=(n=s.site)[0],l=n[1],u=l-e;if(!u)return a;var c=a-i,p=1/o-1/u,h=c/u;return p?(-h+Math.sqrt(h*h-2*p*(c*c/(-2*u)-l+u/2+r-o/2)))/p+i:(i+a)/2}function L(t,e){var n=t.N;if(n)return O(n,e);var i=t.site;return i[1]===e?i[0]:1/0}var T,A,D,R,F=1e-6,j=1e-12;function z(t,e){return e[1]-t[1]||e[0]-t[0]}function q(t,e){var n,i,r,o=t.sort(z).pop();for(R=[],A=new Array(t.length),T=new p,D=new p;;)if(r=b,o&&(!r||o[1]F||Math.abs(r[0][1]-r[1][1])>F)||delete R[o]}(s,a,l,u),function(t,e,n,i){var r,o,s,a,l,u,c,p,h,d,g,_,y=A.length,b=!0;for(r=0;rF||Math.abs(_-h)>F)&&(l.splice(a,0,R.push(f(s,d,Math.abs(g-t)F?[t,Math.abs(p-t)F?[Math.abs(h-i)F?[n,Math.abs(p-n)F?[Math.abs(h-e)=a)return null;var l=t-r.site[0],u=e-r.site[1],c=l*l+u*u;do{r=o.cells[i=s],s=null,r.halfedges.forEach((function(n){var i=o.edges[n],a=i.left;if(a!==r.site&&a||(a=i.right)){var l=t-a[0],u=e-a[1],p=l*l+u*u;p{var i=n(1189),r=n(7244),o=n(7653),s=n(4035),a=n(1589),l=n(9739),u=Date.prototype.getTime;function c(t){return null==t}function p(t){return!(!t||"object"!=typeof t||"number"!=typeof t.length||"function"!=typeof t.copy||"function"!=typeof t.slice||t.length>0&&"number"!=typeof t[0])}t.exports=function t(e,n,h){var f=h||{};return!!(f.strict?o(e,n):e===n)||(!e||!n||"object"!=typeof e&&"object"!=typeof n?f.strict?o(e,n):e==n:function(e,n,o){var h,f;if(typeof e!=typeof n)return!1;if(c(e)||c(n))return!1;if(e.prototype!==n.prototype)return!1;if(r(e)!==r(n))return!1;var d=s(e),g=s(n);if(d!==g)return!1;if(d||g)return e.source===n.source&&a(e)===a(n);if(l(e)&&l(n))return u.call(e)===u.call(n);var _=p(e),y=p(n);if(_!==y)return!1;if(_||y){if(e.length!==n.length)return!1;for(h=0;h=0;h--)if(m[h]!=v[h])return!1;for(h=m.length-1;h>=0;h--)if(!t(e[f=m[h]],n[f],o))return!1;return!0}(e,n,f))}},41:(t,e,n)=>{"use strict";var i=n(592)(),r=n(453),o=i&&r("%Object.defineProperty%",!0);if(o)try{o({},"a",{value:1})}catch(t){o=!1}var s=r("%SyntaxError%"),a=r("%TypeError%"),l=n(5795);t.exports=function(t,e,n){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new a("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new a("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new a("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new a("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new a("`loose`, if provided, must be a boolean");var i=arguments.length>3?arguments[3]:null,r=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,c=arguments.length>6&&arguments[6],p=!!l&&l(t,e);if(o)o(t,e,{configurable:null===u&&p?p.configurable:!u,enumerable:null===i&&p?p.enumerable:!i,value:n,writable:null===r&&p?p.writable:!r});else{if(!c&&(i||r||u))throw new s("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=n}}},8452:(t,e,n)=>{"use strict";var i=n(1189),r="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),o=Object.prototype.toString,s=Array.prototype.concat,a=n(41),l=n(592)(),u=function(t,e,n,i){if(e in t)if(!0===i){if(t[e]===n)return}else if("function"!=typeof(r=i)||"[object Function]"!==o.call(r)||!i())return;var r;l?a(t,e,n,!0):a(t,e,n)},c=function(t,e){var n=arguments.length>2?arguments[2]:{},o=i(e);r&&(o=s.call(o,Object.getOwnPropertySymbols(e)));for(var a=0;a{function e(t,e,n,i){this.dataset=[],this.epsilon=1,this.minPts=2,this.distance=this._euclideanDistance,this.clusters=[],this.noise=[],this._visited=[],this._assigned=[],this._datasetLength=0,this._init(t,e,n,i)}e.prototype.run=function(t,e,n,i){this._init(t,e,n,i);for(var r=0;r=this.minPts&&(e=this._mergeArrays(e,r))}1!==this._assigned[i]&&this._addToCluster(i,t)}},e.prototype._addToCluster=function(t,e){this.clusters[e].push(t),this._assigned[t]=1},e.prototype._regionQuery=function(t){for(var e=[],n=0;n{function e(t,e,n){this.k=3,this.dataset=[],this.assignments=[],this.centroids=[],this.init(t,e,n)}e.prototype.init=function(t,e,n){this.assignments=[],this.centroids=[],void 0!==t&&(this.dataset=t),void 0!==e&&(this.k=e),void 0!==n&&(this.distance=n)},e.prototype.run=function(t,e){this.init(t,e);for(var n=this.dataset.length,i=0;i0){for(l=0;l=0);return t},e.prototype.assign=function(){for(var t,e=!1,n=this.dataset.length,i=0;i{if(t.exports)var i=n(1283);function r(t,e,n,i){this.epsilon=1,this.minPts=1,this.distance=this._euclideanDistance,this._reachability=[],this._processed=[],this._coreDistance=0,this._orderedList=[],this._init(t,e,n,i)}r.prototype.run=function(t,e,n,r){this._init(t,e,n,r);for(var o=0,s=this.dataset.length;o=this.minPts)return n},r.prototype._regionQuery=function(t,e){e=e||this.epsilon;for(var n=[],i=0,r=this.dataset.length;i{function e(t,e,n){this._queue=[],this._priorities=[],this._sorting="desc",this._init(t,e,n)}e.prototype.insert=function(t,e){for(var n=this._queue.length,i=n;i--;){var r=this._priorities[i];"desc"===this._sorting?e>r&&(n=i):e{t.exports&&(t.exports={DBSCAN:n(3509),KMEANS:n(2347),OPTICS:n(5172),PriorityQueue:n(1283)})},6570:t=>{"use strict";function e(t,e,i){i=i||2;var o,s,a,l,p,h,d,g=e&&e.length,_=g?e[0]*i:t.length,y=n(t,0,_,i,!0),m=[];if(!y||y.next===y.prev)return m;if(g&&(y=function(t,e,i,r){var o,s,a,l=[];for(o=0,s=e.length;o80*i){o=a=t[0],s=l=t[1];for(var v=i;v<_;v+=i)(p=t[v])a&&(a=p),h>l&&(l=h);d=0!==(d=Math.max(a-o,l-s))?32767/d:0}return r(y,m,i,o,s,d,0),m}function n(t,e,n,i,r){var o,s;if(r===C(t,e,n,i)>0)for(o=e;o=e;o-=i)s=k(o,t[o],t[o+1],s);return s&&y(s,s.next)&&(E(s),s=s.next),s}function i(t,e){if(!t)return t;e||(e=t);var n,i=t;do{if(n=!1,i.steiner||!y(i,i.next)&&0!==_(i.prev,i,i.next))i=i.next;else{if(E(i),(i=e=i.prev)===i.next)break;n=!0}}while(n||i!==e);return e}function r(t,e,n,u,c,p,f){if(t){!f&&p&&function(t,e,n,i){var r=t;do{0===r.z&&(r.z=h(r.x,r.y,e,n,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next}while(r!==t);r.prevZ.nextZ=null,r.prevZ=null,function(t){var e,n,i,r,o,s,a,l,u=1;do{for(n=t,t=null,o=null,s=0;n;){for(s++,i=n,a=0,e=0;e0||l>0&&i;)0!==a&&(0===l||!i||n.z<=i.z)?(r=n,n=n.nextZ,a--):(r=i,i=i.nextZ,l--),o?o.nextZ=r:t=r,r.prevZ=o,o=r;n=i}o.nextZ=null,u*=2}while(s>1)}(r)}(t,u,c,p);for(var d,g,_=t;t.prev!==t.next;)if(d=t.prev,g=t.next,p?s(t,u,c,p):o(t))e.push(d.i/n|0),e.push(t.i/n|0),e.push(g.i/n|0),E(t),t=g.next,_=g.next;else if((t=g)===_){f?1===f?r(t=a(i(t),e,n),e,n,u,c,p,2):2===f&&l(t,e,n,u,c,p):r(i(t),e,n,u,c,p,1);break}}}function o(t){var e=t.prev,n=t,i=t.next;if(_(e,n,i)>=0)return!1;for(var r=e.x,o=n.x,s=i.x,a=e.y,l=n.y,u=i.y,c=ro?r>s?r:s:o>s?o:s,f=a>l?a>u?a:u:l>u?l:u,g=i.next;g!==e;){if(g.x>=c&&g.x<=h&&g.y>=p&&g.y<=f&&d(r,a,o,l,s,u,g.x,g.y)&&_(g.prev,g,g.next)>=0)return!1;g=g.next}return!0}function s(t,e,n,i){var r=t.prev,o=t,s=t.next;if(_(r,o,s)>=0)return!1;for(var a=r.x,l=o.x,u=s.x,c=r.y,p=o.y,f=s.y,g=al?a>u?a:u:l>u?l:u,v=c>p?c>f?c:f:p>f?p:f,b=h(g,y,e,n,i),x=h(m,v,e,n,i),w=t.prevZ,k=t.nextZ;w&&w.z>=b&&k&&k.z<=x;){if(w.x>=g&&w.x<=m&&w.y>=y&&w.y<=v&&w!==r&&w!==s&&d(a,c,l,p,u,f,w.x,w.y)&&_(w.prev,w,w.next)>=0)return!1;if(w=w.prevZ,k.x>=g&&k.x<=m&&k.y>=y&&k.y<=v&&k!==r&&k!==s&&d(a,c,l,p,u,f,k.x,k.y)&&_(k.prev,k,k.next)>=0)return!1;k=k.nextZ}for(;w&&w.z>=b;){if(w.x>=g&&w.x<=m&&w.y>=y&&w.y<=v&&w!==r&&w!==s&&d(a,c,l,p,u,f,w.x,w.y)&&_(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;k&&k.z<=x;){if(k.x>=g&&k.x<=m&&k.y>=y&&k.y<=v&&k!==r&&k!==s&&d(a,c,l,p,u,f,k.x,k.y)&&_(k.prev,k,k.next)>=0)return!1;k=k.nextZ}return!0}function a(t,e,n){var r=t;do{var o=r.prev,s=r.next.next;!y(o,s)&&m(o,r,r.next,s)&&x(o,s)&&x(s,o)&&(e.push(o.i/n|0),e.push(r.i/n|0),e.push(s.i/n|0),E(r),E(r.next),r=t=s),r=r.next}while(r!==t);return i(r)}function l(t,e,n,o,s,a){var l=t;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&g(l,u)){var c=w(l,u);return l=i(l,l.next),c=i(c,c.next),r(l,e,n,o,s,a,0),void r(c,e,n,o,s,a,0)}u=u.next}l=l.next}while(l!==t)}function u(t,e){return t.x-e.x}function c(t,e){var n=function(t,e){var n,i=e,r=t.x,o=t.y,s=-1/0;do{if(o<=i.y&&o>=i.next.y&&i.next.y!==i.y){var a=i.x+(o-i.y)*(i.next.x-i.x)/(i.next.y-i.y);if(a<=r&&a>s&&(s=a,n=i.x=i.x&&i.x>=c&&r!==i.x&&d(on.x||i.x===n.x&&p(n,i)))&&(n=i,f=l)),i=i.next}while(i!==u);return n}(t,e);if(!n)return e;var r=w(n,t);return i(r,r.next),i(n,n.next)}function p(t,e){return _(t.prev,t,e.prev)<0&&_(e.next,t,t.next)<0}function h(t,e,n,i,r){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*r|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-i)*r|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function f(t){var e=t,n=t;do{(e.x=(t-s)*(o-a)&&(t-s)*(i-a)>=(n-s)*(e-a)&&(n-s)*(o-a)>=(r-s)*(i-a)}function g(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&m(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(x(t,e)&&x(e,t)&&function(t,e){var n=t,i=!1,r=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&r<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(i=!i),n=n.next}while(n!==t);return i}(t,e)&&(_(t.prev,t,e.prev)||_(t,e.prev,e))||y(t,e)&&_(t.prev,t,t.next)>0&&_(e.prev,e,e.next)>0)}function _(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function y(t,e){return t.x===e.x&&t.y===e.y}function m(t,e,n,i){var r=b(_(t,e,n)),o=b(_(t,e,i)),s=b(_(n,i,t)),a=b(_(n,i,e));return r!==o&&s!==a||!(0!==r||!v(t,n,e))||!(0!==o||!v(t,i,e))||!(0!==s||!v(n,t,i))||!(0!==a||!v(n,e,i))}function v(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function b(t){return t>0?1:t<0?-1:0}function x(t,e){return _(t.prev,t,t.next)<0?_(t,e,t.next)>=0&&_(t,t.prev,e)>=0:_(t,e,t.prev)<0||_(t,t.next,e)<0}function w(t,e){var n=new S(t.i,t.x,t.y),i=new S(e.i,e.x,e.y),r=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=r,r.prev=n,i.next=n,n.prev=i,o.next=i,i.prev=o,i}function k(t,e,n,i){var r=new S(t,e,n);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function E(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function S(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function C(t,e,n,i){for(var r=0,o=e,s=n-i;o0&&(i+=t[r-1].length,n.holes.push(i))}return n}},4462:t=>{"use strict";var e=function(){return"string"==typeof function(){}.name},n=Object.getOwnPropertyDescriptor;if(n)try{n([],"length")}catch(t){n=null}e.functionsHaveConfigurableNames=function(){if(!e()||!n)return!1;var t=n((function(){}),"name");return!!t&&!!t.configurable};var i=Function.prototype.bind;e.boundFunctionsHaveNames=function(){return e()&&"function"==typeof i&&""!==function(){}.bind().name},t.exports=e},8635:(t,e,n)=>{var i=n(4982),r=function(t){this.precision=t&&t.precision?t.precision:17,this.direction=!(!t||!t.direction)&&t.direction,this.pseudoNode=!(!t||!t.pseudoNode)&&t.pseudoNode,this.objectComparator=t&&t.objectComparator?t.objectComparator:a};function o(t){return t.coordinates.map((function(e){return{type:t.type.replace("Multi",""),coordinates:e}}))}function s(t,e){return t.hasOwnProperty("coordinates")?t.coordinates.length===e.coordinates.length:t.length===e.length}function a(t,e){return i(t,e,{strict:!0})}r.prototype.compare=function(t,e){if(t.type!==e.type||!s(t,e))return!1;switch(t.type){case"Point":return this.compareCoord(t.coordinates,e.coordinates);case"LineString":return this.compareLine(t.coordinates,e.coordinates,0,!1);case"Polygon":return this.comparePolygon(t,e);case"Feature":return this.compareFeature(t,e);default:if(0===t.type.indexOf("Multi")){var n=this,i=o(t),r=o(e);return i.every((function(t){return this.some((function(e){return n.compare(t,e)}))}),r)}}return!1},r.prototype.compareCoord=function(t,e){if(t.length!==e.length)return!1;for(var n=0;n=0&&(n=[].concat(t.slice(i,t.length),t.slice(1,i+1))),n},r.prototype.comparePath=function(t,e){var n=this;return t.every((function(t,e){return n.compareCoord(t,this[e])}),e)},r.prototype.comparePolygon=function(t,e){if(this.compareLine(t.coordinates[0],e.coordinates[0],1,!0)){var n=t.coordinates.slice(1,t.coordinates.length),i=e.coordinates.slice(1,e.coordinates.length),r=this;return n.every((function(t){return this.some((function(e){return r.compareLine(t,e,1,!0)}))}),i)}return!1},r.prototype.compareFeature=function(t,e){return!(t.id!==e.id||!this.objectComparator(t.properties,e.properties)||!this.compareBBox(t,e))&&this.compare(t.geometry,e.geometry)},r.prototype.compareBBox=function(t,e){return!!(!t.bbox&&!e.bbox||t.bbox&&e.bbox&&this.compareCoord(t.bbox,e.bbox))},r.prototype.removePseudo=function(t){return t},t.exports=r},4945:(t,e,n)=>{var i=n(5341),r=n(8967),o=n(8421),s=n(4383).default,a=o.featureEach,l=(o.coordEach,r.polygon,r.featureCollection);function u(t){var e=new i(t);return e.insert=function(t){if("Feature"!==t.type)throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:s(t),i.prototype.insert.call(this,t)},e.load=function(t){var e=[];return Array.isArray(t)?t.forEach((function(t){if("Feature"!==t.type)throw new Error("invalid features");t.bbox=t.bbox?t.bbox:s(t),e.push(t)})):a(t,(function(t){if("Feature"!==t.type)throw new Error("invalid features");t.bbox=t.bbox?t.bbox:s(t),e.push(t)})),i.prototype.load.call(this,e)},e.remove=function(t,e){if("Feature"!==t.type)throw new Error("invalid feature");return t.bbox=t.bbox?t.bbox:s(t),i.prototype.remove.call(this,t,e)},e.clear=function(){return i.prototype.clear.call(this)},e.search=function(t){var e=i.prototype.search.call(this,this.toBBox(t));return l(e)},e.collides=function(t){return i.prototype.collides.call(this,this.toBBox(t))},e.all=function(){var t=i.prototype.all.call(this);return l(t)},e.toJSON=function(){return i.prototype.toJSON.call(this)},e.fromJSON=function(t){return i.prototype.fromJSON.call(this,t)},e.toBBox=function(t){var e;if(t.bbox)e=t.bbox;else if(Array.isArray(t)&&4===t.length)e=t;else if(Array.isArray(t)&&6===t.length)e=[t[0],t[1],t[3],t[4]];else if("Feature"===t.type)e=s(t);else{if("FeatureCollection"!==t.type)throw new Error("invalid geojson");e=s(t)}return{minX:e[0],minY:e[1],maxX:e[2],maxY:e[3]}},e}t.exports=u,t.exports.default=u},453:(t,e,n)=>{"use strict";var i,r=SyntaxError,o=Function,s=TypeError,a=function(t){try{return o('"use strict"; return ('+t+").constructor;")()}catch(t){}},l=Object.getOwnPropertyDescriptor;if(l)try{l({},"")}catch(t){l=null}var u=function(){throw new s},c=l?function(){try{return u}catch(t){try{return l(arguments,"callee").get}catch(t){return u}}}():u,p=n(4039)(),h=n(24)(),f=Object.getPrototypeOf||(h?function(t){return t.__proto__}:null),d={},g="undefined"!=typeof Uint8Array&&f?f(Uint8Array):i,_={"%AggregateError%":"undefined"==typeof AggregateError?i:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?i:ArrayBuffer,"%ArrayIteratorPrototype%":p&&f?f([][Symbol.iterator]()):i,"%AsyncFromSyncIteratorPrototype%":i,"%AsyncFunction%":d,"%AsyncGenerator%":d,"%AsyncGeneratorFunction%":d,"%AsyncIteratorPrototype%":d,"%Atomics%":"undefined"==typeof Atomics?i:Atomics,"%BigInt%":"undefined"==typeof BigInt?i:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?i:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?i:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?i:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?i:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?i:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?i:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":d,"%Int8Array%":"undefined"==typeof Int8Array?i:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?i:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?i:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":p&&f?f(f([][Symbol.iterator]())):i,"%JSON%":"object"==typeof JSON?JSON:i,"%Map%":"undefined"==typeof Map?i:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&p&&f?f((new Map)[Symbol.iterator]()):i,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?i:Promise,"%Proxy%":"undefined"==typeof Proxy?i:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?i:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?i:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&p&&f?f((new Set)[Symbol.iterator]()):i,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?i:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":p&&f?f(""[Symbol.iterator]()):i,"%Symbol%":p?Symbol:i,"%SyntaxError%":r,"%ThrowTypeError%":c,"%TypedArray%":g,"%TypeError%":s,"%Uint8Array%":"undefined"==typeof Uint8Array?i:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?i:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?i:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?i:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?i:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?i:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?i:WeakSet};if(f)try{null.error}catch(t){var y=f(f(t));_["%Error.prototype%"]=y}var m=function t(e){var n;if("%AsyncFunction%"===e)n=a("async function () {}");else if("%GeneratorFunction%"===e)n=a("function* () {}");else if("%AsyncGeneratorFunction%"===e)n=a("async function* () {}");else if("%AsyncGenerator%"===e){var i=t("%AsyncGeneratorFunction%");i&&(n=i.prototype)}else if("%AsyncIteratorPrototype%"===e){var r=t("%AsyncGenerator%");r&&f&&(n=f(r.prototype))}return _[e]=n,n},v={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},b=n(6135),x=n(9957),w=b.call(Function.call,Array.prototype.concat),k=b.call(Function.apply,Array.prototype.splice),E=b.call(Function.call,String.prototype.replace),S=b.call(Function.call,String.prototype.slice),C=b.call(Function.call,RegExp.prototype.exec),I=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,N=/\\(\\)?/g,M=function(t,e){var n,i=t;if(x(v,i)&&(i="%"+(n=v[i])[0]+"%"),x(_,i)){var o=_[i];if(o===d&&(o=m(i)),void 0===o&&!e)throw new s("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:o}}throw new r("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new s('"allowMissing" argument must be a boolean');if(null===C(/^%?[^%]*%?$/,t))throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(t){var e=S(t,0,1),n=S(t,-1);if("%"===e&&"%"!==n)throw new r("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==e)throw new r("invalid intrinsic syntax, expected opening `%`");var i=[];return E(t,I,(function(t,e,n,r){i[i.length]=n?E(r,N,"$1"):e||t})),i}(t),i=n.length>0?n[0]:"",o=M("%"+i+"%",e),a=o.name,u=o.value,c=!1,p=o.alias;p&&(i=p[0],k(n,w([0,1],p)));for(var h=1,f=!0;h=n.length){var m=l(u,d);u=(f=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:u[d]}else f=x(u,d),u=u[d];f&&!c&&(_[a]=u)}}return u}},9609:t=>{"use strict";var e=Object.prototype.toString,n=Math.max,i=function(t,e){for(var n=[],i=0;i{"use strict";var i=n(9609);t.exports=Function.prototype.bind||i},5795:(t,e,n)=>{"use strict";var i=n(453)("%Object.getOwnPropertyDescriptor%",!0);if(i)try{i([],"length")}catch(t){i=null}t.exports=i},592:(t,e,n)=>{"use strict";var i=n(453)("%Object.defineProperty%",!0),r=function(){if(i)try{return i({},"a",{value:1}),!0}catch(t){return!1}return!1};r.hasArrayLengthDefineBug=function(){if(!r())return null;try{return 1!==i([],"length",{value:1}).length}catch(t){return!0}},t.exports=r},24:t=>{"use strict";var e={foo:{}},n=Object;t.exports=function(){return{__proto__:e}.foo===e.foo&&!({__proto__:null}instanceof n)}},4039:(t,e,n)=>{"use strict";var i="undefined"!=typeof Symbol&&Symbol,r=n(1333);t.exports=function(){return"function"==typeof i&&"function"==typeof Symbol&&"symbol"==typeof i("foo")&&"symbol"==typeof Symbol("bar")&&r()}},1333:t=>{"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),n=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var i=Object.getOwnPropertySymbols(t);if(1!==i.length||i[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var r=Object.getOwnPropertyDescriptor(t,e);if(42!==r.value||!0!==r.enumerable)return!1}return!0}},9092:(t,e,n)=>{"use strict";var i=n(1333);t.exports=function(){return i()&&!!Symbol.toStringTag}},9957:(t,e,n)=>{"use strict";var i=Function.prototype.call,r=Object.prototype.hasOwnProperty,o=n(3639);t.exports=o.call(i,r)},4921:t=>{"use strict";var e=Object.prototype.toString,n=Math.max,i=function(t,e){for(var n=[],i=0;i{"use strict";var i=n(4921);t.exports=Function.prototype.bind||i},7244:(t,e,n)=>{"use strict";var i=n(9092)(),r=n(8075)("Object.prototype.toString"),o=function(t){return!(i&&t&&"object"==typeof t&&Symbol.toStringTag in t)&&"[object Arguments]"===r(t)},s=function(t){return!!o(t)||null!==t&&"object"==typeof t&&"number"==typeof t.length&&t.length>=0&&"[object Array]"!==r(t)&&"[object Function]"===r(t.callee)},a=function(){return o(arguments)}();o.isLegacyArguments=s,t.exports=a?o:s},9739:(t,e,n)=>{"use strict";var i=Date.prototype.getDay,r=Object.prototype.toString,o=n(9092)();t.exports=function(t){return"object"==typeof t&&null!==t&&(o?function(t){try{return i.call(t),!0}catch(t){return!1}}(t):"[object Date]"===r.call(t))}},4035:(t,e,n)=>{"use strict";var i,r,o,s,a=n(8075),l=n(9092)();if(l){i=a("Object.prototype.hasOwnProperty"),r=a("RegExp.prototype.exec"),o={};var u=function(){throw o};s={toString:u,valueOf:u},"symbol"==typeof Symbol.toPrimitive&&(s[Symbol.toPrimitive]=u)}var c=a("Object.prototype.toString"),p=Object.getOwnPropertyDescriptor;t.exports=l?function(t){if(!t||"object"!=typeof t)return!1;var e=p(t,"lastIndex");if(!e||!i(e,"value"))return!1;try{r(t,s)}catch(t){return t===o}}:function(t){return!(!t||"object"!=typeof t&&"function"!=typeof t)&&"[object RegExp]"===c(t)}},4692:function(t,e){var n;!function(e,n){"use strict";"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)}("undefined"!=typeof window?window:this,(function(i,r){"use strict";var o=[],s=Object.getPrototypeOf,a=o.slice,l=o.flat?function(t){return o.flat.call(t)}:function(t){return o.concat.apply([],t)},u=o.push,c=o.indexOf,p={},h=p.toString,f=p.hasOwnProperty,d=f.toString,g=d.call(Object),_={},y=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType&&"function"!=typeof t.item},m=function(t){return null!=t&&t===t.window},v=i.document,b={type:!0,src:!0,nonce:!0,noModule:!0};function x(t,e,n){var i,r,o=(n=n||v).createElement("script");if(o.text=t,e)for(i in b)(r=e[i]||e.getAttribute&&e.getAttribute(i))&&o.setAttribute(i,r);n.head.appendChild(o).parentNode.removeChild(o)}function w(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?p[h.call(t)]||"object":typeof t}var k="3.7.1",E=/HTML$/i,S=function(t,e){return new S.fn.init(t,e)};function C(t){var e=!!t&&"length"in t&&t.length,n=w(t);return!y(t)&&!m(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function I(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}S.fn=S.prototype={jquery:k,constructor:S,length:0,toArray:function(){return a.call(this)},get:function(t){return null==t?a.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=S.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return S.each(this,t)},map:function(t){return this.pushStack(S.map(this,(function(e,n){return t.call(e,n,e)})))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(S.grep(this,(function(t,e){return e%2})))},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n+~]|"+O+")"+O+"*"),B=new RegExp(O+"|>"),G=new RegExp(F),U=new RegExp("^"+T+"$"),X={ID:new RegExp("^#("+T+")"),CLASS:new RegExp("^\\.("+T+")"),TAG:new RegExp("^("+T+"|[*])"),ATTR:new RegExp("^"+A),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+O+"*(even|odd|(([+-]|)(\\d*)n|)"+O+"*(?:([+-]|)"+O+"*(\\d+)|))"+O+"*\\)|)","i"),bool:new RegExp("^(?:"+C+")$","i"),needsContext:new RegExp("^"+O+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+O+"*((?:-\\d)?\\d*)"+O+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,V=/^h\d$/i,$=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,H=/[+~]/,W=new RegExp("\\\\[\\da-fA-F]{1,6}"+O+"?|\\\\([^\\r\\n\\f])","g"),J=function(t,e){var n="0x"+t.slice(1)-65536;return e||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},K=function(){lt()},Z=ht((function(t){return!0===t.disabled&&I(t,"fieldset")}),{dir:"parentNode",next:"legend"});try{g.apply(o=a.call(D.childNodes),D.childNodes),o[D.childNodes.length].nodeType}catch(t){g={apply:function(t,e){R.apply(t,a.call(e))},call:function(t){R.apply(t,a.call(arguments,1))}}}function Q(t,e,n,i){var r,o,s,a,u,c,f,d=e&&e.ownerDocument,m=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==m&&9!==m&&11!==m)return n;if(!i&&(lt(e),e=e||l,p)){if(11!==m&&(u=$.exec(t)))if(r=u[1]){if(9===m){if(!(s=e.getElementById(r)))return n;if(s.id===r)return g.call(n,s),n}else if(d&&(s=d.getElementById(r))&&Q.contains(e,s)&&s.id===r)return g.call(n,s),n}else{if(u[2])return g.apply(n,e.getElementsByTagName(t)),n;if((r=u[3])&&e.getElementsByClassName)return g.apply(n,e.getElementsByClassName(r)),n}if(!(k[t+" "]||h&&h.test(t))){if(f=t,d=e,1===m&&(B.test(t)||q.test(t))){for((d=H.test(t)&&at(e.parentNode)||e)==e&&_.scope||((a=e.getAttribute("id"))?a=S.escapeSelector(a):e.setAttribute("id",a=y)),o=(c=ct(t)).length;o--;)c[o]=(a?"#"+a:":scope")+" "+pt(c[o]);f=c.join(",")}try{return g.apply(n,d.querySelectorAll(f)),n}catch(e){k(t,!0)}finally{a===y&&e.removeAttribute("id")}}}return mt(t.replace(L,"$1"),e,n,i)}function tt(){var t=[];return function n(i,r){return t.push(i+" ")>e.cacheLength&&delete n[t.shift()],n[i+" "]=r}}function et(t){return t[y]=!0,t}function nt(t){var e=l.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function it(t){return function(e){return I(e,"input")&&e.type===t}}function rt(t){return function(e){return(I(e,"input")||I(e,"button"))&&e.type===t}}function ot(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&Z(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function st(t){return et((function(e){return e=+e,et((function(n,i){for(var r,o=t([],n.length,e),s=o.length;s--;)n[r=o[s]]&&(n[r]=!(i[r]=n[r]))}))}))}function at(t){return t&&void 0!==t.getElementsByTagName&&t}function lt(t){var n,i=t?t.ownerDocument||t:D;return i!=l&&9===i.nodeType&&i.documentElement?(u=(l=i).documentElement,p=!S.isXMLDoc(l),d=u.matches||u.webkitMatchesSelector||u.msMatchesSelector,u.msMatchesSelector&&D!=l&&(n=l.defaultView)&&n.top!==n&&n.addEventListener("unload",K),_.getById=nt((function(t){return u.appendChild(t).id=S.expando,!l.getElementsByName||!l.getElementsByName(S.expando).length})),_.disconnectedMatch=nt((function(t){return d.call(t,"*")})),_.scope=nt((function(){return l.querySelectorAll(":scope")})),_.cssHas=nt((function(){try{return l.querySelector(":has(*,:jqfake)"),!1}catch(t){return!0}})),_.getById?(e.filter.ID=function(t){var e=t.replace(W,J);return function(t){return t.getAttribute("id")===e}},e.find.ID=function(t,e){if(void 0!==e.getElementById&&p){var n=e.getElementById(t);return n?[n]:[]}}):(e.filter.ID=function(t){var e=t.replace(W,J);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},e.find.ID=function(t,e){if(void 0!==e.getElementById&&p){var n,i,r,o=e.getElementById(t);if(o){if((n=o.getAttributeNode("id"))&&n.value===t)return[o];for(r=e.getElementsByName(t),i=0;o=r[i++];)if((n=o.getAttributeNode("id"))&&n.value===t)return[o]}return[]}}),e.find.TAG=function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):e.querySelectorAll(t)},e.find.CLASS=function(t,e){if(void 0!==e.getElementsByClassName&&p)return e.getElementsByClassName(t)},h=[],nt((function(t){var e;u.appendChild(t).innerHTML="",t.querySelectorAll("[selected]").length||h.push("\\["+O+"*(?:value|"+C+")"),t.querySelectorAll("[id~="+y+"-]").length||h.push("~="),t.querySelectorAll("a#"+y+"+*").length||h.push(".#.+[+~]"),t.querySelectorAll(":checked").length||h.push(":checked"),(e=l.createElement("input")).setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),u.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&h.push(":enabled",":disabled"),(e=l.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||h.push("\\["+O+"*name"+O+"*="+O+"*(?:''|\"\")")})),_.cssHas||h.push(":has"),h=h.length&&new RegExp(h.join("|")),E=function(t,e){if(t===e)return s=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!_.sortDetached&&e.compareDocumentPosition(t)===n?t===l||t.ownerDocument==D&&Q.contains(D,t)?-1:e===l||e.ownerDocument==D&&Q.contains(D,e)?1:r?c.call(r,t)-c.call(r,e):0:4&n?-1:1)},l):l}for(t in Q.matches=function(t,e){return Q(t,null,null,e)},Q.matchesSelector=function(t,e){if(lt(t),p&&!k[e+" "]&&(!h||!h.test(e)))try{var n=d.call(t,e);if(n||_.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){k(e,!0)}return Q(e,l,null,[t]).length>0},Q.contains=function(t,e){return(t.ownerDocument||t)!=l&<(t),S.contains(t,e)},Q.attr=function(t,n){(t.ownerDocument||t)!=l&<(t);var i=e.attrHandle[n.toLowerCase()],r=i&&f.call(e.attrHandle,n.toLowerCase())?i(t,n,!p):void 0;return void 0!==r?r:t.getAttribute(n)},Q.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},S.uniqueSort=function(t){var e,n=[],i=0,o=0;if(s=!_.sortStable,r=!_.sortStable&&a.call(t,0),M.call(t,E),s){for(;e=t[o++];)e===t[o]&&(i=n.push(o));for(;i--;)P.call(t,n[i],1)}return r=null,t},S.fn.uniqueSort=function(){return this.pushStack(S.uniqueSort(a.apply(this)))},e=S.expr={cacheLength:50,createPseudo:et,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(W,J),t[3]=(t[3]||t[4]||t[5]||"").replace(W,J),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||Q.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&Q.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return X.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&G.test(n)&&(e=ct(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(W,J).toLowerCase();return"*"===t?function(){return!0}:function(t){return I(t,e)}},CLASS:function(t){var e=b[t+" "];return e||(e=new RegExp("(^|"+O+")"+t+"("+O+"|$)"))&&b(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,n){return function(i){var r=Q.attr(i,t);return null==r?"!="===e:!e||(r+="","="===e?r===n:"!="===e?r!==n:"^="===e?n&&0===r.indexOf(n):"*="===e?n&&r.indexOf(n)>-1:"$="===e?n&&r.slice(-n.length)===n:"~="===e?(" "+r.replace(j," ")+" ").indexOf(n)>-1:"|="===e&&(r===n||r.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,i,r){var o="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===i&&0===r?function(t){return!!t.parentNode}:function(e,n,l){var u,c,p,h,f,d=o!==s?"nextSibling":"previousSibling",g=e.parentNode,_=a&&e.nodeName.toLowerCase(),v=!l&&!a,b=!1;if(g){if(o){for(;d;){for(p=e;p=p[d];)if(a?I(p,_):1===p.nodeType)return!1;f=d="only"===t&&!f&&"nextSibling"}return!0}if(f=[s?g.firstChild:g.lastChild],s&&v){for(b=(h=(u=(c=g[y]||(g[y]={}))[t]||[])[0]===m&&u[1])&&u[2],p=h&&g.childNodes[h];p=++h&&p&&p[d]||(b=h=0)||f.pop();)if(1===p.nodeType&&++b&&p===e){c[t]=[m,h,b];break}}else if(v&&(b=h=(u=(c=e[y]||(e[y]={}))[t]||[])[0]===m&&u[1]),!1===b)for(;(p=++h&&p&&p[d]||(b=h=0)||f.pop())&&(!(a?I(p,_):1===p.nodeType)||!++b||(v&&((c=p[y]||(p[y]={}))[t]=[m,b]),p!==e)););return(b-=r)===i||b%i==0&&b/i>=0}}},PSEUDO:function(t,n){var i,r=e.pseudos[t]||e.setFilters[t.toLowerCase()]||Q.error("unsupported pseudo: "+t);return r[y]?r(n):r.length>1?(i=[t,t,"",n],e.setFilters.hasOwnProperty(t.toLowerCase())?et((function(t,e){for(var i,o=r(t,n),s=o.length;s--;)t[i=c.call(t,o[s])]=!(e[i]=o[s])})):function(t){return r(t,0,i)}):r}},pseudos:{not:et((function(t){var e=[],n=[],i=yt(t.replace(L,"$1"));return i[y]?et((function(t,e,n,r){for(var o,s=i(t,null,r,[]),a=t.length;a--;)(o=s[a])&&(t[a]=!(e[a]=o))})):function(t,r,o){return e[0]=t,i(e,null,o,n),e[0]=null,!n.pop()}})),has:et((function(t){return function(e){return Q(t,e).length>0}})),contains:et((function(t){return t=t.replace(W,J),function(e){return(e.textContent||S.text(e)).indexOf(t)>-1}})),lang:et((function(t){return U.test(t||"")||Q.error("unsupported lang: "+t),t=t.replace(W,J).toLowerCase(),function(e){var n;do{if(n=p?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(t){var e=i.location&&i.location.hash;return e&&e.slice(1)===t.id},root:function(t){return t===u},focus:function(t){return t===function(){try{return l.activeElement}catch(t){}}()&&l.hasFocus()&&!!(t.type||t.href||~t.tabIndex)},enabled:ot(!1),disabled:ot(!0),checked:function(t){return I(t,"input")&&!!t.checked||I(t,"option")&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!e.pseudos.empty(t)},header:function(t){return V.test(t.nodeName)},input:function(t){return Y.test(t.nodeName)},button:function(t){return I(t,"input")&&"button"===t.type||I(t,"button")},text:function(t){var e;return I(t,"input")&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:st((function(){return[0]})),last:st((function(t,e){return[e-1]})),eq:st((function(t,e,n){return[n<0?n+e:n]})),even:st((function(t,e){for(var n=0;ne?e:n;--i>=0;)t.push(i);return t})),gt:st((function(t,e,n){for(var i=n<0?n+e:n;++i1?function(e,n,i){for(var r=t.length;r--;)if(!t[r](e,n,i))return!1;return!0}:t[0]}function dt(t,e,n,i,r){for(var o,s=[],a=0,l=t.length,u=null!=e;a-1&&(o[u]=!(s[u]=h))}}else f=dt(f===s?f.splice(y,f.length):f),r?r(null,s,f,l):g.apply(s,f)}))}function _t(t){for(var i,r,o,s=t.length,a=e.relative[t[0].type],l=a||e.relative[" "],u=a?1:0,p=ht((function(t){return t===i}),l,!0),h=ht((function(t){return c.call(i,t)>-1}),l,!0),f=[function(t,e,r){var o=!a&&(r||e!=n)||((i=e).nodeType?p(t,e,r):h(t,e,r));return i=null,o}];u1&&ft(f),u>1&&pt(t.slice(0,u-1).concat({value:" "===t[u-2].type?"*":""})).replace(L,"$1"),r,u0,o=t.length>0,s=function(s,a,u,c,h){var f,d,_,y=0,v="0",b=s&&[],x=[],w=n,k=s||o&&e.find.TAG("*",h),E=m+=null==w?1:Math.random()||.1,C=k.length;for(h&&(n=a==l||a||h);v!==C&&null!=(f=k[v]);v++){if(o&&f){for(d=0,a||f.ownerDocument==l||(lt(f),u=!p);_=t[d++];)if(_(f,a||l,u)){g.call(c,f);break}h&&(m=E)}r&&((f=!_&&f)&&y--,s&&b.push(f))}if(y+=v,r&&v!==y){for(d=0;_=i[d++];)_(b,x,a,u);if(s){if(y>0)for(;v--;)b[v]||x[v]||(x[v]=N.call(c));x=dt(x)}g.apply(c,x),h&&!s&&x.length>0&&y+i.length>1&&S.uniqueSort(c)}return h&&(m=E,n=w),b};return r?et(s):s}(s,o)),a.selector=t}return a}function mt(t,n,i,r){var o,s,a,l,u,c="function"==typeof t&&t,h=!r&&ct(t=c.selector||t);if(i=i||[],1===h.length){if((s=h[0]=h[0].slice(0)).length>2&&"ID"===(a=s[0]).type&&9===n.nodeType&&p&&e.relative[s[1].type]){if(!(n=(e.find.ID(a.matches[0].replace(W,J),n)||[])[0]))return i;c&&(n=n.parentNode),t=t.slice(s.shift().value.length)}for(o=X.needsContext.test(t)?0:s.length;o--&&(a=s[o],!e.relative[l=a.type]);)if((u=e.find[l])&&(r=u(a.matches[0].replace(W,J),H.test(s[0].type)&&at(n.parentNode)||n))){if(s.splice(o,1),!(t=r.length&&pt(s)))return g.apply(i,r),i;break}}return(c||yt(t,h))(r,n,!p,i,!n||H.test(t)&&at(n.parentNode)||n),i}ut.prototype=e.filters=e.pseudos,e.setFilters=new ut,_.sortStable=y.split("").sort(E).join("")===y,lt(),_.sortDetached=nt((function(t){return 1&t.compareDocumentPosition(l.createElement("fieldset"))})),S.find=Q,S.expr[":"]=S.expr.pseudos,S.unique=S.uniqueSort,Q.compile=yt,Q.select=mt,Q.setDocument=lt,Q.tokenize=ct,Q.escape=S.escapeSelector,Q.getText=S.text,Q.isXML=S.isXMLDoc,Q.selectors=S.expr,Q.support=S.support,Q.uniqueSort=S.uniqueSort}();var F=function(t,e,n){for(var i=[],r=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(r&&S(t).is(n))break;i.push(t)}return i},j=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},z=S.expr.match.needsContext,q=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function B(t,e,n){return y(e)?S.grep(t,(function(t,i){return!!e.call(t,i,t)!==n})):e.nodeType?S.grep(t,(function(t){return t===e!==n})):"string"!=typeof e?S.grep(t,(function(t){return c.call(e,t)>-1!==n})):S.filter(e,t,n)}S.filter=function(t,e,n){var i=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===i.nodeType?S.find.matchesSelector(i,t)?[i]:[]:S.find.matches(t,S.grep(e,(function(t){return 1===t.nodeType})))},S.fn.extend({find:function(t){var e,n,i=this.length,r=this;if("string"!=typeof t)return this.pushStack(S(t).filter((function(){for(e=0;e1?S.uniqueSort(n):n},filter:function(t){return this.pushStack(B(this,t||[],!1))},not:function(t){return this.pushStack(B(this,t||[],!0))},is:function(t){return!!B(this,"string"==typeof t&&z.test(t)?S(t):t||[],!1).length}});var G,U=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(t,e,n){var i,r;if(!t)return this;if(n=n||G,"string"==typeof t){if(!(i="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:U.exec(t))||!i[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(i[1]){if(e=e instanceof S?e[0]:e,S.merge(this,S.parseHTML(i[1],e&&e.nodeType?e.ownerDocument||e:v,!0)),q.test(i[1])&&S.isPlainObject(e))for(i in e)y(this[i])?this[i](e[i]):this.attr(i,e[i]);return this}return(r=v.getElementById(i[2]))&&(this[0]=r,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):y(t)?void 0!==n.ready?n.ready(t):t(S):S.makeArray(t,this)}).prototype=S.fn,G=S(v);var X=/^(?:parents|prev(?:Until|All))/,Y={children:!0,contents:!0,next:!0,prev:!0};function V(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}S.fn.extend({has:function(t){var e=S(t,this),n=e.length;return this.filter((function(){for(var t=0;t-1:1===n.nodeType&&S.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?S.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?c.call(S(t),this[0]):c.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),S.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return F(t,"parentNode")},parentsUntil:function(t,e,n){return F(t,"parentNode",n)},next:function(t){return V(t,"nextSibling")},prev:function(t){return V(t,"previousSibling")},nextAll:function(t){return F(t,"nextSibling")},prevAll:function(t){return F(t,"previousSibling")},nextUntil:function(t,e,n){return F(t,"nextSibling",n)},prevUntil:function(t,e,n){return F(t,"previousSibling",n)},siblings:function(t){return j((t.parentNode||{}).firstChild,t)},children:function(t){return j(t.firstChild)},contents:function(t){return null!=t.contentDocument&&s(t.contentDocument)?t.contentDocument:(I(t,"template")&&(t=t.content||t),S.merge([],t.childNodes))}},(function(t,e){S.fn[t]=function(n,i){var r=S.map(this,e,n);return"Until"!==t.slice(-5)&&(i=n),i&&"string"==typeof i&&(r=S.filter(i,r)),this.length>1&&(Y[t]||S.uniqueSort(r),X.test(t)&&r.reverse()),this.pushStack(r)}}));var $=/[^\x20\t\r\n\f]+/g;function H(t){return t}function W(t){throw t}function J(t,e,n,i){var r;try{t&&y(r=t.promise)?r.call(t).done(e).fail(n):t&&y(r=t.then)?r.call(t,e,n):e.apply(void 0,[t].slice(i))}catch(t){n.apply(void 0,[t])}}S.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return S.each(t.match($)||[],(function(t,n){e[n]=!0})),e}(t):S.extend({},t);var e,n,i,r,o=[],s=[],a=-1,l=function(){for(r=r||t.once,i=e=!0;s.length;a=-1)for(n=s.shift();++a-1;)o.splice(n,1),n<=a&&a--})),this},has:function(t){return t?S.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return r=s=[],o=n="",this},disabled:function(){return!o},lock:function(){return r=s=[],n||e||(o=n=""),this},locked:function(){return!!r},fireWith:function(t,n){return r||(n=[t,(n=n||[]).slice?n.slice():n],s.push(n),e||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!i}};return u},S.extend({Deferred:function(t){var e=[["notify","progress",S.Callbacks("memory"),S.Callbacks("memory"),2],["resolve","done",S.Callbacks("once memory"),S.Callbacks("once memory"),0,"resolved"],["reject","fail",S.Callbacks("once memory"),S.Callbacks("once memory"),1,"rejected"]],n="pending",r={state:function(){return n},always:function(){return o.done(arguments).fail(arguments),this},catch:function(t){return r.then(null,t)},pipe:function(){var t=arguments;return S.Deferred((function(n){S.each(e,(function(e,i){var r=y(t[i[4]])&&t[i[4]];o[i[1]]((function(){var t=r&&r.apply(this,arguments);t&&y(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[i[0]+"With"](this,r?[t]:arguments)}))})),t=null})).promise()},then:function(t,n,r){var o=0;function s(t,e,n,r){return function(){var a=this,l=arguments,u=function(){var i,u;if(!(t=o&&(n!==W&&(a=void 0,l=[i]),e.rejectWith(a,l))}};t?c():(S.Deferred.getErrorHook?c.error=S.Deferred.getErrorHook():S.Deferred.getStackHook&&(c.error=S.Deferred.getStackHook()),i.setTimeout(c))}}return S.Deferred((function(i){e[0][3].add(s(0,i,y(r)?r:H,i.notifyWith)),e[1][3].add(s(0,i,y(t)?t:H)),e[2][3].add(s(0,i,y(n)?n:W))})).promise()},promise:function(t){return null!=t?S.extend(t,r):r}},o={};return S.each(e,(function(t,i){var s=i[2],a=i[5];r[i[1]]=s.add,a&&s.add((function(){n=a}),e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),s.add(i[3].fire),o[i[0]]=function(){return o[i[0]+"With"](this===o?void 0:this,arguments),this},o[i[0]+"With"]=s.fireWith})),r.promise(o),t&&t.call(o,o),o},when:function(t){var e=arguments.length,n=e,i=Array(n),r=a.call(arguments),o=S.Deferred(),s=function(t){return function(n){i[t]=this,r[t]=arguments.length>1?a.call(arguments):n,--e||o.resolveWith(i,r)}};if(e<=1&&(J(t,o.done(s(n)).resolve,o.reject,!e),"pending"===o.state()||y(r[n]&&r[n].then)))return o.then();for(;n--;)J(r[n],s(n),o.reject);return o.promise()}});var K=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;S.Deferred.exceptionHook=function(t,e){i.console&&i.console.warn&&t&&K.test(t.name)&&i.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},S.readyException=function(t){i.setTimeout((function(){throw t}))};var Z=S.Deferred();function Q(){v.removeEventListener("DOMContentLoaded",Q),i.removeEventListener("load",Q),S.ready()}S.fn.ready=function(t){return Z.then(t).catch((function(t){S.readyException(t)})),this},S.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--S.readyWait:S.isReady)||(S.isReady=!0,!0!==t&&--S.readyWait>0||Z.resolveWith(v,[S]))}}),S.ready.then=Z.then,"complete"===v.readyState||"loading"!==v.readyState&&!v.documentElement.doScroll?i.setTimeout(S.ready):(v.addEventListener("DOMContentLoaded",Q),i.addEventListener("load",Q));var tt=function(t,e,n,i,r,o,s){var a=0,l=t.length,u=null==n;if("object"===w(n))for(a in r=!0,n)tt(t,e,a,n[a],!0,o,s);else if(void 0!==i&&(r=!0,y(i)||(s=!0),u&&(s?(e.call(t,i),e=null):(u=e,e=function(t,e,n){return u.call(S(t),n)})),e))for(;a1,null,!0)},removeData:function(t){return this.each((function(){lt.remove(this,t)}))}}),S.extend({queue:function(t,e,n){var i;if(t)return e=(e||"fx")+"queue",i=at.get(t,e),n&&(!i||Array.isArray(n)?i=at.access(t,e,S.makeArray(n)):i.push(n)),i||[]},dequeue:function(t,e){e=e||"fx";var n=S.queue(t,e),i=n.length,r=n.shift(),o=S._queueHooks(t,e);"inprogress"===r&&(r=n.shift(),i--),r&&("fx"===e&&n.unshift("inprogress"),delete o.stop,r.call(t,(function(){S.dequeue(t,e)}),o)),!i&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return at.get(t,n)||at.access(t,n,{empty:S.Callbacks("once memory").add((function(){at.remove(t,[e+"queue",n])}))})}}),S.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length\x20\t\r\n\f]*)/i,It=/^$|^module$|\/(?:java|ecma)script/i;kt=v.createDocumentFragment().appendChild(v.createElement("div")),(Et=v.createElement("input")).setAttribute("type","radio"),Et.setAttribute("checked","checked"),Et.setAttribute("name","t"),kt.appendChild(Et),_.checkClone=kt.cloneNode(!0).cloneNode(!0).lastChild.checked,kt.innerHTML="",_.noCloneChecked=!!kt.cloneNode(!0).lastChild.defaultValue,kt.innerHTML="",_.option=!!kt.lastChild;var Nt={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function Mt(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&I(t,e)?S.merge([t],n):n}function Pt(t,e){for(var n=0,i=t.length;n",""]);var Ot=/<|&#?\w+;/;function Lt(t,e,n,i,r){for(var o,s,a,l,u,c,p=e.createDocumentFragment(),h=[],f=0,d=t.length;f-1)r&&r.push(o);else if(u=_t(o),s=Mt(p.appendChild(o),"script"),u&&Pt(s),n)for(c=0;o=s[c++];)It.test(o.type||"")&&n.push(o);return p}var Tt=/^([^.]*)(?:\.(.+)|)/;function At(){return!0}function Dt(){return!1}function Rt(t,e,n,i,r,o){var s,a;if("object"==typeof e){for(a in"string"!=typeof n&&(i=i||n,n=void 0),e)Rt(t,a,n,i,e[a],o);return t}if(null==i&&null==r?(r=n,i=n=void 0):null==r&&("string"==typeof n?(r=i,i=void 0):(r=i,i=n,n=void 0)),!1===r)r=Dt;else if(!r)return t;return 1===o&&(s=r,r=function(t){return S().off(t),s.apply(this,arguments)},r.guid=s.guid||(s.guid=S.guid++)),t.each((function(){S.event.add(this,e,r,i,n)}))}function Ft(t,e,n){n?(at.set(t,e,!1),S.event.add(t,e,{namespace:!1,handler:function(t){var n,i=at.get(this,e);if(1&t.isTrigger&&this[e]){if(i)(S.event.special[e]||{}).delegateType&&t.stopPropagation();else if(i=a.call(arguments),at.set(this,e,i),this[e](),n=at.get(this,e),at.set(this,e,!1),i!==n)return t.stopImmediatePropagation(),t.preventDefault(),n}else i&&(at.set(this,e,S.event.trigger(i[0],i.slice(1),this)),t.stopPropagation(),t.isImmediatePropagationStopped=At)}})):void 0===at.get(t,e)&&S.event.add(t,e,At)}S.event={global:{},add:function(t,e,n,i,r){var o,s,a,l,u,c,p,h,f,d,g,_=at.get(t);if(ot(t))for(n.handler&&(n=(o=n).handler,r=o.selector),r&&S.find.matchesSelector(gt,r),n.guid||(n.guid=S.guid++),(l=_.events)||(l=_.events=Object.create(null)),(s=_.handle)||(s=_.handle=function(e){return void 0!==S&&S.event.triggered!==e.type?S.event.dispatch.apply(t,arguments):void 0}),u=(e=(e||"").match($)||[""]).length;u--;)f=g=(a=Tt.exec(e[u])||[])[1],d=(a[2]||"").split(".").sort(),f&&(p=S.event.special[f]||{},f=(r?p.delegateType:p.bindType)||f,p=S.event.special[f]||{},c=S.extend({type:f,origType:g,data:i,handler:n,guid:n.guid,selector:r,needsContext:r&&S.expr.match.needsContext.test(r),namespace:d.join(".")},o),(h=l[f])||((h=l[f]=[]).delegateCount=0,p.setup&&!1!==p.setup.call(t,i,d,s)||t.addEventListener&&t.addEventListener(f,s)),p.add&&(p.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),r?h.splice(h.delegateCount++,0,c):h.push(c),S.event.global[f]=!0)},remove:function(t,e,n,i,r){var o,s,a,l,u,c,p,h,f,d,g,_=at.hasData(t)&&at.get(t);if(_&&(l=_.events)){for(u=(e=(e||"").match($)||[""]).length;u--;)if(f=g=(a=Tt.exec(e[u])||[])[1],d=(a[2]||"").split(".").sort(),f){for(p=S.event.special[f]||{},h=l[f=(i?p.delegateType:p.bindType)||f]||[],a=a[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=h.length;o--;)c=h[o],!r&&g!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||i&&i!==c.selector&&("**"!==i||!c.selector)||(h.splice(o,1),c.selector&&h.delegateCount--,p.remove&&p.remove.call(t,c));s&&!h.length&&(p.teardown&&!1!==p.teardown.call(t,d,_.handle)||S.removeEvent(t,f,_.handle),delete l[f])}else for(f in l)S.event.remove(t,f+e[u],n,i,!0);S.isEmptyObject(l)&&at.remove(t,"handle events")}},dispatch:function(t){var e,n,i,r,o,s,a=new Array(arguments.length),l=S.event.fix(t),u=(at.get(this,"events")||Object.create(null))[l.type]||[],c=S.event.special[l.type]||{};for(a[0]=l,e=1;e=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==t.type||!0!==u.disabled)){for(o=[],s={},n=0;n-1:S.find(r,this,null,[u]).length),s[r]&&o.push(i);o.length&&a.push({elem:u,handlers:o})}return u=this,l\s*$/g;function Bt(t,e){return I(t,"table")&&I(11!==e.nodeType?e:e.firstChild,"tr")&&S(t).children("tbody")[0]||t}function Gt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Ut(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Xt(t,e){var n,i,r,o,s,a;if(1===e.nodeType){if(at.hasData(t)&&(a=at.get(t).events))for(r in at.remove(e,"handle events"),a)for(n=0,i=a[r].length;n1&&"string"==typeof d&&!_.checkClone&&zt.test(d))return t.each((function(r){var o=t.eq(r);g&&(e[0]=d.call(this,r,o.html())),Vt(o,e,n,i)}));if(h&&(o=(r=Lt(e,t[0].ownerDocument,!1,t,i)).firstChild,1===r.childNodes.length&&(r=o),o||i)){for(a=(s=S.map(Mt(r,"script"),Gt)).length;p0&&Pt(s,!l&&Mt(t,"script")),a},cleanData:function(t){for(var e,n,i,r=S.event.special,o=0;void 0!==(n=t[o]);o++)if(ot(n)){if(e=n[at.expando]){if(e.events)for(i in e.events)r[i]?S.event.remove(n,i):S.removeEvent(n,i,e.handle);n[at.expando]=void 0}n[lt.expando]&&(n[lt.expando]=void 0)}}}),S.fn.extend({detach:function(t){return $t(this,t,!0)},remove:function(t){return $t(this,t)},text:function(t){return tt(this,(function(t){return void 0===t?S.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)}))}),null,t,arguments.length)},append:function(){return Vt(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Bt(this,t).appendChild(t)}))},prepend:function(){return Vt(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Bt(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return Vt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return Vt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(S.cleanData(Mt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return S.clone(this,t,e)}))},html:function(t){return tt(this,(function(t){var e=this[0]||{},n=0,i=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!jt.test(t)&&!Nt[(Ct.exec(t)||["",""])[1].toLowerCase()]){t=S.htmlPrefilter(t);try{for(;n=0&&(l+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-o-l-a-.5))||0),l+u}function ce(t,e,n){var i=Jt(t),r=(!_.boxSizingReliable()||n)&&"border-box"===S.css(t,"boxSizing",!1,i),o=r,s=Qt(t,e,i),a="offset"+e[0].toUpperCase()+e.slice(1);if(Ht.test(s)){if(!n)return s;s="auto"}return(!_.boxSizingReliable()&&r||!_.reliableTrDimensions()&&I(t,"tr")||"auto"===s||!parseFloat(s)&&"inline"===S.css(t,"display",!1,i))&&t.getClientRects().length&&(r="border-box"===S.css(t,"boxSizing",!1,i),(o=a in t)&&(s=t[a])),(s=parseFloat(s)||0)+ue(t,e,n||(r?"border":"content"),o,i,s)+"px"}function pe(t,e,n,i,r){return new pe.prototype.init(t,e,n,i,r)}S.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Qt(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(t,e,n,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var r,o,s,a=rt(e),l=Wt.test(e),u=t.style;if(l||(e=re(a)),s=S.cssHooks[e]||S.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(r=s.get(t,!1,i))?r:u[e];"string"==(o=typeof n)&&(r=ft.exec(n))&&r[1]&&(n=vt(t,e,r),o="number"),null!=n&&n==n&&("number"!==o||l||(n+=r&&r[3]||(S.cssNumber[a]?"":"px")),_.clearCloneStyle||""!==n||0!==e.indexOf("background")||(u[e]="inherit"),s&&"set"in s&&void 0===(n=s.set(t,n,i))||(l?u.setProperty(e,n):u[e]=n))}},css:function(t,e,n,i){var r,o,s,a=rt(e);return Wt.test(e)||(e=re(a)),(s=S.cssHooks[e]||S.cssHooks[a])&&"get"in s&&(r=s.get(t,!0,n)),void 0===r&&(r=Qt(t,e,i)),"normal"===r&&e in ae&&(r=ae[e]),""===n||n?(o=parseFloat(r),!0===n||isFinite(o)?o||0:r):r}}),S.each(["height","width"],(function(t,e){S.cssHooks[e]={get:function(t,n,i){if(n)return!oe.test(S.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?ce(t,e,i):Kt(t,se,(function(){return ce(t,e,i)}))},set:function(t,n,i){var r,o=Jt(t),s=!_.scrollboxSize()&&"absolute"===o.position,a=(s||i)&&"border-box"===S.css(t,"boxSizing",!1,o),l=i?ue(t,e,i,a,o):0;return a&&s&&(l-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(o[e])-ue(t,e,"border",!1,o)-.5)),l&&(r=ft.exec(n))&&"px"!==(r[3]||"px")&&(t.style[e]=n,n=S.css(t,e)),le(0,n,l)}}})),S.cssHooks.marginLeft=te(_.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Qt(t,"marginLeft"))||t.getBoundingClientRect().left-Kt(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),S.each({margin:"",padding:"",border:"Width"},(function(t,e){S.cssHooks[t+e]={expand:function(n){for(var i=0,r={},o="string"==typeof n?n.split(" "):[n];i<4;i++)r[t+dt[i]+e]=o[i]||o[i-2]||o[0];return r}},"margin"!==t&&(S.cssHooks[t+e].set=le)})),S.fn.extend({css:function(t,e){return tt(this,(function(t,e,n){var i,r,o={},s=0;if(Array.isArray(e)){for(i=Jt(t),r=e.length;s1)}}),S.Tween=pe,pe.prototype={constructor:pe,init:function(t,e,n,i,r,o){this.elem=t,this.prop=n,this.easing=r||S.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=i,this.unit=o||(S.cssNumber[n]?"":"px")},cur:function(){var t=pe.propHooks[this.prop];return t&&t.get?t.get(this):pe.propHooks._default.get(this)},run:function(t){var e,n=pe.propHooks[this.prop];return this.options.duration?this.pos=e=S.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):pe.propHooks._default.set(this),this}},pe.prototype.init.prototype=pe.prototype,pe.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=S.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){S.fx.step[t.prop]?S.fx.step[t.prop](t):1!==t.elem.nodeType||!S.cssHooks[t.prop]&&null==t.elem.style[re(t.prop)]?t.elem[t.prop]=t.now:S.style(t.elem,t.prop,t.now+t.unit)}}},pe.propHooks.scrollTop=pe.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},S.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},S.fx=pe.prototype.init,S.fx.step={};var he,fe,de=/^(?:toggle|show|hide)$/,ge=/queueHooks$/;function _e(){fe&&(!1===v.hidden&&i.requestAnimationFrame?i.requestAnimationFrame(_e):i.setTimeout(_e,S.fx.interval),S.fx.tick())}function ye(){return i.setTimeout((function(){he=void 0})),he=Date.now()}function me(t,e){var n,i=0,r={height:t};for(e=e?1:0;i<4;i+=2-e)r["margin"+(n=dt[i])]=r["padding"+n]=t;return e&&(r.opacity=r.width=t),r}function ve(t,e,n){for(var i,r=(be.tweeners[e]||[]).concat(be.tweeners["*"]),o=0,s=r.length;o1)},removeAttr:function(t){return this.each((function(){S.removeAttr(this,t)}))}}),S.extend({attr:function(t,e,n){var i,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?S.prop(t,e,n):(1===o&&S.isXMLDoc(t)||(r=S.attrHooks[e.toLowerCase()]||(S.expr.match.bool.test(e)?xe:void 0)),void 0!==n?null===n?void S.removeAttr(t,e):r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:(t.setAttribute(e,n+""),n):r&&"get"in r&&null!==(i=r.get(t,e))?i:null==(i=S.find.attr(t,e))?void 0:i)},attrHooks:{type:{set:function(t,e){if(!_.radioValue&&"radio"===e&&I(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,i=0,r=e&&e.match($);if(r&&1===t.nodeType)for(;n=r[i++];)t.removeAttribute(n)}}),xe={set:function(t,e,n){return!1===e?S.removeAttr(t,n):t.setAttribute(n,n),n}},S.each(S.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=we[e]||S.find.attr;we[e]=function(t,e,i){var r,o,s=e.toLowerCase();return i||(o=we[s],we[s]=r,r=null!=n(t,e,i)?s:null,we[s]=o),r}}));var ke=/^(?:input|select|textarea|button)$/i,Ee=/^(?:a|area)$/i;function Se(t){return(t.match($)||[]).join(" ")}function Ce(t){return t.getAttribute&&t.getAttribute("class")||""}function Ie(t){return Array.isArray(t)?t:"string"==typeof t&&t.match($)||[]}S.fn.extend({prop:function(t,e){return tt(this,S.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[S.propFix[t]||t]}))}}),S.extend({prop:function(t,e,n){var i,r,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&S.isXMLDoc(t)||(e=S.propFix[e]||e,r=S.propHooks[e]),void 0!==n?r&&"set"in r&&void 0!==(i=r.set(t,n,e))?i:t[e]=n:r&&"get"in r&&null!==(i=r.get(t,e))?i:t[e]},propHooks:{tabIndex:{get:function(t){var e=S.find.attr(t,"tabindex");return e?parseInt(e,10):ke.test(t.nodeName)||Ee.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),_.optSelected||(S.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){S.propFix[this.toLowerCase()]=this})),S.fn.extend({addClass:function(t){var e,n,i,r,o,s;return y(t)?this.each((function(e){S(this).addClass(t.call(this,e,Ce(this)))})):(e=Ie(t)).length?this.each((function(){if(i=Ce(this),n=1===this.nodeType&&" "+Se(i)+" "){for(o=0;o-1;)n=n.replace(" "+r+" "," ");s=Se(n),i!==s&&this.setAttribute("class",s)}})):this:this.attr("class","")},toggleClass:function(t,e){var n,i,r,o,s=typeof t,a="string"===s||Array.isArray(t);return y(t)?this.each((function(n){S(this).toggleClass(t.call(this,n,Ce(this),e),e)})):"boolean"==typeof e&&a?e?this.addClass(t):this.removeClass(t):(n=Ie(t),this.each((function(){if(a)for(o=S(this),r=0;r-1)return!0;return!1}});var Ne=/\r/g;S.fn.extend({val:function(t){var e,n,i,r=this[0];return arguments.length?(i=y(t),this.each((function(n){var r;1===this.nodeType&&(null==(r=i?t.call(this,n,S(this).val()):t)?r="":"number"==typeof r?r+="":Array.isArray(r)&&(r=S.map(r,(function(t){return null==t?"":t+""}))),(e=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,r,"value")||(this.value=r))}))):r?(e=S.valHooks[r.type]||S.valHooks[r.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(r,"value"))?n:"string"==typeof(n=r.value)?n.replace(Ne,""):null==n?"":n:void 0}}),S.extend({valHooks:{option:{get:function(t){var e=S.find.attr(t,"value");return null!=e?e:Se(S.text(t))}},select:{get:function(t){var e,n,i,r=t.options,o=t.selectedIndex,s="select-one"===t.type,a=s?null:[],l=s?o+1:r.length;for(i=o<0?l:s?o:0;i-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),S.each(["radio","checkbox"],(function(){S.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=S.inArray(S(t).val(),e)>-1}},_.checkOn||(S.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}));var Me=i.location,Pe={guid:Date.now()},Oe=/\?/;S.parseXML=function(t){var e,n;if(!t||"string"!=typeof t)return null;try{e=(new i.DOMParser).parseFromString(t,"text/xml")}catch(t){}return n=e&&e.getElementsByTagName("parsererror")[0],e&&!n||S.error("Invalid XML: "+(n?S.map(n.childNodes,(function(t){return t.textContent})).join("\n"):t)),e};var Le=/^(?:focusinfocus|focusoutblur)$/,Te=function(t){t.stopPropagation()};S.extend(S.event,{trigger:function(t,e,n,r){var o,s,a,l,u,c,p,h,d=[n||v],g=f.call(t,"type")?t.type:t,_=f.call(t,"namespace")?t.namespace.split("."):[];if(s=h=a=n=n||v,3!==n.nodeType&&8!==n.nodeType&&!Le.test(g+S.event.triggered)&&(g.indexOf(".")>-1&&(_=g.split("."),g=_.shift(),_.sort()),u=g.indexOf(":")<0&&"on"+g,(t=t[S.expando]?t:new S.Event(g,"object"==typeof t&&t)).isTrigger=r?2:3,t.namespace=_.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+_.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),e=null==e?[t]:S.makeArray(e,[t]),p=S.event.special[g]||{},r||!p.trigger||!1!==p.trigger.apply(n,e))){if(!r&&!p.noBubble&&!m(n)){for(l=p.delegateType||g,Le.test(l+g)||(s=s.parentNode);s;s=s.parentNode)d.push(s),a=s;a===(n.ownerDocument||v)&&d.push(a.defaultView||a.parentWindow||i)}for(o=0;(s=d[o++])&&!t.isPropagationStopped();)h=s,t.type=o>1?l:p.bindType||g,(c=(at.get(s,"events")||Object.create(null))[t.type]&&at.get(s,"handle"))&&c.apply(s,e),(c=u&&s[u])&&c.apply&&ot(s)&&(t.result=c.apply(s,e),!1===t.result&&t.preventDefault());return t.type=g,r||t.isDefaultPrevented()||p._default&&!1!==p._default.apply(d.pop(),e)||!ot(n)||u&&y(n[g])&&!m(n)&&((a=n[u])&&(n[u]=null),S.event.triggered=g,t.isPropagationStopped()&&h.addEventListener(g,Te),n[g](),t.isPropagationStopped()&&h.removeEventListener(g,Te),S.event.triggered=void 0,a&&(n[u]=a)),t.result}},simulate:function(t,e,n){var i=S.extend(new S.Event,n,{type:t,isSimulated:!0});S.event.trigger(i,null,e)}}),S.fn.extend({trigger:function(t,e){return this.each((function(){S.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return S.event.trigger(t,e,n,!0)}});var Ae=/\[\]$/,De=/\r?\n/g,Re=/^(?:submit|button|image|reset|file)$/i,Fe=/^(?:input|select|textarea|keygen)/i;function je(t,e,n,i){var r;if(Array.isArray(e))S.each(e,(function(e,r){n||Ae.test(t)?i(t,r):je(t+"["+("object"==typeof r&&null!=r?e:"")+"]",r,n,i)}));else if(n||"object"!==w(e))i(t,e);else for(r in e)je(t+"["+r+"]",e[r],n,i)}S.param=function(t,e){var n,i=[],r=function(t,e){var n=y(e)?e():e;i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!S.isPlainObject(t))S.each(t,(function(){r(this.name,this.value)}));else for(n in t)je(n,t[n],e,r);return i.join("&")},S.fn.extend({serialize:function(){return S.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=S.prop(this,"elements");return t?S.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!S(this).is(":disabled")&&Fe.test(this.nodeName)&&!Re.test(t)&&(this.checked||!St.test(t))})).map((function(t,e){var n=S(this).val();return null==n?null:Array.isArray(n)?S.map(n,(function(t){return{name:e.name,value:t.replace(De,"\r\n")}})):{name:e.name,value:n.replace(De,"\r\n")}})).get()}});var ze=/%20/g,qe=/#.*$/,Be=/([?&])_=[^&]*/,Ge=/^(.*?):[ \t]*([^\r\n]*)$/gm,Ue=/^(?:GET|HEAD)$/,Xe=/^\/\//,Ye={},Ve={},$e="*/".concat("*"),He=v.createElement("a");function We(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var i,r=0,o=e.toLowerCase().match($)||[];if(y(n))for(;i=o[r++];)"+"===i[0]?(i=i.slice(1)||"*",(t[i]=t[i]||[]).unshift(n)):(t[i]=t[i]||[]).push(n)}}function Je(t,e,n,i){var r={},o=t===Ve;function s(a){var l;return r[a]=!0,S.each(t[a]||[],(function(t,a){var u=a(e,n,i);return"string"!=typeof u||o||r[u]?o?!(l=u):void 0:(e.dataTypes.unshift(u),s(u),!1)})),l}return s(e.dataTypes[0])||!r["*"]&&s("*")}function Ke(t,e){var n,i,r=S.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((r[n]?t:i||(i={}))[n]=e[n]);return i&&S.extend(!0,t,i),t}He.href=Me.href,S.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Me.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Me.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":$e,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":S.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Ke(Ke(t,S.ajaxSettings),e):Ke(S.ajaxSettings,t)},ajaxPrefilter:We(Ye),ajaxTransport:We(Ve),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var n,r,o,s,a,l,u,c,p,h,f=S.ajaxSetup({},e),d=f.context||f,g=f.context&&(d.nodeType||d.jquery)?S(d):S.event,_=S.Deferred(),y=S.Callbacks("once memory"),m=f.statusCode||{},b={},x={},w="canceled",k={readyState:0,getResponseHeader:function(t){var e;if(u){if(!s)for(s={};e=Ge.exec(o);)s[e[1].toLowerCase()+" "]=(s[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=s[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return u?o:null},setRequestHeader:function(t,e){return null==u&&(t=x[t.toLowerCase()]=x[t.toLowerCase()]||t,b[t]=e),this},overrideMimeType:function(t){return null==u&&(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(u)k.always(t[k.status]);else for(e in t)m[e]=[m[e],t[e]];return this},abort:function(t){var e=t||w;return n&&n.abort(e),E(0,e),this}};if(_.promise(k),f.url=((t||f.url||Me.href)+"").replace(Xe,Me.protocol+"//"),f.type=e.method||e.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match($)||[""],null==f.crossDomain){l=v.createElement("a");try{l.href=f.url,l.href=l.href,f.crossDomain=He.protocol+"//"+He.host!=l.protocol+"//"+l.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=S.param(f.data,f.traditional)),Je(Ye,f,e,k),u)return k;for(p in(c=S.event&&f.global)&&0==S.active++&&S.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Ue.test(f.type),r=f.url.replace(qe,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(ze,"+")):(h=f.url.slice(r.length),f.data&&(f.processData||"string"==typeof f.data)&&(r+=(Oe.test(r)?"&":"?")+f.data,delete f.data),!1===f.cache&&(r=r.replace(Be,"$1"),h=(Oe.test(r)?"&":"?")+"_="+Pe.guid+++h),f.url=r+h),f.ifModified&&(S.lastModified[r]&&k.setRequestHeader("If-Modified-Since",S.lastModified[r]),S.etag[r]&&k.setRequestHeader("If-None-Match",S.etag[r])),(f.data&&f.hasContent&&!1!==f.contentType||e.contentType)&&k.setRequestHeader("Content-Type",f.contentType),k.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+$e+"; q=0.01":""):f.accepts["*"]),f.headers)k.setRequestHeader(p,f.headers[p]);if(f.beforeSend&&(!1===f.beforeSend.call(d,k,f)||u))return k.abort();if(w="abort",y.add(f.complete),k.done(f.success),k.fail(f.error),n=Je(Ve,f,e,k)){if(k.readyState=1,c&&g.trigger("ajaxSend",[k,f]),u)return k;f.async&&f.timeout>0&&(a=i.setTimeout((function(){k.abort("timeout")}),f.timeout));try{u=!1,n.send(b,E)}catch(t){if(u)throw t;E(-1,t)}}else E(-1,"No Transport");function E(t,e,s,l){var p,h,v,b,x,w=e;u||(u=!0,a&&i.clearTimeout(a),n=void 0,o=l||"",k.readyState=t>0?4:0,p=t>=200&&t<300||304===t,s&&(b=function(t,e,n){for(var i,r,o,s,a=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===i&&(i=t.mimeType||e.getResponseHeader("Content-Type"));if(i)for(r in a)if(a[r]&&a[r].test(i)){l.unshift(r);break}if(l[0]in n)o=l[0];else{for(r in n){if(!l[0]||t.converters[r+" "+l[0]]){o=r;break}s||(s=r)}o=o||s}if(o)return o!==l[0]&&l.unshift(o),n[o]}(f,k,s)),!p&&S.inArray("script",f.dataTypes)>-1&&S.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),b=function(t,e,n,i){var r,o,s,a,l,u={},c=t.dataTypes.slice();if(c[1])for(s in t.converters)u[s.toLowerCase()]=t.converters[s];for(o=c.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!l&&i&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(s=u[l+" "+o]||u["* "+o]))for(r in u)if((a=r.split(" "))[1]===o&&(s=u[l+" "+a[0]]||u["* "+a[0]])){!0===s?s=u[r]:!0!==u[r]&&(o=a[0],c.unshift(a[1]));break}if(!0!==s)if(s&&t.throws)e=s(e);else try{e=s(e)}catch(t){return{state:"parsererror",error:s?t:"No conversion from "+l+" to "+o}}}return{state:"success",data:e}}(f,b,k,p),p?(f.ifModified&&((x=k.getResponseHeader("Last-Modified"))&&(S.lastModified[r]=x),(x=k.getResponseHeader("etag"))&&(S.etag[r]=x)),204===t||"HEAD"===f.type?w="nocontent":304===t?w="notmodified":(w=b.state,h=b.data,p=!(v=b.error))):(v=w,!t&&w||(w="error",t<0&&(t=0))),k.status=t,k.statusText=(e||w)+"",p?_.resolveWith(d,[h,w,k]):_.rejectWith(d,[k,w,v]),k.statusCode(m),m=void 0,c&&g.trigger(p?"ajaxSuccess":"ajaxError",[k,f,p?h:v]),y.fireWith(d,[k,w]),c&&(g.trigger("ajaxComplete",[k,f]),--S.active||S.event.trigger("ajaxStop")))}return k},getJSON:function(t,e,n){return S.get(t,e,n,"json")},getScript:function(t,e){return S.get(t,void 0,e,"script")}}),S.each(["get","post"],(function(t,e){S[e]=function(t,n,i,r){return y(n)&&(r=r||i,i=n,n=void 0),S.ajax(S.extend({url:t,type:e,dataType:r,data:n,success:i},S.isPlainObject(t)&&t))}})),S.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),S._evalUrl=function(t,e,n){return S.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){S.globalEval(t,e,n)}})},S.fn.extend({wrapAll:function(t){var e;return this[0]&&(y(t)&&(t=t.call(this[0])),e=S(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return y(t)?this.each((function(e){S(this).wrapInner(t.call(this,e))})):this.each((function(){var e=S(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=y(t);return this.each((function(n){S(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){S(this).replaceWith(this.childNodes)})),this}}),S.expr.pseudos.hidden=function(t){return!S.expr.pseudos.visible(t)},S.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},S.ajaxSettings.xhr=function(){try{return new i.XMLHttpRequest}catch(t){}};var Ze={0:200,1223:204},Qe=S.ajaxSettings.xhr();_.cors=!!Qe&&"withCredentials"in Qe,_.ajax=Qe=!!Qe,S.ajaxTransport((function(t){var e,n;if(_.cors||Qe&&!t.crossDomain)return{send:function(r,o){var s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];for(s in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest"),r)a.setRequestHeader(s,r[s]);e=function(t){return function(){e&&(e=n=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Ze[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=e(),n=a.onerror=a.ontimeout=e("error"),void 0!==a.onabort?a.onabort=n:a.onreadystatechange=function(){4===a.readyState&&i.setTimeout((function(){e&&n()}))},e=e("abort");try{a.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}})),S.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),S.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return S.globalEval(t),t}}}),S.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),S.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(i,r){e=S("