@corpsmap/corpsmap 4.1.5 → 4.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,11 +1,11 @@
1
- (function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("react"),require("react/jsx-runtime"),require("redux-bundler"),require("money-clip"),require("xhr"),require("ol/Collection"),require("ol/style/Style"),require("ol/style/Fill"),require("ol/style/Stroke"),require("ol/style/Circle"),require("ol/source/XYZ"),require("ol/source/TileArcGISRest"),require("ol/source/ImageArcGISRest"),require("ol/source/ImageWMS"),require("ol/source/TileWMS"),require("ol/source/Vector"),require("ol/layer/Tile"),require("ol/layer/Image"),require("ol/layer/Vector"),require("ol/format/GeoJSON"),require("ol/style/Text"),require("ol/style/RegularShape"),require("ol/format/EsriJSON.js"),require("ol/loadingstrategy"),require("ol/tilegrid/TileGrid"),require("ol/tilegrid"),require("async"),require("ol-esri-style"),require("ol/Map.js"),require("ol/View"),require("ol/proj"),require("ol/control/ScaleLine"),require("ol/ol.css"),require("uuid"),require("ol/proj/Projection"),require("proj4"),require("lodash"),require("react-dom"),require("react-dom/client"),require("ol/Overlay"),require("ol/interaction/Draw"),require("ol/interaction/Select"),require("ol/interaction/Modify"),require("ol/style"),require("react-data-grid"),require("ol/interaction/DragBox"),require("ol/interaction/Snap"),require("ol/Feature"),require("ol/geom/Point"),require("ol/geom/Polygon"),require("ol/format/EsriJSON"),require("ol/sphere")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","redux-bundler","money-clip","xhr","ol/Collection","ol/style/Style","ol/style/Fill","ol/style/Stroke","ol/style/Circle","ol/source/XYZ","ol/source/TileArcGISRest","ol/source/ImageArcGISRest","ol/source/ImageWMS","ol/source/TileWMS","ol/source/Vector","ol/layer/Tile","ol/layer/Image","ol/layer/Vector","ol/format/GeoJSON","ol/style/Text","ol/style/RegularShape","ol/format/EsriJSON.js","ol/loadingstrategy","ol/tilegrid/TileGrid","ol/tilegrid","async","ol-esri-style","ol/Map.js","ol/View","ol/proj","ol/control/ScaleLine","ol/ol.css","uuid","ol/proj/Projection","proj4","lodash","react-dom","react-dom/client","ol/Overlay","ol/interaction/Draw","ol/interaction/Select","ol/interaction/Modify","ol/style","react-data-grid","ol/interaction/DragBox","ol/interaction/Snap","ol/Feature","ol/geom/Point","ol/geom/Polygon","ol/format/EsriJSON","ol/sphere"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.corpsmap={},e.React,e.jsxRuntime,e.reduxBundler,e.moneyClip,e.xhr,null,e.Style,e.Fill,e.Stroke,e.Circle,e.XYZ,e.TileArcGISRest,e.ImageArcGISRest,e.ImageWMS,e.TileWMS,e.VectorSrc,e.Tile,e.Image$1,e.Vector,e.GeoJSON,e.Text,e.RegularShape,e.EsriJSON,e.loadingstrategy,null,e.tilegrid,e.async,e.olEsriStyle,e.olMap,e.View,e.proj,e.ScaleBar,null,e.uuid,e.Projection,e.proj4,e.lodash,e.ReactDOM,e.ReactDOM,e.Overlay$1,e.Draw,e.Select$1,e.Modify,e.style$3,e.DataGrid,e.DragBox,e.Snap,e.Feature,e.Point,e.Polygon,e.EsriJSON$1,e.sphere))})(this,(function(exports,React,jsxRuntime,reduxBundler,moneyClip,xhr,Collection,Style,Fill,Stroke,Circle,XYZ,TileArcGISRest,ImageArcGISRest,ImageWMS,TileWMS,VectorSrc,Tile,Image$1,Vector,GeoJSON,Text,RegularShape,EsriJSON,loadingstrategy,TileGrid,tilegrid,async,olEsriStyle,olMap,View,proj,ScaleBar,ol_css,uuid,Projection,proj4,_,reactDom,ReactDOM,Overlay$1,Draw,Select$1,Modify,style$3,reactDataGrid,DragBox,Snap,Feature,Point,Polygon,EsriJSON$1,sphere){"use strict";function _interopNamespaceDefault(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const React__namespace=_interopNamespaceDefault(React),{useContext,useMemo,useState,useEffect}=React,StoreContext=React.createContext();class Provider extends React.Component{render(){return jsxRuntime.jsx(StoreContext.Provider,{value:this.props.store,children:React.Children.only(this.props.children)})}}const connect=function(...e){const t=e.slice(-1)[0],r=e.length>1?e.slice(0,-1):[],s=[],o=[];r.forEach(m=>{if(m.startsWith("select"))o.push(m);else if(m.startsWith("do"))s.push(m);else throw new Error(`CanNotConnect ${m}`)});const d=m=>{const g=useContext(StoreContext),[y,b]=useState(()=>g.select(o));useEffect(()=>g.subscribeToSelectors(o,()=>{const C=g.select(o);b(C)}),[g,o.join()]);const x=useMemo(()=>{const E={};return s.forEach(C=>{E[C]=(...S)=>g.action?g.action(C,S):g[C](...S)}),E},[g,s.join()]);return React.createElement(t,{...m,...y,...x})};return d.displayName=`Connect(${t.displayName||t.name})`,d};class ErrorBoundary extends React.Component{constructor(t){super(t),this.state={hasError:!1,error:null,info:null}}componentDidCatch(t,r){this.setState({hasError:!0,error:t,info:r})}render(){const{hasError:t,error:r,info:s}=this.state;return t&&console.log("error rendering",r,s),this.props.children}}class PluginRegion extends React.Component{render(){const{className:t,styleOverride:r,components:s}=this.props;return jsxRuntime.jsx("div",{className:t,children:s.map((o,d)=>{const m=o;return jsxRuntime.jsx(ErrorBoundary,{children:jsxRuntime.jsx("div",{style:r,children:jsxRuntime.jsx(m,{})})},d)})})}}let PrimaryPanel$1=class extends React.Component{constructor(t){super(t),this.state={left:49},this.handleResize=this.handleResize.bind(this),this.handleClose=this.handleClose.bind(this)}handleResize(t){t.preventDefault(),t.stopPropagation();let{left:r}=this.state;t.pageX&&this.props.doPrimaryPanelSetWidth(t.pageX-r)}handleClose(t){t.preventDefault(),t.stopPropagation(),this.props.doPrimaryPanelClose()}render(){const{primaryPanelChildren:t,primaryPanelOptions:r,primaryPanelTop:s,primaryPanelShowClose:o,primaryPanelWidth:d}=this.props,{left:m,width:g}=this.state;return!t||!t.length?null:jsxRuntime.jsxs("div",{className:"sidebar-panel",style:{top:s,left:m,width:d},children:[jsxRuntime.jsx(ErrorBoundary,{children:jsxRuntime.jsxs("div",{id:"primary-panel-content",children:[o?jsxRuntime.jsx("div",{className:"row",children:jsxRuntime.jsx("button",{className:"pull-right cm-btn cm-btn-link",title:"Close Panel ",style:{marginRight:"10px",padding:"3px"},onClick:this.handleClose,children:jsxRuntime.jsx("i",{className:"mdi mdi-close-circle-outline",style:{fontSize:"22px"}})})}):null,t.map((y,b)=>{const x=y;return jsxRuntime.jsx(x,{...r},b)})]})}),jsxRuntime.jsx("div",{className:"e-w-drag-handle",draggable:"true",onDrag:this.handleResize,onDragEnd:this.handleResize})]})}};const PrimaryPanel=connect("selectPrimaryPanelTop","selectPrimaryPanelChildren","selectPrimaryPanelOptions","selectPrimaryPanelWidth","selectPrimaryPanelShowClose","doPrimaryPanelResize","doPrimaryPanelSetWidth","doPrimaryPanelClose",PrimaryPanel$1);let BasicToolbar$1=class extends React.Component{render(){const{theme:t,componentsBasicToolbar:r}=this.props;return jsxRuntime.jsx("div",{className:"toolbar toolbar-top-left "+t,style:{left:49},children:jsxRuntime.jsx(PluginRegion,{className:"toolbar-horizontal",components:r,styleOverride:{}})})}};const BasicToolbar=connect("selectTheme","selectComponentsBasicToolbar",BasicToolbar$1);let LeftSidebar$1=class extends React.Component{render(){const{theme:t,componentsLeftSidebarBottom:r,componentsLeftSidebarTop:s}=this.props;return r.length+s.length?jsxRuntime.jsxs("div",{className:"sidebar sidebar-left "+t,children:[jsxRuntime.jsx(PluginRegion,{className:"sidebar-buttons-top",components:s,styleOverride:{width:"100%"}}),jsxRuntime.jsx(PluginRegion,{className:"sidebar-buttons-bottom",components:r,styleOverride:{width:"100%"}}),jsxRuntime.jsx(PrimaryPanel,{}),jsxRuntime.jsx(BasicToolbar,{})]}):null}};const LeftSidebar=connect("selectTheme","selectComponentsLeftSidebarTop","selectComponentsLeftSidebarBottom",LeftSidebar$1);let UpperRightToolbar$1=class extends React.Component{render(){const{theme:t,componentsUpperRight:r}=this.props;return jsxRuntime.jsx("div",{className:"toolbar toolbar-upper-right "+t,style:{right:49},children:jsxRuntime.jsx("div",{className:"cm-btn-group",children:jsxRuntime.jsx(PluginRegion,{className:"toolbar-horizontal-right",components:r})})})}};const UpperRightToolbar=connect("selectTheme","selectComponentsUpperRight",UpperRightToolbar$1);let LowerRightToolbar$1=class extends React.Component{render(){const{theme:t,componentsLowerRight:r}=this.props;return jsxRuntime.jsx("div",{className:"toolbar toolbar-lower-right "+t,style:{right:49},children:jsxRuntime.jsx("div",{className:"cm-btn-group",children:jsxRuntime.jsx(PluginRegion,{className:"toolbar-horizontal-right",components:r,styleOverride:{}})})})}};const LowerRightToolbar=connect("selectTheme","selectComponentsLowerRight",LowerRightToolbar$1);let RightSidebar$1=class extends React.Component{render(){const{theme:t,componentsRightSidebarBottom:r,componentsRightSidebarTop:s,componentsRightSidebarCount:o}=this.props;return o?jsxRuntime.jsxs("div",{className:"sidebar sidebar-right "+t,children:[jsxRuntime.jsx(PluginRegion,{className:"sidebar-buttons-top",components:s}),jsxRuntime.jsx(PluginRegion,{className:"sidebar-buttons-bottom",components:r}),jsxRuntime.jsx(UpperRightToolbar,{}),jsxRuntime.jsx(LowerRightToolbar,{})]}):null}};const RightSidebar=connect("selectTheme","selectComponentsRightSidebarTop","selectComponentsRightSidebarBottom","selectComponentsRightSidebarCount",RightSidebar$1);let Map$3=class extends React.Component{componentDidMount(){const{doMapInitialize:t,viewState:r,limitMapExtent:s}=this.props,{center:o,zoom:d,rotation:m,minZoom:g,maxZoom:y}=r;this.mapEl&&t(this.mapEl,{center:o,zoom:d,rotation:m,minZoom:g,maxZoom:y,layers:[],limitMapExtent:s})}render(){const{componentsLeftSidebarCount:t,componentsRightSidebarCount:r,cursorClass:s}=this.props,o={position:"absolute",top:0,left:t>0?49:0,right:r>0?49:0,bottom:0};return jsxRuntime.jsx("div",{id:"map",className:s,ref:d=>{this.mapEl=d},style:o})}};const Map$2=connect("doMapInitialize","selectLimitMapExtent","selectViewState","selectCursorClass","selectComponentsLeftSidebarCount","selectComponentsRightSidebarCount",Map$3);let NorthRegion$1=class extends React.Component{render(){const{height:t}=this.props;return jsxRuntime.jsxs("div",{className:"cm-north-container",style:{height:t},children:[jsxRuntime.jsx(LeftSidebar,{}),jsxRuntime.jsx(RightSidebar,{}),jsxRuntime.jsx(Map$2,{})]})}};const NorthRegion=connect(NorthRegion$1);var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs$1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var classnames$1={exports:{}};var hasRequiredClassnames;function requireClassnames(){return hasRequiredClassnames||(hasRequiredClassnames=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var d="",m=0;m<arguments.length;m++){var g=arguments[m];g&&(d=o(d,s(g)))}return d}function s(d){if(typeof d=="string"||typeof d=="number")return d;if(typeof d!="object")return"";if(Array.isArray(d))return r.apply(null,d);if(d.toString!==Object.prototype.toString&&!d.toString.toString().includes("[native code]"))return d.toString();var m="";for(var g in d)t.call(d,g)&&d[g]&&(m=o(m,g));return m}function o(d,m){return m?d?d+" "+m:d+m:d}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(classnames$1)),classnames$1.exports}var classnamesExports=requireClassnames();const classnames=getDefaultExportFromCjs$1(classnamesExports);let SouthRegionTab$1=class extends React.Component{constructor(t){super(t),this.setActiveTab=this.setActiveTab.bind(this),this.closeTab=this.closeTab.bind(this),this.handleClick=this.handleClick.bind(this)}setActiveTab(){const{idx:t,onSelect:r}=this.props;r(t)}closeTab(){const{doSouthRegionCloseTab:t,child:r}=this.props;t(r.uid)}handleClick(t){const r=t.target,{action:s}=r.dataset;switch(s){case"nav":return this.setActiveTab();case"close":return this.closeTab();default:return}}render(){const{activeClass:t,displayName:r}=this.props;return jsxRuntime.jsxs("li",{className:t,children:[jsxRuntime.jsx("span",{onClick:this.handleClick,className:"pull-right","data-action":"close",style:{padding:"10px 10px"},children:jsxRuntime.jsx("i",{"data-action":"close",className:"mdi mdi-close-circle-outline"})}),jsxRuntime.jsx("a",{onClick:this.handleClick,href:"#","data-action":"nav",style:{marginRight:"36px"},children:r})]})}};const SouthRegionTab=connect("doSouthRegionCloseTab",SouthRegionTab$1);let SouthRegion$1=class extends React.Component{constructor(t){super(t),this.state={activeTab:0},this.setActiveTab=this.setActiveTab.bind(this)}setActiveTab(t){this.setState({activeTab:t})}render(){const{activeTab:t}=this.state,{height:r,southRegionChildren:s}=this.props;return jsxRuntime.jsx("div",{className:"south-container",style:{position:"relative",height:r,left:0,right:0,bottom:0},children:jsxRuntime.jsx(ErrorBoundary,{children:jsxRuntime.jsxs("div",{id:"south-panel-content",children:[jsxRuntime.jsx("ul",{className:"cm-nav cm-nav-tabs",children:s.map((o,d)=>{const m=classnames({active:d===t}),g=o.displayName||"TABLE";return jsxRuntime.jsx(SouthRegionTab,{idx:d,activeClass:m,displayName:g,child:o,onSelect:this.setActiveTab},o.uid)})}),s.map((o,d)=>{const m=o.component,g=o.options||{},y=classnames({hidden:d!==t});return jsxRuntime.jsx("div",{className:y,children:jsxRuntime.jsx(m,{...g},o.uid)},d)})]})})})}};const SouthRegion=connect("selectSouthRegionChildren",SouthRegion$1);let ModalWindow$1=class extends React.Component{render(){const{modalChildren:t,modalOptions:r}=this.props;if(!t||!t.length)return null;const s=r.smSize,o=classnames({"cm-modal-content":!0,"cm-modal-lg":!s,"cm-modal-sm":!!s});return jsxRuntime.jsx("div",{className:"cm-modal show",children:jsxRuntime.jsx("div",{className:"cm-modal-dialog",children:jsxRuntime.jsx("div",{className:o,children:t.map((d,m)=>{const g=d;return jsxRuntime.jsx(g,{...r},m)})})})})}};const ModalWindow=connect("selectModalChildren","selectModalOptions",ModalWindow$1);let Notification$1=class extends React.Component{constructor(t){super(t),this.remove=this.remove.bind(this),this.renderContent=this.renderContent.bind(this),this.renderDismissButton=this.renderDismissButton.bind(this)}componentDidMount(){let{autoDismiss:t,onAdd:r}=this.props;t===0?console.log("didn't set up autodismiss"):(t||(t=5),console.log("should set timeout"),isNaN(Number(t))||window.setTimeout(this.remove,t*1e3)),r&&typeof r=="function"&&r(this.props)}remove(){const{doNotificationsDismiss:t,uid:r,onRemove:s}=this.props;r&&t(r),s&&typeof s=="function"&&s(this.props)}renderContent(){const{title:t,message:r,children:s}=this.props;return s?jsxRuntime.jsx(jsxRuntime.Fragment,{children:s}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("p",{children:jsxRuntime.jsx("strong",{children:t})}),jsxRuntime.jsx("p",{children:r})]})}renderDismissButton(){return jsxRuntime.jsx("button",{onClick:this.remove,className:"close",children:"×"})}render(){const{level:t,position:r}=this.props;let s="cm-alert";switch(t){case"success":s+=" cm-alert-success";break;case"info":s+=" cm-alert-info";break;case"warning":s+=" cm-alert-warning";break;case"danger":s+=" cm-alert-danger";break;default:s+=" cm-alert-default"}return jsxRuntime.jsxs("li",{className:s,style:{minWidth:"300px"},onClick:this.remove,children:[this.renderDismissButton(),this.renderContent()]})}};const Notification=connect("doNotificationsDismiss",Notification$1),NotificationQuadrant=e=>{const{items:t,quad:r}=e,s=`list-unstyled notification-pane notification-${r}`;return t.length?jsxRuntime.jsx("ul",{className:s,children:t.map((o,d)=>jsxRuntime.jsx(Notification,{...o},d))}):null},NotificationPane$1=e=>{const{notifications:t}=e;let r=[],s=[],o=[],d=[];return Object.keys(t).forEach(m=>{switch(t[m].position){case"tl":r.push(t[m]);break;case"bl":s.push(t[m]);break;case"br":o.push(t[m]);break;default:d.push(t[m])}}),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(NotificationQuadrant,{items:r,quad:"top-left"}),jsxRuntime.jsx(NotificationQuadrant,{items:s,quad:"bottom-left"}),jsxRuntime.jsx(NotificationQuadrant,{items:d,quad:"top-right"}),jsxRuntime.jsx(NotificationQuadrant,{items:o,quad:"bottom-right"})]})},NotificationPane=connect("selectNotifications",NotificationPane$1);var isObject_1,hasRequiredIsObject;function requireIsObject(){if(hasRequiredIsObject)return isObject_1;hasRequiredIsObject=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return isObject_1=e,isObject_1}var _freeGlobal,hasRequired_freeGlobal;function require_freeGlobal(){if(hasRequired_freeGlobal)return _freeGlobal;hasRequired_freeGlobal=1;var e=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal;return _freeGlobal=e,_freeGlobal}var _root,hasRequired_root;function require_root(){if(hasRequired_root)return _root;hasRequired_root=1;var e=require_freeGlobal(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return _root=r,_root}var now_1,hasRequiredNow;function requireNow(){if(hasRequiredNow)return now_1;hasRequiredNow=1;var e=require_root(),t=function(){return e.Date.now()};return now_1=t,now_1}var _trimmedEndIndex,hasRequired_trimmedEndIndex;function require_trimmedEndIndex(){if(hasRequired_trimmedEndIndex)return _trimmedEndIndex;hasRequired_trimmedEndIndex=1;var e=/\s/;function t(r){for(var s=r.length;s--&&e.test(r.charAt(s)););return s}return _trimmedEndIndex=t,_trimmedEndIndex}var _baseTrim,hasRequired_baseTrim;function require_baseTrim(){if(hasRequired_baseTrim)return _baseTrim;hasRequired_baseTrim=1;var e=require_trimmedEndIndex(),t=/^\s+/;function r(s){return s&&s.slice(0,e(s)+1).replace(t,"")}return _baseTrim=r,_baseTrim}var _Symbol,hasRequired_Symbol;function require_Symbol(){if(hasRequired_Symbol)return _Symbol;hasRequired_Symbol=1;var e=require_root(),t=e.Symbol;return _Symbol=t,_Symbol}var _getRawTag,hasRequired_getRawTag;function require_getRawTag(){if(hasRequired_getRawTag)return _getRawTag;hasRequired_getRawTag=1;var e=require_Symbol(),t=Object.prototype,r=t.hasOwnProperty,s=t.toString,o=e?e.toStringTag:void 0;function d(m){var g=r.call(m,o),y=m[o];try{m[o]=void 0;var b=!0}catch{}var x=s.call(m);return b&&(g?m[o]=y:delete m[o]),x}return _getRawTag=d,_getRawTag}var _objectToString,hasRequired_objectToString;function require_objectToString(){if(hasRequired_objectToString)return _objectToString;hasRequired_objectToString=1;var e=Object.prototype,t=e.toString;function r(s){return t.call(s)}return _objectToString=r,_objectToString}var _baseGetTag,hasRequired_baseGetTag;function require_baseGetTag(){if(hasRequired_baseGetTag)return _baseGetTag;hasRequired_baseGetTag=1;var e=require_Symbol(),t=require_getRawTag(),r=require_objectToString(),s="[object Null]",o="[object Undefined]",d=e?e.toStringTag:void 0;function m(g){return g==null?g===void 0?o:s:d&&d in Object(g)?t(g):r(g)}return _baseGetTag=m,_baseGetTag}var isObjectLike_1,hasRequiredIsObjectLike;function requireIsObjectLike(){if(hasRequiredIsObjectLike)return isObjectLike_1;hasRequiredIsObjectLike=1;function e(t){return t!=null&&typeof t=="object"}return isObjectLike_1=e,isObjectLike_1}var isSymbol_1,hasRequiredIsSymbol;function requireIsSymbol(){if(hasRequiredIsSymbol)return isSymbol_1;hasRequiredIsSymbol=1;var e=require_baseGetTag(),t=requireIsObjectLike(),r="[object Symbol]";function s(o){return typeof o=="symbol"||t(o)&&e(o)==r}return isSymbol_1=s,isSymbol_1}var toNumber_1,hasRequiredToNumber;function requireToNumber(){if(hasRequiredToNumber)return toNumber_1;hasRequiredToNumber=1;var e=require_baseTrim(),t=requireIsObject(),r=requireIsSymbol(),s=NaN,o=/^[-+]0x[0-9a-f]+$/i,d=/^0b[01]+$/i,m=/^0o[0-7]+$/i,g=parseInt;function y(b){if(typeof b=="number")return b;if(r(b))return s;if(t(b)){var x=typeof b.valueOf=="function"?b.valueOf():b;b=t(x)?x+"":x}if(typeof b!="string")return b===0?b:+b;b=e(b);var E=d.test(b);return E||m.test(b)?g(b.slice(2),E?2:8):o.test(b)?s:+b}return toNumber_1=y,toNumber_1}var debounce_1,hasRequiredDebounce;function requireDebounce(){if(hasRequiredDebounce)return debounce_1;hasRequiredDebounce=1;var e=requireIsObject(),t=requireNow(),r=requireToNumber(),s="Expected a function",o=Math.max,d=Math.min;function m(g,y,b){var x,E,C,S,A,N,k=0,L=!1,G=!1,M=!0;if(typeof g!="function")throw new TypeError(s);y=r(y)||0,e(b)&&(L=!!b.leading,G="maxWait"in b,C=G?o(r(b.maxWait)||0,y):C,M="trailing"in b?!!b.trailing:M);function z(ie){var te=x,ue=E;return x=E=void 0,k=ie,S=g.apply(ue,te),S}function V(ie){return k=ie,A=setTimeout(Q,y),L?z(ie):S}function Y(ie){var te=ie-N,ue=ie-k,le=y-te;return G?d(le,C-ue):le}function X(ie){var te=ie-N,ue=ie-k;return N===void 0||te>=y||te<0||G&&ue>=C}function Q(){var ie=t();if(X(ie))return $(ie);A=setTimeout(Q,Y(ie))}function $(ie){return A=void 0,M&&x?z(ie):(x=E=void 0,S)}function K(){A!==void 0&&clearTimeout(A),k=0,x=N=E=A=void 0}function ee(){return A===void 0?S:$(t())}function se(){var ie=t(),te=X(ie);if(x=arguments,E=this,N=ie,te){if(A===void 0)return V(N);if(G)return clearTimeout(A),A=setTimeout(Q,y),z(N)}return A===void 0&&(A=setTimeout(Q,y)),S}return se.cancel=K,se.flush=ee,se}return debounce_1=m,debounce_1}var debounceExports=requireDebounce();const debounce=getDefaultExportFromCjs$1(debounceExports);let Corpsmap$1=class extends React.Component{constructor(t){super(t),this.renderSouthRegion=this.renderSouthRegion.bind(this),this.setHeight=this.setHeight.bind(this),this.resize=this.resize.bind(this),this.setHeightDebounced=debounce(this.setHeight,10)}componentDidMount(){this._isMounted=!0;const{doVLayoutSetHeight:t}=this.props;t(this.el.offsetHeight)}componentWillUnmount(){this._isMounted=!1}setHeight(t){const{doVLayoutResize:r,vLayoutHeight:s}=this.props;if(t>45&&t<s){const o=t/s,d=1-o;r(o,d)}}resize(t){t.preventDefault();const r=t.clientY;this.setHeightDebounced(r)}renderSouthRegion(){const{doSouthRegionClose:t,theme:r,southHeight:s}=this.props;return s?jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{draggable:"true",onDrag:this.resize,className:r+" n-s-drag-handle",children:jsxRuntime.jsx("span",{onClick:t,className:"pull-right",children:jsxRuntime.jsx("i",{className:"mdi mdi-close"})})}),jsxRuntime.jsx(SouthRegion,{height:s-5})]}):null}render(){const{northHeight:t}=this.props;return jsxRuntime.jsxs("div",{className:"corpsmap cm-container-fluid",style:{padding:0},ref:r=>{this.el=r},children:[jsxRuntime.jsx(NorthRegion,{height:t}),this.renderSouthRegion(),jsxRuntime.jsx(ModalWindow,{}),jsxRuntime.jsx(NotificationPane,{})]})}};const Corpsmap=connect("selectTheme","selectNorthHeight","selectSouthHeight","selectVLayoutHeight","doSouthRegionClose","doVLayoutResize","doVLayoutSetHeight",Corpsmap$1),cache=moneyClip.getConfiguredCache({maxAge:1e3*60*60,version:1});function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var browser={exports:{}},process=browser.exports={},cachedSetTimeout,cachedClearTimeout;function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?cachedSetTimeout=setTimeout:cachedSetTimeout=defaultSetTimout}catch{cachedSetTimeout=defaultSetTimout}try{typeof clearTimeout=="function"?cachedClearTimeout=clearTimeout:cachedClearTimeout=defaultClearTimeout}catch{cachedClearTimeout=defaultClearTimeout}})();function runTimeout(e){if(cachedSetTimeout===setTimeout)return setTimeout(e,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(e,0);try{return cachedSetTimeout(e,0)}catch{try{return cachedSetTimeout.call(null,e,0)}catch{return cachedSetTimeout.call(this,e,0)}}}function runClearTimeout(e){if(cachedClearTimeout===clearTimeout)return clearTimeout(e);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(e);try{return cachedClearTimeout(e)}catch{try{return cachedClearTimeout.call(null,e)}catch{return cachedClearTimeout.call(this,e)}}}var queue=[],draining=!1,currentQueue,queueIndex=-1;function cleanUpNextTick(){!draining||!currentQueue||(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var e=runTimeout(cleanUpNextTick);draining=!0;for(var t=queue.length;t;){for(currentQueue=queue,queue=[];++queueIndex<t;)currentQueue&&currentQueue[queueIndex].run();queueIndex=-1,t=queue.length}currentQueue=null,draining=!1,runClearTimeout(e)}}process.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];queue.push(new Item(e,t)),queue.length===1&&!draining&&runTimeout(drainQueue)};function Item(e,t){this.fun=e,this.array=t}Item.prototype.run=function(){this.fun.apply(null,this.array)},process.title="browser",process.browser=!0,process.env={},process.argv=[],process.version="",process.versions={};function noop$2(){}process.on=noop$2,process.addListener=noop$2,process.once=noop$2,process.off=noop$2,process.removeListener=noop$2,process.removeAllListeners=noop$2,process.emit=noop$2,process.prependListener=noop$2,process.prependOnceListener=noop$2,process.listeners=function(e){return[]},process.binding=function(e){throw new Error("process.binding is not supported")},process.cwd=function(){return"/"},process.chdir=function(e){throw new Error("process.chdir is not supported")},process.umask=function(){return 0};var browserExports=browser.exports;const process$1=getDefaultExportFromCjs(browserExports),apiBundle={name:"api",getReducer:()=>{const e={root:void 0};return(t=e,{type:r,payload:s})=>t},selectApiRoot:e=>process$1.env.NODE_ENV==="development"?e.api.root:e.windowLocation.origin,getExtraArgs:e=>({anonGet:(t,r)=>{const s={url:t};xhr.get(s,r)},apiGet:(t,r)=>{const s={url:t};xhr.get(s,r)},apiPost:(t,r,s)=>{const o={url:t,json:r};xhr.post(o,s)},apiDel:(t,r)=>{const s={url:t};xhr.del(s,r)}})},basicToolbarBundle={name:"basicToolbar",getReducer:()=>{const e={activeTool:null,open:!1};return(t=e,{type:r,payload:s})=>{switch(r){case"BASIC_TOOL_ACTIVATE":case"BASIC_TOOL_DEACTIVATE":return Object.assign({},t,s);default:return t}}},doBasicToolbarActivate:({activeTool:e})=>({dispatch:t})=>{t({type:"BASIC_TOOL_ACTIVATE",payload:{activeTool:e,open:!0}})},doBasicToolbarToggle:(e,t)=>({store:r})=>{e!==t?(r.doBasicToolbarDeactivate(),r.doBasicToolbarActivate({activeTool:t})):r.doBasicToolbarDeactivate()},doBasicToolbarDeactivate:()=>({dispatch:e})=>{e({type:"BASIC_TOOL_DEACTIVATE",payload:{activeTool:null,open:!1}})},selectBasicToolbarActiveTool:e=>e.basicToolbar.activeTool,selectBasicToolbarOpen:e=>e.basicToolbar.open},configBundle={name:"config",getReducer(){const e={default:{}};return(t=e,{type:r,payload:s})=>t},selectDefaultConfig:e=>e.config.default,selectBasemapList:e=>e.config.default.basemaps.map(t=>(t.url.indexOf("{accessToken}")!==-1&&(t.url=t.url.replace(/{accessToken}/ig,t.accessToken||"")),t.url.indexOf("{s}")!==-1&&(t.url=t.url.replace(/{s}/ig,t.accessToken||"{a-c}")),t)),selectBasemapImages:e=>e.config.default.basemapImageIDs,selectDefaultLayers:e=>e.config.default.datasets,selectLimitMapExtent:e=>e.config.default.limitMapExtent},exportBundle={name:"export",getReducer:()=>{const e={loadingCsv:!1,loadingGeoJSON:!1};return(t=e,{type:r,payload:s})=>{switch(r){case"EXPORT_TO_CSV_INITIATED":case"EXPORT_TO_CSV_FINISHED":case"EXPORT_TO_GEOJSON_INITIATED":case"EXPORT_TO_GEOJSON_FINISHED":return Object.assign({},t,s);default:return t}}},doExportToCSV:e=>({dispatch:t,store:r})=>{const s=e.features;let o=[];const d=Object.keys(s[0].properties);o.push(d),s.forEach((m,g)=>{const y=Object.keys(m.properties).map(b=>m.properties[b]);o.push(y)}),r.doGenerateCsv(o)},doGenerateCsv:e=>({dispatch:t,store:r})=>{t({type:"EXPORT_TO_CSV_INITIATED",payload:{loadingCsv:!0}});const s=m=>{let g="";for(let y=0;y<m.length;y++){let b=m[y]===null?"":m[y].toString();m[y]instanceof Date&&(b=m[y].toLocaleString());let x=b.replace(/"/g,'""');x.search(/("|,|\n)/g)>=0&&(x='"'+x+'"'),y>0&&(g+=","),g+=x}return g+`
1
+ (function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("react"),require("react/jsx-runtime"),require("redux-bundler"),require("money-clip"),require("xhr"),require("ol/Collection"),require("ol/style/Style"),require("ol/style/Fill"),require("ol/style/Stroke"),require("ol/style/Circle"),require("ol/source/XYZ"),require("ol/source/TileArcGISRest"),require("ol/source/ImageArcGISRest"),require("ol/source/ImageWMS"),require("ol/source/TileWMS"),require("ol/source/Vector"),require("ol/layer/Tile"),require("ol/layer/Image"),require("ol/layer/Vector"),require("ol/format/GeoJSON"),require("ol/style/Text"),require("ol/style/RegularShape"),require("ol/format/EsriJSON.js"),require("ol/loadingstrategy"),require("ol/tilegrid/TileGrid"),require("ol/tilegrid"),require("async"),require("ol-esri-style"),require("ol/Map.js"),require("ol/View"),require("ol/proj"),require("ol/control/ScaleLine"),require("ol/ol.css"),require("uuid"),require("ol/proj/Projection"),require("proj4"),require("lodash"),require("react-dom"),require("react-dom/client"),require("ol/Overlay"),require("ol/interaction/Draw"),require("ol/interaction/Select"),require("ol/interaction/Modify"),require("ol/style"),require("react-data-grid"),require("ol/interaction/DragBox"),require("ol/interaction/Snap"),require("ol/Feature"),require("ol/geom/Point"),require("ol/geom/Polygon"),require("ol/format/EsriJSON"),require("ol/sphere")):typeof define=="function"&&define.amd?define(["exports","react","react/jsx-runtime","redux-bundler","money-clip","xhr","ol/Collection","ol/style/Style","ol/style/Fill","ol/style/Stroke","ol/style/Circle","ol/source/XYZ","ol/source/TileArcGISRest","ol/source/ImageArcGISRest","ol/source/ImageWMS","ol/source/TileWMS","ol/source/Vector","ol/layer/Tile","ol/layer/Image","ol/layer/Vector","ol/format/GeoJSON","ol/style/Text","ol/style/RegularShape","ol/format/EsriJSON.js","ol/loadingstrategy","ol/tilegrid/TileGrid","ol/tilegrid","async","ol-esri-style","ol/Map.js","ol/View","ol/proj","ol/control/ScaleLine","ol/ol.css","uuid","ol/proj/Projection","proj4","lodash","react-dom","react-dom/client","ol/Overlay","ol/interaction/Draw","ol/interaction/Select","ol/interaction/Modify","ol/style","react-data-grid","ol/interaction/DragBox","ol/interaction/Snap","ol/Feature","ol/geom/Point","ol/geom/Polygon","ol/format/EsriJSON","ol/sphere"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.corpsmap={},e.React,e.jsxRuntime,e.reduxBundler,e.moneyClip,e.xhr,null,e.Style,e.Fill,e.Stroke,e.Circle,e.XYZ,e.TileArcGISRest,e.ImageArcGISRest,e.ImageWMS,e.TileWMS,e.VectorSrc,e.Tile,e.Image$1,e.Vector,e.GeoJSON,e.Text,e.RegularShape,e.EsriJSON,e.loadingstrategy,null,e.tilegrid,e.async,e.olEsriStyle,e.olMap,e.View,e.proj,e.ScaleBar,null,e.uuid,e.Projection,e.proj4,e.lodash,e.ReactDOM,e.ReactDOM,e.Overlay$1,e.Draw,e.Select$1,e.Modify,e.style$3,e.DataGrid,e.DragBox,e.Snap,e.Feature,e.Point,e.Polygon,e.EsriJSON$1,e.sphere))})(this,(function(exports,React,jsxRuntime,reduxBundler,moneyClip,xhr,Collection,Style,Fill,Stroke,Circle,XYZ,TileArcGISRest,ImageArcGISRest,ImageWMS,TileWMS,VectorSrc,Tile,Image$1,Vector,GeoJSON,Text,RegularShape,EsriJSON,loadingstrategy,TileGrid,tilegrid,async,olEsriStyle,olMap,View,proj,ScaleBar,ol_css,uuid,Projection,proj4,_,reactDom,ReactDOM,Overlay$1,Draw,Select$1,Modify,style$3,reactDataGrid,DragBox,Snap,Feature,Point,Polygon,EsriJSON$1,sphere){"use strict";function _interopNamespaceDefault(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const React__namespace=_interopNamespaceDefault(React),{useContext,useMemo,useState,useEffect}=React,StoreContext=React.createContext();class Provider extends React.Component{render(){return jsxRuntime.jsx(StoreContext.Provider,{value:this.props.store,children:React.Children.only(this.props.children)})}}const connect=function(...e){const t=e.slice(-1)[0],r=e.length>1?e.slice(0,-1):[],s=[],o=[];r.forEach(m=>{if(m.startsWith("select"))o.push(m);else if(m.startsWith("do"))s.push(m);else throw new Error(`CanNotConnect ${m}`)});const d=m=>{const g=useContext(StoreContext),[y,b]=useState(()=>g.select(o));useEffect(()=>g.subscribeToSelectors(o,()=>{const C=g.select(o);b(C)}),[g,o.join()]);const x=useMemo(()=>{const E={};return s.forEach(C=>{E[C]=(...S)=>g.action?g.action(C,S):g[C](...S)}),E},[g,s.join()]);return React.createElement(t,{...m,...y,...x})};return d.displayName=`Connect(${t.displayName||t.name})`,d};class ErrorBoundary extends React.Component{constructor(t){super(t),this.state={hasError:!1,error:null,info:null}}componentDidCatch(t,r){this.setState({hasError:!0,error:t,info:r})}render(){const{hasError:t,error:r,info:s}=this.state;return t&&console.log("error rendering",r,s),this.props.children}}class PluginRegion extends React.Component{render(){const{className:t,styleOverride:r,components:s}=this.props;return jsxRuntime.jsx("div",{className:t,children:s.map((o,d)=>{const m=o;return jsxRuntime.jsx(ErrorBoundary,{children:jsxRuntime.jsx("div",{style:r,children:jsxRuntime.jsx(m,{})})},d)})})}}let PrimaryPanel$1=class extends React.Component{constructor(t){super(t),this.state={left:49},this.handleResize=this.handleResize.bind(this),this.handleClose=this.handleClose.bind(this)}handleResize(t){t.preventDefault(),t.stopPropagation();let{left:r}=this.state;t.pageX&&this.props.doPrimaryPanelSetWidth(t.pageX-r)}handleClose(t){t.preventDefault(),t.stopPropagation(),this.props.doPrimaryPanelClose()}render(){const{primaryPanelChildren:t,primaryPanelOptions:r,primaryPanelTop:s,primaryPanelShowClose:o,primaryPanelWidth:d}=this.props,{left:m,width:g}=this.state;return!t||!t.length?null:jsxRuntime.jsxs("div",{className:"sidebar-panel",style:{top:s,left:m,width:d},children:[jsxRuntime.jsx(ErrorBoundary,{children:jsxRuntime.jsxs("div",{id:"primary-panel-content",children:[o?jsxRuntime.jsx("div",{className:"row",children:jsxRuntime.jsx("button",{className:"pull-right cm-btn cm-btn-link",title:"Close Panel ",style:{marginRight:"10px",padding:"3px"},onClick:this.handleClose,children:jsxRuntime.jsx("i",{className:"mdi mdi-close-circle-outline",style:{fontSize:"22px"}})})}):null,t.map((y,b)=>{const x=y;return jsxRuntime.jsx(x,{...r},b)})]})}),jsxRuntime.jsx("div",{className:"e-w-drag-handle",draggable:"true",onDrag:this.handleResize,onDragEnd:this.handleResize})]})}};const PrimaryPanel=connect("selectPrimaryPanelTop","selectPrimaryPanelChildren","selectPrimaryPanelOptions","selectPrimaryPanelWidth","selectPrimaryPanelShowClose","doPrimaryPanelResize","doPrimaryPanelSetWidth","doPrimaryPanelClose",PrimaryPanel$1);let BasicToolbar$1=class extends React.Component{render(){const{theme:t,componentsBasicToolbar:r}=this.props;return jsxRuntime.jsx("div",{className:"toolbar toolbar-top-left "+t,style:{left:49},children:jsxRuntime.jsx(PluginRegion,{className:"toolbar-horizontal",components:r,styleOverride:{}})})}};const BasicToolbar=connect("selectTheme","selectComponentsBasicToolbar",BasicToolbar$1);let LeftSidebar$1=class extends React.Component{render(){const{theme:t,componentsLeftSidebarBottom:r,componentsLeftSidebarTop:s}=this.props;return r.length+s.length?jsxRuntime.jsxs("div",{className:"sidebar sidebar-left "+t,children:[jsxRuntime.jsx(PluginRegion,{className:"sidebar-buttons-top",components:s,styleOverride:{width:"100%"}}),jsxRuntime.jsx(PluginRegion,{className:"sidebar-buttons-bottom",components:r,styleOverride:{width:"100%"}}),jsxRuntime.jsx(PrimaryPanel,{}),jsxRuntime.jsx(BasicToolbar,{})]}):null}};const LeftSidebar=connect("selectTheme","selectComponentsLeftSidebarTop","selectComponentsLeftSidebarBottom",LeftSidebar$1);let UpperRightToolbar$1=class extends React.Component{render(){const{theme:t,componentsUpperRight:r}=this.props;return jsxRuntime.jsx("div",{className:"toolbar toolbar-upper-right "+t,style:{right:49},children:jsxRuntime.jsx("div",{className:"cm-btn-group",children:jsxRuntime.jsx(PluginRegion,{className:"toolbar-horizontal-right",components:r})})})}};const UpperRightToolbar=connect("selectTheme","selectComponentsUpperRight",UpperRightToolbar$1);let LowerRightToolbar$1=class extends React.Component{render(){const{theme:t,componentsLowerRight:r}=this.props;return jsxRuntime.jsx("div",{className:"toolbar toolbar-lower-right "+t,style:{right:49},children:jsxRuntime.jsx("div",{className:"cm-btn-group",children:jsxRuntime.jsx(PluginRegion,{className:"toolbar-horizontal-right",components:r,styleOverride:{}})})})}};const LowerRightToolbar=connect("selectTheme","selectComponentsLowerRight",LowerRightToolbar$1);let RightSidebar$1=class extends React.Component{render(){const{theme:t,componentsRightSidebarBottom:r,componentsRightSidebarTop:s,componentsRightSidebarCount:o}=this.props;return o?jsxRuntime.jsxs("div",{className:"sidebar sidebar-right "+t,children:[jsxRuntime.jsx(PluginRegion,{className:"sidebar-buttons-top",components:s}),jsxRuntime.jsx(PluginRegion,{className:"sidebar-buttons-bottom",components:r}),jsxRuntime.jsx(UpperRightToolbar,{}),jsxRuntime.jsx(LowerRightToolbar,{})]}):null}};const RightSidebar=connect("selectTheme","selectComponentsRightSidebarTop","selectComponentsRightSidebarBottom","selectComponentsRightSidebarCount",RightSidebar$1);let Map$3=class extends React.Component{componentDidMount(){const{doMapInitialize:t,viewState:r,limitMapExtent:s}=this.props,{center:o,zoom:d,rotation:m,minZoom:g,maxZoom:y}=r;this.mapEl&&t(this.mapEl,{center:o,zoom:d,rotation:m,minZoom:g,maxZoom:y,layers:[],limitMapExtent:s})}render(){const{componentsLeftSidebarCount:t,componentsRightSidebarCount:r,cursorClass:s}=this.props,o={position:"absolute",top:0,left:t>0?49:0,right:r>0?49:0,bottom:0};return jsxRuntime.jsx("div",{id:"map",className:s,ref:d=>{this.mapEl=d},style:o})}};const Map$2=connect("doMapInitialize","selectLimitMapExtent","selectViewState","selectCursorClass","selectComponentsLeftSidebarCount","selectComponentsRightSidebarCount",Map$3);let NorthRegion$1=class extends React.Component{render(){const{height:t}=this.props;return jsxRuntime.jsxs("div",{className:"cm-north-container",style:{height:t},children:[jsxRuntime.jsx(LeftSidebar,{}),jsxRuntime.jsx(RightSidebar,{}),jsxRuntime.jsx(Map$2,{})]})}};const NorthRegion=connect(NorthRegion$1);var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs$1(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var classnames$1={exports:{}};var hasRequiredClassnames;function requireClassnames(){return hasRequiredClassnames||(hasRequiredClassnames=1,(function(e){(function(){var t={}.hasOwnProperty;function r(){for(var d="",m=0;m<arguments.length;m++){var g=arguments[m];g&&(d=o(d,s(g)))}return d}function s(d){if(typeof d=="string"||typeof d=="number")return d;if(typeof d!="object")return"";if(Array.isArray(d))return r.apply(null,d);if(d.toString!==Object.prototype.toString&&!d.toString.toString().includes("[native code]"))return d.toString();var m="";for(var g in d)t.call(d,g)&&d[g]&&(m=o(m,g));return m}function o(d,m){return m?d?d+" "+m:d+m:d}e.exports?(r.default=r,e.exports=r):window.classNames=r})()})(classnames$1)),classnames$1.exports}var classnamesExports=requireClassnames();const classnames=getDefaultExportFromCjs$1(classnamesExports);let SouthRegionTab$1=class extends React.Component{constructor(t){super(t),this.setActiveTab=this.setActiveTab.bind(this),this.closeTab=this.closeTab.bind(this),this.handleClick=this.handleClick.bind(this)}setActiveTab(){const{idx:t,onSelect:r}=this.props;r(t)}closeTab(){const{doSouthRegionCloseTab:t,child:r}=this.props;t(r.uid)}handleClick(t){const r=t.target,{action:s}=r.dataset;switch(s){case"nav":return this.setActiveTab();case"close":return this.closeTab();default:return}}render(){const{activeClass:t,displayName:r}=this.props;return jsxRuntime.jsxs("li",{className:t,children:[jsxRuntime.jsx("span",{onClick:this.handleClick,className:"pull-right","data-action":"close",style:{padding:"10px 10px"},children:jsxRuntime.jsx("i",{"data-action":"close",className:"mdi mdi-close-circle-outline"})}),jsxRuntime.jsx("a",{onClick:this.handleClick,href:"#","data-action":"nav",style:{marginRight:"36px"},children:r})]})}};const SouthRegionTab=connect("doSouthRegionCloseTab",SouthRegionTab$1);let SouthRegion$1=class extends React.Component{constructor(t){super(t),this.state={activeTab:0},this.setActiveTab=this.setActiveTab.bind(this)}setActiveTab(t){this.setState({activeTab:t})}render(){const{activeTab:t}=this.state,{height:r,southRegionChildren:s}=this.props;return jsxRuntime.jsx("div",{className:"south-container",style:{position:"relative",height:r,left:0,right:0,bottom:0},children:jsxRuntime.jsx(ErrorBoundary,{children:jsxRuntime.jsxs("div",{id:"south-panel-content",children:[jsxRuntime.jsx("ul",{className:"cm-nav cm-nav-tabs",children:s.map((o,d)=>{const m=classnames({active:d===t}),g=o.displayName||"TABLE";return jsxRuntime.jsx(SouthRegionTab,{idx:d,activeClass:m,displayName:g,child:o,onSelect:this.setActiveTab},o.uid)})}),s.map((o,d)=>{const m=o.component,g=o.options||{},y=classnames({hidden:d!==t});return jsxRuntime.jsx("div",{className:y,children:jsxRuntime.jsx(m,{...g},o.uid)},d)})]})})})}};const SouthRegion=connect("selectSouthRegionChildren",SouthRegion$1);let ModalWindow$1=class extends React.Component{render(){const{modalChildren:t,modalOptions:r}=this.props;if(!t||!t.length)return null;const s=r.smSize,o=classnames({"cm-modal-content":!0,"cm-modal-lg":!s,"cm-modal-sm":!!s});return jsxRuntime.jsx("div",{className:"cm-modal show",children:jsxRuntime.jsx("div",{className:"cm-modal-dialog",children:jsxRuntime.jsx("div",{className:o,children:t.map((d,m)=>{const g=d;return jsxRuntime.jsx(g,{...r},m)})})})})}};const ModalWindow=connect("selectModalChildren","selectModalOptions",ModalWindow$1);let Notification$1=class extends React.Component{constructor(t){super(t),this.remove=this.remove.bind(this),this.renderContent=this.renderContent.bind(this),this.renderDismissButton=this.renderDismissButton.bind(this)}componentDidMount(){let{autoDismiss:t,onAdd:r}=this.props;t===0?console.log("didn't set up autodismiss"):(t||(t=5),console.log("should set timeout"),isNaN(Number(t))||window.setTimeout(this.remove,t*1e3)),r&&typeof r=="function"&&r(this.props)}remove(){const{doNotificationsDismiss:t,uid:r,onRemove:s}=this.props;r&&t(r),s&&typeof s=="function"&&s(this.props)}renderContent(){const{title:t,message:r,children:s}=this.props;return s?jsxRuntime.jsx(jsxRuntime.Fragment,{children:s}):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx("p",{children:jsxRuntime.jsx("strong",{children:t})}),jsxRuntime.jsx("p",{children:r})]})}renderDismissButton(){return jsxRuntime.jsx("button",{onClick:this.remove,className:"close",children:"×"})}render(){const{level:t,position:r}=this.props;let s="cm-alert";switch(t){case"success":s+=" cm-alert-success";break;case"info":s+=" cm-alert-info";break;case"warning":s+=" cm-alert-warning";break;case"danger":s+=" cm-alert-danger";break;default:s+=" cm-alert-default"}return jsxRuntime.jsxs("li",{className:s,style:{minWidth:"300px"},onClick:this.remove,children:[this.renderDismissButton(),this.renderContent()]})}};const Notification=connect("doNotificationsDismiss",Notification$1),NotificationQuadrant=e=>{const{items:t,quad:r}=e,s=`list-unstyled notification-pane notification-${r}`;return t.length?jsxRuntime.jsx("ul",{className:s,children:t.map((o,d)=>jsxRuntime.jsx(Notification,{...o},d))}):null},NotificationPane$1=e=>{const{notifications:t}=e;let r=[],s=[],o=[],d=[];return Object.keys(t).forEach(m=>{switch(t[m].position){case"tl":r.push(t[m]);break;case"bl":s.push(t[m]);break;case"br":o.push(t[m]);break;default:d.push(t[m])}}),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(NotificationQuadrant,{items:r,quad:"top-left"}),jsxRuntime.jsx(NotificationQuadrant,{items:s,quad:"bottom-left"}),jsxRuntime.jsx(NotificationQuadrant,{items:d,quad:"top-right"}),jsxRuntime.jsx(NotificationQuadrant,{items:o,quad:"bottom-right"})]})},NotificationPane=connect("selectNotifications",NotificationPane$1);var isObject_1,hasRequiredIsObject;function requireIsObject(){if(hasRequiredIsObject)return isObject_1;hasRequiredIsObject=1;function e(t){var r=typeof t;return t!=null&&(r=="object"||r=="function")}return isObject_1=e,isObject_1}var _freeGlobal,hasRequired_freeGlobal;function require_freeGlobal(){if(hasRequired_freeGlobal)return _freeGlobal;hasRequired_freeGlobal=1;var e=typeof commonjsGlobal=="object"&&commonjsGlobal&&commonjsGlobal.Object===Object&&commonjsGlobal;return _freeGlobal=e,_freeGlobal}var _root,hasRequired_root;function require_root(){if(hasRequired_root)return _root;hasRequired_root=1;var e=require_freeGlobal(),t=typeof self=="object"&&self&&self.Object===Object&&self,r=e||t||Function("return this")();return _root=r,_root}var now_1,hasRequiredNow;function requireNow(){if(hasRequiredNow)return now_1;hasRequiredNow=1;var e=require_root(),t=function(){return e.Date.now()};return now_1=t,now_1}var _trimmedEndIndex,hasRequired_trimmedEndIndex;function require_trimmedEndIndex(){if(hasRequired_trimmedEndIndex)return _trimmedEndIndex;hasRequired_trimmedEndIndex=1;var e=/\s/;function t(r){for(var s=r.length;s--&&e.test(r.charAt(s)););return s}return _trimmedEndIndex=t,_trimmedEndIndex}var _baseTrim,hasRequired_baseTrim;function require_baseTrim(){if(hasRequired_baseTrim)return _baseTrim;hasRequired_baseTrim=1;var e=require_trimmedEndIndex(),t=/^\s+/;function r(s){return s&&s.slice(0,e(s)+1).replace(t,"")}return _baseTrim=r,_baseTrim}var _Symbol,hasRequired_Symbol;function require_Symbol(){if(hasRequired_Symbol)return _Symbol;hasRequired_Symbol=1;var e=require_root(),t=e.Symbol;return _Symbol=t,_Symbol}var _getRawTag,hasRequired_getRawTag;function require_getRawTag(){if(hasRequired_getRawTag)return _getRawTag;hasRequired_getRawTag=1;var e=require_Symbol(),t=Object.prototype,r=t.hasOwnProperty,s=t.toString,o=e?e.toStringTag:void 0;function d(m){var g=r.call(m,o),y=m[o];try{m[o]=void 0;var b=!0}catch{}var x=s.call(m);return b&&(g?m[o]=y:delete m[o]),x}return _getRawTag=d,_getRawTag}var _objectToString,hasRequired_objectToString;function require_objectToString(){if(hasRequired_objectToString)return _objectToString;hasRequired_objectToString=1;var e=Object.prototype,t=e.toString;function r(s){return t.call(s)}return _objectToString=r,_objectToString}var _baseGetTag,hasRequired_baseGetTag;function require_baseGetTag(){if(hasRequired_baseGetTag)return _baseGetTag;hasRequired_baseGetTag=1;var e=require_Symbol(),t=require_getRawTag(),r=require_objectToString(),s="[object Null]",o="[object Undefined]",d=e?e.toStringTag:void 0;function m(g){return g==null?g===void 0?o:s:d&&d in Object(g)?t(g):r(g)}return _baseGetTag=m,_baseGetTag}var isObjectLike_1,hasRequiredIsObjectLike;function requireIsObjectLike(){if(hasRequiredIsObjectLike)return isObjectLike_1;hasRequiredIsObjectLike=1;function e(t){return t!=null&&typeof t=="object"}return isObjectLike_1=e,isObjectLike_1}var isSymbol_1,hasRequiredIsSymbol;function requireIsSymbol(){if(hasRequiredIsSymbol)return isSymbol_1;hasRequiredIsSymbol=1;var e=require_baseGetTag(),t=requireIsObjectLike(),r="[object Symbol]";function s(o){return typeof o=="symbol"||t(o)&&e(o)==r}return isSymbol_1=s,isSymbol_1}var toNumber_1,hasRequiredToNumber;function requireToNumber(){if(hasRequiredToNumber)return toNumber_1;hasRequiredToNumber=1;var e=require_baseTrim(),t=requireIsObject(),r=requireIsSymbol(),s=NaN,o=/^[-+]0x[0-9a-f]+$/i,d=/^0b[01]+$/i,m=/^0o[0-7]+$/i,g=parseInt;function y(b){if(typeof b=="number")return b;if(r(b))return s;if(t(b)){var x=typeof b.valueOf=="function"?b.valueOf():b;b=t(x)?x+"":x}if(typeof b!="string")return b===0?b:+b;b=e(b);var E=d.test(b);return E||m.test(b)?g(b.slice(2),E?2:8):o.test(b)?s:+b}return toNumber_1=y,toNumber_1}var debounce_1,hasRequiredDebounce;function requireDebounce(){if(hasRequiredDebounce)return debounce_1;hasRequiredDebounce=1;var e=requireIsObject(),t=requireNow(),r=requireToNumber(),s="Expected a function",o=Math.max,d=Math.min;function m(g,y,b){var x,E,C,S,A,N,k=0,L=!1,G=!1,M=!0;if(typeof g!="function")throw new TypeError(s);y=r(y)||0,e(b)&&(L=!!b.leading,G="maxWait"in b,C=G?o(r(b.maxWait)||0,y):C,M="trailing"in b?!!b.trailing:M);function z(ie){var te=x,ue=E;return x=E=void 0,k=ie,S=g.apply(ue,te),S}function V(ie){return k=ie,A=setTimeout(Q,y),L?z(ie):S}function Y(ie){var te=ie-N,ue=ie-k,le=y-te;return G?d(le,C-ue):le}function X(ie){var te=ie-N,ue=ie-k;return N===void 0||te>=y||te<0||G&&ue>=C}function Q(){var ie=t();if(X(ie))return $(ie);A=setTimeout(Q,Y(ie))}function $(ie){return A=void 0,M&&x?z(ie):(x=E=void 0,S)}function K(){A!==void 0&&clearTimeout(A),k=0,x=N=E=A=void 0}function ee(){return A===void 0?S:$(t())}function se(){var ie=t(),te=X(ie);if(x=arguments,E=this,N=ie,te){if(A===void 0)return V(N);if(G)return clearTimeout(A),A=setTimeout(Q,y),z(N)}return A===void 0&&(A=setTimeout(Q,y)),S}return se.cancel=K,se.flush=ee,se}return debounce_1=m,debounce_1}var debounceExports=requireDebounce();const debounce=getDefaultExportFromCjs$1(debounceExports);let Corpsmap$1=class extends React.Component{constructor(t){super(t),this.renderSouthRegion=this.renderSouthRegion.bind(this),this.setHeight=this.setHeight.bind(this),this.resize=this.resize.bind(this),this.setHeightDebounced=debounce(this.setHeight,10)}componentDidMount(){this._isMounted=!0;const{doVLayoutSetHeight:t}=this.props;t(this.el.offsetHeight)}componentWillUnmount(){this._isMounted=!1}setHeight(t){const{doVLayoutResize:r,vLayoutHeight:s}=this.props;if(t>45&&t<s){const o=t/s,d=1-o;r(o,d)}}resize(t){t.preventDefault();const r=t.clientY;this.setHeightDebounced(r)}renderSouthRegion(){const{doSouthRegionClose:t,theme:r,southHeight:s}=this.props;return s?jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{draggable:"true",onDrag:this.resize,className:r+" n-s-drag-handle",children:jsxRuntime.jsx("span",{onClick:t,className:"pull-right",children:jsxRuntime.jsx("i",{className:"mdi mdi-close"})})}),jsxRuntime.jsx(SouthRegion,{height:s-5})]}):null}render(){const{northHeight:t}=this.props;return jsxRuntime.jsxs("div",{className:"corpsmap cm-container-fluid",style:{padding:0},ref:r=>{this.el=r},children:[jsxRuntime.jsx(NorthRegion,{height:t}),this.renderSouthRegion(),jsxRuntime.jsx(ModalWindow,{}),jsxRuntime.jsx(NotificationPane,{})]})}};const Corpsmap=connect("selectTheme","selectNorthHeight","selectSouthHeight","selectVLayoutHeight","doSouthRegionClose","doVLayoutResize","doVLayoutSetHeight",Corpsmap$1),cache=moneyClip.getConfiguredCache({maxAge:1e3*60*60,version:1});function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var browser={exports:{}},process=browser.exports={},cachedSetTimeout,cachedClearTimeout;function defaultSetTimout(){throw new Error("setTimeout has not been defined")}function defaultClearTimeout(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?cachedSetTimeout=setTimeout:cachedSetTimeout=defaultSetTimout}catch{cachedSetTimeout=defaultSetTimout}try{typeof clearTimeout=="function"?cachedClearTimeout=clearTimeout:cachedClearTimeout=defaultClearTimeout}catch{cachedClearTimeout=defaultClearTimeout}})();function runTimeout(e){if(cachedSetTimeout===setTimeout)return setTimeout(e,0);if((cachedSetTimeout===defaultSetTimout||!cachedSetTimeout)&&setTimeout)return cachedSetTimeout=setTimeout,setTimeout(e,0);try{return cachedSetTimeout(e,0)}catch{try{return cachedSetTimeout.call(null,e,0)}catch{return cachedSetTimeout.call(this,e,0)}}}function runClearTimeout(e){if(cachedClearTimeout===clearTimeout)return clearTimeout(e);if((cachedClearTimeout===defaultClearTimeout||!cachedClearTimeout)&&clearTimeout)return cachedClearTimeout=clearTimeout,clearTimeout(e);try{return cachedClearTimeout(e)}catch{try{return cachedClearTimeout.call(null,e)}catch{return cachedClearTimeout.call(this,e)}}}var queue=[],draining=!1,currentQueue,queueIndex=-1;function cleanUpNextTick(){!draining||!currentQueue||(draining=!1,currentQueue.length?queue=currentQueue.concat(queue):queueIndex=-1,queue.length&&drainQueue())}function drainQueue(){if(!draining){var e=runTimeout(cleanUpNextTick);draining=!0;for(var t=queue.length;t;){for(currentQueue=queue,queue=[];++queueIndex<t;)currentQueue&&currentQueue[queueIndex].run();queueIndex=-1,t=queue.length}currentQueue=null,draining=!1,runClearTimeout(e)}}process.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];queue.push(new Item(e,t)),queue.length===1&&!draining&&runTimeout(drainQueue)};function Item(e,t){this.fun=e,this.array=t}Item.prototype.run=function(){this.fun.apply(null,this.array)},process.title="browser",process.browser=!0,process.env={},process.argv=[],process.version="",process.versions={};function noop$2(){}process.on=noop$2,process.addListener=noop$2,process.once=noop$2,process.off=noop$2,process.removeListener=noop$2,process.removeAllListeners=noop$2,process.emit=noop$2,process.prependListener=noop$2,process.prependOnceListener=noop$2,process.listeners=function(e){return[]},process.binding=function(e){throw new Error("process.binding is not supported")},process.cwd=function(){return"/"},process.chdir=function(e){throw new Error("process.chdir is not supported")},process.umask=function(){return 0};var browserExports=browser.exports;const process$1=getDefaultExportFromCjs(browserExports),apiBundle={name:"api",getReducer:()=>{const e={root:window.CM_ENV||""};return(t=e,{type:r,payload:s})=>t},selectApiRoot:e=>process$1.env.NODE_ENV==="development"?e.api.root:e.windowLocation.origin,getExtraArgs:e=>({anonGet:(t,r)=>{const s={url:t};xhr.get(s,r)},apiGet:(t,r)=>{const s={url:t};xhr.get(s,r)},apiPost:(t,r,s)=>{const o={url:t,json:r};xhr.post(o,s)},apiDel:(t,r)=>{const s={url:t};xhr.del(s,r)}})},basicToolbarBundle={name:"basicToolbar",getReducer:()=>{const e={activeTool:null,open:!1};return(t=e,{type:r,payload:s})=>{switch(r){case"BASIC_TOOL_ACTIVATE":case"BASIC_TOOL_DEACTIVATE":return Object.assign({},t,s);default:return t}}},doBasicToolbarActivate:({activeTool:e})=>({dispatch:t})=>{t({type:"BASIC_TOOL_ACTIVATE",payload:{activeTool:e,open:!0}})},doBasicToolbarToggle:(e,t)=>({store:r})=>{e!==t?(r.doBasicToolbarDeactivate(),r.doBasicToolbarActivate({activeTool:t})):r.doBasicToolbarDeactivate()},doBasicToolbarDeactivate:()=>({dispatch:e})=>{e({type:"BASIC_TOOL_DEACTIVATE",payload:{activeTool:null,open:!1}})},selectBasicToolbarActiveTool:e=>e.basicToolbar.activeTool,selectBasicToolbarOpen:e=>e.basicToolbar.open},configBundle={name:"config",getReducer(){const e={default:{}};return(t=e,{type:r,payload:s})=>t},selectDefaultConfig:e=>e.config.default,selectBasemapList:e=>e.config.default.basemaps.map(t=>(t.url.indexOf("{accessToken}")!==-1&&(t.url=t.url.replace(/{accessToken}/ig,t.accessToken||"")),t.url.indexOf("{s}")!==-1&&(t.url=t.url.replace(/{s}/ig,t.accessToken||"{a-c}")),t)),selectBasemapImages:e=>e.config.default.basemapImageIDs,selectDefaultLayers:e=>e.config.default.datasets,selectLimitMapExtent:e=>e.config.default.limitMapExtent},exportBundle={name:"export",getReducer:()=>{const e={loadingCsv:!1,loadingGeoJSON:!1};return(t=e,{type:r,payload:s})=>{switch(r){case"EXPORT_TO_CSV_INITIATED":case"EXPORT_TO_CSV_FINISHED":case"EXPORT_TO_GEOJSON_INITIATED":case"EXPORT_TO_GEOJSON_FINISHED":return Object.assign({},t,s);default:return t}}},doExportToCSV:e=>({dispatch:t,store:r})=>{const s=e.features;let o=[];const d=Object.keys(s[0].properties);o.push(d),s.forEach((m,g)=>{const y=Object.keys(m.properties).map(b=>m.properties[b]);o.push(y)}),r.doGenerateCsv(o)},doGenerateCsv:e=>({dispatch:t,store:r})=>{t({type:"EXPORT_TO_CSV_INITIATED",payload:{loadingCsv:!0}});const s=m=>{let g="";for(let y=0;y<m.length;y++){let b=m[y]===null?"":m[y].toString();m[y]instanceof Date&&(b=m[y].toLocaleString());let x=b.replace(/"/g,'""');x.search(/("|,|\n)/g)>=0&&(x='"'+x+'"'),y>0&&(g+=","),g+=x}return g+`
2
2
  `};let o="";for(let m=0;m<e.length;m++)o+=s(e[m]);let d=new Blob([o],{type:"text/csv;charset=utf-8;"});if(navigator.msSaveBlob)navigator.msSaveBlob(d,"export.csv");else{let m=document.createElement("a");if(m.download!==void 0){let g=URL.createObjectURL(d);m.setAttribute("href",g),m.setAttribute("download","export.csv"),m.style.visibility="hidden",document.body.appendChild(m),m.click(),document.body.removeChild(m)}}t({type:"EXPORT_TO_CSV_FINISHED",payload:{loadingCsv:!1}})},doGenerateGeoJSON:e=>({dispatch:t,store:r})=>{t({type:"EXPORT_TO_GEOJSON_INITIATED",payload:{loadingGeoJSON:!0}});let s=new Blob([JSON.stringify(e)],{type:"text/csv;charset=utf-8;"});if(navigator.msSaveBlob)navigator.msSaveBlob(s,"export.geojson");else{let o=document.createElement("a");if(o.download!==void 0){let d=URL.createObjectURL(s);o.setAttribute("href",d),o.setAttribute("download","export.geojson"),o.style.visibility="hidden",document.body.appendChild(o),o.click(),document.body.removeChild(o)}}t({type:"EXPORT_TO_GEOJSON_FINISHED",payload:{loadingGeoJSON:!1}})}};var parallel$2={exports:{}},eachOf={exports:{}},isArrayLike={exports:{}},hasRequiredIsArrayLike$1;function requireIsArrayLike$1(){return hasRequiredIsArrayLike$1||(hasRequiredIsArrayLike$1=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;function r(s){return s&&typeof s.length=="number"&&s.length>=0&&s.length%1===0}e.exports=t.default})(isArrayLike,isArrayLike.exports)),isArrayLike.exports}var breakLoop={exports:{}},hasRequiredBreakLoop;function requireBreakLoop(){return hasRequiredBreakLoop||(hasRequiredBreakLoop=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const r={};t.default=r,e.exports=t.default})(breakLoop,breakLoop.exports)),breakLoop.exports}var eachOfLimit$1={exports:{}},eachOfLimit={exports:{}},once={exports:{}},hasRequiredOnce;function requireOnce(){return hasRequiredOnce||(hasRequiredOnce=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;function r(s){function o(...d){if(s!==null){var m=s;s=null,m.apply(this,d)}}return Object.assign(o,s),o}e.exports=t.default})(once,once.exports)),once.exports}var iterator={exports:{}},getIterator={exports:{}},hasRequiredGetIterator;function requireGetIterator(){return hasRequiredGetIterator||(hasRequiredGetIterator=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(r){return r[Symbol.iterator]&&r[Symbol.iterator]()},e.exports=t.default})(getIterator,getIterator.exports)),getIterator.exports}var hasRequiredIterator;function requireIterator(){return hasRequiredIterator||(hasRequiredIterator=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=x;var r=requireIsArrayLike$1(),s=m(r),o=requireGetIterator(),d=m(o);function m(E){return E&&E.__esModule?E:{default:E}}function g(E){var C=-1,S=E.length;return function(){return++C<S?{value:E[C],key:C}:null}}function y(E){var C=-1;return function(){var A=E.next();return A.done?null:(C++,{value:A.value,key:C})}}function b(E){var C=E?Object.keys(E):[],S=-1,A=C.length;return function N(){var k=C[++S];return k==="__proto__"?N():S<A?{value:E[k],key:k}:null}}function x(E){if((0,s.default)(E))return g(E);var C=(0,d.default)(E);return C?y(C):b(E)}e.exports=t.default})(iterator,iterator.exports)),iterator.exports}var onlyOnce={exports:{}},hasRequiredOnlyOnce;function requireOnlyOnce(){return hasRequiredOnlyOnce||(hasRequiredOnlyOnce=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;function r(s){return function(...o){if(s===null)throw new Error("Callback was already called.");var d=s;s=null,d.apply(this,o)}}e.exports=t.default})(onlyOnce,onlyOnce.exports)),onlyOnce.exports}var wrapAsync={},asyncify={exports:{}},initialParams={exports:{}},hasRequiredInitialParams;function requireInitialParams(){return hasRequiredInitialParams||(hasRequiredInitialParams=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(r){return function(...s){var o=s.pop();return r.call(this,s,o)}},e.exports=t.default})(initialParams,initialParams.exports)),initialParams.exports}var setImmediate$1={},hasRequiredSetImmediate;function requireSetImmediate(){if(hasRequiredSetImmediate)return setImmediate$1;hasRequiredSetImmediate=1,Object.defineProperty(setImmediate$1,"__esModule",{value:!0}),setImmediate$1.fallback=s,setImmediate$1.wrap=o;var e=setImmediate$1.hasQueueMicrotask=typeof queueMicrotask=="function"&&queueMicrotask,t=setImmediate$1.hasSetImmediate=typeof setImmediate=="function"&&setImmediate,r=setImmediate$1.hasNextTick=typeof process$1=="object"&&typeof process$1.nextTick=="function";function s(m){setTimeout(m,0)}function o(m){return(g,...y)=>m(()=>g(...y))}var d;return e?d=queueMicrotask:t?d=setImmediate:r?d=process$1.nextTick:d=s,setImmediate$1.default=o(d),setImmediate$1}var hasRequiredAsyncify;function requireAsyncify(){return hasRequiredAsyncify||(hasRequiredAsyncify=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=y;var r=requireInitialParams(),s=g(r),o=requireSetImmediate(),d=g(o),m=requireWrapAsync();function g(E){return E&&E.__esModule?E:{default:E}}function y(E){return(0,m.isAsync)(E)?function(...C){const S=C.pop(),A=E.apply(this,C);return b(A,S)}:(0,s.default)(function(C,S){var A;try{A=E.apply(this,C)}catch(N){return S(N)}if(A&&typeof A.then=="function")return b(A,S);S(null,A)})}function b(E,C){return E.then(S=>{x(C,null,S)},S=>{x(C,S&&(S instanceof Error||S.message)?S:new Error(S))})}function x(E,C,S){try{E(C,S)}catch(A){(0,d.default)(N=>{throw N},A)}}e.exports=t.default})(asyncify,asyncify.exports)),asyncify.exports}var hasRequiredWrapAsync;function requireWrapAsync(){if(hasRequiredWrapAsync)return wrapAsync;hasRequiredWrapAsync=1,Object.defineProperty(wrapAsync,"__esModule",{value:!0}),wrapAsync.isAsyncIterable=wrapAsync.isAsyncGenerator=wrapAsync.isAsync=void 0;var e=requireAsyncify(),t=r(e);function r(g){return g&&g.__esModule?g:{default:g}}function s(g){return g[Symbol.toStringTag]==="AsyncFunction"}function o(g){return g[Symbol.toStringTag]==="AsyncGenerator"}function d(g){return typeof g[Symbol.asyncIterator]=="function"}function m(g){if(typeof g!="function")throw new Error("expected a function");return s(g)?(0,t.default)(g):g}return wrapAsync.default=m,wrapAsync.isAsync=s,wrapAsync.isAsyncGenerator=o,wrapAsync.isAsyncIterable=d,wrapAsync}var asyncEachOfLimit={exports:{}},hasRequiredAsyncEachOfLimit;function requireAsyncEachOfLimit(){return hasRequiredAsyncEachOfLimit||(hasRequiredAsyncEachOfLimit=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=d;var r=requireBreakLoop(),s=o(r);function o(m){return m&&m.__esModule?m:{default:m}}function d(m,g,y,b){let x=!1,E=!1,C=!1,S=0,A=0;function N(){S>=g||C||x||(C=!0,m.next().then(({value:G,done:M})=>{if(!(E||x)){if(C=!1,M){x=!0,S<=0&&b(null);return}S++,y(G,A,k),A++,N()}}).catch(L))}function k(G,M){if(S-=1,!E){if(G)return L(G);if(G===!1){x=!0,E=!0;return}if(M===s.default||x&&S<=0)return x=!0,b(null);N()}}function L(G){E||(C=!1,x=!0,b(G))}N()}e.exports=t.default})(asyncEachOfLimit,asyncEachOfLimit.exports)),asyncEachOfLimit.exports}var hasRequiredEachOfLimit$1;function requireEachOfLimit$1(){return hasRequiredEachOfLimit$1||(hasRequiredEachOfLimit$1=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=requireOnce(),s=S(r),o=requireIterator(),d=S(o),m=requireOnlyOnce(),g=S(m),y=requireWrapAsync(),b=requireAsyncEachOfLimit(),x=S(b),E=requireBreakLoop(),C=S(E);function S(A){return A&&A.__esModule?A:{default:A}}t.default=A=>(N,k,L)=>{if(L=(0,s.default)(L),A<=0)throw new RangeError("concurrency limit cannot be less than 1");if(!N)return L(null);if((0,y.isAsyncGenerator)(N))return(0,x.default)(N,A,k,L);if((0,y.isAsyncIterable)(N))return(0,x.default)(N[Symbol.asyncIterator](),A,k,L);var G=(0,d.default)(N),M=!1,z=!1,V=0,Y=!1;function X($,K){if(!z)if(V-=1,$)M=!0,L($);else if($===!1)M=!0,z=!0;else{if(K===C.default||M&&V<=0)return M=!0,L(null);Y||Q()}}function Q(){for(Y=!0;V<A&&!M;){var $=G();if($===null){M=!0,V<=0&&L(null);return}V+=1,k($.value,$.key,(0,g.default)(X))}Y=!1}Q()},e.exports=t.default})(eachOfLimit,eachOfLimit.exports)),eachOfLimit.exports}var awaitify={exports:{}},hasRequiredAwaitify;function requireAwaitify(){return hasRequiredAwaitify||(hasRequiredAwaitify=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=r;function r(s,o){if(o||(o=s.length),!o)throw new Error("arity is undefined");function d(...m){return typeof m[o-1]=="function"?s.apply(this,m):new Promise((g,y)=>{m[o-1]=(b,...x)=>{if(b)return y(b);g(x.length>1?x:x[0])},s.apply(this,m)})}return d}e.exports=t.default})(awaitify,awaitify.exports)),awaitify.exports}var hasRequiredEachOfLimit;function requireEachOfLimit(){return hasRequiredEachOfLimit||(hasRequiredEachOfLimit=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=requireEachOfLimit$1(),s=y(r),o=requireWrapAsync(),d=y(o),m=requireAwaitify(),g=y(m);function y(x){return x&&x.__esModule?x:{default:x}}function b(x,E,C,S){return(0,s.default)(E)(x,(0,d.default)(C),S)}t.default=(0,g.default)(b,4),e.exports=t.default})(eachOfLimit$1,eachOfLimit$1.exports)),eachOfLimit$1.exports}var hasRequiredEachOf;function requireEachOf(){return hasRequiredEachOf||(hasRequiredEachOf=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=requireIsArrayLike$1(),s=k(r),o=requireBreakLoop(),d=k(o),m=requireEachOfLimit(),g=k(m),y=requireOnce(),b=k(y),x=requireOnlyOnce(),E=k(x),C=requireWrapAsync(),S=k(C),A=requireAwaitify(),N=k(A);function k(z){return z&&z.__esModule?z:{default:z}}function L(z,V,Y){Y=(0,b.default)(Y);var X=0,Q=0,{length:$}=z,K=!1;$===0&&Y(null);function ee(se,ie){se===!1&&(K=!0),K!==!0&&(se?Y(se):(++Q===$||ie===d.default)&&Y(null))}for(;X<$;X++)V(z[X],X,(0,E.default)(ee))}function G(z,V,Y){return(0,g.default)(z,1/0,V,Y)}function M(z,V,Y){var X=(0,s.default)(z)?L:G;return X(z,(0,S.default)(V),Y)}t.default=(0,N.default)(M,3),e.exports=t.default})(eachOf,eachOf.exports)),eachOf.exports}var parallel$1={exports:{}},hasRequiredParallel$1;function requireParallel$1(){return hasRequiredParallel$1||(hasRequiredParallel$1=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var r=requireIsArrayLike$1(),s=y(r),o=requireWrapAsync(),d=y(o),m=requireAwaitify(),g=y(m);function y(b){return b&&b.__esModule?b:{default:b}}t.default=(0,g.default)((b,x,E)=>{var C=(0,s.default)(x)?[]:{};b(x,(S,A,N)=>{(0,d.default)(S)((k,...L)=>{L.length<2&&([L]=L),C[A]=L,N(k)})},S=>E(S,C))},3),e.exports=t.default})(parallel$1,parallel$1.exports)),parallel$1.exports}var hasRequiredParallel;function requireParallel(){return hasRequiredParallel||(hasRequiredParallel=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=g;var r=requireEachOf(),s=m(r),o=requireParallel$1(),d=m(o);function m(y){return y&&y.__esModule?y:{default:y}}function g(y,b){return(0,d.default)(s.default,y,b)}e.exports=t.default})(parallel$2,parallel$2.exports)),parallel$2.exports}var parallelExports=requireParallel();const parallel=getDefaultExportFromCjs$1(parallelExports);var _arrayPush,hasRequired_arrayPush;function require_arrayPush(){if(hasRequired_arrayPush)return _arrayPush;hasRequired_arrayPush=1;function e(t,r){for(var s=-1,o=r.length,d=t.length;++s<o;)t[d+s]=r[s];return t}return _arrayPush=e,_arrayPush}var _baseIsArguments,hasRequired_baseIsArguments;function require_baseIsArguments(){if(hasRequired_baseIsArguments)return _baseIsArguments;hasRequired_baseIsArguments=1;var e=require_baseGetTag(),t=requireIsObjectLike(),r="[object Arguments]";function s(o){return t(o)&&e(o)==r}return _baseIsArguments=s,_baseIsArguments}var isArguments_1,hasRequiredIsArguments;function requireIsArguments(){if(hasRequiredIsArguments)return isArguments_1;hasRequiredIsArguments=1;var e=require_baseIsArguments(),t=requireIsObjectLike(),r=Object.prototype,s=r.hasOwnProperty,o=r.propertyIsEnumerable,d=e((function(){return arguments})())?e:function(m){return t(m)&&s.call(m,"callee")&&!o.call(m,"callee")};return isArguments_1=d,isArguments_1}var isArray_1,hasRequiredIsArray;function requireIsArray(){if(hasRequiredIsArray)return isArray_1;hasRequiredIsArray=1;var e=Array.isArray;return isArray_1=e,isArray_1}var _isFlattenable,hasRequired_isFlattenable;function require_isFlattenable(){if(hasRequired_isFlattenable)return _isFlattenable;hasRequired_isFlattenable=1;var e=require_Symbol(),t=requireIsArguments(),r=requireIsArray(),s=e?e.isConcatSpreadable:void 0;function o(d){return r(d)||t(d)||!!(s&&d&&d[s])}return _isFlattenable=o,_isFlattenable}var _baseFlatten,hasRequired_baseFlatten;function require_baseFlatten(){if(hasRequired_baseFlatten)return _baseFlatten;hasRequired_baseFlatten=1;var e=require_arrayPush(),t=require_isFlattenable();function r(s,o,d,m,g){var y=-1,b=s.length;for(d||(d=t),g||(g=[]);++y<b;){var x=s[y];o>0&&d(x)?o>1?r(x,o-1,d,m,g):e(g,x):m||(g[g.length]=x)}return g}return _baseFlatten=r,_baseFlatten}var flatten_1,hasRequiredFlatten;function requireFlatten(){if(hasRequiredFlatten)return flatten_1;hasRequiredFlatten=1;var e=require_baseFlatten();function t(r){var s=r==null?0:r.length;return s?e(r,1):[]}return flatten_1=t,flatten_1}var flattenExports=requireFlatten();const flatten=getDefaultExportFromCjs$1(flattenExports);var earthRadius=63710088e-1,factors={centimeters:earthRadius*100,centimetres:earthRadius*100,degrees:360/(2*Math.PI),feet:earthRadius*3.28084,inches:earthRadius*39.37,kilometers:earthRadius/1e3,kilometres:earthRadius/1e3,meters:earthRadius,metres:earthRadius,miles:earthRadius/1609.344,millimeters:earthRadius*1e3,millimetres:earthRadius*1e3,nauticalmiles:earthRadius/1852,radians:1,yards:earthRadius*1.0936};function feature(e,t,r={}){const s={type:"Feature"};return(r.id===0||r.id)&&(s.id=r.id),r.bbox&&(s.bbox=r.bbox),s.properties=t||{},s.geometry=e,s}function point(e,t,r={}){if(!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!isNumber$1(e[0])||!isNumber$1(e[1]))throw new Error("coordinates must contain numbers");return feature({type:"Point",coordinates:e},t,r)}function polygon(e,t,r={}){for(const o of e){if(o.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(o[o.length-1].length!==o[0].length)throw new Error("First and last Position are not equivalent.");for(let d=0;d<o[o.length-1].length;d++)if(o[o.length-1][d]!==o[0][d])throw new Error("First and last Position are not equivalent.")}return feature({type:"Polygon",coordinates:e},t,r)}function lineString(e,t,r={}){if(e.length<2)throw new Error("coordinates must be an array of two or more positions");return feature({type:"LineString",coordinates:e},t,r)}function featureCollection(e,t={}){const r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function multiLineString(e,t,r={}){return feature({type:"MultiLineString",coordinates:e},t,r)}function radiansToLength(e,t="kilometers"){const r=factors[t];if(!r)throw new Error(t+" units is invalid");return e*r}function lengthToRadians(e,t="kilometers"){const r=factors[t];if(!r)throw new Error(t+" units is invalid");return e/r}function isNumber$1(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function coordEach(e,t,r){if(e!==null)for(var s,o,d,m,g,y,b,x=0,E=0,C,S=e.type,A=S==="FeatureCollection",N=S==="Feature",k=A?e.features.length:1,L=0;L<k;L++){b=A?e.features[L].geometry:N?e.geometry:e,C=b?b.type==="GeometryCollection":!1,g=C?b.geometries.length:1;for(var G=0;G<g;G++){var M=0,z=0;if(m=C?b.geometries[G]:b,m!==null){y=m.coordinates;var V=m.type;switch(x=0,V){case null:break;case"Point":if(t(y,E,L,M,z)===!1)return!1;E++,M++;break;case"LineString":case"MultiPoint":for(s=0;s<y.length;s++){if(t(y[s],E,L,M,z)===!1)return!1;E++,V==="MultiPoint"&&M++}V==="LineString"&&M++;break;case"Polygon":case"MultiLineString":for(s=0;s<y.length;s++){for(o=0;o<y[s].length-x;o++){if(t(y[s][o],E,L,M,z)===!1)return!1;E++}V==="MultiLineString"&&M++,V==="Polygon"&&z++}V==="Polygon"&&M++;break;case"MultiPolygon":for(s=0;s<y.length;s++){for(z=0,o=0;o<y[s].length;o++){for(d=0;d<y[s][o].length-x;d++){if(t(y[s][o][d],E,L,M,z)===!1)return!1;E++}z++}M++}break;case"GeometryCollection":for(s=0;s<m.geometries.length;s++)if(coordEach(m.geometries[s],t)===!1)return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function featureEach(e,t){if(e.type==="Feature")t(e,0);else if(e.type==="FeatureCollection")for(var r=0;r<e.features.length&&t(e.features[r],r)!==!1;r++);}function geomEach(e,t){var r,s,o,d,m,g,y,b,x,E,C=0,S=e.type==="FeatureCollection",A=e.type==="Feature",N=S?e.features.length:1;for(r=0;r<N;r++){for(g=S?e.features[r].geometry:A?e.geometry:e,b=S?e.features[r].properties:A?e.properties:{},x=S?e.features[r].bbox:A?e.bbox:void 0,E=S?e.features[r].id:A?e.id:void 0,y=g?g.type==="GeometryCollection":!1,m=y?g.geometries.length:1,o=0;o<m;o++){if(d=y?g.geometries[o]:g,d===null){if(t(null,C,b,x,E)===!1)return!1;continue}switch(d.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":{if(t(d,C,b,x,E)===!1)return!1;break}case"GeometryCollection":{for(s=0;s<d.geometries.length;s++)if(t(d.geometries[s],C,b,x,E)===!1)return!1;break}default:throw new Error("Unknown Geometry Type")}}C++}}function flattenEach(e,t){geomEach(e,function(r,s,o,d,m){var g=r===null?null:r.type;switch(g){case null:case"Point":case"LineString":case"Polygon":return t(feature(r,o,{bbox:d,id:m}),s,0)===!1?!1:void 0}var y;switch(g){case"MultiPoint":y="Point";break;case"MultiLineString":y="LineString";break;case"MultiPolygon":y="Polygon";break}for(var b=0;b<r.coordinates.length;b++){var x=r.coordinates[b],E={type:y,coordinates:x};if(t(feature(E,o),s,b)===!1)return!1}})}function bbox(e,t={}){if(e.bbox!=null&&t.recompute!==!0)return e.bbox;const r=[1/0,1/0,-1/0,-1/0];return coordEach(e,s=>{r[0]>s[0]&&(r[0]=s[0]),r[1]>s[1]&&(r[1]=s[1]),r[2]<s[0]&&(r[2]=s[0]),r[3]<s[1]&&(r[3]=s[1])}),r}var index_default$2=bbox;function center(e,t={}){const r=bbox(e),s=(r[0]+r[2])/2,o=(r[1]+r[3])/2;return point([s,o],t.properties,t)}var jsts_min$1={exports:{}},jsts_min=jsts_min$1.exports,hasRequiredJsts_min;function requireJsts_min(){return hasRequiredJsts_min||(hasRequiredJsts_min=1,(function(e,t){(function(r,s){e.exports=s()})(jsts_min,(function(){function r(f,n){(n==null||n>f.length)&&(n=f.length);for(var a=0,h=Array(n);a<n;a++)h[a]=f[a];return h}function s(f,n,a){return n=x(n),(function(h,v){if(v&&(typeof v=="object"||typeof v=="function"))return v;if(v!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(I){if(I===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I})(h)})(f,C()?Reflect.construct(n,a||[],x(f).constructor):n.apply(f,a))}function o(f,n){if(!(f instanceof n))throw new TypeError("Cannot call a class as a function")}function d(f,n,a){if(C())return Reflect.construct.apply(null,arguments);var h=[null];h.push.apply(h,n);var v=new(f.bind.apply(f,h));return a&&S(v,a.prototype),v}function m(f,n){for(var a=0;a<n.length;a++){var h=n[a];h.enumerable=h.enumerable||!1,h.configurable=!0,"value"in h&&(h.writable=!0),Object.defineProperty(f,k(h.key),h)}}function g(f,n,a){return n&&m(f.prototype,n),a&&m(f,a),Object.defineProperty(f,"prototype",{writable:!1}),f}function y(f,n){var a=typeof Symbol<"u"&&f[Symbol.iterator]||f["@@iterator"];if(!a){if(Array.isArray(f)||(a=L(f))||n){a&&(f=a);var h=0,v=function(){};return{s:v,n:function(){return h>=f.length?{done:!0}:{done:!1,value:f[h++]}},e:function(O){throw O},f:v}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var I,R=!0,T=!1;return{s:function(){a=a.call(f)},n:function(){var O=a.next();return R=O.done,O},e:function(O){T=!0,I=O},f:function(){try{R||a.return==null||a.return()}finally{if(T)throw I}}}}function b(){return b=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(f,n,a){var h=(function(I,R){for(;!{}.hasOwnProperty.call(I,R)&&(I=x(I))!==null;);return I})(f,n);if(h){var v=Object.getOwnPropertyDescriptor(h,n);return v.get?v.get.call(arguments.length<3?f:a):v.value}},b.apply(null,arguments)}function x(f){return x=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},x(f)}function E(f,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");f.prototype=Object.create(n&&n.prototype,{constructor:{value:f,writable:!0,configurable:!0}}),Object.defineProperty(f,"prototype",{writable:!1}),n&&S(f,n)}function C(){try{var f=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(C=function(){return!!f})()}function S(f,n){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,h){return a.__proto__=h,a},S(f,n)}function A(f,n,a,h){var v=b(x(1&h?f.prototype:f),n,a);return 2&h&&typeof v=="function"?function(I){return v.apply(a,I)}:v}function N(f){return(function(n){if(Array.isArray(n))return r(n)})(f)||(function(n){if(typeof Symbol<"u"&&n[Symbol.iterator]!=null||n["@@iterator"]!=null)return Array.from(n)})(f)||L(f)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
4
- In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function k(f){var n=(function(a,h){if(typeof a!="object"||!a)return a;var v=a[Symbol.toPrimitive];if(v!==void 0){var I=v.call(a,h);if(typeof I!="object")return I;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(f,"string");return typeof n=="symbol"?n:n+""}function L(f,n){if(f){if(typeof f=="string")return r(f,n);var a={}.toString.call(f).slice(8,-1);return a==="Object"&&f.constructor&&(a=f.constructor.name),a==="Map"||a==="Set"?Array.from(f):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?r(f,n):void 0}}function G(f){var n=typeof Map=="function"?new Map:void 0;return G=function(a){if(a===null||!(function(v){try{return Function.toString.call(v).indexOf("[native code]")!==-1}catch{return typeof v=="function"}})(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(n!==void 0){if(n.has(a))return n.get(a);n.set(a,h)}function h(){return d(a,arguments,x(this).constructor)}return h.prototype=Object.create(a.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),S(h,a)},G(f)}var M=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"getEndCapStyle",value:function(){return this._endCapStyle}},{key:"isSingleSided",value:function(){return this._isSingleSided}},{key:"setQuadrantSegments",value:function(n){this._quadrantSegments=n,this._quadrantSegments===0&&(this._joinStyle=f.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=f.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),n<=0&&(this._quadrantSegments=1),this._joinStyle!==f.JOIN_ROUND&&(this._quadrantSegments=f.DEFAULT_QUADRANT_SEGMENTS)}},{key:"getJoinStyle",value:function(){return this._joinStyle}},{key:"setJoinStyle",value:function(n){this._joinStyle=n}},{key:"setSimplifyFactor",value:function(n){this._simplifyFactor=n<0?0:n}},{key:"getSimplifyFactor",value:function(){return this._simplifyFactor}},{key:"getQuadrantSegments",value:function(){return this._quadrantSegments}},{key:"setEndCapStyle",value:function(n){this._endCapStyle=n}},{key:"getMitreLimit",value:function(){return this._mitreLimit}},{key:"setMitreLimit",value:function(n){this._mitreLimit=n}},{key:"setSingleSided",value:function(n){this._isSingleSided=n}}],[{key:"constructor_",value:function(){if(this._quadrantSegments=f.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=f.CAP_ROUND,this._joinStyle=f.JOIN_ROUND,this._mitreLimit=f.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=f.DEFAULT_SIMPLIFY_FACTOR,arguments.length!==0){if(arguments.length===1){var n=arguments[0];this.setQuadrantSegments(n)}else if(arguments.length===2){var a=arguments[0],h=arguments[1];this.setQuadrantSegments(a),this.setEndCapStyle(h)}else if(arguments.length===4){var v=arguments[0],I=arguments[1],R=arguments[2],T=arguments[3];this.setQuadrantSegments(v),this.setEndCapStyle(I),this.setJoinStyle(R),this.setMitreLimit(T)}}}},{key:"bufferDistanceError",value:function(n){var a=Math.PI/2/n;return 1-Math.cos(a/2)}}])})();M.CAP_ROUND=1,M.CAP_FLAT=2,M.CAP_SQUARE=3,M.JOIN_ROUND=1,M.JOIN_MITRE=2,M.JOIN_BEVEL=3,M.DEFAULT_QUADRANT_SEGMENTS=8,M.DEFAULT_MITRE_LIMIT=5,M.DEFAULT_SIMPLIFY_FACTOR=.01;var z=(function(f){function n(a){var h;return o(this,n),(h=s(this,n,[a])).name=Object.keys({Exception:n})[0],h}return E(n,f),g(n,[{key:"toString",value:function(){return this.message}}])})(G(Error)),V=(function(f){function n(a){var h;return o(this,n),(h=s(this,n,[a])).name=Object.keys({IllegalArgumentException:n})[0],h}return E(n,f),g(n)})(z),Y=(function(){return g((function f(){o(this,f)}),[{key:"filter",value:function(f){}}])})();function X(){}function Q(){}function $(){}var K,ee,se,ie,te,ue,le,fe,ve=(function(){return g((function f(){o(this,f)}),null,[{key:"equalsWithTolerance",value:function(f,n,a){return Math.abs(f-n)<=a}}])})(),xe=(function(){return g((function f(n,a){o(this,f),this.low=a||0,this.high=n||0}),null,[{key:"toBinaryString",value:function(f){var n,a="";for(n=2147483648;n>0;n>>>=1)a+=(f.high&n)===n?"1":"0";for(n=2147483648;n>0;n>>>=1)a+=(f.low&n)===n?"1":"0";return a}}])})();function ce(){}function Te(){}ce.NaN=NaN,ce.isNaN=function(f){return Number.isNaN(f)},ce.isInfinite=function(f){return!Number.isFinite(f)},ce.MAX_VALUE=Number.MAX_VALUE,ce.POSITIVE_INFINITY=Number.POSITIVE_INFINITY,ce.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY,typeof Float64Array=="function"&&typeof Int32Array=="function"?(ue=2146435072,le=new Float64Array(1),fe=new Int32Array(le.buffer),ce.doubleToLongBits=function(f){le[0]=f;var n=0|fe[0],a=0|fe[1];return(a&ue)===ue&&1048575&a&&n!==0&&(n=0,a=2146959360),new xe(a,n)},ce.longBitsToDouble=function(f){return fe[0]=f.low,fe[1]=f.high,le[0]}):(K=1023,ee=Math.log2,se=Math.floor,ie=Math.pow,te=(function(){for(var f=53;f>0;f--){var n=ie(2,f)-1;if(se(ee(n))+1===f)return n}return 0})(),ce.doubleToLongBits=function(f){var n,a,h,v,I,R,T,O,W;if(f<0||1/f===Number.NEGATIVE_INFINITY?(R=1<<31,f=-f):R=0,f===0)return new xe(O=R,W=0);if(f===1/0)return new xe(O=2146435072|R,W=0);if(f!=f)return new xe(O=2146959360,W=0);if(v=0,W=0,(n=se(f))>1)if(n<=te)(v=se(ee(n)))<=20?(W=0,O=n<<20-v&1048575):(W=n%(a=ie(2,h=v-20))<<32-h,O=n/a&1048575);else for(h=n,W=0;(h=se(a=h/2))!==0;)v++,W>>>=1,W|=(1&O)<<31,O>>>=1,a!==h&&(O|=524288);if(T=v+K,I=n===0,n=f-n,v<52&&n!==0)for(h=0;;){if((a=2*n)>=1?(n=a-1,I?(T--,I=!1):(h<<=1,h|=1,v++)):(n=a,I?--T==0&&(v++,I=!1):(h<<=1,v++)),v===20)O|=h,h=0;else if(v===52){W|=h;break}if(a===1){v<20?O|=h<<20-v:v<52&&(W|=h<<52-v);break}}return O|=T<<20,new xe(O|=R,W)},ce.longBitsToDouble=function(f){var n,a,h,v,I=f.high,R=f.low,T=I&1<<31?-1:1;for(h=((2146435072&I)>>20)-K,v=0,a=1<<19,n=1;n<=20;n++)I&a&&(v+=ie(2,-n)),a>>>=1;for(a=1<<31,n=21;n<=52;n++)R&a&&(v+=ie(2,-n)),a>>>=1;if(h===-1023){if(v===0)return 0*T;h=-1022}else{if(h===1024)return v===0?T/0:NaN;v+=1}return T*v*ie(2,h)});var Ce=(function(f){function n(a){var h;return o(this,n),(h=s(this,n,[a])).name=Object.keys({RuntimeException:n})[0],h}return E(n,f),g(n)})(z),me=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,null,[{key:"constructor_",value:function(){if(arguments.length===0)Ce.constructor_.call(this);else if(arguments.length===1){var a=arguments[0];Ce.constructor_.call(this,a)}}}])})(Ce),pe=(function(){function f(){o(this,f)}return g(f,null,[{key:"shouldNeverReachHere",value:function(){if(arguments.length===0)f.shouldNeverReachHere(null);else if(arguments.length===1){var n=arguments[0];throw new me("Should never reach here"+(n!==null?": "+n:""))}}},{key:"isTrue",value:function(){if(arguments.length===1){var n=arguments[0];f.isTrue(n,null)}else if(arguments.length===2){var a=arguments[1];if(!arguments[0])throw a===null?new me:new me(a)}}},{key:"equals",value:function(){if(arguments.length===2){var n=arguments[0],a=arguments[1];f.equals(n,a,null)}else if(arguments.length===3){var h=arguments[0],v=arguments[1],I=arguments[2];if(!v.equals(h))throw new me("Expected "+h+" but encountered "+v+(I!==null?": "+I:""))}}}])})(),Ee=new ArrayBuffer(8),Ae=new Float64Array(Ee),Pe=new Int32Array(Ee),J=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"getM",value:function(){return ce.NaN}},{key:"setOrdinate",value:function(n,a){switch(n){case f.X:this.x=a;break;case f.Y:this.y=a;break;case f.Z:this.setZ(a);break;default:throw new V("Invalid ordinate index: "+n)}}},{key:"equals2D",value:function(){if(arguments.length===1){var n=arguments[0];return this.x===n.x&&this.y===n.y}if(arguments.length===2){var a=arguments[0],h=arguments[1];return!!ve.equalsWithTolerance(this.x,a.x,h)&&!!ve.equalsWithTolerance(this.y,a.y,h)}}},{key:"setM",value:function(n){throw new V("Invalid ordinate index: "+f.M)}},{key:"getZ",value:function(){return this.z}},{key:"getOrdinate",value:function(n){switch(n){case f.X:return this.x;case f.Y:return this.y;case f.Z:return this.getZ()}throw new V("Invalid ordinate index: "+n)}},{key:"equals3D",value:function(n){return this.x===n.x&&this.y===n.y&&(this.getZ()===n.getZ()||ce.isNaN(this.getZ())&&ce.isNaN(n.getZ()))}},{key:"equals",value:function(n){return n instanceof f&&this.equals2D(n)}},{key:"equalInZ",value:function(n,a){return ve.equalsWithTolerance(this.getZ(),n.getZ(),a)}},{key:"setX",value:function(n){this.x=n}},{key:"compareTo",value:function(n){var a=n;return this.x<a.x?-1:this.x>a.x?1:this.y<a.y?-1:this.y>a.y?1:0}},{key:"getX",value:function(){return this.x}},{key:"setZ",value:function(n){this.z=n}},{key:"clone",value:function(){try{return null}catch(n){if(n instanceof CloneNotSupportedException)return pe.shouldNeverReachHere("this shouldn't happen because this class is Cloneable"),null;throw n}}},{key:"copy",value:function(){return new f(this)}},{key:"toString",value:function(){return"("+this.x+", "+this.y+", "+this.getZ()+")"}},{key:"distance3D",value:function(n){var a=this.x-n.x,h=this.y-n.y,v=this.getZ()-n.getZ();return Math.sqrt(a*a+h*h+v*v)}},{key:"getY",value:function(){return this.y}},{key:"setY",value:function(n){this.y=n}},{key:"distance",value:function(n){var a=this.x-n.x,h=this.y-n.y;return Math.sqrt(a*a+h*h)}},{key:"hashCode",value:function(){var n=17;return n=37*(n=37*n+f.hashCode(this.x))+f.hashCode(this.y)}},{key:"setCoordinate",value:function(n){this.x=n.x,this.y=n.y,this.z=n.getZ()}},{key:"interfaces_",get:function(){return[X,Q,$]}}],[{key:"constructor_",value:function(){if(this.x=null,this.y=null,this.z=null,arguments.length===0)f.constructor_.call(this,0,0);else if(arguments.length===1){var n=arguments[0];f.constructor_.call(this,n.x,n.y,n.getZ())}else if(arguments.length===2){var a=arguments[0],h=arguments[1];f.constructor_.call(this,a,h,f.NULL_ORDINATE)}else if(arguments.length===3){var v=arguments[0],I=arguments[1],R=arguments[2];this.x=v,this.y=I,this.z=R}}},{key:"hashCode",value:function(n){return Ae[0]=n,Pe[0]^Pe[1]}}])})(),Ue=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"compare",value:function(n,a){var h=f.compare(n.x,a.x);if(h!==0)return h;var v=f.compare(n.y,a.y);return v!==0?v:this._dimensionsToTest<=2?0:f.compare(n.getZ(),a.getZ())}},{key:"interfaces_",get:function(){return[Te]}}],[{key:"constructor_",value:function(){if(this._dimensionsToTest=2,arguments.length===0)f.constructor_.call(this,2);else if(arguments.length===1){var n=arguments[0];if(n!==2&&n!==3)throw new V("only 2 or 3 dimensions may be specified");this._dimensionsToTest=n}}},{key:"compare",value:function(n,a){return n<a?-1:n>a?1:ce.isNaN(n)?ce.isNaN(a)?0:-1:ce.isNaN(a)?1:0}}])})();J.DimensionalComparator=Ue,J.NULL_ORDINATE=ce.NaN,J.X=0,J.Y=1,J.Z=2,J.M=3;var ye=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"getArea",value:function(){return this.getWidth()*this.getHeight()}},{key:"equals",value:function(n){if(!(n instanceof f))return!1;var a=n;return this.isNull()?a.isNull():this._maxx===a.getMaxX()&&this._maxy===a.getMaxY()&&this._minx===a.getMinX()&&this._miny===a.getMinY()}},{key:"intersection",value:function(n){if(this.isNull()||n.isNull()||!this.intersects(n))return new f;var a=this._minx>n._minx?this._minx:n._minx,h=this._miny>n._miny?this._miny:n._miny;return new f(a,this._maxx<n._maxx?this._maxx:n._maxx,h,this._maxy<n._maxy?this._maxy:n._maxy)}},{key:"isNull",value:function(){return this._maxx<this._minx}},{key:"getMaxX",value:function(){return this._maxx}},{key:"covers",value:function(){if(arguments.length===1){if(arguments[0]instanceof J){var n=arguments[0];return this.covers(n.x,n.y)}if(arguments[0]instanceof f){var a=arguments[0];return!this.isNull()&&!a.isNull()&&a.getMinX()>=this._minx&&a.getMaxX()<=this._maxx&&a.getMinY()>=this._miny&&a.getMaxY()<=this._maxy}}else if(arguments.length===2){var h=arguments[0],v=arguments[1];return!this.isNull()&&h>=this._minx&&h<=this._maxx&&v>=this._miny&&v<=this._maxy}}},{key:"intersects",value:function(){if(arguments.length===1){if(arguments[0]instanceof f){var n=arguments[0];return!this.isNull()&&!n.isNull()&&!(n._minx>this._maxx||n._maxx<this._minx||n._miny>this._maxy||n._maxy<this._miny)}if(arguments[0]instanceof J){var a=arguments[0];return this.intersects(a.x,a.y)}}else if(arguments.length===2){if(arguments[0]instanceof J&&arguments[1]instanceof J){var h=arguments[0],v=arguments[1];return!this.isNull()&&!((h.x<v.x?h.x:v.x)>this._maxx)&&!((h.x>v.x?h.x:v.x)<this._minx)&&!((h.y<v.y?h.y:v.y)>this._maxy)&&!((h.y>v.y?h.y:v.y)<this._miny)}if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var I=arguments[0],R=arguments[1];return!this.isNull()&&!(I>this._maxx||I<this._minx||R>this._maxy||R<this._miny)}}}},{key:"getMinY",value:function(){return this._miny}},{key:"getDiameter",value:function(){if(this.isNull())return 0;var n=this.getWidth(),a=this.getHeight();return Math.sqrt(n*n+a*a)}},{key:"getMinX",value:function(){return this._minx}},{key:"expandToInclude",value:function(){if(arguments.length===1){if(arguments[0]instanceof J){var n=arguments[0];this.expandToInclude(n.x,n.y)}else if(arguments[0]instanceof f){var a=arguments[0];if(a.isNull())return null;this.isNull()?(this._minx=a.getMinX(),this._maxx=a.getMaxX(),this._miny=a.getMinY(),this._maxy=a.getMaxY()):(a._minx<this._minx&&(this._minx=a._minx),a._maxx>this._maxx&&(this._maxx=a._maxx),a._miny<this._miny&&(this._miny=a._miny),a._maxy>this._maxy&&(this._maxy=a._maxy))}}else if(arguments.length===2){var h=arguments[0],v=arguments[1];this.isNull()?(this._minx=h,this._maxx=h,this._miny=v,this._maxy=v):(h<this._minx&&(this._minx=h),h>this._maxx&&(this._maxx=h),v<this._miny&&(this._miny=v),v>this._maxy&&(this._maxy=v))}}},{key:"minExtent",value:function(){if(this.isNull())return 0;var n=this.getWidth(),a=this.getHeight();return n<a?n:a}},{key:"getWidth",value:function(){return this.isNull()?0:this._maxx-this._minx}},{key:"compareTo",value:function(n){var a=n;return this.isNull()?a.isNull()?0:-1:a.isNull()?1:this._minx<a._minx?-1:this._minx>a._minx?1:this._miny<a._miny?-1:this._miny>a._miny?1:this._maxx<a._maxx?-1:this._maxx>a._maxx?1:this._maxy<a._maxy?-1:this._maxy>a._maxy?1:0}},{key:"translate",value:function(n,a){if(this.isNull())return null;this.init(this.getMinX()+n,this.getMaxX()+n,this.getMinY()+a,this.getMaxY()+a)}},{key:"copy",value:function(){return new f(this)}},{key:"toString",value:function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"}},{key:"setToNull",value:function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1}},{key:"disjoint",value:function(n){return!(!this.isNull()&&!n.isNull())||n._minx>this._maxx||n._maxx<this._minx||n._miny>this._maxy||n._maxy<this._miny}},{key:"getHeight",value:function(){return this.isNull()?0:this._maxy-this._miny}},{key:"maxExtent",value:function(){if(this.isNull())return 0;var n=this.getWidth(),a=this.getHeight();return n>a?n:a}},{key:"expandBy",value:function(){if(arguments.length===1){var n=arguments[0];this.expandBy(n,n)}else if(arguments.length===2){var a=arguments[0],h=arguments[1];if(this.isNull())return null;this._minx-=a,this._maxx+=a,this._miny-=h,this._maxy+=h,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}}},{key:"contains",value:function(){if(arguments.length===1){if(arguments[0]instanceof f){var n=arguments[0];return this.covers(n)}if(arguments[0]instanceof J){var a=arguments[0];return this.covers(a)}}else if(arguments.length===2){var h=arguments[0],v=arguments[1];return this.covers(h,v)}}},{key:"centre",value:function(){return this.isNull()?null:new J((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)}},{key:"init",value:function(){if(arguments.length===0)this.setToNull();else if(arguments.length===1){if(arguments[0]instanceof J){var n=arguments[0];this.init(n.x,n.x,n.y,n.y)}else if(arguments[0]instanceof f){var a=arguments[0];this._minx=a._minx,this._maxx=a._maxx,this._miny=a._miny,this._maxy=a._maxy}}else if(arguments.length===2){var h=arguments[0],v=arguments[1];this.init(h.x,v.x,h.y,v.y)}else if(arguments.length===4){var I=arguments[0],R=arguments[1],T=arguments[2],O=arguments[3];I<R?(this._minx=I,this._maxx=R):(this._minx=R,this._maxx=I),T<O?(this._miny=T,this._maxy=O):(this._miny=O,this._maxy=T)}}},{key:"getMaxY",value:function(){return this._maxy}},{key:"distance",value:function(n){if(this.intersects(n))return 0;var a=0;this._maxx<n._minx?a=n._minx-this._maxx:this._minx>n._maxx&&(a=this._minx-n._maxx);var h=0;return this._maxy<n._miny?h=n._miny-this._maxy:this._miny>n._maxy&&(h=this._miny-n._maxy),a===0?h:h===0?a:Math.sqrt(a*a+h*h)}},{key:"hashCode",value:function(){var n=17;return n=37*(n=37*(n=37*(n=37*n+J.hashCode(this._minx))+J.hashCode(this._maxx))+J.hashCode(this._miny))+J.hashCode(this._maxy)}},{key:"interfaces_",get:function(){return[X,$]}}],[{key:"constructor_",value:function(){if(this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,arguments.length===0)this.init();else if(arguments.length===1){if(arguments[0]instanceof J){var n=arguments[0];this.init(n.x,n.x,n.y,n.y)}else if(arguments[0]instanceof f){var a=arguments[0];this.init(a)}}else if(arguments.length===2){var h=arguments[0],v=arguments[1];this.init(h.x,v.x,h.y,v.y)}else if(arguments.length===4){var I=arguments[0],R=arguments[1],T=arguments[2],O=arguments[3];this.init(I,R,T,O)}}},{key:"intersects",value:function(){if(arguments.length===3){var n=arguments[0],a=arguments[1],h=arguments[2];return h.x>=(n.x<a.x?n.x:a.x)&&h.x<=(n.x>a.x?n.x:a.x)&&h.y>=(n.y<a.y?n.y:a.y)&&h.y<=(n.y>a.y?n.y:a.y)}if(arguments.length===4){var v=arguments[0],I=arguments[1],R=arguments[2],T=arguments[3],O=Math.min(R.x,T.x),W=Math.max(R.x,T.x),re=Math.min(v.x,I.x),ne=Math.max(v.x,I.x);return!(re>W)&&!(ne<O)&&(O=Math.min(R.y,T.y),W=Math.max(R.y,T.y),re=Math.min(v.y,I.y),ne=Math.max(v.y,I.y),!(re>W)&&!(ne<O))}}}])})(),de=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"isGeometryCollection",value:function(){return this.getTypeCode()===f.TYPECODE_GEOMETRYCOLLECTION}},{key:"getFactory",value:function(){return this._factory}},{key:"getGeometryN",value:function(n){return this}},{key:"getArea",value:function(){return 0}},{key:"isRectangle",value:function(){return!1}},{key:"equalsExact",value:function(n){return this===n||this.equalsExact(n,0)}},{key:"geometryChanged",value:function(){this.apply(f.geometryChangedFilter)}},{key:"geometryChangedAction",value:function(){this._envelope=null}},{key:"equalsNorm",value:function(n){return n!==null&&this.norm().equalsExact(n.norm())}},{key:"getLength",value:function(){return 0}},{key:"getNumGeometries",value:function(){return 1}},{key:"compareTo",value:function(){var n;if(arguments.length===1){var a=arguments[0];return n=a,this.getTypeCode()!==n.getTypeCode()?this.getTypeCode()-n.getTypeCode():this.isEmpty()&&n.isEmpty()?0:this.isEmpty()?-1:n.isEmpty()?1:this.compareToSameClass(a)}if(arguments.length===2){var h=arguments[0],v=arguments[1];return n=h,this.getTypeCode()!==n.getTypeCode()?this.getTypeCode()-n.getTypeCode():this.isEmpty()&&n.isEmpty()?0:this.isEmpty()?-1:n.isEmpty()?1:this.compareToSameClass(h,v)}}},{key:"getUserData",value:function(){return this._userData}},{key:"getSRID",value:function(){return this._SRID}},{key:"getEnvelope",value:function(){return this.getFactory().toGeometry(this.getEnvelopeInternal())}},{key:"checkNotGeometryCollection",value:function(n){if(n.getTypeCode()===f.TYPECODE_GEOMETRYCOLLECTION)throw new V("This method does not support GeometryCollection arguments")}},{key:"equal",value:function(n,a,h){return h===0?n.equals(a):n.distance(a)<=h}},{key:"norm",value:function(){var n=this.copy();return n.normalize(),n}},{key:"reverse",value:function(){var n=this.reverseInternal();return this.envelope!=null&&(n.envelope=this.envelope.copy()),n.setSRID(this.getSRID()),n}},{key:"copy",value:function(){var n=this.copyInternal();return n.envelope=this._envelope==null?null:this._envelope.copy(),n._SRID=this._SRID,n._userData=this._userData,n}},{key:"getPrecisionModel",value:function(){return this._factory.getPrecisionModel()}},{key:"getEnvelopeInternal",value:function(){return this._envelope===null&&(this._envelope=this.computeEnvelopeInternal()),new ye(this._envelope)}},{key:"setSRID",value:function(n){this._SRID=n}},{key:"setUserData",value:function(n){this._userData=n}},{key:"compare",value:function(n,a){for(var h=n.iterator(),v=a.iterator();h.hasNext()&&v.hasNext();){var I=h.next(),R=v.next(),T=I.compareTo(R);if(T!==0)return T}return h.hasNext()?1:v.hasNext()?-1:0}},{key:"hashCode",value:function(){return this.getEnvelopeInternal().hashCode()}},{key:"isEquivalentClass",value:function(n){return this.getClass()===n.getClass()}},{key:"isGeometryCollectionOrDerived",value:function(){return this.getTypeCode()===f.TYPECODE_GEOMETRYCOLLECTION||this.getTypeCode()===f.TYPECODE_MULTIPOINT||this.getTypeCode()===f.TYPECODE_MULTILINESTRING||this.getTypeCode()===f.TYPECODE_MULTIPOLYGON}},{key:"interfaces_",get:function(){return[Q,X,$]}},{key:"getClass",value:function(){return f}}],[{key:"hasNonEmptyElements",value:function(n){for(var a=0;a<n.length;a++)if(!n[a].isEmpty())return!0;return!1}},{key:"hasNullElements",value:function(n){for(var a=0;a<n.length;a++)if(n[a]===null)return!0;return!1}}])})();de.constructor_=function(f){f&&(this._envelope=null,this._userData=null,this._factory=f,this._SRID=f.getSRID())},de.TYPECODE_POINT=0,de.TYPECODE_MULTIPOINT=1,de.TYPECODE_LINESTRING=2,de.TYPECODE_LINEARRING=3,de.TYPECODE_MULTILINESTRING=4,de.TYPECODE_POLYGON=5,de.TYPECODE_MULTIPOLYGON=6,de.TYPECODE_GEOMETRYCOLLECTION=7,de.TYPENAME_POINT="Point",de.TYPENAME_MULTIPOINT="MultiPoint",de.TYPENAME_LINESTRING="LineString",de.TYPENAME_LINEARRING="LinearRing",de.TYPENAME_MULTILINESTRING="MultiLineString",de.TYPENAME_POLYGON="Polygon",de.TYPENAME_MULTIPOLYGON="MultiPolygon",de.TYPENAME_GEOMETRYCOLLECTION="GeometryCollection",de.geometryChangedFilter={get interfaces_(){return[Y]},filter:function(f){f.geometryChangedAction()}};var q=(function(){function f(){o(this,f)}return g(f,null,[{key:"toLocationSymbol",value:function(n){switch(n){case f.EXTERIOR:return"e";case f.BOUNDARY:return"b";case f.INTERIOR:return"i";case f.NONE:return"-"}throw new V("Unknown location value: "+n)}}])})();q.INTERIOR=0,q.BOUNDARY=1,q.EXTERIOR=2,q.NONE=-1;var Re=(function(){return g((function f(){o(this,f)}),[{key:"add",value:function(){}},{key:"addAll",value:function(){}},{key:"isEmpty",value:function(){}},{key:"iterator",value:function(){}},{key:"size",value:function(){}},{key:"toArray",value:function(){}},{key:"remove",value:function(){}}])})(),Oe=(function(f){function n(a){var h;return o(this,n),(h=s(this,n,[a])).name=Object.keys({NoSuchElementException:n})[0],h}return E(n,f),g(n)})(z),je=(function(f){function n(a){var h;return o(this,n),(h=s(this,n,[a])).name=Object.keys({UnsupportedOperationException:n})[0],h}return E(n,f),g(n)})(z),Fe=(function(f){function n(){return o(this,n),s(this,n,arguments)}return E(n,f),g(n,[{key:"contains",value:function(){}}])})(Re),it=(function(f){function n(a){var h;return o(this,n),(h=s(this,n)).map=new Map,a instanceof Re&&h.addAll(a),h}return E(n,f),g(n,[{key:"contains",value:function(a){var h=a.hashCode?a.hashCode():a;return!!this.map.has(h)}},{key:"add",value:function(a){var h=a.hashCode?a.hashCode():a;return!this.map.has(h)&&!!this.map.set(h,a)}},{key:"addAll",value:function(a){var h,v=y(a);try{for(v.s();!(h=v.n()).done;){var I=h.value;this.add(I)}}catch(R){v.e(R)}finally{v.f()}return!0}},{key:"remove",value:function(){throw new je}},{key:"size",value:function(){return this.map.size}},{key:"isEmpty",value:function(){return this.map.size===0}},{key:"toArray",value:function(){return Array.from(this.map.values())}},{key:"iterator",value:function(){return new dt(this.map)}},{key:Symbol.iterator,value:function(){return this.map}}])})(Fe),dt=(function(){return g((function f(n){o(this,f),this.iterator=n.values();var a=this.iterator.next(),h=a.done,v=a.value;this.done=h,this.value=v}),[{key:"next",value:function(){if(this.done)throw new Oe;var f=this.value,n=this.iterator.next(),a=n.done,h=n.value;return this.done=a,this.value=h,f}},{key:"hasNext",value:function(){return!this.done}},{key:"remove",value:function(){throw new je}}])})(),he=(function(){function f(){o(this,f)}return g(f,null,[{key:"opposite",value:function(n){return n===f.LEFT?f.RIGHT:n===f.RIGHT?f.LEFT:n}}])})();he.ON=0,he.LEFT=1,he.RIGHT=2;var st=(function(f){function n(a){var h;return o(this,n),(h=s(this,n,[a])).name=Object.keys({EmptyStackException:n})[0],h}return E(n,f),g(n)})(z),qe=(function(f){function n(a){var h;return o(this,n),(h=s(this,n,[a])).name=Object.keys({IndexOutOfBoundsException:n})[0],h}return E(n,f),g(n)})(z),Ve=(function(f){function n(){return o(this,n),s(this,n,arguments)}return E(n,f),g(n,[{key:"get",value:function(){}},{key:"set",value:function(){}},{key:"isEmpty",value:function(){}}])})(Re),mt=(function(f){function n(){var a;return o(this,n),(a=s(this,n)).array=[],a}return E(n,f),g(n,[{key:"add",value:function(a){return this.array.push(a),!0}},{key:"get",value:function(a){if(a<0||a>=this.size())throw new qe;return this.array[a]}},{key:"push",value:function(a){return this.array.push(a),a}},{key:"pop",value:function(){if(this.array.length===0)throw new st;return this.array.pop()}},{key:"peek",value:function(){if(this.array.length===0)throw new st;return this.array[this.array.length-1]}},{key:"empty",value:function(){return this.array.length===0}},{key:"isEmpty",value:function(){return this.empty()}},{key:"search",value:function(a){return this.array.indexOf(a)}},{key:"size",value:function(){return this.array.length}},{key:"toArray",value:function(){return this.array.slice()}}])})(Ve);function Le(f,n){return f.interfaces_&&f.interfaces_.indexOf(n)>-1}var tt=(function(){return g((function f(n){o(this,f),this.str=n}),[{key:"append",value:function(f){this.str+=f}},{key:"setCharAt",value:function(f,n){this.str=this.str.substr(0,f)+n+this.str.substr(f+1)}},{key:"toString",value:function(){return this.str}}])})(),gt=(function(){function f(n){o(this,f),this.value=n}return g(f,[{key:"intValue",value:function(){return this.value}},{key:"compareTo",value:function(n){return this.value<n?-1:this.value>n?1:0}}],[{key:"compare",value:function(n,a){return n<a?-1:n>a?1:0}},{key:"isNan",value:function(n){return Number.isNaN(n)}},{key:"valueOf",value:function(n){return new f(n)}}])})(),yt=(function(){return g((function f(){o(this,f)}),null,[{key:"isWhitespace",value:function(f){return f<=32&&f>=0||f===127}},{key:"toUpperCase",value:function(f){return f.toUpperCase()}}])})(),we=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"le",value:function(n){return this._hi<n._hi||this._hi===n._hi&&this._lo<=n._lo}},{key:"extractSignificantDigits",value:function(n,a){var h=this.abs(),v=f.magnitude(h._hi),I=f.TEN.pow(v);(h=h.divide(I)).gt(f.TEN)?(h=h.divide(f.TEN),v+=1):h.lt(f.ONE)&&(h=h.multiply(f.TEN),v-=1);for(var R=v+1,T=new tt,O=f.MAX_PRINT_DIGITS-1,W=0;W<=O;W++){n&&W===R&&T.append(".");var re=Math.trunc(h._hi);if(re<0)break;var ne=!1,oe=0;re>9?(ne=!0,oe="9"):oe="0"+re,T.append(oe),h=h.subtract(f.valueOf(re)).multiply(f.TEN),ne&&h.selfAdd(f.TEN);var _e=!0,Se=f.magnitude(h._hi);if(Se<0&&Math.abs(Se)>=O-W&&(_e=!1),!_e)break}return a[0]=v,T.toString()}},{key:"sqr",value:function(){return this.multiply(this)}},{key:"doubleValue",value:function(){return this._hi+this._lo}},{key:"subtract",value:function(){if(arguments[0]instanceof f){var n=arguments[0];return this.add(n.negate())}if(typeof arguments[0]=="number"){var a=arguments[0];return this.add(-a)}}},{key:"equals",value:function(){if(arguments.length===1&&arguments[0]instanceof f){var n=arguments[0];return this._hi===n._hi&&this._lo===n._lo}}},{key:"isZero",value:function(){return this._hi===0&&this._lo===0}},{key:"selfSubtract",value:function(){if(arguments[0]instanceof f){var n=arguments[0];return this.isNaN()?this:this.selfAdd(-n._hi,-n._lo)}if(typeof arguments[0]=="number"){var a=arguments[0];return this.isNaN()?this:this.selfAdd(-a,0)}}},{key:"getSpecialNumberString",value:function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null}},{key:"min",value:function(n){return this.le(n)?this:n}},{key:"selfDivide",value:function(){if(arguments.length===1){if(arguments[0]instanceof f){var n=arguments[0];return this.selfDivide(n._hi,n._lo)}if(typeof arguments[0]=="number"){var a=arguments[0];return this.selfDivide(a,0)}}else if(arguments.length===2){var h,v,I,R,T=arguments[0],O=arguments[1],W=null,re=null,ne=null,oe=null;return I=this._hi/T,oe=(W=(ne=f.SPLIT*I)-(W=ne-I))*(re=(oe=f.SPLIT*T)-(re=oe-T))-(R=I*T)+W*(v=T-re)+(h=I-W)*re+h*v,oe=I+(ne=(this._hi-R-oe+this._lo-I*O)/T),this._hi=oe,this._lo=I-oe+ne,this}}},{key:"dump",value:function(){return"DD<"+this._hi+", "+this._lo+">"}},{key:"divide",value:function(){if(arguments[0]instanceof f){var n,a,h,v,I=arguments[0],R=null,T=null,O=null,W=null;return n=(h=this._hi/I._hi)-(R=(O=f.SPLIT*h)-(R=O-h)),W=R*(T=(W=f.SPLIT*I._hi)-(T=W-I._hi))-(v=h*I._hi)+R*(a=I._hi-T)+n*T+n*a,new f(W=h+(O=(this._hi-v-W+this._lo-h*I._lo)/I._hi),h-W+O)}if(typeof arguments[0]=="number"){var re=arguments[0];return ce.isNaN(re)?f.createNaN():f.copy(this).selfDivide(re,0)}}},{key:"ge",value:function(n){return this._hi>n._hi||this._hi===n._hi&&this._lo>=n._lo}},{key:"pow",value:function(n){if(n===0)return f.valueOf(1);var a=new f(this),h=f.valueOf(1),v=Math.abs(n);if(v>1)for(;v>0;)v%2==1&&h.selfMultiply(a),(v/=2)>0&&(a=a.sqr());else h=a;return n<0?h.reciprocal():h}},{key:"ceil",value:function(){if(this.isNaN())return f.NaN;var n=Math.ceil(this._hi),a=0;return n===this._hi&&(a=Math.ceil(this._lo)),new f(n,a)}},{key:"compareTo",value:function(n){var a=n;return this._hi<a._hi?-1:this._hi>a._hi?1:this._lo<a._lo?-1:this._lo>a._lo?1:0}},{key:"rint",value:function(){return this.isNaN()?this:this.add(.5).floor()}},{key:"setValue",value:function(){if(arguments[0]instanceof f){var n=arguments[0];return this.init(n),this}if(typeof arguments[0]=="number"){var a=arguments[0];return this.init(a),this}}},{key:"max",value:function(n){return this.ge(n)?this:n}},{key:"sqrt",value:function(){if(this.isZero())return f.valueOf(0);if(this.isNegative())return f.NaN;var n=1/Math.sqrt(this._hi),a=this._hi*n,h=f.valueOf(a),v=this.subtract(h.sqr())._hi*(.5*n);return h.add(v)}},{key:"selfAdd",value:function(){if(arguments.length===1){if(arguments[0]instanceof f){var n=arguments[0];return this.selfAdd(n._hi,n._lo)}if(typeof arguments[0]=="number"){var a,h,v,I,R,T=arguments[0],O=null;return O=(v=this._hi+T)-(I=v-this._hi),h=(R=(O=T-I+(this._hi-O))+this._lo)+(v-(a=v+R)),this._hi=a+h,this._lo=h+(a-this._hi),this}}else if(arguments.length===2){var W,re,ne,oe,_e=arguments[0],Se=arguments[1],Ne=null,Ge=null,Be=null;ne=this._hi+_e,re=this._lo+Se,Ge=ne-(Be=ne-this._hi),Ne=re-(oe=re-this._lo);var $e=(W=ne+(Be=(Ge=_e-Be+(this._hi-Ge))+re))+(Be=(Ne=Se-oe+(this._lo-Ne))+(Be+(ne-W))),et=Be+(W-$e);return this._hi=$e,this._lo=et,this}}},{key:"selfMultiply",value:function(){if(arguments.length===1){if(arguments[0]instanceof f){var n=arguments[0];return this.selfMultiply(n._hi,n._lo)}if(typeof arguments[0]=="number"){var a=arguments[0];return this.selfMultiply(a,0)}}else if(arguments.length===2){var h,v,I=arguments[0],R=arguments[1],T=null,O=null,W=null,re=null;T=(W=f.SPLIT*this._hi)-this._hi,re=f.SPLIT*I,T=W-T,h=this._hi-T,O=re-I;var ne=(W=this._hi*I)+(re=T*(O=re-O)-W+T*(v=I-O)+h*O+h*v+(this._hi*R+this._lo*I)),oe=re+(T=W-ne);return this._hi=ne,this._lo=oe,this}}},{key:"selfSqr",value:function(){return this.selfMultiply(this)}},{key:"floor",value:function(){if(this.isNaN())return f.NaN;var n=Math.floor(this._hi),a=0;return n===this._hi&&(a=Math.floor(this._lo)),new f(n,a)}},{key:"negate",value:function(){return this.isNaN()?this:new f(-this._hi,-this._lo)}},{key:"clone",value:function(){try{return null}catch(n){if(n instanceof CloneNotSupportedException)return null;throw n}}},{key:"multiply",value:function(){if(arguments[0]instanceof f){var n=arguments[0];return n.isNaN()?f.createNaN():f.copy(this).selfMultiply(n)}if(typeof arguments[0]=="number"){var a=arguments[0];return ce.isNaN(a)?f.createNaN():f.copy(this).selfMultiply(a,0)}}},{key:"isNaN",value:function(){return ce.isNaN(this._hi)}},{key:"intValue",value:function(){return Math.trunc(this._hi)}},{key:"toString",value:function(){var n=f.magnitude(this._hi);return n>=-3&&n<=20?this.toStandardNotation():this.toSciNotation()}},{key:"toStandardNotation",value:function(){var n=this.getSpecialNumberString();if(n!==null)return n;var a=new Array(1).fill(null),h=this.extractSignificantDigits(!0,a),v=a[0]+1,I=h;if(h.charAt(0)===".")I="0"+h;else if(v<0)I="0."+f.stringOfChar("0",-v)+h;else if(h.indexOf(".")===-1){var R=v-h.length;I=h+f.stringOfChar("0",R)+".0"}return this.isNegative()?"-"+I:I}},{key:"reciprocal",value:function(){var n,a,h,v,I=null,R=null,T=null,O=null;n=(h=1/this._hi)-(I=(T=f.SPLIT*h)-(I=T-h)),R=(O=f.SPLIT*this._hi)-this._hi;var W=h+(T=(1-(v=h*this._hi)-(O=I*(R=O-R)-v+I*(a=this._hi-R)+n*R+n*a)-h*this._lo)/this._hi);return new f(W,h-W+T)}},{key:"toSciNotation",value:function(){if(this.isZero())return f.SCI_NOT_ZERO;var n=this.getSpecialNumberString();if(n!==null)return n;var a=new Array(1).fill(null),h=this.extractSignificantDigits(!1,a),v=f.SCI_NOT_EXPONENT_CHAR+a[0];if(h.charAt(0)==="0")throw new IllegalStateException("Found leading zero: "+h);var I="";h.length>1&&(I=h.substring(1));var R=h.charAt(0)+"."+I;return this.isNegative()?"-"+R+v:R+v}},{key:"abs",value:function(){return this.isNaN()?f.NaN:this.isNegative()?this.negate():new f(this)}},{key:"isPositive",value:function(){return this._hi>0||this._hi===0&&this._lo>0}},{key:"lt",value:function(n){return this._hi<n._hi||this._hi===n._hi&&this._lo<n._lo}},{key:"add",value:function(){if(arguments[0]instanceof f){var n=arguments[0];return f.copy(this).selfAdd(n)}if(typeof arguments[0]=="number"){var a=arguments[0];return f.copy(this).selfAdd(a)}}},{key:"init",value:function(){if(arguments.length===1){if(typeof arguments[0]=="number"){var n=arguments[0];this._hi=n,this._lo=0}else if(arguments[0]instanceof f){var a=arguments[0];this._hi=a._hi,this._lo=a._lo}}else if(arguments.length===2){var h=arguments[0],v=arguments[1];this._hi=h,this._lo=v}}},{key:"gt",value:function(n){return this._hi>n._hi||this._hi===n._hi&&this._lo>n._lo}},{key:"isNegative",value:function(){return this._hi<0||this._hi===0&&this._lo<0}},{key:"trunc",value:function(){return this.isNaN()?f.NaN:this.isPositive()?this.floor():this.ceil()}},{key:"signum",value:function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0}},{key:"interfaces_",get:function(){return[$,X,Q]}}],[{key:"constructor_",value:function(){if(this._hi=0,this._lo=0,arguments.length===0)this.init(0);else if(arguments.length===1){if(typeof arguments[0]=="number"){var n=arguments[0];this.init(n)}else if(arguments[0]instanceof f){var a=arguments[0];this.init(a)}else if(typeof arguments[0]=="string"){var h=arguments[0];f.constructor_.call(this,f.parse(h))}}else if(arguments.length===2){var v=arguments[0],I=arguments[1];this.init(v,I)}}},{key:"determinant",value:function(){if(typeof arguments[3]=="number"&&typeof arguments[2]=="number"&&typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var n=arguments[0],a=arguments[1],h=arguments[2],v=arguments[3];return f.determinant(f.valueOf(n),f.valueOf(a),f.valueOf(h),f.valueOf(v))}if(arguments[3]instanceof f&&arguments[2]instanceof f&&arguments[0]instanceof f&&arguments[1]instanceof f){var I=arguments[1],R=arguments[2],T=arguments[3];return arguments[0].multiply(T).selfSubtract(I.multiply(R))}}},{key:"sqr",value:function(n){return f.valueOf(n).selfMultiply(n)}},{key:"valueOf",value:function(){if(typeof arguments[0]=="string"){var n=arguments[0];return f.parse(n)}if(typeof arguments[0]=="number")return new f(arguments[0])}},{key:"sqrt",value:function(n){return f.valueOf(n).sqrt()}},{key:"parse",value:function(n){for(var a=0,h=n.length;yt.isWhitespace(n.charAt(a));)a++;var v=!1;if(a<h){var I=n.charAt(a);I!=="-"&&I!=="+"||(a++,I==="-"&&(v=!0))}for(var R=new f,T=0,O=0,W=0,re=!1;!(a>=h);){var ne=n.charAt(a);if(a++,yt.isDigit(ne)){var oe=ne-"0";R.selfMultiply(f.TEN),R.selfAdd(oe),T++}else{if(ne!=="."){if(ne==="e"||ne==="E"){var _e=n.substring(a);try{W=gt.parseInt(_e)}catch($e){throw $e instanceof NumberFormatException?new NumberFormatException("Invalid exponent "+_e+" in string "+n):$e}break}throw new NumberFormatException("Unexpected character '"+ne+"' at position "+a+" in string "+n)}O=T,re=!0}}var Se=R;re||(O=T);var Ne=T-O-W;if(Ne===0)Se=R;else if(Ne>0){var Ge=f.TEN.pow(Ne);Se=R.divide(Ge)}else if(Ne<0){var Be=f.TEN.pow(-Ne);Se=R.multiply(Be)}return v?Se.negate():Se}},{key:"createNaN",value:function(){return new f(ce.NaN,ce.NaN)}},{key:"copy",value:function(n){return new f(n)}},{key:"magnitude",value:function(n){var a=Math.abs(n),h=Math.log(a)/Math.log(10),v=Math.trunc(Math.floor(h));return 10*Math.pow(10,v)<=a&&(v+=1),v}},{key:"stringOfChar",value:function(n,a){for(var h=new tt,v=0;v<a;v++)h.append(n);return h.toString()}}])})();we.PI=new we(3.141592653589793,12246467991473532e-32),we.TWO_PI=new we(6.283185307179586,24492935982947064e-32),we.PI_2=new we(1.5707963267948966,6123233995736766e-32),we.E=new we(2.718281828459045,14456468917292502e-32),we.NaN=new we(ce.NaN,ce.NaN),we.EPS=123259516440783e-46,we.SPLIT=134217729,we.MAX_PRINT_DIGITS=32,we.TEN=we.valueOf(10),we.ONE=we.valueOf(1),we.SCI_NOT_EXPONENT_CHAR="E",we.SCI_NOT_ZERO="0.0E0";var Lt=(function(){function f(){o(this,f)}return g(f,null,[{key:"orientationIndex",value:function(n,a,h){var v=f.orientationIndexFilter(n,a,h);if(v<=1)return v;var I=we.valueOf(a.x).selfAdd(-n.x),R=we.valueOf(a.y).selfAdd(-n.y),T=we.valueOf(h.x).selfAdd(-a.x),O=we.valueOf(h.y).selfAdd(-a.y);return I.selfMultiply(O).selfSubtract(R.selfMultiply(T)).signum()}},{key:"signOfDet2x2",value:function(){if(arguments[3]instanceof we&&arguments[2]instanceof we&&arguments[0]instanceof we&&arguments[1]instanceof we){var n=arguments[1],a=arguments[2],h=arguments[3];return arguments[0].multiply(h).selfSubtract(n.multiply(a)).signum()}if(typeof arguments[3]=="number"&&typeof arguments[2]=="number"&&typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var v=arguments[0],I=arguments[1],R=arguments[2],T=arguments[3],O=we.valueOf(v),W=we.valueOf(I),re=we.valueOf(R),ne=we.valueOf(T);return O.multiply(ne).selfSubtract(W.multiply(re)).signum()}}},{key:"intersection",value:function(n,a,h,v){var I=new we(n.y).selfSubtract(a.y),R=new we(a.x).selfSubtract(n.x),T=new we(n.x).selfMultiply(a.y).selfSubtract(new we(a.x).selfMultiply(n.y)),O=new we(h.y).selfSubtract(v.y),W=new we(v.x).selfSubtract(h.x),re=new we(h.x).selfMultiply(v.y).selfSubtract(new we(v.x).selfMultiply(h.y)),ne=R.multiply(re).selfSubtract(W.multiply(T)),oe=O.multiply(T).selfSubtract(I.multiply(re)),_e=I.multiply(W).selfSubtract(O.multiply(R)),Se=ne.selfDivide(_e).doubleValue(),Ne=oe.selfDivide(_e).doubleValue();return ce.isNaN(Se)||ce.isInfinite(Se)||ce.isNaN(Ne)||ce.isInfinite(Ne)?null:new J(Se,Ne)}},{key:"orientationIndexFilter",value:function(n,a,h){var v=null,I=(n.x-h.x)*(a.y-h.y),R=(n.y-h.y)*(a.x-h.x),T=I-R;if(I>0){if(R<=0)return f.signum(T);v=I+R}else{if(!(I<0)||R>=0)return f.signum(T);v=-I-R}var O=f.DP_SAFE_EPSILON*v;return T>=O||-T>=O?f.signum(T):2}},{key:"signum",value:function(n){return n>0?1:n<0?-1:0}}])})();Lt.DP_SAFE_EPSILON=1e-15;var Me=(function(){return g((function f(){o(this,f)}),[{key:"getM",value:function(f){if(this.hasM()){var n=this.getDimension()-this.getMeasures();return this.getOrdinate(f,n)}return ce.NaN}},{key:"setOrdinate",value:function(f,n,a){}},{key:"getZ",value:function(f){return this.hasZ()?this.getOrdinate(f,2):ce.NaN}},{key:"size",value:function(){}},{key:"getOrdinate",value:function(f,n){}},{key:"getCoordinate",value:function(){}},{key:"getCoordinateCopy",value:function(f){}},{key:"createCoordinate",value:function(){}},{key:"getDimension",value:function(){}},{key:"hasM",value:function(){return this.getMeasures()>0}},{key:"getX",value:function(f){}},{key:"hasZ",value:function(){return this.getDimension()-this.getMeasures()>2}},{key:"getMeasures",value:function(){return 0}},{key:"expandEnvelope",value:function(f){}},{key:"copy",value:function(){}},{key:"getY",value:function(f){}},{key:"toCoordinateArray",value:function(){}},{key:"interfaces_",get:function(){return[Q]}}])})();Me.X=0,Me.Y=1,Me.Z=2,Me.M=3;var ke=(function(){function f(){o(this,f)}return g(f,null,[{key:"index",value:function(n,a,h){return Lt.orientationIndex(n,a,h)}},{key:"isCCW",value:function(){if(arguments[0]instanceof Array){var n=arguments[0],a=n.length-1;if(a<3)throw new V("Ring has fewer than 4 points, so orientation cannot be determined");for(var h=n[0],v=0,I=1;I<=a;I++){var R=n[I];R.y>h.y&&(h=R,v=I)}var T=v;do(T-=1)<0&&(T=a);while(n[T].equals2D(h)&&T!==v);var O=v;do O=(O+1)%a;while(n[O].equals2D(h)&&O!==v);var W=n[T],re=n[O];if(W.equals2D(h)||re.equals2D(h)||W.equals2D(re))return!1;var ne=f.index(W,h,re);return ne===0?W.x>re.x:ne>0}if(Le(arguments[0],Me)){var oe=arguments[0],_e=oe.size()-1;if(_e<3)throw new V("Ring has fewer than 4 points, so orientation cannot be determined");for(var Se=oe.getCoordinate(0),Ne=0,Ge=1;Ge<=_e;Ge++){var Be=oe.getCoordinate(Ge);Be.y>Se.y&&(Se=Be,Ne=Ge)}var $e=null,et=Ne;do(et-=1)<0&&(et=_e),$e=oe.getCoordinate(et);while($e.equals2D(Se)&&et!==Ne);var nt=null,Xt=Ne;do Xt=(Xt+1)%_e,nt=oe.getCoordinate(Xt);while(nt.equals2D(Se)&&Xt!==Ne);if($e.equals2D(Se)||nt.equals2D(Se)||$e.equals2D(nt))return!1;var lr=f.index($e,Se,nt);return lr===0?$e.x>nt.x:lr>0}}}])})();ke.CLOCKWISE=-1,ke.RIGHT=ke.CLOCKWISE,ke.COUNTERCLOCKWISE=1,ke.LEFT=ke.COUNTERCLOCKWISE,ke.COLLINEAR=0,ke.STRAIGHT=ke.COLLINEAR;var Ut=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"getCoordinate",value:function(){return this._minCoord}},{key:"getRightmostSide",value:function(f,n){var a=this.getRightmostSideOfSegment(f,n);return a<0&&(a=this.getRightmostSideOfSegment(f,n-1)),a<0&&(this._minCoord=null,this.checkForRightmostCoordinate(f)),a}},{key:"findRightmostEdgeAtVertex",value:function(){var f=this._minDe.getEdge().getCoordinates();pe.isTrue(this._minIndex>0&&this._minIndex<f.length,"rightmost point expected to be interior vertex of edge");var n=f[this._minIndex-1],a=f[this._minIndex+1],h=ke.index(this._minCoord,a,n),v=!1;(n.y<this._minCoord.y&&a.y<this._minCoord.y&&h===ke.COUNTERCLOCKWISE||n.y>this._minCoord.y&&a.y>this._minCoord.y&&h===ke.CLOCKWISE)&&(v=!0),v&&(this._minIndex=this._minIndex-1)}},{key:"getRightmostSideOfSegment",value:function(f,n){var a=f.getEdge().getCoordinates();if(n<0||n+1>=a.length||a[n].y===a[n+1].y)return-1;var h=he.LEFT;return a[n].y<a[n+1].y&&(h=he.RIGHT),h}},{key:"getEdge",value:function(){return this._orientedDe}},{key:"checkForRightmostCoordinate",value:function(f){for(var n=f.getEdge().getCoordinates(),a=0;a<n.length-1;a++)(this._minCoord===null||n[a].x>this._minCoord.x)&&(this._minDe=f,this._minIndex=a,this._minCoord=n[a])}},{key:"findRightmostEdgeAtNode",value:function(){var f=this._minDe.getNode().getEdges();this._minDe=f.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)}},{key:"findEdge",value:function(f){for(var n=f.iterator();n.hasNext();){var a=n.next();a.isForward()&&this.checkForRightmostCoordinate(a)}pe.isTrue(this._minIndex!==0||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),this._minIndex===0?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe,this.getRightmostSide(this._minDe,this._minIndex)===he.LEFT&&(this._orientedDe=this._minDe.getSym())}}],[{key:"constructor_",value:function(){this._minIndex=-1,this._minCoord=null,this._minDe=null,this._orientedDe=null}}])})(),at=(function(f){function n(a,h){var v;return o(this,n),(v=s(this,n,[h?a+" [ "+h+" ]":a])).pt=h?new J(h):void 0,v.name=Object.keys({TopologyException:n})[0],v}return E(n,f),g(n,[{key:"getCoordinate",value:function(){return this.pt}}])})(Ce),Bt=(function(){return g((function f(){o(this,f),this.array=[]}),[{key:"addLast",value:function(f){this.array.push(f)}},{key:"removeFirst",value:function(){return this.array.shift()}},{key:"isEmpty",value:function(){return this.array.length===0}}])})(),De=(function(f){function n(a){var h;return o(this,n),(h=s(this,n)).array=[],a instanceof Re&&h.addAll(a),h}return E(n,f),g(n,[{key:"interfaces_",get:function(){return[Ve,Re]}},{key:"ensureCapacity",value:function(){}},{key:"add",value:function(a){return arguments.length===1?this.array.push(a):this.array.splice(arguments[0],0,arguments[1]),!0}},{key:"clear",value:function(){this.array=[]}},{key:"addAll",value:function(a){var h,v=y(a);try{for(v.s();!(h=v.n()).done;){var I=h.value;this.array.push(I)}}catch(R){v.e(R)}finally{v.f()}}},{key:"set",value:function(a,h){var v=this.array[a];return this.array[a]=h,v}},{key:"iterator",value:function(){return new Gt(this)}},{key:"get",value:function(a){if(a<0||a>=this.size())throw new qe;return this.array[a]}},{key:"isEmpty",value:function(){return this.array.length===0}},{key:"sort",value:function(a){a?this.array.sort((function(h,v){return a.compare(h,v)})):this.array.sort()}},{key:"size",value:function(){return this.array.length}},{key:"toArray",value:function(){return this.array.slice()}},{key:"remove",value:function(a){for(var h=0,v=this.array.length;h<v;h++)if(this.array[h]===a)return!!this.array.splice(h,1);return!1}},{key:Symbol.iterator,value:function(){return this.array.values()}}])})(Ve),Gt=(function(){return g((function f(n){o(this,f),this.arrayList=n,this.position=0}),[{key:"next",value:function(){if(this.position===this.arrayList.size())throw new Oe;return this.arrayList.get(this.position++)}},{key:"hasNext",value:function(){return this.position<this.arrayList.size()}},{key:"set",value:function(f){return this.arrayList.set(this.position-1,f)}},{key:"remove",value:function(){this.arrayList.remove(this.arrayList.get(this.position))}}])})(),zt=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"clearVisitedEdges",value:function(){for(var f=this._dirEdgeList.iterator();f.hasNext();)f.next().setVisited(!1)}},{key:"getRightmostCoordinate",value:function(){return this._rightMostCoord}},{key:"computeNodeDepth",value:function(f){for(var n=null,a=f.getEdges().iterator();a.hasNext();){var h=a.next();if(h.isVisited()||h.getSym().isVisited()){n=h;break}}if(n===null)throw new at("unable to find edge to compute depths at "+f.getCoordinate());f.getEdges().computeDepths(n);for(var v=f.getEdges().iterator();v.hasNext();){var I=v.next();I.setVisited(!0),this.copySymDepths(I)}}},{key:"computeDepth",value:function(f){this.clearVisitedEdges();var n=this._finder.getEdge();n.getNode(),n.getLabel(),n.setEdgeDepths(he.RIGHT,f),this.copySymDepths(n),this.computeDepths(n)}},{key:"create",value:function(f){this.addReachable(f),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()}},{key:"findResultEdges",value:function(){for(var f=this._dirEdgeList.iterator();f.hasNext();){var n=f.next();n.getDepth(he.RIGHT)>=1&&n.getDepth(he.LEFT)<=0&&!n.isInteriorAreaEdge()&&n.setInResult(!0)}}},{key:"computeDepths",value:function(f){var n=new it,a=new Bt,h=f.getNode();for(a.addLast(h),n.add(h),f.setVisited(!0);!a.isEmpty();){var v=a.removeFirst();n.add(v),this.computeNodeDepth(v);for(var I=v.getEdges().iterator();I.hasNext();){var R=I.next().getSym();if(!R.isVisited()){var T=R.getNode();n.contains(T)||(a.addLast(T),n.add(T))}}}}},{key:"compareTo",value:function(f){var n=f;return this._rightMostCoord.x<n._rightMostCoord.x?-1:this._rightMostCoord.x>n._rightMostCoord.x?1:0}},{key:"getEnvelope",value:function(){if(this._env===null){for(var f=new ye,n=this._dirEdgeList.iterator();n.hasNext();)for(var a=n.next().getEdge().getCoordinates(),h=0;h<a.length-1;h++)f.expandToInclude(a[h]);this._env=f}return this._env}},{key:"addReachable",value:function(f){var n=new mt;for(n.add(f);!n.empty();){var a=n.pop();this.add(a,n)}}},{key:"copySymDepths",value:function(f){var n=f.getSym();n.setDepth(he.LEFT,f.getDepth(he.RIGHT)),n.setDepth(he.RIGHT,f.getDepth(he.LEFT))}},{key:"add",value:function(f,n){f.setVisited(!0),this._nodes.add(f);for(var a=f.getEdges().iterator();a.hasNext();){var h=a.next();this._dirEdgeList.add(h);var v=h.getSym().getNode();v.isVisited()||n.push(v)}}},{key:"getNodes",value:function(){return this._nodes}},{key:"getDirectedEdges",value:function(){return this._dirEdgeList}},{key:"interfaces_",get:function(){return[X]}}],[{key:"constructor_",value:function(){this._finder=null,this._dirEdgeList=new De,this._nodes=new De,this._rightMostCoord=null,this._env=null,this._finder=new Ut}}])})(),Ot=(function(){return g((function f(){o(this,f)}),null,[{key:"intersection",value:function(f,n,a,h){var v=f.x<n.x?f.x:n.x,I=f.y<n.y?f.y:n.y,R=f.x>n.x?f.x:n.x,T=f.y>n.y?f.y:n.y,O=a.x<h.x?a.x:h.x,W=a.y<h.y?a.y:h.y,re=a.x>h.x?a.x:h.x,ne=a.y>h.y?a.y:h.y,oe=((v>O?v:O)+(R<re?R:re))/2,_e=((I>W?I:W)+(T<ne?T:ne))/2,Se=f.x-oe,Ne=f.y-_e,Ge=n.x-oe,Be=n.y-_e,$e=a.x-oe,et=a.y-_e,nt=h.x-oe,Xt=h.y-_e,lr=Ne-Be,cn=Ge-Se,dn=Se*Be-Ge*Ne,hn=et-Xt,fn=nt-$e,pn=$e*Xt-nt*et,mn=lr*fn-hn*cn,Dr=(cn*pn-fn*dn)/mn,Tr=(hn*dn-lr*pn)/mn;return ce.isNaN(Dr)||ce.isInfinite(Dr)||ce.isNaN(Tr)||ce.isInfinite(Tr)?null:new J(Dr+oe,Tr+_e)}}])})(),Je=(function(){return g((function f(){o(this,f)}),null,[{key:"arraycopy",value:function(f,n,a,h,v){for(var I=0,R=n;R<n+v;R++)a[h+I]=f[R],I++}},{key:"getProperty",value:function(f){return{"line.separator":`
5
- `}[f]}}])})(),ct=(function(){function f(){o(this,f)}return g(f,null,[{key:"log10",value:function(n){var a=Math.log(n);return ce.isInfinite(a)||ce.isNaN(a)?a:a/f.LOG_10}},{key:"min",value:function(n,a,h,v){var I=n;return a<I&&(I=a),h<I&&(I=h),v<I&&(I=v),I}},{key:"clamp",value:function(){if(typeof arguments[2]=="number"&&typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var n=arguments[0],a=arguments[1],h=arguments[2];return n<a?a:n>h?h:n}if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var v=arguments[0],I=arguments[1],R=arguments[2];return v<I?I:v>R?R:v}}},{key:"wrap",value:function(n,a){return n<0?a- -n%a:n%a}},{key:"max",value:function(){if(arguments.length===3){var n=arguments[1],a=arguments[2],h=arguments[0];return n>h&&(h=n),a>h&&(h=a),h}if(arguments.length===4){var v=arguments[1],I=arguments[2],R=arguments[3],T=arguments[0];return v>T&&(T=v),I>T&&(T=I),R>T&&(T=R),T}}},{key:"average",value:function(n,a){return(n+a)/2}}])})();ct.LOG_10=Math.log(10);var Qe=(function(){function f(){o(this,f)}return g(f,null,[{key:"segmentToSegment",value:function(n,a,h,v){if(n.equals(a))return f.pointToSegment(n,h,v);if(h.equals(v))return f.pointToSegment(v,n,a);var I=!1;if(ye.intersects(n,a,h,v)){var R=(a.x-n.x)*(v.y-h.y)-(a.y-n.y)*(v.x-h.x);if(R===0)I=!0;else{var T=(n.y-h.y)*(v.x-h.x)-(n.x-h.x)*(v.y-h.y),O=((n.y-h.y)*(a.x-n.x)-(n.x-h.x)*(a.y-n.y))/R,W=T/R;(W<0||W>1||O<0||O>1)&&(I=!0)}}else I=!0;return I?ct.min(f.pointToSegment(n,h,v),f.pointToSegment(a,h,v),f.pointToSegment(h,n,a),f.pointToSegment(v,n,a)):0}},{key:"pointToSegment",value:function(n,a,h){if(a.x===h.x&&a.y===h.y)return n.distance(a);var v=(h.x-a.x)*(h.x-a.x)+(h.y-a.y)*(h.y-a.y),I=((n.x-a.x)*(h.x-a.x)+(n.y-a.y)*(h.y-a.y))/v;if(I<=0)return n.distance(a);if(I>=1)return n.distance(h);var R=((a.y-n.y)*(h.x-a.x)-(a.x-n.x)*(h.y-a.y))/v;return Math.abs(R)*Math.sqrt(v)}},{key:"pointToLinePerpendicular",value:function(n,a,h){var v=(h.x-a.x)*(h.x-a.x)+(h.y-a.y)*(h.y-a.y),I=((a.y-n.y)*(h.x-a.x)-(a.x-n.x)*(h.y-a.y))/v;return Math.abs(I)*Math.sqrt(v)}},{key:"pointToSegmentString",value:function(n,a){if(a.length===0)throw new V("Line array must contain at least one vertex");for(var h=n.distance(a[0]),v=0;v<a.length-1;v++){var I=f.pointToSegment(n,a[v],a[v+1]);I<h&&(h=I)}return h}}])})(),cr=(function(){return g((function f(){o(this,f)}),[{key:"create",value:function(){if(arguments.length===1)arguments[0]instanceof Array||Le(arguments[0],Me);else if(arguments.length!==2){if(arguments.length===3){var f=arguments[0],n=arguments[1];return this.create(f,n)}}}}])})(),Ht=(function(){return g((function f(){o(this,f)}),[{key:"filter",value:function(f){}}])})(),dr=(function(){return g((function f(){o(this,f)}),null,[{key:"ofLine",value:function(f){var n=f.size();if(n<=1)return 0;var a=0,h=new J;f.getCoordinate(0,h);for(var v=h.x,I=h.y,R=1;R<n;R++){f.getCoordinate(R,h);var T=h.x,O=h.y,W=T-v,re=O-I;a+=Math.sqrt(W*W+re*re),v=T,I=O}return a}}])})(),F=g((function f(){o(this,f)})),U=(function(){function f(){o(this,f)}return g(f,null,[{key:"copyCoord",value:function(n,a,h,v){for(var I=Math.min(n.getDimension(),h.getDimension()),R=0;R<I;R++)h.setOrdinate(v,R,n.getOrdinate(a,R))}},{key:"isRing",value:function(n){var a=n.size();return a===0||!(a<=3)&&n.getOrdinate(0,Me.X)===n.getOrdinate(a-1,Me.X)&&n.getOrdinate(0,Me.Y)===n.getOrdinate(a-1,Me.Y)}},{key:"scroll",value:function(){if(arguments.length===2){if(Le(arguments[0],Me)&&Number.isInteger(arguments[1])){var n=arguments[0],a=arguments[1];f.scroll(n,a,f.isRing(n))}else if(Le(arguments[0],Me)&&arguments[1]instanceof J){var h=arguments[0],v=arguments[1],I=f.indexOf(v,h);if(I<=0)return null;f.scroll(h,I)}}else if(arguments.length===3){var R=arguments[0],T=arguments[1],O=arguments[2];if(T<=0)return null;for(var W=R.copy(),re=O?R.size()-1:R.size(),ne=0;ne<re;ne++)for(var oe=0;oe<R.getDimension();oe++)R.setOrdinate(ne,oe,W.getOrdinate((T+ne)%re,oe));if(O)for(var _e=0;_e<R.getDimension();_e++)R.setOrdinate(re,_e,R.getOrdinate(0,_e))}}},{key:"isEqual",value:function(n,a){var h=n.size();if(h!==a.size())return!1;for(var v=Math.min(n.getDimension(),a.getDimension()),I=0;I<h;I++)for(var R=0;R<v;R++){var T=n.getOrdinate(I,R),O=a.getOrdinate(I,R);if(n.getOrdinate(I,R)!==a.getOrdinate(I,R)&&(!ce.isNaN(T)||!ce.isNaN(O)))return!1}return!0}},{key:"minCoordinateIndex",value:function(){if(arguments.length===1){var n=arguments[0];return f.minCoordinateIndex(n,0,n.size()-1)}if(arguments.length===3){for(var a=arguments[0],h=arguments[2],v=-1,I=null,R=arguments[1];R<=h;R++){var T=a.getCoordinate(R);(I===null||I.compareTo(T)>0)&&(I=T,v=R)}return v}}},{key:"extend",value:function(n,a,h){var v=n.create(h,a.getDimension()),I=a.size();if(f.copy(a,0,v,0,I),I>0)for(var R=I;R<h;R++)f.copy(a,I-1,v,R,1);return v}},{key:"reverse",value:function(n){for(var a=n.size()-1,h=Math.trunc(a/2),v=0;v<=h;v++)f.swap(n,v,a-v)}},{key:"swap",value:function(n,a,h){if(a===h)return null;for(var v=0;v<n.getDimension();v++){var I=n.getOrdinate(a,v);n.setOrdinate(a,v,n.getOrdinate(h,v)),n.setOrdinate(h,v,I)}}},{key:"copy",value:function(n,a,h,v,I){for(var R=0;R<I;R++)f.copyCoord(n,a+R,h,v+R)}},{key:"ensureValidRing",value:function(n,a){var h=a.size();return h===0?a:h<=3?f.createClosedRing(n,a,4):a.getOrdinate(0,Me.X)===a.getOrdinate(h-1,Me.X)&&a.getOrdinate(0,Me.Y)===a.getOrdinate(h-1,Me.Y)?a:f.createClosedRing(n,a,h+1)}},{key:"indexOf",value:function(n,a){for(var h=0;h<a.size();h++)if(n.x===a.getOrdinate(h,Me.X)&&n.y===a.getOrdinate(h,Me.Y))return h;return-1}},{key:"createClosedRing",value:function(n,a,h){var v=n.create(h,a.getDimension()),I=a.size();f.copy(a,0,v,0,I);for(var R=I;R<h;R++)f.copy(a,0,v,R,1);return v}},{key:"minCoordinate",value:function(n){for(var a=null,h=0;h<n.size();h++){var v=n.getCoordinate(h);(a===null||a.compareTo(v)>0)&&(a=v)}return a}}])})(),H=(function(){function f(){o(this,f)}return g(f,null,[{key:"toDimensionSymbol",value:function(n){switch(n){case f.FALSE:return f.SYM_FALSE;case f.TRUE:return f.SYM_TRUE;case f.DONTCARE:return f.SYM_DONTCARE;case f.P:return f.SYM_P;case f.L:return f.SYM_L;case f.A:return f.SYM_A}throw new V("Unknown dimension value: "+n)}},{key:"toDimensionValue",value:function(n){switch(yt.toUpperCase(n)){case f.SYM_FALSE:return f.FALSE;case f.SYM_TRUE:return f.TRUE;case f.SYM_DONTCARE:return f.DONTCARE;case f.SYM_P:return f.P;case f.SYM_L:return f.L;case f.SYM_A:return f.A}throw new V("Unknown dimension symbol: "+n)}}])})();H.P=0,H.L=1,H.A=2,H.FALSE=-1,H.TRUE=-2,H.DONTCARE=-3,H.SYM_FALSE="F",H.SYM_TRUE="T",H.SYM_DONTCARE="*",H.SYM_P="0",H.SYM_L="1",H.SYM_A="2";var ae=(function(){return g((function f(){o(this,f)}),[{key:"filter",value:function(f){}}])})(),be=(function(){return g((function f(){o(this,f)}),[{key:"filter",value:function(f,n){}},{key:"isDone",value:function(){}},{key:"isGeometryChanged",value:function(){}}])})(),Ie=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"computeEnvelopeInternal",value:function(){return this.isEmpty()?new ye:this._points.expandEnvelope(new ye)}},{key:"isRing",value:function(){return this.isClosed()&&this.isSimple()}},{key:"getCoordinates",value:function(){return this._points.toCoordinateArray()}},{key:"copyInternal",value:function(){return new n(this._points.copy(),this._factory)}},{key:"equalsExact",value:function(){if(arguments.length===2&&typeof arguments[1]=="number"&&arguments[0]instanceof de){var a=arguments[0],h=arguments[1];if(!this.isEquivalentClass(a))return!1;var v=a;if(this._points.size()!==v._points.size())return!1;for(var I=0;I<this._points.size();I++)if(!this.equal(this._points.getCoordinate(I),v._points.getCoordinate(I),h))return!1;return!0}return A(n,"equalsExact",this,1).apply(this,arguments)}},{key:"normalize",value:function(){for(var a=0;a<Math.trunc(this._points.size()/2);a++){var h=this._points.size()-1-a;if(!this._points.getCoordinate(a).equals(this._points.getCoordinate(h))){if(this._points.getCoordinate(a).compareTo(this._points.getCoordinate(h))>0){var v=this._points.copy();U.reverse(v),this._points=v}return null}}}},{key:"getCoordinate",value:function(){return this.isEmpty()?null:this._points.getCoordinate(0)}},{key:"getBoundaryDimension",value:function(){return this.isClosed()?H.FALSE:0}},{key:"isClosed",value:function(){return!this.isEmpty()&&this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))}},{key:"reverseInternal",value:function(){var a=this._points.copy();return U.reverse(a),this.getFactory().createLineString(a)}},{key:"getEndPoint",value:function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)}},{key:"getTypeCode",value:function(){return de.TYPECODE_LINESTRING}},{key:"getDimension",value:function(){return 1}},{key:"getLength",value:function(){return dr.ofLine(this._points)}},{key:"getNumPoints",value:function(){return this._points.size()}},{key:"compareToSameClass",value:function(){if(arguments.length===1){for(var a=arguments[0],h=0,v=0;h<this._points.size()&&v<a._points.size();){var I=this._points.getCoordinate(h).compareTo(a._points.getCoordinate(v));if(I!==0)return I;h++,v++}return h<this._points.size()?1:v<a._points.size()?-1:0}if(arguments.length===2){var R=arguments[0];return arguments[1].compare(this._points,R._points)}}},{key:"apply",value:function(){if(Le(arguments[0],Ht))for(var a=arguments[0],h=0;h<this._points.size();h++)a.filter(this._points.getCoordinate(h));else if(Le(arguments[0],be)){var v=arguments[0];if(this._points.size()===0)return null;for(var I=0;I<this._points.size()&&(v.filter(this._points,I),!v.isDone());I++);v.isGeometryChanged()&&this.geometryChanged()}else Le(arguments[0],ae)?arguments[0].filter(this):Le(arguments[0],Y)&&arguments[0].filter(this)}},{key:"getBoundary",value:function(){throw new je}},{key:"isEquivalentClass",value:function(a){return a instanceof n}},{key:"getCoordinateN",value:function(a){return this._points.getCoordinate(a)}},{key:"getGeometryType",value:function(){return de.TYPENAME_LINESTRING}},{key:"getCoordinateSequence",value:function(){return this._points}},{key:"isEmpty",value:function(){return this._points.size()===0}},{key:"init",value:function(a){if(a===null&&(a=this.getFactory().getCoordinateSequenceFactory().create([])),a.size()===1)throw new V("Invalid number of points in LineString (found "+a.size()+" - must be 0 or >= 2)");this._points=a}},{key:"isCoordinate",value:function(a){for(var h=0;h<this._points.size();h++)if(this._points.getCoordinate(h).equals(a))return!0;return!1}},{key:"getStartPoint",value:function(){return this.isEmpty()?null:this.getPointN(0)}},{key:"getPointN",value:function(a){return this.getFactory().createPoint(this._points.getCoordinate(a))}},{key:"interfaces_",get:function(){return[F]}}],[{key:"constructor_",value:function(){if(this._points=null,arguments.length!==0){if(arguments.length===2){var a=arguments[0],h=arguments[1];de.constructor_.call(this,h),this.init(a)}}}}])})(de),ge=g((function f(){o(this,f)})),He=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"computeEnvelopeInternal",value:function(){if(this.isEmpty())return new ye;var a=new ye;return a.expandToInclude(this._coordinates.getX(0),this._coordinates.getY(0)),a}},{key:"getCoordinates",value:function(){return this.isEmpty()?[]:[this.getCoordinate()]}},{key:"copyInternal",value:function(){return new n(this._coordinates.copy(),this._factory)}},{key:"equalsExact",value:function(){if(arguments.length===2&&typeof arguments[1]=="number"&&arguments[0]instanceof de){var a=arguments[0],h=arguments[1];return!!this.isEquivalentClass(a)&&(!(!this.isEmpty()||!a.isEmpty())||this.isEmpty()===a.isEmpty()&&this.equal(a.getCoordinate(),this.getCoordinate(),h))}return A(n,"equalsExact",this,1).apply(this,arguments)}},{key:"normalize",value:function(){}},{key:"getCoordinate",value:function(){return this._coordinates.size()!==0?this._coordinates.getCoordinate(0):null}},{key:"getBoundaryDimension",value:function(){return H.FALSE}},{key:"reverseInternal",value:function(){return this.getFactory().createPoint(this._coordinates.copy())}},{key:"getTypeCode",value:function(){return de.TYPECODE_POINT}},{key:"getDimension",value:function(){return 0}},{key:"getNumPoints",value:function(){return this.isEmpty()?0:1}},{key:"getX",value:function(){if(this.getCoordinate()===null)throw new IllegalStateException("getX called on empty Point");return this.getCoordinate().x}},{key:"compareToSameClass",value:function(){if(arguments.length===1){var a=arguments[0];return this.getCoordinate().compareTo(a.getCoordinate())}if(arguments.length===2){var h=arguments[0];return arguments[1].compare(this._coordinates,h._coordinates)}}},{key:"apply",value:function(){if(Le(arguments[0],Ht)){var a=arguments[0];if(this.isEmpty())return null;a.filter(this.getCoordinate())}else if(Le(arguments[0],be)){var h=arguments[0];if(this.isEmpty())return null;h.filter(this._coordinates,0),h.isGeometryChanged()&&this.geometryChanged()}else Le(arguments[0],ae)?arguments[0].filter(this):Le(arguments[0],Y)&&arguments[0].filter(this)}},{key:"getBoundary",value:function(){return this.getFactory().createGeometryCollection()}},{key:"getGeometryType",value:function(){return de.TYPENAME_POINT}},{key:"getCoordinateSequence",value:function(){return this._coordinates}},{key:"getY",value:function(){if(this.getCoordinate()===null)throw new IllegalStateException("getY called on empty Point");return this.getCoordinate().y}},{key:"isEmpty",value:function(){return this._coordinates.size()===0}},{key:"init",value:function(a){a===null&&(a=this.getFactory().getCoordinateSequenceFactory().create([])),pe.isTrue(a.size()<=1),this._coordinates=a}},{key:"isSimple",value:function(){return!0}},{key:"interfaces_",get:function(){return[ge]}}],[{key:"constructor_",value:function(){this._coordinates=null;var a=arguments[0],h=arguments[1];de.constructor_.call(this,h),this.init(a)}}])})(de),Ye=(function(){function f(){o(this,f)}return g(f,null,[{key:"ofRing",value:function(){if(arguments[0]instanceof Array){var n=arguments[0];return Math.abs(f.ofRingSigned(n))}if(Le(arguments[0],Me)){var a=arguments[0];return Math.abs(f.ofRingSigned(a))}}},{key:"ofRingSigned",value:function(){if(arguments[0]instanceof Array){var n=arguments[0];if(n.length<3)return 0;for(var a=0,h=n[0].x,v=1;v<n.length-1;v++){var I=n[v].x-h,R=n[v+1].y;a+=I*(n[v-1].y-R)}return a/2}if(Le(arguments[0],Me)){var T=arguments[0],O=T.size();if(O<3)return 0;var W=new J,re=new J,ne=new J;T.getCoordinate(0,re),T.getCoordinate(1,ne);var oe=re.x;ne.x-=oe;for(var _e=0,Se=1;Se<O-1;Se++)W.y=re.y,re.x=ne.x,re.y=ne.y,T.getCoordinate(Se+1,ne),ne.x-=oe,_e+=re.x*(W.y-ne.y);return _e/2}}}])})(),Xe=(function(){return g((function f(){o(this,f)}),null,[{key:"sort",value:function(){var f=arguments,n=arguments[0];if(arguments.length===1)n.sort((function(oe,_e){return oe.compareTo(_e)}));else if(arguments.length===2)n.sort((function(oe,_e){return f[1].compare(oe,_e)}));else if(arguments.length===3){var a=n.slice(arguments[1],arguments[2]);a.sort();var h=n.slice(0,arguments[1]).concat(a,n.slice(arguments[2],n.length));n.splice(0,n.length);var v,I=y(h);try{for(I.s();!(v=I.n()).done;){var R=v.value;n.push(R)}}catch(oe){I.e(oe)}finally{I.f()}}else if(arguments.length===4){var T=n.slice(arguments[1],arguments[2]);T.sort((function(oe,_e){return f[3].compare(oe,_e)}));var O=n.slice(0,arguments[1]).concat(T,n.slice(arguments[2],n.length));n.splice(0,n.length);var W,re=y(O);try{for(re.s();!(W=re.n()).done;){var ne=W.value;n.push(ne)}}catch(oe){re.e(oe)}finally{re.f()}}}},{key:"asList",value:function(f){var n,a=new De,h=y(f);try{for(h.s();!(n=h.n()).done;){var v=n.value;a.add(v)}}catch(I){h.e(I)}finally{h.f()}return a}},{key:"copyOf",value:function(f,n){return f.slice(0,n)}}])})(),vt=g((function f(){o(this,f)})),Pt=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"computeEnvelopeInternal",value:function(){return this._shell.getEnvelopeInternal()}},{key:"getCoordinates",value:function(){if(this.isEmpty())return[];for(var a=new Array(this.getNumPoints()).fill(null),h=-1,v=this._shell.getCoordinates(),I=0;I<v.length;I++)a[++h]=v[I];for(var R=0;R<this._holes.length;R++)for(var T=this._holes[R].getCoordinates(),O=0;O<T.length;O++)a[++h]=T[O];return a}},{key:"getArea",value:function(){var a=0;a+=Ye.ofRing(this._shell.getCoordinateSequence());for(var h=0;h<this._holes.length;h++)a-=Ye.ofRing(this._holes[h].getCoordinateSequence());return a}},{key:"copyInternal",value:function(){for(var a=this._shell.copy(),h=new Array(this._holes.length).fill(null),v=0;v<this._holes.length;v++)h[v]=this._holes[v].copy();return new n(a,h,this._factory)}},{key:"isRectangle",value:function(){if(this.getNumInteriorRing()!==0||this._shell===null||this._shell.getNumPoints()!==5)return!1;for(var a=this._shell.getCoordinateSequence(),h=this.getEnvelopeInternal(),v=0;v<5;v++){var I=a.getX(v);if(I!==h.getMinX()&&I!==h.getMaxX())return!1;var R=a.getY(v);if(R!==h.getMinY()&&R!==h.getMaxY())return!1}for(var T=a.getX(0),O=a.getY(0),W=1;W<=4;W++){var re=a.getX(W),ne=a.getY(W);if(re!==T==(ne!==O))return!1;T=re,O=ne}return!0}},{key:"equalsExact",value:function(){if(arguments.length===2&&typeof arguments[1]=="number"&&arguments[0]instanceof de){var a=arguments[0],h=arguments[1];if(!this.isEquivalentClass(a))return!1;var v=a,I=this._shell,R=v._shell;if(!I.equalsExact(R,h)||this._holes.length!==v._holes.length)return!1;for(var T=0;T<this._holes.length;T++)if(!this._holes[T].equalsExact(v._holes[T],h))return!1;return!0}return A(n,"equalsExact",this,1).apply(this,arguments)}},{key:"normalize",value:function(){if(arguments.length===0){this._shell=this.normalized(this._shell,!0);for(var a=0;a<this._holes.length;a++)this._holes[a]=this.normalized(this._holes[a],!1);Xe.sort(this._holes)}else if(arguments.length===2){var h=arguments[0],v=arguments[1];if(h.isEmpty())return null;var I=h.getCoordinateSequence(),R=U.minCoordinateIndex(I,0,I.size()-2);U.scroll(I,R,!0),ke.isCCW(I)===v&&U.reverse(I)}}},{key:"getCoordinate",value:function(){return this._shell.getCoordinate()}},{key:"getNumInteriorRing",value:function(){return this._holes.length}},{key:"getBoundaryDimension",value:function(){return 1}},{key:"reverseInternal",value:function(){for(var a=this.getExteriorRing().reverse(),h=new Array(this.getNumInteriorRing()).fill(null),v=0;v<h.length;v++)h[v]=this.getInteriorRingN(v).reverse();return this.getFactory().createPolygon(a,h)}},{key:"getTypeCode",value:function(){return de.TYPECODE_POLYGON}},{key:"getDimension",value:function(){return 2}},{key:"getLength",value:function(){var a=0;a+=this._shell.getLength();for(var h=0;h<this._holes.length;h++)a+=this._holes[h].getLength();return a}},{key:"getNumPoints",value:function(){for(var a=this._shell.getNumPoints(),h=0;h<this._holes.length;h++)a+=this._holes[h].getNumPoints();return a}},{key:"convexHull",value:function(){return this.getExteriorRing().convexHull()}},{key:"normalized",value:function(a,h){var v=a.copy();return this.normalize(v,h),v}},{key:"compareToSameClass",value:function(){if(arguments.length===1){var a=arguments[0],h=this._shell,v=a._shell;return h.compareToSameClass(v)}if(arguments.length===2){var I=arguments[1],R=arguments[0],T=this._shell,O=R._shell,W=T.compareToSameClass(O,I);if(W!==0)return W;for(var re=this.getNumInteriorRing(),ne=R.getNumInteriorRing(),oe=0;oe<re&&oe<ne;){var _e=this.getInteriorRingN(oe),Se=R.getInteriorRingN(oe),Ne=_e.compareToSameClass(Se,I);if(Ne!==0)return Ne;oe++}return oe<re?1:oe<ne?-1:0}}},{key:"apply",value:function(){if(Le(arguments[0],Ht)){var a=arguments[0];this._shell.apply(a);for(var h=0;h<this._holes.length;h++)this._holes[h].apply(a)}else if(Le(arguments[0],be)){var v=arguments[0];if(this._shell.apply(v),!v.isDone())for(var I=0;I<this._holes.length&&(this._holes[I].apply(v),!v.isDone());I++);v.isGeometryChanged()&&this.geometryChanged()}else if(Le(arguments[0],ae))arguments[0].filter(this);else if(Le(arguments[0],Y)){var R=arguments[0];R.filter(this),this._shell.apply(R);for(var T=0;T<this._holes.length;T++)this._holes[T].apply(R)}}},{key:"getBoundary",value:function(){if(this.isEmpty())return this.getFactory().createMultiLineString();var a=new Array(this._holes.length+1).fill(null);a[0]=this._shell;for(var h=0;h<this._holes.length;h++)a[h+1]=this._holes[h];return a.length<=1?this.getFactory().createLinearRing(a[0].getCoordinateSequence()):this.getFactory().createMultiLineString(a)}},{key:"getGeometryType",value:function(){return de.TYPENAME_POLYGON}},{key:"getExteriorRing",value:function(){return this._shell}},{key:"isEmpty",value:function(){return this._shell.isEmpty()}},{key:"getInteriorRingN",value:function(a){return this._holes[a]}},{key:"interfaces_",get:function(){return[vt]}}],[{key:"constructor_",value:function(){this._shell=null,this._holes=null;var a=arguments[0],h=arguments[1],v=arguments[2];if(de.constructor_.call(this,v),a===null&&(a=this.getFactory().createLinearRing()),h===null&&(h=[]),de.hasNullElements(h))throw new V("holes must not contain null elements");if(a.isEmpty()&&de.hasNonEmptyElements(h))throw new V("shell is empty but holes are not");this._shell=a,this._holes=h}}])})(de),Tt=(function(f){function n(){return o(this,n),s(this,n,arguments)}return E(n,f),g(n)})(Fe),Ct=(function(f){function n(a){var h;return o(this,n),(h=s(this,n)).array=[],a instanceof Re&&h.addAll(a),h}return E(n,f),g(n,[{key:"contains",value:function(a){var h,v=y(this.array);try{for(v.s();!(h=v.n()).done;)if(h.value.compareTo(a)===0)return!0}catch(I){v.e(I)}finally{v.f()}return!1}},{key:"add",value:function(a){if(this.contains(a))return!1;for(var h=0,v=this.array.length;h<v;h++)if(this.array[h].compareTo(a)===1)return!!this.array.splice(h,0,a);return this.array.push(a),!0}},{key:"addAll",value:function(a){var h,v=y(a);try{for(v.s();!(h=v.n()).done;){var I=h.value;this.add(I)}}catch(R){v.e(R)}finally{v.f()}return!0}},{key:"remove",value:function(){throw new je}},{key:"size",value:function(){return this.array.length}},{key:"isEmpty",value:function(){return this.array.length===0}},{key:"toArray",value:function(){return this.array.slice()}},{key:"iterator",value:function(){return new Yt(this.array)}}])})(Tt),Yt=(function(){return g((function f(n){o(this,f),this.array=n,this.position=0}),[{key:"next",value:function(){if(this.position===this.array.length)throw new Oe;return this.array[this.position++]}},{key:"hasNext",value:function(){return this.position<this.array.length}},{key:"remove",value:function(){throw new je}}])})(),Ke=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"computeEnvelopeInternal",value:function(){for(var a=new ye,h=0;h<this._geometries.length;h++)a.expandToInclude(this._geometries[h].getEnvelopeInternal());return a}},{key:"getGeometryN",value:function(a){return this._geometries[a]}},{key:"getCoordinates",value:function(){for(var a=new Array(this.getNumPoints()).fill(null),h=-1,v=0;v<this._geometries.length;v++)for(var I=this._geometries[v].getCoordinates(),R=0;R<I.length;R++)a[++h]=I[R];return a}},{key:"getArea",value:function(){for(var a=0,h=0;h<this._geometries.length;h++)a+=this._geometries[h].getArea();return a}},{key:"copyInternal",value:function(){for(var a=new Array(this._geometries.length).fill(null),h=0;h<a.length;h++)a[h]=this._geometries[h].copy();return new n(a,this._factory)}},{key:"equalsExact",value:function(){if(arguments.length===2&&typeof arguments[1]=="number"&&arguments[0]instanceof de){var a=arguments[0],h=arguments[1];if(!this.isEquivalentClass(a))return!1;var v=a;if(this._geometries.length!==v._geometries.length)return!1;for(var I=0;I<this._geometries.length;I++)if(!this._geometries[I].equalsExact(v._geometries[I],h))return!1;return!0}return A(n,"equalsExact",this,1).apply(this,arguments)}},{key:"normalize",value:function(){for(var a=0;a<this._geometries.length;a++)this._geometries[a].normalize();Xe.sort(this._geometries)}},{key:"getCoordinate",value:function(){return this.isEmpty()?null:this._geometries[0].getCoordinate()}},{key:"getBoundaryDimension",value:function(){for(var a=H.FALSE,h=0;h<this._geometries.length;h++)a=Math.max(a,this._geometries[h].getBoundaryDimension());return a}},{key:"reverseInternal",value:function(){for(var a=this._geometries.length,h=new De(a),v=0;v<a;v++)h.add(this._geometries[v].reverse());return this.getFactory().buildGeometry(h)}},{key:"getTypeCode",value:function(){return de.TYPECODE_GEOMETRYCOLLECTION}},{key:"getDimension",value:function(){for(var a=H.FALSE,h=0;h<this._geometries.length;h++)a=Math.max(a,this._geometries[h].getDimension());return a}},{key:"getLength",value:function(){for(var a=0,h=0;h<this._geometries.length;h++)a+=this._geometries[h].getLength();return a}},{key:"getNumPoints",value:function(){for(var a=0,h=0;h<this._geometries.length;h++)a+=this._geometries[h].getNumPoints();return a}},{key:"getNumGeometries",value:function(){return this._geometries.length}},{key:"compareToSameClass",value:function(){if(arguments.length===1){var a=arguments[0],h=new Ct(Xe.asList(this._geometries)),v=new Ct(Xe.asList(a._geometries));return this.compare(h,v)}if(arguments.length===2){for(var I=arguments[1],R=arguments[0],T=this.getNumGeometries(),O=R.getNumGeometries(),W=0;W<T&&W<O;){var re=this.getGeometryN(W),ne=R.getGeometryN(W),oe=re.compareToSameClass(ne,I);if(oe!==0)return oe;W++}return W<T?1:W<O?-1:0}}},{key:"apply",value:function(){if(Le(arguments[0],Ht))for(var a=arguments[0],h=0;h<this._geometries.length;h++)this._geometries[h].apply(a);else if(Le(arguments[0],be)){var v=arguments[0];if(this._geometries.length===0)return null;for(var I=0;I<this._geometries.length&&(this._geometries[I].apply(v),!v.isDone());I++);v.isGeometryChanged()&&this.geometryChanged()}else if(Le(arguments[0],ae)){var R=arguments[0];R.filter(this);for(var T=0;T<this._geometries.length;T++)this._geometries[T].apply(R)}else if(Le(arguments[0],Y)){var O=arguments[0];O.filter(this);for(var W=0;W<this._geometries.length;W++)this._geometries[W].apply(O)}}},{key:"getBoundary",value:function(){return de.checkNotGeometryCollection(this),pe.shouldNeverReachHere(),null}},{key:"getGeometryType",value:function(){return de.TYPENAME_GEOMETRYCOLLECTION}},{key:"isEmpty",value:function(){for(var a=0;a<this._geometries.length;a++)if(!this._geometries[a].isEmpty())return!1;return!0}}],[{key:"constructor_",value:function(){if(this._geometries=null,arguments.length!==0){if(arguments.length===2){var a=arguments[0],h=arguments[1];if(de.constructor_.call(this,h),a===null&&(a=[]),de.hasNullElements(a))throw new V("geometries must not contain null elements");this._geometries=a}}}}])})(de),St=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"copyInternal",value:function(){for(var a=new Array(this._geometries.length).fill(null),h=0;h<a.length;h++)a[h]=this._geometries[h].copy();return new n(a,this._factory)}},{key:"isValid",value:function(){return!0}},{key:"equalsExact",value:function(){if(arguments.length===2&&typeof arguments[1]=="number"&&arguments[0]instanceof de){var a=arguments[0],h=arguments[1];return!!this.isEquivalentClass(a)&&A(n,"equalsExact",this,1).call(this,a,h)}return A(n,"equalsExact",this,1).apply(this,arguments)}},{key:"getCoordinate",value:function(){if(arguments.length===1&&Number.isInteger(arguments[0])){var a=arguments[0];return this._geometries[a].getCoordinate()}return A(n,"getCoordinate",this,1).apply(this,arguments)}},{key:"getBoundaryDimension",value:function(){return H.FALSE}},{key:"getTypeCode",value:function(){return de.TYPECODE_MULTIPOINT}},{key:"getDimension",value:function(){return 0}},{key:"getBoundary",value:function(){return this.getFactory().createGeometryCollection()}},{key:"getGeometryType",value:function(){return de.TYPENAME_MULTIPOINT}},{key:"interfaces_",get:function(){return[ge]}}],[{key:"constructor_",value:function(){var a=arguments[0],h=arguments[1];Ke.constructor_.call(this,a,h)}}])})(Ke),ht=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"copyInternal",value:function(){return new n(this._points.copy(),this._factory)}},{key:"getBoundaryDimension",value:function(){return H.FALSE}},{key:"isClosed",value:function(){return!!this.isEmpty()||A(n,"isClosed",this,1).call(this)}},{key:"reverseInternal",value:function(){var a=this._points.copy();return U.reverse(a),this.getFactory().createLinearRing(a)}},{key:"getTypeCode",value:function(){return de.TYPECODE_LINEARRING}},{key:"validateConstruction",value:function(){if(!this.isEmpty()&&!A(n,"isClosed",this,1).call(this))throw new V("Points of LinearRing do not form a closed linestring");if(this.getCoordinateSequence().size()>=1&&this.getCoordinateSequence().size()<n.MINIMUM_VALID_SIZE)throw new V("Invalid number of points in LinearRing (found "+this.getCoordinateSequence().size()+" - must be 0 or >= 4)")}},{key:"getGeometryType",value:function(){return de.TYPENAME_LINEARRING}}],[{key:"constructor_",value:function(){var a=arguments[0],h=arguments[1];Ie.constructor_.call(this,a,h),this.validateConstruction()}}])})(Ie);ht.MINIMUM_VALID_SIZE=4;var rt=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"setOrdinate",value:function(a,h){switch(a){case n.X:this.x=h;break;case n.Y:this.y=h;break;default:throw new V("Invalid ordinate index: "+a)}}},{key:"getZ",value:function(){return J.NULL_ORDINATE}},{key:"getOrdinate",value:function(a){switch(a){case n.X:return this.x;case n.Y:return this.y}throw new V("Invalid ordinate index: "+a)}},{key:"setZ",value:function(a){throw new V("CoordinateXY dimension 2 does not support z-ordinate")}},{key:"copy",value:function(){return new n(this)}},{key:"toString",value:function(){return"("+this.x+", "+this.y+")"}},{key:"setCoordinate",value:function(a){this.x=a.x,this.y=a.y,this.z=a.getZ()}}],[{key:"constructor_",value:function(){if(arguments.length===0)J.constructor_.call(this);else if(arguments.length===1){if(arguments[0]instanceof n){var a=arguments[0];J.constructor_.call(this,a.x,a.y)}else if(arguments[0]instanceof J){var h=arguments[0];J.constructor_.call(this,h.x,h.y)}}else if(arguments.length===2){var v=arguments[0],I=arguments[1];J.constructor_.call(this,v,I,J.NULL_ORDINATE)}}}])})(J);rt.X=0,rt.Y=1,rt.Z=-1,rt.M=-1;var ut=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"getM",value:function(){return this._m}},{key:"setOrdinate",value:function(a,h){switch(a){case n.X:this.x=h;break;case n.Y:this.y=h;break;case n.M:this._m=h;break;default:throw new V("Invalid ordinate index: "+a)}}},{key:"setM",value:function(a){this._m=a}},{key:"getZ",value:function(){return J.NULL_ORDINATE}},{key:"getOrdinate",value:function(a){switch(a){case n.X:return this.x;case n.Y:return this.y;case n.M:return this._m}throw new V("Invalid ordinate index: "+a)}},{key:"setZ",value:function(a){throw new V("CoordinateXY dimension 2 does not support z-ordinate")}},{key:"copy",value:function(){return new n(this)}},{key:"toString",value:function(){return"("+this.x+", "+this.y+" m="+this.getM()+")"}},{key:"setCoordinate",value:function(a){this.x=a.x,this.y=a.y,this.z=a.getZ(),this._m=a.getM()}}],[{key:"constructor_",value:function(){if(this._m=null,arguments.length===0)J.constructor_.call(this),this._m=0;else if(arguments.length===1){if(arguments[0]instanceof n){var a=arguments[0];J.constructor_.call(this,a.x,a.y),this._m=a._m}else if(arguments[0]instanceof J){var h=arguments[0];J.constructor_.call(this,h.x,h.y),this._m=this.getM()}}else if(arguments.length===3){var v=arguments[0],I=arguments[1],R=arguments[2];J.constructor_.call(this,v,I,J.NULL_ORDINATE),this._m=R}}}])})(J);ut.X=0,ut.Y=1,ut.Z=-1,ut.M=2;var ot=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"getM",value:function(){return this._m}},{key:"setOrdinate",value:function(a,h){switch(a){case J.X:this.x=h;break;case J.Y:this.y=h;break;case J.Z:this.z=h;break;case J.M:this._m=h;break;default:throw new V("Invalid ordinate index: "+a)}}},{key:"setM",value:function(a){this._m=a}},{key:"getOrdinate",value:function(a){switch(a){case J.X:return this.x;case J.Y:return this.y;case J.Z:return this.getZ();case J.M:return this.getM()}throw new V("Invalid ordinate index: "+a)}},{key:"copy",value:function(){return new n(this)}},{key:"toString",value:function(){return"("+this.x+", "+this.y+", "+this.getZ()+" m="+this.getM()+")"}},{key:"setCoordinate",value:function(a){this.x=a.x,this.y=a.y,this.z=a.getZ(),this._m=a.getM()}}],[{key:"constructor_",value:function(){if(this._m=null,arguments.length===0)J.constructor_.call(this),this._m=0;else if(arguments.length===1){if(arguments[0]instanceof n){var a=arguments[0];J.constructor_.call(this,a),this._m=a._m}else if(arguments[0]instanceof J){var h=arguments[0];J.constructor_.call(this,h),this._m=this.getM()}}else if(arguments.length===4){var v=arguments[0],I=arguments[1],R=arguments[2],T=arguments[3];J.constructor_.call(this,v,I,R),this._m=T}}}])})(J),qt=(function(){function f(){o(this,f)}return g(f,null,[{key:"measures",value:function(n){return n instanceof rt?0:n instanceof ut||n instanceof ot?1:0}},{key:"dimension",value:function(n){return n instanceof rt?2:n instanceof ut?3:n instanceof ot?4:3}},{key:"create",value:function(){if(arguments.length===1){var n=arguments[0];return f.create(n,0)}if(arguments.length===2){var a=arguments[0],h=arguments[1];return a===2?new rt:a===3&&h===0?new J:a===3&&h===1?new ut:a===4&&h===1?new ot:new J}}}])})(),Rt=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"getCoordinate",value:function(a){return this.get(a)}},{key:"addAll",value:function(){if(arguments.length===2&&typeof arguments[1]=="boolean"&&Le(arguments[0],Re)){for(var a=arguments[1],h=!1,v=arguments[0].iterator();v.hasNext();)this.add(v.next(),a),h=!0;return h}return A(n,"addAll",this,1).apply(this,arguments)}},{key:"clone",value:function(){for(var a=A(n,"clone",this,1).call(this),h=0;h<this.size();h++)a.add(h,this.get(h).clone());return a}},{key:"toCoordinateArray",value:function(){if(arguments.length===0)return this.toArray(n.coordArrayType);if(arguments.length===1){if(arguments[0])return this.toArray(n.coordArrayType);for(var a=this.size(),h=new Array(a).fill(null),v=0;v<a;v++)h[v]=this.get(a-v-1);return h}}},{key:"add",value:function(){if(arguments.length===1){var a=arguments[0];return A(n,"add",this,1).call(this,a)}if(arguments.length===2){if(arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var h=arguments[0],v=arguments[1];return this.add(h,v,!0),!0}if(arguments[0]instanceof J&&typeof arguments[1]=="boolean"){var I=arguments[0];if(!arguments[1]&&this.size()>=1&&this.get(this.size()-1).equals2D(I))return null;A(n,"add",this,1).call(this,I)}else if(arguments[0]instanceof Object&&typeof arguments[1]=="boolean"){var R=arguments[0],T=arguments[1];return this.add(R,T),!0}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var O=arguments[0],W=arguments[1];if(arguments[2])for(var re=0;re<O.length;re++)this.add(O[re],W);else for(var ne=O.length-1;ne>=0;ne--)this.add(O[ne],W);return!0}if(typeof arguments[2]=="boolean"&&Number.isInteger(arguments[0])&&arguments[1]instanceof J){var oe=arguments[0],_e=arguments[1];if(!arguments[2]){var Se=this.size();if(Se>0&&(oe>0&&this.get(oe-1).equals2D(_e)||oe<Se&&this.get(oe).equals2D(_e)))return null}A(n,"add",this,1).call(this,oe,_e)}}else if(arguments.length===4){var Ne=arguments[0],Ge=arguments[1],Be=arguments[2],$e=arguments[3],et=1;Be>$e&&(et=-1);for(var nt=Be;nt!==$e;nt+=et)this.add(Ne[nt],Ge);return!0}}},{key:"closeRing",value:function(){if(this.size()>0){var a=this.get(0).copy();this.add(a,!1)}}}],[{key:"constructor_",value:function(){if(arguments.length!==0){if(arguments.length===1){var a=arguments[0];this.ensureCapacity(a.length),this.add(a,!0)}else if(arguments.length===2){var h=arguments[0],v=arguments[1];this.ensureCapacity(h.length),this.add(h,v)}}}}])})(De);Rt.coordArrayType=new Array(0).fill(null);var We=(function(){function f(){o(this,f)}return g(f,null,[{key:"isRing",value:function(n){return!(n.length<4)&&!!n[0].equals2D(n[n.length-1])}},{key:"ptNotInList",value:function(n,a){for(var h=0;h<n.length;h++){var v=n[h];if(f.indexOf(v,a)<0)return v}return null}},{key:"scroll",value:function(n,a){var h=f.indexOf(a,n);if(h<0)return null;var v=new Array(n.length).fill(null);Je.arraycopy(n,h,v,0,n.length-h),Je.arraycopy(n,0,v,n.length-h,h),Je.arraycopy(v,0,n,0,n.length)}},{key:"equals",value:function(){if(arguments.length===2){var n=arguments[0],a=arguments[1];if(n===a)return!0;if(n===null||a===null||n.length!==a.length)return!1;for(var h=0;h<n.length;h++)if(!n[h].equals(a[h]))return!1;return!0}if(arguments.length===3){var v=arguments[0],I=arguments[1],R=arguments[2];if(v===I)return!0;if(v===null||I===null||v.length!==I.length)return!1;for(var T=0;T<v.length;T++)if(R.compare(v[T],I[T])!==0)return!1;return!0}}},{key:"intersection",value:function(n,a){for(var h=new Rt,v=0;v<n.length;v++)a.intersects(n[v])&&h.add(n[v],!0);return h.toCoordinateArray()}},{key:"measures",value:function(n){if(n===null||n.length===0)return 0;var a,h=0,v=y(n);try{for(v.s();!(a=v.n()).done;){var I=a.value;h=Math.max(h,qt.measures(I))}}catch(R){v.e(R)}finally{v.f()}return h}},{key:"hasRepeatedPoints",value:function(n){for(var a=1;a<n.length;a++)if(n[a-1].equals(n[a]))return!0;return!1}},{key:"removeRepeatedPoints",value:function(n){return f.hasRepeatedPoints(n)?new Rt(n,!1).toCoordinateArray():n}},{key:"reverse",value:function(n){for(var a=n.length-1,h=Math.trunc(a/2),v=0;v<=h;v++){var I=n[v];n[v]=n[a-v],n[a-v]=I}}},{key:"removeNull",value:function(n){for(var a=0,h=0;h<n.length;h++)n[h]!==null&&a++;var v=new Array(a).fill(null);if(a===0)return v;for(var I=0,R=0;R<n.length;R++)n[R]!==null&&(v[I++]=n[R]);return v}},{key:"copyDeep",value:function(){if(arguments.length===1){for(var n=arguments[0],a=new Array(n.length).fill(null),h=0;h<n.length;h++)a[h]=n[h].copy();return a}if(arguments.length===5)for(var v=arguments[0],I=arguments[1],R=arguments[2],T=arguments[3],O=arguments[4],W=0;W<O;W++)R[T+W]=v[I+W].copy()}},{key:"isEqualReversed",value:function(n,a){for(var h=0;h<n.length;h++){var v=n[h],I=a[n.length-h-1];if(v.compareTo(I)!==0)return!1}return!0}},{key:"envelope",value:function(n){for(var a=new ye,h=0;h<n.length;h++)a.expandToInclude(n[h]);return a}},{key:"toCoordinateArray",value:function(n){return n.toArray(f.coordArrayType)}},{key:"dimension",value:function(n){if(n===null||n.length===0)return 3;var a,h=0,v=y(n);try{for(v.s();!(a=v.n()).done;){var I=a.value;h=Math.max(h,qt.dimension(I))}}catch(R){v.e(R)}finally{v.f()}return h}},{key:"atLeastNCoordinatesOrNothing",value:function(n,a){return a.length>=n?a:[]}},{key:"indexOf",value:function(n,a){for(var h=0;h<a.length;h++)if(n.equals(a[h]))return h;return-1}},{key:"increasingDirection",value:function(n){for(var a=0;a<Math.trunc(n.length/2);a++){var h=n.length-1-a,v=n[a].compareTo(n[h]);if(v!==0)return v}return 1}},{key:"compare",value:function(n,a){for(var h=0;h<n.length&&h<a.length;){var v=n[h].compareTo(a[h]);if(v!==0)return v;h++}return h<a.length?-1:h<n.length?1:0}},{key:"minCoordinate",value:function(n){for(var a=null,h=0;h<n.length;h++)(a===null||a.compareTo(n[h])>0)&&(a=n[h]);return a}},{key:"extract",value:function(n,a,h){a=ct.clamp(a,0,n.length);var v=(h=ct.clamp(h,-1,n.length))-a+1;h<0&&(v=0),a>=n.length&&(v=0),h<a&&(v=0);var I=new Array(v).fill(null);if(v===0)return I;for(var R=0,T=a;T<=h;T++)I[R++]=n[T];return I}}])})(),sr=(function(){return g((function f(){o(this,f)}),[{key:"compare",value:function(f,n){var a=f,h=n;return We.compare(a,h)}},{key:"interfaces_",get:function(){return[Te]}}])})(),Ft=(function(){return g((function f(){o(this,f)}),[{key:"compare",value:function(f,n){var a=f,h=n;if(a.length<h.length)return-1;if(a.length>h.length)return 1;if(a.length===0)return 0;var v=We.compare(a,h);return We.isEqualReversed(a,h)?0:v}},{key:"OLDcompare",value:function(f,n){var a=f,h=n;if(a.length<h.length)return-1;if(a.length>h.length)return 1;if(a.length===0)return 0;for(var v=We.increasingDirection(a),I=We.increasingDirection(h),R=v>0?0:a.length-1,T=I>0?0:a.length-1,O=0;O<a.length;O++){var W=a[R].compareTo(h[T]);if(W!==0)return W;R+=v,T+=I}return 0}},{key:"interfaces_",get:function(){return[Te]}}])})();We.ForwardComparator=sr,We.BidirectionalComparator=Ft,We.coordArrayType=new Array(0).fill(null);var $t=(function(){return g((function f(n){o(this,f),this.str=n}),[{key:"append",value:function(f){this.str+=f}},{key:"setCharAt",value:function(f,n){this.str=this.str.substr(0,f)+n+this.str.substr(f+1)}},{key:"toString",value:function(){return this.str}}])})(),bt=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"getM",value:function(n){return this.hasM()?this._coordinates[n].getM():ce.NaN}},{key:"setOrdinate",value:function(n,a,h){switch(a){case Me.X:this._coordinates[n].x=h;break;case Me.Y:this._coordinates[n].y=h;break;default:this._coordinates[n].setOrdinate(a,h)}}},{key:"getZ",value:function(n){return this.hasZ()?this._coordinates[n].getZ():ce.NaN}},{key:"size",value:function(){return this._coordinates.length}},{key:"getOrdinate",value:function(n,a){switch(a){case Me.X:return this._coordinates[n].x;case Me.Y:return this._coordinates[n].y;default:return this._coordinates[n].getOrdinate(a)}}},{key:"getCoordinate",value:function(){if(arguments.length===1){var n=arguments[0];return this._coordinates[n]}if(arguments.length===2){var a=arguments[0];arguments[1].setCoordinate(this._coordinates[a])}}},{key:"getCoordinateCopy",value:function(n){var a=this.createCoordinate();return a.setCoordinate(this._coordinates[n]),a}},{key:"createCoordinate",value:function(){return qt.create(this.getDimension(),this.getMeasures())}},{key:"getDimension",value:function(){return this._dimension}},{key:"getX",value:function(n){return this._coordinates[n].x}},{key:"getMeasures",value:function(){return this._measures}},{key:"expandEnvelope",value:function(n){for(var a=0;a<this._coordinates.length;a++)n.expandToInclude(this._coordinates[a]);return n}},{key:"copy",value:function(){for(var n=new Array(this.size()).fill(null),a=0;a<this._coordinates.length;a++){var h=this.createCoordinate();h.setCoordinate(this._coordinates[a]),n[a]=h}return new f(n,this._dimension,this._measures)}},{key:"toString",value:function(){if(this._coordinates.length>0){var n=new $t(17*this._coordinates.length);n.append("("),n.append(this._coordinates[0]);for(var a=1;a<this._coordinates.length;a++)n.append(", "),n.append(this._coordinates[a]);return n.append(")"),n.toString()}return"()"}},{key:"getY",value:function(n){return this._coordinates[n].y}},{key:"toCoordinateArray",value:function(){return this._coordinates}},{key:"interfaces_",get:function(){return[Me,$]}}],[{key:"constructor_",value:function(){if(this._dimension=3,this._measures=0,this._coordinates=null,arguments.length===1){if(arguments[0]instanceof Array){var n=arguments[0];f.constructor_.call(this,n,We.dimension(n),We.measures(n))}else if(Number.isInteger(arguments[0])){var a=arguments[0];this._coordinates=new Array(a).fill(null);for(var h=0;h<a;h++)this._coordinates[h]=new J}else if(Le(arguments[0],Me)){var v=arguments[0];if(v===null)return this._coordinates=new Array(0).fill(null),null;this._dimension=v.getDimension(),this._measures=v.getMeasures(),this._coordinates=new Array(v.size()).fill(null);for(var I=0;I<this._coordinates.length;I++)this._coordinates[I]=v.getCoordinateCopy(I)}}else if(arguments.length===2){if(arguments[0]instanceof Array&&Number.isInteger(arguments[1])){var R=arguments[0],T=arguments[1];f.constructor_.call(this,R,T,We.measures(R))}else if(Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var O=arguments[0],W=arguments[1];this._coordinates=new Array(O).fill(null),this._dimension=W;for(var re=0;re<O;re++)this._coordinates[re]=qt.create(W)}}else if(arguments.length===3){if(Number.isInteger(arguments[2])&&arguments[0]instanceof Array&&Number.isInteger(arguments[1])){var ne=arguments[0],oe=arguments[1],_e=arguments[2];this._dimension=oe,this._measures=_e,this._coordinates=ne===null?new Array(0).fill(null):ne}else if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var Se=arguments[0],Ne=arguments[1],Ge=arguments[2];this._coordinates=new Array(Se).fill(null),this._dimension=Ne,this._measures=Ge;for(var Be=0;Be<Se;Be++)this._coordinates[Be]=this.createCoordinate()}}}}])})(),Jt=(function(){function f(){o(this,f)}return g(f,[{key:"readResolve",value:function(){return f.instance()}},{key:"create",value:function(){if(arguments.length===1){if(arguments[0]instanceof Array)return new bt(arguments[0]);if(Le(arguments[0],Me))return new bt(arguments[0])}else{if(arguments.length===2){var n=arguments[1];return n>3&&(n=3),n<2&&(n=2),new bt(arguments[0],n)}if(arguments.length===3){var a=arguments[2],h=arguments[1]-a;return a>1&&(a=1),h>3&&(h=3),h<2&&(h=2),new bt(arguments[0],h+a,a)}}}},{key:"interfaces_",get:function(){return[cr,$]}}],[{key:"instance",value:function(){return f.instanceObject}}])})();Jt.instanceObject=new Jt;var yr=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"copyInternal",value:function(){for(var a=new Array(this._geometries.length).fill(null),h=0;h<a.length;h++)a[h]=this._geometries[h].copy();return new n(a,this._factory)}},{key:"equalsExact",value:function(){if(arguments.length===2&&typeof arguments[1]=="number"&&arguments[0]instanceof de){var a=arguments[0],h=arguments[1];return!!this.isEquivalentClass(a)&&A(n,"equalsExact",this,1).call(this,a,h)}return A(n,"equalsExact",this,1).apply(this,arguments)}},{key:"getBoundaryDimension",value:function(){return 1}},{key:"getTypeCode",value:function(){return de.TYPECODE_MULTIPOLYGON}},{key:"getDimension",value:function(){return 2}},{key:"getBoundary",value:function(){if(this.isEmpty())return this.getFactory().createMultiLineString();for(var a=new De,h=0;h<this._geometries.length;h++)for(var v=this._geometries[h].getBoundary(),I=0;I<v.getNumGeometries();I++)a.add(v.getGeometryN(I));var R=new Array(a.size()).fill(null);return this.getFactory().createMultiLineString(a.toArray(R))}},{key:"getGeometryType",value:function(){return de.TYPENAME_MULTIPOLYGON}},{key:"interfaces_",get:function(){return[vt]}}],[{key:"constructor_",value:function(){var a=arguments[0],h=arguments[1];Ke.constructor_.call(this,a,h)}}])})(Ke),wr=(function(){return g((function f(){o(this,f)}),[{key:"get",value:function(){}},{key:"put",value:function(){}},{key:"size",value:function(){}},{key:"values",value:function(){}},{key:"entrySet",value:function(){}}])})(),gn=(function(f){function n(){var a;return o(this,n),(a=s(this,n)).map=new Map,a}return E(n,f),g(n,[{key:"get",value:function(a){return this.map.get(a)||null}},{key:"put",value:function(a,h){return this.map.set(a,h),h}},{key:"values",value:function(){for(var a=new De,h=this.map.values(),v=h.next();!v.done;)a.add(v.value),v=h.next();return a}},{key:"entrySet",value:function(){var a=new it;return this.map.entries().forEach((function(h){return a.add(h)})),a}},{key:"size",value:function(){return this.map.size()}}])})(wr),At=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"equals",value:function(n){if(!(n instanceof f))return!1;var a=n;return this._modelType===a._modelType&&this._scale===a._scale}},{key:"compareTo",value:function(n){var a=n,h=this.getMaximumSignificantDigits(),v=a.getMaximumSignificantDigits();return gt.compare(h,v)}},{key:"getScale",value:function(){return this._scale}},{key:"isFloating",value:function(){return this._modelType===f.FLOATING||this._modelType===f.FLOATING_SINGLE}},{key:"getType",value:function(){return this._modelType}},{key:"toString",value:function(){var n="UNKNOWN";return this._modelType===f.FLOATING?n="Floating":this._modelType===f.FLOATING_SINGLE?n="Floating-Single":this._modelType===f.FIXED&&(n="Fixed (Scale="+this.getScale()+")"),n}},{key:"makePrecise",value:function(){if(typeof arguments[0]=="number"){var n=arguments[0];return ce.isNaN(n)||this._modelType===f.FLOATING_SINGLE?n:this._modelType===f.FIXED?Math.round(n*this._scale)/this._scale:n}if(arguments[0]instanceof J){var a=arguments[0];if(this._modelType===f.FLOATING)return null;a.x=this.makePrecise(a.x),a.y=this.makePrecise(a.y)}}},{key:"getMaximumSignificantDigits",value:function(){var n=16;return this._modelType===f.FLOATING?n=16:this._modelType===f.FLOATING_SINGLE?n=6:this._modelType===f.FIXED&&(n=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),n}},{key:"setScale",value:function(n){this._scale=Math.abs(n)}},{key:"interfaces_",get:function(){return[$,X]}}],[{key:"constructor_",value:function(){if(this._modelType=null,this._scale=null,arguments.length===0)this._modelType=f.FLOATING;else if(arguments.length===1){if(arguments[0]instanceof Kt){var n=arguments[0];this._modelType=n,n===f.FIXED&&this.setScale(1)}else if(typeof arguments[0]=="number"){var a=arguments[0];this._modelType=f.FIXED,this.setScale(a)}else if(arguments[0]instanceof f){var h=arguments[0];this._modelType=h._modelType,this._scale=h._scale}}}},{key:"mostPrecise",value:function(n,a){return n.compareTo(a)>=0?n:a}}])})(),Kt=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"readResolve",value:function(){return f.nameToTypeMap.get(this._name)}},{key:"toString",value:function(){return this._name}},{key:"interfaces_",get:function(){return[$]}}],[{key:"constructor_",value:function(){this._name=null;var n=arguments[0];this._name=n,f.nameToTypeMap.put(n,this)}}])})();Kt.nameToTypeMap=new gn,At.Type=Kt,At.FIXED=new Kt("FIXED"),At.FLOATING=new Kt("FLOATING"),At.FLOATING_SINGLE=new Kt("FLOATING SINGLE"),At.maximumPreciseValue=9007199254740992;var vr=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"copyInternal",value:function(){for(var a=new Array(this._geometries.length).fill(null),h=0;h<a.length;h++)a[h]=this._geometries[h].copy();return new n(a,this._factory)}},{key:"equalsExact",value:function(){if(arguments.length===2&&typeof arguments[1]=="number"&&arguments[0]instanceof de){var a=arguments[0],h=arguments[1];return!!this.isEquivalentClass(a)&&A(n,"equalsExact",this,1).call(this,a,h)}return A(n,"equalsExact",this,1).apply(this,arguments)}},{key:"getBoundaryDimension",value:function(){return this.isClosed()?H.FALSE:0}},{key:"isClosed",value:function(){if(this.isEmpty())return!1;for(var a=0;a<this._geometries.length;a++)if(!this._geometries[a].isClosed())return!1;return!0}},{key:"getTypeCode",value:function(){return de.TYPECODE_MULTILINESTRING}},{key:"getDimension",value:function(){return 1}},{key:"getBoundary",value:function(){throw new je}},{key:"getGeometryType",value:function(){return de.TYPENAME_MULTILINESTRING}},{key:"interfaces_",get:function(){return[F]}}],[{key:"constructor_",value:function(){var a=arguments[0],h=arguments[1];Ke.constructor_.call(this,a,h)}}])})(Ke),Qt=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"createEmpty",value:function(n){switch(n){case-1:return this.createGeometryCollection();case 0:return this.createPoint();case 1:return this.createLineString();case 2:return this.createPolygon();default:throw new V("Invalid dimension: "+n)}}},{key:"toGeometry",value:function(n){return n.isNull()?this.createPoint():n.getMinX()===n.getMaxX()&&n.getMinY()===n.getMaxY()?this.createPoint(new J(n.getMinX(),n.getMinY())):n.getMinX()===n.getMaxX()||n.getMinY()===n.getMaxY()?this.createLineString([new J(n.getMinX(),n.getMinY()),new J(n.getMaxX(),n.getMaxY())]):this.createPolygon(this.createLinearRing([new J(n.getMinX(),n.getMinY()),new J(n.getMinX(),n.getMaxY()),new J(n.getMaxX(),n.getMaxY()),new J(n.getMaxX(),n.getMinY()),new J(n.getMinX(),n.getMinY())]),null)}},{key:"createLineString",value:function(){if(arguments.length===0)return this.createLineString(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof Array){var n=arguments[0];return this.createLineString(n!==null?this.getCoordinateSequenceFactory().create(n):null)}if(Le(arguments[0],Me))return new Ie(arguments[0],this)}}},{key:"createMultiLineString",value:function(){return arguments.length===0?new vr(null,this):arguments.length===1?new vr(arguments[0],this):void 0}},{key:"buildGeometry",value:function(n){for(var a=null,h=!1,v=!1,I=n.iterator();I.hasNext();){var R=I.next(),T=R.getTypeCode();a===null&&(a=T),T!==a&&(h=!0),R instanceof Ke&&(v=!0)}if(a===null)return this.createGeometryCollection();if(h||v)return this.createGeometryCollection(f.toGeometryArray(n));var O=n.iterator().next();if(n.size()>1){if(O instanceof Pt)return this.createMultiPolygon(f.toPolygonArray(n));if(O instanceof Ie)return this.createMultiLineString(f.toLineStringArray(n));if(O instanceof He)return this.createMultiPoint(f.toPointArray(n));pe.shouldNeverReachHere("Unhandled geometry type: "+O.getGeometryType())}return O}},{key:"createMultiPointFromCoords",value:function(n){return this.createMultiPoint(n!==null?this.getCoordinateSequenceFactory().create(n):null)}},{key:"createPoint",value:function(){if(arguments.length===0)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof J){var n=arguments[0];return this.createPoint(n!==null?this.getCoordinateSequenceFactory().create([n]):null)}if(Le(arguments[0],Me))return new He(arguments[0],this)}}},{key:"getCoordinateSequenceFactory",value:function(){return this._coordinateSequenceFactory}},{key:"createPolygon",value:function(){if(arguments.length===0)return this.createPolygon(null,null);if(arguments.length===1){if(Le(arguments[0],Me)){var n=arguments[0];return this.createPolygon(this.createLinearRing(n))}if(arguments[0]instanceof Array){var a=arguments[0];return this.createPolygon(this.createLinearRing(a))}if(arguments[0]instanceof ht){var h=arguments[0];return this.createPolygon(h,null)}}else if(arguments.length===2)return new Pt(arguments[0],arguments[1],this)}},{key:"getSRID",value:function(){return this._SRID}},{key:"createGeometryCollection",value:function(){return arguments.length===0?new Ke(null,this):arguments.length===1?new Ke(arguments[0],this):void 0}},{key:"getPrecisionModel",value:function(){return this._precisionModel}},{key:"createLinearRing",value:function(){if(arguments.length===0)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof Array){var n=arguments[0];return this.createLinearRing(n!==null?this.getCoordinateSequenceFactory().create(n):null)}if(Le(arguments[0],Me))return new ht(arguments[0],this)}}},{key:"createMultiPolygon",value:function(){return arguments.length===0?new yr(null,this):arguments.length===1?new yr(arguments[0],this):void 0}},{key:"createMultiPoint",value:function(){if(arguments.length===0)return new St(null,this);if(arguments.length===1){if(arguments[0]instanceof Array)return new St(arguments[0],this);if(Le(arguments[0],Me)){var n=arguments[0];if(n===null)return this.createMultiPoint(new Array(0).fill(null));for(var a=new Array(n.size()).fill(null),h=0;h<n.size();h++){var v=this.getCoordinateSequenceFactory().create(1,n.getDimension(),n.getMeasures());U.copy(n,h,v,0,1),a[h]=this.createPoint(v)}return this.createMultiPoint(a)}}}},{key:"interfaces_",get:function(){return[$]}}],[{key:"constructor_",value:function(){if(this._precisionModel=null,this._coordinateSequenceFactory=null,this._SRID=null,arguments.length===0)f.constructor_.call(this,new At,0);else if(arguments.length===1){if(Le(arguments[0],cr)){var n=arguments[0];f.constructor_.call(this,new At,0,n)}else if(arguments[0]instanceof At){var a=arguments[0];f.constructor_.call(this,a,0,f.getDefaultCoordinateSequenceFactory())}}else if(arguments.length===2){var h=arguments[0],v=arguments[1];f.constructor_.call(this,h,v,f.getDefaultCoordinateSequenceFactory())}else if(arguments.length===3){var I=arguments[0],R=arguments[1],T=arguments[2];this._precisionModel=I,this._coordinateSequenceFactory=T,this._SRID=R}}},{key:"toMultiPolygonArray",value:function(n){var a=new Array(n.size()).fill(null);return n.toArray(a)}},{key:"toGeometryArray",value:function(n){if(n===null)return null;var a=new Array(n.size()).fill(null);return n.toArray(a)}},{key:"getDefaultCoordinateSequenceFactory",value:function(){return Jt.instance()}},{key:"toMultiLineStringArray",value:function(n){var a=new Array(n.size()).fill(null);return n.toArray(a)}},{key:"toLineStringArray",value:function(n){var a=new Array(n.size()).fill(null);return n.toArray(a)}},{key:"toMultiPointArray",value:function(n){var a=new Array(n.size()).fill(null);return n.toArray(a)}},{key:"toLinearRingArray",value:function(n){var a=new Array(n.size()).fill(null);return n.toArray(a)}},{key:"toPointArray",value:function(n){var a=new Array(n.size()).fill(null);return n.toArray(a)}},{key:"toPolygonArray",value:function(n){var a=new Array(n.size()).fill(null);return n.toArray(a)}},{key:"createPointFromInternalCoord",value:function(n,a){return a.getPrecisionModel().makePrecise(n),a.getFactory().createPoint(n)}}])})(),br="XY",yn="XYZ",vn="XYM",bn="XYZM",kr={POINT:"Point",LINE_STRING:"LineString",LINEAR_RING:"LinearRing",POLYGON:"Polygon",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon",GEOMETRY_COLLECTION:"GeometryCollection",CIRCLE:"Circle"},Nr="EMPTY",fr=1,Mt=2,Vt=3,Lr=4,er=5,_n=6;for(var xn in kr)kr[xn].toUpperCase();var En=(function(){return g((function f(n){o(this,f),this.wkt=n,this.index_=-1}),[{key:"isAlpha_",value:function(f){return f>="a"&&f<="z"||f>="A"&&f<="Z"}},{key:"isNumeric_",value:function(f,n){return f>="0"&&f<="9"||f=="."&&!(n!==void 0&&n)}},{key:"isWhiteSpace_",value:function(f){return f==" "||f==" "||f=="\r"||f==`
6
- `}},{key:"nextChar_",value:function(){return this.wkt.charAt(++this.index_)}},{key:"nextToken",value:function(){var f,n=this.nextChar_(),a=this.index_,h=n;if(n=="(")f=Mt;else if(n==",")f=er;else if(n==")")f=Vt;else if(this.isNumeric_(n)||n=="-")f=Lr,h=this.readNumber_();else if(this.isAlpha_(n))f=fr,h=this.readText_();else{if(this.isWhiteSpace_(n))return this.nextToken();if(n!=="")throw new Error("Unexpected character: "+n);f=_n}return{position:a,value:h,type:f}}},{key:"readNumber_",value:function(){var f,n=this.index_,a=!1,h=!1;do f=="."?a=!0:f!="e"&&f!="E"||(h=!0),f=this.nextChar_();while(this.isNumeric_(f,a)||!h&&(f=="e"||f=="E")||h&&(f=="-"||f=="+"));return parseFloat(this.wkt.substring(n,this.index_--))}},{key:"readText_",value:function(){var f,n=this.index_;do f=this.nextChar_();while(this.isAlpha_(f));return this.wkt.substring(n,this.index_--).toUpperCase()}}])})(),In=(function(){return g((function f(n,a){o(this,f),this.lexer_=n,this.token_,this.layout_=br,this.factory=a}),[{key:"consume_",value:function(){this.token_=this.lexer_.nextToken()}},{key:"isTokenType",value:function(f){return this.token_.type==f}},{key:"match",value:function(f){var n=this.isTokenType(f);return n&&this.consume_(),n}},{key:"parse",value:function(){return this.consume_(),this.parseGeometry_()}},{key:"parseGeometryLayout_",value:function(){var f=br,n=this.token_;if(this.isTokenType(fr)){var a=n.value;a==="Z"?f=yn:a==="M"?f=vn:a==="ZM"&&(f=bn),f!==br&&this.consume_()}return f}},{key:"parseGeometryCollectionText_",value:function(){if(this.match(Mt)){var f=[];do f.push(this.parseGeometry_());while(this.match(er));if(this.match(Vt))return f}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}},{key:"parsePointText_",value:function(){if(this.match(Mt)){var f=this.parsePoint_();if(this.match(Vt))return f}else if(this.isEmptyGeometry_())return null;throw new Error(this.formatErrorMessage_())}},{key:"parseLineStringText_",value:function(){if(this.match(Mt)){var f=this.parsePointList_();if(this.match(Vt))return f}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}},{key:"parsePolygonText_",value:function(){if(this.match(Mt)){var f=this.parseLineStringTextList_();if(this.match(Vt))return f}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}},{key:"parseMultiPointText_",value:function(){var f;if(this.match(Mt)){if(f=this.token_.type==Mt?this.parsePointTextList_():this.parsePointList_(),this.match(Vt))return f}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}},{key:"parseMultiLineStringText_",value:function(){if(this.match(Mt)){var f=this.parseLineStringTextList_();if(this.match(Vt))return f}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}},{key:"parseMultiPolygonText_",value:function(){if(this.match(Mt)){var f=this.parsePolygonTextList_();if(this.match(Vt))return f}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}},{key:"parsePoint_",value:function(){for(var f=[],n=this.layout_.length,a=0;a<n;++a){var h=this.token_;if(!this.match(Lr))break;f.push(h.value)}if(f.length==n)return f;throw new Error(this.formatErrorMessage_())}},{key:"parsePointList_",value:function(){for(var f=[this.parsePoint_()];this.match(er);)f.push(this.parsePoint_());return f}},{key:"parsePointTextList_",value:function(){for(var f=[this.parsePointText_()];this.match(er);)f.push(this.parsePointText_());return f}},{key:"parseLineStringTextList_",value:function(){for(var f=[this.parseLineStringText_()];this.match(er);)f.push(this.parseLineStringText_());return f}},{key:"parsePolygonTextList_",value:function(){for(var f=[this.parsePolygonText_()];this.match(er);)f.push(this.parsePolygonText_());return f}},{key:"isEmptyGeometry_",value:function(){var f=this.isTokenType(fr)&&this.token_.value==Nr;return f&&this.consume_(),f}},{key:"formatErrorMessage_",value:function(){return"Unexpected `"+this.token_.value+"` at position "+this.token_.position+" in `"+this.lexer_.wkt+"`"}},{key:"parseGeometry_",value:function(){var f=this.factory,n=function(Ne){return d(J,N(Ne))},a=function(Ne){var Ge=Ne.map((function(Be){return f.createLinearRing(Be.map(n))}));return Ge.length>1?f.createPolygon(Ge[0],Ge.slice(1)):f.createPolygon(Ge[0])},h=this.token_;if(this.match(fr)){var v=h.value;if(this.layout_=this.parseGeometryLayout_(),v=="GEOMETRYCOLLECTION"){var I=this.parseGeometryCollectionText_();return f.createGeometryCollection(I)}switch(v){case"POINT":var R=this.parsePointText_();return R?f.createPoint(d(J,N(R))):f.createPoint();case"LINESTRING":var T=this.parseLineStringText_().map(n);return f.createLineString(T);case"LINEARRING":var O=this.parseLineStringText_().map(n);return f.createLinearRing(O);case"POLYGON":var W=this.parsePolygonText_();return W&&W.length!==0?a(W):f.createPolygon();case"MULTIPOINT":var re=this.parseMultiPointText_();if(!re||re.length===0)return f.createMultiPoint();var ne=re.map(n).map((function(Ne){return f.createPoint(Ne)}));return f.createMultiPoint(ne);case"MULTILINESTRING":var oe=this.parseMultiLineStringText_().map((function(Ne){return f.createLineString(Ne.map(n))}));return f.createMultiLineString(oe);case"MULTIPOLYGON":var _e=this.parseMultiPolygonText_();if(!_e||_e.length===0)return f.createMultiPolygon();var Se=_e.map(a);return f.createMultiPolygon(Se);default:throw new Error("Invalid geometry type: "+v)}}throw new Error(this.formatErrorMessage_())}}])})();function Or(f){if(f.isEmpty())return"";var n=f.getCoordinate(),a=[n.x,n.y];return n.z===void 0||Number.isNaN(n.z)||a.push(n.z),n.m===void 0||Number.isNaN(n.m)||a.push(n.m),a.join(" ")}function ar(f){for(var n=f.getCoordinates().map((function(I){var R=[I.x,I.y];return I.z===void 0||Number.isNaN(I.z)||R.push(I.z),I.m===void 0||Number.isNaN(I.m)||R.push(I.m),R})),a=[],h=0,v=n.length;h<v;++h)a.push(n[h].join(" "));return a.join(", ")}function Pr(f){var n=[];n.push("("+ar(f.getExteriorRing())+")");for(var a=0,h=f.getNumInteriorRing();a<h;++a)n.push("("+ar(f.getInteriorRingN(a))+")");return n.join(", ")}var Cn={Point:Or,LineString:ar,LinearRing:ar,Polygon:Pr,MultiPoint:function(f){for(var n=[],a=0,h=f.getNumGeometries();a<h;++a)n.push("("+Or(f.getGeometryN(a))+")");return n.join(", ")},MultiLineString:function(f){for(var n=[],a=0,h=f.getNumGeometries();a<h;++a)n.push("("+ar(f.getGeometryN(a))+")");return n.join(", ")},MultiPolygon:function(f){for(var n=[],a=0,h=f.getNumGeometries();a<h;++a)n.push("("+Pr(f.getGeometryN(a))+")");return n.join(", ")},GeometryCollection:function(f){for(var n=[],a=0,h=f.getNumGeometries();a<h;++a)n.push(Fr(f.getGeometryN(a)));return n.join(", ")}};function Fr(f){var n=f.getGeometryType(),a=Cn[n];n=n.toUpperCase();var h=(function(v){var I="";if(v.isEmpty())return I;var R=v.getCoordinate();return R.z===void 0||Number.isNaN(R.z)||(I+="Z"),R.m===void 0||Number.isNaN(R.m)||(I+="M"),I})(f);return h.length>0&&(n+=" "+h),f.isEmpty()?n+" "+Nr:n+" ("+a(f)+")"}var Sn=(function(){return g((function f(n){o(this,f),this.geometryFactory=n||new Qt,this.precisionModel=this.geometryFactory.getPrecisionModel()}),[{key:"read",value:function(f){var n=new En(f);return new In(n,this.geometryFactory).parse()}},{key:"write",value:function(f){return Fr(f)}}])})(),_r=(function(){return g((function f(n){o(this,f),this.parser=new Sn(n)}),[{key:"write",value:function(f){return this.parser.write(f)}}],[{key:"toLineString",value:function(f,n){if(arguments.length!==2)throw new Error("Not implemented");return"LINESTRING ( "+f.x+" "+f.y+", "+n.x+" "+n.y+" )"}}])})(),Ze=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"getIndexAlongSegment",value:function(n,a){return this.computeIntLineIndex(),this._intLineIndex[n][a]}},{key:"getTopologySummary",value:function(){var n=new $t;return this.isEndPoint()&&n.append(" endpoint"),this._isProper&&n.append(" proper"),this.isCollinear()&&n.append(" collinear"),n.toString()}},{key:"computeIntersection",value:function(n,a,h,v){this._inputLines[0][0]=n,this._inputLines[0][1]=a,this._inputLines[1][0]=h,this._inputLines[1][1]=v,this._result=this.computeIntersect(n,a,h,v)}},{key:"getIntersectionNum",value:function(){return this._result}},{key:"computeIntLineIndex",value:function(){if(arguments.length===0)this._intLineIndex===null&&(this._intLineIndex=Array(2).fill().map((function(){return Array(2)})),this.computeIntLineIndex(0),this.computeIntLineIndex(1));else if(arguments.length===1){var n=arguments[0];this.getEdgeDistance(n,0)>this.getEdgeDistance(n,1)?(this._intLineIndex[n][0]=0,this._intLineIndex[n][1]=1):(this._intLineIndex[n][0]=1,this._intLineIndex[n][1]=0)}}},{key:"isProper",value:function(){return this.hasIntersection()&&this._isProper}},{key:"setPrecisionModel",value:function(n){this._precisionModel=n}},{key:"isInteriorIntersection",value:function(){if(arguments.length===0)return!!this.isInteriorIntersection(0)||!!this.isInteriorIntersection(1);if(arguments.length===1){for(var n=arguments[0],a=0;a<this._result;a++)if(!this._intPt[a].equals2D(this._inputLines[n][0])&&!this._intPt[a].equals2D(this._inputLines[n][1]))return!0;return!1}}},{key:"getIntersection",value:function(n){return this._intPt[n]}},{key:"isEndPoint",value:function(){return this.hasIntersection()&&!this._isProper}},{key:"hasIntersection",value:function(){return this._result!==f.NO_INTERSECTION}},{key:"getEdgeDistance",value:function(n,a){return f.computeEdgeDistance(this._intPt[a],this._inputLines[n][0],this._inputLines[n][1])}},{key:"isCollinear",value:function(){return this._result===f.COLLINEAR_INTERSECTION}},{key:"toString",value:function(){return _r.toLineString(this._inputLines[0][0],this._inputLines[0][1])+" - "+_r.toLineString(this._inputLines[1][0],this._inputLines[1][1])+this.getTopologySummary()}},{key:"getEndpoint",value:function(n,a){return this._inputLines[n][a]}},{key:"isIntersection",value:function(n){for(var a=0;a<this._result;a++)if(this._intPt[a].equals2D(n))return!0;return!1}},{key:"getIntersectionAlongSegment",value:function(n,a){return this.computeIntLineIndex(),this._intPt[this._intLineIndex[n][a]]}}],[{key:"constructor_",value:function(){this._result=null,this._inputLines=Array(2).fill().map((function(){return Array(2)})),this._intPt=new Array(2).fill(null),this._intLineIndex=null,this._isProper=null,this._pa=null,this._pb=null,this._precisionModel=null,this._intPt[0]=new J,this._intPt[1]=new J,this._pa=this._intPt[0],this._pb=this._intPt[1],this._result=0}},{key:"computeEdgeDistance",value:function(n,a,h){var v=Math.abs(h.x-a.x),I=Math.abs(h.y-a.y),R=-1;if(n.equals(a))R=0;else if(n.equals(h))R=v>I?v:I;else{var T=Math.abs(n.x-a.x),O=Math.abs(n.y-a.y);(R=v>I?T:O)!==0||n.equals(a)||(R=Math.max(T,O))}return pe.isTrue(!(R===0&&!n.equals(a)),"Bad distance calculation"),R}},{key:"nonRobustComputeEdgeDistance",value:function(n,a,h){var v=n.x-a.x,I=n.y-a.y,R=Math.sqrt(v*v+I*I);return pe.isTrue(!(R===0&&!n.equals(a)),"Invalid distance calculation"),R}}])})();Ze.DONT_INTERSECT=0,Ze.DO_INTERSECT=1,Ze.COLLINEAR=2,Ze.NO_INTERSECTION=0,Ze.POINT_INTERSECTION=1,Ze.COLLINEAR_INTERSECTION=2;var Wt=(function(f){function n(){return o(this,n),s(this,n)}return E(n,f),g(n,[{key:"isInSegmentEnvelopes",value:function(a){var h=new ye(this._inputLines[0][0],this._inputLines[0][1]),v=new ye(this._inputLines[1][0],this._inputLines[1][1]);return h.contains(a)&&v.contains(a)}},{key:"computeIntersection",value:function(){if(arguments.length!==3)return A(n,"computeIntersection",this,1).apply(this,arguments);var a=arguments[0],h=arguments[1],v=arguments[2];if(this._isProper=!1,ye.intersects(h,v,a)&&ke.index(h,v,a)===0&&ke.index(v,h,a)===0)return this._isProper=!0,(a.equals(h)||a.equals(v))&&(this._isProper=!1),this._result=Ze.POINT_INTERSECTION,null;this._result=Ze.NO_INTERSECTION}},{key:"intersection",value:function(a,h,v,I){var R=this.intersectionSafe(a,h,v,I);return this.isInSegmentEnvelopes(R)||(R=new J(n.nearestEndpoint(a,h,v,I))),this._precisionModel!==null&&this._precisionModel.makePrecise(R),R}},{key:"checkDD",value:function(a,h,v,I,R){var T=Lt.intersection(a,h,v,I),O=this.isInSegmentEnvelopes(T);Je.out.println("DD in env = "+O+" --------------------- "+T),R.distance(T)>1e-4&&Je.out.println("Distance = "+R.distance(T))}},{key:"intersectionSafe",value:function(a,h,v,I){var R=Ot.intersection(a,h,v,I);return R===null&&(R=n.nearestEndpoint(a,h,v,I)),R}},{key:"computeCollinearIntersection",value:function(a,h,v,I){var R=ye.intersects(a,h,v),T=ye.intersects(a,h,I),O=ye.intersects(v,I,a),W=ye.intersects(v,I,h);return R&&T?(this._intPt[0]=v,this._intPt[1]=I,Ze.COLLINEAR_INTERSECTION):O&&W?(this._intPt[0]=a,this._intPt[1]=h,Ze.COLLINEAR_INTERSECTION):R&&O?(this._intPt[0]=v,this._intPt[1]=a,!v.equals(a)||T||W?Ze.COLLINEAR_INTERSECTION:Ze.POINT_INTERSECTION):R&&W?(this._intPt[0]=v,this._intPt[1]=h,!v.equals(h)||T||O?Ze.COLLINEAR_INTERSECTION:Ze.POINT_INTERSECTION):T&&O?(this._intPt[0]=I,this._intPt[1]=a,!I.equals(a)||R||W?Ze.COLLINEAR_INTERSECTION:Ze.POINT_INTERSECTION):T&&W?(this._intPt[0]=I,this._intPt[1]=h,!I.equals(h)||R||O?Ze.COLLINEAR_INTERSECTION:Ze.POINT_INTERSECTION):Ze.NO_INTERSECTION}},{key:"computeIntersect",value:function(a,h,v,I){if(this._isProper=!1,!ye.intersects(a,h,v,I))return Ze.NO_INTERSECTION;var R=ke.index(a,h,v),T=ke.index(a,h,I);if(R>0&&T>0||R<0&&T<0)return Ze.NO_INTERSECTION;var O=ke.index(v,I,a),W=ke.index(v,I,h);return O>0&&W>0||O<0&&W<0?Ze.NO_INTERSECTION:R===0&&T===0&&O===0&&W===0?this.computeCollinearIntersection(a,h,v,I):(R===0||T===0||O===0||W===0?(this._isProper=!1,a.equals2D(v)||a.equals2D(I)?this._intPt[0]=a:h.equals2D(v)||h.equals2D(I)?this._intPt[0]=h:R===0?this._intPt[0]=new J(v):T===0?this._intPt[0]=new J(I):O===0?this._intPt[0]=new J(a):W===0&&(this._intPt[0]=new J(h))):(this._isProper=!0,this._intPt[0]=this.intersection(a,h,v,I)),Ze.POINT_INTERSECTION)}}],[{key:"nearestEndpoint",value:function(a,h,v,I){var R=a,T=Qe.pointToSegment(a,v,I),O=Qe.pointToSegment(h,v,I);return O<T&&(T=O,R=h),(O=Qe.pointToSegment(v,a,h))<T&&(T=O,R=v),(O=Qe.pointToSegment(I,a,h))<T&&(T=O,R=I),R}}])})(Ze),Rn=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"countSegment",value:function(n,a){if(n.x<this._p.x&&a.x<this._p.x)return null;if(this._p.x===a.x&&this._p.y===a.y)return this._isPointOnSegment=!0,null;if(n.y===this._p.y&&a.y===this._p.y){var h=n.x,v=a.x;return h>v&&(h=a.x,v=n.x),this._p.x>=h&&this._p.x<=v&&(this._isPointOnSegment=!0),null}if(n.y>this._p.y&&a.y<=this._p.y||a.y>this._p.y&&n.y<=this._p.y){var I=ke.index(n,a,this._p);if(I===ke.COLLINEAR)return this._isPointOnSegment=!0,null;a.y<n.y&&(I=-I),I===ke.LEFT&&this._crossingCount++}}},{key:"isPointInPolygon",value:function(){return this.getLocation()!==q.EXTERIOR}},{key:"getLocation",value:function(){return this._isPointOnSegment?q.BOUNDARY:this._crossingCount%2==1?q.INTERIOR:q.EXTERIOR}},{key:"isOnSegment",value:function(){return this._isPointOnSegment}}],[{key:"constructor_",value:function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var n=arguments[0];this._p=n}},{key:"locatePointInRing",value:function(){if(arguments[0]instanceof J&&Le(arguments[1],Me)){for(var n=arguments[1],a=new f(arguments[0]),h=new J,v=new J,I=1;I<n.size();I++)if(n.getCoordinate(I,h),n.getCoordinate(I-1,v),a.countSegment(h,v),a.isOnSegment())return a.getLocation();return a.getLocation()}if(arguments[0]instanceof J&&arguments[1]instanceof Array){for(var R=arguments[1],T=new f(arguments[0]),O=1;O<R.length;O++){var W=R[O],re=R[O-1];if(T.countSegment(W,re),T.isOnSegment())return T.getLocation()}return T.getLocation()}}}])})(),xr=(function(){function f(){o(this,f)}return g(f,null,[{key:"isOnLine",value:function(){if(arguments[0]instanceof J&&Le(arguments[1],Me)){for(var n=arguments[0],a=arguments[1],h=new Wt,v=new J,I=new J,R=a.size(),T=1;T<R;T++)if(a.getCoordinate(T-1,v),a.getCoordinate(T,I),h.computeIntersection(n,v,I),h.hasIntersection())return!0;return!1}if(arguments[0]instanceof J&&arguments[1]instanceof Array){for(var O=arguments[0],W=arguments[1],re=new Wt,ne=1;ne<W.length;ne++){var oe=W[ne-1],_e=W[ne];if(re.computeIntersection(O,oe,_e),re.hasIntersection())return!0}return!1}}},{key:"locateInRing",value:function(n,a){return Rn.locatePointInRing(n,a)}},{key:"isInRing",value:function(n,a){return f.locateInRing(n,a)!==q.EXTERIOR}}])})(),_t=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"setAllLocations",value:function(n){for(var a=0;a<this.location.length;a++)this.location[a]=n}},{key:"isNull",value:function(){for(var n=0;n<this.location.length;n++)if(this.location[n]!==q.NONE)return!1;return!0}},{key:"setAllLocationsIfNull",value:function(n){for(var a=0;a<this.location.length;a++)this.location[a]===q.NONE&&(this.location[a]=n)}},{key:"isLine",value:function(){return this.location.length===1}},{key:"merge",value:function(n){if(n.location.length>this.location.length){var a=new Array(3).fill(null);a[he.ON]=this.location[he.ON],a[he.LEFT]=q.NONE,a[he.RIGHT]=q.NONE,this.location=a}for(var h=0;h<this.location.length;h++)this.location[h]===q.NONE&&h<n.location.length&&(this.location[h]=n.location[h])}},{key:"getLocations",value:function(){return this.location}},{key:"flip",value:function(){if(this.location.length<=1)return null;var n=this.location[he.LEFT];this.location[he.LEFT]=this.location[he.RIGHT],this.location[he.RIGHT]=n}},{key:"toString",value:function(){var n=new tt;return this.location.length>1&&n.append(q.toLocationSymbol(this.location[he.LEFT])),n.append(q.toLocationSymbol(this.location[he.ON])),this.location.length>1&&n.append(q.toLocationSymbol(this.location[he.RIGHT])),n.toString()}},{key:"setLocations",value:function(n,a,h){this.location[he.ON]=n,this.location[he.LEFT]=a,this.location[he.RIGHT]=h}},{key:"get",value:function(n){return n<this.location.length?this.location[n]:q.NONE}},{key:"isArea",value:function(){return this.location.length>1}},{key:"isAnyNull",value:function(){for(var n=0;n<this.location.length;n++)if(this.location[n]===q.NONE)return!0;return!1}},{key:"setLocation",value:function(){if(arguments.length===1){var n=arguments[0];this.setLocation(he.ON,n)}else if(arguments.length===2){var a=arguments[0],h=arguments[1];this.location[a]=h}}},{key:"init",value:function(n){this.location=new Array(n).fill(null),this.setAllLocations(q.NONE)}},{key:"isEqualOnSide",value:function(n,a){return this.location[a]===n.location[a]}},{key:"allPositionsEqual",value:function(n){for(var a=0;a<this.location.length;a++)if(this.location[a]!==n)return!1;return!0}}],[{key:"constructor_",value:function(){if(this.location=null,arguments.length===1){if(arguments[0]instanceof Array){var n=arguments[0];this.init(n.length)}else if(Number.isInteger(arguments[0])){var a=arguments[0];this.init(1),this.location[he.ON]=a}else if(arguments[0]instanceof f){var h=arguments[0];if(this.init(h.location.length),h!==null)for(var v=0;v<this.location.length;v++)this.location[v]=h.location[v]}}else if(arguments.length===3){var I=arguments[0],R=arguments[1],T=arguments[2];this.init(3),this.location[he.ON]=I,this.location[he.LEFT]=R,this.location[he.RIGHT]=T}}}])})(),xt=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"getGeometryCount",value:function(){var n=0;return this.elt[0].isNull()||n++,this.elt[1].isNull()||n++,n}},{key:"setAllLocations",value:function(n,a){this.elt[n].setAllLocations(a)}},{key:"isNull",value:function(n){return this.elt[n].isNull()}},{key:"setAllLocationsIfNull",value:function(){if(arguments.length===1){var n=arguments[0];this.setAllLocationsIfNull(0,n),this.setAllLocationsIfNull(1,n)}else if(arguments.length===2){var a=arguments[0],h=arguments[1];this.elt[a].setAllLocationsIfNull(h)}}},{key:"isLine",value:function(n){return this.elt[n].isLine()}},{key:"merge",value:function(n){for(var a=0;a<2;a++)this.elt[a]===null&&n.elt[a]!==null?this.elt[a]=new _t(n.elt[a]):this.elt[a].merge(n.elt[a])}},{key:"flip",value:function(){this.elt[0].flip(),this.elt[1].flip()}},{key:"getLocation",value:function(){if(arguments.length===1){var n=arguments[0];return this.elt[n].get(he.ON)}if(arguments.length===2){var a=arguments[0],h=arguments[1];return this.elt[a].get(h)}}},{key:"toString",value:function(){var n=new tt;return this.elt[0]!==null&&(n.append("A:"),n.append(this.elt[0].toString())),this.elt[1]!==null&&(n.append(" B:"),n.append(this.elt[1].toString())),n.toString()}},{key:"isArea",value:function(){if(arguments.length===0)return this.elt[0].isArea()||this.elt[1].isArea();if(arguments.length===1){var n=arguments[0];return this.elt[n].isArea()}}},{key:"isAnyNull",value:function(n){return this.elt[n].isAnyNull()}},{key:"setLocation",value:function(){if(arguments.length===2){var n=arguments[0],a=arguments[1];this.elt[n].setLocation(he.ON,a)}else if(arguments.length===3){var h=arguments[0],v=arguments[1],I=arguments[2];this.elt[h].setLocation(v,I)}}},{key:"isEqualOnSide",value:function(n,a){return this.elt[0].isEqualOnSide(n.elt[0],a)&&this.elt[1].isEqualOnSide(n.elt[1],a)}},{key:"allPositionsEqual",value:function(n,a){return this.elt[n].allPositionsEqual(a)}},{key:"toLine",value:function(n){this.elt[n].isArea()&&(this.elt[n]=new _t(this.elt[n].location[0]))}}],[{key:"constructor_",value:function(){if(this.elt=new Array(2).fill(null),arguments.length===1){if(Number.isInteger(arguments[0])){var n=arguments[0];this.elt[0]=new _t(n),this.elt[1]=new _t(n)}else if(arguments[0]instanceof f){var a=arguments[0];this.elt[0]=new _t(a.elt[0]),this.elt[1]=new _t(a.elt[1])}}else if(arguments.length===2){var h=arguments[0],v=arguments[1];this.elt[0]=new _t(q.NONE),this.elt[1]=new _t(q.NONE),this.elt[h].setLocation(v)}else if(arguments.length===3){var I=arguments[0],R=arguments[1],T=arguments[2];this.elt[0]=new _t(I,R,T),this.elt[1]=new _t(I,R,T)}else if(arguments.length===4){var O=arguments[0],W=arguments[1],re=arguments[2],ne=arguments[3];this.elt[0]=new _t(q.NONE,q.NONE,q.NONE),this.elt[1]=new _t(q.NONE,q.NONE,q.NONE),this.elt[O].setLocations(W,re,ne)}}},{key:"toLineLabel",value:function(n){for(var a=new f(q.NONE),h=0;h<2;h++)a.setLocation(h,n.getLocation(h));return a}}])})(),pr=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"computeRing",value:function(){if(this._ring!==null)return null;for(var f=new Array(this._pts.size()).fill(null),n=0;n<this._pts.size();n++)f[n]=this._pts.get(n);this._ring=this._geometryFactory.createLinearRing(f),this._isHole=ke.isCCW(this._ring.getCoordinates())}},{key:"isIsolated",value:function(){return this._label.getGeometryCount()===1}},{key:"computePoints",value:function(f){this._startDe=f;var n=f,a=!0;do{if(n===null)throw new at("Found null DirectedEdge");if(n.getEdgeRing()===this)throw new at("Directed Edge visited twice during ring-building at "+n.getCoordinate());this._edges.add(n);var h=n.getLabel();pe.isTrue(h.isArea()),this.mergeLabel(h),this.addPoints(n.getEdge(),n.isForward(),a),a=!1,this.setEdgeRing(n,this),n=this.getNext(n)}while(n!==this._startDe)}},{key:"getLinearRing",value:function(){return this._ring}},{key:"getCoordinate",value:function(f){return this._pts.get(f)}},{key:"computeMaxNodeDegree",value:function(){this._maxNodeDegree=0;var f=this._startDe;do{var n=f.getNode().getEdges().getOutgoingDegree(this);n>this._maxNodeDegree&&(this._maxNodeDegree=n),f=this.getNext(f)}while(f!==this._startDe);this._maxNodeDegree*=2}},{key:"addPoints",value:function(f,n,a){var h=f.getCoordinates();if(n){var v=1;a&&(v=0);for(var I=v;I<h.length;I++)this._pts.add(h[I])}else{var R=h.length-2;a&&(R=h.length-1);for(var T=R;T>=0;T--)this._pts.add(h[T])}}},{key:"isHole",value:function(){return this._isHole}},{key:"setInResult",value:function(){var f=this._startDe;do f.getEdge().setInResult(!0),f=f.getNext();while(f!==this._startDe)}},{key:"containsPoint",value:function(f){var n=this.getLinearRing();if(!n.getEnvelopeInternal().contains(f)||!xr.isInRing(f,n.getCoordinates()))return!1;for(var a=this._holes.iterator();a.hasNext();)if(a.next().containsPoint(f))return!1;return!0}},{key:"addHole",value:function(f){this._holes.add(f)}},{key:"isShell",value:function(){return this._shell===null}},{key:"getLabel",value:function(){return this._label}},{key:"getEdges",value:function(){return this._edges}},{key:"getMaxNodeDegree",value:function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree}},{key:"getShell",value:function(){return this._shell}},{key:"mergeLabel",value:function(){if(arguments.length===1){var f=arguments[0];this.mergeLabel(f,0),this.mergeLabel(f,1)}else if(arguments.length===2){var n=arguments[1],a=arguments[0].getLocation(n,he.RIGHT);if(a===q.NONE)return null;if(this._label.getLocation(n)===q.NONE)return this._label.setLocation(n,a),null}}},{key:"setShell",value:function(f){this._shell=f,f!==null&&f.addHole(this)}},{key:"toPolygon",value:function(f){for(var n=new Array(this._holes.size()).fill(null),a=0;a<this._holes.size();a++)n[a]=this._holes.get(a).getLinearRing();return f.createPolygon(this.getLinearRing(),n)}}],[{key:"constructor_",value:function(){if(this._startDe=null,this._maxNodeDegree=-1,this._edges=new De,this._pts=new De,this._label=new xt(q.NONE),this._ring=null,this._isHole=null,this._shell=null,this._holes=new De,this._geometryFactory=null,arguments.length!==0){if(arguments.length===2){var f=arguments[0],n=arguments[1];this._geometryFactory=n,this.computePoints(f),this.computeRing()}}}}])})(),An=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"setEdgeRing",value:function(a,h){a.setMinEdgeRing(h)}},{key:"getNext",value:function(a){return a.getNextMin()}}],[{key:"constructor_",value:function(){var a=arguments[0],h=arguments[1];pr.constructor_.call(this,a,h)}}])})(pr),Dn=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"buildMinimalRings",value:function(){var a=new De,h=this._startDe;do{if(h.getMinEdgeRing()===null){var v=new An(h,this._geometryFactory);a.add(v)}h=h.getNext()}while(h!==this._startDe);return a}},{key:"setEdgeRing",value:function(a,h){a.setEdgeRing(h)}},{key:"linkDirectedEdgesForMinimalEdgeRings",value:function(){var a=this._startDe;do a.getNode().getEdges().linkMinimalDirectedEdges(this),a=a.getNext();while(a!==this._startDe)}},{key:"getNext",value:function(a){return a.getNext()}}],[{key:"constructor_",value:function(){var a=arguments[0],h=arguments[1];pr.constructor_.call(this,a,h)}}])})(pr),Mr=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"setVisited",value:function(f){this._isVisited=f}},{key:"setInResult",value:function(f){this._isInResult=f}},{key:"isCovered",value:function(){return this._isCovered}},{key:"isCoveredSet",value:function(){return this._isCoveredSet}},{key:"setLabel",value:function(f){this._label=f}},{key:"getLabel",value:function(){return this._label}},{key:"setCovered",value:function(f){this._isCovered=f,this._isCoveredSet=!0}},{key:"updateIM",value:function(f){pe.isTrue(this._label.getGeometryCount()>=2,"found partial label"),this.computeIM(f)}},{key:"isInResult",value:function(){return this._isInResult}},{key:"isVisited",value:function(){return this._isVisited}}],[{key:"constructor_",value:function(){if(this._label=null,this._isInResult=!1,this._isCovered=!1,this._isCoveredSet=!1,this._isVisited=!1,arguments.length!==0){if(arguments.length===1){var f=arguments[0];this._label=f}}}}])})(),mr=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"isIncidentEdgeInResult",value:function(){for(var a=this.getEdges().getEdges().iterator();a.hasNext();)if(a.next().getEdge().isInResult())return!0;return!1}},{key:"isIsolated",value:function(){return this._label.getGeometryCount()===1}},{key:"getCoordinate",value:function(){return this._coord}},{key:"print",value:function(a){a.println("node "+this._coord+" lbl: "+this._label)}},{key:"computeIM",value:function(a){}},{key:"computeMergedLocation",value:function(a,h){var v=q.NONE;if(v=this._label.getLocation(h),!a.isNull(h)){var I=a.getLocation(h);v!==q.BOUNDARY&&(v=I)}return v}},{key:"setLabel",value:function(){if(arguments.length!==2||!Number.isInteger(arguments[1])||!Number.isInteger(arguments[0]))return A(n,"setLabel",this,1).apply(this,arguments);var a=arguments[0],h=arguments[1];this._label===null?this._label=new xt(a,h):this._label.setLocation(a,h)}},{key:"getEdges",value:function(){return this._edges}},{key:"mergeLabel",value:function(){if(arguments[0]instanceof n){var a=arguments[0];this.mergeLabel(a._label)}else if(arguments[0]instanceof xt)for(var h=arguments[0],v=0;v<2;v++){var I=this.computeMergedLocation(h,v);this._label.getLocation(v)===q.NONE&&this._label.setLocation(v,I)}}},{key:"add",value:function(a){this._edges.insert(a),a.setNode(this)}},{key:"setLabelBoundary",value:function(a){if(this._label===null)return null;var h=q.NONE;this._label!==null&&(h=this._label.getLocation(a));var v=null;switch(h){case q.BOUNDARY:v=q.INTERIOR;break;case q.INTERIOR:default:v=q.BOUNDARY}this._label.setLocation(a,v)}}],[{key:"constructor_",value:function(){this._coord=null,this._edges=null;var a=arguments[0],h=arguments[1];this._coord=a,this._edges=h,this._label=new xt(0,q.NONE)}}])})(Mr),Tn=(function(f){function n(){return o(this,n),s(this,n,arguments)}return E(n,f),g(n)})(wr);function jr(f){return f==null?0:f.color}function ze(f){return f==null?null:f.parent}function wt(f,n){f!==null&&(f.color=n)}function Er(f){return f==null?null:f.left}function Br(f){return f==null?null:f.right}var ur=(function(f){function n(){var a;return o(this,n),(a=s(this,n)).root_=null,a.size_=0,a}return E(n,f),g(n,[{key:"get",value:function(a){for(var h=this.root_;h!==null;){var v=a.compareTo(h.key);if(v<0)h=h.left;else{if(!(v>0))return h.value;h=h.right}}return null}},{key:"put",value:function(a,h){if(this.root_===null)return this.root_={key:a,value:h,left:null,right:null,parent:null,color:0,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var v,I,R=this.root_;do if(v=R,(I=a.compareTo(R.key))<0)R=R.left;else{if(!(I>0)){var T=R.value;return R.value=h,T}R=R.right}while(R!==null);var O={key:a,left:null,right:null,value:h,parent:v,color:0,getValue:function(){return this.value},getKey:function(){return this.key}};return I<0?v.left=O:v.right=O,this.fixAfterInsertion(O),this.size_++,null}},{key:"fixAfterInsertion",value:function(a){var h;for(a.color=1;a!=null&&a!==this.root_&&a.parent.color===1;)ze(a)===Er(ze(ze(a)))?jr(h=Br(ze(ze(a))))===1?(wt(ze(a),0),wt(h,0),wt(ze(ze(a)),1),a=ze(ze(a))):(a===Br(ze(a))&&(a=ze(a),this.rotateLeft(a)),wt(ze(a),0),wt(ze(ze(a)),1),this.rotateRight(ze(ze(a)))):jr(h=Er(ze(ze(a))))===1?(wt(ze(a),0),wt(h,0),wt(ze(ze(a)),1),a=ze(ze(a))):(a===Er(ze(a))&&(a=ze(a),this.rotateRight(a)),wt(ze(a),0),wt(ze(ze(a)),1),this.rotateLeft(ze(ze(a))));this.root_.color=0}},{key:"values",value:function(){var a=new De,h=this.getFirstEntry();if(h!==null)for(a.add(h.value);(h=n.successor(h))!==null;)a.add(h.value);return a}},{key:"entrySet",value:function(){var a=new it,h=this.getFirstEntry();if(h!==null)for(a.add(h);(h=n.successor(h))!==null;)a.add(h);return a}},{key:"rotateLeft",value:function(a){if(a!=null){var h=a.right;a.right=h.left,h.left!=null&&(h.left.parent=a),h.parent=a.parent,a.parent==null?this.root_=h:a.parent.left===a?a.parent.left=h:a.parent.right=h,h.left=a,a.parent=h}}},{key:"rotateRight",value:function(a){if(a!=null){var h=a.left;a.left=h.right,h.right!=null&&(h.right.parent=a),h.parent=a.parent,a.parent==null?this.root_=h:a.parent.right===a?a.parent.right=h:a.parent.left=h,h.right=a,a.parent=h}}},{key:"getFirstEntry",value:function(){var a=this.root_;if(a!=null)for(;a.left!=null;)a=a.left;return a}},{key:"size",value:function(){return this.size_}},{key:"containsKey",value:function(a){for(var h=this.root_;h!==null;){var v=a.compareTo(h.key);if(v<0)h=h.left;else{if(!(v>0))return!0;h=h.right}}return!1}}],[{key:"successor",value:function(a){var h;if(a===null)return null;if(a.right!==null){for(h=a.right;h.left!==null;)h=h.left;return h}h=a.parent;for(var v=a;h!==null&&v===h.right;)v=h,h=h.parent;return h}}])})(Tn),Gr=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"find",value:function(f){return this.nodeMap.get(f)}},{key:"addNode",value:function(){if(arguments[0]instanceof J){var f=arguments[0],n=this.nodeMap.get(f);return n===null&&(n=this.nodeFact.createNode(f),this.nodeMap.put(f,n)),n}if(arguments[0]instanceof mr){var a=arguments[0],h=this.nodeMap.get(a.getCoordinate());return h===null?(this.nodeMap.put(a.getCoordinate(),a),a):(h.mergeLabel(a),h)}}},{key:"print",value:function(f){for(var n=this.iterator();n.hasNext();)n.next().print(f)}},{key:"iterator",value:function(){return this.nodeMap.values().iterator()}},{key:"values",value:function(){return this.nodeMap.values()}},{key:"getBoundaryNodes",value:function(f){for(var n=new De,a=this.iterator();a.hasNext();){var h=a.next();h.getLabel().getLocation(f)===q.BOUNDARY&&n.add(h)}return n}},{key:"add",value:function(f){var n=f.getCoordinate();this.addNode(n).add(f)}}],[{key:"constructor_",value:function(){this.nodeMap=new ur,this.nodeFact=null;var f=arguments[0];this.nodeFact=f}}])})(),lt=(function(){function f(){o(this,f)}return g(f,null,[{key:"isNorthern",value:function(n){return n===f.NE||n===f.NW}},{key:"isOpposite",value:function(n,a){return n!==a&&(n-a+4)%4===2}},{key:"commonHalfPlane",value:function(n,a){if(n===a)return n;if((n-a+4)%4===2)return-1;var h=n<a?n:a;return h===0&&(n>a?n:a)===3?3:h}},{key:"isInHalfPlane",value:function(n,a){return a===f.SE?n===f.SE||n===f.SW:n===a||n===a+1}},{key:"quadrant",value:function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var n=arguments[0],a=arguments[1];if(n===0&&a===0)throw new V("Cannot compute the quadrant for point ( "+n+", "+a+" )");return n>=0?a>=0?f.NE:f.SE:a>=0?f.NW:f.SW}if(arguments[0]instanceof J&&arguments[1]instanceof J){var h=arguments[0],v=arguments[1];if(v.x===h.x&&v.y===h.y)throw new V("Cannot compute the quadrant for two identical points "+h);return v.x>=h.x?v.y>=h.y?f.NE:f.SE:v.y>=h.y?f.NW:f.SW}}}])})();lt.NE=0,lt.NW=1,lt.SW=2,lt.SE=3;var qr=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"compareDirection",value:function(n){return this._dx===n._dx&&this._dy===n._dy?0:this._quadrant>n._quadrant?1:this._quadrant<n._quadrant?-1:ke.index(n._p0,n._p1,this._p1)}},{key:"getDy",value:function(){return this._dy}},{key:"getCoordinate",value:function(){return this._p0}},{key:"setNode",value:function(n){this._node=n}},{key:"print",value:function(n){var a=Math.atan2(this._dy,this._dx),h=this.getClass().getName(),v=h.lastIndexOf("."),I=h.substring(v+1);n.print(" "+I+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+a+" "+this._label)}},{key:"compareTo",value:function(n){var a=n;return this.compareDirection(a)}},{key:"getDirectedCoordinate",value:function(){return this._p1}},{key:"getDx",value:function(){return this._dx}},{key:"getLabel",value:function(){return this._label}},{key:"getEdge",value:function(){return this._edge}},{key:"getQuadrant",value:function(){return this._quadrant}},{key:"getNode",value:function(){return this._node}},{key:"toString",value:function(){var n=Math.atan2(this._dy,this._dx),a=this.getClass().getName(),h=a.lastIndexOf(".");return" "+a.substring(h+1)+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+n+" "+this._label}},{key:"computeLabel",value:function(n){}},{key:"init",value:function(n,a){this._p0=n,this._p1=a,this._dx=a.x-n.x,this._dy=a.y-n.y,this._quadrant=lt.quadrant(this._dx,this._dy),pe.isTrue(!(this._dx===0&&this._dy===0),"EdgeEnd with identical endpoints found")}},{key:"interfaces_",get:function(){return[X]}}],[{key:"constructor_",value:function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,arguments.length===1){var n=arguments[0];this._edge=n}else if(arguments.length===3){var a=arguments[0],h=arguments[1],v=arguments[2];f.constructor_.call(this,a,h,v,null)}else if(arguments.length===4){var I=arguments[0],R=arguments[1],T=arguments[2],O=arguments[3];f.constructor_.call(this,I),this.init(R,T),this._label=O}}}])})(),Ir=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"getNextMin",value:function(){return this._nextMin}},{key:"getDepth",value:function(a){return this._depth[a]}},{key:"setVisited",value:function(a){this._isVisited=a}},{key:"computeDirectedLabel",value:function(){this._label=new xt(this._edge.getLabel()),this._isForward||this._label.flip()}},{key:"getNext",value:function(){return this._next}},{key:"setDepth",value:function(a,h){if(this._depth[a]!==-999&&this._depth[a]!==h)throw new at("assigned depths do not match",this.getCoordinate());this._depth[a]=h}},{key:"isInteriorAreaEdge",value:function(){for(var a=!0,h=0;h<2;h++)this._label.isArea(h)&&this._label.getLocation(h,he.LEFT)===q.INTERIOR&&this._label.getLocation(h,he.RIGHT)===q.INTERIOR||(a=!1);return a}},{key:"setNextMin",value:function(a){this._nextMin=a}},{key:"print",value:function(a){A(n,"print",this,1).call(this,a),a.print(" "+this._depth[he.LEFT]+"/"+this._depth[he.RIGHT]),a.print(" ("+this.getDepthDelta()+")"),this._isInResult&&a.print(" inResult")}},{key:"setMinEdgeRing",value:function(a){this._minEdgeRing=a}},{key:"isLineEdge",value:function(){var a=this._label.isLine(0)||this._label.isLine(1),h=!this._label.isArea(0)||this._label.allPositionsEqual(0,q.EXTERIOR),v=!this._label.isArea(1)||this._label.allPositionsEqual(1,q.EXTERIOR);return a&&h&&v}},{key:"setEdgeRing",value:function(a){this._edgeRing=a}},{key:"getMinEdgeRing",value:function(){return this._minEdgeRing}},{key:"getDepthDelta",value:function(){var a=this._edge.getDepthDelta();return this._isForward||(a=-a),a}},{key:"setInResult",value:function(a){this._isInResult=a}},{key:"getSym",value:function(){return this._sym}},{key:"isForward",value:function(){return this._isForward}},{key:"getEdge",value:function(){return this._edge}},{key:"printEdge",value:function(a){this.print(a),a.print(" "),this._isForward?this._edge.print(a):this._edge.printReverse(a)}},{key:"setSym",value:function(a){this._sym=a}},{key:"setVisitedEdge",value:function(a){this.setVisited(a),this._sym.setVisited(a)}},{key:"setEdgeDepths",value:function(a,h){var v=this.getEdge().getDepthDelta();this._isForward||(v=-v);var I=1;a===he.LEFT&&(I=-1);var R=he.opposite(a),T=h+v*I;this.setDepth(a,h),this.setDepth(R,T)}},{key:"getEdgeRing",value:function(){return this._edgeRing}},{key:"isInResult",value:function(){return this._isInResult}},{key:"setNext",value:function(a){this._next=a}},{key:"isVisited",value:function(){return this._isVisited}}],[{key:"constructor_",value:function(){this._isForward=null,this._isInResult=!1,this._isVisited=!1,this._sym=null,this._next=null,this._nextMin=null,this._edgeRing=null,this._minEdgeRing=null,this._depth=[0,-999,-999];var a=arguments[0],h=arguments[1];if(qr.constructor_.call(this,a),this._isForward=h,h)this.init(a.getCoordinate(0),a.getCoordinate(1));else{var v=a.getNumPoints()-1;this.init(a.getCoordinate(v),a.getCoordinate(v-1))}this.computeDirectedLabel()}},{key:"depthFactor",value:function(a,h){return a===q.EXTERIOR&&h===q.INTERIOR?1:a===q.INTERIOR&&h===q.EXTERIOR?-1:0}}])})(qr),Vr=(function(){return g((function f(){o(this,f)}),[{key:"createNode",value:function(f){return new mr(f,null)}}])})(),Ur=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"printEdges",value:function(f){f.println("Edges:");for(var n=0;n<this._edges.size();n++){f.println("edge "+n+":");var a=this._edges.get(n);a.print(f),a.eiList.print(f)}}},{key:"find",value:function(f){return this._nodes.find(f)}},{key:"addNode",value:function(){if(arguments[0]instanceof mr){var f=arguments[0];return this._nodes.addNode(f)}if(arguments[0]instanceof J){var n=arguments[0];return this._nodes.addNode(n)}}},{key:"getNodeIterator",value:function(){return this._nodes.iterator()}},{key:"linkResultDirectedEdges",value:function(){for(var f=this._nodes.iterator();f.hasNext();)f.next().getEdges().linkResultDirectedEdges()}},{key:"debugPrintln",value:function(f){Je.out.println(f)}},{key:"isBoundaryNode",value:function(f,n){var a=this._nodes.find(n);if(a===null)return!1;var h=a.getLabel();return h!==null&&h.getLocation(f)===q.BOUNDARY}},{key:"linkAllDirectedEdges",value:function(){for(var f=this._nodes.iterator();f.hasNext();)f.next().getEdges().linkAllDirectedEdges()}},{key:"matchInSameDirection",value:function(f,n,a,h){return!!f.equals(a)&&ke.index(f,n,h)===ke.COLLINEAR&&lt.quadrant(f,n)===lt.quadrant(a,h)}},{key:"getEdgeEnds",value:function(){return this._edgeEndList}},{key:"debugPrint",value:function(f){Je.out.print(f)}},{key:"getEdgeIterator",value:function(){return this._edges.iterator()}},{key:"findEdgeInSameDirection",value:function(f,n){for(var a=0;a<this._edges.size();a++){var h=this._edges.get(a),v=h.getCoordinates();if(this.matchInSameDirection(f,n,v[0],v[1])||this.matchInSameDirection(f,n,v[v.length-1],v[v.length-2]))return h}return null}},{key:"insertEdge",value:function(f){this._edges.add(f)}},{key:"findEdgeEnd",value:function(f){for(var n=this.getEdgeEnds().iterator();n.hasNext();){var a=n.next();if(a.getEdge()===f)return a}return null}},{key:"addEdges",value:function(f){for(var n=f.iterator();n.hasNext();){var a=n.next();this._edges.add(a);var h=new Ir(a,!0),v=new Ir(a,!1);h.setSym(v),v.setSym(h),this.add(h),this.add(v)}}},{key:"add",value:function(f){this._nodes.add(f),this._edgeEndList.add(f)}},{key:"getNodes",value:function(){return this._nodes.values()}},{key:"findEdge",value:function(f,n){for(var a=0;a<this._edges.size();a++){var h=this._edges.get(a),v=h.getCoordinates();if(f.equals(v[0])&&n.equals(v[1]))return h}return null}}],[{key:"constructor_",value:function(){if(this._edges=new De,this._nodes=null,this._edgeEndList=new De,arguments.length===0)this._nodes=new Gr(new Vr);else if(arguments.length===1){var f=arguments[0];this._nodes=new Gr(f)}}},{key:"linkResultDirectedEdges",value:function(f){for(var n=f.iterator();n.hasNext();)n.next().getEdges().linkResultDirectedEdges()}}])})(),wn=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"sortShellsAndHoles",value:function(n,a,h){for(var v=n.iterator();v.hasNext();){var I=v.next();I.isHole()?h.add(I):a.add(I)}}},{key:"computePolygons",value:function(n){for(var a=new De,h=n.iterator();h.hasNext();){var v=h.next().toPolygon(this._geometryFactory);a.add(v)}return a}},{key:"placeFreeHoles",value:function(n,a){for(var h=a.iterator();h.hasNext();){var v=h.next();if(v.getShell()===null){var I=f.findEdgeRingContaining(v,n);if(I===null)throw new at("unable to assign hole to a shell",v.getCoordinate(0));v.setShell(I)}}}},{key:"buildMinimalEdgeRings",value:function(n,a,h){for(var v=new De,I=n.iterator();I.hasNext();){var R=I.next();if(R.getMaxNodeDegree()>2){R.linkDirectedEdgesForMinimalEdgeRings();var T=R.buildMinimalRings(),O=this.findShell(T);O!==null?(this.placePolygonHoles(O,T),a.add(O)):h.addAll(T)}else v.add(R)}return v}},{key:"buildMaximalEdgeRings",value:function(n){for(var a=new De,h=n.iterator();h.hasNext();){var v=h.next();if(v.isInResult()&&v.getLabel().isArea()&&v.getEdgeRing()===null){var I=new Dn(v,this._geometryFactory);a.add(I),I.setInResult()}}return a}},{key:"placePolygonHoles",value:function(n,a){for(var h=a.iterator();h.hasNext();){var v=h.next();v.isHole()&&v.setShell(n)}}},{key:"getPolygons",value:function(){return this.computePolygons(this._shellList)}},{key:"findShell",value:function(n){for(var a=0,h=null,v=n.iterator();v.hasNext();){var I=v.next();I.isHole()||(h=I,a++)}return pe.isTrue(a<=1,"found two shells in MinimalEdgeRing list"),h}},{key:"add",value:function(){if(arguments.length===1){var n=arguments[0];this.add(n.getEdgeEnds(),n.getNodes())}else if(arguments.length===2){var a=arguments[0],h=arguments[1];Ur.linkResultDirectedEdges(h);var v=this.buildMaximalEdgeRings(a),I=new De,R=this.buildMinimalEdgeRings(v,this._shellList,I);this.sortShellsAndHoles(R,this._shellList,I),this.placeFreeHoles(this._shellList,I)}}}],[{key:"constructor_",value:function(){this._geometryFactory=null,this._shellList=new De;var n=arguments[0];this._geometryFactory=n}},{key:"findEdgeRingContaining",value:function(n,a){for(var h=n.getLinearRing(),v=h.getEnvelopeInternal(),I=h.getCoordinateN(0),R=null,T=null,O=a.iterator();O.hasNext();){var W=O.next(),re=W.getLinearRing(),ne=re.getEnvelopeInternal();if(!ne.equals(v)&&ne.contains(v)){I=We.ptNotInList(h.getCoordinates(),re.getCoordinates());var oe=!1;xr.isInRing(I,re.getCoordinates())&&(oe=!0),oe&&(R===null||T.contains(ne))&&(T=(R=W).getLinearRing().getEnvelopeInternal())}}return R}}])})(),zr=(function(){return g((function f(){o(this,f)}),[{key:"getBounds",value:function(){}}])})(),jt=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"getItem",value:function(){return this._item}},{key:"getBounds",value:function(){return this._bounds}},{key:"interfaces_",get:function(){return[zr,$]}}],[{key:"constructor_",value:function(){this._bounds=null,this._item=null;var f=arguments[0],n=arguments[1];this._bounds=f,this._item=n}}])})(),gr=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"poll",value:function(){if(this.isEmpty())return null;var f=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),f}},{key:"size",value:function(){return this._size}},{key:"reorder",value:function(f){for(var n=null,a=this._items.get(f);2*f<=this._size&&((n=2*f)!==this._size&&this._items.get(n+1).compareTo(this._items.get(n))<0&&n++,this._items.get(n).compareTo(a)<0);f=n)this._items.set(f,this._items.get(n));this._items.set(f,a)}},{key:"clear",value:function(){this._size=0,this._items.clear()}},{key:"peek",value:function(){return this.isEmpty()?null:this._items.get(1)}},{key:"isEmpty",value:function(){return this._size===0}},{key:"add",value:function(f){this._items.add(null),this._size+=1;var n=this._size;for(this._items.set(0,f);f.compareTo(this._items.get(Math.trunc(n/2)))<0;n/=2)this._items.set(n,this._items.get(Math.trunc(n/2)));this._items.set(n,f)}}],[{key:"constructor_",value:function(){this._size=null,this._items=null,this._size=0,this._items=new De,this._items.add(null)}}])})(),kn=(function(){return g((function f(){o(this,f)}),[{key:"insert",value:function(f,n){}},{key:"remove",value:function(f,n){}},{key:"query",value:function(){}}])})(),Et=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"getLevel",value:function(){return this._level}},{key:"size",value:function(){return this._childBoundables.size()}},{key:"getChildBoundables",value:function(){return this._childBoundables}},{key:"addChildBoundable",value:function(f){pe.isTrue(this._bounds===null),this._childBoundables.add(f)}},{key:"isEmpty",value:function(){return this._childBoundables.isEmpty()}},{key:"getBounds",value:function(){return this._bounds===null&&(this._bounds=this.computeBounds()),this._bounds}},{key:"interfaces_",get:function(){return[zr,$]}}],[{key:"constructor_",value:function(){if(this._childBoundables=new De,this._bounds=null,this._level=null,arguments.length!==0){if(arguments.length===1){var f=arguments[0];this._level=f}}}}])})(),tr={reverseOrder:function(){return{compare:function(f,n){return n.compareTo(f)}}},min:function(f){return tr.sort(f),f.get(0)},sort:function(f,n){var a=f.toArray();n?Xe.sort(a,n):Xe.sort(a);for(var h=f.iterator(),v=0,I=a.length;v<I;v++)h.next(),h.set(a[v])},singletonList:function(f){var n=new De;return n.add(f),n}},Nn=(function(){function f(){o(this,f)}return g(f,null,[{key:"maxDistance",value:function(n,a,h,v,I,R,T,O){var W=f.distance(n,a,I,R);return W=Math.max(W,f.distance(n,a,T,O)),W=Math.max(W,f.distance(h,v,I,R)),W=Math.max(W,f.distance(h,v,T,O))}},{key:"distance",value:function(n,a,h,v){var I=h-n,R=v-a;return Math.sqrt(I*I+R*R)}},{key:"maximumDistance",value:function(n,a){var h=Math.min(n.getMinX(),a.getMinX()),v=Math.min(n.getMinY(),a.getMinY()),I=Math.max(n.getMaxX(),a.getMaxX()),R=Math.max(n.getMaxY(),a.getMaxY());return f.distance(h,v,I,R)}},{key:"minMaxDistance",value:function(n,a){var h=n.getMinX(),v=n.getMinY(),I=n.getMaxX(),R=n.getMaxY(),T=a.getMinX(),O=a.getMinY(),W=a.getMaxX(),re=a.getMaxY(),ne=f.maxDistance(h,v,h,R,T,O,T,re);return ne=Math.min(ne,f.maxDistance(h,v,h,R,T,O,W,O)),ne=Math.min(ne,f.maxDistance(h,v,h,R,W,re,T,re)),ne=Math.min(ne,f.maxDistance(h,v,h,R,W,re,W,O)),ne=Math.min(ne,f.maxDistance(h,v,I,v,T,O,T,re)),ne=Math.min(ne,f.maxDistance(h,v,I,v,T,O,W,O)),ne=Math.min(ne,f.maxDistance(h,v,I,v,W,re,T,re)),ne=Math.min(ne,f.maxDistance(h,v,I,v,W,re,W,O)),ne=Math.min(ne,f.maxDistance(I,R,h,R,T,O,T,re)),ne=Math.min(ne,f.maxDistance(I,R,h,R,T,O,W,O)),ne=Math.min(ne,f.maxDistance(I,R,h,R,W,re,T,re)),ne=Math.min(ne,f.maxDistance(I,R,h,R,W,re,W,O)),ne=Math.min(ne,f.maxDistance(I,R,I,v,T,O,T,re)),ne=Math.min(ne,f.maxDistance(I,R,I,v,T,O,W,O)),ne=Math.min(ne,f.maxDistance(I,R,I,v,W,re,T,re)),ne=Math.min(ne,f.maxDistance(I,R,I,v,W,re,W,O))}}])})(),rr=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"maximumDistance",value:function(){return Nn.maximumDistance(this._boundable1.getBounds(),this._boundable2.getBounds())}},{key:"expandToQueue",value:function(n,a){var h=f.isComposite(this._boundable1),v=f.isComposite(this._boundable2);if(h&&v)return f.area(this._boundable1)>f.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,!1,n,a),null):(this.expand(this._boundable2,this._boundable1,!0,n,a),null);if(h)return this.expand(this._boundable1,this._boundable2,!1,n,a),null;if(v)return this.expand(this._boundable2,this._boundable1,!0,n,a),null;throw new V("neither boundable is composite")}},{key:"isLeaves",value:function(){return!(f.isComposite(this._boundable1)||f.isComposite(this._boundable2))}},{key:"compareTo",value:function(n){var a=n;return this._distance<a._distance?-1:this._distance>a._distance?1:0}},{key:"expand",value:function(n,a,h,v,I){for(var R=n.getChildBoundables().iterator();R.hasNext();){var T=R.next(),O=null;(O=h?new f(a,T,this._itemDistance):new f(T,a,this._itemDistance)).getDistance()<I&&v.add(O)}}},{key:"getBoundable",value:function(n){return n===0?this._boundable1:this._boundable2}},{key:"getDistance",value:function(){return this._distance}},{key:"distance",value:function(){return this.isLeaves()?this._itemDistance.distance(this._boundable1,this._boundable2):this._boundable1.getBounds().distance(this._boundable2.getBounds())}},{key:"interfaces_",get:function(){return[X]}}],[{key:"constructor_",value:function(){this._boundable1=null,this._boundable2=null,this._distance=null,this._itemDistance=null;var n=arguments[0],a=arguments[1],h=arguments[2];this._boundable1=n,this._boundable2=a,this._itemDistance=h,this._distance=this.distance()}},{key:"area",value:function(n){return n.getBounds().getArea()}},{key:"isComposite",value:function(n){return n instanceof Et}}])})(),Hr=(function(){return g((function f(){o(this,f)}),[{key:"visitItem",value:function(f){}}])})(),nr=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"queryInternal",value:function(){if(Le(arguments[2],Hr)&&arguments[0]instanceof Object&&arguments[1]instanceof Et)for(var n=arguments[0],a=arguments[2],h=arguments[1].getChildBoundables(),v=0;v<h.size();v++){var I=h.get(v);this.getIntersectsOp().intersects(I.getBounds(),n)&&(I instanceof Et?this.queryInternal(n,I,a):I instanceof jt?a.visitItem(I.getItem()):pe.shouldNeverReachHere())}else if(Le(arguments[2],Ve)&&arguments[0]instanceof Object&&arguments[1]instanceof Et)for(var R=arguments[0],T=arguments[2],O=arguments[1].getChildBoundables(),W=0;W<O.size();W++){var re=O.get(W);this.getIntersectsOp().intersects(re.getBounds(),R)&&(re instanceof Et?this.queryInternal(R,re,T):re instanceof jt?T.add(re.getItem()):pe.shouldNeverReachHere())}}},{key:"getNodeCapacity",value:function(){return this._nodeCapacity}},{key:"lastNode",value:function(n){return n.get(n.size()-1)}},{key:"size",value:function(){if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.size(this._root));if(arguments.length===1){for(var n=0,a=arguments[0].getChildBoundables().iterator();a.hasNext();){var h=a.next();h instanceof Et?n+=this.size(h):h instanceof jt&&(n+=1)}return n}}},{key:"removeItem",value:function(n,a){for(var h=null,v=n.getChildBoundables().iterator();v.hasNext();){var I=v.next();I instanceof jt&&I.getItem()===a&&(h=I)}return h!==null&&(n.getChildBoundables().remove(h),!0)}},{key:"itemsTree",value:function(){if(arguments.length===0){this.build();var n=this.itemsTree(this._root);return n===null?new De:n}if(arguments.length===1){for(var a=arguments[0],h=new De,v=a.getChildBoundables().iterator();v.hasNext();){var I=v.next();if(I instanceof Et){var R=this.itemsTree(I);R!==null&&h.add(R)}else I instanceof jt?h.add(I.getItem()):pe.shouldNeverReachHere()}return h.size()<=0?null:h}}},{key:"insert",value:function(n,a){pe.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new jt(n,a))}},{key:"boundablesAtLevel",value:function(){if(arguments.length===1){var n=arguments[0],a=new De;return this.boundablesAtLevel(n,this._root,a),a}if(arguments.length===3){var h=arguments[0],v=arguments[1],I=arguments[2];if(pe.isTrue(h>-2),v.getLevel()===h)return I.add(v),null;for(var R=v.getChildBoundables().iterator();R.hasNext();){var T=R.next();T instanceof Et?this.boundablesAtLevel(h,T,I):(pe.isTrue(T instanceof jt),h===-1&&I.add(T))}return null}}},{key:"query",value:function(){if(arguments.length===1){var n=arguments[0];this.build();var a=new De;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),n)&&this.queryInternal(n,this._root,a),a}if(arguments.length===2){var h=arguments[0],v=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),h)&&this.queryInternal(h,this._root,v)}}},{key:"build",value:function(){if(this._built)return null;this._root=this._itemBoundables.isEmpty()?this.createNode(0):this.createHigherLevels(this._itemBoundables,-1),this._itemBoundables=null,this._built=!0}},{key:"getRoot",value:function(){return this.build(),this._root}},{key:"remove",value:function(){if(arguments.length===2){var n=arguments[0],a=arguments[1];return this.build(),!!this.getIntersectsOp().intersects(this._root.getBounds(),n)&&this.remove(n,this._root,a)}if(arguments.length===3){var h=arguments[0],v=arguments[1],I=arguments[2],R=this.removeItem(v,I);if(R)return!0;for(var T=null,O=v.getChildBoundables().iterator();O.hasNext();){var W=O.next();if(this.getIntersectsOp().intersects(W.getBounds(),h)&&W instanceof Et&&(R=this.remove(h,W,I))){T=W;break}}return T!==null&&T.getChildBoundables().isEmpty()&&v.getChildBoundables().remove(T),R}}},{key:"createHigherLevels",value:function(n,a){pe.isTrue(!n.isEmpty());var h=this.createParentBoundables(n,a+1);return h.size()===1?h.get(0):this.createHigherLevels(h,a+1)}},{key:"depth",value:function(){if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.depth(this._root));if(arguments.length===1){for(var n=0,a=arguments[0].getChildBoundables().iterator();a.hasNext();){var h=a.next();if(h instanceof Et){var v=this.depth(h);v>n&&(n=v)}}return n+1}}},{key:"createParentBoundables",value:function(n,a){pe.isTrue(!n.isEmpty());var h=new De;h.add(this.createNode(a));var v=new De(n);tr.sort(v,this.getComparator());for(var I=v.iterator();I.hasNext();){var R=I.next();this.lastNode(h).getChildBoundables().size()===this.getNodeCapacity()&&h.add(this.createNode(a)),this.lastNode(h).addChildBoundable(R)}return h}},{key:"isEmpty",value:function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()}},{key:"interfaces_",get:function(){return[$]}}],[{key:"constructor_",value:function(){if(this._root=null,this._built=!1,this._itemBoundables=new De,this._nodeCapacity=null,arguments.length===0)f.constructor_.call(this,f.DEFAULT_NODE_CAPACITY);else if(arguments.length===1){var n=arguments[0];pe.isTrue(n>1,"Node capacity must be greater than 1"),this._nodeCapacity=n}}},{key:"compareDoubles",value:function(n,a){return n>a?1:n<a?-1:0}}])})();nr.IntersectsOp=function(){},nr.DEFAULT_NODE_CAPACITY=10;var Ln=(function(){return g((function f(){o(this,f)}),[{key:"distance",value:function(f,n){}}])})(),kt=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"createParentBoundablesFromVerticalSlices",value:function(a,h){pe.isTrue(a.length>0);for(var v=new De,I=0;I<a.length;I++)v.addAll(this.createParentBoundablesFromVerticalSlice(a[I],h));return v}},{key:"nearestNeighbourK",value:function(){if(arguments.length===2){var a=arguments[0],h=arguments[1];return this.nearestNeighbourK(a,ce.POSITIVE_INFINITY,h)}if(arguments.length===3){var v=arguments[0],I=arguments[2],R=arguments[1],T=new gr;T.add(v);for(var O=new gr;!T.isEmpty()&&R>=0;){var W=T.poll(),re=W.getDistance();if(re>=R)break;W.isLeaves()?O.size()<I?O.add(W):(O.peek().getDistance()>re&&(O.poll(),O.add(W)),R=O.peek().getDistance()):W.expandToQueue(T,R)}return n.getItems(O)}}},{key:"createNode",value:function(a){return new $r(a)}},{key:"size",value:function(){return arguments.length===0?A(n,"size",this,1).call(this):A(n,"size",this,1).apply(this,arguments)}},{key:"insert",value:function(){if(!(arguments.length===2&&arguments[1]instanceof Object&&arguments[0]instanceof ye))return A(n,"insert",this,1).apply(this,arguments);var a=arguments[0],h=arguments[1];if(a.isNull())return null;A(n,"insert",this,1).call(this,a,h)}},{key:"getIntersectsOp",value:function(){return n.intersectsOp}},{key:"verticalSlices",value:function(a,h){for(var v=Math.trunc(Math.ceil(a.size()/h)),I=new Array(h).fill(null),R=a.iterator(),T=0;T<h;T++){I[T]=new De;for(var O=0;R.hasNext()&&O<v;){var W=R.next();I[T].add(W),O++}}return I}},{key:"query",value:function(){if(arguments.length===1){var a=arguments[0];return A(n,"query",this,1).call(this,a)}if(arguments.length===2){var h=arguments[0],v=arguments[1];A(n,"query",this,1).call(this,h,v)}}},{key:"getComparator",value:function(){return n.yComparator}},{key:"createParentBoundablesFromVerticalSlice",value:function(a,h){return A(n,"createParentBoundables",this,1).call(this,a,h)}},{key:"remove",value:function(){if(arguments.length===2&&arguments[1]instanceof Object&&arguments[0]instanceof ye){var a=arguments[0],h=arguments[1];return A(n,"remove",this,1).call(this,a,h)}return A(n,"remove",this,1).apply(this,arguments)}},{key:"depth",value:function(){return arguments.length===0?A(n,"depth",this,1).call(this):A(n,"depth",this,1).apply(this,arguments)}},{key:"createParentBoundables",value:function(a,h){pe.isTrue(!a.isEmpty());var v=Math.trunc(Math.ceil(a.size()/this.getNodeCapacity())),I=new De(a);tr.sort(I,n.xComparator);var R=this.verticalSlices(I,Math.trunc(Math.ceil(Math.sqrt(v))));return this.createParentBoundablesFromVerticalSlices(R,h)}},{key:"nearestNeighbour",value:function(){if(arguments.length===1){if(Le(arguments[0],Ln)){var a=arguments[0];if(this.isEmpty())return null;var h=new rr(this.getRoot(),this.getRoot(),a);return this.nearestNeighbour(h)}if(arguments[0]instanceof rr){var v=arguments[0],I=ce.POSITIVE_INFINITY,R=null,T=new gr;for(T.add(v);!T.isEmpty()&&I>0;){var O=T.poll(),W=O.getDistance();if(W>=I)break;O.isLeaves()?(I=W,R=O):O.expandToQueue(T,I)}return R===null?null:[R.getBoundable(0).getItem(),R.getBoundable(1).getItem()]}}else{if(arguments.length===2){var re=arguments[0],ne=arguments[1];if(this.isEmpty()||re.isEmpty())return null;var oe=new rr(this.getRoot(),re.getRoot(),ne);return this.nearestNeighbour(oe)}if(arguments.length===3){var _e=arguments[2],Se=new jt(arguments[0],arguments[1]),Ne=new rr(this.getRoot(),Se,_e);return this.nearestNeighbour(Ne)[0]}if(arguments.length===4){var Ge=arguments[2],Be=arguments[3],$e=new jt(arguments[0],arguments[1]),et=new rr(this.getRoot(),$e,Ge);return this.nearestNeighbourK(et,Be)}}}},{key:"isWithinDistance",value:function(){if(arguments.length===2){var a=arguments[0],h=arguments[1],v=ce.POSITIVE_INFINITY,I=new gr;for(I.add(a);!I.isEmpty();){var R=I.poll(),T=R.getDistance();if(T>h)return!1;if(R.maximumDistance()<=h)return!0;if(R.isLeaves()){if((v=T)<=h)return!0}else R.expandToQueue(I,v)}return!1}if(arguments.length===3){var O=arguments[0],W=arguments[1],re=arguments[2],ne=new rr(this.getRoot(),O.getRoot(),W);return this.isWithinDistance(ne,re)}}},{key:"interfaces_",get:function(){return[kn,$]}}],[{key:"constructor_",value:function(){if(arguments.length===0)n.constructor_.call(this,n.DEFAULT_NODE_CAPACITY);else if(arguments.length===1){var a=arguments[0];nr.constructor_.call(this,a)}}},{key:"centreX",value:function(a){return n.avg(a.getMinX(),a.getMaxX())}},{key:"avg",value:function(a,h){return(a+h)/2}},{key:"getItems",value:function(a){for(var h=new Array(a.size()).fill(null),v=0;!a.isEmpty();){var I=a.poll();h[v]=I.getBoundable(0).getItem(),v++}return h}},{key:"centreY",value:function(a){return n.avg(a.getMinY(),a.getMaxY())}}])})(nr),$r=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"computeBounds",value:function(){for(var a=null,h=this.getChildBoundables().iterator();h.hasNext();){var v=h.next();a===null?a=new ye(v.getBounds()):a.expandToInclude(v.getBounds())}return a}}],[{key:"constructor_",value:function(){var a=arguments[0];Et.constructor_.call(this,a)}}])})(Et);kt.STRtreeNode=$r,kt.xComparator=new((function(){return g((function f(){o(this,f)}),[{key:"interfaces_",get:function(){return[Te]}},{key:"compare",value:function(f,n){return nr.compareDoubles(kt.centreX(f.getBounds()),kt.centreX(n.getBounds()))}}])})()),kt.yComparator=new((function(){return g((function f(){o(this,f)}),[{key:"interfaces_",get:function(){return[Te]}},{key:"compare",value:function(f,n){return nr.compareDoubles(kt.centreY(f.getBounds()),kt.centreY(n.getBounds()))}}])})()),kt.intersectsOp=new((function(){return g((function f(){o(this,f)}),[{key:"interfaces_",get:function(){return[IntersectsOp]}},{key:"intersects",value:function(f,n){return f.intersects(n)}}])})()),kt.DEFAULT_NODE_CAPACITY=10;var On=(function(){function f(){o(this,f)}return g(f,null,[{key:"relativeSign",value:function(n,a){return n<a?-1:n>a?1:0}},{key:"compare",value:function(n,a,h){if(a.equals2D(h))return 0;var v=f.relativeSign(a.x,h.x),I=f.relativeSign(a.y,h.y);switch(n){case 0:return f.compareValue(v,I);case 1:return f.compareValue(I,v);case 2:return f.compareValue(I,-v);case 3:return f.compareValue(-v,I);case 4:return f.compareValue(-v,-I);case 5:return f.compareValue(-I,-v);case 6:return f.compareValue(-I,v);case 7:return f.compareValue(v,-I)}return pe.shouldNeverReachHere("invalid octant value"),0}},{key:"compareValue",value:function(n,a){return n<0?-1:n>0?1:a<0?-1:a>0?1:0}}])})(),Pn=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"getCoordinate",value:function(){return this.coord}},{key:"print",value:function(f){f.print(this.coord),f.print(" seg # = "+this.segmentIndex)}},{key:"compareTo",value:function(f){var n=f;return this.segmentIndex<n.segmentIndex?-1:this.segmentIndex>n.segmentIndex?1:this.coord.equals2D(n.coord)?0:this._isInterior?n._isInterior?On.compare(this._segmentOctant,this.coord,n.coord):1:-1}},{key:"isEndPoint",value:function(f){return this.segmentIndex===0&&!this._isInterior||this.segmentIndex===f}},{key:"toString",value:function(){return this.segmentIndex+":"+this.coord.toString()}},{key:"isInterior",value:function(){return this._isInterior}},{key:"interfaces_",get:function(){return[X]}}],[{key:"constructor_",value:function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var f=arguments[0],n=arguments[1],a=arguments[2],h=arguments[3];this._segString=f,this.coord=new J(n),this.segmentIndex=a,this._segmentOctant=h,this._isInterior=!n.equals2D(f.getCoordinate(a))}}])})(),Fn=(function(){return g((function f(){o(this,f)}),[{key:"hasNext",value:function(){}},{key:"next",value:function(){}},{key:"remove",value:function(){}}])})(),Mn=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"getSplitCoordinates",value:function(){var f=new Rt;this.addEndpoints();for(var n=this.iterator(),a=n.next();n.hasNext();){var h=n.next();this.addEdgeCoordinates(a,h,f),a=h}return f.toCoordinateArray()}},{key:"addCollapsedNodes",value:function(){var f=new De;this.findCollapsesFromInsertedNodes(f),this.findCollapsesFromExistingVertices(f);for(var n=f.iterator();n.hasNext();){var a=n.next().intValue();this.add(this._edge.getCoordinate(a),a)}}},{key:"createSplitEdgePts",value:function(f,n){var a=n.segmentIndex-f.segmentIndex+2;if(a===2)return[new J(f.coord),new J(n.coord)];var h=this._edge.getCoordinate(n.segmentIndex),v=n.isInterior()||!n.coord.equals2D(h);v||a--;var I=new Array(a).fill(null),R=0;I[R++]=new J(f.coord);for(var T=f.segmentIndex+1;T<=n.segmentIndex;T++)I[R++]=this._edge.getCoordinate(T);return v&&(I[R]=new J(n.coord)),I}},{key:"print",value:function(f){f.println("Intersections:");for(var n=this.iterator();n.hasNext();)n.next().print(f)}},{key:"findCollapsesFromExistingVertices",value:function(f){for(var n=0;n<this._edge.size()-2;n++){var a=this._edge.getCoordinate(n);this._edge.getCoordinate(n+1);var h=this._edge.getCoordinate(n+2);a.equals2D(h)&&f.add(gt.valueOf(n+1))}}},{key:"addEdgeCoordinates",value:function(f,n,a){var h=this.createSplitEdgePts(f,n);a.add(h,!1)}},{key:"iterator",value:function(){return this._nodeMap.values().iterator()}},{key:"addSplitEdges",value:function(f){this.addEndpoints(),this.addCollapsedNodes();for(var n=this.iterator(),a=n.next();n.hasNext();){var h=n.next(),v=this.createSplitEdge(a,h);f.add(v),a=h}}},{key:"findCollapseIndex",value:function(f,n,a){if(!f.coord.equals2D(n.coord))return!1;var h=n.segmentIndex-f.segmentIndex;return n.isInterior()||h--,h===1&&(a[0]=f.segmentIndex+1,!0)}},{key:"findCollapsesFromInsertedNodes",value:function(f){for(var n=new Array(1).fill(null),a=this.iterator(),h=a.next();a.hasNext();){var v=a.next();this.findCollapseIndex(h,v,n)&&f.add(gt.valueOf(n[0])),h=v}}},{key:"getEdge",value:function(){return this._edge}},{key:"addEndpoints",value:function(){var f=this._edge.size()-1;this.add(this._edge.getCoordinate(0),0),this.add(this._edge.getCoordinate(f),f)}},{key:"createSplitEdge",value:function(f,n){var a=this.createSplitEdgePts(f,n);return new Zt(a,this._edge.getData())}},{key:"add",value:function(f,n){var a=new Pn(this._edge,f,n,this._edge.getSegmentOctant(n)),h=this._nodeMap.get(a);return h!==null?(pe.isTrue(h.coord.equals2D(f),"Found equal nodes with different coordinates"),h):(this._nodeMap.put(a,a),a)}},{key:"checkSplitEdgesCorrectness",value:function(f){var n=this._edge.getCoordinates(),a=f.get(0).getCoordinate(0);if(!a.equals2D(n[0]))throw new Ce("bad split edge start point at "+a);var h=f.get(f.size()-1).getCoordinates(),v=h[h.length-1];if(!v.equals2D(n[n.length-1]))throw new Ce("bad split edge end point at "+v)}}],[{key:"constructor_",value:function(){this._nodeMap=new ur,this._edge=null;var f=arguments[0];this._edge=f}}])})(),jn=(function(){function f(){o(this,f)}return g(f,null,[{key:"octant",value:function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var n=arguments[0],a=arguments[1];if(n===0&&a===0)throw new V("Cannot compute the octant for point ( "+n+", "+a+" )");var h=Math.abs(n),v=Math.abs(a);return n>=0?a>=0?h>=v?0:1:h>=v?7:6:a>=0?h>=v?3:2:h>=v?4:5}if(arguments[0]instanceof J&&arguments[1]instanceof J){var I=arguments[0],R=arguments[1],T=R.x-I.x,O=R.y-I.y;if(T===0&&O===0)throw new V("Cannot compute the octant for two identical points "+I);return f.octant(T,O)}}}])})(),Bn=(function(){return g((function f(){o(this,f)}),[{key:"getCoordinates",value:function(){}},{key:"size",value:function(){}},{key:"getCoordinate",value:function(f){}},{key:"isClosed",value:function(){}},{key:"setData",value:function(f){}},{key:"getData",value:function(){}}])})(),Gn=(function(){return g((function f(){o(this,f)}),[{key:"addIntersection",value:function(f,n){}},{key:"interfaces_",get:function(){return[Bn]}}])})(),Zt=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"getCoordinates",value:function(){return this._pts}},{key:"size",value:function(){return this._pts.length}},{key:"getCoordinate",value:function(n){return this._pts[n]}},{key:"isClosed",value:function(){return this._pts[0].equals(this._pts[this._pts.length-1])}},{key:"getSegmentOctant",value:function(n){return n===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(n),this.getCoordinate(n+1))}},{key:"setData",value:function(n){this._data=n}},{key:"safeOctant",value:function(n,a){return n.equals2D(a)?0:jn.octant(n,a)}},{key:"getData",value:function(){return this._data}},{key:"addIntersection",value:function(){if(arguments.length===2){var n=arguments[0],a=arguments[1];this.addIntersectionNode(n,a)}else if(arguments.length===4){var h=arguments[1],v=arguments[3],I=new J(arguments[0].getIntersection(v));this.addIntersection(I,h)}}},{key:"toString",value:function(){return _r.toLineString(new bt(this._pts))}},{key:"getNodeList",value:function(){return this._nodeList}},{key:"addIntersectionNode",value:function(n,a){var h=a,v=h+1;if(v<this._pts.length){var I=this._pts[v];n.equals2D(I)&&(h=v)}return this._nodeList.add(n,h)}},{key:"addIntersections",value:function(n,a,h){for(var v=0;v<n.getIntersectionNum();v++)this.addIntersection(n,a,h,v)}},{key:"interfaces_",get:function(){return[Gn]}}],[{key:"constructor_",value:function(){this._nodeList=new Mn(this),this._pts=null,this._data=null;var n=arguments[0],a=arguments[1];this._pts=n,this._data=a}},{key:"getNodedSubstrings",value:function(){if(arguments.length===1){var n=arguments[0],a=new De;return f.getNodedSubstrings(n,a),a}if(arguments.length===2)for(var h=arguments[1],v=arguments[0].iterator();v.hasNext();)v.next().getNodeList().addSplitEdges(h)}}])})(),ft=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"minX",value:function(){return Math.min(this.p0.x,this.p1.x)}},{key:"orientationIndex",value:function(){if(arguments[0]instanceof f){var n=arguments[0],a=ke.index(this.p0,this.p1,n.p0),h=ke.index(this.p0,this.p1,n.p1);return a>=0&&h>=0||a<=0&&h<=0?Math.max(a,h):0}if(arguments[0]instanceof J){var v=arguments[0];return ke.index(this.p0,this.p1,v)}}},{key:"toGeometry",value:function(n){return n.createLineString([this.p0,this.p1])}},{key:"isVertical",value:function(){return this.p0.x===this.p1.x}},{key:"equals",value:function(n){if(!(n instanceof f))return!1;var a=n;return this.p0.equals(a.p0)&&this.p1.equals(a.p1)}},{key:"intersection",value:function(n){var a=new Wt;return a.computeIntersection(this.p0,this.p1,n.p0,n.p1),a.hasIntersection()?a.getIntersection(0):null}},{key:"project",value:function(){if(arguments[0]instanceof J){var n=arguments[0];if(n.equals(this.p0)||n.equals(this.p1))return new J(n);var a=this.projectionFactor(n),h=new J;return h.x=this.p0.x+a*(this.p1.x-this.p0.x),h.y=this.p0.y+a*(this.p1.y-this.p0.y),h}if(arguments[0]instanceof f){var v=arguments[0],I=this.projectionFactor(v.p0),R=this.projectionFactor(v.p1);if(I>=1&&R>=1||I<=0&&R<=0)return null;var T=this.project(v.p0);I<0&&(T=this.p0),I>1&&(T=this.p1);var O=this.project(v.p1);return R<0&&(O=this.p0),R>1&&(O=this.p1),new f(T,O)}}},{key:"normalize",value:function(){this.p1.compareTo(this.p0)<0&&this.reverse()}},{key:"angle",value:function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)}},{key:"getCoordinate",value:function(n){return n===0?this.p0:this.p1}},{key:"distancePerpendicular",value:function(n){return Qe.pointToLinePerpendicular(n,this.p0,this.p1)}},{key:"minY",value:function(){return Math.min(this.p0.y,this.p1.y)}},{key:"midPoint",value:function(){return f.midPoint(this.p0,this.p1)}},{key:"projectionFactor",value:function(n){if(n.equals(this.p0))return 0;if(n.equals(this.p1))return 1;var a=this.p1.x-this.p0.x,h=this.p1.y-this.p0.y,v=a*a+h*h;return v<=0?ce.NaN:((n.x-this.p0.x)*a+(n.y-this.p0.y)*h)/v}},{key:"closestPoints",value:function(n){var a=this.intersection(n);if(a!==null)return[a,a];var h=new Array(2).fill(null),v=ce.MAX_VALUE,I=null,R=this.closestPoint(n.p0);v=R.distance(n.p0),h[0]=R,h[1]=n.p0;var T=this.closestPoint(n.p1);(I=T.distance(n.p1))<v&&(v=I,h[0]=T,h[1]=n.p1);var O=n.closestPoint(this.p0);(I=O.distance(this.p0))<v&&(v=I,h[0]=this.p0,h[1]=O);var W=n.closestPoint(this.p1);return(I=W.distance(this.p1))<v&&(v=I,h[0]=this.p1,h[1]=W),h}},{key:"closestPoint",value:function(n){var a=this.projectionFactor(n);return a>0&&a<1?this.project(n):this.p0.distance(n)<this.p1.distance(n)?this.p0:this.p1}},{key:"maxX",value:function(){return Math.max(this.p0.x,this.p1.x)}},{key:"getLength",value:function(){return this.p0.distance(this.p1)}},{key:"compareTo",value:function(n){var a=n,h=this.p0.compareTo(a.p0);return h!==0?h:this.p1.compareTo(a.p1)}},{key:"reverse",value:function(){var n=this.p0;this.p0=this.p1,this.p1=n}},{key:"equalsTopo",value:function(n){return this.p0.equals(n.p0)&&this.p1.equals(n.p1)||this.p0.equals(n.p1)&&this.p1.equals(n.p0)}},{key:"lineIntersection",value:function(n){return Ot.intersection(this.p0,this.p1,n.p0,n.p1)}},{key:"maxY",value:function(){return Math.max(this.p0.y,this.p1.y)}},{key:"pointAlongOffset",value:function(n,a){var h=this.p0.x+n*(this.p1.x-this.p0.x),v=this.p0.y+n*(this.p1.y-this.p0.y),I=this.p1.x-this.p0.x,R=this.p1.y-this.p0.y,T=Math.sqrt(I*I+R*R),O=0,W=0;if(a!==0){if(T<=0)throw new IllegalStateException("Cannot compute offset from zero-length line segment");O=a*I/T,W=a*R/T}return new J(h-W,v+O)}},{key:"setCoordinates",value:function(){if(arguments.length===1){var n=arguments[0];this.setCoordinates(n.p0,n.p1)}else if(arguments.length===2){var a=arguments[0],h=arguments[1];this.p0.x=a.x,this.p0.y=a.y,this.p1.x=h.x,this.p1.y=h.y}}},{key:"segmentFraction",value:function(n){var a=this.projectionFactor(n);return a<0?a=0:(a>1||ce.isNaN(a))&&(a=1),a}},{key:"toString",value:function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"}},{key:"isHorizontal",value:function(){return this.p0.y===this.p1.y}},{key:"reflect",value:function(n){var a=this.p1.getY()-this.p0.getY(),h=this.p0.getX()-this.p1.getX(),v=this.p0.getY()*(this.p1.getX()-this.p0.getX())-this.p0.getX()*(this.p1.getY()-this.p0.getY()),I=a*a+h*h,R=a*a-h*h,T=n.getX(),O=n.getY();return new J((-R*T-2*a*h*O-2*a*v)/I,(R*O-2*a*h*T-2*h*v)/I)}},{key:"distance",value:function(){if(arguments[0]instanceof f){var n=arguments[0];return Qe.segmentToSegment(this.p0,this.p1,n.p0,n.p1)}if(arguments[0]instanceof J){var a=arguments[0];return Qe.pointToSegment(a,this.p0,this.p1)}}},{key:"pointAlong",value:function(n){var a=new J;return a.x=this.p0.x+n*(this.p1.x-this.p0.x),a.y=this.p0.y+n*(this.p1.y-this.p0.y),a}},{key:"hashCode",value:function(){var n=ce.doubleToLongBits(this.p0.x);n^=31*ce.doubleToLongBits(this.p0.y);var a=Math.trunc(n)^Math.trunc(n>>32),h=ce.doubleToLongBits(this.p1.x);return h^=31*ce.doubleToLongBits(this.p1.y),a^(Math.trunc(h)^Math.trunc(h>>32))}},{key:"interfaces_",get:function(){return[X,$]}}],[{key:"constructor_",value:function(){if(this.p0=null,this.p1=null,arguments.length===0)f.constructor_.call(this,new J,new J);else if(arguments.length===1){var n=arguments[0];f.constructor_.call(this,n.p0,n.p1)}else if(arguments.length===2){var a=arguments[0],h=arguments[1];this.p0=a,this.p1=h}else if(arguments.length===4){var v=arguments[0],I=arguments[1],R=arguments[2],T=arguments[3];f.constructor_.call(this,new J(v,I),new J(R,T))}}},{key:"midPoint",value:function(n,a){return new J((n.x+a.x)/2,(n.y+a.y)/2)}}])})(),qn=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"overlap",value:function(){if(arguments.length!==2){if(arguments.length===4){var f=arguments[1],n=arguments[2],a=arguments[3];arguments[0].getLineSegment(f,this._overlapSeg1),n.getLineSegment(a,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}}}}],[{key:"constructor_",value:function(){this._overlapSeg1=new ft,this._overlapSeg2=new ft}}])})(),Wr=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"getLineSegment",value:function(f,n){n.p0=this._pts[f],n.p1=this._pts[f+1]}},{key:"computeSelect",value:function(f,n,a,h){var v=this._pts[n],I=this._pts[a];if(a-n==1)return h.select(this,n),null;if(!f.intersects(v,I))return null;var R=Math.trunc((n+a)/2);n<R&&this.computeSelect(f,n,R,h),R<a&&this.computeSelect(f,R,a,h)}},{key:"getCoordinates",value:function(){for(var f=new Array(this._end-this._start+1).fill(null),n=0,a=this._start;a<=this._end;a++)f[n++]=this._pts[a];return f}},{key:"computeOverlaps",value:function(){if(arguments.length===2){var f=arguments[0],n=arguments[1];this.computeOverlaps(this._start,this._end,f,f._start,f._end,n)}else if(arguments.length===6){var a=arguments[0],h=arguments[1],v=arguments[2],I=arguments[3],R=arguments[4],T=arguments[5];if(h-a==1&&R-I==1)return T.overlap(this,a,v,I),null;if(!this.overlaps(a,h,v,I,R))return null;var O=Math.trunc((a+h)/2),W=Math.trunc((I+R)/2);a<O&&(I<W&&this.computeOverlaps(a,O,v,I,W,T),W<R&&this.computeOverlaps(a,O,v,W,R,T)),O<h&&(I<W&&this.computeOverlaps(O,h,v,I,W,T),W<R&&this.computeOverlaps(O,h,v,W,R,T))}}},{key:"setId",value:function(f){this._id=f}},{key:"select",value:function(f,n){this.computeSelect(f,this._start,this._end,n)}},{key:"getEnvelope",value:function(){if(this._env===null){var f=this._pts[this._start],n=this._pts[this._end];this._env=new ye(f,n)}return this._env}},{key:"overlaps",value:function(f,n,a,h,v){return ye.intersects(this._pts[f],this._pts[n],a._pts[h],a._pts[v])}},{key:"getEndIndex",value:function(){return this._end}},{key:"getStartIndex",value:function(){return this._start}},{key:"getContext",value:function(){return this._context}},{key:"getId",value:function(){return this._id}}],[{key:"constructor_",value:function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var f=arguments[0],n=arguments[1],a=arguments[2],h=arguments[3];this._pts=f,this._start=n,this._end=a,this._context=h}}])})(),Vn=(function(){function f(){o(this,f)}return g(f,null,[{key:"findChainEnd",value:function(n,a){for(var h=a;h<n.length-1&&n[h].equals2D(n[h+1]);)h++;if(h>=n.length-1)return n.length-1;for(var v=lt.quadrant(n[h],n[h+1]),I=a+1;I<n.length&&!(!n[I-1].equals2D(n[I])&&lt.quadrant(n[I-1],n[I])!==v);)I++;return I-1}},{key:"getChains",value:function(){if(arguments.length===1){var n=arguments[0];return f.getChains(n,null)}if(arguments.length===2){var a=arguments[0],h=arguments[1],v=new De,I=0;do{var R=f.findChainEnd(a,I),T=new Wr(a,I,R,h);v.add(T),I=R}while(I<a.length-1);return v}}}])})(),Cr=(function(){return g((function f(){o(this,f)}),[{key:"computeNodes",value:function(f){}},{key:"getNodedSubstrings",value:function(){}}])})(),Zr=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"setSegmentIntersector",value:function(f){this._segInt=f}},{key:"interfaces_",get:function(){return[Cr]}}],[{key:"constructor_",value:function(){if(this._segInt=null,arguments.length!==0){if(arguments.length===1){var f=arguments[0];this.setSegmentIntersector(f)}}}}])})(),Sr=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"getMonotoneChains",value:function(){return this._monoChains}},{key:"getNodedSubstrings",value:function(){return Zt.getNodedSubstrings(this._nodedSegStrings)}},{key:"getIndex",value:function(){return this._index}},{key:"add",value:function(a){for(var h=Vn.getChains(a.getCoordinates(),a).iterator();h.hasNext();){var v=h.next();v.setId(this._idCounter++),this._index.insert(v.getEnvelope(),v),this._monoChains.add(v)}}},{key:"computeNodes",value:function(a){this._nodedSegStrings=a;for(var h=a.iterator();h.hasNext();)this.add(h.next());this.intersectChains()}},{key:"intersectChains",value:function(){for(var a=new Xr(this._segInt),h=this._monoChains.iterator();h.hasNext();)for(var v=h.next(),I=this._index.query(v.getEnvelope()).iterator();I.hasNext();){var R=I.next();if(R.getId()>v.getId()&&(v.computeOverlaps(R,a),this._nOverlaps++),this._segInt.isDone())return null}}}],[{key:"constructor_",value:function(){if(this._monoChains=new De,this._index=new kt,this._idCounter=0,this._nodedSegStrings=null,this._nOverlaps=0,arguments.length!==0){if(arguments.length===1){var a=arguments[0];Zr.constructor_.call(this,a)}}}}])})(Zr),Xr=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"overlap",value:function(){if(arguments.length!==4)return A(n,"overlap",this,1).apply(this,arguments);var a=arguments[1],h=arguments[2],v=arguments[3],I=arguments[0].getContext(),R=h.getContext();this._si.processIntersections(I,a,R,v)}}],[{key:"constructor_",value:function(){this._si=null;var a=arguments[0];this._si=a}}])})(qn);Sr.SegmentOverlapAction=Xr;var Dt=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"isDeletable",value:function(n,a,h,v){var I=this._inputLine[n],R=this._inputLine[a],T=this._inputLine[h];return!!this.isConcave(I,R,T)&&!!this.isShallow(I,R,T,v)&&this.isShallowSampled(I,R,n,h,v)}},{key:"deleteShallowConcavities",value:function(){for(var n=1,a=this.findNextNonDeletedIndex(n),h=this.findNextNonDeletedIndex(a),v=!1;h<this._inputLine.length;){var I=!1;this.isDeletable(n,a,h,this._distanceTol)&&(this._isDeleted[a]=f.DELETE,I=!0,v=!0),n=I?h:a,a=this.findNextNonDeletedIndex(n),h=this.findNextNonDeletedIndex(a)}return v}},{key:"isShallowConcavity",value:function(n,a,h,v){return ke.index(n,a,h)===this._angleOrientation&&Qe.pointToSegment(a,n,h)<v}},{key:"isShallowSampled",value:function(n,a,h,v,I){var R=Math.trunc((v-h)/f.NUM_PTS_TO_CHECK);R<=0&&(R=1);for(var T=h;T<v;T+=R)if(!this.isShallow(n,a,this._inputLine[T],I))return!1;return!0}},{key:"isConcave",value:function(n,a,h){var v=ke.index(n,a,h)===this._angleOrientation;return v}},{key:"simplify",value:function(n){this._distanceTol=Math.abs(n),n<0&&(this._angleOrientation=ke.CLOCKWISE),this._isDeleted=new Array(this._inputLine.length).fill(null);var a=!1;do a=this.deleteShallowConcavities();while(a);return this.collapseLine()}},{key:"findNextNonDeletedIndex",value:function(n){for(var a=n+1;a<this._inputLine.length&&this._isDeleted[a]===f.DELETE;)a++;return a}},{key:"isShallow",value:function(n,a,h,v){return Qe.pointToSegment(a,n,h)<v}},{key:"collapseLine",value:function(){for(var n=new Rt,a=0;a<this._inputLine.length;a++)this._isDeleted[a]!==f.DELETE&&n.add(this._inputLine[a]);return n.toCoordinateArray()}}],[{key:"constructor_",value:function(){this._inputLine=null,this._distanceTol=null,this._isDeleted=null,this._angleOrientation=ke.COUNTERCLOCKWISE;var n=arguments[0];this._inputLine=n}},{key:"simplify",value:function(n,a){return new f(n).simplify(a)}}])})();Dt.INIT=0,Dt.DELETE=1,Dt.KEEP=1,Dt.NUM_PTS_TO_CHECK=10;var Yr=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"getCoordinates",value:function(){return this._ptList.toArray(f.COORDINATE_ARRAY_TYPE)}},{key:"setPrecisionModel",value:function(n){this._precisionModel=n}},{key:"addPt",value:function(n){var a=new J(n);if(this._precisionModel.makePrecise(a),this.isRedundant(a))return null;this._ptList.add(a)}},{key:"reverse",value:function(){}},{key:"addPts",value:function(n,a){if(a)for(var h=0;h<n.length;h++)this.addPt(n[h]);else for(var v=n.length-1;v>=0;v--)this.addPt(n[v])}},{key:"isRedundant",value:function(n){if(this._ptList.size()<1)return!1;var a=this._ptList.get(this._ptList.size()-1);return n.distance(a)<this._minimimVertexDistance}},{key:"toString",value:function(){return new Qt().createLineString(this.getCoordinates()).toString()}},{key:"closeRing",value:function(){if(this._ptList.size()<1)return null;var n=new J(this._ptList.get(0)),a=this._ptList.get(this._ptList.size()-1);if(n.equals(a))return null;this._ptList.add(n)}},{key:"setMinimumVertexDistance",value:function(n){this._minimimVertexDistance=n}}],[{key:"constructor_",value:function(){this._ptList=null,this._precisionModel=null,this._minimimVertexDistance=0,this._ptList=new De}}])})();Yr.COORDINATE_ARRAY_TYPE=new Array(0).fill(null);var pt=(function(){function f(){o(this,f)}return g(f,null,[{key:"toDegrees",value:function(n){return 180*n/Math.PI}},{key:"normalize",value:function(n){for(;n>Math.PI;)n-=f.PI_TIMES_2;for(;n<=-Math.PI;)n+=f.PI_TIMES_2;return n}},{key:"angle",value:function(){if(arguments.length===1){var n=arguments[0];return Math.atan2(n.y,n.x)}if(arguments.length===2){var a=arguments[0],h=arguments[1],v=h.x-a.x,I=h.y-a.y;return Math.atan2(I,v)}}},{key:"isAcute",value:function(n,a,h){var v=n.x-a.x,I=n.y-a.y;return v*(h.x-a.x)+I*(h.y-a.y)>0}},{key:"isObtuse",value:function(n,a,h){var v=n.x-a.x,I=n.y-a.y;return v*(h.x-a.x)+I*(h.y-a.y)<0}},{key:"interiorAngle",value:function(n,a,h){var v=f.angle(a,n),I=f.angle(a,h);return Math.abs(I-v)}},{key:"normalizePositive",value:function(n){if(n<0){for(;n<0;)n+=f.PI_TIMES_2;n>=f.PI_TIMES_2&&(n=0)}else{for(;n>=f.PI_TIMES_2;)n-=f.PI_TIMES_2;n<0&&(n=0)}return n}},{key:"angleBetween",value:function(n,a,h){var v=f.angle(a,n),I=f.angle(a,h);return f.diff(v,I)}},{key:"diff",value:function(n,a){var h=null;return(h=n<a?a-n:n-a)>Math.PI&&(h=2*Math.PI-h),h}},{key:"toRadians",value:function(n){return n*Math.PI/180}},{key:"getTurn",value:function(n,a){var h=Math.sin(a-n);return h>0?f.COUNTERCLOCKWISE:h<0?f.CLOCKWISE:f.NONE}},{key:"angleBetweenOriented",value:function(n,a,h){var v=f.angle(a,n),I=f.angle(a,h)-v;return I<=-Math.PI?I+f.PI_TIMES_2:I>Math.PI?I-f.PI_TIMES_2:I}}])})();pt.PI_TIMES_2=2*Math.PI,pt.PI_OVER_2=Math.PI/2,pt.PI_OVER_4=Math.PI/4,pt.COUNTERCLOCKWISE=ke.COUNTERCLOCKWISE,pt.CLOCKWISE=ke.CLOCKWISE,pt.NONE=ke.COLLINEAR;var or=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"addNextSegment",value:function(n,a){if(this._s0=this._s1,this._s1=this._s2,this._s2=n,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var h=ke.index(this._s0,this._s1,this._s2),v=h===ke.CLOCKWISE&&this._side===he.LEFT||h===ke.COUNTERCLOCKWISE&&this._side===he.RIGHT;h===0?this.addCollinear(a):v?this.addOutsideTurn(h,a):this.addInsideTurn(h,a)}},{key:"addLineEndCap",value:function(n,a){var h=new ft(n,a),v=new ft;this.computeOffsetSegment(h,he.LEFT,this._distance,v);var I=new ft;this.computeOffsetSegment(h,he.RIGHT,this._distance,I);var R=a.x-n.x,T=a.y-n.y,O=Math.atan2(T,R);switch(this._bufParams.getEndCapStyle()){case M.CAP_ROUND:this._segList.addPt(v.p1),this.addDirectedFillet(a,O+Math.PI/2,O-Math.PI/2,ke.CLOCKWISE,this._distance),this._segList.addPt(I.p1);break;case M.CAP_FLAT:this._segList.addPt(v.p1),this._segList.addPt(I.p1);break;case M.CAP_SQUARE:var W=new J;W.x=Math.abs(this._distance)*Math.cos(O),W.y=Math.abs(this._distance)*Math.sin(O);var re=new J(v.p1.x+W.x,v.p1.y+W.y),ne=new J(I.p1.x+W.x,I.p1.y+W.y);this._segList.addPt(re),this._segList.addPt(ne)}}},{key:"getCoordinates",value:function(){return this._segList.getCoordinates()}},{key:"addMitreJoin",value:function(n,a,h,v){var I=Ot.intersection(a.p0,a.p1,h.p0,h.p1);if(I!==null&&(v<=0?1:I.distance(n)/Math.abs(v))<=this._bufParams.getMitreLimit())return this._segList.addPt(I),null;this.addLimitedMitreJoin(a,h,v,this._bufParams.getMitreLimit())}},{key:"addOutsideTurn",value:function(n,a){if(this._offset0.p1.distance(this._offset1.p0)<this._distance*f.OFFSET_SEGMENT_SEPARATION_FACTOR)return this._segList.addPt(this._offset0.p1),null;this._bufParams.getJoinStyle()===M.JOIN_MITRE?this.addMitreJoin(this._s1,this._offset0,this._offset1,this._distance):this._bufParams.getJoinStyle()===M.JOIN_BEVEL?this.addBevelJoin(this._offset0,this._offset1):(a&&this._segList.addPt(this._offset0.p1),this.addCornerFillet(this._s1,this._offset0.p1,this._offset1.p0,n,this._distance),this._segList.addPt(this._offset1.p0))}},{key:"createSquare",value:function(n){this._segList.addPt(new J(n.x+this._distance,n.y+this._distance)),this._segList.addPt(new J(n.x+this._distance,n.y-this._distance)),this._segList.addPt(new J(n.x-this._distance,n.y-this._distance)),this._segList.addPt(new J(n.x-this._distance,n.y+this._distance)),this._segList.closeRing()}},{key:"addSegments",value:function(n,a){this._segList.addPts(n,a)}},{key:"addFirstSegment",value:function(){this._segList.addPt(this._offset1.p0)}},{key:"addCornerFillet",value:function(n,a,h,v,I){var R=a.x-n.x,T=a.y-n.y,O=Math.atan2(T,R),W=h.x-n.x,re=h.y-n.y,ne=Math.atan2(re,W);v===ke.CLOCKWISE?O<=ne&&(O+=2*Math.PI):O>=ne&&(O-=2*Math.PI),this._segList.addPt(a),this.addDirectedFillet(n,O,ne,v,I),this._segList.addPt(h)}},{key:"addLastSegment",value:function(){this._segList.addPt(this._offset1.p1)}},{key:"initSideSegments",value:function(n,a,h){this._s1=n,this._s2=a,this._side=h,this._seg1.setCoordinates(n,a),this.computeOffsetSegment(this._seg1,h,this._distance,this._offset1)}},{key:"addLimitedMitreJoin",value:function(n,a,h,v){var I=this._seg0.p1,R=pt.angle(I,this._seg0.p0),T=pt.angleBetweenOriented(this._seg0.p0,I,this._seg1.p1)/2,O=pt.normalize(R+T),W=pt.normalize(O+Math.PI),re=v*h,ne=h-re*Math.abs(Math.sin(T)),oe=I.x+re*Math.cos(W),_e=I.y+re*Math.sin(W),Se=new J(oe,_e),Ne=new ft(I,Se),Ge=Ne.pointAlongOffset(1,ne),Be=Ne.pointAlongOffset(1,-ne);this._side===he.LEFT?(this._segList.addPt(Ge),this._segList.addPt(Be)):(this._segList.addPt(Be),this._segList.addPt(Ge))}},{key:"addDirectedFillet",value:function(n,a,h,v,I){var R=v===ke.CLOCKWISE?-1:1,T=Math.abs(a-h),O=Math.trunc(T/this._filletAngleQuantum+.5);if(O<1)return null;for(var W=T/O,re=new J,ne=0;ne<O;ne++){var oe=a+R*ne*W;re.x=n.x+I*Math.cos(oe),re.y=n.y+I*Math.sin(oe),this._segList.addPt(re)}}},{key:"computeOffsetSegment",value:function(n,a,h,v){var I=a===he.LEFT?1:-1,R=n.p1.x-n.p0.x,T=n.p1.y-n.p0.y,O=Math.sqrt(R*R+T*T),W=I*h*R/O,re=I*h*T/O;v.p0.x=n.p0.x-re,v.p0.y=n.p0.y+W,v.p1.x=n.p1.x-re,v.p1.y=n.p1.y+W}},{key:"addInsideTurn",value:function(n,a){if(this._li.computeIntersection(this._offset0.p0,this._offset0.p1,this._offset1.p0,this._offset1.p1),this._li.hasIntersection())this._segList.addPt(this._li.getIntersection(0));else if(this._hasNarrowConcaveAngle=!0,this._offset0.p1.distance(this._offset1.p0)<this._distance*f.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR)this._segList.addPt(this._offset0.p1);else{if(this._segList.addPt(this._offset0.p1),this._closingSegLengthFactor>0){var h=new J((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(h);var v=new J((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(v)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}}},{key:"createCircle",value:function(n){var a=new J(n.x+this._distance,n.y);this._segList.addPt(a),this.addDirectedFillet(n,0,2*Math.PI,-1,this._distance),this._segList.closeRing()}},{key:"addBevelJoin",value:function(n,a){this._segList.addPt(n.p1),this._segList.addPt(a.p0)}},{key:"init",value:function(n){this._distance=n,this._maxCurveSegmentError=n*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new Yr,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(n*f.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)}},{key:"addCollinear",value:function(n){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2),this._li.getIntersectionNum()>=2&&(this._bufParams.getJoinStyle()===M.JOIN_BEVEL||this._bufParams.getJoinStyle()===M.JOIN_MITRE?(n&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addCornerFillet(this._s1,this._offset0.p1,this._offset1.p0,ke.CLOCKWISE,this._distance))}},{key:"closeRing",value:function(){this._segList.closeRing()}},{key:"hasNarrowConcaveAngle",value:function(){return this._hasNarrowConcaveAngle}}],[{key:"constructor_",value:function(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new ft,this._seg1=new ft,this._offset0=new ft,this._offset1=new ft,this._side=0,this._hasNarrowConcaveAngle=!1;var n=arguments[0],a=arguments[1],h=arguments[2];this._precisionModel=n,this._bufParams=a,this._li=new Wt,this._filletAngleQuantum=Math.PI/2/a.getQuadrantSegments(),a.getQuadrantSegments()>=8&&a.getJoinStyle()===M.JOIN_ROUND&&(this._closingSegLengthFactor=f.MAX_CLOSING_SEG_LEN_FACTOR),this.init(h)}}])})();or.OFFSET_SEGMENT_SEPARATION_FACTOR=.001,or.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR=.001,or.CURVE_VERTEX_SNAP_DISTANCE_FACTOR=1e-6,or.MAX_CLOSING_SEG_LEN_FACTOR=80;var Un=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"getOffsetCurve",value:function(n,a){if(this._distance=a,a===0)return null;var h=a<0,v=Math.abs(a),I=this.getSegGen(v);n.length<=1?this.computePointCurve(n[0],I):this.computeOffsetCurve(n,h,I);var R=I.getCoordinates();return h&&We.reverse(R),R}},{key:"computeSingleSidedBufferCurve",value:function(n,a,h){var v=this.simplifyTolerance(this._distance);if(a){h.addSegments(n,!0);var I=Dt.simplify(n,-v),R=I.length-1;h.initSideSegments(I[R],I[R-1],he.LEFT),h.addFirstSegment();for(var T=R-2;T>=0;T--)h.addNextSegment(I[T],!0)}else{h.addSegments(n,!1);var O=Dt.simplify(n,v),W=O.length-1;h.initSideSegments(O[0],O[1],he.LEFT),h.addFirstSegment();for(var re=2;re<=W;re++)h.addNextSegment(O[re],!0)}h.addLastSegment(),h.closeRing()}},{key:"computeRingBufferCurve",value:function(n,a,h){var v=this.simplifyTolerance(this._distance);a===he.RIGHT&&(v=-v);var I=Dt.simplify(n,v),R=I.length-1;h.initSideSegments(I[R-1],I[0],a);for(var T=1;T<=R;T++){var O=T!==1;h.addNextSegment(I[T],O)}h.closeRing()}},{key:"computeLineBufferCurve",value:function(n,a){var h=this.simplifyTolerance(this._distance),v=Dt.simplify(n,h),I=v.length-1;a.initSideSegments(v[0],v[1],he.LEFT);for(var R=2;R<=I;R++)a.addNextSegment(v[R],!0);a.addLastSegment(),a.addLineEndCap(v[I-1],v[I]);var T=Dt.simplify(n,-h),O=T.length-1;a.initSideSegments(T[O],T[O-1],he.LEFT);for(var W=O-2;W>=0;W--)a.addNextSegment(T[W],!0);a.addLastSegment(),a.addLineEndCap(T[1],T[0]),a.closeRing()}},{key:"computePointCurve",value:function(n,a){switch(this._bufParams.getEndCapStyle()){case M.CAP_ROUND:a.createCircle(n);break;case M.CAP_SQUARE:a.createSquare(n)}}},{key:"getLineCurve",value:function(n,a){if(this._distance=a,this.isLineOffsetEmpty(a))return null;var h=Math.abs(a),v=this.getSegGen(h);if(n.length<=1)this.computePointCurve(n[0],v);else if(this._bufParams.isSingleSided()){var I=a<0;this.computeSingleSidedBufferCurve(n,I,v)}else this.computeLineBufferCurve(n,v);return v.getCoordinates()}},{key:"getBufferParameters",value:function(){return this._bufParams}},{key:"simplifyTolerance",value:function(n){return n*this._bufParams.getSimplifyFactor()}},{key:"getRingCurve",value:function(n,a,h){if(this._distance=h,n.length<=2)return this.getLineCurve(n,h);if(h===0)return f.copyCoordinates(n);var v=this.getSegGen(h);return this.computeRingBufferCurve(n,a,v),v.getCoordinates()}},{key:"computeOffsetCurve",value:function(n,a,h){var v=this.simplifyTolerance(this._distance);if(a){var I=Dt.simplify(n,-v),R=I.length-1;h.initSideSegments(I[R],I[R-1],he.LEFT),h.addFirstSegment();for(var T=R-2;T>=0;T--)h.addNextSegment(I[T],!0)}else{var O=Dt.simplify(n,v),W=O.length-1;h.initSideSegments(O[0],O[1],he.LEFT),h.addFirstSegment();for(var re=2;re<=W;re++)h.addNextSegment(O[re],!0)}h.addLastSegment()}},{key:"isLineOffsetEmpty",value:function(n){return n===0||n<0&&!this._bufParams.isSingleSided()}},{key:"getSegGen",value:function(n){return new or(this._precisionModel,this._bufParams,n)}}],[{key:"constructor_",value:function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var n=arguments[0],a=arguments[1];this._precisionModel=n,this._bufParams=a}},{key:"copyCoordinates",value:function(n){for(var a=new Array(n.length).fill(null),h=0;h<a.length;h++)a[h]=new J(n[h]);return a}}])})(),Jr=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"findStabbedSegments",value:function(){if(arguments.length===1){for(var f=arguments[0],n=new De,a=this._subgraphs.iterator();a.hasNext();){var h=a.next(),v=h.getEnvelope();f.y<v.getMinY()||f.y>v.getMaxY()||this.findStabbedSegments(f,h.getDirectedEdges(),n)}return n}if(arguments.length===3){if(Le(arguments[2],Ve)&&arguments[0]instanceof J&&arguments[1]instanceof Ir){for(var I=arguments[0],R=arguments[1],T=arguments[2],O=R.getEdge().getCoordinates(),W=0;W<O.length-1;W++)if(this._seg.p0=O[W],this._seg.p1=O[W+1],this._seg.p0.y>this._seg.p1.y&&this._seg.reverse(),!(Math.max(this._seg.p0.x,this._seg.p1.x)<I.x||this._seg.isHorizontal()||I.y<this._seg.p0.y||I.y>this._seg.p1.y||ke.index(this._seg.p0,this._seg.p1,I)===ke.RIGHT)){var re=R.getDepth(he.LEFT);this._seg.p0.equals(O[W])||(re=R.getDepth(he.RIGHT));var ne=new Kr(this._seg,re);T.add(ne)}}else if(Le(arguments[2],Ve)&&arguments[0]instanceof J&&Le(arguments[1],Ve))for(var oe=arguments[0],_e=arguments[2],Se=arguments[1].iterator();Se.hasNext();){var Ne=Se.next();Ne.isForward()&&this.findStabbedSegments(oe,Ne,_e)}}}},{key:"getDepth",value:function(f){var n=this.findStabbedSegments(f);return n.size()===0?0:tr.min(n)._leftDepth}}],[{key:"constructor_",value:function(){this._subgraphs=null,this._seg=new ft;var f=arguments[0];this._subgraphs=f}}])})(),Kr=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"compareTo",value:function(f){var n=f;if(this._upwardSeg.minX()>=n._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=n._upwardSeg.minX())return-1;var a=this._upwardSeg.orientationIndex(n._upwardSeg);return a!==0||(a=-1*n._upwardSeg.orientationIndex(this._upwardSeg))!==0?a:this._upwardSeg.compareTo(n._upwardSeg)}},{key:"compareX",value:function(f,n){var a=f.p0.compareTo(n.p0);return a!==0?a:f.p1.compareTo(n.p1)}},{key:"toString",value:function(){return this._upwardSeg.toString()}},{key:"interfaces_",get:function(){return[X]}}],[{key:"constructor_",value:function(){this._upwardSeg=null,this._leftDepth=null;var f=arguments[0],n=arguments[1];this._upwardSeg=new ft(f),this._leftDepth=n}}])})();Jr.DepthSegment=Kr;var Qr=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,null,[{key:"constructor_",value:function(){z.constructor_.call(this,"Projective point not representable on the Cartesian plane.")}}])})(z),Rr=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"getY",value:function(){var n=this.y/this.w;if(ce.isNaN(n)||ce.isInfinite(n))throw new Qr;return n}},{key:"getX",value:function(){var n=this.x/this.w;if(ce.isNaN(n)||ce.isInfinite(n))throw new Qr;return n}},{key:"getCoordinate",value:function(){var n=new J;return n.x=this.getX(),n.y=this.getY(),n}}],[{key:"constructor_",value:function(){if(this.x=null,this.y=null,this.w=null,arguments.length===0)this.x=0,this.y=0,this.w=1;else if(arguments.length===1){var n=arguments[0];this.x=n.x,this.y=n.y,this.w=1}else if(arguments.length===2){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var a=arguments[0],h=arguments[1];this.x=a,this.y=h,this.w=1}else if(arguments[0]instanceof f&&arguments[1]instanceof f){var v=arguments[0],I=arguments[1];this.x=v.y*I.w-I.y*v.w,this.y=I.x*v.w-v.x*I.w,this.w=v.x*I.y-I.x*v.y}else if(arguments[0]instanceof J&&arguments[1]instanceof J){var R=arguments[0],T=arguments[1];this.x=R.y-T.y,this.y=T.x-R.x,this.w=R.x*T.y-T.x*R.y}}else if(arguments.length===3){var O=arguments[0],W=arguments[1],re=arguments[2];this.x=O,this.y=W,this.w=re}else if(arguments.length===4){var ne=arguments[0],oe=arguments[1],_e=arguments[2],Se=arguments[3],Ne=ne.y-oe.y,Ge=oe.x-ne.x,Be=ne.x*oe.y-oe.x*ne.y,$e=_e.y-Se.y,et=Se.x-_e.x,nt=_e.x*Se.y-Se.x*_e.y;this.x=Ge*nt-et*Be,this.y=$e*Be-Ne*nt,this.w=Ne*et-$e*Ge}}}])})(),zn=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"area",value:function(){return f.area(this.p0,this.p1,this.p2)}},{key:"signedArea",value:function(){return f.signedArea(this.p0,this.p1,this.p2)}},{key:"interpolateZ",value:function(n){if(n===null)throw new V("Supplied point is null.");return f.interpolateZ(n,this.p0,this.p1,this.p2)}},{key:"longestSideLength",value:function(){return f.longestSideLength(this.p0,this.p1,this.p2)}},{key:"isAcute",value:function(){return f.isAcute(this.p0,this.p1,this.p2)}},{key:"circumcentre",value:function(){return f.circumcentre(this.p0,this.p1,this.p2)}},{key:"area3D",value:function(){return f.area3D(this.p0,this.p1,this.p2)}},{key:"centroid",value:function(){return f.centroid(this.p0,this.p1,this.p2)}},{key:"inCentre",value:function(){return f.inCentre(this.p0,this.p1,this.p2)}}],[{key:"constructor_",value:function(){this.p0=null,this.p1=null,this.p2=null;var n=arguments[0],a=arguments[1],h=arguments[2];this.p0=n,this.p1=a,this.p2=h}},{key:"area",value:function(n,a,h){return Math.abs(((h.x-n.x)*(a.y-n.y)-(a.x-n.x)*(h.y-n.y))/2)}},{key:"signedArea",value:function(n,a,h){return((h.x-n.x)*(a.y-n.y)-(a.x-n.x)*(h.y-n.y))/2}},{key:"det",value:function(n,a,h,v){return n*v-a*h}},{key:"interpolateZ",value:function(n,a,h,v){var I=a.x,R=a.y,T=h.x-I,O=v.x-I,W=h.y-R,re=v.y-R,ne=T*re-O*W,oe=n.x-I,_e=n.y-R,Se=(re*oe-O*_e)/ne,Ne=(-W*oe+T*_e)/ne;return a.getZ()+Se*(h.getZ()-a.getZ())+Ne*(v.getZ()-a.getZ())}},{key:"longestSideLength",value:function(n,a,h){var v=n.distance(a),I=a.distance(h),R=h.distance(n),T=v;return I>T&&(T=I),R>T&&(T=R),T}},{key:"circumcentreDD",value:function(n,a,h){var v=we.valueOf(n.x).subtract(h.x),I=we.valueOf(n.y).subtract(h.y),R=we.valueOf(a.x).subtract(h.x),T=we.valueOf(a.y).subtract(h.y),O=we.determinant(v,I,R,T).multiply(2),W=v.sqr().add(I.sqr()),re=R.sqr().add(T.sqr()),ne=we.determinant(I,W,T,re),oe=we.determinant(v,W,R,re),_e=we.valueOf(h.x).subtract(ne.divide(O)).doubleValue(),Se=we.valueOf(h.y).add(oe.divide(O)).doubleValue();return new J(_e,Se)}},{key:"isAcute",value:function(n,a,h){return!!pt.isAcute(n,a,h)&&!!pt.isAcute(a,h,n)&&!!pt.isAcute(h,n,a)}},{key:"circumcentre",value:function(n,a,h){var v=h.x,I=h.y,R=n.x-v,T=n.y-I,O=a.x-v,W=a.y-I,re=2*f.det(R,T,O,W),ne=f.det(T,R*R+T*T,W,O*O+W*W),oe=f.det(R,R*R+T*T,O,O*O+W*W);return new J(v-ne/re,I+oe/re)}},{key:"perpendicularBisector",value:function(n,a){var h=a.x-n.x,v=a.y-n.y,I=new Rr(n.x+h/2,n.y+v/2,1),R=new Rr(n.x-v+h/2,n.y+h+v/2,1);return new Rr(I,R)}},{key:"angleBisector",value:function(n,a,h){var v=a.distance(n),I=v/(v+a.distance(h)),R=h.x-n.x,T=h.y-n.y;return new J(n.x+I*R,n.y+I*T)}},{key:"area3D",value:function(n,a,h){var v=a.x-n.x,I=a.y-n.y,R=a.getZ()-n.getZ(),T=h.x-n.x,O=h.y-n.y,W=h.getZ()-n.getZ(),re=I*W-R*O,ne=R*T-v*W,oe=v*O-I*T,_e=re*re+ne*ne+oe*oe,Se=Math.sqrt(_e)/2;return Se}},{key:"centroid",value:function(n,a,h){var v=(n.x+a.x+h.x)/3,I=(n.y+a.y+h.y)/3;return new J(v,I)}},{key:"inCentre",value:function(n,a,h){var v=a.distance(h),I=n.distance(h),R=n.distance(a),T=v+I+R,O=(v*n.x+I*a.x+R*h.x)/T,W=(v*n.y+I*a.y+R*h.y)/T;return new J(O,W)}}])})(),Hn=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"addRingSide",value:function(f,n,a,h,v){if(n===0&&f.length<ht.MINIMUM_VALID_SIZE)return null;var I=h,R=v;f.length>=ht.MINIMUM_VALID_SIZE&&ke.isCCW(f)&&(I=v,R=h,a=he.opposite(a));var T=this._curveBuilder.getRingCurve(f,a,n);this.addCurve(T,I,R)}},{key:"addRingBothSides",value:function(f,n){this.addRingSide(f,n,he.LEFT,q.EXTERIOR,q.INTERIOR),this.addRingSide(f,n,he.RIGHT,q.INTERIOR,q.EXTERIOR)}},{key:"addPoint",value:function(f){if(this._distance<=0)return null;var n=f.getCoordinates(),a=this._curveBuilder.getLineCurve(n,this._distance);this.addCurve(a,q.EXTERIOR,q.INTERIOR)}},{key:"addPolygon",value:function(f){var n=this._distance,a=he.LEFT;this._distance<0&&(n=-this._distance,a=he.RIGHT);var h=f.getExteriorRing(),v=We.removeRepeatedPoints(h.getCoordinates());if(this._distance<0&&this.isErodedCompletely(h,this._distance)||this._distance<=0&&v.length<3)return null;this.addRingSide(v,n,a,q.EXTERIOR,q.INTERIOR);for(var I=0;I<f.getNumInteriorRing();I++){var R=f.getInteriorRingN(I),T=We.removeRepeatedPoints(R.getCoordinates());this._distance>0&&this.isErodedCompletely(R,-this._distance)||this.addRingSide(T,n,he.opposite(a),q.INTERIOR,q.EXTERIOR)}}},{key:"isTriangleErodedCompletely",value:function(f,n){var a=new zn(f[0],f[1],f[2]),h=a.inCentre();return Qe.pointToSegment(h,a.p0,a.p1)<Math.abs(n)}},{key:"addLineString",value:function(f){if(this._curveBuilder.isLineOffsetEmpty(this._distance))return null;var n=We.removeRepeatedPoints(f.getCoordinates());if(We.isRing(n)&&!this._curveBuilder.getBufferParameters().isSingleSided())this.addRingBothSides(n,this._distance);else{var a=this._curveBuilder.getLineCurve(n,this._distance);this.addCurve(a,q.EXTERIOR,q.INTERIOR)}}},{key:"addCurve",value:function(f,n,a){if(f===null||f.length<2)return null;var h=new Zt(f,new xt(0,q.BOUNDARY,n,a));this._curveList.add(h)}},{key:"getCurves",value:function(){return this.add(this._inputGeom),this._curveList}},{key:"add",value:function(f){if(f.isEmpty())return null;if(f instanceof Pt)this.addPolygon(f);else if(f instanceof Ie)this.addLineString(f);else if(f instanceof He)this.addPoint(f);else if(f instanceof St)this.addCollection(f);else if(f instanceof vr)this.addCollection(f);else if(f instanceof yr)this.addCollection(f);else{if(!(f instanceof Ke))throw new je(f.getGeometryType());this.addCollection(f)}}},{key:"isErodedCompletely",value:function(f,n){var a=f.getCoordinates();if(a.length<4)return n<0;if(a.length===4)return this.isTriangleErodedCompletely(a,n);var h=f.getEnvelopeInternal(),v=Math.min(h.getHeight(),h.getWidth());return n<0&&2*Math.abs(n)>v}},{key:"addCollection",value:function(f){for(var n=0;n<f.getNumGeometries();n++){var a=f.getGeometryN(n);this.add(a)}}}],[{key:"constructor_",value:function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new De;var f=arguments[0],n=arguments[1],a=arguments[2];this._inputGeom=f,this._distance=n,this._curveBuilder=a}}])})(),$n=(function(){return g((function f(){o(this,f)}),[{key:"locate",value:function(f){}}])})(),Wn=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"next",value:function(){if(this._atStart)return this._atStart=!1,f.isAtomic(this._parent)&&this._index++,this._parent;if(this._subcollectionIterator!==null){if(this._subcollectionIterator.hasNext())return this._subcollectionIterator.next();this._subcollectionIterator=null}if(this._index>=this._max)throw new Oe;var n=this._parent.getGeometryN(this._index++);return n instanceof Ke?(this._subcollectionIterator=new f(n),this._subcollectionIterator.next()):n}},{key:"remove",value:function(){throw new je(this.getClass().getName())}},{key:"hasNext",value:function(){if(this._atStart)return!0;if(this._subcollectionIterator!==null){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)}},{key:"interfaces_",get:function(){return[Fn]}}],[{key:"constructor_",value:function(){this._parent=null,this._atStart=null,this._max=null,this._index=null,this._subcollectionIterator=null;var n=arguments[0];this._parent=n,this._atStart=!0,this._index=0,this._max=n.getNumGeometries()}},{key:"isAtomic",value:function(n){return!(n instanceof Ke)}}])})(),Zn=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"locate",value:function(n){return f.locate(n,this._geom)}},{key:"interfaces_",get:function(){return[$n]}}],[{key:"constructor_",value:function(){this._geom=null;var n=arguments[0];this._geom=n}},{key:"locatePointInPolygon",value:function(n,a){if(a.isEmpty())return q.EXTERIOR;var h=a.getExteriorRing(),v=f.locatePointInRing(n,h);if(v!==q.INTERIOR)return v;for(var I=0;I<a.getNumInteriorRing();I++){var R=a.getInteriorRingN(I),T=f.locatePointInRing(n,R);if(T===q.BOUNDARY)return q.BOUNDARY;if(T===q.INTERIOR)return q.EXTERIOR}return q.INTERIOR}},{key:"locatePointInRing",value:function(n,a){return a.getEnvelopeInternal().intersects(n)?xr.locateInRing(n,a.getCoordinates()):q.EXTERIOR}},{key:"containsPointInPolygon",value:function(n,a){return q.EXTERIOR!==f.locatePointInPolygon(n,a)}},{key:"locateInGeometry",value:function(n,a){if(a instanceof Pt)return f.locatePointInPolygon(n,a);if(a instanceof Ke)for(var h=new Wn(a);h.hasNext();){var v=h.next();if(v!==a){var I=f.locateInGeometry(n,v);if(I!==q.EXTERIOR)return I}}return q.EXTERIOR}},{key:"isContained",value:function(n,a){return q.EXTERIOR!==f.locate(n,a)}},{key:"locate",value:function(n,a){return a.isEmpty()?q.EXTERIOR:a.getEnvelopeInternal().intersects(n)?f.locateInGeometry(n,a):q.EXTERIOR}}])})(),Xn=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"getNextCW",value:function(f){this.getEdges();var n=this._edgeList.indexOf(f),a=n-1;return n===0&&(a=this._edgeList.size()-1),this._edgeList.get(a)}},{key:"propagateSideLabels",value:function(f){for(var n=q.NONE,a=this.iterator();a.hasNext();){var h=a.next().getLabel();h.isArea(f)&&h.getLocation(f,he.LEFT)!==q.NONE&&(n=h.getLocation(f,he.LEFT))}if(n===q.NONE)return null;for(var v=n,I=this.iterator();I.hasNext();){var R=I.next(),T=R.getLabel();if(T.getLocation(f,he.ON)===q.NONE&&T.setLocation(f,he.ON,v),T.isArea(f)){var O=T.getLocation(f,he.LEFT),W=T.getLocation(f,he.RIGHT);if(W!==q.NONE){if(W!==v)throw new at("side location conflict",R.getCoordinate());O===q.NONE&&pe.shouldNeverReachHere("found single null side (at "+R.getCoordinate()+")"),v=O}else pe.isTrue(T.getLocation(f,he.LEFT)===q.NONE,"found single null side"),T.setLocation(f,he.RIGHT,v),T.setLocation(f,he.LEFT,v)}}}},{key:"getCoordinate",value:function(){var f=this.iterator();return f.hasNext()?f.next().getCoordinate():null}},{key:"print",value:function(f){Je.out.println("EdgeEndStar: "+this.getCoordinate());for(var n=this.iterator();n.hasNext();)n.next().print(f)}},{key:"isAreaLabelsConsistent",value:function(f){return this.computeEdgeEndLabels(f.getBoundaryNodeRule()),this.checkAreaLabelsConsistent(0)}},{key:"checkAreaLabelsConsistent",value:function(f){var n=this.getEdges();if(n.size()<=0)return!0;var a=n.size()-1,h=n.get(a).getLabel().getLocation(f,he.LEFT);pe.isTrue(h!==q.NONE,"Found unlabelled area edge");for(var v=h,I=this.iterator();I.hasNext();){var R=I.next().getLabel();pe.isTrue(R.isArea(f),"Found non-area edge");var T=R.getLocation(f,he.LEFT),O=R.getLocation(f,he.RIGHT);if(T===O||O!==v)return!1;v=T}return!0}},{key:"findIndex",value:function(f){this.iterator();for(var n=0;n<this._edgeList.size();n++)if(this._edgeList.get(n)===f)return n;return-1}},{key:"iterator",value:function(){return this.getEdges().iterator()}},{key:"getEdges",value:function(){return this._edgeList===null&&(this._edgeList=new De(this._edgeMap.values())),this._edgeList}},{key:"getLocation",value:function(f,n,a){return this._ptInAreaLocation[f]===q.NONE&&(this._ptInAreaLocation[f]=Zn.locate(n,a[f].getGeometry())),this._ptInAreaLocation[f]}},{key:"toString",value:function(){var f=new tt;f.append("EdgeEndStar: "+this.getCoordinate()),f.append(`
4
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function k(f){var n=(function(a,h){if(typeof a!="object"||!a)return a;var v=a[Symbol.toPrimitive];if(v!==void 0){var I=v.call(a,h);if(typeof I!="object")return I;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(a)})(f,"string");return typeof n=="symbol"?n:n+""}function L(f,n){if(f){if(typeof f=="string")return r(f,n);var a={}.toString.call(f).slice(8,-1);return a==="Object"&&f.constructor&&(a=f.constructor.name),a==="Map"||a==="Set"?Array.from(f):a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?r(f,n):void 0}}function G(f){var n=typeof Map=="function"?new Map:void 0;return G=function(a){if(a===null||!(function(v){try{return Function.toString.call(v).indexOf("[native code]")!==-1}catch{return typeof v=="function"}})(a))return a;if(typeof a!="function")throw new TypeError("Super expression must either be null or a function");if(n!==void 0){if(n.has(a))return n.get(a);n.set(a,h)}function h(){return d(a,arguments,x(this).constructor)}return h.prototype=Object.create(a.prototype,{constructor:{value:h,enumerable:!1,writable:!0,configurable:!0}}),S(h,a)},G(f)}var M=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"getEndCapStyle",value:function(){return this._endCapStyle}},{key:"isSingleSided",value:function(){return this._isSingleSided}},{key:"setQuadrantSegments",value:function(n){this._quadrantSegments=n,this._quadrantSegments===0&&(this._joinStyle=f.JOIN_BEVEL),this._quadrantSegments<0&&(this._joinStyle=f.JOIN_MITRE,this._mitreLimit=Math.abs(this._quadrantSegments)),n<=0&&(this._quadrantSegments=1),this._joinStyle!==f.JOIN_ROUND&&(this._quadrantSegments=f.DEFAULT_QUADRANT_SEGMENTS)}},{key:"getJoinStyle",value:function(){return this._joinStyle}},{key:"setJoinStyle",value:function(n){this._joinStyle=n}},{key:"setSimplifyFactor",value:function(n){this._simplifyFactor=n<0?0:n}},{key:"getSimplifyFactor",value:function(){return this._simplifyFactor}},{key:"getQuadrantSegments",value:function(){return this._quadrantSegments}},{key:"setEndCapStyle",value:function(n){this._endCapStyle=n}},{key:"getMitreLimit",value:function(){return this._mitreLimit}},{key:"setMitreLimit",value:function(n){this._mitreLimit=n}},{key:"setSingleSided",value:function(n){this._isSingleSided=n}}],[{key:"constructor_",value:function(){if(this._quadrantSegments=f.DEFAULT_QUADRANT_SEGMENTS,this._endCapStyle=f.CAP_ROUND,this._joinStyle=f.JOIN_ROUND,this._mitreLimit=f.DEFAULT_MITRE_LIMIT,this._isSingleSided=!1,this._simplifyFactor=f.DEFAULT_SIMPLIFY_FACTOR,arguments.length!==0){if(arguments.length===1){var n=arguments[0];this.setQuadrantSegments(n)}else if(arguments.length===2){var a=arguments[0],h=arguments[1];this.setQuadrantSegments(a),this.setEndCapStyle(h)}else if(arguments.length===4){var v=arguments[0],I=arguments[1],R=arguments[2],T=arguments[3];this.setQuadrantSegments(v),this.setEndCapStyle(I),this.setJoinStyle(R),this.setMitreLimit(T)}}}},{key:"bufferDistanceError",value:function(n){var a=Math.PI/2/n;return 1-Math.cos(a/2)}}])})();M.CAP_ROUND=1,M.CAP_FLAT=2,M.CAP_SQUARE=3,M.JOIN_ROUND=1,M.JOIN_MITRE=2,M.JOIN_BEVEL=3,M.DEFAULT_QUADRANT_SEGMENTS=8,M.DEFAULT_MITRE_LIMIT=5,M.DEFAULT_SIMPLIFY_FACTOR=.01;var z=(function(f){function n(a){var h;return o(this,n),(h=s(this,n,[a])).name=Object.keys({Exception:n})[0],h}return E(n,f),g(n,[{key:"toString",value:function(){return this.message}}])})(G(Error)),V=(function(f){function n(a){var h;return o(this,n),(h=s(this,n,[a])).name=Object.keys({IllegalArgumentException:n})[0],h}return E(n,f),g(n)})(z),Y=(function(){return g((function f(){o(this,f)}),[{key:"filter",value:function(f){}}])})();function X(){}function Q(){}function $(){}var K,ee,se,ie,te,ue,le,fe,ve=(function(){return g((function f(){o(this,f)}),null,[{key:"equalsWithTolerance",value:function(f,n,a){return Math.abs(f-n)<=a}}])})(),xe=(function(){return g((function f(n,a){o(this,f),this.low=a||0,this.high=n||0}),null,[{key:"toBinaryString",value:function(f){var n,a="";for(n=2147483648;n>0;n>>>=1)a+=(f.high&n)===n?"1":"0";for(n=2147483648;n>0;n>>>=1)a+=(f.low&n)===n?"1":"0";return a}}])})();function ce(){}function Te(){}ce.NaN=NaN,ce.isNaN=function(f){return Number.isNaN(f)},ce.isInfinite=function(f){return!Number.isFinite(f)},ce.MAX_VALUE=Number.MAX_VALUE,ce.POSITIVE_INFINITY=Number.POSITIVE_INFINITY,ce.NEGATIVE_INFINITY=Number.NEGATIVE_INFINITY,typeof Float64Array=="function"&&typeof Int32Array=="function"?(ue=2146435072,le=new Float64Array(1),fe=new Int32Array(le.buffer),ce.doubleToLongBits=function(f){le[0]=f;var n=0|fe[0],a=0|fe[1];return(a&ue)===ue&&1048575&a&&n!==0&&(n=0,a=2146959360),new xe(a,n)},ce.longBitsToDouble=function(f){return fe[0]=f.low,fe[1]=f.high,le[0]}):(K=1023,ee=Math.log2,se=Math.floor,ie=Math.pow,te=(function(){for(var f=53;f>0;f--){var n=ie(2,f)-1;if(se(ee(n))+1===f)return n}return 0})(),ce.doubleToLongBits=function(f){var n,a,h,v,I,R,T,O,W;if(f<0||1/f===Number.NEGATIVE_INFINITY?(R=1<<31,f=-f):R=0,f===0)return new xe(O=R,W=0);if(f===1/0)return new xe(O=2146435072|R,W=0);if(f!=f)return new xe(O=2146959360,W=0);if(v=0,W=0,(n=se(f))>1)if(n<=te)(v=se(ee(n)))<=20?(W=0,O=n<<20-v&1048575):(W=n%(a=ie(2,h=v-20))<<32-h,O=n/a&1048575);else for(h=n,W=0;(h=se(a=h/2))!==0;)v++,W>>>=1,W|=(1&O)<<31,O>>>=1,a!==h&&(O|=524288);if(T=v+K,I=n===0,n=f-n,v<52&&n!==0)for(h=0;;){if((a=2*n)>=1?(n=a-1,I?(T--,I=!1):(h<<=1,h|=1,v++)):(n=a,I?--T==0&&(v++,I=!1):(h<<=1,v++)),v===20)O|=h,h=0;else if(v===52){W|=h;break}if(a===1){v<20?O|=h<<20-v:v<52&&(W|=h<<52-v);break}}return O|=T<<20,new xe(O|=R,W)},ce.longBitsToDouble=function(f){var n,a,h,v,I=f.high,R=f.low,T=I&1<<31?-1:1;for(h=((2146435072&I)>>20)-K,v=0,a=1<<19,n=1;n<=20;n++)I&a&&(v+=ie(2,-n)),a>>>=1;for(a=1<<31,n=21;n<=52;n++)R&a&&(v+=ie(2,-n)),a>>>=1;if(h===-1023){if(v===0)return 0*T;h=-1022}else{if(h===1024)return v===0?T/0:NaN;v+=1}return T*v*ie(2,h)});var Ce=(function(f){function n(a){var h;return o(this,n),(h=s(this,n,[a])).name=Object.keys({RuntimeException:n})[0],h}return E(n,f),g(n)})(z),me=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,null,[{key:"constructor_",value:function(){if(arguments.length===0)Ce.constructor_.call(this);else if(arguments.length===1){var a=arguments[0];Ce.constructor_.call(this,a)}}}])})(Ce),pe=(function(){function f(){o(this,f)}return g(f,null,[{key:"shouldNeverReachHere",value:function(){if(arguments.length===0)f.shouldNeverReachHere(null);else if(arguments.length===1){var n=arguments[0];throw new me("Should never reach here"+(n!==null?": "+n:""))}}},{key:"isTrue",value:function(){if(arguments.length===1){var n=arguments[0];f.isTrue(n,null)}else if(arguments.length===2){var a=arguments[1];if(!arguments[0])throw a===null?new me:new me(a)}}},{key:"equals",value:function(){if(arguments.length===2){var n=arguments[0],a=arguments[1];f.equals(n,a,null)}else if(arguments.length===3){var h=arguments[0],v=arguments[1],I=arguments[2];if(!v.equals(h))throw new me("Expected "+h+" but encountered "+v+(I!==null?": "+I:""))}}}])})(),Ee=new ArrayBuffer(8),Ae=new Float64Array(Ee),Pe=new Int32Array(Ee),J=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"getM",value:function(){return ce.NaN}},{key:"setOrdinate",value:function(n,a){switch(n){case f.X:this.x=a;break;case f.Y:this.y=a;break;case f.Z:this.setZ(a);break;default:throw new V("Invalid ordinate index: "+n)}}},{key:"equals2D",value:function(){if(arguments.length===1){var n=arguments[0];return this.x===n.x&&this.y===n.y}if(arguments.length===2){var a=arguments[0],h=arguments[1];return!!ve.equalsWithTolerance(this.x,a.x,h)&&!!ve.equalsWithTolerance(this.y,a.y,h)}}},{key:"setM",value:function(n){throw new V("Invalid ordinate index: "+f.M)}},{key:"getZ",value:function(){return this.z}},{key:"getOrdinate",value:function(n){switch(n){case f.X:return this.x;case f.Y:return this.y;case f.Z:return this.getZ()}throw new V("Invalid ordinate index: "+n)}},{key:"equals3D",value:function(n){return this.x===n.x&&this.y===n.y&&(this.getZ()===n.getZ()||ce.isNaN(this.getZ())&&ce.isNaN(n.getZ()))}},{key:"equals",value:function(n){return n instanceof f&&this.equals2D(n)}},{key:"equalInZ",value:function(n,a){return ve.equalsWithTolerance(this.getZ(),n.getZ(),a)}},{key:"setX",value:function(n){this.x=n}},{key:"compareTo",value:function(n){var a=n;return this.x<a.x?-1:this.x>a.x?1:this.y<a.y?-1:this.y>a.y?1:0}},{key:"getX",value:function(){return this.x}},{key:"setZ",value:function(n){this.z=n}},{key:"clone",value:function(){try{return null}catch(n){if(n instanceof CloneNotSupportedException)return pe.shouldNeverReachHere("this shouldn't happen because this class is Cloneable"),null;throw n}}},{key:"copy",value:function(){return new f(this)}},{key:"toString",value:function(){return"("+this.x+", "+this.y+", "+this.getZ()+")"}},{key:"distance3D",value:function(n){var a=this.x-n.x,h=this.y-n.y,v=this.getZ()-n.getZ();return Math.sqrt(a*a+h*h+v*v)}},{key:"getY",value:function(){return this.y}},{key:"setY",value:function(n){this.y=n}},{key:"distance",value:function(n){var a=this.x-n.x,h=this.y-n.y;return Math.sqrt(a*a+h*h)}},{key:"hashCode",value:function(){var n=17;return n=37*(n=37*n+f.hashCode(this.x))+f.hashCode(this.y)}},{key:"setCoordinate",value:function(n){this.x=n.x,this.y=n.y,this.z=n.getZ()}},{key:"interfaces_",get:function(){return[X,Q,$]}}],[{key:"constructor_",value:function(){if(this.x=null,this.y=null,this.z=null,arguments.length===0)f.constructor_.call(this,0,0);else if(arguments.length===1){var n=arguments[0];f.constructor_.call(this,n.x,n.y,n.getZ())}else if(arguments.length===2){var a=arguments[0],h=arguments[1];f.constructor_.call(this,a,h,f.NULL_ORDINATE)}else if(arguments.length===3){var v=arguments[0],I=arguments[1],R=arguments[2];this.x=v,this.y=I,this.z=R}}},{key:"hashCode",value:function(n){return Ae[0]=n,Pe[0]^Pe[1]}}])})(),Ue=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"compare",value:function(n,a){var h=f.compare(n.x,a.x);if(h!==0)return h;var v=f.compare(n.y,a.y);return v!==0?v:this._dimensionsToTest<=2?0:f.compare(n.getZ(),a.getZ())}},{key:"interfaces_",get:function(){return[Te]}}],[{key:"constructor_",value:function(){if(this._dimensionsToTest=2,arguments.length===0)f.constructor_.call(this,2);else if(arguments.length===1){var n=arguments[0];if(n!==2&&n!==3)throw new V("only 2 or 3 dimensions may be specified");this._dimensionsToTest=n}}},{key:"compare",value:function(n,a){return n<a?-1:n>a?1:ce.isNaN(n)?ce.isNaN(a)?0:-1:ce.isNaN(a)?1:0}}])})();J.DimensionalComparator=Ue,J.NULL_ORDINATE=ce.NaN,J.X=0,J.Y=1,J.Z=2,J.M=3;var ye=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"getArea",value:function(){return this.getWidth()*this.getHeight()}},{key:"equals",value:function(n){if(!(n instanceof f))return!1;var a=n;return this.isNull()?a.isNull():this._maxx===a.getMaxX()&&this._maxy===a.getMaxY()&&this._minx===a.getMinX()&&this._miny===a.getMinY()}},{key:"intersection",value:function(n){if(this.isNull()||n.isNull()||!this.intersects(n))return new f;var a=this._minx>n._minx?this._minx:n._minx,h=this._miny>n._miny?this._miny:n._miny;return new f(a,this._maxx<n._maxx?this._maxx:n._maxx,h,this._maxy<n._maxy?this._maxy:n._maxy)}},{key:"isNull",value:function(){return this._maxx<this._minx}},{key:"getMaxX",value:function(){return this._maxx}},{key:"covers",value:function(){if(arguments.length===1){if(arguments[0]instanceof J){var n=arguments[0];return this.covers(n.x,n.y)}if(arguments[0]instanceof f){var a=arguments[0];return!this.isNull()&&!a.isNull()&&a.getMinX()>=this._minx&&a.getMaxX()<=this._maxx&&a.getMinY()>=this._miny&&a.getMaxY()<=this._maxy}}else if(arguments.length===2){var h=arguments[0],v=arguments[1];return!this.isNull()&&h>=this._minx&&h<=this._maxx&&v>=this._miny&&v<=this._maxy}}},{key:"intersects",value:function(){if(arguments.length===1){if(arguments[0]instanceof f){var n=arguments[0];return!this.isNull()&&!n.isNull()&&!(n._minx>this._maxx||n._maxx<this._minx||n._miny>this._maxy||n._maxy<this._miny)}if(arguments[0]instanceof J){var a=arguments[0];return this.intersects(a.x,a.y)}}else if(arguments.length===2){if(arguments[0]instanceof J&&arguments[1]instanceof J){var h=arguments[0],v=arguments[1];return!this.isNull()&&!((h.x<v.x?h.x:v.x)>this._maxx)&&!((h.x>v.x?h.x:v.x)<this._minx)&&!((h.y<v.y?h.y:v.y)>this._maxy)&&!((h.y>v.y?h.y:v.y)<this._miny)}if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var I=arguments[0],R=arguments[1];return!this.isNull()&&!(I>this._maxx||I<this._minx||R>this._maxy||R<this._miny)}}}},{key:"getMinY",value:function(){return this._miny}},{key:"getDiameter",value:function(){if(this.isNull())return 0;var n=this.getWidth(),a=this.getHeight();return Math.sqrt(n*n+a*a)}},{key:"getMinX",value:function(){return this._minx}},{key:"expandToInclude",value:function(){if(arguments.length===1){if(arguments[0]instanceof J){var n=arguments[0];this.expandToInclude(n.x,n.y)}else if(arguments[0]instanceof f){var a=arguments[0];if(a.isNull())return null;this.isNull()?(this._minx=a.getMinX(),this._maxx=a.getMaxX(),this._miny=a.getMinY(),this._maxy=a.getMaxY()):(a._minx<this._minx&&(this._minx=a._minx),a._maxx>this._maxx&&(this._maxx=a._maxx),a._miny<this._miny&&(this._miny=a._miny),a._maxy>this._maxy&&(this._maxy=a._maxy))}}else if(arguments.length===2){var h=arguments[0],v=arguments[1];this.isNull()?(this._minx=h,this._maxx=h,this._miny=v,this._maxy=v):(h<this._minx&&(this._minx=h),h>this._maxx&&(this._maxx=h),v<this._miny&&(this._miny=v),v>this._maxy&&(this._maxy=v))}}},{key:"minExtent",value:function(){if(this.isNull())return 0;var n=this.getWidth(),a=this.getHeight();return n<a?n:a}},{key:"getWidth",value:function(){return this.isNull()?0:this._maxx-this._minx}},{key:"compareTo",value:function(n){var a=n;return this.isNull()?a.isNull()?0:-1:a.isNull()?1:this._minx<a._minx?-1:this._minx>a._minx?1:this._miny<a._miny?-1:this._miny>a._miny?1:this._maxx<a._maxx?-1:this._maxx>a._maxx?1:this._maxy<a._maxy?-1:this._maxy>a._maxy?1:0}},{key:"translate",value:function(n,a){if(this.isNull())return null;this.init(this.getMinX()+n,this.getMaxX()+n,this.getMinY()+a,this.getMaxY()+a)}},{key:"copy",value:function(){return new f(this)}},{key:"toString",value:function(){return"Env["+this._minx+" : "+this._maxx+", "+this._miny+" : "+this._maxy+"]"}},{key:"setToNull",value:function(){this._minx=0,this._maxx=-1,this._miny=0,this._maxy=-1}},{key:"disjoint",value:function(n){return!(!this.isNull()&&!n.isNull())||n._minx>this._maxx||n._maxx<this._minx||n._miny>this._maxy||n._maxy<this._miny}},{key:"getHeight",value:function(){return this.isNull()?0:this._maxy-this._miny}},{key:"maxExtent",value:function(){if(this.isNull())return 0;var n=this.getWidth(),a=this.getHeight();return n>a?n:a}},{key:"expandBy",value:function(){if(arguments.length===1){var n=arguments[0];this.expandBy(n,n)}else if(arguments.length===2){var a=arguments[0],h=arguments[1];if(this.isNull())return null;this._minx-=a,this._maxx+=a,this._miny-=h,this._maxy+=h,(this._minx>this._maxx||this._miny>this._maxy)&&this.setToNull()}}},{key:"contains",value:function(){if(arguments.length===1){if(arguments[0]instanceof f){var n=arguments[0];return this.covers(n)}if(arguments[0]instanceof J){var a=arguments[0];return this.covers(a)}}else if(arguments.length===2){var h=arguments[0],v=arguments[1];return this.covers(h,v)}}},{key:"centre",value:function(){return this.isNull()?null:new J((this.getMinX()+this.getMaxX())/2,(this.getMinY()+this.getMaxY())/2)}},{key:"init",value:function(){if(arguments.length===0)this.setToNull();else if(arguments.length===1){if(arguments[0]instanceof J){var n=arguments[0];this.init(n.x,n.x,n.y,n.y)}else if(arguments[0]instanceof f){var a=arguments[0];this._minx=a._minx,this._maxx=a._maxx,this._miny=a._miny,this._maxy=a._maxy}}else if(arguments.length===2){var h=arguments[0],v=arguments[1];this.init(h.x,v.x,h.y,v.y)}else if(arguments.length===4){var I=arguments[0],R=arguments[1],T=arguments[2],O=arguments[3];I<R?(this._minx=I,this._maxx=R):(this._minx=R,this._maxx=I),T<O?(this._miny=T,this._maxy=O):(this._miny=O,this._maxy=T)}}},{key:"getMaxY",value:function(){return this._maxy}},{key:"distance",value:function(n){if(this.intersects(n))return 0;var a=0;this._maxx<n._minx?a=n._minx-this._maxx:this._minx>n._maxx&&(a=this._minx-n._maxx);var h=0;return this._maxy<n._miny?h=n._miny-this._maxy:this._miny>n._maxy&&(h=this._miny-n._maxy),a===0?h:h===0?a:Math.sqrt(a*a+h*h)}},{key:"hashCode",value:function(){var n=17;return n=37*(n=37*(n=37*(n=37*n+J.hashCode(this._minx))+J.hashCode(this._maxx))+J.hashCode(this._miny))+J.hashCode(this._maxy)}},{key:"interfaces_",get:function(){return[X,$]}}],[{key:"constructor_",value:function(){if(this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,arguments.length===0)this.init();else if(arguments.length===1){if(arguments[0]instanceof J){var n=arguments[0];this.init(n.x,n.x,n.y,n.y)}else if(arguments[0]instanceof f){var a=arguments[0];this.init(a)}}else if(arguments.length===2){var h=arguments[0],v=arguments[1];this.init(h.x,v.x,h.y,v.y)}else if(arguments.length===4){var I=arguments[0],R=arguments[1],T=arguments[2],O=arguments[3];this.init(I,R,T,O)}}},{key:"intersects",value:function(){if(arguments.length===3){var n=arguments[0],a=arguments[1],h=arguments[2];return h.x>=(n.x<a.x?n.x:a.x)&&h.x<=(n.x>a.x?n.x:a.x)&&h.y>=(n.y<a.y?n.y:a.y)&&h.y<=(n.y>a.y?n.y:a.y)}if(arguments.length===4){var v=arguments[0],I=arguments[1],R=arguments[2],T=arguments[3],O=Math.min(R.x,T.x),W=Math.max(R.x,T.x),re=Math.min(v.x,I.x),ne=Math.max(v.x,I.x);return!(re>W)&&!(ne<O)&&(O=Math.min(R.y,T.y),W=Math.max(R.y,T.y),re=Math.min(v.y,I.y),ne=Math.max(v.y,I.y),!(re>W)&&!(ne<O))}}}])})(),de=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"isGeometryCollection",value:function(){return this.getTypeCode()===f.TYPECODE_GEOMETRYCOLLECTION}},{key:"getFactory",value:function(){return this._factory}},{key:"getGeometryN",value:function(n){return this}},{key:"getArea",value:function(){return 0}},{key:"isRectangle",value:function(){return!1}},{key:"equalsExact",value:function(n){return this===n||this.equalsExact(n,0)}},{key:"geometryChanged",value:function(){this.apply(f.geometryChangedFilter)}},{key:"geometryChangedAction",value:function(){this._envelope=null}},{key:"equalsNorm",value:function(n){return n!==null&&this.norm().equalsExact(n.norm())}},{key:"getLength",value:function(){return 0}},{key:"getNumGeometries",value:function(){return 1}},{key:"compareTo",value:function(){var n;if(arguments.length===1){var a=arguments[0];return n=a,this.getTypeCode()!==n.getTypeCode()?this.getTypeCode()-n.getTypeCode():this.isEmpty()&&n.isEmpty()?0:this.isEmpty()?-1:n.isEmpty()?1:this.compareToSameClass(a)}if(arguments.length===2){var h=arguments[0],v=arguments[1];return n=h,this.getTypeCode()!==n.getTypeCode()?this.getTypeCode()-n.getTypeCode():this.isEmpty()&&n.isEmpty()?0:this.isEmpty()?-1:n.isEmpty()?1:this.compareToSameClass(h,v)}}},{key:"getUserData",value:function(){return this._userData}},{key:"getSRID",value:function(){return this._SRID}},{key:"getEnvelope",value:function(){return this.getFactory().toGeometry(this.getEnvelopeInternal())}},{key:"checkNotGeometryCollection",value:function(n){if(n.getTypeCode()===f.TYPECODE_GEOMETRYCOLLECTION)throw new V("This method does not support GeometryCollection arguments")}},{key:"equal",value:function(n,a,h){return h===0?n.equals(a):n.distance(a)<=h}},{key:"norm",value:function(){var n=this.copy();return n.normalize(),n}},{key:"reverse",value:function(){var n=this.reverseInternal();return this.envelope!=null&&(n.envelope=this.envelope.copy()),n.setSRID(this.getSRID()),n}},{key:"copy",value:function(){var n=this.copyInternal();return n.envelope=this._envelope==null?null:this._envelope.copy(),n._SRID=this._SRID,n._userData=this._userData,n}},{key:"getPrecisionModel",value:function(){return this._factory.getPrecisionModel()}},{key:"getEnvelopeInternal",value:function(){return this._envelope===null&&(this._envelope=this.computeEnvelopeInternal()),new ye(this._envelope)}},{key:"setSRID",value:function(n){this._SRID=n}},{key:"setUserData",value:function(n){this._userData=n}},{key:"compare",value:function(n,a){for(var h=n.iterator(),v=a.iterator();h.hasNext()&&v.hasNext();){var I=h.next(),R=v.next(),T=I.compareTo(R);if(T!==0)return T}return h.hasNext()?1:v.hasNext()?-1:0}},{key:"hashCode",value:function(){return this.getEnvelopeInternal().hashCode()}},{key:"isEquivalentClass",value:function(n){return this.getClass()===n.getClass()}},{key:"isGeometryCollectionOrDerived",value:function(){return this.getTypeCode()===f.TYPECODE_GEOMETRYCOLLECTION||this.getTypeCode()===f.TYPECODE_MULTIPOINT||this.getTypeCode()===f.TYPECODE_MULTILINESTRING||this.getTypeCode()===f.TYPECODE_MULTIPOLYGON}},{key:"interfaces_",get:function(){return[Q,X,$]}},{key:"getClass",value:function(){return f}}],[{key:"hasNonEmptyElements",value:function(n){for(var a=0;a<n.length;a++)if(!n[a].isEmpty())return!0;return!1}},{key:"hasNullElements",value:function(n){for(var a=0;a<n.length;a++)if(n[a]===null)return!0;return!1}}])})();de.constructor_=function(f){f&&(this._envelope=null,this._userData=null,this._factory=f,this._SRID=f.getSRID())},de.TYPECODE_POINT=0,de.TYPECODE_MULTIPOINT=1,de.TYPECODE_LINESTRING=2,de.TYPECODE_LINEARRING=3,de.TYPECODE_MULTILINESTRING=4,de.TYPECODE_POLYGON=5,de.TYPECODE_MULTIPOLYGON=6,de.TYPECODE_GEOMETRYCOLLECTION=7,de.TYPENAME_POINT="Point",de.TYPENAME_MULTIPOINT="MultiPoint",de.TYPENAME_LINESTRING="LineString",de.TYPENAME_LINEARRING="LinearRing",de.TYPENAME_MULTILINESTRING="MultiLineString",de.TYPENAME_POLYGON="Polygon",de.TYPENAME_MULTIPOLYGON="MultiPolygon",de.TYPENAME_GEOMETRYCOLLECTION="GeometryCollection",de.geometryChangedFilter={get interfaces_(){return[Y]},filter:function(f){f.geometryChangedAction()}};var q=(function(){function f(){o(this,f)}return g(f,null,[{key:"toLocationSymbol",value:function(n){switch(n){case f.EXTERIOR:return"e";case f.BOUNDARY:return"b";case f.INTERIOR:return"i";case f.NONE:return"-"}throw new V("Unknown location value: "+n)}}])})();q.INTERIOR=0,q.BOUNDARY=1,q.EXTERIOR=2,q.NONE=-1;var Re=(function(){return g((function f(){o(this,f)}),[{key:"add",value:function(){}},{key:"addAll",value:function(){}},{key:"isEmpty",value:function(){}},{key:"iterator",value:function(){}},{key:"size",value:function(){}},{key:"toArray",value:function(){}},{key:"remove",value:function(){}}])})(),Oe=(function(f){function n(a){var h;return o(this,n),(h=s(this,n,[a])).name=Object.keys({NoSuchElementException:n})[0],h}return E(n,f),g(n)})(z),je=(function(f){function n(a){var h;return o(this,n),(h=s(this,n,[a])).name=Object.keys({UnsupportedOperationException:n})[0],h}return E(n,f),g(n)})(z),Fe=(function(f){function n(){return o(this,n),s(this,n,arguments)}return E(n,f),g(n,[{key:"contains",value:function(){}}])})(Re),it=(function(f){function n(a){var h;return o(this,n),(h=s(this,n)).map=new Map,a instanceof Re&&h.addAll(a),h}return E(n,f),g(n,[{key:"contains",value:function(a){var h=a.hashCode?a.hashCode():a;return!!this.map.has(h)}},{key:"add",value:function(a){var h=a.hashCode?a.hashCode():a;return!this.map.has(h)&&!!this.map.set(h,a)}},{key:"addAll",value:function(a){var h,v=y(a);try{for(v.s();!(h=v.n()).done;){var I=h.value;this.add(I)}}catch(R){v.e(R)}finally{v.f()}return!0}},{key:"remove",value:function(){throw new je}},{key:"size",value:function(){return this.map.size}},{key:"isEmpty",value:function(){return this.map.size===0}},{key:"toArray",value:function(){return Array.from(this.map.values())}},{key:"iterator",value:function(){return new dt(this.map)}},{key:Symbol.iterator,value:function(){return this.map}}])})(Fe),dt=(function(){return g((function f(n){o(this,f),this.iterator=n.values();var a=this.iterator.next(),h=a.done,v=a.value;this.done=h,this.value=v}),[{key:"next",value:function(){if(this.done)throw new Oe;var f=this.value,n=this.iterator.next(),a=n.done,h=n.value;return this.done=a,this.value=h,f}},{key:"hasNext",value:function(){return!this.done}},{key:"remove",value:function(){throw new je}}])})(),he=(function(){function f(){o(this,f)}return g(f,null,[{key:"opposite",value:function(n){return n===f.LEFT?f.RIGHT:n===f.RIGHT?f.LEFT:n}}])})();he.ON=0,he.LEFT=1,he.RIGHT=2;var st=(function(f){function n(a){var h;return o(this,n),(h=s(this,n,[a])).name=Object.keys({EmptyStackException:n})[0],h}return E(n,f),g(n)})(z),qe=(function(f){function n(a){var h;return o(this,n),(h=s(this,n,[a])).name=Object.keys({IndexOutOfBoundsException:n})[0],h}return E(n,f),g(n)})(z),Ve=(function(f){function n(){return o(this,n),s(this,n,arguments)}return E(n,f),g(n,[{key:"get",value:function(){}},{key:"set",value:function(){}},{key:"isEmpty",value:function(){}}])})(Re),mt=(function(f){function n(){var a;return o(this,n),(a=s(this,n)).array=[],a}return E(n,f),g(n,[{key:"add",value:function(a){return this.array.push(a),!0}},{key:"get",value:function(a){if(a<0||a>=this.size())throw new qe;return this.array[a]}},{key:"push",value:function(a){return this.array.push(a),a}},{key:"pop",value:function(){if(this.array.length===0)throw new st;return this.array.pop()}},{key:"peek",value:function(){if(this.array.length===0)throw new st;return this.array[this.array.length-1]}},{key:"empty",value:function(){return this.array.length===0}},{key:"isEmpty",value:function(){return this.empty()}},{key:"search",value:function(a){return this.array.indexOf(a)}},{key:"size",value:function(){return this.array.length}},{key:"toArray",value:function(){return this.array.slice()}}])})(Ve);function Le(f,n){return f.interfaces_&&f.interfaces_.indexOf(n)>-1}var tt=(function(){return g((function f(n){o(this,f),this.str=n}),[{key:"append",value:function(f){this.str+=f}},{key:"setCharAt",value:function(f,n){this.str=this.str.substr(0,f)+n+this.str.substr(f+1)}},{key:"toString",value:function(){return this.str}}])})(),gt=(function(){function f(n){o(this,f),this.value=n}return g(f,[{key:"intValue",value:function(){return this.value}},{key:"compareTo",value:function(n){return this.value<n?-1:this.value>n?1:0}}],[{key:"compare",value:function(n,a){return n<a?-1:n>a?1:0}},{key:"isNan",value:function(n){return Number.isNaN(n)}},{key:"valueOf",value:function(n){return new f(n)}}])})(),yt=(function(){return g((function f(){o(this,f)}),null,[{key:"isWhitespace",value:function(f){return f<=32&&f>=0||f===127}},{key:"toUpperCase",value:function(f){return f.toUpperCase()}}])})(),we=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"le",value:function(n){return this._hi<n._hi||this._hi===n._hi&&this._lo<=n._lo}},{key:"extractSignificantDigits",value:function(n,a){var h=this.abs(),v=f.magnitude(h._hi),I=f.TEN.pow(v);(h=h.divide(I)).gt(f.TEN)?(h=h.divide(f.TEN),v+=1):h.lt(f.ONE)&&(h=h.multiply(f.TEN),v-=1);for(var R=v+1,T=new tt,O=f.MAX_PRINT_DIGITS-1,W=0;W<=O;W++){n&&W===R&&T.append(".");var re=Math.trunc(h._hi);if(re<0)break;var ne=!1,oe=0;re>9?(ne=!0,oe="9"):oe="0"+re,T.append(oe),h=h.subtract(f.valueOf(re)).multiply(f.TEN),ne&&h.selfAdd(f.TEN);var _e=!0,Se=f.magnitude(h._hi);if(Se<0&&Math.abs(Se)>=O-W&&(_e=!1),!_e)break}return a[0]=v,T.toString()}},{key:"sqr",value:function(){return this.multiply(this)}},{key:"doubleValue",value:function(){return this._hi+this._lo}},{key:"subtract",value:function(){if(arguments[0]instanceof f){var n=arguments[0];return this.add(n.negate())}if(typeof arguments[0]=="number"){var a=arguments[0];return this.add(-a)}}},{key:"equals",value:function(){if(arguments.length===1&&arguments[0]instanceof f){var n=arguments[0];return this._hi===n._hi&&this._lo===n._lo}}},{key:"isZero",value:function(){return this._hi===0&&this._lo===0}},{key:"selfSubtract",value:function(){if(arguments[0]instanceof f){var n=arguments[0];return this.isNaN()?this:this.selfAdd(-n._hi,-n._lo)}if(typeof arguments[0]=="number"){var a=arguments[0];return this.isNaN()?this:this.selfAdd(-a,0)}}},{key:"getSpecialNumberString",value:function(){return this.isZero()?"0.0":this.isNaN()?"NaN ":null}},{key:"min",value:function(n){return this.le(n)?this:n}},{key:"selfDivide",value:function(){if(arguments.length===1){if(arguments[0]instanceof f){var n=arguments[0];return this.selfDivide(n._hi,n._lo)}if(typeof arguments[0]=="number"){var a=arguments[0];return this.selfDivide(a,0)}}else if(arguments.length===2){var h,v,I,R,T=arguments[0],O=arguments[1],W=null,re=null,ne=null,oe=null;return I=this._hi/T,oe=(W=(ne=f.SPLIT*I)-(W=ne-I))*(re=(oe=f.SPLIT*T)-(re=oe-T))-(R=I*T)+W*(v=T-re)+(h=I-W)*re+h*v,oe=I+(ne=(this._hi-R-oe+this._lo-I*O)/T),this._hi=oe,this._lo=I-oe+ne,this}}},{key:"dump",value:function(){return"DD<"+this._hi+", "+this._lo+">"}},{key:"divide",value:function(){if(arguments[0]instanceof f){var n,a,h,v,I=arguments[0],R=null,T=null,O=null,W=null;return n=(h=this._hi/I._hi)-(R=(O=f.SPLIT*h)-(R=O-h)),W=R*(T=(W=f.SPLIT*I._hi)-(T=W-I._hi))-(v=h*I._hi)+R*(a=I._hi-T)+n*T+n*a,new f(W=h+(O=(this._hi-v-W+this._lo-h*I._lo)/I._hi),h-W+O)}if(typeof arguments[0]=="number"){var re=arguments[0];return ce.isNaN(re)?f.createNaN():f.copy(this).selfDivide(re,0)}}},{key:"ge",value:function(n){return this._hi>n._hi||this._hi===n._hi&&this._lo>=n._lo}},{key:"pow",value:function(n){if(n===0)return f.valueOf(1);var a=new f(this),h=f.valueOf(1),v=Math.abs(n);if(v>1)for(;v>0;)v%2==1&&h.selfMultiply(a),(v/=2)>0&&(a=a.sqr());else h=a;return n<0?h.reciprocal():h}},{key:"ceil",value:function(){if(this.isNaN())return f.NaN;var n=Math.ceil(this._hi),a=0;return n===this._hi&&(a=Math.ceil(this._lo)),new f(n,a)}},{key:"compareTo",value:function(n){var a=n;return this._hi<a._hi?-1:this._hi>a._hi?1:this._lo<a._lo?-1:this._lo>a._lo?1:0}},{key:"rint",value:function(){return this.isNaN()?this:this.add(.5).floor()}},{key:"setValue",value:function(){if(arguments[0]instanceof f){var n=arguments[0];return this.init(n),this}if(typeof arguments[0]=="number"){var a=arguments[0];return this.init(a),this}}},{key:"max",value:function(n){return this.ge(n)?this:n}},{key:"sqrt",value:function(){if(this.isZero())return f.valueOf(0);if(this.isNegative())return f.NaN;var n=1/Math.sqrt(this._hi),a=this._hi*n,h=f.valueOf(a),v=this.subtract(h.sqr())._hi*(.5*n);return h.add(v)}},{key:"selfAdd",value:function(){if(arguments.length===1){if(arguments[0]instanceof f){var n=arguments[0];return this.selfAdd(n._hi,n._lo)}if(typeof arguments[0]=="number"){var a,h,v,I,R,T=arguments[0],O=null;return O=(v=this._hi+T)-(I=v-this._hi),h=(R=(O=T-I+(this._hi-O))+this._lo)+(v-(a=v+R)),this._hi=a+h,this._lo=h+(a-this._hi),this}}else if(arguments.length===2){var W,re,ne,oe,_e=arguments[0],Se=arguments[1],Ne=null,Ge=null,Be=null;ne=this._hi+_e,re=this._lo+Se,Ge=ne-(Be=ne-this._hi),Ne=re-(oe=re-this._lo);var $e=(W=ne+(Be=(Ge=_e-Be+(this._hi-Ge))+re))+(Be=(Ne=Se-oe+(this._lo-Ne))+(Be+(ne-W))),et=Be+(W-$e);return this._hi=$e,this._lo=et,this}}},{key:"selfMultiply",value:function(){if(arguments.length===1){if(arguments[0]instanceof f){var n=arguments[0];return this.selfMultiply(n._hi,n._lo)}if(typeof arguments[0]=="number"){var a=arguments[0];return this.selfMultiply(a,0)}}else if(arguments.length===2){var h,v,I=arguments[0],R=arguments[1],T=null,O=null,W=null,re=null;T=(W=f.SPLIT*this._hi)-this._hi,re=f.SPLIT*I,T=W-T,h=this._hi-T,O=re-I;var ne=(W=this._hi*I)+(re=T*(O=re-O)-W+T*(v=I-O)+h*O+h*v+(this._hi*R+this._lo*I)),oe=re+(T=W-ne);return this._hi=ne,this._lo=oe,this}}},{key:"selfSqr",value:function(){return this.selfMultiply(this)}},{key:"floor",value:function(){if(this.isNaN())return f.NaN;var n=Math.floor(this._hi),a=0;return n===this._hi&&(a=Math.floor(this._lo)),new f(n,a)}},{key:"negate",value:function(){return this.isNaN()?this:new f(-this._hi,-this._lo)}},{key:"clone",value:function(){try{return null}catch(n){if(n instanceof CloneNotSupportedException)return null;throw n}}},{key:"multiply",value:function(){if(arguments[0]instanceof f){var n=arguments[0];return n.isNaN()?f.createNaN():f.copy(this).selfMultiply(n)}if(typeof arguments[0]=="number"){var a=arguments[0];return ce.isNaN(a)?f.createNaN():f.copy(this).selfMultiply(a,0)}}},{key:"isNaN",value:function(){return ce.isNaN(this._hi)}},{key:"intValue",value:function(){return Math.trunc(this._hi)}},{key:"toString",value:function(){var n=f.magnitude(this._hi);return n>=-3&&n<=20?this.toStandardNotation():this.toSciNotation()}},{key:"toStandardNotation",value:function(){var n=this.getSpecialNumberString();if(n!==null)return n;var a=new Array(1).fill(null),h=this.extractSignificantDigits(!0,a),v=a[0]+1,I=h;if(h.charAt(0)===".")I="0"+h;else if(v<0)I="0."+f.stringOfChar("0",-v)+h;else if(h.indexOf(".")===-1){var R=v-h.length;I=h+f.stringOfChar("0",R)+".0"}return this.isNegative()?"-"+I:I}},{key:"reciprocal",value:function(){var n,a,h,v,I=null,R=null,T=null,O=null;n=(h=1/this._hi)-(I=(T=f.SPLIT*h)-(I=T-h)),R=(O=f.SPLIT*this._hi)-this._hi;var W=h+(T=(1-(v=h*this._hi)-(O=I*(R=O-R)-v+I*(a=this._hi-R)+n*R+n*a)-h*this._lo)/this._hi);return new f(W,h-W+T)}},{key:"toSciNotation",value:function(){if(this.isZero())return f.SCI_NOT_ZERO;var n=this.getSpecialNumberString();if(n!==null)return n;var a=new Array(1).fill(null),h=this.extractSignificantDigits(!1,a),v=f.SCI_NOT_EXPONENT_CHAR+a[0];if(h.charAt(0)==="0")throw new IllegalStateException("Found leading zero: "+h);var I="";h.length>1&&(I=h.substring(1));var R=h.charAt(0)+"."+I;return this.isNegative()?"-"+R+v:R+v}},{key:"abs",value:function(){return this.isNaN()?f.NaN:this.isNegative()?this.negate():new f(this)}},{key:"isPositive",value:function(){return this._hi>0||this._hi===0&&this._lo>0}},{key:"lt",value:function(n){return this._hi<n._hi||this._hi===n._hi&&this._lo<n._lo}},{key:"add",value:function(){if(arguments[0]instanceof f){var n=arguments[0];return f.copy(this).selfAdd(n)}if(typeof arguments[0]=="number"){var a=arguments[0];return f.copy(this).selfAdd(a)}}},{key:"init",value:function(){if(arguments.length===1){if(typeof arguments[0]=="number"){var n=arguments[0];this._hi=n,this._lo=0}else if(arguments[0]instanceof f){var a=arguments[0];this._hi=a._hi,this._lo=a._lo}}else if(arguments.length===2){var h=arguments[0],v=arguments[1];this._hi=h,this._lo=v}}},{key:"gt",value:function(n){return this._hi>n._hi||this._hi===n._hi&&this._lo>n._lo}},{key:"isNegative",value:function(){return this._hi<0||this._hi===0&&this._lo<0}},{key:"trunc",value:function(){return this.isNaN()?f.NaN:this.isPositive()?this.floor():this.ceil()}},{key:"signum",value:function(){return this._hi>0?1:this._hi<0?-1:this._lo>0?1:this._lo<0?-1:0}},{key:"interfaces_",get:function(){return[$,X,Q]}}],[{key:"constructor_",value:function(){if(this._hi=0,this._lo=0,arguments.length===0)this.init(0);else if(arguments.length===1){if(typeof arguments[0]=="number"){var n=arguments[0];this.init(n)}else if(arguments[0]instanceof f){var a=arguments[0];this.init(a)}else if(typeof arguments[0]=="string"){var h=arguments[0];f.constructor_.call(this,f.parse(h))}}else if(arguments.length===2){var v=arguments[0],I=arguments[1];this.init(v,I)}}},{key:"determinant",value:function(){if(typeof arguments[3]=="number"&&typeof arguments[2]=="number"&&typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var n=arguments[0],a=arguments[1],h=arguments[2],v=arguments[3];return f.determinant(f.valueOf(n),f.valueOf(a),f.valueOf(h),f.valueOf(v))}if(arguments[3]instanceof f&&arguments[2]instanceof f&&arguments[0]instanceof f&&arguments[1]instanceof f){var I=arguments[1],R=arguments[2],T=arguments[3];return arguments[0].multiply(T).selfSubtract(I.multiply(R))}}},{key:"sqr",value:function(n){return f.valueOf(n).selfMultiply(n)}},{key:"valueOf",value:function(){if(typeof arguments[0]=="string"){var n=arguments[0];return f.parse(n)}if(typeof arguments[0]=="number")return new f(arguments[0])}},{key:"sqrt",value:function(n){return f.valueOf(n).sqrt()}},{key:"parse",value:function(n){for(var a=0,h=n.length;yt.isWhitespace(n.charAt(a));)a++;var v=!1;if(a<h){var I=n.charAt(a);I!=="-"&&I!=="+"||(a++,I==="-"&&(v=!0))}for(var R=new f,T=0,O=0,W=0,re=!1;!(a>=h);){var ne=n.charAt(a);if(a++,yt.isDigit(ne)){var oe=ne-"0";R.selfMultiply(f.TEN),R.selfAdd(oe),T++}else{if(ne!=="."){if(ne==="e"||ne==="E"){var _e=n.substring(a);try{W=gt.parseInt(_e)}catch($e){throw $e instanceof NumberFormatException?new NumberFormatException("Invalid exponent "+_e+" in string "+n):$e}break}throw new NumberFormatException("Unexpected character '"+ne+"' at position "+a+" in string "+n)}O=T,re=!0}}var Se=R;re||(O=T);var Ne=T-O-W;if(Ne===0)Se=R;else if(Ne>0){var Ge=f.TEN.pow(Ne);Se=R.divide(Ge)}else if(Ne<0){var Be=f.TEN.pow(-Ne);Se=R.multiply(Be)}return v?Se.negate():Se}},{key:"createNaN",value:function(){return new f(ce.NaN,ce.NaN)}},{key:"copy",value:function(n){return new f(n)}},{key:"magnitude",value:function(n){var a=Math.abs(n),h=Math.log(a)/Math.log(10),v=Math.trunc(Math.floor(h));return 10*Math.pow(10,v)<=a&&(v+=1),v}},{key:"stringOfChar",value:function(n,a){for(var h=new tt,v=0;v<a;v++)h.append(n);return h.toString()}}])})();we.PI=new we(3.141592653589793,12246467991473532e-32),we.TWO_PI=new we(6.283185307179586,24492935982947064e-32),we.PI_2=new we(1.5707963267948966,6123233995736766e-32),we.E=new we(2.718281828459045,14456468917292502e-32),we.NaN=new we(ce.NaN,ce.NaN),we.EPS=123259516440783e-46,we.SPLIT=134217729,we.MAX_PRINT_DIGITS=32,we.TEN=we.valueOf(10),we.ONE=we.valueOf(1),we.SCI_NOT_EXPONENT_CHAR="E",we.SCI_NOT_ZERO="0.0E0";var Lt=(function(){function f(){o(this,f)}return g(f,null,[{key:"orientationIndex",value:function(n,a,h){var v=f.orientationIndexFilter(n,a,h);if(v<=1)return v;var I=we.valueOf(a.x).selfAdd(-n.x),R=we.valueOf(a.y).selfAdd(-n.y),T=we.valueOf(h.x).selfAdd(-a.x),O=we.valueOf(h.y).selfAdd(-a.y);return I.selfMultiply(O).selfSubtract(R.selfMultiply(T)).signum()}},{key:"signOfDet2x2",value:function(){if(arguments[3]instanceof we&&arguments[2]instanceof we&&arguments[0]instanceof we&&arguments[1]instanceof we){var n=arguments[1],a=arguments[2],h=arguments[3];return arguments[0].multiply(h).selfSubtract(n.multiply(a)).signum()}if(typeof arguments[3]=="number"&&typeof arguments[2]=="number"&&typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var v=arguments[0],I=arguments[1],R=arguments[2],T=arguments[3],O=we.valueOf(v),W=we.valueOf(I),re=we.valueOf(R),ne=we.valueOf(T);return O.multiply(ne).selfSubtract(W.multiply(re)).signum()}}},{key:"intersection",value:function(n,a,h,v){var I=new we(n.y).selfSubtract(a.y),R=new we(a.x).selfSubtract(n.x),T=new we(n.x).selfMultiply(a.y).selfSubtract(new we(a.x).selfMultiply(n.y)),O=new we(h.y).selfSubtract(v.y),W=new we(v.x).selfSubtract(h.x),re=new we(h.x).selfMultiply(v.y).selfSubtract(new we(v.x).selfMultiply(h.y)),ne=R.multiply(re).selfSubtract(W.multiply(T)),oe=O.multiply(T).selfSubtract(I.multiply(re)),_e=I.multiply(W).selfSubtract(O.multiply(R)),Se=ne.selfDivide(_e).doubleValue(),Ne=oe.selfDivide(_e).doubleValue();return ce.isNaN(Se)||ce.isInfinite(Se)||ce.isNaN(Ne)||ce.isInfinite(Ne)?null:new J(Se,Ne)}},{key:"orientationIndexFilter",value:function(n,a,h){var v=null,I=(n.x-h.x)*(a.y-h.y),R=(n.y-h.y)*(a.x-h.x),T=I-R;if(I>0){if(R<=0)return f.signum(T);v=I+R}else{if(!(I<0)||R>=0)return f.signum(T);v=-I-R}var O=f.DP_SAFE_EPSILON*v;return T>=O||-T>=O?f.signum(T):2}},{key:"signum",value:function(n){return n>0?1:n<0?-1:0}}])})();Lt.DP_SAFE_EPSILON=1e-15;var Me=(function(){return g((function f(){o(this,f)}),[{key:"getM",value:function(f){if(this.hasM()){var n=this.getDimension()-this.getMeasures();return this.getOrdinate(f,n)}return ce.NaN}},{key:"setOrdinate",value:function(f,n,a){}},{key:"getZ",value:function(f){return this.hasZ()?this.getOrdinate(f,2):ce.NaN}},{key:"size",value:function(){}},{key:"getOrdinate",value:function(f,n){}},{key:"getCoordinate",value:function(){}},{key:"getCoordinateCopy",value:function(f){}},{key:"createCoordinate",value:function(){}},{key:"getDimension",value:function(){}},{key:"hasM",value:function(){return this.getMeasures()>0}},{key:"getX",value:function(f){}},{key:"hasZ",value:function(){return this.getDimension()-this.getMeasures()>2}},{key:"getMeasures",value:function(){return 0}},{key:"expandEnvelope",value:function(f){}},{key:"copy",value:function(){}},{key:"getY",value:function(f){}},{key:"toCoordinateArray",value:function(){}},{key:"interfaces_",get:function(){return[Q]}}])})();Me.X=0,Me.Y=1,Me.Z=2,Me.M=3;var ke=(function(){function f(){o(this,f)}return g(f,null,[{key:"index",value:function(n,a,h){return Lt.orientationIndex(n,a,h)}},{key:"isCCW",value:function(){if(arguments[0]instanceof Array){var n=arguments[0],a=n.length-1;if(a<3)throw new V("Ring has fewer than 4 points, so orientation cannot be determined");for(var h=n[0],v=0,I=1;I<=a;I++){var R=n[I];R.y>h.y&&(h=R,v=I)}var T=v;do(T-=1)<0&&(T=a);while(n[T].equals2D(h)&&T!==v);var O=v;do O=(O+1)%a;while(n[O].equals2D(h)&&O!==v);var W=n[T],re=n[O];if(W.equals2D(h)||re.equals2D(h)||W.equals2D(re))return!1;var ne=f.index(W,h,re);return ne===0?W.x>re.x:ne>0}if(Le(arguments[0],Me)){var oe=arguments[0],_e=oe.size()-1;if(_e<3)throw new V("Ring has fewer than 4 points, so orientation cannot be determined");for(var Se=oe.getCoordinate(0),Ne=0,Ge=1;Ge<=_e;Ge++){var Be=oe.getCoordinate(Ge);Be.y>Se.y&&(Se=Be,Ne=Ge)}var $e=null,et=Ne;do(et-=1)<0&&(et=_e),$e=oe.getCoordinate(et);while($e.equals2D(Se)&&et!==Ne);var nt=null,Zt=Ne;do Zt=(Zt+1)%_e,nt=oe.getCoordinate(Zt);while(nt.equals2D(Se)&&Zt!==Ne);if($e.equals2D(Se)||nt.equals2D(Se)||$e.equals2D(nt))return!1;var lr=f.index($e,Se,nt);return lr===0?$e.x>nt.x:lr>0}}}])})();ke.CLOCKWISE=-1,ke.RIGHT=ke.CLOCKWISE,ke.COUNTERCLOCKWISE=1,ke.LEFT=ke.COUNTERCLOCKWISE,ke.COLLINEAR=0,ke.STRAIGHT=ke.COLLINEAR;var Ut=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"getCoordinate",value:function(){return this._minCoord}},{key:"getRightmostSide",value:function(f,n){var a=this.getRightmostSideOfSegment(f,n);return a<0&&(a=this.getRightmostSideOfSegment(f,n-1)),a<0&&(this._minCoord=null,this.checkForRightmostCoordinate(f)),a}},{key:"findRightmostEdgeAtVertex",value:function(){var f=this._minDe.getEdge().getCoordinates();pe.isTrue(this._minIndex>0&&this._minIndex<f.length,"rightmost point expected to be interior vertex of edge");var n=f[this._minIndex-1],a=f[this._minIndex+1],h=ke.index(this._minCoord,a,n),v=!1;(n.y<this._minCoord.y&&a.y<this._minCoord.y&&h===ke.COUNTERCLOCKWISE||n.y>this._minCoord.y&&a.y>this._minCoord.y&&h===ke.CLOCKWISE)&&(v=!0),v&&(this._minIndex=this._minIndex-1)}},{key:"getRightmostSideOfSegment",value:function(f,n){var a=f.getEdge().getCoordinates();if(n<0||n+1>=a.length||a[n].y===a[n+1].y)return-1;var h=he.LEFT;return a[n].y<a[n+1].y&&(h=he.RIGHT),h}},{key:"getEdge",value:function(){return this._orientedDe}},{key:"checkForRightmostCoordinate",value:function(f){for(var n=f.getEdge().getCoordinates(),a=0;a<n.length-1;a++)(this._minCoord===null||n[a].x>this._minCoord.x)&&(this._minDe=f,this._minIndex=a,this._minCoord=n[a])}},{key:"findRightmostEdgeAtNode",value:function(){var f=this._minDe.getNode().getEdges();this._minDe=f.getRightmostEdge(),this._minDe.isForward()||(this._minDe=this._minDe.getSym(),this._minIndex=this._minDe.getEdge().getCoordinates().length-1)}},{key:"findEdge",value:function(f){for(var n=f.iterator();n.hasNext();){var a=n.next();a.isForward()&&this.checkForRightmostCoordinate(a)}pe.isTrue(this._minIndex!==0||this._minCoord.equals(this._minDe.getCoordinate()),"inconsistency in rightmost processing"),this._minIndex===0?this.findRightmostEdgeAtNode():this.findRightmostEdgeAtVertex(),this._orientedDe=this._minDe,this.getRightmostSide(this._minDe,this._minIndex)===he.LEFT&&(this._orientedDe=this._minDe.getSym())}}],[{key:"constructor_",value:function(){this._minIndex=-1,this._minCoord=null,this._minDe=null,this._orientedDe=null}}])})(),at=(function(f){function n(a,h){var v;return o(this,n),(v=s(this,n,[h?a+" [ "+h+" ]":a])).pt=h?new J(h):void 0,v.name=Object.keys({TopologyException:n})[0],v}return E(n,f),g(n,[{key:"getCoordinate",value:function(){return this.pt}}])})(Ce),Bt=(function(){return g((function f(){o(this,f),this.array=[]}),[{key:"addLast",value:function(f){this.array.push(f)}},{key:"removeFirst",value:function(){return this.array.shift()}},{key:"isEmpty",value:function(){return this.array.length===0}}])})(),De=(function(f){function n(a){var h;return o(this,n),(h=s(this,n)).array=[],a instanceof Re&&h.addAll(a),h}return E(n,f),g(n,[{key:"interfaces_",get:function(){return[Ve,Re]}},{key:"ensureCapacity",value:function(){}},{key:"add",value:function(a){return arguments.length===1?this.array.push(a):this.array.splice(arguments[0],0,arguments[1]),!0}},{key:"clear",value:function(){this.array=[]}},{key:"addAll",value:function(a){var h,v=y(a);try{for(v.s();!(h=v.n()).done;){var I=h.value;this.array.push(I)}}catch(R){v.e(R)}finally{v.f()}}},{key:"set",value:function(a,h){var v=this.array[a];return this.array[a]=h,v}},{key:"iterator",value:function(){return new Gt(this)}},{key:"get",value:function(a){if(a<0||a>=this.size())throw new qe;return this.array[a]}},{key:"isEmpty",value:function(){return this.array.length===0}},{key:"sort",value:function(a){a?this.array.sort((function(h,v){return a.compare(h,v)})):this.array.sort()}},{key:"size",value:function(){return this.array.length}},{key:"toArray",value:function(){return this.array.slice()}},{key:"remove",value:function(a){for(var h=0,v=this.array.length;h<v;h++)if(this.array[h]===a)return!!this.array.splice(h,1);return!1}},{key:Symbol.iterator,value:function(){return this.array.values()}}])})(Ve),Gt=(function(){return g((function f(n){o(this,f),this.arrayList=n,this.position=0}),[{key:"next",value:function(){if(this.position===this.arrayList.size())throw new Oe;return this.arrayList.get(this.position++)}},{key:"hasNext",value:function(){return this.position<this.arrayList.size()}},{key:"set",value:function(f){return this.arrayList.set(this.position-1,f)}},{key:"remove",value:function(){this.arrayList.remove(this.arrayList.get(this.position))}}])})(),zt=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"clearVisitedEdges",value:function(){for(var f=this._dirEdgeList.iterator();f.hasNext();)f.next().setVisited(!1)}},{key:"getRightmostCoordinate",value:function(){return this._rightMostCoord}},{key:"computeNodeDepth",value:function(f){for(var n=null,a=f.getEdges().iterator();a.hasNext();){var h=a.next();if(h.isVisited()||h.getSym().isVisited()){n=h;break}}if(n===null)throw new at("unable to find edge to compute depths at "+f.getCoordinate());f.getEdges().computeDepths(n);for(var v=f.getEdges().iterator();v.hasNext();){var I=v.next();I.setVisited(!0),this.copySymDepths(I)}}},{key:"computeDepth",value:function(f){this.clearVisitedEdges();var n=this._finder.getEdge();n.getNode(),n.getLabel(),n.setEdgeDepths(he.RIGHT,f),this.copySymDepths(n),this.computeDepths(n)}},{key:"create",value:function(f){this.addReachable(f),this._finder.findEdge(this._dirEdgeList),this._rightMostCoord=this._finder.getCoordinate()}},{key:"findResultEdges",value:function(){for(var f=this._dirEdgeList.iterator();f.hasNext();){var n=f.next();n.getDepth(he.RIGHT)>=1&&n.getDepth(he.LEFT)<=0&&!n.isInteriorAreaEdge()&&n.setInResult(!0)}}},{key:"computeDepths",value:function(f){var n=new it,a=new Bt,h=f.getNode();for(a.addLast(h),n.add(h),f.setVisited(!0);!a.isEmpty();){var v=a.removeFirst();n.add(v),this.computeNodeDepth(v);for(var I=v.getEdges().iterator();I.hasNext();){var R=I.next().getSym();if(!R.isVisited()){var T=R.getNode();n.contains(T)||(a.addLast(T),n.add(T))}}}}},{key:"compareTo",value:function(f){var n=f;return this._rightMostCoord.x<n._rightMostCoord.x?-1:this._rightMostCoord.x>n._rightMostCoord.x?1:0}},{key:"getEnvelope",value:function(){if(this._env===null){for(var f=new ye,n=this._dirEdgeList.iterator();n.hasNext();)for(var a=n.next().getEdge().getCoordinates(),h=0;h<a.length-1;h++)f.expandToInclude(a[h]);this._env=f}return this._env}},{key:"addReachable",value:function(f){var n=new mt;for(n.add(f);!n.empty();){var a=n.pop();this.add(a,n)}}},{key:"copySymDepths",value:function(f){var n=f.getSym();n.setDepth(he.LEFT,f.getDepth(he.RIGHT)),n.setDepth(he.RIGHT,f.getDepth(he.LEFT))}},{key:"add",value:function(f,n){f.setVisited(!0),this._nodes.add(f);for(var a=f.getEdges().iterator();a.hasNext();){var h=a.next();this._dirEdgeList.add(h);var v=h.getSym().getNode();v.isVisited()||n.push(v)}}},{key:"getNodes",value:function(){return this._nodes}},{key:"getDirectedEdges",value:function(){return this._dirEdgeList}},{key:"interfaces_",get:function(){return[X]}}],[{key:"constructor_",value:function(){this._finder=null,this._dirEdgeList=new De,this._nodes=new De,this._rightMostCoord=null,this._env=null,this._finder=new Ut}}])})(),Ot=(function(){return g((function f(){o(this,f)}),null,[{key:"intersection",value:function(f,n,a,h){var v=f.x<n.x?f.x:n.x,I=f.y<n.y?f.y:n.y,R=f.x>n.x?f.x:n.x,T=f.y>n.y?f.y:n.y,O=a.x<h.x?a.x:h.x,W=a.y<h.y?a.y:h.y,re=a.x>h.x?a.x:h.x,ne=a.y>h.y?a.y:h.y,oe=((v>O?v:O)+(R<re?R:re))/2,_e=((I>W?I:W)+(T<ne?T:ne))/2,Se=f.x-oe,Ne=f.y-_e,Ge=n.x-oe,Be=n.y-_e,$e=a.x-oe,et=a.y-_e,nt=h.x-oe,Zt=h.y-_e,lr=Ne-Be,cn=Ge-Se,dn=Se*Be-Ge*Ne,hn=et-Zt,fn=nt-$e,pn=$e*Zt-nt*et,mn=lr*fn-hn*cn,Dr=(cn*pn-fn*dn)/mn,Tr=(hn*dn-lr*pn)/mn;return ce.isNaN(Dr)||ce.isInfinite(Dr)||ce.isNaN(Tr)||ce.isInfinite(Tr)?null:new J(Dr+oe,Tr+_e)}}])})(),Je=(function(){return g((function f(){o(this,f)}),null,[{key:"arraycopy",value:function(f,n,a,h,v){for(var I=0,R=n;R<n+v;R++)a[h+I]=f[R],I++}},{key:"getProperty",value:function(f){return{"line.separator":`
5
+ `}[f]}}])})(),ct=(function(){function f(){o(this,f)}return g(f,null,[{key:"log10",value:function(n){var a=Math.log(n);return ce.isInfinite(a)||ce.isNaN(a)?a:a/f.LOG_10}},{key:"min",value:function(n,a,h,v){var I=n;return a<I&&(I=a),h<I&&(I=h),v<I&&(I=v),I}},{key:"clamp",value:function(){if(typeof arguments[2]=="number"&&typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var n=arguments[0],a=arguments[1],h=arguments[2];return n<a?a:n>h?h:n}if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var v=arguments[0],I=arguments[1],R=arguments[2];return v<I?I:v>R?R:v}}},{key:"wrap",value:function(n,a){return n<0?a- -n%a:n%a}},{key:"max",value:function(){if(arguments.length===3){var n=arguments[1],a=arguments[2],h=arguments[0];return n>h&&(h=n),a>h&&(h=a),h}if(arguments.length===4){var v=arguments[1],I=arguments[2],R=arguments[3],T=arguments[0];return v>T&&(T=v),I>T&&(T=I),R>T&&(T=R),T}}},{key:"average",value:function(n,a){return(n+a)/2}}])})();ct.LOG_10=Math.log(10);var Qe=(function(){function f(){o(this,f)}return g(f,null,[{key:"segmentToSegment",value:function(n,a,h,v){if(n.equals(a))return f.pointToSegment(n,h,v);if(h.equals(v))return f.pointToSegment(v,n,a);var I=!1;if(ye.intersects(n,a,h,v)){var R=(a.x-n.x)*(v.y-h.y)-(a.y-n.y)*(v.x-h.x);if(R===0)I=!0;else{var T=(n.y-h.y)*(v.x-h.x)-(n.x-h.x)*(v.y-h.y),O=((n.y-h.y)*(a.x-n.x)-(n.x-h.x)*(a.y-n.y))/R,W=T/R;(W<0||W>1||O<0||O>1)&&(I=!0)}}else I=!0;return I?ct.min(f.pointToSegment(n,h,v),f.pointToSegment(a,h,v),f.pointToSegment(h,n,a),f.pointToSegment(v,n,a)):0}},{key:"pointToSegment",value:function(n,a,h){if(a.x===h.x&&a.y===h.y)return n.distance(a);var v=(h.x-a.x)*(h.x-a.x)+(h.y-a.y)*(h.y-a.y),I=((n.x-a.x)*(h.x-a.x)+(n.y-a.y)*(h.y-a.y))/v;if(I<=0)return n.distance(a);if(I>=1)return n.distance(h);var R=((a.y-n.y)*(h.x-a.x)-(a.x-n.x)*(h.y-a.y))/v;return Math.abs(R)*Math.sqrt(v)}},{key:"pointToLinePerpendicular",value:function(n,a,h){var v=(h.x-a.x)*(h.x-a.x)+(h.y-a.y)*(h.y-a.y),I=((a.y-n.y)*(h.x-a.x)-(a.x-n.x)*(h.y-a.y))/v;return Math.abs(I)*Math.sqrt(v)}},{key:"pointToSegmentString",value:function(n,a){if(a.length===0)throw new V("Line array must contain at least one vertex");for(var h=n.distance(a[0]),v=0;v<a.length-1;v++){var I=f.pointToSegment(n,a[v],a[v+1]);I<h&&(h=I)}return h}}])})(),cr=(function(){return g((function f(){o(this,f)}),[{key:"create",value:function(){if(arguments.length===1)arguments[0]instanceof Array||Le(arguments[0],Me);else if(arguments.length!==2){if(arguments.length===3){var f=arguments[0],n=arguments[1];return this.create(f,n)}}}}])})(),Ht=(function(){return g((function f(){o(this,f)}),[{key:"filter",value:function(f){}}])})(),dr=(function(){return g((function f(){o(this,f)}),null,[{key:"ofLine",value:function(f){var n=f.size();if(n<=1)return 0;var a=0,h=new J;f.getCoordinate(0,h);for(var v=h.x,I=h.y,R=1;R<n;R++){f.getCoordinate(R,h);var T=h.x,O=h.y,W=T-v,re=O-I;a+=Math.sqrt(W*W+re*re),v=T,I=O}return a}}])})(),F=g((function f(){o(this,f)})),U=(function(){function f(){o(this,f)}return g(f,null,[{key:"copyCoord",value:function(n,a,h,v){for(var I=Math.min(n.getDimension(),h.getDimension()),R=0;R<I;R++)h.setOrdinate(v,R,n.getOrdinate(a,R))}},{key:"isRing",value:function(n){var a=n.size();return a===0||!(a<=3)&&n.getOrdinate(0,Me.X)===n.getOrdinate(a-1,Me.X)&&n.getOrdinate(0,Me.Y)===n.getOrdinate(a-1,Me.Y)}},{key:"scroll",value:function(){if(arguments.length===2){if(Le(arguments[0],Me)&&Number.isInteger(arguments[1])){var n=arguments[0],a=arguments[1];f.scroll(n,a,f.isRing(n))}else if(Le(arguments[0],Me)&&arguments[1]instanceof J){var h=arguments[0],v=arguments[1],I=f.indexOf(v,h);if(I<=0)return null;f.scroll(h,I)}}else if(arguments.length===3){var R=arguments[0],T=arguments[1],O=arguments[2];if(T<=0)return null;for(var W=R.copy(),re=O?R.size()-1:R.size(),ne=0;ne<re;ne++)for(var oe=0;oe<R.getDimension();oe++)R.setOrdinate(ne,oe,W.getOrdinate((T+ne)%re,oe));if(O)for(var _e=0;_e<R.getDimension();_e++)R.setOrdinate(re,_e,R.getOrdinate(0,_e))}}},{key:"isEqual",value:function(n,a){var h=n.size();if(h!==a.size())return!1;for(var v=Math.min(n.getDimension(),a.getDimension()),I=0;I<h;I++)for(var R=0;R<v;R++){var T=n.getOrdinate(I,R),O=a.getOrdinate(I,R);if(n.getOrdinate(I,R)!==a.getOrdinate(I,R)&&(!ce.isNaN(T)||!ce.isNaN(O)))return!1}return!0}},{key:"minCoordinateIndex",value:function(){if(arguments.length===1){var n=arguments[0];return f.minCoordinateIndex(n,0,n.size()-1)}if(arguments.length===3){for(var a=arguments[0],h=arguments[2],v=-1,I=null,R=arguments[1];R<=h;R++){var T=a.getCoordinate(R);(I===null||I.compareTo(T)>0)&&(I=T,v=R)}return v}}},{key:"extend",value:function(n,a,h){var v=n.create(h,a.getDimension()),I=a.size();if(f.copy(a,0,v,0,I),I>0)for(var R=I;R<h;R++)f.copy(a,I-1,v,R,1);return v}},{key:"reverse",value:function(n){for(var a=n.size()-1,h=Math.trunc(a/2),v=0;v<=h;v++)f.swap(n,v,a-v)}},{key:"swap",value:function(n,a,h){if(a===h)return null;for(var v=0;v<n.getDimension();v++){var I=n.getOrdinate(a,v);n.setOrdinate(a,v,n.getOrdinate(h,v)),n.setOrdinate(h,v,I)}}},{key:"copy",value:function(n,a,h,v,I){for(var R=0;R<I;R++)f.copyCoord(n,a+R,h,v+R)}},{key:"ensureValidRing",value:function(n,a){var h=a.size();return h===0?a:h<=3?f.createClosedRing(n,a,4):a.getOrdinate(0,Me.X)===a.getOrdinate(h-1,Me.X)&&a.getOrdinate(0,Me.Y)===a.getOrdinate(h-1,Me.Y)?a:f.createClosedRing(n,a,h+1)}},{key:"indexOf",value:function(n,a){for(var h=0;h<a.size();h++)if(n.x===a.getOrdinate(h,Me.X)&&n.y===a.getOrdinate(h,Me.Y))return h;return-1}},{key:"createClosedRing",value:function(n,a,h){var v=n.create(h,a.getDimension()),I=a.size();f.copy(a,0,v,0,I);for(var R=I;R<h;R++)f.copy(a,0,v,R,1);return v}},{key:"minCoordinate",value:function(n){for(var a=null,h=0;h<n.size();h++){var v=n.getCoordinate(h);(a===null||a.compareTo(v)>0)&&(a=v)}return a}}])})(),H=(function(){function f(){o(this,f)}return g(f,null,[{key:"toDimensionSymbol",value:function(n){switch(n){case f.FALSE:return f.SYM_FALSE;case f.TRUE:return f.SYM_TRUE;case f.DONTCARE:return f.SYM_DONTCARE;case f.P:return f.SYM_P;case f.L:return f.SYM_L;case f.A:return f.SYM_A}throw new V("Unknown dimension value: "+n)}},{key:"toDimensionValue",value:function(n){switch(yt.toUpperCase(n)){case f.SYM_FALSE:return f.FALSE;case f.SYM_TRUE:return f.TRUE;case f.SYM_DONTCARE:return f.DONTCARE;case f.SYM_P:return f.P;case f.SYM_L:return f.L;case f.SYM_A:return f.A}throw new V("Unknown dimension symbol: "+n)}}])})();H.P=0,H.L=1,H.A=2,H.FALSE=-1,H.TRUE=-2,H.DONTCARE=-3,H.SYM_FALSE="F",H.SYM_TRUE="T",H.SYM_DONTCARE="*",H.SYM_P="0",H.SYM_L="1",H.SYM_A="2";var ae=(function(){return g((function f(){o(this,f)}),[{key:"filter",value:function(f){}}])})(),be=(function(){return g((function f(){o(this,f)}),[{key:"filter",value:function(f,n){}},{key:"isDone",value:function(){}},{key:"isGeometryChanged",value:function(){}}])})(),Ie=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"computeEnvelopeInternal",value:function(){return this.isEmpty()?new ye:this._points.expandEnvelope(new ye)}},{key:"isRing",value:function(){return this.isClosed()&&this.isSimple()}},{key:"getCoordinates",value:function(){return this._points.toCoordinateArray()}},{key:"copyInternal",value:function(){return new n(this._points.copy(),this._factory)}},{key:"equalsExact",value:function(){if(arguments.length===2&&typeof arguments[1]=="number"&&arguments[0]instanceof de){var a=arguments[0],h=arguments[1];if(!this.isEquivalentClass(a))return!1;var v=a;if(this._points.size()!==v._points.size())return!1;for(var I=0;I<this._points.size();I++)if(!this.equal(this._points.getCoordinate(I),v._points.getCoordinate(I),h))return!1;return!0}return A(n,"equalsExact",this,1).apply(this,arguments)}},{key:"normalize",value:function(){for(var a=0;a<Math.trunc(this._points.size()/2);a++){var h=this._points.size()-1-a;if(!this._points.getCoordinate(a).equals(this._points.getCoordinate(h))){if(this._points.getCoordinate(a).compareTo(this._points.getCoordinate(h))>0){var v=this._points.copy();U.reverse(v),this._points=v}return null}}}},{key:"getCoordinate",value:function(){return this.isEmpty()?null:this._points.getCoordinate(0)}},{key:"getBoundaryDimension",value:function(){return this.isClosed()?H.FALSE:0}},{key:"isClosed",value:function(){return!this.isEmpty()&&this.getCoordinateN(0).equals2D(this.getCoordinateN(this.getNumPoints()-1))}},{key:"reverseInternal",value:function(){var a=this._points.copy();return U.reverse(a),this.getFactory().createLineString(a)}},{key:"getEndPoint",value:function(){return this.isEmpty()?null:this.getPointN(this.getNumPoints()-1)}},{key:"getTypeCode",value:function(){return de.TYPECODE_LINESTRING}},{key:"getDimension",value:function(){return 1}},{key:"getLength",value:function(){return dr.ofLine(this._points)}},{key:"getNumPoints",value:function(){return this._points.size()}},{key:"compareToSameClass",value:function(){if(arguments.length===1){for(var a=arguments[0],h=0,v=0;h<this._points.size()&&v<a._points.size();){var I=this._points.getCoordinate(h).compareTo(a._points.getCoordinate(v));if(I!==0)return I;h++,v++}return h<this._points.size()?1:v<a._points.size()?-1:0}if(arguments.length===2){var R=arguments[0];return arguments[1].compare(this._points,R._points)}}},{key:"apply",value:function(){if(Le(arguments[0],Ht))for(var a=arguments[0],h=0;h<this._points.size();h++)a.filter(this._points.getCoordinate(h));else if(Le(arguments[0],be)){var v=arguments[0];if(this._points.size()===0)return null;for(var I=0;I<this._points.size()&&(v.filter(this._points,I),!v.isDone());I++);v.isGeometryChanged()&&this.geometryChanged()}else Le(arguments[0],ae)?arguments[0].filter(this):Le(arguments[0],Y)&&arguments[0].filter(this)}},{key:"getBoundary",value:function(){throw new je}},{key:"isEquivalentClass",value:function(a){return a instanceof n}},{key:"getCoordinateN",value:function(a){return this._points.getCoordinate(a)}},{key:"getGeometryType",value:function(){return de.TYPENAME_LINESTRING}},{key:"getCoordinateSequence",value:function(){return this._points}},{key:"isEmpty",value:function(){return this._points.size()===0}},{key:"init",value:function(a){if(a===null&&(a=this.getFactory().getCoordinateSequenceFactory().create([])),a.size()===1)throw new V("Invalid number of points in LineString (found "+a.size()+" - must be 0 or >= 2)");this._points=a}},{key:"isCoordinate",value:function(a){for(var h=0;h<this._points.size();h++)if(this._points.getCoordinate(h).equals(a))return!0;return!1}},{key:"getStartPoint",value:function(){return this.isEmpty()?null:this.getPointN(0)}},{key:"getPointN",value:function(a){return this.getFactory().createPoint(this._points.getCoordinate(a))}},{key:"interfaces_",get:function(){return[F]}}],[{key:"constructor_",value:function(){if(this._points=null,arguments.length!==0){if(arguments.length===2){var a=arguments[0],h=arguments[1];de.constructor_.call(this,h),this.init(a)}}}}])})(de),ge=g((function f(){o(this,f)})),He=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"computeEnvelopeInternal",value:function(){if(this.isEmpty())return new ye;var a=new ye;return a.expandToInclude(this._coordinates.getX(0),this._coordinates.getY(0)),a}},{key:"getCoordinates",value:function(){return this.isEmpty()?[]:[this.getCoordinate()]}},{key:"copyInternal",value:function(){return new n(this._coordinates.copy(),this._factory)}},{key:"equalsExact",value:function(){if(arguments.length===2&&typeof arguments[1]=="number"&&arguments[0]instanceof de){var a=arguments[0],h=arguments[1];return!!this.isEquivalentClass(a)&&(!(!this.isEmpty()||!a.isEmpty())||this.isEmpty()===a.isEmpty()&&this.equal(a.getCoordinate(),this.getCoordinate(),h))}return A(n,"equalsExact",this,1).apply(this,arguments)}},{key:"normalize",value:function(){}},{key:"getCoordinate",value:function(){return this._coordinates.size()!==0?this._coordinates.getCoordinate(0):null}},{key:"getBoundaryDimension",value:function(){return H.FALSE}},{key:"reverseInternal",value:function(){return this.getFactory().createPoint(this._coordinates.copy())}},{key:"getTypeCode",value:function(){return de.TYPECODE_POINT}},{key:"getDimension",value:function(){return 0}},{key:"getNumPoints",value:function(){return this.isEmpty()?0:1}},{key:"getX",value:function(){if(this.getCoordinate()===null)throw new IllegalStateException("getX called on empty Point");return this.getCoordinate().x}},{key:"compareToSameClass",value:function(){if(arguments.length===1){var a=arguments[0];return this.getCoordinate().compareTo(a.getCoordinate())}if(arguments.length===2){var h=arguments[0];return arguments[1].compare(this._coordinates,h._coordinates)}}},{key:"apply",value:function(){if(Le(arguments[0],Ht)){var a=arguments[0];if(this.isEmpty())return null;a.filter(this.getCoordinate())}else if(Le(arguments[0],be)){var h=arguments[0];if(this.isEmpty())return null;h.filter(this._coordinates,0),h.isGeometryChanged()&&this.geometryChanged()}else Le(arguments[0],ae)?arguments[0].filter(this):Le(arguments[0],Y)&&arguments[0].filter(this)}},{key:"getBoundary",value:function(){return this.getFactory().createGeometryCollection()}},{key:"getGeometryType",value:function(){return de.TYPENAME_POINT}},{key:"getCoordinateSequence",value:function(){return this._coordinates}},{key:"getY",value:function(){if(this.getCoordinate()===null)throw new IllegalStateException("getY called on empty Point");return this.getCoordinate().y}},{key:"isEmpty",value:function(){return this._coordinates.size()===0}},{key:"init",value:function(a){a===null&&(a=this.getFactory().getCoordinateSequenceFactory().create([])),pe.isTrue(a.size()<=1),this._coordinates=a}},{key:"isSimple",value:function(){return!0}},{key:"interfaces_",get:function(){return[ge]}}],[{key:"constructor_",value:function(){this._coordinates=null;var a=arguments[0],h=arguments[1];de.constructor_.call(this,h),this.init(a)}}])})(de),Ye=(function(){function f(){o(this,f)}return g(f,null,[{key:"ofRing",value:function(){if(arguments[0]instanceof Array){var n=arguments[0];return Math.abs(f.ofRingSigned(n))}if(Le(arguments[0],Me)){var a=arguments[0];return Math.abs(f.ofRingSigned(a))}}},{key:"ofRingSigned",value:function(){if(arguments[0]instanceof Array){var n=arguments[0];if(n.length<3)return 0;for(var a=0,h=n[0].x,v=1;v<n.length-1;v++){var I=n[v].x-h,R=n[v+1].y;a+=I*(n[v-1].y-R)}return a/2}if(Le(arguments[0],Me)){var T=arguments[0],O=T.size();if(O<3)return 0;var W=new J,re=new J,ne=new J;T.getCoordinate(0,re),T.getCoordinate(1,ne);var oe=re.x;ne.x-=oe;for(var _e=0,Se=1;Se<O-1;Se++)W.y=re.y,re.x=ne.x,re.y=ne.y,T.getCoordinate(Se+1,ne),ne.x-=oe,_e+=re.x*(W.y-ne.y);return _e/2}}}])})(),Ze=(function(){return g((function f(){o(this,f)}),null,[{key:"sort",value:function(){var f=arguments,n=arguments[0];if(arguments.length===1)n.sort((function(oe,_e){return oe.compareTo(_e)}));else if(arguments.length===2)n.sort((function(oe,_e){return f[1].compare(oe,_e)}));else if(arguments.length===3){var a=n.slice(arguments[1],arguments[2]);a.sort();var h=n.slice(0,arguments[1]).concat(a,n.slice(arguments[2],n.length));n.splice(0,n.length);var v,I=y(h);try{for(I.s();!(v=I.n()).done;){var R=v.value;n.push(R)}}catch(oe){I.e(oe)}finally{I.f()}}else if(arguments.length===4){var T=n.slice(arguments[1],arguments[2]);T.sort((function(oe,_e){return f[3].compare(oe,_e)}));var O=n.slice(0,arguments[1]).concat(T,n.slice(arguments[2],n.length));n.splice(0,n.length);var W,re=y(O);try{for(re.s();!(W=re.n()).done;){var ne=W.value;n.push(ne)}}catch(oe){re.e(oe)}finally{re.f()}}}},{key:"asList",value:function(f){var n,a=new De,h=y(f);try{for(h.s();!(n=h.n()).done;){var v=n.value;a.add(v)}}catch(I){h.e(I)}finally{h.f()}return a}},{key:"copyOf",value:function(f,n){return f.slice(0,n)}}])})(),vt=g((function f(){o(this,f)})),Pt=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"computeEnvelopeInternal",value:function(){return this._shell.getEnvelopeInternal()}},{key:"getCoordinates",value:function(){if(this.isEmpty())return[];for(var a=new Array(this.getNumPoints()).fill(null),h=-1,v=this._shell.getCoordinates(),I=0;I<v.length;I++)a[++h]=v[I];for(var R=0;R<this._holes.length;R++)for(var T=this._holes[R].getCoordinates(),O=0;O<T.length;O++)a[++h]=T[O];return a}},{key:"getArea",value:function(){var a=0;a+=Ye.ofRing(this._shell.getCoordinateSequence());for(var h=0;h<this._holes.length;h++)a-=Ye.ofRing(this._holes[h].getCoordinateSequence());return a}},{key:"copyInternal",value:function(){for(var a=this._shell.copy(),h=new Array(this._holes.length).fill(null),v=0;v<this._holes.length;v++)h[v]=this._holes[v].copy();return new n(a,h,this._factory)}},{key:"isRectangle",value:function(){if(this.getNumInteriorRing()!==0||this._shell===null||this._shell.getNumPoints()!==5)return!1;for(var a=this._shell.getCoordinateSequence(),h=this.getEnvelopeInternal(),v=0;v<5;v++){var I=a.getX(v);if(I!==h.getMinX()&&I!==h.getMaxX())return!1;var R=a.getY(v);if(R!==h.getMinY()&&R!==h.getMaxY())return!1}for(var T=a.getX(0),O=a.getY(0),W=1;W<=4;W++){var re=a.getX(W),ne=a.getY(W);if(re!==T==(ne!==O))return!1;T=re,O=ne}return!0}},{key:"equalsExact",value:function(){if(arguments.length===2&&typeof arguments[1]=="number"&&arguments[0]instanceof de){var a=arguments[0],h=arguments[1];if(!this.isEquivalentClass(a))return!1;var v=a,I=this._shell,R=v._shell;if(!I.equalsExact(R,h)||this._holes.length!==v._holes.length)return!1;for(var T=0;T<this._holes.length;T++)if(!this._holes[T].equalsExact(v._holes[T],h))return!1;return!0}return A(n,"equalsExact",this,1).apply(this,arguments)}},{key:"normalize",value:function(){if(arguments.length===0){this._shell=this.normalized(this._shell,!0);for(var a=0;a<this._holes.length;a++)this._holes[a]=this.normalized(this._holes[a],!1);Ze.sort(this._holes)}else if(arguments.length===2){var h=arguments[0],v=arguments[1];if(h.isEmpty())return null;var I=h.getCoordinateSequence(),R=U.minCoordinateIndex(I,0,I.size()-2);U.scroll(I,R,!0),ke.isCCW(I)===v&&U.reverse(I)}}},{key:"getCoordinate",value:function(){return this._shell.getCoordinate()}},{key:"getNumInteriorRing",value:function(){return this._holes.length}},{key:"getBoundaryDimension",value:function(){return 1}},{key:"reverseInternal",value:function(){for(var a=this.getExteriorRing().reverse(),h=new Array(this.getNumInteriorRing()).fill(null),v=0;v<h.length;v++)h[v]=this.getInteriorRingN(v).reverse();return this.getFactory().createPolygon(a,h)}},{key:"getTypeCode",value:function(){return de.TYPECODE_POLYGON}},{key:"getDimension",value:function(){return 2}},{key:"getLength",value:function(){var a=0;a+=this._shell.getLength();for(var h=0;h<this._holes.length;h++)a+=this._holes[h].getLength();return a}},{key:"getNumPoints",value:function(){for(var a=this._shell.getNumPoints(),h=0;h<this._holes.length;h++)a+=this._holes[h].getNumPoints();return a}},{key:"convexHull",value:function(){return this.getExteriorRing().convexHull()}},{key:"normalized",value:function(a,h){var v=a.copy();return this.normalize(v,h),v}},{key:"compareToSameClass",value:function(){if(arguments.length===1){var a=arguments[0],h=this._shell,v=a._shell;return h.compareToSameClass(v)}if(arguments.length===2){var I=arguments[1],R=arguments[0],T=this._shell,O=R._shell,W=T.compareToSameClass(O,I);if(W!==0)return W;for(var re=this.getNumInteriorRing(),ne=R.getNumInteriorRing(),oe=0;oe<re&&oe<ne;){var _e=this.getInteriorRingN(oe),Se=R.getInteriorRingN(oe),Ne=_e.compareToSameClass(Se,I);if(Ne!==0)return Ne;oe++}return oe<re?1:oe<ne?-1:0}}},{key:"apply",value:function(){if(Le(arguments[0],Ht)){var a=arguments[0];this._shell.apply(a);for(var h=0;h<this._holes.length;h++)this._holes[h].apply(a)}else if(Le(arguments[0],be)){var v=arguments[0];if(this._shell.apply(v),!v.isDone())for(var I=0;I<this._holes.length&&(this._holes[I].apply(v),!v.isDone());I++);v.isGeometryChanged()&&this.geometryChanged()}else if(Le(arguments[0],ae))arguments[0].filter(this);else if(Le(arguments[0],Y)){var R=arguments[0];R.filter(this),this._shell.apply(R);for(var T=0;T<this._holes.length;T++)this._holes[T].apply(R)}}},{key:"getBoundary",value:function(){if(this.isEmpty())return this.getFactory().createMultiLineString();var a=new Array(this._holes.length+1).fill(null);a[0]=this._shell;for(var h=0;h<this._holes.length;h++)a[h+1]=this._holes[h];return a.length<=1?this.getFactory().createLinearRing(a[0].getCoordinateSequence()):this.getFactory().createMultiLineString(a)}},{key:"getGeometryType",value:function(){return de.TYPENAME_POLYGON}},{key:"getExteriorRing",value:function(){return this._shell}},{key:"isEmpty",value:function(){return this._shell.isEmpty()}},{key:"getInteriorRingN",value:function(a){return this._holes[a]}},{key:"interfaces_",get:function(){return[vt]}}],[{key:"constructor_",value:function(){this._shell=null,this._holes=null;var a=arguments[0],h=arguments[1],v=arguments[2];if(de.constructor_.call(this,v),a===null&&(a=this.getFactory().createLinearRing()),h===null&&(h=[]),de.hasNullElements(h))throw new V("holes must not contain null elements");if(a.isEmpty()&&de.hasNonEmptyElements(h))throw new V("shell is empty but holes are not");this._shell=a,this._holes=h}}])})(de),Tt=(function(f){function n(){return o(this,n),s(this,n,arguments)}return E(n,f),g(n)})(Fe),Ct=(function(f){function n(a){var h;return o(this,n),(h=s(this,n)).array=[],a instanceof Re&&h.addAll(a),h}return E(n,f),g(n,[{key:"contains",value:function(a){var h,v=y(this.array);try{for(v.s();!(h=v.n()).done;)if(h.value.compareTo(a)===0)return!0}catch(I){v.e(I)}finally{v.f()}return!1}},{key:"add",value:function(a){if(this.contains(a))return!1;for(var h=0,v=this.array.length;h<v;h++)if(this.array[h].compareTo(a)===1)return!!this.array.splice(h,0,a);return this.array.push(a),!0}},{key:"addAll",value:function(a){var h,v=y(a);try{for(v.s();!(h=v.n()).done;){var I=h.value;this.add(I)}}catch(R){v.e(R)}finally{v.f()}return!0}},{key:"remove",value:function(){throw new je}},{key:"size",value:function(){return this.array.length}},{key:"isEmpty",value:function(){return this.array.length===0}},{key:"toArray",value:function(){return this.array.slice()}},{key:"iterator",value:function(){return new Yt(this.array)}}])})(Tt),Yt=(function(){return g((function f(n){o(this,f),this.array=n,this.position=0}),[{key:"next",value:function(){if(this.position===this.array.length)throw new Oe;return this.array[this.position++]}},{key:"hasNext",value:function(){return this.position<this.array.length}},{key:"remove",value:function(){throw new je}}])})(),Ke=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"computeEnvelopeInternal",value:function(){for(var a=new ye,h=0;h<this._geometries.length;h++)a.expandToInclude(this._geometries[h].getEnvelopeInternal());return a}},{key:"getGeometryN",value:function(a){return this._geometries[a]}},{key:"getCoordinates",value:function(){for(var a=new Array(this.getNumPoints()).fill(null),h=-1,v=0;v<this._geometries.length;v++)for(var I=this._geometries[v].getCoordinates(),R=0;R<I.length;R++)a[++h]=I[R];return a}},{key:"getArea",value:function(){for(var a=0,h=0;h<this._geometries.length;h++)a+=this._geometries[h].getArea();return a}},{key:"copyInternal",value:function(){for(var a=new Array(this._geometries.length).fill(null),h=0;h<a.length;h++)a[h]=this._geometries[h].copy();return new n(a,this._factory)}},{key:"equalsExact",value:function(){if(arguments.length===2&&typeof arguments[1]=="number"&&arguments[0]instanceof de){var a=arguments[0],h=arguments[1];if(!this.isEquivalentClass(a))return!1;var v=a;if(this._geometries.length!==v._geometries.length)return!1;for(var I=0;I<this._geometries.length;I++)if(!this._geometries[I].equalsExact(v._geometries[I],h))return!1;return!0}return A(n,"equalsExact",this,1).apply(this,arguments)}},{key:"normalize",value:function(){for(var a=0;a<this._geometries.length;a++)this._geometries[a].normalize();Ze.sort(this._geometries)}},{key:"getCoordinate",value:function(){return this.isEmpty()?null:this._geometries[0].getCoordinate()}},{key:"getBoundaryDimension",value:function(){for(var a=H.FALSE,h=0;h<this._geometries.length;h++)a=Math.max(a,this._geometries[h].getBoundaryDimension());return a}},{key:"reverseInternal",value:function(){for(var a=this._geometries.length,h=new De(a),v=0;v<a;v++)h.add(this._geometries[v].reverse());return this.getFactory().buildGeometry(h)}},{key:"getTypeCode",value:function(){return de.TYPECODE_GEOMETRYCOLLECTION}},{key:"getDimension",value:function(){for(var a=H.FALSE,h=0;h<this._geometries.length;h++)a=Math.max(a,this._geometries[h].getDimension());return a}},{key:"getLength",value:function(){for(var a=0,h=0;h<this._geometries.length;h++)a+=this._geometries[h].getLength();return a}},{key:"getNumPoints",value:function(){for(var a=0,h=0;h<this._geometries.length;h++)a+=this._geometries[h].getNumPoints();return a}},{key:"getNumGeometries",value:function(){return this._geometries.length}},{key:"compareToSameClass",value:function(){if(arguments.length===1){var a=arguments[0],h=new Ct(Ze.asList(this._geometries)),v=new Ct(Ze.asList(a._geometries));return this.compare(h,v)}if(arguments.length===2){for(var I=arguments[1],R=arguments[0],T=this.getNumGeometries(),O=R.getNumGeometries(),W=0;W<T&&W<O;){var re=this.getGeometryN(W),ne=R.getGeometryN(W),oe=re.compareToSameClass(ne,I);if(oe!==0)return oe;W++}return W<T?1:W<O?-1:0}}},{key:"apply",value:function(){if(Le(arguments[0],Ht))for(var a=arguments[0],h=0;h<this._geometries.length;h++)this._geometries[h].apply(a);else if(Le(arguments[0],be)){var v=arguments[0];if(this._geometries.length===0)return null;for(var I=0;I<this._geometries.length&&(this._geometries[I].apply(v),!v.isDone());I++);v.isGeometryChanged()&&this.geometryChanged()}else if(Le(arguments[0],ae)){var R=arguments[0];R.filter(this);for(var T=0;T<this._geometries.length;T++)this._geometries[T].apply(R)}else if(Le(arguments[0],Y)){var O=arguments[0];O.filter(this);for(var W=0;W<this._geometries.length;W++)this._geometries[W].apply(O)}}},{key:"getBoundary",value:function(){return de.checkNotGeometryCollection(this),pe.shouldNeverReachHere(),null}},{key:"getGeometryType",value:function(){return de.TYPENAME_GEOMETRYCOLLECTION}},{key:"isEmpty",value:function(){for(var a=0;a<this._geometries.length;a++)if(!this._geometries[a].isEmpty())return!1;return!0}}],[{key:"constructor_",value:function(){if(this._geometries=null,arguments.length!==0){if(arguments.length===2){var a=arguments[0],h=arguments[1];if(de.constructor_.call(this,h),a===null&&(a=[]),de.hasNullElements(a))throw new V("geometries must not contain null elements");this._geometries=a}}}}])})(de),St=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"copyInternal",value:function(){for(var a=new Array(this._geometries.length).fill(null),h=0;h<a.length;h++)a[h]=this._geometries[h].copy();return new n(a,this._factory)}},{key:"isValid",value:function(){return!0}},{key:"equalsExact",value:function(){if(arguments.length===2&&typeof arguments[1]=="number"&&arguments[0]instanceof de){var a=arguments[0],h=arguments[1];return!!this.isEquivalentClass(a)&&A(n,"equalsExact",this,1).call(this,a,h)}return A(n,"equalsExact",this,1).apply(this,arguments)}},{key:"getCoordinate",value:function(){if(arguments.length===1&&Number.isInteger(arguments[0])){var a=arguments[0];return this._geometries[a].getCoordinate()}return A(n,"getCoordinate",this,1).apply(this,arguments)}},{key:"getBoundaryDimension",value:function(){return H.FALSE}},{key:"getTypeCode",value:function(){return de.TYPECODE_MULTIPOINT}},{key:"getDimension",value:function(){return 0}},{key:"getBoundary",value:function(){return this.getFactory().createGeometryCollection()}},{key:"getGeometryType",value:function(){return de.TYPENAME_MULTIPOINT}},{key:"interfaces_",get:function(){return[ge]}}],[{key:"constructor_",value:function(){var a=arguments[0],h=arguments[1];Ke.constructor_.call(this,a,h)}}])})(Ke),ht=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"copyInternal",value:function(){return new n(this._points.copy(),this._factory)}},{key:"getBoundaryDimension",value:function(){return H.FALSE}},{key:"isClosed",value:function(){return!!this.isEmpty()||A(n,"isClosed",this,1).call(this)}},{key:"reverseInternal",value:function(){var a=this._points.copy();return U.reverse(a),this.getFactory().createLinearRing(a)}},{key:"getTypeCode",value:function(){return de.TYPECODE_LINEARRING}},{key:"validateConstruction",value:function(){if(!this.isEmpty()&&!A(n,"isClosed",this,1).call(this))throw new V("Points of LinearRing do not form a closed linestring");if(this.getCoordinateSequence().size()>=1&&this.getCoordinateSequence().size()<n.MINIMUM_VALID_SIZE)throw new V("Invalid number of points in LinearRing (found "+this.getCoordinateSequence().size()+" - must be 0 or >= 4)")}},{key:"getGeometryType",value:function(){return de.TYPENAME_LINEARRING}}],[{key:"constructor_",value:function(){var a=arguments[0],h=arguments[1];Ie.constructor_.call(this,a,h),this.validateConstruction()}}])})(Ie);ht.MINIMUM_VALID_SIZE=4;var rt=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"setOrdinate",value:function(a,h){switch(a){case n.X:this.x=h;break;case n.Y:this.y=h;break;default:throw new V("Invalid ordinate index: "+a)}}},{key:"getZ",value:function(){return J.NULL_ORDINATE}},{key:"getOrdinate",value:function(a){switch(a){case n.X:return this.x;case n.Y:return this.y}throw new V("Invalid ordinate index: "+a)}},{key:"setZ",value:function(a){throw new V("CoordinateXY dimension 2 does not support z-ordinate")}},{key:"copy",value:function(){return new n(this)}},{key:"toString",value:function(){return"("+this.x+", "+this.y+")"}},{key:"setCoordinate",value:function(a){this.x=a.x,this.y=a.y,this.z=a.getZ()}}],[{key:"constructor_",value:function(){if(arguments.length===0)J.constructor_.call(this);else if(arguments.length===1){if(arguments[0]instanceof n){var a=arguments[0];J.constructor_.call(this,a.x,a.y)}else if(arguments[0]instanceof J){var h=arguments[0];J.constructor_.call(this,h.x,h.y)}}else if(arguments.length===2){var v=arguments[0],I=arguments[1];J.constructor_.call(this,v,I,J.NULL_ORDINATE)}}}])})(J);rt.X=0,rt.Y=1,rt.Z=-1,rt.M=-1;var ut=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"getM",value:function(){return this._m}},{key:"setOrdinate",value:function(a,h){switch(a){case n.X:this.x=h;break;case n.Y:this.y=h;break;case n.M:this._m=h;break;default:throw new V("Invalid ordinate index: "+a)}}},{key:"setM",value:function(a){this._m=a}},{key:"getZ",value:function(){return J.NULL_ORDINATE}},{key:"getOrdinate",value:function(a){switch(a){case n.X:return this.x;case n.Y:return this.y;case n.M:return this._m}throw new V("Invalid ordinate index: "+a)}},{key:"setZ",value:function(a){throw new V("CoordinateXY dimension 2 does not support z-ordinate")}},{key:"copy",value:function(){return new n(this)}},{key:"toString",value:function(){return"("+this.x+", "+this.y+" m="+this.getM()+")"}},{key:"setCoordinate",value:function(a){this.x=a.x,this.y=a.y,this.z=a.getZ(),this._m=a.getM()}}],[{key:"constructor_",value:function(){if(this._m=null,arguments.length===0)J.constructor_.call(this),this._m=0;else if(arguments.length===1){if(arguments[0]instanceof n){var a=arguments[0];J.constructor_.call(this,a.x,a.y),this._m=a._m}else if(arguments[0]instanceof J){var h=arguments[0];J.constructor_.call(this,h.x,h.y),this._m=this.getM()}}else if(arguments.length===3){var v=arguments[0],I=arguments[1],R=arguments[2];J.constructor_.call(this,v,I,J.NULL_ORDINATE),this._m=R}}}])})(J);ut.X=0,ut.Y=1,ut.Z=-1,ut.M=2;var ot=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"getM",value:function(){return this._m}},{key:"setOrdinate",value:function(a,h){switch(a){case J.X:this.x=h;break;case J.Y:this.y=h;break;case J.Z:this.z=h;break;case J.M:this._m=h;break;default:throw new V("Invalid ordinate index: "+a)}}},{key:"setM",value:function(a){this._m=a}},{key:"getOrdinate",value:function(a){switch(a){case J.X:return this.x;case J.Y:return this.y;case J.Z:return this.getZ();case J.M:return this.getM()}throw new V("Invalid ordinate index: "+a)}},{key:"copy",value:function(){return new n(this)}},{key:"toString",value:function(){return"("+this.x+", "+this.y+", "+this.getZ()+" m="+this.getM()+")"}},{key:"setCoordinate",value:function(a){this.x=a.x,this.y=a.y,this.z=a.getZ(),this._m=a.getM()}}],[{key:"constructor_",value:function(){if(this._m=null,arguments.length===0)J.constructor_.call(this),this._m=0;else if(arguments.length===1){if(arguments[0]instanceof n){var a=arguments[0];J.constructor_.call(this,a),this._m=a._m}else if(arguments[0]instanceof J){var h=arguments[0];J.constructor_.call(this,h),this._m=this.getM()}}else if(arguments.length===4){var v=arguments[0],I=arguments[1],R=arguments[2],T=arguments[3];J.constructor_.call(this,v,I,R),this._m=T}}}])})(J),qt=(function(){function f(){o(this,f)}return g(f,null,[{key:"measures",value:function(n){return n instanceof rt?0:n instanceof ut||n instanceof ot?1:0}},{key:"dimension",value:function(n){return n instanceof rt?2:n instanceof ut?3:n instanceof ot?4:3}},{key:"create",value:function(){if(arguments.length===1){var n=arguments[0];return f.create(n,0)}if(arguments.length===2){var a=arguments[0],h=arguments[1];return a===2?new rt:a===3&&h===0?new J:a===3&&h===1?new ut:a===4&&h===1?new ot:new J}}}])})(),Rt=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"getCoordinate",value:function(a){return this.get(a)}},{key:"addAll",value:function(){if(arguments.length===2&&typeof arguments[1]=="boolean"&&Le(arguments[0],Re)){for(var a=arguments[1],h=!1,v=arguments[0].iterator();v.hasNext();)this.add(v.next(),a),h=!0;return h}return A(n,"addAll",this,1).apply(this,arguments)}},{key:"clone",value:function(){for(var a=A(n,"clone",this,1).call(this),h=0;h<this.size();h++)a.add(h,this.get(h).clone());return a}},{key:"toCoordinateArray",value:function(){if(arguments.length===0)return this.toArray(n.coordArrayType);if(arguments.length===1){if(arguments[0])return this.toArray(n.coordArrayType);for(var a=this.size(),h=new Array(a).fill(null),v=0;v<a;v++)h[v]=this.get(a-v-1);return h}}},{key:"add",value:function(){if(arguments.length===1){var a=arguments[0];return A(n,"add",this,1).call(this,a)}if(arguments.length===2){if(arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var h=arguments[0],v=arguments[1];return this.add(h,v,!0),!0}if(arguments[0]instanceof J&&typeof arguments[1]=="boolean"){var I=arguments[0];if(!arguments[1]&&this.size()>=1&&this.get(this.size()-1).equals2D(I))return null;A(n,"add",this,1).call(this,I)}else if(arguments[0]instanceof Object&&typeof arguments[1]=="boolean"){var R=arguments[0],T=arguments[1];return this.add(R,T),!0}}else if(arguments.length===3){if(typeof arguments[2]=="boolean"&&arguments[0]instanceof Array&&typeof arguments[1]=="boolean"){var O=arguments[0],W=arguments[1];if(arguments[2])for(var re=0;re<O.length;re++)this.add(O[re],W);else for(var ne=O.length-1;ne>=0;ne--)this.add(O[ne],W);return!0}if(typeof arguments[2]=="boolean"&&Number.isInteger(arguments[0])&&arguments[1]instanceof J){var oe=arguments[0],_e=arguments[1];if(!arguments[2]){var Se=this.size();if(Se>0&&(oe>0&&this.get(oe-1).equals2D(_e)||oe<Se&&this.get(oe).equals2D(_e)))return null}A(n,"add",this,1).call(this,oe,_e)}}else if(arguments.length===4){var Ne=arguments[0],Ge=arguments[1],Be=arguments[2],$e=arguments[3],et=1;Be>$e&&(et=-1);for(var nt=Be;nt!==$e;nt+=et)this.add(Ne[nt],Ge);return!0}}},{key:"closeRing",value:function(){if(this.size()>0){var a=this.get(0).copy();this.add(a,!1)}}}],[{key:"constructor_",value:function(){if(arguments.length!==0){if(arguments.length===1){var a=arguments[0];this.ensureCapacity(a.length),this.add(a,!0)}else if(arguments.length===2){var h=arguments[0],v=arguments[1];this.ensureCapacity(h.length),this.add(h,v)}}}}])})(De);Rt.coordArrayType=new Array(0).fill(null);var We=(function(){function f(){o(this,f)}return g(f,null,[{key:"isRing",value:function(n){return!(n.length<4)&&!!n[0].equals2D(n[n.length-1])}},{key:"ptNotInList",value:function(n,a){for(var h=0;h<n.length;h++){var v=n[h];if(f.indexOf(v,a)<0)return v}return null}},{key:"scroll",value:function(n,a){var h=f.indexOf(a,n);if(h<0)return null;var v=new Array(n.length).fill(null);Je.arraycopy(n,h,v,0,n.length-h),Je.arraycopy(n,0,v,n.length-h,h),Je.arraycopy(v,0,n,0,n.length)}},{key:"equals",value:function(){if(arguments.length===2){var n=arguments[0],a=arguments[1];if(n===a)return!0;if(n===null||a===null||n.length!==a.length)return!1;for(var h=0;h<n.length;h++)if(!n[h].equals(a[h]))return!1;return!0}if(arguments.length===3){var v=arguments[0],I=arguments[1],R=arguments[2];if(v===I)return!0;if(v===null||I===null||v.length!==I.length)return!1;for(var T=0;T<v.length;T++)if(R.compare(v[T],I[T])!==0)return!1;return!0}}},{key:"intersection",value:function(n,a){for(var h=new Rt,v=0;v<n.length;v++)a.intersects(n[v])&&h.add(n[v],!0);return h.toCoordinateArray()}},{key:"measures",value:function(n){if(n===null||n.length===0)return 0;var a,h=0,v=y(n);try{for(v.s();!(a=v.n()).done;){var I=a.value;h=Math.max(h,qt.measures(I))}}catch(R){v.e(R)}finally{v.f()}return h}},{key:"hasRepeatedPoints",value:function(n){for(var a=1;a<n.length;a++)if(n[a-1].equals(n[a]))return!0;return!1}},{key:"removeRepeatedPoints",value:function(n){return f.hasRepeatedPoints(n)?new Rt(n,!1).toCoordinateArray():n}},{key:"reverse",value:function(n){for(var a=n.length-1,h=Math.trunc(a/2),v=0;v<=h;v++){var I=n[v];n[v]=n[a-v],n[a-v]=I}}},{key:"removeNull",value:function(n){for(var a=0,h=0;h<n.length;h++)n[h]!==null&&a++;var v=new Array(a).fill(null);if(a===0)return v;for(var I=0,R=0;R<n.length;R++)n[R]!==null&&(v[I++]=n[R]);return v}},{key:"copyDeep",value:function(){if(arguments.length===1){for(var n=arguments[0],a=new Array(n.length).fill(null),h=0;h<n.length;h++)a[h]=n[h].copy();return a}if(arguments.length===5)for(var v=arguments[0],I=arguments[1],R=arguments[2],T=arguments[3],O=arguments[4],W=0;W<O;W++)R[T+W]=v[I+W].copy()}},{key:"isEqualReversed",value:function(n,a){for(var h=0;h<n.length;h++){var v=n[h],I=a[n.length-h-1];if(v.compareTo(I)!==0)return!1}return!0}},{key:"envelope",value:function(n){for(var a=new ye,h=0;h<n.length;h++)a.expandToInclude(n[h]);return a}},{key:"toCoordinateArray",value:function(n){return n.toArray(f.coordArrayType)}},{key:"dimension",value:function(n){if(n===null||n.length===0)return 3;var a,h=0,v=y(n);try{for(v.s();!(a=v.n()).done;){var I=a.value;h=Math.max(h,qt.dimension(I))}}catch(R){v.e(R)}finally{v.f()}return h}},{key:"atLeastNCoordinatesOrNothing",value:function(n,a){return a.length>=n?a:[]}},{key:"indexOf",value:function(n,a){for(var h=0;h<a.length;h++)if(n.equals(a[h]))return h;return-1}},{key:"increasingDirection",value:function(n){for(var a=0;a<Math.trunc(n.length/2);a++){var h=n.length-1-a,v=n[a].compareTo(n[h]);if(v!==0)return v}return 1}},{key:"compare",value:function(n,a){for(var h=0;h<n.length&&h<a.length;){var v=n[h].compareTo(a[h]);if(v!==0)return v;h++}return h<a.length?-1:h<n.length?1:0}},{key:"minCoordinate",value:function(n){for(var a=null,h=0;h<n.length;h++)(a===null||a.compareTo(n[h])>0)&&(a=n[h]);return a}},{key:"extract",value:function(n,a,h){a=ct.clamp(a,0,n.length);var v=(h=ct.clamp(h,-1,n.length))-a+1;h<0&&(v=0),a>=n.length&&(v=0),h<a&&(v=0);var I=new Array(v).fill(null);if(v===0)return I;for(var R=0,T=a;T<=h;T++)I[R++]=n[T];return I}}])})(),sr=(function(){return g((function f(){o(this,f)}),[{key:"compare",value:function(f,n){var a=f,h=n;return We.compare(a,h)}},{key:"interfaces_",get:function(){return[Te]}}])})(),Ft=(function(){return g((function f(){o(this,f)}),[{key:"compare",value:function(f,n){var a=f,h=n;if(a.length<h.length)return-1;if(a.length>h.length)return 1;if(a.length===0)return 0;var v=We.compare(a,h);return We.isEqualReversed(a,h)?0:v}},{key:"OLDcompare",value:function(f,n){var a=f,h=n;if(a.length<h.length)return-1;if(a.length>h.length)return 1;if(a.length===0)return 0;for(var v=We.increasingDirection(a),I=We.increasingDirection(h),R=v>0?0:a.length-1,T=I>0?0:a.length-1,O=0;O<a.length;O++){var W=a[R].compareTo(h[T]);if(W!==0)return W;R+=v,T+=I}return 0}},{key:"interfaces_",get:function(){return[Te]}}])})();We.ForwardComparator=sr,We.BidirectionalComparator=Ft,We.coordArrayType=new Array(0).fill(null);var $t=(function(){return g((function f(n){o(this,f),this.str=n}),[{key:"append",value:function(f){this.str+=f}},{key:"setCharAt",value:function(f,n){this.str=this.str.substr(0,f)+n+this.str.substr(f+1)}},{key:"toString",value:function(){return this.str}}])})(),bt=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"getM",value:function(n){return this.hasM()?this._coordinates[n].getM():ce.NaN}},{key:"setOrdinate",value:function(n,a,h){switch(a){case Me.X:this._coordinates[n].x=h;break;case Me.Y:this._coordinates[n].y=h;break;default:this._coordinates[n].setOrdinate(a,h)}}},{key:"getZ",value:function(n){return this.hasZ()?this._coordinates[n].getZ():ce.NaN}},{key:"size",value:function(){return this._coordinates.length}},{key:"getOrdinate",value:function(n,a){switch(a){case Me.X:return this._coordinates[n].x;case Me.Y:return this._coordinates[n].y;default:return this._coordinates[n].getOrdinate(a)}}},{key:"getCoordinate",value:function(){if(arguments.length===1){var n=arguments[0];return this._coordinates[n]}if(arguments.length===2){var a=arguments[0];arguments[1].setCoordinate(this._coordinates[a])}}},{key:"getCoordinateCopy",value:function(n){var a=this.createCoordinate();return a.setCoordinate(this._coordinates[n]),a}},{key:"createCoordinate",value:function(){return qt.create(this.getDimension(),this.getMeasures())}},{key:"getDimension",value:function(){return this._dimension}},{key:"getX",value:function(n){return this._coordinates[n].x}},{key:"getMeasures",value:function(){return this._measures}},{key:"expandEnvelope",value:function(n){for(var a=0;a<this._coordinates.length;a++)n.expandToInclude(this._coordinates[a]);return n}},{key:"copy",value:function(){for(var n=new Array(this.size()).fill(null),a=0;a<this._coordinates.length;a++){var h=this.createCoordinate();h.setCoordinate(this._coordinates[a]),n[a]=h}return new f(n,this._dimension,this._measures)}},{key:"toString",value:function(){if(this._coordinates.length>0){var n=new $t(17*this._coordinates.length);n.append("("),n.append(this._coordinates[0]);for(var a=1;a<this._coordinates.length;a++)n.append(", "),n.append(this._coordinates[a]);return n.append(")"),n.toString()}return"()"}},{key:"getY",value:function(n){return this._coordinates[n].y}},{key:"toCoordinateArray",value:function(){return this._coordinates}},{key:"interfaces_",get:function(){return[Me,$]}}],[{key:"constructor_",value:function(){if(this._dimension=3,this._measures=0,this._coordinates=null,arguments.length===1){if(arguments[0]instanceof Array){var n=arguments[0];f.constructor_.call(this,n,We.dimension(n),We.measures(n))}else if(Number.isInteger(arguments[0])){var a=arguments[0];this._coordinates=new Array(a).fill(null);for(var h=0;h<a;h++)this._coordinates[h]=new J}else if(Le(arguments[0],Me)){var v=arguments[0];if(v===null)return this._coordinates=new Array(0).fill(null),null;this._dimension=v.getDimension(),this._measures=v.getMeasures(),this._coordinates=new Array(v.size()).fill(null);for(var I=0;I<this._coordinates.length;I++)this._coordinates[I]=v.getCoordinateCopy(I)}}else if(arguments.length===2){if(arguments[0]instanceof Array&&Number.isInteger(arguments[1])){var R=arguments[0],T=arguments[1];f.constructor_.call(this,R,T,We.measures(R))}else if(Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var O=arguments[0],W=arguments[1];this._coordinates=new Array(O).fill(null),this._dimension=W;for(var re=0;re<O;re++)this._coordinates[re]=qt.create(W)}}else if(arguments.length===3){if(Number.isInteger(arguments[2])&&arguments[0]instanceof Array&&Number.isInteger(arguments[1])){var ne=arguments[0],oe=arguments[1],_e=arguments[2];this._dimension=oe,this._measures=_e,this._coordinates=ne===null?new Array(0).fill(null):ne}else if(Number.isInteger(arguments[2])&&Number.isInteger(arguments[0])&&Number.isInteger(arguments[1])){var Se=arguments[0],Ne=arguments[1],Ge=arguments[2];this._coordinates=new Array(Se).fill(null),this._dimension=Ne,this._measures=Ge;for(var Be=0;Be<Se;Be++)this._coordinates[Be]=this.createCoordinate()}}}}])})(),Jt=(function(){function f(){o(this,f)}return g(f,[{key:"readResolve",value:function(){return f.instance()}},{key:"create",value:function(){if(arguments.length===1){if(arguments[0]instanceof Array)return new bt(arguments[0]);if(Le(arguments[0],Me))return new bt(arguments[0])}else{if(arguments.length===2){var n=arguments[1];return n>3&&(n=3),n<2&&(n=2),new bt(arguments[0],n)}if(arguments.length===3){var a=arguments[2],h=arguments[1]-a;return a>1&&(a=1),h>3&&(h=3),h<2&&(h=2),new bt(arguments[0],h+a,a)}}}},{key:"interfaces_",get:function(){return[cr,$]}}],[{key:"instance",value:function(){return f.instanceObject}}])})();Jt.instanceObject=new Jt;var yr=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"copyInternal",value:function(){for(var a=new Array(this._geometries.length).fill(null),h=0;h<a.length;h++)a[h]=this._geometries[h].copy();return new n(a,this._factory)}},{key:"equalsExact",value:function(){if(arguments.length===2&&typeof arguments[1]=="number"&&arguments[0]instanceof de){var a=arguments[0],h=arguments[1];return!!this.isEquivalentClass(a)&&A(n,"equalsExact",this,1).call(this,a,h)}return A(n,"equalsExact",this,1).apply(this,arguments)}},{key:"getBoundaryDimension",value:function(){return 1}},{key:"getTypeCode",value:function(){return de.TYPECODE_MULTIPOLYGON}},{key:"getDimension",value:function(){return 2}},{key:"getBoundary",value:function(){if(this.isEmpty())return this.getFactory().createMultiLineString();for(var a=new De,h=0;h<this._geometries.length;h++)for(var v=this._geometries[h].getBoundary(),I=0;I<v.getNumGeometries();I++)a.add(v.getGeometryN(I));var R=new Array(a.size()).fill(null);return this.getFactory().createMultiLineString(a.toArray(R))}},{key:"getGeometryType",value:function(){return de.TYPENAME_MULTIPOLYGON}},{key:"interfaces_",get:function(){return[vt]}}],[{key:"constructor_",value:function(){var a=arguments[0],h=arguments[1];Ke.constructor_.call(this,a,h)}}])})(Ke),wr=(function(){return g((function f(){o(this,f)}),[{key:"get",value:function(){}},{key:"put",value:function(){}},{key:"size",value:function(){}},{key:"values",value:function(){}},{key:"entrySet",value:function(){}}])})(),gn=(function(f){function n(){var a;return o(this,n),(a=s(this,n)).map=new Map,a}return E(n,f),g(n,[{key:"get",value:function(a){return this.map.get(a)||null}},{key:"put",value:function(a,h){return this.map.set(a,h),h}},{key:"values",value:function(){for(var a=new De,h=this.map.values(),v=h.next();!v.done;)a.add(v.value),v=h.next();return a}},{key:"entrySet",value:function(){var a=new it;return this.map.entries().forEach((function(h){return a.add(h)})),a}},{key:"size",value:function(){return this.map.size()}}])})(wr),At=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"equals",value:function(n){if(!(n instanceof f))return!1;var a=n;return this._modelType===a._modelType&&this._scale===a._scale}},{key:"compareTo",value:function(n){var a=n,h=this.getMaximumSignificantDigits(),v=a.getMaximumSignificantDigits();return gt.compare(h,v)}},{key:"getScale",value:function(){return this._scale}},{key:"isFloating",value:function(){return this._modelType===f.FLOATING||this._modelType===f.FLOATING_SINGLE}},{key:"getType",value:function(){return this._modelType}},{key:"toString",value:function(){var n="UNKNOWN";return this._modelType===f.FLOATING?n="Floating":this._modelType===f.FLOATING_SINGLE?n="Floating-Single":this._modelType===f.FIXED&&(n="Fixed (Scale="+this.getScale()+")"),n}},{key:"makePrecise",value:function(){if(typeof arguments[0]=="number"){var n=arguments[0];return ce.isNaN(n)||this._modelType===f.FLOATING_SINGLE?n:this._modelType===f.FIXED?Math.round(n*this._scale)/this._scale:n}if(arguments[0]instanceof J){var a=arguments[0];if(this._modelType===f.FLOATING)return null;a.x=this.makePrecise(a.x),a.y=this.makePrecise(a.y)}}},{key:"getMaximumSignificantDigits",value:function(){var n=16;return this._modelType===f.FLOATING?n=16:this._modelType===f.FLOATING_SINGLE?n=6:this._modelType===f.FIXED&&(n=1+Math.trunc(Math.ceil(Math.log(this.getScale())/Math.log(10)))),n}},{key:"setScale",value:function(n){this._scale=Math.abs(n)}},{key:"interfaces_",get:function(){return[$,X]}}],[{key:"constructor_",value:function(){if(this._modelType=null,this._scale=null,arguments.length===0)this._modelType=f.FLOATING;else if(arguments.length===1){if(arguments[0]instanceof Kt){var n=arguments[0];this._modelType=n,n===f.FIXED&&this.setScale(1)}else if(typeof arguments[0]=="number"){var a=arguments[0];this._modelType=f.FIXED,this.setScale(a)}else if(arguments[0]instanceof f){var h=arguments[0];this._modelType=h._modelType,this._scale=h._scale}}}},{key:"mostPrecise",value:function(n,a){return n.compareTo(a)>=0?n:a}}])})(),Kt=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"readResolve",value:function(){return f.nameToTypeMap.get(this._name)}},{key:"toString",value:function(){return this._name}},{key:"interfaces_",get:function(){return[$]}}],[{key:"constructor_",value:function(){this._name=null;var n=arguments[0];this._name=n,f.nameToTypeMap.put(n,this)}}])})();Kt.nameToTypeMap=new gn,At.Type=Kt,At.FIXED=new Kt("FIXED"),At.FLOATING=new Kt("FLOATING"),At.FLOATING_SINGLE=new Kt("FLOATING SINGLE"),At.maximumPreciseValue=9007199254740992;var vr=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"copyInternal",value:function(){for(var a=new Array(this._geometries.length).fill(null),h=0;h<a.length;h++)a[h]=this._geometries[h].copy();return new n(a,this._factory)}},{key:"equalsExact",value:function(){if(arguments.length===2&&typeof arguments[1]=="number"&&arguments[0]instanceof de){var a=arguments[0],h=arguments[1];return!!this.isEquivalentClass(a)&&A(n,"equalsExact",this,1).call(this,a,h)}return A(n,"equalsExact",this,1).apply(this,arguments)}},{key:"getBoundaryDimension",value:function(){return this.isClosed()?H.FALSE:0}},{key:"isClosed",value:function(){if(this.isEmpty())return!1;for(var a=0;a<this._geometries.length;a++)if(!this._geometries[a].isClosed())return!1;return!0}},{key:"getTypeCode",value:function(){return de.TYPECODE_MULTILINESTRING}},{key:"getDimension",value:function(){return 1}},{key:"getBoundary",value:function(){throw new je}},{key:"getGeometryType",value:function(){return de.TYPENAME_MULTILINESTRING}},{key:"interfaces_",get:function(){return[F]}}],[{key:"constructor_",value:function(){var a=arguments[0],h=arguments[1];Ke.constructor_.call(this,a,h)}}])})(Ke),Qt=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"createEmpty",value:function(n){switch(n){case-1:return this.createGeometryCollection();case 0:return this.createPoint();case 1:return this.createLineString();case 2:return this.createPolygon();default:throw new V("Invalid dimension: "+n)}}},{key:"toGeometry",value:function(n){return n.isNull()?this.createPoint():n.getMinX()===n.getMaxX()&&n.getMinY()===n.getMaxY()?this.createPoint(new J(n.getMinX(),n.getMinY())):n.getMinX()===n.getMaxX()||n.getMinY()===n.getMaxY()?this.createLineString([new J(n.getMinX(),n.getMinY()),new J(n.getMaxX(),n.getMaxY())]):this.createPolygon(this.createLinearRing([new J(n.getMinX(),n.getMinY()),new J(n.getMinX(),n.getMaxY()),new J(n.getMaxX(),n.getMaxY()),new J(n.getMaxX(),n.getMinY()),new J(n.getMinX(),n.getMinY())]),null)}},{key:"createLineString",value:function(){if(arguments.length===0)return this.createLineString(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof Array){var n=arguments[0];return this.createLineString(n!==null?this.getCoordinateSequenceFactory().create(n):null)}if(Le(arguments[0],Me))return new Ie(arguments[0],this)}}},{key:"createMultiLineString",value:function(){return arguments.length===0?new vr(null,this):arguments.length===1?new vr(arguments[0],this):void 0}},{key:"buildGeometry",value:function(n){for(var a=null,h=!1,v=!1,I=n.iterator();I.hasNext();){var R=I.next(),T=R.getTypeCode();a===null&&(a=T),T!==a&&(h=!0),R instanceof Ke&&(v=!0)}if(a===null)return this.createGeometryCollection();if(h||v)return this.createGeometryCollection(f.toGeometryArray(n));var O=n.iterator().next();if(n.size()>1){if(O instanceof Pt)return this.createMultiPolygon(f.toPolygonArray(n));if(O instanceof Ie)return this.createMultiLineString(f.toLineStringArray(n));if(O instanceof He)return this.createMultiPoint(f.toPointArray(n));pe.shouldNeverReachHere("Unhandled geometry type: "+O.getGeometryType())}return O}},{key:"createMultiPointFromCoords",value:function(n){return this.createMultiPoint(n!==null?this.getCoordinateSequenceFactory().create(n):null)}},{key:"createPoint",value:function(){if(arguments.length===0)return this.createPoint(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof J){var n=arguments[0];return this.createPoint(n!==null?this.getCoordinateSequenceFactory().create([n]):null)}if(Le(arguments[0],Me))return new He(arguments[0],this)}}},{key:"getCoordinateSequenceFactory",value:function(){return this._coordinateSequenceFactory}},{key:"createPolygon",value:function(){if(arguments.length===0)return this.createPolygon(null,null);if(arguments.length===1){if(Le(arguments[0],Me)){var n=arguments[0];return this.createPolygon(this.createLinearRing(n))}if(arguments[0]instanceof Array){var a=arguments[0];return this.createPolygon(this.createLinearRing(a))}if(arguments[0]instanceof ht){var h=arguments[0];return this.createPolygon(h,null)}}else if(arguments.length===2)return new Pt(arguments[0],arguments[1],this)}},{key:"getSRID",value:function(){return this._SRID}},{key:"createGeometryCollection",value:function(){return arguments.length===0?new Ke(null,this):arguments.length===1?new Ke(arguments[0],this):void 0}},{key:"getPrecisionModel",value:function(){return this._precisionModel}},{key:"createLinearRing",value:function(){if(arguments.length===0)return this.createLinearRing(this.getCoordinateSequenceFactory().create([]));if(arguments.length===1){if(arguments[0]instanceof Array){var n=arguments[0];return this.createLinearRing(n!==null?this.getCoordinateSequenceFactory().create(n):null)}if(Le(arguments[0],Me))return new ht(arguments[0],this)}}},{key:"createMultiPolygon",value:function(){return arguments.length===0?new yr(null,this):arguments.length===1?new yr(arguments[0],this):void 0}},{key:"createMultiPoint",value:function(){if(arguments.length===0)return new St(null,this);if(arguments.length===1){if(arguments[0]instanceof Array)return new St(arguments[0],this);if(Le(arguments[0],Me)){var n=arguments[0];if(n===null)return this.createMultiPoint(new Array(0).fill(null));for(var a=new Array(n.size()).fill(null),h=0;h<n.size();h++){var v=this.getCoordinateSequenceFactory().create(1,n.getDimension(),n.getMeasures());U.copy(n,h,v,0,1),a[h]=this.createPoint(v)}return this.createMultiPoint(a)}}}},{key:"interfaces_",get:function(){return[$]}}],[{key:"constructor_",value:function(){if(this._precisionModel=null,this._coordinateSequenceFactory=null,this._SRID=null,arguments.length===0)f.constructor_.call(this,new At,0);else if(arguments.length===1){if(Le(arguments[0],cr)){var n=arguments[0];f.constructor_.call(this,new At,0,n)}else if(arguments[0]instanceof At){var a=arguments[0];f.constructor_.call(this,a,0,f.getDefaultCoordinateSequenceFactory())}}else if(arguments.length===2){var h=arguments[0],v=arguments[1];f.constructor_.call(this,h,v,f.getDefaultCoordinateSequenceFactory())}else if(arguments.length===3){var I=arguments[0],R=arguments[1],T=arguments[2];this._precisionModel=I,this._coordinateSequenceFactory=T,this._SRID=R}}},{key:"toMultiPolygonArray",value:function(n){var a=new Array(n.size()).fill(null);return n.toArray(a)}},{key:"toGeometryArray",value:function(n){if(n===null)return null;var a=new Array(n.size()).fill(null);return n.toArray(a)}},{key:"getDefaultCoordinateSequenceFactory",value:function(){return Jt.instance()}},{key:"toMultiLineStringArray",value:function(n){var a=new Array(n.size()).fill(null);return n.toArray(a)}},{key:"toLineStringArray",value:function(n){var a=new Array(n.size()).fill(null);return n.toArray(a)}},{key:"toMultiPointArray",value:function(n){var a=new Array(n.size()).fill(null);return n.toArray(a)}},{key:"toLinearRingArray",value:function(n){var a=new Array(n.size()).fill(null);return n.toArray(a)}},{key:"toPointArray",value:function(n){var a=new Array(n.size()).fill(null);return n.toArray(a)}},{key:"toPolygonArray",value:function(n){var a=new Array(n.size()).fill(null);return n.toArray(a)}},{key:"createPointFromInternalCoord",value:function(n,a){return a.getPrecisionModel().makePrecise(n),a.getFactory().createPoint(n)}}])})(),br="XY",yn="XYZ",vn="XYM",bn="XYZM",kr={POINT:"Point",LINE_STRING:"LineString",LINEAR_RING:"LinearRing",POLYGON:"Polygon",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon",GEOMETRY_COLLECTION:"GeometryCollection",CIRCLE:"Circle"},Nr="EMPTY",fr=1,Mt=2,Vt=3,Lr=4,er=5,_n=6;for(var xn in kr)kr[xn].toUpperCase();var En=(function(){return g((function f(n){o(this,f),this.wkt=n,this.index_=-1}),[{key:"isAlpha_",value:function(f){return f>="a"&&f<="z"||f>="A"&&f<="Z"}},{key:"isNumeric_",value:function(f,n){return f>="0"&&f<="9"||f=="."&&!(n!==void 0&&n)}},{key:"isWhiteSpace_",value:function(f){return f==" "||f==" "||f=="\r"||f==`
6
+ `}},{key:"nextChar_",value:function(){return this.wkt.charAt(++this.index_)}},{key:"nextToken",value:function(){var f,n=this.nextChar_(),a=this.index_,h=n;if(n=="(")f=Mt;else if(n==",")f=er;else if(n==")")f=Vt;else if(this.isNumeric_(n)||n=="-")f=Lr,h=this.readNumber_();else if(this.isAlpha_(n))f=fr,h=this.readText_();else{if(this.isWhiteSpace_(n))return this.nextToken();if(n!=="")throw new Error("Unexpected character: "+n);f=_n}return{position:a,value:h,type:f}}},{key:"readNumber_",value:function(){var f,n=this.index_,a=!1,h=!1;do f=="."?a=!0:f!="e"&&f!="E"||(h=!0),f=this.nextChar_();while(this.isNumeric_(f,a)||!h&&(f=="e"||f=="E")||h&&(f=="-"||f=="+"));return parseFloat(this.wkt.substring(n,this.index_--))}},{key:"readText_",value:function(){var f,n=this.index_;do f=this.nextChar_();while(this.isAlpha_(f));return this.wkt.substring(n,this.index_--).toUpperCase()}}])})(),In=(function(){return g((function f(n,a){o(this,f),this.lexer_=n,this.token_,this.layout_=br,this.factory=a}),[{key:"consume_",value:function(){this.token_=this.lexer_.nextToken()}},{key:"isTokenType",value:function(f){return this.token_.type==f}},{key:"match",value:function(f){var n=this.isTokenType(f);return n&&this.consume_(),n}},{key:"parse",value:function(){return this.consume_(),this.parseGeometry_()}},{key:"parseGeometryLayout_",value:function(){var f=br,n=this.token_;if(this.isTokenType(fr)){var a=n.value;a==="Z"?f=yn:a==="M"?f=vn:a==="ZM"&&(f=bn),f!==br&&this.consume_()}return f}},{key:"parseGeometryCollectionText_",value:function(){if(this.match(Mt)){var f=[];do f.push(this.parseGeometry_());while(this.match(er));if(this.match(Vt))return f}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}},{key:"parsePointText_",value:function(){if(this.match(Mt)){var f=this.parsePoint_();if(this.match(Vt))return f}else if(this.isEmptyGeometry_())return null;throw new Error(this.formatErrorMessage_())}},{key:"parseLineStringText_",value:function(){if(this.match(Mt)){var f=this.parsePointList_();if(this.match(Vt))return f}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}},{key:"parsePolygonText_",value:function(){if(this.match(Mt)){var f=this.parseLineStringTextList_();if(this.match(Vt))return f}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}},{key:"parseMultiPointText_",value:function(){var f;if(this.match(Mt)){if(f=this.token_.type==Mt?this.parsePointTextList_():this.parsePointList_(),this.match(Vt))return f}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}},{key:"parseMultiLineStringText_",value:function(){if(this.match(Mt)){var f=this.parseLineStringTextList_();if(this.match(Vt))return f}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}},{key:"parseMultiPolygonText_",value:function(){if(this.match(Mt)){var f=this.parsePolygonTextList_();if(this.match(Vt))return f}else if(this.isEmptyGeometry_())return[];throw new Error(this.formatErrorMessage_())}},{key:"parsePoint_",value:function(){for(var f=[],n=this.layout_.length,a=0;a<n;++a){var h=this.token_;if(!this.match(Lr))break;f.push(h.value)}if(f.length==n)return f;throw new Error(this.formatErrorMessage_())}},{key:"parsePointList_",value:function(){for(var f=[this.parsePoint_()];this.match(er);)f.push(this.parsePoint_());return f}},{key:"parsePointTextList_",value:function(){for(var f=[this.parsePointText_()];this.match(er);)f.push(this.parsePointText_());return f}},{key:"parseLineStringTextList_",value:function(){for(var f=[this.parseLineStringText_()];this.match(er);)f.push(this.parseLineStringText_());return f}},{key:"parsePolygonTextList_",value:function(){for(var f=[this.parsePolygonText_()];this.match(er);)f.push(this.parsePolygonText_());return f}},{key:"isEmptyGeometry_",value:function(){var f=this.isTokenType(fr)&&this.token_.value==Nr;return f&&this.consume_(),f}},{key:"formatErrorMessage_",value:function(){return"Unexpected `"+this.token_.value+"` at position "+this.token_.position+" in `"+this.lexer_.wkt+"`"}},{key:"parseGeometry_",value:function(){var f=this.factory,n=function(Ne){return d(J,N(Ne))},a=function(Ne){var Ge=Ne.map((function(Be){return f.createLinearRing(Be.map(n))}));return Ge.length>1?f.createPolygon(Ge[0],Ge.slice(1)):f.createPolygon(Ge[0])},h=this.token_;if(this.match(fr)){var v=h.value;if(this.layout_=this.parseGeometryLayout_(),v=="GEOMETRYCOLLECTION"){var I=this.parseGeometryCollectionText_();return f.createGeometryCollection(I)}switch(v){case"POINT":var R=this.parsePointText_();return R?f.createPoint(d(J,N(R))):f.createPoint();case"LINESTRING":var T=this.parseLineStringText_().map(n);return f.createLineString(T);case"LINEARRING":var O=this.parseLineStringText_().map(n);return f.createLinearRing(O);case"POLYGON":var W=this.parsePolygonText_();return W&&W.length!==0?a(W):f.createPolygon();case"MULTIPOINT":var re=this.parseMultiPointText_();if(!re||re.length===0)return f.createMultiPoint();var ne=re.map(n).map((function(Ne){return f.createPoint(Ne)}));return f.createMultiPoint(ne);case"MULTILINESTRING":var oe=this.parseMultiLineStringText_().map((function(Ne){return f.createLineString(Ne.map(n))}));return f.createMultiLineString(oe);case"MULTIPOLYGON":var _e=this.parseMultiPolygonText_();if(!_e||_e.length===0)return f.createMultiPolygon();var Se=_e.map(a);return f.createMultiPolygon(Se);default:throw new Error("Invalid geometry type: "+v)}}throw new Error(this.formatErrorMessage_())}}])})();function Or(f){if(f.isEmpty())return"";var n=f.getCoordinate(),a=[n.x,n.y];return n.z===void 0||Number.isNaN(n.z)||a.push(n.z),n.m===void 0||Number.isNaN(n.m)||a.push(n.m),a.join(" ")}function ar(f){for(var n=f.getCoordinates().map((function(I){var R=[I.x,I.y];return I.z===void 0||Number.isNaN(I.z)||R.push(I.z),I.m===void 0||Number.isNaN(I.m)||R.push(I.m),R})),a=[],h=0,v=n.length;h<v;++h)a.push(n[h].join(" "));return a.join(", ")}function Pr(f){var n=[];n.push("("+ar(f.getExteriorRing())+")");for(var a=0,h=f.getNumInteriorRing();a<h;++a)n.push("("+ar(f.getInteriorRingN(a))+")");return n.join(", ")}var Cn={Point:Or,LineString:ar,LinearRing:ar,Polygon:Pr,MultiPoint:function(f){for(var n=[],a=0,h=f.getNumGeometries();a<h;++a)n.push("("+Or(f.getGeometryN(a))+")");return n.join(", ")},MultiLineString:function(f){for(var n=[],a=0,h=f.getNumGeometries();a<h;++a)n.push("("+ar(f.getGeometryN(a))+")");return n.join(", ")},MultiPolygon:function(f){for(var n=[],a=0,h=f.getNumGeometries();a<h;++a)n.push("("+Pr(f.getGeometryN(a))+")");return n.join(", ")},GeometryCollection:function(f){for(var n=[],a=0,h=f.getNumGeometries();a<h;++a)n.push(Fr(f.getGeometryN(a)));return n.join(", ")}};function Fr(f){var n=f.getGeometryType(),a=Cn[n];n=n.toUpperCase();var h=(function(v){var I="";if(v.isEmpty())return I;var R=v.getCoordinate();return R.z===void 0||Number.isNaN(R.z)||(I+="Z"),R.m===void 0||Number.isNaN(R.m)||(I+="M"),I})(f);return h.length>0&&(n+=" "+h),f.isEmpty()?n+" "+Nr:n+" ("+a(f)+")"}var Sn=(function(){return g((function f(n){o(this,f),this.geometryFactory=n||new Qt,this.precisionModel=this.geometryFactory.getPrecisionModel()}),[{key:"read",value:function(f){var n=new En(f);return new In(n,this.geometryFactory).parse()}},{key:"write",value:function(f){return Fr(f)}}])})(),_r=(function(){return g((function f(n){o(this,f),this.parser=new Sn(n)}),[{key:"write",value:function(f){return this.parser.write(f)}}],[{key:"toLineString",value:function(f,n){if(arguments.length!==2)throw new Error("Not implemented");return"LINESTRING ( "+f.x+" "+f.y+", "+n.x+" "+n.y+" )"}}])})(),Xe=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"getIndexAlongSegment",value:function(n,a){return this.computeIntLineIndex(),this._intLineIndex[n][a]}},{key:"getTopologySummary",value:function(){var n=new $t;return this.isEndPoint()&&n.append(" endpoint"),this._isProper&&n.append(" proper"),this.isCollinear()&&n.append(" collinear"),n.toString()}},{key:"computeIntersection",value:function(n,a,h,v){this._inputLines[0][0]=n,this._inputLines[0][1]=a,this._inputLines[1][0]=h,this._inputLines[1][1]=v,this._result=this.computeIntersect(n,a,h,v)}},{key:"getIntersectionNum",value:function(){return this._result}},{key:"computeIntLineIndex",value:function(){if(arguments.length===0)this._intLineIndex===null&&(this._intLineIndex=Array(2).fill().map((function(){return Array(2)})),this.computeIntLineIndex(0),this.computeIntLineIndex(1));else if(arguments.length===1){var n=arguments[0];this.getEdgeDistance(n,0)>this.getEdgeDistance(n,1)?(this._intLineIndex[n][0]=0,this._intLineIndex[n][1]=1):(this._intLineIndex[n][0]=1,this._intLineIndex[n][1]=0)}}},{key:"isProper",value:function(){return this.hasIntersection()&&this._isProper}},{key:"setPrecisionModel",value:function(n){this._precisionModel=n}},{key:"isInteriorIntersection",value:function(){if(arguments.length===0)return!!this.isInteriorIntersection(0)||!!this.isInteriorIntersection(1);if(arguments.length===1){for(var n=arguments[0],a=0;a<this._result;a++)if(!this._intPt[a].equals2D(this._inputLines[n][0])&&!this._intPt[a].equals2D(this._inputLines[n][1]))return!0;return!1}}},{key:"getIntersection",value:function(n){return this._intPt[n]}},{key:"isEndPoint",value:function(){return this.hasIntersection()&&!this._isProper}},{key:"hasIntersection",value:function(){return this._result!==f.NO_INTERSECTION}},{key:"getEdgeDistance",value:function(n,a){return f.computeEdgeDistance(this._intPt[a],this._inputLines[n][0],this._inputLines[n][1])}},{key:"isCollinear",value:function(){return this._result===f.COLLINEAR_INTERSECTION}},{key:"toString",value:function(){return _r.toLineString(this._inputLines[0][0],this._inputLines[0][1])+" - "+_r.toLineString(this._inputLines[1][0],this._inputLines[1][1])+this.getTopologySummary()}},{key:"getEndpoint",value:function(n,a){return this._inputLines[n][a]}},{key:"isIntersection",value:function(n){for(var a=0;a<this._result;a++)if(this._intPt[a].equals2D(n))return!0;return!1}},{key:"getIntersectionAlongSegment",value:function(n,a){return this.computeIntLineIndex(),this._intPt[this._intLineIndex[n][a]]}}],[{key:"constructor_",value:function(){this._result=null,this._inputLines=Array(2).fill().map((function(){return Array(2)})),this._intPt=new Array(2).fill(null),this._intLineIndex=null,this._isProper=null,this._pa=null,this._pb=null,this._precisionModel=null,this._intPt[0]=new J,this._intPt[1]=new J,this._pa=this._intPt[0],this._pb=this._intPt[1],this._result=0}},{key:"computeEdgeDistance",value:function(n,a,h){var v=Math.abs(h.x-a.x),I=Math.abs(h.y-a.y),R=-1;if(n.equals(a))R=0;else if(n.equals(h))R=v>I?v:I;else{var T=Math.abs(n.x-a.x),O=Math.abs(n.y-a.y);(R=v>I?T:O)!==0||n.equals(a)||(R=Math.max(T,O))}return pe.isTrue(!(R===0&&!n.equals(a)),"Bad distance calculation"),R}},{key:"nonRobustComputeEdgeDistance",value:function(n,a,h){var v=n.x-a.x,I=n.y-a.y,R=Math.sqrt(v*v+I*I);return pe.isTrue(!(R===0&&!n.equals(a)),"Invalid distance calculation"),R}}])})();Xe.DONT_INTERSECT=0,Xe.DO_INTERSECT=1,Xe.COLLINEAR=2,Xe.NO_INTERSECTION=0,Xe.POINT_INTERSECTION=1,Xe.COLLINEAR_INTERSECTION=2;var Wt=(function(f){function n(){return o(this,n),s(this,n)}return E(n,f),g(n,[{key:"isInSegmentEnvelopes",value:function(a){var h=new ye(this._inputLines[0][0],this._inputLines[0][1]),v=new ye(this._inputLines[1][0],this._inputLines[1][1]);return h.contains(a)&&v.contains(a)}},{key:"computeIntersection",value:function(){if(arguments.length!==3)return A(n,"computeIntersection",this,1).apply(this,arguments);var a=arguments[0],h=arguments[1],v=arguments[2];if(this._isProper=!1,ye.intersects(h,v,a)&&ke.index(h,v,a)===0&&ke.index(v,h,a)===0)return this._isProper=!0,(a.equals(h)||a.equals(v))&&(this._isProper=!1),this._result=Xe.POINT_INTERSECTION,null;this._result=Xe.NO_INTERSECTION}},{key:"intersection",value:function(a,h,v,I){var R=this.intersectionSafe(a,h,v,I);return this.isInSegmentEnvelopes(R)||(R=new J(n.nearestEndpoint(a,h,v,I))),this._precisionModel!==null&&this._precisionModel.makePrecise(R),R}},{key:"checkDD",value:function(a,h,v,I,R){var T=Lt.intersection(a,h,v,I),O=this.isInSegmentEnvelopes(T);Je.out.println("DD in env = "+O+" --------------------- "+T),R.distance(T)>1e-4&&Je.out.println("Distance = "+R.distance(T))}},{key:"intersectionSafe",value:function(a,h,v,I){var R=Ot.intersection(a,h,v,I);return R===null&&(R=n.nearestEndpoint(a,h,v,I)),R}},{key:"computeCollinearIntersection",value:function(a,h,v,I){var R=ye.intersects(a,h,v),T=ye.intersects(a,h,I),O=ye.intersects(v,I,a),W=ye.intersects(v,I,h);return R&&T?(this._intPt[0]=v,this._intPt[1]=I,Xe.COLLINEAR_INTERSECTION):O&&W?(this._intPt[0]=a,this._intPt[1]=h,Xe.COLLINEAR_INTERSECTION):R&&O?(this._intPt[0]=v,this._intPt[1]=a,!v.equals(a)||T||W?Xe.COLLINEAR_INTERSECTION:Xe.POINT_INTERSECTION):R&&W?(this._intPt[0]=v,this._intPt[1]=h,!v.equals(h)||T||O?Xe.COLLINEAR_INTERSECTION:Xe.POINT_INTERSECTION):T&&O?(this._intPt[0]=I,this._intPt[1]=a,!I.equals(a)||R||W?Xe.COLLINEAR_INTERSECTION:Xe.POINT_INTERSECTION):T&&W?(this._intPt[0]=I,this._intPt[1]=h,!I.equals(h)||R||O?Xe.COLLINEAR_INTERSECTION:Xe.POINT_INTERSECTION):Xe.NO_INTERSECTION}},{key:"computeIntersect",value:function(a,h,v,I){if(this._isProper=!1,!ye.intersects(a,h,v,I))return Xe.NO_INTERSECTION;var R=ke.index(a,h,v),T=ke.index(a,h,I);if(R>0&&T>0||R<0&&T<0)return Xe.NO_INTERSECTION;var O=ke.index(v,I,a),W=ke.index(v,I,h);return O>0&&W>0||O<0&&W<0?Xe.NO_INTERSECTION:R===0&&T===0&&O===0&&W===0?this.computeCollinearIntersection(a,h,v,I):(R===0||T===0||O===0||W===0?(this._isProper=!1,a.equals2D(v)||a.equals2D(I)?this._intPt[0]=a:h.equals2D(v)||h.equals2D(I)?this._intPt[0]=h:R===0?this._intPt[0]=new J(v):T===0?this._intPt[0]=new J(I):O===0?this._intPt[0]=new J(a):W===0&&(this._intPt[0]=new J(h))):(this._isProper=!0,this._intPt[0]=this.intersection(a,h,v,I)),Xe.POINT_INTERSECTION)}}],[{key:"nearestEndpoint",value:function(a,h,v,I){var R=a,T=Qe.pointToSegment(a,v,I),O=Qe.pointToSegment(h,v,I);return O<T&&(T=O,R=h),(O=Qe.pointToSegment(v,a,h))<T&&(T=O,R=v),(O=Qe.pointToSegment(I,a,h))<T&&(T=O,R=I),R}}])})(Xe),Rn=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"countSegment",value:function(n,a){if(n.x<this._p.x&&a.x<this._p.x)return null;if(this._p.x===a.x&&this._p.y===a.y)return this._isPointOnSegment=!0,null;if(n.y===this._p.y&&a.y===this._p.y){var h=n.x,v=a.x;return h>v&&(h=a.x,v=n.x),this._p.x>=h&&this._p.x<=v&&(this._isPointOnSegment=!0),null}if(n.y>this._p.y&&a.y<=this._p.y||a.y>this._p.y&&n.y<=this._p.y){var I=ke.index(n,a,this._p);if(I===ke.COLLINEAR)return this._isPointOnSegment=!0,null;a.y<n.y&&(I=-I),I===ke.LEFT&&this._crossingCount++}}},{key:"isPointInPolygon",value:function(){return this.getLocation()!==q.EXTERIOR}},{key:"getLocation",value:function(){return this._isPointOnSegment?q.BOUNDARY:this._crossingCount%2==1?q.INTERIOR:q.EXTERIOR}},{key:"isOnSegment",value:function(){return this._isPointOnSegment}}],[{key:"constructor_",value:function(){this._p=null,this._crossingCount=0,this._isPointOnSegment=!1;var n=arguments[0];this._p=n}},{key:"locatePointInRing",value:function(){if(arguments[0]instanceof J&&Le(arguments[1],Me)){for(var n=arguments[1],a=new f(arguments[0]),h=new J,v=new J,I=1;I<n.size();I++)if(n.getCoordinate(I,h),n.getCoordinate(I-1,v),a.countSegment(h,v),a.isOnSegment())return a.getLocation();return a.getLocation()}if(arguments[0]instanceof J&&arguments[1]instanceof Array){for(var R=arguments[1],T=new f(arguments[0]),O=1;O<R.length;O++){var W=R[O],re=R[O-1];if(T.countSegment(W,re),T.isOnSegment())return T.getLocation()}return T.getLocation()}}}])})(),xr=(function(){function f(){o(this,f)}return g(f,null,[{key:"isOnLine",value:function(){if(arguments[0]instanceof J&&Le(arguments[1],Me)){for(var n=arguments[0],a=arguments[1],h=new Wt,v=new J,I=new J,R=a.size(),T=1;T<R;T++)if(a.getCoordinate(T-1,v),a.getCoordinate(T,I),h.computeIntersection(n,v,I),h.hasIntersection())return!0;return!1}if(arguments[0]instanceof J&&arguments[1]instanceof Array){for(var O=arguments[0],W=arguments[1],re=new Wt,ne=1;ne<W.length;ne++){var oe=W[ne-1],_e=W[ne];if(re.computeIntersection(O,oe,_e),re.hasIntersection())return!0}return!1}}},{key:"locateInRing",value:function(n,a){return Rn.locatePointInRing(n,a)}},{key:"isInRing",value:function(n,a){return f.locateInRing(n,a)!==q.EXTERIOR}}])})(),_t=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"setAllLocations",value:function(n){for(var a=0;a<this.location.length;a++)this.location[a]=n}},{key:"isNull",value:function(){for(var n=0;n<this.location.length;n++)if(this.location[n]!==q.NONE)return!1;return!0}},{key:"setAllLocationsIfNull",value:function(n){for(var a=0;a<this.location.length;a++)this.location[a]===q.NONE&&(this.location[a]=n)}},{key:"isLine",value:function(){return this.location.length===1}},{key:"merge",value:function(n){if(n.location.length>this.location.length){var a=new Array(3).fill(null);a[he.ON]=this.location[he.ON],a[he.LEFT]=q.NONE,a[he.RIGHT]=q.NONE,this.location=a}for(var h=0;h<this.location.length;h++)this.location[h]===q.NONE&&h<n.location.length&&(this.location[h]=n.location[h])}},{key:"getLocations",value:function(){return this.location}},{key:"flip",value:function(){if(this.location.length<=1)return null;var n=this.location[he.LEFT];this.location[he.LEFT]=this.location[he.RIGHT],this.location[he.RIGHT]=n}},{key:"toString",value:function(){var n=new tt;return this.location.length>1&&n.append(q.toLocationSymbol(this.location[he.LEFT])),n.append(q.toLocationSymbol(this.location[he.ON])),this.location.length>1&&n.append(q.toLocationSymbol(this.location[he.RIGHT])),n.toString()}},{key:"setLocations",value:function(n,a,h){this.location[he.ON]=n,this.location[he.LEFT]=a,this.location[he.RIGHT]=h}},{key:"get",value:function(n){return n<this.location.length?this.location[n]:q.NONE}},{key:"isArea",value:function(){return this.location.length>1}},{key:"isAnyNull",value:function(){for(var n=0;n<this.location.length;n++)if(this.location[n]===q.NONE)return!0;return!1}},{key:"setLocation",value:function(){if(arguments.length===1){var n=arguments[0];this.setLocation(he.ON,n)}else if(arguments.length===2){var a=arguments[0],h=arguments[1];this.location[a]=h}}},{key:"init",value:function(n){this.location=new Array(n).fill(null),this.setAllLocations(q.NONE)}},{key:"isEqualOnSide",value:function(n,a){return this.location[a]===n.location[a]}},{key:"allPositionsEqual",value:function(n){for(var a=0;a<this.location.length;a++)if(this.location[a]!==n)return!1;return!0}}],[{key:"constructor_",value:function(){if(this.location=null,arguments.length===1){if(arguments[0]instanceof Array){var n=arguments[0];this.init(n.length)}else if(Number.isInteger(arguments[0])){var a=arguments[0];this.init(1),this.location[he.ON]=a}else if(arguments[0]instanceof f){var h=arguments[0];if(this.init(h.location.length),h!==null)for(var v=0;v<this.location.length;v++)this.location[v]=h.location[v]}}else if(arguments.length===3){var I=arguments[0],R=arguments[1],T=arguments[2];this.init(3),this.location[he.ON]=I,this.location[he.LEFT]=R,this.location[he.RIGHT]=T}}}])})(),xt=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"getGeometryCount",value:function(){var n=0;return this.elt[0].isNull()||n++,this.elt[1].isNull()||n++,n}},{key:"setAllLocations",value:function(n,a){this.elt[n].setAllLocations(a)}},{key:"isNull",value:function(n){return this.elt[n].isNull()}},{key:"setAllLocationsIfNull",value:function(){if(arguments.length===1){var n=arguments[0];this.setAllLocationsIfNull(0,n),this.setAllLocationsIfNull(1,n)}else if(arguments.length===2){var a=arguments[0],h=arguments[1];this.elt[a].setAllLocationsIfNull(h)}}},{key:"isLine",value:function(n){return this.elt[n].isLine()}},{key:"merge",value:function(n){for(var a=0;a<2;a++)this.elt[a]===null&&n.elt[a]!==null?this.elt[a]=new _t(n.elt[a]):this.elt[a].merge(n.elt[a])}},{key:"flip",value:function(){this.elt[0].flip(),this.elt[1].flip()}},{key:"getLocation",value:function(){if(arguments.length===1){var n=arguments[0];return this.elt[n].get(he.ON)}if(arguments.length===2){var a=arguments[0],h=arguments[1];return this.elt[a].get(h)}}},{key:"toString",value:function(){var n=new tt;return this.elt[0]!==null&&(n.append("A:"),n.append(this.elt[0].toString())),this.elt[1]!==null&&(n.append(" B:"),n.append(this.elt[1].toString())),n.toString()}},{key:"isArea",value:function(){if(arguments.length===0)return this.elt[0].isArea()||this.elt[1].isArea();if(arguments.length===1){var n=arguments[0];return this.elt[n].isArea()}}},{key:"isAnyNull",value:function(n){return this.elt[n].isAnyNull()}},{key:"setLocation",value:function(){if(arguments.length===2){var n=arguments[0],a=arguments[1];this.elt[n].setLocation(he.ON,a)}else if(arguments.length===3){var h=arguments[0],v=arguments[1],I=arguments[2];this.elt[h].setLocation(v,I)}}},{key:"isEqualOnSide",value:function(n,a){return this.elt[0].isEqualOnSide(n.elt[0],a)&&this.elt[1].isEqualOnSide(n.elt[1],a)}},{key:"allPositionsEqual",value:function(n,a){return this.elt[n].allPositionsEqual(a)}},{key:"toLine",value:function(n){this.elt[n].isArea()&&(this.elt[n]=new _t(this.elt[n].location[0]))}}],[{key:"constructor_",value:function(){if(this.elt=new Array(2).fill(null),arguments.length===1){if(Number.isInteger(arguments[0])){var n=arguments[0];this.elt[0]=new _t(n),this.elt[1]=new _t(n)}else if(arguments[0]instanceof f){var a=arguments[0];this.elt[0]=new _t(a.elt[0]),this.elt[1]=new _t(a.elt[1])}}else if(arguments.length===2){var h=arguments[0],v=arguments[1];this.elt[0]=new _t(q.NONE),this.elt[1]=new _t(q.NONE),this.elt[h].setLocation(v)}else if(arguments.length===3){var I=arguments[0],R=arguments[1],T=arguments[2];this.elt[0]=new _t(I,R,T),this.elt[1]=new _t(I,R,T)}else if(arguments.length===4){var O=arguments[0],W=arguments[1],re=arguments[2],ne=arguments[3];this.elt[0]=new _t(q.NONE,q.NONE,q.NONE),this.elt[1]=new _t(q.NONE,q.NONE,q.NONE),this.elt[O].setLocations(W,re,ne)}}},{key:"toLineLabel",value:function(n){for(var a=new f(q.NONE),h=0;h<2;h++)a.setLocation(h,n.getLocation(h));return a}}])})(),pr=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"computeRing",value:function(){if(this._ring!==null)return null;for(var f=new Array(this._pts.size()).fill(null),n=0;n<this._pts.size();n++)f[n]=this._pts.get(n);this._ring=this._geometryFactory.createLinearRing(f),this._isHole=ke.isCCW(this._ring.getCoordinates())}},{key:"isIsolated",value:function(){return this._label.getGeometryCount()===1}},{key:"computePoints",value:function(f){this._startDe=f;var n=f,a=!0;do{if(n===null)throw new at("Found null DirectedEdge");if(n.getEdgeRing()===this)throw new at("Directed Edge visited twice during ring-building at "+n.getCoordinate());this._edges.add(n);var h=n.getLabel();pe.isTrue(h.isArea()),this.mergeLabel(h),this.addPoints(n.getEdge(),n.isForward(),a),a=!1,this.setEdgeRing(n,this),n=this.getNext(n)}while(n!==this._startDe)}},{key:"getLinearRing",value:function(){return this._ring}},{key:"getCoordinate",value:function(f){return this._pts.get(f)}},{key:"computeMaxNodeDegree",value:function(){this._maxNodeDegree=0;var f=this._startDe;do{var n=f.getNode().getEdges().getOutgoingDegree(this);n>this._maxNodeDegree&&(this._maxNodeDegree=n),f=this.getNext(f)}while(f!==this._startDe);this._maxNodeDegree*=2}},{key:"addPoints",value:function(f,n,a){var h=f.getCoordinates();if(n){var v=1;a&&(v=0);for(var I=v;I<h.length;I++)this._pts.add(h[I])}else{var R=h.length-2;a&&(R=h.length-1);for(var T=R;T>=0;T--)this._pts.add(h[T])}}},{key:"isHole",value:function(){return this._isHole}},{key:"setInResult",value:function(){var f=this._startDe;do f.getEdge().setInResult(!0),f=f.getNext();while(f!==this._startDe)}},{key:"containsPoint",value:function(f){var n=this.getLinearRing();if(!n.getEnvelopeInternal().contains(f)||!xr.isInRing(f,n.getCoordinates()))return!1;for(var a=this._holes.iterator();a.hasNext();)if(a.next().containsPoint(f))return!1;return!0}},{key:"addHole",value:function(f){this._holes.add(f)}},{key:"isShell",value:function(){return this._shell===null}},{key:"getLabel",value:function(){return this._label}},{key:"getEdges",value:function(){return this._edges}},{key:"getMaxNodeDegree",value:function(){return this._maxNodeDegree<0&&this.computeMaxNodeDegree(),this._maxNodeDegree}},{key:"getShell",value:function(){return this._shell}},{key:"mergeLabel",value:function(){if(arguments.length===1){var f=arguments[0];this.mergeLabel(f,0),this.mergeLabel(f,1)}else if(arguments.length===2){var n=arguments[1],a=arguments[0].getLocation(n,he.RIGHT);if(a===q.NONE)return null;if(this._label.getLocation(n)===q.NONE)return this._label.setLocation(n,a),null}}},{key:"setShell",value:function(f){this._shell=f,f!==null&&f.addHole(this)}},{key:"toPolygon",value:function(f){for(var n=new Array(this._holes.size()).fill(null),a=0;a<this._holes.size();a++)n[a]=this._holes.get(a).getLinearRing();return f.createPolygon(this.getLinearRing(),n)}}],[{key:"constructor_",value:function(){if(this._startDe=null,this._maxNodeDegree=-1,this._edges=new De,this._pts=new De,this._label=new xt(q.NONE),this._ring=null,this._isHole=null,this._shell=null,this._holes=new De,this._geometryFactory=null,arguments.length!==0){if(arguments.length===2){var f=arguments[0],n=arguments[1];this._geometryFactory=n,this.computePoints(f),this.computeRing()}}}}])})(),An=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"setEdgeRing",value:function(a,h){a.setMinEdgeRing(h)}},{key:"getNext",value:function(a){return a.getNextMin()}}],[{key:"constructor_",value:function(){var a=arguments[0],h=arguments[1];pr.constructor_.call(this,a,h)}}])})(pr),Dn=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"buildMinimalRings",value:function(){var a=new De,h=this._startDe;do{if(h.getMinEdgeRing()===null){var v=new An(h,this._geometryFactory);a.add(v)}h=h.getNext()}while(h!==this._startDe);return a}},{key:"setEdgeRing",value:function(a,h){a.setEdgeRing(h)}},{key:"linkDirectedEdgesForMinimalEdgeRings",value:function(){var a=this._startDe;do a.getNode().getEdges().linkMinimalDirectedEdges(this),a=a.getNext();while(a!==this._startDe)}},{key:"getNext",value:function(a){return a.getNext()}}],[{key:"constructor_",value:function(){var a=arguments[0],h=arguments[1];pr.constructor_.call(this,a,h)}}])})(pr),Mr=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"setVisited",value:function(f){this._isVisited=f}},{key:"setInResult",value:function(f){this._isInResult=f}},{key:"isCovered",value:function(){return this._isCovered}},{key:"isCoveredSet",value:function(){return this._isCoveredSet}},{key:"setLabel",value:function(f){this._label=f}},{key:"getLabel",value:function(){return this._label}},{key:"setCovered",value:function(f){this._isCovered=f,this._isCoveredSet=!0}},{key:"updateIM",value:function(f){pe.isTrue(this._label.getGeometryCount()>=2,"found partial label"),this.computeIM(f)}},{key:"isInResult",value:function(){return this._isInResult}},{key:"isVisited",value:function(){return this._isVisited}}],[{key:"constructor_",value:function(){if(this._label=null,this._isInResult=!1,this._isCovered=!1,this._isCoveredSet=!1,this._isVisited=!1,arguments.length!==0){if(arguments.length===1){var f=arguments[0];this._label=f}}}}])})(),mr=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"isIncidentEdgeInResult",value:function(){for(var a=this.getEdges().getEdges().iterator();a.hasNext();)if(a.next().getEdge().isInResult())return!0;return!1}},{key:"isIsolated",value:function(){return this._label.getGeometryCount()===1}},{key:"getCoordinate",value:function(){return this._coord}},{key:"print",value:function(a){a.println("node "+this._coord+" lbl: "+this._label)}},{key:"computeIM",value:function(a){}},{key:"computeMergedLocation",value:function(a,h){var v=q.NONE;if(v=this._label.getLocation(h),!a.isNull(h)){var I=a.getLocation(h);v!==q.BOUNDARY&&(v=I)}return v}},{key:"setLabel",value:function(){if(arguments.length!==2||!Number.isInteger(arguments[1])||!Number.isInteger(arguments[0]))return A(n,"setLabel",this,1).apply(this,arguments);var a=arguments[0],h=arguments[1];this._label===null?this._label=new xt(a,h):this._label.setLocation(a,h)}},{key:"getEdges",value:function(){return this._edges}},{key:"mergeLabel",value:function(){if(arguments[0]instanceof n){var a=arguments[0];this.mergeLabel(a._label)}else if(arguments[0]instanceof xt)for(var h=arguments[0],v=0;v<2;v++){var I=this.computeMergedLocation(h,v);this._label.getLocation(v)===q.NONE&&this._label.setLocation(v,I)}}},{key:"add",value:function(a){this._edges.insert(a),a.setNode(this)}},{key:"setLabelBoundary",value:function(a){if(this._label===null)return null;var h=q.NONE;this._label!==null&&(h=this._label.getLocation(a));var v=null;switch(h){case q.BOUNDARY:v=q.INTERIOR;break;case q.INTERIOR:default:v=q.BOUNDARY}this._label.setLocation(a,v)}}],[{key:"constructor_",value:function(){this._coord=null,this._edges=null;var a=arguments[0],h=arguments[1];this._coord=a,this._edges=h,this._label=new xt(0,q.NONE)}}])})(Mr),Tn=(function(f){function n(){return o(this,n),s(this,n,arguments)}return E(n,f),g(n)})(wr);function jr(f){return f==null?0:f.color}function ze(f){return f==null?null:f.parent}function wt(f,n){f!==null&&(f.color=n)}function Er(f){return f==null?null:f.left}function Br(f){return f==null?null:f.right}var ur=(function(f){function n(){var a;return o(this,n),(a=s(this,n)).root_=null,a.size_=0,a}return E(n,f),g(n,[{key:"get",value:function(a){for(var h=this.root_;h!==null;){var v=a.compareTo(h.key);if(v<0)h=h.left;else{if(!(v>0))return h.value;h=h.right}}return null}},{key:"put",value:function(a,h){if(this.root_===null)return this.root_={key:a,value:h,left:null,right:null,parent:null,color:0,getValue:function(){return this.value},getKey:function(){return this.key}},this.size_=1,null;var v,I,R=this.root_;do if(v=R,(I=a.compareTo(R.key))<0)R=R.left;else{if(!(I>0)){var T=R.value;return R.value=h,T}R=R.right}while(R!==null);var O={key:a,left:null,right:null,value:h,parent:v,color:0,getValue:function(){return this.value},getKey:function(){return this.key}};return I<0?v.left=O:v.right=O,this.fixAfterInsertion(O),this.size_++,null}},{key:"fixAfterInsertion",value:function(a){var h;for(a.color=1;a!=null&&a!==this.root_&&a.parent.color===1;)ze(a)===Er(ze(ze(a)))?jr(h=Br(ze(ze(a))))===1?(wt(ze(a),0),wt(h,0),wt(ze(ze(a)),1),a=ze(ze(a))):(a===Br(ze(a))&&(a=ze(a),this.rotateLeft(a)),wt(ze(a),0),wt(ze(ze(a)),1),this.rotateRight(ze(ze(a)))):jr(h=Er(ze(ze(a))))===1?(wt(ze(a),0),wt(h,0),wt(ze(ze(a)),1),a=ze(ze(a))):(a===Er(ze(a))&&(a=ze(a),this.rotateRight(a)),wt(ze(a),0),wt(ze(ze(a)),1),this.rotateLeft(ze(ze(a))));this.root_.color=0}},{key:"values",value:function(){var a=new De,h=this.getFirstEntry();if(h!==null)for(a.add(h.value);(h=n.successor(h))!==null;)a.add(h.value);return a}},{key:"entrySet",value:function(){var a=new it,h=this.getFirstEntry();if(h!==null)for(a.add(h);(h=n.successor(h))!==null;)a.add(h);return a}},{key:"rotateLeft",value:function(a){if(a!=null){var h=a.right;a.right=h.left,h.left!=null&&(h.left.parent=a),h.parent=a.parent,a.parent==null?this.root_=h:a.parent.left===a?a.parent.left=h:a.parent.right=h,h.left=a,a.parent=h}}},{key:"rotateRight",value:function(a){if(a!=null){var h=a.left;a.left=h.right,h.right!=null&&(h.right.parent=a),h.parent=a.parent,a.parent==null?this.root_=h:a.parent.right===a?a.parent.right=h:a.parent.left=h,h.right=a,a.parent=h}}},{key:"getFirstEntry",value:function(){var a=this.root_;if(a!=null)for(;a.left!=null;)a=a.left;return a}},{key:"size",value:function(){return this.size_}},{key:"containsKey",value:function(a){for(var h=this.root_;h!==null;){var v=a.compareTo(h.key);if(v<0)h=h.left;else{if(!(v>0))return!0;h=h.right}}return!1}}],[{key:"successor",value:function(a){var h;if(a===null)return null;if(a.right!==null){for(h=a.right;h.left!==null;)h=h.left;return h}h=a.parent;for(var v=a;h!==null&&v===h.right;)v=h,h=h.parent;return h}}])})(Tn),Gr=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"find",value:function(f){return this.nodeMap.get(f)}},{key:"addNode",value:function(){if(arguments[0]instanceof J){var f=arguments[0],n=this.nodeMap.get(f);return n===null&&(n=this.nodeFact.createNode(f),this.nodeMap.put(f,n)),n}if(arguments[0]instanceof mr){var a=arguments[0],h=this.nodeMap.get(a.getCoordinate());return h===null?(this.nodeMap.put(a.getCoordinate(),a),a):(h.mergeLabel(a),h)}}},{key:"print",value:function(f){for(var n=this.iterator();n.hasNext();)n.next().print(f)}},{key:"iterator",value:function(){return this.nodeMap.values().iterator()}},{key:"values",value:function(){return this.nodeMap.values()}},{key:"getBoundaryNodes",value:function(f){for(var n=new De,a=this.iterator();a.hasNext();){var h=a.next();h.getLabel().getLocation(f)===q.BOUNDARY&&n.add(h)}return n}},{key:"add",value:function(f){var n=f.getCoordinate();this.addNode(n).add(f)}}],[{key:"constructor_",value:function(){this.nodeMap=new ur,this.nodeFact=null;var f=arguments[0];this.nodeFact=f}}])})(),lt=(function(){function f(){o(this,f)}return g(f,null,[{key:"isNorthern",value:function(n){return n===f.NE||n===f.NW}},{key:"isOpposite",value:function(n,a){return n!==a&&(n-a+4)%4===2}},{key:"commonHalfPlane",value:function(n,a){if(n===a)return n;if((n-a+4)%4===2)return-1;var h=n<a?n:a;return h===0&&(n>a?n:a)===3?3:h}},{key:"isInHalfPlane",value:function(n,a){return a===f.SE?n===f.SE||n===f.SW:n===a||n===a+1}},{key:"quadrant",value:function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var n=arguments[0],a=arguments[1];if(n===0&&a===0)throw new V("Cannot compute the quadrant for point ( "+n+", "+a+" )");return n>=0?a>=0?f.NE:f.SE:a>=0?f.NW:f.SW}if(arguments[0]instanceof J&&arguments[1]instanceof J){var h=arguments[0],v=arguments[1];if(v.x===h.x&&v.y===h.y)throw new V("Cannot compute the quadrant for two identical points "+h);return v.x>=h.x?v.y>=h.y?f.NE:f.SE:v.y>=h.y?f.NW:f.SW}}}])})();lt.NE=0,lt.NW=1,lt.SW=2,lt.SE=3;var qr=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"compareDirection",value:function(n){return this._dx===n._dx&&this._dy===n._dy?0:this._quadrant>n._quadrant?1:this._quadrant<n._quadrant?-1:ke.index(n._p0,n._p1,this._p1)}},{key:"getDy",value:function(){return this._dy}},{key:"getCoordinate",value:function(){return this._p0}},{key:"setNode",value:function(n){this._node=n}},{key:"print",value:function(n){var a=Math.atan2(this._dy,this._dx),h=this.getClass().getName(),v=h.lastIndexOf("."),I=h.substring(v+1);n.print(" "+I+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+a+" "+this._label)}},{key:"compareTo",value:function(n){var a=n;return this.compareDirection(a)}},{key:"getDirectedCoordinate",value:function(){return this._p1}},{key:"getDx",value:function(){return this._dx}},{key:"getLabel",value:function(){return this._label}},{key:"getEdge",value:function(){return this._edge}},{key:"getQuadrant",value:function(){return this._quadrant}},{key:"getNode",value:function(){return this._node}},{key:"toString",value:function(){var n=Math.atan2(this._dy,this._dx),a=this.getClass().getName(),h=a.lastIndexOf(".");return" "+a.substring(h+1)+": "+this._p0+" - "+this._p1+" "+this._quadrant+":"+n+" "+this._label}},{key:"computeLabel",value:function(n){}},{key:"init",value:function(n,a){this._p0=n,this._p1=a,this._dx=a.x-n.x,this._dy=a.y-n.y,this._quadrant=lt.quadrant(this._dx,this._dy),pe.isTrue(!(this._dx===0&&this._dy===0),"EdgeEnd with identical endpoints found")}},{key:"interfaces_",get:function(){return[X]}}],[{key:"constructor_",value:function(){if(this._edge=null,this._label=null,this._node=null,this._p0=null,this._p1=null,this._dx=null,this._dy=null,this._quadrant=null,arguments.length===1){var n=arguments[0];this._edge=n}else if(arguments.length===3){var a=arguments[0],h=arguments[1],v=arguments[2];f.constructor_.call(this,a,h,v,null)}else if(arguments.length===4){var I=arguments[0],R=arguments[1],T=arguments[2],O=arguments[3];f.constructor_.call(this,I),this.init(R,T),this._label=O}}}])})(),Ir=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"getNextMin",value:function(){return this._nextMin}},{key:"getDepth",value:function(a){return this._depth[a]}},{key:"setVisited",value:function(a){this._isVisited=a}},{key:"computeDirectedLabel",value:function(){this._label=new xt(this._edge.getLabel()),this._isForward||this._label.flip()}},{key:"getNext",value:function(){return this._next}},{key:"setDepth",value:function(a,h){if(this._depth[a]!==-999&&this._depth[a]!==h)throw new at("assigned depths do not match",this.getCoordinate());this._depth[a]=h}},{key:"isInteriorAreaEdge",value:function(){for(var a=!0,h=0;h<2;h++)this._label.isArea(h)&&this._label.getLocation(h,he.LEFT)===q.INTERIOR&&this._label.getLocation(h,he.RIGHT)===q.INTERIOR||(a=!1);return a}},{key:"setNextMin",value:function(a){this._nextMin=a}},{key:"print",value:function(a){A(n,"print",this,1).call(this,a),a.print(" "+this._depth[he.LEFT]+"/"+this._depth[he.RIGHT]),a.print(" ("+this.getDepthDelta()+")"),this._isInResult&&a.print(" inResult")}},{key:"setMinEdgeRing",value:function(a){this._minEdgeRing=a}},{key:"isLineEdge",value:function(){var a=this._label.isLine(0)||this._label.isLine(1),h=!this._label.isArea(0)||this._label.allPositionsEqual(0,q.EXTERIOR),v=!this._label.isArea(1)||this._label.allPositionsEqual(1,q.EXTERIOR);return a&&h&&v}},{key:"setEdgeRing",value:function(a){this._edgeRing=a}},{key:"getMinEdgeRing",value:function(){return this._minEdgeRing}},{key:"getDepthDelta",value:function(){var a=this._edge.getDepthDelta();return this._isForward||(a=-a),a}},{key:"setInResult",value:function(a){this._isInResult=a}},{key:"getSym",value:function(){return this._sym}},{key:"isForward",value:function(){return this._isForward}},{key:"getEdge",value:function(){return this._edge}},{key:"printEdge",value:function(a){this.print(a),a.print(" "),this._isForward?this._edge.print(a):this._edge.printReverse(a)}},{key:"setSym",value:function(a){this._sym=a}},{key:"setVisitedEdge",value:function(a){this.setVisited(a),this._sym.setVisited(a)}},{key:"setEdgeDepths",value:function(a,h){var v=this.getEdge().getDepthDelta();this._isForward||(v=-v);var I=1;a===he.LEFT&&(I=-1);var R=he.opposite(a),T=h+v*I;this.setDepth(a,h),this.setDepth(R,T)}},{key:"getEdgeRing",value:function(){return this._edgeRing}},{key:"isInResult",value:function(){return this._isInResult}},{key:"setNext",value:function(a){this._next=a}},{key:"isVisited",value:function(){return this._isVisited}}],[{key:"constructor_",value:function(){this._isForward=null,this._isInResult=!1,this._isVisited=!1,this._sym=null,this._next=null,this._nextMin=null,this._edgeRing=null,this._minEdgeRing=null,this._depth=[0,-999,-999];var a=arguments[0],h=arguments[1];if(qr.constructor_.call(this,a),this._isForward=h,h)this.init(a.getCoordinate(0),a.getCoordinate(1));else{var v=a.getNumPoints()-1;this.init(a.getCoordinate(v),a.getCoordinate(v-1))}this.computeDirectedLabel()}},{key:"depthFactor",value:function(a,h){return a===q.EXTERIOR&&h===q.INTERIOR?1:a===q.INTERIOR&&h===q.EXTERIOR?-1:0}}])})(qr),Vr=(function(){return g((function f(){o(this,f)}),[{key:"createNode",value:function(f){return new mr(f,null)}}])})(),Ur=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"printEdges",value:function(f){f.println("Edges:");for(var n=0;n<this._edges.size();n++){f.println("edge "+n+":");var a=this._edges.get(n);a.print(f),a.eiList.print(f)}}},{key:"find",value:function(f){return this._nodes.find(f)}},{key:"addNode",value:function(){if(arguments[0]instanceof mr){var f=arguments[0];return this._nodes.addNode(f)}if(arguments[0]instanceof J){var n=arguments[0];return this._nodes.addNode(n)}}},{key:"getNodeIterator",value:function(){return this._nodes.iterator()}},{key:"linkResultDirectedEdges",value:function(){for(var f=this._nodes.iterator();f.hasNext();)f.next().getEdges().linkResultDirectedEdges()}},{key:"debugPrintln",value:function(f){Je.out.println(f)}},{key:"isBoundaryNode",value:function(f,n){var a=this._nodes.find(n);if(a===null)return!1;var h=a.getLabel();return h!==null&&h.getLocation(f)===q.BOUNDARY}},{key:"linkAllDirectedEdges",value:function(){for(var f=this._nodes.iterator();f.hasNext();)f.next().getEdges().linkAllDirectedEdges()}},{key:"matchInSameDirection",value:function(f,n,a,h){return!!f.equals(a)&&ke.index(f,n,h)===ke.COLLINEAR&&lt.quadrant(f,n)===lt.quadrant(a,h)}},{key:"getEdgeEnds",value:function(){return this._edgeEndList}},{key:"debugPrint",value:function(f){Je.out.print(f)}},{key:"getEdgeIterator",value:function(){return this._edges.iterator()}},{key:"findEdgeInSameDirection",value:function(f,n){for(var a=0;a<this._edges.size();a++){var h=this._edges.get(a),v=h.getCoordinates();if(this.matchInSameDirection(f,n,v[0],v[1])||this.matchInSameDirection(f,n,v[v.length-1],v[v.length-2]))return h}return null}},{key:"insertEdge",value:function(f){this._edges.add(f)}},{key:"findEdgeEnd",value:function(f){for(var n=this.getEdgeEnds().iterator();n.hasNext();){var a=n.next();if(a.getEdge()===f)return a}return null}},{key:"addEdges",value:function(f){for(var n=f.iterator();n.hasNext();){var a=n.next();this._edges.add(a);var h=new Ir(a,!0),v=new Ir(a,!1);h.setSym(v),v.setSym(h),this.add(h),this.add(v)}}},{key:"add",value:function(f){this._nodes.add(f),this._edgeEndList.add(f)}},{key:"getNodes",value:function(){return this._nodes.values()}},{key:"findEdge",value:function(f,n){for(var a=0;a<this._edges.size();a++){var h=this._edges.get(a),v=h.getCoordinates();if(f.equals(v[0])&&n.equals(v[1]))return h}return null}}],[{key:"constructor_",value:function(){if(this._edges=new De,this._nodes=null,this._edgeEndList=new De,arguments.length===0)this._nodes=new Gr(new Vr);else if(arguments.length===1){var f=arguments[0];this._nodes=new Gr(f)}}},{key:"linkResultDirectedEdges",value:function(f){for(var n=f.iterator();n.hasNext();)n.next().getEdges().linkResultDirectedEdges()}}])})(),wn=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"sortShellsAndHoles",value:function(n,a,h){for(var v=n.iterator();v.hasNext();){var I=v.next();I.isHole()?h.add(I):a.add(I)}}},{key:"computePolygons",value:function(n){for(var a=new De,h=n.iterator();h.hasNext();){var v=h.next().toPolygon(this._geometryFactory);a.add(v)}return a}},{key:"placeFreeHoles",value:function(n,a){for(var h=a.iterator();h.hasNext();){var v=h.next();if(v.getShell()===null){var I=f.findEdgeRingContaining(v,n);if(I===null)throw new at("unable to assign hole to a shell",v.getCoordinate(0));v.setShell(I)}}}},{key:"buildMinimalEdgeRings",value:function(n,a,h){for(var v=new De,I=n.iterator();I.hasNext();){var R=I.next();if(R.getMaxNodeDegree()>2){R.linkDirectedEdgesForMinimalEdgeRings();var T=R.buildMinimalRings(),O=this.findShell(T);O!==null?(this.placePolygonHoles(O,T),a.add(O)):h.addAll(T)}else v.add(R)}return v}},{key:"buildMaximalEdgeRings",value:function(n){for(var a=new De,h=n.iterator();h.hasNext();){var v=h.next();if(v.isInResult()&&v.getLabel().isArea()&&v.getEdgeRing()===null){var I=new Dn(v,this._geometryFactory);a.add(I),I.setInResult()}}return a}},{key:"placePolygonHoles",value:function(n,a){for(var h=a.iterator();h.hasNext();){var v=h.next();v.isHole()&&v.setShell(n)}}},{key:"getPolygons",value:function(){return this.computePolygons(this._shellList)}},{key:"findShell",value:function(n){for(var a=0,h=null,v=n.iterator();v.hasNext();){var I=v.next();I.isHole()||(h=I,a++)}return pe.isTrue(a<=1,"found two shells in MinimalEdgeRing list"),h}},{key:"add",value:function(){if(arguments.length===1){var n=arguments[0];this.add(n.getEdgeEnds(),n.getNodes())}else if(arguments.length===2){var a=arguments[0],h=arguments[1];Ur.linkResultDirectedEdges(h);var v=this.buildMaximalEdgeRings(a),I=new De,R=this.buildMinimalEdgeRings(v,this._shellList,I);this.sortShellsAndHoles(R,this._shellList,I),this.placeFreeHoles(this._shellList,I)}}}],[{key:"constructor_",value:function(){this._geometryFactory=null,this._shellList=new De;var n=arguments[0];this._geometryFactory=n}},{key:"findEdgeRingContaining",value:function(n,a){for(var h=n.getLinearRing(),v=h.getEnvelopeInternal(),I=h.getCoordinateN(0),R=null,T=null,O=a.iterator();O.hasNext();){var W=O.next(),re=W.getLinearRing(),ne=re.getEnvelopeInternal();if(!ne.equals(v)&&ne.contains(v)){I=We.ptNotInList(h.getCoordinates(),re.getCoordinates());var oe=!1;xr.isInRing(I,re.getCoordinates())&&(oe=!0),oe&&(R===null||T.contains(ne))&&(T=(R=W).getLinearRing().getEnvelopeInternal())}}return R}}])})(),zr=(function(){return g((function f(){o(this,f)}),[{key:"getBounds",value:function(){}}])})(),jt=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"getItem",value:function(){return this._item}},{key:"getBounds",value:function(){return this._bounds}},{key:"interfaces_",get:function(){return[zr,$]}}],[{key:"constructor_",value:function(){this._bounds=null,this._item=null;var f=arguments[0],n=arguments[1];this._bounds=f,this._item=n}}])})(),gr=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"poll",value:function(){if(this.isEmpty())return null;var f=this._items.get(1);return this._items.set(1,this._items.get(this._size)),this._size-=1,this.reorder(1),f}},{key:"size",value:function(){return this._size}},{key:"reorder",value:function(f){for(var n=null,a=this._items.get(f);2*f<=this._size&&((n=2*f)!==this._size&&this._items.get(n+1).compareTo(this._items.get(n))<0&&n++,this._items.get(n).compareTo(a)<0);f=n)this._items.set(f,this._items.get(n));this._items.set(f,a)}},{key:"clear",value:function(){this._size=0,this._items.clear()}},{key:"peek",value:function(){return this.isEmpty()?null:this._items.get(1)}},{key:"isEmpty",value:function(){return this._size===0}},{key:"add",value:function(f){this._items.add(null),this._size+=1;var n=this._size;for(this._items.set(0,f);f.compareTo(this._items.get(Math.trunc(n/2)))<0;n/=2)this._items.set(n,this._items.get(Math.trunc(n/2)));this._items.set(n,f)}}],[{key:"constructor_",value:function(){this._size=null,this._items=null,this._size=0,this._items=new De,this._items.add(null)}}])})(),kn=(function(){return g((function f(){o(this,f)}),[{key:"insert",value:function(f,n){}},{key:"remove",value:function(f,n){}},{key:"query",value:function(){}}])})(),Et=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"getLevel",value:function(){return this._level}},{key:"size",value:function(){return this._childBoundables.size()}},{key:"getChildBoundables",value:function(){return this._childBoundables}},{key:"addChildBoundable",value:function(f){pe.isTrue(this._bounds===null),this._childBoundables.add(f)}},{key:"isEmpty",value:function(){return this._childBoundables.isEmpty()}},{key:"getBounds",value:function(){return this._bounds===null&&(this._bounds=this.computeBounds()),this._bounds}},{key:"interfaces_",get:function(){return[zr,$]}}],[{key:"constructor_",value:function(){if(this._childBoundables=new De,this._bounds=null,this._level=null,arguments.length!==0){if(arguments.length===1){var f=arguments[0];this._level=f}}}}])})(),tr={reverseOrder:function(){return{compare:function(f,n){return n.compareTo(f)}}},min:function(f){return tr.sort(f),f.get(0)},sort:function(f,n){var a=f.toArray();n?Ze.sort(a,n):Ze.sort(a);for(var h=f.iterator(),v=0,I=a.length;v<I;v++)h.next(),h.set(a[v])},singletonList:function(f){var n=new De;return n.add(f),n}},Nn=(function(){function f(){o(this,f)}return g(f,null,[{key:"maxDistance",value:function(n,a,h,v,I,R,T,O){var W=f.distance(n,a,I,R);return W=Math.max(W,f.distance(n,a,T,O)),W=Math.max(W,f.distance(h,v,I,R)),W=Math.max(W,f.distance(h,v,T,O))}},{key:"distance",value:function(n,a,h,v){var I=h-n,R=v-a;return Math.sqrt(I*I+R*R)}},{key:"maximumDistance",value:function(n,a){var h=Math.min(n.getMinX(),a.getMinX()),v=Math.min(n.getMinY(),a.getMinY()),I=Math.max(n.getMaxX(),a.getMaxX()),R=Math.max(n.getMaxY(),a.getMaxY());return f.distance(h,v,I,R)}},{key:"minMaxDistance",value:function(n,a){var h=n.getMinX(),v=n.getMinY(),I=n.getMaxX(),R=n.getMaxY(),T=a.getMinX(),O=a.getMinY(),W=a.getMaxX(),re=a.getMaxY(),ne=f.maxDistance(h,v,h,R,T,O,T,re);return ne=Math.min(ne,f.maxDistance(h,v,h,R,T,O,W,O)),ne=Math.min(ne,f.maxDistance(h,v,h,R,W,re,T,re)),ne=Math.min(ne,f.maxDistance(h,v,h,R,W,re,W,O)),ne=Math.min(ne,f.maxDistance(h,v,I,v,T,O,T,re)),ne=Math.min(ne,f.maxDistance(h,v,I,v,T,O,W,O)),ne=Math.min(ne,f.maxDistance(h,v,I,v,W,re,T,re)),ne=Math.min(ne,f.maxDistance(h,v,I,v,W,re,W,O)),ne=Math.min(ne,f.maxDistance(I,R,h,R,T,O,T,re)),ne=Math.min(ne,f.maxDistance(I,R,h,R,T,O,W,O)),ne=Math.min(ne,f.maxDistance(I,R,h,R,W,re,T,re)),ne=Math.min(ne,f.maxDistance(I,R,h,R,W,re,W,O)),ne=Math.min(ne,f.maxDistance(I,R,I,v,T,O,T,re)),ne=Math.min(ne,f.maxDistance(I,R,I,v,T,O,W,O)),ne=Math.min(ne,f.maxDistance(I,R,I,v,W,re,T,re)),ne=Math.min(ne,f.maxDistance(I,R,I,v,W,re,W,O))}}])})(),rr=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"maximumDistance",value:function(){return Nn.maximumDistance(this._boundable1.getBounds(),this._boundable2.getBounds())}},{key:"expandToQueue",value:function(n,a){var h=f.isComposite(this._boundable1),v=f.isComposite(this._boundable2);if(h&&v)return f.area(this._boundable1)>f.area(this._boundable2)?(this.expand(this._boundable1,this._boundable2,!1,n,a),null):(this.expand(this._boundable2,this._boundable1,!0,n,a),null);if(h)return this.expand(this._boundable1,this._boundable2,!1,n,a),null;if(v)return this.expand(this._boundable2,this._boundable1,!0,n,a),null;throw new V("neither boundable is composite")}},{key:"isLeaves",value:function(){return!(f.isComposite(this._boundable1)||f.isComposite(this._boundable2))}},{key:"compareTo",value:function(n){var a=n;return this._distance<a._distance?-1:this._distance>a._distance?1:0}},{key:"expand",value:function(n,a,h,v,I){for(var R=n.getChildBoundables().iterator();R.hasNext();){var T=R.next(),O=null;(O=h?new f(a,T,this._itemDistance):new f(T,a,this._itemDistance)).getDistance()<I&&v.add(O)}}},{key:"getBoundable",value:function(n){return n===0?this._boundable1:this._boundable2}},{key:"getDistance",value:function(){return this._distance}},{key:"distance",value:function(){return this.isLeaves()?this._itemDistance.distance(this._boundable1,this._boundable2):this._boundable1.getBounds().distance(this._boundable2.getBounds())}},{key:"interfaces_",get:function(){return[X]}}],[{key:"constructor_",value:function(){this._boundable1=null,this._boundable2=null,this._distance=null,this._itemDistance=null;var n=arguments[0],a=arguments[1],h=arguments[2];this._boundable1=n,this._boundable2=a,this._itemDistance=h,this._distance=this.distance()}},{key:"area",value:function(n){return n.getBounds().getArea()}},{key:"isComposite",value:function(n){return n instanceof Et}}])})(),Hr=(function(){return g((function f(){o(this,f)}),[{key:"visitItem",value:function(f){}}])})(),nr=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"queryInternal",value:function(){if(Le(arguments[2],Hr)&&arguments[0]instanceof Object&&arguments[1]instanceof Et)for(var n=arguments[0],a=arguments[2],h=arguments[1].getChildBoundables(),v=0;v<h.size();v++){var I=h.get(v);this.getIntersectsOp().intersects(I.getBounds(),n)&&(I instanceof Et?this.queryInternal(n,I,a):I instanceof jt?a.visitItem(I.getItem()):pe.shouldNeverReachHere())}else if(Le(arguments[2],Ve)&&arguments[0]instanceof Object&&arguments[1]instanceof Et)for(var R=arguments[0],T=arguments[2],O=arguments[1].getChildBoundables(),W=0;W<O.size();W++){var re=O.get(W);this.getIntersectsOp().intersects(re.getBounds(),R)&&(re instanceof Et?this.queryInternal(R,re,T):re instanceof jt?T.add(re.getItem()):pe.shouldNeverReachHere())}}},{key:"getNodeCapacity",value:function(){return this._nodeCapacity}},{key:"lastNode",value:function(n){return n.get(n.size()-1)}},{key:"size",value:function(){if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.size(this._root));if(arguments.length===1){for(var n=0,a=arguments[0].getChildBoundables().iterator();a.hasNext();){var h=a.next();h instanceof Et?n+=this.size(h):h instanceof jt&&(n+=1)}return n}}},{key:"removeItem",value:function(n,a){for(var h=null,v=n.getChildBoundables().iterator();v.hasNext();){var I=v.next();I instanceof jt&&I.getItem()===a&&(h=I)}return h!==null&&(n.getChildBoundables().remove(h),!0)}},{key:"itemsTree",value:function(){if(arguments.length===0){this.build();var n=this.itemsTree(this._root);return n===null?new De:n}if(arguments.length===1){for(var a=arguments[0],h=new De,v=a.getChildBoundables().iterator();v.hasNext();){var I=v.next();if(I instanceof Et){var R=this.itemsTree(I);R!==null&&h.add(R)}else I instanceof jt?h.add(I.getItem()):pe.shouldNeverReachHere()}return h.size()<=0?null:h}}},{key:"insert",value:function(n,a){pe.isTrue(!this._built,"Cannot insert items into an STR packed R-tree after it has been built."),this._itemBoundables.add(new jt(n,a))}},{key:"boundablesAtLevel",value:function(){if(arguments.length===1){var n=arguments[0],a=new De;return this.boundablesAtLevel(n,this._root,a),a}if(arguments.length===3){var h=arguments[0],v=arguments[1],I=arguments[2];if(pe.isTrue(h>-2),v.getLevel()===h)return I.add(v),null;for(var R=v.getChildBoundables().iterator();R.hasNext();){var T=R.next();T instanceof Et?this.boundablesAtLevel(h,T,I):(pe.isTrue(T instanceof jt),h===-1&&I.add(T))}return null}}},{key:"query",value:function(){if(arguments.length===1){var n=arguments[0];this.build();var a=new De;return this.isEmpty()||this.getIntersectsOp().intersects(this._root.getBounds(),n)&&this.queryInternal(n,this._root,a),a}if(arguments.length===2){var h=arguments[0],v=arguments[1];if(this.build(),this.isEmpty())return null;this.getIntersectsOp().intersects(this._root.getBounds(),h)&&this.queryInternal(h,this._root,v)}}},{key:"build",value:function(){if(this._built)return null;this._root=this._itemBoundables.isEmpty()?this.createNode(0):this.createHigherLevels(this._itemBoundables,-1),this._itemBoundables=null,this._built=!0}},{key:"getRoot",value:function(){return this.build(),this._root}},{key:"remove",value:function(){if(arguments.length===2){var n=arguments[0],a=arguments[1];return this.build(),!!this.getIntersectsOp().intersects(this._root.getBounds(),n)&&this.remove(n,this._root,a)}if(arguments.length===3){var h=arguments[0],v=arguments[1],I=arguments[2],R=this.removeItem(v,I);if(R)return!0;for(var T=null,O=v.getChildBoundables().iterator();O.hasNext();){var W=O.next();if(this.getIntersectsOp().intersects(W.getBounds(),h)&&W instanceof Et&&(R=this.remove(h,W,I))){T=W;break}}return T!==null&&T.getChildBoundables().isEmpty()&&v.getChildBoundables().remove(T),R}}},{key:"createHigherLevels",value:function(n,a){pe.isTrue(!n.isEmpty());var h=this.createParentBoundables(n,a+1);return h.size()===1?h.get(0):this.createHigherLevels(h,a+1)}},{key:"depth",value:function(){if(arguments.length===0)return this.isEmpty()?0:(this.build(),this.depth(this._root));if(arguments.length===1){for(var n=0,a=arguments[0].getChildBoundables().iterator();a.hasNext();){var h=a.next();if(h instanceof Et){var v=this.depth(h);v>n&&(n=v)}}return n+1}}},{key:"createParentBoundables",value:function(n,a){pe.isTrue(!n.isEmpty());var h=new De;h.add(this.createNode(a));var v=new De(n);tr.sort(v,this.getComparator());for(var I=v.iterator();I.hasNext();){var R=I.next();this.lastNode(h).getChildBoundables().size()===this.getNodeCapacity()&&h.add(this.createNode(a)),this.lastNode(h).addChildBoundable(R)}return h}},{key:"isEmpty",value:function(){return this._built?this._root.isEmpty():this._itemBoundables.isEmpty()}},{key:"interfaces_",get:function(){return[$]}}],[{key:"constructor_",value:function(){if(this._root=null,this._built=!1,this._itemBoundables=new De,this._nodeCapacity=null,arguments.length===0)f.constructor_.call(this,f.DEFAULT_NODE_CAPACITY);else if(arguments.length===1){var n=arguments[0];pe.isTrue(n>1,"Node capacity must be greater than 1"),this._nodeCapacity=n}}},{key:"compareDoubles",value:function(n,a){return n>a?1:n<a?-1:0}}])})();nr.IntersectsOp=function(){},nr.DEFAULT_NODE_CAPACITY=10;var Ln=(function(){return g((function f(){o(this,f)}),[{key:"distance",value:function(f,n){}}])})(),kt=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"createParentBoundablesFromVerticalSlices",value:function(a,h){pe.isTrue(a.length>0);for(var v=new De,I=0;I<a.length;I++)v.addAll(this.createParentBoundablesFromVerticalSlice(a[I],h));return v}},{key:"nearestNeighbourK",value:function(){if(arguments.length===2){var a=arguments[0],h=arguments[1];return this.nearestNeighbourK(a,ce.POSITIVE_INFINITY,h)}if(arguments.length===3){var v=arguments[0],I=arguments[2],R=arguments[1],T=new gr;T.add(v);for(var O=new gr;!T.isEmpty()&&R>=0;){var W=T.poll(),re=W.getDistance();if(re>=R)break;W.isLeaves()?O.size()<I?O.add(W):(O.peek().getDistance()>re&&(O.poll(),O.add(W)),R=O.peek().getDistance()):W.expandToQueue(T,R)}return n.getItems(O)}}},{key:"createNode",value:function(a){return new $r(a)}},{key:"size",value:function(){return arguments.length===0?A(n,"size",this,1).call(this):A(n,"size",this,1).apply(this,arguments)}},{key:"insert",value:function(){if(!(arguments.length===2&&arguments[1]instanceof Object&&arguments[0]instanceof ye))return A(n,"insert",this,1).apply(this,arguments);var a=arguments[0],h=arguments[1];if(a.isNull())return null;A(n,"insert",this,1).call(this,a,h)}},{key:"getIntersectsOp",value:function(){return n.intersectsOp}},{key:"verticalSlices",value:function(a,h){for(var v=Math.trunc(Math.ceil(a.size()/h)),I=new Array(h).fill(null),R=a.iterator(),T=0;T<h;T++){I[T]=new De;for(var O=0;R.hasNext()&&O<v;){var W=R.next();I[T].add(W),O++}}return I}},{key:"query",value:function(){if(arguments.length===1){var a=arguments[0];return A(n,"query",this,1).call(this,a)}if(arguments.length===2){var h=arguments[0],v=arguments[1];A(n,"query",this,1).call(this,h,v)}}},{key:"getComparator",value:function(){return n.yComparator}},{key:"createParentBoundablesFromVerticalSlice",value:function(a,h){return A(n,"createParentBoundables",this,1).call(this,a,h)}},{key:"remove",value:function(){if(arguments.length===2&&arguments[1]instanceof Object&&arguments[0]instanceof ye){var a=arguments[0],h=arguments[1];return A(n,"remove",this,1).call(this,a,h)}return A(n,"remove",this,1).apply(this,arguments)}},{key:"depth",value:function(){return arguments.length===0?A(n,"depth",this,1).call(this):A(n,"depth",this,1).apply(this,arguments)}},{key:"createParentBoundables",value:function(a,h){pe.isTrue(!a.isEmpty());var v=Math.trunc(Math.ceil(a.size()/this.getNodeCapacity())),I=new De(a);tr.sort(I,n.xComparator);var R=this.verticalSlices(I,Math.trunc(Math.ceil(Math.sqrt(v))));return this.createParentBoundablesFromVerticalSlices(R,h)}},{key:"nearestNeighbour",value:function(){if(arguments.length===1){if(Le(arguments[0],Ln)){var a=arguments[0];if(this.isEmpty())return null;var h=new rr(this.getRoot(),this.getRoot(),a);return this.nearestNeighbour(h)}if(arguments[0]instanceof rr){var v=arguments[0],I=ce.POSITIVE_INFINITY,R=null,T=new gr;for(T.add(v);!T.isEmpty()&&I>0;){var O=T.poll(),W=O.getDistance();if(W>=I)break;O.isLeaves()?(I=W,R=O):O.expandToQueue(T,I)}return R===null?null:[R.getBoundable(0).getItem(),R.getBoundable(1).getItem()]}}else{if(arguments.length===2){var re=arguments[0],ne=arguments[1];if(this.isEmpty()||re.isEmpty())return null;var oe=new rr(this.getRoot(),re.getRoot(),ne);return this.nearestNeighbour(oe)}if(arguments.length===3){var _e=arguments[2],Se=new jt(arguments[0],arguments[1]),Ne=new rr(this.getRoot(),Se,_e);return this.nearestNeighbour(Ne)[0]}if(arguments.length===4){var Ge=arguments[2],Be=arguments[3],$e=new jt(arguments[0],arguments[1]),et=new rr(this.getRoot(),$e,Ge);return this.nearestNeighbourK(et,Be)}}}},{key:"isWithinDistance",value:function(){if(arguments.length===2){var a=arguments[0],h=arguments[1],v=ce.POSITIVE_INFINITY,I=new gr;for(I.add(a);!I.isEmpty();){var R=I.poll(),T=R.getDistance();if(T>h)return!1;if(R.maximumDistance()<=h)return!0;if(R.isLeaves()){if((v=T)<=h)return!0}else R.expandToQueue(I,v)}return!1}if(arguments.length===3){var O=arguments[0],W=arguments[1],re=arguments[2],ne=new rr(this.getRoot(),O.getRoot(),W);return this.isWithinDistance(ne,re)}}},{key:"interfaces_",get:function(){return[kn,$]}}],[{key:"constructor_",value:function(){if(arguments.length===0)n.constructor_.call(this,n.DEFAULT_NODE_CAPACITY);else if(arguments.length===1){var a=arguments[0];nr.constructor_.call(this,a)}}},{key:"centreX",value:function(a){return n.avg(a.getMinX(),a.getMaxX())}},{key:"avg",value:function(a,h){return(a+h)/2}},{key:"getItems",value:function(a){for(var h=new Array(a.size()).fill(null),v=0;!a.isEmpty();){var I=a.poll();h[v]=I.getBoundable(0).getItem(),v++}return h}},{key:"centreY",value:function(a){return n.avg(a.getMinY(),a.getMaxY())}}])})(nr),$r=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"computeBounds",value:function(){for(var a=null,h=this.getChildBoundables().iterator();h.hasNext();){var v=h.next();a===null?a=new ye(v.getBounds()):a.expandToInclude(v.getBounds())}return a}}],[{key:"constructor_",value:function(){var a=arguments[0];Et.constructor_.call(this,a)}}])})(Et);kt.STRtreeNode=$r,kt.xComparator=new((function(){return g((function f(){o(this,f)}),[{key:"interfaces_",get:function(){return[Te]}},{key:"compare",value:function(f,n){return nr.compareDoubles(kt.centreX(f.getBounds()),kt.centreX(n.getBounds()))}}])})()),kt.yComparator=new((function(){return g((function f(){o(this,f)}),[{key:"interfaces_",get:function(){return[Te]}},{key:"compare",value:function(f,n){return nr.compareDoubles(kt.centreY(f.getBounds()),kt.centreY(n.getBounds()))}}])})()),kt.intersectsOp=new((function(){return g((function f(){o(this,f)}),[{key:"interfaces_",get:function(){return[IntersectsOp]}},{key:"intersects",value:function(f,n){return f.intersects(n)}}])})()),kt.DEFAULT_NODE_CAPACITY=10;var On=(function(){function f(){o(this,f)}return g(f,null,[{key:"relativeSign",value:function(n,a){return n<a?-1:n>a?1:0}},{key:"compare",value:function(n,a,h){if(a.equals2D(h))return 0;var v=f.relativeSign(a.x,h.x),I=f.relativeSign(a.y,h.y);switch(n){case 0:return f.compareValue(v,I);case 1:return f.compareValue(I,v);case 2:return f.compareValue(I,-v);case 3:return f.compareValue(-v,I);case 4:return f.compareValue(-v,-I);case 5:return f.compareValue(-I,-v);case 6:return f.compareValue(-I,v);case 7:return f.compareValue(v,-I)}return pe.shouldNeverReachHere("invalid octant value"),0}},{key:"compareValue",value:function(n,a){return n<0?-1:n>0?1:a<0?-1:a>0?1:0}}])})(),Pn=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"getCoordinate",value:function(){return this.coord}},{key:"print",value:function(f){f.print(this.coord),f.print(" seg # = "+this.segmentIndex)}},{key:"compareTo",value:function(f){var n=f;return this.segmentIndex<n.segmentIndex?-1:this.segmentIndex>n.segmentIndex?1:this.coord.equals2D(n.coord)?0:this._isInterior?n._isInterior?On.compare(this._segmentOctant,this.coord,n.coord):1:-1}},{key:"isEndPoint",value:function(f){return this.segmentIndex===0&&!this._isInterior||this.segmentIndex===f}},{key:"toString",value:function(){return this.segmentIndex+":"+this.coord.toString()}},{key:"isInterior",value:function(){return this._isInterior}},{key:"interfaces_",get:function(){return[X]}}],[{key:"constructor_",value:function(){this._segString=null,this.coord=null,this.segmentIndex=null,this._segmentOctant=null,this._isInterior=null;var f=arguments[0],n=arguments[1],a=arguments[2],h=arguments[3];this._segString=f,this.coord=new J(n),this.segmentIndex=a,this._segmentOctant=h,this._isInterior=!n.equals2D(f.getCoordinate(a))}}])})(),Fn=(function(){return g((function f(){o(this,f)}),[{key:"hasNext",value:function(){}},{key:"next",value:function(){}},{key:"remove",value:function(){}}])})(),Mn=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"getSplitCoordinates",value:function(){var f=new Rt;this.addEndpoints();for(var n=this.iterator(),a=n.next();n.hasNext();){var h=n.next();this.addEdgeCoordinates(a,h,f),a=h}return f.toCoordinateArray()}},{key:"addCollapsedNodes",value:function(){var f=new De;this.findCollapsesFromInsertedNodes(f),this.findCollapsesFromExistingVertices(f);for(var n=f.iterator();n.hasNext();){var a=n.next().intValue();this.add(this._edge.getCoordinate(a),a)}}},{key:"createSplitEdgePts",value:function(f,n){var a=n.segmentIndex-f.segmentIndex+2;if(a===2)return[new J(f.coord),new J(n.coord)];var h=this._edge.getCoordinate(n.segmentIndex),v=n.isInterior()||!n.coord.equals2D(h);v||a--;var I=new Array(a).fill(null),R=0;I[R++]=new J(f.coord);for(var T=f.segmentIndex+1;T<=n.segmentIndex;T++)I[R++]=this._edge.getCoordinate(T);return v&&(I[R]=new J(n.coord)),I}},{key:"print",value:function(f){f.println("Intersections:");for(var n=this.iterator();n.hasNext();)n.next().print(f)}},{key:"findCollapsesFromExistingVertices",value:function(f){for(var n=0;n<this._edge.size()-2;n++){var a=this._edge.getCoordinate(n);this._edge.getCoordinate(n+1);var h=this._edge.getCoordinate(n+2);a.equals2D(h)&&f.add(gt.valueOf(n+1))}}},{key:"addEdgeCoordinates",value:function(f,n,a){var h=this.createSplitEdgePts(f,n);a.add(h,!1)}},{key:"iterator",value:function(){return this._nodeMap.values().iterator()}},{key:"addSplitEdges",value:function(f){this.addEndpoints(),this.addCollapsedNodes();for(var n=this.iterator(),a=n.next();n.hasNext();){var h=n.next(),v=this.createSplitEdge(a,h);f.add(v),a=h}}},{key:"findCollapseIndex",value:function(f,n,a){if(!f.coord.equals2D(n.coord))return!1;var h=n.segmentIndex-f.segmentIndex;return n.isInterior()||h--,h===1&&(a[0]=f.segmentIndex+1,!0)}},{key:"findCollapsesFromInsertedNodes",value:function(f){for(var n=new Array(1).fill(null),a=this.iterator(),h=a.next();a.hasNext();){var v=a.next();this.findCollapseIndex(h,v,n)&&f.add(gt.valueOf(n[0])),h=v}}},{key:"getEdge",value:function(){return this._edge}},{key:"addEndpoints",value:function(){var f=this._edge.size()-1;this.add(this._edge.getCoordinate(0),0),this.add(this._edge.getCoordinate(f),f)}},{key:"createSplitEdge",value:function(f,n){var a=this.createSplitEdgePts(f,n);return new Xt(a,this._edge.getData())}},{key:"add",value:function(f,n){var a=new Pn(this._edge,f,n,this._edge.getSegmentOctant(n)),h=this._nodeMap.get(a);return h!==null?(pe.isTrue(h.coord.equals2D(f),"Found equal nodes with different coordinates"),h):(this._nodeMap.put(a,a),a)}},{key:"checkSplitEdgesCorrectness",value:function(f){var n=this._edge.getCoordinates(),a=f.get(0).getCoordinate(0);if(!a.equals2D(n[0]))throw new Ce("bad split edge start point at "+a);var h=f.get(f.size()-1).getCoordinates(),v=h[h.length-1];if(!v.equals2D(n[n.length-1]))throw new Ce("bad split edge end point at "+v)}}],[{key:"constructor_",value:function(){this._nodeMap=new ur,this._edge=null;var f=arguments[0];this._edge=f}}])})(),jn=(function(){function f(){o(this,f)}return g(f,null,[{key:"octant",value:function(){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var n=arguments[0],a=arguments[1];if(n===0&&a===0)throw new V("Cannot compute the octant for point ( "+n+", "+a+" )");var h=Math.abs(n),v=Math.abs(a);return n>=0?a>=0?h>=v?0:1:h>=v?7:6:a>=0?h>=v?3:2:h>=v?4:5}if(arguments[0]instanceof J&&arguments[1]instanceof J){var I=arguments[0],R=arguments[1],T=R.x-I.x,O=R.y-I.y;if(T===0&&O===0)throw new V("Cannot compute the octant for two identical points "+I);return f.octant(T,O)}}}])})(),Bn=(function(){return g((function f(){o(this,f)}),[{key:"getCoordinates",value:function(){}},{key:"size",value:function(){}},{key:"getCoordinate",value:function(f){}},{key:"isClosed",value:function(){}},{key:"setData",value:function(f){}},{key:"getData",value:function(){}}])})(),Gn=(function(){return g((function f(){o(this,f)}),[{key:"addIntersection",value:function(f,n){}},{key:"interfaces_",get:function(){return[Bn]}}])})(),Xt=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"getCoordinates",value:function(){return this._pts}},{key:"size",value:function(){return this._pts.length}},{key:"getCoordinate",value:function(n){return this._pts[n]}},{key:"isClosed",value:function(){return this._pts[0].equals(this._pts[this._pts.length-1])}},{key:"getSegmentOctant",value:function(n){return n===this._pts.length-1?-1:this.safeOctant(this.getCoordinate(n),this.getCoordinate(n+1))}},{key:"setData",value:function(n){this._data=n}},{key:"safeOctant",value:function(n,a){return n.equals2D(a)?0:jn.octant(n,a)}},{key:"getData",value:function(){return this._data}},{key:"addIntersection",value:function(){if(arguments.length===2){var n=arguments[0],a=arguments[1];this.addIntersectionNode(n,a)}else if(arguments.length===4){var h=arguments[1],v=arguments[3],I=new J(arguments[0].getIntersection(v));this.addIntersection(I,h)}}},{key:"toString",value:function(){return _r.toLineString(new bt(this._pts))}},{key:"getNodeList",value:function(){return this._nodeList}},{key:"addIntersectionNode",value:function(n,a){var h=a,v=h+1;if(v<this._pts.length){var I=this._pts[v];n.equals2D(I)&&(h=v)}return this._nodeList.add(n,h)}},{key:"addIntersections",value:function(n,a,h){for(var v=0;v<n.getIntersectionNum();v++)this.addIntersection(n,a,h,v)}},{key:"interfaces_",get:function(){return[Gn]}}],[{key:"constructor_",value:function(){this._nodeList=new Mn(this),this._pts=null,this._data=null;var n=arguments[0],a=arguments[1];this._pts=n,this._data=a}},{key:"getNodedSubstrings",value:function(){if(arguments.length===1){var n=arguments[0],a=new De;return f.getNodedSubstrings(n,a),a}if(arguments.length===2)for(var h=arguments[1],v=arguments[0].iterator();v.hasNext();)v.next().getNodeList().addSplitEdges(h)}}])})(),ft=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"minX",value:function(){return Math.min(this.p0.x,this.p1.x)}},{key:"orientationIndex",value:function(){if(arguments[0]instanceof f){var n=arguments[0],a=ke.index(this.p0,this.p1,n.p0),h=ke.index(this.p0,this.p1,n.p1);return a>=0&&h>=0||a<=0&&h<=0?Math.max(a,h):0}if(arguments[0]instanceof J){var v=arguments[0];return ke.index(this.p0,this.p1,v)}}},{key:"toGeometry",value:function(n){return n.createLineString([this.p0,this.p1])}},{key:"isVertical",value:function(){return this.p0.x===this.p1.x}},{key:"equals",value:function(n){if(!(n instanceof f))return!1;var a=n;return this.p0.equals(a.p0)&&this.p1.equals(a.p1)}},{key:"intersection",value:function(n){var a=new Wt;return a.computeIntersection(this.p0,this.p1,n.p0,n.p1),a.hasIntersection()?a.getIntersection(0):null}},{key:"project",value:function(){if(arguments[0]instanceof J){var n=arguments[0];if(n.equals(this.p0)||n.equals(this.p1))return new J(n);var a=this.projectionFactor(n),h=new J;return h.x=this.p0.x+a*(this.p1.x-this.p0.x),h.y=this.p0.y+a*(this.p1.y-this.p0.y),h}if(arguments[0]instanceof f){var v=arguments[0],I=this.projectionFactor(v.p0),R=this.projectionFactor(v.p1);if(I>=1&&R>=1||I<=0&&R<=0)return null;var T=this.project(v.p0);I<0&&(T=this.p0),I>1&&(T=this.p1);var O=this.project(v.p1);return R<0&&(O=this.p0),R>1&&(O=this.p1),new f(T,O)}}},{key:"normalize",value:function(){this.p1.compareTo(this.p0)<0&&this.reverse()}},{key:"angle",value:function(){return Math.atan2(this.p1.y-this.p0.y,this.p1.x-this.p0.x)}},{key:"getCoordinate",value:function(n){return n===0?this.p0:this.p1}},{key:"distancePerpendicular",value:function(n){return Qe.pointToLinePerpendicular(n,this.p0,this.p1)}},{key:"minY",value:function(){return Math.min(this.p0.y,this.p1.y)}},{key:"midPoint",value:function(){return f.midPoint(this.p0,this.p1)}},{key:"projectionFactor",value:function(n){if(n.equals(this.p0))return 0;if(n.equals(this.p1))return 1;var a=this.p1.x-this.p0.x,h=this.p1.y-this.p0.y,v=a*a+h*h;return v<=0?ce.NaN:((n.x-this.p0.x)*a+(n.y-this.p0.y)*h)/v}},{key:"closestPoints",value:function(n){var a=this.intersection(n);if(a!==null)return[a,a];var h=new Array(2).fill(null),v=ce.MAX_VALUE,I=null,R=this.closestPoint(n.p0);v=R.distance(n.p0),h[0]=R,h[1]=n.p0;var T=this.closestPoint(n.p1);(I=T.distance(n.p1))<v&&(v=I,h[0]=T,h[1]=n.p1);var O=n.closestPoint(this.p0);(I=O.distance(this.p0))<v&&(v=I,h[0]=this.p0,h[1]=O);var W=n.closestPoint(this.p1);return(I=W.distance(this.p1))<v&&(v=I,h[0]=this.p1,h[1]=W),h}},{key:"closestPoint",value:function(n){var a=this.projectionFactor(n);return a>0&&a<1?this.project(n):this.p0.distance(n)<this.p1.distance(n)?this.p0:this.p1}},{key:"maxX",value:function(){return Math.max(this.p0.x,this.p1.x)}},{key:"getLength",value:function(){return this.p0.distance(this.p1)}},{key:"compareTo",value:function(n){var a=n,h=this.p0.compareTo(a.p0);return h!==0?h:this.p1.compareTo(a.p1)}},{key:"reverse",value:function(){var n=this.p0;this.p0=this.p1,this.p1=n}},{key:"equalsTopo",value:function(n){return this.p0.equals(n.p0)&&this.p1.equals(n.p1)||this.p0.equals(n.p1)&&this.p1.equals(n.p0)}},{key:"lineIntersection",value:function(n){return Ot.intersection(this.p0,this.p1,n.p0,n.p1)}},{key:"maxY",value:function(){return Math.max(this.p0.y,this.p1.y)}},{key:"pointAlongOffset",value:function(n,a){var h=this.p0.x+n*(this.p1.x-this.p0.x),v=this.p0.y+n*(this.p1.y-this.p0.y),I=this.p1.x-this.p0.x,R=this.p1.y-this.p0.y,T=Math.sqrt(I*I+R*R),O=0,W=0;if(a!==0){if(T<=0)throw new IllegalStateException("Cannot compute offset from zero-length line segment");O=a*I/T,W=a*R/T}return new J(h-W,v+O)}},{key:"setCoordinates",value:function(){if(arguments.length===1){var n=arguments[0];this.setCoordinates(n.p0,n.p1)}else if(arguments.length===2){var a=arguments[0],h=arguments[1];this.p0.x=a.x,this.p0.y=a.y,this.p1.x=h.x,this.p1.y=h.y}}},{key:"segmentFraction",value:function(n){var a=this.projectionFactor(n);return a<0?a=0:(a>1||ce.isNaN(a))&&(a=1),a}},{key:"toString",value:function(){return"LINESTRING( "+this.p0.x+" "+this.p0.y+", "+this.p1.x+" "+this.p1.y+")"}},{key:"isHorizontal",value:function(){return this.p0.y===this.p1.y}},{key:"reflect",value:function(n){var a=this.p1.getY()-this.p0.getY(),h=this.p0.getX()-this.p1.getX(),v=this.p0.getY()*(this.p1.getX()-this.p0.getX())-this.p0.getX()*(this.p1.getY()-this.p0.getY()),I=a*a+h*h,R=a*a-h*h,T=n.getX(),O=n.getY();return new J((-R*T-2*a*h*O-2*a*v)/I,(R*O-2*a*h*T-2*h*v)/I)}},{key:"distance",value:function(){if(arguments[0]instanceof f){var n=arguments[0];return Qe.segmentToSegment(this.p0,this.p1,n.p0,n.p1)}if(arguments[0]instanceof J){var a=arguments[0];return Qe.pointToSegment(a,this.p0,this.p1)}}},{key:"pointAlong",value:function(n){var a=new J;return a.x=this.p0.x+n*(this.p1.x-this.p0.x),a.y=this.p0.y+n*(this.p1.y-this.p0.y),a}},{key:"hashCode",value:function(){var n=ce.doubleToLongBits(this.p0.x);n^=31*ce.doubleToLongBits(this.p0.y);var a=Math.trunc(n)^Math.trunc(n>>32),h=ce.doubleToLongBits(this.p1.x);return h^=31*ce.doubleToLongBits(this.p1.y),a^(Math.trunc(h)^Math.trunc(h>>32))}},{key:"interfaces_",get:function(){return[X,$]}}],[{key:"constructor_",value:function(){if(this.p0=null,this.p1=null,arguments.length===0)f.constructor_.call(this,new J,new J);else if(arguments.length===1){var n=arguments[0];f.constructor_.call(this,n.p0,n.p1)}else if(arguments.length===2){var a=arguments[0],h=arguments[1];this.p0=a,this.p1=h}else if(arguments.length===4){var v=arguments[0],I=arguments[1],R=arguments[2],T=arguments[3];f.constructor_.call(this,new J(v,I),new J(R,T))}}},{key:"midPoint",value:function(n,a){return new J((n.x+a.x)/2,(n.y+a.y)/2)}}])})(),qn=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"overlap",value:function(){if(arguments.length!==2){if(arguments.length===4){var f=arguments[1],n=arguments[2],a=arguments[3];arguments[0].getLineSegment(f,this._overlapSeg1),n.getLineSegment(a,this._overlapSeg2),this.overlap(this._overlapSeg1,this._overlapSeg2)}}}}],[{key:"constructor_",value:function(){this._overlapSeg1=new ft,this._overlapSeg2=new ft}}])})(),Wr=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"getLineSegment",value:function(f,n){n.p0=this._pts[f],n.p1=this._pts[f+1]}},{key:"computeSelect",value:function(f,n,a,h){var v=this._pts[n],I=this._pts[a];if(a-n==1)return h.select(this,n),null;if(!f.intersects(v,I))return null;var R=Math.trunc((n+a)/2);n<R&&this.computeSelect(f,n,R,h),R<a&&this.computeSelect(f,R,a,h)}},{key:"getCoordinates",value:function(){for(var f=new Array(this._end-this._start+1).fill(null),n=0,a=this._start;a<=this._end;a++)f[n++]=this._pts[a];return f}},{key:"computeOverlaps",value:function(){if(arguments.length===2){var f=arguments[0],n=arguments[1];this.computeOverlaps(this._start,this._end,f,f._start,f._end,n)}else if(arguments.length===6){var a=arguments[0],h=arguments[1],v=arguments[2],I=arguments[3],R=arguments[4],T=arguments[5];if(h-a==1&&R-I==1)return T.overlap(this,a,v,I),null;if(!this.overlaps(a,h,v,I,R))return null;var O=Math.trunc((a+h)/2),W=Math.trunc((I+R)/2);a<O&&(I<W&&this.computeOverlaps(a,O,v,I,W,T),W<R&&this.computeOverlaps(a,O,v,W,R,T)),O<h&&(I<W&&this.computeOverlaps(O,h,v,I,W,T),W<R&&this.computeOverlaps(O,h,v,W,R,T))}}},{key:"setId",value:function(f){this._id=f}},{key:"select",value:function(f,n){this.computeSelect(f,this._start,this._end,n)}},{key:"getEnvelope",value:function(){if(this._env===null){var f=this._pts[this._start],n=this._pts[this._end];this._env=new ye(f,n)}return this._env}},{key:"overlaps",value:function(f,n,a,h,v){return ye.intersects(this._pts[f],this._pts[n],a._pts[h],a._pts[v])}},{key:"getEndIndex",value:function(){return this._end}},{key:"getStartIndex",value:function(){return this._start}},{key:"getContext",value:function(){return this._context}},{key:"getId",value:function(){return this._id}}],[{key:"constructor_",value:function(){this._pts=null,this._start=null,this._end=null,this._env=null,this._context=null,this._id=null;var f=arguments[0],n=arguments[1],a=arguments[2],h=arguments[3];this._pts=f,this._start=n,this._end=a,this._context=h}}])})(),Vn=(function(){function f(){o(this,f)}return g(f,null,[{key:"findChainEnd",value:function(n,a){for(var h=a;h<n.length-1&&n[h].equals2D(n[h+1]);)h++;if(h>=n.length-1)return n.length-1;for(var v=lt.quadrant(n[h],n[h+1]),I=a+1;I<n.length&&!(!n[I-1].equals2D(n[I])&&lt.quadrant(n[I-1],n[I])!==v);)I++;return I-1}},{key:"getChains",value:function(){if(arguments.length===1){var n=arguments[0];return f.getChains(n,null)}if(arguments.length===2){var a=arguments[0],h=arguments[1],v=new De,I=0;do{var R=f.findChainEnd(a,I),T=new Wr(a,I,R,h);v.add(T),I=R}while(I<a.length-1);return v}}}])})(),Cr=(function(){return g((function f(){o(this,f)}),[{key:"computeNodes",value:function(f){}},{key:"getNodedSubstrings",value:function(){}}])})(),Xr=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"setSegmentIntersector",value:function(f){this._segInt=f}},{key:"interfaces_",get:function(){return[Cr]}}],[{key:"constructor_",value:function(){if(this._segInt=null,arguments.length!==0){if(arguments.length===1){var f=arguments[0];this.setSegmentIntersector(f)}}}}])})(),Sr=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"getMonotoneChains",value:function(){return this._monoChains}},{key:"getNodedSubstrings",value:function(){return Xt.getNodedSubstrings(this._nodedSegStrings)}},{key:"getIndex",value:function(){return this._index}},{key:"add",value:function(a){for(var h=Vn.getChains(a.getCoordinates(),a).iterator();h.hasNext();){var v=h.next();v.setId(this._idCounter++),this._index.insert(v.getEnvelope(),v),this._monoChains.add(v)}}},{key:"computeNodes",value:function(a){this._nodedSegStrings=a;for(var h=a.iterator();h.hasNext();)this.add(h.next());this.intersectChains()}},{key:"intersectChains",value:function(){for(var a=new Zr(this._segInt),h=this._monoChains.iterator();h.hasNext();)for(var v=h.next(),I=this._index.query(v.getEnvelope()).iterator();I.hasNext();){var R=I.next();if(R.getId()>v.getId()&&(v.computeOverlaps(R,a),this._nOverlaps++),this._segInt.isDone())return null}}}],[{key:"constructor_",value:function(){if(this._monoChains=new De,this._index=new kt,this._idCounter=0,this._nodedSegStrings=null,this._nOverlaps=0,arguments.length!==0){if(arguments.length===1){var a=arguments[0];Xr.constructor_.call(this,a)}}}}])})(Xr),Zr=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"overlap",value:function(){if(arguments.length!==4)return A(n,"overlap",this,1).apply(this,arguments);var a=arguments[1],h=arguments[2],v=arguments[3],I=arguments[0].getContext(),R=h.getContext();this._si.processIntersections(I,a,R,v)}}],[{key:"constructor_",value:function(){this._si=null;var a=arguments[0];this._si=a}}])})(qn);Sr.SegmentOverlapAction=Zr;var Dt=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"isDeletable",value:function(n,a,h,v){var I=this._inputLine[n],R=this._inputLine[a],T=this._inputLine[h];return!!this.isConcave(I,R,T)&&!!this.isShallow(I,R,T,v)&&this.isShallowSampled(I,R,n,h,v)}},{key:"deleteShallowConcavities",value:function(){for(var n=1,a=this.findNextNonDeletedIndex(n),h=this.findNextNonDeletedIndex(a),v=!1;h<this._inputLine.length;){var I=!1;this.isDeletable(n,a,h,this._distanceTol)&&(this._isDeleted[a]=f.DELETE,I=!0,v=!0),n=I?h:a,a=this.findNextNonDeletedIndex(n),h=this.findNextNonDeletedIndex(a)}return v}},{key:"isShallowConcavity",value:function(n,a,h,v){return ke.index(n,a,h)===this._angleOrientation&&Qe.pointToSegment(a,n,h)<v}},{key:"isShallowSampled",value:function(n,a,h,v,I){var R=Math.trunc((v-h)/f.NUM_PTS_TO_CHECK);R<=0&&(R=1);for(var T=h;T<v;T+=R)if(!this.isShallow(n,a,this._inputLine[T],I))return!1;return!0}},{key:"isConcave",value:function(n,a,h){var v=ke.index(n,a,h)===this._angleOrientation;return v}},{key:"simplify",value:function(n){this._distanceTol=Math.abs(n),n<0&&(this._angleOrientation=ke.CLOCKWISE),this._isDeleted=new Array(this._inputLine.length).fill(null);var a=!1;do a=this.deleteShallowConcavities();while(a);return this.collapseLine()}},{key:"findNextNonDeletedIndex",value:function(n){for(var a=n+1;a<this._inputLine.length&&this._isDeleted[a]===f.DELETE;)a++;return a}},{key:"isShallow",value:function(n,a,h,v){return Qe.pointToSegment(a,n,h)<v}},{key:"collapseLine",value:function(){for(var n=new Rt,a=0;a<this._inputLine.length;a++)this._isDeleted[a]!==f.DELETE&&n.add(this._inputLine[a]);return n.toCoordinateArray()}}],[{key:"constructor_",value:function(){this._inputLine=null,this._distanceTol=null,this._isDeleted=null,this._angleOrientation=ke.COUNTERCLOCKWISE;var n=arguments[0];this._inputLine=n}},{key:"simplify",value:function(n,a){return new f(n).simplify(a)}}])})();Dt.INIT=0,Dt.DELETE=1,Dt.KEEP=1,Dt.NUM_PTS_TO_CHECK=10;var Yr=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"getCoordinates",value:function(){return this._ptList.toArray(f.COORDINATE_ARRAY_TYPE)}},{key:"setPrecisionModel",value:function(n){this._precisionModel=n}},{key:"addPt",value:function(n){var a=new J(n);if(this._precisionModel.makePrecise(a),this.isRedundant(a))return null;this._ptList.add(a)}},{key:"reverse",value:function(){}},{key:"addPts",value:function(n,a){if(a)for(var h=0;h<n.length;h++)this.addPt(n[h]);else for(var v=n.length-1;v>=0;v--)this.addPt(n[v])}},{key:"isRedundant",value:function(n){if(this._ptList.size()<1)return!1;var a=this._ptList.get(this._ptList.size()-1);return n.distance(a)<this._minimimVertexDistance}},{key:"toString",value:function(){return new Qt().createLineString(this.getCoordinates()).toString()}},{key:"closeRing",value:function(){if(this._ptList.size()<1)return null;var n=new J(this._ptList.get(0)),a=this._ptList.get(this._ptList.size()-1);if(n.equals(a))return null;this._ptList.add(n)}},{key:"setMinimumVertexDistance",value:function(n){this._minimimVertexDistance=n}}],[{key:"constructor_",value:function(){this._ptList=null,this._precisionModel=null,this._minimimVertexDistance=0,this._ptList=new De}}])})();Yr.COORDINATE_ARRAY_TYPE=new Array(0).fill(null);var pt=(function(){function f(){o(this,f)}return g(f,null,[{key:"toDegrees",value:function(n){return 180*n/Math.PI}},{key:"normalize",value:function(n){for(;n>Math.PI;)n-=f.PI_TIMES_2;for(;n<=-Math.PI;)n+=f.PI_TIMES_2;return n}},{key:"angle",value:function(){if(arguments.length===1){var n=arguments[0];return Math.atan2(n.y,n.x)}if(arguments.length===2){var a=arguments[0],h=arguments[1],v=h.x-a.x,I=h.y-a.y;return Math.atan2(I,v)}}},{key:"isAcute",value:function(n,a,h){var v=n.x-a.x,I=n.y-a.y;return v*(h.x-a.x)+I*(h.y-a.y)>0}},{key:"isObtuse",value:function(n,a,h){var v=n.x-a.x,I=n.y-a.y;return v*(h.x-a.x)+I*(h.y-a.y)<0}},{key:"interiorAngle",value:function(n,a,h){var v=f.angle(a,n),I=f.angle(a,h);return Math.abs(I-v)}},{key:"normalizePositive",value:function(n){if(n<0){for(;n<0;)n+=f.PI_TIMES_2;n>=f.PI_TIMES_2&&(n=0)}else{for(;n>=f.PI_TIMES_2;)n-=f.PI_TIMES_2;n<0&&(n=0)}return n}},{key:"angleBetween",value:function(n,a,h){var v=f.angle(a,n),I=f.angle(a,h);return f.diff(v,I)}},{key:"diff",value:function(n,a){var h=null;return(h=n<a?a-n:n-a)>Math.PI&&(h=2*Math.PI-h),h}},{key:"toRadians",value:function(n){return n*Math.PI/180}},{key:"getTurn",value:function(n,a){var h=Math.sin(a-n);return h>0?f.COUNTERCLOCKWISE:h<0?f.CLOCKWISE:f.NONE}},{key:"angleBetweenOriented",value:function(n,a,h){var v=f.angle(a,n),I=f.angle(a,h)-v;return I<=-Math.PI?I+f.PI_TIMES_2:I>Math.PI?I-f.PI_TIMES_2:I}}])})();pt.PI_TIMES_2=2*Math.PI,pt.PI_OVER_2=Math.PI/2,pt.PI_OVER_4=Math.PI/4,pt.COUNTERCLOCKWISE=ke.COUNTERCLOCKWISE,pt.CLOCKWISE=ke.CLOCKWISE,pt.NONE=ke.COLLINEAR;var or=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"addNextSegment",value:function(n,a){if(this._s0=this._s1,this._s1=this._s2,this._s2=n,this._seg0.setCoordinates(this._s0,this._s1),this.computeOffsetSegment(this._seg0,this._side,this._distance,this._offset0),this._seg1.setCoordinates(this._s1,this._s2),this.computeOffsetSegment(this._seg1,this._side,this._distance,this._offset1),this._s1.equals(this._s2))return null;var h=ke.index(this._s0,this._s1,this._s2),v=h===ke.CLOCKWISE&&this._side===he.LEFT||h===ke.COUNTERCLOCKWISE&&this._side===he.RIGHT;h===0?this.addCollinear(a):v?this.addOutsideTurn(h,a):this.addInsideTurn(h,a)}},{key:"addLineEndCap",value:function(n,a){var h=new ft(n,a),v=new ft;this.computeOffsetSegment(h,he.LEFT,this._distance,v);var I=new ft;this.computeOffsetSegment(h,he.RIGHT,this._distance,I);var R=a.x-n.x,T=a.y-n.y,O=Math.atan2(T,R);switch(this._bufParams.getEndCapStyle()){case M.CAP_ROUND:this._segList.addPt(v.p1),this.addDirectedFillet(a,O+Math.PI/2,O-Math.PI/2,ke.CLOCKWISE,this._distance),this._segList.addPt(I.p1);break;case M.CAP_FLAT:this._segList.addPt(v.p1),this._segList.addPt(I.p1);break;case M.CAP_SQUARE:var W=new J;W.x=Math.abs(this._distance)*Math.cos(O),W.y=Math.abs(this._distance)*Math.sin(O);var re=new J(v.p1.x+W.x,v.p1.y+W.y),ne=new J(I.p1.x+W.x,I.p1.y+W.y);this._segList.addPt(re),this._segList.addPt(ne)}}},{key:"getCoordinates",value:function(){return this._segList.getCoordinates()}},{key:"addMitreJoin",value:function(n,a,h,v){var I=Ot.intersection(a.p0,a.p1,h.p0,h.p1);if(I!==null&&(v<=0?1:I.distance(n)/Math.abs(v))<=this._bufParams.getMitreLimit())return this._segList.addPt(I),null;this.addLimitedMitreJoin(a,h,v,this._bufParams.getMitreLimit())}},{key:"addOutsideTurn",value:function(n,a){if(this._offset0.p1.distance(this._offset1.p0)<this._distance*f.OFFSET_SEGMENT_SEPARATION_FACTOR)return this._segList.addPt(this._offset0.p1),null;this._bufParams.getJoinStyle()===M.JOIN_MITRE?this.addMitreJoin(this._s1,this._offset0,this._offset1,this._distance):this._bufParams.getJoinStyle()===M.JOIN_BEVEL?this.addBevelJoin(this._offset0,this._offset1):(a&&this._segList.addPt(this._offset0.p1),this.addCornerFillet(this._s1,this._offset0.p1,this._offset1.p0,n,this._distance),this._segList.addPt(this._offset1.p0))}},{key:"createSquare",value:function(n){this._segList.addPt(new J(n.x+this._distance,n.y+this._distance)),this._segList.addPt(new J(n.x+this._distance,n.y-this._distance)),this._segList.addPt(new J(n.x-this._distance,n.y-this._distance)),this._segList.addPt(new J(n.x-this._distance,n.y+this._distance)),this._segList.closeRing()}},{key:"addSegments",value:function(n,a){this._segList.addPts(n,a)}},{key:"addFirstSegment",value:function(){this._segList.addPt(this._offset1.p0)}},{key:"addCornerFillet",value:function(n,a,h,v,I){var R=a.x-n.x,T=a.y-n.y,O=Math.atan2(T,R),W=h.x-n.x,re=h.y-n.y,ne=Math.atan2(re,W);v===ke.CLOCKWISE?O<=ne&&(O+=2*Math.PI):O>=ne&&(O-=2*Math.PI),this._segList.addPt(a),this.addDirectedFillet(n,O,ne,v,I),this._segList.addPt(h)}},{key:"addLastSegment",value:function(){this._segList.addPt(this._offset1.p1)}},{key:"initSideSegments",value:function(n,a,h){this._s1=n,this._s2=a,this._side=h,this._seg1.setCoordinates(n,a),this.computeOffsetSegment(this._seg1,h,this._distance,this._offset1)}},{key:"addLimitedMitreJoin",value:function(n,a,h,v){var I=this._seg0.p1,R=pt.angle(I,this._seg0.p0),T=pt.angleBetweenOriented(this._seg0.p0,I,this._seg1.p1)/2,O=pt.normalize(R+T),W=pt.normalize(O+Math.PI),re=v*h,ne=h-re*Math.abs(Math.sin(T)),oe=I.x+re*Math.cos(W),_e=I.y+re*Math.sin(W),Se=new J(oe,_e),Ne=new ft(I,Se),Ge=Ne.pointAlongOffset(1,ne),Be=Ne.pointAlongOffset(1,-ne);this._side===he.LEFT?(this._segList.addPt(Ge),this._segList.addPt(Be)):(this._segList.addPt(Be),this._segList.addPt(Ge))}},{key:"addDirectedFillet",value:function(n,a,h,v,I){var R=v===ke.CLOCKWISE?-1:1,T=Math.abs(a-h),O=Math.trunc(T/this._filletAngleQuantum+.5);if(O<1)return null;for(var W=T/O,re=new J,ne=0;ne<O;ne++){var oe=a+R*ne*W;re.x=n.x+I*Math.cos(oe),re.y=n.y+I*Math.sin(oe),this._segList.addPt(re)}}},{key:"computeOffsetSegment",value:function(n,a,h,v){var I=a===he.LEFT?1:-1,R=n.p1.x-n.p0.x,T=n.p1.y-n.p0.y,O=Math.sqrt(R*R+T*T),W=I*h*R/O,re=I*h*T/O;v.p0.x=n.p0.x-re,v.p0.y=n.p0.y+W,v.p1.x=n.p1.x-re,v.p1.y=n.p1.y+W}},{key:"addInsideTurn",value:function(n,a){if(this._li.computeIntersection(this._offset0.p0,this._offset0.p1,this._offset1.p0,this._offset1.p1),this._li.hasIntersection())this._segList.addPt(this._li.getIntersection(0));else if(this._hasNarrowConcaveAngle=!0,this._offset0.p1.distance(this._offset1.p0)<this._distance*f.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR)this._segList.addPt(this._offset0.p1);else{if(this._segList.addPt(this._offset0.p1),this._closingSegLengthFactor>0){var h=new J((this._closingSegLengthFactor*this._offset0.p1.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset0.p1.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(h);var v=new J((this._closingSegLengthFactor*this._offset1.p0.x+this._s1.x)/(this._closingSegLengthFactor+1),(this._closingSegLengthFactor*this._offset1.p0.y+this._s1.y)/(this._closingSegLengthFactor+1));this._segList.addPt(v)}else this._segList.addPt(this._s1);this._segList.addPt(this._offset1.p0)}}},{key:"createCircle",value:function(n){var a=new J(n.x+this._distance,n.y);this._segList.addPt(a),this.addDirectedFillet(n,0,2*Math.PI,-1,this._distance),this._segList.closeRing()}},{key:"addBevelJoin",value:function(n,a){this._segList.addPt(n.p1),this._segList.addPt(a.p0)}},{key:"init",value:function(n){this._distance=n,this._maxCurveSegmentError=n*(1-Math.cos(this._filletAngleQuantum/2)),this._segList=new Yr,this._segList.setPrecisionModel(this._precisionModel),this._segList.setMinimumVertexDistance(n*f.CURVE_VERTEX_SNAP_DISTANCE_FACTOR)}},{key:"addCollinear",value:function(n){this._li.computeIntersection(this._s0,this._s1,this._s1,this._s2),this._li.getIntersectionNum()>=2&&(this._bufParams.getJoinStyle()===M.JOIN_BEVEL||this._bufParams.getJoinStyle()===M.JOIN_MITRE?(n&&this._segList.addPt(this._offset0.p1),this._segList.addPt(this._offset1.p0)):this.addCornerFillet(this._s1,this._offset0.p1,this._offset1.p0,ke.CLOCKWISE,this._distance))}},{key:"closeRing",value:function(){this._segList.closeRing()}},{key:"hasNarrowConcaveAngle",value:function(){return this._hasNarrowConcaveAngle}}],[{key:"constructor_",value:function(){this._maxCurveSegmentError=0,this._filletAngleQuantum=null,this._closingSegLengthFactor=1,this._segList=null,this._distance=0,this._precisionModel=null,this._bufParams=null,this._li=null,this._s0=null,this._s1=null,this._s2=null,this._seg0=new ft,this._seg1=new ft,this._offset0=new ft,this._offset1=new ft,this._side=0,this._hasNarrowConcaveAngle=!1;var n=arguments[0],a=arguments[1],h=arguments[2];this._precisionModel=n,this._bufParams=a,this._li=new Wt,this._filletAngleQuantum=Math.PI/2/a.getQuadrantSegments(),a.getQuadrantSegments()>=8&&a.getJoinStyle()===M.JOIN_ROUND&&(this._closingSegLengthFactor=f.MAX_CLOSING_SEG_LEN_FACTOR),this.init(h)}}])})();or.OFFSET_SEGMENT_SEPARATION_FACTOR=.001,or.INSIDE_TURN_VERTEX_SNAP_DISTANCE_FACTOR=.001,or.CURVE_VERTEX_SNAP_DISTANCE_FACTOR=1e-6,or.MAX_CLOSING_SEG_LEN_FACTOR=80;var Un=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"getOffsetCurve",value:function(n,a){if(this._distance=a,a===0)return null;var h=a<0,v=Math.abs(a),I=this.getSegGen(v);n.length<=1?this.computePointCurve(n[0],I):this.computeOffsetCurve(n,h,I);var R=I.getCoordinates();return h&&We.reverse(R),R}},{key:"computeSingleSidedBufferCurve",value:function(n,a,h){var v=this.simplifyTolerance(this._distance);if(a){h.addSegments(n,!0);var I=Dt.simplify(n,-v),R=I.length-1;h.initSideSegments(I[R],I[R-1],he.LEFT),h.addFirstSegment();for(var T=R-2;T>=0;T--)h.addNextSegment(I[T],!0)}else{h.addSegments(n,!1);var O=Dt.simplify(n,v),W=O.length-1;h.initSideSegments(O[0],O[1],he.LEFT),h.addFirstSegment();for(var re=2;re<=W;re++)h.addNextSegment(O[re],!0)}h.addLastSegment(),h.closeRing()}},{key:"computeRingBufferCurve",value:function(n,a,h){var v=this.simplifyTolerance(this._distance);a===he.RIGHT&&(v=-v);var I=Dt.simplify(n,v),R=I.length-1;h.initSideSegments(I[R-1],I[0],a);for(var T=1;T<=R;T++){var O=T!==1;h.addNextSegment(I[T],O)}h.closeRing()}},{key:"computeLineBufferCurve",value:function(n,a){var h=this.simplifyTolerance(this._distance),v=Dt.simplify(n,h),I=v.length-1;a.initSideSegments(v[0],v[1],he.LEFT);for(var R=2;R<=I;R++)a.addNextSegment(v[R],!0);a.addLastSegment(),a.addLineEndCap(v[I-1],v[I]);var T=Dt.simplify(n,-h),O=T.length-1;a.initSideSegments(T[O],T[O-1],he.LEFT);for(var W=O-2;W>=0;W--)a.addNextSegment(T[W],!0);a.addLastSegment(),a.addLineEndCap(T[1],T[0]),a.closeRing()}},{key:"computePointCurve",value:function(n,a){switch(this._bufParams.getEndCapStyle()){case M.CAP_ROUND:a.createCircle(n);break;case M.CAP_SQUARE:a.createSquare(n)}}},{key:"getLineCurve",value:function(n,a){if(this._distance=a,this.isLineOffsetEmpty(a))return null;var h=Math.abs(a),v=this.getSegGen(h);if(n.length<=1)this.computePointCurve(n[0],v);else if(this._bufParams.isSingleSided()){var I=a<0;this.computeSingleSidedBufferCurve(n,I,v)}else this.computeLineBufferCurve(n,v);return v.getCoordinates()}},{key:"getBufferParameters",value:function(){return this._bufParams}},{key:"simplifyTolerance",value:function(n){return n*this._bufParams.getSimplifyFactor()}},{key:"getRingCurve",value:function(n,a,h){if(this._distance=h,n.length<=2)return this.getLineCurve(n,h);if(h===0)return f.copyCoordinates(n);var v=this.getSegGen(h);return this.computeRingBufferCurve(n,a,v),v.getCoordinates()}},{key:"computeOffsetCurve",value:function(n,a,h){var v=this.simplifyTolerance(this._distance);if(a){var I=Dt.simplify(n,-v),R=I.length-1;h.initSideSegments(I[R],I[R-1],he.LEFT),h.addFirstSegment();for(var T=R-2;T>=0;T--)h.addNextSegment(I[T],!0)}else{var O=Dt.simplify(n,v),W=O.length-1;h.initSideSegments(O[0],O[1],he.LEFT),h.addFirstSegment();for(var re=2;re<=W;re++)h.addNextSegment(O[re],!0)}h.addLastSegment()}},{key:"isLineOffsetEmpty",value:function(n){return n===0||n<0&&!this._bufParams.isSingleSided()}},{key:"getSegGen",value:function(n){return new or(this._precisionModel,this._bufParams,n)}}],[{key:"constructor_",value:function(){this._distance=0,this._precisionModel=null,this._bufParams=null;var n=arguments[0],a=arguments[1];this._precisionModel=n,this._bufParams=a}},{key:"copyCoordinates",value:function(n){for(var a=new Array(n.length).fill(null),h=0;h<a.length;h++)a[h]=new J(n[h]);return a}}])})(),Jr=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"findStabbedSegments",value:function(){if(arguments.length===1){for(var f=arguments[0],n=new De,a=this._subgraphs.iterator();a.hasNext();){var h=a.next(),v=h.getEnvelope();f.y<v.getMinY()||f.y>v.getMaxY()||this.findStabbedSegments(f,h.getDirectedEdges(),n)}return n}if(arguments.length===3){if(Le(arguments[2],Ve)&&arguments[0]instanceof J&&arguments[1]instanceof Ir){for(var I=arguments[0],R=arguments[1],T=arguments[2],O=R.getEdge().getCoordinates(),W=0;W<O.length-1;W++)if(this._seg.p0=O[W],this._seg.p1=O[W+1],this._seg.p0.y>this._seg.p1.y&&this._seg.reverse(),!(Math.max(this._seg.p0.x,this._seg.p1.x)<I.x||this._seg.isHorizontal()||I.y<this._seg.p0.y||I.y>this._seg.p1.y||ke.index(this._seg.p0,this._seg.p1,I)===ke.RIGHT)){var re=R.getDepth(he.LEFT);this._seg.p0.equals(O[W])||(re=R.getDepth(he.RIGHT));var ne=new Kr(this._seg,re);T.add(ne)}}else if(Le(arguments[2],Ve)&&arguments[0]instanceof J&&Le(arguments[1],Ve))for(var oe=arguments[0],_e=arguments[2],Se=arguments[1].iterator();Se.hasNext();){var Ne=Se.next();Ne.isForward()&&this.findStabbedSegments(oe,Ne,_e)}}}},{key:"getDepth",value:function(f){var n=this.findStabbedSegments(f);return n.size()===0?0:tr.min(n)._leftDepth}}],[{key:"constructor_",value:function(){this._subgraphs=null,this._seg=new ft;var f=arguments[0];this._subgraphs=f}}])})(),Kr=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"compareTo",value:function(f){var n=f;if(this._upwardSeg.minX()>=n._upwardSeg.maxX())return 1;if(this._upwardSeg.maxX()<=n._upwardSeg.minX())return-1;var a=this._upwardSeg.orientationIndex(n._upwardSeg);return a!==0||(a=-1*n._upwardSeg.orientationIndex(this._upwardSeg))!==0?a:this._upwardSeg.compareTo(n._upwardSeg)}},{key:"compareX",value:function(f,n){var a=f.p0.compareTo(n.p0);return a!==0?a:f.p1.compareTo(n.p1)}},{key:"toString",value:function(){return this._upwardSeg.toString()}},{key:"interfaces_",get:function(){return[X]}}],[{key:"constructor_",value:function(){this._upwardSeg=null,this._leftDepth=null;var f=arguments[0],n=arguments[1];this._upwardSeg=new ft(f),this._leftDepth=n}}])})();Jr.DepthSegment=Kr;var Qr=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,null,[{key:"constructor_",value:function(){z.constructor_.call(this,"Projective point not representable on the Cartesian plane.")}}])})(z),Rr=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"getY",value:function(){var n=this.y/this.w;if(ce.isNaN(n)||ce.isInfinite(n))throw new Qr;return n}},{key:"getX",value:function(){var n=this.x/this.w;if(ce.isNaN(n)||ce.isInfinite(n))throw new Qr;return n}},{key:"getCoordinate",value:function(){var n=new J;return n.x=this.getX(),n.y=this.getY(),n}}],[{key:"constructor_",value:function(){if(this.x=null,this.y=null,this.w=null,arguments.length===0)this.x=0,this.y=0,this.w=1;else if(arguments.length===1){var n=arguments[0];this.x=n.x,this.y=n.y,this.w=1}else if(arguments.length===2){if(typeof arguments[0]=="number"&&typeof arguments[1]=="number"){var a=arguments[0],h=arguments[1];this.x=a,this.y=h,this.w=1}else if(arguments[0]instanceof f&&arguments[1]instanceof f){var v=arguments[0],I=arguments[1];this.x=v.y*I.w-I.y*v.w,this.y=I.x*v.w-v.x*I.w,this.w=v.x*I.y-I.x*v.y}else if(arguments[0]instanceof J&&arguments[1]instanceof J){var R=arguments[0],T=arguments[1];this.x=R.y-T.y,this.y=T.x-R.x,this.w=R.x*T.y-T.x*R.y}}else if(arguments.length===3){var O=arguments[0],W=arguments[1],re=arguments[2];this.x=O,this.y=W,this.w=re}else if(arguments.length===4){var ne=arguments[0],oe=arguments[1],_e=arguments[2],Se=arguments[3],Ne=ne.y-oe.y,Ge=oe.x-ne.x,Be=ne.x*oe.y-oe.x*ne.y,$e=_e.y-Se.y,et=Se.x-_e.x,nt=_e.x*Se.y-Se.x*_e.y;this.x=Ge*nt-et*Be,this.y=$e*Be-Ne*nt,this.w=Ne*et-$e*Ge}}}])})(),zn=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"area",value:function(){return f.area(this.p0,this.p1,this.p2)}},{key:"signedArea",value:function(){return f.signedArea(this.p0,this.p1,this.p2)}},{key:"interpolateZ",value:function(n){if(n===null)throw new V("Supplied point is null.");return f.interpolateZ(n,this.p0,this.p1,this.p2)}},{key:"longestSideLength",value:function(){return f.longestSideLength(this.p0,this.p1,this.p2)}},{key:"isAcute",value:function(){return f.isAcute(this.p0,this.p1,this.p2)}},{key:"circumcentre",value:function(){return f.circumcentre(this.p0,this.p1,this.p2)}},{key:"area3D",value:function(){return f.area3D(this.p0,this.p1,this.p2)}},{key:"centroid",value:function(){return f.centroid(this.p0,this.p1,this.p2)}},{key:"inCentre",value:function(){return f.inCentre(this.p0,this.p1,this.p2)}}],[{key:"constructor_",value:function(){this.p0=null,this.p1=null,this.p2=null;var n=arguments[0],a=arguments[1],h=arguments[2];this.p0=n,this.p1=a,this.p2=h}},{key:"area",value:function(n,a,h){return Math.abs(((h.x-n.x)*(a.y-n.y)-(a.x-n.x)*(h.y-n.y))/2)}},{key:"signedArea",value:function(n,a,h){return((h.x-n.x)*(a.y-n.y)-(a.x-n.x)*(h.y-n.y))/2}},{key:"det",value:function(n,a,h,v){return n*v-a*h}},{key:"interpolateZ",value:function(n,a,h,v){var I=a.x,R=a.y,T=h.x-I,O=v.x-I,W=h.y-R,re=v.y-R,ne=T*re-O*W,oe=n.x-I,_e=n.y-R,Se=(re*oe-O*_e)/ne,Ne=(-W*oe+T*_e)/ne;return a.getZ()+Se*(h.getZ()-a.getZ())+Ne*(v.getZ()-a.getZ())}},{key:"longestSideLength",value:function(n,a,h){var v=n.distance(a),I=a.distance(h),R=h.distance(n),T=v;return I>T&&(T=I),R>T&&(T=R),T}},{key:"circumcentreDD",value:function(n,a,h){var v=we.valueOf(n.x).subtract(h.x),I=we.valueOf(n.y).subtract(h.y),R=we.valueOf(a.x).subtract(h.x),T=we.valueOf(a.y).subtract(h.y),O=we.determinant(v,I,R,T).multiply(2),W=v.sqr().add(I.sqr()),re=R.sqr().add(T.sqr()),ne=we.determinant(I,W,T,re),oe=we.determinant(v,W,R,re),_e=we.valueOf(h.x).subtract(ne.divide(O)).doubleValue(),Se=we.valueOf(h.y).add(oe.divide(O)).doubleValue();return new J(_e,Se)}},{key:"isAcute",value:function(n,a,h){return!!pt.isAcute(n,a,h)&&!!pt.isAcute(a,h,n)&&!!pt.isAcute(h,n,a)}},{key:"circumcentre",value:function(n,a,h){var v=h.x,I=h.y,R=n.x-v,T=n.y-I,O=a.x-v,W=a.y-I,re=2*f.det(R,T,O,W),ne=f.det(T,R*R+T*T,W,O*O+W*W),oe=f.det(R,R*R+T*T,O,O*O+W*W);return new J(v-ne/re,I+oe/re)}},{key:"perpendicularBisector",value:function(n,a){var h=a.x-n.x,v=a.y-n.y,I=new Rr(n.x+h/2,n.y+v/2,1),R=new Rr(n.x-v+h/2,n.y+h+v/2,1);return new Rr(I,R)}},{key:"angleBisector",value:function(n,a,h){var v=a.distance(n),I=v/(v+a.distance(h)),R=h.x-n.x,T=h.y-n.y;return new J(n.x+I*R,n.y+I*T)}},{key:"area3D",value:function(n,a,h){var v=a.x-n.x,I=a.y-n.y,R=a.getZ()-n.getZ(),T=h.x-n.x,O=h.y-n.y,W=h.getZ()-n.getZ(),re=I*W-R*O,ne=R*T-v*W,oe=v*O-I*T,_e=re*re+ne*ne+oe*oe,Se=Math.sqrt(_e)/2;return Se}},{key:"centroid",value:function(n,a,h){var v=(n.x+a.x+h.x)/3,I=(n.y+a.y+h.y)/3;return new J(v,I)}},{key:"inCentre",value:function(n,a,h){var v=a.distance(h),I=n.distance(h),R=n.distance(a),T=v+I+R,O=(v*n.x+I*a.x+R*h.x)/T,W=(v*n.y+I*a.y+R*h.y)/T;return new J(O,W)}}])})(),Hn=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"addRingSide",value:function(f,n,a,h,v){if(n===0&&f.length<ht.MINIMUM_VALID_SIZE)return null;var I=h,R=v;f.length>=ht.MINIMUM_VALID_SIZE&&ke.isCCW(f)&&(I=v,R=h,a=he.opposite(a));var T=this._curveBuilder.getRingCurve(f,a,n);this.addCurve(T,I,R)}},{key:"addRingBothSides",value:function(f,n){this.addRingSide(f,n,he.LEFT,q.EXTERIOR,q.INTERIOR),this.addRingSide(f,n,he.RIGHT,q.INTERIOR,q.EXTERIOR)}},{key:"addPoint",value:function(f){if(this._distance<=0)return null;var n=f.getCoordinates(),a=this._curveBuilder.getLineCurve(n,this._distance);this.addCurve(a,q.EXTERIOR,q.INTERIOR)}},{key:"addPolygon",value:function(f){var n=this._distance,a=he.LEFT;this._distance<0&&(n=-this._distance,a=he.RIGHT);var h=f.getExteriorRing(),v=We.removeRepeatedPoints(h.getCoordinates());if(this._distance<0&&this.isErodedCompletely(h,this._distance)||this._distance<=0&&v.length<3)return null;this.addRingSide(v,n,a,q.EXTERIOR,q.INTERIOR);for(var I=0;I<f.getNumInteriorRing();I++){var R=f.getInteriorRingN(I),T=We.removeRepeatedPoints(R.getCoordinates());this._distance>0&&this.isErodedCompletely(R,-this._distance)||this.addRingSide(T,n,he.opposite(a),q.INTERIOR,q.EXTERIOR)}}},{key:"isTriangleErodedCompletely",value:function(f,n){var a=new zn(f[0],f[1],f[2]),h=a.inCentre();return Qe.pointToSegment(h,a.p0,a.p1)<Math.abs(n)}},{key:"addLineString",value:function(f){if(this._curveBuilder.isLineOffsetEmpty(this._distance))return null;var n=We.removeRepeatedPoints(f.getCoordinates());if(We.isRing(n)&&!this._curveBuilder.getBufferParameters().isSingleSided())this.addRingBothSides(n,this._distance);else{var a=this._curveBuilder.getLineCurve(n,this._distance);this.addCurve(a,q.EXTERIOR,q.INTERIOR)}}},{key:"addCurve",value:function(f,n,a){if(f===null||f.length<2)return null;var h=new Xt(f,new xt(0,q.BOUNDARY,n,a));this._curveList.add(h)}},{key:"getCurves",value:function(){return this.add(this._inputGeom),this._curveList}},{key:"add",value:function(f){if(f.isEmpty())return null;if(f instanceof Pt)this.addPolygon(f);else if(f instanceof Ie)this.addLineString(f);else if(f instanceof He)this.addPoint(f);else if(f instanceof St)this.addCollection(f);else if(f instanceof vr)this.addCollection(f);else if(f instanceof yr)this.addCollection(f);else{if(!(f instanceof Ke))throw new je(f.getGeometryType());this.addCollection(f)}}},{key:"isErodedCompletely",value:function(f,n){var a=f.getCoordinates();if(a.length<4)return n<0;if(a.length===4)return this.isTriangleErodedCompletely(a,n);var h=f.getEnvelopeInternal(),v=Math.min(h.getHeight(),h.getWidth());return n<0&&2*Math.abs(n)>v}},{key:"addCollection",value:function(f){for(var n=0;n<f.getNumGeometries();n++){var a=f.getGeometryN(n);this.add(a)}}}],[{key:"constructor_",value:function(){this._inputGeom=null,this._distance=null,this._curveBuilder=null,this._curveList=new De;var f=arguments[0],n=arguments[1],a=arguments[2];this._inputGeom=f,this._distance=n,this._curveBuilder=a}}])})(),$n=(function(){return g((function f(){o(this,f)}),[{key:"locate",value:function(f){}}])})(),Wn=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"next",value:function(){if(this._atStart)return this._atStart=!1,f.isAtomic(this._parent)&&this._index++,this._parent;if(this._subcollectionIterator!==null){if(this._subcollectionIterator.hasNext())return this._subcollectionIterator.next();this._subcollectionIterator=null}if(this._index>=this._max)throw new Oe;var n=this._parent.getGeometryN(this._index++);return n instanceof Ke?(this._subcollectionIterator=new f(n),this._subcollectionIterator.next()):n}},{key:"remove",value:function(){throw new je(this.getClass().getName())}},{key:"hasNext",value:function(){if(this._atStart)return!0;if(this._subcollectionIterator!==null){if(this._subcollectionIterator.hasNext())return!0;this._subcollectionIterator=null}return!(this._index>=this._max)}},{key:"interfaces_",get:function(){return[Fn]}}],[{key:"constructor_",value:function(){this._parent=null,this._atStart=null,this._max=null,this._index=null,this._subcollectionIterator=null;var n=arguments[0];this._parent=n,this._atStart=!0,this._index=0,this._max=n.getNumGeometries()}},{key:"isAtomic",value:function(n){return!(n instanceof Ke)}}])})(),Xn=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"locate",value:function(n){return f.locate(n,this._geom)}},{key:"interfaces_",get:function(){return[$n]}}],[{key:"constructor_",value:function(){this._geom=null;var n=arguments[0];this._geom=n}},{key:"locatePointInPolygon",value:function(n,a){if(a.isEmpty())return q.EXTERIOR;var h=a.getExteriorRing(),v=f.locatePointInRing(n,h);if(v!==q.INTERIOR)return v;for(var I=0;I<a.getNumInteriorRing();I++){var R=a.getInteriorRingN(I),T=f.locatePointInRing(n,R);if(T===q.BOUNDARY)return q.BOUNDARY;if(T===q.INTERIOR)return q.EXTERIOR}return q.INTERIOR}},{key:"locatePointInRing",value:function(n,a){return a.getEnvelopeInternal().intersects(n)?xr.locateInRing(n,a.getCoordinates()):q.EXTERIOR}},{key:"containsPointInPolygon",value:function(n,a){return q.EXTERIOR!==f.locatePointInPolygon(n,a)}},{key:"locateInGeometry",value:function(n,a){if(a instanceof Pt)return f.locatePointInPolygon(n,a);if(a instanceof Ke)for(var h=new Wn(a);h.hasNext();){var v=h.next();if(v!==a){var I=f.locateInGeometry(n,v);if(I!==q.EXTERIOR)return I}}return q.EXTERIOR}},{key:"isContained",value:function(n,a){return q.EXTERIOR!==f.locate(n,a)}},{key:"locate",value:function(n,a){return a.isEmpty()?q.EXTERIOR:a.getEnvelopeInternal().intersects(n)?f.locateInGeometry(n,a):q.EXTERIOR}}])})(),Zn=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"getNextCW",value:function(f){this.getEdges();var n=this._edgeList.indexOf(f),a=n-1;return n===0&&(a=this._edgeList.size()-1),this._edgeList.get(a)}},{key:"propagateSideLabels",value:function(f){for(var n=q.NONE,a=this.iterator();a.hasNext();){var h=a.next().getLabel();h.isArea(f)&&h.getLocation(f,he.LEFT)!==q.NONE&&(n=h.getLocation(f,he.LEFT))}if(n===q.NONE)return null;for(var v=n,I=this.iterator();I.hasNext();){var R=I.next(),T=R.getLabel();if(T.getLocation(f,he.ON)===q.NONE&&T.setLocation(f,he.ON,v),T.isArea(f)){var O=T.getLocation(f,he.LEFT),W=T.getLocation(f,he.RIGHT);if(W!==q.NONE){if(W!==v)throw new at("side location conflict",R.getCoordinate());O===q.NONE&&pe.shouldNeverReachHere("found single null side (at "+R.getCoordinate()+")"),v=O}else pe.isTrue(T.getLocation(f,he.LEFT)===q.NONE,"found single null side"),T.setLocation(f,he.RIGHT,v),T.setLocation(f,he.LEFT,v)}}}},{key:"getCoordinate",value:function(){var f=this.iterator();return f.hasNext()?f.next().getCoordinate():null}},{key:"print",value:function(f){Je.out.println("EdgeEndStar: "+this.getCoordinate());for(var n=this.iterator();n.hasNext();)n.next().print(f)}},{key:"isAreaLabelsConsistent",value:function(f){return this.computeEdgeEndLabels(f.getBoundaryNodeRule()),this.checkAreaLabelsConsistent(0)}},{key:"checkAreaLabelsConsistent",value:function(f){var n=this.getEdges();if(n.size()<=0)return!0;var a=n.size()-1,h=n.get(a).getLabel().getLocation(f,he.LEFT);pe.isTrue(h!==q.NONE,"Found unlabelled area edge");for(var v=h,I=this.iterator();I.hasNext();){var R=I.next().getLabel();pe.isTrue(R.isArea(f),"Found non-area edge");var T=R.getLocation(f,he.LEFT),O=R.getLocation(f,he.RIGHT);if(T===O||O!==v)return!1;v=T}return!0}},{key:"findIndex",value:function(f){this.iterator();for(var n=0;n<this._edgeList.size();n++)if(this._edgeList.get(n)===f)return n;return-1}},{key:"iterator",value:function(){return this.getEdges().iterator()}},{key:"getEdges",value:function(){return this._edgeList===null&&(this._edgeList=new De(this._edgeMap.values())),this._edgeList}},{key:"getLocation",value:function(f,n,a){return this._ptInAreaLocation[f]===q.NONE&&(this._ptInAreaLocation[f]=Xn.locate(n,a[f].getGeometry())),this._ptInAreaLocation[f]}},{key:"toString",value:function(){var f=new tt;f.append("EdgeEndStar: "+this.getCoordinate()),f.append(`
7
7
  `);for(var n=this.iterator();n.hasNext();){var a=n.next();f.append(a),f.append(`
8
- `)}return f.toString()}},{key:"computeEdgeEndLabels",value:function(f){for(var n=this.iterator();n.hasNext();)n.next().computeLabel(f)}},{key:"computeLabelling",value:function(f){this.computeEdgeEndLabels(f[0].getBoundaryNodeRule()),this.propagateSideLabels(0),this.propagateSideLabels(1);for(var n=[!1,!1],a=this.iterator();a.hasNext();)for(var h=a.next().getLabel(),v=0;v<2;v++)h.isLine(v)&&h.getLocation(v)===q.BOUNDARY&&(n[v]=!0);for(var I=this.iterator();I.hasNext();)for(var R=I.next(),T=R.getLabel(),O=0;O<2;O++)if(T.isAnyNull(O)){var W=q.NONE;if(n[O])W=q.EXTERIOR;else{var re=R.getCoordinate();W=this.getLocation(O,re,f)}T.setAllLocationsIfNull(O,W)}}},{key:"getDegree",value:function(){return this._edgeMap.size()}},{key:"insertEdgeEnd",value:function(f,n){this._edgeMap.put(f,n),this._edgeList=null}}],[{key:"constructor_",value:function(){this._edgeMap=new ur,this._edgeList=null,this._ptInAreaLocation=[q.NONE,q.NONE]}}])})(),Yn=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"linkResultDirectedEdges",value:function(){this.getResultAreaEdges();for(var a=null,h=null,v=this._SCANNING_FOR_INCOMING,I=0;I<this._resultAreaEdgeList.size();I++){var R=this._resultAreaEdgeList.get(I),T=R.getSym();if(R.getLabel().isArea())switch(a===null&&R.isInResult()&&(a=R),v){case this._SCANNING_FOR_INCOMING:if(!T.isInResult())continue;h=T,v=this._LINKING_TO_OUTGOING;break;case this._LINKING_TO_OUTGOING:if(!R.isInResult())continue;h.setNext(R),v=this._SCANNING_FOR_INCOMING}}if(v===this._LINKING_TO_OUTGOING){if(a===null)throw new at("no outgoing dirEdge found",this.getCoordinate());pe.isTrue(a.isInResult(),"unable to link last incoming dirEdge"),h.setNext(a)}}},{key:"insert",value:function(a){var h=a;this.insertEdgeEnd(h,h)}},{key:"getRightmostEdge",value:function(){var a=this.getEdges(),h=a.size();if(h<1)return null;var v=a.get(0);if(h===1)return v;var I=a.get(h-1),R=v.getQuadrant(),T=I.getQuadrant();return lt.isNorthern(R)&&lt.isNorthern(T)?v:lt.isNorthern(R)||lt.isNorthern(T)?v.getDy()!==0?v:I.getDy()!==0?I:(pe.shouldNeverReachHere("found two horizontal edges incident on node"),null):I}},{key:"print",value:function(a){Je.out.println("DirectedEdgeStar: "+this.getCoordinate());for(var h=this.iterator();h.hasNext();){var v=h.next();a.print("out "),v.print(a),a.println(),a.print("in "),v.getSym().print(a),a.println()}}},{key:"getResultAreaEdges",value:function(){if(this._resultAreaEdgeList!==null)return this._resultAreaEdgeList;this._resultAreaEdgeList=new De;for(var a=this.iterator();a.hasNext();){var h=a.next();(h.isInResult()||h.getSym().isInResult())&&this._resultAreaEdgeList.add(h)}return this._resultAreaEdgeList}},{key:"updateLabelling",value:function(a){for(var h=this.iterator();h.hasNext();){var v=h.next().getLabel();v.setAllLocationsIfNull(0,a.getLocation(0)),v.setAllLocationsIfNull(1,a.getLocation(1))}}},{key:"linkAllDirectedEdges",value:function(){this.getEdges();for(var a=null,h=null,v=this._edgeList.size()-1;v>=0;v--){var I=this._edgeList.get(v),R=I.getSym();h===null&&(h=R),a!==null&&R.setNext(a),a=I}h.setNext(a)}},{key:"computeDepths",value:function(){if(arguments.length===1){var a=arguments[0],h=this.findIndex(a),v=a.getDepth(he.LEFT),I=a.getDepth(he.RIGHT),R=this.computeDepths(h+1,this._edgeList.size(),v);if(this.computeDepths(0,h,R)!==I)throw new at("depth mismatch at "+a.getCoordinate())}else if(arguments.length===3){for(var T=arguments[1],O=arguments[2],W=arguments[0];W<T;W++){var re=this._edgeList.get(W);re.setEdgeDepths(he.RIGHT,O),O=re.getDepth(he.LEFT)}return O}}},{key:"mergeSymLabels",value:function(){for(var a=this.iterator();a.hasNext();){var h=a.next();h.getLabel().merge(h.getSym().getLabel())}}},{key:"linkMinimalDirectedEdges",value:function(a){for(var h=null,v=null,I=this._SCANNING_FOR_INCOMING,R=this._resultAreaEdgeList.size()-1;R>=0;R--){var T=this._resultAreaEdgeList.get(R),O=T.getSym();switch(h===null&&T.getEdgeRing()===a&&(h=T),I){case this._SCANNING_FOR_INCOMING:if(O.getEdgeRing()!==a)continue;v=O,I=this._LINKING_TO_OUTGOING;break;case this._LINKING_TO_OUTGOING:if(T.getEdgeRing()!==a)continue;v.setNextMin(T),I=this._SCANNING_FOR_INCOMING}}I===this._LINKING_TO_OUTGOING&&(pe.isTrue(h!==null,"found null for first outgoing dirEdge"),pe.isTrue(h.getEdgeRing()===a,"unable to link last incoming dirEdge"),v.setNextMin(h))}},{key:"getOutgoingDegree",value:function(){if(arguments.length===0){for(var a=0,h=this.iterator();h.hasNext();)h.next().isInResult()&&a++;return a}if(arguments.length===1){for(var v=arguments[0],I=0,R=this.iterator();R.hasNext();)R.next().getEdgeRing()===v&&I++;return I}}},{key:"getLabel",value:function(){return this._label}},{key:"findCoveredLineEdges",value:function(){for(var a=q.NONE,h=this.iterator();h.hasNext();){var v=h.next(),I=v.getSym();if(!v.isLineEdge()){if(v.isInResult()){a=q.INTERIOR;break}if(I.isInResult()){a=q.EXTERIOR;break}}}if(a===q.NONE)return null;for(var R=a,T=this.iterator();T.hasNext();){var O=T.next(),W=O.getSym();O.isLineEdge()?O.getEdge().setCovered(R===q.INTERIOR):(O.isInResult()&&(R=q.EXTERIOR),W.isInResult()&&(R=q.INTERIOR))}}},{key:"computeLabelling",value:function(a){A(n,"computeLabelling",this,1).call(this,a),this._label=new xt(q.NONE);for(var h=this.iterator();h.hasNext();)for(var v=h.next().getEdge().getLabel(),I=0;I<2;I++){var R=v.getLocation(I);R!==q.INTERIOR&&R!==q.BOUNDARY||this._label.setLocation(I,q.INTERIOR)}}}],[{key:"constructor_",value:function(){this._resultAreaEdgeList=null,this._label=null,this._SCANNING_FOR_INCOMING=1,this._LINKING_TO_OUTGOING=2}}])})(Xn),Jn=(function(f){function n(){return o(this,n),s(this,n)}return E(n,f),g(n,[{key:"createNode",value:function(a){return new mr(a,new Yn)}}])})(Vr),en=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"compareTo",value:function(n){var a=n;return f.compareOriented(this._pts,this._orientation,a._pts,a._orientation)}},{key:"interfaces_",get:function(){return[X]}}],[{key:"constructor_",value:function(){this._pts=null,this._orientation=null;var n=arguments[0];this._pts=n,this._orientation=f.orientation(n)}},{key:"orientation",value:function(n){return We.increasingDirection(n)===1}},{key:"compareOriented",value:function(n,a,h,v){for(var I=a?1:-1,R=v?1:-1,T=a?n.length:-1,O=v?h.length:-1,W=a?0:n.length-1,re=v?0:h.length-1;;){var ne=n[W].compareTo(h[re]);if(ne!==0)return ne;var oe=(W+=I)===T,_e=(re+=R)===O;if(oe&&!_e)return-1;if(!oe&&_e)return 1;if(oe&&_e)return 0}}}])})(),Kn=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"print",value:function(f){f.print("MULTILINESTRING ( ");for(var n=0;n<this._edges.size();n++){var a=this._edges.get(n);n>0&&f.print(","),f.print("(");for(var h=a.getCoordinates(),v=0;v<h.length;v++)v>0&&f.print(","),f.print(h[v].x+" "+h[v].y);f.println(")")}f.print(") ")}},{key:"addAll",value:function(f){for(var n=f.iterator();n.hasNext();)this.add(n.next())}},{key:"findEdgeIndex",value:function(f){for(var n=0;n<this._edges.size();n++)if(this._edges.get(n).equals(f))return n;return-1}},{key:"iterator",value:function(){return this._edges.iterator()}},{key:"getEdges",value:function(){return this._edges}},{key:"get",value:function(f){return this._edges.get(f)}},{key:"findEqualEdge",value:function(f){var n=new en(f.getCoordinates());return this._ocaMap.get(n)}},{key:"add",value:function(f){this._edges.add(f);var n=new en(f.getCoordinates());this._ocaMap.put(n,f)}}],[{key:"constructor_",value:function(){this._edges=new De,this._ocaMap=new ur}}])})(),tn=(function(){return g((function f(){o(this,f)}),[{key:"processIntersections",value:function(f,n,a,h){}},{key:"isDone",value:function(){}}])})(),Qn=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"isTrivialIntersection",value:function(n,a,h,v){if(n===h&&this._li.getIntersectionNum()===1){if(f.isAdjacentSegments(a,v))return!0;if(n.isClosed()){var I=n.size()-1;if(a===0&&v===I||v===0&&a===I)return!0}}return!1}},{key:"getProperIntersectionPoint",value:function(){return this._properIntersectionPoint}},{key:"hasProperInteriorIntersection",value:function(){return this._hasProperInterior}},{key:"getLineIntersector",value:function(){return this._li}},{key:"hasProperIntersection",value:function(){return this._hasProper}},{key:"processIntersections",value:function(n,a,h,v){if(n===h&&a===v)return null;this.numTests++;var I=n.getCoordinates()[a],R=n.getCoordinates()[a+1],T=h.getCoordinates()[v],O=h.getCoordinates()[v+1];this._li.computeIntersection(I,R,T,O),this._li.hasIntersection()&&(this.numIntersections++,this._li.isInteriorIntersection()&&(this.numInteriorIntersections++,this._hasInterior=!0),this.isTrivialIntersection(n,a,h,v)||(this._hasIntersection=!0,n.addIntersections(this._li,a,0),h.addIntersections(this._li,v,1),this._li.isProper()&&(this.numProperIntersections++,this._hasProper=!0,this._hasProperInterior=!0)))}},{key:"hasIntersection",value:function(){return this._hasIntersection}},{key:"isDone",value:function(){return!1}},{key:"hasInteriorIntersection",value:function(){return this._hasInterior}},{key:"interfaces_",get:function(){return[tn]}}],[{key:"constructor_",value:function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._hasInterior=!1,this._properIntersectionPoint=null,this._li=null,this._isSelfIntersection=null,this.numIntersections=0,this.numInteriorIntersections=0,this.numProperIntersections=0,this.numTests=0;var n=arguments[0];this._li=n}},{key:"isAdjacentSegments",value:function(n,a){return Math.abs(n-a)===1}}])})(),ei=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"getSegmentIndex",value:function(){return this.segmentIndex}},{key:"getCoordinate",value:function(){return this.coord}},{key:"print",value:function(f){f.print(this.coord),f.print(" seg # = "+this.segmentIndex),f.println(" dist = "+this.dist)}},{key:"compareTo",value:function(f){var n=f;return this.compare(n.segmentIndex,n.dist)}},{key:"isEndPoint",value:function(f){return this.segmentIndex===0&&this.dist===0||this.segmentIndex===f}},{key:"toString",value:function(){return this.coord+" seg # = "+this.segmentIndex+" dist = "+this.dist}},{key:"getDistance",value:function(){return this.dist}},{key:"compare",value:function(f,n){return this.segmentIndex<f?-1:this.segmentIndex>f?1:this.dist<n?-1:this.dist>n?1:0}},{key:"interfaces_",get:function(){return[X]}}],[{key:"constructor_",value:function(){this.coord=null,this.segmentIndex=null,this.dist=null;var f=arguments[0],n=arguments[1],a=arguments[2];this.coord=new J(f),this.segmentIndex=n,this.dist=a}}])})(),ti=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"print",value:function(f){f.println("Intersections:");for(var n=this.iterator();n.hasNext();)n.next().print(f)}},{key:"iterator",value:function(){return this._nodeMap.values().iterator()}},{key:"addSplitEdges",value:function(f){this.addEndpoints();for(var n=this.iterator(),a=n.next();n.hasNext();){var h=n.next(),v=this.createSplitEdge(a,h);f.add(v),a=h}}},{key:"addEndpoints",value:function(){var f=this.edge.pts.length-1;this.add(this.edge.pts[0],0,0),this.add(this.edge.pts[f],f,0)}},{key:"createSplitEdge",value:function(f,n){var a=n.segmentIndex-f.segmentIndex+2,h=this.edge.pts[n.segmentIndex],v=n.dist>0||!n.coord.equals2D(h);v||a--;var I=new Array(a).fill(null),R=0;I[R++]=new J(f.coord);for(var T=f.segmentIndex+1;T<=n.segmentIndex;T++)I[R++]=this.edge.pts[T];return v&&(I[R]=n.coord),new nn(I,new xt(this.edge._label))}},{key:"add",value:function(f,n,a){var h=new ei(f,n,a),v=this._nodeMap.get(h);return v!==null?v:(this._nodeMap.put(h,h),h)}},{key:"isIntersection",value:function(f){for(var n=this.iterator();n.hasNext();)if(n.next().coord.equals(f))return!0;return!1}}],[{key:"constructor_",value:function(){this._nodeMap=new ur,this.edge=null;var f=arguments[0];this.edge=f}}])})(),ri=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"isIntersects",value:function(){return!this.isDisjoint()}},{key:"isCovers",value:function(){return(f.isTrue(this._matrix[q.INTERIOR][q.INTERIOR])||f.isTrue(this._matrix[q.INTERIOR][q.BOUNDARY])||f.isTrue(this._matrix[q.BOUNDARY][q.INTERIOR])||f.isTrue(this._matrix[q.BOUNDARY][q.BOUNDARY]))&&this._matrix[q.EXTERIOR][q.INTERIOR]===H.FALSE&&this._matrix[q.EXTERIOR][q.BOUNDARY]===H.FALSE}},{key:"isCoveredBy",value:function(){return(f.isTrue(this._matrix[q.INTERIOR][q.INTERIOR])||f.isTrue(this._matrix[q.INTERIOR][q.BOUNDARY])||f.isTrue(this._matrix[q.BOUNDARY][q.INTERIOR])||f.isTrue(this._matrix[q.BOUNDARY][q.BOUNDARY]))&&this._matrix[q.INTERIOR][q.EXTERIOR]===H.FALSE&&this._matrix[q.BOUNDARY][q.EXTERIOR]===H.FALSE}},{key:"set",value:function(){if(arguments.length===1)for(var n=arguments[0],a=0;a<n.length;a++){var h=Math.trunc(a/3),v=a%3;this._matrix[h][v]=H.toDimensionValue(n.charAt(a))}else if(arguments.length===3){var I=arguments[0],R=arguments[1],T=arguments[2];this._matrix[I][R]=T}}},{key:"isContains",value:function(){return f.isTrue(this._matrix[q.INTERIOR][q.INTERIOR])&&this._matrix[q.EXTERIOR][q.INTERIOR]===H.FALSE&&this._matrix[q.EXTERIOR][q.BOUNDARY]===H.FALSE}},{key:"setAtLeast",value:function(){if(arguments.length===1)for(var n=arguments[0],a=0;a<n.length;a++){var h=Math.trunc(a/3),v=a%3;this.setAtLeast(h,v,H.toDimensionValue(n.charAt(a)))}else if(arguments.length===3){var I=arguments[0],R=arguments[1],T=arguments[2];this._matrix[I][R]<T&&(this._matrix[I][R]=T)}}},{key:"setAtLeastIfValid",value:function(n,a,h){n>=0&&a>=0&&this.setAtLeast(n,a,h)}},{key:"isWithin",value:function(){return f.isTrue(this._matrix[q.INTERIOR][q.INTERIOR])&&this._matrix[q.INTERIOR][q.EXTERIOR]===H.FALSE&&this._matrix[q.BOUNDARY][q.EXTERIOR]===H.FALSE}},{key:"isTouches",value:function(n,a){return n>a?this.isTouches(a,n):(n===H.A&&a===H.A||n===H.L&&a===H.L||n===H.L&&a===H.A||n===H.P&&a===H.A||n===H.P&&a===H.L)&&this._matrix[q.INTERIOR][q.INTERIOR]===H.FALSE&&(f.isTrue(this._matrix[q.INTERIOR][q.BOUNDARY])||f.isTrue(this._matrix[q.BOUNDARY][q.INTERIOR])||f.isTrue(this._matrix[q.BOUNDARY][q.BOUNDARY]))}},{key:"isOverlaps",value:function(n,a){return n===H.P&&a===H.P||n===H.A&&a===H.A?f.isTrue(this._matrix[q.INTERIOR][q.INTERIOR])&&f.isTrue(this._matrix[q.INTERIOR][q.EXTERIOR])&&f.isTrue(this._matrix[q.EXTERIOR][q.INTERIOR]):n===H.L&&a===H.L&&this._matrix[q.INTERIOR][q.INTERIOR]===1&&f.isTrue(this._matrix[q.INTERIOR][q.EXTERIOR])&&f.isTrue(this._matrix[q.EXTERIOR][q.INTERIOR])}},{key:"isEquals",value:function(n,a){return n===a&&f.isTrue(this._matrix[q.INTERIOR][q.INTERIOR])&&this._matrix[q.INTERIOR][q.EXTERIOR]===H.FALSE&&this._matrix[q.BOUNDARY][q.EXTERIOR]===H.FALSE&&this._matrix[q.EXTERIOR][q.INTERIOR]===H.FALSE&&this._matrix[q.EXTERIOR][q.BOUNDARY]===H.FALSE}},{key:"toString",value:function(){for(var n=new $t("123456789"),a=0;a<3;a++)for(var h=0;h<3;h++)n.setCharAt(3*a+h,H.toDimensionSymbol(this._matrix[a][h]));return n.toString()}},{key:"setAll",value:function(n){for(var a=0;a<3;a++)for(var h=0;h<3;h++)this._matrix[a][h]=n}},{key:"get",value:function(n,a){return this._matrix[n][a]}},{key:"transpose",value:function(){var n=this._matrix[1][0];return this._matrix[1][0]=this._matrix[0][1],this._matrix[0][1]=n,n=this._matrix[2][0],this._matrix[2][0]=this._matrix[0][2],this._matrix[0][2]=n,n=this._matrix[2][1],this._matrix[2][1]=this._matrix[1][2],this._matrix[1][2]=n,this}},{key:"matches",value:function(n){if(n.length!==9)throw new V("Should be length 9: "+n);for(var a=0;a<3;a++)for(var h=0;h<3;h++)if(!f.matches(this._matrix[a][h],n.charAt(3*a+h)))return!1;return!0}},{key:"add",value:function(n){for(var a=0;a<3;a++)for(var h=0;h<3;h++)this.setAtLeast(a,h,n.get(a,h))}},{key:"isDisjoint",value:function(){return this._matrix[q.INTERIOR][q.INTERIOR]===H.FALSE&&this._matrix[q.INTERIOR][q.BOUNDARY]===H.FALSE&&this._matrix[q.BOUNDARY][q.INTERIOR]===H.FALSE&&this._matrix[q.BOUNDARY][q.BOUNDARY]===H.FALSE}},{key:"isCrosses",value:function(n,a){return n===H.P&&a===H.L||n===H.P&&a===H.A||n===H.L&&a===H.A?f.isTrue(this._matrix[q.INTERIOR][q.INTERIOR])&&f.isTrue(this._matrix[q.INTERIOR][q.EXTERIOR]):n===H.L&&a===H.P||n===H.A&&a===H.P||n===H.A&&a===H.L?f.isTrue(this._matrix[q.INTERIOR][q.INTERIOR])&&f.isTrue(this._matrix[q.EXTERIOR][q.INTERIOR]):n===H.L&&a===H.L&&this._matrix[q.INTERIOR][q.INTERIOR]===0}},{key:"interfaces_",get:function(){return[Q]}}],[{key:"constructor_",value:function(){if(this._matrix=null,arguments.length===0)this._matrix=Array(3).fill().map((function(){return Array(3)})),this.setAll(H.FALSE);else if(arguments.length===1){if(typeof arguments[0]=="string"){var n=arguments[0];f.constructor_.call(this),this.set(n)}else if(arguments[0]instanceof f){var a=arguments[0];f.constructor_.call(this),this._matrix[q.INTERIOR][q.INTERIOR]=a._matrix[q.INTERIOR][q.INTERIOR],this._matrix[q.INTERIOR][q.BOUNDARY]=a._matrix[q.INTERIOR][q.BOUNDARY],this._matrix[q.INTERIOR][q.EXTERIOR]=a._matrix[q.INTERIOR][q.EXTERIOR],this._matrix[q.BOUNDARY][q.INTERIOR]=a._matrix[q.BOUNDARY][q.INTERIOR],this._matrix[q.BOUNDARY][q.BOUNDARY]=a._matrix[q.BOUNDARY][q.BOUNDARY],this._matrix[q.BOUNDARY][q.EXTERIOR]=a._matrix[q.BOUNDARY][q.EXTERIOR],this._matrix[q.EXTERIOR][q.INTERIOR]=a._matrix[q.EXTERIOR][q.INTERIOR],this._matrix[q.EXTERIOR][q.BOUNDARY]=a._matrix[q.EXTERIOR][q.BOUNDARY],this._matrix[q.EXTERIOR][q.EXTERIOR]=a._matrix[q.EXTERIOR][q.EXTERIOR]}}}},{key:"matches",value:function(){if(Number.isInteger(arguments[0])&&typeof arguments[1]=="string"){var n=arguments[0],a=arguments[1];return a===H.SYM_DONTCARE||a===H.SYM_TRUE&&(n>=0||n===H.TRUE)||a===H.SYM_FALSE&&n===H.FALSE||a===H.SYM_P&&n===H.P||a===H.SYM_L&&n===H.L||a===H.SYM_A&&n===H.A}if(typeof arguments[0]=="string"&&typeof arguments[1]=="string"){var h=arguments[1];return new f(arguments[0]).matches(h)}}},{key:"isTrue",value:function(n){return n>=0||n===H.TRUE}}])})(),ni=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"size",value:function(){return this._size}},{key:"addAll",value:function(n){return n===null||n.length===0?null:(this.ensureCapacity(this._size+n.length),Je.arraycopy(n,0,this._data,this._size,n.length),void(this._size+=n.length))}},{key:"ensureCapacity",value:function(n){if(n<=this._data.length)return null;var a=Math.max(n,2*this._data.length);this._data=Xe.copyOf(this._data,a)}},{key:"toArray",value:function(){var n=new Array(this._size).fill(null);return Je.arraycopy(this._data,0,n,0,this._size),n}},{key:"add",value:function(n){this.ensureCapacity(this._size+1),this._data[this._size]=n,++this._size}}],[{key:"constructor_",value:function(){if(this._data=null,this._size=0,arguments.length===0)f.constructor_.call(this,10);else if(arguments.length===1){var n=arguments[0];this._data=new Array(n).fill(null)}}}])})(),ii=(function(){function f(){o(this,f)}return g(f,[{key:"getChainStartIndices",value:function(n){var a=0,h=new ni(Math.trunc(n.length/2));h.add(a);do{var v=this.findChainEnd(n,a);h.add(v),a=v}while(a<n.length-1);return h.toArray()}},{key:"findChainEnd",value:function(n,a){for(var h=lt.quadrant(n[a],n[a+1]),v=a+1;v<n.length&&lt.quadrant(n[v-1],n[v])===h;)v++;return v-1}},{key:"OLDgetChainStartIndices",value:function(n){var a=0,h=new De;h.add(a);do{var v=this.findChainEnd(n,a);h.add(v),a=v}while(a<n.length-1);return f.toIntArray(h)}}],[{key:"toIntArray",value:function(n){for(var a=new Array(n.size()).fill(null),h=0;h<a.length;h++)a[h]=n.get(h).intValue();return a}}])})(),si=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"getCoordinates",value:function(){return this.pts}},{key:"getMaxX",value:function(f){var n=this.pts[this.startIndex[f]].x,a=this.pts[this.startIndex[f+1]].x;return n>a?n:a}},{key:"getMinX",value:function(f){var n=this.pts[this.startIndex[f]].x,a=this.pts[this.startIndex[f+1]].x;return n<a?n:a}},{key:"computeIntersectsForChain",value:function(){if(arguments.length===4){var f=arguments[0],n=arguments[1],a=arguments[2],h=arguments[3];this.computeIntersectsForChain(this.startIndex[f],this.startIndex[f+1],n,n.startIndex[a],n.startIndex[a+1],h)}else if(arguments.length===6){var v=arguments[0],I=arguments[1],R=arguments[2],T=arguments[3],O=arguments[4],W=arguments[5];if(I-v==1&&O-T==1)return W.addIntersections(this.e,v,R.e,T),null;if(!this.overlaps(v,I,R,T,O))return null;var re=Math.trunc((v+I)/2),ne=Math.trunc((T+O)/2);v<re&&(T<ne&&this.computeIntersectsForChain(v,re,R,T,ne,W),ne<O&&this.computeIntersectsForChain(v,re,R,ne,O,W)),re<I&&(T<ne&&this.computeIntersectsForChain(re,I,R,T,ne,W),ne<O&&this.computeIntersectsForChain(re,I,R,ne,O,W))}}},{key:"overlaps",value:function(f,n,a,h,v){return ye.intersects(this.pts[f],this.pts[n],a.pts[h],a.pts[v])}},{key:"getStartIndexes",value:function(){return this.startIndex}},{key:"computeIntersects",value:function(f,n){for(var a=0;a<this.startIndex.length-1;a++)for(var h=0;h<f.startIndex.length-1;h++)this.computeIntersectsForChain(a,f,h,n)}}],[{key:"constructor_",value:function(){this.e=null,this.pts=null,this.startIndex=null;var f=arguments[0];this.e=f,this.pts=f.getCoordinates();var n=new ii;this.startIndex=n.getChainStartIndices(this.pts)}}])})(),rn=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"getDepth",value:function(n,a){return this._depth[n][a]}},{key:"setDepth",value:function(n,a,h){this._depth[n][a]=h}},{key:"isNull",value:function(){if(arguments.length===0){for(var n=0;n<2;n++)for(var a=0;a<3;a++)if(this._depth[n][a]!==f.NULL_VALUE)return!1;return!0}if(arguments.length===1){var h=arguments[0];return this._depth[h][1]===f.NULL_VALUE}if(arguments.length===2){var v=arguments[0],I=arguments[1];return this._depth[v][I]===f.NULL_VALUE}}},{key:"normalize",value:function(){for(var n=0;n<2;n++)if(!this.isNull(n)){var a=this._depth[n][1];this._depth[n][2]<a&&(a=this._depth[n][2]),a<0&&(a=0);for(var h=1;h<3;h++){var v=0;this._depth[n][h]>a&&(v=1),this._depth[n][h]=v}}}},{key:"getDelta",value:function(n){return this._depth[n][he.RIGHT]-this._depth[n][he.LEFT]}},{key:"getLocation",value:function(n,a){return this._depth[n][a]<=0?q.EXTERIOR:q.INTERIOR}},{key:"toString",value:function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]}},{key:"add",value:function(){if(arguments.length===1)for(var n=arguments[0],a=0;a<2;a++)for(var h=1;h<3;h++){var v=n.getLocation(a,h);v!==q.EXTERIOR&&v!==q.INTERIOR||(this.isNull(a,h)?this._depth[a][h]=f.depthAtLocation(v):this._depth[a][h]+=f.depthAtLocation(v))}else if(arguments.length===3){var I=arguments[0],R=arguments[1];arguments[2]===q.INTERIOR&&this._depth[I][R]++}}}],[{key:"constructor_",value:function(){this._depth=Array(2).fill().map((function(){return Array(3)}));for(var n=0;n<2;n++)for(var a=0;a<3;a++)this._depth[n][a]=f.NULL_VALUE}},{key:"depthAtLocation",value:function(n){return n===q.EXTERIOR?0:n===q.INTERIOR?1:f.NULL_VALUE}}])})();rn.NULL_VALUE=-1;var nn=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"getDepth",value:function(){return this._depth}},{key:"getCollapsedEdge",value:function(){var a=new Array(2).fill(null);return a[0]=this.pts[0],a[1]=this.pts[1],new n(a,xt.toLineLabel(this._label))}},{key:"isIsolated",value:function(){return this._isIsolated}},{key:"getCoordinates",value:function(){return this.pts}},{key:"setIsolated",value:function(a){this._isIsolated=a}},{key:"setName",value:function(a){this._name=a}},{key:"equals",value:function(a){if(!(a instanceof n))return!1;var h=a;if(this.pts.length!==h.pts.length)return!1;for(var v=!0,I=!0,R=this.pts.length,T=0;T<this.pts.length;T++)if(this.pts[T].equals2D(h.pts[T])||(v=!1),this.pts[T].equals2D(h.pts[--R])||(I=!1),!v&&!I)return!1;return!0}},{key:"getCoordinate",value:function(){if(arguments.length===0)return this.pts.length>0?this.pts[0]:null;if(arguments.length===1){var a=arguments[0];return this.pts[a]}}},{key:"print",value:function(a){a.print("edge "+this._name+": "),a.print("LINESTRING (");for(var h=0;h<this.pts.length;h++)h>0&&a.print(","),a.print(this.pts[h].x+" "+this.pts[h].y);a.print(") "+this._label+" "+this._depthDelta)}},{key:"computeIM",value:function(a){n.updateIM(this._label,a)}},{key:"isCollapsed",value:function(){return!!this._label.isArea()&&this.pts.length===3&&!!this.pts[0].equals(this.pts[2])}},{key:"isClosed",value:function(){return this.pts[0].equals(this.pts[this.pts.length-1])}},{key:"getMaximumSegmentIndex",value:function(){return this.pts.length-1}},{key:"getDepthDelta",value:function(){return this._depthDelta}},{key:"getNumPoints",value:function(){return this.pts.length}},{key:"printReverse",value:function(a){a.print("edge "+this._name+": ");for(var h=this.pts.length-1;h>=0;h--)a.print(this.pts[h]+" ");a.println("")}},{key:"getMonotoneChainEdge",value:function(){return this._mce===null&&(this._mce=new si(this)),this._mce}},{key:"getEnvelope",value:function(){if(this._env===null){this._env=new ye;for(var a=0;a<this.pts.length;a++)this._env.expandToInclude(this.pts[a])}return this._env}},{key:"addIntersection",value:function(a,h,v,I){var R=new J(a.getIntersection(I)),T=h,O=a.getEdgeDistance(v,I),W=T+1;if(W<this.pts.length){var re=this.pts[W];R.equals2D(re)&&(T=W,O=0)}this.eiList.add(R,T,O)}},{key:"toString",value:function(){var a=new $t;a.append("edge "+this._name+": "),a.append("LINESTRING (");for(var h=0;h<this.pts.length;h++)h>0&&a.append(","),a.append(this.pts[h].x+" "+this.pts[h].y);return a.append(") "+this._label+" "+this._depthDelta),a.toString()}},{key:"isPointwiseEqual",value:function(a){if(this.pts.length!==a.pts.length)return!1;for(var h=0;h<this.pts.length;h++)if(!this.pts[h].equals2D(a.pts[h]))return!1;return!0}},{key:"setDepthDelta",value:function(a){this._depthDelta=a}},{key:"getEdgeIntersectionList",value:function(){return this.eiList}},{key:"addIntersections",value:function(a,h,v){for(var I=0;I<a.getIntersectionNum();I++)this.addIntersection(a,h,v,I)}}],[{key:"constructor_",value:function(){if(this.pts=null,this._env=null,this.eiList=new ti(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new rn,this._depthDelta=0,arguments.length===1){var a=arguments[0];n.constructor_.call(this,a,null)}else if(arguments.length===2){var h=arguments[0],v=arguments[1];this.pts=h,this._label=v}}},{key:"updateIM",value:function(){if(!(arguments.length===2&&arguments[1]instanceof ri&&arguments[0]instanceof xt))return A(n,"updateIM",this).apply(this,arguments);var a=arguments[0],h=arguments[1];h.setAtLeastIfValid(a.getLocation(0,he.ON),a.getLocation(1,he.ON),1),a.isArea()&&(h.setAtLeastIfValid(a.getLocation(0,he.LEFT),a.getLocation(1,he.LEFT),2),h.setAtLeastIfValid(a.getLocation(0,he.RIGHT),a.getLocation(1,he.RIGHT),2))}}])})(Mr),sn=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"setWorkingPrecisionModel",value:function(n){this._workingPrecisionModel=n}},{key:"insertUniqueEdge",value:function(n){var a=this._edgeList.findEqualEdge(n);if(a!==null){var h=a.getLabel(),v=n.getLabel();a.isPointwiseEqual(n)||(v=new xt(n.getLabel())).flip(),h.merge(v);var I=f.depthDelta(v),R=a.getDepthDelta()+I;a.setDepthDelta(R)}else this._edgeList.add(n),n.setDepthDelta(f.depthDelta(n.getLabel()))}},{key:"buildSubgraphs",value:function(n,a){for(var h=new De,v=n.iterator();v.hasNext();){var I=v.next(),R=I.getRightmostCoordinate(),T=new Jr(h).getDepth(R);I.computeDepth(T),I.findResultEdges(),h.add(I),a.add(I.getDirectedEdges(),I.getNodes())}}},{key:"createSubgraphs",value:function(n){for(var a=new De,h=n.getNodes().iterator();h.hasNext();){var v=h.next();if(!v.isVisited()){var I=new zt;I.create(v),a.add(I)}}return tr.sort(a,tr.reverseOrder()),a}},{key:"createEmptyResultGeometry",value:function(){return this._geomFact.createPolygon()}},{key:"getNoder",value:function(n){if(this._workingNoder!==null)return this._workingNoder;var a=new Sr,h=new Wt;return h.setPrecisionModel(n),a.setSegmentIntersector(new Qn(h)),a}},{key:"buffer",value:function(n,a){var h=this._workingPrecisionModel;h===null&&(h=n.getPrecisionModel()),this._geomFact=n.getFactory();var v=new Un(h,this._bufParams),I=new Hn(n,a,v).getCurves();if(I.size()<=0)return this.createEmptyResultGeometry();this.computeNodedEdges(I,h),this._graph=new Ur(new Jn),this._graph.addEdges(this._edgeList.getEdges());var R=this.createSubgraphs(this._graph),T=new wn(this._geomFact);this.buildSubgraphs(R,T);var O=T.getPolygons();return O.size()<=0?this.createEmptyResultGeometry():this._geomFact.buildGeometry(O)}},{key:"computeNodedEdges",value:function(n,a){var h=this.getNoder(a);h.computeNodes(n);for(var v=h.getNodedSubstrings().iterator();v.hasNext();){var I=v.next(),R=I.getCoordinates();if(R.length!==2||!R[0].equals2D(R[1])){var T=I.getData(),O=new nn(I.getCoordinates(),new xt(T));this.insertUniqueEdge(O)}}}},{key:"setNoder",value:function(n){this._workingNoder=n}}],[{key:"constructor_",value:function(){this._bufParams=null,this._workingPrecisionModel=null,this._workingNoder=null,this._geomFact=null,this._graph=null,this._edgeList=new Kn;var n=arguments[0];this._bufParams=n}},{key:"depthDelta",value:function(n){var a=n.getLocation(0,he.LEFT),h=n.getLocation(0,he.RIGHT);return a===q.INTERIOR&&h===q.EXTERIOR?1:a===q.EXTERIOR&&h===q.INTERIOR?-1:0}},{key:"convertSegStrings",value:function(n){for(var a=new Qt,h=new De;n.hasNext();){var v=n.next(),I=a.createLineString(v.getCoordinates());h.add(I)}return a.buildGeometry(h)}}])})(),ai=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"rescale",value:function(){if(Le(arguments[0],Re))for(var n=arguments[0].iterator();n.hasNext();){var a=n.next();this.rescale(a.getCoordinates())}else if(arguments[0]instanceof Array){for(var h=arguments[0],v=0;v<h.length;v++)h[v].x=h[v].x/this._scaleFactor+this._offsetX,h[v].y=h[v].y/this._scaleFactor+this._offsetY;h.length===2&&h[0].equals2D(h[1])&&Je.out.println(h)}}},{key:"scale",value:function(){if(Le(arguments[0],Re)){for(var n=arguments[0],a=new De(n.size()),h=n.iterator();h.hasNext();){var v=h.next();a.add(new Zt(this.scale(v.getCoordinates()),v.getData()))}return a}if(arguments[0]instanceof Array){for(var I=arguments[0],R=new Array(I.length).fill(null),T=0;T<I.length;T++)R[T]=new J(Math.round((I[T].x-this._offsetX)*this._scaleFactor),Math.round((I[T].y-this._offsetY)*this._scaleFactor),I[T].getZ());return We.removeRepeatedPoints(R)}}},{key:"isIntegerPrecision",value:function(){return this._scaleFactor===1}},{key:"getNodedSubstrings",value:function(){var n=this._noder.getNodedSubstrings();return this._isScaled&&this.rescale(n),n}},{key:"computeNodes",value:function(n){var a=n;this._isScaled&&(a=this.scale(n)),this._noder.computeNodes(a)}},{key:"interfaces_",get:function(){return[Cr]}}],[{key:"constructor_",value:function(){if(this._noder=null,this._scaleFactor=null,this._offsetX=null,this._offsetY=null,this._isScaled=!1,arguments.length===2){var n=arguments[0],a=arguments[1];f.constructor_.call(this,n,a,0,0)}else if(arguments.length===4){var h=arguments[0],v=arguments[1];this._noder=h,this._scaleFactor=v,this._isScaled=!this.isIntegerPrecision()}}}])})(),an=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"checkEndPtVertexIntersections",value:function(){if(arguments.length===0)for(var n=this._segStrings.iterator();n.hasNext();){var a=n.next().getCoordinates();this.checkEndPtVertexIntersections(a[0],this._segStrings),this.checkEndPtVertexIntersections(a[a.length-1],this._segStrings)}else if(arguments.length===2){for(var h=arguments[0],v=arguments[1].iterator();v.hasNext();)for(var I=v.next().getCoordinates(),R=1;R<I.length-1;R++)if(I[R].equals(h))throw new Ce("found endpt/interior pt intersection at index "+R+" :pt "+h)}}},{key:"checkInteriorIntersections",value:function(){if(arguments.length===0)for(var n=this._segStrings.iterator();n.hasNext();)for(var a=n.next(),h=this._segStrings.iterator();h.hasNext();){var v=h.next();this.checkInteriorIntersections(a,v)}else if(arguments.length===2)for(var I=arguments[0],R=arguments[1],T=I.getCoordinates(),O=R.getCoordinates(),W=0;W<T.length-1;W++)for(var re=0;re<O.length-1;re++)this.checkInteriorIntersections(I,W,R,re);else if(arguments.length===4){var ne=arguments[0],oe=arguments[1],_e=arguments[2],Se=arguments[3];if(ne===_e&&oe===Se)return null;var Ne=ne.getCoordinates()[oe],Ge=ne.getCoordinates()[oe+1],Be=_e.getCoordinates()[Se],$e=_e.getCoordinates()[Se+1];if(this._li.computeIntersection(Ne,Ge,Be,$e),this._li.hasIntersection()&&(this._li.isProper()||this.hasInteriorIntersection(this._li,Ne,Ge)||this.hasInteriorIntersection(this._li,Be,$e)))throw new Ce("found non-noded intersection at "+Ne+"-"+Ge+" and "+Be+"-"+$e)}}},{key:"checkValid",value:function(){this.checkEndPtVertexIntersections(),this.checkInteriorIntersections(),this.checkCollapses()}},{key:"checkCollapses",value:function(){if(arguments.length===0)for(var n=this._segStrings.iterator();n.hasNext();){var a=n.next();this.checkCollapses(a)}else if(arguments.length===1)for(var h=arguments[0].getCoordinates(),v=0;v<h.length-2;v++)this.checkCollapse(h[v],h[v+1],h[v+2])}},{key:"hasInteriorIntersection",value:function(n,a,h){for(var v=0;v<n.getIntersectionNum();v++){var I=n.getIntersection(v);if(!I.equals(a)&&!I.equals(h))return!0}return!1}},{key:"checkCollapse",value:function(n,a,h){if(n.equals(h))throw new Ce("found non-noded collapse at "+f.fact.createLineString([n,a,h]))}}],[{key:"constructor_",value:function(){this._li=new Wt,this._segStrings=null;var n=arguments[0];this._segStrings=n}}])})();an.fact=new Qt;var Ar=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"intersectsScaled",value:function(n,a){var h=Math.min(n.x,a.x),v=Math.max(n.x,a.x),I=Math.min(n.y,a.y),R=Math.max(n.y,a.y),T=this._maxx<h||this._minx>v||this._maxy<I||this._miny>R;if(T)return!1;var O=this.intersectsToleranceSquare(n,a);return pe.isTrue(!(T&&O),"Found bad envelope test"),O}},{key:"initCorners",value:function(n){var a=.5;this._minx=n.x-a,this._maxx=n.x+a,this._miny=n.y-a,this._maxy=n.y+a,this._corner[0]=new J(this._maxx,this._maxy),this._corner[1]=new J(this._minx,this._maxy),this._corner[2]=new J(this._minx,this._miny),this._corner[3]=new J(this._maxx,this._miny)}},{key:"intersects",value:function(n,a){return this._scaleFactor===1?this.intersectsScaled(n,a):(this.copyScaled(n,this._p0Scaled),this.copyScaled(a,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))}},{key:"scale",value:function(n){return Math.round(n*this._scaleFactor)}},{key:"getCoordinate",value:function(){return this._originalPt}},{key:"copyScaled",value:function(n,a){a.x=this.scale(n.x),a.y=this.scale(n.y)}},{key:"getSafeEnvelope",value:function(){if(this._safeEnv===null){var n=f.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new ye(this._originalPt.x-n,this._originalPt.x+n,this._originalPt.y-n,this._originalPt.y+n)}return this._safeEnv}},{key:"intersectsPixelClosure",value:function(n,a){return this._li.computeIntersection(n,a,this._corner[0],this._corner[1]),!!this._li.hasIntersection()||(this._li.computeIntersection(n,a,this._corner[1],this._corner[2]),!!this._li.hasIntersection()||(this._li.computeIntersection(n,a,this._corner[2],this._corner[3]),!!this._li.hasIntersection()||(this._li.computeIntersection(n,a,this._corner[3],this._corner[0]),!!this._li.hasIntersection())))}},{key:"intersectsToleranceSquare",value:function(n,a){var h=!1,v=!1;return this._li.computeIntersection(n,a,this._corner[0],this._corner[1]),!!this._li.isProper()||(this._li.computeIntersection(n,a,this._corner[1],this._corner[2]),!!this._li.isProper()||(this._li.hasIntersection()&&(h=!0),this._li.computeIntersection(n,a,this._corner[2],this._corner[3]),!!this._li.isProper()||(this._li.hasIntersection()&&(v=!0),this._li.computeIntersection(n,a,this._corner[3],this._corner[0]),!!this._li.isProper()||!(!h||!v)||!!n.equals(this._pt)||!!a.equals(this._pt))))}},{key:"addSnappedNode",value:function(n,a){var h=n.getCoordinate(a),v=n.getCoordinate(a+1);return!!this.intersects(h,v)&&(n.addIntersection(this.getCoordinate(),a),!0)}}],[{key:"constructor_",value:function(){this._li=null,this._pt=null,this._originalPt=null,this._ptScaled=null,this._p0Scaled=null,this._p1Scaled=null,this._scaleFactor=null,this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,this._corner=new Array(4).fill(null),this._safeEnv=null;var n=arguments[0],a=arguments[1],h=arguments[2];if(this._originalPt=n,this._pt=n,this._scaleFactor=a,this._li=h,a<=0)throw new V("Scale factor must be non-zero");a!==1&&(this._pt=new J(this.scale(n.x),this.scale(n.y)),this._p0Scaled=new J,this._p1Scaled=new J),this.initCorners(this._pt)}}])})();Ar.SAFE_ENV_EXPANSION_FACTOR=.75;var ui=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"select",value:function(){if(arguments.length!==1){if(arguments.length===2){var f=arguments[1];arguments[0].getLineSegment(f,this.selectedSegment),this.select(this.selectedSegment)}}}}],[{key:"constructor_",value:function(){this.selectedSegment=new ft}}])})(),un=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"snap",value:function(){if(arguments.length===1){var f=arguments[0];return this.snap(f,null,-1)}if(arguments.length===3){var n=arguments[0],a=arguments[1],h=arguments[2],v=n.getSafeEnvelope(),I=new on(n,a,h);return this._index.query(v,new((function(){return g((function R(){o(this,R)}),[{key:"interfaces_",get:function(){return[Hr]}},{key:"visitItem",value:function(R){R.select(v,I)}}])})())),I.isNodeAdded()}}}],[{key:"constructor_",value:function(){this._index=null;var f=arguments[0];this._index=f}}])})(),on=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"isNodeAdded",value:function(){return this._isNodeAdded}},{key:"select",value:function(){if(!(arguments.length===2&&Number.isInteger(arguments[1])&&arguments[0]instanceof Wr))return A(n,"select",this,1).apply(this,arguments);var a=arguments[1],h=arguments[0].getContext();if(this._parentEdge===h&&(a===this._hotPixelVertexIndex||a+1===this._hotPixelVertexIndex))return null;this._isNodeAdded|=this._hotPixel.addSnappedNode(h,a)}}],[{key:"constructor_",value:function(){this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var a=arguments[0],h=arguments[1],v=arguments[2];this._hotPixel=a,this._parentEdge=h,this._hotPixelVertexIndex=v}}])})(ui);un.HotPixelSnapAction=on;var oi=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"processIntersections",value:function(f,n,a,h){if(f===a&&n===h)return null;var v=f.getCoordinates()[n],I=f.getCoordinates()[n+1],R=a.getCoordinates()[h],T=a.getCoordinates()[h+1];if(this._li.computeIntersection(v,I,R,T),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var O=0;O<this._li.getIntersectionNum();O++)this._interiorIntersections.add(this._li.getIntersection(O));f.addIntersections(this._li,n,0),a.addIntersections(this._li,h,1)}}},{key:"isDone",value:function(){return!1}},{key:"getInteriorIntersections",value:function(){return this._interiorIntersections}},{key:"interfaces_",get:function(){return[tn]}}],[{key:"constructor_",value:function(){this._li=null,this._interiorIntersections=null;var f=arguments[0];this._li=f,this._interiorIntersections=new De}}])})(),li=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"checkCorrectness",value:function(f){var n=Zt.getNodedSubstrings(f),a=new an(n);try{a.checkValid()}catch(h){if(!(h instanceof z))throw h;h.printStackTrace()}}},{key:"getNodedSubstrings",value:function(){return Zt.getNodedSubstrings(this._nodedSegStrings)}},{key:"snapRound",value:function(f,n){var a=this.findInteriorIntersections(f,n);this.computeIntersectionSnaps(a),this.computeVertexSnaps(f)}},{key:"findInteriorIntersections",value:function(f,n){var a=new oi(n);return this._noder.setSegmentIntersector(a),this._noder.computeNodes(f),a.getInteriorIntersections()}},{key:"computeVertexSnaps",value:function(){if(Le(arguments[0],Re))for(var f=arguments[0].iterator();f.hasNext();){var n=f.next();this.computeVertexSnaps(n)}else if(arguments[0]instanceof Zt)for(var a=arguments[0],h=a.getCoordinates(),v=0;v<h.length;v++){var I=new Ar(h[v],this._scaleFactor,this._li);this._pointSnapper.snap(I,a,v)&&a.addIntersection(h[v],v)}}},{key:"computeNodes",value:function(f){this._nodedSegStrings=f,this._noder=new Sr,this._pointSnapper=new un(this._noder.getIndex()),this.snapRound(f,this._li)}},{key:"computeIntersectionSnaps",value:function(f){for(var n=f.iterator();n.hasNext();){var a=n.next(),h=new Ar(a,this._scaleFactor,this._li);this._pointSnapper.snap(h)}}},{key:"interfaces_",get:function(){return[Cr]}}],[{key:"constructor_",value:function(){this._pm=null,this._li=null,this._scaleFactor=null,this._noder=null,this._pointSnapper=null,this._nodedSegStrings=null;var f=arguments[0];this._pm=f,this._li=new Wt,this._li.setPrecisionModel(f),this._scaleFactor=f.getScale()}}])})(),ir=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"bufferFixedPrecision",value:function(n){var a=new ai(new li(new At(1)),n.getScale()),h=new sn(this._bufParams);h.setWorkingPrecisionModel(n),h.setNoder(a),this._resultGeometry=h.buffer(this._argGeom,this._distance)}},{key:"bufferReducedPrecision",value:function(){if(arguments.length===0){for(var n=f.MAX_PRECISION_DIGITS;n>=0;n--){try{this.bufferReducedPrecision(n)}catch(I){if(!(I instanceof at))throw I;this._saveException=I}if(this._resultGeometry!==null)return null}throw this._saveException}if(arguments.length===1){var a=arguments[0],h=f.precisionScaleFactor(this._argGeom,this._distance,a),v=new At(h);this.bufferFixedPrecision(v)}}},{key:"computeGeometry",value:function(){if(this.bufferOriginalPrecision(),this._resultGeometry!==null)return null;var n=this._argGeom.getFactory().getPrecisionModel();n.getType()===At.FIXED?this.bufferFixedPrecision(n):this.bufferReducedPrecision()}},{key:"setQuadrantSegments",value:function(n){this._bufParams.setQuadrantSegments(n)}},{key:"bufferOriginalPrecision",value:function(){try{var n=new sn(this._bufParams);this._resultGeometry=n.buffer(this._argGeom,this._distance)}catch(a){if(!(a instanceof Ce))throw a;this._saveException=a}}},{key:"getResultGeometry",value:function(n){return this._distance=n,this.computeGeometry(),this._resultGeometry}},{key:"setEndCapStyle",value:function(n){this._bufParams.setEndCapStyle(n)}}],[{key:"constructor_",value:function(){if(this._argGeom=null,this._distance=null,this._bufParams=new M,this._resultGeometry=null,this._saveException=null,arguments.length===1){var n=arguments[0];this._argGeom=n}else if(arguments.length===2){var a=arguments[0],h=arguments[1];this._argGeom=a,this._bufParams=h}}},{key:"bufferOp",value:function(){if(arguments.length===2){var n=arguments[1];return new f(arguments[0]).getResultGeometry(n)}if(arguments.length===3){if(Number.isInteger(arguments[2])&&arguments[0]instanceof de&&typeof arguments[1]=="number"){var a=arguments[1],h=arguments[2],v=new f(arguments[0]);return v.setQuadrantSegments(h),v.getResultGeometry(a)}if(arguments[2]instanceof M&&arguments[0]instanceof de&&typeof arguments[1]=="number"){var I=arguments[1];return new f(arguments[0],arguments[2]).getResultGeometry(I)}}else if(arguments.length===4){var R=arguments[1],T=arguments[2],O=arguments[3],W=new f(arguments[0]);return W.setQuadrantSegments(T),W.setEndCapStyle(O),W.getResultGeometry(R)}}},{key:"precisionScaleFactor",value:function(n,a,h){var v=n.getEnvelopeInternal(),I=ct.max(Math.abs(v.getMaxX()),Math.abs(v.getMaxY()),Math.abs(v.getMinX()),Math.abs(v.getMinY()))+2*(a>0?a:0),R=h-Math.trunc(Math.log(I)/Math.log(10)+1);return Math.pow(10,R)}}])})();ir.CAP_ROUND=M.CAP_ROUND,ir.CAP_BUTT=M.CAP_FLAT,ir.CAP_FLAT=M.CAP_FLAT,ir.CAP_SQUARE=M.CAP_SQUARE,ir.MAX_PRECISION_DIGITS=12;var ci=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],ln=(function(){return g((function f(n){o(this,f),this.geometryFactory=n||new Qt}),[{key:"read",value:function(f){var n,a=(n=typeof f=="string"?JSON.parse(f):f).type;if(!It[a])throw new Error("Unknown GeoJSON type: "+n.type);return ci.indexOf(a)!==-1?It[a].call(this,n.coordinates):a==="GeometryCollection"?It[a].call(this,n.geometries):It[a].call(this,n)}},{key:"write",value:function(f){var n=f.getGeometryType();if(!Nt[n])throw new Error("Geometry is not supported");return Nt[n].call(this,f)}}])})(),It={Feature:function(f){var n={};for(var a in f)n[a]=f[a];if(f.geometry){var h=f.geometry.type;if(!It[h])throw new Error("Unknown GeoJSON type: "+f.type);n.geometry=this.read(f.geometry)}return f.bbox&&(n.bbox=It.bbox.call(this,f.bbox)),n},FeatureCollection:function(f){var n={};if(f.features){n.features=[];for(var a=0;a<f.features.length;++a)n.features.push(this.read(f.features[a]))}return f.bbox&&(n.bbox=this.parse.bbox.call(this,f.bbox)),n},coordinates:function(f){for(var n=[],a=0;a<f.length;++a){var h=f[a];n.push(d(J,N(h)))}return n},bbox:function(f){return this.geometryFactory.createLinearRing([new J(f[0],f[1]),new J(f[2],f[1]),new J(f[2],f[3]),new J(f[0],f[3]),new J(f[0],f[1])])},Point:function(f){var n=d(J,N(f));return this.geometryFactory.createPoint(n)},MultiPoint:function(f){for(var n=[],a=0;a<f.length;++a)n.push(It.Point.call(this,f[a]));return this.geometryFactory.createMultiPoint(n)},LineString:function(f){var n=It.coordinates.call(this,f);return this.geometryFactory.createLineString(n)},MultiLineString:function(f){for(var n=[],a=0;a<f.length;++a)n.push(It.LineString.call(this,f[a]));return this.geometryFactory.createMultiLineString(n)},Polygon:function(f){for(var n=It.coordinates.call(this,f[0]),a=this.geometryFactory.createLinearRing(n),h=[],v=1;v<f.length;++v){var I=f[v],R=It.coordinates.call(this,I),T=this.geometryFactory.createLinearRing(R);h.push(T)}return this.geometryFactory.createPolygon(a,h)},MultiPolygon:function(f){for(var n=[],a=0;a<f.length;++a){var h=f[a];n.push(It.Polygon.call(this,h))}return this.geometryFactory.createMultiPolygon(n)},GeometryCollection:function(f){for(var n=[],a=0;a<f.length;++a){var h=f[a];n.push(this.read(h))}return this.geometryFactory.createGeometryCollection(n)}},Nt={coordinate:function(f){var n=[f.x,f.y];return f.z&&n.push(f.z),f.m&&n.push(f.m),n},Point:function(f){return{type:"Point",coordinates:Nt.coordinate.call(this,f.getCoordinate())}},MultiPoint:function(f){for(var n=[],a=0;a<f._geometries.length;++a){var h=f._geometries[a],v=Nt.Point.call(this,h);n.push(v.coordinates)}return{type:"MultiPoint",coordinates:n}},LineString:function(f){for(var n=[],a=f.getCoordinates(),h=0;h<a.length;++h){var v=a[h];n.push(Nt.coordinate.call(this,v))}return{type:"LineString",coordinates:n}},MultiLineString:function(f){for(var n=[],a=0;a<f._geometries.length;++a){var h=f._geometries[a],v=Nt.LineString.call(this,h);n.push(v.coordinates)}return{type:"MultiLineString",coordinates:n}},Polygon:function(f){var n=[],a=Nt.LineString.call(this,f._shell);n.push(a.coordinates);for(var h=0;h<f._holes.length;++h){var v=f._holes[h],I=Nt.LineString.call(this,v);n.push(I.coordinates)}return{type:"Polygon",coordinates:n}},MultiPolygon:function(f){for(var n=[],a=0;a<f._geometries.length;++a){var h=f._geometries[a],v=Nt.Polygon.call(this,h);n.push(v.coordinates)}return{type:"MultiPolygon",coordinates:n}},GeometryCollection:function(f){for(var n=[],a=0;a<f._geometries.length;++a){var h=f._geometries[a],v=h.getGeometryType();n.push(Nt[v].call(this,h))}return{type:"GeometryCollection",geometries:n}}};return{BufferOp:ir,GeoJSONReader:(function(){return g((function f(n){o(this,f),this.parser=new ln(n||new Qt)}),[{key:"read",value:function(f){return this.parser.read(f)}}])})(),GeoJSONWriter:(function(){return g((function f(){o(this,f),this.parser=new ln(this.geometryFactory)}),[{key:"write",value:function(f){return this.parser.write(f)}}])})()}}))})(jsts_min$1)),jsts_min$1.exports}var jsts_minExports=requireJsts_min();const jsts=getDefaultExportFromCjs$1(jsts_minExports);function adder(){return new Adder}function Adder(){this.reset()}Adder.prototype={constructor:Adder,reset:function(){this.s=this.t=0},add:function(e){add(temp,e,this.t),add(this,temp.s,this.s),this.s?this.t+=temp.t:this.s=temp.t},valueOf:function(){return this.s}};var temp=new Adder;function add(e,t,r){var s=e.s=t+r,o=s-t,d=s-o;e.t=t-d+(r-o)}var epsilon$1=1e-6,pi=Math.PI,halfPi=pi/2,quarterPi=pi/4,tau=pi*2,degrees=180/pi,radians=pi/180,abs$1=Math.abs,atan=Math.atan,atan2=Math.atan2,cos=Math.cos,sin=Math.sin,sqrt=Math.sqrt;function acos(e){return e>1?0:e<-1?pi:Math.acos(e)}function asin(e){return e>1?halfPi:e<-1?-halfPi:Math.asin(e)}function noop$1(){}function streamGeometry(e,t){e&&streamGeometryType.hasOwnProperty(e.type)&&streamGeometryType[e.type](e,t)}var streamObjectType={Feature:function(e,t){streamGeometry(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,s=-1,o=r.length;++s<o;)streamGeometry(r[s].geometry,t)}},streamGeometryType={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var r=e.coordinates,s=-1,o=r.length;++s<o;)e=r[s],t.point(e[0],e[1],e[2])},LineString:function(e,t){streamLine(e.coordinates,t,0)},MultiLineString:function(e,t){for(var r=e.coordinates,s=-1,o=r.length;++s<o;)streamLine(r[s],t,0)},Polygon:function(e,t){streamPolygon(e.coordinates,t)},MultiPolygon:function(e,t){for(var r=e.coordinates,s=-1,o=r.length;++s<o;)streamPolygon(r[s],t)},GeometryCollection:function(e,t){for(var r=e.geometries,s=-1,o=r.length;++s<o;)streamGeometry(r[s],t)}};function streamLine(e,t,r){var s=-1,o=e.length-r,d;for(t.lineStart();++s<o;)d=e[s],t.point(d[0],d[1],d[2]);t.lineEnd()}function streamPolygon(e,t){var r=-1,s=e.length;for(t.polygonStart();++r<s;)streamLine(e[r],t,1);t.polygonEnd()}function geoStream(e,t){e&&streamObjectType.hasOwnProperty(e.type)?streamObjectType[e.type](e,t):streamGeometry(e,t)}adder(),adder();function spherical(e){return[atan2(e[1],e[0]),asin(e[2])]}function cartesian(e){var t=e[0],r=e[1],s=cos(r);return[s*cos(t),s*sin(t),sin(r)]}function cartesianDot(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function cartesianCross(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function cartesianAddInPlace(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function cartesianScale(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function cartesianNormalizeInPlace(e){var t=sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}adder();function compose(e,t){function r(s,o){return s=e(s,o),t(s[0],s[1])}return e.invert&&t.invert&&(r.invert=function(s,o){return s=t.invert(s,o),s&&e.invert(s[0],s[1])}),r}function rotationIdentity(e,t){return[e>pi?e-tau:e<-pi?e+tau:e,t]}rotationIdentity.invert=rotationIdentity;function rotateRadians(e,t,r){return(e%=tau)?t||r?compose(rotationLambda(e),rotationPhiGamma(t,r)):rotationLambda(e):t||r?rotationPhiGamma(t,r):rotationIdentity}function forwardRotationLambda(e){return function(t,r){return t+=e,[t>pi?t-tau:t<-pi?t+tau:t,r]}}function rotationLambda(e){var t=forwardRotationLambda(e);return t.invert=forwardRotationLambda(-e),t}function rotationPhiGamma(e,t){var r=cos(e),s=sin(e),o=cos(t),d=sin(t);function m(g,y){var b=cos(y),x=cos(g)*b,E=sin(g)*b,C=sin(y),S=C*r+x*s;return[atan2(E*o-S*d,x*r-C*s),asin(S*o+E*d)]}return m.invert=function(g,y){var b=cos(y),x=cos(g)*b,E=sin(g)*b,C=sin(y),S=C*o-E*d;return[atan2(E*o+C*d,x*r+S*s),asin(S*r-x*s)]},m}function circleStream(e,t,r,s,o,d){if(r){var m=cos(t),g=sin(t),y=s*r;o==null?(o=t+s*tau,d=t-y/2):(o=circleRadius(m,o),d=circleRadius(m,d),(s>0?o<d:o>d)&&(o+=s*tau));for(var b,x=o;s>0?x>d:x<d;x-=y)b=spherical([m,-g*cos(x),-g*sin(x)]),e.point(b[0],b[1])}}function circleRadius(e,t){t=cartesian(t),t[0]-=e,cartesianNormalizeInPlace(t);var r=acos(-t[1]);return((-t[2]<0?-r:r)+tau-epsilon$1)%tau}function clipBuffer(){var e=[],t;return{point:function(r,s){t.push([r,s])},lineStart:function(){e.push(t=[])},lineEnd:noop$1,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var r=e;return e=[],t=null,r}}}function clipLine(e,t,r,s,o,d){var m=e[0],g=e[1],y=t[0],b=t[1],x=0,E=1,C=y-m,S=b-g,A;if(A=r-m,!(!C&&A>0)){if(A/=C,C<0){if(A<x)return;A<E&&(E=A)}else if(C>0){if(A>E)return;A>x&&(x=A)}if(A=o-m,!(!C&&A<0)){if(A/=C,C<0){if(A>E)return;A>x&&(x=A)}else if(C>0){if(A<x)return;A<E&&(E=A)}if(A=s-g,!(!S&&A>0)){if(A/=S,S<0){if(A<x)return;A<E&&(E=A)}else if(S>0){if(A>E)return;A>x&&(x=A)}if(A=d-g,!(!S&&A<0)){if(A/=S,S<0){if(A>E)return;A>x&&(x=A)}else if(S>0){if(A<x)return;A<E&&(E=A)}return x>0&&(e[0]=m+x*C,e[1]=g+x*S),E<1&&(t[0]=m+E*C,t[1]=g+E*S),!0}}}}}function pointEqual(e,t){return abs$1(e[0]-t[0])<epsilon$1&&abs$1(e[1]-t[1])<epsilon$1}function Intersection(e,t,r,s){this.x=e,this.z=t,this.o=r,this.e=s,this.v=!1,this.n=this.p=null}function clipPolygon(e,t,r,s,o){var d=[],m=[],g,y;if(e.forEach(function(A){if(!((N=A.length-1)<=0)){var N,k=A[0],L=A[N],G;if(pointEqual(k,L)){for(o.lineStart(),g=0;g<N;++g)o.point((k=A[g])[0],k[1]);o.lineEnd();return}d.push(G=new Intersection(k,A,null,!0)),m.push(G.o=new Intersection(k,null,G,!1)),d.push(G=new Intersection(L,A,null,!1)),m.push(G.o=new Intersection(L,null,G,!0))}}),!!d.length){for(m.sort(t),link$1(d),link$1(m),g=0,y=m.length;g<y;++g)m[g].e=r=!r;for(var b=d[0],x,E;;){for(var C=b,S=!0;C.v;)if((C=C.n)===b)return;x=C.z,o.lineStart();do{if(C.v=C.o.v=!0,C.e){if(S)for(g=0,y=x.length;g<y;++g)o.point((E=x[g])[0],E[1]);else s(C.x,C.n.x,1,o);C=C.n}else{if(S)for(x=C.p.z,g=x.length-1;g>=0;--g)o.point((E=x[g])[0],E[1]);else s(C.x,C.p.x,-1,o);C=C.p}C=C.o,x=C.z,S=!S}while(!C.v);o.lineEnd()}}}function link$1(e){if(t=e.length){for(var t,r=0,s=e[0],o;++r<t;)s.n=o=e[r],o.p=s,s=o;s.n=o=e[0],o.p=s}}function ascending(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function bisector(e){return e.length===1&&(e=ascendingComparator(e)),{left:function(t,r,s,o){for(s==null&&(s=0),o==null&&(o=t.length);s<o;){var d=s+o>>>1;e(t[d],r)<0?s=d+1:o=d}return s},right:function(t,r,s,o){for(s==null&&(s=0),o==null&&(o=t.length);s<o;){var d=s+o>>>1;e(t[d],r)>0?o=d:s=d+1}return s}}}function ascendingComparator(e){return function(t,r){return ascending(e(t),r)}}bisector(ascending);function merge(e){for(var t=e.length,r,s=-1,o=0,d,m;++s<t;)o+=e[s].length;for(d=new Array(o);--t>=0;)for(m=e[t],r=m.length;--r>=0;)d[--o]=m[r];return d}var clipMax=1e9,clipMin=-clipMax;function clipExtent(e,t,r,s){function o(b,x){return e<=b&&b<=r&&t<=x&&x<=s}function d(b,x,E,C){var S=0,A=0;if(b==null||(S=m(b,E))!==(A=m(x,E))||y(b,x)<0^E>0)do C.point(S===0||S===3?e:r,S>1?s:t);while((S=(S+E+4)%4)!==A);else C.point(x[0],x[1])}function m(b,x){return abs$1(b[0]-e)<epsilon$1?x>0?0:3:abs$1(b[0]-r)<epsilon$1?x>0?2:1:abs$1(b[1]-t)<epsilon$1?x>0?1:0:x>0?3:2}function g(b,x){return y(b.x,x.x)}function y(b,x){var E=m(b,1),C=m(x,1);return E!==C?E-C:E===0?x[1]-b[1]:E===1?b[0]-x[0]:E===2?b[1]-x[1]:x[0]-b[0]}return function(b){var x=b,E=clipBuffer(),C,S,A,N,k,L,G,M,z,V,Y,X={point:Q,lineStart:se,lineEnd:ie,polygonStart:K,polygonEnd:ee};function Q(ue,le){o(ue,le)&&x.point(ue,le)}function $(){for(var ue=0,le=0,fe=S.length;le<fe;++le)for(var ve=S[le],xe=1,ce=ve.length,Te=ve[0],Ce,me,pe=Te[0],Ee=Te[1];xe<ce;++xe)Ce=pe,me=Ee,Te=ve[xe],pe=Te[0],Ee=Te[1],me<=s?Ee>s&&(pe-Ce)*(s-me)>(Ee-me)*(e-Ce)&&++ue:Ee<=s&&(pe-Ce)*(s-me)<(Ee-me)*(e-Ce)&&--ue;return ue}function K(){x=E,C=[],S=[],Y=!0}function ee(){var ue=$(),le=Y&&ue,fe=(C=merge(C)).length;(le||fe)&&(b.polygonStart(),le&&(b.lineStart(),d(null,null,1,b),b.lineEnd()),fe&&clipPolygon(C,g,ue,d,b),b.polygonEnd()),x=b,C=S=A=null}function se(){X.point=te,S&&S.push(A=[]),V=!0,z=!1,G=M=NaN}function ie(){C&&(te(N,k),L&&z&&E.rejoin(),C.push(E.result())),X.point=Q,z&&x.lineEnd()}function te(ue,le){var fe=o(ue,le);if(S&&A.push([ue,le]),V)N=ue,k=le,L=fe,V=!1,fe&&(x.lineStart(),x.point(ue,le));else if(fe&&z)x.point(ue,le);else{var ve=[G=Math.max(clipMin,Math.min(clipMax,G)),M=Math.max(clipMin,Math.min(clipMax,M))],xe=[ue=Math.max(clipMin,Math.min(clipMax,ue)),le=Math.max(clipMin,Math.min(clipMax,le))];clipLine(ve,xe,e,t,r,s)?(z||(x.lineStart(),x.point(ve[0],ve[1])),x.point(xe[0],xe[1]),fe||x.lineEnd(),Y=!1):fe&&(x.lineStart(),x.point(ue,le),Y=!1)}G=ue,M=le,z=fe}return X}}var sum$2=adder();function polygonContains(e,t){var r=t[0],s=t[1],o=[sin(r),-cos(r),0],d=0,m=0;sum$2.reset();for(var g=0,y=e.length;g<y;++g)if(x=(b=e[g]).length)for(var b,x,E=b[x-1],C=E[0],S=E[1]/2+quarterPi,A=sin(S),N=cos(S),k=0;k<x;++k,C=G,A=z,N=V,E=L){var L=b[k],G=L[0],M=L[1]/2+quarterPi,z=sin(M),V=cos(M),Y=G-C,X=Y>=0?1:-1,Q=X*Y,$=Q>pi,K=A*z;if(sum$2.add(atan2(K*X*sin(Q),N*V+K*cos(Q))),d+=$?Y+X*tau:Y,$^C>=r^G>=r){var ee=cartesianCross(cartesian(E),cartesian(L));cartesianNormalizeInPlace(ee);var se=cartesianCross(o,ee);cartesianNormalizeInPlace(se);var ie=($^Y>=0?-1:1)*asin(se[2]);(s>ie||s===ie&&(ee[0]||ee[1]))&&(m+=$^Y>=0?1:-1)}}return(d<-epsilon$1||d<epsilon$1&&sum$2<-epsilon$1)^m&1}adder();function identity(e){return e}adder(),adder();var x0=1/0,y0=x0,x1=-x0,y1=x1,boundsStream={point:boundsPoint,lineStart:noop$1,lineEnd:noop$1,polygonStart:noop$1,polygonEnd:noop$1,result:function(){var e=[[x0,y0],[x1,y1]];return x1=y1=-(y0=x0=1/0),e}};function boundsPoint(e,t){e<x0&&(x0=e),e>x1&&(x1=e),t<y0&&(y0=t),t>y1&&(y1=t)}adder();function clip(e,t,r,s){return function(o,d){var m=t(d),g=o.invert(s[0],s[1]),y=clipBuffer(),b=t(y),x=!1,E,C,S,A={point:N,lineStart:L,lineEnd:G,polygonStart:function(){A.point=M,A.lineStart=z,A.lineEnd=V,C=[],E=[]},polygonEnd:function(){A.point=N,A.lineStart=L,A.lineEnd=G,C=merge(C);var Y=polygonContains(E,g);C.length?(x||(d.polygonStart(),x=!0),clipPolygon(C,compareIntersection,Y,r,d)):Y&&(x||(d.polygonStart(),x=!0),d.lineStart(),r(null,null,1,d),d.lineEnd()),x&&(d.polygonEnd(),x=!1),C=E=null},sphere:function(){d.polygonStart(),d.lineStart(),r(null,null,1,d),d.lineEnd(),d.polygonEnd()}};function N(Y,X){var Q=o(Y,X);e(Y=Q[0],X=Q[1])&&d.point(Y,X)}function k(Y,X){var Q=o(Y,X);m.point(Q[0],Q[1])}function L(){A.point=k,m.lineStart()}function G(){A.point=N,m.lineEnd()}function M(Y,X){S.push([Y,X]);var Q=o(Y,X);b.point(Q[0],Q[1])}function z(){b.lineStart(),S=[]}function V(){M(S[0][0],S[0][1]),b.lineEnd();var Y=b.clean(),X=y.result(),Q,$=X.length,K,ee,se;if(S.pop(),E.push(S),S=null,!!$){if(Y&1){if(ee=X[0],(K=ee.length-1)>0){for(x||(d.polygonStart(),x=!0),d.lineStart(),Q=0;Q<K;++Q)d.point((se=ee[Q])[0],se[1]);d.lineEnd()}return}$>1&&Y&2&&X.push(X.pop().concat(X.shift())),C.push(X.filter(validSegment))}}return A}}function validSegment(e){return e.length>1}function compareIntersection(e,t){return((e=e.x)[0]<0?e[1]-halfPi-epsilon$1:halfPi-e[1])-((t=t.x)[0]<0?t[1]-halfPi-epsilon$1:halfPi-t[1])}const clipAntimeridian=clip(function(){return!0},clipAntimeridianLine,clipAntimeridianInterpolate,[-pi,-halfPi]);function clipAntimeridianLine(e){var t=NaN,r=NaN,s=NaN,o;return{lineStart:function(){e.lineStart(),o=1},point:function(d,m){var g=d>0?pi:-pi,y=abs$1(d-t);abs$1(y-pi)<epsilon$1?(e.point(t,r=(r+m)/2>0?halfPi:-halfPi),e.point(s,r),e.lineEnd(),e.lineStart(),e.point(g,r),e.point(d,r),o=0):s!==g&&y>=pi&&(abs$1(t-s)<epsilon$1&&(t-=s*epsilon$1),abs$1(d-g)<epsilon$1&&(d-=g*epsilon$1),r=clipAntimeridianIntersect(t,r,d,m),e.point(s,r),e.lineEnd(),e.lineStart(),e.point(g,r),o=0),e.point(t=d,r=m),s=g},lineEnd:function(){e.lineEnd(),t=r=NaN},clean:function(){return 2-o}}}function clipAntimeridianIntersect(e,t,r,s){var o,d,m=sin(e-r);return abs$1(m)>epsilon$1?atan((sin(t)*(d=cos(s))*sin(r)-sin(s)*(o=cos(t))*sin(e))/(o*d*m)):(t+s)/2}function clipAntimeridianInterpolate(e,t,r,s){var o;if(e==null)o=r*halfPi,s.point(-pi,o),s.point(0,o),s.point(pi,o),s.point(pi,0),s.point(pi,-o),s.point(0,-o),s.point(-pi,-o),s.point(-pi,0),s.point(-pi,o);else if(abs$1(e[0]-t[0])>epsilon$1){var d=e[0]<t[0]?pi:-pi;o=r*d/2,s.point(-d,o),s.point(0,o),s.point(d,o)}else s.point(t[0],t[1])}function clipCircle(e,t){var r=cos(e),s=r>0,o=abs$1(r)>epsilon$1;function d(x,E,C,S){circleStream(S,e,t,C,x,E)}function m(x,E){return cos(x)*cos(E)>r}function g(x){var E,C,S,A,N;return{lineStart:function(){A=S=!1,N=1},point:function(k,L){var G=[k,L],M,z=m(k,L),V=s?z?0:b(k,L):z?b(k+(k<0?pi:-pi),L):0;if(!E&&(A=S=z)&&x.lineStart(),z!==S&&(M=y(E,G),(!M||pointEqual(E,M)||pointEqual(G,M))&&(G[0]+=epsilon$1,G[1]+=epsilon$1,z=m(G[0],G[1]))),z!==S)N=0,z?(x.lineStart(),M=y(G,E),x.point(M[0],M[1])):(M=y(E,G),x.point(M[0],M[1]),x.lineEnd()),E=M;else if(o&&E&&s^z){var Y;!(V&C)&&(Y=y(G,E,!0))&&(N=0,s?(x.lineStart(),x.point(Y[0][0],Y[0][1]),x.point(Y[1][0],Y[1][1]),x.lineEnd()):(x.point(Y[1][0],Y[1][1]),x.lineEnd(),x.lineStart(),x.point(Y[0][0],Y[0][1])))}z&&(!E||!pointEqual(E,G))&&x.point(G[0],G[1]),E=G,S=z,C=V},lineEnd:function(){S&&x.lineEnd(),E=null},clean:function(){return N|(A&&S)<<1}}}function y(x,E,C){var S=cartesian(x),A=cartesian(E),N=[1,0,0],k=cartesianCross(S,A),L=cartesianDot(k,k),G=k[0],M=L-G*G;if(!M)return!C&&x;var z=r*L/M,V=-r*G/M,Y=cartesianCross(N,k),X=cartesianScale(N,z),Q=cartesianScale(k,V);cartesianAddInPlace(X,Q);var $=Y,K=cartesianDot(X,$),ee=cartesianDot($,$),se=K*K-ee*(cartesianDot(X,X)-1);if(!(se<0)){var ie=sqrt(se),te=cartesianScale($,(-K-ie)/ee);if(cartesianAddInPlace(te,X),te=spherical(te),!C)return te;var ue=x[0],le=E[0],fe=x[1],ve=E[1],xe;le<ue&&(xe=ue,ue=le,le=xe);var ce=le-ue,Te=abs$1(ce-pi)<epsilon$1,Ce=Te||ce<epsilon$1;if(!Te&&ve<fe&&(xe=fe,fe=ve,ve=xe),Ce?Te?fe+ve>0^te[1]<(abs$1(te[0]-ue)<epsilon$1?fe:ve):fe<=te[1]&&te[1]<=ve:ce>pi^(ue<=te[0]&&te[0]<=le)){var me=cartesianScale($,(-K+ie)/ee);return cartesianAddInPlace(me,X),[te,spherical(me)]}}}function b(x,E){var C=s?e:pi-e,S=0;return x<-C?S|=1:x>C&&(S|=2),E<-C?S|=4:E>C&&(S|=8),S}return clip(m,g,d,s?[0,-e]:[-pi,e-pi])}function transformer(e){return function(t){var r=new TransformStream;for(var s in e)r[s]=e[s];return r.stream=t,r}}function TransformStream(){}TransformStream.prototype={constructor:TransformStream,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function fitExtent(e,t,r){var s=t[1][0]-t[0][0],o=t[1][1]-t[0][1],d=e.clipExtent&&e.clipExtent();e.scale(150).translate([0,0]),d!=null&&e.clipExtent(null),geoStream(r,e.stream(boundsStream));var m=boundsStream.result(),g=Math.min(s/(m[1][0]-m[0][0]),o/(m[1][1]-m[0][1])),y=+t[0][0]+(s-g*(m[1][0]+m[0][0]))/2,b=+t[0][1]+(o-g*(m[1][1]+m[0][1]))/2;return d!=null&&e.clipExtent(d),e.scale(g*150).translate([y,b])}function fitSize(e,t,r){return fitExtent(e,[[0,0],t],r)}var maxDepth=16,cosMinDistance=cos(30*radians);function resample$1(e,t){return+t?resample(e,t):resampleNone(e)}function resampleNone(e){return transformer({point:function(t,r){t=e(t,r),this.stream.point(t[0],t[1])}})}function resample(e,t){function r(s,o,d,m,g,y,b,x,E,C,S,A,N,k){var L=b-s,G=x-o,M=L*L+G*G;if(M>4*t&&N--){var z=m+C,V=g+S,Y=y+A,X=sqrt(z*z+V*V+Y*Y),Q=asin(Y/=X),$=abs$1(abs$1(Y)-1)<epsilon$1||abs$1(d-E)<epsilon$1?(d+E)/2:atan2(V,z),K=e($,Q),ee=K[0],se=K[1],ie=ee-s,te=se-o,ue=G*ie-L*te;(ue*ue/M>t||abs$1((L*ie+G*te)/M-.5)>.3||m*C+g*S+y*A<cosMinDistance)&&(r(s,o,d,m,g,y,ee,se,$,z/=X,V/=X,Y,N,k),k.point(ee,se),r(ee,se,$,z,V,Y,b,x,E,C,S,A,N,k))}}return function(s){var o,d,m,g,y,b,x,E,C,S,A,N,k={point:L,lineStart:G,lineEnd:z,polygonStart:function(){s.polygonStart(),k.lineStart=V},polygonEnd:function(){s.polygonEnd(),k.lineStart=G}};function L(Q,$){Q=e(Q,$),s.point(Q[0],Q[1])}function G(){E=NaN,k.point=M,s.lineStart()}function M(Q,$){var K=cartesian([Q,$]),ee=e(Q,$);r(E,C,x,S,A,N,E=ee[0],C=ee[1],x=Q,S=K[0],A=K[1],N=K[2],maxDepth,s),s.point(E,C)}function z(){k.point=L,s.lineEnd()}function V(){G(),k.point=Y,k.lineEnd=X}function Y(Q,$){M(o=Q,$),d=E,m=C,g=S,y=A,b=N,k.point=M}function X(){r(E,C,x,S,A,N,d,m,o,g,y,b,maxDepth,s),k.lineEnd=z,z()}return k}}var transformRadians=transformer({point:function(e,t){this.stream.point(e*radians,t*radians)}});function projection(e){return projectionMutator(function(){return e})()}function projectionMutator(e){var t,r=150,s=480,o=250,d,m,g=0,y=0,b=0,x=0,E=0,C,S,A=null,N=clipAntimeridian,k=null,L,G,M,z=identity,V=.5,Y=resample$1(ee,V),X,Q;function $(te){return te=S(te[0]*radians,te[1]*radians),[te[0]*r+d,m-te[1]*r]}function K(te){return te=S.invert((te[0]-d)/r,(m-te[1])/r),te&&[te[0]*degrees,te[1]*degrees]}function ee(te,ue){return te=t(te,ue),[te[0]*r+d,m-te[1]*r]}$.stream=function(te){return X&&Q===te?X:X=transformRadians(N(C,Y(z(Q=te))))},$.clipAngle=function(te){return arguments.length?(N=+te?clipCircle(A=te*radians,6*radians):(A=null,clipAntimeridian),ie()):A*degrees},$.clipExtent=function(te){return arguments.length?(z=te==null?(k=L=G=M=null,identity):clipExtent(k=+te[0][0],L=+te[0][1],G=+te[1][0],M=+te[1][1]),ie()):k==null?null:[[k,L],[G,M]]},$.scale=function(te){return arguments.length?(r=+te,se()):r},$.translate=function(te){return arguments.length?(s=+te[0],o=+te[1],se()):[s,o]},$.center=function(te){return arguments.length?(g=te[0]%360*radians,y=te[1]%360*radians,se()):[g*degrees,y*degrees]},$.rotate=function(te){return arguments.length?(b=te[0]%360*radians,x=te[1]%360*radians,E=te.length>2?te[2]%360*radians:0,se()):[b*degrees,x*degrees,E*degrees]},$.precision=function(te){return arguments.length?(Y=resample$1(ee,V=te*te),ie()):sqrt(V)},$.fitExtent=function(te,ue){return fitExtent($,te,ue)},$.fitSize=function(te,ue){return fitSize($,te,ue)};function se(){S=compose(C=rotateRadians(b,x,E),t);var te=t(g,y);return d=s-te[0]*r,m=o+te[1]*r,ie()}function ie(){return X=Q=null,$}return function(){return t=e.apply(this,arguments),$.invert=t.invert&&K,se()}}function azimuthalRaw(e){return function(t,r){var s=cos(t),o=cos(r),d=e(s*o);return[d*o*sin(t),d*sin(r)]}}function azimuthalInvert(e){return function(t,r){var s=sqrt(t*t+r*r),o=e(s),d=sin(o),m=cos(o);return[atan2(t*d,s*m),asin(s&&r*d/s)]}}var azimuthalEqualAreaRaw=azimuthalRaw(function(e){return sqrt(2/(1+e))});azimuthalEqualAreaRaw.invert=azimuthalInvert(function(e){return 2*asin(e/2)});var azimuthalEquidistantRaw=azimuthalRaw(function(e){return(e=acos(e))&&e/sin(e)});azimuthalEquidistantRaw.invert=azimuthalInvert(function(e){return e});function geoAzimuthalEquidistant(){return projection(azimuthalEquidistantRaw).scale(79.4188).clipAngle(180-.001)}function equirectangularRaw(e,t){return[e,t]}equirectangularRaw.invert=equirectangularRaw;var{BufferOp,GeoJSONReader,GeoJSONWriter}=jsts;function buffer(e,t,r){r=r||{};var s=r.units||"kilometers",o=r.steps||8;if(!e)throw new Error("geojson is required");if(typeof r!="object")throw new Error("options must be an object");if(typeof o!="number")throw new Error("steps must be an number");if(t===void 0)throw new Error("radius is required");if(o<=0)throw new Error("steps must be greater than 0");var d=[];switch(e.type){case"GeometryCollection":return geomEach(e,function(m){var g=bufferFeature(m,t,s,o);g&&d.push(g)}),featureCollection(d);case"FeatureCollection":return featureEach(e,function(m){var g=bufferFeature(m,t,s,o);g&&featureEach(g,function(y){y&&d.push(y)})}),featureCollection(d)}return bufferFeature(e,t,s,o)}function bufferFeature(e,t,r,s){var o=e.properties||{},d=e.type==="Feature"?e.geometry:e;if(d.type==="GeometryCollection"){var m=[];return geomEach(e,function(N){var k=bufferFeature(N,t,r,s);k&&m.push(k)}),featureCollection(m)}var g=defineProjection(d),y={type:d.type,coordinates:projectCoords(d.coordinates,g)},b=new GeoJSONReader,x=b.read(y),E=radiansToLength(lengthToRadians(t,r),"meters"),C=BufferOp.bufferOp(x,E,s),S=new GeoJSONWriter;if(C=S.write(C),!coordsIsNaN(C.coordinates)){var A={type:C.type,coordinates:unprojectCoords(C.coordinates,g)};return feature(A,o)}}function coordsIsNaN(e){return Array.isArray(e[0])?coordsIsNaN(e[0]):isNaN(e[0])}function projectCoords(e,t){return typeof e[0]!="object"?t(e):e.map(function(r){return projectCoords(r,t)})}function unprojectCoords(e,t){return typeof e[0]!="object"?t.invert(e):e.map(function(r){return unprojectCoords(r,t)})}function defineProjection(e){var t=center(e).geometry.coordinates,r=[-t[0],-t[1]];return geoAzimuthalEquidistant().rotate(r).scale(earthRadius)}var index_default$1=buffer;const identifyBundle={name:"identify",getReducer(){const e={shouldFire:!1,coordinates:null,listeners:[],results:[]};return(t=e,{type:r,payload:s})=>{switch(r){case"IDENTIFY_COLLECTION_ADDED":case"IDENTIFY_SHOULD_FIRE":case"IDENTIFY_COORDINATES_SET":case"IDENTIFY_STARTED":case"IDENTIFY_ERROR":case"IDENTIFY_SUCCESS":return Object.assign({},t,s);default:return t}}},doIdentifyAddCollection:e=>({dispatch:t,store:r})=>{const s=r.selectIdentifyListeners();e.onIdentify&&s.push(e.onIdentify),t({type:"IDENTIFY_COLLECTION_ADDED",payload:{listeners:s}})},doIdentifyShouldFire:()=>({dispatch:e})=>{e({type:"IDENTIFY_SHOULD_FIRE",payload:{shouldFire:!0}})},doIdentifySetCoords:e=>({dispatch:t,store:r})=>{e.transform("EPSG:3857","EPSG:4326");const s=e.getCoordinates();t({type:"IDENTIFY_COORDINATES_SET",payload:{coordinates:s,results:[],shouldFire:!0}})},doSetIdentifyFeature:()=>({store:e})=>{const t=e.selectIdentifyCoordinates(),r=e.selectResolution(),s=e.selectIdentifyBufferValue();let o=null;if(s>0)o=e.selectIdentifyBufferFeature();else if(typeof t[0]=="number"){const d=point(t),m=r*5/1e3;o=index_default$1(d,m,{units:"kilometers"})}else o=polygon(t);return o},doIdentifyFire:()=>({dispatch:e,store:t})=>{e({type:"IDENTIFY_STARTED",payload:{shouldFire:!1}}),t.doSetCursor("wait");const r=t.selectIdentifyListeners();parallel(r,(s,o)=>{if(s)return t.doSetCursor("default"),e({type:"IDENTIFY_ERROR",payload:{err:s,notification:{level:"danger",title:"Identify Error",message:`${JSON.stringify(s)}`}}});{const d=flatten(o);e({type:"IDENTIFY_SUCCESS",payload:{results:d}}),t.doSetCursor("default")}})},selectIdentifyCoordinates:e=>e.identify.coordinates,selectIdentifyListeners:e=>e.identify.listeners,selectIdentifyResults:e=>e.identify.results,reactIdentifyShouldFire:e=>{if(e.identify.shouldFire)return{actionCreator:"doIdentifyFire"}}};window.olStyle={Style,Fill,Stroke,Circle,Text,RegularShape};const defaultVectorStyle=[new Style({stroke:new Stroke({color:"rgba(255, 255, 255, 0.9)",width:4}),fill:new Fill({color:"rgba(255, 255, 255, 0.2)"})}),new Style({stroke:new Stroke({color:"rgba(0, 0, 0, 0.8)",lineDash:[4,4],width:2})}),new Style({image:new Circle({radius:8,stroke:new Stroke({color:"rgba(0, 0, 0, 0.8)",width:2}),fill:new Fill({color:"rgba(255, 255, 255, 1)"})})})],vectorStyleCreator=options=>options.styleFn?eval(options.styleFn):options.style?options.style:options.styleAttributes?(e,t)=>{const r=e.get("fillColor"),s=e.get("strokeColor"),o=e.get("strokeWidth"),d=e.get("strokeDash"),m=e.get("markerRadius"),g=e.get("markerColor"),y=e.get("markerStrokeColor"),b=e.get("markerStrokeWidth"),x=e.get("markerFillColor"),E=new Style;return r&&E.setFill(new Fill({color:r})),(s||o||d)&&E.setStroke(new Stroke({color:s||"rgba(0, 0, 0, 0.5)",lineDash:d?d.split(","):[10,10],width:o||2})),(g||m||y||b||x)&&E.setImage(new Circle({radius:m||3,stroke:new Stroke({color:y||"rgba(0, 0, 0, 0.7)",width:b||0}),fill:new Fill({color:x||"rgba(255, 255, 255, 0.2)"})})),E}:defaultVectorStyle,esrijsonFormat$1=new EsriJSON,origin=window.location.origin,isCrossOrigin=e=>{if(window.MSInputMethodContext&&document.documentMode)return null;if(e){if(e.indexOf(origin)===-1)return"anonymous"}else return null};function formatLabeledUrl(e){const t=e.indexOf("?")===-1?"?":"&";return`${e}${t}label=true`}function getXyzSource(e){const r=!!e.labelDefault?formatLabeledUrl(e.url):e.url;return new XYZ({attributions:e.attributions||e.attribution,attributionsCollapsible:!0,maxZoom:e.maxzoom,minZoom:e.minzoom,url:r,crossOrigin:isCrossOrigin(e.url)})}function getArcGISTiledSource(e){return new TileArcGISRest({url:e.url,params:{LAYERS:"show:"+e.layerList},crossOrigin:isCrossOrigin(e.url)})}function getArcGISImageSource(e){return new ImageArcGISRest({url:e.url,params:{LAYERS:"show:"+e.layerList},crossOrigin:isCrossOrigin(e.url)})}function getWmsSource(e){const t=e.params||e;return t.LAYERS=e.layerList||e.LAYERS,e.tiled===!0?new TileWMS({url:e.url,params:t,crossOrigin:isCrossOrigin(e.url)}):new ImageWMS({url:e.url,params:t,crossOrigin:isCrossOrigin(e.url)})}function getLocalVectorSource(e){const t=new VectorSrc,{features:r}=e;return r&&t.addFeatures(r),t}function getRemoteVectorSource(e){return new VectorSrc({format:new GeoJSON,url:e.url})}function getEsriVectorSource(e){let t=e.url;const r=e.layerList;/\/$/.test(t)||(t+="/");const o=new VectorSrc({loader:function(d,m,g){const y=encodeURIComponent(`{"xmin":${d[0]},"ymin":${d[1]},"xmax":${d[2]},"ymax":${d[3]},"spatialReference":{"wkid":102100}}`),b=`${t}${r}/query/?f=json&returnGeometry=true&spatialRel=esriSpatialRelIntersects&geometry=${y}&geometryType=esriGeometryEnvelope&inSR=102100&outFields=*&outSR=102100`;xhr.get(b,(x,E,C)=>{if(x)return console.log(x);const S=JSON.parse(C),A=esrijsonFormat$1.readFeatures(S,{featureProjection:g});A.length>0&&o.addFeatures(A)})},strategy:loadingstrategy.tile(tilegrid.createXYZ({tileSize:512}))});return o}function getTileLayer(e,t){return new Tile({source:t,visible:e.visible,zIndex:e.zIndex||0,opacity:e.opacity||1,maxZoom:e.maxzoom,minZoom:e.minzoom})}function getImageLayer(e,t){return new Image$1({source:t,visible:e.visible,zIndex:e.zIndex||0,opacity:e.opacity||1,maxZoom:e.maxzoom,minZoom:e.minzoom})}function getLocalVectorLayer(e,t){return new Vector({altitudeMode:"clampToGround",source:t,visible:e.visible,style:vectorStyleCreator(e),zIndex:e.zIndex||0,opacity:e.opacity||1,maxZoom:e.maxzoom,minZoom:e.minzoom})}function getRemoteVectorLayer(e,t){const r=new Vector({altitudeMode:"clampToGround",source:t,visible:e.visible,style:vectorStyleCreator(e),zIndex:e.zIndex||0,opacity:e.opacity||1,renderMode:"image",maxZoom:e.maxzoom,minZoom:e.minzoom});return e.uid,r}function getEsriVectorLayer(options,source,map){const lyr=new Vector({altitudeMode:"clampToGround",source,visible:options.visible,zIndex:options.zIndex||0,opacity:options.opacity||1,renderMode:"image",maxZoom:options.maxzoom,minZoom:options.minzoom}),proj=map?map.getView().getProjection():null;if(options.styleFn){const styleFn=eval(options.styleFn);lyr.setStyle(styleFn[0])}else olEsriStyle.createStyleFunctionFromUrl(`${options.url}/${options.layerList}`,proj).then(e=>{lyr.setStyle(e)}).catch(function(e){console.log("$$$$$$$$$$$$$$$$$$$$$$$$"),console.log(`${options.url}/${options.layerList}: ${e}`),console.log(e)});return lyr}function getSource(e){switch(e.serviceType){case"XYZ":return getXyzSource(e);case"ArcGIS":return getArcGISTiledSource(e);case"ArcGISImage":return getArcGISImageSource(e);case"WMS":return getWmsSource(e);case"LocalVector":return getLocalVectorSource(e);case"RemoteVector":return getRemoteVectorSource(e);case"EsriFeatureService":return getEsriVectorSource(e);default:return null}}function getLayer(e,t,r){switch(t||(t=getSource(e)),e.serviceType){case"XYZ":return getTileLayer(e,t);case"ArcGIS":return getTileLayer(e,t);case"ArcGISImage":return getImageLayer(e,t);case"WMS":return getImageLayer(e,t);case"LocalVector":return getLocalVectorLayer(e,t);case"RemoteVector":return getRemoteVectorLayer(e,t);case"EsriFeatureService":return getEsriVectorLayer(e,t,r);default:return null}}const mapBasemapBundle={name:"basemaps",getReducer(){const e={shouldCheckDefault:!1,activeBasemap:0,idx:0};return(t=e,{type:r,payload:s})=>{switch(r){case"BASEMAP_CHANGED":case"BASEMAP_CHECKING_DEFAULT":return Object.assign({},t,s);case"MAP_INITIALIZED":return Object.assign({},t,{shouldCheckDefault:!0});default:return t}}},doBasemapsCheckDefault:()=>({dispatch:e,store:t})=>{e({type:"BASEMAP_CHECKING_DEFAULT",payload:{shouldCheckDefault:!1}});const r=t.selectDefaultConfig();r.map.hasOwnProperty("basemap")&&t.doChangeBasemap(r.map.basemap)},doChangeBasemap:e=>({dispatch:t,store:r})=>{let s=r.selectActiveBasemap();const o=r.selectBasemapList(),d=r.selectMap(),m=o[e];m.serviceType||(m.serviceType="XYZ");const g=getSource(m);s||(s=getLayer({serviceType:"XYZ",visible:!0})),d.removeLayer(s),s.setSource(g),d.getLayers().insertAt(0,s),t({type:"BASEMAP_CHANGED",payload:{activeBasemap:s,idx:e}})},selectActiveBasemap:e=>e.basemaps.activeBasemap,selectActiveBasemapIdx:e=>e.basemaps.idx,reactBasemapsShouldCheckDefault:e=>{if(e.basemaps.shouldCheckDefault)return{actionCreator:"doBasemapsCheckDefault"}}},createOlMapBundle=e=>{const r=Object.assign({},{name:"map",center:[-98.579,39.828],zoom:5,rotation:0,minZoom:0,maxZoom:22,addons:{},limitMapExtent:!1},e);return Object.assign({},{name:r.name,getReducer:()=>{const s={map:null,opts:null,geoProjection:proj.get("EPSG:4326"),webProjection:proj.get("EPSG:3857"),center:r.center,zoom:r.zoom,rotation:r.rotation,minZoom:r.minZoom,maxZoom:r.maxZoom,limitMapExtent:r.limitMapExtent,shouldInitialize:!1,shouldResetViewState:!1,shouldUpdateViewState:!1};return(o=s,{type:d,payload:m})=>{if(console.log(d,m),r.additionalActions.indexOf(d)!==-1)return Object.assign({},o,m);switch(d){case"MAP_INITIALIZED":case"MAP_RESET_MAP_VIEW":case"MAP_UPDATED_VIEW_STATE_STARTED":case"MAP_UPDATED_VIEW_STATE_FINISHED":case"MAP_LOADING":case"MAP_LOADED":return Object.assign({},o,m);default:return o}}},doMapInitialize:(s,o)=>({dispatch:d,store:m})=>{if(m.selectMap())return;const y=m.selectMapGeoProjection(),b=m.selectMapWebProjection(),E=(o.hasOwnProperty("limitMapExtent")?o.limitMapExtent:null)?proj.transformExtent([-180,-85,180,85],y,b):null,C=o.hasOwnProperty("center")?o.center:m.selectMapCenter(),S=o.hasOwnProperty("zoom")?o.zoom:m.selectMapZoom(),A=o.hasOwnProperty("rotation")?o.rotation:m.selectMapRotation(),N=o.hasOwnProperty("minZoom")?o.minZoom:m.selectMapMinZoom(),k=o.hasOwnProperty("maxZoom")?o.maxZoom:m.selectMapMaxZoom();console.log("setting up at",o.center,C);const L={center:proj.transform(C,y,b),zoom:S,rotation:A,minZoom:N,maxZoom:k};E&&(L.extent=E);const G=new View(L),M=new olMap({controls:[new ScaleBar({units:"us"})],target:s,view:G});M.on("moveend",debounce(m.doMapUpdateViewState,200)),M.on("precompose",debounce(m.doMapPreCompose,50)),M.on("rendercomplete",debounce(m.doMapRenderComplete,200)),d({type:"MAP_INITIALIZED",payload:{map:M,opts:o}})},doMapPreCompose:()=>({dispatch:s})=>{s({type:"MAP_LOADING"})},doMapRenderComplete:()=>({dispatch:s})=>{s({type:"MAP_LOADED"})},doMapUpdateSize:()=>({dispatch:s,store:o})=>{const d=o.selectMap();d&&d.updateSize()},doMapUpdateViewState:()=>({dispatch:s,store:o})=>{s({type:"MAP_UPDATED_VIEW_STATE_STARTED",payload:{shouldUpdateViewState:!1}});const d=o.selectMapGeoProjection(),m=o.selectMapWebProjection(),y=o.selectMap().getView(),b=proj.transform(y.getCenter(),m,d),x=y.getRotation()*(180/Math.PI),E=y.getZoom(),C=y.getMinZoom(),S=y.getMaxZoom();s({type:"MAP_UPDATED_VIEW_STATE_FINISHED",payload:{center:b,rotation:x,zoom:E,minZoom:C,maxZoom:S}})},doMapResetViewState:()=>({dispatch:s,store:o})=>{s({type:"MAP_RESET_MAP_VIEW",payload:{shouldResetViewState:!1}});const{center:d,zoom:m,rotation:g}=r,b=o.selectMap().getView(),x=o.selectMapGeoProjection(),E=o.selectMapWebProjection();b.animate({center:proj.transform(d,x,E),zoom:m,rotation:g},200)},doMapZoomTo:(s,o)=>({store:d})=>{d.selectMap().getView().animate({zoom:o||10,center:proj.fromLonLat(s)})},selectMap:s=>s.map.map,selectMapOpts:s=>s.map.opts,selectMapGeoProjection:s=>s.map.geoProjection,selectMapWebProjection:s=>s.map.webProjection,selectMapCenter:s=>s.map.center,selectMapZoom:reduxBundler.createSelector("selectAppTime","selectMap",(s,o)=>o?o.getView().getZoom():0),selectMapRotation:s=>s.map.rotation,selectMapMinZoom:s=>s.map.minZoom,selectMapMaxZoom:s=>s.map.maxZoom,reactMapShouldResetViewState:s=>{if(s.map.shouldResetViewState)return{actionCreator:"doMapResetViewState"}},reactMapShouldUpdateViewState:s=>{if(s.map.shouldUpdateViewState)return{actionCreator:"doMapUpdateViewState"}},persistActions:r.persistMapState?["MAP_UPDATED_VIEW_STATE_FINISHED","MAP_RESET_MAP_VIEW"]:[],init:s=>{window.addEventListener("resize",s.doMapUpdateSize)}},r.addons)},mapCoreBundle=createOlMapBundle({additionalActions:["MAP_CURSOR_CHANGED"],addons:{doSetCursor:e=>({dispatch:t})=>{let r=e;r||(r="grab"),t({type:"MAP_CURSOR_CHANGED",payload:{cursor:r}})},selectCursorClass:e=>e.map.cursor,selectView:reduxBundler.createSelector("selectMap",e=>e?e.getView():null)}}),mapInteractionBundle={name:"interactions",getReducer(){const e={active:[]};return(t=e,{type:r,payload:s})=>r==="INTERACTION_SET"?Object.assign({},t,{active:s}):r==="INTERACTION_UNSET"?Object.assign({},t,{active:[]}):t},doSetInteraction:e=>({dispatch:t,store:r})=>{const s=r.selectActiveInteractions();r.selectMap().addInteraction(e);const d=[e].concat(s);t({type:"INTERACTION_SET",payload:d})},doUnsetInteractions:()=>({dispatch:e,store:t})=>{const r=t.selectActiveInteractions(),s=t.selectMap();r.length&&r.forEach(o=>{o.setActive(!1),s.removeInteraction(o)}),e({type:"INTERACTION_UNSET"})},selectActiveInteractions:e=>e.interactions.active},zoomLevels=[5e8,25e7,15e7,7e7,35e6,15e6,1e7,4e6,2e6,1e6,5e5,25e4,15e4,7e4,35e3,15e3,8e3,4e3,2e3,1e3,500],scaleToMapZoom=(e,t)=>{if(!e)return t;if(e>=zoomLevels[0])return 0;if(e<zoomLevels[zoomLevels.length-1])return zoomLevels.length-1;let r=0;for(var s=1;s<zoomLevels.length;s++)if(e>=zoomLevels[s]&&e<zoomLevels[s-1]){r=s;break}return r},createNode=(e,t)=>(e.type||(e.type=e.serviceType||"Folder"),e.uid||(e.uid=uuid.v4()),e.minzoom||(e.minzoom=scaleToMapZoom(e.maxscale,0)),e.maxzoom||(e.maxzoom=scaleToMapZoom(e.minscale,20)),{id:e.id,teamDatasetId:e.teamDatasetId,uid:e.uid,parent:null,children:[],root:e.root||!1,leaf:e.type!=="Folder",collapsed:e.collapsed||!0,visible:e.visible||!1,sortOrder:e.layerOrder||0,displayName:e.displayName,type:e.type,geometryType:e.geometryType,layerList:e.layerList,mapLayer:e.type!=="Folder"?e.mapLayer||getLayer(e,null,t):null,labelsOn:e.labelsOn?e.labelsOn:!!e.labelDefault,labelDefault:!!e.labelDefault,labelEnabled:!!e.labelEnabled,url:e.url,info:e.info,identifyType:e.identifyType,identifyFields:e.identifyFields,identifyRenameColums:e.identifyRenameColums,identifyFormatColumns:e.identifyFormatColumns,legend:e.legend,legendOverride:!!e.legendOverride,passFilter:!0,zoomTo:!!e.zoomTo,minzoom:e.minzoom,maxzoom:e.maxzoom,styleFn:e.styleFn,favorite:!1,userDefaultLayer:!1,selectAllLayers:e.selectAllLayers,layerDescription:e.layerDescription,attributions:e.attributions,moreInfo:e.moreInfo,resourceDownload:e.resourceDownload,hoverText:e.hoverText,folderHoverText:e.folderHoverText,folderURL:e.folderURL,groupTag:e.groupTag,layerFunction:e.layerFunction,layerParams:e.layerParams}),isParentOf=(e,t)=>{let r=[];function s(o){o.parent&&(r.push(o.parent),s(o.parent))}return s(t),r.indexOf(e)!==-1},removeFromParent=e=>{const t=e.parent,r=t.children.indexOf(e);t.children.splice(r,1)},insertNodeAt=(e,t,r)=>{e.parent=t,t.children.splice(r,0,e)},mapLayersBundle={defaultParentUid:null,name:"layers",getReducer(){const e={appTime:null,layers:{},idMap:{},resetNeeded:!1,filterString:"",showFilter:!1,favoriteLayers:[],userDefaultLayers:[],overrideSortLayerOrder:!1,sortOrderStatus:!1};return(t=e,{type:r,payload:s})=>r==="LAYERS_LIST_UPDATED"?Object.assign({},t,{appTime:new Date,layers:s,resetNeeded:!0}):r==="LAYERS_IDMAP_UPDATED"?Object.assign({},t,{appTime:new Date,idMap:s}):r==="LAYERS_ORDER_UPDATED"?Object.assign({},t,{resetNeeded:!1}):r==="LAYERS_ORDER_OVERRIDE_SORT_ORDER"?Object.assign({},t,s):r==="LAYERS_TOGGLE_FILTER"?Object.assign({},t,s):r==="LAYERS_FILTER_CHANGED"?Object.assign({},t,s):r==="LAYERS_FAVORITES_LIST_UPDATED"?Object.assign({},t,s):r==="LAYERS_USER_DEFAULT_LAYERS_LIST_UPDATED"?Object.assign({},t,s):r==="SORT_ORDER_NOW_SHOWING"?Object.assign({},t,s):t},doLayersToggleFilter:e=>({dispatch:t})=>{t({type:"LAYERS_TOGGLE_FILTER",payload:{showFilter:e}})},doLayersUpdateFilter:e=>({dispatch:t,store:r})=>{const s=r.selectLayers();function o(m){m.passFilter=!0,m.children&&m.children.length&&m.children.forEach(o)}function d(m){m.passFilter=!0,e&&(m.collapsed=!1),m.parent&&d(m.parent)}Object.keys(s).forEach(m=>{const g=s[m];g.passFilter=!1;const y=g.displayName.toUpperCase().indexOf(e.toUpperCase())!==-1;g.groupTag&&g.groupTag.length>0&&g.groupTag.forEach(b=>{b&&b.toUpperCase().indexOf(e.toUpperCase())!==-1&&(g.passFilter=!0)}),y&&(g.passFilter=!0)}),Object.keys(s).forEach(m=>{const g=s[m];g.passFilter&&(o(g),d(g))}),console.log("filtered layers",s),t({type:"LAYERS_FILTER_CHANGED",payload:{filterString:e,layers:Object.assign({},s)}})},doAddLayer:e=>({dispatch:t,store:r})=>{const s=r.selectLayers(),o=r.selectIdMap(),d=r.selectMap(),m=createNode(e,d);if(e.id){const y=Object.assign({},o,{[e.id]:m.uid});t({type:"LAYERS_IDMAP_UPDATED",payload:y})}if(e.parentUid){const y=s[e.parentUid];m.parent=y,y.children.push(m)}if(m.mapLayer&&(d.addLayer(m.mapLayer),console.log("tried to add layer with zoomto = ",m.zoomTo),m.zoomTo)){const y=m.mapLayer.getSource();d.getView().fit(y.getExtent())}const g=Object.assign({},s,{[m.uid]:m});t({type:"LAYERS_LIST_UPDATED",payload:g})},doActivateUserDefaultLayers:()=>({dispatch:e,store:t})=>{const r=t.selectUserDefaultLayers(),s=t.selectLayers();r.forEach(o=>{const d=s[o.uid];d&&d.mapLayer&&(d.visible=!0,d.mapLayer.setVisible(!0))}),e({type:"LAYERS_LIST_UPDATED",payload:Object.assign({},s)})},doAddLayersBulk:e=>({dispatch:t,store:r})=>{const s=r.selectTreeRootNode(),o=r.selectLayers(),d=r.selectIdMap(),m=r.selectMap();for(var g=0;g<e.length;g++){const y=e[g];if(!y||!y.id)break;const b=createNode(y,m);d[y.id]=b.uid,o[b.uid]=b,b.mapLayer&&m&&m.addLayer(b.mapLayer)}t({type:"LAYERS_IDMAP_UPDATED",payload:Object.assign({},d)});for(var g=0;g<e.length;g++){const b=e[g];if(!b||!b.id)break;let x=o[d[b.id]],E;b.parentId?E=o[d[b.parentId]]:E=s,E&&E.hasOwnProperty("uid")&&(x.parent=E,E.children.push(x))}t({type:"LAYERS_LIST_UPDATED",payload:Object.assign({},o)})},doTreeInsertAfter:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectLayers(),d=o[e],m=o[t];if(!isParentOf(d,m)){removeFromParent(d);const g=m.parent,y=g.children.indexOf(m)+1;insertNodeAt(d,g,y)}r({type:"LAYERS_LIST_UPDATED",payload:Object.assign({},o)})},doTreeInsertBefore:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectLayers(),d=o[e],m=o[t];if(!isParentOf(d,m)){removeFromParent(d);const g=m.parent,y=g.children.indexOf(m);insertNodeAt(d,g,y)}r({type:"LAYERS_LIST_UPDATED",payload:Object.assign({},o)})},doTreeInsertChild:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectLayers(),d=o[e],m=o[t];if(!isParentOf(d,m)){removeFromParent(d);const g=m;insertNodeAt(d,g,g.children.length)}r({type:"LAYERS_LIST_UPDATED",payload:Object.assign({},o)})},doTreeMerge:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectLayers(),d=o[e],m=o[t];if(!isParentOf(d,m)){const g=m.parent,y=g.children.indexOf(m);removeFromParent(d);const b=createNode({root:!1,leaf:!1,teamDatasetId:null,collapsed:!1,visible:!1,sortOrder:0,displayName:"New Folder",type:"Folder"},map);d.parent=b,m.parent=b,b.children.push(m),b.children.push(d),b.parent=g,g.children.splice(y,1,b)}r({type:"LAYERS_LIST_UPDATED",payload:Object.assign({},o)})},doTreeRemove:e=>({dispatch:t,store:r})=>{const s=r.selectMap(),o=r.selectLayers(),d=o[e];function m(g){g&&(g.children&&g.children.length&&g.children.forEach(function(y){m(y)}),g.mapLayer&&s.removeLayer(g.mapLayer),removeFromParent(g),delete o[g.uid])}m(d),t({type:"LAYERS_LIST_UPDATED",payload:Object.assign({},o)}),t({type:"LAYER_REMOVED",payload:{uid:e}})},doTreeUpdate:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectLayers(),d=o[e];Object.keys(t).forEach(m=>{m!=="uid"&&(d[m]=t[m])}),r({type:"LAYERS_LIST_UPDATED",payload:Object.assign({},o)})},doTreeSetCollapsedAll:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectLayers(),d=o[e];function m(g){g.collapsed=t,g.children.length>0&&g.children.forEach(m)}m(d),r({type:"LAYERS_LIST_UPDATED",payload:Object.assign({},o)})},doTreeSetCollapsed:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectLayers(),d=o[e];d.collapsed=t,r({type:"LAYERS_LIST_UPDATED",payload:Object.assign({},o)})},doTreeSetVisibleAll:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectLayers(),d=o[e];function m(g){g.mapLayer&&(g.mapLayer.setVisible(t),g.visible=t),g.children.length>0&&g.children.forEach(m)}m(d),r({type:"LAYERS_LIST_UPDATED",payload:Object.assign({},o)})},doLayerSetVisible:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectLayers(),d=o[e];if(d.mapLayer&&(d.visible=t,d.mapLayer.setVisible(t)),r({type:"LAYERS_LIST_UPDATED",payload:Object.assign({},o)}),d.visible&&d.layerFunction&&d.layerParams){const m=d.layerParams,g=d.layerFunction,y=s[g];y&&y(m)}},doLayerSetLabels:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectLayers(),d=o[e];function m(g){const y=g.indexOf("?")===-1?"?":"&";return`${g}${y}label=true`}if(d.mapLayer){d.labelsOn=t;const g=d.mapLayer.getSource(),b=g.getUrls().map(x=>t?m(d.url):d.url);g.setUrls(b)}r({type:"LAYERS_LIST_UPDATED",payload:Object.assign({},o)})},doLayerSetLayerOrder:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectLayers(),d=o[e];d.mapLayer&&(d.sortOrder=t,d.mapLayer.setZIndex(t)),r({type:"LAYERS_LIST_UPDATED",payload:Object.assign({},o)})},doLayerSetOpactiy:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectLayers(),d=o[e];d.mapLayer&&d.mapLayer.setOpacity(t),r({type:"LAYERS_LIST_UPDATED",payload:Object.assign({},o)})},doUpdateLayerOrder:()=>({dispatch:e,store:t})=>{const r=t.selectTreeRootNode(),s=t.selectOverrideSortOrder();let o=999;function d(m){let g=o--;m.mapLayer&&(s?m.mapLayer.setZIndex(m.sortOrder):(m.sortOrder=g,m.mapLayer.setZIndex(g))),m.children&&m.children.forEach(d)}d(r),e({type:"LAYERS_ORDER_UPDATED"})},doUpdateFavoriteLayers:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectFavoriteLayers(),m=s.selectLayers()[t.uid];if(e==="add")o.push(m);else{const g=o.findIndex(function(y){return y.uid===t.uid});g!==-1&&o.splice(g,1)}r({type:"LAYERS_FAVORITES_LIST_UPDATED",payload:{favoriteLayers:o}})},doLayerSetFavorite:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectLayers(),d=o[e];d.favorite=t,r({type:"LAYERS_LIST_UPDATED",payload:Object.assign({},o)})},doUpdateUserDefaultLayers:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectUserDefaultLayers(),m=s.selectLayers()[t.uid];if(e==="add")o.push(m);else{const g=o.findIndex(function(y){return y.uid===t.uid});g!==-1&&o.splice(g,1)}r({type:"LAYERS_USER_DEFAULT_LAYERS_LIST_UPDATED",payload:{userDefaultLayers:o}})},doLayerSetUserDefaultLayers:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectLayers(),d=o[e];d.userDefaultLayer=t,r({type:"LAYERS_LIST_UPDATED",payload:Object.assign({},o)})},doOverrideSortOrder:e=>({dispatch:t})=>{t({type:"LAYERS_ORDER_OVERRIDE_SORT_ORDER",payload:{overrideSortLayerOrder:e}})},doShowLayerSortOrder:e=>({dispatch:t})=>{e&&t({type:"SORT_ORDER_NOW_SHOWING",payload:{sortOrderStatus:!0}})},selectSortOrderStatus:e=>e.layers.sortOrderStatus,selectFavoriteLayers:e=>e.layers.favoriteLayers,selectUserDefaultLayers:e=>e.layers.userDefaultLayers,selectLayers:e=>e.layers.layers,selectIdMap:e=>e.layers.idMap,selectUidMap:reduxBundler.createSelector("selectLayers",e=>{const t={};return Object.keys(e).forEach(r=>{e[r]&&(t[r]=e[r].displayName)}),t}),selectCmLayers:reduxBundler.createSelector("selectLayers",e=>{const t=[];return Object.keys(e).forEach(r=>{e[r]&&e[r].teamDatasetId&&t.push(e[r].teamDatasetId)}),t}),selectVisibleLayers:reduxBundler.createSelector("selectLayers",e=>{const t=[];return Object.keys(e).forEach(r=>{e[r]&&e[r].visible&&t.push(e[r])}),t}),selectVisibleCmLayers:reduxBundler.createSelector("selectLayers",e=>{const t=[];return Object.keys(e).forEach(r=>{e[r]&&e[r].teamDatasetId&&e[r].visible&&t.push(e[r].teamDatasetId)}),t}),selectCmLayerNames:reduxBundler.createSelector("selectLayers",e=>{const t=[];return Object.keys(e).forEach(r=>{e[r]&&e[r].teamDatasetId&&t.push({teamDatasetId:e[r].teamDatasetId,displayName:e[r].displayName})}),t}),selectLayerFilterString:e=>e.layers.filterString,selectLayerShowFilter:e=>e.layers.showFilter,selectOverrideSortOrder:e=>e.layers.overrideSortLayerOrder,reactResetSortOrder:e=>{if(e.layers.resetNeeded)return{actionCreator:"doUpdateLayerOrder"}}},mapProjBundle={name:"proj",getReducer(){const e={epsgio:!1,displayProjection:"EPSG:4326",displayProjectionName:"WGS 84 - WGS84 - World Geodetic System 1984","EPSG:4326":{epsg:"EPSG:4326",name:"WGS 84 - WGS84 - World Geodetic System 1984",proj:proj.get("EPSG:4326")},"EPSG:3857":{epsg:"EPSG:3857",name:"WGS 84 / Pseudo-Mercator - Spherical Mercator",proj:proj.get("EPSG:3857")}};return(t=e,{type:r,payload:s})=>r==="PROJECTION_LOAD_SUCCESS"?Object.assign({},t,{[s.epsg]:s}):r==="PROJECTION_REMOVED"?Object.assign({},s):r==="PROJECTION_SELECTED"?Object.assign({},t,s):r==="PROJECTION_PING_RESULT"?Object.assign({},t,{epsgio:s.epsgio}):t},doLoadProjDef:e=>({dispatch:t,store:r,anonGet:s})=>{t({type:"PROJECTION_LOAD_START"});const o=/PROJCS..(.*)..GEOGCS/g;let d=e;e.indexOf(":")!==-1&&(d=d.split(":")[1]),s(`https://epsg.io/${d}.proj4`,(m,g,y)=>{y?s(`https://epsg.io/${d}.wkt`,(b,x,E)=>{if(E){const C=o.exec(E)[1];proj4.defs(e,y),proj.addProjection(new Projection({code:e})),t({type:"PROJECTION_LOAD_SUCCESS",payload:{epsg:e,name:C,def:proj.get(e)}})}}):t({type:"PROJECTION_LOAD_ERROR",payload:g})})},doProjectionPingEPSGIO:()=>({dispatch:e,anonGet:t})=>{t("https://epsg.io/26916.wkt",(s,o,d)=>{d&&e({type:"PROJECTION_PING_RESULT",payload:{epsgio:!0}})})},doRemoveProjection:e=>({dispatch:t,store:r})=>{const s=Object.assign({},r.selectProjectionStateRaw());delete s[e],t({type:"PROJECTION_REMOVED",payload:s})},doSelectProjection:(e,t)=>({dispatch:r})=>{r({type:"PROJECTION_SELECTED",payload:{displayProjection:e,displayProjectionName:t}})},selectGeoProjection:e=>e.proj["EPSG:4326"].proj,selectMapProjection:e=>e.proj["EPSG:3857"].proj,selectProjectionStateRaw:e=>e.proj,selectProjectionList:e=>_.values(e.proj).filter(t=>typeof t=="object"),selectDisplayProjection:e=>e.proj.displayProjection,selectDisplayProjectionName:e=>e.proj.displayProjectionName,selectProjectionCanUseEPSGIO:e=>e.proj.epsgio,init(e){e.doProjectionPingEPSGIO()}},animateView=(e,t)=>{t.animate(e)},zoomToLocation=(e,t,r)=>{animateView({center:e,zoom:t},r)},mapViewBundle={name:"view",getReducer:()=>{const e={shouldReadUrlParams:!1,shouldSetDefaults:!1,center:[-98.579,39.828],zoom:4,rotation:0,position:{},heading:0,pitch:0,roll:0,minZoom:0,maxZoom:22,action:null,updating:!1,listening:!1,shouldUpdateZoom:!1};return(t=e,{type:r,payload:s})=>{switch(r){case"VIEW_SET_DEFAULTS_START":case"VIEW_SET_DEFAULTS":case"VIEW_SET_PARAMS_START":case"VIEW_SET_PARAMS_COMPLETE":return Object.assign({},t,s);case"WINDOW_LOCATION_PARSED":return Object.assign({},t,{shouldReadUrlParams:!0});case"MAP_INITIALIZED":return Object.assign({},t,{shouldSetDefaults:!0})}return r==="VIEW_START_ACTION"?Object.assign({},t,{updating:!0}):r==="VIEW_END_ACTION"?Object.assign({},t,{updating:!1}):r==="VIEW_EVENTS_REGISTERED"?Object.assign({},t,{listening:!0}):r==="VIEW_CHANGED"?Object.assign({},t,s):t}},doViewSetDefaults:e=>({dispatch:t,store:r})=>{t({type:"VIEW_SET_DEFAULTS_START",payload:{shouldSetDefaults:!1}});const s={center:e.centerX&&e.centerY?[e.centerX,e.centerY]:[-95.579,39.828],zoom:e.centerZ?e.centerZ:4,rotation:e.rotation?e.rotation:0,position:{},heading:e.heading3d?e.heading3d:0,pitch:0,roll:0,minZoom:e.minzoom?e.minzoom:0,maxZoom:e.maxzoom?e.maxzoom:22};t({type:"VIEW_SET_DEFAULTS",payload:s})},doViewSetFromParams:()=>({dispatch:e,store:t})=>{e({type:"VIEW_SET_PARAMS_START",payload:{shouldReadUrlParams:!1}});const r=t.selectViewState(),s=t.selectWindowLocationParams();Number(s.x)&&(r.center[0]=Number(s.x)),Number(s.y)&&(r.center[1]=Number(s.y)),Number(s.z)&&(r.zoom=Number(s.z)),t.doSetView(r)},doZoomToExtent:(e,t)=>({dispatch:r,store:s})=>{r({type:"VIEW_START_ACTION"});const o=s.selectMap();s.selectView().fit(e,{size:o.getSize(),duration:500,minResolution:10,callback:()=>{t&&typeof t=="function"&&t(),r({type:"VIEW_END_ACTION"})}})},doZoomToLayerExtent:e=>({dispatch:t,store:r})=>{},doZoomToLocation:(e,t)=>({dispatch:r,store:s})=>{r({type:"VIEW_START_ACTION"});const o=s.selectView();zoomToLocation(e,t,o),r({type:"VIEW_END_ACTION"})},doZoomIn:()=>({dispatch:e,store:t})=>{e({type:"VIEW_START_ACTION"});const r=t.selectView(),s=r.getZoom();animateView({zoom:s+1},r),e({type:"VIEW_END_ACTION"})},doZoomOut:()=>({dispatch:e,store:t})=>{e({type:"VIEW_START_ACTION"});const r=t.selectView(),s=r.getZoom();animateView({zoom:s-1},r),e({type:"VIEW_END_ACTION"})},doSetRotationNorth:()=>({dispatch:e,store:t})=>{e({type:"VIEW_START_ACTION"});const r=t.selectView();animateView({rotation:0},r),e({type:"VIEW_END_ACTION"})},doUpdateView:e=>({dispatch:t,store:r})=>{const o=e.map.getView(),d=o.getZoom(),m=proj.transform(o.getCenter(),r.selectMapProjection(),"EPSG:4326"),g=o.getRotation()*(180/Math.PI);t({type:"VIEW_CHANGED",payload:{center:m,zoom:d,rotation:g}})},doSetView:e=>({dispatch:t,store:r})=>{const s=r.selectView();if(!s)return null;animateView({center:proj.transform(e.center,"EPSG:4326",r.selectMapProjection()),zoom:e.zoom,rotation:e.rotation},s)},doListenToMap:()=>({dispatch:e,store:t})=>{t.selectMap(),e({type:"VIEW_EVENTS_REGISTERED"})},selectViewState:e=>e.view,selectViewAction:e=>e.view.action,selectViewCenter:reduxBundler.createSelector("selectAppTime","selectMap","selectViewState",(e,t,r)=>{if(!t)return r.center;const s=t.getView();return s?s.getCenter():r.center}),selectMapSize:reduxBundler.createSelector("selectMap","selectAppTime",(e,t)=>e?e.getSize():null),selectMapImageDisplay:reduxBundler.createSelector("selectMapSize",e=>e?[e[0],e[1],92]:null),selectMapExtent:reduxBundler.createSelector("selectAppTime","selectView","selectMapSize","selectMapProjection",(e,t,r,s)=>{if(!t)return null;const o=t.calculateExtent(r),d=proj.transform([o[0],o[1]],s,"EPSG:4326"),m=proj.transform([o[2],o[3]],s,"EPSG:4326");return[d[0],d[1],m[0],m[1]]}),selectResolution:reduxBundler.createSelector("selectView","selectAppTime",(e,t)=>e?e.getResolution():null),reactAddListeners:e=>{if(!e.view.listening&&e.map.map2d)return{actionCreator:"doListenToMap"}},reactViewShouldReadUrlParams:e=>{if(e.view.shouldReadUrlParams)return{actionCreator:"doViewSetFromParams"}},reactViewShouldSetDefaults:e=>{if(e.view.shouldSetDefaults)return{actionCreator:"doViewSetDefaults",args:[e.config.default.map]}}},createContainerBundle=e=>{const r=Object.assign({},{name:"container",children:null,options:null,openedBy:null,addons:{},additionalActions:[],additionalState:{}},e),s=r.name.charAt(0).toUpperCase()+r.name.slice(1),o=r.name.toUpperCase(),d={OPENED:`${o}_OPENED`,CLOSED:`${o}_CLOSED`},m=`do${s}Open`,g=`do${s}Close`,y=`select${s}Children`,b=`select${s}Options`,x=`select${s}OpenedBy`;return Object.assign({},{name:r.name,getReducer:()=>{const C=Object.assign({children:r.children,options:r.options,openedBy:r.openedBy},r.additionalState);return(S=C,{type:A,payload:N})=>{if(r.additionalActions.indexOf(A)!==-1)return Object.assign({},S,N);switch(A){case d.OPENED:case d.CLOSED:return Object.assign({},S,N);default:return S}}},[m]:({children:C,options:S,openedBy:A})=>({dispatch:N})=>{C.length||(C=[C]),N({type:d.OPENED,payload:{children:C,options:S,openedBy:A}})},[g]:()=>({dispatch:C})=>{C({type:d.CLOSED,payload:{children:null,options:null,openedBy:null}})},[y]:C=>C[r.name].children,[b]:C=>C[r.name].options,[x]:C=>C[r.name].openedBy},r.addons)},modalWindowBundle=createContainerBundle({name:"modal"}),notificationBundle={name:"notifications",getReducer(){const e={};return(t=e,{type:r,payload:s})=>{if(s&&s.notification){const o=uuid.v4();return s.notification.uid=o,Object.assign({},t,{[o]:s.notification})}switch(r){case"NOTIFICATIONS_FIRED":case"NOTIFICATIONS_DISMISSED":return Object.assign({},t,s);default:return t}}},doNotificationsFire:e=>({dispatch:t,store:r})=>{const s=uuid.v4();e.uid=s,t({type:"NOTIFICATIONS_FIRED",payload:{[s]:e}})},doNotificationsDismiss:e=>({dispatch:t,store:r})=>{const s=r.selectNotifications();delete s[e],t({type:"NOTIFICATIONS_DISMISSED",payload:s})},selectNotifications:e=>e.notifications},pluginBundle={name:"plugins",getReducer(){const e={loading:!1,components:[]};return(t=e,{type:r,payload:s})=>r==="PLUGINS_STARTED_LOADING"?Object.assign({},t,{loading:!0}):r==="PLUGINS_STOPPED_LOADING"?Object.assign({},t,{loading:!1}):r==="PLUGINS_ADDED_COMPONENTS"?Object.assign({},t,{components:t.components.concat(s)}):t},doAddPluginComponents:e=>({dispatch:t})=>{t({type:"PLUGINS_ADDED_COMPONENTS",payload:e})},doStartLoadingPlugins:()=>({dispatch:e,store:t})=>{e({type:"PLUGINS_STARTED_LOADING"})},doStopLoadingPlugins:()=>({dispatch:e})=>{e({type:"PLUGINS_STOPPED_LOADING"})},selectPluginsAreLoading:e=>e.plugins.loading,selectAllComponents:e=>e.plugins.components,selectComponentsLeftSidebarTop:reduxBundler.createSelector("selectAllComponents",e=>_.map(_.sortBy(_.filter(e,{region:"left-sidebar-top"}),["sortOrder"]),t=>t.component)),selectComponentsLeftSidebarBottom:reduxBundler.createSelector("selectAllComponents",e=>_.map(_.sortBy(_.filter(e,{region:"left-sidebar-bottom"}),["sortOrder"]),t=>t.component)),selectComponentsLeftSidebarCount:reduxBundler.createSelector("selectComponentsLeftSidebarTop","selectComponentsLeftSidebarBottom",(e,t)=>e.length+t.length),selectComponentsRightSidebarTop:reduxBundler.createSelector("selectAllComponents",e=>_.map(_.sortBy(_.filter(e,{region:"right-sidebar-top"}),["sortOrder"]),t=>t.component)),selectComponentsRightSidebarBottom:reduxBundler.createSelector("selectAllComponents",e=>_.map(_.sortBy(_.filter(e,{region:"right-sidebar-bottom"}),["sortOrder"]),t=>t.component)),selectComponentsRightSidebarCount:reduxBundler.createSelector("selectComponentsUpperRight","selectComponentsLowerRight","selectComponentsRightSidebarTop","selectComponentsRightSidebarBottom",(e,t,r,s)=>e.length+t.length+r.length+s.length),selectComponentsBasicToolbar:reduxBundler.createSelector("selectAllComponents",e=>_.map(_.sortBy(_.filter(e,{region:"basic-toolbar"}),["sortOrder"]),t=>t.component)),selectComponentsBasicToolbarCount:reduxBundler.createSelector("selectComponentsBasicToolbar",e=>e.length),selectComponentsLowerRight:reduxBundler.createSelector("selectAllComponents",e=>_.map(_.sortBy(_.filter(e,{region:"lower-right-toolbar"}),["sortOrder"]),t=>t.component)),selectComponentsUpperRight:reduxBundler.createSelector("selectAllComponents",e=>_.map(_.sortBy(_.filter(e,{region:"upper-right-toolbar"}),["sortOrder"]),t=>t.component))},primaryPanelBundle=createContainerBundle({name:"primaryPanel",additionalState:{width:300,showClose:!1,showFavoritesBtn:!1,favoritesDB:null,showUserDefaultLayersBtn:!1,userDefaultLayersDB:null},additionalActions:["PRIMARY_PANEL_RESIZED","PRIMARY_PANEL_SHOW_CLOSE","PRIMARY_PANEL_SET_WIDTH","PRIMARY_PANEL_SHOW_FAVORITES_BTN","PRIMARY_PANEL_SHOW_USER_DEFAULT_LAYERS_BTN"],addons:{doPrimaryPanelResize:({width:e})=>({dispatch:t})=>{t({type:"PRIMARY_PANEL_RESIZED",payload:{width:e}})},doPrimaryPanelSetWidth:e=>({dispatch:t})=>{t({type:"PRIMARY_PANEL_SET_WIDTH",payload:{width:e}})},doShowPrimaryPanelCloseBtn:()=>({dispatch:e})=>{e({type:"PRIMARY_PANEL_SHOW_CLOSE",payload:{showClose:!0}})},doShowFavoritesBtn:e=>({dispatch:t})=>{t({type:"PRIMARY_PANEL_SHOW_FAVORITES_BTN",payload:{showFavoritesBtn:!0,favoritesDB:e}})},doShowUserDefaultLayersBtn:e=>({dispatch:t})=>{t({type:"PRIMARY_PANEL_SHOW_USER_DEFAULT_LAYERS_BTN",payload:{showUserDefaultLayersBtn:!0,userDefaultLayersDB:e}})},selectPrimaryPanelWidth:e=>e.primaryPanel.width,selectPrimaryPanelShowClose:e=>e.primaryPanel.showClose,selectPrimaryPanelShowFavoritesBtn:e=>e.primaryPanel.showFavoritesBtn,selectPrimaryPanelFavoritesDB:e=>e.primaryPanel.favoritesDB,selectPrimaryPanelShowUserDefaultLayersBtn:e=>e.primaryPanel.showUserDefaultLayersBtn,selectPrimaryPanelUserDefaultLayersDB:e=>e.primaryPanel.userDefaultLayersDB,selectPrimaryPanelTop:reduxBundler.createSelector("selectComponentsBasicToolbarCount",e=>e>0?42:0)}}),searchBundle={name:"search",getReducer(){const e={shouldFireSearch:!1,q:"",selected:null,onFireSearchListeners:[],results:[]};return(t=e,{type:r,payload:s})=>r.indexOf("SEARCH_")!==-1?Object.assign({},t,s):t},doSearchAddCollection:e=>({dispatch:t,store:r})=>{const s=r.selectSearchOnFireSearchListeners();e.onFireSearch&&s.push(e.onFireSearch),t({type:"SEARCH_COLLECTION_ADDED",payload:{onFireSearchListeners:s}})},doSearchShouldFire:()=>({dispatch:e})=>{e({type:"SEARCH_SHOULD_FIRE",payload:{shouldFire:!0}})},doSearchSetQuery:e=>({dispatch:t,store:r})=>{t({type:"SEARCH_SET_QUERY",payload:{q:e,results:[]}})},doSearchSelectItem:e=>({dispatch:t})=>{t({type:"SEARCH_ITEM_SELECTED",payload:{selected:e}})},doSearchFire:()=>({dispatch:e,store:t})=>{e({type:"SEARCH_START",payload:{shouldFire:!1}});const r=t.selectSearchOnFireSearchListeners();async.parallel(r,(s,o)=>{if(s)return e({type:"SEARCH_ERROR",payload:{err:s,results:[]}});const d=_.flatten(o),m=[],g=[];d.forEach(b=>{b.provider!=="geocoder"&&g.push(b),b.provider==="geocoder"&&m.push(b)});const y=[...g,...m];e({type:"SEARCH_SUCCESS",payload:{results:y}})})},selectSearchOnFireSearchListeners:e=>e.search.onFireSearchListeners,selectSearchQueryString:e=>e.search.q,selectSearchResults:e=>e.search.results,reactSearchShouldFire:e=>{if(e.search.shouldFire)return{actionCreator:"doSearchFire"}}},southRegionBundle={name:"southRegion",getReducer:()=>{const e={children:{},_shouldTryToCloseRegion:!1};return(t=e,{type:r,payload:s})=>{switch(r){case"SOUTH_REGION_OPENED":case"SOUTH_REGION_CLOSED":case"SOUTH_REGION_TAB_CLOSED":case"SOUTH_REGION_TRY_CLOSE":return Object.assign({},t,s);default:return t}}},doSouthRegionOpen:e=>({dispatch:t,store:r})=>{const s=r.selectSouthRegionChildrenObj(),o=uuid.v4();e.uid=o,t({type:"SOUTH_REGION_OPENED",payload:{children:{...s,[o]:e}}})},doSouthRegionClose:()=>({dispatch:e,store:t})=>{e({type:"SOUTH_REGION_CLOSED",payload:{children:{}}})},doSouthRegionCloseTab:e=>({dispatch:t,store:r})=>{const s=r.selectSouthRegionChildrenObj();delete s[e],t({type:"SOUTH_REGION_TAB_CLOSED",payload:{children:{...s},_shouldTryToCloseRegion:!0}})},doSouthRegionTryClose:()=>({dispatch:e,store:t})=>{e({type:"SOUTH_REGION_TRY_CLOSE",payload:{_shouldTryToCloseRegion:!1}}),t.selectSouthRegionChildren().length||t.doSouthRegionClose()},selectSouthRegionChildrenObj:e=>e.southRegion.children,selectSouthRegionChildren:reduxBundler.createSelector("selectSouthRegionChildrenObj",e=>{const t=[];for(var r in e)t.push(e[r]),t.unshift(t.pop());return t}),reactSouthRegionTryToCloseRegion:e=>{if(e.southRegion._shouldTryToCloseRegion)return{actionCreator:"doSouthRegionTryClose"}}},themeBundle={name:"theme",getReducer:()=>{const e={theme:"bg-blue-chambray",iconSize:"default"};return(t=e,{type:r,payload:s})=>{switch(r){case"THEME_CHANGED":case"THEME_SET_LARGER_ICONS":return Object.assign({},t,s);default:return t}}},doThemeSet:e=>({dispatch:t})=>{t({type:"THEME_CHANGED",payload:{theme:e}})},doThemeSetLargeIcons:()=>({dispatch:e})=>{e({type:"THEME_SET_LARGER_ICONS",payload:{iconSize:"large"}})},selectTheme:e=>e.theme.theme,selectThemeIconSize:e=>e.theme.iconSize},verticalLayoutBundle={name:"vLayout",getReducer:()=>{const e={height:window.innerHeight-20,hNorth:1,hSouth:0,_shouldUpdateMap:!1};return(t=e,{type:r,payload:s})=>{switch(r){case"VLAYOUT_UPDATE_HEIGHT":case"VLAYOUT_MAP_UPDATE_START":return Object.assign({},t,s);case"SOUTH_REGION_OPENED":return Object.assign({},t,{hNorth:.5,hSouth:.5,_shouldUpdateMap:!0});case"SOUTH_REGION_CLOSED":return Object.assign({},t,{hNorth:1,hSouth:0,_shouldUpdateMap:!0});default:return t}}},doVLayoutResize:(e,t)=>({dispatch:r})=>{r({type:"VLAYOUT_UPDATE_HEIGHT",payload:{hNorth:e,hSouth:t,_shouldUpdateMap:!0}})},doVLayoutSetHeight:e=>({dispatch:t})=>{t({type:"VLAYOUT_UPDATE_HEIGHT",payload:{height:e}})},doVLayoutUpdateMap:()=>({dispatch:e,store:t})=>{e({type:"VLAYOUT_MAP_UPDATE_START",payload:{_shouldUpdateMap:!1}}),t.selectMap().updateSize()},selectVLayoutHeight:e=>e.vLayout.height,selectNorthHeight:e=>e.vLayout.height*e.vLayout.hNorth,selectSouthHeight:e=>e.vLayout.height*e.vLayout.hSouth,reactVLayoutShouldUpdateMap:e=>{if(e.vLayout._shouldUpdateMap)return{actionCreator:"doVLayoutUpdateMap"}}},viewportBundle={name:"viewport",getReducer(){const e={h:window.innerHeight,w:window.innerWidth};return(t=e,{type:r,payload:s})=>r==="WINDOW_RESIZE"?Object.assign({},t,{h:window.innerHeight,w:window.innerWidth}):t},doHandleResize:()=>({dispatch:e,store:t})=>{t.selectMap().updateSize(),e({type:"WINDOW_RESIZE"})},selectViewportHeight:e=>e.viewport.h,selectViewportWidth:e=>e.viewport.w,init:e=>{window.addEventListener("resize",_.debounce(e.doHandleResize,300))}};function QueryStringToJSON(e){const t=e.slice(1).split("&"),r={};return t.forEach(function(s){s=s.split("="),r[s[0]]=decodeURIComponent(s[1]||"")}),JSON.parse(JSON.stringify(r))}const windowLocationBundle={name:"windowLocation",getReducer(){const e={shouldParse:!0,host:null,href:null,origin:null,pathname:null,search:null,params:null};return(t=e,{type:r,payload:s})=>{switch(r){case"WINDOW_LOCATION_PARSE_START":case"WINDOW_LOCATION_PARSED":return Object.assign({},t,s);default:return t}}},doWindowLocationParse:()=>({dispatch:e,store:t})=>{e({type:"WINDOW_LOCATION_PARSE_START",payload:{shouldParse:!1}});const r=window.location,s=r.host,o=r.href,d=r.origin,m=r.pathname,g=r.search;let y=QueryStringToJSON(g);e({type:"WINDOW_LOCATION_PARSED",payload:{host:s,href:o,origin:d,pathname:m,search:g,params:y}})},selectWindowLocationHost:e=>e.windowLocation.host,selectWindowLocationHref:e=>e.windowLocation.Href,selectWindowLocationOrigin:e=>e.windowLocation.origin,selectWindowLocationPathname:e=>e.windowLocation.pathname,selectWindowLocationSearch:e=>e.windowLocation.search,selectWindowLocationParams:e=>e.windowLocation.params,reactWindowShouldParseLocation:e=>{if(e.windowLocation.shouldParse)return{actionCreator:"doWindowLocationParse"}}},getStore=reduxBundler.composeBundles(apiBundle,basicToolbarBundle,reduxBundler.createCacheBundle({cacheFn:cache.set}),configBundle,exportBundle,identifyBundle,mapBasemapBundle,mapCoreBundle,mapInteractionBundle,mapLayersBundle,mapProjBundle,mapViewBundle,modalWindowBundle,notificationBundle,pluginBundle,primaryPanelBundle,searchBundle,southRegionBundle,themeBundle,verticalLayoutBundle,viewportBundle,windowLocationBundle),loadPlugins=(e,t)=>{e.doStartLoadingPlugins();const r=[];t&&t.length&&t.forEach(s=>{const o=btoa(s.pluginName);r.indexOf(o)===-1&&(s.bundle&&(s.bundle.length||(s.bundle=[s.bundle]),s.bundle.forEach(d=>{e.integrateBundles(d)})),s.hasOwnProperty("components")&&e.doAddPluginComponents(s.components),r.push(o))}),e.doStopLoadingPlugins()};let defaultMapboxToken="pk.eyJ1IjoidXNhY2UiLCJhIjoiY2p4YW5hdjR6MThoZDNubG1mdG1rYXR1dSJ9.1jDEJhe6OP-e6iZNeEtzjA",mapboxTokenEnvVariable="undefined",mapboxToken=mapboxTokenEnvVariable==="undefined"?defaultMapboxToken:mapboxTokenEnvVariable;const config$1={map:{basemap:0,centerX:-98.579,centerY:39.828,centerZ:7,altitude3d:14771168,heading3d:0,tilt3d:0,minzoom:0,maxzoom:22,rotation:0},dim:"2d",theme:"bg-blue-chambray",mapboxToken,basemaps:[{id:"OpenStreetMap",name:"OpenStreetMap",url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png",maxZoom:19,attributions:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',visible:!0},{id:"MapBoxStreets",name:"MapBox Streets",url:"https://api.mapbox.com/styles/v1/usace/cm938rc8w003b01rc9tge72ew/tiles/256/{z}/{x}/{y}?access_token={accessToken}",attributions:'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',subdomains:"abcd",accessToken:mapboxToken,visible:!1},{id:"MapBoxAerial",name:"MapBox Aerial",url:"https://api.mapbox.com/styles/v1/usace/cm939otin006r01qthub96e0f/tiles/256/{z}/{x}/{y}?access_token={accessToken}",attributions:'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',subdomains:"abcd",accessToken:mapboxToken,visible:!1},{id:"MapBoxOutdoor",name:"MapBox Outdoor",url:"https://api.mapbox.com/styles/v1/usace/cm939k4g0007v01qu4q5x0yew/tiles/256/{z}/{x}/{y}?access_token={accessToken}",attributions:'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',subdomains:"abcd",accessToken:mapboxToken,visible:!1},{id:"Monochrome Light",name:"Monochrome Light",url:"https://api.mapbox.com/styles/v1/usace/cm9394kdo003101ri16n4crq0/tiles/256/{z}/{x}/{y}?access_token={accessToken}",attributions:'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',subdomains:"abcd",accessToken:mapboxToken,visible:!1},{id:"Monochrome Dark",name:"Monochrome Dark",url:"https://api.mapbox.com/styles/v1/usace/cm939gizu003301r9hn5zcdi7/tiles/256/{z}/{x}/{y}?access_token={accessToken}",attributions:'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',subdomains:"abcd",accessToken:mapboxToken,visible:!1},{id:"Navigation Dark",name:"Navigation Dark",url:"https://api.mapbox.com/styles/v1/usace/cm939ltif005101qta6p168vj/tiles/256/{z}/{x}/{y}?access_token={accessToken}",attributions:'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',subdomains:"abcd",accessToken:mapboxToken,visible:!1},{id:"Navigation Light",name:"Navigation Light",url:"https://api.mapbox.com/styles/v1/usace/cm939n8jo007w01qugu58707v/tiles/256/{z}/{x}/{y}?access_token={accessToken}",attributions:'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',subdomains:"abcd",accessToken:mapboxToken,visible:!1},{id:"EsriWorldStreetMap",name:"ESRI Streetmap",url:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}",attributions:"Tiles &copy; Esri &mdash; Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012",visible:!1},{id:"EsriWorldImagery",name:"ESRI World Imagery",url:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",attributions:"Tiles &copy; Esri &mdash; Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community",visible:!1},{id:"EsriUSATopoMaps",name:"ESRI Topo Maps",url:"https://services.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer/tile/{z}/{y}/{x}",attributions:"Tiles &copy; Esri &mdash; Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community",visible:!1},{id:"EsriWorldShadedRelief",name:"ESRI World Hillshade",url:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Shaded_Relief/MapServer/tile/{z}/{y}/{x}",attributions:"Tiles &copy; Esri &mdash; Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community",visible:!1},{id:"EsriWorldOcean",name:"ESRI World Ocean",url:"https://services.arcgisonline.com/ArcGIS/rest/services/Ocean/World_Ocean_Base/MapServer/tile/{z}/{y}/{x}",attributions:"Tiles &copy; Esri &mdash; Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community",visible:!1},{id:"USGSImageryTopo",name:"USGS Imagery/Topo",url:"https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryTopo/MapServer/tile/{z}/{y}/{x}",attributions:"Tiles &copy; Esri &mdash; Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community",visible:!1},{id:"CartoDBDarkMatter",name:"CartoDB Dark Matter",url:"https://cartodb-basemaps-{a-d}.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png",attributions:'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> &copy; <a href="https://cartodb.com/attributionss">CartoDB</a>',subdomains:"abcd",maxZoom:19,visible:!1},{id:"CartoDBPositron",name:"CartoDB Positron",url:"https://cartodb-basemaps-{a-d}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png",attributions:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> &copy; <a href="https://cartodb.com/attributionss">CartoDB</a>',subdomains:"abcd",maxZoom:19,visible:!1}],datasetsDontUse:[{id:null,parentId:null,layerOrder:1,mapId:646,mapUuid:null,teamId:null,datasetId:null,teamDatasetId:null,serviceType:"EsriFeatureService",tiled:0,displayName:"Foundational Project Area",description:"",url:"https://services7.arcgis.com/n1YM8pTrFmm7L4hs/ArcGIS/rest/services/corps_projects/FeatureServer",grids:null,layerList:"1",attribution:null,geometryType:"POINT",minzoom:1,maxzoom:22,abstract:null,purpose:null,status:null,keywords:null,localTable:null,metadataUrl:null,minX:-177.47,maxX:-64.71000000000001,minY:13.43,maxY:72.55,opacity:1,useMapfile:1,queryTemplate:"",hoverTemplate:"",queryable:1,visible:0,collapsed:1,idCol:"objectid",shapeCol:"SHAPE",allowEdit:0,allowExport:1,createdBy:"1380992694",createDate:"2017-12-12T13:15:12.000Z",cacheTiles:0,labelDefault:0,labelEnabled:0,deep:2,path:"depricated",styleFn:`(
8
+ `)}return f.toString()}},{key:"computeEdgeEndLabels",value:function(f){for(var n=this.iterator();n.hasNext();)n.next().computeLabel(f)}},{key:"computeLabelling",value:function(f){this.computeEdgeEndLabels(f[0].getBoundaryNodeRule()),this.propagateSideLabels(0),this.propagateSideLabels(1);for(var n=[!1,!1],a=this.iterator();a.hasNext();)for(var h=a.next().getLabel(),v=0;v<2;v++)h.isLine(v)&&h.getLocation(v)===q.BOUNDARY&&(n[v]=!0);for(var I=this.iterator();I.hasNext();)for(var R=I.next(),T=R.getLabel(),O=0;O<2;O++)if(T.isAnyNull(O)){var W=q.NONE;if(n[O])W=q.EXTERIOR;else{var re=R.getCoordinate();W=this.getLocation(O,re,f)}T.setAllLocationsIfNull(O,W)}}},{key:"getDegree",value:function(){return this._edgeMap.size()}},{key:"insertEdgeEnd",value:function(f,n){this._edgeMap.put(f,n),this._edgeList=null}}],[{key:"constructor_",value:function(){this._edgeMap=new ur,this._edgeList=null,this._ptInAreaLocation=[q.NONE,q.NONE]}}])})(),Yn=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"linkResultDirectedEdges",value:function(){this.getResultAreaEdges();for(var a=null,h=null,v=this._SCANNING_FOR_INCOMING,I=0;I<this._resultAreaEdgeList.size();I++){var R=this._resultAreaEdgeList.get(I),T=R.getSym();if(R.getLabel().isArea())switch(a===null&&R.isInResult()&&(a=R),v){case this._SCANNING_FOR_INCOMING:if(!T.isInResult())continue;h=T,v=this._LINKING_TO_OUTGOING;break;case this._LINKING_TO_OUTGOING:if(!R.isInResult())continue;h.setNext(R),v=this._SCANNING_FOR_INCOMING}}if(v===this._LINKING_TO_OUTGOING){if(a===null)throw new at("no outgoing dirEdge found",this.getCoordinate());pe.isTrue(a.isInResult(),"unable to link last incoming dirEdge"),h.setNext(a)}}},{key:"insert",value:function(a){var h=a;this.insertEdgeEnd(h,h)}},{key:"getRightmostEdge",value:function(){var a=this.getEdges(),h=a.size();if(h<1)return null;var v=a.get(0);if(h===1)return v;var I=a.get(h-1),R=v.getQuadrant(),T=I.getQuadrant();return lt.isNorthern(R)&&lt.isNorthern(T)?v:lt.isNorthern(R)||lt.isNorthern(T)?v.getDy()!==0?v:I.getDy()!==0?I:(pe.shouldNeverReachHere("found two horizontal edges incident on node"),null):I}},{key:"print",value:function(a){Je.out.println("DirectedEdgeStar: "+this.getCoordinate());for(var h=this.iterator();h.hasNext();){var v=h.next();a.print("out "),v.print(a),a.println(),a.print("in "),v.getSym().print(a),a.println()}}},{key:"getResultAreaEdges",value:function(){if(this._resultAreaEdgeList!==null)return this._resultAreaEdgeList;this._resultAreaEdgeList=new De;for(var a=this.iterator();a.hasNext();){var h=a.next();(h.isInResult()||h.getSym().isInResult())&&this._resultAreaEdgeList.add(h)}return this._resultAreaEdgeList}},{key:"updateLabelling",value:function(a){for(var h=this.iterator();h.hasNext();){var v=h.next().getLabel();v.setAllLocationsIfNull(0,a.getLocation(0)),v.setAllLocationsIfNull(1,a.getLocation(1))}}},{key:"linkAllDirectedEdges",value:function(){this.getEdges();for(var a=null,h=null,v=this._edgeList.size()-1;v>=0;v--){var I=this._edgeList.get(v),R=I.getSym();h===null&&(h=R),a!==null&&R.setNext(a),a=I}h.setNext(a)}},{key:"computeDepths",value:function(){if(arguments.length===1){var a=arguments[0],h=this.findIndex(a),v=a.getDepth(he.LEFT),I=a.getDepth(he.RIGHT),R=this.computeDepths(h+1,this._edgeList.size(),v);if(this.computeDepths(0,h,R)!==I)throw new at("depth mismatch at "+a.getCoordinate())}else if(arguments.length===3){for(var T=arguments[1],O=arguments[2],W=arguments[0];W<T;W++){var re=this._edgeList.get(W);re.setEdgeDepths(he.RIGHT,O),O=re.getDepth(he.LEFT)}return O}}},{key:"mergeSymLabels",value:function(){for(var a=this.iterator();a.hasNext();){var h=a.next();h.getLabel().merge(h.getSym().getLabel())}}},{key:"linkMinimalDirectedEdges",value:function(a){for(var h=null,v=null,I=this._SCANNING_FOR_INCOMING,R=this._resultAreaEdgeList.size()-1;R>=0;R--){var T=this._resultAreaEdgeList.get(R),O=T.getSym();switch(h===null&&T.getEdgeRing()===a&&(h=T),I){case this._SCANNING_FOR_INCOMING:if(O.getEdgeRing()!==a)continue;v=O,I=this._LINKING_TO_OUTGOING;break;case this._LINKING_TO_OUTGOING:if(T.getEdgeRing()!==a)continue;v.setNextMin(T),I=this._SCANNING_FOR_INCOMING}}I===this._LINKING_TO_OUTGOING&&(pe.isTrue(h!==null,"found null for first outgoing dirEdge"),pe.isTrue(h.getEdgeRing()===a,"unable to link last incoming dirEdge"),v.setNextMin(h))}},{key:"getOutgoingDegree",value:function(){if(arguments.length===0){for(var a=0,h=this.iterator();h.hasNext();)h.next().isInResult()&&a++;return a}if(arguments.length===1){for(var v=arguments[0],I=0,R=this.iterator();R.hasNext();)R.next().getEdgeRing()===v&&I++;return I}}},{key:"getLabel",value:function(){return this._label}},{key:"findCoveredLineEdges",value:function(){for(var a=q.NONE,h=this.iterator();h.hasNext();){var v=h.next(),I=v.getSym();if(!v.isLineEdge()){if(v.isInResult()){a=q.INTERIOR;break}if(I.isInResult()){a=q.EXTERIOR;break}}}if(a===q.NONE)return null;for(var R=a,T=this.iterator();T.hasNext();){var O=T.next(),W=O.getSym();O.isLineEdge()?O.getEdge().setCovered(R===q.INTERIOR):(O.isInResult()&&(R=q.EXTERIOR),W.isInResult()&&(R=q.INTERIOR))}}},{key:"computeLabelling",value:function(a){A(n,"computeLabelling",this,1).call(this,a),this._label=new xt(q.NONE);for(var h=this.iterator();h.hasNext();)for(var v=h.next().getEdge().getLabel(),I=0;I<2;I++){var R=v.getLocation(I);R!==q.INTERIOR&&R!==q.BOUNDARY||this._label.setLocation(I,q.INTERIOR)}}}],[{key:"constructor_",value:function(){this._resultAreaEdgeList=null,this._label=null,this._SCANNING_FOR_INCOMING=1,this._LINKING_TO_OUTGOING=2}}])})(Zn),Jn=(function(f){function n(){return o(this,n),s(this,n)}return E(n,f),g(n,[{key:"createNode",value:function(a){return new mr(a,new Yn)}}])})(Vr),en=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"compareTo",value:function(n){var a=n;return f.compareOriented(this._pts,this._orientation,a._pts,a._orientation)}},{key:"interfaces_",get:function(){return[X]}}],[{key:"constructor_",value:function(){this._pts=null,this._orientation=null;var n=arguments[0];this._pts=n,this._orientation=f.orientation(n)}},{key:"orientation",value:function(n){return We.increasingDirection(n)===1}},{key:"compareOriented",value:function(n,a,h,v){for(var I=a?1:-1,R=v?1:-1,T=a?n.length:-1,O=v?h.length:-1,W=a?0:n.length-1,re=v?0:h.length-1;;){var ne=n[W].compareTo(h[re]);if(ne!==0)return ne;var oe=(W+=I)===T,_e=(re+=R)===O;if(oe&&!_e)return-1;if(!oe&&_e)return 1;if(oe&&_e)return 0}}}])})(),Kn=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"print",value:function(f){f.print("MULTILINESTRING ( ");for(var n=0;n<this._edges.size();n++){var a=this._edges.get(n);n>0&&f.print(","),f.print("(");for(var h=a.getCoordinates(),v=0;v<h.length;v++)v>0&&f.print(","),f.print(h[v].x+" "+h[v].y);f.println(")")}f.print(") ")}},{key:"addAll",value:function(f){for(var n=f.iterator();n.hasNext();)this.add(n.next())}},{key:"findEdgeIndex",value:function(f){for(var n=0;n<this._edges.size();n++)if(this._edges.get(n).equals(f))return n;return-1}},{key:"iterator",value:function(){return this._edges.iterator()}},{key:"getEdges",value:function(){return this._edges}},{key:"get",value:function(f){return this._edges.get(f)}},{key:"findEqualEdge",value:function(f){var n=new en(f.getCoordinates());return this._ocaMap.get(n)}},{key:"add",value:function(f){this._edges.add(f);var n=new en(f.getCoordinates());this._ocaMap.put(n,f)}}],[{key:"constructor_",value:function(){this._edges=new De,this._ocaMap=new ur}}])})(),tn=(function(){return g((function f(){o(this,f)}),[{key:"processIntersections",value:function(f,n,a,h){}},{key:"isDone",value:function(){}}])})(),Qn=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"isTrivialIntersection",value:function(n,a,h,v){if(n===h&&this._li.getIntersectionNum()===1){if(f.isAdjacentSegments(a,v))return!0;if(n.isClosed()){var I=n.size()-1;if(a===0&&v===I||v===0&&a===I)return!0}}return!1}},{key:"getProperIntersectionPoint",value:function(){return this._properIntersectionPoint}},{key:"hasProperInteriorIntersection",value:function(){return this._hasProperInterior}},{key:"getLineIntersector",value:function(){return this._li}},{key:"hasProperIntersection",value:function(){return this._hasProper}},{key:"processIntersections",value:function(n,a,h,v){if(n===h&&a===v)return null;this.numTests++;var I=n.getCoordinates()[a],R=n.getCoordinates()[a+1],T=h.getCoordinates()[v],O=h.getCoordinates()[v+1];this._li.computeIntersection(I,R,T,O),this._li.hasIntersection()&&(this.numIntersections++,this._li.isInteriorIntersection()&&(this.numInteriorIntersections++,this._hasInterior=!0),this.isTrivialIntersection(n,a,h,v)||(this._hasIntersection=!0,n.addIntersections(this._li,a,0),h.addIntersections(this._li,v,1),this._li.isProper()&&(this.numProperIntersections++,this._hasProper=!0,this._hasProperInterior=!0)))}},{key:"hasIntersection",value:function(){return this._hasIntersection}},{key:"isDone",value:function(){return!1}},{key:"hasInteriorIntersection",value:function(){return this._hasInterior}},{key:"interfaces_",get:function(){return[tn]}}],[{key:"constructor_",value:function(){this._hasIntersection=!1,this._hasProper=!1,this._hasProperInterior=!1,this._hasInterior=!1,this._properIntersectionPoint=null,this._li=null,this._isSelfIntersection=null,this.numIntersections=0,this.numInteriorIntersections=0,this.numProperIntersections=0,this.numTests=0;var n=arguments[0];this._li=n}},{key:"isAdjacentSegments",value:function(n,a){return Math.abs(n-a)===1}}])})(),ei=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"getSegmentIndex",value:function(){return this.segmentIndex}},{key:"getCoordinate",value:function(){return this.coord}},{key:"print",value:function(f){f.print(this.coord),f.print(" seg # = "+this.segmentIndex),f.println(" dist = "+this.dist)}},{key:"compareTo",value:function(f){var n=f;return this.compare(n.segmentIndex,n.dist)}},{key:"isEndPoint",value:function(f){return this.segmentIndex===0&&this.dist===0||this.segmentIndex===f}},{key:"toString",value:function(){return this.coord+" seg # = "+this.segmentIndex+" dist = "+this.dist}},{key:"getDistance",value:function(){return this.dist}},{key:"compare",value:function(f,n){return this.segmentIndex<f?-1:this.segmentIndex>f?1:this.dist<n?-1:this.dist>n?1:0}},{key:"interfaces_",get:function(){return[X]}}],[{key:"constructor_",value:function(){this.coord=null,this.segmentIndex=null,this.dist=null;var f=arguments[0],n=arguments[1],a=arguments[2];this.coord=new J(f),this.segmentIndex=n,this.dist=a}}])})(),ti=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"print",value:function(f){f.println("Intersections:");for(var n=this.iterator();n.hasNext();)n.next().print(f)}},{key:"iterator",value:function(){return this._nodeMap.values().iterator()}},{key:"addSplitEdges",value:function(f){this.addEndpoints();for(var n=this.iterator(),a=n.next();n.hasNext();){var h=n.next(),v=this.createSplitEdge(a,h);f.add(v),a=h}}},{key:"addEndpoints",value:function(){var f=this.edge.pts.length-1;this.add(this.edge.pts[0],0,0),this.add(this.edge.pts[f],f,0)}},{key:"createSplitEdge",value:function(f,n){var a=n.segmentIndex-f.segmentIndex+2,h=this.edge.pts[n.segmentIndex],v=n.dist>0||!n.coord.equals2D(h);v||a--;var I=new Array(a).fill(null),R=0;I[R++]=new J(f.coord);for(var T=f.segmentIndex+1;T<=n.segmentIndex;T++)I[R++]=this.edge.pts[T];return v&&(I[R]=n.coord),new nn(I,new xt(this.edge._label))}},{key:"add",value:function(f,n,a){var h=new ei(f,n,a),v=this._nodeMap.get(h);return v!==null?v:(this._nodeMap.put(h,h),h)}},{key:"isIntersection",value:function(f){for(var n=this.iterator();n.hasNext();)if(n.next().coord.equals(f))return!0;return!1}}],[{key:"constructor_",value:function(){this._nodeMap=new ur,this.edge=null;var f=arguments[0];this.edge=f}}])})(),ri=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"isIntersects",value:function(){return!this.isDisjoint()}},{key:"isCovers",value:function(){return(f.isTrue(this._matrix[q.INTERIOR][q.INTERIOR])||f.isTrue(this._matrix[q.INTERIOR][q.BOUNDARY])||f.isTrue(this._matrix[q.BOUNDARY][q.INTERIOR])||f.isTrue(this._matrix[q.BOUNDARY][q.BOUNDARY]))&&this._matrix[q.EXTERIOR][q.INTERIOR]===H.FALSE&&this._matrix[q.EXTERIOR][q.BOUNDARY]===H.FALSE}},{key:"isCoveredBy",value:function(){return(f.isTrue(this._matrix[q.INTERIOR][q.INTERIOR])||f.isTrue(this._matrix[q.INTERIOR][q.BOUNDARY])||f.isTrue(this._matrix[q.BOUNDARY][q.INTERIOR])||f.isTrue(this._matrix[q.BOUNDARY][q.BOUNDARY]))&&this._matrix[q.INTERIOR][q.EXTERIOR]===H.FALSE&&this._matrix[q.BOUNDARY][q.EXTERIOR]===H.FALSE}},{key:"set",value:function(){if(arguments.length===1)for(var n=arguments[0],a=0;a<n.length;a++){var h=Math.trunc(a/3),v=a%3;this._matrix[h][v]=H.toDimensionValue(n.charAt(a))}else if(arguments.length===3){var I=arguments[0],R=arguments[1],T=arguments[2];this._matrix[I][R]=T}}},{key:"isContains",value:function(){return f.isTrue(this._matrix[q.INTERIOR][q.INTERIOR])&&this._matrix[q.EXTERIOR][q.INTERIOR]===H.FALSE&&this._matrix[q.EXTERIOR][q.BOUNDARY]===H.FALSE}},{key:"setAtLeast",value:function(){if(arguments.length===1)for(var n=arguments[0],a=0;a<n.length;a++){var h=Math.trunc(a/3),v=a%3;this.setAtLeast(h,v,H.toDimensionValue(n.charAt(a)))}else if(arguments.length===3){var I=arguments[0],R=arguments[1],T=arguments[2];this._matrix[I][R]<T&&(this._matrix[I][R]=T)}}},{key:"setAtLeastIfValid",value:function(n,a,h){n>=0&&a>=0&&this.setAtLeast(n,a,h)}},{key:"isWithin",value:function(){return f.isTrue(this._matrix[q.INTERIOR][q.INTERIOR])&&this._matrix[q.INTERIOR][q.EXTERIOR]===H.FALSE&&this._matrix[q.BOUNDARY][q.EXTERIOR]===H.FALSE}},{key:"isTouches",value:function(n,a){return n>a?this.isTouches(a,n):(n===H.A&&a===H.A||n===H.L&&a===H.L||n===H.L&&a===H.A||n===H.P&&a===H.A||n===H.P&&a===H.L)&&this._matrix[q.INTERIOR][q.INTERIOR]===H.FALSE&&(f.isTrue(this._matrix[q.INTERIOR][q.BOUNDARY])||f.isTrue(this._matrix[q.BOUNDARY][q.INTERIOR])||f.isTrue(this._matrix[q.BOUNDARY][q.BOUNDARY]))}},{key:"isOverlaps",value:function(n,a){return n===H.P&&a===H.P||n===H.A&&a===H.A?f.isTrue(this._matrix[q.INTERIOR][q.INTERIOR])&&f.isTrue(this._matrix[q.INTERIOR][q.EXTERIOR])&&f.isTrue(this._matrix[q.EXTERIOR][q.INTERIOR]):n===H.L&&a===H.L&&this._matrix[q.INTERIOR][q.INTERIOR]===1&&f.isTrue(this._matrix[q.INTERIOR][q.EXTERIOR])&&f.isTrue(this._matrix[q.EXTERIOR][q.INTERIOR])}},{key:"isEquals",value:function(n,a){return n===a&&f.isTrue(this._matrix[q.INTERIOR][q.INTERIOR])&&this._matrix[q.INTERIOR][q.EXTERIOR]===H.FALSE&&this._matrix[q.BOUNDARY][q.EXTERIOR]===H.FALSE&&this._matrix[q.EXTERIOR][q.INTERIOR]===H.FALSE&&this._matrix[q.EXTERIOR][q.BOUNDARY]===H.FALSE}},{key:"toString",value:function(){for(var n=new $t("123456789"),a=0;a<3;a++)for(var h=0;h<3;h++)n.setCharAt(3*a+h,H.toDimensionSymbol(this._matrix[a][h]));return n.toString()}},{key:"setAll",value:function(n){for(var a=0;a<3;a++)for(var h=0;h<3;h++)this._matrix[a][h]=n}},{key:"get",value:function(n,a){return this._matrix[n][a]}},{key:"transpose",value:function(){var n=this._matrix[1][0];return this._matrix[1][0]=this._matrix[0][1],this._matrix[0][1]=n,n=this._matrix[2][0],this._matrix[2][0]=this._matrix[0][2],this._matrix[0][2]=n,n=this._matrix[2][1],this._matrix[2][1]=this._matrix[1][2],this._matrix[1][2]=n,this}},{key:"matches",value:function(n){if(n.length!==9)throw new V("Should be length 9: "+n);for(var a=0;a<3;a++)for(var h=0;h<3;h++)if(!f.matches(this._matrix[a][h],n.charAt(3*a+h)))return!1;return!0}},{key:"add",value:function(n){for(var a=0;a<3;a++)for(var h=0;h<3;h++)this.setAtLeast(a,h,n.get(a,h))}},{key:"isDisjoint",value:function(){return this._matrix[q.INTERIOR][q.INTERIOR]===H.FALSE&&this._matrix[q.INTERIOR][q.BOUNDARY]===H.FALSE&&this._matrix[q.BOUNDARY][q.INTERIOR]===H.FALSE&&this._matrix[q.BOUNDARY][q.BOUNDARY]===H.FALSE}},{key:"isCrosses",value:function(n,a){return n===H.P&&a===H.L||n===H.P&&a===H.A||n===H.L&&a===H.A?f.isTrue(this._matrix[q.INTERIOR][q.INTERIOR])&&f.isTrue(this._matrix[q.INTERIOR][q.EXTERIOR]):n===H.L&&a===H.P||n===H.A&&a===H.P||n===H.A&&a===H.L?f.isTrue(this._matrix[q.INTERIOR][q.INTERIOR])&&f.isTrue(this._matrix[q.EXTERIOR][q.INTERIOR]):n===H.L&&a===H.L&&this._matrix[q.INTERIOR][q.INTERIOR]===0}},{key:"interfaces_",get:function(){return[Q]}}],[{key:"constructor_",value:function(){if(this._matrix=null,arguments.length===0)this._matrix=Array(3).fill().map((function(){return Array(3)})),this.setAll(H.FALSE);else if(arguments.length===1){if(typeof arguments[0]=="string"){var n=arguments[0];f.constructor_.call(this),this.set(n)}else if(arguments[0]instanceof f){var a=arguments[0];f.constructor_.call(this),this._matrix[q.INTERIOR][q.INTERIOR]=a._matrix[q.INTERIOR][q.INTERIOR],this._matrix[q.INTERIOR][q.BOUNDARY]=a._matrix[q.INTERIOR][q.BOUNDARY],this._matrix[q.INTERIOR][q.EXTERIOR]=a._matrix[q.INTERIOR][q.EXTERIOR],this._matrix[q.BOUNDARY][q.INTERIOR]=a._matrix[q.BOUNDARY][q.INTERIOR],this._matrix[q.BOUNDARY][q.BOUNDARY]=a._matrix[q.BOUNDARY][q.BOUNDARY],this._matrix[q.BOUNDARY][q.EXTERIOR]=a._matrix[q.BOUNDARY][q.EXTERIOR],this._matrix[q.EXTERIOR][q.INTERIOR]=a._matrix[q.EXTERIOR][q.INTERIOR],this._matrix[q.EXTERIOR][q.BOUNDARY]=a._matrix[q.EXTERIOR][q.BOUNDARY],this._matrix[q.EXTERIOR][q.EXTERIOR]=a._matrix[q.EXTERIOR][q.EXTERIOR]}}}},{key:"matches",value:function(){if(Number.isInteger(arguments[0])&&typeof arguments[1]=="string"){var n=arguments[0],a=arguments[1];return a===H.SYM_DONTCARE||a===H.SYM_TRUE&&(n>=0||n===H.TRUE)||a===H.SYM_FALSE&&n===H.FALSE||a===H.SYM_P&&n===H.P||a===H.SYM_L&&n===H.L||a===H.SYM_A&&n===H.A}if(typeof arguments[0]=="string"&&typeof arguments[1]=="string"){var h=arguments[1];return new f(arguments[0]).matches(h)}}},{key:"isTrue",value:function(n){return n>=0||n===H.TRUE}}])})(),ni=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"size",value:function(){return this._size}},{key:"addAll",value:function(n){return n===null||n.length===0?null:(this.ensureCapacity(this._size+n.length),Je.arraycopy(n,0,this._data,this._size,n.length),void(this._size+=n.length))}},{key:"ensureCapacity",value:function(n){if(n<=this._data.length)return null;var a=Math.max(n,2*this._data.length);this._data=Ze.copyOf(this._data,a)}},{key:"toArray",value:function(){var n=new Array(this._size).fill(null);return Je.arraycopy(this._data,0,n,0,this._size),n}},{key:"add",value:function(n){this.ensureCapacity(this._size+1),this._data[this._size]=n,++this._size}}],[{key:"constructor_",value:function(){if(this._data=null,this._size=0,arguments.length===0)f.constructor_.call(this,10);else if(arguments.length===1){var n=arguments[0];this._data=new Array(n).fill(null)}}}])})(),ii=(function(){function f(){o(this,f)}return g(f,[{key:"getChainStartIndices",value:function(n){var a=0,h=new ni(Math.trunc(n.length/2));h.add(a);do{var v=this.findChainEnd(n,a);h.add(v),a=v}while(a<n.length-1);return h.toArray()}},{key:"findChainEnd",value:function(n,a){for(var h=lt.quadrant(n[a],n[a+1]),v=a+1;v<n.length&&lt.quadrant(n[v-1],n[v])===h;)v++;return v-1}},{key:"OLDgetChainStartIndices",value:function(n){var a=0,h=new De;h.add(a);do{var v=this.findChainEnd(n,a);h.add(v),a=v}while(a<n.length-1);return f.toIntArray(h)}}],[{key:"toIntArray",value:function(n){for(var a=new Array(n.size()).fill(null),h=0;h<a.length;h++)a[h]=n.get(h).intValue();return a}}])})(),si=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"getCoordinates",value:function(){return this.pts}},{key:"getMaxX",value:function(f){var n=this.pts[this.startIndex[f]].x,a=this.pts[this.startIndex[f+1]].x;return n>a?n:a}},{key:"getMinX",value:function(f){var n=this.pts[this.startIndex[f]].x,a=this.pts[this.startIndex[f+1]].x;return n<a?n:a}},{key:"computeIntersectsForChain",value:function(){if(arguments.length===4){var f=arguments[0],n=arguments[1],a=arguments[2],h=arguments[3];this.computeIntersectsForChain(this.startIndex[f],this.startIndex[f+1],n,n.startIndex[a],n.startIndex[a+1],h)}else if(arguments.length===6){var v=arguments[0],I=arguments[1],R=arguments[2],T=arguments[3],O=arguments[4],W=arguments[5];if(I-v==1&&O-T==1)return W.addIntersections(this.e,v,R.e,T),null;if(!this.overlaps(v,I,R,T,O))return null;var re=Math.trunc((v+I)/2),ne=Math.trunc((T+O)/2);v<re&&(T<ne&&this.computeIntersectsForChain(v,re,R,T,ne,W),ne<O&&this.computeIntersectsForChain(v,re,R,ne,O,W)),re<I&&(T<ne&&this.computeIntersectsForChain(re,I,R,T,ne,W),ne<O&&this.computeIntersectsForChain(re,I,R,ne,O,W))}}},{key:"overlaps",value:function(f,n,a,h,v){return ye.intersects(this.pts[f],this.pts[n],a.pts[h],a.pts[v])}},{key:"getStartIndexes",value:function(){return this.startIndex}},{key:"computeIntersects",value:function(f,n){for(var a=0;a<this.startIndex.length-1;a++)for(var h=0;h<f.startIndex.length-1;h++)this.computeIntersectsForChain(a,f,h,n)}}],[{key:"constructor_",value:function(){this.e=null,this.pts=null,this.startIndex=null;var f=arguments[0];this.e=f,this.pts=f.getCoordinates();var n=new ii;this.startIndex=n.getChainStartIndices(this.pts)}}])})(),rn=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"getDepth",value:function(n,a){return this._depth[n][a]}},{key:"setDepth",value:function(n,a,h){this._depth[n][a]=h}},{key:"isNull",value:function(){if(arguments.length===0){for(var n=0;n<2;n++)for(var a=0;a<3;a++)if(this._depth[n][a]!==f.NULL_VALUE)return!1;return!0}if(arguments.length===1){var h=arguments[0];return this._depth[h][1]===f.NULL_VALUE}if(arguments.length===2){var v=arguments[0],I=arguments[1];return this._depth[v][I]===f.NULL_VALUE}}},{key:"normalize",value:function(){for(var n=0;n<2;n++)if(!this.isNull(n)){var a=this._depth[n][1];this._depth[n][2]<a&&(a=this._depth[n][2]),a<0&&(a=0);for(var h=1;h<3;h++){var v=0;this._depth[n][h]>a&&(v=1),this._depth[n][h]=v}}}},{key:"getDelta",value:function(n){return this._depth[n][he.RIGHT]-this._depth[n][he.LEFT]}},{key:"getLocation",value:function(n,a){return this._depth[n][a]<=0?q.EXTERIOR:q.INTERIOR}},{key:"toString",value:function(){return"A: "+this._depth[0][1]+","+this._depth[0][2]+" B: "+this._depth[1][1]+","+this._depth[1][2]}},{key:"add",value:function(){if(arguments.length===1)for(var n=arguments[0],a=0;a<2;a++)for(var h=1;h<3;h++){var v=n.getLocation(a,h);v!==q.EXTERIOR&&v!==q.INTERIOR||(this.isNull(a,h)?this._depth[a][h]=f.depthAtLocation(v):this._depth[a][h]+=f.depthAtLocation(v))}else if(arguments.length===3){var I=arguments[0],R=arguments[1];arguments[2]===q.INTERIOR&&this._depth[I][R]++}}}],[{key:"constructor_",value:function(){this._depth=Array(2).fill().map((function(){return Array(3)}));for(var n=0;n<2;n++)for(var a=0;a<3;a++)this._depth[n][a]=f.NULL_VALUE}},{key:"depthAtLocation",value:function(n){return n===q.EXTERIOR?0:n===q.INTERIOR?1:f.NULL_VALUE}}])})();rn.NULL_VALUE=-1;var nn=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"getDepth",value:function(){return this._depth}},{key:"getCollapsedEdge",value:function(){var a=new Array(2).fill(null);return a[0]=this.pts[0],a[1]=this.pts[1],new n(a,xt.toLineLabel(this._label))}},{key:"isIsolated",value:function(){return this._isIsolated}},{key:"getCoordinates",value:function(){return this.pts}},{key:"setIsolated",value:function(a){this._isIsolated=a}},{key:"setName",value:function(a){this._name=a}},{key:"equals",value:function(a){if(!(a instanceof n))return!1;var h=a;if(this.pts.length!==h.pts.length)return!1;for(var v=!0,I=!0,R=this.pts.length,T=0;T<this.pts.length;T++)if(this.pts[T].equals2D(h.pts[T])||(v=!1),this.pts[T].equals2D(h.pts[--R])||(I=!1),!v&&!I)return!1;return!0}},{key:"getCoordinate",value:function(){if(arguments.length===0)return this.pts.length>0?this.pts[0]:null;if(arguments.length===1){var a=arguments[0];return this.pts[a]}}},{key:"print",value:function(a){a.print("edge "+this._name+": "),a.print("LINESTRING (");for(var h=0;h<this.pts.length;h++)h>0&&a.print(","),a.print(this.pts[h].x+" "+this.pts[h].y);a.print(") "+this._label+" "+this._depthDelta)}},{key:"computeIM",value:function(a){n.updateIM(this._label,a)}},{key:"isCollapsed",value:function(){return!!this._label.isArea()&&this.pts.length===3&&!!this.pts[0].equals(this.pts[2])}},{key:"isClosed",value:function(){return this.pts[0].equals(this.pts[this.pts.length-1])}},{key:"getMaximumSegmentIndex",value:function(){return this.pts.length-1}},{key:"getDepthDelta",value:function(){return this._depthDelta}},{key:"getNumPoints",value:function(){return this.pts.length}},{key:"printReverse",value:function(a){a.print("edge "+this._name+": ");for(var h=this.pts.length-1;h>=0;h--)a.print(this.pts[h]+" ");a.println("")}},{key:"getMonotoneChainEdge",value:function(){return this._mce===null&&(this._mce=new si(this)),this._mce}},{key:"getEnvelope",value:function(){if(this._env===null){this._env=new ye;for(var a=0;a<this.pts.length;a++)this._env.expandToInclude(this.pts[a])}return this._env}},{key:"addIntersection",value:function(a,h,v,I){var R=new J(a.getIntersection(I)),T=h,O=a.getEdgeDistance(v,I),W=T+1;if(W<this.pts.length){var re=this.pts[W];R.equals2D(re)&&(T=W,O=0)}this.eiList.add(R,T,O)}},{key:"toString",value:function(){var a=new $t;a.append("edge "+this._name+": "),a.append("LINESTRING (");for(var h=0;h<this.pts.length;h++)h>0&&a.append(","),a.append(this.pts[h].x+" "+this.pts[h].y);return a.append(") "+this._label+" "+this._depthDelta),a.toString()}},{key:"isPointwiseEqual",value:function(a){if(this.pts.length!==a.pts.length)return!1;for(var h=0;h<this.pts.length;h++)if(!this.pts[h].equals2D(a.pts[h]))return!1;return!0}},{key:"setDepthDelta",value:function(a){this._depthDelta=a}},{key:"getEdgeIntersectionList",value:function(){return this.eiList}},{key:"addIntersections",value:function(a,h,v){for(var I=0;I<a.getIntersectionNum();I++)this.addIntersection(a,h,v,I)}}],[{key:"constructor_",value:function(){if(this.pts=null,this._env=null,this.eiList=new ti(this),this._name=null,this._mce=null,this._isIsolated=!0,this._depth=new rn,this._depthDelta=0,arguments.length===1){var a=arguments[0];n.constructor_.call(this,a,null)}else if(arguments.length===2){var h=arguments[0],v=arguments[1];this.pts=h,this._label=v}}},{key:"updateIM",value:function(){if(!(arguments.length===2&&arguments[1]instanceof ri&&arguments[0]instanceof xt))return A(n,"updateIM",this).apply(this,arguments);var a=arguments[0],h=arguments[1];h.setAtLeastIfValid(a.getLocation(0,he.ON),a.getLocation(1,he.ON),1),a.isArea()&&(h.setAtLeastIfValid(a.getLocation(0,he.LEFT),a.getLocation(1,he.LEFT),2),h.setAtLeastIfValid(a.getLocation(0,he.RIGHT),a.getLocation(1,he.RIGHT),2))}}])})(Mr),sn=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"setWorkingPrecisionModel",value:function(n){this._workingPrecisionModel=n}},{key:"insertUniqueEdge",value:function(n){var a=this._edgeList.findEqualEdge(n);if(a!==null){var h=a.getLabel(),v=n.getLabel();a.isPointwiseEqual(n)||(v=new xt(n.getLabel())).flip(),h.merge(v);var I=f.depthDelta(v),R=a.getDepthDelta()+I;a.setDepthDelta(R)}else this._edgeList.add(n),n.setDepthDelta(f.depthDelta(n.getLabel()))}},{key:"buildSubgraphs",value:function(n,a){for(var h=new De,v=n.iterator();v.hasNext();){var I=v.next(),R=I.getRightmostCoordinate(),T=new Jr(h).getDepth(R);I.computeDepth(T),I.findResultEdges(),h.add(I),a.add(I.getDirectedEdges(),I.getNodes())}}},{key:"createSubgraphs",value:function(n){for(var a=new De,h=n.getNodes().iterator();h.hasNext();){var v=h.next();if(!v.isVisited()){var I=new zt;I.create(v),a.add(I)}}return tr.sort(a,tr.reverseOrder()),a}},{key:"createEmptyResultGeometry",value:function(){return this._geomFact.createPolygon()}},{key:"getNoder",value:function(n){if(this._workingNoder!==null)return this._workingNoder;var a=new Sr,h=new Wt;return h.setPrecisionModel(n),a.setSegmentIntersector(new Qn(h)),a}},{key:"buffer",value:function(n,a){var h=this._workingPrecisionModel;h===null&&(h=n.getPrecisionModel()),this._geomFact=n.getFactory();var v=new Un(h,this._bufParams),I=new Hn(n,a,v).getCurves();if(I.size()<=0)return this.createEmptyResultGeometry();this.computeNodedEdges(I,h),this._graph=new Ur(new Jn),this._graph.addEdges(this._edgeList.getEdges());var R=this.createSubgraphs(this._graph),T=new wn(this._geomFact);this.buildSubgraphs(R,T);var O=T.getPolygons();return O.size()<=0?this.createEmptyResultGeometry():this._geomFact.buildGeometry(O)}},{key:"computeNodedEdges",value:function(n,a){var h=this.getNoder(a);h.computeNodes(n);for(var v=h.getNodedSubstrings().iterator();v.hasNext();){var I=v.next(),R=I.getCoordinates();if(R.length!==2||!R[0].equals2D(R[1])){var T=I.getData(),O=new nn(I.getCoordinates(),new xt(T));this.insertUniqueEdge(O)}}}},{key:"setNoder",value:function(n){this._workingNoder=n}}],[{key:"constructor_",value:function(){this._bufParams=null,this._workingPrecisionModel=null,this._workingNoder=null,this._geomFact=null,this._graph=null,this._edgeList=new Kn;var n=arguments[0];this._bufParams=n}},{key:"depthDelta",value:function(n){var a=n.getLocation(0,he.LEFT),h=n.getLocation(0,he.RIGHT);return a===q.INTERIOR&&h===q.EXTERIOR?1:a===q.EXTERIOR&&h===q.INTERIOR?-1:0}},{key:"convertSegStrings",value:function(n){for(var a=new Qt,h=new De;n.hasNext();){var v=n.next(),I=a.createLineString(v.getCoordinates());h.add(I)}return a.buildGeometry(h)}}])})(),ai=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"rescale",value:function(){if(Le(arguments[0],Re))for(var n=arguments[0].iterator();n.hasNext();){var a=n.next();this.rescale(a.getCoordinates())}else if(arguments[0]instanceof Array){for(var h=arguments[0],v=0;v<h.length;v++)h[v].x=h[v].x/this._scaleFactor+this._offsetX,h[v].y=h[v].y/this._scaleFactor+this._offsetY;h.length===2&&h[0].equals2D(h[1])&&Je.out.println(h)}}},{key:"scale",value:function(){if(Le(arguments[0],Re)){for(var n=arguments[0],a=new De(n.size()),h=n.iterator();h.hasNext();){var v=h.next();a.add(new Xt(this.scale(v.getCoordinates()),v.getData()))}return a}if(arguments[0]instanceof Array){for(var I=arguments[0],R=new Array(I.length).fill(null),T=0;T<I.length;T++)R[T]=new J(Math.round((I[T].x-this._offsetX)*this._scaleFactor),Math.round((I[T].y-this._offsetY)*this._scaleFactor),I[T].getZ());return We.removeRepeatedPoints(R)}}},{key:"isIntegerPrecision",value:function(){return this._scaleFactor===1}},{key:"getNodedSubstrings",value:function(){var n=this._noder.getNodedSubstrings();return this._isScaled&&this.rescale(n),n}},{key:"computeNodes",value:function(n){var a=n;this._isScaled&&(a=this.scale(n)),this._noder.computeNodes(a)}},{key:"interfaces_",get:function(){return[Cr]}}],[{key:"constructor_",value:function(){if(this._noder=null,this._scaleFactor=null,this._offsetX=null,this._offsetY=null,this._isScaled=!1,arguments.length===2){var n=arguments[0],a=arguments[1];f.constructor_.call(this,n,a,0,0)}else if(arguments.length===4){var h=arguments[0],v=arguments[1];this._noder=h,this._scaleFactor=v,this._isScaled=!this.isIntegerPrecision()}}}])})(),an=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"checkEndPtVertexIntersections",value:function(){if(arguments.length===0)for(var n=this._segStrings.iterator();n.hasNext();){var a=n.next().getCoordinates();this.checkEndPtVertexIntersections(a[0],this._segStrings),this.checkEndPtVertexIntersections(a[a.length-1],this._segStrings)}else if(arguments.length===2){for(var h=arguments[0],v=arguments[1].iterator();v.hasNext();)for(var I=v.next().getCoordinates(),R=1;R<I.length-1;R++)if(I[R].equals(h))throw new Ce("found endpt/interior pt intersection at index "+R+" :pt "+h)}}},{key:"checkInteriorIntersections",value:function(){if(arguments.length===0)for(var n=this._segStrings.iterator();n.hasNext();)for(var a=n.next(),h=this._segStrings.iterator();h.hasNext();){var v=h.next();this.checkInteriorIntersections(a,v)}else if(arguments.length===2)for(var I=arguments[0],R=arguments[1],T=I.getCoordinates(),O=R.getCoordinates(),W=0;W<T.length-1;W++)for(var re=0;re<O.length-1;re++)this.checkInteriorIntersections(I,W,R,re);else if(arguments.length===4){var ne=arguments[0],oe=arguments[1],_e=arguments[2],Se=arguments[3];if(ne===_e&&oe===Se)return null;var Ne=ne.getCoordinates()[oe],Ge=ne.getCoordinates()[oe+1],Be=_e.getCoordinates()[Se],$e=_e.getCoordinates()[Se+1];if(this._li.computeIntersection(Ne,Ge,Be,$e),this._li.hasIntersection()&&(this._li.isProper()||this.hasInteriorIntersection(this._li,Ne,Ge)||this.hasInteriorIntersection(this._li,Be,$e)))throw new Ce("found non-noded intersection at "+Ne+"-"+Ge+" and "+Be+"-"+$e)}}},{key:"checkValid",value:function(){this.checkEndPtVertexIntersections(),this.checkInteriorIntersections(),this.checkCollapses()}},{key:"checkCollapses",value:function(){if(arguments.length===0)for(var n=this._segStrings.iterator();n.hasNext();){var a=n.next();this.checkCollapses(a)}else if(arguments.length===1)for(var h=arguments[0].getCoordinates(),v=0;v<h.length-2;v++)this.checkCollapse(h[v],h[v+1],h[v+2])}},{key:"hasInteriorIntersection",value:function(n,a,h){for(var v=0;v<n.getIntersectionNum();v++){var I=n.getIntersection(v);if(!I.equals(a)&&!I.equals(h))return!0}return!1}},{key:"checkCollapse",value:function(n,a,h){if(n.equals(h))throw new Ce("found non-noded collapse at "+f.fact.createLineString([n,a,h]))}}],[{key:"constructor_",value:function(){this._li=new Wt,this._segStrings=null;var n=arguments[0];this._segStrings=n}}])})();an.fact=new Qt;var Ar=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"intersectsScaled",value:function(n,a){var h=Math.min(n.x,a.x),v=Math.max(n.x,a.x),I=Math.min(n.y,a.y),R=Math.max(n.y,a.y),T=this._maxx<h||this._minx>v||this._maxy<I||this._miny>R;if(T)return!1;var O=this.intersectsToleranceSquare(n,a);return pe.isTrue(!(T&&O),"Found bad envelope test"),O}},{key:"initCorners",value:function(n){var a=.5;this._minx=n.x-a,this._maxx=n.x+a,this._miny=n.y-a,this._maxy=n.y+a,this._corner[0]=new J(this._maxx,this._maxy),this._corner[1]=new J(this._minx,this._maxy),this._corner[2]=new J(this._minx,this._miny),this._corner[3]=new J(this._maxx,this._miny)}},{key:"intersects",value:function(n,a){return this._scaleFactor===1?this.intersectsScaled(n,a):(this.copyScaled(n,this._p0Scaled),this.copyScaled(a,this._p1Scaled),this.intersectsScaled(this._p0Scaled,this._p1Scaled))}},{key:"scale",value:function(n){return Math.round(n*this._scaleFactor)}},{key:"getCoordinate",value:function(){return this._originalPt}},{key:"copyScaled",value:function(n,a){a.x=this.scale(n.x),a.y=this.scale(n.y)}},{key:"getSafeEnvelope",value:function(){if(this._safeEnv===null){var n=f.SAFE_ENV_EXPANSION_FACTOR/this._scaleFactor;this._safeEnv=new ye(this._originalPt.x-n,this._originalPt.x+n,this._originalPt.y-n,this._originalPt.y+n)}return this._safeEnv}},{key:"intersectsPixelClosure",value:function(n,a){return this._li.computeIntersection(n,a,this._corner[0],this._corner[1]),!!this._li.hasIntersection()||(this._li.computeIntersection(n,a,this._corner[1],this._corner[2]),!!this._li.hasIntersection()||(this._li.computeIntersection(n,a,this._corner[2],this._corner[3]),!!this._li.hasIntersection()||(this._li.computeIntersection(n,a,this._corner[3],this._corner[0]),!!this._li.hasIntersection())))}},{key:"intersectsToleranceSquare",value:function(n,a){var h=!1,v=!1;return this._li.computeIntersection(n,a,this._corner[0],this._corner[1]),!!this._li.isProper()||(this._li.computeIntersection(n,a,this._corner[1],this._corner[2]),!!this._li.isProper()||(this._li.hasIntersection()&&(h=!0),this._li.computeIntersection(n,a,this._corner[2],this._corner[3]),!!this._li.isProper()||(this._li.hasIntersection()&&(v=!0),this._li.computeIntersection(n,a,this._corner[3],this._corner[0]),!!this._li.isProper()||!(!h||!v)||!!n.equals(this._pt)||!!a.equals(this._pt))))}},{key:"addSnappedNode",value:function(n,a){var h=n.getCoordinate(a),v=n.getCoordinate(a+1);return!!this.intersects(h,v)&&(n.addIntersection(this.getCoordinate(),a),!0)}}],[{key:"constructor_",value:function(){this._li=null,this._pt=null,this._originalPt=null,this._ptScaled=null,this._p0Scaled=null,this._p1Scaled=null,this._scaleFactor=null,this._minx=null,this._maxx=null,this._miny=null,this._maxy=null,this._corner=new Array(4).fill(null),this._safeEnv=null;var n=arguments[0],a=arguments[1],h=arguments[2];if(this._originalPt=n,this._pt=n,this._scaleFactor=a,this._li=h,a<=0)throw new V("Scale factor must be non-zero");a!==1&&(this._pt=new J(this.scale(n.x),this.scale(n.y)),this._p0Scaled=new J,this._p1Scaled=new J),this.initCorners(this._pt)}}])})();Ar.SAFE_ENV_EXPANSION_FACTOR=.75;var ui=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"select",value:function(){if(arguments.length!==1){if(arguments.length===2){var f=arguments[1];arguments[0].getLineSegment(f,this.selectedSegment),this.select(this.selectedSegment)}}}}],[{key:"constructor_",value:function(){this.selectedSegment=new ft}}])})(),un=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"snap",value:function(){if(arguments.length===1){var f=arguments[0];return this.snap(f,null,-1)}if(arguments.length===3){var n=arguments[0],a=arguments[1],h=arguments[2],v=n.getSafeEnvelope(),I=new on(n,a,h);return this._index.query(v,new((function(){return g((function R(){o(this,R)}),[{key:"interfaces_",get:function(){return[Hr]}},{key:"visitItem",value:function(R){R.select(v,I)}}])})())),I.isNodeAdded()}}}],[{key:"constructor_",value:function(){this._index=null;var f=arguments[0];this._index=f}}])})(),on=(function(f){function n(){var a;return o(this,n),a=s(this,n),n.constructor_.apply(a,arguments),a}return E(n,f),g(n,[{key:"isNodeAdded",value:function(){return this._isNodeAdded}},{key:"select",value:function(){if(!(arguments.length===2&&Number.isInteger(arguments[1])&&arguments[0]instanceof Wr))return A(n,"select",this,1).apply(this,arguments);var a=arguments[1],h=arguments[0].getContext();if(this._parentEdge===h&&(a===this._hotPixelVertexIndex||a+1===this._hotPixelVertexIndex))return null;this._isNodeAdded|=this._hotPixel.addSnappedNode(h,a)}}],[{key:"constructor_",value:function(){this._hotPixel=null,this._parentEdge=null,this._hotPixelVertexIndex=null,this._isNodeAdded=!1;var a=arguments[0],h=arguments[1],v=arguments[2];this._hotPixel=a,this._parentEdge=h,this._hotPixelVertexIndex=v}}])})(ui);un.HotPixelSnapAction=on;var oi=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"processIntersections",value:function(f,n,a,h){if(f===a&&n===h)return null;var v=f.getCoordinates()[n],I=f.getCoordinates()[n+1],R=a.getCoordinates()[h],T=a.getCoordinates()[h+1];if(this._li.computeIntersection(v,I,R,T),this._li.hasIntersection()&&this._li.isInteriorIntersection()){for(var O=0;O<this._li.getIntersectionNum();O++)this._interiorIntersections.add(this._li.getIntersection(O));f.addIntersections(this._li,n,0),a.addIntersections(this._li,h,1)}}},{key:"isDone",value:function(){return!1}},{key:"getInteriorIntersections",value:function(){return this._interiorIntersections}},{key:"interfaces_",get:function(){return[tn]}}],[{key:"constructor_",value:function(){this._li=null,this._interiorIntersections=null;var f=arguments[0];this._li=f,this._interiorIntersections=new De}}])})(),li=(function(){return g((function f(){o(this,f),f.constructor_.apply(this,arguments)}),[{key:"checkCorrectness",value:function(f){var n=Xt.getNodedSubstrings(f),a=new an(n);try{a.checkValid()}catch(h){if(!(h instanceof z))throw h;h.printStackTrace()}}},{key:"getNodedSubstrings",value:function(){return Xt.getNodedSubstrings(this._nodedSegStrings)}},{key:"snapRound",value:function(f,n){var a=this.findInteriorIntersections(f,n);this.computeIntersectionSnaps(a),this.computeVertexSnaps(f)}},{key:"findInteriorIntersections",value:function(f,n){var a=new oi(n);return this._noder.setSegmentIntersector(a),this._noder.computeNodes(f),a.getInteriorIntersections()}},{key:"computeVertexSnaps",value:function(){if(Le(arguments[0],Re))for(var f=arguments[0].iterator();f.hasNext();){var n=f.next();this.computeVertexSnaps(n)}else if(arguments[0]instanceof Xt)for(var a=arguments[0],h=a.getCoordinates(),v=0;v<h.length;v++){var I=new Ar(h[v],this._scaleFactor,this._li);this._pointSnapper.snap(I,a,v)&&a.addIntersection(h[v],v)}}},{key:"computeNodes",value:function(f){this._nodedSegStrings=f,this._noder=new Sr,this._pointSnapper=new un(this._noder.getIndex()),this.snapRound(f,this._li)}},{key:"computeIntersectionSnaps",value:function(f){for(var n=f.iterator();n.hasNext();){var a=n.next(),h=new Ar(a,this._scaleFactor,this._li);this._pointSnapper.snap(h)}}},{key:"interfaces_",get:function(){return[Cr]}}],[{key:"constructor_",value:function(){this._pm=null,this._li=null,this._scaleFactor=null,this._noder=null,this._pointSnapper=null,this._nodedSegStrings=null;var f=arguments[0];this._pm=f,this._li=new Wt,this._li.setPrecisionModel(f),this._scaleFactor=f.getScale()}}])})(),ir=(function(){function f(){o(this,f),f.constructor_.apply(this,arguments)}return g(f,[{key:"bufferFixedPrecision",value:function(n){var a=new ai(new li(new At(1)),n.getScale()),h=new sn(this._bufParams);h.setWorkingPrecisionModel(n),h.setNoder(a),this._resultGeometry=h.buffer(this._argGeom,this._distance)}},{key:"bufferReducedPrecision",value:function(){if(arguments.length===0){for(var n=f.MAX_PRECISION_DIGITS;n>=0;n--){try{this.bufferReducedPrecision(n)}catch(I){if(!(I instanceof at))throw I;this._saveException=I}if(this._resultGeometry!==null)return null}throw this._saveException}if(arguments.length===1){var a=arguments[0],h=f.precisionScaleFactor(this._argGeom,this._distance,a),v=new At(h);this.bufferFixedPrecision(v)}}},{key:"computeGeometry",value:function(){if(this.bufferOriginalPrecision(),this._resultGeometry!==null)return null;var n=this._argGeom.getFactory().getPrecisionModel();n.getType()===At.FIXED?this.bufferFixedPrecision(n):this.bufferReducedPrecision()}},{key:"setQuadrantSegments",value:function(n){this._bufParams.setQuadrantSegments(n)}},{key:"bufferOriginalPrecision",value:function(){try{var n=new sn(this._bufParams);this._resultGeometry=n.buffer(this._argGeom,this._distance)}catch(a){if(!(a instanceof Ce))throw a;this._saveException=a}}},{key:"getResultGeometry",value:function(n){return this._distance=n,this.computeGeometry(),this._resultGeometry}},{key:"setEndCapStyle",value:function(n){this._bufParams.setEndCapStyle(n)}}],[{key:"constructor_",value:function(){if(this._argGeom=null,this._distance=null,this._bufParams=new M,this._resultGeometry=null,this._saveException=null,arguments.length===1){var n=arguments[0];this._argGeom=n}else if(arguments.length===2){var a=arguments[0],h=arguments[1];this._argGeom=a,this._bufParams=h}}},{key:"bufferOp",value:function(){if(arguments.length===2){var n=arguments[1];return new f(arguments[0]).getResultGeometry(n)}if(arguments.length===3){if(Number.isInteger(arguments[2])&&arguments[0]instanceof de&&typeof arguments[1]=="number"){var a=arguments[1],h=arguments[2],v=new f(arguments[0]);return v.setQuadrantSegments(h),v.getResultGeometry(a)}if(arguments[2]instanceof M&&arguments[0]instanceof de&&typeof arguments[1]=="number"){var I=arguments[1];return new f(arguments[0],arguments[2]).getResultGeometry(I)}}else if(arguments.length===4){var R=arguments[1],T=arguments[2],O=arguments[3],W=new f(arguments[0]);return W.setQuadrantSegments(T),W.setEndCapStyle(O),W.getResultGeometry(R)}}},{key:"precisionScaleFactor",value:function(n,a,h){var v=n.getEnvelopeInternal(),I=ct.max(Math.abs(v.getMaxX()),Math.abs(v.getMaxY()),Math.abs(v.getMinX()),Math.abs(v.getMinY()))+2*(a>0?a:0),R=h-Math.trunc(Math.log(I)/Math.log(10)+1);return Math.pow(10,R)}}])})();ir.CAP_ROUND=M.CAP_ROUND,ir.CAP_BUTT=M.CAP_FLAT,ir.CAP_FLAT=M.CAP_FLAT,ir.CAP_SQUARE=M.CAP_SQUARE,ir.MAX_PRECISION_DIGITS=12;var ci=["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],ln=(function(){return g((function f(n){o(this,f),this.geometryFactory=n||new Qt}),[{key:"read",value:function(f){var n,a=(n=typeof f=="string"?JSON.parse(f):f).type;if(!It[a])throw new Error("Unknown GeoJSON type: "+n.type);return ci.indexOf(a)!==-1?It[a].call(this,n.coordinates):a==="GeometryCollection"?It[a].call(this,n.geometries):It[a].call(this,n)}},{key:"write",value:function(f){var n=f.getGeometryType();if(!Nt[n])throw new Error("Geometry is not supported");return Nt[n].call(this,f)}}])})(),It={Feature:function(f){var n={};for(var a in f)n[a]=f[a];if(f.geometry){var h=f.geometry.type;if(!It[h])throw new Error("Unknown GeoJSON type: "+f.type);n.geometry=this.read(f.geometry)}return f.bbox&&(n.bbox=It.bbox.call(this,f.bbox)),n},FeatureCollection:function(f){var n={};if(f.features){n.features=[];for(var a=0;a<f.features.length;++a)n.features.push(this.read(f.features[a]))}return f.bbox&&(n.bbox=this.parse.bbox.call(this,f.bbox)),n},coordinates:function(f){for(var n=[],a=0;a<f.length;++a){var h=f[a];n.push(d(J,N(h)))}return n},bbox:function(f){return this.geometryFactory.createLinearRing([new J(f[0],f[1]),new J(f[2],f[1]),new J(f[2],f[3]),new J(f[0],f[3]),new J(f[0],f[1])])},Point:function(f){var n=d(J,N(f));return this.geometryFactory.createPoint(n)},MultiPoint:function(f){for(var n=[],a=0;a<f.length;++a)n.push(It.Point.call(this,f[a]));return this.geometryFactory.createMultiPoint(n)},LineString:function(f){var n=It.coordinates.call(this,f);return this.geometryFactory.createLineString(n)},MultiLineString:function(f){for(var n=[],a=0;a<f.length;++a)n.push(It.LineString.call(this,f[a]));return this.geometryFactory.createMultiLineString(n)},Polygon:function(f){for(var n=It.coordinates.call(this,f[0]),a=this.geometryFactory.createLinearRing(n),h=[],v=1;v<f.length;++v){var I=f[v],R=It.coordinates.call(this,I),T=this.geometryFactory.createLinearRing(R);h.push(T)}return this.geometryFactory.createPolygon(a,h)},MultiPolygon:function(f){for(var n=[],a=0;a<f.length;++a){var h=f[a];n.push(It.Polygon.call(this,h))}return this.geometryFactory.createMultiPolygon(n)},GeometryCollection:function(f){for(var n=[],a=0;a<f.length;++a){var h=f[a];n.push(this.read(h))}return this.geometryFactory.createGeometryCollection(n)}},Nt={coordinate:function(f){var n=[f.x,f.y];return f.z&&n.push(f.z),f.m&&n.push(f.m),n},Point:function(f){return{type:"Point",coordinates:Nt.coordinate.call(this,f.getCoordinate())}},MultiPoint:function(f){for(var n=[],a=0;a<f._geometries.length;++a){var h=f._geometries[a],v=Nt.Point.call(this,h);n.push(v.coordinates)}return{type:"MultiPoint",coordinates:n}},LineString:function(f){for(var n=[],a=f.getCoordinates(),h=0;h<a.length;++h){var v=a[h];n.push(Nt.coordinate.call(this,v))}return{type:"LineString",coordinates:n}},MultiLineString:function(f){for(var n=[],a=0;a<f._geometries.length;++a){var h=f._geometries[a],v=Nt.LineString.call(this,h);n.push(v.coordinates)}return{type:"MultiLineString",coordinates:n}},Polygon:function(f){var n=[],a=Nt.LineString.call(this,f._shell);n.push(a.coordinates);for(var h=0;h<f._holes.length;++h){var v=f._holes[h],I=Nt.LineString.call(this,v);n.push(I.coordinates)}return{type:"Polygon",coordinates:n}},MultiPolygon:function(f){for(var n=[],a=0;a<f._geometries.length;++a){var h=f._geometries[a],v=Nt.Polygon.call(this,h);n.push(v.coordinates)}return{type:"MultiPolygon",coordinates:n}},GeometryCollection:function(f){for(var n=[],a=0;a<f._geometries.length;++a){var h=f._geometries[a],v=h.getGeometryType();n.push(Nt[v].call(this,h))}return{type:"GeometryCollection",geometries:n}}};return{BufferOp:ir,GeoJSONReader:(function(){return g((function f(n){o(this,f),this.parser=new ln(n||new Qt)}),[{key:"read",value:function(f){return this.parser.read(f)}}])})(),GeoJSONWriter:(function(){return g((function f(){o(this,f),this.parser=new ln(this.geometryFactory)}),[{key:"write",value:function(f){return this.parser.write(f)}}])})()}}))})(jsts_min$1)),jsts_min$1.exports}var jsts_minExports=requireJsts_min();const jsts=getDefaultExportFromCjs$1(jsts_minExports);function adder(){return new Adder}function Adder(){this.reset()}Adder.prototype={constructor:Adder,reset:function(){this.s=this.t=0},add:function(e){add(temp,e,this.t),add(this,temp.s,this.s),this.s?this.t+=temp.t:this.s=temp.t},valueOf:function(){return this.s}};var temp=new Adder;function add(e,t,r){var s=e.s=t+r,o=s-t,d=s-o;e.t=t-d+(r-o)}var epsilon$1=1e-6,pi=Math.PI,halfPi=pi/2,quarterPi=pi/4,tau=pi*2,degrees=180/pi,radians=pi/180,abs$1=Math.abs,atan=Math.atan,atan2=Math.atan2,cos=Math.cos,sin=Math.sin,sqrt=Math.sqrt;function acos(e){return e>1?0:e<-1?pi:Math.acos(e)}function asin(e){return e>1?halfPi:e<-1?-halfPi:Math.asin(e)}function noop$1(){}function streamGeometry(e,t){e&&streamGeometryType.hasOwnProperty(e.type)&&streamGeometryType[e.type](e,t)}var streamObjectType={Feature:function(e,t){streamGeometry(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,s=-1,o=r.length;++s<o;)streamGeometry(r[s].geometry,t)}},streamGeometryType={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var r=e.coordinates,s=-1,o=r.length;++s<o;)e=r[s],t.point(e[0],e[1],e[2])},LineString:function(e,t){streamLine(e.coordinates,t,0)},MultiLineString:function(e,t){for(var r=e.coordinates,s=-1,o=r.length;++s<o;)streamLine(r[s],t,0)},Polygon:function(e,t){streamPolygon(e.coordinates,t)},MultiPolygon:function(e,t){for(var r=e.coordinates,s=-1,o=r.length;++s<o;)streamPolygon(r[s],t)},GeometryCollection:function(e,t){for(var r=e.geometries,s=-1,o=r.length;++s<o;)streamGeometry(r[s],t)}};function streamLine(e,t,r){var s=-1,o=e.length-r,d;for(t.lineStart();++s<o;)d=e[s],t.point(d[0],d[1],d[2]);t.lineEnd()}function streamPolygon(e,t){var r=-1,s=e.length;for(t.polygonStart();++r<s;)streamLine(e[r],t,1);t.polygonEnd()}function geoStream(e,t){e&&streamObjectType.hasOwnProperty(e.type)?streamObjectType[e.type](e,t):streamGeometry(e,t)}adder(),adder();function spherical(e){return[atan2(e[1],e[0]),asin(e[2])]}function cartesian(e){var t=e[0],r=e[1],s=cos(r);return[s*cos(t),s*sin(t),sin(r)]}function cartesianDot(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function cartesianCross(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function cartesianAddInPlace(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function cartesianScale(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function cartesianNormalizeInPlace(e){var t=sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}adder();function compose(e,t){function r(s,o){return s=e(s,o),t(s[0],s[1])}return e.invert&&t.invert&&(r.invert=function(s,o){return s=t.invert(s,o),s&&e.invert(s[0],s[1])}),r}function rotationIdentity(e,t){return[e>pi?e-tau:e<-pi?e+tau:e,t]}rotationIdentity.invert=rotationIdentity;function rotateRadians(e,t,r){return(e%=tau)?t||r?compose(rotationLambda(e),rotationPhiGamma(t,r)):rotationLambda(e):t||r?rotationPhiGamma(t,r):rotationIdentity}function forwardRotationLambda(e){return function(t,r){return t+=e,[t>pi?t-tau:t<-pi?t+tau:t,r]}}function rotationLambda(e){var t=forwardRotationLambda(e);return t.invert=forwardRotationLambda(-e),t}function rotationPhiGamma(e,t){var r=cos(e),s=sin(e),o=cos(t),d=sin(t);function m(g,y){var b=cos(y),x=cos(g)*b,E=sin(g)*b,C=sin(y),S=C*r+x*s;return[atan2(E*o-S*d,x*r-C*s),asin(S*o+E*d)]}return m.invert=function(g,y){var b=cos(y),x=cos(g)*b,E=sin(g)*b,C=sin(y),S=C*o-E*d;return[atan2(E*o+C*d,x*r+S*s),asin(S*r-x*s)]},m}function circleStream(e,t,r,s,o,d){if(r){var m=cos(t),g=sin(t),y=s*r;o==null?(o=t+s*tau,d=t-y/2):(o=circleRadius(m,o),d=circleRadius(m,d),(s>0?o<d:o>d)&&(o+=s*tau));for(var b,x=o;s>0?x>d:x<d;x-=y)b=spherical([m,-g*cos(x),-g*sin(x)]),e.point(b[0],b[1])}}function circleRadius(e,t){t=cartesian(t),t[0]-=e,cartesianNormalizeInPlace(t);var r=acos(-t[1]);return((-t[2]<0?-r:r)+tau-epsilon$1)%tau}function clipBuffer(){var e=[],t;return{point:function(r,s){t.push([r,s])},lineStart:function(){e.push(t=[])},lineEnd:noop$1,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var r=e;return e=[],t=null,r}}}function clipLine(e,t,r,s,o,d){var m=e[0],g=e[1],y=t[0],b=t[1],x=0,E=1,C=y-m,S=b-g,A;if(A=r-m,!(!C&&A>0)){if(A/=C,C<0){if(A<x)return;A<E&&(E=A)}else if(C>0){if(A>E)return;A>x&&(x=A)}if(A=o-m,!(!C&&A<0)){if(A/=C,C<0){if(A>E)return;A>x&&(x=A)}else if(C>0){if(A<x)return;A<E&&(E=A)}if(A=s-g,!(!S&&A>0)){if(A/=S,S<0){if(A<x)return;A<E&&(E=A)}else if(S>0){if(A>E)return;A>x&&(x=A)}if(A=d-g,!(!S&&A<0)){if(A/=S,S<0){if(A>E)return;A>x&&(x=A)}else if(S>0){if(A<x)return;A<E&&(E=A)}return x>0&&(e[0]=m+x*C,e[1]=g+x*S),E<1&&(t[0]=m+E*C,t[1]=g+E*S),!0}}}}}function pointEqual(e,t){return abs$1(e[0]-t[0])<epsilon$1&&abs$1(e[1]-t[1])<epsilon$1}function Intersection(e,t,r,s){this.x=e,this.z=t,this.o=r,this.e=s,this.v=!1,this.n=this.p=null}function clipPolygon(e,t,r,s,o){var d=[],m=[],g,y;if(e.forEach(function(A){if(!((N=A.length-1)<=0)){var N,k=A[0],L=A[N],G;if(pointEqual(k,L)){for(o.lineStart(),g=0;g<N;++g)o.point((k=A[g])[0],k[1]);o.lineEnd();return}d.push(G=new Intersection(k,A,null,!0)),m.push(G.o=new Intersection(k,null,G,!1)),d.push(G=new Intersection(L,A,null,!1)),m.push(G.o=new Intersection(L,null,G,!0))}}),!!d.length){for(m.sort(t),link$1(d),link$1(m),g=0,y=m.length;g<y;++g)m[g].e=r=!r;for(var b=d[0],x,E;;){for(var C=b,S=!0;C.v;)if((C=C.n)===b)return;x=C.z,o.lineStart();do{if(C.v=C.o.v=!0,C.e){if(S)for(g=0,y=x.length;g<y;++g)o.point((E=x[g])[0],E[1]);else s(C.x,C.n.x,1,o);C=C.n}else{if(S)for(x=C.p.z,g=x.length-1;g>=0;--g)o.point((E=x[g])[0],E[1]);else s(C.x,C.p.x,-1,o);C=C.p}C=C.o,x=C.z,S=!S}while(!C.v);o.lineEnd()}}}function link$1(e){if(t=e.length){for(var t,r=0,s=e[0],o;++r<t;)s.n=o=e[r],o.p=s,s=o;s.n=o=e[0],o.p=s}}function ascending(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function bisector(e){return e.length===1&&(e=ascendingComparator(e)),{left:function(t,r,s,o){for(s==null&&(s=0),o==null&&(o=t.length);s<o;){var d=s+o>>>1;e(t[d],r)<0?s=d+1:o=d}return s},right:function(t,r,s,o){for(s==null&&(s=0),o==null&&(o=t.length);s<o;){var d=s+o>>>1;e(t[d],r)>0?o=d:s=d+1}return s}}}function ascendingComparator(e){return function(t,r){return ascending(e(t),r)}}bisector(ascending);function merge(e){for(var t=e.length,r,s=-1,o=0,d,m;++s<t;)o+=e[s].length;for(d=new Array(o);--t>=0;)for(m=e[t],r=m.length;--r>=0;)d[--o]=m[r];return d}var clipMax=1e9,clipMin=-clipMax;function clipExtent(e,t,r,s){function o(b,x){return e<=b&&b<=r&&t<=x&&x<=s}function d(b,x,E,C){var S=0,A=0;if(b==null||(S=m(b,E))!==(A=m(x,E))||y(b,x)<0^E>0)do C.point(S===0||S===3?e:r,S>1?s:t);while((S=(S+E+4)%4)!==A);else C.point(x[0],x[1])}function m(b,x){return abs$1(b[0]-e)<epsilon$1?x>0?0:3:abs$1(b[0]-r)<epsilon$1?x>0?2:1:abs$1(b[1]-t)<epsilon$1?x>0?1:0:x>0?3:2}function g(b,x){return y(b.x,x.x)}function y(b,x){var E=m(b,1),C=m(x,1);return E!==C?E-C:E===0?x[1]-b[1]:E===1?b[0]-x[0]:E===2?b[1]-x[1]:x[0]-b[0]}return function(b){var x=b,E=clipBuffer(),C,S,A,N,k,L,G,M,z,V,Y,X={point:Q,lineStart:se,lineEnd:ie,polygonStart:K,polygonEnd:ee};function Q(ue,le){o(ue,le)&&x.point(ue,le)}function $(){for(var ue=0,le=0,fe=S.length;le<fe;++le)for(var ve=S[le],xe=1,ce=ve.length,Te=ve[0],Ce,me,pe=Te[0],Ee=Te[1];xe<ce;++xe)Ce=pe,me=Ee,Te=ve[xe],pe=Te[0],Ee=Te[1],me<=s?Ee>s&&(pe-Ce)*(s-me)>(Ee-me)*(e-Ce)&&++ue:Ee<=s&&(pe-Ce)*(s-me)<(Ee-me)*(e-Ce)&&--ue;return ue}function K(){x=E,C=[],S=[],Y=!0}function ee(){var ue=$(),le=Y&&ue,fe=(C=merge(C)).length;(le||fe)&&(b.polygonStart(),le&&(b.lineStart(),d(null,null,1,b),b.lineEnd()),fe&&clipPolygon(C,g,ue,d,b),b.polygonEnd()),x=b,C=S=A=null}function se(){X.point=te,S&&S.push(A=[]),V=!0,z=!1,G=M=NaN}function ie(){C&&(te(N,k),L&&z&&E.rejoin(),C.push(E.result())),X.point=Q,z&&x.lineEnd()}function te(ue,le){var fe=o(ue,le);if(S&&A.push([ue,le]),V)N=ue,k=le,L=fe,V=!1,fe&&(x.lineStart(),x.point(ue,le));else if(fe&&z)x.point(ue,le);else{var ve=[G=Math.max(clipMin,Math.min(clipMax,G)),M=Math.max(clipMin,Math.min(clipMax,M))],xe=[ue=Math.max(clipMin,Math.min(clipMax,ue)),le=Math.max(clipMin,Math.min(clipMax,le))];clipLine(ve,xe,e,t,r,s)?(z||(x.lineStart(),x.point(ve[0],ve[1])),x.point(xe[0],xe[1]),fe||x.lineEnd(),Y=!1):fe&&(x.lineStart(),x.point(ue,le),Y=!1)}G=ue,M=le,z=fe}return X}}var sum$2=adder();function polygonContains(e,t){var r=t[0],s=t[1],o=[sin(r),-cos(r),0],d=0,m=0;sum$2.reset();for(var g=0,y=e.length;g<y;++g)if(x=(b=e[g]).length)for(var b,x,E=b[x-1],C=E[0],S=E[1]/2+quarterPi,A=sin(S),N=cos(S),k=0;k<x;++k,C=G,A=z,N=V,E=L){var L=b[k],G=L[0],M=L[1]/2+quarterPi,z=sin(M),V=cos(M),Y=G-C,X=Y>=0?1:-1,Q=X*Y,$=Q>pi,K=A*z;if(sum$2.add(atan2(K*X*sin(Q),N*V+K*cos(Q))),d+=$?Y+X*tau:Y,$^C>=r^G>=r){var ee=cartesianCross(cartesian(E),cartesian(L));cartesianNormalizeInPlace(ee);var se=cartesianCross(o,ee);cartesianNormalizeInPlace(se);var ie=($^Y>=0?-1:1)*asin(se[2]);(s>ie||s===ie&&(ee[0]||ee[1]))&&(m+=$^Y>=0?1:-1)}}return(d<-epsilon$1||d<epsilon$1&&sum$2<-epsilon$1)^m&1}adder();function identity(e){return e}adder(),adder();var x0=1/0,y0=x0,x1=-x0,y1=x1,boundsStream={point:boundsPoint,lineStart:noop$1,lineEnd:noop$1,polygonStart:noop$1,polygonEnd:noop$1,result:function(){var e=[[x0,y0],[x1,y1]];return x1=y1=-(y0=x0=1/0),e}};function boundsPoint(e,t){e<x0&&(x0=e),e>x1&&(x1=e),t<y0&&(y0=t),t>y1&&(y1=t)}adder();function clip(e,t,r,s){return function(o,d){var m=t(d),g=o.invert(s[0],s[1]),y=clipBuffer(),b=t(y),x=!1,E,C,S,A={point:N,lineStart:L,lineEnd:G,polygonStart:function(){A.point=M,A.lineStart=z,A.lineEnd=V,C=[],E=[]},polygonEnd:function(){A.point=N,A.lineStart=L,A.lineEnd=G,C=merge(C);var Y=polygonContains(E,g);C.length?(x||(d.polygonStart(),x=!0),clipPolygon(C,compareIntersection,Y,r,d)):Y&&(x||(d.polygonStart(),x=!0),d.lineStart(),r(null,null,1,d),d.lineEnd()),x&&(d.polygonEnd(),x=!1),C=E=null},sphere:function(){d.polygonStart(),d.lineStart(),r(null,null,1,d),d.lineEnd(),d.polygonEnd()}};function N(Y,X){var Q=o(Y,X);e(Y=Q[0],X=Q[1])&&d.point(Y,X)}function k(Y,X){var Q=o(Y,X);m.point(Q[0],Q[1])}function L(){A.point=k,m.lineStart()}function G(){A.point=N,m.lineEnd()}function M(Y,X){S.push([Y,X]);var Q=o(Y,X);b.point(Q[0],Q[1])}function z(){b.lineStart(),S=[]}function V(){M(S[0][0],S[0][1]),b.lineEnd();var Y=b.clean(),X=y.result(),Q,$=X.length,K,ee,se;if(S.pop(),E.push(S),S=null,!!$){if(Y&1){if(ee=X[0],(K=ee.length-1)>0){for(x||(d.polygonStart(),x=!0),d.lineStart(),Q=0;Q<K;++Q)d.point((se=ee[Q])[0],se[1]);d.lineEnd()}return}$>1&&Y&2&&X.push(X.pop().concat(X.shift())),C.push(X.filter(validSegment))}}return A}}function validSegment(e){return e.length>1}function compareIntersection(e,t){return((e=e.x)[0]<0?e[1]-halfPi-epsilon$1:halfPi-e[1])-((t=t.x)[0]<0?t[1]-halfPi-epsilon$1:halfPi-t[1])}const clipAntimeridian=clip(function(){return!0},clipAntimeridianLine,clipAntimeridianInterpolate,[-pi,-halfPi]);function clipAntimeridianLine(e){var t=NaN,r=NaN,s=NaN,o;return{lineStart:function(){e.lineStart(),o=1},point:function(d,m){var g=d>0?pi:-pi,y=abs$1(d-t);abs$1(y-pi)<epsilon$1?(e.point(t,r=(r+m)/2>0?halfPi:-halfPi),e.point(s,r),e.lineEnd(),e.lineStart(),e.point(g,r),e.point(d,r),o=0):s!==g&&y>=pi&&(abs$1(t-s)<epsilon$1&&(t-=s*epsilon$1),abs$1(d-g)<epsilon$1&&(d-=g*epsilon$1),r=clipAntimeridianIntersect(t,r,d,m),e.point(s,r),e.lineEnd(),e.lineStart(),e.point(g,r),o=0),e.point(t=d,r=m),s=g},lineEnd:function(){e.lineEnd(),t=r=NaN},clean:function(){return 2-o}}}function clipAntimeridianIntersect(e,t,r,s){var o,d,m=sin(e-r);return abs$1(m)>epsilon$1?atan((sin(t)*(d=cos(s))*sin(r)-sin(s)*(o=cos(t))*sin(e))/(o*d*m)):(t+s)/2}function clipAntimeridianInterpolate(e,t,r,s){var o;if(e==null)o=r*halfPi,s.point(-pi,o),s.point(0,o),s.point(pi,o),s.point(pi,0),s.point(pi,-o),s.point(0,-o),s.point(-pi,-o),s.point(-pi,0),s.point(-pi,o);else if(abs$1(e[0]-t[0])>epsilon$1){var d=e[0]<t[0]?pi:-pi;o=r*d/2,s.point(-d,o),s.point(0,o),s.point(d,o)}else s.point(t[0],t[1])}function clipCircle(e,t){var r=cos(e),s=r>0,o=abs$1(r)>epsilon$1;function d(x,E,C,S){circleStream(S,e,t,C,x,E)}function m(x,E){return cos(x)*cos(E)>r}function g(x){var E,C,S,A,N;return{lineStart:function(){A=S=!1,N=1},point:function(k,L){var G=[k,L],M,z=m(k,L),V=s?z?0:b(k,L):z?b(k+(k<0?pi:-pi),L):0;if(!E&&(A=S=z)&&x.lineStart(),z!==S&&(M=y(E,G),(!M||pointEqual(E,M)||pointEqual(G,M))&&(G[0]+=epsilon$1,G[1]+=epsilon$1,z=m(G[0],G[1]))),z!==S)N=0,z?(x.lineStart(),M=y(G,E),x.point(M[0],M[1])):(M=y(E,G),x.point(M[0],M[1]),x.lineEnd()),E=M;else if(o&&E&&s^z){var Y;!(V&C)&&(Y=y(G,E,!0))&&(N=0,s?(x.lineStart(),x.point(Y[0][0],Y[0][1]),x.point(Y[1][0],Y[1][1]),x.lineEnd()):(x.point(Y[1][0],Y[1][1]),x.lineEnd(),x.lineStart(),x.point(Y[0][0],Y[0][1])))}z&&(!E||!pointEqual(E,G))&&x.point(G[0],G[1]),E=G,S=z,C=V},lineEnd:function(){S&&x.lineEnd(),E=null},clean:function(){return N|(A&&S)<<1}}}function y(x,E,C){var S=cartesian(x),A=cartesian(E),N=[1,0,0],k=cartesianCross(S,A),L=cartesianDot(k,k),G=k[0],M=L-G*G;if(!M)return!C&&x;var z=r*L/M,V=-r*G/M,Y=cartesianCross(N,k),X=cartesianScale(N,z),Q=cartesianScale(k,V);cartesianAddInPlace(X,Q);var $=Y,K=cartesianDot(X,$),ee=cartesianDot($,$),se=K*K-ee*(cartesianDot(X,X)-1);if(!(se<0)){var ie=sqrt(se),te=cartesianScale($,(-K-ie)/ee);if(cartesianAddInPlace(te,X),te=spherical(te),!C)return te;var ue=x[0],le=E[0],fe=x[1],ve=E[1],xe;le<ue&&(xe=ue,ue=le,le=xe);var ce=le-ue,Te=abs$1(ce-pi)<epsilon$1,Ce=Te||ce<epsilon$1;if(!Te&&ve<fe&&(xe=fe,fe=ve,ve=xe),Ce?Te?fe+ve>0^te[1]<(abs$1(te[0]-ue)<epsilon$1?fe:ve):fe<=te[1]&&te[1]<=ve:ce>pi^(ue<=te[0]&&te[0]<=le)){var me=cartesianScale($,(-K+ie)/ee);return cartesianAddInPlace(me,X),[te,spherical(me)]}}}function b(x,E){var C=s?e:pi-e,S=0;return x<-C?S|=1:x>C&&(S|=2),E<-C?S|=4:E>C&&(S|=8),S}return clip(m,g,d,s?[0,-e]:[-pi,e-pi])}function transformer(e){return function(t){var r=new TransformStream;for(var s in e)r[s]=e[s];return r.stream=t,r}}function TransformStream(){}TransformStream.prototype={constructor:TransformStream,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function fitExtent(e,t,r){var s=t[1][0]-t[0][0],o=t[1][1]-t[0][1],d=e.clipExtent&&e.clipExtent();e.scale(150).translate([0,0]),d!=null&&e.clipExtent(null),geoStream(r,e.stream(boundsStream));var m=boundsStream.result(),g=Math.min(s/(m[1][0]-m[0][0]),o/(m[1][1]-m[0][1])),y=+t[0][0]+(s-g*(m[1][0]+m[0][0]))/2,b=+t[0][1]+(o-g*(m[1][1]+m[0][1]))/2;return d!=null&&e.clipExtent(d),e.scale(g*150).translate([y,b])}function fitSize(e,t,r){return fitExtent(e,[[0,0],t],r)}var maxDepth=16,cosMinDistance=cos(30*radians);function resample$1(e,t){return+t?resample(e,t):resampleNone(e)}function resampleNone(e){return transformer({point:function(t,r){t=e(t,r),this.stream.point(t[0],t[1])}})}function resample(e,t){function r(s,o,d,m,g,y,b,x,E,C,S,A,N,k){var L=b-s,G=x-o,M=L*L+G*G;if(M>4*t&&N--){var z=m+C,V=g+S,Y=y+A,X=sqrt(z*z+V*V+Y*Y),Q=asin(Y/=X),$=abs$1(abs$1(Y)-1)<epsilon$1||abs$1(d-E)<epsilon$1?(d+E)/2:atan2(V,z),K=e($,Q),ee=K[0],se=K[1],ie=ee-s,te=se-o,ue=G*ie-L*te;(ue*ue/M>t||abs$1((L*ie+G*te)/M-.5)>.3||m*C+g*S+y*A<cosMinDistance)&&(r(s,o,d,m,g,y,ee,se,$,z/=X,V/=X,Y,N,k),k.point(ee,se),r(ee,se,$,z,V,Y,b,x,E,C,S,A,N,k))}}return function(s){var o,d,m,g,y,b,x,E,C,S,A,N,k={point:L,lineStart:G,lineEnd:z,polygonStart:function(){s.polygonStart(),k.lineStart=V},polygonEnd:function(){s.polygonEnd(),k.lineStart=G}};function L(Q,$){Q=e(Q,$),s.point(Q[0],Q[1])}function G(){E=NaN,k.point=M,s.lineStart()}function M(Q,$){var K=cartesian([Q,$]),ee=e(Q,$);r(E,C,x,S,A,N,E=ee[0],C=ee[1],x=Q,S=K[0],A=K[1],N=K[2],maxDepth,s),s.point(E,C)}function z(){k.point=L,s.lineEnd()}function V(){G(),k.point=Y,k.lineEnd=X}function Y(Q,$){M(o=Q,$),d=E,m=C,g=S,y=A,b=N,k.point=M}function X(){r(E,C,x,S,A,N,d,m,o,g,y,b,maxDepth,s),k.lineEnd=z,z()}return k}}var transformRadians=transformer({point:function(e,t){this.stream.point(e*radians,t*radians)}});function projection(e){return projectionMutator(function(){return e})()}function projectionMutator(e){var t,r=150,s=480,o=250,d,m,g=0,y=0,b=0,x=0,E=0,C,S,A=null,N=clipAntimeridian,k=null,L,G,M,z=identity,V=.5,Y=resample$1(ee,V),X,Q;function $(te){return te=S(te[0]*radians,te[1]*radians),[te[0]*r+d,m-te[1]*r]}function K(te){return te=S.invert((te[0]-d)/r,(m-te[1])/r),te&&[te[0]*degrees,te[1]*degrees]}function ee(te,ue){return te=t(te,ue),[te[0]*r+d,m-te[1]*r]}$.stream=function(te){return X&&Q===te?X:X=transformRadians(N(C,Y(z(Q=te))))},$.clipAngle=function(te){return arguments.length?(N=+te?clipCircle(A=te*radians,6*radians):(A=null,clipAntimeridian),ie()):A*degrees},$.clipExtent=function(te){return arguments.length?(z=te==null?(k=L=G=M=null,identity):clipExtent(k=+te[0][0],L=+te[0][1],G=+te[1][0],M=+te[1][1]),ie()):k==null?null:[[k,L],[G,M]]},$.scale=function(te){return arguments.length?(r=+te,se()):r},$.translate=function(te){return arguments.length?(s=+te[0],o=+te[1],se()):[s,o]},$.center=function(te){return arguments.length?(g=te[0]%360*radians,y=te[1]%360*radians,se()):[g*degrees,y*degrees]},$.rotate=function(te){return arguments.length?(b=te[0]%360*radians,x=te[1]%360*radians,E=te.length>2?te[2]%360*radians:0,se()):[b*degrees,x*degrees,E*degrees]},$.precision=function(te){return arguments.length?(Y=resample$1(ee,V=te*te),ie()):sqrt(V)},$.fitExtent=function(te,ue){return fitExtent($,te,ue)},$.fitSize=function(te,ue){return fitSize($,te,ue)};function se(){S=compose(C=rotateRadians(b,x,E),t);var te=t(g,y);return d=s-te[0]*r,m=o+te[1]*r,ie()}function ie(){return X=Q=null,$}return function(){return t=e.apply(this,arguments),$.invert=t.invert&&K,se()}}function azimuthalRaw(e){return function(t,r){var s=cos(t),o=cos(r),d=e(s*o);return[d*o*sin(t),d*sin(r)]}}function azimuthalInvert(e){return function(t,r){var s=sqrt(t*t+r*r),o=e(s),d=sin(o),m=cos(o);return[atan2(t*d,s*m),asin(s&&r*d/s)]}}var azimuthalEqualAreaRaw=azimuthalRaw(function(e){return sqrt(2/(1+e))});azimuthalEqualAreaRaw.invert=azimuthalInvert(function(e){return 2*asin(e/2)});var azimuthalEquidistantRaw=azimuthalRaw(function(e){return(e=acos(e))&&e/sin(e)});azimuthalEquidistantRaw.invert=azimuthalInvert(function(e){return e});function geoAzimuthalEquidistant(){return projection(azimuthalEquidistantRaw).scale(79.4188).clipAngle(180-.001)}function equirectangularRaw(e,t){return[e,t]}equirectangularRaw.invert=equirectangularRaw;var{BufferOp,GeoJSONReader,GeoJSONWriter}=jsts;function buffer(e,t,r){r=r||{};var s=r.units||"kilometers",o=r.steps||8;if(!e)throw new Error("geojson is required");if(typeof r!="object")throw new Error("options must be an object");if(typeof o!="number")throw new Error("steps must be an number");if(t===void 0)throw new Error("radius is required");if(o<=0)throw new Error("steps must be greater than 0");var d=[];switch(e.type){case"GeometryCollection":return geomEach(e,function(m){var g=bufferFeature(m,t,s,o);g&&d.push(g)}),featureCollection(d);case"FeatureCollection":return featureEach(e,function(m){var g=bufferFeature(m,t,s,o);g&&featureEach(g,function(y){y&&d.push(y)})}),featureCollection(d)}return bufferFeature(e,t,s,o)}function bufferFeature(e,t,r,s){var o=e.properties||{},d=e.type==="Feature"?e.geometry:e;if(d.type==="GeometryCollection"){var m=[];return geomEach(e,function(N){var k=bufferFeature(N,t,r,s);k&&m.push(k)}),featureCollection(m)}var g=defineProjection(d),y={type:d.type,coordinates:projectCoords(d.coordinates,g)},b=new GeoJSONReader,x=b.read(y),E=radiansToLength(lengthToRadians(t,r),"meters"),C=BufferOp.bufferOp(x,E,s),S=new GeoJSONWriter;if(C=S.write(C),!coordsIsNaN(C.coordinates)){var A={type:C.type,coordinates:unprojectCoords(C.coordinates,g)};return feature(A,o)}}function coordsIsNaN(e){return Array.isArray(e[0])?coordsIsNaN(e[0]):isNaN(e[0])}function projectCoords(e,t){return typeof e[0]!="object"?t(e):e.map(function(r){return projectCoords(r,t)})}function unprojectCoords(e,t){return typeof e[0]!="object"?t.invert(e):e.map(function(r){return unprojectCoords(r,t)})}function defineProjection(e){var t=center(e).geometry.coordinates,r=[-t[0],-t[1]];return geoAzimuthalEquidistant().rotate(r).scale(earthRadius)}var index_default$1=buffer;const identifyBundle={name:"identify",getReducer(){const e={shouldFire:!1,coordinates:null,listeners:[],results:[]};return(t=e,{type:r,payload:s})=>{switch(r){case"IDENTIFY_COLLECTION_ADDED":case"IDENTIFY_SHOULD_FIRE":case"IDENTIFY_COORDINATES_SET":case"IDENTIFY_STARTED":case"IDENTIFY_ERROR":case"IDENTIFY_SUCCESS":return Object.assign({},t,s);default:return t}}},doIdentifyAddCollection:e=>({dispatch:t,store:r})=>{const s=r.selectIdentifyListeners();e.onIdentify&&s.push(e.onIdentify),t({type:"IDENTIFY_COLLECTION_ADDED",payload:{listeners:s}})},doIdentifyShouldFire:()=>({dispatch:e})=>{e({type:"IDENTIFY_SHOULD_FIRE",payload:{shouldFire:!0}})},doIdentifySetCoords:e=>({dispatch:t,store:r})=>{e.transform("EPSG:3857","EPSG:4326");const s=e.getCoordinates();t({type:"IDENTIFY_COORDINATES_SET",payload:{coordinates:s,results:[],shouldFire:!0}})},doSetIdentifyFeature:()=>({store:e})=>{const t=e.selectIdentifyCoordinates(),r=e.selectResolution(),s=e.selectIdentifyBufferValue();let o=null;if(s>0)o=e.selectIdentifyBufferFeature();else if(typeof t[0]=="number"){const d=point(t),m=r*5/1e3;o=index_default$1(d,m,{units:"kilometers"})}else o=polygon(t);return o},doIdentifyFire:()=>({dispatch:e,store:t})=>{e({type:"IDENTIFY_STARTED",payload:{shouldFire:!1}}),t.doSetCursor("wait");const r=t.selectIdentifyListeners();parallel(r,(s,o)=>{if(s)return t.doSetCursor("default"),e({type:"IDENTIFY_ERROR",payload:{err:s,notification:{level:"danger",title:"Identify Error",message:`${JSON.stringify(s)}`}}});{const d=flatten(o);e({type:"IDENTIFY_SUCCESS",payload:{results:d}}),t.doSetCursor("default")}})},selectIdentifyCoordinates:e=>e.identify.coordinates,selectIdentifyListeners:e=>e.identify.listeners,selectIdentifyResults:e=>e.identify.results,reactIdentifyShouldFire:e=>{if(e.identify.shouldFire)return{actionCreator:"doIdentifyFire"}}};window.olStyle={Style,Fill,Stroke,Circle,Text,RegularShape};const defaultVectorStyle=[new Style({stroke:new Stroke({color:"rgba(255, 255, 255, 0.9)",width:4}),fill:new Fill({color:"rgba(255, 255, 255, 0.2)"})}),new Style({stroke:new Stroke({color:"rgba(0, 0, 0, 0.8)",lineDash:[4,4],width:2})}),new Style({image:new Circle({radius:8,stroke:new Stroke({color:"rgba(0, 0, 0, 0.8)",width:2}),fill:new Fill({color:"rgba(255, 255, 255, 1)"})})})],vectorStyleCreator=options=>options.styleFn?eval(options.styleFn):options.style?options.style:options.styleAttributes?(e,t)=>{const r=e.get("fillColor"),s=e.get("strokeColor"),o=e.get("strokeWidth"),d=e.get("strokeDash"),m=e.get("markerRadius"),g=e.get("markerColor"),y=e.get("markerStrokeColor"),b=e.get("markerStrokeWidth"),x=e.get("markerFillColor"),E=new Style;return r&&E.setFill(new Fill({color:r})),(s||o||d)&&E.setStroke(new Stroke({color:s||"rgba(0, 0, 0, 0.5)",lineDash:d?d.split(","):[10,10],width:o||2})),(g||m||y||b||x)&&E.setImage(new Circle({radius:m||3,stroke:new Stroke({color:y||"rgba(0, 0, 0, 0.7)",width:b||0}),fill:new Fill({color:x||"rgba(255, 255, 255, 0.2)"})})),E}:defaultVectorStyle,esrijsonFormat$1=new EsriJSON,origin=window.location.origin,isCrossOrigin=e=>{if(window.MSInputMethodContext&&document.documentMode)return null;if(e){if(e.indexOf(origin)===-1)return"anonymous"}else return null};function formatLabeledUrl(e){const t=e.indexOf("?")===-1?"?":"&";return`${e}${t}label=true`}function getXyzSource(e){const r=!!e.labelDefault?formatLabeledUrl(e.url):e.url;return new XYZ({attributions:e.attributions||e.attribution,attributionsCollapsible:!0,maxZoom:e.maxzoom,minZoom:e.minzoom,url:r,crossOrigin:isCrossOrigin(e.url)})}function getArcGISTiledSource(e){return new TileArcGISRest({url:e.url,params:{LAYERS:"show:"+e.layerList},crossOrigin:isCrossOrigin(e.url)})}function getArcGISImageSource(e){return new ImageArcGISRest({url:e.url,params:{LAYERS:"show:"+e.layerList},crossOrigin:isCrossOrigin(e.url)})}function getWmsSource(e){const t=e.params||e;return t.LAYERS=e.layerList||e.LAYERS,e.tiled===!0?new TileWMS({url:e.url,params:t,crossOrigin:isCrossOrigin(e.url)}):new ImageWMS({url:e.url,params:t,crossOrigin:isCrossOrigin(e.url)})}function getLocalVectorSource(e){const t=new VectorSrc,{features:r}=e;return r&&t.addFeatures(r),t}function getRemoteVectorSource(e){return new VectorSrc({format:new GeoJSON,url:e.url})}function getEsriVectorSource(e){let t=e.url;const r=e.layerList;/\/$/.test(t)||(t+="/");const o=new VectorSrc({loader:function(d,m,g){const y=encodeURIComponent(`{"xmin":${d[0]},"ymin":${d[1]},"xmax":${d[2]},"ymax":${d[3]},"spatialReference":{"wkid":102100}}`),b=`${t}${r}/query/?f=json&returnGeometry=true&spatialRel=esriSpatialRelIntersects&geometry=${y}&geometryType=esriGeometryEnvelope&inSR=102100&outFields=*&outSR=102100`;xhr.get(b,(x,E,C)=>{if(x)return console.log(x);const S=JSON.parse(C),A=esrijsonFormat$1.readFeatures(S,{featureProjection:g});A.length>0&&o.addFeatures(A)})},strategy:loadingstrategy.tile(tilegrid.createXYZ({tileSize:512}))});return o}function getTileLayer(e,t){return new Tile({source:t,visible:e.visible,zIndex:e.zIndex||0,opacity:e.opacity||1,maxZoom:e.maxzoom,minZoom:e.minzoom})}function getImageLayer(e,t){return new Image$1({source:t,visible:e.visible,zIndex:e.zIndex||0,opacity:e.opacity||1,maxZoom:e.maxzoom,minZoom:e.minzoom})}function getLocalVectorLayer(e,t){return new Vector({altitudeMode:"clampToGround",source:t,visible:e.visible,style:vectorStyleCreator(e),zIndex:e.zIndex||0,opacity:e.opacity||1,maxZoom:e.maxzoom,minZoom:e.minzoom})}function getRemoteVectorLayer(e,t){const r=new Vector({altitudeMode:"clampToGround",source:t,visible:e.visible,style:vectorStyleCreator(e),zIndex:e.zIndex||0,opacity:e.opacity||1,renderMode:"image",maxZoom:e.maxzoom,minZoom:e.minzoom});return e.uid,r}function getEsriVectorLayer(options,source,map){const lyr=new Vector({altitudeMode:"clampToGround",source,visible:options.visible,zIndex:options.zIndex||0,opacity:options.opacity||1,renderMode:"image",maxZoom:options.maxzoom,minZoom:options.minzoom}),proj=map?map.getView().getProjection():null;if(options.styleFn){const styleFn=eval(options.styleFn);lyr.setStyle(styleFn[0])}else olEsriStyle.createStyleFunctionFromUrl(`${options.url}/${options.layerList}`,proj).then(e=>{lyr.setStyle(e)}).catch(function(e){console.log("$$$$$$$$$$$$$$$$$$$$$$$$"),console.log(`${options.url}/${options.layerList}: ${e}`),console.log(e)});return lyr}function getSource(e){switch(e.serviceType){case"XYZ":return getXyzSource(e);case"ArcGIS":return getArcGISTiledSource(e);case"ArcGISImage":return getArcGISImageSource(e);case"WMS":return getWmsSource(e);case"LocalVector":return getLocalVectorSource(e);case"RemoteVector":return getRemoteVectorSource(e);case"EsriFeatureService":return getEsriVectorSource(e);default:return null}}function getLayer(e,t,r){switch(t||(t=getSource(e)),e.serviceType){case"XYZ":return getTileLayer(e,t);case"ArcGIS":return getTileLayer(e,t);case"ArcGISImage":return getImageLayer(e,t);case"WMS":return getImageLayer(e,t);case"LocalVector":return getLocalVectorLayer(e,t);case"RemoteVector":return getRemoteVectorLayer(e,t);case"EsriFeatureService":return getEsriVectorLayer(e,t,r);default:return null}}const mapBasemapBundle={name:"basemaps",getReducer(){const e={shouldCheckDefault:!1,activeBasemap:0,idx:0};return(t=e,{type:r,payload:s})=>{switch(r){case"BASEMAP_CHANGED":case"BASEMAP_CHECKING_DEFAULT":return Object.assign({},t,s);case"MAP_INITIALIZED":return Object.assign({},t,{shouldCheckDefault:!0});default:return t}}},doBasemapsCheckDefault:()=>({dispatch:e,store:t})=>{e({type:"BASEMAP_CHECKING_DEFAULT",payload:{shouldCheckDefault:!1}});const r=t.selectDefaultConfig();r.map.hasOwnProperty("basemap")&&t.doChangeBasemap(r.map.basemap)},doChangeBasemap:e=>({dispatch:t,store:r})=>{let s=r.selectActiveBasemap();const o=r.selectBasemapList(),d=r.selectMap(),m=o[e];m.serviceType||(m.serviceType="XYZ");const g=getSource(m);s||(s=getLayer({serviceType:"XYZ",visible:!0})),d.removeLayer(s),s.setSource(g),d.getLayers().insertAt(0,s),t({type:"BASEMAP_CHANGED",payload:{activeBasemap:s,idx:e}})},selectActiveBasemap:e=>e.basemaps.activeBasemap,selectActiveBasemapIdx:e=>e.basemaps.idx,reactBasemapsShouldCheckDefault:e=>{if(e.basemaps.shouldCheckDefault)return{actionCreator:"doBasemapsCheckDefault"}}},createOlMapBundle=e=>{const r=Object.assign({},{name:"map",center:[-98.579,39.828],zoom:5,rotation:0,minZoom:0,maxZoom:22,addons:{},limitMapExtent:!1},e);return Object.assign({},{name:r.name,getReducer:()=>{const s={map:null,opts:null,geoProjection:proj.get("EPSG:4326"),webProjection:proj.get("EPSG:3857"),center:r.center,zoom:r.zoom,rotation:r.rotation,minZoom:r.minZoom,maxZoom:r.maxZoom,limitMapExtent:r.limitMapExtent,shouldInitialize:!1,shouldResetViewState:!1,shouldUpdateViewState:!1};return(o=s,{type:d,payload:m})=>{if(console.log(d,m),r.additionalActions.indexOf(d)!==-1)return Object.assign({},o,m);switch(d){case"MAP_INITIALIZED":case"MAP_RESET_MAP_VIEW":case"MAP_UPDATED_VIEW_STATE_STARTED":case"MAP_UPDATED_VIEW_STATE_FINISHED":case"MAP_LOADING":case"MAP_LOADED":return Object.assign({},o,m);default:return o}}},doMapInitialize:(s,o)=>({dispatch:d,store:m})=>{if(m.selectMap())return;const y=m.selectMapGeoProjection(),b=m.selectMapWebProjection(),E=(o.hasOwnProperty("limitMapExtent")?o.limitMapExtent:null)?proj.transformExtent([-180,-85,180,85],y,b):null,C=o.hasOwnProperty("center")?o.center:m.selectMapCenter(),S=o.hasOwnProperty("zoom")?o.zoom:m.selectMapZoom(),A=o.hasOwnProperty("rotation")?o.rotation:m.selectMapRotation(),N=o.hasOwnProperty("minZoom")?o.minZoom:m.selectMapMinZoom(),k=o.hasOwnProperty("maxZoom")?o.maxZoom:m.selectMapMaxZoom();console.log("setting up at",o.center,C);const L={center:proj.transform(C,y,b),zoom:S,rotation:A,minZoom:N,maxZoom:k};E&&(L.extent=E);const G=new View(L),M=new olMap({controls:[new ScaleBar({units:"us"})],target:s,view:G});M.on("moveend",debounce(m.doMapUpdateViewState,200)),M.on("precompose",debounce(m.doMapPreCompose,50)),M.on("rendercomplete",debounce(m.doMapRenderComplete,200)),d({type:"MAP_INITIALIZED",payload:{map:M,opts:o}})},doMapPreCompose:()=>({dispatch:s})=>{s({type:"MAP_LOADING"})},doMapRenderComplete:()=>({dispatch:s})=>{s({type:"MAP_LOADED"})},doMapUpdateSize:()=>({dispatch:s,store:o})=>{const d=o.selectMap();d&&d.updateSize()},doMapUpdateViewState:()=>({dispatch:s,store:o})=>{s({type:"MAP_UPDATED_VIEW_STATE_STARTED",payload:{shouldUpdateViewState:!1}});const d=o.selectMapGeoProjection(),m=o.selectMapWebProjection(),y=o.selectMap().getView(),b=proj.transform(y.getCenter(),m,d),x=y.getRotation()*(180/Math.PI),E=y.getZoom(),C=y.getMinZoom(),S=y.getMaxZoom();s({type:"MAP_UPDATED_VIEW_STATE_FINISHED",payload:{center:b,rotation:x,zoom:E,minZoom:C,maxZoom:S}})},doMapResetViewState:()=>({dispatch:s,store:o})=>{s({type:"MAP_RESET_MAP_VIEW",payload:{shouldResetViewState:!1}});const{center:d,zoom:m,rotation:g}=r,b=o.selectMap().getView(),x=o.selectMapGeoProjection(),E=o.selectMapWebProjection();b.animate({center:proj.transform(d,x,E),zoom:m,rotation:g},200)},doMapZoomTo:(s,o)=>({store:d})=>{d.selectMap().getView().animate({zoom:o||10,center:proj.fromLonLat(s)})},selectMap:s=>s.map.map,selectMapOpts:s=>s.map.opts,selectMapGeoProjection:s=>s.map.geoProjection,selectMapWebProjection:s=>s.map.webProjection,selectMapCenter:s=>s.map.center,selectMapZoom:reduxBundler.createSelector("selectAppTime","selectMap",(s,o)=>o?o.getView().getZoom():0),selectMapRotation:s=>s.map.rotation,selectMapMinZoom:s=>s.map.minZoom,selectMapMaxZoom:s=>s.map.maxZoom,reactMapShouldResetViewState:s=>{if(s.map.shouldResetViewState)return{actionCreator:"doMapResetViewState"}},reactMapShouldUpdateViewState:s=>{if(s.map.shouldUpdateViewState)return{actionCreator:"doMapUpdateViewState"}},persistActions:r.persistMapState?["MAP_UPDATED_VIEW_STATE_FINISHED","MAP_RESET_MAP_VIEW"]:[],init:s=>{window.addEventListener("resize",s.doMapUpdateSize)}},r.addons)},mapCoreBundle=createOlMapBundle({additionalActions:["MAP_CURSOR_CHANGED"],addons:{doSetCursor:e=>({dispatch:t})=>{let r=e;r||(r="grab"),t({type:"MAP_CURSOR_CHANGED",payload:{cursor:r}})},selectCursorClass:e=>e.map.cursor,selectView:reduxBundler.createSelector("selectMap",e=>e?e.getView():null)}}),mapInteractionBundle={name:"interactions",getReducer(){const e={active:[]};return(t=e,{type:r,payload:s})=>r==="INTERACTION_SET"?Object.assign({},t,{active:s}):r==="INTERACTION_UNSET"?Object.assign({},t,{active:[]}):t},doSetInteraction:e=>({dispatch:t,store:r})=>{const s=r.selectActiveInteractions();r.selectMap().addInteraction(e);const d=[e].concat(s);t({type:"INTERACTION_SET",payload:d})},doUnsetInteractions:()=>({dispatch:e,store:t})=>{const r=t.selectActiveInteractions(),s=t.selectMap();r.length&&r.forEach(o=>{o.setActive(!1),s.removeInteraction(o)}),e({type:"INTERACTION_UNSET"})},selectActiveInteractions:e=>e.interactions.active},zoomLevels=[5e8,25e7,15e7,7e7,35e6,15e6,1e7,4e6,2e6,1e6,5e5,25e4,15e4,7e4,35e3,15e3,8e3,4e3,2e3,1e3,500],scaleToMapZoom=(e,t)=>{if(!e)return t;if(e>=zoomLevels[0])return 0;if(e<zoomLevels[zoomLevels.length-1])return zoomLevels.length-1;let r=0;for(var s=1;s<zoomLevels.length;s++)if(e>=zoomLevels[s]&&e<zoomLevels[s-1]){r=s;break}return r},createNode=(e,t)=>(e.type||(e.type=e.serviceType||"Folder"),e.uid||(e.uid=uuid.v4()),e.minzoom||(e.minzoom=scaleToMapZoom(e.maxscale,0)),e.maxzoom||(e.maxzoom=scaleToMapZoom(e.minscale,20)),{id:e.id,teamDatasetId:e.teamDatasetId,uid:e.uid,parent:null,children:[],root:e.root||!1,leaf:e.type!=="Folder",collapsed:e.collapsed||!0,visible:e.visible||!1,sortOrder:e.layerOrder||0,displayName:e.displayName,type:e.type,geometryType:e.geometryType,layerList:e.layerList,mapLayer:e.type!=="Folder"?e.mapLayer||getLayer(e,null,t):null,labelsOn:e.labelsOn?e.labelsOn:!!e.labelDefault,labelDefault:!!e.labelDefault,labelEnabled:!!e.labelEnabled,url:e.url,info:e.info,identifyType:e.identifyType,identifyFields:e.identifyFields,identifyRenameColums:e.identifyRenameColums,identifyFormatColumns:e.identifyFormatColumns,legend:e.legend,legendOverride:!!e.legendOverride,passFilter:!0,zoomTo:!!e.zoomTo,minzoom:e.minzoom,maxzoom:e.maxzoom,styleFn:e.styleFn,favorite:!1,userDefaultLayer:!1,selectAllLayers:e.selectAllLayers,layerDescription:e.layerDescription,attributions:e.attributions,moreInfo:e.moreInfo,resourceDownload:e.resourceDownload,hoverText:e.hoverText,folderHoverText:e.folderHoverText,folderURL:e.folderURL,groupTag:e.groupTag,layerFunction:e.layerFunction,layerParams:e.layerParams}),isParentOf=(e,t)=>{let r=[];function s(o){o.parent&&(r.push(o.parent),s(o.parent))}return s(t),r.indexOf(e)!==-1},removeFromParent=e=>{const t=e.parent,r=t.children.indexOf(e);t.children.splice(r,1)},insertNodeAt=(e,t,r)=>{e.parent=t,t.children.splice(r,0,e)},mapLayersBundle={defaultParentUid:null,name:"layers",getReducer(){const e={appTime:null,layers:{},idMap:{},resetNeeded:!1,filterString:"",showFilter:!1,favoriteLayers:[],userDefaultLayers:[],overrideSortLayerOrder:!1,sortOrderStatus:!1};return(t=e,{type:r,payload:s})=>r==="LAYERS_LIST_UPDATED"?Object.assign({},t,{appTime:new Date,layers:s,resetNeeded:!0}):r==="LAYERS_IDMAP_UPDATED"?Object.assign({},t,{appTime:new Date,idMap:s}):r==="LAYERS_ORDER_UPDATED"?Object.assign({},t,{resetNeeded:!1}):r==="LAYERS_ORDER_OVERRIDE_SORT_ORDER"?Object.assign({},t,s):r==="LAYERS_TOGGLE_FILTER"?Object.assign({},t,s):r==="LAYERS_FILTER_CHANGED"?Object.assign({},t,s):r==="LAYERS_FAVORITES_LIST_UPDATED"?Object.assign({},t,s):r==="LAYERS_USER_DEFAULT_LAYERS_LIST_UPDATED"?Object.assign({},t,s):r==="SORT_ORDER_NOW_SHOWING"?Object.assign({},t,s):t},doLayersToggleFilter:e=>({dispatch:t})=>{t({type:"LAYERS_TOGGLE_FILTER",payload:{showFilter:e}})},doLayersUpdateFilter:e=>({dispatch:t,store:r})=>{const s=r.selectLayers();function o(m){m.passFilter=!0,m.children&&m.children.length&&m.children.forEach(o)}function d(m){m.passFilter=!0,e&&(m.collapsed=!1),m.parent&&d(m.parent)}Object.keys(s).forEach(m=>{const g=s[m];g.passFilter=!1;const y=g.displayName.toUpperCase().indexOf(e.toUpperCase())!==-1;g.groupTag&&g.groupTag.length>0&&g.groupTag.forEach(b=>{b&&b.toUpperCase().indexOf(e.toUpperCase())!==-1&&(g.passFilter=!0)}),y&&(g.passFilter=!0)}),Object.keys(s).forEach(m=>{const g=s[m];g.passFilter&&(o(g),d(g))}),console.log("filtered layers",s),t({type:"LAYERS_FILTER_CHANGED",payload:{filterString:e,layers:Object.assign({},s)}})},doAddLayer:e=>({dispatch:t,store:r})=>{const s=r.selectLayers(),o=r.selectIdMap(),d=r.selectMap(),m=createNode(e,d);if(e.id){const y=Object.assign({},o,{[e.id]:m.uid});t({type:"LAYERS_IDMAP_UPDATED",payload:y})}if(e.parentUid){const y=s[e.parentUid];m.parent=y,y.children.push(m)}if(m.mapLayer&&(d.addLayer(m.mapLayer),console.log("tried to add layer with zoomto = ",m.zoomTo),m.zoomTo)){const y=m.mapLayer.getSource();d.getView().fit(y.getExtent())}const g=Object.assign({},s,{[m.uid]:m});t({type:"LAYERS_LIST_UPDATED",payload:g})},doActivateUserDefaultLayers:()=>({dispatch:e,store:t})=>{const r=t.selectUserDefaultLayers(),s=t.selectLayers();r.forEach(o=>{const d=s[o.uid];d&&d.mapLayer&&(d.visible=!0,d.mapLayer.setVisible(!0))}),e({type:"LAYERS_LIST_UPDATED",payload:Object.assign({},s)})},doAddLayersBulk:e=>({dispatch:t,store:r})=>{const s=r.selectTreeRootNode(),o=r.selectLayers(),d=r.selectIdMap(),m=r.selectMap();for(var g=0;g<e.length;g++){const y=e[g];if(!y||!y.id)break;const b=createNode(y,m);d[y.id]=b.uid,o[b.uid]=b,b.mapLayer&&m&&m.addLayer(b.mapLayer)}t({type:"LAYERS_IDMAP_UPDATED",payload:Object.assign({},d)});for(var g=0;g<e.length;g++){const b=e[g];if(!b||!b.id)break;let x=o[d[b.id]],E;b.parentId?E=o[d[b.parentId]]:E=s,E&&E.hasOwnProperty("uid")&&(x.parent=E,E.children.push(x))}t({type:"LAYERS_LIST_UPDATED",payload:Object.assign({},o)})},doTreeInsertAfter:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectLayers(),d=o[e],m=o[t];if(!isParentOf(d,m)){removeFromParent(d);const g=m.parent,y=g.children.indexOf(m)+1;insertNodeAt(d,g,y)}r({type:"LAYERS_LIST_UPDATED",payload:Object.assign({},o)})},doTreeInsertBefore:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectLayers(),d=o[e],m=o[t];if(!isParentOf(d,m)){removeFromParent(d);const g=m.parent,y=g.children.indexOf(m);insertNodeAt(d,g,y)}r({type:"LAYERS_LIST_UPDATED",payload:Object.assign({},o)})},doTreeInsertChild:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectLayers(),d=o[e],m=o[t];if(!isParentOf(d,m)){removeFromParent(d);const g=m;insertNodeAt(d,g,g.children.length)}r({type:"LAYERS_LIST_UPDATED",payload:Object.assign({},o)})},doTreeMerge:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectLayers(),d=o[e],m=o[t];if(!isParentOf(d,m)){const g=m.parent,y=g.children.indexOf(m);removeFromParent(d);const b=createNode({root:!1,leaf:!1,teamDatasetId:null,collapsed:!1,visible:!1,sortOrder:0,displayName:"New Folder",type:"Folder"},map);d.parent=b,m.parent=b,b.children.push(m),b.children.push(d),b.parent=g,g.children.splice(y,1,b)}r({type:"LAYERS_LIST_UPDATED",payload:Object.assign({},o)})},doTreeRemove:e=>({dispatch:t,store:r})=>{const s=r.selectMap(),o=r.selectLayers(),d=o[e];function m(g){g&&(g.children&&g.children.length&&g.children.forEach(function(y){m(y)}),g.mapLayer&&s.removeLayer(g.mapLayer),removeFromParent(g),delete o[g.uid])}m(d),t({type:"LAYERS_LIST_UPDATED",payload:Object.assign({},o)}),t({type:"LAYER_REMOVED",payload:{uid:e}})},doTreeUpdate:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectLayers(),d=o[e];Object.keys(t).forEach(m=>{m!=="uid"&&(d[m]=t[m])}),r({type:"LAYERS_LIST_UPDATED",payload:Object.assign({},o)})},doTreeSetCollapsedAll:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectLayers(),d=o[e];function m(g){g.collapsed=t,g.children.length>0&&g.children.forEach(m)}m(d),r({type:"LAYERS_LIST_UPDATED",payload:Object.assign({},o)})},doTreeSetCollapsed:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectLayers(),d=o[e];d.collapsed=t,r({type:"LAYERS_LIST_UPDATED",payload:Object.assign({},o)})},doTreeSetVisibleAll:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectLayers(),d=o[e];function m(g){g.mapLayer&&(g.mapLayer.setVisible(t),g.visible=t),g.children.length>0&&g.children.forEach(m)}m(d),r({type:"LAYERS_LIST_UPDATED",payload:Object.assign({},o)})},doLayerSetVisible:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectLayers(),d=o[e];if(d.mapLayer&&(d.visible=t,d.mapLayer.setVisible(t)),r({type:"LAYERS_LIST_UPDATED",payload:Object.assign({},o)}),d.visible&&d.layerFunction&&d.layerParams){const m=d.layerParams,g=d.layerFunction,y=s[g];y&&y(m)}},doLayerSetLabels:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectLayers(),d=o[e];function m(g){const y=g.indexOf("?")===-1?"?":"&";return`${g}${y}label=true`}if(d.mapLayer){d.labelsOn=t;const g=d.mapLayer.getSource(),b=g.getUrls().map(x=>t?m(d.url):d.url);g.setUrls(b)}r({type:"LAYERS_LIST_UPDATED",payload:Object.assign({},o)})},doLayerSetLayerOrder:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectLayers(),d=o[e];d.mapLayer&&(d.sortOrder=t,d.mapLayer.setZIndex(t)),r({type:"LAYERS_LIST_UPDATED",payload:Object.assign({},o)})},doLayerSetOpactiy:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectLayers(),d=o[e];d.mapLayer&&d.mapLayer.setOpacity(t),r({type:"LAYERS_LIST_UPDATED",payload:Object.assign({},o)})},doUpdateLayerOrder:()=>({dispatch:e,store:t})=>{const r=t.selectTreeRootNode(),s=t.selectOverrideSortOrder();let o=999;function d(m){let g=o--;m.mapLayer&&(s?m.mapLayer.setZIndex(m.sortOrder):(m.sortOrder=g,m.mapLayer.setZIndex(g))),m.children&&m.children.forEach(d)}d(r),e({type:"LAYERS_ORDER_UPDATED"})},doUpdateFavoriteLayers:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectFavoriteLayers(),m=s.selectLayers()[t.uid];if(e==="add")o.push(m);else{const g=o.findIndex(function(y){return y.uid===t.uid});g!==-1&&o.splice(g,1)}r({type:"LAYERS_FAVORITES_LIST_UPDATED",payload:{favoriteLayers:o}})},doLayerSetFavorite:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectLayers(),d=o[e];d.favorite=t,r({type:"LAYERS_LIST_UPDATED",payload:Object.assign({},o)})},doUpdateUserDefaultLayers:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectUserDefaultLayers(),m=s.selectLayers()[t.uid];if(e==="add")o.push(m);else{const g=o.findIndex(function(y){return y.uid===t.uid});g!==-1&&o.splice(g,1)}r({type:"LAYERS_USER_DEFAULT_LAYERS_LIST_UPDATED",payload:{userDefaultLayers:o}})},doLayerSetUserDefaultLayers:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectLayers(),d=o[e];d.userDefaultLayer=t,r({type:"LAYERS_LIST_UPDATED",payload:Object.assign({},o)})},doOverrideSortOrder:e=>({dispatch:t})=>{t({type:"LAYERS_ORDER_OVERRIDE_SORT_ORDER",payload:{overrideSortLayerOrder:e}})},doShowLayerSortOrder:e=>({dispatch:t})=>{e&&t({type:"SORT_ORDER_NOW_SHOWING",payload:{sortOrderStatus:!0}})},selectSortOrderStatus:e=>e.layers.sortOrderStatus,selectFavoriteLayers:e=>e.layers.favoriteLayers,selectUserDefaultLayers:e=>e.layers.userDefaultLayers,selectLayers:e=>e.layers.layers,selectIdMap:e=>e.layers.idMap,selectUidMap:reduxBundler.createSelector("selectLayers",e=>{const t={};return Object.keys(e).forEach(r=>{e[r]&&(t[r]=e[r].displayName)}),t}),selectCmLayers:reduxBundler.createSelector("selectLayers",e=>{const t=[];return Object.keys(e).forEach(r=>{e[r]&&e[r].teamDatasetId&&t.push(e[r].teamDatasetId)}),t}),selectVisibleLayers:reduxBundler.createSelector("selectLayers",e=>{const t=[];return Object.keys(e).forEach(r=>{e[r]&&e[r].visible&&t.push(e[r])}),t}),selectVisibleCmLayers:reduxBundler.createSelector("selectLayers",e=>{const t=[];return Object.keys(e).forEach(r=>{e[r]&&e[r].teamDatasetId&&e[r].visible&&t.push(e[r].teamDatasetId)}),t}),selectCmLayerNames:reduxBundler.createSelector("selectLayers",e=>{const t=[];return Object.keys(e).forEach(r=>{e[r]&&e[r].teamDatasetId&&t.push({teamDatasetId:e[r].teamDatasetId,displayName:e[r].displayName})}),t}),selectLayerFilterString:e=>e.layers.filterString,selectLayerShowFilter:e=>e.layers.showFilter,selectOverrideSortOrder:e=>e.layers.overrideSortLayerOrder,reactResetSortOrder:e=>{if(e.layers.resetNeeded)return{actionCreator:"doUpdateLayerOrder"}}},mapProjBundle={name:"proj",getReducer(){const e={epsgio:!1,displayProjection:"EPSG:4326",displayProjectionName:"WGS 84 - WGS84 - World Geodetic System 1984","EPSG:4326":{epsg:"EPSG:4326",name:"WGS 84 - WGS84 - World Geodetic System 1984",proj:proj.get("EPSG:4326")},"EPSG:3857":{epsg:"EPSG:3857",name:"WGS 84 / Pseudo-Mercator - Spherical Mercator",proj:proj.get("EPSG:3857")}};return(t=e,{type:r,payload:s})=>r==="PROJECTION_LOAD_SUCCESS"?Object.assign({},t,{[s.epsg]:s}):r==="PROJECTION_REMOVED"?Object.assign({},s):r==="PROJECTION_SELECTED"?Object.assign({},t,s):r==="PROJECTION_PING_RESULT"?Object.assign({},t,{epsgio:s.epsgio}):t},doLoadProjDef:e=>({dispatch:t,store:r,anonGet:s})=>{t({type:"PROJECTION_LOAD_START"});const o=/PROJCS..(.*)..GEOGCS/g;let d=e;e.indexOf(":")!==-1&&(d=d.split(":")[1]),s(`https://epsg.io/${d}.proj4`,(m,g,y)=>{y?s(`https://epsg.io/${d}.wkt`,(b,x,E)=>{if(E){const C=o.exec(E)[1];proj4.defs(e,y),proj.addProjection(new Projection({code:e})),t({type:"PROJECTION_LOAD_SUCCESS",payload:{epsg:e,name:C,def:proj.get(e)}})}}):t({type:"PROJECTION_LOAD_ERROR",payload:g})})},doProjectionPingEPSGIO:()=>({dispatch:e,anonGet:t})=>{t("https://epsg.io/26916.wkt",(s,o,d)=>{d&&e({type:"PROJECTION_PING_RESULT",payload:{epsgio:!0}})})},doRemoveProjection:e=>({dispatch:t,store:r})=>{const s=Object.assign({},r.selectProjectionStateRaw());delete s[e],t({type:"PROJECTION_REMOVED",payload:s})},doSelectProjection:(e,t)=>({dispatch:r})=>{r({type:"PROJECTION_SELECTED",payload:{displayProjection:e,displayProjectionName:t}})},selectGeoProjection:e=>e.proj["EPSG:4326"].proj,selectMapProjection:e=>e.proj["EPSG:3857"].proj,selectProjectionStateRaw:e=>e.proj,selectProjectionList:e=>_.values(e.proj).filter(t=>typeof t=="object"),selectDisplayProjection:e=>e.proj.displayProjection,selectDisplayProjectionName:e=>e.proj.displayProjectionName,selectProjectionCanUseEPSGIO:e=>e.proj.epsgio,init(e){e.doProjectionPingEPSGIO()}},animateView=(e,t)=>{t.animate(e)},zoomToLocation=(e,t,r)=>{animateView({center:e,zoom:t},r)},mapViewBundle={name:"view",getReducer:()=>{const e={shouldReadUrlParams:!1,shouldSetDefaults:!1,center:[-98.579,39.828],zoom:4,rotation:0,position:{},heading:0,pitch:0,roll:0,minZoom:0,maxZoom:22,action:null,updating:!1,listening:!1,shouldUpdateZoom:!1};return(t=e,{type:r,payload:s})=>{switch(r){case"VIEW_SET_DEFAULTS_START":case"VIEW_SET_DEFAULTS":case"VIEW_SET_PARAMS_START":case"VIEW_SET_PARAMS_COMPLETE":return Object.assign({},t,s);case"WINDOW_LOCATION_PARSED":return Object.assign({},t,{shouldReadUrlParams:!0});case"MAP_INITIALIZED":return Object.assign({},t,{shouldSetDefaults:!0})}return r==="VIEW_START_ACTION"?Object.assign({},t,{updating:!0}):r==="VIEW_END_ACTION"?Object.assign({},t,{updating:!1}):r==="VIEW_EVENTS_REGISTERED"?Object.assign({},t,{listening:!0}):r==="VIEW_CHANGED"?Object.assign({},t,s):t}},doViewSetDefaults:e=>({dispatch:t,store:r})=>{t({type:"VIEW_SET_DEFAULTS_START",payload:{shouldSetDefaults:!1}});const s={center:e.centerX&&e.centerY?[e.centerX,e.centerY]:[-95.579,39.828],zoom:e.centerZ?e.centerZ:4,rotation:e.rotation?e.rotation:0,position:{},heading:e.heading3d?e.heading3d:0,pitch:0,roll:0,minZoom:e.minzoom?e.minzoom:0,maxZoom:e.maxzoom?e.maxzoom:22};t({type:"VIEW_SET_DEFAULTS",payload:s})},doViewSetFromParams:()=>({dispatch:e,store:t})=>{e({type:"VIEW_SET_PARAMS_START",payload:{shouldReadUrlParams:!1}});const r=t.selectViewState(),s=t.selectWindowLocationParams();Number(s.x)&&(r.center[0]=Number(s.x)),Number(s.y)&&(r.center[1]=Number(s.y)),Number(s.z)&&(r.zoom=Number(s.z)),t.doSetView(r)},doZoomToExtent:(e,t)=>({dispatch:r,store:s})=>{r({type:"VIEW_START_ACTION"});const o=s.selectMap();s.selectView().fit(e,{size:o.getSize(),duration:500,minResolution:10,callback:()=>{t&&typeof t=="function"&&t(),r({type:"VIEW_END_ACTION"})}})},doZoomToLayerExtent:e=>({dispatch:t,store:r})=>{},doZoomToLocation:(e,t)=>({dispatch:r,store:s})=>{r({type:"VIEW_START_ACTION"});const o=s.selectView();zoomToLocation(e,t,o),r({type:"VIEW_END_ACTION"})},doZoomIn:()=>({dispatch:e,store:t})=>{e({type:"VIEW_START_ACTION"});const r=t.selectView(),s=r.getZoom();animateView({zoom:s+1},r),e({type:"VIEW_END_ACTION"})},doZoomOut:()=>({dispatch:e,store:t})=>{e({type:"VIEW_START_ACTION"});const r=t.selectView(),s=r.getZoom();animateView({zoom:s-1},r),e({type:"VIEW_END_ACTION"})},doSetRotationNorth:()=>({dispatch:e,store:t})=>{e({type:"VIEW_START_ACTION"});const r=t.selectView();animateView({rotation:0},r),e({type:"VIEW_END_ACTION"})},doUpdateView:e=>({dispatch:t,store:r})=>{const o=e.map.getView(),d=o.getZoom(),m=proj.transform(o.getCenter(),r.selectMapProjection(),"EPSG:4326"),g=o.getRotation()*(180/Math.PI);t({type:"VIEW_CHANGED",payload:{center:m,zoom:d,rotation:g}})},doSetView:e=>({dispatch:t,store:r})=>{const s=r.selectView();if(!s)return null;animateView({center:proj.transform(e.center,"EPSG:4326",r.selectMapProjection()),zoom:e.zoom,rotation:e.rotation},s)},doListenToMap:()=>({dispatch:e,store:t})=>{t.selectMap(),e({type:"VIEW_EVENTS_REGISTERED"})},selectViewState:e=>e.view,selectViewAction:e=>e.view.action,selectViewCenter:reduxBundler.createSelector("selectAppTime","selectMap","selectViewState",(e,t,r)=>{if(!t)return r.center;const s=t.getView();return s?s.getCenter():r.center}),selectMapSize:reduxBundler.createSelector("selectMap","selectAppTime",(e,t)=>e?e.getSize():null),selectMapImageDisplay:reduxBundler.createSelector("selectMapSize",e=>e?[e[0],e[1],92]:null),selectMapExtent:reduxBundler.createSelector("selectAppTime","selectView","selectMapSize","selectMapProjection",(e,t,r,s)=>{if(!t)return null;const o=t.calculateExtent(r),d=proj.transform([o[0],o[1]],s,"EPSG:4326"),m=proj.transform([o[2],o[3]],s,"EPSG:4326");return[d[0],d[1],m[0],m[1]]}),selectResolution:reduxBundler.createSelector("selectView","selectAppTime",(e,t)=>e?e.getResolution():null),reactAddListeners:e=>{if(!e.view.listening&&e.map.map2d)return{actionCreator:"doListenToMap"}},reactViewShouldReadUrlParams:e=>{if(e.view.shouldReadUrlParams)return{actionCreator:"doViewSetFromParams"}},reactViewShouldSetDefaults:e=>{if(e.view.shouldSetDefaults)return{actionCreator:"doViewSetDefaults",args:[e.config.default.map]}}},createContainerBundle=e=>{const r=Object.assign({},{name:"container",children:null,options:null,openedBy:null,addons:{},additionalActions:[],additionalState:{}},e),s=r.name.charAt(0).toUpperCase()+r.name.slice(1),o=r.name.toUpperCase(),d={OPENED:`${o}_OPENED`,CLOSED:`${o}_CLOSED`},m=`do${s}Open`,g=`do${s}Close`,y=`select${s}Children`,b=`select${s}Options`,x=`select${s}OpenedBy`;return Object.assign({},{name:r.name,getReducer:()=>{const C=Object.assign({children:r.children,options:r.options,openedBy:r.openedBy},r.additionalState);return(S=C,{type:A,payload:N})=>{if(r.additionalActions.indexOf(A)!==-1)return Object.assign({},S,N);switch(A){case d.OPENED:case d.CLOSED:return Object.assign({},S,N);default:return S}}},[m]:({children:C,options:S,openedBy:A})=>({dispatch:N})=>{C.length||(C=[C]),N({type:d.OPENED,payload:{children:C,options:S,openedBy:A}})},[g]:()=>({dispatch:C})=>{C({type:d.CLOSED,payload:{children:null,options:null,openedBy:null}})},[y]:C=>C[r.name].children,[b]:C=>C[r.name].options,[x]:C=>C[r.name].openedBy},r.addons)},modalWindowBundle=createContainerBundle({name:"modal"}),notificationBundle={name:"notifications",getReducer(){const e={};return(t=e,{type:r,payload:s})=>{if(s&&s.notification){const o=uuid.v4();return s.notification.uid=o,Object.assign({},t,{[o]:s.notification})}switch(r){case"NOTIFICATIONS_FIRED":case"NOTIFICATIONS_DISMISSED":return Object.assign({},t,s);default:return t}}},doNotificationsFire:e=>({dispatch:t,store:r})=>{const s=uuid.v4();e.uid=s,t({type:"NOTIFICATIONS_FIRED",payload:{[s]:e}})},doNotificationsDismiss:e=>({dispatch:t,store:r})=>{const s=r.selectNotifications();delete s[e],t({type:"NOTIFICATIONS_DISMISSED",payload:s})},selectNotifications:e=>e.notifications},pluginBundle={name:"plugins",getReducer(){const e={loading:!1,components:[]};return(t=e,{type:r,payload:s})=>r==="PLUGINS_STARTED_LOADING"?Object.assign({},t,{loading:!0}):r==="PLUGINS_STOPPED_LOADING"?Object.assign({},t,{loading:!1}):r==="PLUGINS_ADDED_COMPONENTS"?Object.assign({},t,{components:t.components.concat(s)}):t},doAddPluginComponents:e=>({dispatch:t})=>{t({type:"PLUGINS_ADDED_COMPONENTS",payload:e})},doStartLoadingPlugins:()=>({dispatch:e,store:t})=>{e({type:"PLUGINS_STARTED_LOADING"})},doStopLoadingPlugins:()=>({dispatch:e})=>{e({type:"PLUGINS_STOPPED_LOADING"})},selectPluginsAreLoading:e=>e.plugins.loading,selectAllComponents:e=>e.plugins.components,selectComponentsLeftSidebarTop:reduxBundler.createSelector("selectAllComponents",e=>_.map(_.sortBy(_.filter(e,{region:"left-sidebar-top"}),["sortOrder"]),t=>t.component)),selectComponentsLeftSidebarBottom:reduxBundler.createSelector("selectAllComponents",e=>_.map(_.sortBy(_.filter(e,{region:"left-sidebar-bottom"}),["sortOrder"]),t=>t.component)),selectComponentsLeftSidebarCount:reduxBundler.createSelector("selectComponentsLeftSidebarTop","selectComponentsLeftSidebarBottom",(e,t)=>e.length+t.length),selectComponentsRightSidebarTop:reduxBundler.createSelector("selectAllComponents",e=>_.map(_.sortBy(_.filter(e,{region:"right-sidebar-top"}),["sortOrder"]),t=>t.component)),selectComponentsRightSidebarBottom:reduxBundler.createSelector("selectAllComponents",e=>_.map(_.sortBy(_.filter(e,{region:"right-sidebar-bottom"}),["sortOrder"]),t=>t.component)),selectComponentsRightSidebarCount:reduxBundler.createSelector("selectComponentsUpperRight","selectComponentsLowerRight","selectComponentsRightSidebarTop","selectComponentsRightSidebarBottom",(e,t,r,s)=>e.length+t.length+r.length+s.length),selectComponentsBasicToolbar:reduxBundler.createSelector("selectAllComponents",e=>_.map(_.sortBy(_.filter(e,{region:"basic-toolbar"}),["sortOrder"]),t=>t.component)),selectComponentsBasicToolbarCount:reduxBundler.createSelector("selectComponentsBasicToolbar",e=>e.length),selectComponentsLowerRight:reduxBundler.createSelector("selectAllComponents",e=>_.map(_.sortBy(_.filter(e,{region:"lower-right-toolbar"}),["sortOrder"]),t=>t.component)),selectComponentsUpperRight:reduxBundler.createSelector("selectAllComponents",e=>_.map(_.sortBy(_.filter(e,{region:"upper-right-toolbar"}),["sortOrder"]),t=>t.component))},primaryPanelBundle=createContainerBundle({name:"primaryPanel",additionalState:{width:300,showClose:!1,showFavoritesBtn:!1,favoritesDB:null,showUserDefaultLayersBtn:!1,userDefaultLayersDB:null},additionalActions:["PRIMARY_PANEL_RESIZED","PRIMARY_PANEL_SHOW_CLOSE","PRIMARY_PANEL_SET_WIDTH","PRIMARY_PANEL_SHOW_FAVORITES_BTN","PRIMARY_PANEL_SHOW_USER_DEFAULT_LAYERS_BTN"],addons:{doPrimaryPanelResize:({width:e})=>({dispatch:t})=>{t({type:"PRIMARY_PANEL_RESIZED",payload:{width:e}})},doPrimaryPanelSetWidth:e=>({dispatch:t})=>{t({type:"PRIMARY_PANEL_SET_WIDTH",payload:{width:e}})},doShowPrimaryPanelCloseBtn:()=>({dispatch:e})=>{e({type:"PRIMARY_PANEL_SHOW_CLOSE",payload:{showClose:!0}})},doShowFavoritesBtn:e=>({dispatch:t})=>{t({type:"PRIMARY_PANEL_SHOW_FAVORITES_BTN",payload:{showFavoritesBtn:!0,favoritesDB:e}})},doShowUserDefaultLayersBtn:e=>({dispatch:t})=>{t({type:"PRIMARY_PANEL_SHOW_USER_DEFAULT_LAYERS_BTN",payload:{showUserDefaultLayersBtn:!0,userDefaultLayersDB:e}})},selectPrimaryPanelWidth:e=>e.primaryPanel.width,selectPrimaryPanelShowClose:e=>e.primaryPanel.showClose,selectPrimaryPanelShowFavoritesBtn:e=>e.primaryPanel.showFavoritesBtn,selectPrimaryPanelFavoritesDB:e=>e.primaryPanel.favoritesDB,selectPrimaryPanelShowUserDefaultLayersBtn:e=>e.primaryPanel.showUserDefaultLayersBtn,selectPrimaryPanelUserDefaultLayersDB:e=>e.primaryPanel.userDefaultLayersDB,selectPrimaryPanelTop:reduxBundler.createSelector("selectComponentsBasicToolbarCount",e=>e>0?42:0)}}),searchBundle={name:"search",getReducer(){const e={shouldFireSearch:!1,q:"",selected:null,onFireSearchListeners:[],results:[]};return(t=e,{type:r,payload:s})=>r.indexOf("SEARCH_")!==-1?Object.assign({},t,s):t},doSearchAddCollection:e=>({dispatch:t,store:r})=>{const s=r.selectSearchOnFireSearchListeners();e.onFireSearch&&s.push(e.onFireSearch),t({type:"SEARCH_COLLECTION_ADDED",payload:{onFireSearchListeners:s}})},doSearchShouldFire:()=>({dispatch:e})=>{e({type:"SEARCH_SHOULD_FIRE",payload:{shouldFire:!0}})},doSearchSetQuery:e=>({dispatch:t,store:r})=>{t({type:"SEARCH_SET_QUERY",payload:{q:e,results:[]}})},doSearchSelectItem:e=>({dispatch:t})=>{t({type:"SEARCH_ITEM_SELECTED",payload:{selected:e}})},doSearchFire:()=>({dispatch:e,store:t})=>{e({type:"SEARCH_START",payload:{shouldFire:!1}});const r=t.selectSearchOnFireSearchListeners();async.parallel(r,(s,o)=>{if(s)return e({type:"SEARCH_ERROR",payload:{err:s,results:[]}});const d=_.flatten(o),m=[],g=[];d.forEach(b=>{b.provider!=="geocoder"&&g.push(b),b.provider==="geocoder"&&m.push(b)});const y=[...g,...m];e({type:"SEARCH_SUCCESS",payload:{results:y}})})},selectSearchOnFireSearchListeners:e=>e.search.onFireSearchListeners,selectSearchQueryString:e=>e.search.q,selectSearchResults:e=>e.search.results,reactSearchShouldFire:e=>{if(e.search.shouldFire)return{actionCreator:"doSearchFire"}}},southRegionBundle={name:"southRegion",getReducer:()=>{const e={children:{},_shouldTryToCloseRegion:!1};return(t=e,{type:r,payload:s})=>{switch(r){case"SOUTH_REGION_OPENED":case"SOUTH_REGION_CLOSED":case"SOUTH_REGION_TAB_CLOSED":case"SOUTH_REGION_TRY_CLOSE":return Object.assign({},t,s);default:return t}}},doSouthRegionOpen:e=>({dispatch:t,store:r})=>{const s=r.selectSouthRegionChildrenObj(),o=uuid.v4();e.uid=o,t({type:"SOUTH_REGION_OPENED",payload:{children:{...s,[o]:e}}})},doSouthRegionClose:()=>({dispatch:e,store:t})=>{e({type:"SOUTH_REGION_CLOSED",payload:{children:{}}})},doSouthRegionCloseTab:e=>({dispatch:t,store:r})=>{const s=r.selectSouthRegionChildrenObj();delete s[e],t({type:"SOUTH_REGION_TAB_CLOSED",payload:{children:{...s},_shouldTryToCloseRegion:!0}})},doSouthRegionTryClose:()=>({dispatch:e,store:t})=>{e({type:"SOUTH_REGION_TRY_CLOSE",payload:{_shouldTryToCloseRegion:!1}}),t.selectSouthRegionChildren().length||t.doSouthRegionClose()},selectSouthRegionChildrenObj:e=>e.southRegion.children,selectSouthRegionChildren:reduxBundler.createSelector("selectSouthRegionChildrenObj",e=>{const t=[];for(var r in e)t.push(e[r]),t.unshift(t.pop());return t}),reactSouthRegionTryToCloseRegion:e=>{if(e.southRegion._shouldTryToCloseRegion)return{actionCreator:"doSouthRegionTryClose"}}},themeBundle={name:"theme",getReducer:()=>{const e={theme:"bg-blue-chambray",iconSize:"default"};return(t=e,{type:r,payload:s})=>{switch(r){case"THEME_CHANGED":case"THEME_SET_LARGER_ICONS":return Object.assign({},t,s);default:return t}}},doThemeSet:e=>({dispatch:t})=>{t({type:"THEME_CHANGED",payload:{theme:e}})},doThemeSetLargeIcons:()=>({dispatch:e})=>{e({type:"THEME_SET_LARGER_ICONS",payload:{iconSize:"large"}})},selectTheme:e=>e.theme.theme,selectThemeIconSize:e=>e.theme.iconSize},verticalLayoutBundle={name:"vLayout",getReducer:()=>{const e={height:window.innerHeight-20,hNorth:1,hSouth:0,_shouldUpdateMap:!1};return(t=e,{type:r,payload:s})=>{switch(r){case"VLAYOUT_UPDATE_HEIGHT":case"VLAYOUT_MAP_UPDATE_START":return Object.assign({},t,s);case"SOUTH_REGION_OPENED":return Object.assign({},t,{hNorth:.5,hSouth:.5,_shouldUpdateMap:!0});case"SOUTH_REGION_CLOSED":return Object.assign({},t,{hNorth:1,hSouth:0,_shouldUpdateMap:!0});default:return t}}},doVLayoutResize:(e,t)=>({dispatch:r})=>{r({type:"VLAYOUT_UPDATE_HEIGHT",payload:{hNorth:e,hSouth:t,_shouldUpdateMap:!0}})},doVLayoutSetHeight:e=>({dispatch:t})=>{t({type:"VLAYOUT_UPDATE_HEIGHT",payload:{height:e}})},doVLayoutUpdateMap:()=>({dispatch:e,store:t})=>{e({type:"VLAYOUT_MAP_UPDATE_START",payload:{_shouldUpdateMap:!1}}),t.selectMap().updateSize()},selectVLayoutHeight:e=>e.vLayout.height,selectNorthHeight:e=>e.vLayout.height*e.vLayout.hNorth,selectSouthHeight:e=>e.vLayout.height*e.vLayout.hSouth,reactVLayoutShouldUpdateMap:e=>{if(e.vLayout._shouldUpdateMap)return{actionCreator:"doVLayoutUpdateMap"}}},viewportBundle={name:"viewport",getReducer(){const e={h:window.innerHeight,w:window.innerWidth};return(t=e,{type:r,payload:s})=>r==="WINDOW_RESIZE"?Object.assign({},t,{h:window.innerHeight,w:window.innerWidth}):t},doHandleResize:()=>({dispatch:e,store:t})=>{t.selectMap().updateSize(),e({type:"WINDOW_RESIZE"})},selectViewportHeight:e=>e.viewport.h,selectViewportWidth:e=>e.viewport.w,init:e=>{window.addEventListener("resize",_.debounce(e.doHandleResize,300))}};function QueryStringToJSON(e){const t=e.slice(1).split("&"),r={};return t.forEach(function(s){s=s.split("="),r[s[0]]=decodeURIComponent(s[1]||"")}),JSON.parse(JSON.stringify(r))}const windowLocationBundle={name:"windowLocation",getReducer(){const e={shouldParse:!0,host:null,href:null,origin:null,pathname:null,search:null,params:null};return(t=e,{type:r,payload:s})=>{switch(r){case"WINDOW_LOCATION_PARSE_START":case"WINDOW_LOCATION_PARSED":return Object.assign({},t,s);default:return t}}},doWindowLocationParse:()=>({dispatch:e,store:t})=>{e({type:"WINDOW_LOCATION_PARSE_START",payload:{shouldParse:!1}});const r=window.location,s=r.host,o=r.href,d=r.origin,m=r.pathname,g=r.search;let y=QueryStringToJSON(g);e({type:"WINDOW_LOCATION_PARSED",payload:{host:s,href:o,origin:d,pathname:m,search:g,params:y}})},selectWindowLocationHost:e=>e.windowLocation.host,selectWindowLocationHref:e=>e.windowLocation.Href,selectWindowLocationOrigin:e=>e.windowLocation.origin,selectWindowLocationPathname:e=>e.windowLocation.pathname,selectWindowLocationSearch:e=>e.windowLocation.search,selectWindowLocationParams:e=>e.windowLocation.params,reactWindowShouldParseLocation:e=>{if(e.windowLocation.shouldParse)return{actionCreator:"doWindowLocationParse"}}},getStore=reduxBundler.composeBundles(apiBundle,basicToolbarBundle,reduxBundler.createCacheBundle({cacheFn:cache.set}),configBundle,exportBundle,identifyBundle,mapBasemapBundle,mapCoreBundle,mapInteractionBundle,mapLayersBundle,mapProjBundle,mapViewBundle,modalWindowBundle,notificationBundle,pluginBundle,primaryPanelBundle,searchBundle,southRegionBundle,themeBundle,verticalLayoutBundle,viewportBundle,windowLocationBundle),loadPlugins=(e,t)=>{e.doStartLoadingPlugins();const r=[];t&&t.length&&t.forEach(s=>{const o=btoa(s.pluginName);r.indexOf(o)===-1&&(s.bundle&&(s.bundle.length||(s.bundle=[s.bundle]),s.bundle.forEach(d=>{e.integrateBundles(d)})),s.hasOwnProperty("components")&&e.doAddPluginComponents(s.components),r.push(o))}),e.doStopLoadingPlugins()};let defaultMapboxToken="pk.eyJ1IjoidXNhY2UiLCJhIjoiY2p4YW5hdjR6MThoZDNubG1mdG1rYXR1dSJ9.1jDEJhe6OP-e6iZNeEtzjA",mapboxToken=window.CM_ENV_MAPBOX_TOKEN||defaultMapboxToken;const config$1={map:{basemap:0,centerX:-98.579,centerY:39.828,centerZ:7,altitude3d:14771168,heading3d:0,tilt3d:0,minzoom:0,maxzoom:22,rotation:0},dim:"2d",theme:"bg-blue-chambray",mapboxToken,basemaps:[{id:"OpenStreetMap",name:"OpenStreetMap",url:"https://{a-c}.tile.openstreetmap.org/{z}/{x}/{y}.png",maxZoom:19,attributions:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',visible:!0},{id:"MapBoxStreets",name:"MapBox Streets",url:"https://api.mapbox.com/styles/v1/usace/cm938rc8w003b01rc9tge72ew/tiles/256/{z}/{x}/{y}?access_token={accessToken}",attributions:'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',subdomains:"abcd",accessToken:mapboxToken,visible:!1},{id:"MapBoxAerial",name:"MapBox Aerial",url:"https://api.mapbox.com/styles/v1/usace/cm939otin006r01qthub96e0f/tiles/256/{z}/{x}/{y}?access_token={accessToken}",attributions:'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',subdomains:"abcd",accessToken:mapboxToken,visible:!1},{id:"MapBoxOutdoor",name:"MapBox Outdoor",url:"https://api.mapbox.com/styles/v1/usace/cm939k4g0007v01qu4q5x0yew/tiles/256/{z}/{x}/{y}?access_token={accessToken}",attributions:'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',subdomains:"abcd",accessToken:mapboxToken,visible:!1},{id:"Monochrome Light",name:"Monochrome Light",url:"https://api.mapbox.com/styles/v1/usace/cm9394kdo003101ri16n4crq0/tiles/256/{z}/{x}/{y}?access_token={accessToken}",attributions:'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',subdomains:"abcd",accessToken:mapboxToken,visible:!1},{id:"Monochrome Dark",name:"Monochrome Dark",url:"https://api.mapbox.com/styles/v1/usace/cm939gizu003301r9hn5zcdi7/tiles/256/{z}/{x}/{y}?access_token={accessToken}",attributions:'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',subdomains:"abcd",accessToken:mapboxToken,visible:!1},{id:"Navigation Dark",name:"Navigation Dark",url:"https://api.mapbox.com/styles/v1/usace/cm939ltif005101qta6p168vj/tiles/256/{z}/{x}/{y}?access_token={accessToken}",attributions:'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',subdomains:"abcd",accessToken:mapboxToken,visible:!1},{id:"Navigation Light",name:"Navigation Light",url:"https://api.mapbox.com/styles/v1/usace/cm939n8jo007w01qugu58707v/tiles/256/{z}/{x}/{y}?access_token={accessToken}",attributions:'Imagery from <a href="https://mapbox.com/about/maps/">MapBox</a> &mdash; Map data &copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',subdomains:"abcd",accessToken:mapboxToken,visible:!1},{id:"EsriWorldStreetMap",name:"ESRI Streetmap",url:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer/tile/{z}/{y}/{x}",attributions:"Tiles &copy; Esri &mdash; Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), TomTom, 2012",visible:!1},{id:"EsriWorldImagery",name:"ESRI World Imagery",url:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}",attributions:"Tiles &copy; Esri &mdash; Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community",visible:!1},{id:"EsriUSATopoMaps",name:"ESRI Topo Maps",url:"https://services.arcgisonline.com/ArcGIS/rest/services/USA_Topo_Maps/MapServer/tile/{z}/{y}/{x}",attributions:"Tiles &copy; Esri &mdash; Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community",visible:!1},{id:"EsriWorldShadedRelief",name:"ESRI World Hillshade",url:"https://services.arcgisonline.com/ArcGIS/rest/services/World_Shaded_Relief/MapServer/tile/{z}/{y}/{x}",attributions:"Tiles &copy; Esri &mdash; Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community",visible:!1},{id:"EsriWorldOcean",name:"ESRI World Ocean",url:"https://services.arcgisonline.com/ArcGIS/rest/services/Ocean/World_Ocean_Base/MapServer/tile/{z}/{y}/{x}",attributions:"Tiles &copy; Esri &mdash; Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community",visible:!1},{id:"USGSImageryTopo",name:"USGS Imagery/Topo",url:"https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryTopo/MapServer/tile/{z}/{y}/{x}",attributions:"Tiles &copy; Esri &mdash; Source: Esri, i-cubed, USDA, USGS, AEX, GeoEye, Getmapping, Aerogrid, IGN, IGP, UPR-EGP, and the GIS User Community",visible:!1},{id:"CartoDBDarkMatter",name:"CartoDB Dark Matter",url:"https://cartodb-basemaps-{a-d}.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png",attributions:'&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> &copy; <a href="https://cartodb.com/attributionss">CartoDB</a>',subdomains:"abcd",maxZoom:19,visible:!1},{id:"CartoDBPositron",name:"CartoDB Positron",url:"https://cartodb-basemaps-{a-d}.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png",attributions:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> &copy; <a href="https://cartodb.com/attributionss">CartoDB</a>',subdomains:"abcd",maxZoom:19,visible:!1}],datasetsDontUse:[{id:null,parentId:null,layerOrder:1,mapId:646,mapUuid:null,teamId:null,datasetId:null,teamDatasetId:null,serviceType:"EsriFeatureService",tiled:0,displayName:"Foundational Project Area",description:"",url:"https://services7.arcgis.com/n1YM8pTrFmm7L4hs/ArcGIS/rest/services/corps_projects/FeatureServer",grids:null,layerList:"1",attribution:null,geometryType:"POINT",minzoom:1,maxzoom:22,abstract:null,purpose:null,status:null,keywords:null,localTable:null,metadataUrl:null,minX:-177.47,maxX:-64.71000000000001,minY:13.43,maxY:72.55,opacity:1,useMapfile:1,queryTemplate:"",hoverTemplate:"",queryable:1,visible:0,collapsed:1,idCol:"objectid",shapeCol:"SHAPE",allowEdit:0,allowExport:1,createdBy:"1380992694",createDate:"2017-12-12T13:15:12.000Z",cacheTiles:0,labelDefault:0,labelEnabled:0,deep:2,path:"depricated",styleFn:`(
9
9
  function(f){
10
10
  const div = f.get('DIV_SYM');
11
11
  const colors = {
@@ -131,7 +131,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
131
131
  });
132
132
  return [pointStyle, labelStyle];
133
133
  }
134
- )`},{id:13597,parentId:null,layerOrder:2,mapId:646,mapUuid:null,teamId:39,datasetId:716,teamDatasetId:713,serviceType:"XYZ",tiled:1,displayName:"Minor Flooding",description:"Real time forecast values from NOAA. Updated hourly",url:"https://rsgis-testdev.crrel.usace.army.mil/tiles/mstile/m.e847f06e3f0982927900594d68264d61/geom/{z}/{x}/{y}.png?nocache=true",grids:null,layerList:"ahpsfcst_minor",attribution:null,geometryType:"POINT",minzoom:1,maxzoom:22,abstract:null,purpose:null,status:null,keywords:null,localTable:"NOAA.NATIONAL_FCST_VW_MIN",metadataUrl:null,minX:-177.47,maxX:-64.71000000000001,minY:13.43,maxY:72.55,opacity:1,useMapfile:1,queryTemplate:`Location "Location", waterbody "Waterbody", state "State", to_char(fcstdate,'mm/dd/yyyy hh:mi: am') "Forecast Time", forecast||' '||units "Forecast", '<a href="'||url||'" target="_blank"><img src="http://water.weather.gov/resources/hydrographs/'||lower(gaugelid)||'_hg.png" width="300px"/></a>' "Hyperlink", action "Action Level", flood "Flood Level" , moderate "Mod Flood Level", major "Major Flood Level"`,hoverTemplate:`Location "Location", waterbody "Waterbody", state "State", to_char(fcstdate,'mm/dd/yyyy hh:mi: am') "Forecast Time", forecast||' '||units "Forecast", '<a href="'||url||'" target="_blank"><img src="http://water.weather.gov/resources/hydrographs/'||lower(gaugelid)||'_hg.png" width="300px"/></a>' "Hyperlink", action "Action Level", flood "Flood Level" , moderate "Mod Flood Level", major "Major Flood Level"`,queryable:1,visible:0,collapsed:1,idCol:"objectid",shapeCol:"SHAPE",allowEdit:0,allowExport:1,createdBy:"1380992694",createDate:"2017-12-12T13:15:12.000Z",cacheTiles:0,labelDefault:0,labelEnabled:0,deep:2,path:"depricated"}]},version="4.1.5",pkg={version};console.log("------ RUNNING CORPSMAP V."+pkg.version+" ------");let Map$1=class extends React.Component{constructor(t){super(t),this.state={store:null},this.getStore=this.getStore.bind(this)}getStore(){return this.state.store}componentDidMount(){this._isMounted=!0;const{mapConfig:t={},plugins:r=[],height:s,theme:o,themeNavSize:d,basemaps:m,basemapImageIDs:g=[],limitMapExtent:y}=this.props;cache.getAll().then(b=>{if(b.config={default:Object.assign({},config$1,t)},m&&m.forEach(E=>{b.config.default.basemaps.push(E)}),console.log(m),console.log(b),b.config.default.basemapImageIDs=g,s&&(b.vLayout={height:s,hNorth:1,hSouth:0}),o){const E=o.indexOf("bg-")===-1?`bg-${o}`:o;b.theme={theme:E,iconSize:d||"default"}}y&&(b.config.default.limitMapExtent=y);const x=getStore(b);loadPlugins(x,r),window.internalStore=x,this._isMounted&&this.setState({store:x})})}componentWillUnmount(){this._isMounted=!1}render(){const{store:t}=this.state;return t?jsxRuntime.jsx(Provider,{store:t,children:jsxRuntime.jsx(Corpsmap,{...this.props})}):null}},SidebarButton$1=class extends React.Component{constructor(t){super(t),this.clickHandler=this.clickHandler.bind(this)}clickHandler(t){t.preventDefault(),this.props.onClick(t)}render(){const{active:t,iconClass:r,iconStyle:s,iconText:o,expanded:d,label:m,theme:g,title:y,styleOverride:b,onMouseDown:x,onMouseUp:E,themeIconSize:C}=this.props,S=classnames({"cm-nav-btn":!0,"cm-nav-icon":C==="default","cm-nav-icon-lg":C==="large","cm-btn-block":!0,"vertical-toolbar-button":!0,active:t}),A=classnames({"overflow-ellipsis":!0,hidden:!o}),N=classnames({"icon-inline":d,hidden:!!o}),k=classnames({hidden:!d}),L=Object.assign({textAlign:"left"},b);return jsxRuntime.jsxs("div",{className:S+" "+g,onClick:this.clickHandler,onMouseDown:x,onMouseUp:E,style:L,title:y,children:[jsxRuntime.jsx("i",{className:r+" "+N,style:s}),jsxRuntime.jsx("span",{className:A,children:o}),jsxRuntime.jsx("span",{className:k,children:m})]})}};const SidebarButton=connect("selectThemeIconSize",SidebarButton$1);let SidebarPanelOpenerButton$1=class extends React.Component{constructor(t){super(t),this.handleClick=this.handleClick.bind(this)}handleClick(){const{doPrimaryPanelOpen:t,doPrimaryPanelClose:r,title:s,panelComponent:o,panelOptions:d,primaryPanelOpenedBy:m}=this.props;m!==s?t({openedBy:s,options:d,children:[o]}):r()}render(){const{theme:t,label:r,title:s,iconClass:o,iconText:d,styleOverride:m,primaryPanelOpenedBy:g}=this.props;return jsxRuntime.jsx(SidebarButton,{active:g===s,iconClass:o,iconText:d,styleOverride:m,expanded:!1,label:r,title:s,onClick:this.handleClick,theme:t})}};const SidebarPanelOpenerButton=connect("selectTheme","selectPrimaryPanelOpenedBy","doPrimaryPanelOpen","doPrimaryPanelClose",SidebarPanelOpenerButton$1);let BasicToolbarButton$1=class extends React.Component{constructor(t){super(t),this.renderIcon=this.renderIcon.bind(this),this.toggleTool=this.toggleTool.bind(this)}toggleTool(){const{enabled:t,title:r,onActivate:s,onDeactivate:o,basicToolbarActiveTool:d,doBasicToolbarToggle:m}=this.props;t&&(m(d,r),s&&s(),o&&o())}renderIcon(){const{children:t,text:r,title:s,iconClass:o,iconStyle:d,basicToolbarActiveTool:m,dropup:g,themeIconSize:y}=this.props,b=classnames({"cm-nav-btn":!0,"cm-nav-icon":y==="default","cm-nav-icon-lg":y==="large","basic-toolbar-btn":!0,"cm-dropdown-toggle":!0,active:m===s}),x=classnames({mdi:!0,"mdi-menu-down":!g,"mdi-menu-up":g});return t?jsxRuntime.jsxs("div",{onClick:this.toggleTool,className:b,children:[jsxRuntime.jsx("i",{className:o,style:d}),r,jsxRuntime.jsx("i",{className:x})]}):jsxRuntime.jsxs("div",{onClick:this.toggleTool,className:b,style:{textAlign:"center"},children:[jsxRuntime.jsx("i",{className:o,style:d}),r]})}render(){const{theme:t,basicToolbarActiveTool:r,title:s,children:o,dropup:d,passProps:m,basicToolbarOpen:g}=this.props,y=!!(g&&r===s),b=classnames({[t]:!0,"cm-btn-group":!0,open:y}),x=classnames({"basic-toolbar-btn-active":!d,"basic-toolbar-btn-active-top":d,hidden:r!==s});return jsxRuntime.jsxs("div",{className:b,...m,title:s,children:[jsxRuntime.jsx("div",{className:x}),this.renderIcon(),o]})}};const BasicToolbarButton=connect("selectTheme","selectThemeIconSize","selectBasicToolbarActiveTool","selectBasicToolbarOpen","doBasicToolbarActivate","doBasicToolbarDeactivate","doBasicToolbarToggle",BasicToolbarButton$1);class BasicToolbarMenu extends React.Component{render(){return jsxRuntime.jsx("ul",{className:"cm-dropdown-menu",children:this.props.children})}}class BasicToolbarMenuUp extends React.Component{render(){return jsxRuntime.jsx("ul",{className:"cm-dropup-menu",children:this.props.children})}}class BasicToolbarSubmenu extends React.Component{render(){return jsxRuntime.jsx(BasicToolbarMenu,{children:this.props.children})}}class BasicToolbarMenuDivider extends React.Component{render(){return jsxRuntime.jsx("li",{className:"divider"})}}class BasicToolbarMenuItem extends React.Component{constructor(t){super(t),this.state={showSubmenu:!1},this.renderTextContent=this.renderTextContent.bind(this),this.renderSubmenu=this.renderSubmenu.bind(this),this.showSubmenu=this.showSubmenu.bind(this),this.hideSubmenu=this.hideSubmenu.bind(this)}renderTextContent(){const{liveDangerously:t,text:r}=this.props;return t?jsxRuntime.jsx("span",{dangerouslySetInnerHTML:{__html:r}}):r}renderSubmenu(){const{children:t,disableSubmenu:r}=this.props,{showSubmenu:s}=this.state;if(!t)return null;const o=classnames({"pull-right":!0,hidden:r}),d=classnames({open:s});return jsxRuntime.jsxs("div",{className:o,children:[jsxRuntime.jsx("i",{className:"mdi mdi-menu-right"}),jsxRuntime.jsx("div",{style:{position:"relative",top:-31,left:33},className:d,children:t})]})}showSubmenu(){this.setState({showSubmenu:!0})}hideSubmenu(){this.setState({showSubmenu:!1})}renderDisabled(){const{passProps:t,iconClass:r}=this.props;return jsxRuntime.jsx("li",{...t,disabled:!0,children:jsxRuntime.jsxs("span",{children:[jsxRuntime.jsx("i",{className:r}),this.renderTextContent()]})})}render(){const{active:t,passProps:r,onClick:s,iconClass:o,disabled:d,title:m}=this.props;if(d)return this.renderDisabled();const g=classnames({active:t});return jsxRuntime.jsx("li",{className:g,...r,onClick:s,title:m,children:jsxRuntime.jsxs("span",{onMouseOver:this.showSubmenu,onMouseOut:this.hideSubmenu,children:[this.renderSubmenu(),jsxRuntime.jsx("i",{className:o}),this.renderTextContent()]})})}}class SearchInput extends React.Component{constructor(t){super(t),this.updateFilterString=this.updateFilterString.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this),this.setFocus=this.setFocus.bind(this)}updateFilterString(t){const{onUpdate:r}=this.props,s=t.currentTarget.value;r(s)}handleKeyUp(t){const{onKeyUp:r}=this.props;r&&r(t)}setFocus(){this.input.focus()}render(){const{filterString:t,placeholder:r,size:s,inline:o,darkTheme:d}=this.props;let m="cm-form-control";m+=s==="small"?" input-sm":"";const g=s==="small"?"17px":"22px",y=s==="small"?"20px":"30px";return jsxRuntime.jsxs("div",{className:"cm-form-group",style:o?{marginBottom:0}:{},children:[jsxRuntime.jsx("span",{style:{position:"absolute",fontSize:g,top:"10px"},children:jsxRuntime.jsx("i",{className:"mdi mdi-magnify"})}),jsxRuntime.jsx("span",{children:jsxRuntime.jsx("input",{ref:b=>{this.input=b},style:{textIndent:y,color:d?"#ffffff":"inherit"},value:t,type:"text",className:m,placeholder:r,onChange:this.updateFilterString,onKeyUp:this.handleKeyUp})})]})}}class SearchResultsListItem extends React.Component{constructor(t){super(t),this.handleClick=this.handleClick.bind(this)}handleClick(){const{item:t,onClick:r}=this.props;r&&r(t)}render(){const{item:t,selected:r}=this.props,s=classnames({"cm-list-group-item":!0,"search-result-item":!0,"overflow-ellipsis":!0,selected:r});let o=t.secondaryTxt?`${t.displayName} ${t.secondaryTxt}`:`${t.displayName}`;return o=t.prefix?`${t.prefix}: ${o}`:`${o}`,jsxRuntime.jsxs("li",{onClick:this.handleClick,className:s,title:`${o}`,children:[jsxRuntime.jsx("i",{className:t.iconClass+" icon-inline"}),t.displayName,t.secondaryTxt?jsxRuntime.jsx("div",{className:"overflow-ellipsis",style:{marginLeft:"30px"},children:t.secondaryTxt}):null]})}}class SearchResultsList extends React.Component{render(){const{items:t,onItemClick:r,selectedIdx:s}=this.props;return jsxRuntime.jsx("ul",{className:"cm-list-group thin-scrollbar",ref:o=>{this.el=o},style:{position:"absolute",maxHeight:"400px",overflow:"auto"},children:t.map((o,d)=>jsxRuntime.jsx(SearchResultsListItem,{onClick:r,item:o,selected:s===d},d))})}}let LoadingIndicator$1=class extends React.Component{render(){return jsxRuntime.jsx("li",{className:"cm-list-group-item",children:jsxRuntime.jsxs("div",{className:"loading-container",children:[jsxRuntime.jsx("div",{className:"loading-spinner"}),jsxRuntime.jsx("div",{className:"loading-text",children:this.props.text})]})})}};class TreeListFolder extends React.Component{render(){const{item:t,collapsed:r,toggleCollapsed:s}=this.props,o=classnames({mdi:!0,"mdi-folder-open":!r,"mdi-folder":r}),d=classnames({"tree-list-item-hover":!1}),m={display:"inline-block",paddingLeft:"8px"},g=t.children.length;return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("i",{title:"Click to collapse or expand",onClick:s,className:o,style:{fontSize:"16px",cursor:"pointer"}}),jsxRuntime.jsxs("span",{children:[jsxRuntime.jsx("div",{className:d,style:m,onDoubleClick:s,children:t.displayName}),jsxRuntime.jsx("span",{children:" ("+g+")"})]})]})}}let TreeListItem$2=class extends React.Component{constructor(t){super(t),this.state={collapsed:t.item.collapsed},this.renderItemComponent=this.renderItemComponent.bind(this),this.handleClick=this.handleClick.bind(this),this.toggleCollapsed=this.toggleCollapsed.bind(this)}toggleCollapsed(){this.setState({collapsed:!this.state.collapsed})}handleClick(t){const{item:r,onSelect:s}=this.props;s({ctrl:t.ctrlKey,shift:t.shiftKey,item:r})}renderItemComponent(){const{item:t,components:r,componentMatches:s}=this.props,{collapsed:o}=this.state;if(!t.leaf)return jsxRuntime.jsx(TreeListFolder,{item:t,collapsed:o,toggleCollapsed:this.toggleCollapsed});let d=r[0];if(s.length){for(let m=0;m<s.length;m++)if(_.isMatch(t,s[m])){d=r[m];break}}return jsxRuntime.jsx(d,{item:t})}render(){const{item:t,components:r,componentMatches:s,onSelect:o}=this.props,{collapsed:d}=this.state,m=classnames({"tree-list-item":!0,hidden:!1});return jsxRuntime.jsxs("li",{className:m,onClick:this.handleClick,children:[this.renderItemComponent(),jsxRuntime.jsx(TreeList$1,{items:t.children,item:t,collapsed:d,components:r,componentMatches:s,onSelect:o})]})}},TreeList$1=class extends React.Component{render(){const{items:t,collapsed:r,components:s,componentMatches:o,styleOverride:d,onSelect:m,selected:g,selectable:y}=this.props,b=classnames({"tree-list":!0,hidden:r});return jsxRuntime.jsx("ul",{className:b,style:d,children:t.map(function(x){return jsxRuntime.jsx(TreeListItem$2,{item:x,components:s,componentMatches:o,onSelect:m,selected:g,selectable:y,time:new Date},x.uid)})})}};class TreeView extends React.Component{constructor(t){super(t),this.state={selected:null},this.handleSelect=this.handleSelect.bind(this)}handleSelect(t){this.setState({selected:t})}render(){const{data:t,components:r,componentMatches:s}=this.props,{selected:o}=this.state,d=!t.length&&t.children?t.children:t||[];return jsxRuntime.jsx("div",{children:jsxRuntime.jsx(TreeList$1,{items:d,collapsed:!1,components:r,componentMatches:s,styleOverride:{paddingLeft:0},onSelect:this.handleSelect,selected:o,selectable:!1})})}}let AddGeoJsonButton$1=class extends React.Component{constructor(t){super(t),this.handleClick=this.handleClick.bind(this),this.handleFile=this.handleFile.bind(this)}handleClick(t){this.geojsonInput.click()}handleFile(t){const{doAddDataFile:r}=this.props,s=this.geojsonInput.files[0];r(s)}render(){return jsxRuntime.jsx(BasicToolbarMenuItem,{active:!1,iconClass:"ms ms-geojson icon-inline",title:"Add Local GeoJSON File",text:"Add Local GeoJSON File",onClick:this.handleClick,passProps:{},disableSubmenu:!0,children:jsxRuntime.jsx("input",{onChange:this.handleFile,accept:".geojson,.json",className:"hidden",type:"file",ref:t=>{this.geojsonInput=t}})})}};const AddGeoJsonButton=connect("doAddDataFile",AddGeoJsonButton$1);let AddShapefileButton$1=class extends React.Component{constructor(t){super(t),this.handleClick=this.handleClick.bind(this),this.handleFile=this.handleFile.bind(this)}handleClick(t){this.shapefileInput.click()}handleFile(t){const{doAddDataFile:r}=this.props,s=this.shapefileInput.files[0];r(s)}render(){return jsxRuntime.jsx(BasicToolbarMenuItem,{active:!1,iconClass:"ms ms-shp icon-inline",title:"Add Local Shapefile",text:"Add Local Shapefile",onClick:this.handleClick,passProps:{},disableSubmenu:!0,children:jsxRuntime.jsx("input",{onChange:this.handleFile,accept:".zip",className:"hidden",type:"file",ref:t=>{this.shapefileInput=t}})})}};const AddShapefileButton=connect("doAddDataFile",AddShapefileButton$1);let AddKmlFileButton$1=class extends React.Component{constructor(t){super(t),this.handleClick=this.handleClick.bind(this),this.handleFile=this.handleFile.bind(this)}handleClick(t){this.geojsonInput.click()}handleFile(t){const{doAddDataFile:r}=this.props,s=this.geojsonInput.files[0];r(s)}render(){return jsxRuntime.jsx(BasicToolbarMenuItem,{active:!1,iconClass:"ms ms-kml icon-inline",title:"Add Local KML File",text:"Add Local KML File",onClick:this.handleClick,passProps:{},disableSubmenu:!0,children:jsxRuntime.jsx("input",{onChange:this.handleFile,accept:".kml",className:"hidden",type:"file",ref:t=>{this.geojsonInput=t}})})}};const AddKmlFileButton=connect("doAddDataFile",AddKmlFileButton$1);let AddDataButton$1=class extends React.Component{constructor(t){super(t)}render(){return jsxRuntime.jsx(BasicToolbarButton,{enabled:!0,iconClass:"mdi mdi-plus-box-multiple",title:"Add Data",onDeactivate:()=>{},children:jsxRuntime.jsxs(BasicToolbarMenu,{children:[jsxRuntime.jsx(AddGeoJsonButton,{}),jsxRuntime.jsx(AddShapefileButton,{}),jsxRuntime.jsx(AddKmlFileButton,{})]})})}};const AddDataButton=connect("doNotificationsFire",AddDataButton$1);try{let e=()=>new DecompressionStream("deflate-raw"),t=r=>new Response(r);e(),l=r=>t(t(r).body.pipeThrough(e())).arrayBuffer().then(s=>new Uint8Array(s))}catch{}var l,w$1=new TextDecoder,c=e=>{throw Error("but-unzip~"+e)};function*p(e,t=l){let r=e.length-21,s=r-65536,o=new DataView(e.buffer,e.byteOffset),d=y=>o.getUint16(y+r,1),m=y=>o.getUint32(y+r,1),g=(y,b)=>e.subarray(r+=y,r+=b);for(;r>s&&(r=e.lastIndexOf(80,r-1))+1&&(e[r+1]-75||e[r+2]-5||e[r+3]-6););for(r<0&&c(2),s=d(10),s-d(8)&&c(3),r=m(16);s--;){let y=d(10),b=d(28),x=d(30),E=d(32),C=m(20),S=m(42),A=w$1.decode(g(46,b)),N=w$1.decode(g(x,E)),k=r,L;r=S,L=g(30+d(26)+d(28),C),yield{filename:A,comment:N,read:()=>y-8?y?c(1):L:t(L)},r=k}}const regex$3=/.+\.(shp|dbf|json|prj|cpg)$/i,unzip=async e=>{const t={},r=[];for(const d of p(e))regex$3.test(d.filename)&&r.push(Promise.resolve(d.read()).then(m=>t[d.filename]=m));await Promise.all(r);const s={},o=new TextDecoder;for(const[d,m]of Object.entries(t))d.slice(-3).toLowerCase()==="shp"||d.slice(-3).toLowerCase()==="dbf"?s[d]=new DataView(m.buffer,m.byteOffset,m.byteLength):s[d]=o.decode(m);return s},URL$2=globalThis.URL,combine$2=(e,t)=>{if(!t)return e;const r=new URL$2(e);return r.pathname=`${r.pathname}.${t}`,r.href};async function binaryAjax(e,t){const r=combine$2(e,t),s=t==="prj"||t==="cpg";try{const o=await fetch(r);if(o.status>399)throw new Error(o.statusText);if(s)return o.text();const d=await o.arrayBuffer();return new DataView(d)}catch(o){if(s||t==="dbf")return!1;throw o}}function isClockWise(e){let t=0,r=1;const s=e.length;let o,d;const m=[e[0][0],e[0][1],e[0][0],e[0][1]];for(;r<s;)o=d||e[0],d=e[r],t+=(d[0]-o[0])*(d[1]+o[1]),r++,d[0]<m[0]&&(m[0]=d[0]),d[1]<m[1]&&(m[1]=d[1]),d[0]>m[2]&&(m[2]=d[0]),d[1]>m[3]&&(m[3]=d[1]);return{ring:e,clockWise:t>0,bbox:m,children:[]}}function contains(e,t){return!(e.bbox[0]>t.bbox[0]||e.bbox[1]>t.bbox[1]||e.bbox[2]<t.bbox[2]||e.bbox[3]<t.bbox[3])}function handleRings(e,t=!1){const r=[],s=[];for(const m of e){const g=isClockWise(m);g.clockWise!==t?r.push(g):s.push(g)}const o=[];for(const m of s){let g;for(const y of r)contains(y,m)&&(g?contains(g,y)&&(g=y):g=y);g?g.children.push(m.ring):o.push(m)}if(t)return{outers:r,orphens:o};if(o.length&&!t){const m=handleRings(e,!0);if(m.orphens.length===0){const g=[];for(const y of m.outers)g.push([y.ring.toReversed()].concat(y.children.map(b=>b.toReversed())));return g}}const d=[];for(const m of r)d.push([m.ring].concat(m.children));return d}ParseShp.prototype.parsePoint=function(e){return{type:"Point",coordinates:this.parseCoord(e,0)}},ParseShp.prototype.parseZPoint=function(e){const t=this.parsePoint(e);return t.coordinates.push(e.getFloat64(16,!0)),t},ParseShp.prototype.parsePointArray=function(e,t,r){const s=[];let o=0;for(;o<r;)s.push(this.parseCoord(e,t)),t+=16,o++;return s},ParseShp.prototype.parseZPointArray=function(e,t,r,s){let o=0;for(;o<r;)s[o].push(e.getFloat64(t,!0)),o++,t+=8;return s},ParseShp.prototype.parseArrayGroup=function(e,t,r,s,o){const d=[];let m=0,g,y=0,b;for(;m<s;)m++,r+=4,g=y,m===s?y=o:y=e.getInt32(r,!0),b=y-g,b&&(d.push(this.parsePointArray(e,t,b)),t+=b<<4);return d},ParseShp.prototype.parseZArrayGroup=function(e,t,r,s){let o=0;for(;o<r;)s[o]=this.parseZPointArray(e,t,s[o].length,s[o]),t+=s[o].length<<3,o++;return s},ParseShp.prototype.parseMultiPoint=function(e){const t={},r=e.getInt32(32,!0);if(!r)return null;const s=this.parseCoord(e,0),o=this.parseCoord(e,16);t.bbox=[s[0],s[1],o[0],o[1]];const d=36;return r===1?(t.type="Point",t.coordinates=this.parseCoord(e,d)):(t.type="MultiPoint",t.coordinates=this.parsePointArray(e,d,r)),t},ParseShp.prototype.parseZMultiPoint=function(e){const t=this.parseMultiPoint(e);if(!t)return null;let r;if(t.type==="Point")return t.coordinates.push(e.getFloat64(72,!0)),t;r=t.coordinates.length;const s=52+(r<<4);return t.coordinates=this.parseZPointArray(e,s,r,t.coordinates),t},ParseShp.prototype.parsePolyline=function(e){const t={},r=e.getInt32(32,!0);if(!r)return null;const s=this.parseCoord(e,0),o=this.parseCoord(e,16);t.bbox=[s[0],s[1],o[0],o[1]];const d=e.getInt32(36,!0);let m,g;return r===1?(t.type="LineString",m=44,t.coordinates=this.parsePointArray(e,m,d)):(t.type="MultiLineString",m=40+(r<<2),g=40,t.coordinates=this.parseArrayGroup(e,m,g,r,d)),t},ParseShp.prototype.parseZPolyline=function(e){const t=this.parsePolyline(e);if(!t)return null;const r=t.coordinates.length;let s;return t.type==="LineString"?(s=60+(r<<4),t.coordinates=this.parseZPointArray(e,s,r,t.coordinates),t):(s=56+(t.coordinates.reduce(function(d,m){return d+m.length},0)<<4)+(r<<2),t.coordinates=this.parseZArrayGroup(e,s,r,t.coordinates),t)},ParseShp.prototype.polyFuncs=function(e){return e&&(e.type==="LineString"?(e.type="Polygon",e.coordinates=[e.coordinates],e):(e.coordinates=handleRings(e.coordinates),e.coordinates.length===1?(e.type="Polygon",e.coordinates=e.coordinates[0],e):(e.type="MultiPolygon",e)))},ParseShp.prototype.parsePolygon=function(e){return this.polyFuncs(this.parsePolyline(e))},ParseShp.prototype.parseZPolygon=function(e){return this.polyFuncs(this.parseZPolyline(e))};const shpFuncObj={1:"parsePoint",3:"parsePolyline",5:"parsePolygon",8:"parseMultiPoint",11:"parseZPoint",13:"parseZPolyline",15:"parseZPolygon",18:"parseZMultiPoint"};function makeParseCoord(e){return e?function(t,r){const s=[t.getFloat64(r,!0),t.getFloat64(r+8,!0)];return e.inverse(s)}:function(t,r){return[t.getFloat64(r,!0),t.getFloat64(r+8,!0)]}}function ParseShp(e,t){if(!(this instanceof ParseShp))return new ParseShp(e,t);this.buffer=e,this.headers=this.parseHeader(),this.shpFuncs(t),this.rows=this.getRows()}ParseShp.prototype.shpFuncs=function(e){let t=this.headers.shpCode;if(t>20&&(t-=20),!(t in shpFuncObj))throw new Error(`I don't know shp type "${t}"`);this.parseFunc=this[shpFuncObj[t]],this.parseCoord=makeParseCoord(e)},ParseShp.prototype.getShpCode=function(){return this.parseHeader().shpCode},ParseShp.prototype.parseHeader=function(){const e=this.buffer;return{length:e.getInt32(24)<<1,version:e.getInt32(28,!0),shpCode:e.getInt32(32,!0),bbox:[e.getFloat64(36,!0),e.getFloat64(44,!0),e.getFloat64(52,!0),e.getFloat64(60,!0)]}},ParseShp.prototype.getRows=function(){let e=100;const t=this.buffer.byteLength-8,r=[];let s;for(;e<=t&&(s=this.getRow(e),!!s);)e+=8,e+=s.len,s.type?r.push(this.parseFunc(s.data)):r.push(null);return r},ParseShp.prototype.getRow=function(e){const t=this.buffer.getInt32(e),r=this.buffer.getInt32(e+4)<<1;if(r===0)return{id:t,len:r,type:0};if(!(e+r+8>this.buffer.byteLength))return{id:t,len:r,data:new DataView(this.buffer.buffer,this.buffer.byteOffset+e+12,r-4),type:this.buffer.getInt32(e+8,!0)}};function parseShp(e,t){return new ParseShp(e,t).rows}var regex$2=/^(?:ANSI\s)?(\d+)$/m;function createDecoder(e,t){if(!e)return s;try{new TextDecoder(e.trim())}catch{var r=regex$2.exec(e);return r&&!t?createDecoder("windows-"+r[1],!0):(e=void 0,s)}return s;function s(o){var d=new TextDecoder(e||void 0),m=d.decode(o,{stream:!0})+d.decode();return m.replace(/\0/g,"").trim()}}function dbfHeader(e){var t={};return t.lastUpdated=new Date(e.getUint8(1)+1900,e.getUint8(2),e.getUint8(3)),t.records=e.getUint32(4,!0),t.headerLen=e.getUint16(8,!0),t.recLen=e.getUint16(10,!0),t}function dbfRowHeader(e,t,r){for(var s=[],o=32;o<t&&(s.push({name:r(new Uint8Array(e.buffer.slice(e.byteOffset+o,e.byteOffset+o+11))),dataType:String.fromCharCode(e.getUint8(o+11)),len:e.getUint8(o+16),decimal:e.getUint8(o+17)}),e.getUint8(o+32)!==13);)o+=32;return s}function rowFuncs(e,t,r,s,o){const d=new Uint8Array(e.buffer.slice(e.byteOffset+t,e.byteOffset+t+r));var m=o(d);switch(s){case"N":case"F":case"O":return parseFloat(m,10);case"D":return new Date(m.slice(0,4),parseInt(m.slice(4,6),10)-1,m.slice(6,8));case"L":return m.toLowerCase()==="y"||m.toLowerCase()==="t";default:return m}}function parseRow(e,t,r,s){for(var o={},d=0,m=r.length,g,y;d<m;)y=r[d],g=rowFuncs(e,t,y.len,y.dataType,s),t+=y.len,typeof g<"u"&&(o[y.name]=g),d++;return o}function parseDbf(e,t){for(var r=createDecoder(t),s=dbfHeader(e),o=dbfRowHeader(e,s.headerLen-1,r),d=(o.length+1<<5)+2,m=s.recLen,g=s.records,y=[];g;)y.push(parseRow(e,d,o,r)),d+=m,g--;return y}const URL$1=globalThis.URL,toUitn8Arr=e=>{if(!e)throw new Error("forgot to pass buffer");if(isArrayBuffer(e))return new Uint8Array(e);if(isArrayBuffer(e.buffer))return e.BYTES_PER_ELEMENT===1?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("invalid buffer like object")},txtDecoder=new TextDecoder,toString=e=>{if(e){if(typeof e=="string")return e;if(isArrayBuffer(e)||ArrayBuffer.isView(e)||isDataView(e))return txtDecoder.decode(e)}},toDataView=e=>{if(!e)throw new Error("forgot to pass buffer");if(isDataView(e))return e;if(isArrayBuffer(e))return new DataView(e);if(isArrayBuffer(e.buffer))return new DataView(e.buffer,e.byteOffset,e.byteLength);throw new Error("invalid buffer like object")};function isArrayBuffer(e){return e instanceof globalThis.ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]"}function isDataView(e){return e instanceof globalThis.DataView||Object.prototype.toString.call(e)==="[object DataView]"}const combine$1=function([e,t]){const r={};r.type="FeatureCollection",r.features=[];let s=0;const o=e.length;for(t||(t=[]);s<o;)r.features.push({type:"Feature",geometry:e[s],properties:t[s]||{}}),s++;return r},parseZip=async function(e,t){let r;e=toUitn8Arr(e);const s=await unzip(e),o=[];t=t||[];for(r in s)r.indexOf("__MACOSX")===-1&&(r.slice(-4).toLowerCase()===".shp"?(o.push(r.slice(0,-4)),s[r.slice(0,-3)+r.slice(-3).toLowerCase()]=s[r]):r.slice(-4).toLowerCase()===".prj"?s[r.slice(0,-3)+r.slice(-3).toLowerCase()]=proj4(s[r]):r.slice(-5).toLowerCase()===".json"||t.indexOf(r.split(".").pop())>-1?o.push(r.slice(0,-3)+r.slice(-3).toLowerCase()):(r.slice(-4).toLowerCase()===".dbf"||r.slice(-4).toLowerCase()===".cpg")&&(s[r.slice(0,-3)+r.slice(-3).toLowerCase()]=s[r]));if(!o.length)throw new Error("no layers founds");const d=o.map(function(m){let g,y;const b=m.lastIndexOf(".");return b>-1&&m.slice(b).indexOf("json")>-1?(g=JSON.parse(s[m]),g.fileName=m.slice(0,b)):t.indexOf(m.slice(b+1))>-1?(g=s[m],g.fileName=m):(s[m+".dbf"]&&(y=parseDbf(s[m+".dbf"],s[m+".cpg"])),g=combine$1([parseShp(s[m+".shp"],s[m+".prj"]),y]),g.fileName=m),g});return d.length===1?d[0]:d};async function getZip(e,t){const r=await binaryAjax(e);return parseZip(r,t)}const handleShp=async e=>{const t=await Promise.all([binaryAjax(e,"shp"),binaryAjax(e,"prj")]);let r=!1;try{t[1]&&(r=proj4(t[1]))}catch{r=!1}return parseShp(t[0],r)},handleDbf=async e=>{const[t,r]=await Promise.all([binaryAjax(e,"dbf"),binaryAjax(e,"cpg")]);if(t)return parseDbf(t,r)},checkSuffix=(e,t)=>new URL$1(e,globalThis?.document?.location).pathname.slice(-4).toLowerCase()===t,fromObject=({shp:e,dbf:t,cpg:r,prj:s})=>{const o=[_parseShp(e,s)];return t&&o.push(_parseDbf(t,r)),combine$1(o)},getShapefile=async function(e,t){if(typeof e!="string"){if(isArrayBuffer(e)||ArrayBuffer.isView(e)||isDataView(e))return parseZip(e);if(e.shp)return fromObject(e);throw new TypeError("must be a string, some sort of Buffer, or an object with at least a .shp property")}if(checkSuffix(e,".zip"))return getZip(e,t);checkSuffix(e,".shp")&&(e=e.slice(0,-4));const r=await Promise.all([handleShp(e),handleDbf(e)]);return combine$1(r)},_parseShp=function(e,t){if(e=toDataView(e),t=toString(t),typeof t=="string")try{t=proj4(t)}catch{t=!1}return parseShp(e,t)},_parseDbf=function(e,t){return e=toDataView(e),t=toString(t),parseDbf(e,t)};var togeojson={exports:{}},lib$1={},dom={},conventions={},hasRequiredConventions;function requireConventions(){if(hasRequiredConventions)return conventions;hasRequiredConventions=1;function e(d,m,g){if(g===void 0&&(g=Array.prototype),d&&typeof g.find=="function")return g.find.call(d,m);for(var y=0;y<d.length;y++)if(Object.prototype.hasOwnProperty.call(d,y)){var b=d[y];if(m.call(void 0,b,y,d))return b}}function t(d,m){return m===void 0&&(m=Object),m&&typeof m.freeze=="function"?m.freeze(d):d}function r(d,m){if(d===null||typeof d!="object")throw new TypeError("target is not an object");for(var g in m)Object.prototype.hasOwnProperty.call(m,g)&&(d[g]=m[g]);return d}var s=t({HTML:"text/html",isHTML:function(d){return d===s.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),o=t({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(d){return d===o.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});return conventions.assign=r,conventions.find=e,conventions.freeze=t,conventions.MIME_TYPE=s,conventions.NAMESPACE=o,conventions}var hasRequiredDom;function requireDom(){if(hasRequiredDom)return dom;hasRequiredDom=1;var e=requireConventions(),t=e.find,r=e.NAMESPACE;function s(F){return F!==""}function o(F){return F?F.split(/[\t\n\f\r ]+/).filter(s):[]}function d(F,U){return F.hasOwnProperty(U)||(F[U]=!0),F}function m(F){if(!F)return[];var U=o(F);return Object.keys(U.reduce(d,{}))}function g(F){return function(U){return F&&F.indexOf(U)!==-1}}function y(F,U){for(var H in F)Object.prototype.hasOwnProperty.call(F,H)&&(U[H]=F[H])}function b(F,U){var H=F.prototype;if(!(H instanceof U)){let ae=function(){};ae.prototype=U.prototype,ae=new ae,y(H,ae),F.prototype=H=ae}H.constructor!=F&&(typeof F!="function"&&console.error("unknown Class:"+F),H.constructor=F)}var x={},E=x.ELEMENT_NODE=1,C=x.ATTRIBUTE_NODE=2,S=x.TEXT_NODE=3,A=x.CDATA_SECTION_NODE=4,N=x.ENTITY_REFERENCE_NODE=5,k=x.ENTITY_NODE=6,L=x.PROCESSING_INSTRUCTION_NODE=7,G=x.COMMENT_NODE=8,M=x.DOCUMENT_NODE=9,z=x.DOCUMENT_TYPE_NODE=10,V=x.DOCUMENT_FRAGMENT_NODE=11,Y=x.NOTATION_NODE=12,X={},Q={};X.INDEX_SIZE_ERR=(Q[1]="Index size error",1),X.DOMSTRING_SIZE_ERR=(Q[2]="DOMString size error",2);var $=X.HIERARCHY_REQUEST_ERR=(Q[3]="Hierarchy request error",3);X.WRONG_DOCUMENT_ERR=(Q[4]="Wrong document",4);var K=X.INVALID_CHARACTER_ERR=(Q[5]="Invalid character",5);X.NO_DATA_ALLOWED_ERR=(Q[6]="No data allowed",6),X.NO_MODIFICATION_ALLOWED_ERR=(Q[7]="No modification allowed",7);var ee=X.NOT_FOUND_ERR=(Q[8]="Not found",8);X.NOT_SUPPORTED_ERR=(Q[9]="Not supported",9);var se=X.INUSE_ATTRIBUTE_ERR=(Q[10]="Attribute in use",10),ie=X.INVALID_STATE_ERR=(Q[11]="Invalid state",11);X.SYNTAX_ERR=(Q[12]="Syntax error",12),X.INVALID_MODIFICATION_ERR=(Q[13]="Invalid modification",13),X.NAMESPACE_ERR=(Q[14]="Invalid namespace",14),X.INVALID_ACCESS_ERR=(Q[15]="Invalid access",15);function te(F,U){if(U instanceof Error)var H=U;else H=this,Error.call(this,Q[F]),this.message=Q[F],Error.captureStackTrace&&Error.captureStackTrace(this,te);return H.code=F,U&&(this.message=this.message+": "+U),H}te.prototype=Error.prototype,y(X,te);function ue(){}ue.prototype={length:0,item:function(F){return F>=0&&F<this.length?this[F]:null},toString:function(F,U,H){for(var ae=!!H&&!!H.requireWellFormed,be=[],Ie=0;Ie<this.length;Ie++)Qe(this[Ie],be,F,U,null,ae);return be.join("")},filter:function(F){return Array.prototype.filter.call(this,F)},indexOf:function(F){return Array.prototype.indexOf.call(this,F)}};function le(F,U){this._node=F,this._refresh=U,fe(this)}function fe(F){var U=F._node._inc||F._node.ownerDocument._inc;if(F._inc!==U){var H=F._refresh(F._node);if(dr(F,"length",H.length),!F.$$length||H.length<F.$$length)for(var ae=H.length;ae in F;ae++)Object.prototype.hasOwnProperty.call(F,ae)&&delete F[ae];y(H,F),F._inc=U}}le.prototype.item=function(F){return fe(this),this[F]||null},b(le,ue);function ve(){}function xe(F,U){for(var H=F.length;H--;)if(F[H]===U)return H}function ce(F,U,H,ae){if(ae?U[xe(U,ae)]=H:U[U.length++]=H,F){H.ownerElement=F;var be=F.ownerDocument;be&&(ae&&Ue(be,F,ae),J(be,F,H))}}function Te(F,U,H){var ae=xe(U,H);if(ae>=0){for(var be=U.length-1;ae<be;)U[ae]=U[++ae];if(U.length=be,F){var Ie=F.ownerDocument;Ie&&(Ue(Ie,F,H),H.ownerElement=null)}}else throw new te(ee,new Error(F.tagName+"@"+H))}ve.prototype={length:0,item:ue.prototype.item,getNamedItem:function(F){for(var U=this.length;U--;){var H=this[U];if(H.nodeName==F)return H}},setNamedItem:function(F){var U=F.ownerElement;if(U&&U!=this._ownerElement)throw new te(se);var H=this.getNamedItem(F.nodeName);return ce(this._ownerElement,this,F,H),H},setNamedItemNS:function(F){var U=F.ownerElement,H;if(U&&U!=this._ownerElement)throw new te(se);return H=this.getNamedItemNS(F.namespaceURI,F.localName),ce(this._ownerElement,this,F,H),H},removeNamedItem:function(F){var U=this.getNamedItem(F);return Te(this._ownerElement,this,U),U},removeNamedItemNS:function(F,U){var H=this.getNamedItemNS(F,U);return Te(this._ownerElement,this,H),H},getNamedItemNS:function(F,U){for(var H=this.length;H--;){var ae=this[H];if(ae.localName==U&&ae.namespaceURI==F)return ae}return null}};function Ce(){}Ce.prototype={hasFeature:function(F,U){return!0},createDocument:function(F,U,H){var ae=new Pe;if(ae.implementation=this,ae.childNodes=new ue,ae.doctype=H||null,H&&ae.appendChild(H),U){var be=ae.createElementNS(F,U);ae.appendChild(be)}return ae},createDocumentType:function(F,U,H){var ae=new ke;return ae.name=F,ae.nodeName=F,ae.publicId=U||"",ae.systemId=H||"",ae}};function me(){}me.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(F,U){return Ve(this,F,U)},replaceChild:function(F,U){Ve(this,F,U,qe),U&&this.removeChild(U)},removeChild:function(F){return de(this,F)},appendChild:function(F){return this.insertBefore(F,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(F){return Ht(this.ownerDocument||this,this,F)},normalize:function(){Ae(this,null,{enter:function(F){for(var U=F.firstChild;U;){var H=U.nextSibling;H!==null&&H.nodeType===S&&U.nodeType===S?(F.removeChild(H),U.appendData(H.data)):U=H}return!0}})},isSupported:function(F,U){return this.ownerDocument.implementation.hasFeature(F,U)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(F){for(var U=this;U;){var H=U._nsMap;if(H){for(var ae in H)if(Object.prototype.hasOwnProperty.call(H,ae)&&H[ae]===F)return ae}U=U.nodeType==C?U.ownerDocument:U.parentNode}return null},lookupNamespaceURI:function(F){for(var U=this;U;){var H=U._nsMap;if(H&&Object.prototype.hasOwnProperty.call(H,F))return H[F];U=U.nodeType==C?U.ownerDocument:U.parentNode}return null},isDefaultNamespace:function(F){var U=this.lookupPrefix(F);return U==null}};function pe(F){return F=="<"&&"&lt;"||F==">"&&"&gt;"||F=="&"&&"&amp;"||F=='"'&&"&quot;"||"&#"+F.charCodeAt()+";"}y(x,me),y(x,me.prototype);function Ee(F,U){return Ae(F,null,{enter:function(H){return U(H)?Ae.STOP:!0}})===Ae.STOP}function Ae(F,U,H){for(var ae=[{node:F,context:U,phase:Ae.ENTER}];ae.length>0;){var be=ae.pop();if(be.phase===Ae.ENTER){var Ie=H.enter(be.node,be.context);if(Ie===Ae.STOP)return Ae.STOP;if(ae.push({node:be.node,context:Ie,phase:Ae.EXIT}),Ie==null)continue;for(var ge=be.node.lastChild;ge;)ae.push({node:ge,context:Ie,phase:Ae.ENTER}),ge=ge.previousSibling}else H.exit&&H.exit(be.node,be.context)}}Ae.STOP=Symbol("walkDOM.STOP"),Ae.ENTER=0,Ae.EXIT=1;function Pe(){this.ownerDocument=this}function J(F,U,H){F&&F._inc++;var ae=H.namespaceURI;ae===r.XMLNS&&(U._nsMap[H.prefix?H.localName:""]=H.value)}function Ue(F,U,H,ae){F&&F._inc++;var be=H.namespaceURI;be===r.XMLNS&&delete U._nsMap[H.prefix?H.localName:""]}function ye(F,U,H){if(F&&F._inc){F._inc++;var ae=U.childNodes;if(H)ae[ae.length++]=H;else{for(var be=U.firstChild,Ie=0;be;)ae[Ie++]=be,be=be.nextSibling;ae.length=Ie,delete ae[ae.length]}}}function de(F,U){var H=U.previousSibling,ae=U.nextSibling;return H?H.nextSibling=ae:F.firstChild=ae,ae?ae.previousSibling=H:F.lastChild=H,U.parentNode=null,U.previousSibling=null,U.nextSibling=null,ye(F.ownerDocument,F),U}function q(F){return F&&(F.nodeType===me.DOCUMENT_NODE||F.nodeType===me.DOCUMENT_FRAGMENT_NODE||F.nodeType===me.ELEMENT_NODE)}function Re(F){return F&&(je(F)||Fe(F)||Oe(F)||F.nodeType===me.DOCUMENT_FRAGMENT_NODE||F.nodeType===me.COMMENT_NODE||F.nodeType===me.PROCESSING_INSTRUCTION_NODE)}function Oe(F){return F&&F.nodeType===me.DOCUMENT_TYPE_NODE}function je(F){return F&&F.nodeType===me.ELEMENT_NODE}function Fe(F){return F&&F.nodeType===me.TEXT_NODE}function it(F,U){var H=F.childNodes||[];if(t(H,je)||Oe(U))return!1;var ae=t(H,Oe);return!(U&&ae&&H.indexOf(ae)>H.indexOf(U))}function dt(F,U){var H=F.childNodes||[];function ae(Ie){return je(Ie)&&Ie!==U}if(t(H,ae))return!1;var be=t(H,Oe);return!(U&&be&&H.indexOf(be)>H.indexOf(U))}function he(F,U,H){if(!q(F))throw new te($,"Unexpected parent node type "+F.nodeType);if(H&&H.parentNode!==F)throw new te(ee,"child not in parent");if(!Re(U)||Oe(U)&&F.nodeType!==me.DOCUMENT_NODE)throw new te($,"Unexpected node type "+U.nodeType+" for parent node type "+F.nodeType)}function st(F,U,H){var ae=F.childNodes||[],be=U.childNodes||[];if(U.nodeType===me.DOCUMENT_FRAGMENT_NODE){var Ie=be.filter(je);if(Ie.length>1||t(be,Fe))throw new te($,"More than one element or text in fragment");if(Ie.length===1&&!it(F,H))throw new te($,"Element in fragment can not be inserted before doctype")}if(je(U)&&!it(F,H))throw new te($,"Only one element can be added and only after doctype");if(Oe(U)){if(t(ae,Oe))throw new te($,"Only one doctype is allowed");var ge=t(ae,je);if(H&&ae.indexOf(ge)<ae.indexOf(H))throw new te($,"Doctype can only be inserted before an element");if(!H&&ge)throw new te($,"Doctype can not be appended since element is present")}}function qe(F,U,H){var ae=F.childNodes||[],be=U.childNodes||[];if(U.nodeType===me.DOCUMENT_FRAGMENT_NODE){var Ie=be.filter(je);if(Ie.length>1||t(be,Fe))throw new te($,"More than one element or text in fragment");if(Ie.length===1&&!dt(F,H))throw new te($,"Element in fragment can not be inserted before doctype")}if(je(U)&&!dt(F,H))throw new te($,"Only one element can be added and only after doctype");if(Oe(U)){if(t(ae,function(Ye){return Oe(Ye)&&Ye!==H}))throw new te($,"Only one doctype is allowed");var ge=t(ae,je);if(H&&ae.indexOf(ge)<ae.indexOf(H))throw new te($,"Doctype can only be inserted before an element")}}function Ve(F,U,H,ae){he(F,U,H),F.nodeType===me.DOCUMENT_NODE&&(ae||st)(F,U,H);var be=U.parentNode;if(be&&be.removeChild(U),U.nodeType===V){var Ie=U.firstChild;if(Ie==null)return U;var ge=U.lastChild}else Ie=ge=U;var He=H?H.previousSibling:F.lastChild;Ie.previousSibling=He,ge.nextSibling=H,He?He.nextSibling=Ie:F.firstChild=Ie,H==null?F.lastChild=ge:H.previousSibling=ge;do{Ie.parentNode=F;var Ye=F.ownerDocument||F;mt(Ie,Ye)}while(Ie!==ge&&(Ie=Ie.nextSibling));return ye(F.ownerDocument||F,F),U.nodeType==V&&(U.firstChild=U.lastChild=null),U}function mt(F,U){if(F.ownerDocument!==U){if(F.ownerDocument=U,F.nodeType===E&&F.attributes)for(var H=0;H<F.attributes.length;H++){var ae=F.attributes.item(H);ae&&(ae.ownerDocument=U)}for(var be=F.firstChild;be;)mt(be,U),be=be.nextSibling}}function Le(F,U){U.parentNode&&U.parentNode.removeChild(U),U.parentNode=F,U.previousSibling=F.lastChild,U.nextSibling=null,U.previousSibling?U.previousSibling.nextSibling=U:F.firstChild=U,F.lastChild=U,ye(F.ownerDocument,F,U);var H=F.ownerDocument||F;return mt(U,H),U}Pe.prototype={nodeName:"#document",nodeType:M,doctype:null,documentElement:null,_inc:1,insertBefore:function(F,U){if(F.nodeType==V){for(var H=F.firstChild;H;){var ae=H.nextSibling;this.insertBefore(H,U),H=ae}return F}return Ve(this,F,U),mt(F,this),this.documentElement===null&&F.nodeType===E&&(this.documentElement=F),F},removeChild:function(F){return this.documentElement==F&&(this.documentElement=null),de(this,F)},replaceChild:function(F,U){Ve(this,F,U,qe),mt(F,this),U&&this.removeChild(U),je(F)&&(this.documentElement=F)},importNode:function(F,U){return cr(this,F,U)},getElementById:function(F){var U=null;return Ee(this.documentElement,function(H){if(H.nodeType==E&&H.getAttribute("id")==F)return U=H,!0}),U},getElementsByClassName:function(F){var U=m(F);return new le(this,function(H){var ae=[];return U.length>0&&Ee(H.documentElement,function(be){if(be!==H&&be.nodeType===E){var Ie=be.getAttribute("class");if(Ie){var ge=F===Ie;if(!ge){var He=m(Ie);ge=U.every(g(He))}ge&&ae.push(be)}}}),ae})},createElement:function(F){var U=new tt;U.ownerDocument=this,U.nodeName=F,U.tagName=F,U.localName=F,U.childNodes=new ue;var H=U.attributes=new ve;return H._ownerElement=U,U},createDocumentFragment:function(){var F=new De;return F.ownerDocument=this,F.childNodes=new ue,F},createTextNode:function(F){var U=new we;return U.ownerDocument=this,U.appendData(F),U},createComment:function(F){var U=new Lt;return U.ownerDocument=this,U.appendData(F),U},createCDATASection:function(F){if(F.indexOf("]]>")!==-1)throw new te(K,'data contains "]]>"');var U=new Me;return U.ownerDocument=this,U.appendData(F),U},createProcessingInstruction:function(F,U){var H=new Gt;return H.ownerDocument=this,H.tagName=H.nodeName=H.target=F,H.nodeValue=H.data=U,H},createAttribute:function(F){var U=new gt;return U.ownerDocument=this,U.name=F,U.nodeName=F,U.localName=F,U.specified=!0,U},createEntityReference:function(F){var U=new Bt;return U.ownerDocument=this,U.nodeName=F,U},createElementNS:function(F,U){var H=new tt,ae=U.split(":"),be=H.attributes=new ve;return H.childNodes=new ue,H.ownerDocument=this,H.nodeName=U,H.tagName=U,H.namespaceURI=F,ae.length==2?(H.prefix=ae[0],H.localName=ae[1]):H.localName=U,be._ownerElement=H,H},createAttributeNS:function(F,U){var H=new gt,ae=U.split(":");return H.ownerDocument=this,H.nodeName=U,H.name=U,H.namespaceURI=F,H.specified=!0,ae.length==2?(H.prefix=ae[0],H.localName=ae[1]):H.localName=U,H}},b(Pe,me);function tt(){this._nsMap={}}tt.prototype={nodeType:E,hasAttribute:function(F){return this.getAttributeNode(F)!=null},getAttribute:function(F){var U=this.getAttributeNode(F);return U&&U.value||""},getAttributeNode:function(F){return this.attributes.getNamedItem(F)},setAttribute:function(F,U){var H=this.ownerDocument.createAttribute(F);H.value=H.nodeValue=""+U,this.setAttributeNode(H)},removeAttribute:function(F){var U=this.getAttributeNode(F);U&&this.removeAttributeNode(U)},appendChild:function(F){return F.nodeType===V?this.insertBefore(F,null):Le(this,F)},setAttributeNode:function(F){return this.attributes.setNamedItem(F)},setAttributeNodeNS:function(F){return this.attributes.setNamedItemNS(F)},removeAttributeNode:function(F){return this.attributes.removeNamedItem(F.nodeName)},removeAttributeNS:function(F,U){var H=this.getAttributeNodeNS(F,U);H&&this.removeAttributeNode(H)},hasAttributeNS:function(F,U){return this.getAttributeNodeNS(F,U)!=null},getAttributeNS:function(F,U){var H=this.getAttributeNodeNS(F,U);return H&&H.value||""},setAttributeNS:function(F,U,H){var ae=this.ownerDocument.createAttributeNS(F,U);ae.value=ae.nodeValue=""+H,this.setAttributeNode(ae)},getAttributeNodeNS:function(F,U){return this.attributes.getNamedItemNS(F,U)},getElementsByTagName:function(F){return new le(this,function(U){var H=[];return Ee(U,function(ae){ae!==U&&ae.nodeType==E&&(F==="*"||ae.tagName==F)&&H.push(ae)}),H})},getElementsByTagNameNS:function(F,U){return new le(this,function(H){var ae=[];return Ee(H,function(be){be!==H&&be.nodeType===E&&(F==="*"||be.namespaceURI===F)&&(U==="*"||be.localName==U)&&ae.push(be)}),ae})}},Pe.prototype.getElementsByTagName=tt.prototype.getElementsByTagName,Pe.prototype.getElementsByTagNameNS=tt.prototype.getElementsByTagNameNS,b(tt,me);function gt(){}gt.prototype.nodeType=C,b(gt,me);function yt(){}yt.prototype={data:"",substringData:function(F,U){return this.data.substring(F,F+U)},appendData:function(F){F=this.data+F,this.nodeValue=this.data=F,this.length=F.length},insertData:function(F,U){this.replaceData(F,0,U)},appendChild:function(F){throw new Error(Q[$])},deleteData:function(F,U){this.replaceData(F,U,"")},replaceData:function(F,U,H){var ae=this.data.substring(0,F),be=this.data.substring(F+U);H=ae+H+be,this.nodeValue=this.data=H,this.length=H.length}},b(yt,me);function we(){}we.prototype={nodeName:"#text",nodeType:S,splitText:function(F){var U=this.data,H=U.substring(F);U=U.substring(0,F),this.data=this.nodeValue=U,this.length=U.length;var ae=this.ownerDocument.createTextNode(H);return this.parentNode&&this.parentNode.insertBefore(ae,this.nextSibling),ae}},b(we,yt);function Lt(){}Lt.prototype={nodeName:"#comment",nodeType:G},b(Lt,yt);function Me(){}Me.prototype={nodeName:"#cdata-section",nodeType:A},b(Me,yt);function ke(){}ke.prototype.nodeType=z,b(ke,me);function Ut(){}Ut.prototype.nodeType=Y,b(Ut,me);function at(){}at.prototype.nodeType=k,b(at,me);function Bt(){}Bt.prototype.nodeType=N,b(Bt,me);function De(){}De.prototype.nodeName="#document-fragment",De.prototype.nodeType=V,b(De,me);function Gt(){}Gt.prototype.nodeType=L,b(Gt,me);function zt(){}zt.prototype.serializeToString=function(F,U,H,ae){return Ot.call(F,U,H,ae)},me.prototype.toString=Ot;function Ot(F,U,H){var ae=!!H&&!!H.requireWellFormed,be=[],Ie=this.nodeType==9&&this.documentElement||this,ge=Ie.prefix,He=Ie.namespaceURI;if(He&&ge==null){var ge=Ie.lookupPrefix(He);if(ge==null)var Ye=[{namespace:He,prefix:null}]}return Qe(this,be,F,U,Ye,ae),be.join("")}function Je(F,U,H){var ae=F.prefix||"",be=F.namespaceURI;if(!be||ae==="xml"&&be===r.XML||be===r.XMLNS)return!1;for(var Ie=H.length;Ie--;){var ge=H[Ie];if(ge.prefix===ae)return ge.namespace!==be}return!0}function ct(F,U,H){F.push(" ",U,'="',H.replace(/[<>&"\t\n\r]/g,pe),'"')}function Qe(F,U,H,ae,be,Ie){be||(be=[]),Ae(F,{ns:be,isHTML:H},{enter:function(ge,He){var Ye=He.ns,Xe=He.isHTML;if(ae)if(ge=ae(ge),ge){if(typeof ge=="string")return U.push(ge),null}else return null;switch(ge.nodeType){case E:var vt=ge.attributes,Pt=vt.length,Tt=ge.tagName;Xe=r.isHTML(ge.namespaceURI)||Xe;var Ct=Tt;if(!Xe&&!ge.prefix&&ge.namespaceURI){for(var Yt,Ke=0;Ke<vt.length;Ke++)if(vt.item(Ke).name==="xmlns"){Yt=vt.item(Ke).value;break}if(!Yt)for(var St=Ye.length-1;St>=0;St--){var ht=Ye[St];if(ht.prefix===""&&ht.namespace===ge.namespaceURI){Yt=ht.namespace;break}}if(Yt!==ge.namespaceURI)for(var St=Ye.length-1;St>=0;St--){var ht=Ye[St];if(ht.namespace===ge.namespaceURI){ht.prefix&&(Ct=ht.prefix+":"+Tt);break}}}U.push("<",Ct);for(var rt=Ye.slice(),ut=0;ut<Pt;ut++){var ot=vt.item(ut);ot.prefix=="xmlns"?rt.push({prefix:ot.localName,namespace:ot.value}):ot.nodeName=="xmlns"&&rt.push({prefix:"",namespace:ot.value})}for(var ut=0;ut<Pt;ut++){var ot=vt.item(ut);if(Je(ot,Xe,rt)){var qt=ot.prefix||"",Rt=ot.namespaceURI;ct(U,qt?"xmlns:"+qt:"xmlns",Rt),rt.push({prefix:qt,namespace:Rt})}var We=ae?ae(ot):ot;We&&(typeof We=="string"?U.push(We):ct(U,We.name,We.value))}if(Tt===Ct&&Je(ge,Xe,rt)){var sr=ge.prefix||"",Rt=ge.namespaceURI;ct(U,sr?"xmlns:"+sr:"xmlns",Rt),rt.push({prefix:sr,namespace:Rt})}var Ft=ge.firstChild;if(Ft||Xe&&!/^(?:meta|link|img|br|hr|input)$/i.test(Tt)){if(U.push(">"),Xe&&/^script$/i.test(Tt)){for(;Ft;)Ft.data?U.push(Ft.data):Qe(Ft,U,Xe,ae,rt.slice(),Ie),Ft=Ft.nextSibling;return U.push("</",Tt,">"),null}return{ns:rt,isHTML:Xe,tag:Ct}}else return U.push("/>"),null;case M:case V:return{ns:Ye.slice(),isHTML:Xe,tag:null};case C:return ct(U,ge.name,ge.value),null;case S:return U.push(ge.data.replace(/[<&>]/g,pe)),null;case A:if(Ie&&ge.data.indexOf("]]>")!==-1)throw new te(ie,'The CDATASection data contains "]]>"');return U.push("<![CDATA[",ge.data.replace(/]]>/g,"]]]]><![CDATA[>"),"]]>"),null;case G:if(Ie&&ge.data.indexOf("-->")!==-1)throw new te(ie,'The comment node data contains "-->"');return U.push("<!--",ge.data,"-->"),null;case z:if(Ie){if(ge.publicId&&!/^("[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%']*"|'[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%'"]*')$/.test(ge.publicId))throw new te(ie,"DocumentType publicId is not a valid PubidLiteral");if(ge.systemId&&!/^("[^"]*"|'[^']*')$/.test(ge.systemId))throw new te(ie,"DocumentType systemId is not a valid SystemLiteral");if(ge.internalSubset&&ge.internalSubset.indexOf("]>")!==-1)throw new te(ie,'DocumentType internalSubset contains "]>"')}var $t=ge.publicId,bt=ge.systemId;if(U.push("<!DOCTYPE ",ge.name),$t)U.push(" PUBLIC ",$t),bt&&bt!="."&&U.push(" ",bt),U.push(">");else if(bt&&bt!=".")U.push(" SYSTEM ",bt,">");else{var Jt=ge.internalSubset;Jt&&U.push(" [",Jt,"]"),U.push(">")}return null;case L:if(Ie&&ge.data.indexOf("?>")!==-1)throw new te(ie,'The ProcessingInstruction data contains "?>"');return U.push("<?",ge.target," ",ge.data,"?>"),null;case N:return U.push("&",ge.nodeName,";"),null;default:return U.push("??",ge.nodeName),null}},exit:function(ge,He){He&&He.tag&&U.push("</",He.tag,">")}})}function cr(F,U,H){var ae;return Ae(U,null,{enter:function(be,Ie){var ge=be.cloneNode(!1);ge.ownerDocument=F,ge.parentNode=null,Ie===null?ae=ge:Ie.appendChild(ge);var He=be.nodeType===C||H;return He?ge:null}}),ae}function Ht(F,U,H){var ae;return Ae(U,null,{enter:function(be,Ie){var ge=new be.constructor;for(var He in be)if(Object.prototype.hasOwnProperty.call(be,He)){var Ye=be[He];typeof Ye!="object"&&Ye!=ge[He]&&(ge[He]=Ye)}be.childNodes&&(ge.childNodes=new ue),ge.ownerDocument=F;var Xe=H;switch(ge.nodeType){case E:var vt=be.attributes,Pt=ge.attributes=new ve,Tt=vt.length;Pt._ownerElement=ge;for(var Ct=0;Ct<Tt;Ct++)ge.setAttributeNode(Ht(F,vt.item(Ct),!0));break;case C:Xe=!0}return Ie!==null?Ie.appendChild(ge):ae=ge,Xe?ge:null}}),ae}function dr(F,U,H){F[U]=H}try{Object.defineProperty&&(Object.defineProperty(le.prototype,"length",{get:function(){return fe(this),this.$$length}}),Object.defineProperty(me.prototype,"textContent",{get:function(){if(this.nodeType===E||this.nodeType===V){var F=[];return Ae(this,null,{enter:function(U){if(U.nodeType===E||U.nodeType===V)return!0;if(U.nodeType===L||U.nodeType===G)return null;F.push(U.nodeValue)}}),F.join("")}return this.nodeValue},set:function(F){switch(this.nodeType){case E:case V:for(;this.firstChild;)this.removeChild(this.firstChild);(F||String(F))&&this.appendChild(this.ownerDocument.createTextNode(F));break;default:this.data=F,this.value=F,this.nodeValue=F}}}),dr=function(F,U,H){F["$$"+U]=H})}catch{}return dom.DocumentType=ke,dom.DOMException=te,dom.DOMImplementation=Ce,dom.Element=tt,dom.Node=me,dom.NodeList=ue,dom.walkDOM=Ae,dom.XMLSerializer=zt,dom}var domParser={},entities={},hasRequiredEntities;function requireEntities(){return hasRequiredEntities||(hasRequiredEntities=1,(function(e){var t=requireConventions().freeze;e.XML_ENTITIES=t({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),e.HTML_ENTITIES=t({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
134
+ )`},{id:13597,parentId:null,layerOrder:2,mapId:646,mapUuid:null,teamId:39,datasetId:716,teamDatasetId:713,serviceType:"XYZ",tiled:1,displayName:"Minor Flooding",description:"Real time forecast values from NOAA. Updated hourly",url:"https://rsgis-testdev.crrel.usace.army.mil/tiles/mstile/m.e847f06e3f0982927900594d68264d61/geom/{z}/{x}/{y}.png?nocache=true",grids:null,layerList:"ahpsfcst_minor",attribution:null,geometryType:"POINT",minzoom:1,maxzoom:22,abstract:null,purpose:null,status:null,keywords:null,localTable:"NOAA.NATIONAL_FCST_VW_MIN",metadataUrl:null,minX:-177.47,maxX:-64.71000000000001,minY:13.43,maxY:72.55,opacity:1,useMapfile:1,queryTemplate:`Location "Location", waterbody "Waterbody", state "State", to_char(fcstdate,'mm/dd/yyyy hh:mi: am') "Forecast Time", forecast||' '||units "Forecast", '<a href="'||url||'" target="_blank"><img src="http://water.weather.gov/resources/hydrographs/'||lower(gaugelid)||'_hg.png" width="300px"/></a>' "Hyperlink", action "Action Level", flood "Flood Level" , moderate "Mod Flood Level", major "Major Flood Level"`,hoverTemplate:`Location "Location", waterbody "Waterbody", state "State", to_char(fcstdate,'mm/dd/yyyy hh:mi: am') "Forecast Time", forecast||' '||units "Forecast", '<a href="'||url||'" target="_blank"><img src="http://water.weather.gov/resources/hydrographs/'||lower(gaugelid)||'_hg.png" width="300px"/></a>' "Hyperlink", action "Action Level", flood "Flood Level" , moderate "Mod Flood Level", major "Major Flood Level"`,queryable:1,visible:0,collapsed:1,idCol:"objectid",shapeCol:"SHAPE",allowEdit:0,allowExport:1,createdBy:"1380992694",createDate:"2017-12-12T13:15:12.000Z",cacheTiles:0,labelDefault:0,labelEnabled:0,deep:2,path:"depricated"}]},version="4.1.6",pkg={version};console.log("------ RUNNING CORPSMAP V."+pkg.version+" ------");let Map$1=class extends React.Component{constructor(t){super(t),this.state={store:null},this.getStore=this.getStore.bind(this)}getStore(){return this.state.store}componentDidMount(){this._isMounted=!0;const{mapConfig:t={},plugins:r=[],height:s,theme:o,themeNavSize:d,basemaps:m,basemapImageIDs:g=[],limitMapExtent:y}=this.props;cache.getAll().then(b=>{if(b.config={default:Object.assign({},config$1,t)},m&&m.forEach(E=>{b.config.default.basemaps.push(E)}),console.log(m),console.log(b),b.config.default.basemapImageIDs=g,s&&(b.vLayout={height:s,hNorth:1,hSouth:0}),o){const E=o.indexOf("bg-")===-1?`bg-${o}`:o;b.theme={theme:E,iconSize:d||"default"}}y&&(b.config.default.limitMapExtent=y);const x=getStore(b);loadPlugins(x,r),window.internalStore=x,this._isMounted&&this.setState({store:x})})}componentWillUnmount(){this._isMounted=!1}render(){const{store:t}=this.state;return t?jsxRuntime.jsx(Provider,{store:t,children:jsxRuntime.jsx(Corpsmap,{...this.props})}):null}},SidebarButton$1=class extends React.Component{constructor(t){super(t),this.clickHandler=this.clickHandler.bind(this)}clickHandler(t){t.preventDefault(),this.props.onClick(t)}render(){const{active:t,iconClass:r,iconStyle:s,iconText:o,expanded:d,label:m,theme:g,title:y,styleOverride:b,onMouseDown:x,onMouseUp:E,themeIconSize:C}=this.props,S=classnames({"cm-nav-btn":!0,"cm-nav-icon":C==="default","cm-nav-icon-lg":C==="large","cm-btn-block":!0,"vertical-toolbar-button":!0,active:t}),A=classnames({"overflow-ellipsis":!0,hidden:!o}),N=classnames({"icon-inline":d,hidden:!!o}),k=classnames({hidden:!d}),L=Object.assign({textAlign:"left"},b);return jsxRuntime.jsxs("div",{className:S+" "+g,onClick:this.clickHandler,onMouseDown:x,onMouseUp:E,style:L,title:y,children:[jsxRuntime.jsx("i",{className:r+" "+N,style:s}),jsxRuntime.jsx("span",{className:A,children:o}),jsxRuntime.jsx("span",{className:k,children:m})]})}};const SidebarButton=connect("selectThemeIconSize",SidebarButton$1);let SidebarPanelOpenerButton$1=class extends React.Component{constructor(t){super(t),this.handleClick=this.handleClick.bind(this)}handleClick(){const{doPrimaryPanelOpen:t,doPrimaryPanelClose:r,title:s,panelComponent:o,panelOptions:d,primaryPanelOpenedBy:m}=this.props;m!==s?t({openedBy:s,options:d,children:[o]}):r()}render(){const{theme:t,label:r,title:s,iconClass:o,iconText:d,styleOverride:m,primaryPanelOpenedBy:g}=this.props;return jsxRuntime.jsx(SidebarButton,{active:g===s,iconClass:o,iconText:d,styleOverride:m,expanded:!1,label:r,title:s,onClick:this.handleClick,theme:t})}};const SidebarPanelOpenerButton=connect("selectTheme","selectPrimaryPanelOpenedBy","doPrimaryPanelOpen","doPrimaryPanelClose",SidebarPanelOpenerButton$1);let BasicToolbarButton$1=class extends React.Component{constructor(t){super(t),this.renderIcon=this.renderIcon.bind(this),this.toggleTool=this.toggleTool.bind(this)}toggleTool(){const{enabled:t,title:r,onActivate:s,onDeactivate:o,basicToolbarActiveTool:d,doBasicToolbarToggle:m}=this.props;t&&(m(d,r),s&&s(),o&&o())}renderIcon(){const{children:t,text:r,title:s,iconClass:o,iconStyle:d,basicToolbarActiveTool:m,dropup:g,themeIconSize:y}=this.props,b=classnames({"cm-nav-btn":!0,"cm-nav-icon":y==="default","cm-nav-icon-lg":y==="large","basic-toolbar-btn":!0,"cm-dropdown-toggle":!0,active:m===s}),x=classnames({mdi:!0,"mdi-menu-down":!g,"mdi-menu-up":g});return t?jsxRuntime.jsxs("div",{onClick:this.toggleTool,className:b,children:[jsxRuntime.jsx("i",{className:o,style:d}),r,jsxRuntime.jsx("i",{className:x})]}):jsxRuntime.jsxs("div",{onClick:this.toggleTool,className:b,style:{textAlign:"center"},children:[jsxRuntime.jsx("i",{className:o,style:d}),r]})}render(){const{theme:t,basicToolbarActiveTool:r,title:s,children:o,dropup:d,passProps:m,basicToolbarOpen:g}=this.props,y=!!(g&&r===s),b=classnames({[t]:!0,"cm-btn-group":!0,open:y}),x=classnames({"basic-toolbar-btn-active":!d,"basic-toolbar-btn-active-top":d,hidden:r!==s});return jsxRuntime.jsxs("div",{className:b,...m,title:s,children:[jsxRuntime.jsx("div",{className:x}),this.renderIcon(),o]})}};const BasicToolbarButton=connect("selectTheme","selectThemeIconSize","selectBasicToolbarActiveTool","selectBasicToolbarOpen","doBasicToolbarActivate","doBasicToolbarDeactivate","doBasicToolbarToggle",BasicToolbarButton$1);class BasicToolbarMenu extends React.Component{render(){return jsxRuntime.jsx("ul",{className:"cm-dropdown-menu",children:this.props.children})}}class BasicToolbarMenuUp extends React.Component{render(){return jsxRuntime.jsx("ul",{className:"cm-dropup-menu",children:this.props.children})}}class BasicToolbarSubmenu extends React.Component{render(){return jsxRuntime.jsx(BasicToolbarMenu,{children:this.props.children})}}class BasicToolbarMenuDivider extends React.Component{render(){return jsxRuntime.jsx("li",{className:"divider"})}}class BasicToolbarMenuItem extends React.Component{constructor(t){super(t),this.state={showSubmenu:!1},this.renderTextContent=this.renderTextContent.bind(this),this.renderSubmenu=this.renderSubmenu.bind(this),this.showSubmenu=this.showSubmenu.bind(this),this.hideSubmenu=this.hideSubmenu.bind(this)}renderTextContent(){const{liveDangerously:t,text:r}=this.props;return t?jsxRuntime.jsx("span",{dangerouslySetInnerHTML:{__html:r}}):r}renderSubmenu(){const{children:t,disableSubmenu:r}=this.props,{showSubmenu:s}=this.state;if(!t)return null;const o=classnames({"pull-right":!0,hidden:r}),d=classnames({open:s});return jsxRuntime.jsxs("div",{className:o,children:[jsxRuntime.jsx("i",{className:"mdi mdi-menu-right"}),jsxRuntime.jsx("div",{style:{position:"relative",top:-31,left:33},className:d,children:t})]})}showSubmenu(){this.setState({showSubmenu:!0})}hideSubmenu(){this.setState({showSubmenu:!1})}renderDisabled(){const{passProps:t,iconClass:r}=this.props;return jsxRuntime.jsx("li",{...t,disabled:!0,children:jsxRuntime.jsxs("span",{children:[jsxRuntime.jsx("i",{className:r}),this.renderTextContent()]})})}render(){const{active:t,passProps:r,onClick:s,iconClass:o,disabled:d,title:m}=this.props;if(d)return this.renderDisabled();const g=classnames({active:t});return jsxRuntime.jsx("li",{className:g,...r,onClick:s,title:m,children:jsxRuntime.jsxs("span",{onMouseOver:this.showSubmenu,onMouseOut:this.hideSubmenu,children:[this.renderSubmenu(),jsxRuntime.jsx("i",{className:o}),this.renderTextContent()]})})}}class SearchInput extends React.Component{constructor(t){super(t),this.updateFilterString=this.updateFilterString.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this),this.setFocus=this.setFocus.bind(this)}updateFilterString(t){const{onUpdate:r}=this.props,s=t.currentTarget.value;r(s)}handleKeyUp(t){const{onKeyUp:r}=this.props;r&&r(t)}setFocus(){this.input.focus()}render(){const{filterString:t,placeholder:r,size:s,inline:o,darkTheme:d}=this.props;let m="cm-form-control";m+=s==="small"?" input-sm":"";const g=s==="small"?"17px":"22px",y=s==="small"?"20px":"30px";return jsxRuntime.jsxs("div",{className:"cm-form-group",style:o?{marginBottom:0}:{},children:[jsxRuntime.jsx("span",{style:{position:"absolute",fontSize:g,top:"10px"},children:jsxRuntime.jsx("i",{className:"mdi mdi-magnify"})}),jsxRuntime.jsx("span",{children:jsxRuntime.jsx("input",{ref:b=>{this.input=b},style:{textIndent:y,color:d?"#ffffff":"inherit"},value:t,type:"text",className:m,placeholder:r,onChange:this.updateFilterString,onKeyUp:this.handleKeyUp})})]})}}class SearchResultsListItem extends React.Component{constructor(t){super(t),this.handleClick=this.handleClick.bind(this)}handleClick(){const{item:t,onClick:r}=this.props;r&&r(t)}render(){const{item:t,selected:r}=this.props,s=classnames({"cm-list-group-item":!0,"search-result-item":!0,"overflow-ellipsis":!0,selected:r});let o=t.secondaryTxt?`${t.displayName} ${t.secondaryTxt}`:`${t.displayName}`;return o=t.prefix?`${t.prefix}: ${o}`:`${o}`,jsxRuntime.jsxs("li",{onClick:this.handleClick,className:s,title:`${o}`,children:[jsxRuntime.jsx("i",{className:t.iconClass+" icon-inline"}),t.displayName,t.secondaryTxt?jsxRuntime.jsx("div",{className:"overflow-ellipsis",style:{marginLeft:"30px"},children:t.secondaryTxt}):null]})}}class SearchResultsList extends React.Component{render(){const{items:t,onItemClick:r,selectedIdx:s}=this.props;return jsxRuntime.jsx("ul",{className:"cm-list-group thin-scrollbar",ref:o=>{this.el=o},style:{position:"absolute",maxHeight:"400px",overflow:"auto"},children:t.map((o,d)=>jsxRuntime.jsx(SearchResultsListItem,{onClick:r,item:o,selected:s===d},d))})}}let LoadingIndicator$1=class extends React.Component{render(){return jsxRuntime.jsx("li",{className:"cm-list-group-item",children:jsxRuntime.jsxs("div",{className:"loading-container",children:[jsxRuntime.jsx("div",{className:"loading-spinner"}),jsxRuntime.jsx("div",{className:"loading-text",children:this.props.text})]})})}};class TreeListFolder extends React.Component{render(){const{item:t,collapsed:r,toggleCollapsed:s}=this.props,o=classnames({mdi:!0,"mdi-folder-open":!r,"mdi-folder":r}),d=classnames({"tree-list-item-hover":!1}),m={display:"inline-block",paddingLeft:"8px"},g=t.children.length;return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("i",{title:"Click to collapse or expand",onClick:s,className:o,style:{fontSize:"16px",cursor:"pointer"}}),jsxRuntime.jsxs("span",{children:[jsxRuntime.jsx("div",{className:d,style:m,onDoubleClick:s,children:t.displayName}),jsxRuntime.jsx("span",{children:" ("+g+")"})]})]})}}let TreeListItem$2=class extends React.Component{constructor(t){super(t),this.state={collapsed:t.item.collapsed},this.renderItemComponent=this.renderItemComponent.bind(this),this.handleClick=this.handleClick.bind(this),this.toggleCollapsed=this.toggleCollapsed.bind(this)}toggleCollapsed(){this.setState({collapsed:!this.state.collapsed})}handleClick(t){const{item:r,onSelect:s}=this.props;s({ctrl:t.ctrlKey,shift:t.shiftKey,item:r})}renderItemComponent(){const{item:t,components:r,componentMatches:s}=this.props,{collapsed:o}=this.state;if(!t.leaf)return jsxRuntime.jsx(TreeListFolder,{item:t,collapsed:o,toggleCollapsed:this.toggleCollapsed});let d=r[0];if(s.length){for(let m=0;m<s.length;m++)if(_.isMatch(t,s[m])){d=r[m];break}}return jsxRuntime.jsx(d,{item:t})}render(){const{item:t,components:r,componentMatches:s,onSelect:o}=this.props,{collapsed:d}=this.state,m=classnames({"tree-list-item":!0,hidden:!1});return jsxRuntime.jsxs("li",{className:m,onClick:this.handleClick,children:[this.renderItemComponent(),jsxRuntime.jsx(TreeList$1,{items:t.children,item:t,collapsed:d,components:r,componentMatches:s,onSelect:o})]})}},TreeList$1=class extends React.Component{render(){const{items:t,collapsed:r,components:s,componentMatches:o,styleOverride:d,onSelect:m,selected:g,selectable:y}=this.props,b=classnames({"tree-list":!0,hidden:r});return jsxRuntime.jsx("ul",{className:b,style:d,children:t.map(function(x){return jsxRuntime.jsx(TreeListItem$2,{item:x,components:s,componentMatches:o,onSelect:m,selected:g,selectable:y,time:new Date},x.uid)})})}};class TreeView extends React.Component{constructor(t){super(t),this.state={selected:null},this.handleSelect=this.handleSelect.bind(this)}handleSelect(t){this.setState({selected:t})}render(){const{data:t,components:r,componentMatches:s}=this.props,{selected:o}=this.state,d=!t.length&&t.children?t.children:t||[];return jsxRuntime.jsx("div",{children:jsxRuntime.jsx(TreeList$1,{items:d,collapsed:!1,components:r,componentMatches:s,styleOverride:{paddingLeft:0},onSelect:this.handleSelect,selected:o,selectable:!1})})}}let AddGeoJsonButton$1=class extends React.Component{constructor(t){super(t),this.handleClick=this.handleClick.bind(this),this.handleFile=this.handleFile.bind(this)}handleClick(t){this.geojsonInput.click()}handleFile(t){const{doAddDataFile:r}=this.props,s=this.geojsonInput.files[0];r(s)}render(){return jsxRuntime.jsx(BasicToolbarMenuItem,{active:!1,iconClass:"ms ms-geojson icon-inline",title:"Add Local GeoJSON File",text:"Add Local GeoJSON File",onClick:this.handleClick,passProps:{},disableSubmenu:!0,children:jsxRuntime.jsx("input",{onChange:this.handleFile,accept:".geojson,.json",className:"hidden",type:"file",ref:t=>{this.geojsonInput=t}})})}};const AddGeoJsonButton=connect("doAddDataFile",AddGeoJsonButton$1);let AddShapefileButton$1=class extends React.Component{constructor(t){super(t),this.handleClick=this.handleClick.bind(this),this.handleFile=this.handleFile.bind(this)}handleClick(t){this.shapefileInput.click()}handleFile(t){const{doAddDataFile:r}=this.props,s=this.shapefileInput.files[0];r(s)}render(){return jsxRuntime.jsx(BasicToolbarMenuItem,{active:!1,iconClass:"ms ms-shp icon-inline",title:"Add Local Shapefile",text:"Add Local Shapefile",onClick:this.handleClick,passProps:{},disableSubmenu:!0,children:jsxRuntime.jsx("input",{onChange:this.handleFile,accept:".zip",className:"hidden",type:"file",ref:t=>{this.shapefileInput=t}})})}};const AddShapefileButton=connect("doAddDataFile",AddShapefileButton$1);let AddKmlFileButton$1=class extends React.Component{constructor(t){super(t),this.handleClick=this.handleClick.bind(this),this.handleFile=this.handleFile.bind(this)}handleClick(t){this.geojsonInput.click()}handleFile(t){const{doAddDataFile:r}=this.props,s=this.geojsonInput.files[0];r(s)}render(){return jsxRuntime.jsx(BasicToolbarMenuItem,{active:!1,iconClass:"ms ms-kml icon-inline",title:"Add Local KML File",text:"Add Local KML File",onClick:this.handleClick,passProps:{},disableSubmenu:!0,children:jsxRuntime.jsx("input",{onChange:this.handleFile,accept:".kml",className:"hidden",type:"file",ref:t=>{this.geojsonInput=t}})})}};const AddKmlFileButton=connect("doAddDataFile",AddKmlFileButton$1);let AddDataButton$1=class extends React.Component{constructor(t){super(t)}render(){return jsxRuntime.jsx(BasicToolbarButton,{enabled:!0,iconClass:"mdi mdi-plus-box-multiple",title:"Add Data",onDeactivate:()=>{},children:jsxRuntime.jsxs(BasicToolbarMenu,{children:[jsxRuntime.jsx(AddGeoJsonButton,{}),jsxRuntime.jsx(AddShapefileButton,{}),jsxRuntime.jsx(AddKmlFileButton,{})]})})}};const AddDataButton=connect("doNotificationsFire",AddDataButton$1);try{let e=()=>new DecompressionStream("deflate-raw"),t=r=>new Response(r);e(),l=r=>t(t(r).body.pipeThrough(e())).arrayBuffer().then(s=>new Uint8Array(s))}catch{}var l,w$1=new TextDecoder,c=e=>{throw Error("but-unzip~"+e)};function*p(e,t=l){let r=e.length-21,s=r-65536,o=new DataView(e.buffer,e.byteOffset),d=y=>o.getUint16(y+r,1),m=y=>o.getUint32(y+r,1),g=(y,b)=>e.subarray(r+=y,r+=b);for(;r>s&&(r=e.lastIndexOf(80,r-1))+1&&(e[r+1]-75||e[r+2]-5||e[r+3]-6););for(r<0&&c(2),s=d(10),s-d(8)&&c(3),r=m(16);s--;){let y=d(10),b=d(28),x=d(30),E=d(32),C=m(20),S=m(42),A=w$1.decode(g(46,b)),N=w$1.decode(g(x,E)),k=r,L;r=S,L=g(30+d(26)+d(28),C),yield{filename:A,comment:N,read:()=>y-8?y?c(1):L:t(L)},r=k}}const regex$3=/.+\.(shp|dbf|json|prj|cpg)$/i,unzip=async e=>{const t={},r=[];for(const d of p(e))regex$3.test(d.filename)&&r.push(Promise.resolve(d.read()).then(m=>t[d.filename]=m));await Promise.all(r);const s={},o=new TextDecoder;for(const[d,m]of Object.entries(t))d.slice(-3).toLowerCase()==="shp"||d.slice(-3).toLowerCase()==="dbf"?s[d]=new DataView(m.buffer,m.byteOffset,m.byteLength):s[d]=o.decode(m);return s},URL$2=globalThis.URL,combine$2=(e,t)=>{if(!t)return e;const r=new URL$2(e);return r.pathname=`${r.pathname}.${t}`,r.href};async function binaryAjax(e,t){const r=combine$2(e,t),s=t==="prj"||t==="cpg";try{const o=await fetch(r);if(o.status>399)throw new Error(o.statusText);if(s)return o.text();const d=await o.arrayBuffer();return new DataView(d)}catch(o){if(s||t==="dbf")return!1;throw o}}function isClockWise(e){let t=0,r=1;const s=e.length;let o,d;const m=[e[0][0],e[0][1],e[0][0],e[0][1]];for(;r<s;)o=d||e[0],d=e[r],t+=(d[0]-o[0])*(d[1]+o[1]),r++,d[0]<m[0]&&(m[0]=d[0]),d[1]<m[1]&&(m[1]=d[1]),d[0]>m[2]&&(m[2]=d[0]),d[1]>m[3]&&(m[3]=d[1]);return{ring:e,clockWise:t>0,bbox:m,children:[]}}function contains(e,t){return!(e.bbox[0]>t.bbox[0]||e.bbox[1]>t.bbox[1]||e.bbox[2]<t.bbox[2]||e.bbox[3]<t.bbox[3])}function handleRings(e,t=!1){const r=[],s=[];for(const m of e){const g=isClockWise(m);g.clockWise!==t?r.push(g):s.push(g)}const o=[];for(const m of s){let g;for(const y of r)contains(y,m)&&(g?contains(g,y)&&(g=y):g=y);g?g.children.push(m.ring):o.push(m)}if(t)return{outers:r,orphens:o};if(o.length&&!t){const m=handleRings(e,!0);if(m.orphens.length===0){const g=[];for(const y of m.outers)g.push([y.ring.toReversed()].concat(y.children.map(b=>b.toReversed())));return g}}const d=[];for(const m of r)d.push([m.ring].concat(m.children));return d}ParseShp.prototype.parsePoint=function(e){return{type:"Point",coordinates:this.parseCoord(e,0)}},ParseShp.prototype.parseZPoint=function(e){const t=this.parsePoint(e);return t.coordinates.push(e.getFloat64(16,!0)),t},ParseShp.prototype.parsePointArray=function(e,t,r){const s=[];let o=0;for(;o<r;)s.push(this.parseCoord(e,t)),t+=16,o++;return s},ParseShp.prototype.parseZPointArray=function(e,t,r,s){let o=0;for(;o<r;)s[o].push(e.getFloat64(t,!0)),o++,t+=8;return s},ParseShp.prototype.parseArrayGroup=function(e,t,r,s,o){const d=[];let m=0,g,y=0,b;for(;m<s;)m++,r+=4,g=y,m===s?y=o:y=e.getInt32(r,!0),b=y-g,b&&(d.push(this.parsePointArray(e,t,b)),t+=b<<4);return d},ParseShp.prototype.parseZArrayGroup=function(e,t,r,s){let o=0;for(;o<r;)s[o]=this.parseZPointArray(e,t,s[o].length,s[o]),t+=s[o].length<<3,o++;return s},ParseShp.prototype.parseMultiPoint=function(e){const t={},r=e.getInt32(32,!0);if(!r)return null;const s=this.parseCoord(e,0),o=this.parseCoord(e,16);t.bbox=[s[0],s[1],o[0],o[1]];const d=36;return r===1?(t.type="Point",t.coordinates=this.parseCoord(e,d)):(t.type="MultiPoint",t.coordinates=this.parsePointArray(e,d,r)),t},ParseShp.prototype.parseZMultiPoint=function(e){const t=this.parseMultiPoint(e);if(!t)return null;let r;if(t.type==="Point")return t.coordinates.push(e.getFloat64(72,!0)),t;r=t.coordinates.length;const s=52+(r<<4);return t.coordinates=this.parseZPointArray(e,s,r,t.coordinates),t},ParseShp.prototype.parsePolyline=function(e){const t={},r=e.getInt32(32,!0);if(!r)return null;const s=this.parseCoord(e,0),o=this.parseCoord(e,16);t.bbox=[s[0],s[1],o[0],o[1]];const d=e.getInt32(36,!0);let m,g;return r===1?(t.type="LineString",m=44,t.coordinates=this.parsePointArray(e,m,d)):(t.type="MultiLineString",m=40+(r<<2),g=40,t.coordinates=this.parseArrayGroup(e,m,g,r,d)),t},ParseShp.prototype.parseZPolyline=function(e){const t=this.parsePolyline(e);if(!t)return null;const r=t.coordinates.length;let s;return t.type==="LineString"?(s=60+(r<<4),t.coordinates=this.parseZPointArray(e,s,r,t.coordinates),t):(s=56+(t.coordinates.reduce(function(d,m){return d+m.length},0)<<4)+(r<<2),t.coordinates=this.parseZArrayGroup(e,s,r,t.coordinates),t)},ParseShp.prototype.polyFuncs=function(e){return e&&(e.type==="LineString"?(e.type="Polygon",e.coordinates=[e.coordinates],e):(e.coordinates=handleRings(e.coordinates),e.coordinates.length===1?(e.type="Polygon",e.coordinates=e.coordinates[0],e):(e.type="MultiPolygon",e)))},ParseShp.prototype.parsePolygon=function(e){return this.polyFuncs(this.parsePolyline(e))},ParseShp.prototype.parseZPolygon=function(e){return this.polyFuncs(this.parseZPolyline(e))};const shpFuncObj={1:"parsePoint",3:"parsePolyline",5:"parsePolygon",8:"parseMultiPoint",11:"parseZPoint",13:"parseZPolyline",15:"parseZPolygon",18:"parseZMultiPoint"};function makeParseCoord(e){return e?function(t,r){const s=[t.getFloat64(r,!0),t.getFloat64(r+8,!0)];return e.inverse(s)}:function(t,r){return[t.getFloat64(r,!0),t.getFloat64(r+8,!0)]}}function ParseShp(e,t){if(!(this instanceof ParseShp))return new ParseShp(e,t);this.buffer=e,this.headers=this.parseHeader(),this.shpFuncs(t),this.rows=this.getRows()}ParseShp.prototype.shpFuncs=function(e){let t=this.headers.shpCode;if(t>20&&(t-=20),!(t in shpFuncObj))throw new Error(`I don't know shp type "${t}"`);this.parseFunc=this[shpFuncObj[t]],this.parseCoord=makeParseCoord(e)},ParseShp.prototype.getShpCode=function(){return this.parseHeader().shpCode},ParseShp.prototype.parseHeader=function(){const e=this.buffer;return{length:e.getInt32(24)<<1,version:e.getInt32(28,!0),shpCode:e.getInt32(32,!0),bbox:[e.getFloat64(36,!0),e.getFloat64(44,!0),e.getFloat64(52,!0),e.getFloat64(60,!0)]}},ParseShp.prototype.getRows=function(){let e=100;const t=this.buffer.byteLength-8,r=[];let s;for(;e<=t&&(s=this.getRow(e),!!s);)e+=8,e+=s.len,s.type?r.push(this.parseFunc(s.data)):r.push(null);return r},ParseShp.prototype.getRow=function(e){const t=this.buffer.getInt32(e),r=this.buffer.getInt32(e+4)<<1;if(r===0)return{id:t,len:r,type:0};if(!(e+r+8>this.buffer.byteLength))return{id:t,len:r,data:new DataView(this.buffer.buffer,this.buffer.byteOffset+e+12,r-4),type:this.buffer.getInt32(e+8,!0)}};function parseShp(e,t){return new ParseShp(e,t).rows}var regex$2=/^(?:ANSI\s)?(\d+)$/m;function createDecoder(e,t){if(!e)return s;try{new TextDecoder(e.trim())}catch{var r=regex$2.exec(e);return r&&!t?createDecoder("windows-"+r[1],!0):(e=void 0,s)}return s;function s(o){var d=new TextDecoder(e||void 0),m=d.decode(o,{stream:!0})+d.decode();return m.replace(/\0/g,"").trim()}}function dbfHeader(e){var t={};return t.lastUpdated=new Date(e.getUint8(1)+1900,e.getUint8(2),e.getUint8(3)),t.records=e.getUint32(4,!0),t.headerLen=e.getUint16(8,!0),t.recLen=e.getUint16(10,!0),t}function dbfRowHeader(e,t,r){for(var s=[],o=32;o<t&&(s.push({name:r(new Uint8Array(e.buffer.slice(e.byteOffset+o,e.byteOffset+o+11))),dataType:String.fromCharCode(e.getUint8(o+11)),len:e.getUint8(o+16),decimal:e.getUint8(o+17)}),e.getUint8(o+32)!==13);)o+=32;return s}function rowFuncs(e,t,r,s,o){const d=new Uint8Array(e.buffer.slice(e.byteOffset+t,e.byteOffset+t+r));var m=o(d);switch(s){case"N":case"F":case"O":return parseFloat(m,10);case"D":return new Date(m.slice(0,4),parseInt(m.slice(4,6),10)-1,m.slice(6,8));case"L":return m.toLowerCase()==="y"||m.toLowerCase()==="t";default:return m}}function parseRow(e,t,r,s){for(var o={},d=0,m=r.length,g,y;d<m;)y=r[d],g=rowFuncs(e,t,y.len,y.dataType,s),t+=y.len,typeof g<"u"&&(o[y.name]=g),d++;return o}function parseDbf(e,t){for(var r=createDecoder(t),s=dbfHeader(e),o=dbfRowHeader(e,s.headerLen-1,r),d=(o.length+1<<5)+2,m=s.recLen,g=s.records,y=[];g;)y.push(parseRow(e,d,o,r)),d+=m,g--;return y}const URL$1=globalThis.URL,toUitn8Arr=e=>{if(!e)throw new Error("forgot to pass buffer");if(isArrayBuffer(e))return new Uint8Array(e);if(isArrayBuffer(e.buffer))return e.BYTES_PER_ELEMENT===1?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("invalid buffer like object")},txtDecoder=new TextDecoder,toString=e=>{if(e){if(typeof e=="string")return e;if(isArrayBuffer(e)||ArrayBuffer.isView(e)||isDataView(e))return txtDecoder.decode(e)}},toDataView=e=>{if(!e)throw new Error("forgot to pass buffer");if(isDataView(e))return e;if(isArrayBuffer(e))return new DataView(e);if(isArrayBuffer(e.buffer))return new DataView(e.buffer,e.byteOffset,e.byteLength);throw new Error("invalid buffer like object")};function isArrayBuffer(e){return e instanceof globalThis.ArrayBuffer||Object.prototype.toString.call(e)==="[object ArrayBuffer]"}function isDataView(e){return e instanceof globalThis.DataView||Object.prototype.toString.call(e)==="[object DataView]"}const combine$1=function([e,t]){const r={};r.type="FeatureCollection",r.features=[];let s=0;const o=e.length;for(t||(t=[]);s<o;)r.features.push({type:"Feature",geometry:e[s],properties:t[s]||{}}),s++;return r},parseZip=async function(e,t){let r;e=toUitn8Arr(e);const s=await unzip(e),o=[];t=t||[];for(r in s)r.indexOf("__MACOSX")===-1&&(r.slice(-4).toLowerCase()===".shp"?(o.push(r.slice(0,-4)),s[r.slice(0,-3)+r.slice(-3).toLowerCase()]=s[r]):r.slice(-4).toLowerCase()===".prj"?s[r.slice(0,-3)+r.slice(-3).toLowerCase()]=proj4(s[r]):r.slice(-5).toLowerCase()===".json"||t.indexOf(r.split(".").pop())>-1?o.push(r.slice(0,-3)+r.slice(-3).toLowerCase()):(r.slice(-4).toLowerCase()===".dbf"||r.slice(-4).toLowerCase()===".cpg")&&(s[r.slice(0,-3)+r.slice(-3).toLowerCase()]=s[r]));if(!o.length)throw new Error("no layers founds");const d=o.map(function(m){let g,y;const b=m.lastIndexOf(".");return b>-1&&m.slice(b).indexOf("json")>-1?(g=JSON.parse(s[m]),g.fileName=m.slice(0,b)):t.indexOf(m.slice(b+1))>-1?(g=s[m],g.fileName=m):(s[m+".dbf"]&&(y=parseDbf(s[m+".dbf"],s[m+".cpg"])),g=combine$1([parseShp(s[m+".shp"],s[m+".prj"]),y]),g.fileName=m),g});return d.length===1?d[0]:d};async function getZip(e,t){const r=await binaryAjax(e);return parseZip(r,t)}const handleShp=async e=>{const t=await Promise.all([binaryAjax(e,"shp"),binaryAjax(e,"prj")]);let r=!1;try{t[1]&&(r=proj4(t[1]))}catch{r=!1}return parseShp(t[0],r)},handleDbf=async e=>{const[t,r]=await Promise.all([binaryAjax(e,"dbf"),binaryAjax(e,"cpg")]);if(t)return parseDbf(t,r)},checkSuffix=(e,t)=>new URL$1(e,globalThis?.document?.location).pathname.slice(-4).toLowerCase()===t,fromObject=({shp:e,dbf:t,cpg:r,prj:s})=>{const o=[_parseShp(e,s)];return t&&o.push(_parseDbf(t,r)),combine$1(o)},getShapefile=async function(e,t){if(typeof e!="string"){if(isArrayBuffer(e)||ArrayBuffer.isView(e)||isDataView(e))return parseZip(e);if(e.shp)return fromObject(e);throw new TypeError("must be a string, some sort of Buffer, or an object with at least a .shp property")}if(checkSuffix(e,".zip"))return getZip(e,t);checkSuffix(e,".shp")&&(e=e.slice(0,-4));const r=await Promise.all([handleShp(e),handleDbf(e)]);return combine$1(r)},_parseShp=function(e,t){if(e=toDataView(e),t=toString(t),typeof t=="string")try{t=proj4(t)}catch{t=!1}return parseShp(e,t)},_parseDbf=function(e,t){return e=toDataView(e),t=toString(t),parseDbf(e,t)};var togeojson={exports:{}},lib$1={},dom={},conventions={},hasRequiredConventions;function requireConventions(){if(hasRequiredConventions)return conventions;hasRequiredConventions=1;function e(d,m,g){if(g===void 0&&(g=Array.prototype),d&&typeof g.find=="function")return g.find.call(d,m);for(var y=0;y<d.length;y++)if(Object.prototype.hasOwnProperty.call(d,y)){var b=d[y];if(m.call(void 0,b,y,d))return b}}function t(d,m){return m===void 0&&(m=Object),m&&typeof m.freeze=="function"?m.freeze(d):d}function r(d,m){if(d===null||typeof d!="object")throw new TypeError("target is not an object");for(var g in m)Object.prototype.hasOwnProperty.call(m,g)&&(d[g]=m[g]);return d}var s=t({HTML:"text/html",isHTML:function(d){return d===s.HTML},XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),o=t({HTML:"http://www.w3.org/1999/xhtml",isHTML:function(d){return d===o.HTML},SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});return conventions.assign=r,conventions.find=e,conventions.freeze=t,conventions.MIME_TYPE=s,conventions.NAMESPACE=o,conventions}var hasRequiredDom;function requireDom(){if(hasRequiredDom)return dom;hasRequiredDom=1;var e=requireConventions(),t=e.find,r=e.NAMESPACE;function s(F){return F!==""}function o(F){return F?F.split(/[\t\n\f\r ]+/).filter(s):[]}function d(F,U){return F.hasOwnProperty(U)||(F[U]=!0),F}function m(F){if(!F)return[];var U=o(F);return Object.keys(U.reduce(d,{}))}function g(F){return function(U){return F&&F.indexOf(U)!==-1}}function y(F,U){for(var H in F)Object.prototype.hasOwnProperty.call(F,H)&&(U[H]=F[H])}function b(F,U){var H=F.prototype;if(!(H instanceof U)){let ae=function(){};ae.prototype=U.prototype,ae=new ae,y(H,ae),F.prototype=H=ae}H.constructor!=F&&(typeof F!="function"&&console.error("unknown Class:"+F),H.constructor=F)}var x={},E=x.ELEMENT_NODE=1,C=x.ATTRIBUTE_NODE=2,S=x.TEXT_NODE=3,A=x.CDATA_SECTION_NODE=4,N=x.ENTITY_REFERENCE_NODE=5,k=x.ENTITY_NODE=6,L=x.PROCESSING_INSTRUCTION_NODE=7,G=x.COMMENT_NODE=8,M=x.DOCUMENT_NODE=9,z=x.DOCUMENT_TYPE_NODE=10,V=x.DOCUMENT_FRAGMENT_NODE=11,Y=x.NOTATION_NODE=12,X={},Q={};X.INDEX_SIZE_ERR=(Q[1]="Index size error",1),X.DOMSTRING_SIZE_ERR=(Q[2]="DOMString size error",2);var $=X.HIERARCHY_REQUEST_ERR=(Q[3]="Hierarchy request error",3);X.WRONG_DOCUMENT_ERR=(Q[4]="Wrong document",4);var K=X.INVALID_CHARACTER_ERR=(Q[5]="Invalid character",5);X.NO_DATA_ALLOWED_ERR=(Q[6]="No data allowed",6),X.NO_MODIFICATION_ALLOWED_ERR=(Q[7]="No modification allowed",7);var ee=X.NOT_FOUND_ERR=(Q[8]="Not found",8);X.NOT_SUPPORTED_ERR=(Q[9]="Not supported",9);var se=X.INUSE_ATTRIBUTE_ERR=(Q[10]="Attribute in use",10),ie=X.INVALID_STATE_ERR=(Q[11]="Invalid state",11);X.SYNTAX_ERR=(Q[12]="Syntax error",12),X.INVALID_MODIFICATION_ERR=(Q[13]="Invalid modification",13),X.NAMESPACE_ERR=(Q[14]="Invalid namespace",14),X.INVALID_ACCESS_ERR=(Q[15]="Invalid access",15);function te(F,U){if(U instanceof Error)var H=U;else H=this,Error.call(this,Q[F]),this.message=Q[F],Error.captureStackTrace&&Error.captureStackTrace(this,te);return H.code=F,U&&(this.message=this.message+": "+U),H}te.prototype=Error.prototype,y(X,te);function ue(){}ue.prototype={length:0,item:function(F){return F>=0&&F<this.length?this[F]:null},toString:function(F,U,H){for(var ae=!!H&&!!H.requireWellFormed,be=[],Ie=0;Ie<this.length;Ie++)Qe(this[Ie],be,F,U,null,ae);return be.join("")},filter:function(F){return Array.prototype.filter.call(this,F)},indexOf:function(F){return Array.prototype.indexOf.call(this,F)}};function le(F,U){this._node=F,this._refresh=U,fe(this)}function fe(F){var U=F._node._inc||F._node.ownerDocument._inc;if(F._inc!==U){var H=F._refresh(F._node);if(dr(F,"length",H.length),!F.$$length||H.length<F.$$length)for(var ae=H.length;ae in F;ae++)Object.prototype.hasOwnProperty.call(F,ae)&&delete F[ae];y(H,F),F._inc=U}}le.prototype.item=function(F){return fe(this),this[F]||null},b(le,ue);function ve(){}function xe(F,U){for(var H=F.length;H--;)if(F[H]===U)return H}function ce(F,U,H,ae){if(ae?U[xe(U,ae)]=H:U[U.length++]=H,F){H.ownerElement=F;var be=F.ownerDocument;be&&(ae&&Ue(be,F,ae),J(be,F,H))}}function Te(F,U,H){var ae=xe(U,H);if(ae>=0){for(var be=U.length-1;ae<be;)U[ae]=U[++ae];if(U.length=be,F){var Ie=F.ownerDocument;Ie&&(Ue(Ie,F,H),H.ownerElement=null)}}else throw new te(ee,new Error(F.tagName+"@"+H))}ve.prototype={length:0,item:ue.prototype.item,getNamedItem:function(F){for(var U=this.length;U--;){var H=this[U];if(H.nodeName==F)return H}},setNamedItem:function(F){var U=F.ownerElement;if(U&&U!=this._ownerElement)throw new te(se);var H=this.getNamedItem(F.nodeName);return ce(this._ownerElement,this,F,H),H},setNamedItemNS:function(F){var U=F.ownerElement,H;if(U&&U!=this._ownerElement)throw new te(se);return H=this.getNamedItemNS(F.namespaceURI,F.localName),ce(this._ownerElement,this,F,H),H},removeNamedItem:function(F){var U=this.getNamedItem(F);return Te(this._ownerElement,this,U),U},removeNamedItemNS:function(F,U){var H=this.getNamedItemNS(F,U);return Te(this._ownerElement,this,H),H},getNamedItemNS:function(F,U){for(var H=this.length;H--;){var ae=this[H];if(ae.localName==U&&ae.namespaceURI==F)return ae}return null}};function Ce(){}Ce.prototype={hasFeature:function(F,U){return!0},createDocument:function(F,U,H){var ae=new Pe;if(ae.implementation=this,ae.childNodes=new ue,ae.doctype=H||null,H&&ae.appendChild(H),U){var be=ae.createElementNS(F,U);ae.appendChild(be)}return ae},createDocumentType:function(F,U,H){var ae=new ke;return ae.name=F,ae.nodeName=F,ae.publicId=U||"",ae.systemId=H||"",ae}};function me(){}me.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,attributes:null,parentNode:null,childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,insertBefore:function(F,U){return Ve(this,F,U)},replaceChild:function(F,U){Ve(this,F,U,qe),U&&this.removeChild(U)},removeChild:function(F){return de(this,F)},appendChild:function(F){return this.insertBefore(F,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(F){return Ht(this.ownerDocument||this,this,F)},normalize:function(){Ae(this,null,{enter:function(F){for(var U=F.firstChild;U;){var H=U.nextSibling;H!==null&&H.nodeType===S&&U.nodeType===S?(F.removeChild(H),U.appendData(H.data)):U=H}return!0}})},isSupported:function(F,U){return this.ownerDocument.implementation.hasFeature(F,U)},hasAttributes:function(){return this.attributes.length>0},lookupPrefix:function(F){for(var U=this;U;){var H=U._nsMap;if(H){for(var ae in H)if(Object.prototype.hasOwnProperty.call(H,ae)&&H[ae]===F)return ae}U=U.nodeType==C?U.ownerDocument:U.parentNode}return null},lookupNamespaceURI:function(F){for(var U=this;U;){var H=U._nsMap;if(H&&Object.prototype.hasOwnProperty.call(H,F))return H[F];U=U.nodeType==C?U.ownerDocument:U.parentNode}return null},isDefaultNamespace:function(F){var U=this.lookupPrefix(F);return U==null}};function pe(F){return F=="<"&&"&lt;"||F==">"&&"&gt;"||F=="&"&&"&amp;"||F=='"'&&"&quot;"||"&#"+F.charCodeAt()+";"}y(x,me),y(x,me.prototype);function Ee(F,U){return Ae(F,null,{enter:function(H){return U(H)?Ae.STOP:!0}})===Ae.STOP}function Ae(F,U,H){for(var ae=[{node:F,context:U,phase:Ae.ENTER}];ae.length>0;){var be=ae.pop();if(be.phase===Ae.ENTER){var Ie=H.enter(be.node,be.context);if(Ie===Ae.STOP)return Ae.STOP;if(ae.push({node:be.node,context:Ie,phase:Ae.EXIT}),Ie==null)continue;for(var ge=be.node.lastChild;ge;)ae.push({node:ge,context:Ie,phase:Ae.ENTER}),ge=ge.previousSibling}else H.exit&&H.exit(be.node,be.context)}}Ae.STOP=Symbol("walkDOM.STOP"),Ae.ENTER=0,Ae.EXIT=1;function Pe(){this.ownerDocument=this}function J(F,U,H){F&&F._inc++;var ae=H.namespaceURI;ae===r.XMLNS&&(U._nsMap[H.prefix?H.localName:""]=H.value)}function Ue(F,U,H,ae){F&&F._inc++;var be=H.namespaceURI;be===r.XMLNS&&delete U._nsMap[H.prefix?H.localName:""]}function ye(F,U,H){if(F&&F._inc){F._inc++;var ae=U.childNodes;if(H)ae[ae.length++]=H;else{for(var be=U.firstChild,Ie=0;be;)ae[Ie++]=be,be=be.nextSibling;ae.length=Ie,delete ae[ae.length]}}}function de(F,U){var H=U.previousSibling,ae=U.nextSibling;return H?H.nextSibling=ae:F.firstChild=ae,ae?ae.previousSibling=H:F.lastChild=H,U.parentNode=null,U.previousSibling=null,U.nextSibling=null,ye(F.ownerDocument,F),U}function q(F){return F&&(F.nodeType===me.DOCUMENT_NODE||F.nodeType===me.DOCUMENT_FRAGMENT_NODE||F.nodeType===me.ELEMENT_NODE)}function Re(F){return F&&(je(F)||Fe(F)||Oe(F)||F.nodeType===me.DOCUMENT_FRAGMENT_NODE||F.nodeType===me.COMMENT_NODE||F.nodeType===me.PROCESSING_INSTRUCTION_NODE)}function Oe(F){return F&&F.nodeType===me.DOCUMENT_TYPE_NODE}function je(F){return F&&F.nodeType===me.ELEMENT_NODE}function Fe(F){return F&&F.nodeType===me.TEXT_NODE}function it(F,U){var H=F.childNodes||[];if(t(H,je)||Oe(U))return!1;var ae=t(H,Oe);return!(U&&ae&&H.indexOf(ae)>H.indexOf(U))}function dt(F,U){var H=F.childNodes||[];function ae(Ie){return je(Ie)&&Ie!==U}if(t(H,ae))return!1;var be=t(H,Oe);return!(U&&be&&H.indexOf(be)>H.indexOf(U))}function he(F,U,H){if(!q(F))throw new te($,"Unexpected parent node type "+F.nodeType);if(H&&H.parentNode!==F)throw new te(ee,"child not in parent");if(!Re(U)||Oe(U)&&F.nodeType!==me.DOCUMENT_NODE)throw new te($,"Unexpected node type "+U.nodeType+" for parent node type "+F.nodeType)}function st(F,U,H){var ae=F.childNodes||[],be=U.childNodes||[];if(U.nodeType===me.DOCUMENT_FRAGMENT_NODE){var Ie=be.filter(je);if(Ie.length>1||t(be,Fe))throw new te($,"More than one element or text in fragment");if(Ie.length===1&&!it(F,H))throw new te($,"Element in fragment can not be inserted before doctype")}if(je(U)&&!it(F,H))throw new te($,"Only one element can be added and only after doctype");if(Oe(U)){if(t(ae,Oe))throw new te($,"Only one doctype is allowed");var ge=t(ae,je);if(H&&ae.indexOf(ge)<ae.indexOf(H))throw new te($,"Doctype can only be inserted before an element");if(!H&&ge)throw new te($,"Doctype can not be appended since element is present")}}function qe(F,U,H){var ae=F.childNodes||[],be=U.childNodes||[];if(U.nodeType===me.DOCUMENT_FRAGMENT_NODE){var Ie=be.filter(je);if(Ie.length>1||t(be,Fe))throw new te($,"More than one element or text in fragment");if(Ie.length===1&&!dt(F,H))throw new te($,"Element in fragment can not be inserted before doctype")}if(je(U)&&!dt(F,H))throw new te($,"Only one element can be added and only after doctype");if(Oe(U)){if(t(ae,function(Ye){return Oe(Ye)&&Ye!==H}))throw new te($,"Only one doctype is allowed");var ge=t(ae,je);if(H&&ae.indexOf(ge)<ae.indexOf(H))throw new te($,"Doctype can only be inserted before an element")}}function Ve(F,U,H,ae){he(F,U,H),F.nodeType===me.DOCUMENT_NODE&&(ae||st)(F,U,H);var be=U.parentNode;if(be&&be.removeChild(U),U.nodeType===V){var Ie=U.firstChild;if(Ie==null)return U;var ge=U.lastChild}else Ie=ge=U;var He=H?H.previousSibling:F.lastChild;Ie.previousSibling=He,ge.nextSibling=H,He?He.nextSibling=Ie:F.firstChild=Ie,H==null?F.lastChild=ge:H.previousSibling=ge;do{Ie.parentNode=F;var Ye=F.ownerDocument||F;mt(Ie,Ye)}while(Ie!==ge&&(Ie=Ie.nextSibling));return ye(F.ownerDocument||F,F),U.nodeType==V&&(U.firstChild=U.lastChild=null),U}function mt(F,U){if(F.ownerDocument!==U){if(F.ownerDocument=U,F.nodeType===E&&F.attributes)for(var H=0;H<F.attributes.length;H++){var ae=F.attributes.item(H);ae&&(ae.ownerDocument=U)}for(var be=F.firstChild;be;)mt(be,U),be=be.nextSibling}}function Le(F,U){U.parentNode&&U.parentNode.removeChild(U),U.parentNode=F,U.previousSibling=F.lastChild,U.nextSibling=null,U.previousSibling?U.previousSibling.nextSibling=U:F.firstChild=U,F.lastChild=U,ye(F.ownerDocument,F,U);var H=F.ownerDocument||F;return mt(U,H),U}Pe.prototype={nodeName:"#document",nodeType:M,doctype:null,documentElement:null,_inc:1,insertBefore:function(F,U){if(F.nodeType==V){for(var H=F.firstChild;H;){var ae=H.nextSibling;this.insertBefore(H,U),H=ae}return F}return Ve(this,F,U),mt(F,this),this.documentElement===null&&F.nodeType===E&&(this.documentElement=F),F},removeChild:function(F){return this.documentElement==F&&(this.documentElement=null),de(this,F)},replaceChild:function(F,U){Ve(this,F,U,qe),mt(F,this),U&&this.removeChild(U),je(F)&&(this.documentElement=F)},importNode:function(F,U){return cr(this,F,U)},getElementById:function(F){var U=null;return Ee(this.documentElement,function(H){if(H.nodeType==E&&H.getAttribute("id")==F)return U=H,!0}),U},getElementsByClassName:function(F){var U=m(F);return new le(this,function(H){var ae=[];return U.length>0&&Ee(H.documentElement,function(be){if(be!==H&&be.nodeType===E){var Ie=be.getAttribute("class");if(Ie){var ge=F===Ie;if(!ge){var He=m(Ie);ge=U.every(g(He))}ge&&ae.push(be)}}}),ae})},createElement:function(F){var U=new tt;U.ownerDocument=this,U.nodeName=F,U.tagName=F,U.localName=F,U.childNodes=new ue;var H=U.attributes=new ve;return H._ownerElement=U,U},createDocumentFragment:function(){var F=new De;return F.ownerDocument=this,F.childNodes=new ue,F},createTextNode:function(F){var U=new we;return U.ownerDocument=this,U.appendData(F),U},createComment:function(F){var U=new Lt;return U.ownerDocument=this,U.appendData(F),U},createCDATASection:function(F){if(F.indexOf("]]>")!==-1)throw new te(K,'data contains "]]>"');var U=new Me;return U.ownerDocument=this,U.appendData(F),U},createProcessingInstruction:function(F,U){var H=new Gt;return H.ownerDocument=this,H.tagName=H.nodeName=H.target=F,H.nodeValue=H.data=U,H},createAttribute:function(F){var U=new gt;return U.ownerDocument=this,U.name=F,U.nodeName=F,U.localName=F,U.specified=!0,U},createEntityReference:function(F){var U=new Bt;return U.ownerDocument=this,U.nodeName=F,U},createElementNS:function(F,U){var H=new tt,ae=U.split(":"),be=H.attributes=new ve;return H.childNodes=new ue,H.ownerDocument=this,H.nodeName=U,H.tagName=U,H.namespaceURI=F,ae.length==2?(H.prefix=ae[0],H.localName=ae[1]):H.localName=U,be._ownerElement=H,H},createAttributeNS:function(F,U){var H=new gt,ae=U.split(":");return H.ownerDocument=this,H.nodeName=U,H.name=U,H.namespaceURI=F,H.specified=!0,ae.length==2?(H.prefix=ae[0],H.localName=ae[1]):H.localName=U,H}},b(Pe,me);function tt(){this._nsMap={}}tt.prototype={nodeType:E,hasAttribute:function(F){return this.getAttributeNode(F)!=null},getAttribute:function(F){var U=this.getAttributeNode(F);return U&&U.value||""},getAttributeNode:function(F){return this.attributes.getNamedItem(F)},setAttribute:function(F,U){var H=this.ownerDocument.createAttribute(F);H.value=H.nodeValue=""+U,this.setAttributeNode(H)},removeAttribute:function(F){var U=this.getAttributeNode(F);U&&this.removeAttributeNode(U)},appendChild:function(F){return F.nodeType===V?this.insertBefore(F,null):Le(this,F)},setAttributeNode:function(F){return this.attributes.setNamedItem(F)},setAttributeNodeNS:function(F){return this.attributes.setNamedItemNS(F)},removeAttributeNode:function(F){return this.attributes.removeNamedItem(F.nodeName)},removeAttributeNS:function(F,U){var H=this.getAttributeNodeNS(F,U);H&&this.removeAttributeNode(H)},hasAttributeNS:function(F,U){return this.getAttributeNodeNS(F,U)!=null},getAttributeNS:function(F,U){var H=this.getAttributeNodeNS(F,U);return H&&H.value||""},setAttributeNS:function(F,U,H){var ae=this.ownerDocument.createAttributeNS(F,U);ae.value=ae.nodeValue=""+H,this.setAttributeNode(ae)},getAttributeNodeNS:function(F,U){return this.attributes.getNamedItemNS(F,U)},getElementsByTagName:function(F){return new le(this,function(U){var H=[];return Ee(U,function(ae){ae!==U&&ae.nodeType==E&&(F==="*"||ae.tagName==F)&&H.push(ae)}),H})},getElementsByTagNameNS:function(F,U){return new le(this,function(H){var ae=[];return Ee(H,function(be){be!==H&&be.nodeType===E&&(F==="*"||be.namespaceURI===F)&&(U==="*"||be.localName==U)&&ae.push(be)}),ae})}},Pe.prototype.getElementsByTagName=tt.prototype.getElementsByTagName,Pe.prototype.getElementsByTagNameNS=tt.prototype.getElementsByTagNameNS,b(tt,me);function gt(){}gt.prototype.nodeType=C,b(gt,me);function yt(){}yt.prototype={data:"",substringData:function(F,U){return this.data.substring(F,F+U)},appendData:function(F){F=this.data+F,this.nodeValue=this.data=F,this.length=F.length},insertData:function(F,U){this.replaceData(F,0,U)},appendChild:function(F){throw new Error(Q[$])},deleteData:function(F,U){this.replaceData(F,U,"")},replaceData:function(F,U,H){var ae=this.data.substring(0,F),be=this.data.substring(F+U);H=ae+H+be,this.nodeValue=this.data=H,this.length=H.length}},b(yt,me);function we(){}we.prototype={nodeName:"#text",nodeType:S,splitText:function(F){var U=this.data,H=U.substring(F);U=U.substring(0,F),this.data=this.nodeValue=U,this.length=U.length;var ae=this.ownerDocument.createTextNode(H);return this.parentNode&&this.parentNode.insertBefore(ae,this.nextSibling),ae}},b(we,yt);function Lt(){}Lt.prototype={nodeName:"#comment",nodeType:G},b(Lt,yt);function Me(){}Me.prototype={nodeName:"#cdata-section",nodeType:A},b(Me,yt);function ke(){}ke.prototype.nodeType=z,b(ke,me);function Ut(){}Ut.prototype.nodeType=Y,b(Ut,me);function at(){}at.prototype.nodeType=k,b(at,me);function Bt(){}Bt.prototype.nodeType=N,b(Bt,me);function De(){}De.prototype.nodeName="#document-fragment",De.prototype.nodeType=V,b(De,me);function Gt(){}Gt.prototype.nodeType=L,b(Gt,me);function zt(){}zt.prototype.serializeToString=function(F,U,H,ae){return Ot.call(F,U,H,ae)},me.prototype.toString=Ot;function Ot(F,U,H){var ae=!!H&&!!H.requireWellFormed,be=[],Ie=this.nodeType==9&&this.documentElement||this,ge=Ie.prefix,He=Ie.namespaceURI;if(He&&ge==null){var ge=Ie.lookupPrefix(He);if(ge==null)var Ye=[{namespace:He,prefix:null}]}return Qe(this,be,F,U,Ye,ae),be.join("")}function Je(F,U,H){var ae=F.prefix||"",be=F.namespaceURI;if(!be||ae==="xml"&&be===r.XML||be===r.XMLNS)return!1;for(var Ie=H.length;Ie--;){var ge=H[Ie];if(ge.prefix===ae)return ge.namespace!==be}return!0}function ct(F,U,H){F.push(" ",U,'="',H.replace(/[<>&"\t\n\r]/g,pe),'"')}function Qe(F,U,H,ae,be,Ie){be||(be=[]),Ae(F,{ns:be,isHTML:H},{enter:function(ge,He){var Ye=He.ns,Ze=He.isHTML;if(ae)if(ge=ae(ge),ge){if(typeof ge=="string")return U.push(ge),null}else return null;switch(ge.nodeType){case E:var vt=ge.attributes,Pt=vt.length,Tt=ge.tagName;Ze=r.isHTML(ge.namespaceURI)||Ze;var Ct=Tt;if(!Ze&&!ge.prefix&&ge.namespaceURI){for(var Yt,Ke=0;Ke<vt.length;Ke++)if(vt.item(Ke).name==="xmlns"){Yt=vt.item(Ke).value;break}if(!Yt)for(var St=Ye.length-1;St>=0;St--){var ht=Ye[St];if(ht.prefix===""&&ht.namespace===ge.namespaceURI){Yt=ht.namespace;break}}if(Yt!==ge.namespaceURI)for(var St=Ye.length-1;St>=0;St--){var ht=Ye[St];if(ht.namespace===ge.namespaceURI){ht.prefix&&(Ct=ht.prefix+":"+Tt);break}}}U.push("<",Ct);for(var rt=Ye.slice(),ut=0;ut<Pt;ut++){var ot=vt.item(ut);ot.prefix=="xmlns"?rt.push({prefix:ot.localName,namespace:ot.value}):ot.nodeName=="xmlns"&&rt.push({prefix:"",namespace:ot.value})}for(var ut=0;ut<Pt;ut++){var ot=vt.item(ut);if(Je(ot,Ze,rt)){var qt=ot.prefix||"",Rt=ot.namespaceURI;ct(U,qt?"xmlns:"+qt:"xmlns",Rt),rt.push({prefix:qt,namespace:Rt})}var We=ae?ae(ot):ot;We&&(typeof We=="string"?U.push(We):ct(U,We.name,We.value))}if(Tt===Ct&&Je(ge,Ze,rt)){var sr=ge.prefix||"",Rt=ge.namespaceURI;ct(U,sr?"xmlns:"+sr:"xmlns",Rt),rt.push({prefix:sr,namespace:Rt})}var Ft=ge.firstChild;if(Ft||Ze&&!/^(?:meta|link|img|br|hr|input)$/i.test(Tt)){if(U.push(">"),Ze&&/^script$/i.test(Tt)){for(;Ft;)Ft.data?U.push(Ft.data):Qe(Ft,U,Ze,ae,rt.slice(),Ie),Ft=Ft.nextSibling;return U.push("</",Tt,">"),null}return{ns:rt,isHTML:Ze,tag:Ct}}else return U.push("/>"),null;case M:case V:return{ns:Ye.slice(),isHTML:Ze,tag:null};case C:return ct(U,ge.name,ge.value),null;case S:return U.push(ge.data.replace(/[<&>]/g,pe)),null;case A:if(Ie&&ge.data.indexOf("]]>")!==-1)throw new te(ie,'The CDATASection data contains "]]>"');return U.push("<![CDATA[",ge.data.replace(/]]>/g,"]]]]><![CDATA[>"),"]]>"),null;case G:if(Ie&&ge.data.indexOf("-->")!==-1)throw new te(ie,'The comment node data contains "-->"');return U.push("<!--",ge.data,"-->"),null;case z:if(Ie){if(ge.publicId&&!/^("[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%']*"|'[\x20\r\na-zA-Z0-9\-()+,.\/:=?;!*#@$_%'"]*')$/.test(ge.publicId))throw new te(ie,"DocumentType publicId is not a valid PubidLiteral");if(ge.systemId&&!/^("[^"]*"|'[^']*')$/.test(ge.systemId))throw new te(ie,"DocumentType systemId is not a valid SystemLiteral");if(ge.internalSubset&&ge.internalSubset.indexOf("]>")!==-1)throw new te(ie,'DocumentType internalSubset contains "]>"')}var $t=ge.publicId,bt=ge.systemId;if(U.push("<!DOCTYPE ",ge.name),$t)U.push(" PUBLIC ",$t),bt&&bt!="."&&U.push(" ",bt),U.push(">");else if(bt&&bt!=".")U.push(" SYSTEM ",bt,">");else{var Jt=ge.internalSubset;Jt&&U.push(" [",Jt,"]"),U.push(">")}return null;case L:if(Ie&&ge.data.indexOf("?>")!==-1)throw new te(ie,'The ProcessingInstruction data contains "?>"');return U.push("<?",ge.target," ",ge.data,"?>"),null;case N:return U.push("&",ge.nodeName,";"),null;default:return U.push("??",ge.nodeName),null}},exit:function(ge,He){He&&He.tag&&U.push("</",He.tag,">")}})}function cr(F,U,H){var ae;return Ae(U,null,{enter:function(be,Ie){var ge=be.cloneNode(!1);ge.ownerDocument=F,ge.parentNode=null,Ie===null?ae=ge:Ie.appendChild(ge);var He=be.nodeType===C||H;return He?ge:null}}),ae}function Ht(F,U,H){var ae;return Ae(U,null,{enter:function(be,Ie){var ge=new be.constructor;for(var He in be)if(Object.prototype.hasOwnProperty.call(be,He)){var Ye=be[He];typeof Ye!="object"&&Ye!=ge[He]&&(ge[He]=Ye)}be.childNodes&&(ge.childNodes=new ue),ge.ownerDocument=F;var Ze=H;switch(ge.nodeType){case E:var vt=be.attributes,Pt=ge.attributes=new ve,Tt=vt.length;Pt._ownerElement=ge;for(var Ct=0;Ct<Tt;Ct++)ge.setAttributeNode(Ht(F,vt.item(Ct),!0));break;case C:Ze=!0}return Ie!==null?Ie.appendChild(ge):ae=ge,Ze?ge:null}}),ae}function dr(F,U,H){F[U]=H}try{Object.defineProperty&&(Object.defineProperty(le.prototype,"length",{get:function(){return fe(this),this.$$length}}),Object.defineProperty(me.prototype,"textContent",{get:function(){if(this.nodeType===E||this.nodeType===V){var F=[];return Ae(this,null,{enter:function(U){if(U.nodeType===E||U.nodeType===V)return!0;if(U.nodeType===L||U.nodeType===G)return null;F.push(U.nodeValue)}}),F.join("")}return this.nodeValue},set:function(F){switch(this.nodeType){case E:case V:for(;this.firstChild;)this.removeChild(this.firstChild);(F||String(F))&&this.appendChild(this.ownerDocument.createTextNode(F));break;default:this.data=F,this.value=F,this.nodeValue=F}}}),dr=function(F,U,H){F["$$"+U]=H})}catch{}return dom.DocumentType=ke,dom.DOMException=te,dom.DOMImplementation=Ce,dom.Element=tt,dom.Node=me,dom.NodeList=ue,dom.walkDOM=Ae,dom.XMLSerializer=zt,dom}var domParser={},entities={},hasRequiredEntities;function requireEntities(){return hasRequiredEntities||(hasRequiredEntities=1,(function(e){var t=requireConventions().freeze;e.XML_ENTITIES=t({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'}),e.HTML_ENTITIES=t({Aacute:"Á",aacute:"á",Abreve:"Ă",abreve:"ă",ac:"∾",acd:"∿",acE:"∾̳",Acirc:"Â",acirc:"â",acute:"´",Acy:"А",acy:"а",AElig:"Æ",aelig:"æ",af:"⁡",Afr:"𝔄",afr:"𝔞",Agrave:"À",agrave:"à",alefsym:"ℵ",aleph:"ℵ",Alpha:"Α",alpha:"α",Amacr:"Ā",amacr:"ā",amalg:"⨿",AMP:"&",amp:"&",And:"⩓",and:"∧",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",Aogon:"Ą",aogon:"ą",Aopf:"𝔸",aopf:"𝕒",ap:"≈",apacir:"⩯",apE:"⩰",ape:"≊",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",Aring:"Å",aring:"å",Ascr:"𝒜",ascr:"𝒶",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",Atilde:"Ã",atilde:"ã",Auml:"Ä",auml:"ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",Barwed:"⌆",barwed:"⌅",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",Bcy:"Б",bcy:"б",bdquo:"„",becaus:"∵",Because:"∵",because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",Beta:"Β",beta:"β",beth:"ℶ",between:"≬",Bfr:"𝔅",bfr:"𝔟",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bNot:"⫭",bnot:"⌐",Bopf:"𝔹",bopf:"𝕓",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxDL:"╗",boxDl:"╖",boxdL:"╕",boxdl:"┐",boxDR:"╔",boxDr:"╓",boxdR:"╒",boxdr:"┌",boxH:"═",boxh:"─",boxHD:"╦",boxHd:"╤",boxhD:"╥",boxhd:"┬",boxHU:"╩",boxHu:"╧",boxhU:"╨",boxhu:"┴",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxUL:"╝",boxUl:"╜",boxuL:"╛",boxul:"┘",boxUR:"╚",boxUr:"╙",boxuR:"╘",boxur:"└",boxV:"║",boxv:"│",boxVH:"╬",boxVh:"╫",boxvH:"╪",boxvh:"┼",boxVL:"╣",boxVl:"╢",boxvL:"╡",boxvl:"┤",boxVR:"╠",boxVr:"╟",boxvR:"╞",boxvr:"├",bprime:"‵",Breve:"˘",breve:"˘",brvbar:"¦",Bscr:"ℬ",bscr:"𝒷",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpE:"⪮",bumpe:"≏",Bumpeq:"≎",bumpeq:"≏",Cacute:"Ć",cacute:"ć",Cap:"⋒",cap:"∩",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",Ccaron:"Č",ccaron:"č",Ccedil:"Ç",ccedil:"ç",Ccirc:"Ĉ",ccirc:"ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",Cdot:"Ċ",cdot:"ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",CenterDot:"·",centerdot:"·",Cfr:"ℭ",cfr:"𝔠",CHcy:"Ч",chcy:"ч",check:"✓",checkmark:"✓",Chi:"Χ",chi:"χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cirE:"⧃",cire:"≗",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",Colon:"∷",colon:":",Colone:"⩴",colone:"≔",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",Conint:"∯",conint:"∮",ContourIntegral:"∮",Copf:"ℂ",copf:"𝕔",coprod:"∐",Coproduct:"∐",COPY:"©",copy:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",Cross:"⨯",cross:"✗",Cscr:"𝒞",cscr:"𝒸",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",Cup:"⋓",cup:"∪",cupbrcap:"⩈",CupCap:"≍",cupcap:"⩆",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",Dagger:"‡",dagger:"†",daleth:"ℸ",Darr:"↡",dArr:"⇓",darr:"↓",dash:"‐",Dashv:"⫤",dashv:"⊣",dbkarow:"⤏",dblac:"˝",Dcaron:"Ď",dcaron:"ď",Dcy:"Д",dcy:"д",DD:"ⅅ",dd:"ⅆ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",Delta:"Δ",delta:"δ",demptyv:"⦱",dfisht:"⥿",Dfr:"𝔇",dfr:"𝔡",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",Diamond:"⋄",diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",DJcy:"Ђ",djcy:"ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",Dopf:"𝔻",dopf:"𝕕",Dot:"¨",dot:"˙",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",DownArrow:"↓",Downarrow:"⇓",downarrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",Dscr:"𝒟",dscr:"𝒹",DScy:"Ѕ",dscy:"ѕ",dsol:"⧶",Dstrok:"Đ",dstrok:"đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",DZcy:"Џ",dzcy:"џ",dzigrarr:"⟿",Eacute:"É",eacute:"é",easter:"⩮",Ecaron:"Ě",ecaron:"ě",ecir:"≖",Ecirc:"Ê",ecirc:"ê",ecolon:"≕",Ecy:"Э",ecy:"э",eDDot:"⩷",Edot:"Ė",eDot:"≑",edot:"ė",ee:"ⅇ",efDot:"≒",Efr:"𝔈",efr:"𝔢",eg:"⪚",Egrave:"È",egrave:"è",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",Emacr:"Ē",emacr:"ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",ENG:"Ŋ",eng:"ŋ",ensp:" ",Eogon:"Ę",eogon:"ę",Eopf:"𝔼",eopf:"𝕖",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",Epsilon:"Ε",epsilon:"ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",Escr:"ℰ",escr:"ℯ",esdot:"≐",Esim:"⩳",esim:"≂",Eta:"Η",eta:"η",ETH:"Ð",eth:"ð",Euml:"Ë",euml:"ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",ExponentialE:"ⅇ",exponentiale:"ⅇ",fallingdotseq:"≒",Fcy:"Ф",fcy:"ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",Ffr:"𝔉",ffr:"𝔣",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",Fopf:"𝔽",fopf:"𝕗",ForAll:"∀",forall:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",Fscr:"ℱ",fscr:"𝒻",gacute:"ǵ",Gamma:"Γ",gamma:"γ",Gammad:"Ϝ",gammad:"ϝ",gap:"⪆",Gbreve:"Ğ",gbreve:"ğ",Gcedil:"Ģ",Gcirc:"Ĝ",gcirc:"ĝ",Gcy:"Г",gcy:"г",Gdot:"Ġ",gdot:"ġ",gE:"≧",ge:"≥",gEl:"⪌",gel:"⋛",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",Gfr:"𝔊",gfr:"𝔤",Gg:"⋙",gg:"≫",ggg:"⋙",gimel:"ℷ",GJcy:"Ѓ",gjcy:"ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gnE:"≩",gne:"⪈",gneq:"⪈",gneqq:"≩",gnsim:"⋧",Gopf:"𝔾",gopf:"𝕘",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",Gscr:"𝒢",gscr:"ℊ",gsim:"≳",gsime:"⪎",gsiml:"⪐",Gt:"≫",GT:">",gt:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",HARDcy:"Ъ",hardcy:"ъ",hArr:"⇔",harr:"↔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",Hcirc:"Ĥ",hcirc:"ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",Hfr:"ℌ",hfr:"𝔥",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",Hopf:"ℍ",hopf:"𝕙",horbar:"―",HorizontalLine:"─",Hscr:"ℋ",hscr:"𝒽",hslash:"ℏ",Hstrok:"Ħ",hstrok:"ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",Iacute:"Í",iacute:"í",ic:"⁣",Icirc:"Î",icirc:"î",Icy:"И",icy:"и",Idot:"İ",IEcy:"Е",iecy:"е",iexcl:"¡",iff:"⇔",Ifr:"ℑ",ifr:"𝔦",Igrave:"Ì",igrave:"ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",IJlig:"IJ",ijlig:"ij",Im:"ℑ",Imacr:"Ī",imacr:"ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",Int:"∬",int:"∫",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",IOcy:"Ё",iocy:"ё",Iogon:"Į",iogon:"į",Iopf:"𝕀",iopf:"𝕚",Iota:"Ι",iota:"ι",iprod:"⨼",iquest:"¿",Iscr:"ℐ",iscr:"𝒾",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",Itilde:"Ĩ",itilde:"ĩ",Iukcy:"І",iukcy:"і",Iuml:"Ï",iuml:"ï",Jcirc:"Ĵ",jcirc:"ĵ",Jcy:"Й",jcy:"й",Jfr:"𝔍",jfr:"𝔧",jmath:"ȷ",Jopf:"𝕁",jopf:"𝕛",Jscr:"𝒥",jscr:"𝒿",Jsercy:"Ј",jsercy:"ј",Jukcy:"Є",jukcy:"є",Kappa:"Κ",kappa:"κ",kappav:"ϰ",Kcedil:"Ķ",kcedil:"ķ",Kcy:"К",kcy:"к",Kfr:"𝔎",kfr:"𝔨",kgreen:"ĸ",KHcy:"Х",khcy:"х",KJcy:"Ќ",kjcy:"ќ",Kopf:"𝕂",kopf:"𝕜",Kscr:"𝒦",kscr:"𝓀",lAarr:"⇚",Lacute:"Ĺ",lacute:"ĺ",laemptyv:"⦴",lagran:"ℒ",Lambda:"Λ",lambda:"λ",Lang:"⟪",lang:"⟨",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",Larr:"↞",lArr:"⇐",larr:"←",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",lAtail:"⤛",latail:"⤙",late:"⪭",lates:"⪭︀",lBarr:"⤎",lbarr:"⤌",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",Lcaron:"Ľ",lcaron:"ľ",Lcedil:"Ļ",lcedil:"ļ",lceil:"⌈",lcub:"{",Lcy:"Л",lcy:"л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",lE:"≦",le:"≤",LeftAngleBracket:"⟨",LeftArrow:"←",Leftarrow:"⇐",leftarrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",LeftRightArrow:"↔",Leftrightarrow:"⇔",leftrightarrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",lEg:"⪋",leg:"⋚",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",Lfr:"𝔏",lfr:"𝔩",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",LJcy:"Љ",ljcy:"љ",Ll:"⋘",ll:"≪",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",Lmidot:"Ŀ",lmidot:"ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lnE:"≨",lne:"⪇",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",LongLeftArrow:"⟵",Longleftarrow:"⟸",longleftarrow:"⟵",LongLeftRightArrow:"⟷",Longleftrightarrow:"⟺",longleftrightarrow:"⟷",longmapsto:"⟼",LongRightArrow:"⟶",Longrightarrow:"⟹",longrightarrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",Lopf:"𝕃",lopf:"𝕝",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",Lscr:"ℒ",lscr:"𝓁",Lsh:"↰",lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",Lstrok:"Ł",lstrok:"ł",Lt:"≪",LT:"<",lt:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",Map:"⤅",map:"↦",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",Mcy:"М",mcy:"м",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",Mfr:"𝔐",mfr:"𝔪",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",Mopf:"𝕄",mopf:"𝕞",mp:"∓",Mscr:"ℳ",mscr:"𝓂",mstpos:"∾",Mu:"Μ",mu:"μ",multimap:"⊸",mumap:"⊸",nabla:"∇",Nacute:"Ń",nacute:"ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",Ncaron:"Ň",ncaron:"ň",Ncedil:"Ņ",ncedil:"ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",Ncy:"Н",ncy:"н",ndash:"–",ne:"≠",nearhk:"⤤",neArr:"⇗",nearr:"↗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:`
135
135
  `,nexist:"∄",nexists:"∄",Nfr:"𝔑",nfr:"𝔫",ngE:"≧̸",nge:"≱",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",nGt:"≫⃒",ngt:"≯",ngtr:"≯",nGtv:"≫̸",nhArr:"⇎",nharr:"↮",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",NJcy:"Њ",njcy:"њ",nlArr:"⇍",nlarr:"↚",nldr:"‥",nlE:"≦̸",nle:"≰",nLeftarrow:"⇍",nleftarrow:"↚",nLeftrightarrow:"⇎",nleftrightarrow:"↮",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nLt:"≪⃒",nlt:"≮",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",Nopf:"ℕ",nopf:"𝕟",Not:"⫬",not:"¬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrArr:"⇏",nrarr:"↛",nrarrc:"⤳̸",nrarrw:"↝̸",nRightarrow:"⇏",nrightarrow:"↛",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",Nscr:"𝒩",nscr:"𝓃",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsubE:"⫅̸",nsube:"⊈",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupE:"⫆̸",nsupe:"⊉",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",Ntilde:"Ñ",ntilde:"ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",Nu:"Ν",nu:"ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nVDash:"⊯",nVdash:"⊮",nvDash:"⊭",nvdash:"⊬",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwArr:"⇖",nwarr:"↖",nwarrow:"↖",nwnear:"⤧",Oacute:"Ó",oacute:"ó",oast:"⊛",ocir:"⊚",Ocirc:"Ô",ocirc:"ô",Ocy:"О",ocy:"о",odash:"⊝",Odblac:"Ő",odblac:"ő",odiv:"⨸",odot:"⊙",odsold:"⦼",OElig:"Œ",oelig:"œ",ofcir:"⦿",Ofr:"𝔒",ofr:"𝔬",ogon:"˛",Ograve:"Ò",ograve:"ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",Omacr:"Ō",omacr:"ō",Omega:"Ω",omega:"ω",Omicron:"Ο",omicron:"ο",omid:"⦶",ominus:"⊖",Oopf:"𝕆",oopf:"𝕠",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",Or:"⩔",or:"∨",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",Oscr:"𝒪",oscr:"ℴ",Oslash:"Ø",oslash:"ø",osol:"⊘",Otilde:"Õ",otilde:"õ",Otimes:"⨷",otimes:"⊗",otimesas:"⨶",Ouml:"Ö",ouml:"ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",Pcy:"П",pcy:"п",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",Pfr:"𝔓",pfr:"𝔭",Phi:"Φ",phi:"φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",Pi:"Π",pi:"π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",Popf:"ℙ",popf:"𝕡",pound:"£",Pr:"⪻",pr:"≺",prap:"⪷",prcue:"≼",prE:"⪳",pre:"⪯",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",Prime:"″",prime:"′",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",Pscr:"𝒫",pscr:"𝓅",Psi:"Ψ",psi:"ψ",puncsp:" ",Qfr:"𝔔",qfr:"𝔮",qint:"⨌",Qopf:"ℚ",qopf:"𝕢",qprime:"⁗",Qscr:"𝒬",qscr:"𝓆",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",QUOT:'"',quot:'"',rAarr:"⇛",race:"∽̱",Racute:"Ŕ",racute:"ŕ",radic:"√",raemptyv:"⦳",Rang:"⟫",rang:"⟩",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",Rarr:"↠",rArr:"⇒",rarr:"→",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",Rarrtl:"⤖",rarrtl:"↣",rarrw:"↝",rAtail:"⤜",ratail:"⤚",ratio:"∶",rationals:"ℚ",RBarr:"⤐",rBarr:"⤏",rbarr:"⤍",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",Rcaron:"Ř",rcaron:"ř",Rcedil:"Ŗ",rcedil:"ŗ",rceil:"⌉",rcub:"}",Rcy:"Р",rcy:"р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",REG:"®",reg:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",Rfr:"ℜ",rfr:"𝔯",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",Rho:"Ρ",rho:"ρ",rhov:"ϱ",RightAngleBracket:"⟩",RightArrow:"→",Rightarrow:"⇒",rightarrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",Ropf:"ℝ",ropf:"𝕣",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",Rscr:"ℛ",rscr:"𝓇",Rsh:"↱",rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",Sacute:"Ś",sacute:"ś",sbquo:"‚",Sc:"⪼",sc:"≻",scap:"⪸",Scaron:"Š",scaron:"š",sccue:"≽",scE:"⪴",sce:"⪰",Scedil:"Ş",scedil:"ş",Scirc:"Ŝ",scirc:"ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",Scy:"С",scy:"с",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",seArr:"⇘",searr:"↘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",Sfr:"𝔖",sfr:"𝔰",sfrown:"⌢",sharp:"♯",SHCHcy:"Щ",shchcy:"щ",SHcy:"Ш",shcy:"ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",Sigma:"Σ",sigma:"σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",SOFTcy:"Ь",softcy:"ь",sol:"/",solb:"⧄",solbar:"⌿",Sopf:"𝕊",sopf:"𝕤",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",Square:"□",square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",Sscr:"𝒮",sscr:"𝓈",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",Star:"⋆",star:"☆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",Sub:"⋐",sub:"⊂",subdot:"⪽",subE:"⫅",sube:"⊆",subedot:"⫃",submult:"⫁",subnE:"⫋",subne:"⊊",subplus:"⪿",subrarr:"⥹",Subset:"⋐",subset:"⊂",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",Sum:"∑",sum:"∑",sung:"♪",Sup:"⋑",sup:"⊃",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supE:"⫆",supe:"⊇",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supnE:"⫌",supne:"⊋",supplus:"⫀",Supset:"⋑",supset:"⊃",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swArr:"⇙",swarr:"↙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",Tau:"Τ",tau:"τ",tbrk:"⎴",Tcaron:"Ť",tcaron:"ť",Tcedil:"Ţ",tcedil:"ţ",Tcy:"Т",tcy:"т",tdot:"⃛",telrec:"⌕",Tfr:"𝔗",tfr:"𝔱",there4:"∴",Therefore:"∴",therefore:"∴",Theta:"Θ",theta:"θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",THORN:"Þ",thorn:"þ",Tilde:"∼",tilde:"˜",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",Topf:"𝕋",topf:"𝕥",topfork:"⫚",tosa:"⤩",tprime:"‴",TRADE:"™",trade:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",Tscr:"𝒯",tscr:"𝓉",TScy:"Ц",tscy:"ц",TSHcy:"Ћ",tshcy:"ћ",Tstrok:"Ŧ",tstrok:"ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",Uacute:"Ú",uacute:"ú",Uarr:"↟",uArr:"⇑",uarr:"↑",Uarrocir:"⥉",Ubrcy:"Ў",ubrcy:"ў",Ubreve:"Ŭ",ubreve:"ŭ",Ucirc:"Û",ucirc:"û",Ucy:"У",ucy:"у",udarr:"⇅",Udblac:"Ű",udblac:"ű",udhar:"⥮",ufisht:"⥾",Ufr:"𝔘",ufr:"𝔲",Ugrave:"Ù",ugrave:"ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",Umacr:"Ū",umacr:"ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",Uogon:"Ų",uogon:"ų",Uopf:"𝕌",uopf:"𝕦",UpArrow:"↑",Uparrow:"⇑",uparrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",UpDownArrow:"↕",Updownarrow:"⇕",updownarrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",Upsi:"ϒ",upsi:"υ",upsih:"ϒ",Upsilon:"Υ",upsilon:"υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",Uring:"Ů",uring:"ů",urtri:"◹",Uscr:"𝒰",uscr:"𝓊",utdot:"⋰",Utilde:"Ũ",utilde:"ũ",utri:"▵",utrif:"▴",uuarr:"⇈",Uuml:"Ü",uuml:"ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",vArr:"⇕",varr:"↕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",Vbar:"⫫",vBar:"⫨",vBarv:"⫩",Vcy:"В",vcy:"в",VDash:"⊫",Vdash:"⊩",vDash:"⊨",vdash:"⊢",Vdashl:"⫦",Vee:"⋁",vee:"∨",veebar:"⊻",veeeq:"≚",vellip:"⋮",Verbar:"‖",verbar:"|",Vert:"‖",vert:"|",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",Vfr:"𝔙",vfr:"𝔳",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",Vopf:"𝕍",vopf:"𝕧",vprop:"∝",vrtri:"⊳",Vscr:"𝒱",vscr:"𝓋",vsubnE:"⫋︀",vsubne:"⊊︀",vsupnE:"⫌︀",vsupne:"⊋︀",Vvdash:"⊪",vzigzag:"⦚",Wcirc:"Ŵ",wcirc:"ŵ",wedbar:"⩟",Wedge:"⋀",wedge:"∧",wedgeq:"≙",weierp:"℘",Wfr:"𝔚",wfr:"𝔴",Wopf:"𝕎",wopf:"𝕨",wp:"℘",wr:"≀",wreath:"≀",Wscr:"𝒲",wscr:"𝓌",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",Xfr:"𝔛",xfr:"𝔵",xhArr:"⟺",xharr:"⟷",Xi:"Ξ",xi:"ξ",xlArr:"⟸",xlarr:"⟵",xmap:"⟼",xnis:"⋻",xodot:"⨀",Xopf:"𝕏",xopf:"𝕩",xoplus:"⨁",xotime:"⨂",xrArr:"⟹",xrarr:"⟶",Xscr:"𝒳",xscr:"𝓍",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",Yacute:"Ý",yacute:"ý",YAcy:"Я",yacy:"я",Ycirc:"Ŷ",ycirc:"ŷ",Ycy:"Ы",ycy:"ы",yen:"¥",Yfr:"𝔜",yfr:"𝔶",YIcy:"Ї",yicy:"ї",Yopf:"𝕐",yopf:"𝕪",Yscr:"𝒴",yscr:"𝓎",YUcy:"Ю",yucy:"ю",Yuml:"Ÿ",yuml:"ÿ",Zacute:"Ź",zacute:"ź",Zcaron:"Ž",zcaron:"ž",Zcy:"З",zcy:"з",Zdot:"Ż",zdot:"ż",zeetrf:"ℨ",ZeroWidthSpace:"​",Zeta:"Ζ",zeta:"ζ",Zfr:"ℨ",zfr:"𝔷",ZHcy:"Ж",zhcy:"ж",zigrarr:"⇝",Zopf:"ℤ",zopf:"𝕫",Zscr:"𝒵",zscr:"𝓏",zwj:"‍",zwnj:"‌"}),e.entityMap=e.HTML_ENTITIES})(entities)),entities}var sax={},hasRequiredSax;function requireSax(){if(hasRequiredSax)return sax;hasRequiredSax=1;var e=requireConventions().NAMESPACE,t=/[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,r=new RegExp("[\\-\\.0-9"+t.source.slice(1,-1)+"\\u00B7\\u0300-\\u036F\\u203F-\\u2040]"),s=new RegExp("^"+t.source+r.source+"*(?::"+t.source+r.source+"*)?$"),o=0,d=1,m=2,g=3,y=4,b=5,x=6,E=7;function C($,K){this.message=$,this.locator=K,Error.captureStackTrace&&Error.captureStackTrace(this,C)}C.prototype=new Error,C.prototype.name=C.name;function S(){}S.prototype={parse:function($,K,ee){var se=this.domBuilder;se.startDocument(),z(K,K={}),A($,K,ee,se,this.errorHandler),se.endDocument()}};function A($,K,ee,se,ie){function te(qe){if(qe>65535){qe-=65536;var Ve=55296+(qe>>10),mt=56320+(qe&1023);return String.fromCharCode(Ve,mt)}else return String.fromCharCode(qe)}function ue(qe){var Ve=qe.slice(1,-1);return Object.hasOwnProperty.call(ee,Ve)?ee[Ve]:Ve.charAt(0)==="#"?te(parseInt(Ve.substr(1).replace("x","0x"))):(ie.error("entity not found:"+qe),qe)}function le(qe){if(qe>pe){var Ve=$.substring(pe,qe).replace(/&#?\w+;/g,ue);Te&&fe(pe),se.characters(Ve,0,qe-pe),pe=qe}}function fe(qe,Ve){for(;qe>=xe&&(Ve=ce.exec($));)ve=Ve.index,xe=ve+Ve[0].length,Te.lineNumber++;Te.columnNumber=qe-ve+1}for(var ve=0,xe=0,ce=/.*(?:\r\n?|\n)|.*$/g,Te=se.locator,Ce=[{currentNSMap:K}],me={},pe=0;;){try{var Ee=$.indexOf("<",pe);if(Ee<0){if(!$.substr(pe).match(/^\s*$/)){var Ae=se.doc,Pe=Ae.createTextNode($.substr(pe));Ae.appendChild(Pe),se.currentElement=Pe}return}switch(Ee>pe&&le(Ee),$.charAt(Ee+1)){case"/":var Fe=$.indexOf(">",Ee+3),J=$.substring(Ee+2,Fe).replace(/[ \t\n\r]+$/g,""),Ue=Ce.pop();Fe<0?(J=$.substring(Ee+2).replace(/[\s<].*/,""),ie.error("end tag name: "+J+" is not complete:"+Ue.tagName),Fe=Ee+1+J.length):J.match(/\s</)&&(J=J.replace(/[\s<].*/,""),ie.error("end tag name: "+J+" maybe not complete"),Fe=Ee+1+J.length);var ye=Ue.localNSMap,de=Ue.tagName==J,q=de||Ue.tagName&&Ue.tagName.toLowerCase()==J.toLowerCase();if(q){if(se.endElement(Ue.uri,Ue.localName,J),ye)for(var Re in ye)Object.prototype.hasOwnProperty.call(ye,Re)&&se.endPrefixMapping(Re);de||ie.fatalError("end tag name: "+J+" is not match the current start tagName:"+Ue.tagName)}else Ce.push(Ue);Fe++;break;case"?":Te&&fe(Ee),Fe=Y($,Ee,se);break;case"!":Te&&fe(Ee),Fe=V($,Ee,se,ie);break;default:Te&&fe(Ee);var Oe=new X,je=Ce[Ce.length-1].currentNSMap,Fe=k($,Ee,Oe,je,ue,ie),it=Oe.length;if(!Oe.closed&&M($,Fe,Oe.tagName,me)&&(Oe.closed=!0,ee.nbsp||ie.warning("unclosed xml attribute")),Te&&it){for(var dt=N(Te,{}),he=0;he<it;he++){var st=Oe[he];fe(st.offset),st.locator=N(Te,{})}se.locator=dt,L(Oe,se,je)&&Ce.push(Oe),se.locator=Te}else L(Oe,se,je)&&Ce.push(Oe);e.isHTML(Oe.uri)&&!Oe.closed?Fe=G($,Fe,Oe.tagName,ue,se):Fe++}}catch(qe){if(qe instanceof C)throw qe;ie.error("element parse error: "+qe),Fe=-1}Fe>pe?pe=Fe:le(Math.max(Ee,pe)+1)}}function N($,K){return K.lineNumber=$.lineNumber,K.columnNumber=$.columnNumber,K}function k($,K,ee,se,ie,te){function ue(Te,Ce,me){ee.attributeNames.hasOwnProperty(Te)&&te.fatalError("Attribute "+Te+" redefined"),ee.addValue(Te,Ce.replace(/[\t\n\r]/g," ").replace(/&#?\w+;/g,ie),me)}for(var le,fe,ve=++K,xe=o;;){var ce=$.charAt(ve);switch(ce){case"=":if(xe===d)le=$.slice(K,ve),xe=g;else if(xe===m)xe=g;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(xe===g||xe===d)if(xe===d&&(te.warning('attribute value must after "="'),le=$.slice(K,ve)),K=ve+1,ve=$.indexOf(ce,K),ve>0)fe=$.slice(K,ve),ue(le,fe,K-1),xe=b;else throw new Error("attribute value no end '"+ce+"' match");else if(xe==y)fe=$.slice(K,ve),ue(le,fe,K),te.warning('attribute "'+le+'" missed start quot('+ce+")!!"),K=ve+1,xe=b;else throw new Error('attribute value must after "="');break;case"/":switch(xe){case o:ee.setTagName($.slice(K,ve));case b:case x:case E:xe=E,ee.closed=!0;case y:case d:break;case m:ee.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return te.error("unexpected end of input"),xe==o&&ee.setTagName($.slice(K,ve)),ve;case">":switch(xe){case o:ee.setTagName($.slice(K,ve));case b:case x:case E:break;case y:case d:fe=$.slice(K,ve),fe.slice(-1)==="/"&&(ee.closed=!0,fe=fe.slice(0,-1));case m:xe===m&&(fe=le),xe==y?(te.warning('attribute "'+fe+'" missed quot(")!'),ue(le,fe,K)):((!e.isHTML(se[""])||!fe.match(/^(?:disabled|checked|selected)$/i))&&te.warning('attribute "'+fe+'" missed value!! "'+fe+'" instead!!'),ue(fe,fe,K));break;case g:throw new Error("attribute value missed!!")}return ve;case"€":ce=" ";default:if(ce<=" ")switch(xe){case o:ee.setTagName($.slice(K,ve)),xe=x;break;case d:le=$.slice(K,ve),xe=m;break;case y:var fe=$.slice(K,ve);te.warning('attribute "'+fe+'" missed quot(")!!'),ue(le,fe,K);case b:xe=x;break}else switch(xe){case m:ee.tagName,(!e.isHTML(se[""])||!le.match(/^(?:disabled|checked|selected)$/i))&&te.warning('attribute "'+le+'" missed value!! "'+le+'" instead2!!'),ue(le,le,K),K=ve,xe=d;break;case b:te.warning('attribute space is required"'+le+'"!!');case x:xe=d,K=ve;break;case g:xe=y,K=ve;break;case E:throw new Error("elements closed character '/' and '>' must be connected to")}}ve++}}function L($,K,ee){for(var se=$.tagName,ie=null,ce=$.length;ce--;){var te=$[ce],ue=te.qName,le=te.value,Te=ue.indexOf(":");if(Te>0)var fe=te.prefix=ue.slice(0,Te),ve=ue.slice(Te+1),xe=fe==="xmlns"&&ve;else ve=ue,fe=null,xe=ue==="xmlns"&&"";te.localName=ve,xe!==!1&&(ie==null&&(ie={},z(ee,ee={})),ee[xe]=ie[xe]=le,te.uri=e.XMLNS,K.startPrefixMapping(xe,le))}for(var ce=$.length;ce--;){te=$[ce];var fe=te.prefix;fe&&(fe==="xml"&&(te.uri=e.XML),fe!=="xmlns"&&(te.uri=ee[fe||""]))}var Te=se.indexOf(":");Te>0?(fe=$.prefix=se.slice(0,Te),ve=$.localName=se.slice(Te+1)):(fe=null,ve=$.localName=se);var Ce=$.uri=ee[fe||""];if(K.startElement(Ce,ve,se,$),$.closed){if(K.endElement(Ce,ve,se),ie)for(fe in ie)Object.prototype.hasOwnProperty.call(ie,fe)&&K.endPrefixMapping(fe)}else return $.currentNSMap=ee,$.localNSMap=ie,!0}function G($,K,ee,se,ie){if(/^(?:script|textarea)$/i.test(ee)){var te=$.indexOf("</"+ee+">",K),ue=$.substring(K+1,te);if(/[&<]/.test(ue))return/^script$/i.test(ee)?(ie.characters(ue,0,ue.length),te):(ue=ue.replace(/&#?\w+;/g,se),ie.characters(ue,0,ue.length),te)}return K+1}function M($,K,ee,se){var ie=se[ee];return ie==null&&(ie=$.lastIndexOf("</"+ee+">"),ie<K&&(ie=$.lastIndexOf("</"+ee)),se[ee]=ie),ie<K}function z($,K){for(var ee in $)Object.prototype.hasOwnProperty.call($,ee)&&(K[ee]=$[ee])}function V($,K,ee,se){var ie=$.charAt(K+2);switch(ie){case"-":if($.charAt(K+3)==="-"){var te=$.indexOf("-->",K+4);return te>K?(ee.comment($,K+4,te-K-4),te+3):(se.error("Unclosed comment"),-1)}else return-1;default:if($.substr(K+3,6)=="CDATA["){var te=$.indexOf("]]>",K+9);return ee.startCDATA(),ee.characters($,K+9,te-K-9),ee.endCDATA(),te+3}var ue=Q($,K),le=ue.length;if(le>1&&/!doctype/i.test(ue[0][0])){var fe=ue[1][0],ve=!1,xe=!1;le>3&&(/^public$/i.test(ue[2][0])?(ve=ue[3][0],xe=le>4&&ue[4][0]):/^system$/i.test(ue[2][0])&&(xe=ue[3][0]));var ce=ue[le-1];return ee.startDTD(fe,ve,xe),ee.endDTD(),ce.index+ce[0].length}}return-1}function Y($,K,ee){var se=$.indexOf("?>",K);if(se){var ie=$.substring(K,se).match(/^<\?(\S*)\s*([\s\S]*?)$/);return ie?(ie[0].length,ee.processingInstruction(ie[1],ie[2]),se+2):-1}return-1}function X(){this.attributeNames={}}X.prototype={setTagName:function($){if(!s.test($))throw new Error("invalid tagName:"+$);this.tagName=$},addValue:function($,K,ee){if(!s.test($))throw new Error("invalid attribute:"+$);this.attributeNames[$]=this.length,this[this.length++]={qName:$,value:K,offset:ee}},length:0,getLocalName:function($){return this[$].localName},getLocator:function($){return this[$].locator},getQName:function($){return this[$].qName},getURI:function($){return this[$].uri},getValue:function($){return this[$].value}};function Q($,K){var ee,se=[],ie=/'[^']+'|"[^"]+"|[^\s<>\/=]+=?|(\/?\s*>|<)/g;for(ie.lastIndex=K,ie.exec($);ee=ie.exec($);)if(se.push(ee),ee[1])return se}return sax.XMLReader=S,sax.ParseError=C,sax}var hasRequiredDomParser;function requireDomParser(){if(hasRequiredDomParser)return domParser;hasRequiredDomParser=1;var e=requireConventions(),t=requireDom(),r=requireEntities(),s=requireSax(),o=t.DOMImplementation,d=e.NAMESPACE,m=s.ParseError,g=s.XMLReader;function y(k){return k.replace(/\r[\n\u0085]/g,`
136
136
  `).replace(/[\r\u0085\u2028]/g,`
137
137
  `)}function b(k){this.options=k||{locator:{}}}b.prototype.parseFromString=function(k,L){var G=this.options,M=new g,z=G.domBuilder||new E,V=G.errorHandler,Y=G.locator,X=G.xmlns||{},Q=/\/x?html?$/.test(L),$=Q?r.HTML_ENTITIES:r.XML_ENTITIES;Y&&z.setDocumentLocator(Y),M.errorHandler=x(V,z,Y),M.domBuilder=G.domBuilder||z,Q&&(X[""]=d.HTML),X.xml=X.xml||d.XML;var K=G.normalizeLineEndings||y;return k&&typeof k=="string"?M.parse(K(k),X,$):M.errorHandler.error("invalid doc source"),z.doc};function x(k,L,G){if(!k){if(L instanceof E)return L;k=L}var M={},z=k instanceof Function;G=G||{};function V(Y){var X=k[Y];!X&&z&&(X=k.length==2?function(Q){k(Y,Q)}:k),M[Y]=X&&function(Q){X("[xmldom "+Y+"] "+Q+S(G))}||function(){}}return V("warning"),V("error"),V("fatalError"),M}function E(){this.cdata=!1}function C(k,L){L.lineNumber=k.lineNumber,L.columnNumber=k.columnNumber}E.prototype={startDocument:function(){this.doc=new o().createDocument(null,null,null),this.locator&&(this.doc.documentURI=this.locator.systemId)},startElement:function(k,L,G,M){var z=this.doc,V=z.createElementNS(k,G||L),Y=M.length;N(this,V),this.currentElement=V,this.locator&&C(this.locator,V);for(var X=0;X<Y;X++){var k=M.getURI(X),Q=M.getValue(X),G=M.getQName(X),$=z.createAttributeNS(k,G);this.locator&&C(M.getLocator(X),$),$.value=$.nodeValue=Q,V.setAttributeNode($)}},endElement:function(k,L,G){var M=this.currentElement;M.tagName,this.currentElement=M.parentNode},startPrefixMapping:function(k,L){},endPrefixMapping:function(k){},processingInstruction:function(k,L){var G=this.doc.createProcessingInstruction(k,L);this.locator&&C(this.locator,G),N(this,G)},ignorableWhitespace:function(k,L,G){},characters:function(k,L,G){if(k=A.apply(this,arguments),k){if(this.cdata)var M=this.doc.createCDATASection(k);else var M=this.doc.createTextNode(k);this.currentElement?this.currentElement.appendChild(M):/^\s*$/.test(k)&&this.doc.appendChild(M),this.locator&&C(this.locator,M)}},skippedEntity:function(k){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(k){(this.locator=k)&&(k.lineNumber=0)},comment:function(k,L,G){k=A.apply(this,arguments);var M=this.doc.createComment(k);this.locator&&C(this.locator,M),N(this,M)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(k,L,G){var M=this.doc.implementation;if(M&&M.createDocumentType){var z=M.createDocumentType(k,L,G);this.locator&&C(this.locator,z),N(this,z),this.doc.doctype=z}},warning:function(k){console.warn("[xmldom warning] "+k,S(this.locator))},error:function(k){console.error("[xmldom error] "+k,S(this.locator))},fatalError:function(k){throw new m(k,this.locator)}};function S(k){if(k)return`
@@ -140,7 +140,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
140
140
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function _toConsumableArray(e){return _arrayWithoutHoles(e)||_iterableToArray(e)||_unsupportedIterableToArray(e)||_nonIterableSpread()}function sheetForTag(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function createStyleElement(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),e.nonce!==void 0&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}var StyleSheet=(function(){function e(r){var s=this;this._insertTag=function(o){var d;s.tags.length===0?s.insertionPoint?d=s.insertionPoint.nextSibling:s.prepend?d=s.container.firstChild:d=s.before:d=s.tags[s.tags.length-1].nextSibling,s.container.insertBefore(o,d),s.tags.push(o)},this.isSpeedy=r.speedy===void 0?!0:r.speedy,this.tags=[],this.ctr=0,this.nonce=r.nonce,this.key=r.key,this.container=r.container,this.prepend=r.prepend,this.insertionPoint=r.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(s){s.forEach(this._insertTag)},t.insert=function(s){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(createStyleElement(this));var o=this.tags[this.tags.length-1];if(this.isSpeedy){var d=sheetForTag(o);try{d.insertRule(s,d.cssRules.length)}catch{}}else o.appendChild(document.createTextNode(s));this.ctr++},t.flush=function(){this.tags.forEach(function(s){var o;return(o=s.parentNode)==null?void 0:o.removeChild(s)}),this.tags=[],this.ctr=0},e})(),MS="-ms-",MOZ="-moz-",WEBKIT="-webkit-",COMMENT="comm",RULESET="rule",DECLARATION="decl",IMPORT="@import",KEYFRAMES="@keyframes",LAYER="@layer",abs=Math.abs,from=String.fromCharCode,assign$2=Object.assign;function hash(e,t){return charat(e,0)^45?(((t<<2^charat(e,0))<<2^charat(e,1))<<2^charat(e,2))<<2^charat(e,3):0}function trim(e){return e.trim()}function match(e,t){return(e=t.exec(e))?e[0]:e}function replace$1(e,t,r){return e.replace(t,r)}function indexof(e,t){return e.indexOf(t)}function charat(e,t){return e.charCodeAt(t)|0}function substr(e,t,r){return e.slice(t,r)}function strlen(e){return e.length}function sizeof(e){return e.length}function append(e,t){return t.push(e),e}function combine(e,t){return e.map(t).join("")}var line=1,column=1,length=0,position=0,character=0,characters="";function node(e,t,r,s,o,d,m){return{value:e,root:t,parent:r,type:s,props:o,children:d,line,column,length:m,return:""}}function copy(e,t){return assign$2(node("",null,null,"",null,null,0),e,{length:-e.length},t)}function char(){return character}function prev(){return character=position>0?charat(characters,--position):0,column--,character===10&&(column=1,line--),character}function next(){return character=position<length?charat(characters,position++):0,column++,character===10&&(column=1,line++),character}function peek(){return charat(characters,position)}function caret(){return position}function slice(e,t){return substr(characters,e,t)}function token(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function alloc(e){return line=column=1,length=strlen(characters=e),position=0,[]}function dealloc(e){return characters="",e}function delimit(e){return trim(slice(position-1,delimiter$1(e===91?e+2:e===40?e+1:e)))}function whitespace(e){for(;(character=peek())&&character<33;)next();return token(e)>2||token(character)>3?"":" "}function escaping(e,t){for(;--t&&next()&&!(character<48||character>102||character>57&&character<65||character>70&&character<97););return slice(e,caret()+(t<6&&peek()==32&&next()==32))}function delimiter$1(e){for(;next();)switch(character){case e:return position;case 34:case 39:e!==34&&e!==39&&delimiter$1(character);break;case 40:e===41&&delimiter$1(e);break;case 92:next();break}return position}function commenter(e,t){for(;next()&&e+character!==57;)if(e+character===84&&peek()===47)break;return"/*"+slice(t,position-1)+"*"+from(e===47?e:next())}function identifier(e){for(;!token(peek());)next();return slice(e,position)}function compile$1(e){return dealloc(parse("",null,null,null,[""],e=alloc(e),0,[0],e))}function parse(e,t,r,s,o,d,m,g,y){for(var b=0,x=0,E=m,C=0,S=0,A=0,N=1,k=1,L=1,G=0,M="",z=o,V=d,Y=s,X=M;k;)switch(A=G,G=next()){case 40:if(A!=108&&charat(X,E-1)==58){indexof(X+=replace$1(delimit(G),"&","&\f"),"&\f")!=-1&&(L=-1);break}case 34:case 39:case 91:X+=delimit(G);break;case 9:case 10:case 13:case 32:X+=whitespace(A);break;case 92:X+=escaping(caret()-1,7);continue;case 47:switch(peek()){case 42:case 47:append(comment$1(commenter(next(),caret()),t,r),y);break;default:X+="/"}break;case 123*N:g[b++]=strlen(X)*L;case 125*N:case 59:case 0:switch(G){case 0:case 125:k=0;case 59+x:L==-1&&(X=replace$1(X,/\f/g,"")),S>0&&strlen(X)-E&&append(S>32?declaration$1(X+";",s,r,E-1):declaration$1(replace$1(X," ","")+";",s,r,E-2),y);break;case 59:X+=";";default:if(append(Y=ruleset(X,t,r,b,x,o,g,M,z=[],V=[],E),d),G===123)if(x===0)parse(X,t,Y,Y,z,d,E,g,V);else switch(C===99&&charat(X,3)===110?100:C){case 100:case 108:case 109:case 115:parse(e,Y,Y,s&&append(ruleset(e,Y,Y,0,0,o,g,M,o,z=[],E),V),o,V,E,g,s?z:V);break;default:parse(X,Y,Y,Y,[""],V,0,g,V)}}b=x=S=0,N=L=1,M=X="",E=m;break;case 58:E=1+strlen(X),S=A;default:if(N<1){if(G==123)--N;else if(G==125&&N++==0&&prev()==125)continue}switch(X+=from(G),G*N){case 38:L=x>0?1:(X+="\f",-1);break;case 44:g[b++]=(strlen(X)-1)*L,L=1;break;case 64:peek()===45&&(X+=delimit(next())),C=peek(),x=E=strlen(M=X+=identifier(caret())),G++;break;case 45:A===45&&strlen(X)==2&&(N=0)}}return d}function ruleset(e,t,r,s,o,d,m,g,y,b,x){for(var E=o-1,C=o===0?d:[""],S=sizeof(C),A=0,N=0,k=0;A<s;++A)for(var L=0,G=substr(e,E+1,E=abs(N=m[A])),M=e;L<S;++L)(M=trim(N>0?C[L]+" "+G:replace$1(G,/&\f/g,C[L])))&&(y[k++]=M);return node(e,t,r,o===0?RULESET:g,y,b,x)}function comment$1(e,t,r){return node(e,t,r,COMMENT,from(char()),substr(e,2,-2),0)}function declaration$1(e,t,r,s){return node(e,t,r,DECLARATION,substr(e,0,s),substr(e,s+1,-1),s)}function serialize(e,t){for(var r="",s=sizeof(e),o=0;o<s;o++)r+=t(e[o],o,e,t)||"";return r}function stringify(e,t,r,s){switch(e.type){case LAYER:if(e.children.length)break;case IMPORT:case DECLARATION:return e.return=e.return||e.value;case COMMENT:return"";case KEYFRAMES:return e.return=e.value+"{"+serialize(e.children,s)+"}";case RULESET:e.value=e.props.join(",")}return strlen(r=serialize(e.children,s))?e.return=e.value+"{"+r+"}":""}function middleware(e){var t=sizeof(e);return function(r,s,o,d){for(var m="",g=0;g<t;g++)m+=e[g](r,s,o,d)||"";return m}}function rulesheet(e){return function(t){t.root||(t=t.return)&&e(t)}}function memoize(e){var t=Object.create(null);return function(r){return t[r]===void 0&&(t[r]=e(r)),t[r]}}var identifierWithPointTracking=function e(t,r,s){for(var o=0,d=0;o=d,d=peek(),o===38&&d===12&&(r[s]=1),!token(d);)next();return slice(t,position)},toRules=function e(t,r){var s=-1,o=44;do switch(token(o)){case 0:o===38&&peek()===12&&(r[s]=1),t[s]+=identifierWithPointTracking(position-1,r,s);break;case 2:t[s]+=delimit(o);break;case 4:if(o===44){t[++s]=peek()===58?"&\f":"",r[s]=t[s].length;break}default:t[s]+=from(o)}while(o=next());return t},getRules=function e(t,r){return dealloc(toRules(alloc(t),r))},fixedElements=new WeakMap,compat=function e(t){if(!(t.type!=="rule"||!t.parent||t.length<1)){for(var r=t.value,s=t.parent,o=t.column===s.column&&t.line===s.line;s.type!=="rule";)if(s=s.parent,!s)return;if(!(t.props.length===1&&r.charCodeAt(0)!==58&&!fixedElements.get(s))&&!o){fixedElements.set(t,!0);for(var d=[],m=getRules(r,d),g=s.props,y=0,b=0;y<m.length;y++)for(var x=0;x<g.length;x++,b++)t.props[b]=d[y]?m[y].replace(/&\f/g,g[x]):g[x]+" "+m[y]}}},removeLabel=function e(t){if(t.type==="decl"){var r=t.value;r.charCodeAt(0)===108&&r.charCodeAt(2)===98&&(t.return="",t.value="")}};function prefix(e,t){switch(hash(e,t)){case 5103:return WEBKIT+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return WEBKIT+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return WEBKIT+e+MOZ+e+MS+e+e;case 6828:case 4268:return WEBKIT+e+MS+e+e;case 6165:return WEBKIT+e+MS+"flex-"+e+e;case 5187:return WEBKIT+e+replace$1(e,/(\w+).+(:[^]+)/,WEBKIT+"box-$1$2"+MS+"flex-$1$2")+e;case 5443:return WEBKIT+e+MS+"flex-item-"+replace$1(e,/flex-|-self/,"")+e;case 4675:return WEBKIT+e+MS+"flex-line-pack"+replace$1(e,/align-content|flex-|-self/,"")+e;case 5548:return WEBKIT+e+MS+replace$1(e,"shrink","negative")+e;case 5292:return WEBKIT+e+MS+replace$1(e,"basis","preferred-size")+e;case 6060:return WEBKIT+"box-"+replace$1(e,"-grow","")+WEBKIT+e+MS+replace$1(e,"grow","positive")+e;case 4554:return WEBKIT+replace$1(e,/([^-])(transform)/g,"$1"+WEBKIT+"$2")+e;case 6187:return replace$1(replace$1(replace$1(e,/(zoom-|grab)/,WEBKIT+"$1"),/(image-set)/,WEBKIT+"$1"),e,"")+e;case 5495:case 3959:return replace$1(e,/(image-set\([^]*)/,WEBKIT+"$1$`$1");case 4968:return replace$1(replace$1(e,/(.+:)(flex-)?(.*)/,WEBKIT+"box-pack:$3"+MS+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+WEBKIT+e+e;case 4095:case 3583:case 4068:case 2532:return replace$1(e,/(.+)-inline(.+)/,WEBKIT+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(strlen(e)-1-t>6)switch(charat(e,t+1)){case 109:if(charat(e,t+4)!==45)break;case 102:return replace$1(e,/(.+:)(.+)-([^]+)/,"$1"+WEBKIT+"$2-$3$1"+MOZ+(charat(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~indexof(e,"stretch")?prefix(replace$1(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(charat(e,t+1)!==115)break;case 6444:switch(charat(e,strlen(e)-3-(~indexof(e,"!important")&&10))){case 107:return replace$1(e,":",":"+WEBKIT)+e;case 101:return replace$1(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+WEBKIT+(charat(e,14)===45?"inline-":"")+"box$3$1"+WEBKIT+"$2$3$1"+MS+"$2box$3")+e}break;case 5936:switch(charat(e,t+11)){case 114:return WEBKIT+e+MS+replace$1(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return WEBKIT+e+MS+replace$1(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return WEBKIT+e+MS+replace$1(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return WEBKIT+e+MS+e+e}return e}var prefixer=function e(t,r,s,o){if(t.length>-1&&!t.return)switch(t.type){case DECLARATION:t.return=prefix(t.value,t.length);break;case KEYFRAMES:return serialize([copy(t,{value:replace$1(t.value,"@","@"+WEBKIT)})],o);case RULESET:if(t.length)return combine(t.props,function(d){switch(match(d,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return serialize([copy(t,{props:[replace$1(d,/:(read-\w+)/,":"+MOZ+"$1")]})],o);case"::placeholder":return serialize([copy(t,{props:[replace$1(d,/:(plac\w+)/,":"+WEBKIT+"input-$1")]}),copy(t,{props:[replace$1(d,/:(plac\w+)/,":"+MOZ+"$1")]}),copy(t,{props:[replace$1(d,/:(plac\w+)/,MS+"input-$1")]})],o)}return""})}},defaultStylisPlugins=[prefixer],createCache=function e(t){var r=t.key;if(r==="css"){var s=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(s,function(N){var k=N.getAttribute("data-emotion");k.indexOf(" ")!==-1&&(document.head.appendChild(N),N.setAttribute("data-s",""))})}var o=t.stylisPlugins||defaultStylisPlugins,d={},m,g=[];m=t.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+r+' "]'),function(N){for(var k=N.getAttribute("data-emotion").split(" "),L=1;L<k.length;L++)d[k[L]]=!0;g.push(N)});var y,b=[compat,removeLabel];{var x,E=[stringify,rulesheet(function(N){x.insert(N)})],C=middleware(b.concat(o,E)),S=function(k){return serialize(compile$1(k),C)};y=function(k,L,G,M){x=G,S(k?k+"{"+L.styles+"}":L.styles),M&&(A.inserted[L.name]=!0)}}var A={key:r,sheet:new StyleSheet({key:r,container:m,nonce:t.nonce,speedy:t.speedy,prepend:t.prepend,insertionPoint:t.insertionPoint}),nonce:t.nonce,inserted:d,registered:{},insert:y};return A.sheet.hydrate(g),A},reactIs={exports:{}},reactIs_production_min={};var hasRequiredReactIs_production_min;function requireReactIs_production_min(){if(hasRequiredReactIs_production_min)return reactIs_production_min;hasRequiredReactIs_production_min=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,s=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,d=e?Symbol.for("react.profiler"):60114,m=e?Symbol.for("react.provider"):60109,g=e?Symbol.for("react.context"):60110,y=e?Symbol.for("react.async_mode"):60111,b=e?Symbol.for("react.concurrent_mode"):60111,x=e?Symbol.for("react.forward_ref"):60112,E=e?Symbol.for("react.suspense"):60113,C=e?Symbol.for("react.suspense_list"):60120,S=e?Symbol.for("react.memo"):60115,A=e?Symbol.for("react.lazy"):60116,N=e?Symbol.for("react.block"):60121,k=e?Symbol.for("react.fundamental"):60117,L=e?Symbol.for("react.responder"):60118,G=e?Symbol.for("react.scope"):60119;function M(V){if(typeof V=="object"&&V!==null){var Y=V.$$typeof;switch(Y){case t:switch(V=V.type,V){case y:case b:case s:case d:case o:case E:return V;default:switch(V=V&&V.$$typeof,V){case g:case x:case A:case S:case m:return V;default:return Y}}case r:return Y}}}function z(V){return M(V)===b}return reactIs_production_min.AsyncMode=y,reactIs_production_min.ConcurrentMode=b,reactIs_production_min.ContextConsumer=g,reactIs_production_min.ContextProvider=m,reactIs_production_min.Element=t,reactIs_production_min.ForwardRef=x,reactIs_production_min.Fragment=s,reactIs_production_min.Lazy=A,reactIs_production_min.Memo=S,reactIs_production_min.Portal=r,reactIs_production_min.Profiler=d,reactIs_production_min.StrictMode=o,reactIs_production_min.Suspense=E,reactIs_production_min.isAsyncMode=function(V){return z(V)||M(V)===y},reactIs_production_min.isConcurrentMode=z,reactIs_production_min.isContextConsumer=function(V){return M(V)===g},reactIs_production_min.isContextProvider=function(V){return M(V)===m},reactIs_production_min.isElement=function(V){return typeof V=="object"&&V!==null&&V.$$typeof===t},reactIs_production_min.isForwardRef=function(V){return M(V)===x},reactIs_production_min.isFragment=function(V){return M(V)===s},reactIs_production_min.isLazy=function(V){return M(V)===A},reactIs_production_min.isMemo=function(V){return M(V)===S},reactIs_production_min.isPortal=function(V){return M(V)===r},reactIs_production_min.isProfiler=function(V){return M(V)===d},reactIs_production_min.isStrictMode=function(V){return M(V)===o},reactIs_production_min.isSuspense=function(V){return M(V)===E},reactIs_production_min.isValidElementType=function(V){return typeof V=="string"||typeof V=="function"||V===s||V===b||V===d||V===o||V===E||V===C||typeof V=="object"&&V!==null&&(V.$$typeof===A||V.$$typeof===S||V.$$typeof===m||V.$$typeof===g||V.$$typeof===x||V.$$typeof===k||V.$$typeof===L||V.$$typeof===G||V.$$typeof===N)},reactIs_production_min.typeOf=M,reactIs_production_min}var reactIs_development={},hasRequiredReactIs_development;function requireReactIs_development(){return hasRequiredReactIs_development||(hasRequiredReactIs_development=1,process$1.env.NODE_ENV!=="production"&&(function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,r=e?Symbol.for("react.portal"):60106,s=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,d=e?Symbol.for("react.profiler"):60114,m=e?Symbol.for("react.provider"):60109,g=e?Symbol.for("react.context"):60110,y=e?Symbol.for("react.async_mode"):60111,b=e?Symbol.for("react.concurrent_mode"):60111,x=e?Symbol.for("react.forward_ref"):60112,E=e?Symbol.for("react.suspense"):60113,C=e?Symbol.for("react.suspense_list"):60120,S=e?Symbol.for("react.memo"):60115,A=e?Symbol.for("react.lazy"):60116,N=e?Symbol.for("react.block"):60121,k=e?Symbol.for("react.fundamental"):60117,L=e?Symbol.for("react.responder"):60118,G=e?Symbol.for("react.scope"):60119;function M(q){return typeof q=="string"||typeof q=="function"||q===s||q===b||q===d||q===o||q===E||q===C||typeof q=="object"&&q!==null&&(q.$$typeof===A||q.$$typeof===S||q.$$typeof===m||q.$$typeof===g||q.$$typeof===x||q.$$typeof===k||q.$$typeof===L||q.$$typeof===G||q.$$typeof===N)}function z(q){if(typeof q=="object"&&q!==null){var Re=q.$$typeof;switch(Re){case t:var Oe=q.type;switch(Oe){case y:case b:case s:case d:case o:case E:return Oe;default:var je=Oe&&Oe.$$typeof;switch(je){case g:case x:case A:case S:case m:return je;default:return Re}}case r:return Re}}}var V=y,Y=b,X=g,Q=m,$=t,K=x,ee=s,se=A,ie=S,te=r,ue=d,le=o,fe=E,ve=!1;function xe(q){return ve||(ve=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),ce(q)||z(q)===y}function ce(q){return z(q)===b}function Te(q){return z(q)===g}function Ce(q){return z(q)===m}function me(q){return typeof q=="object"&&q!==null&&q.$$typeof===t}function pe(q){return z(q)===x}function Ee(q){return z(q)===s}function Ae(q){return z(q)===A}function Pe(q){return z(q)===S}function J(q){return z(q)===r}function Ue(q){return z(q)===d}function ye(q){return z(q)===o}function de(q){return z(q)===E}reactIs_development.AsyncMode=V,reactIs_development.ConcurrentMode=Y,reactIs_development.ContextConsumer=X,reactIs_development.ContextProvider=Q,reactIs_development.Element=$,reactIs_development.ForwardRef=K,reactIs_development.Fragment=ee,reactIs_development.Lazy=se,reactIs_development.Memo=ie,reactIs_development.Portal=te,reactIs_development.Profiler=ue,reactIs_development.StrictMode=le,reactIs_development.Suspense=fe,reactIs_development.isAsyncMode=xe,reactIs_development.isConcurrentMode=ce,reactIs_development.isContextConsumer=Te,reactIs_development.isContextProvider=Ce,reactIs_development.isElement=me,reactIs_development.isForwardRef=pe,reactIs_development.isFragment=Ee,reactIs_development.isLazy=Ae,reactIs_development.isMemo=Pe,reactIs_development.isPortal=J,reactIs_development.isProfiler=Ue,reactIs_development.isStrictMode=ye,reactIs_development.isSuspense=de,reactIs_development.isValidElementType=M,reactIs_development.typeOf=z})()),reactIs_development}var hasRequiredReactIs;function requireReactIs(){return hasRequiredReactIs||(hasRequiredReactIs=1,process$1.env.NODE_ENV==="production"?reactIs.exports=requireReactIs_production_min():reactIs.exports=requireReactIs_development()),reactIs.exports}var hoistNonReactStatics_cjs,hasRequiredHoistNonReactStatics_cjs;function requireHoistNonReactStatics_cjs(){if(hasRequiredHoistNonReactStatics_cjs)return hoistNonReactStatics_cjs;hasRequiredHoistNonReactStatics_cjs=1;var e=requireReactIs(),t={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},r={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},d={};d[e.ForwardRef]=s,d[e.Memo]=o;function m(A){return e.isMemo(A)?o:d[A.$$typeof]||t}var g=Object.defineProperty,y=Object.getOwnPropertyNames,b=Object.getOwnPropertySymbols,x=Object.getOwnPropertyDescriptor,E=Object.getPrototypeOf,C=Object.prototype;function S(A,N,k){if(typeof N!="string"){if(C){var L=E(N);L&&L!==C&&S(A,L,k)}var G=y(N);b&&(G=G.concat(b(N)));for(var M=m(A),z=m(N),V=0;V<G.length;++V){var Y=G[V];if(!r[Y]&&!(k&&k[Y])&&!(z&&z[Y])&&!(M&&M[Y])){var X=x(N,Y);try{g(A,Y,X)}catch{}}}}return A}return hoistNonReactStatics_cjs=S,hoistNonReactStatics_cjs}requireHoistNonReactStatics_cjs();var isBrowser=!0;function getRegisteredStyles(e,t,r){var s="";return r.split(" ").forEach(function(o){e[o]!==void 0?t.push(e[o]+";"):o&&(s+=o+" ")}),s}var registerStyles=function e(t,r,s){var o=t.key+"-"+r.name;(s===!1||isBrowser===!1)&&t.registered[o]===void 0&&(t.registered[o]=r.styles)},insertStyles=function e(t,r,s){registerStyles(t,r,s);var o=t.key+"-"+r.name;if(t.inserted[r.name]===void 0){var d=r;do t.insert(r===d?"."+o:"",d,t.sheet,!0),d=d.next;while(d!==void 0)}};function murmur2(e){for(var t=0,r,s=0,o=e.length;o>=4;++s,o-=4)r=e.charCodeAt(s)&255|(e.charCodeAt(++s)&255)<<8|(e.charCodeAt(++s)&255)<<16|(e.charCodeAt(++s)&255)<<24,r=(r&65535)*1540483477+((r>>>16)*59797<<16),r^=r>>>24,t=(r&65535)*1540483477+((r>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(o){case 3:t^=(e.charCodeAt(s+2)&255)<<16;case 2:t^=(e.charCodeAt(s+1)&255)<<8;case 1:t^=e.charCodeAt(s)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var unitlessKeys={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},hyphenateRegex=/[A-Z]|^ms/g,animationRegex=/_EMO_([^_]+?)_([^]*?)_EMO_/g,isCustomProperty=function e(t){return t.charCodeAt(1)===45},isProcessableValue=function e(t){return t!=null&&typeof t!="boolean"},processStyleName=memoize(function(e){return isCustomProperty(e)?e:e.replace(hyphenateRegex,"-$&").toLowerCase()}),processStyleValue=function e(t,r){switch(t){case"animation":case"animationName":if(typeof r=="string")return r.replace(animationRegex,function(s,o,d){return cursor={name:o,styles:d,next:cursor},o})}return unitlessKeys[t]!==1&&!isCustomProperty(t)&&typeof r=="number"&&r!==0?r+"px":r};function handleInterpolation(e,t,r){if(r==null)return"";var s=r;if(s.__emotion_styles!==void 0)return s;switch(typeof r){case"boolean":return"";case"object":{var o=r;if(o.anim===1)return cursor={name:o.name,styles:o.styles,next:cursor},o.name;var d=r;if(d.styles!==void 0){var m=d.next;if(m!==void 0)for(;m!==void 0;)cursor={name:m.name,styles:m.styles,next:cursor},m=m.next;var g=d.styles+";";return g}return createStringFromObject(e,t,r)}case"function":{if(e!==void 0){var y=cursor,b=r(e);return cursor=y,handleInterpolation(e,t,b)}break}}var x=r;return x}function createStringFromObject(e,t,r){var s="";if(Array.isArray(r))for(var o=0;o<r.length;o++)s+=handleInterpolation(e,t,r[o])+";";else for(var d in r){var m=r[d];if(typeof m!="object"){var g=m;isProcessableValue(g)&&(s+=processStyleName(d)+":"+processStyleValue(d,g)+";")}else if(Array.isArray(m)&&typeof m[0]=="string"&&t==null)for(var y=0;y<m.length;y++)isProcessableValue(m[y])&&(s+=processStyleName(d)+":"+processStyleValue(d,m[y])+";");else{var b=handleInterpolation(e,t,m);switch(d){case"animation":case"animationName":{s+=processStyleName(d)+":"+b+";";break}default:s+=d+"{"+b+"}"}}}return s}var labelPattern=/label:\s*([^\s;{]+)\s*(;|$)/g,cursor;function serializeStyles(e,t,r){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var s=!0,o="";cursor=void 0;var d=e[0];if(d==null||d.raw===void 0)s=!1,o+=handleInterpolation(r,t,d);else{var m=d;o+=m[0]}for(var g=1;g<e.length;g++)if(o+=handleInterpolation(r,t,e[g]),s){var y=d;o+=y[g]}labelPattern.lastIndex=0;for(var b="",x;(x=labelPattern.exec(o))!==null;)b+="-"+x[1];var E=murmur2(o)+b;return{name:E,styles:o,next:cursor}}var syncFallback=function e(t){return t()},useInsertionEffect=React__namespace.useInsertionEffect?React__namespace.useInsertionEffect:!1,useInsertionEffectAlwaysWithSyncFallback=useInsertionEffect||syncFallback,EmotionCacheContext=React__namespace.createContext(typeof HTMLElement<"u"?createCache({key:"css"}):null);EmotionCacheContext.Provider;var withEmotionCache=function e(t){return React.forwardRef(function(r,s){var o=React.useContext(EmotionCacheContext);return t(r,o,s)})},ThemeContext=React__namespace.createContext({}),hasOwn={}.hasOwnProperty,typePropName="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",createEmotionProps=function e(t,r){var s={};for(var o in r)hasOwn.call(r,o)&&(s[o]=r[o]);return s[typePropName]=t,s},Insertion=function e(t){var r=t.cache,s=t.serialized,o=t.isStringTag;return registerStyles(r,s,o),useInsertionEffectAlwaysWithSyncFallback(function(){return insertStyles(r,s,o)}),null},Emotion=withEmotionCache(function(e,t,r){var s=e.css;typeof s=="string"&&t.registered[s]!==void 0&&(s=t.registered[s]);var o=e[typePropName],d=[s],m="";typeof e.className=="string"?m=getRegisteredStyles(t.registered,d,e.className):e.className!=null&&(m=e.className+" ");var g=serializeStyles(d,void 0,React__namespace.useContext(ThemeContext));m+=t.key+"-"+g.name;var y={};for(var b in e)hasOwn.call(e,b)&&b!=="css"&&b!==typePropName&&(y[b]=e[b]);return y.className=m,r&&(y.ref=r),React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement(Insertion,{cache:t,serialized:g,isStringTag:typeof o=="string"}),React__namespace.createElement(o,y))}),Emotion$1=Emotion,jsx=function e(t,r){var s=arguments;if(r==null||!hasOwn.call(r,"css"))return React__namespace.createElement.apply(void 0,s);var o=s.length,d=new Array(o);d[0]=Emotion$1,d[1]=createEmotionProps(t,r);for(var m=2;m<o;m++)d[m]=s[m];return React__namespace.createElement.apply(null,d)};(function(e){var t;t||(t=e.JSX||(e.JSX={}))})(jsx||(jsx={}));function css$2(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return serializeStyles(t)}function keyframes(){var e=css$2.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}function _taggedTemplateLiteral(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}const min=Math.min,max$1=Math.max,round=Math.round,floor$1=Math.floor,createCoords=e=>({x:e,y:e});function rectToClientRect(e){const{x:t,y:r,width:s,height:o}=e;return{width:s,height:o,top:r,left:t,right:t+s,bottom:r+o,x:t,y:r}}function hasWindow(){return typeof window<"u"}function getNodeName(e){return isNode(e)?(e.nodeName||"").toLowerCase():"#document"}function getWindow(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function getDocumentElement(e){var t;return(t=(isNode(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function isNode(e){return hasWindow()?e instanceof Node||e instanceof getWindow(e).Node:!1}function isElement(e){return hasWindow()?e instanceof Element||e instanceof getWindow(e).Element:!1}function isHTMLElement(e){return hasWindow()?e instanceof HTMLElement||e instanceof getWindow(e).HTMLElement:!1}function isShadowRoot(e){return!hasWindow()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof getWindow(e).ShadowRoot}function isOverflowElement(e){const{overflow:t,overflowX:r,overflowY:s,display:o}=getComputedStyle$1(e);return/auto|scroll|overlay|hidden|clip/.test(t+s+r)&&o!=="inline"&&o!=="contents"}let isWebKitValue;function isWebKit(){return isWebKitValue==null&&(isWebKitValue=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),isWebKitValue}function isLastTraversableNode(e){return/^(html|body|#document)$/.test(getNodeName(e))}function getComputedStyle$1(e){return getWindow(e).getComputedStyle(e)}function getParentNode(e){if(getNodeName(e)==="html")return e;const t=e.assignedSlot||e.parentNode||isShadowRoot(e)&&e.host||getDocumentElement(e);return isShadowRoot(t)?t.host:t}function getNearestOverflowAncestor(e){const t=getParentNode(e);return isLastTraversableNode(t)?e.ownerDocument?e.ownerDocument.body:e.body:isHTMLElement(t)&&isOverflowElement(t)?t:getNearestOverflowAncestor(t)}function getOverflowAncestors(e,t,r){var s;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=getNearestOverflowAncestor(e),d=o===((s=e.ownerDocument)==null?void 0:s.body),m=getWindow(o);if(d){const g=getFrameElement(m);return t.concat(m,m.visualViewport||[],isOverflowElement(o)?o:[],g&&r?getOverflowAncestors(g):[])}else return t.concat(o,getOverflowAncestors(o,[],r))}function getFrameElement(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function getCssDimensions(e){const t=getComputedStyle$1(e);let r=parseFloat(t.width)||0,s=parseFloat(t.height)||0;const o=isHTMLElement(e),d=o?e.offsetWidth:r,m=o?e.offsetHeight:s,g=round(r)!==d||round(s)!==m;return g&&(r=d,s=m),{width:r,height:s,$:g}}function unwrapElement(e){return isElement(e)?e:e.contextElement}function getScale(e){const t=unwrapElement(e);if(!isHTMLElement(t))return createCoords(1);const r=t.getBoundingClientRect(),{width:s,height:o,$:d}=getCssDimensions(t);let m=(d?round(r.width):r.width)/s,g=(d?round(r.height):r.height)/o;return(!m||!Number.isFinite(m))&&(m=1),(!g||!Number.isFinite(g))&&(g=1),{x:m,y:g}}const noOffsets=createCoords(0);function getVisualOffsets(e){const t=getWindow(e);return!isWebKit()||!t.visualViewport?noOffsets:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function shouldAddVisualOffsets(e,t,r){return!1}function getBoundingClientRect(e,t,r,s){t===void 0&&(t=!1);const o=e.getBoundingClientRect(),d=unwrapElement(e);let m=createCoords(1);t&&(m=getScale(e));const g=shouldAddVisualOffsets()?getVisualOffsets(d):createCoords(0);let y=(o.left+g.x)/m.x,b=(o.top+g.y)/m.y,x=o.width/m.x,E=o.height/m.y;if(d){const C=getWindow(d),S=s;let A=C,N=getFrameElement(A);for(;N&&s&&S!==A;){const k=getScale(N),L=N.getBoundingClientRect(),G=getComputedStyle$1(N),M=L.left+(N.clientLeft+parseFloat(G.paddingLeft))*k.x,z=L.top+(N.clientTop+parseFloat(G.paddingTop))*k.y;y*=k.x,b*=k.y,x*=k.x,E*=k.y,y+=M,b+=z,A=getWindow(N),N=getFrameElement(A)}}return rectToClientRect({width:x,height:E,x:y,y:b})}function rectsAreEqual(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function observeMove(e,t){let r=null,s;const o=getDocumentElement(e);function d(){var g;clearTimeout(s),(g=r)==null||g.disconnect(),r=null}function m(g,y){g===void 0&&(g=!1),y===void 0&&(y=1),d();const b=e.getBoundingClientRect(),{left:x,top:E,width:C,height:S}=b;if(g||t(),!C||!S)return;const A=floor$1(E),N=floor$1(o.clientWidth-(x+C)),k=floor$1(o.clientHeight-(E+S)),L=floor$1(x),M={rootMargin:-A+"px "+-N+"px "+-k+"px "+-L+"px",threshold:max$1(0,min(1,y))||1};let z=!0;function V(Y){const X=Y[0].intersectionRatio;if(X!==y){if(!z)return m();X?m(!1,X):s=setTimeout(()=>{m(!1,1e-7)},1e3)}X===1&&!rectsAreEqual(b,e.getBoundingClientRect())&&m(),z=!1}try{r=new IntersectionObserver(V,{...M,root:o.ownerDocument})}catch{r=new IntersectionObserver(V,M)}r.observe(e)}return m(!0),d}function autoUpdate(e,t,r,s){s===void 0&&(s={});const{ancestorScroll:o=!0,ancestorResize:d=!0,elementResize:m=typeof ResizeObserver=="function",layoutShift:g=typeof IntersectionObserver=="function",animationFrame:y=!1}=s,b=unwrapElement(e),x=o||d?[...b?getOverflowAncestors(b):[],...t?getOverflowAncestors(t):[]]:[];x.forEach(L=>{o&&L.addEventListener("scroll",r,{passive:!0}),d&&L.addEventListener("resize",r)});const E=b&&g?observeMove(b,r):null;let C=-1,S=null;m&&(S=new ResizeObserver(L=>{let[G]=L;G&&G.target===b&&S&&t&&(S.unobserve(t),cancelAnimationFrame(C),C=requestAnimationFrame(()=>{var M;(M=S)==null||M.observe(t)})),r()}),b&&!y&&S.observe(b),t&&S.observe(t));let A,N=y?getBoundingClientRect(e):null;y&&k();function k(){const L=getBoundingClientRect(e);N&&!rectsAreEqual(N,L)&&r(),N=L,A=requestAnimationFrame(k)}return r(),()=>{var L;x.forEach(G=>{o&&G.removeEventListener("scroll",r),d&&G.removeEventListener("resize",r)}),E?.(),(L=S)==null||L.disconnect(),S=null,y&&cancelAnimationFrame(A)}}var index=React.useLayoutEffect,_excluded$4=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],noop=function e(){};function applyPrefixToName(e,t){return t?t[0]==="-"?e+t:e+"__"+t:e}function classNames(e,t){for(var r=arguments.length,s=new Array(r>2?r-2:0),o=2;o<r;o++)s[o-2]=arguments[o];var d=[].concat(s);if(t&&e)for(var m in t)t.hasOwnProperty(m)&&t[m]&&d.push("".concat(applyPrefixToName(e,m)));return d.filter(function(g){return g}).map(function(g){return String(g).trim()}).join(" ")}var cleanValue=function e(t){return isArray(t)?t.filter(Boolean):_typeof(t)==="object"&&t!==null?[t]:[]},cleanCommonProps=function e(t){t.className,t.clearValue,t.cx,t.getStyles,t.getClassNames,t.getValue,t.hasValue,t.isMulti,t.isRtl,t.options,t.selectOption,t.selectProps,t.setValue,t.theme;var r=_objectWithoutProperties(t,_excluded$4);return _objectSpread2({},r)},getStyleProps=function e(t,r,s){var o=t.cx,d=t.getStyles,m=t.getClassNames,g=t.className;return{css:d(r,t),className:o(s??{},m(r,t),g)}};function isDocumentElement(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function normalizedHeight(e){return isDocumentElement(e)?window.innerHeight:e.clientHeight}function getScrollTop(e){return isDocumentElement(e)?window.pageYOffset:e.scrollTop}function scrollTo(e,t){if(isDocumentElement(e)){window.scrollTo(0,t);return}e.scrollTop=t}function getScrollParent(e){var t=getComputedStyle(e),r=t.position==="absolute",s=/(auto|scroll)/;if(t.position==="fixed")return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),!(r&&t.position==="static")&&s.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}function easeOutCubic(e,t,r,s){return r*((e=e/s-1)*e*e+1)+t}function animatedScrollTo(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:noop,o=getScrollTop(e),d=t-o,m=10,g=0;function y(){g+=m;var b=easeOutCubic(g,o,d,r);scrollTo(e,b),g<r?window.requestAnimationFrame(y):s(e)}y()}function scrollIntoView(e,t){var r=e.getBoundingClientRect(),s=t.getBoundingClientRect(),o=t.offsetHeight/3;s.bottom+o>r.bottom?scrollTo(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):s.top-o<r.top&&scrollTo(e,Math.max(t.offsetTop-o,0))}function getBoundingClientObj(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}function isTouchCapable(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function isMobileDevice(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var passiveOptionAccessed=!1,options={get passive(){return passiveOptionAccessed=!0}},w=typeof window<"u"?window:{};w.addEventListener&&w.removeEventListener&&(w.addEventListener("p",noop,options),w.removeEventListener("p",noop,!1));var supportsPassiveEvents=passiveOptionAccessed;function notNullish(e){return e!=null}function isArray(e){return Array.isArray(e)}function valueTernary(e,t,r){return e?t:r}function singleValueAsValue(e){return e}function multiValueAsValue(e){return e}var removeProps=function e(t){for(var r=arguments.length,s=new Array(r>1?r-1:0),o=1;o<r;o++)s[o-1]=arguments[o];var d=Object.entries(t).filter(function(m){var g=_slicedToArray(m,1),y=g[0];return!s.includes(y)});return d.reduce(function(m,g){var y=_slicedToArray(g,2),b=y[0],x=y[1];return m[b]=x,m},{})},_excluded$3=["children","innerProps"],_excluded2$1=["children","innerProps"];function getMenuPlacement(e){var t=e.maxHeight,r=e.menuEl,s=e.minHeight,o=e.placement,d=e.shouldScroll,m=e.isFixedPosition,g=e.controlHeight,y=getScrollParent(r),b={placement:"bottom",maxHeight:t};if(!r||!r.offsetParent)return b;var x=y.getBoundingClientRect(),E=x.height,C=r.getBoundingClientRect(),S=C.bottom,A=C.height,N=C.top,k=r.offsetParent.getBoundingClientRect(),L=k.top,G=m?window.innerHeight:normalizedHeight(y),M=getScrollTop(y),z=parseInt(getComputedStyle(r).marginBottom,10),V=parseInt(getComputedStyle(r).marginTop,10),Y=L-V,X=G-N,Q=Y+M,$=E-M-N,K=S-G+M+z,ee=M+N-V,se=160;switch(o){case"auto":case"bottom":if(X>=A)return{placement:"bottom",maxHeight:t};if($>=A&&!m)return d&&animatedScrollTo(y,K,se),{placement:"bottom",maxHeight:t};if(!m&&$>=s||m&&X>=s){d&&animatedScrollTo(y,K,se);var ie=m?X-z:$-z;return{placement:"bottom",maxHeight:ie}}if(o==="auto"||m){var te=t,ue=m?Y:Q;return ue>=s&&(te=Math.min(ue-z-g,t)),{placement:"top",maxHeight:te}}if(o==="bottom")return d&&scrollTo(y,K),{placement:"bottom",maxHeight:t};break;case"top":if(Y>=A)return{placement:"top",maxHeight:t};if(Q>=A&&!m)return d&&animatedScrollTo(y,ee,se),{placement:"top",maxHeight:t};if(!m&&Q>=s||m&&Y>=s){var le=t;return(!m&&Q>=s||m&&Y>=s)&&(le=m?Y-V:Q-V),d&&animatedScrollTo(y,ee,se),{placement:"top",maxHeight:le}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return b}function alignToControl(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}var coercePlacement=function e(t){return t==="auto"?"bottom":t},menuCSS=function e(t,r){var s,o=t.placement,d=t.theme,m=d.borderRadius,g=d.spacing,y=d.colors;return _objectSpread2((s={label:"menu"},_defineProperty$1(s,alignToControl(o),"100%"),_defineProperty$1(s,"position","absolute"),_defineProperty$1(s,"width","100%"),_defineProperty$1(s,"zIndex",1),s),r?{}:{backgroundColor:y.neutral0,borderRadius:m,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:g.menuGutter,marginTop:g.menuGutter})},PortalPlacementContext=React.createContext(null),MenuPlacer=function e(t){var r=t.children,s=t.minMenuHeight,o=t.maxMenuHeight,d=t.menuPlacement,m=t.menuPosition,g=t.menuShouldScrollIntoView,y=t.theme,b=React.useContext(PortalPlacementContext)||{},x=b.setPortalPlacement,E=React.useRef(null),C=React.useState(o),S=_slicedToArray(C,2),A=S[0],N=S[1],k=React.useState(null),L=_slicedToArray(k,2),G=L[0],M=L[1],z=y.spacing.controlHeight;return index(function(){var V=E.current;if(V){var Y=m==="fixed",X=g&&!Y,Q=getMenuPlacement({maxHeight:o,menuEl:V,minHeight:s,placement:d,shouldScroll:X,isFixedPosition:Y,controlHeight:z});N(Q.maxHeight),M(Q.placement),x?.(Q.placement)}},[o,d,m,g,s,x,z]),r({ref:E,placerProps:_objectSpread2(_objectSpread2({},t),{},{placement:G||coercePlacement(d),maxHeight:A})})},Menu=function e(t){var r=t.children,s=t.innerRef,o=t.innerProps;return jsx("div",_extends({},getStyleProps(t,"menu",{menu:!0}),{ref:s},o),r)},Menu$1=Menu,menuListCSS=function e(t,r){var s=t.maxHeight,o=t.theme.spacing.baseUnit;return _objectSpread2({maxHeight:s,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},r?{}:{paddingBottom:o,paddingTop:o})},MenuList=function e(t){var r=t.children,s=t.innerProps,o=t.innerRef,d=t.isMulti;return jsx("div",_extends({},getStyleProps(t,"menuList",{"menu-list":!0,"menu-list--is-multi":d}),{ref:o},s),r)},noticeCSS=function e(t,r){var s=t.theme,o=s.spacing.baseUnit,d=s.colors;return _objectSpread2({textAlign:"center"},r?{}:{color:d.neutral40,padding:"".concat(o*2,"px ").concat(o*3,"px")})},noOptionsMessageCSS=noticeCSS,loadingMessageCSS=noticeCSS,NoOptionsMessage=function e(t){var r=t.children,s=r===void 0?"No options":r,o=t.innerProps,d=_objectWithoutProperties(t,_excluded$3);return jsx("div",_extends({},getStyleProps(_objectSpread2(_objectSpread2({},d),{},{children:s,innerProps:o}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),o),s)},LoadingMessage=function e(t){var r=t.children,s=r===void 0?"Loading...":r,o=t.innerProps,d=_objectWithoutProperties(t,_excluded2$1);return jsx("div",_extends({},getStyleProps(_objectSpread2(_objectSpread2({},d),{},{children:s,innerProps:o}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),o),s)},menuPortalCSS=function e(t){var r=t.rect,s=t.offset,o=t.position;return{left:r.left,position:o,top:s,width:r.width,zIndex:1}},MenuPortal=function e(t){var r=t.appendTo,s=t.children,o=t.controlElement,d=t.innerProps,m=t.menuPlacement,g=t.menuPosition,y=React.useRef(null),b=React.useRef(null),x=React.useState(coercePlacement(m)),E=_slicedToArray(x,2),C=E[0],S=E[1],A=React.useMemo(function(){return{setPortalPlacement:S}},[]),N=React.useState(null),k=_slicedToArray(N,2),L=k[0],G=k[1],M=React.useCallback(function(){if(o){var X=getBoundingClientObj(o),Q=g==="fixed"?0:window.pageYOffset,$=X[C]+Q;($!==L?.offset||X.left!==L?.rect.left||X.width!==L?.rect.width)&&G({offset:$,rect:X})}},[o,g,C,L?.offset,L?.rect.left,L?.rect.width]);index(function(){M()},[M]);var z=React.useCallback(function(){typeof b.current=="function"&&(b.current(),b.current=null),o&&y.current&&(b.current=autoUpdate(o,y.current,M,{elementResize:"ResizeObserver"in window}))},[o,M]);index(function(){z()},[z]);var V=React.useCallback(function(X){y.current=X,z()},[z]);if(!r&&g!=="fixed"||!L)return null;var Y=jsx("div",_extends({ref:V},getStyleProps(_objectSpread2(_objectSpread2({},t),{},{offset:L.offset,position:g,rect:L.rect}),"menuPortal",{"menu-portal":!0}),d),s);return jsx(PortalPlacementContext.Provider,{value:A},r?reactDom.createPortal(Y,r):Y)},containerCSS=function e(t){var r=t.isDisabled,s=t.isRtl;return{label:"container",direction:s?"rtl":void 0,pointerEvents:r?"none":void 0,position:"relative"}},SelectContainer=function e(t){var r=t.children,s=t.innerProps,o=t.isDisabled,d=t.isRtl;return jsx("div",_extends({},getStyleProps(t,"container",{"--is-disabled":o,"--is-rtl":d}),s),r)},valueContainerCSS=function e(t,r){var s=t.theme.spacing,o=t.isMulti,d=t.hasValue,m=t.selectProps.controlShouldRenderValue;return _objectSpread2({alignItems:"center",display:o&&d&&m?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},r?{}:{padding:"".concat(s.baseUnit/2,"px ").concat(s.baseUnit*2,"px")})},ValueContainer=function e(t){var r=t.children,s=t.innerProps,o=t.isMulti,d=t.hasValue;return jsx("div",_extends({},getStyleProps(t,"valueContainer",{"value-container":!0,"value-container--is-multi":o,"value-container--has-value":d}),s),r)},indicatorsContainerCSS=function e(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},IndicatorsContainer=function e(t){var r=t.children,s=t.innerProps;return jsx("div",_extends({},getStyleProps(t,"indicatorsContainer",{indicators:!0}),s),r)},_templateObject,_excluded$2=["size"],_excluded2=["innerProps","isRtl","size"];function _EMOTION_STRINGIFIED_CSS_ERROR__$3(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var _ref2$2=process$1.env.NODE_ENV==="production"?{name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"}:{name:"tj5bde-Svg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;label:Svg;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3gsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHtcbiAgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWUsXG4gIENTU09iamVjdFdpdGhMYWJlbCxcbiAgR3JvdXBCYXNlLFxufSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBnZXRTdHlsZVByb3BzIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgSWNvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBTdmcgPSAoe1xuICBzaXplLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZTogbnVtYmVyIH0pID0+IChcbiAgPHN2Z1xuICAgIGhlaWdodD17c2l6ZX1cbiAgICB3aWR0aD17c2l6ZX1cbiAgICB2aWV3Qm94PVwiMCAwIDIwIDIwXCJcbiAgICBhcmlhLWhpZGRlbj1cInRydWVcIlxuICAgIGZvY3VzYWJsZT1cImZhbHNlXCJcbiAgICBjc3M9e3tcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgZmlsbDogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBsaW5lSGVpZ2h0OiAxLFxuICAgICAgc3Ryb2tlOiAnY3VycmVudENvbG9yJyxcbiAgICAgIHN0cm9rZVdpZHRoOiAwLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IHR5cGUgQ3Jvc3NJY29uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgQ3Jvc3NJY29uID0gKHByb3BzOiBDcm9zc0ljb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNMTQuMzQ4IDE0Ljg0OWMtMC40NjkgMC40NjktMS4yMjkgMC40NjktMS42OTcgMGwtMi42NTEtMy4wMzAtMi42NTEgMy4wMjljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDAtMC40NjktMC40NjktMC40NjktMS4yMjkgMC0xLjY5N2wyLjc1OC0zLjE1LTIuNzU5LTMuMTUyYy0wLjQ2OS0wLjQ2OS0wLjQ2OS0xLjIyOCAwLTEuNjk3czEuMjI4LTAuNDY5IDEuNjk3IDBsMi42NTIgMy4wMzEgMi42NTEtMy4wMzFjMC40NjktMC40NjkgMS4yMjgtMC40NjkgMS42OTcgMHMwLjQ2OSAxLjIyOSAwIDEuNjk3bC0yLjc1OCAzLjE1MiAyLjc1OCAzLjE1YzAuNDY5IDAuNDY5IDAuNDY5IDEuMjI5IDAgMS42OTh6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuZXhwb3J0IHR5cGUgRG93bkNoZXZyb25Qcm9wcyA9IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU/OiBudW1iZXIgfTtcbmV4cG9ydCBjb25zdCBEb3duQ2hldnJvbiA9IChwcm9wczogRG93bkNoZXZyb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNNC41MTYgNy41NDhjMC40MzYtMC40NDYgMS4wNDMtMC40ODEgMS41NzYgMGwzLjkwOCAzLjc0NyAzLjkwOC0zLjc0N2MwLjUzMy0wLjQ4MSAxLjE0MS0wLjQ0NiAxLjU3NCAwIDAuNDM2IDAuNDQ1IDAuNDA4IDEuMTk3IDAgMS42MTUtMC40MDYgMC40MTgtNC42OTUgNC41MDItNC42OTUgNC41MDItMC4yMTcgMC4yMjMtMC41MDIgMC4zMzUtMC43ODcgMC4zMzVzLTAuNTctMC4xMTItMC43ODktMC4zMzVjMCAwLTQuMjg3LTQuMDg0LTQuNjk1LTQuNTAycy0wLjQzNi0xLjE3IDAtMS42MTV6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgQnV0dG9uc1xuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbmV4cG9ydCBpbnRlcmZhY2UgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBUaGUgY2hpbGRyZW4gdG8gYmUgcmVuZGVyZWQgaW5zaWRlIHRoZSBpbmRpY2F0b3IuICovXG4gIGNoaWxkcmVuPzogUmVhY3ROb2RlO1xuICAvKiogUHJvcHMgdGhhdCB3aWxsIGJlIHBhc3NlZCBvbiB0byB0aGUgY2hpbGRyZW4uICovXG4gIGlubmVyUHJvcHM6IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snZGl2J107XG4gIC8qKiBUaGUgZm9jdXNlZCBzdGF0ZSBvZiB0aGUgc2VsZWN0LiAqL1xuICBpc0ZvY3VzZWQ6IGJvb2xlYW47XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG59XG5cbmNvbnN0IGJhc2VDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgdGhlbWU6IHtcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICAgIGNvbG9ycyxcbiAgICB9LFxuICB9OlxuICAgIHwgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuICAgIHwgQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2luZGljYXRvckNvbnRhaW5lcicsXG4gIGRpc3BsYXk6ICdmbGV4JyxcbiAgdHJhbnNpdGlvbjogJ2NvbG9yIDE1MG1zJyxcbiAgLi4uKHVuc3R5bGVkXG4gICAgPyB7fVxuICAgIDoge1xuICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw2MCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIHBhZGRpbmc6IGJhc2VVbml0ICogMixcbiAgICAgICAgJzpob3Zlcic6IHtcbiAgICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw4MCA6IGNvbG9ycy5uZXV0cmFsNDAsXG4gICAgICAgIH0sXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgZHJvcGRvd25JbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IERyb3Bkb3duSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnZHJvcGRvd25JbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2Ryb3Bkb3duLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8RG93bkNoZXZyb24gLz59XG4gICAgPC9kaXY+XG4gICk7XG59O1xuXG5leHBvcnQgaW50ZXJmYWNlIENsZWFySW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xufVxuXG5leHBvcnQgY29uc3QgY2xlYXJJbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IENsZWFySW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnY2xlYXJJbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2NsZWFyLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8Q3Jvc3NJY29uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBTZXBhcmF0b3Jcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIEluZGljYXRvclNlcGFyYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpbm5lclByb3BzPzogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ107XG59XG5cbmV4cG9ydCBjb25zdCBpbmRpY2F0b3JTZXBhcmF0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0Rpc2FibGVkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JTZXBhcmF0b3InLFxuICBhbGlnblNlbGY6ICdzdHJldGNoJyxcbiAgd2lkdGg6IDEsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgYmFja2dyb3VuZENvbG9yOiBpc0Rpc2FibGVkID8gY29sb3JzLm5ldXRyYWwxMCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIG1hcmdpbkJvdHRvbTogYmFzZVVuaXQgKiAyLFxuICAgICAgICBtYXJnaW5Ub3A6IGJhc2VVbml0ICogMixcbiAgICAgIH0pLFxufSk7XG5cbmV4cG9ydCBjb25zdCBJbmRpY2F0b3JTZXBhcmF0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHByb3BzOiBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgaW5uZXJQcm9wcyB9ID0gcHJvcHM7XG4gIHJldHVybiAoXG4gICAgPHNwYW5cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgICAgey4uLmdldFN0eWxlUHJvcHMocHJvcHMsICdpbmRpY2F0b3JTZXBhcmF0b3InLCB7XG4gICAgICAgICdpbmRpY2F0b3Itc2VwYXJhdG9yJzogdHJ1ZSxcbiAgICAgIH0pfVxuICAgIC8+XG4gICk7XG59O1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIExvYWRpbmdcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBsb2FkaW5nRG90QW5pbWF0aW9ucyA9IGtleWZyYW1lc2BcbiAgMCUsIDgwJSwgMTAwJSB7IG9wYWNpdHk6IDA7IH1cbiAgNDAlIHsgb3BhY2l0eTogMTsgfVxuYDtcblxuZXhwb3J0IGNvbnN0IGxvYWRpbmdJbmRpY2F0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgc2l6ZSxcbiAgICB0aGVtZToge1xuICAgICAgY29sb3JzLFxuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgIH0sXG4gIH06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2xvYWRpbmdJbmRpY2F0b3InLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIGFsaWduU2VsZjogJ2NlbnRlcicsXG4gIGZvbnRTaXplOiBzaXplLFxuICBsaW5lSGVpZ2h0OiAxLFxuICBtYXJnaW5SaWdodDogc2l6ZSxcbiAgdGV4dEFsaWduOiAnY2VudGVyJyxcbiAgdmVydGljYWxBbGlnbjogJ21pZGRsZScsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5pbnRlcmZhY2UgTG9hZGluZ0RvdFByb3BzIHtcbiAgZGVsYXk6IG51bWJlcjtcbiAgb2Zmc2V0OiBib29sZWFuO1xufVxuY29uc3QgTG9hZGluZ0RvdCA9ICh7IGRlbGF5LCBvZmZzZXQgfTogTG9hZGluZ0RvdFByb3BzKSA9PiAoXG4gIDxzcGFuXG4gICAgY3NzPXt7XG4gICAgICBhbmltYXRpb246IGAke2xvYWRpbmdEb3RBbmltYXRpb25zfSAxcyBlYXNlLWluLW91dCAke2RlbGF5fW1zIGluZmluaXRlO2AsXG4gICAgICBiYWNrZ3JvdW5kQ29sb3I6ICdjdXJyZW50Q29sb3InLFxuICAgICAgYm9yZGVyUmFkaXVzOiAnMWVtJyxcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgbWFyZ2luTGVmdDogb2Zmc2V0ID8gJzFlbScgOiB1bmRlZmluZWQsXG4gICAgICBoZWlnaHQ6ICcxZW0nLFxuICAgICAgdmVydGljYWxBbGlnbjogJ3RvcCcsXG4gICAgICB3aWR0aDogJzFlbScsXG4gICAgfX1cbiAgLz5cbik7XG5cbmV4cG9ydCBpbnRlcmZhY2UgTG9hZGluZ0luZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xuICAvKiogU2V0IHNpemUgb2YgdGhlIGNvbnRhaW5lci4gKi9cbiAgc2l6ZTogbnVtYmVyO1xufVxuZXhwb3J0IGNvbnN0IExvYWRpbmdJbmRpY2F0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oe1xuICBpbm5lclByb3BzLFxuICBpc1J0bCxcbiAgc2l6ZSA9IDQsXG4gIC4uLnJlc3RQcm9wc1xufTogTG9hZGluZ0luZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+KSA9PiB7XG4gIHJldHVybiAoXG4gICAgPGRpdlxuICAgICAgey4uLmdldFN0eWxlUHJvcHMoXG4gICAgICAgIHsgLi4ucmVzdFByb3BzLCBpbm5lclByb3BzLCBpc1J0bCwgc2l6ZSB9LFxuICAgICAgICAnbG9hZGluZ0luZGljYXRvcicsXG4gICAgICAgIHtcbiAgICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICAgJ2xvYWRpbmctaW5kaWNhdG9yJzogdHJ1ZSxcbiAgICAgICAgfVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG4iXX0= */",toString:_EMOTION_STRINGIFIED_CSS_ERROR__$3},Svg=function e(t){var r=t.size,s=_objectWithoutProperties(t,_excluded$2);return jsx("svg",_extends({height:r,width:r,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:_ref2$2},s))},CrossIcon=function e(t){return jsx(Svg,_extends({size:20},t),jsx("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},DownChevron=function e(t){return jsx(Svg,_extends({size:20},t),jsx("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},baseCSS=function e(t,r){var s=t.isFocused,o=t.theme,d=o.spacing.baseUnit,m=o.colors;return _objectSpread2({label:"indicatorContainer",display:"flex",transition:"color 150ms"},r?{}:{color:s?m.neutral60:m.neutral20,padding:d*2,":hover":{color:s?m.neutral80:m.neutral40}})},dropdownIndicatorCSS=baseCSS,DropdownIndicator=function e(t){var r=t.children,s=t.innerProps;return jsx("div",_extends({},getStyleProps(t,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),s),r||jsx(DownChevron,null))},clearIndicatorCSS=baseCSS,ClearIndicator=function e(t){var r=t.children,s=t.innerProps;return jsx("div",_extends({},getStyleProps(t,"clearIndicator",{indicator:!0,"clear-indicator":!0}),s),r||jsx(CrossIcon,null))},indicatorSeparatorCSS=function e(t,r){var s=t.isDisabled,o=t.theme,d=o.spacing.baseUnit,m=o.colors;return _objectSpread2({label:"indicatorSeparator",alignSelf:"stretch",width:1},r?{}:{backgroundColor:s?m.neutral10:m.neutral20,marginBottom:d*2,marginTop:d*2})},IndicatorSeparator=function e(t){var r=t.innerProps;return jsx("span",_extends({},r,getStyleProps(t,"indicatorSeparator",{"indicator-separator":!0})))},loadingDotAnimations=keyframes(_templateObject||(_templateObject=_taggedTemplateLiteral([`
141
141
  0%, 80%, 100% { opacity: 0; }
142
142
  40% { opacity: 1; }
143
- `]))),loadingIndicatorCSS=function e(t,r){var s=t.isFocused,o=t.size,d=t.theme,m=d.colors,g=d.spacing.baseUnit;return _objectSpread2({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},r?{}:{color:s?m.neutral60:m.neutral20,padding:g*2})},LoadingDot=function e(t){var r=t.delay,s=t.offset;return jsx("span",{css:css$2({animation:"".concat(loadingDotAnimations," 1s ease-in-out ").concat(r,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:s?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},process$1.env.NODE_ENV==="production"?"":";label:LoadingDot;",process$1.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1RSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3gsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHtcbiAgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWUsXG4gIENTU09iamVjdFdpdGhMYWJlbCxcbiAgR3JvdXBCYXNlLFxufSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBnZXRTdHlsZVByb3BzIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgSWNvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBTdmcgPSAoe1xuICBzaXplLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZTogbnVtYmVyIH0pID0+IChcbiAgPHN2Z1xuICAgIGhlaWdodD17c2l6ZX1cbiAgICB3aWR0aD17c2l6ZX1cbiAgICB2aWV3Qm94PVwiMCAwIDIwIDIwXCJcbiAgICBhcmlhLWhpZGRlbj1cInRydWVcIlxuICAgIGZvY3VzYWJsZT1cImZhbHNlXCJcbiAgICBjc3M9e3tcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgZmlsbDogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBsaW5lSGVpZ2h0OiAxLFxuICAgICAgc3Ryb2tlOiAnY3VycmVudENvbG9yJyxcbiAgICAgIHN0cm9rZVdpZHRoOiAwLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IHR5cGUgQ3Jvc3NJY29uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgQ3Jvc3NJY29uID0gKHByb3BzOiBDcm9zc0ljb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNMTQuMzQ4IDE0Ljg0OWMtMC40NjkgMC40NjktMS4yMjkgMC40NjktMS42OTcgMGwtMi42NTEtMy4wMzAtMi42NTEgMy4wMjljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDAtMC40NjktMC40NjktMC40NjktMS4yMjkgMC0xLjY5N2wyLjc1OC0zLjE1LTIuNzU5LTMuMTUyYy0wLjQ2OS0wLjQ2OS0wLjQ2OS0xLjIyOCAwLTEuNjk3czEuMjI4LTAuNDY5IDEuNjk3IDBsMi42NTIgMy4wMzEgMi42NTEtMy4wMzFjMC40NjktMC40NjkgMS4yMjgtMC40NjkgMS42OTcgMHMwLjQ2OSAxLjIyOSAwIDEuNjk3bC0yLjc1OCAzLjE1MiAyLjc1OCAzLjE1YzAuNDY5IDAuNDY5IDAuNDY5IDEuMjI5IDAgMS42OTh6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuZXhwb3J0IHR5cGUgRG93bkNoZXZyb25Qcm9wcyA9IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU/OiBudW1iZXIgfTtcbmV4cG9ydCBjb25zdCBEb3duQ2hldnJvbiA9IChwcm9wczogRG93bkNoZXZyb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNNC41MTYgNy41NDhjMC40MzYtMC40NDYgMS4wNDMtMC40ODEgMS41NzYgMGwzLjkwOCAzLjc0NyAzLjkwOC0zLjc0N2MwLjUzMy0wLjQ4MSAxLjE0MS0wLjQ0NiAxLjU3NCAwIDAuNDM2IDAuNDQ1IDAuNDA4IDEuMTk3IDAgMS42MTUtMC40MDYgMC40MTgtNC42OTUgNC41MDItNC42OTUgNC41MDItMC4yMTcgMC4yMjMtMC41MDIgMC4zMzUtMC43ODcgMC4zMzVzLTAuNTctMC4xMTItMC43ODktMC4zMzVjMCAwLTQuMjg3LTQuMDg0LTQuNjk1LTQuNTAycy0wLjQzNi0xLjE3IDAtMS42MTV6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgQnV0dG9uc1xuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbmV4cG9ydCBpbnRlcmZhY2UgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBUaGUgY2hpbGRyZW4gdG8gYmUgcmVuZGVyZWQgaW5zaWRlIHRoZSBpbmRpY2F0b3IuICovXG4gIGNoaWxkcmVuPzogUmVhY3ROb2RlO1xuICAvKiogUHJvcHMgdGhhdCB3aWxsIGJlIHBhc3NlZCBvbiB0byB0aGUgY2hpbGRyZW4uICovXG4gIGlubmVyUHJvcHM6IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snZGl2J107XG4gIC8qKiBUaGUgZm9jdXNlZCBzdGF0ZSBvZiB0aGUgc2VsZWN0LiAqL1xuICBpc0ZvY3VzZWQ6IGJvb2xlYW47XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG59XG5cbmNvbnN0IGJhc2VDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgdGhlbWU6IHtcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICAgIGNvbG9ycyxcbiAgICB9LFxuICB9OlxuICAgIHwgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuICAgIHwgQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2luZGljYXRvckNvbnRhaW5lcicsXG4gIGRpc3BsYXk6ICdmbGV4JyxcbiAgdHJhbnNpdGlvbjogJ2NvbG9yIDE1MG1zJyxcbiAgLi4uKHVuc3R5bGVkXG4gICAgPyB7fVxuICAgIDoge1xuICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw2MCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIHBhZGRpbmc6IGJhc2VVbml0ICogMixcbiAgICAgICAgJzpob3Zlcic6IHtcbiAgICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw4MCA6IGNvbG9ycy5uZXV0cmFsNDAsXG4gICAgICAgIH0sXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgZHJvcGRvd25JbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IERyb3Bkb3duSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnZHJvcGRvd25JbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2Ryb3Bkb3duLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8RG93bkNoZXZyb24gLz59XG4gICAgPC9kaXY+XG4gICk7XG59O1xuXG5leHBvcnQgaW50ZXJmYWNlIENsZWFySW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xufVxuXG5leHBvcnQgY29uc3QgY2xlYXJJbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IENsZWFySW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnY2xlYXJJbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2NsZWFyLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8Q3Jvc3NJY29uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBTZXBhcmF0b3Jcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIEluZGljYXRvclNlcGFyYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpbm5lclByb3BzPzogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ107XG59XG5cbmV4cG9ydCBjb25zdCBpbmRpY2F0b3JTZXBhcmF0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0Rpc2FibGVkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JTZXBhcmF0b3InLFxuICBhbGlnblNlbGY6ICdzdHJldGNoJyxcbiAgd2lkdGg6IDEsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgYmFja2dyb3VuZENvbG9yOiBpc0Rpc2FibGVkID8gY29sb3JzLm5ldXRyYWwxMCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIG1hcmdpbkJvdHRvbTogYmFzZVVuaXQgKiAyLFxuICAgICAgICBtYXJnaW5Ub3A6IGJhc2VVbml0ICogMixcbiAgICAgIH0pLFxufSk7XG5cbmV4cG9ydCBjb25zdCBJbmRpY2F0b3JTZXBhcmF0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHByb3BzOiBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgaW5uZXJQcm9wcyB9ID0gcHJvcHM7XG4gIHJldHVybiAoXG4gICAgPHNwYW5cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgICAgey4uLmdldFN0eWxlUHJvcHMocHJvcHMsICdpbmRpY2F0b3JTZXBhcmF0b3InLCB7XG4gICAgICAgICdpbmRpY2F0b3Itc2VwYXJhdG9yJzogdHJ1ZSxcbiAgICAgIH0pfVxuICAgIC8+XG4gICk7XG59O1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIExvYWRpbmdcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBsb2FkaW5nRG90QW5pbWF0aW9ucyA9IGtleWZyYW1lc2BcbiAgMCUsIDgwJSwgMTAwJSB7IG9wYWNpdHk6IDA7IH1cbiAgNDAlIHsgb3BhY2l0eTogMTsgfVxuYDtcblxuZXhwb3J0IGNvbnN0IGxvYWRpbmdJbmRpY2F0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgc2l6ZSxcbiAgICB0aGVtZToge1xuICAgICAgY29sb3JzLFxuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgIH0sXG4gIH06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2xvYWRpbmdJbmRpY2F0b3InLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIGFsaWduU2VsZjogJ2NlbnRlcicsXG4gIGZvbnRTaXplOiBzaXplLFxuICBsaW5lSGVpZ2h0OiAxLFxuICBtYXJnaW5SaWdodDogc2l6ZSxcbiAgdGV4dEFsaWduOiAnY2VudGVyJyxcbiAgdmVydGljYWxBbGlnbjogJ21pZGRsZScsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5pbnRlcmZhY2UgTG9hZGluZ0RvdFByb3BzIHtcbiAgZGVsYXk6IG51bWJlcjtcbiAgb2Zmc2V0OiBib29sZWFuO1xufVxuY29uc3QgTG9hZGluZ0RvdCA9ICh7IGRlbGF5LCBvZmZzZXQgfTogTG9hZGluZ0RvdFByb3BzKSA9PiAoXG4gIDxzcGFuXG4gICAgY3NzPXt7XG4gICAgICBhbmltYXRpb246IGAke2xvYWRpbmdEb3RBbmltYXRpb25zfSAxcyBlYXNlLWluLW91dCAke2RlbGF5fW1zIGluZmluaXRlO2AsXG4gICAgICBiYWNrZ3JvdW5kQ29sb3I6ICdjdXJyZW50Q29sb3InLFxuICAgICAgYm9yZGVyUmFkaXVzOiAnMWVtJyxcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgbWFyZ2luTGVmdDogb2Zmc2V0ID8gJzFlbScgOiB1bmRlZmluZWQsXG4gICAgICBoZWlnaHQ6ICcxZW0nLFxuICAgICAgdmVydGljYWxBbGlnbjogJ3RvcCcsXG4gICAgICB3aWR0aDogJzFlbScsXG4gICAgfX1cbiAgLz5cbik7XG5cbmV4cG9ydCBpbnRlcmZhY2UgTG9hZGluZ0luZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xuICAvKiogU2V0IHNpemUgb2YgdGhlIGNvbnRhaW5lci4gKi9cbiAgc2l6ZTogbnVtYmVyO1xufVxuZXhwb3J0IGNvbnN0IExvYWRpbmdJbmRpY2F0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oe1xuICBpbm5lclByb3BzLFxuICBpc1J0bCxcbiAgc2l6ZSA9IDQsXG4gIC4uLnJlc3RQcm9wc1xufTogTG9hZGluZ0luZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+KSA9PiB7XG4gIHJldHVybiAoXG4gICAgPGRpdlxuICAgICAgey4uLmdldFN0eWxlUHJvcHMoXG4gICAgICAgIHsgLi4ucmVzdFByb3BzLCBpbm5lclByb3BzLCBpc1J0bCwgc2l6ZSB9LFxuICAgICAgICAnbG9hZGluZ0luZGljYXRvcicsXG4gICAgICAgIHtcbiAgICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICAgJ2xvYWRpbmctaW5kaWNhdG9yJzogdHJ1ZSxcbiAgICAgICAgfVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG4iXX0= */")})},LoadingIndicator=function e(t){var r=t.innerProps,s=t.isRtl,o=t.size,d=o===void 0?4:o,m=_objectWithoutProperties(t,_excluded2);return jsx("div",_extends({},getStyleProps(_objectSpread2(_objectSpread2({},m),{},{innerProps:r,isRtl:s,size:d}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),r),jsx(LoadingDot,{delay:0,offset:s}),jsx(LoadingDot,{delay:160,offset:!0}),jsx(LoadingDot,{delay:320,offset:!s}))},css$1=function e(t,r){var s=t.isDisabled,o=t.isFocused,d=t.theme,m=d.colors,g=d.borderRadius,y=d.spacing;return _objectSpread2({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:y.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},r?{}:{backgroundColor:s?m.neutral5:m.neutral0,borderColor:s?m.neutral10:o?m.primary:m.neutral20,borderRadius:g,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(m.primary):void 0,"&:hover":{borderColor:o?m.primary:m.neutral30}})},Control=function e(t){var r=t.children,s=t.isDisabled,o=t.isFocused,d=t.innerRef,m=t.innerProps,g=t.menuIsOpen;return jsx("div",_extends({ref:d},getStyleProps(t,"control",{control:!0,"control--is-disabled":s,"control--is-focused":o,"control--menu-is-open":g}),m,{"aria-disabled":s||void 0}),r)},Control$1=Control,_excluded$1=["data"],groupCSS=function e(t,r){var s=t.theme.spacing;return r?{}:{paddingBottom:s.baseUnit*2,paddingTop:s.baseUnit*2}},Group=function e(t){var r=t.children,s=t.cx,o=t.getStyles,d=t.getClassNames,m=t.Heading,g=t.headingProps,y=t.innerProps,b=t.label,x=t.theme,E=t.selectProps;return jsx("div",_extends({},getStyleProps(t,"group",{group:!0}),y),jsx(m,_extends({},g,{selectProps:E,theme:x,getStyles:o,getClassNames:d,cx:s}),b),jsx("div",null,r))},groupHeadingCSS=function e(t,r){var s=t.theme,o=s.colors,d=s.spacing;return _objectSpread2({label:"group",cursor:"default",display:"block"},r?{}:{color:o.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:d.baseUnit*3,paddingRight:d.baseUnit*3,textTransform:"uppercase"})},GroupHeading=function e(t){var r=cleanCommonProps(t);r.data;var s=_objectWithoutProperties(r,_excluded$1);return jsx("div",_extends({},getStyleProps(t,"groupHeading",{"group-heading":!0}),s))},Group$1=Group,_excluded$5=["innerRef","isDisabled","isHidden","inputClassName"],inputCSS=function e(t,r){var s=t.isDisabled,o=t.value,d=t.theme,m=d.spacing,g=d.colors;return _objectSpread2(_objectSpread2({visibility:s?"hidden":"visible",transform:o?"translateZ(0)":""},containerStyle),r?{}:{margin:m.baseUnit/2,paddingBottom:m.baseUnit/2,paddingTop:m.baseUnit/2,color:g.neutral80})},spacingStyle={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},containerStyle={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":_objectSpread2({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},spacingStyle)},inputStyle=function e(t){return _objectSpread2({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},spacingStyle)},Input=function e(t){var r=t.cx,s=t.value,o=cleanCommonProps(t),d=o.innerRef,m=o.isDisabled,g=o.isHidden,y=o.inputClassName,b=_objectWithoutProperties(o,_excluded$5);return jsx("div",_extends({},getStyleProps(t,"input",{"input-container":!0}),{"data-value":s||""}),jsx("input",_extends({className:r({input:!0},y),ref:d,style:inputStyle(g),disabled:m},b)))},Input$1=Input,multiValueCSS=function e(t,r){var s=t.theme,o=s.spacing,d=s.borderRadius,m=s.colors;return _objectSpread2({label:"multiValue",display:"flex",minWidth:0},r?{}:{backgroundColor:m.neutral10,borderRadius:d/2,margin:o.baseUnit/2})},multiValueLabelCSS=function e(t,r){var s=t.theme,o=s.borderRadius,d=s.colors,m=t.cropWithEllipsis;return _objectSpread2({overflow:"hidden",textOverflow:m||m===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},r?{}:{borderRadius:o/2,color:d.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemoveCSS=function e(t,r){var s=t.theme,o=s.spacing,d=s.borderRadius,m=s.colors,g=t.isFocused;return _objectSpread2({alignItems:"center",display:"flex"},r?{}:{borderRadius:d/2,backgroundColor:g?m.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:m.dangerLight,color:m.danger}})},MultiValueGeneric=function e(t){var r=t.children,s=t.innerProps;return jsx("div",s,r)},MultiValueContainer=MultiValueGeneric,MultiValueLabel=MultiValueGeneric;function MultiValueRemove(e){var t=e.children,r=e.innerProps;return jsx("div",_extends({role:"button"},r),t||jsx(CrossIcon,{size:14}))}var MultiValue=function e(t){var r=t.children,s=t.components,o=t.data,d=t.innerProps,m=t.isDisabled,g=t.removeProps,y=t.selectProps,b=s.Container,x=s.Label,E=s.Remove;return jsx(b,{data:o,innerProps:_objectSpread2(_objectSpread2({},getStyleProps(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":m})),d),selectProps:y},jsx(x,{data:o,innerProps:_objectSpread2({},getStyleProps(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:y},r),jsx(E,{data:o,innerProps:_objectSpread2(_objectSpread2({},getStyleProps(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(r||"option")},g),selectProps:y}))},MultiValue$1=MultiValue,optionCSS=function e(t,r){var s=t.isDisabled,o=t.isFocused,d=t.isSelected,m=t.theme,g=m.spacing,y=m.colors;return _objectSpread2({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},r?{}:{backgroundColor:d?y.primary:o?y.primary25:"transparent",color:s?y.neutral20:d?y.neutral0:"inherit",padding:"".concat(g.baseUnit*2,"px ").concat(g.baseUnit*3,"px"),":active":{backgroundColor:s?void 0:d?y.primary:y.primary50}})},Option=function e(t){var r=t.children,s=t.isDisabled,o=t.isFocused,d=t.isSelected,m=t.innerRef,g=t.innerProps;return jsx("div",_extends({},getStyleProps(t,"option",{option:!0,"option--is-disabled":s,"option--is-focused":o,"option--is-selected":d}),{ref:m,"aria-disabled":s},g),r)},Option$1=Option,placeholderCSS=function e(t,r){var s=t.theme,o=s.spacing,d=s.colors;return _objectSpread2({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},r?{}:{color:d.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},Placeholder=function e(t){var r=t.children,s=t.innerProps;return jsx("div",_extends({},getStyleProps(t,"placeholder",{placeholder:!0}),s),r)},Placeholder$1=Placeholder,css=function e(t,r){var s=t.isDisabled,o=t.theme,d=o.spacing,m=o.colors;return _objectSpread2({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},r?{}:{color:s?m.neutral40:m.neutral80,marginLeft:d.baseUnit/2,marginRight:d.baseUnit/2})},SingleValue=function e(t){var r=t.children,s=t.isDisabled,o=t.innerProps;return jsx("div",_extends({},getStyleProps(t,"singleValue",{"single-value":!0,"single-value--is-disabled":s}),o),r)},SingleValue$1=SingleValue,components={ClearIndicator,Control:Control$1,DropdownIndicator,DownChevron,CrossIcon,Group:Group$1,GroupHeading,IndicatorsContainer,IndicatorSeparator,Input:Input$1,LoadingIndicator,Menu:Menu$1,MenuList,MenuPortal,LoadingMessage,NoOptionsMessage,MultiValue:MultiValue$1,MultiValueContainer,MultiValueLabel,MultiValueRemove,Option:Option$1,Placeholder:Placeholder$1,SelectContainer,SingleValue:SingleValue$1,ValueContainer},defaultComponents=function e(t){return _objectSpread2(_objectSpread2({},components),t.components)},safeIsNaN=Number.isNaN||function e(t){return typeof t=="number"&&t!==t};function isEqual(e,t){return!!(e===t||safeIsNaN(e)&&safeIsNaN(t))}function areInputsEqual(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!isEqual(e[r],t[r]))return!1;return!0}function memoizeOne(e,t){t===void 0&&(t=areInputsEqual);var r=null;function s(){for(var o=[],d=0;d<arguments.length;d++)o[d]=arguments[d];if(r&&r.lastThis===this&&t(o,r.lastArgs))return r.lastResult;var m=e.apply(this,o);return r={lastResult:m,lastArgs:o,lastThis:this},m}return s.clear=function(){r=null},s}function _EMOTION_STRINGIFIED_CSS_ERROR__$2(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}for(var _ref=process$1.env.NODE_ENV==="production"?{name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"}:{name:"1f43avz-a11yText-A11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;label:A11yText;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPSSIsImZpbGUiOiJBMTF5VGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IEpTWCB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gQXNzaXN0aXZlIHRleHQgdG8gZGVzY3JpYmUgdmlzdWFsIGVsZW1lbnRzLiBIaWRkZW4gZm9yIHNpZ2h0ZWQgdXNlcnMuXG5jb25zdCBBMTF5VGV4dCA9IChwcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ10pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */",toString:_EMOTION_STRINGIFIED_CSS_ERROR__$2},A11yText=function e(t){return jsx("span",_extends({css:_ref},t))},A11yText$1=A11yText,defaultAriaLiveMessages={guidance:function e(t){var r=t.isSearchable,s=t.isMulti,o=t.tabSelectsValue,d=t.context,m=t.isInitialFocus;switch(d){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return m?"".concat(t["aria-label"]||"Select"," is focused ").concat(r?",type to refine list":"",", press Down to open the menu, ").concat(s?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function e(t){var r=t.action,s=t.label,o=s===void 0?"":s,d=t.labels,m=t.isDisabled;switch(r){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(o,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(d.length>1?"s":""," ").concat(d.join(","),", selected.");case"select-option":return m?"option ".concat(o," is disabled. Select another option."):"option ".concat(o,", selected.");default:return""}},onFocus:function e(t){var r=t.context,s=t.focused,o=t.options,d=t.label,m=d===void 0?"":d,g=t.selectValue,y=t.isDisabled,b=t.isSelected,x=t.isAppleDevice,E=function(N,k){return N&&N.length?"".concat(N.indexOf(k)+1," of ").concat(N.length):""};if(r==="value"&&g)return"value ".concat(m," focused, ").concat(E(g,s),".");if(r==="menu"&&x){var C=y?" disabled":"",S="".concat(b?" selected":"").concat(C);return"".concat(m).concat(S,", ").concat(E(o,s),".")}return""},onFilter:function e(t){var r=t.inputValue,s=t.resultsMessage;return"".concat(s).concat(r?" for search term "+r:"",".")}},LiveRegion=function e(t){var r=t.ariaSelection,s=t.focusedOption,o=t.focusedValue,d=t.focusableOptions,m=t.isFocused,g=t.selectValue,y=t.selectProps,b=t.id,x=t.isAppleDevice,E=y.ariaLiveMessages,C=y.getOptionLabel,S=y.inputValue,A=y.isMulti,N=y.isOptionDisabled,k=y.isSearchable,L=y.menuIsOpen,G=y.options,M=y.screenReaderStatus,z=y.tabSelectsValue,V=y.isLoading,Y=y["aria-label"],X=y["aria-live"],Q=React.useMemo(function(){return _objectSpread2(_objectSpread2({},defaultAriaLiveMessages),E||{})},[E]),$=React.useMemo(function(){var ue="";if(r&&Q.onChange){var le=r.option,fe=r.options,ve=r.removedValue,xe=r.removedValues,ce=r.value,Te=function(J){return Array.isArray(J)?null:J},Ce=ve||le||Te(ce),me=Ce?C(Ce):"",pe=fe||xe||void 0,Ee=pe?pe.map(C):[],Ae=_objectSpread2({isDisabled:Ce&&N(Ce,g),label:me,labels:Ee},r);ue=Q.onChange(Ae)}return ue},[r,Q,N,g,C]),K=React.useMemo(function(){var ue="",le=s||o,fe=!!(s&&g&&g.includes(s));if(le&&Q.onFocus){var ve={focused:le,label:C(le),isDisabled:N(le,g),isSelected:fe,options:d,context:le===s?"menu":"value",selectValue:g,isAppleDevice:x};ue=Q.onFocus(ve)}return ue},[s,o,C,N,Q,d,g,x]),ee=React.useMemo(function(){var ue="";if(L&&G.length&&!V&&Q.onFilter){var le=M({count:d.length});ue=Q.onFilter({inputValue:S,resultsMessage:le})}return ue},[d,S,L,Q,G,M,V]),se=r?.action==="initial-input-focus",ie=React.useMemo(function(){var ue="";if(Q.guidance){var le=o?"value":L?"menu":"input";ue=Q.guidance({"aria-label":Y,context:le,isDisabled:s&&N(s,g),isMulti:A,isSearchable:k,tabSelectsValue:z,isInitialFocus:se})}return ue},[Y,s,o,A,N,k,L,Q,g,z,se]),te=jsx(React.Fragment,null,jsx("span",{id:"aria-selection"},$),jsx("span",{id:"aria-focused"},K),jsx("span",{id:"aria-results"},ee),jsx("span",{id:"aria-guidance"},ie));return jsx(React.Fragment,null,jsx(A11yText$1,{id:b},se&&te),jsx(A11yText$1,{"aria-live":X,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},m&&!se&&te))},LiveRegion$1=LiveRegion,diacritics=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],anyDiacritic=new RegExp("["+diacritics.map(function(e){return e.letters}).join("")+"]","g"),diacriticToBase={},i=0;i<diacritics.length;i++)for(var diacritic=diacritics[i],j=0;j<diacritic.letters.length;j++)diacriticToBase[diacritic.letters[j]]=diacritic.base;var stripDiacritics=function e(t){return t.replace(anyDiacritic,function(r){return diacriticToBase[r]})},memoizedStripDiacriticsForInput=memoizeOne(stripDiacritics),trimString=function e(t){return t.replace(/^\s+|\s+$/g,"")},defaultStringify=function e(t){return"".concat(t.label," ").concat(t.value)},createFilter=function e(t){return function(r,s){if(r.data.__isNew__)return!0;var o=_objectSpread2({ignoreCase:!0,ignoreAccents:!0,stringify:defaultStringify,trim:!0,matchFrom:"any"},t),d=o.ignoreCase,m=o.ignoreAccents,g=o.stringify,y=o.trim,b=o.matchFrom,x=y?trimString(s):s,E=y?trimString(g(r)):g(r);return d&&(x=x.toLowerCase(),E=E.toLowerCase()),m&&(x=memoizedStripDiacriticsForInput(x),E=stripDiacritics(E)),b==="start"?E.substr(0,x.length)===x:E.indexOf(x)>-1}},_excluded=["innerRef"];function DummyInput(e){var t=e.innerRef,r=_objectWithoutProperties(e,_excluded),s=removeProps(r,"onExited","in","enter","exit","appear");return jsx("input",_extends({ref:t},s,{css:css$2({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},process$1.env.NODE_ENV==="production"?"":";label:DummyInput;",process$1.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCTSIsImZpbGUiOiJEdW1teUlucHV0LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWYgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyByZW1vdmVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gRHVtbXlJbnB1dCh7XG4gIGlubmVyUmVmLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydpbnB1dCddICYge1xuICByZWFkb25seSBpbm5lclJlZjogUmVmPEhUTUxJbnB1dEVsZW1lbnQ+O1xufSkge1xuICAvLyBSZW1vdmUgYW5pbWF0aW9uIHByb3BzIG5vdCBtZWFudCBmb3IgSFRNTCBlbGVtZW50c1xuICBjb25zdCBmaWx0ZXJlZFByb3BzID0gcmVtb3ZlUHJvcHMoXG4gICAgcHJvcHMsXG4gICAgJ29uRXhpdGVkJyxcbiAgICAnaW4nLFxuICAgICdlbnRlcicsXG4gICAgJ2V4aXQnLFxuICAgICdhcHBlYXInXG4gICk7XG5cbiAgcmV0dXJuIChcbiAgICA8aW5wdXRcbiAgICAgIHJlZj17aW5uZXJSZWZ9XG4gICAgICB7Li4uZmlsdGVyZWRQcm9wc31cbiAgICAgIGNzcz17e1xuICAgICAgICBsYWJlbDogJ2R1bW15SW5wdXQnLFxuICAgICAgICAvLyBnZXQgcmlkIG9mIGFueSBkZWZhdWx0IHN0eWxlc1xuICAgICAgICBiYWNrZ3JvdW5kOiAwLFxuICAgICAgICBib3JkZXI6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgdGhpcyBoaWRlcyB0aGUgZmxhc2hpbmcgY3Vyc29yXG4gICAgICAgIGNhcmV0Q29sb3I6ICd0cmFuc3BhcmVudCcsXG4gICAgICAgIGZvbnRTaXplOiAnaW5oZXJpdCcsXG4gICAgICAgIGdyaWRBcmVhOiAnMSAvIDEgLyAyIC8gMycsXG4gICAgICAgIG91dGxpbmU6IDAsXG4gICAgICAgIHBhZGRpbmc6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgd2l0aG91dCBgd2lkdGhgIGJyb3dzZXJzIHdvbid0IGFsbG93IGZvY3VzXG4gICAgICAgIHdpZHRoOiAxLFxuXG4gICAgICAgIC8vIHJlbW92ZSBjdXJzb3Igb24gZGVza3RvcFxuICAgICAgICBjb2xvcjogJ3RyYW5zcGFyZW50JyxcblxuICAgICAgICAvLyByZW1vdmUgY3Vyc29yIG9uIG1vYmlsZSB3aGlsc3QgbWFpbnRhaW5pbmcgXCJzY3JvbGwgaW50byB2aWV3XCIgYmVoYXZpb3VyXG4gICAgICAgIGxlZnQ6IC0xMDAsXG4gICAgICAgIG9wYWNpdHk6IDAsXG4gICAgICAgIHBvc2l0aW9uOiAncmVsYXRpdmUnLFxuICAgICAgICB0cmFuc2Zvcm06ICdzY2FsZSguMDEpJyxcbiAgICAgIH19XG4gICAgLz5cbiAgKTtcbn1cbiJdfQ== */")}))}var cancelScroll=function e(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function useScrollCapture(e){var t=e.isEnabled,r=e.onBottomArrive,s=e.onBottomLeave,o=e.onTopArrive,d=e.onTopLeave,m=React.useRef(!1),g=React.useRef(!1),y=React.useRef(0),b=React.useRef(null),x=React.useCallback(function(k,L){if(b.current!==null){var G=b.current,M=G.scrollTop,z=G.scrollHeight,V=G.clientHeight,Y=b.current,X=L>0,Q=z-V-M,$=!1;Q>L&&m.current&&(s&&s(k),m.current=!1),X&&g.current&&(d&&d(k),g.current=!1),X&&L>Q?(r&&!m.current&&r(k),Y.scrollTop=z,$=!0,m.current=!0):!X&&-L>M&&(o&&!g.current&&o(k),Y.scrollTop=0,$=!0,g.current=!0),$&&cancelScroll(k)}},[r,s,o,d]),E=React.useCallback(function(k){x(k,k.deltaY)},[x]),C=React.useCallback(function(k){y.current=k.changedTouches[0].clientY},[]),S=React.useCallback(function(k){var L=y.current-k.changedTouches[0].clientY;x(k,L)},[x]),A=React.useCallback(function(k){if(k){var L=supportsPassiveEvents?{passive:!1}:!1;k.addEventListener("wheel",E,L),k.addEventListener("touchstart",C,L),k.addEventListener("touchmove",S,L)}},[S,C,E]),N=React.useCallback(function(k){k&&(k.removeEventListener("wheel",E,!1),k.removeEventListener("touchstart",C,!1),k.removeEventListener("touchmove",S,!1))},[S,C,E]);return React.useEffect(function(){if(t){var k=b.current;return A(k),function(){N(k)}}},[t,A,N]),function(k){b.current=k}}var STYLE_KEYS=["boxSizing","height","overflow","paddingRight","position"],LOCK_STYLES={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function preventTouchMove(e){e.cancelable&&e.preventDefault()}function allowTouchMove(e){e.stopPropagation()}function preventInertiaScroll(){var e=this.scrollTop,t=this.scrollHeight,r=e+this.offsetHeight;e===0?this.scrollTop=1:r===t&&(this.scrollTop=e-1)}function isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints}var canUseDOM=!!(typeof window<"u"&&window.document&&window.document.createElement),activeScrollLocks=0,listenerOptions={capture:!1,passive:!1};function useScrollLock(e){var t=e.isEnabled,r=e.accountForScrollbars,s=r===void 0?!0:r,o=React.useRef({}),d=React.useRef(null),m=React.useCallback(function(y){if(canUseDOM){var b=document.body,x=b&&b.style;if(s&&STYLE_KEYS.forEach(function(A){var N=x&&x[A];o.current[A]=N}),s&&activeScrollLocks<1){var E=parseInt(o.current.paddingRight,10)||0,C=document.body?document.body.clientWidth:0,S=window.innerWidth-C+E||0;Object.keys(LOCK_STYLES).forEach(function(A){var N=LOCK_STYLES[A];x&&(x[A]=N)}),x&&(x.paddingRight="".concat(S,"px"))}b&&isTouchDevice()&&(b.addEventListener("touchmove",preventTouchMove,listenerOptions),y&&(y.addEventListener("touchstart",preventInertiaScroll,listenerOptions),y.addEventListener("touchmove",allowTouchMove,listenerOptions))),activeScrollLocks+=1}},[s]),g=React.useCallback(function(y){if(canUseDOM){var b=document.body,x=b&&b.style;activeScrollLocks=Math.max(activeScrollLocks-1,0),s&&activeScrollLocks<1&&STYLE_KEYS.forEach(function(E){var C=o.current[E];x&&(x[E]=C)}),b&&isTouchDevice()&&(b.removeEventListener("touchmove",preventTouchMove,listenerOptions),y&&(y.removeEventListener("touchstart",preventInertiaScroll,listenerOptions),y.removeEventListener("touchmove",allowTouchMove,listenerOptions)))}},[s]);return React.useEffect(function(){if(t){var y=d.current;return m(y),function(){g(y)}}},[t,m,g]),function(y){d.current=y}}function _EMOTION_STRINGIFIED_CSS_ERROR__$1(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var blurSelectInput=function e(t){var r=t.target;return r.ownerDocument.activeElement&&r.ownerDocument.activeElement.blur()},_ref2$1=process$1.env.NODE_ENV==="production"?{name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"}:{name:"bp8cua-ScrollManager",styles:"position:fixed;left:0;bottom:0;right:0;top:0;label:ScrollManager;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbE1hbmFnZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9EVSIsImZpbGUiOiJTY3JvbGxNYW5hZ2VyLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgRnJhZ21lbnQsIFJlYWN0RWxlbWVudCwgUmVmQ2FsbGJhY2ssIE1vdXNlRXZlbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgdXNlU2Nyb2xsQ2FwdHVyZSBmcm9tICcuL3VzZVNjcm9sbENhcHR1cmUnO1xuaW1wb3J0IHVzZVNjcm9sbExvY2sgZnJvbSAnLi91c2VTY3JvbGxMb2NrJztcblxuaW50ZXJmYWNlIFByb3BzIHtcbiAgcmVhZG9ubHkgY2hpbGRyZW46IChyZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PikgPT4gUmVhY3RFbGVtZW50O1xuICByZWFkb25seSBsb2NrRW5hYmxlZDogYm9vbGVhbjtcbiAgcmVhZG9ubHkgY2FwdHVyZUVuYWJsZWQ6IGJvb2xlYW47XG4gIHJlYWRvbmx5IG9uQm90dG9tQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Cb3R0b21MZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG4gIHJlYWRvbmx5IG9uVG9wQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Ub3BMZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG59XG5cbmNvbnN0IGJsdXJTZWxlY3RJbnB1dCA9IChldmVudDogTW91c2VFdmVudDxIVE1MRGl2RWxlbWVudD4pID0+IHtcbiAgY29uc3QgZWxlbWVudCA9IGV2ZW50LnRhcmdldCBhcyBIVE1MRGl2RWxlbWVudDtcbiAgcmV0dXJuIChcbiAgICBlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCAmJlxuICAgIChlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCBhcyBIVE1MRWxlbWVudCkuYmx1cigpXG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBTY3JvbGxNYW5hZ2VyKHtcbiAgY2hpbGRyZW4sXG4gIGxvY2tFbmFibGVkLFxuICBjYXB0dXJlRW5hYmxlZCA9IHRydWUsXG4gIG9uQm90dG9tQXJyaXZlLFxuICBvbkJvdHRvbUxlYXZlLFxuICBvblRvcEFycml2ZSxcbiAgb25Ub3BMZWF2ZSxcbn06IFByb3BzKSB7XG4gIGNvbnN0IHNldFNjcm9sbENhcHR1cmVUYXJnZXQgPSB1c2VTY3JvbGxDYXB0dXJlKHtcbiAgICBpc0VuYWJsZWQ6IGNhcHR1cmVFbmFibGVkLFxuICAgIG9uQm90dG9tQXJyaXZlLFxuICAgIG9uQm90dG9tTGVhdmUsXG4gICAgb25Ub3BBcnJpdmUsXG4gICAgb25Ub3BMZWF2ZSxcbiAgfSk7XG4gIGNvbnN0IHNldFNjcm9sbExvY2tUYXJnZXQgPSB1c2VTY3JvbGxMb2NrKHsgaXNFbmFibGVkOiBsb2NrRW5hYmxlZCB9KTtcblxuICBjb25zdCB0YXJnZXRSZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PiA9IChlbGVtZW50KSA9PiB7XG4gICAgc2V0U2Nyb2xsQ2FwdHVyZVRhcmdldChlbGVtZW50KTtcbiAgICBzZXRTY3JvbGxMb2NrVGFyZ2V0KGVsZW1lbnQpO1xuICB9O1xuXG4gIHJldHVybiAoXG4gICAgPEZyYWdtZW50PlxuICAgICAge2xvY2tFbmFibGVkICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIG9uQ2xpY2s9e2JsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */",toString:_EMOTION_STRINGIFIED_CSS_ERROR__$1};function ScrollManager(e){var t=e.children,r=e.lockEnabled,s=e.captureEnabled,o=s===void 0?!0:s,d=e.onBottomArrive,m=e.onBottomLeave,g=e.onTopArrive,y=e.onTopLeave,b=useScrollCapture({isEnabled:o,onBottomArrive:d,onBottomLeave:m,onTopArrive:g,onTopLeave:y}),x=useScrollLock({isEnabled:r}),E=function(S){b(S),x(S)};return jsx(React.Fragment,null,r&&jsx("div",{onClick:blurSelectInput,css:_ref2$1}),t(E))}function _EMOTION_STRINGIFIED_CSS_ERROR__(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var _ref2=process$1.env.NODE_ENV==="production"?{name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"}:{name:"5kkxb2-requiredInput-RequiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%;label:RequiredInput;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlcXVpcmVkSW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNJIiwiZmlsZSI6IlJlcXVpcmVkSW5wdXQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBGb2N1c0V2ZW50SGFuZGxlciwgRnVuY3Rpb25Db21wb25lbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmNvbnN0IFJlcXVpcmVkSW5wdXQ6IEZ1bmN0aW9uQ29tcG9uZW50PHtcbiAgcmVhZG9ubHkgbmFtZT86IHN0cmluZztcbiAgcmVhZG9ubHkgb25Gb2N1czogRm9jdXNFdmVudEhhbmRsZXI8SFRNTElucHV0RWxlbWVudD47XG59PiA9ICh7IG5hbWUsIG9uRm9jdXMgfSkgPT4gKFxuICA8aW5wdXRcbiAgICByZXF1aXJlZFxuICAgIG5hbWU9e25hbWV9XG4gICAgdGFiSW5kZXg9ey0xfVxuICAgIGFyaWEtaGlkZGVuPVwidHJ1ZVwiXG4gICAgb25Gb2N1cz17b25Gb2N1c31cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAncmVxdWlyZWRJbnB1dCcsXG4gICAgICBvcGFjaXR5OiAwLFxuICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICBib3R0b206IDAsXG4gICAgICBsZWZ0OiAwLFxuICAgICAgcmlnaHQ6IDAsXG4gICAgICB3aWR0aDogJzEwMCUnLFxuICAgIH19XG4gICAgLy8gUHJldmVudCBgU3dpdGNoaW5nIGZyb20gdW5jb250cm9sbGVkIHRvIGNvbnRyb2xsZWRgIGVycm9yXG4gICAgdmFsdWU9XCJcIlxuICAgIG9uQ2hhbmdlPXsoKSA9PiB7fX1cbiAgLz5cbik7XG5cbmV4cG9ydCBkZWZhdWx0IFJlcXVpcmVkSW5wdXQ7XG4iXX0= */",toString:_EMOTION_STRINGIFIED_CSS_ERROR__},RequiredInput=function e(t){var r=t.name,s=t.onFocus;return jsx("input",{required:!0,name:r,tabIndex:-1,"aria-hidden":"true",onFocus:s,css:_ref2,value:"",onChange:function(){}})},RequiredInput$1=RequiredInput;function testPlatform(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function isIPhone(){return testPlatform(/^iPhone/i)}function isMac(){return testPlatform(/^Mac/i)}function isIPad(){return testPlatform(/^iPad/i)||isMac()&&navigator.maxTouchPoints>1}function isIOS(){return isIPhone()||isIPad()}function isAppleDevice(){return isMac()||isIOS()}var formatGroupLabel=function e(t){return t.label},getOptionLabel$1=function e(t){return t.label},getOptionValue$1=function e(t){return t.value},isOptionDisabled=function e(t){return!!t.isDisabled},defaultStyles={clearIndicator:clearIndicatorCSS,container:containerCSS,control:css$1,dropdownIndicator:dropdownIndicatorCSS,group:groupCSS,groupHeading:groupHeadingCSS,indicatorsContainer:indicatorsContainerCSS,indicatorSeparator:indicatorSeparatorCSS,input:inputCSS,loadingIndicator:loadingIndicatorCSS,loadingMessage:loadingMessageCSS,menu:menuCSS,menuList:menuListCSS,menuPortal:menuPortalCSS,multiValue:multiValueCSS,multiValueLabel:multiValueLabelCSS,multiValueRemove:multiValueRemoveCSS,noOptionsMessage:noOptionsMessageCSS,option:optionCSS,placeholder:placeholderCSS,singleValue:css,valueContainer:valueContainerCSS},colors={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},borderRadius=4,baseUnit=4,controlHeight=38,menuGutter=baseUnit*2,spacing={baseUnit,controlHeight,menuGutter},defaultTheme={borderRadius,colors,spacing},defaultProps={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:isTouchCapable(),captureMenuScroll:!isTouchCapable(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:createFilter(),formatGroupLabel,getOptionLabel:getOptionLabel$1,getOptionValue:getOptionValue$1,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled,loadingMessage:function e(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!isMobileDevice(),noOptionsMessage:function e(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function e(t){var r=t.count;return"".concat(r," result").concat(r!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function toCategorizedOption(e,t,r,s){var o=_isOptionDisabled(e,t,r),d=_isOptionSelected(e,t,r),m=getOptionLabel(e,t),g=getOptionValue(e,t);return{type:"option",data:t,isDisabled:o,isSelected:d,label:m,value:g,index:s}}function buildCategorizedOptions(e,t){return e.options.map(function(r,s){if("options"in r){var o=r.options.map(function(m,g){return toCategorizedOption(e,m,t,g)}).filter(function(m){return isFocusable(e,m)});return o.length>0?{type:"group",data:r,options:o,index:s}:void 0}var d=toCategorizedOption(e,r,t,s);return isFocusable(e,d)?d:void 0}).filter(notNullish)}function buildFocusableOptionsFromCategorizedOptions(e){return e.reduce(function(t,r){return r.type==="group"?t.push.apply(t,_toConsumableArray(r.options.map(function(s){return s.data}))):t.push(r.data),t},[])}function buildFocusableOptionsWithIds(e,t){return e.reduce(function(r,s){return s.type==="group"?r.push.apply(r,_toConsumableArray(s.options.map(function(o){return{data:o.data,id:"".concat(t,"-").concat(s.index,"-").concat(o.index)}}))):r.push({data:s.data,id:"".concat(t,"-").concat(s.index)}),r},[])}function buildFocusableOptions(e,t){return buildFocusableOptionsFromCategorizedOptions(buildCategorizedOptions(e,t))}function isFocusable(e,t){var r=e.inputValue,s=r===void 0?"":r,o=t.data,d=t.isSelected,m=t.label,g=t.value;return(!shouldHideSelectedOptions(e)||!d)&&_filterOption(e,{label:m,value:g,data:o},s)}function getNextFocusedValue(e,t){var r=e.focusedValue,s=e.selectValue,o=s.indexOf(r);if(o>-1){var d=t.indexOf(r);if(d>-1)return r;if(o<t.length)return t[o]}return null}function getNextFocusedOption(e,t){var r=e.focusedOption;return r&&t.indexOf(r)>-1?r:t[0]}var getFocusedOptionId=function e(t,r){var s,o=(s=t.find(function(d){return d.data===r}))===null||s===void 0?void 0:s.id;return o||null},getOptionLabel=function e(t,r){return t.getOptionLabel(r)},getOptionValue=function e(t,r){return t.getOptionValue(r)};function _isOptionDisabled(e,t,r){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,r):!1}function _isOptionSelected(e,t,r){if(r.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,r);var s=getOptionValue(e,t);return r.some(function(o){return getOptionValue(e,o)===s})}function _filterOption(e,t,r){return e.filterOption?e.filterOption(t,r):!0}var shouldHideSelectedOptions=function e(t){var r=t.hideSelectedOptions,s=t.isMulti;return r===void 0?s:r},instanceId=1,Select=(function(e){_inherits(r,e);var t=_createSuper(r);function r(s){var o;if(_classCallCheck(this,r),o=t.call(this,s),o.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:"",isAppleDevice:!1},o.blockOptionHover=!1,o.isComposing=!1,o.commonProps=void 0,o.initialTouchX=0,o.initialTouchY=0,o.openAfterFocus=!1,o.scrollToFocusedOptionOnUpdate=!1,o.userIsDragging=void 0,o.controlRef=null,o.getControlRef=function(y){o.controlRef=y},o.focusedOptionRef=null,o.getFocusedOptionRef=function(y){o.focusedOptionRef=y},o.menuListRef=null,o.getMenuListRef=function(y){o.menuListRef=y},o.inputRef=null,o.getInputRef=function(y){o.inputRef=y},o.focus=o.focusInput,o.blur=o.blurInput,o.onChange=function(y,b){var x=o.props,E=x.onChange,C=x.name;b.name=C,o.ariaOnChange(y,b),E(y,b)},o.setValue=function(y,b,x){var E=o.props,C=E.closeMenuOnSelect,S=E.isMulti,A=E.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:A}),C&&(o.setState({inputIsHiddenAfterUpdate:!S}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(y,{action:b,option:x})},o.selectOption=function(y){var b=o.props,x=b.blurInputOnSelect,E=b.isMulti,C=b.name,S=o.state.selectValue,A=E&&o.isOptionSelected(y,S),N=o.isOptionDisabled(y,S);if(A){var k=o.getOptionValue(y);o.setValue(S.filter(function(L){return o.getOptionValue(L)!==k}),"deselect-option",y)}else if(!N)E?o.setValue([].concat(_toConsumableArray(S),[y]),"select-option",y):o.setValue(y,"select-option");else{o.ariaOnChange(y,{action:"select-option",option:y,name:C});return}x&&o.blurInput()},o.removeValue=function(y){var b=o.props.isMulti,x=o.state.selectValue,E=o.getOptionValue(y),C=x.filter(function(A){return o.getOptionValue(A)!==E}),S=valueTernary(b,C,C[0]||null);o.onChange(S,{action:"remove-value",removedValue:y}),o.focusInput()},o.clearValue=function(){var y=o.state.selectValue;o.onChange(valueTernary(o.props.isMulti,[],null),{action:"clear",removedValues:y})},o.popValue=function(){var y=o.props.isMulti,b=o.state.selectValue,x=b[b.length-1],E=b.slice(0,b.length-1),C=valueTernary(y,E,E[0]||null);x&&o.onChange(C,{action:"pop-value",removedValue:x})},o.getFocusedOptionId=function(y){return getFocusedOptionId(o.state.focusableOptionsWithIds,y)},o.getFocusableOptionsWithIds=function(){return buildFocusableOptionsWithIds(buildCategorizedOptions(o.props,o.state.selectValue),o.getElementId("option"))},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var y=arguments.length,b=new Array(y),x=0;x<y;x++)b[x]=arguments[x];return classNames.apply(void 0,[o.props.classNamePrefix].concat(b))},o.getOptionLabel=function(y){return getOptionLabel(o.props,y)},o.getOptionValue=function(y){return getOptionValue(o.props,y)},o.getStyles=function(y,b){var x=o.props.unstyled,E=defaultStyles[y](b,x);E.boxSizing="border-box";var C=o.props.styles[y];return C?C(E,b):E},o.getClassNames=function(y,b){var x,E;return(x=(E=o.props.classNames)[y])===null||x===void 0?void 0:x.call(E,b)},o.getElementId=function(y){return"".concat(o.state.instancePrefix,"-").concat(y)},o.getComponents=function(){return defaultComponents(o.props)},o.buildCategorizedOptions=function(){return buildCategorizedOptions(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return buildFocusableOptionsFromCategorizedOptions(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(y,b){o.setState({ariaSelection:_objectSpread2({value:y},b)})},o.onMenuMouseDown=function(y){y.button===0&&(y.stopPropagation(),y.preventDefault(),o.focusInput())},o.onMenuMouseMove=function(y){o.blockOptionHover=!1},o.onControlMouseDown=function(y){if(!y.defaultPrevented){var b=o.props.openMenuOnClick;o.state.isFocused?o.props.menuIsOpen?y.target.tagName!=="INPUT"&&y.target.tagName!=="TEXTAREA"&&o.onMenuClose():b&&o.openMenu("first"):(b&&(o.openAfterFocus=!0),o.focusInput()),y.target.tagName!=="INPUT"&&y.target.tagName!=="TEXTAREA"&&y.preventDefault()}},o.onDropdownIndicatorMouseDown=function(y){if(!(y&&y.type==="mousedown"&&y.button!==0)&&!o.props.isDisabled){var b=o.props,x=b.isMulti,E=b.menuIsOpen;o.focusInput(),E?(o.setState({inputIsHiddenAfterUpdate:!x}),o.onMenuClose()):o.openMenu("first"),y.preventDefault()}},o.onClearIndicatorMouseDown=function(y){y&&y.type==="mousedown"&&y.button!==0||(o.clearValue(),y.preventDefault(),o.openAfterFocus=!1,y.type==="touchend"?o.focusInput():setTimeout(function(){return o.focusInput()}))},o.onScroll=function(y){typeof o.props.closeMenuOnScroll=="boolean"?y.target instanceof HTMLElement&&isDocumentElement(y.target)&&o.props.onMenuClose():typeof o.props.closeMenuOnScroll=="function"&&o.props.closeMenuOnScroll(y)&&o.props.onMenuClose()},o.onCompositionStart=function(){o.isComposing=!0},o.onCompositionEnd=function(){o.isComposing=!1},o.onTouchStart=function(y){var b=y.touches,x=b&&b.item(0);x&&(o.initialTouchX=x.clientX,o.initialTouchY=x.clientY,o.userIsDragging=!1)},o.onTouchMove=function(y){var b=y.touches,x=b&&b.item(0);if(x){var E=Math.abs(x.clientX-o.initialTouchX),C=Math.abs(x.clientY-o.initialTouchY),S=5;o.userIsDragging=E>S||C>S}},o.onTouchEnd=function(y){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(y.target)&&o.menuListRef&&!o.menuListRef.contains(y.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(y){o.userIsDragging||o.onControlMouseDown(y)},o.onClearIndicatorTouchEnd=function(y){o.userIsDragging||o.onClearIndicatorMouseDown(y)},o.onDropdownIndicatorTouchEnd=function(y){o.userIsDragging||o.onDropdownIndicatorMouseDown(y)},o.handleInputChange=function(y){var b=o.props.inputValue,x=y.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(x,{action:"input-change",prevInputValue:b}),o.props.menuIsOpen||o.onMenuOpen()},o.onInputFocus=function(y){o.props.onFocus&&o.props.onFocus(y),o.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(o.openAfterFocus||o.props.openMenuOnFocus)&&o.openMenu("first"),o.openAfterFocus=!1},o.onInputBlur=function(y){var b=o.props.inputValue;if(o.menuListRef&&o.menuListRef.contains(document.activeElement)){o.inputRef.focus();return}o.props.onBlur&&o.props.onBlur(y),o.onInputChange("",{action:"input-blur",prevInputValue:b}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1})},o.onOptionHover=function(y){if(!(o.blockOptionHover||o.state.focusedOption===y)){var b=o.getFocusableOptions(),x=b.indexOf(y);o.setState({focusedOption:y,focusedOptionId:x>-1?o.getFocusedOptionId(y):null})}},o.shouldHideSelectedOptions=function(){return shouldHideSelectedOptions(o.props)},o.onValueInputFocus=function(y){y.preventDefault(),y.stopPropagation(),o.focus()},o.onKeyDown=function(y){var b=o.props,x=b.isMulti,E=b.backspaceRemovesValue,C=b.escapeClearsValue,S=b.inputValue,A=b.isClearable,N=b.isDisabled,k=b.menuIsOpen,L=b.onKeyDown,G=b.tabSelectsValue,M=b.openMenuOnFocus,z=o.state,V=z.focusedOption,Y=z.focusedValue,X=z.selectValue;if(!N&&!(typeof L=="function"&&(L(y),y.defaultPrevented))){switch(o.blockOptionHover=!0,y.key){case"ArrowLeft":if(!x||S)return;o.focusValue("previous");break;case"ArrowRight":if(!x||S)return;o.focusValue("next");break;case"Delete":case"Backspace":if(S)return;if(Y)o.removeValue(Y);else{if(!E)return;x?o.popValue():A&&o.clearValue()}break;case"Tab":if(o.isComposing||y.shiftKey||!k||!G||!V||M&&o.isOptionSelected(V,X))return;o.selectOption(V);break;case"Enter":if(y.keyCode===229)break;if(k){if(!V||o.isComposing)return;o.selectOption(V);break}return;case"Escape":k?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:S}),o.onMenuClose()):A&&C&&o.clearValue();break;case" ":if(S)return;if(!k){o.openMenu("first");break}if(!V)return;o.selectOption(V);break;case"ArrowUp":k?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":k?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!k)return;o.focusOption("pageup");break;case"PageDown":if(!k)return;o.focusOption("pagedown");break;case"Home":if(!k)return;o.focusOption("first");break;case"End":if(!k)return;o.focusOption("last");break;default:return}y.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++instanceId),o.state.selectValue=cleanValue(s.value),s.menuIsOpen&&o.state.selectValue.length){var d=o.getFocusableOptionsWithIds(),m=o.buildFocusableOptions(),g=m.indexOf(o.state.selectValue[0]);o.state.focusableOptionsWithIds=d,o.state.focusedOption=m[g],o.state.focusedOptionId=getFocusedOptionId(d,m[g])}return o}return _createClass(r,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&scrollIntoView(this.menuListRef,this.focusedOptionRef),isAppleDevice()&&this.setState({isAppleDevice:!0})}},{key:"componentDidUpdate",value:function(o){var d=this.props,m=d.isDisabled,g=d.menuIsOpen,y=this.state.isFocused;(y&&!m&&o.isDisabled||y&&g&&!o.menuIsOpen)&&this.focusInput(),y&&m&&!o.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!y&&!m&&o.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(scrollIntoView(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(o,d){this.props.onInputChange(o,d)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(o){var d=this,m=this.state,g=m.selectValue,y=m.isFocused,b=this.buildFocusableOptions(),x=o==="first"?0:b.length-1;if(!this.props.isMulti){var E=b.indexOf(g[0]);E>-1&&(x=E)}this.scrollToFocusedOptionOnUpdate=!(y&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:b[x],focusedOptionId:this.getFocusedOptionId(b[x])},function(){return d.onMenuOpen()})}},{key:"focusValue",value:function(o){var d=this.state,m=d.selectValue,g=d.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var y=m.indexOf(g);g||(y=-1);var b=m.length-1,x=-1;if(m.length){switch(o){case"previous":y===0?x=0:y===-1?x=b:x=y-1;break;case"next":y>-1&&y<b&&(x=y+1);break}this.setState({inputIsHidden:x!==-1,focusedValue:m[x]})}}}},{key:"focusOption",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",d=this.props.pageSize,m=this.state.focusedOption,g=this.getFocusableOptions();if(g.length){var y=0,b=g.indexOf(m);m||(b=-1),o==="up"?y=b>0?b-1:g.length-1:o==="down"?y=(b+1)%g.length:o==="pageup"?(y=b-d,y<0&&(y=0)):o==="pagedown"?(y=b+d,y>g.length-1&&(y=g.length-1)):o==="last"&&(y=g.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:g[y],focusedValue:null,focusedOptionId:this.getFocusedOptionId(g[y])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(defaultTheme):_objectSpread2(_objectSpread2({},defaultTheme),this.props.theme):defaultTheme}},{key:"getCommonProps",value:function(){var o=this.clearValue,d=this.cx,m=this.getStyles,g=this.getClassNames,y=this.getValue,b=this.selectOption,x=this.setValue,E=this.props,C=E.isMulti,S=E.isRtl,A=E.options,N=this.hasValue();return{clearValue:o,cx:d,getStyles:m,getClassNames:g,getValue:y,hasValue:N,isMulti:C,isRtl:S,options:A,selectOption:b,selectProps:E,setValue:x,theme:this.getTheme()}}},{key:"hasValue",value:function(){var o=this.state.selectValue;return o.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var o=this.props,d=o.isClearable,m=o.isMulti;return d===void 0?m:d}},{key:"isOptionDisabled",value:function(o,d){return _isOptionDisabled(this.props,o,d)}},{key:"isOptionSelected",value:function(o,d){return _isOptionSelected(this.props,o,d)}},{key:"filterOption",value:function(o,d){return _filterOption(this.props,o,d)}},{key:"formatOptionLabel",value:function(o,d){if(typeof this.props.formatOptionLabel=="function"){var m=this.props.inputValue,g=this.state.selectValue;return this.props.formatOptionLabel(o,{context:d,inputValue:m,selectValue:g})}else return this.getOptionLabel(o)}},{key:"formatGroupLabel",value:function(o){return this.props.formatGroupLabel(o)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var o=this.props,d=o.isDisabled,m=o.isSearchable,g=o.inputId,y=o.inputValue,b=o.tabIndex,x=o.form,E=o.menuIsOpen,C=o.required,S=this.getComponents(),A=S.Input,N=this.state,k=N.inputIsHidden,L=N.ariaSelection,G=this.commonProps,M=g||this.getElementId("input"),z=_objectSpread2(_objectSpread2(_objectSpread2({"aria-autocomplete":"list","aria-expanded":E,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":C,role:"combobox","aria-activedescendant":this.state.isAppleDevice?void 0:this.state.focusedOptionId||""},E&&{"aria-controls":this.getElementId("listbox")}),!m&&{"aria-readonly":!0}),this.hasValue()?L?.action==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return m?React__namespace.createElement(A,_extends({},G,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:M,innerRef:this.getInputRef,isDisabled:d,isHidden:k,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:b,form:x,type:"text",value:y},z)):React__namespace.createElement(DummyInput,_extends({id:M,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:noop,onFocus:this.onInputFocus,disabled:d,tabIndex:b,inputMode:"none",form:x,value:""},z))}},{key:"renderPlaceholderOrValue",value:function(){var o=this,d=this.getComponents(),m=d.MultiValue,g=d.MultiValueContainer,y=d.MultiValueLabel,b=d.MultiValueRemove,x=d.SingleValue,E=d.Placeholder,C=this.commonProps,S=this.props,A=S.controlShouldRenderValue,N=S.isDisabled,k=S.isMulti,L=S.inputValue,G=S.placeholder,M=this.state,z=M.selectValue,V=M.focusedValue,Y=M.isFocused;if(!this.hasValue()||!A)return L?null:React__namespace.createElement(E,_extends({},C,{key:"placeholder",isDisabled:N,isFocused:Y,innerProps:{id:this.getElementId("placeholder")}}),G);if(k)return z.map(function(Q,$){var K=Q===V,ee="".concat(o.getOptionLabel(Q),"-").concat(o.getOptionValue(Q));return React__namespace.createElement(m,_extends({},C,{components:{Container:g,Label:y,Remove:b},isFocused:K,isDisabled:N,key:ee,index:$,removeProps:{onClick:function(){return o.removeValue(Q)},onTouchEnd:function(){return o.removeValue(Q)},onMouseDown:function(ie){ie.preventDefault()}},data:Q}),o.formatOptionLabel(Q,"value"))});if(L)return null;var X=z[0];return React__namespace.createElement(x,_extends({},C,{data:X,isDisabled:N}),this.formatOptionLabel(X,"value"))}},{key:"renderClearIndicator",value:function(){var o=this.getComponents(),d=o.ClearIndicator,m=this.commonProps,g=this.props,y=g.isDisabled,b=g.isLoading,x=this.state.isFocused;if(!this.isClearable()||!d||y||!this.hasValue()||b)return null;var E={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return React__namespace.createElement(d,_extends({},m,{innerProps:E,isFocused:x}))}},{key:"renderLoadingIndicator",value:function(){var o=this.getComponents(),d=o.LoadingIndicator,m=this.commonProps,g=this.props,y=g.isDisabled,b=g.isLoading,x=this.state.isFocused;if(!d||!b)return null;var E={"aria-hidden":"true"};return React__namespace.createElement(d,_extends({},m,{innerProps:E,isDisabled:y,isFocused:x}))}},{key:"renderIndicatorSeparator",value:function(){var o=this.getComponents(),d=o.DropdownIndicator,m=o.IndicatorSeparator;if(!d||!m)return null;var g=this.commonProps,y=this.props.isDisabled,b=this.state.isFocused;return React__namespace.createElement(m,_extends({},g,{isDisabled:y,isFocused:b}))}},{key:"renderDropdownIndicator",value:function(){var o=this.getComponents(),d=o.DropdownIndicator;if(!d)return null;var m=this.commonProps,g=this.props.isDisabled,y=this.state.isFocused,b={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return React__namespace.createElement(d,_extends({},m,{innerProps:b,isDisabled:g,isFocused:y}))}},{key:"renderMenu",value:function(){var o=this,d=this.getComponents(),m=d.Group,g=d.GroupHeading,y=d.Menu,b=d.MenuList,x=d.MenuPortal,E=d.LoadingMessage,C=d.NoOptionsMessage,S=d.Option,A=this.commonProps,N=this.state.focusedOption,k=this.props,L=k.captureMenuScroll,G=k.inputValue,M=k.isLoading,z=k.loadingMessage,V=k.minMenuHeight,Y=k.maxMenuHeight,X=k.menuIsOpen,Q=k.menuPlacement,$=k.menuPosition,K=k.menuPortalTarget,ee=k.menuShouldBlockScroll,se=k.menuShouldScrollIntoView,ie=k.noOptionsMessage,te=k.onMenuScrollToTop,ue=k.onMenuScrollToBottom;if(!X)return null;var le=function(me,pe){var Ee=me.type,Ae=me.data,Pe=me.isDisabled,J=me.isSelected,Ue=me.label,ye=me.value,de=N===Ae,q=Pe?void 0:function(){return o.onOptionHover(Ae)},Re=Pe?void 0:function(){return o.selectOption(Ae)},Oe="".concat(o.getElementId("option"),"-").concat(pe),je={id:Oe,onClick:Re,onMouseMove:q,onMouseOver:q,tabIndex:-1,role:"option","aria-selected":o.state.isAppleDevice?void 0:J};return React__namespace.createElement(S,_extends({},A,{innerProps:je,data:Ae,isDisabled:Pe,isSelected:J,key:Oe,label:Ue,type:Ee,value:ye,isFocused:de,innerRef:de?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(me.data,"menu"))},fe;if(this.hasOptions())fe=this.getCategorizedOptions().map(function(Ce){if(Ce.type==="group"){var me=Ce.data,pe=Ce.options,Ee=Ce.index,Ae="".concat(o.getElementId("group"),"-").concat(Ee),Pe="".concat(Ae,"-heading");return React__namespace.createElement(m,_extends({},A,{key:Ae,data:me,options:pe,Heading:g,headingProps:{id:Pe,data:Ce.data},label:o.formatGroupLabel(Ce.data)}),Ce.options.map(function(J){return le(J,"".concat(Ee,"-").concat(J.index))}))}else if(Ce.type==="option")return le(Ce,"".concat(Ce.index))});else if(M){var ve=z({inputValue:G});if(ve===null)return null;fe=React__namespace.createElement(E,A,ve)}else{var xe=ie({inputValue:G});if(xe===null)return null;fe=React__namespace.createElement(C,A,xe)}var ce={minMenuHeight:V,maxMenuHeight:Y,menuPlacement:Q,menuPosition:$,menuShouldScrollIntoView:se},Te=React__namespace.createElement(MenuPlacer,_extends({},A,ce),function(Ce){var me=Ce.ref,pe=Ce.placerProps,Ee=pe.placement,Ae=pe.maxHeight;return React__namespace.createElement(y,_extends({},A,ce,{innerRef:me,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:M,placement:Ee}),React__namespace.createElement(ScrollManager,{captureEnabled:L,onTopArrive:te,onBottomArrive:ue,lockEnabled:ee},function(Pe){return React__namespace.createElement(b,_extends({},A,{innerRef:function(Ue){o.getMenuListRef(Ue),Pe(Ue)},innerProps:{role:"listbox","aria-multiselectable":A.isMulti,id:o.getElementId("listbox")},isLoading:M,maxHeight:Ae,focusedOption:N}),fe)}))});return K||$==="fixed"?React__namespace.createElement(x,_extends({},A,{appendTo:K,controlElement:this.controlRef,menuPlacement:Q,menuPosition:$}),Te):Te}},{key:"renderFormField",value:function(){var o=this,d=this.props,m=d.delimiter,g=d.isDisabled,y=d.isMulti,b=d.name,x=d.required,E=this.state.selectValue;if(x&&!this.hasValue()&&!g)return React__namespace.createElement(RequiredInput$1,{name:b,onFocus:this.onValueInputFocus});if(!(!b||g))if(y)if(m){var C=E.map(function(N){return o.getOptionValue(N)}).join(m);return React__namespace.createElement("input",{name:b,type:"hidden",value:C})}else{var S=E.length>0?E.map(function(N,k){return React__namespace.createElement("input",{key:"i-".concat(k),name:b,type:"hidden",value:o.getOptionValue(N)})}):React__namespace.createElement("input",{name:b,type:"hidden",value:""});return React__namespace.createElement("div",null,S)}else{var A=E[0]?this.getOptionValue(E[0]):"";return React__namespace.createElement("input",{name:b,type:"hidden",value:A})}}},{key:"renderLiveRegion",value:function(){var o=this.commonProps,d=this.state,m=d.ariaSelection,g=d.focusedOption,y=d.focusedValue,b=d.isFocused,x=d.selectValue,E=this.getFocusableOptions();return React__namespace.createElement(LiveRegion$1,_extends({},o,{id:this.getElementId("live-region"),ariaSelection:m,focusedOption:g,focusedValue:y,isFocused:b,selectValue:x,focusableOptions:E,isAppleDevice:this.state.isAppleDevice}))}},{key:"render",value:function(){var o=this.getComponents(),d=o.Control,m=o.IndicatorsContainer,g=o.SelectContainer,y=o.ValueContainer,b=this.props,x=b.className,E=b.id,C=b.isDisabled,S=b.menuIsOpen,A=this.state.isFocused,N=this.commonProps=this.getCommonProps();return React__namespace.createElement(g,_extends({},N,{className:x,innerProps:{id:E,onKeyDown:this.onKeyDown},isDisabled:C,isFocused:A}),this.renderLiveRegion(),React__namespace.createElement(d,_extends({},N,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:C,isFocused:A,menuIsOpen:S}),React__namespace.createElement(y,_extends({},N,{isDisabled:C}),this.renderPlaceholderOrValue(),this.renderInput()),React__namespace.createElement(m,_extends({},N,{isDisabled:C}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(o,d){var m=d.prevProps,g=d.clearFocusValueOnUpdate,y=d.inputIsHiddenAfterUpdate,b=d.ariaSelection,x=d.isFocused,E=d.prevWasFocused,C=d.instancePrefix,S=o.options,A=o.value,N=o.menuIsOpen,k=o.inputValue,L=o.isMulti,G=cleanValue(A),M={};if(m&&(A!==m.value||S!==m.options||N!==m.menuIsOpen||k!==m.inputValue)){var z=N?buildFocusableOptions(o,G):[],V=N?buildFocusableOptionsWithIds(buildCategorizedOptions(o,G),"".concat(C,"-option")):[],Y=g?getNextFocusedValue(d,G):null,X=getNextFocusedOption(d,z),Q=getFocusedOptionId(V,X);M={selectValue:G,focusedOption:X,focusedOptionId:Q,focusableOptionsWithIds:V,focusedValue:Y,clearFocusValueOnUpdate:!1}}var $=y!=null&&o!==m?{inputIsHidden:y,inputIsHiddenAfterUpdate:void 0}:{},K=b,ee=x&&E;return x&&!ee&&(K={value:valueTernary(L,G,G[0]||null),options:G,action:"initial-input-focus"},ee=!E),b?.action==="initial-input-focus"&&(K=null),_objectSpread2(_objectSpread2(_objectSpread2({},M),$),{},{prevProps:o,ariaSelection:K,prevWasFocused:ee})}}]),r})(React.Component);Select.defaultProps=defaultProps;var StateManagedSelect=React.forwardRef(function(e,t){var r=useStateManager(e);return React__namespace.createElement(Select,_extends({ref:t},r))}),StateManagedSelect$1=StateManagedSelect;let SelectDistrict$1=class extends React.Component{constructor(t){super(t)}handleSelect(t){const{doSetDistrictFilter:r}=this.props;r(t)}render(){const{options:t,districtFilter:r}=this.props,{label:s,value:o}=r,d={control:m=>({...m,minHeight:"25px",height:"25px",fontSize:"14px",width:"150px"}),dropdownIndicator:m=>({...m,paddingTop:0,paddingBottom:0}),clearIndicator:m=>({...m,paddingTop:0,paddingBottom:0}),valueContainer:m=>({...m,padding:"0 8px"}),input:m=>({...m,margin:0,padding:0}),menu:m=>({...m,fontSize:"14px"}),option:m=>({...m,padding:"5px 14px"})};return jsxRuntime.jsx(StateManagedSelect$1,{id:"select-district",options:t,onChange:m=>{this.handleSelect(m)},styles:d,value:{label:s,value:o},defaultValue:{label:s,value:o}})}};const SelectDistrict=connect("doSetDistrictFilter","selectDistrictFilter",SelectDistrict$1);let ChangeLogModal$1=class extends React.Component{constructor(t){super(t),this.handleChange=this.handleChange.bind(this),this.close=this.close.bind(this),this.fomatDate=this.formatDate.bind(this)}handleChange(t){const{doSetSearchBarFilter:r}=this.props;r(t.target.value)}close(){const{doModalClose:t}=this.props;t()}formatDate(t){let r=new Date(t);return r=r.toLocaleDateString("default",{month:"long",day:"numeric",year:"numeric"}),r}render(){const{theme:t,doGetChangeLogData:r,changeLogItems:s,allChangeLogItems:o,searchBarFilter:d}=this.props,m=s;let g=[...new Set(o.map(E=>E.district_code))],y=[];g.sort().forEach((E,C)=>{E&&y.push({label:`${E}`,value:`${E}`})}),y.unshift({label:"All Districts",value:"All"});const b=m.map(E=>jsxRuntime.jsxs("div",{style:Object.keys(E).length>0?{listStyleType:"disc"}:{listStyleType:"none"},children:[E.change_date?jsxRuntime.jsx("li",{children:jsxRuntime.jsx("b",{children:this.formatDate(E.change_date)})},E.change_date+E.id):null,E.environment?jsxRuntime.jsxs("li",{style:{listStyleType:"none"},children:[jsxRuntime.jsx("b",{children:"Environment:"})," ",E.environment," "]},E.environment+E.id):null,E.change_type?jsxRuntime.jsxs("li",{style:{listStyleType:"none"},children:[jsxRuntime.jsx("b",{children:"Change Type:"})," ",E.change_type]},E.change_type+E.id):null,E.district_code?jsxRuntime.jsxs("li",{style:{listStyleType:"none"},children:[jsxRuntime.jsx("b",{children:"District:"})," ",E.district_code]},E.district_code+E.id):null,E.description?jsxRuntime.jsxs("li",{style:{listStyleType:"none"},children:[jsxRuntime.jsx("b",{children:"Description:"})," ",E.description]},E.description+E.id):null,jsxRuntime.jsx("br",{})]},E.id+E.id+9876)),x={display:"flex",justifyContent:"center",gap:"40px",width:"700px",alignItems:"flex-end",padding:"5px"};return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"cm-modal-header "+t,children:"Change Log"}),jsxRuntime.jsxs("div",{className:"cm-modal-body",children:[jsxRuntime.jsx("div",{style:x,children:jsxRuntime.jsx("label",{style:{fontSize:"18px",fontWeight:"bold"},children:"Change Log"})}),jsxRuntime.jsxs("div",{style:x,children:[jsxRuntime.jsx("label",{htmlFor:"select-district",children:jsxRuntime.jsx("b",{children:"Filter by District:"})}),jsxRuntime.jsx(SelectDistrict,{options:y})]}),jsxRuntime.jsxs("div",{style:x,children:[jsxRuntime.jsx("label",{htmlFor:"select-district",children:jsxRuntime.jsx("b",{children:"Search:"})}),jsxRuntime.jsx("input",{placeholder:"Change Log Search...",style:{width:"200px"},value:d,onChange:this.handleChange})]}),jsxRuntime.jsx("div",{style:{overflow:"auto scroll",width:"875px",height:"400px",whiteSpace:"pre-wrap"},children:jsxRuntime.jsx("ul",{children:b})})]}),jsxRuntime.jsxs("div",{className:"cm-modal-footer",children:[jsxRuntime.jsx("br",{}),jsxRuntime.jsx("br",{}),jsxRuntime.jsx("br",{}),jsxRuntime.jsx("button",{style:{textAlign:"left"},type:"Close",className:"cm-btn cm-btn-theme "+t,onClick:this.close,children:"Close"})]})]})}};const ChangeLogModal=connect("selectTheme","selectChangeLogItems","selectAllChangeLogItems","selectSearchBarFilter","doModalClose","doSubmitNotification","doGetChangeLogData","doSearchChangeLogData","doSetSearchBarFilter",ChangeLogModal$1),url$1="undefined",bundle$i={name:"changeLog",getReducer:()=>{const e={items:[],allItems:[],renderModal:!1,districtFilter:{label:"All Districts",value:"All"},searchBarFilter:"",executeSearch:!1};return(t=e,{type:r,payload:s})=>{switch(r){case"CHANGE_LOG_LOAD_ALL_DATA":case"CHANGE_LOG_MODAL_WINDOW_OPENED":case"CHANGE_LOG_LOAD_SELECTED_DATA":case"CHANGE_LOG_SET_DISTRICT_FILTER":case"CHANGE_LOG_SET_SEARCH_BAR_FILTER":case"CHANGE_LOG_EXECUTE_SEARCH":return Object.assign({},t,s);default:return t}}},doSearchChangeLogData:()=>({dispatch:e,store:t})=>{e({type:"CHANGE_LOG_EXECUTE_SEARCH",payload:{executeSearch:!1}});let r=t.selectAllChangeLogItems(),s=t.selectDistrictFilter(),o=t.selectSearchBarFilter().trim().toUpperCase(),d=[];if(s.value!=="All"?d=r.filter(m=>m.district_code===s.value):d=r,o.length>0){const m=[];d.forEach(g=>{let y=null;for(const[b,x]of Object.entries(g))typeof x=="string"&&x.trim().toUpperCase().includes(o)&&g&&(y=!0);y&&m.push(g)}),console.log("SELECTED ITEMS"),console.log(m),e({type:"CHANGE_LOG_LOAD_SELECTED_DATA",payload:{items:m}})}else e({type:"CHANGE_LOG_LOAD_SELECTED_DATA",payload:{items:d}})},doGetChangeLogData:()=>({dispatch:e,store:t,anonGet:r})=>{r(url$1,(s,o,d)=>{if(!(s||o.statusCode!==200))try{console.log("Production Change Log Data"),console.log(d);let m=JSON.parse(d);console.log("data"),console.log(m);let g=m.items;console.log("ITEMS"),console.log(g),e({type:"CHANGE_LOG_LOAD_ALL_DATA",payload:{allItems:g,renderModal:!1}}),e({type:"CHANGE_LOG_LOAD_SELECTED_DATA",payload:{items:g,renderModal:!0}})}catch{}})},doOpenModalLog:()=>({dispatch:e,store:t})=>{t.doModalOpen({children:[ChangeLogModal],options:{},openedBy:"ChangeLogButton"}),e({type:"CHANGE_LOG_MODAL_WINDOW_OPENED",payload:{renderModal:!1}})},doSetDistrictFilter:e=>({dispatch:t})=>{t({type:"CHANGE_LOG_SET_DISTRICT_FILTER",payload:{districtFilter:e}}),t({type:"CHANGE_LOG_EXECUTE_SEARCH",payload:{executeSearch:!0}})},doSetSearchBarFilter:e=>({dispatch:t})=>{t({type:"CHANGE_LOG_SET_SEARCH_BAR_FILTER",payload:{searchBarFilter:e}}),t({type:"CHANGE_LOG_EXECUTE_SEARCH",payload:{executeSearch:!0}})},selectChangeLogItems:e=>e.changeLog.items,selectAllChangeLogItems:e=>e.changeLog.allItems,selectDistrictFilter:e=>e.changeLog.districtFilter,selectSearchBarFilter:e=>e.changeLog.searchBarFilter,reactRenderChangeLogModal:e=>{if(e.changeLog.renderModal)return{actionCreator:"doOpenModalLog"}},reactDoSearchChangeLogData:e=>{if(e.changeLog.executeSearch)return{actionCreator:"doSearchChangeLogData"}}};class ChangeLogButton extends React.Component{constructor(t){super(t),this.handleClick=this.handleClick.bind(this),this.openModalLog=this.openModalLog.bind(this)}openModalLog(){const{doModalOpen:t}=this.props;t({children:[ChangeLogModal],options:{},openedBy:"ChangeLogButton"})}handleClick(){const{doGetChangeLogData:t}=this.props;this.openModalLog(),t()}render(){return jsxRuntime.jsx(SidebarButton,{iconClass:"mdi mdi-exclamation",label:"Change Log",title:"Change Log",onClick:this.handleClick})}}const changeLogButton=connect("doModalOpen","doGetChangeLogData",ChangeLogButton),plugin$m={pluginName:"changeLog",enabled:!0,bundle:bundle$i,components:[{component:changeLogButton,region:"right-sidebar-top",sortOrder:120}]};let ResourcesModal$1=class extends React.Component{constructor(t){super(t),this.state={},this.close=this.close.bind(this)}close(){const{doModalClose:t}=this.props;t()}render(){function t(g,y){let b=g.filter(x=>x.resource_group_id!==null&&x.resource_group_id===y);return b=b.sort((x,E)=>x.resource_sort-E.resource_sort),b}const{theme:r,doGetResourceData:s,resourceItems:o,resourceGroups:d}=this.props;let m=[];return m=d.map(g=>{let y="undefined"+g.groupId;return jsxRuntime.jsxs("div",{style:{paddingLeft:"25px",fontSize:"20px",fontWeight:"bold"},children:[jsxRuntime.jsxs("span",{children:[jsxRuntime.jsx("img",{src:y,width:"50px",height:"50px",onError:({currentTarget:b})=>{b.onerror=null,b.style.display="none"}},"imageID"+g.groupId),"      ",g.groupName]},"span"+g.groupId),jsxRuntime.jsx("br",{}),jsxRuntime.jsx("div",{style:{paddingLeft:"25px",fontSize:"16px"},children:jsxRuntime.jsxs("table",{className:"table",children:[jsxRuntime.jsx("thead",{children:jsxRuntime.jsxs("tr",{children:[jsxRuntime.jsx("th",{className:"col-md-6",style:{paddingRight:"40px"},children:"Description"}),jsxRuntime.jsx("th",{className:"col-md-6",children:"URL"})]},g.groupId+7777777777)}),jsxRuntime.jsx("tbody",{children:t(o,g.groupId).map(b=>jsxRuntime.jsxs("tr",{children:[jsxRuntime.jsx("td",{className:"col-md-6",style:{paddingRight:"40px"},children:b.description}),jsxRuntime.jsx("td",{className:"col-md-6",children:jsxRuntime.jsx("a",{href:b.url,target:"_blank",rel:"noreferrer nofollow noopener",download:"TEST_FILE",children:b.name})})]},b.resource_id))})]},"tableID"+g.groupId)},"itemDivID"+g.groupId),jsxRuntime.jsx("br",{})]},"image"+g.groupId)}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"cm-modal-header "+r,children:"Resources"}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{children:jsxRuntime.jsx("br",{})}),jsxRuntime.jsx("div",{children:jsxRuntime.jsx("div",{style:{overflow:"auto scroll",width:"875px",height:"390px",whiteSpace:"pre-wrap",paddingLeft:"25px"},children:m})})]}),jsxRuntime.jsxs("div",{className:"cm-modal-footer",children:[jsxRuntime.jsx("br",{}),jsxRuntime.jsx("br",{}),jsxRuntime.jsx("br",{}),jsxRuntime.jsx("button",{style:{textAlign:"left"},type:"Close",className:"cm-btn cm-btn-theme "+r,onClick:this.close,children:"Close"})]})]})}};const ResourcesModal=connect("selectTheme","selectResourceItems","selectResourceGroups","doModalClose","doGetResourceData",ResourcesModal$1),createResourceGroup=e=>{let t=[];for(let s=0;s<e.length;s++){let o=e[s].resource_group_id;if(o){let d={groupId:o,groupDescription:e[s]["group description"],groupName:e[s]["group name"],groupSort:e[s].group_sort};t.push(d)}}let r=t.reduce((s,o)=>s.find(m=>m.groupId===o.groupId)?s:s.concat([o]),[]);return r.sort((s,o)=>s.groupSort-o.groupSort),r},url="undefined",defaultHtml=[{name:"FUDSMIS Portal - Default",url:"https://fudsportal.usace.army.mil/"},{name:"IPaC Information for Planning and Consultation - Default",url:"https://ipac.ecosphere.fws.gov/"}],bundle$h={name:"resources",getReducer:()=>{const e={items:defaultHtml,groups:{},renderModal:!1};return(t=e,{type:r,payload:s})=>{switch(r){case"RESOURCES_LOAD_TEST_DATA":case"RESOURCES_LOAD_PRODUCTION_DATA":case"RESOURCES_MODAL_WINDOW_OPENED":return Object.assign({},t,s);default:return t}}},doGetResourceData:()=>({dispatch:e,store:t,anonGet:r})=>{r(url,(s,o,d)=>{if(s||o.statusCode!==200)e({type:"RESOURCES_LOAD_TEST_DATA",payload:{items:defaultHtml,groups:{},renderModal:!0}});else try{console.log("Production Resource Data");let g=JSON.parse(d).items,y={};y=createResourceGroup(g),console.log(g),console.log(y),e({type:"RESOURCES_LOAD_PRODUCTION_DATA",payload:{groups:y,items:g,renderModal:!0}})}catch{}})},doOpenModalResources:()=>({dispatch:e,store:t})=>{t.doModalOpen({children:[ResourcesModal],options:{},openedBy:"ResourcesButton"}),e({type:"RESOURCES_MODAL_WINDOW_OPENED",payload:{renderModal:!1}})},selectResourceItems:e=>e.resources.items,selectResourceGroups:e=>e.resources.groups,reactRenderResourceModal:e=>{if(e.resources.renderModal===!0)return{actionCreator:"doOpenModalResources"}}};class ResourcesButton extends React.Component{constructor(t){super(t),this.handleClick=this.handleClick.bind(this),this.openModalResources=this.openModalResources.bind(this)}openModalResources(){const{doModalOpen:t}=this.props;t({children:[ResourcesModal],options:{},openedBy:"ResourcesButton"})}handleClick(){const{doGetResourceData:t}=this.props;t()}render(){return jsxRuntime.jsx(SidebarButton,{iconClass:"mdi mdi-library",label:"Resources",title:"Resources",onClick:this.handleClick})}}const resourcesButton=connect("doModalOpen","doGetResourceData",ResourcesButton),plugin$l={pluginName:"resources",enabled:!0,bundle:bundle$h,components:[{component:resourcesButton,region:"right-sidebar-top",sortOrder:130}]},CoordinateLatLonInput$1=e=>{const{label:t,placeholder:r,doUpdateCoordInput:s,coordsLatLonInput:o}=e;return jsxRuntime.jsx("li",{children:jsxRuntime.jsx("span",{className:"cm-form-horizontal",children:jsxRuntime.jsxs("div",{className:"cm-form-group",style:{marginBottom:0},children:[jsxRuntime.jsx("label",{className:"col-md-1",style:{paddingTop:"3px"},children:t}),jsxRuntime.jsx("div",{className:"col-md-10",children:jsxRuntime.jsx("input",{type:"text",className:"cm-form-control cm-input-sm",onChange:d=>{s(d,t)},value:o[`${t}`],placeholder:r})})]})})})},CoordinateLatLonInput=connect("doUpdateCoordInput","selectCoordsLatLonInput",CoordinateLatLonInput$1),CoordinateDisplay$1=e=>{const{doStartCoordCopy:t,coordsCopyActive:r,coordsLatLonInput:s,doCoordZoomTo:o,coordsValues:d}=e,m=!(s.X.length>0&&s.Y.length>0);return jsxRuntime.jsx(BasicToolbarButton,{enabled:!0,dropup:!0,iconClass:"",title:"Coordinate Display",text:`${d.X}, ${d.Y}`,passProps:{style:{minWidth:180}},children:jsxRuntime.jsxs(BasicToolbarMenuUp,{children:[jsxRuntime.jsx(BasicToolbarMenuItem,{active:!1,iconClass:"mdi mdi-content-copy icon-inline",title:"Copy Coordinate to Clipboard",text:"Copy Coordinate to Clipboard",onClick:t,disabled:r,passProps:{}}),jsxRuntime.jsx(CoordinateLatLonInput,{label:"X",placeholder:"Enter Longitude.."}),jsxRuntime.jsx(CoordinateLatLonInput,{label:"Y",placeholder:"Enter Latitude.."}),jsxRuntime.jsx(BasicToolbarMenuItem,{active:!1,iconClass:"mdi mdi-map-marker-radius icon-inline",title:"Go to Coordinate",text:"Go to Coordinate",onClick:o,passProps:{},disabled:m})]})})},CoordinateDisplay=connect("doStartCoordCopy","doCoordZoomTo","selectCoordsCopyActive","selectCoordsLatLonInput","selectCoordsValues",CoordinateDisplay$1);class CoordinateDisplayProjItem extends React.Component{constructor(t){super(t),this.onSelect=this.onSelect.bind(this),this.onRemove=this.onRemove.bind(this)}onSelect(){const{proj:t,onSelect:r}=this.props;r(t.epsg,t.name)}onRemove(){const{proj:t,onRemove:r}=this.props;r(t.epsg)}render(){const{proj:t,epsg:r,i:s}=this.props,o="https://epsg.io/"+t.epsg.split(":")[1];return jsxRuntime.jsxs("li",{className:"cm-list-group-item clearfix",children:[jsxRuntime.jsx("div",{className:"col-md-6",children:jsxRuntime.jsx("div",{style:{margin:0},className:"radio",children:jsxRuntime.jsxs("label",{children:[jsxRuntime.jsx("input",{onChange:this.onSelect,type:"radio",name:"choose-epsg",id:"choose-epsg"+s,value:t.epsg,checked:t.epsg===r}),t.name]})})}),jsxRuntime.jsx("div",{className:"col-md-3",children:jsxRuntime.jsx("a",{href:o,target:"_blank",title:"More information on epsg.io",children:t.epsg})}),jsxRuntime.jsx("div",{className:"col-md-3",children:jsxRuntime.jsx("div",{className:"pull-right",children:jsxRuntime.jsx("button",{onClick:this.onRemove,className:"cm-btn cm-btn-link cm-btn-xs",children:"Remove"})})})]})}}class CoordinateDisplaySettings extends React.Component{constructor(t){super(t),this.state={addEpsg:"",filterString:"",height:window.innerHeight*.5},this.close=this.close.bind(this),this.filterFn=this.filterFn.bind(this),this.updateAddEpsg=this.updateAddEpsg.bind(this),this.updateFilterString=this.updateFilterString.bind(this),this.onSelect=this.onSelect.bind(this),this.onRemove=this.onRemove.bind(this),this.getProjDef=this.getProjDef.bind(this)}close(){const{doModalClose:t}=this.props;t()}filterFn(t){const{filterString:r}=this.state;return(t.name.toLowerCase()+" "+t.epsg.toLowerCase()).indexOf(r)!==-1}updateAddEpsg(t){const r=t.currentTarget.value;this.setState({addEpsg:""+r.toUpperCase()})}updateFilterString(t){const r=t.currentTarget.value;this.setState({filterString:r.toLowerCase()})}onSelect(t,r){const{doSelectProjection:s}=this.props;s(t,r)}onRemove(t){const{doRemoveProjection:r}=this.props;r(t)}getProjDef(){const{doLoadProjDef:t}=this.props;let r=this.state.addEpsg;r.indexOf("EPSG")===-1&&(r="EPSG:"+r),t(r)}render(){const{theme:t,projectionList:r,displayProjection:s,projectionCanUseEPSGIO:o}=this.props,{addEpsg:d,filterString:m,height:g}=this.state,y=_.filter(r,this.filterFn);return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"cm-modal-header "+t,children:"Coordinate Display Settings"}),jsxRuntime.jsxs("div",{className:"cm-modal-body",style:{height:g,overflow:"auto"},children:[jsxRuntime.jsxs("div",{className:"row",children:[jsxRuntime.jsx("div",{className:"col-xs-6",children:jsxRuntime.jsxs("div",{className:"cm-form-group",children:[jsxRuntime.jsx("label",{className:"cm-control-label",children:"Filter the list by searching names and EPSG codes here:"}),jsxRuntime.jsx("input",{onChange:this.updateFilterString,value:m,type:"text",className:"cm-form-control cm-input-sm",placeholder:"Filter list..."})]})}),jsxRuntime.jsx("div",{className:"col-xs-6",children:jsxRuntime.jsxs("div",{className:"cm-form-group",children:[jsxRuntime.jsxs("label",{className:"cm-control-label",children:["Add more supported projections from"," ",jsxRuntime.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:"https://epsg.io",children:"epsg.io"})]}),o?jsxRuntime.jsxs("div",{className:"cm-input-group",children:[jsxRuntime.jsx("input",{onChange:this.updateAddEpsg,value:d,type:"text",className:"cm-form-control cm-input-sm",placeholder:"Enter the EPSG code i.e. EPSG:4326 or 4326"}),jsxRuntime.jsx("span",{className:"cm-input-group-btn",children:jsxRuntime.jsx("button",{onClick:this.getProjDef,className:"cm-btn cm-btn-theme cm-btn-sm "+t,type:"button",children:"Go"})})]}):jsxRuntime.jsx("div",{children:"Connection to EPSG.io unavailable at this time"})]})})]}),jsxRuntime.jsx("div",{className:"row",children:jsxRuntime.jsx("ul",{className:"cm-list-group thin-scrollbar",style:{margin:"15px",overflow:"auto"},children:y.map((b,x)=>jsxRuntime.jsx(CoordinateDisplayProjItem,{proj:b,epsg:s,i:x,onSelect:this.onSelect,onRemove:this.onRemove},b.epsg))})})]}),jsxRuntime.jsx("div",{className:"cm-modal-footer",children:jsxRuntime.jsx("button",{className:"cm-btn cm-btn-theme "+t,onClick:this.close,children:"Close"})})]})}}const Settings$1=connect("selectTheme","selectProjectionList","selectDisplayProjection","selectProjectionCanUseEPSGIO","doModalClose","doRemoveProjection","doSelectProjection","doLoadProjDef",CoordinateDisplaySettings);let CoordinateInteraction$1=class extends React.Component{constructor(t){super(t),this.openSettings=this.openSettings.bind(this)}openSettings(){const{doModalOpen:t,doBasicToolbarDeactivate:r}=this.props;t({children:[Settings$1],options:{},openedBy:"PositionText"}),r()}render(){const{displayProjection:t,displayProjectionName:r}=this.props;return jsxRuntime.jsx(BasicToolbarButton,{enabled:!0,dropup:!0,iconClass:"",title:`Current Coordinate System: ${r}`,text:t,onDeactivate:this.cleanUp,children:jsxRuntime.jsx(BasicToolbarMenuUp,{children:jsxRuntime.jsx(BasicToolbarMenuItem,{active:!1,iconClass:"mdi mdi-settings icon-inline",title:"Set Display Coordinate System",text:"Set Display Coordinate System",onClick:this.openSettings,passProps:{}})})})}};const CoordinateInteraction=connect("selectDisplayProjection","selectDisplayProjectionName","doModalOpen","doBasicToolbarDeactivate",CoordinateInteraction$1),CoordinatePopup=e=>{const{coords:t,onClear:r,overlay:s}=e;return jsxRuntime.jsxs("div",{className:"panel panel-default top clearfix",style:{marginBottom:0},children:[jsxRuntime.jsx("div",{className:"pull-right",children:jsxRuntime.jsx("i",{style:{cursor:"pointer"},title:"Clear",className:"mdi mdi-close",onClick:o=>r(o,s)})}),jsxRuntime.jsx("div",{className:"arrow"}),jsxRuntime.jsx("div",{className:"panel-body",children:jsxRuntime.jsx("div",{style:{minWidth:"125px",textAlign:"center"},children:`${t.x}, ${t.y}`})})]})};var throttle_1,hasRequiredThrottle;function requireThrottle(){if(hasRequiredThrottle)return throttle_1;hasRequiredThrottle=1;var e=requireDebounce(),t=requireIsObject(),r="Expected a function";function s(o,d,m){var g=!0,y=!0;if(typeof o!="function")throw new TypeError(r);return t(m)&&(g="leading"in m?!!m.leading:g,y="trailing"in m?!!m.trailing:y),e(o,d,{leading:g,maxWait:d,trailing:y})}return throttle_1=s,throttle_1}var throttleExports=requireThrottle();const throttle=getDefaultExportFromCjs$1(throttleExports),bundle$g={name:"coordinateDisplay",getReducer(){const e={values:{X:"0.0000",Y:"0.0000"},latLonInput:{X:"",Y:""},copyActive:!1,overlay:null,container:null,_shouldInitialize:!1};return(t=e,{type:r,payload:s})=>{switch(r){case"MAP_INITIALIZED":return Object.assign({},t,{_shouldInitialize:!0});case"COORD_COPY_ACTIVE":case"COORD_COPIED":case"COORD_INPUT_UPDATED":case"COORD_INPUT_INVALID":case"COORD_INITIALIZE_START":case"COORD_INITIALIZE_FINISH":case"COORD_POSITION_UPDATE":case"COORD_OVERLAY_RENDERED":case"COORD_OVERLAY_REMOVED":return Object.assign({},t,s);default:return t}}},doCoordsInitialize:()=>({dispatch:e,store:t})=>{e({type:"COORD_INITIALIZE_START",payload:{_shouldInitialize:!1}}),t.selectMap().on("pointermove",throttle(t.doCoordsPointerMove,200)),e({type:"COORD_INITIALIZE_FINISH"})},doCoordsPointerMove:e=>({dispatch:t,store:r})=>{e.preventDefault(),e.stopPropagation();const s=r.selectDisplayProjection(),o=e.coordinate,d=proj.transform(o,"EPSG:3857",s),m=Math.round(d[0]*1e4)/1e4,g=Math.round(d[1]*1e4)/1e4;t({type:"COORD_POSITION_UPDATE",payload:{values:{X:m,Y:g}}})},doRenderCoordsOverlay:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectMap(),d=s.selectCoordsOverlay();d&&s.doClearCoordOverlay(d);const m=document.createElement("div"),g=new Overlay$1({element:m,positioning:"bottom-center",offset:[0,-10]});o.addOverlay(g),ReactDOM.render(jsxRuntime.jsx(CoordinatePopup,{overlay:g,coords:t,map:o,onClear:s.doClearPopup}),m),g.setPosition(e),r({type:"COORD_OVERLAY_RENDERED",payload:{overlay:g}})},doClearPopup:(e,t)=>({store:r})=>{console.log(e),e.preventDefault(),e.stopPropagation(),r.doClearCoordOverlay(t)},doClearCoordOverlay:e=>({dispatch:t,store:r})=>{const s=r.selectMap();e.setPosition(void 0);const o=e.getElement();o.parentNode.removeChild(o),s.removeOverlay(e),t({type:"COORD_OVERLAY_REMOVED",payload:{overlay:null}})},doStartCoordCopy:()=>({dispatch:e,store:t})=>{const r=t.selectMap();t.doSetCursor("crosshair");const s=document.createElement("div");s.id="cm-copy-coords",document.body.appendChild(s),e({type:"COORD_COPY_ACTIVE",payload:{copyActive:!0,container:s,notification:{message:"Click on map to copy coordinates.",level:"info"}}}),r.once("singleclick",t.doCoordCopy)},doCoordCopy:e=>({dispatch:t,store:r})=>{e.preventDefault(),e.stopPropagation();const s=r.selectCoordsContainer(),o=r.selectDisplayProjection(),d=e.coordinate,m=proj.transform(d,"EPSG:3857",o),g=Math.round(m[0]*1e4)/1e4,y=Math.round(m[1]*1e4)/1e4,b=document.createElement("input");s.appendChild(b),b.value=`${g}, ${y}`,b.select(),document.execCommand("copy"),r.doStopCoordCopy(g,y)},doStopCoordCopy:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectCoordsContainer(),d=`Copied ${e}, ${t} to the clipboard.`;s.doSetCursor("default"),r({type:"COORD_COPIED",payload:{copyActive:!1,container:null,notification:{title:"Coordinate Display",message:d,level:"info"}}}),o.remove(),s.doBasicToolbarDeactivate()},doUpdateCoordInput:(e,t)=>({dispatch:r,store:s})=>{e.preventDefault(),e.stopPropagation();const o=s.selectCoordsLatLonInput();r({type:"COORD_INPUT_UPDATED",payload:{latLonInput:{...o,[`${t}`]:e.currentTarget.value}}})},doCoordZoomTo:()=>({dispatch:e,store:t})=>{const r=t.selectCoordsLatLonInput(),s=t.selectDisplayProjection(),o=Number(r.X),d=Number(r.Y);if(isNaN(o)||isNaN(d))e({type:"COORD_INPUT_INVALID",payload:{notification:{title:"Coordinate Display",message:"Enter valid number.",level:"danger"}}});else{const m=proj.transform([o,d],s,"EPSG:3857");t.doRenderCoordsOverlay(m,{x:o,y:d}),t.doZoomToLocation(m,13),t.doBasicToolbarDeactivate()}},selectCoordsValues:e=>e.coordinateDisplay.values,selectCoordsOverlay:e=>e.coordinateDisplay.overlay,selectCoordsContainer:e=>e.coordinateDisplay.container,selectCoordsCopyActive:e=>e.coordinateDisplay.copyActive,selectCoordsLatLonInput:e=>e.coordinateDisplay.latLonInput,reactCoordinateDisplayShouldInitialize:e=>{if(e.coordinateDisplay._shouldInitialize)return{actionCreator:"doCoordsInitialize"}}},plugin$k={pluginName:"PositionText",enabled:!0,bundle:bundle$g,components:[{component:CoordinateDisplay,region:"lower-right-toolbar",sortOrder:10},{component:CoordinateInteraction,region:"lower-right-toolbar",sortOrder:20}]};class DrawToolItem extends React.Component{constructor(t){super(t),this.toggleVisible=this.toggleVisible.bind(this),this.renderTextContent=this.renderTextContent.bind(this),this.renderVisibilityIcon=this.renderVisibilityIcon.bind(this)}toggleVisible(t){t.preventDefault(),t.stopPropagation();const{onToggleVisibility:r}=this.props;r()}renderTextContent(){const{liveDangerously:t,text:r}=this.props;return t?jsxRuntime.jsx("span",{dangerouslySetInnerHTML:{__html:r}}):r}renderVisibilityIcon(){const{visible:t}=this.props,r=classnames({"pull-right":!0}),s=classnames({mdi:!0,"mdi-eye":t,"text-primary":t,"mdi-eye-off":!t});return jsxRuntime.jsx("div",{onClick:this.toggleVisible,className:r,style:{position:"relative",right:"-20px"},title:"Show/Hide",children:jsxRuntime.jsx("i",{className:s})})}render(){const{active:t,passProps:r,onClick:s,iconClass:o}=this.props,d=classnames({active:t});return jsxRuntime.jsx("li",{className:d,...r,onClick:s,style:{paddingRight:"20px"},children:jsxRuntime.jsxs("span",{children:[this.renderVisibilityIcon(),jsxRuntime.jsx("i",{className:o}),this.renderTextContent()]})})}}let DrawButton$1=class extends React.Component{constructor(t){super(t),this.state={mode:null},this.updateMode=this.updateMode.bind(this),this.handleDeactivate=this.handleDeactivate.bind(this),this.removeInteractions=this.removeInteractions.bind(this)}handleDeactivate(){this.setState({mode:null},this.removeInteractions)}addInteractions(){this.removeInteractions();const{doDrawPointsAddInteractions:t,doDrawLinesAddInteractions:r,doDrawPolygonsAddInteractions:s,doDrawLabelsAddInteractions:o,doDrawModifyAddInteractions:d}=this.props,{mode:m}=this.state;switch(m){case"Point":return t();case"LineString":return r();case"Polygon":return s();case"Labels":return o();case"Modify":return d();default:return}}removeInteractions(){const{doDrawPointsRemoveInteractions:t,doDrawLinesRemoveInteractions:r,doDrawPolygonsRemoveInteractions:s,doDrawLabelsRemoveInteractions:o,doDrawModifyRemoveInteractions:d}=this.props;t(),r(),s(),o(),d()}updateMode(t){const r=t.currentTarget.dataset.mode;this.setState({mode:r},this.addInteractions)}render(){const{drawPointsVisible:t,drawPointsActive:r,doDrawPointsToggleVisible:s,drawLinesVisible:o,drawLinesActive:d,doDrawLinesToggleVisible:m,drawPolygonsVisible:g,drawPolygonsActive:y,doDrawPolygonsToggleVisible:b,drawLabelsActive:x,drawModifyActive:E,doDrawSaveDownload:C}=this.props;return jsxRuntime.jsx(BasicToolbarButton,{enabled:!0,iconClass:"mdi mdi-pencil",title:"Draw Tools",onDeactivate:this.handleDeactivate,children:jsxRuntime.jsxs(BasicToolbarMenu,{children:[jsxRuntime.jsx(BasicToolbarMenuItem,{active:E,iconClass:"ms ms-draw icon-inline",title:"Modify Draw Features",text:"Modify Draw Features",onClick:this.updateMode,passProps:{"data-mode":"Modify"}}),jsxRuntime.jsx(BasicToolbarMenuItem,{active:x,iconClass:"ms ms-label-o icon-inline",title:"Add / Edit Labels",text:"Add / Edit Labels",onClick:this.updateMode,passProps:{"data-mode":"Labels"}}),jsxRuntime.jsx(BasicToolbarMenuDivider,{}),jsxRuntime.jsx(DrawToolItem,{active:r,visible:t,iconClass:"ms ms-draw-point icon-inline",title:"Draw Points",text:"Draw Points",onClick:this.updateMode,passProps:{"data-mode":"Point"},onToggleVisibility:s}),jsxRuntime.jsx(DrawToolItem,{active:d,visible:o,iconClass:"ms ms-draw-line icon-inline",title:"Draw Lines",text:"Draw Lines",onClick:this.updateMode,passProps:{"data-mode":"LineString"},onToggleVisibility:m}),jsxRuntime.jsx(DrawToolItem,{active:y,visible:g,iconClass:"ms ms-draw-polygon icon-inline",title:"Draw Polygons",text:"Draw Polygons",onClick:this.updateMode,passProps:{"data-mode":"Polygon"},onToggleVisibility:b}),jsxRuntime.jsx(BasicToolbarMenuDivider,{}),jsxRuntime.jsx(BasicToolbarMenuItem,{active:!1,iconClass:"mdi mdi-download icon-inline",title:"Download Draw Layers as GeoJSON",text:"Download Draw Layers",onClick:C,passProps:{}})]})})}};const DrawButton=connect("selectDrawPointsVisible","selectDrawPointsActive","doDrawPointsToggleVisible","doDrawPointsAddInteractions","doDrawPointsRemoveInteractions","selectDrawLinesVisible","selectDrawLinesActive","doDrawLinesToggleVisible","doDrawLinesAddInteractions","doDrawLinesRemoveInteractions","selectDrawPolygonsVisible","selectDrawPolygonsActive","doDrawPolygonsToggleVisible","doDrawPolygonsAddInteractions","doDrawPolygonsRemoveInteractions","selectDrawLabelsActive","doDrawLabelsAddInteractions","doDrawLabelsRemoveInteractions","selectDrawModifyActive","doDrawModifyAddInteractions","doDrawModifyRemoveInteractions","doDrawSave","doDrawSaveDownload",DrawButton$1),styles=e=>{const t="rgba(245, 66, 233, 1)",r="rgba(245, 66, 233, 0.6)",s="#ffffff";return{Point:d=>{const m=d.get("label")||"";return new Style({image:new Circle({radius:7,fill:new Fill({color:t}),stroke:new Stroke({color:s,width:3})}),text:new Text({placement:"point",font:"14px sans-serif",weight:"bold",text:m,textAlign:"left",textBaseline:"bottom",offsetX:4,offsetY:-4,overflow:!0,stroke:new Stroke({color:s,width:3})}),fill:new Fill({color:t}),stroke:new Stroke({color:s,width:3})})},LineString:d=>{const m=d.get("label")||"";return[new Style({stroke:new Stroke({color:s,width:4})}),new Style({text:new Text({font:"14px sans-serif",weight:"bold",text:m,textAlign:"center",textBaseline:"middle",placement:"line",overflow:!0,stroke:new Stroke({color:s,width:3})}),stroke:new Stroke({color:t,width:2})})]},Polygon:d=>{const m=d.get("label")||"";return new Style({text:new Text({placement:"point",font:"14px sans-serif",weight:"bold",text:m,textAlign:"center",textBaseline:"middle",overflow:!0,stroke:new Stroke({color:s,width:3})}),fill:new Fill({color:r}),stroke:new Stroke({color:s,width:3})})}}[e]},geoJSON$3=new GeoJSON,createDrawBundle=e=>{const r=Object.assign({},{name:"draw",type:"Point",active:!1,visible:!0},e),s=r.name.charAt(0).toUpperCase()+r.name.slice(1),o=r.name.toUpperCase(),d={INITIALIZE_START:`${o}_INITIALIZE_START`,INITIALIZE_FINISH:`${o}_INITIALIZE_FINISH`,SHOW:`${o}_SHOW`,HIDE:`${o}_HIDE`,ACTIVATE:`${o}_ACTIVATE`,DEACTIVATE:`${o}_DEACTIVATE`},m=`do${s}Initialize`,g=`do${s}AddLayer`,y=`do${s}RemoveLayer`,b=`do${s}AddInteractions`,x=`do${s}RemoveInteractions`,E=`do${s}ToggleVisible`,C=`do${s}ToggleInteractions`,S=`select${s}Layer`,A=`select${s}DrawInteraction`,N=`select${s}InterselectInteractions`,k=`select${s}Active`,L=`select${s}Visible`,G=`react${s}ShouldInitialize`;return{name:r.name,getReducer(){const M={active:r.active,visible:r.visible,layer:null,drawInteraction:null,shouldInitialize:!1};return(z=M,{type:V,payload:Y})=>{switch(V){case d.INITIALIZE_START:case d.INITIALIZE_FINISH:case d.SHOW:case d.HIDE:case d.ACTIVATE:case d.DEACTIVATE:return Object.assign({},z,Y);case"DRAW_SAVE_INITIALIZE_FINISHED":return Object.assign({},z,{shouldInitialize:!0});default:return z}}},[m]:()=>({dispatch:M,store:z})=>{M({type:d.INITIALIZE_START,payload:{shouldInitialize:!1}});const V=`selectDrawSaveCache${r.type}`,Y=z[V](),X=new VectorSrc;if(Y&&Y.features&&Y.features.length){const K=geoJSON$3.readFeaturesFromObject(Y,{featureProjection:z.selectMapProjection(),dataProjection:z.selectGeoProjection()});X.addFeatures(K)}X.on("change",debounce(z.doDrawSave,300));const Q=new Vector({source:X,zIndex:9e4,style:styles(r.type)}),$=new Draw({source:X,type:r.type});r.visible&&z.selectMap().addLayer(Q),M({type:d.INITIALIZE_FINISH,payload:{layer:Q,drawInteraction:$}})},[g]:()=>({dispatch:M,store:z})=>{const V=z.selectMap(),Y=z[S]();V.addLayer(Y),M({type:d.SHOW,payload:{visible:!0}})},[y]:()=>({dispatch:M,store:z})=>{const V=z.selectMap(),Y=z[S]();V.removeLayer(Y),M({type:d.HIDE,payload:{visible:!1}})},[E]:()=>({dispatch:M,store:z})=>{z[L]()?z[y]():z[g]()},[b]:()=>({dispatch:M,store:z})=>{z.doSetCursor("crosshair");const V=z.selectMap();z[N]().forEach(X=>{V.addInteraction(X)}),M({type:d.ACTIVATE,payload:{active:!0}})},[x]:()=>({dispatch:M,store:z})=>{z.doSetCursor();const V=z.selectMap();z[N]().forEach(X=>{V.removeInteraction(X)}),M({type:d.DEACTIVATE,payload:{active:!1}})},[C]:()=>({store:M})=>{M.selectActive()?M[x]():M[b]()},[k]:M=>M[r.name].active,[L]:M=>M[r.name].visible,[S]:M=>M[r.name].layer,[A]:M=>M[r.name].drawInteraction,[N]:reduxBundler.createSelector(A,M=>[M]),[G]:M=>{if(M[r.name].shouldInitialize)return{actionCreator:m}}}},drawLabelBundle={name:"drawLabels",getReducer:()=>{const e={active:!1,select:null,shouldInitialize:!1};return(t=e,{type:r,payload:s})=>{switch(r.indexOf("DRAW")!==-1&&console.log(r),r){case"DRAW_LABELS_INITIALIZE_START":case"DRAW_LABELS_INITIALIZE_FINISH":case"DRAW_LABELS_ACTIVATE":case"DRAW_LABELS_DEACTIVATE":return Object.assign({},t,s);case"DRAWPOINTS_INITIALIZE_FINISH":case"DRAWLINES_INITIALIZE_FINISH":case"DRAWPOLYGONS_INITIALIZE_FINISH":return Object.assign({},t,{shouldInitialize:!0});default:return t}}},doDrawLabelsInitialize:()=>({dispatch:e,store:t})=>{e({type:"DRAW_LABELS_INITIALIZE_START",payload:{shouldInitialize:!1}});const r=t.selectDrawLabelsChildLayers();if(!r)return null;const s=new Select$1({layers:r});s.on("select",t.doDrawLabelsHandleSelect),e({type:"DRAW_LABELS_INITIALIZE_FINISH",payload:{select:s}})},doDrawLabelsAddInteractions:()=>({dispatch:e,store:t})=>{t.doSetCursor("pointer");const r=t.selectMap(),s=t.selectDrawLabelsInteraction();r.addInteraction(s),e({type:"DRAW_LABELS_ACTIVATE",payload:{active:!0}})},doDrawLabelsRemoveInteractions:()=>({dispatch:e,store:t})=>{t.doSetCursor();const r=t.selectMap(),s=t.selectDrawLabelsInteraction();r.removeInteraction(s),e({type:"DRAW_LABELS_DEACTIVATE",payload:{active:!1}})},doDrawLabelsHandleSelect:e=>({store:t})=>{const r=e.selected[0],s=r.get("label")||"",o=window.prompt("Label the Draw Feature",s);r.set("label",o),t.selectDrawLabelsInteraction().getFeatures().clear()},selectDrawLabelsChildLayers:reduxBundler.createSelector("selectDrawPointsLayer","selectDrawLinesLayer","selectDrawPolygonsLayer",(e,t,r)=>!e||!t||!r?null:[e,t,r]),selectDrawLabelsActive:e=>e.drawLabels.active,selectDrawLabelsInteraction:e=>e.drawLabels.select,reactDrawLabelsShouldInitialize:e=>{if(e.drawLabels.shouldInitialize)return{actionCreator:"doDrawLabelsInitialize"}}},drawModifyBundle={name:"drawModify",getReducer:()=>{const e={active:!1,select:null,modify:null,shouldInitialize:!1};return(t=e,{type:r,payload:s})=>{switch(r){case"DRAW_MODIFY_INITIALIZE_START":case"DRAW_MODIFY_INITIALIZE_FINISH":case"DRAW_MODIFY_ACTIVATE":case"DRAW_MODIFY_DEACTIVATE":return Object.assign({},t,s);case"DRAWPOINTS_INITIALIZE_FINISH":case"DRAWLINES_INITIALIZE_FINISH":case"DRAWPOLYGONS_INITIALIZE_FINISH":return Object.assign({},t,{shouldInitialize:!0});default:return t}}},doDrawModifyInitialize:()=>({dispatch:e,store:t})=>{e({type:"DRAW_MODIFY_INITIALIZE_START",payload:{shouldInitialize:!1}});const r=t.selectDrawModifyChildLayers();if(!r)return null;const s=new Select$1({layers:r}),o=new Modify({features:s.getFeatures()});e({type:"DRAW_MODIFY_INITIALIZE_FINISH",payload:{select:s,modify:o}})},doDrawModifyAddInteractions:()=>({dispatch:e,store:t})=>{t.doSetCursor("pointer");const r=t.selectMap();t.selectDrawModifyInteraction().forEach(o=>{r.addInteraction(o)}),window.addEventListener("keyup",t.doDrawModifyHandleKeyUp),e({type:"DRAW_MODIFY_ACTIVATE",payload:{active:!0}})},doDrawModifyRemoveInteractions:()=>({dispatch:e,store:t})=>{t.doSetCursor();const r=t.selectMap();t.selectDrawModifyInteraction().forEach(o=>{r.removeInteraction(o)}),window.removeEventListener("keyup",t.doDrawModifyHandleKeyUp),e({type:"DRAW_MODIFY_DEACTIVATE",payload:{active:!1}})},doDrawModifyHandleSelect:e=>({store:t})=>{const r=e.selected[0],s=r.get("label")||"",o=window.prompt("Label the Draw Feature",s);r.set("label",o),t.selectDrawModifyInteraction().getFeatures().clear()},doDrawModifyHandleKeyUp:e=>({store:t})=>{const r=e.keyCode,o=t.selectDrawModifySelect().getFeatures(),d=t.selectDrawModifyChildLayers();if(!d)return null;[8,46].indexOf(r)!==-1&&(o.forEach(m=>{d.forEach(g=>{const y=g.getSource();y.hasFeature(m)&&y.removeFeature(m)})}),o.clear())},selectDrawModifyChildLayers:reduxBundler.createSelector("selectDrawPointsLayer","selectDrawLinesLayer","selectDrawPolygonsLayer",(e,t,r)=>!e||!t||!r?null:[e,t,r]),selectDrawModifyActive:e=>e.drawModify.active,selectDrawModifySelect:e=>e.drawModify.select,selectDrawModifyModify:e=>e.drawModify.modify,selectDrawModifyInteraction:reduxBundler.createSelector("selectDrawModifySelect","selectDrawModifyModify",(e,t)=>[e,t]),reactDrawModifyShouldInitialize:e=>{if(e.drawModify.shouldInitialize)return{actionCreator:"doDrawModifyInitialize"}}};var FileSaver_min$1={exports:{}},FileSaver_min=FileSaver_min$1.exports,hasRequiredFileSaver_min;function requireFileSaver_min(){return hasRequiredFileSaver_min||(hasRequiredFileSaver_min=1,(function(e,t){(function(r,s){s()})(FileSaver_min,function(){function r(b,x){return typeof x>"u"?x={autoBom:!1}:typeof x!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),x={autoBom:!x}),x.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(b.type)?new Blob(["\uFEFF",b],{type:b.type}):b}function s(b,x,E){var C=new XMLHttpRequest;C.open("GET",b),C.responseType="blob",C.onload=function(){y(C.response,x,E)},C.onerror=function(){console.error("could not download file")},C.send()}function o(b){var x=new XMLHttpRequest;x.open("HEAD",b,!1);try{x.send()}catch{}return 200<=x.status&&299>=x.status}function d(b){try{b.dispatchEvent(new MouseEvent("click"))}catch{var x=document.createEvent("MouseEvents");x.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),b.dispatchEvent(x)}}var m=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof commonjsGlobal=="object"&&commonjsGlobal.global===commonjsGlobal?commonjsGlobal:void 0,g=m.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),y=m.saveAs||(typeof window!="object"||window!==m?function(){}:"download"in HTMLAnchorElement.prototype&&!g?function(b,x,E){var C=m.URL||m.webkitURL,S=document.createElement("a");x=x||b.name||"download",S.download=x,S.rel="noopener",typeof b=="string"?(S.href=b,S.origin===location.origin?d(S):o(S.href)?s(b,x,E):d(S,S.target="_blank")):(S.href=C.createObjectURL(b),setTimeout(function(){C.revokeObjectURL(S.href)},4e4),setTimeout(function(){d(S)},0))}:"msSaveOrOpenBlob"in navigator?function(b,x,E){if(x=x||b.name||"download",typeof b!="string")navigator.msSaveOrOpenBlob(r(b,E),x);else if(o(b))s(b,x,E);else{var C=document.createElement("a");C.href=b,C.target="_blank",setTimeout(function(){d(C)})}}:function(b,x,E,C){if(C=C||open("","_blank"),C&&(C.document.title=C.document.body.innerText="downloading..."),typeof b=="string")return s(b,x,E);var S=b.type==="application/octet-stream",A=/constructor/i.test(m.HTMLElement)||m.safari,N=/CriOS\/[\d]+/.test(navigator.userAgent);if((N||S&&A||g)&&typeof FileReader<"u"){var k=new FileReader;k.onloadend=function(){var M=k.result;M=N?M:M.replace(/^data:[^;]*;/,"data:attachment/file;"),C?C.location.href=M:location=M,C=null},k.readAsDataURL(b)}else{var L=m.URL||m.webkitURL,G=L.createObjectURL(b);C?C.location=G:location.href=G,C=null,setTimeout(function(){L.revokeObjectURL(G)},4e4)}});m.saveAs=y.saveAs=y,e.exports=y})})(FileSaver_min$1)),FileSaver_min$1.exports}var FileSaver_minExports=requireFileSaver_min();const FileSaver=getDefaultExportFromCjs$1(FileSaver_minExports),geoJSON$2=new GeoJSON,drawSaveBundle={name:"drawSave",getReducer:()=>{const e={points:null,lines:null,polygons:null,isSaving:!1,shouldSave:!1,lastDownload:null,shouldInitialize:!1};return(t=e,{type:r,payload:s})=>{switch(r){case"DRAW_SAVE_START":case"DRAW_SAVE_COMPLETE":case"DRAW_CACHE_START":case"DRAW_CACHE_COMPLETE":case"DRAW_DOWNLOAD_COMPLETE":case"DRAW_SAVE_INITIALIZE_START":case"DRAW_SAVE_INITIALIZE_FINISHED":return Object.assign({},t,s);case"MAP_INITIALIZED":return Object.assign({},t,{shouldInitialize:!0});default:return t}}},doDrawSaveInitialize:()=>({dispatch:e})=>{e({type:"DRAW_SAVE_INITIALIZE_FINISHED",payload:{shouldInitialize:!1}})},doDrawSave:()=>({dispatch:e,store:t})=>{e({type:"DRAW_SAVE_START",payload:{isSaving:!0,shouldSave:!1}});const r=t.selectDrawPointsLayer(),s=t.selectDrawLinesLayer(),o=t.selectDrawPolygonsLayer(),d=geoJSON$2.writeFeatures(r.getSource().getFeatures(),{featureProjection:t.selectMapProjection(),dataProjection:t.selectGeoProjection()}),m=geoJSON$2.writeFeatures(s.getSource().getFeatures(),{featureProjection:t.selectMapProjection(),dataProjection:t.selectGeoProjection()}),g=geoJSON$2.writeFeatures(o.getSource().getFeatures(),{featureProjection:t.selectMapProjection(),dataProjection:t.selectGeoProjection()});e({type:"DRAW_SAVE_COMPLETE",payload:{isSaving:!1,points:d,lines:m,polygons:g}})},doDrawSaveDownload:()=>({dispatch:e,store:t})=>{const r=t.selectDrawSaveCachePointHasFeatures(),s=t.selectDrawSaveCacheLineStringHasFeatures(),o=t.selectDrawSaveCachePolygonHasFeatures(),d=new Date().toISOString(),m=t.selectDrawSaveCache();if(!Blob)return null;if(r){const g=new Blob([m.points],{type:"text/plain;charset=utf-8"});FileSaver.saveAs(g,`corpsmap-points-${d}.geojson`)}if(s){const g=new Blob([m.lines],{type:"text/plain;charset=utf-8"});FileSaver.saveAs(g,`corpsmap-lines-${d}.geojson`)}if(o){const g=new Blob([m.polygons],{type:"text/plain;charset=utf-8"});FileSaver.saveAs(g,`corpsmap-polygons-${d}.geojson`)}e({type:"DRAW_DOWNLOAD_COMPLETE",payload:{lastDownload:d}})},selectDrawSaveLastDownload:e=>e.drawSave.lastDownload,selectDrawSaveAll:e=>e.drawSave,selectDrawSavePostAttempts:e=>e.drawSave.postAttempts,selectDrawSaveCache:e=>({points:e.drawSave.points,lines:e.drawSave.lines,polygons:e.drawSave.polygons}),selectDrawSaveCachePoint:e=>JSON.parse(e.drawSave.points),selectDrawSaveCachePointHasFeatures:reduxBundler.createSelector("selectDrawSaveCachePoint",e=>!!(e&&e.features&&e.features.length)),selectDrawSaveCacheLineString:e=>JSON.parse(e.drawSave.lines),selectDrawSaveCacheLineStringHasFeatures:reduxBundler.createSelector("selectDrawSaveCacheLineString",e=>!!(e&&e.features&&e.features.length)),selectDrawSaveCachePolygon:e=>JSON.parse(e.drawSave.polygons),selectDrawSaveCachePolygonHasFeatures:reduxBundler.createSelector("selectDrawSaveCachePolygon",e=>!!(e&&e.features&&e.features.length)),reactDrawSaveShouldSave:e=>{if(e.drawSave.shouldSave)return{actionCreator:"doDrawSave"}},reactDrawSaveShouldInitialize:e=>{if(e.drawSave.shouldInitialize)return{actionCreator:"doDrawSaveInitialize"}},persistActions:["DRAW_SAVE_COMPLETE"]},plugin$j={pluginName:"Draw Tools",enabled:!0,bundle:[createDrawBundle({name:"drawPoints",type:"Point"}),createDrawBundle({name:"drawLines",type:"LineString"}),createDrawBundle({name:"drawPolygons",type:"Polygon"}),drawLabelBundle,drawModifyBundle,drawSaveBundle],components:[{component:DrawButton,region:"basic-toolbar",sortOrder:80}]};let SearchBar$1=class extends React.Component{constructor(t){super(t),this.state={selectedIdx:null,currentVal:""},this.handleChange=this.handleChange.bind(this),this.fireSearch=this.fireSearch.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this),this.handleItemClick=this.handleItemClick.bind(this),this.debouncedSearch=_.debounce(this.fireSearch,200)}handleItemClick(t){const{doSearchSelectItem:r}=this.props;r(t),this.handleChange("")}handleChange(t){const{doSearchSetQuery:r}=this.props;if(this.setState({selectedIdx:null,currentVal:t}),r(t),t.length<3)return null;this.debouncedSearch()}fireSearch(){const{doSearchShouldFire:t}=this.props;t(this.state.currentVal)}handleKeyUp(t){const{searchResults:r}=this.props;let{selectedIdx:s}=this.state;switch(t.keyCode){case 40:s===null?s=0:s<r.length-1&&s++,this.setState({selectedIdx:s});break;case 38:s>0&&s--,this.setState({selectedIdx:s});break;case 13:s!==null&&this.handleItemClick(r[s]);break}}render(){const{selectedIdx:t,currentVal:r}=this.state,{theme:s,searchResults:o,searchQueryString:d}=this.props,m=[];let g=r<2?m:o;const y=classnames({[s]:!0,"cm-btn-group":!0});return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:y,style:{width:"250px",position:"relative",paddingLeft:"10px",paddingRight:"10px"},children:jsxRuntime.jsx(SearchInput,{inline:!0,onKeyUp:this.handleKeyUp,onUpdate:this.handleChange,filterString:d,placeholder:"Location Search..."})}),jsxRuntime.jsx(SearchResultsList,{ref:b=>{this.searchResultsList=b},onItemClick:this.handleItemClick,items:g,selectedIdx:t})]})}};const SearchBar=connect("doSearchSelectItem","doSearchShouldFire","doSearchSetQuery","selectTheme","selectSearchQueryString","selectSearchResults",SearchBar$1),Overlay=e=>{const{item:t,onClear:r,overlay:s}=e;return jsxRuntime.jsxs("div",{className:"panel panel-default top clearfix",style:{marginBottom:0},children:[jsxRuntime.jsx("div",{className:"pull-right",children:jsxRuntime.jsx("i",{style:{cursor:"pointer"},title:"Clear",className:"mdi mdi-close",onClick:o=>r(o,s)})}),jsxRuntime.jsx("div",{className:"arrow"}),jsxRuntime.jsx("div",{className:"panel-body",children:jsxRuntime.jsx("div",{style:{minWidth:"125px",maxWidth:"300px",textAlign:"center"},children:t.displayName})})]})},zoomScales={region:8,postcode:11,district:11,place:12,locality:12,neighborhood:14,address:19,poi:19,"poi.landmark":19},bundle$f={name:"geocoder",getReducer(){const e={shouldRegister:!0,shouldHandleSelect:!1,selectedItem:null};return(t=e,{type:r,payload:s})=>{switch(r){case"SEARCH_ITEM_SELECTED":return s.selected.provider&&s.selected.provider==="geocoder"?Object.assign({},t,{shouldHandleSelect:!0,selectedItem:s.selected}):t;case"GEOCODER_REGISTERED":case"GEOCODER_HANDLED_SELECT":case"GEOCODER_OVERLAY_RENDERED":case"GEOCODER_OVERLAY_REMOVED":return Object.assign({},t,s);default:return t}}},doGeocoderRegister:()=>({dispatch:e,store:t})=>{e({type:"GEOCODER_REGISTERED",payload:{shouldRegister:!1}}),t.doSearchAddCollection({onFireSearch:t.doGeocoderFireSearch})},doGeocoderHandleSelect:()=>({dispatch:e,store:t})=>{e({type:"GEOCODER_HANDLED_SELECT",payload:{shouldHandleSelect:!1}});const r=t.selectGeocoderLastSelected(),s=t.selectMap();if(r){const o=document.createElement("div"),d=new Overlay$1({element:o,positioning:"bottom-center",offset:[0,-10]}),m=t.selectDisplayProjection(),g=proj.transform(r.center,m,"EPSG:3857");s.addOverlay(d),ReactDOM.render(jsxRuntime.jsx(Overlay,{overlay:d,item:r,map:s,onClear:t.doClearGeocoderOverlay}),o),d.setPosition(g),t.doSetView({center:r.center,zoom:r.zoom})}},doClearGeocoderOverlay:(e,t)=>({store:r})=>{e.preventDefault(),e.stopPropagation();const s=r.selectMap();t.setPosition(void 0);const o=t.getElement();o.parentNode.removeChild(o),s.removeOverlay(t)},doGeocoderFireSearch:e=>({dispatch:t,store:r,apiGet:s})=>{const o=window.LIMIT_GEOCODER_COUNTRIES;let d=r.selectSearchQueryString();const m=r.selectMapProjection(),g=r.selectGeoProjection();let y=proj.transform(r.selectViewCenter(),m,g),b=r.selectDefaultConfig().mapboxToken;d.length<2||(d=encodeURIComponent(d),s(`https://api.mapbox.com/geocoding/v5/mapbox.places/${d}.json?proximity=${y.toString()}${o&&o.length?`&country=${o.join(",")}`:""}&access_token=${b}`,(x,E,C)=>{if(x)return e(x);const S=JSON.parse(C);return e(null,S.features.map(A=>{let N="mdi mdi-map-marker";const k=zoomScales[A.place_type[0]]||11;return{provider:"geocoder",displayName:A.place_name,place_type:A.place_type,iconClass:N,center:A.center,zoom:k,geometry:A.geometry,properties:A.properties}}))}))},selectGeocoderLastSelected:e=>e.geocoder.selectedItem,reactGeocoderShouldHandleSelect:e=>{if(e.geocoder.shouldHandleSelect)return{actionCreator:"doGeocoderHandleSelect"}},reactGeocoderShouldRegister:e=>{if(e.geocoder.shouldRegister)return{actionCreator:"doGeocoderRegister"}}},plugin$i={pluginName:"Geocoder",enabled:!0,bundle:bundle$f,components:[{component:SearchBar,region:"basic-toolbar",sortOrder:100}]},epsilon=11102230246251565e-32,splitter=134217729,resulterrbound=(3+8*epsilon)*epsilon;function sum$1(e,t,r,s,o){let d,m,g,y,b=t[0],x=s[0],E=0,C=0;x>b==x>-b?(d=b,b=t[++E]):(d=x,x=s[++C]);let S=0;if(E<e&&C<r)for(x>b==x>-b?(m=b+d,g=d-(m-b),b=t[++E]):(m=x+d,g=d-(m-x),x=s[++C]),d=m,g!==0&&(o[S++]=g);E<e&&C<r;)x>b==x>-b?(m=d+b,y=m-d,g=d-(m-y)+(b-y),b=t[++E]):(m=d+x,y=m-d,g=d-(m-y)+(x-y),x=s[++C]),d=m,g!==0&&(o[S++]=g);for(;E<e;)m=d+b,y=m-d,g=d-(m-y)+(b-y),b=t[++E],d=m,g!==0&&(o[S++]=g);for(;C<r;)m=d+x,y=m-d,g=d-(m-y)+(x-y),x=s[++C],d=m,g!==0&&(o[S++]=g);return(d!==0||S===0)&&(o[S++]=d),S}function estimate(e,t){let r=t[0];for(let s=1;s<e;s++)r+=t[s];return r}function vec(e){return new Float64Array(e)}const ccwerrboundA=(3+16*epsilon)*epsilon,ccwerrboundB=(2+12*epsilon)*epsilon,ccwerrboundC=(9+64*epsilon)*epsilon*epsilon,B=vec(4),C1=vec(8),C2=vec(12),D=vec(16),u=vec(4);function orient2dadapt(e,t,r,s,o,d,m){let g,y,b,x,E,C,S,A,N,k,L,G,M,z,V,Y,X,Q;const $=e-o,K=r-o,ee=t-d,se=s-d;z=$*se,C=splitter*$,S=C-(C-$),A=$-S,C=splitter*se,N=C-(C-se),k=se-N,V=A*k-(z-S*N-A*N-S*k),Y=ee*K,C=splitter*ee,S=C-(C-ee),A=ee-S,C=splitter*K,N=C-(C-K),k=K-N,X=A*k-(Y-S*N-A*N-S*k),L=V-X,E=V-L,B[0]=V-(L+E)+(E-X),G=z+L,E=G-z,M=z-(G-E)+(L-E),L=M-Y,E=M-L,B[1]=M-(L+E)+(E-Y),Q=G+L,E=Q-G,B[2]=G-(Q-E)+(L-E),B[3]=Q;let ie=estimate(4,B),te=ccwerrboundB*m;if(ie>=te||-ie>=te||(E=e-$,g=e-($+E)+(E-o),E=r-K,b=r-(K+E)+(E-o),E=t-ee,y=t-(ee+E)+(E-d),E=s-se,x=s-(se+E)+(E-d),g===0&&y===0&&b===0&&x===0)||(te=ccwerrboundC*m+resulterrbound*Math.abs(ie),ie+=$*x+se*g-(ee*b+K*y),ie>=te||-ie>=te))return ie;z=g*se,C=splitter*g,S=C-(C-g),A=g-S,C=splitter*se,N=C-(C-se),k=se-N,V=A*k-(z-S*N-A*N-S*k),Y=y*K,C=splitter*y,S=C-(C-y),A=y-S,C=splitter*K,N=C-(C-K),k=K-N,X=A*k-(Y-S*N-A*N-S*k),L=V-X,E=V-L,u[0]=V-(L+E)+(E-X),G=z+L,E=G-z,M=z-(G-E)+(L-E),L=M-Y,E=M-L,u[1]=M-(L+E)+(E-Y),Q=G+L,E=Q-G,u[2]=G-(Q-E)+(L-E),u[3]=Q;const ue=sum$1(4,B,4,u,C1);z=$*x,C=splitter*$,S=C-(C-$),A=$-S,C=splitter*x,N=C-(C-x),k=x-N,V=A*k-(z-S*N-A*N-S*k),Y=ee*b,C=splitter*ee,S=C-(C-ee),A=ee-S,C=splitter*b,N=C-(C-b),k=b-N,X=A*k-(Y-S*N-A*N-S*k),L=V-X,E=V-L,u[0]=V-(L+E)+(E-X),G=z+L,E=G-z,M=z-(G-E)+(L-E),L=M-Y,E=M-L,u[1]=M-(L+E)+(E-Y),Q=G+L,E=Q-G,u[2]=G-(Q-E)+(L-E),u[3]=Q;const le=sum$1(ue,C1,4,u,C2);z=g*x,C=splitter*g,S=C-(C-g),A=g-S,C=splitter*x,N=C-(C-x),k=x-N,V=A*k-(z-S*N-A*N-S*k),Y=y*b,C=splitter*y,S=C-(C-y),A=y-S,C=splitter*b,N=C-(C-b),k=b-N,X=A*k-(Y-S*N-A*N-S*k),L=V-X,E=V-L,u[0]=V-(L+E)+(E-X),G=z+L,E=G-z,M=z-(G-E)+(L-E),L=M-Y,E=M-L,u[1]=M-(L+E)+(E-Y),Q=G+L,E=Q-G,u[2]=G-(Q-E)+(L-E),u[3]=Q;const fe=sum$1(le,C2,4,u,D);return D[fe-1]}function orient2d(e,t,r,s,o,d){const m=(t-d)*(r-o),g=(e-o)*(s-d),y=m-g,b=Math.abs(m+g);return Math.abs(y)>=ccwerrboundA*b?y:-orient2dadapt(e,t,r,s,o,d,b)}function pointInPolygon(e,t){var r,s,o=0,d,m,g,y,b,x,E,C=e[0],S=e[1],A=t.length;for(r=0;r<A;r++){s=0;var N=t[r],k=N.length-1;if(x=N[0],x[0]!==N[k][0]&&x[1]!==N[k][1])throw new Error("First and last coordinates in a ring must be the same");for(m=x[0]-C,g=x[1]-S,s;s<k;s++){if(E=N[s+1],y=E[0]-C,b=E[1]-S,g===0&&b===0){if(y<=0&&m>=0||m<=0&&y>=0)return 0}else if(b>=0&&g<=0||b<=0&&g>=0){if(d=orient2d(m,y,g,b,0,0),d===0)return 0;(d>0&&b>0&&g<=0||d<0&&b<=0&&g>0)&&o++}x=E,g=b,m=y}}return o%2!==0}function getCoord(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if(e.type==="Feature"&&e.geometry!==null&&e.geometry.type==="Point")return[...e.geometry.coordinates];if(e.type==="Point")return[...e.coordinates]}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return[...e];throw new Error("coord must be GeoJSON Point or an Array of numbers")}function getGeom(e){return e.type==="Feature"?e.geometry:e}function booleanPointInPolygon(e,t,r={}){if(!e)throw new Error("point is required");if(!t)throw new Error("polygon is required");const s=getCoord(e),o=getGeom(t),d=o.type,m=t.bbox;let g=o.coordinates;if(m&&inBBox(s,m)===!1)return!1;d==="Polygon"&&(g=[g]);let y=!1;for(var b=0;b<g.length;++b){const x=pointInPolygon(s,g[b]);if(x===0)return!r.ignoreBoundary;x&&(y=!0)}return y}function inBBox(e,t){return t[0]<=e[0]&&t[1]<=e[1]&&t[2]>=e[0]&&t[3]>=e[1]}class TinyQueue{constructor(t=[],r=defaultCompare){if(this.data=t,this.length=this.data.length,this.compare=r,this.length>0)for(let s=(this.length>>1)-1;s>=0;s--)this._down(s)}push(t){this.data.push(t),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const t=this.data[0],r=this.data.pop();return this.length--,this.length>0&&(this.data[0]=r,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:r,compare:s}=this,o=r[t];for(;t>0;){const d=t-1>>1,m=r[d];if(s(o,m)>=0)break;r[t]=m,t=d}r[t]=o}_down(t){const{data:r,compare:s}=this,o=this.length>>1,d=r[t];for(;t<o;){let m=(t<<1)+1,g=r[m];const y=m+1;if(y<this.length&&s(r[y],g)<0&&(m=y,g=r[y]),s(g,d)>=0)break;r[t]=g,t=m}r[t]=d}}function defaultCompare(e,t){return e<t?-1:e>t?1:0}function checkWhichEventIsLeft(e,t){return e.p.x>t.p.x?1:e.p.x<t.p.x?-1:e.p.y!==t.p.y?e.p.y>t.p.y?1:-1:1}function checkWhichSegmentHasRightEndpointFirst(e,t){return e.rightSweepEvent.p.x>t.rightSweepEvent.p.x?1:e.rightSweepEvent.p.x<t.rightSweepEvent.p.x?-1:e.rightSweepEvent.p.y!==t.rightSweepEvent.p.y?e.rightSweepEvent.p.y<t.rightSweepEvent.p.y?1:-1:1}class Event{constructor(t,r,s,o){this.p={x:t[0],y:t[1]},this.featureId=r,this.ringId=s,this.eventId=o,this.otherEvent=null,this.isLeftEndpoint=null}isSamePoint(t){return this.p.x===t.p.x&&this.p.y===t.p.y}}function fillEventQueue(e,t){if(e.type==="FeatureCollection"){const r=e.features;for(let s=0;s<r.length;s++)processFeature(r[s],t)}else processFeature(e,t)}let featureId=0,ringId=0,eventId=0;function processFeature(e,t){const r=e.type==="Feature"?e.geometry:e;let s=r.coordinates;(r.type==="Polygon"||r.type==="MultiLineString")&&(s=[s]),r.type==="LineString"&&(s=[[s]]);for(let o=0;o<s.length;o++)for(let d=0;d<s[o].length;d++){let m=s[o][d][0],g=null;ringId=ringId+1;for(let y=0;y<s[o][d].length-1;y++){g=s[o][d][y+1];const b=new Event(m,featureId,ringId,eventId),x=new Event(g,featureId,ringId,eventId+1);b.otherEvent=x,x.otherEvent=b,checkWhichEventIsLeft(b,x)>0?(x.isLeftEndpoint=!0,b.isLeftEndpoint=!1):(b.isLeftEndpoint=!0,x.isLeftEndpoint=!1),t.push(b),t.push(x),m=g,eventId=eventId+1}}featureId=featureId+1}class Segment{constructor(t){this.leftSweepEvent=t,this.rightSweepEvent=t.otherEvent}}function testSegmentIntersect(e,t){if(e===null||t===null||e.leftSweepEvent.ringId===t.leftSweepEvent.ringId&&(e.rightSweepEvent.isSamePoint(t.leftSweepEvent)||e.rightSweepEvent.isSamePoint(t.leftSweepEvent)||e.rightSweepEvent.isSamePoint(t.rightSweepEvent)||e.leftSweepEvent.isSamePoint(t.leftSweepEvent)||e.leftSweepEvent.isSamePoint(t.rightSweepEvent)))return!1;const r=e.leftSweepEvent.p.x,s=e.leftSweepEvent.p.y,o=e.rightSweepEvent.p.x,d=e.rightSweepEvent.p.y,m=t.leftSweepEvent.p.x,g=t.leftSweepEvent.p.y,y=t.rightSweepEvent.p.x,b=t.rightSweepEvent.p.y,x=(b-g)*(o-r)-(y-m)*(d-s),E=(y-m)*(s-g)-(b-g)*(r-m),C=(o-r)*(s-g)-(d-s)*(r-m);if(x===0)return!1;const S=E/x,A=C/x;if(S>=0&&S<=1&&A>=0&&A<=1){const N=r+S*(o-r),k=s+S*(d-s);return[N,k]}return!1}function runCheck(e,t){t=t||!1;const r=[],s=new TinyQueue([],checkWhichSegmentHasRightEndpointFirst);for(;e.length;){const o=e.pop();if(o.isLeftEndpoint){const d=new Segment(o);for(let m=0;m<s.data.length;m++){const g=s.data[m];if(t&&g.leftSweepEvent.featureId===o.featureId)continue;const y=testSegmentIntersect(d,g);y!==!1&&r.push(y)}s.push(d)}else o.isLeftEndpoint===!1&&s.pop()}return r}function sweeplineIntersections$1(e,t){const r=new TinyQueue([],checkWhichEventIsLeft);return fillEventQueue(e,r),runCheck(r,t)}var sweeplineIntersections=sweeplineIntersections$1;function lineIntersect(e,t,r={}){const{removeDuplicates:s=!0,ignoreSelfIntersections:o=!0}=r;let d=[];e.type==="FeatureCollection"?d=d.concat(e.features):e.type==="Feature"?d.push(e):(e.type==="LineString"||e.type==="Polygon"||e.type==="MultiLineString"||e.type==="MultiPolygon")&&d.push(feature(e)),t.type==="FeatureCollection"?d=d.concat(t.features):t.type==="Feature"?d.push(t):(t.type==="LineString"||t.type==="Polygon"||t.type==="MultiLineString"||t.type==="MultiPolygon")&&d.push(feature(t));const m=sweeplineIntersections(featureCollection(d),o);let g=[];if(s){const y={};m.forEach(b=>{const x=b.join(",");y[x]||(y[x]=!0,g.push(b))})}else g=m;return featureCollection(g.map(y=>point(y)))}function polygonToLine(e,t={}){const r=getGeom(e);switch(!t.properties&&e.type==="Feature"&&(t.properties=e.properties),r.type){case"Polygon":return singlePolygonToLine(r,t);case"MultiPolygon":return multiPolygonToLine(r,t);default:throw new Error("invalid poly")}}function singlePolygonToLine(e,t={}){const s=getGeom(e).coordinates,o=t.properties?t.properties:e.type==="Feature"?e.properties:{};return coordsToLine(s,o)}function multiPolygonToLine(e,t={}){const s=getGeom(e).coordinates,o=t.properties?t.properties:e.type==="Feature"?e.properties:{},d=[];return s.forEach(m=>{d.push(coordsToLine(m,o))}),featureCollection(d)}function coordsToLine(e,t){return e.length>1?multiLineString(e,t):lineString(e[0],t)}function booleanDisjoint(e,t,{ignoreSelfIntersections:r=!0}={ignoreSelfIntersections:!0}){let s=!0;return flattenEach(e,o=>{flattenEach(t,d=>{if(s===!1)return!1;s=disjoint(o.geometry,d.geometry,r)})}),s}function disjoint(e,t,r){switch(e.type){case"Point":switch(t.type){case"Point":return!compareCoords(e.coordinates,t.coordinates);case"LineString":return!isPointOnLine(t,e);case"Polygon":return!booleanPointInPolygon(e,t)}break;case"LineString":switch(t.type){case"Point":return!isPointOnLine(e,t);case"LineString":return!isLineOnLine(e,t,r);case"Polygon":return!isLineInPoly(t,e,r)}break;case"Polygon":switch(t.type){case"Point":return!booleanPointInPolygon(t,e);case"LineString":return!isLineInPoly(e,t,r);case"Polygon":return!isPolyInPoly(t,e,r)}}return!1}function isPointOnLine(e,t){for(let r=0;r<e.coordinates.length-1;r++)if(isPointOnLineSegment(e.coordinates[r],e.coordinates[r+1],t.coordinates))return!0;return!1}function isLineOnLine(e,t,r){return lineIntersect(e,t,{ignoreSelfIntersections:r}).features.length>0}function isLineInPoly(e,t,r){for(const o of t.coordinates)if(booleanPointInPolygon(o,e))return!0;return lineIntersect(t,polygonToLine(e),{ignoreSelfIntersections:r}).features.length>0}function isPolyInPoly(e,t,r){for(const o of e.coordinates[0])if(booleanPointInPolygon(o,t))return!0;for(const o of t.coordinates[0])if(booleanPointInPolygon(o,e))return!0;return lineIntersect(polygonToLine(e),polygonToLine(t),{ignoreSelfIntersections:r}).features.length>0}function isPointOnLineSegment(e,t,r){const s=r[0]-e[0],o=r[1]-e[1],d=t[0]-e[0],m=t[1]-e[1];return s*m-o*d!==0?!1:Math.abs(d)>=Math.abs(m)?d>0?e[0]<=r[0]&&r[0]<=t[0]:t[0]<=r[0]&&r[0]<=e[0]:m>0?e[1]<=r[1]&&r[1]<=t[1]:t[1]<=r[1]&&r[1]<=e[1]}function compareCoords(e,t){return e[0]===t[0]&&e[1]===t[1]}var index_default=booleanDisjoint,pathBrowserify,hasRequiredPathBrowserify;function requirePathBrowserify(){if(hasRequiredPathBrowserify)return pathBrowserify;hasRequiredPathBrowserify=1;function e(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function t(o,d){for(var m="",g=0,y=-1,b=0,x,E=0;E<=o.length;++E){if(E<o.length)x=o.charCodeAt(E);else{if(x===47)break;x=47}if(x===47){if(!(y===E-1||b===1))if(y!==E-1&&b===2){if(m.length<2||g!==2||m.charCodeAt(m.length-1)!==46||m.charCodeAt(m.length-2)!==46){if(m.length>2){var C=m.lastIndexOf("/");if(C!==m.length-1){C===-1?(m="",g=0):(m=m.slice(0,C),g=m.length-1-m.lastIndexOf("/")),y=E,b=0;continue}}else if(m.length===2||m.length===1){m="",g=0,y=E,b=0;continue}}d&&(m.length>0?m+="/..":m="..",g=2)}else m.length>0?m+="/"+o.slice(y+1,E):m=o.slice(y+1,E),g=E-y-1;y=E,b=0}else x===46&&b!==-1?++b:b=-1}return m}function r(o,d){var m=d.dir||d.root,g=d.base||(d.name||"")+(d.ext||"");return m?m===d.root?m+g:m+o+g:g}var s={resolve:function(){for(var d="",m=!1,g,y=arguments.length-1;y>=-1&&!m;y--){var b;y>=0?b=arguments[y]:(g===void 0&&(g=process$1.cwd()),b=g),e(b),b.length!==0&&(d=b+"/"+d,m=b.charCodeAt(0)===47)}return d=t(d,!m),m?d.length>0?"/"+d:"/":d.length>0?d:"."},normalize:function(d){if(e(d),d.length===0)return".";var m=d.charCodeAt(0)===47,g=d.charCodeAt(d.length-1)===47;return d=t(d,!m),d.length===0&&!m&&(d="."),d.length>0&&g&&(d+="/"),m?"/"+d:d},isAbsolute:function(d){return e(d),d.length>0&&d.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var d,m=0;m<arguments.length;++m){var g=arguments[m];e(g),g.length>0&&(d===void 0?d=g:d+="/"+g)}return d===void 0?".":s.normalize(d)},relative:function(d,m){if(e(d),e(m),d===m||(d=s.resolve(d),m=s.resolve(m),d===m))return"";for(var g=1;g<d.length&&d.charCodeAt(g)===47;++g);for(var y=d.length,b=y-g,x=1;x<m.length&&m.charCodeAt(x)===47;++x);for(var E=m.length,C=E-x,S=b<C?b:C,A=-1,N=0;N<=S;++N){if(N===S){if(C>S){if(m.charCodeAt(x+N)===47)return m.slice(x+N+1);if(N===0)return m.slice(x+N)}else b>S&&(d.charCodeAt(g+N)===47?A=N:N===0&&(A=0));break}var k=d.charCodeAt(g+N),L=m.charCodeAt(x+N);if(k!==L)break;k===47&&(A=N)}var G="";for(N=g+A+1;N<=y;++N)(N===y||d.charCodeAt(N)===47)&&(G.length===0?G+="..":G+="/..");return G.length>0?G+m.slice(x+A):(x+=A,m.charCodeAt(x)===47&&++x,m.slice(x))},_makeLong:function(d){return d},dirname:function(d){if(e(d),d.length===0)return".";for(var m=d.charCodeAt(0),g=m===47,y=-1,b=!0,x=d.length-1;x>=1;--x)if(m=d.charCodeAt(x),m===47){if(!b){y=x;break}}else b=!1;return y===-1?g?"/":".":g&&y===1?"//":d.slice(0,y)},basename:function(d,m){if(m!==void 0&&typeof m!="string")throw new TypeError('"ext" argument must be a string');e(d);var g=0,y=-1,b=!0,x;if(m!==void 0&&m.length>0&&m.length<=d.length){if(m.length===d.length&&m===d)return"";var E=m.length-1,C=-1;for(x=d.length-1;x>=0;--x){var S=d.charCodeAt(x);if(S===47){if(!b){g=x+1;break}}else C===-1&&(b=!1,C=x+1),E>=0&&(S===m.charCodeAt(E)?--E===-1&&(y=x):(E=-1,y=C))}return g===y?y=C:y===-1&&(y=d.length),d.slice(g,y)}else{for(x=d.length-1;x>=0;--x)if(d.charCodeAt(x)===47){if(!b){g=x+1;break}}else y===-1&&(b=!1,y=x+1);return y===-1?"":d.slice(g,y)}},extname:function(d){e(d);for(var m=-1,g=0,y=-1,b=!0,x=0,E=d.length-1;E>=0;--E){var C=d.charCodeAt(E);if(C===47){if(!b){g=E+1;break}continue}y===-1&&(b=!1,y=E+1),C===46?m===-1?m=E:x!==1&&(x=1):m!==-1&&(x=-1)}return m===-1||y===-1||x===0||x===1&&m===y-1&&m===g+1?"":d.slice(m,y)},format:function(d){if(d===null||typeof d!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof d);return r("/",d)},parse:function(d){e(d);var m={root:"",dir:"",base:"",ext:"",name:""};if(d.length===0)return m;var g=d.charCodeAt(0),y=g===47,b;y?(m.root="/",b=1):b=0;for(var x=-1,E=0,C=-1,S=!0,A=d.length-1,N=0;A>=b;--A){if(g=d.charCodeAt(A),g===47){if(!S){E=A+1;break}continue}C===-1&&(S=!1,C=A+1),g===46?x===-1?x=A:N!==1&&(N=1):x!==-1&&(N=-1)}return x===-1||C===-1||N===0||N===1&&x===C-1&&x===E+1?C!==-1&&(E===0&&y?m.base=m.name=d.slice(1,C):m.base=m.name=d.slice(E,C)):(E===0&&y?(m.name=d.slice(1,x),m.base=d.slice(1,C)):(m.name=d.slice(E,x),m.base=d.slice(E,C)),m.ext=d.slice(x,C)),E>0?m.dir=d.slice(0,E-1):y&&(m.dir="/"),m},sep:"/",delimiter:":",win32:null,posix:null};return s.posix=s,pathBrowserify=s,pathBrowserify}requirePathBrowserify();const bundle$e={name:"geojsonIdent",getReducer(){const e={shouldRegister:!1,shouldHandleRemove:!1,removedUid:null,data:{}};return(t=e,{type:r,payload:s})=>{switch(r){case"GEOJSON_IDENT_REGISTERED":case"GEOJSON_IDENT_ADDED_FEATURES":case"GEOJSON_IDENT_REMOVED_FEATURES":case"GEOJSON_IDENT_HANDLED_REMOVE":return Object.assign({},t,s);case"LAYER_REMOVED":return Object.assign({},t,{removedUid:s.uid,shouldHandleRemove:!0});default:return t}}},doGeojsonIdentRegister:()=>({dispatch:e,store:t})=>{e({type:"GEOJSON_IDENT_REGISTERED",payload:{shouldRegister:!1}}),t.doIdentifyAddCollection({onIdentify:t.doGeojsonIdentFire})},doGeojsonIdentRemoveFeatures:e=>({dispatch:t,store:r})=>{t({type:"GEOJSON_IDENT_HANDLED_REMOVE",payload:{shouldHandleRemove:!1}});const s=r.selectGeojsonRemovedUid(),o=r.selectGeojsonIdentFeatures();delete o[s],t({type:"GEOJSON_IDENT_REMOVED_FEATURES",payload:{data:Object.assign({},o),removedUid:null}})},doGeojsonIdentAddFeatures:(e,t,r)=>({dispatch:s,store:o})=>{const d=o.selectGeojsonIdentFeatures();if(d[e]||(d[e]={features:[],maplayer:null}),t){let m=[];t.length?m=t:t.features?m=t.features:m=[t],d[e].features=[...d[e].features,...m]}r&&(d[e].mapLayer=r),s({type:"GEOJSON_IDENT_ADDED_FEATURES",payload:{data:Object.assign({},d)}})},doGeojsonIdentFire:e=>({dispatch:t,store:r})=>{const s=r.selectIdentifyCoordinates(),o=r.selectResolution(),d=r.selectGeojsonIdentFeatures();let m=null;if(typeof s[0]=="number"){const g=point(s),y=o*5/1e3;m=index_default$1(g,y,{units:"kilometers"})}else m=polygon(s);try{const g=[];Object.keys(d).forEach(y=>{const b=[],x=d[y].features;d[y].mapLayer.getVisible()&&(x.forEach(C=>{index_default(m,C)||b.push(C)}),g.push({dataset:y,err:null,result:{[y]:{type:"FeatureCollection",features:b}}}))}),e(null,g)}catch(g){console.log(g),e(g)}},selectGeojsonIdentFeatures:e=>e.geojsonIdent.data,selectGeojsonRemovedUid:e=>e.geojsonIdent.removedUid,reactGeojsonIdentShouldRegister:e=>{if(e.geojsonIdent.shouldRegister)return{actionCreator:"doGeojsonIdentRegister"}},reactGeojsonIdentShouldHandleRemove:e=>{if(e.geojsonIdent.shouldHandleRemove)return{actionCreator:"doGeojsonIdentRemoveFeatures"}}},plugin$h={pluginName:"Identify GeoJSON",enabled:!0,bundle:bundle$e,components:[]};var _baseSlice,hasRequired_baseSlice;function require_baseSlice(){if(hasRequired_baseSlice)return _baseSlice;hasRequired_baseSlice=1;function e(t,r,s){var o=-1,d=t.length;r<0&&(r=-r>d?0:d+r),s=s>d?d:s,s<0&&(s+=d),d=r>s?0:s-r>>>0,r>>>=0;for(var m=Array(d);++o<d;)m[o]=t[o+r];return m}return _baseSlice=e,_baseSlice}var _castSlice,hasRequired_castSlice;function require_castSlice(){if(hasRequired_castSlice)return _castSlice;hasRequired_castSlice=1;var e=require_baseSlice();function t(r,s,o){var d=r.length;return o=o===void 0?d:o,!s&&o>=d?r:e(r,s,o)}return _castSlice=t,_castSlice}var _hasUnicode,hasRequired_hasUnicode;function require_hasUnicode(){if(hasRequired_hasUnicode)return _hasUnicode;hasRequired_hasUnicode=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",s="\\u20d0-\\u20ff",o=t+r+s,d="\\ufe0e\\ufe0f",m="\\u200d",g=RegExp("["+m+e+o+d+"]");function y(b){return g.test(b)}return _hasUnicode=y,_hasUnicode}var _asciiToArray,hasRequired_asciiToArray;function require_asciiToArray(){if(hasRequired_asciiToArray)return _asciiToArray;hasRequired_asciiToArray=1;function e(t){return t.split("")}return _asciiToArray=e,_asciiToArray}var _unicodeToArray,hasRequired_unicodeToArray;function require_unicodeToArray(){if(hasRequired_unicodeToArray)return _unicodeToArray;hasRequired_unicodeToArray=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",s="\\u20d0-\\u20ff",o=t+r+s,d="\\ufe0e\\ufe0f",m="["+e+"]",g="["+o+"]",y="\\ud83c[\\udffb-\\udfff]",b="(?:"+g+"|"+y+")",x="[^"+e+"]",E="(?:\\ud83c[\\udde6-\\uddff]){2}",C="[\\ud800-\\udbff][\\udc00-\\udfff]",S="\\u200d",A=b+"?",N="["+d+"]?",k="(?:"+S+"(?:"+[x,E,C].join("|")+")"+N+A+")*",L=N+A+k,G="(?:"+[x+g+"?",g,E,C,m].join("|")+")",M=RegExp(y+"(?="+y+")|"+G+L,"g");function z(V){return V.match(M)||[]}return _unicodeToArray=z,_unicodeToArray}var _stringToArray,hasRequired_stringToArray;function require_stringToArray(){if(hasRequired_stringToArray)return _stringToArray;hasRequired_stringToArray=1;var e=require_asciiToArray(),t=require_hasUnicode(),r=require_unicodeToArray();function s(o){return t(o)?r(o):e(o)}return _stringToArray=s,_stringToArray}var _arrayMap,hasRequired_arrayMap;function require_arrayMap(){if(hasRequired_arrayMap)return _arrayMap;hasRequired_arrayMap=1;function e(t,r){for(var s=-1,o=t==null?0:t.length,d=Array(o);++s<o;)d[s]=r(t[s],s,t);return d}return _arrayMap=e,_arrayMap}var _baseToString,hasRequired_baseToString;function require_baseToString(){if(hasRequired_baseToString)return _baseToString;hasRequired_baseToString=1;var e=require_Symbol(),t=require_arrayMap(),r=requireIsArray(),s=requireIsSymbol(),o=e?e.prototype:void 0,d=o?o.toString:void 0;function m(g){if(typeof g=="string")return g;if(r(g))return t(g,m)+"";if(s(g))return d?d.call(g):"";var y=g+"";return y=="0"&&1/g==-1/0?"-0":y}return _baseToString=m,_baseToString}var toString_1,hasRequiredToString;function requireToString(){if(hasRequiredToString)return toString_1;hasRequiredToString=1;var e=require_baseToString();function t(r){return r==null?"":e(r)}return toString_1=t,toString_1}var _createCaseFirst,hasRequired_createCaseFirst;function require_createCaseFirst(){if(hasRequired_createCaseFirst)return _createCaseFirst;hasRequired_createCaseFirst=1;var e=require_castSlice(),t=require_hasUnicode(),r=require_stringToArray(),s=requireToString();function o(d){return function(m){m=s(m);var g=t(m)?r(m):void 0,y=g?g[0]:m.charAt(0),b=g?e(g,1).join(""):m.slice(1);return y[d]()+b}}return _createCaseFirst=o,_createCaseFirst}var upperFirst_1,hasRequiredUpperFirst;function requireUpperFirst(){if(hasRequiredUpperFirst)return upperFirst_1;hasRequiredUpperFirst=1;var e=require_createCaseFirst(),t=e("toUpperCase");return upperFirst_1=t,upperFirst_1}var upperFirstExports=requireUpperFirst();const upperFirst=getDefaultExportFromCjs$1(upperFirstExports),IdentifyBufferSection$1=e=>{const{theme:t,identifySelectBy:r,identifyBufferUnit:s,identifyBufferValue:o,doShowBufferUnits:d,doUpdateIdentifyBuffer:m}=e;return jsxRuntime.jsx("li",{className:`${t}`,id:"cm-identify-buffer-section",children:jsxRuntime.jsxs("div",{className:"text-center",children:[jsxRuntime.jsx("div",{id:"cm-identify-buffer-title",children:`Buffer ${upperFirst(r)} By:`}),jsxRuntime.jsxs("form",{className:"cm-form-inline",children:[jsxRuntime.jsx("input",{className:"cm-form-control",id:"cm-identify-buffer-input",type:"number",value:o,name:"identify-buffer",title:"Identify Buffer Input",onChange:m,onKeyPress:g=>{g.key==="Enter"&&g.preventDefault()}}),jsxRuntime.jsx("span",{id:"cm-identify-buffer-units",children:`${s}`}),jsxRuntime.jsx("i",{className:"mdi mdi-settings pointer",title:"Identify Buffer Units",onClick:d})]})]})})},IdentifyBufferSection=connect("selectTheme","selectIdentifySelectBy","selectIdentifyBufferUnit","selectIdentifyBufferValue","doShowBufferUnits","doUpdateIdentifyBuffer",IdentifyBufferSection$1),IdentifyButton$1=e=>{const{doStartIdentify:t,doPauseIdentify:r,doStopIdentify:s,doSetDisplayAs:o,identifySelectBy:d,identifyDisplayAs:m}=e;return jsxRuntime.jsx(BasicToolbarButton,{enabled:!0,iconClass:"ms ms-information",title:"Identify",onDeactivate:r,children:jsxRuntime.jsxs(BasicToolbarMenu,{children:[jsxRuntime.jsx(BasicToolbarMenuItem,{active:d==="point",onClick:t,iconClass:"ms ms-identify icon-inline",title:"Identify by Point",text:"Identify by Point",passProps:{"data-selectby":"point"}}),jsxRuntime.jsx(BasicToolbarMenuItem,{active:d==="polygon",onClick:t,iconClass:"ms ms-identify-box icon-inline",title:"Identify by Polygon",text:"Identify by Polygon",passProps:{"data-selectby":"polygon"}}),d?jsxRuntime.jsx(IdentifyBufferSection,{}):null,jsxRuntime.jsx(BasicToolbarMenuDivider,{}),jsxRuntime.jsx(BasicToolbarMenuItem,{active:!1,onClick:s,iconClass:"mdi mdi-close icon-inline",title:"Clear All",text:"Clear All"}),jsxRuntime.jsx(BasicToolbarMenuItem,{active:!1,iconClass:"mdi mdi-tune icon-inline",title:"Display Format",text:"Display Format",children:jsxRuntime.jsxs(BasicToolbarSubmenu,{children:[jsxRuntime.jsx(BasicToolbarMenuItem,{active:m==="popup",onClick:o,iconClass:"mdi mdi-message-outline icon-inline",title:"Display as Popups",text:"Display as Popups",passProps:{"data-displayas":"popup"}}),jsxRuntime.jsx(BasicToolbarMenuItem,{active:m==="sidebar",onClick:o,iconClass:"mdi mdi-format-list-bulleted icon-inline",title:"Display in Sidebar List",text:"Display in Sidebar List",passProps:{"data-displayas":"sidebar"}}),jsxRuntime.jsx(BasicToolbarMenuItem,{disabled:!1,active:m==="table",onClick:o,iconClass:"ms ms-table icon-inline",title:"Display in Attribute Table",text:"Display in Attribute Table",passProps:{"data-displayas":"table"}})]})})]})})},IdentifyButton=connect("doStartIdentify","doPauseIdentify","doStopIdentify","doSetDisplayAs","selectIdentifyDisplayAs","selectIdentifySelectBy",IdentifyButton$1),require$$0=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];var htmlTags$1,hasRequiredHtmlTags;function requireHtmlTags(){return hasRequiredHtmlTags||(hasRequiredHtmlTags=1,htmlTags$1=require$$0),htmlTags$1}var htmlTagsExports=requireHtmlTags();const htmlTags=getDefaultExportFromCjs$1(htmlTagsExports),basic=/\s?<!doctype html>|<html\b[^>]*>|<body\b[^>]*>|<x-[^>]+>/i,sortedTags=[...htmlTags].sort((e,t)=>e.length-t.length),full=new RegExp(sortedTags.map(e=>`<${e}\\b[^>]*>`).join("|"),"i");function isHtml(e){return e=e.trim().slice(0,1e3),e.includes("\0")||!e.includes("<")?!1:basic.test(e)||full.test(e)}const style$2=new style$3.Style({fill:new style$3.Fill({color:"rgba(84, 240, 240, 0.6)"}),stroke:new style$3.Stroke({color:"rgb(84, 240, 240)",width:1}),image:new style$3.Circle({radius:8,stroke:new style$3.Stroke({color:"rgb(84, 240, 240)"}),fill:new style$3.Fill({color:"rgba(84, 240, 240, 0.6)"})})});class ResultListItem extends React.Component{constructor(t){super(t);const r=t.feature.geometry.type;this.layer=getLayer({serviceType:"LocalVector",visible:!0,geometryType:r,style:style$2,zIndex:1e3});const s=new GeoJSON().readFeatures(t.feature,{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"});this.layer.getSource().addFeatures(s),this.handleClick=this.handleClick.bind(this),this.handleMouseOut=this.handleMouseOut.bind(this),this.handleMouseOver=this.handleMouseOver.bind(this)}componentWillUnmount(){const{map:t}=this.props;t.removeLayer(this.layer)}handleClick(){const{doOpenIdentifyDetails:t,feature:r}=this.props;t(r,this.layer)}handleMouseOver(){const{map:t}=this.props;t.addLayer(this.layer)}handleMouseOut(){const{map:t}=this.props;t.removeLayer(this.layer)}render(){const{feature:t}=this.props,r=Object.keys(t.properties)[0]||"No Properties",s=t.properties[r];return jsxRuntime.jsx("li",{onClick:this.handleClick,onMouseOver:this.handleMouseOver,onMouseOut:this.handleMouseOut,className:"cm-list-group-item pointer overflow-ellipsis",style:{margin:"3px",padding:"2px",cursor:"pointer"},title:"View More",children:jsxRuntime.jsxs("p",{children:[jsxRuntime.jsx("span",{className:"col-sm-2",children:jsxRuntime.jsx("i",{className:"mdi mdi-plus icon-inline"})}),jsxRuntime.jsx("span",{className:"col-sm-4 overflow-sidebar-identify",children:r}),isHtml(s)?jsxRuntime.jsx("span",{className:"col-sm-6",dangerouslySetInnerHTML:{__html:s}}):jsxRuntime.jsx("span",{className:"col-sm-6",children:s})]})})}}const IdentifySidebarListItem=connect("selectMap","doOpenIdentifyDetails",ResultListItem);class IdentifySidebarList extends React.Component{constructor(t){super(t),this.state={expanded:!0},this.toggleExpanded=this.toggleExpanded.bind(this),this.renderList=this.renderList.bind(this)}toggleExpanded(t){this.setState({expanded:!this.state.expanded})}renderList(t){const{expanded:r}=this.state;return r?t.length?jsxRuntime.jsx("ul",{className:"cm-list-group",children:t.map((s,o)=>jsxRuntime.jsx(IdentifySidebarListItem,{feature:s},o))}):jsxRuntime.jsx("div",{children:"No features at this location"}):null}render(){const{expanded:t}=this.state,{displayName:r,features:s}=this.props,o=classnames({mdi:!0,"mdi-menu-right":!t,"mdi-menu-down":t,"icon-inline":!0});return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("p",{onClick:this.toggleExpanded,className:"overflow-ellipsis",style:{cursor:"pointer",whiteSpace:"nowrap"},children:[jsxRuntime.jsx("i",{className:o}),jsxRuntime.jsx("strong",{children:r})]}),this.renderList(s)]})}}var _listCacheClear,hasRequired_listCacheClear;function require_listCacheClear(){if(hasRequired_listCacheClear)return _listCacheClear;hasRequired_listCacheClear=1;function e(){this.__data__=[],this.size=0}return _listCacheClear=e,_listCacheClear}var eq_1,hasRequiredEq;function requireEq(){if(hasRequiredEq)return eq_1;hasRequiredEq=1;function e(t,r){return t===r||t!==t&&r!==r}return eq_1=e,eq_1}var _assocIndexOf,hasRequired_assocIndexOf;function require_assocIndexOf(){if(hasRequired_assocIndexOf)return _assocIndexOf;hasRequired_assocIndexOf=1;var e=requireEq();function t(r,s){for(var o=r.length;o--;)if(e(r[o][0],s))return o;return-1}return _assocIndexOf=t,_assocIndexOf}var _listCacheDelete,hasRequired_listCacheDelete;function require_listCacheDelete(){if(hasRequired_listCacheDelete)return _listCacheDelete;hasRequired_listCacheDelete=1;var e=require_assocIndexOf(),t=Array.prototype,r=t.splice;function s(o){var d=this.__data__,m=e(d,o);if(m<0)return!1;var g=d.length-1;return m==g?d.pop():r.call(d,m,1),--this.size,!0}return _listCacheDelete=s,_listCacheDelete}var _listCacheGet,hasRequired_listCacheGet;function require_listCacheGet(){if(hasRequired_listCacheGet)return _listCacheGet;hasRequired_listCacheGet=1;var e=require_assocIndexOf();function t(r){var s=this.__data__,o=e(s,r);return o<0?void 0:s[o][1]}return _listCacheGet=t,_listCacheGet}var _listCacheHas,hasRequired_listCacheHas;function require_listCacheHas(){if(hasRequired_listCacheHas)return _listCacheHas;hasRequired_listCacheHas=1;var e=require_assocIndexOf();function t(r){return e(this.__data__,r)>-1}return _listCacheHas=t,_listCacheHas}var _listCacheSet,hasRequired_listCacheSet;function require_listCacheSet(){if(hasRequired_listCacheSet)return _listCacheSet;hasRequired_listCacheSet=1;var e=require_assocIndexOf();function t(r,s){var o=this.__data__,d=e(o,r);return d<0?(++this.size,o.push([r,s])):o[d][1]=s,this}return _listCacheSet=t,_listCacheSet}var _ListCache,hasRequired_ListCache;function require_ListCache(){if(hasRequired_ListCache)return _ListCache;hasRequired_ListCache=1;var e=require_listCacheClear(),t=require_listCacheDelete(),r=require_listCacheGet(),s=require_listCacheHas(),o=require_listCacheSet();function d(m){var g=-1,y=m==null?0:m.length;for(this.clear();++g<y;){var b=m[g];this.set(b[0],b[1])}}return d.prototype.clear=e,d.prototype.delete=t,d.prototype.get=r,d.prototype.has=s,d.prototype.set=o,_ListCache=d,_ListCache}var _stackClear,hasRequired_stackClear;function require_stackClear(){if(hasRequired_stackClear)return _stackClear;hasRequired_stackClear=1;var e=require_ListCache();function t(){this.__data__=new e,this.size=0}return _stackClear=t,_stackClear}var _stackDelete,hasRequired_stackDelete;function require_stackDelete(){if(hasRequired_stackDelete)return _stackDelete;hasRequired_stackDelete=1;function e(t){var r=this.__data__,s=r.delete(t);return this.size=r.size,s}return _stackDelete=e,_stackDelete}var _stackGet,hasRequired_stackGet;function require_stackGet(){if(hasRequired_stackGet)return _stackGet;hasRequired_stackGet=1;function e(t){return this.__data__.get(t)}return _stackGet=e,_stackGet}var _stackHas,hasRequired_stackHas;function require_stackHas(){if(hasRequired_stackHas)return _stackHas;hasRequired_stackHas=1;function e(t){return this.__data__.has(t)}return _stackHas=e,_stackHas}var isFunction_1,hasRequiredIsFunction;function requireIsFunction(){if(hasRequiredIsFunction)return isFunction_1;hasRequiredIsFunction=1;var e=require_baseGetTag(),t=requireIsObject(),r="[object AsyncFunction]",s="[object Function]",o="[object GeneratorFunction]",d="[object Proxy]";function m(g){if(!t(g))return!1;var y=e(g);return y==s||y==o||y==r||y==d}return isFunction_1=m,isFunction_1}var _coreJsData,hasRequired_coreJsData;function require_coreJsData(){if(hasRequired_coreJsData)return _coreJsData;hasRequired_coreJsData=1;var e=require_root(),t=e["__core-js_shared__"];return _coreJsData=t,_coreJsData}var _isMasked,hasRequired_isMasked;function require_isMasked(){if(hasRequired_isMasked)return _isMasked;hasRequired_isMasked=1;var e=require_coreJsData(),t=(function(){var s=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""})();function r(s){return!!t&&t in s}return _isMasked=r,_isMasked}var _toSource,hasRequired_toSource;function require_toSource(){if(hasRequired_toSource)return _toSource;hasRequired_toSource=1;var e=Function.prototype,t=e.toString;function r(s){if(s!=null){try{return t.call(s)}catch{}try{return s+""}catch{}}return""}return _toSource=r,_toSource}var _baseIsNative,hasRequired_baseIsNative;function require_baseIsNative(){if(hasRequired_baseIsNative)return _baseIsNative;hasRequired_baseIsNative=1;var e=requireIsFunction(),t=require_isMasked(),r=requireIsObject(),s=require_toSource(),o=/[\\^$.*+?()[\]{}|]/g,d=/^\[object .+?Constructor\]$/,m=Function.prototype,g=Object.prototype,y=m.toString,b=g.hasOwnProperty,x=RegExp("^"+y.call(b).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function E(C){if(!r(C)||t(C))return!1;var S=e(C)?x:d;return S.test(s(C))}return _baseIsNative=E,_baseIsNative}var _getValue,hasRequired_getValue;function require_getValue(){if(hasRequired_getValue)return _getValue;hasRequired_getValue=1;function e(t,r){return t?.[r]}return _getValue=e,_getValue}var _getNative,hasRequired_getNative;function require_getNative(){if(hasRequired_getNative)return _getNative;hasRequired_getNative=1;var e=require_baseIsNative(),t=require_getValue();function r(s,o){var d=t(s,o);return e(d)?d:void 0}return _getNative=r,_getNative}var _Map,hasRequired_Map;function require_Map(){if(hasRequired_Map)return _Map;hasRequired_Map=1;var e=require_getNative(),t=require_root(),r=e(t,"Map");return _Map=r,_Map}var _nativeCreate,hasRequired_nativeCreate;function require_nativeCreate(){if(hasRequired_nativeCreate)return _nativeCreate;hasRequired_nativeCreate=1;var e=require_getNative(),t=e(Object,"create");return _nativeCreate=t,_nativeCreate}var _hashClear,hasRequired_hashClear;function require_hashClear(){if(hasRequired_hashClear)return _hashClear;hasRequired_hashClear=1;var e=require_nativeCreate();function t(){this.__data__=e?e(null):{},this.size=0}return _hashClear=t,_hashClear}var _hashDelete,hasRequired_hashDelete;function require_hashDelete(){if(hasRequired_hashDelete)return _hashDelete;hasRequired_hashDelete=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return _hashDelete=e,_hashDelete}var _hashGet,hasRequired_hashGet;function require_hashGet(){if(hasRequired_hashGet)return _hashGet;hasRequired_hashGet=1;var e=require_nativeCreate(),t="__lodash_hash_undefined__",r=Object.prototype,s=r.hasOwnProperty;function o(d){var m=this.__data__;if(e){var g=m[d];return g===t?void 0:g}return s.call(m,d)?m[d]:void 0}return _hashGet=o,_hashGet}var _hashHas,hasRequired_hashHas;function require_hashHas(){if(hasRequired_hashHas)return _hashHas;hasRequired_hashHas=1;var e=require_nativeCreate(),t=Object.prototype,r=t.hasOwnProperty;function s(o){var d=this.__data__;return e?d[o]!==void 0:r.call(d,o)}return _hashHas=s,_hashHas}var _hashSet,hasRequired_hashSet;function require_hashSet(){if(hasRequired_hashSet)return _hashSet;hasRequired_hashSet=1;var e=require_nativeCreate(),t="__lodash_hash_undefined__";function r(s,o){var d=this.__data__;return this.size+=this.has(s)?0:1,d[s]=e&&o===void 0?t:o,this}return _hashSet=r,_hashSet}var _Hash,hasRequired_Hash;function require_Hash(){if(hasRequired_Hash)return _Hash;hasRequired_Hash=1;var e=require_hashClear(),t=require_hashDelete(),r=require_hashGet(),s=require_hashHas(),o=require_hashSet();function d(m){var g=-1,y=m==null?0:m.length;for(this.clear();++g<y;){var b=m[g];this.set(b[0],b[1])}}return d.prototype.clear=e,d.prototype.delete=t,d.prototype.get=r,d.prototype.has=s,d.prototype.set=o,_Hash=d,_Hash}var _mapCacheClear,hasRequired_mapCacheClear;function require_mapCacheClear(){if(hasRequired_mapCacheClear)return _mapCacheClear;hasRequired_mapCacheClear=1;var e=require_Hash(),t=require_ListCache(),r=require_Map();function s(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return _mapCacheClear=s,_mapCacheClear}var _isKeyable,hasRequired_isKeyable;function require_isKeyable(){if(hasRequired_isKeyable)return _isKeyable;hasRequired_isKeyable=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return _isKeyable=e,_isKeyable}var _getMapData,hasRequired_getMapData;function require_getMapData(){if(hasRequired_getMapData)return _getMapData;hasRequired_getMapData=1;var e=require_isKeyable();function t(r,s){var o=r.__data__;return e(s)?o[typeof s=="string"?"string":"hash"]:o.map}return _getMapData=t,_getMapData}var _mapCacheDelete,hasRequired_mapCacheDelete;function require_mapCacheDelete(){if(hasRequired_mapCacheDelete)return _mapCacheDelete;hasRequired_mapCacheDelete=1;var e=require_getMapData();function t(r){var s=e(this,r).delete(r);return this.size-=s?1:0,s}return _mapCacheDelete=t,_mapCacheDelete}var _mapCacheGet,hasRequired_mapCacheGet;function require_mapCacheGet(){if(hasRequired_mapCacheGet)return _mapCacheGet;hasRequired_mapCacheGet=1;var e=require_getMapData();function t(r){return e(this,r).get(r)}return _mapCacheGet=t,_mapCacheGet}var _mapCacheHas,hasRequired_mapCacheHas;function require_mapCacheHas(){if(hasRequired_mapCacheHas)return _mapCacheHas;hasRequired_mapCacheHas=1;var e=require_getMapData();function t(r){return e(this,r).has(r)}return _mapCacheHas=t,_mapCacheHas}var _mapCacheSet,hasRequired_mapCacheSet;function require_mapCacheSet(){if(hasRequired_mapCacheSet)return _mapCacheSet;hasRequired_mapCacheSet=1;var e=require_getMapData();function t(r,s){var o=e(this,r),d=o.size;return o.set(r,s),this.size+=o.size==d?0:1,this}return _mapCacheSet=t,_mapCacheSet}var _MapCache,hasRequired_MapCache;function require_MapCache(){if(hasRequired_MapCache)return _MapCache;hasRequired_MapCache=1;var e=require_mapCacheClear(),t=require_mapCacheDelete(),r=require_mapCacheGet(),s=require_mapCacheHas(),o=require_mapCacheSet();function d(m){var g=-1,y=m==null?0:m.length;for(this.clear();++g<y;){var b=m[g];this.set(b[0],b[1])}}return d.prototype.clear=e,d.prototype.delete=t,d.prototype.get=r,d.prototype.has=s,d.prototype.set=o,_MapCache=d,_MapCache}var _stackSet,hasRequired_stackSet;function require_stackSet(){if(hasRequired_stackSet)return _stackSet;hasRequired_stackSet=1;var e=require_ListCache(),t=require_Map(),r=require_MapCache(),s=200;function o(d,m){var g=this.__data__;if(g instanceof e){var y=g.__data__;if(!t||y.length<s-1)return y.push([d,m]),this.size=++g.size,this;g=this.__data__=new r(y)}return g.set(d,m),this.size=g.size,this}return _stackSet=o,_stackSet}var _Stack,hasRequired_Stack;function require_Stack(){if(hasRequired_Stack)return _Stack;hasRequired_Stack=1;var e=require_ListCache(),t=require_stackClear(),r=require_stackDelete(),s=require_stackGet(),o=require_stackHas(),d=require_stackSet();function m(g){var y=this.__data__=new e(g);this.size=y.size}return m.prototype.clear=t,m.prototype.delete=r,m.prototype.get=s,m.prototype.has=o,m.prototype.set=d,_Stack=m,_Stack}var _setCacheAdd,hasRequired_setCacheAdd;function require_setCacheAdd(){if(hasRequired_setCacheAdd)return _setCacheAdd;hasRequired_setCacheAdd=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return _setCacheAdd=t,_setCacheAdd}var _setCacheHas,hasRequired_setCacheHas;function require_setCacheHas(){if(hasRequired_setCacheHas)return _setCacheHas;hasRequired_setCacheHas=1;function e(t){return this.__data__.has(t)}return _setCacheHas=e,_setCacheHas}var _SetCache,hasRequired_SetCache;function require_SetCache(){if(hasRequired_SetCache)return _SetCache;hasRequired_SetCache=1;var e=require_MapCache(),t=require_setCacheAdd(),r=require_setCacheHas();function s(o){var d=-1,m=o==null?0:o.length;for(this.__data__=new e;++d<m;)this.add(o[d])}return s.prototype.add=s.prototype.push=t,s.prototype.has=r,_SetCache=s,_SetCache}var _arraySome,hasRequired_arraySome;function require_arraySome(){if(hasRequired_arraySome)return _arraySome;hasRequired_arraySome=1;function e(t,r){for(var s=-1,o=t==null?0:t.length;++s<o;)if(r(t[s],s,t))return!0;return!1}return _arraySome=e,_arraySome}var _cacheHas,hasRequired_cacheHas;function require_cacheHas(){if(hasRequired_cacheHas)return _cacheHas;hasRequired_cacheHas=1;function e(t,r){return t.has(r)}return _cacheHas=e,_cacheHas}var _equalArrays,hasRequired_equalArrays;function require_equalArrays(){if(hasRequired_equalArrays)return _equalArrays;hasRequired_equalArrays=1;var e=require_SetCache(),t=require_arraySome(),r=require_cacheHas(),s=1,o=2;function d(m,g,y,b,x,E){var C=y&s,S=m.length,A=g.length;if(S!=A&&!(C&&A>S))return!1;var N=E.get(m),k=E.get(g);if(N&&k)return N==g&&k==m;var L=-1,G=!0,M=y&o?new e:void 0;for(E.set(m,g),E.set(g,m);++L<S;){var z=m[L],V=g[L];if(b)var Y=C?b(V,z,L,g,m,E):b(z,V,L,m,g,E);if(Y!==void 0){if(Y)continue;G=!1;break}if(M){if(!t(g,function(X,Q){if(!r(M,Q)&&(z===X||x(z,X,y,b,E)))return M.push(Q)})){G=!1;break}}else if(!(z===V||x(z,V,y,b,E))){G=!1;break}}return E.delete(m),E.delete(g),G}return _equalArrays=d,_equalArrays}var _Uint8Array,hasRequired_Uint8Array;function require_Uint8Array(){if(hasRequired_Uint8Array)return _Uint8Array;hasRequired_Uint8Array=1;var e=require_root(),t=e.Uint8Array;return _Uint8Array=t,_Uint8Array}var _mapToArray,hasRequired_mapToArray;function require_mapToArray(){if(hasRequired_mapToArray)return _mapToArray;hasRequired_mapToArray=1;function e(t){var r=-1,s=Array(t.size);return t.forEach(function(o,d){s[++r]=[d,o]}),s}return _mapToArray=e,_mapToArray}var _setToArray,hasRequired_setToArray;function require_setToArray(){if(hasRequired_setToArray)return _setToArray;hasRequired_setToArray=1;function e(t){var r=-1,s=Array(t.size);return t.forEach(function(o){s[++r]=o}),s}return _setToArray=e,_setToArray}var _equalByTag,hasRequired_equalByTag;function require_equalByTag(){if(hasRequired_equalByTag)return _equalByTag;hasRequired_equalByTag=1;var e=require_Symbol(),t=require_Uint8Array(),r=requireEq(),s=require_equalArrays(),o=require_mapToArray(),d=require_setToArray(),m=1,g=2,y="[object Boolean]",b="[object Date]",x="[object Error]",E="[object Map]",C="[object Number]",S="[object RegExp]",A="[object Set]",N="[object String]",k="[object Symbol]",L="[object ArrayBuffer]",G="[object DataView]",M=e?e.prototype:void 0,z=M?M.valueOf:void 0;function V(Y,X,Q,$,K,ee,se){switch(Q){case G:if(Y.byteLength!=X.byteLength||Y.byteOffset!=X.byteOffset)return!1;Y=Y.buffer,X=X.buffer;case L:return!(Y.byteLength!=X.byteLength||!ee(new t(Y),new t(X)));case y:case b:case C:return r(+Y,+X);case x:return Y.name==X.name&&Y.message==X.message;case S:case N:return Y==X+"";case E:var ie=o;case A:var te=$&m;if(ie||(ie=d),Y.size!=X.size&&!te)return!1;var ue=se.get(Y);if(ue)return ue==X;$|=g,se.set(Y,X);var le=s(ie(Y),ie(X),$,K,ee,se);return se.delete(Y),le;case k:if(z)return z.call(Y)==z.call(X)}return!1}return _equalByTag=V,_equalByTag}var _baseGetAllKeys,hasRequired_baseGetAllKeys;function require_baseGetAllKeys(){if(hasRequired_baseGetAllKeys)return _baseGetAllKeys;hasRequired_baseGetAllKeys=1;var e=require_arrayPush(),t=requireIsArray();function r(s,o,d){var m=o(s);return t(s)?m:e(m,d(s))}return _baseGetAllKeys=r,_baseGetAllKeys}var _arrayFilter,hasRequired_arrayFilter;function require_arrayFilter(){if(hasRequired_arrayFilter)return _arrayFilter;hasRequired_arrayFilter=1;function e(t,r){for(var s=-1,o=t==null?0:t.length,d=0,m=[];++s<o;){var g=t[s];r(g,s,t)&&(m[d++]=g)}return m}return _arrayFilter=e,_arrayFilter}var stubArray_1,hasRequiredStubArray;function requireStubArray(){if(hasRequiredStubArray)return stubArray_1;hasRequiredStubArray=1;function e(){return[]}return stubArray_1=e,stubArray_1}var _getSymbols,hasRequired_getSymbols;function require_getSymbols(){if(hasRequired_getSymbols)return _getSymbols;hasRequired_getSymbols=1;var e=require_arrayFilter(),t=requireStubArray(),r=Object.prototype,s=r.propertyIsEnumerable,o=Object.getOwnPropertySymbols,d=o?function(m){return m==null?[]:(m=Object(m),e(o(m),function(g){return s.call(m,g)}))}:t;return _getSymbols=d,_getSymbols}var _baseTimes,hasRequired_baseTimes;function require_baseTimes(){if(hasRequired_baseTimes)return _baseTimes;hasRequired_baseTimes=1;function e(t,r){for(var s=-1,o=Array(t);++s<t;)o[s]=r(s);return o}return _baseTimes=e,_baseTimes}var isBuffer={exports:{}},stubFalse_1,hasRequiredStubFalse;function requireStubFalse(){if(hasRequiredStubFalse)return stubFalse_1;hasRequiredStubFalse=1;function e(){return!1}return stubFalse_1=e,stubFalse_1}isBuffer.exports;var hasRequiredIsBuffer;function requireIsBuffer(){return hasRequiredIsBuffer||(hasRequiredIsBuffer=1,(function(e,t){var r=require_root(),s=requireStubFalse(),o=t&&!t.nodeType&&t,d=o&&!0&&e&&!e.nodeType&&e,m=d&&d.exports===o,g=m?r.Buffer:void 0,y=g?g.isBuffer:void 0,b=y||s;e.exports=b})(isBuffer,isBuffer.exports)),isBuffer.exports}var _isIndex,hasRequired_isIndex;function require_isIndex(){if(hasRequired_isIndex)return _isIndex;hasRequired_isIndex=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(s,o){var d=typeof s;return o=o??e,!!o&&(d=="number"||d!="symbol"&&t.test(s))&&s>-1&&s%1==0&&s<o}return _isIndex=r,_isIndex}var isLength_1,hasRequiredIsLength;function requireIsLength(){if(hasRequiredIsLength)return isLength_1;hasRequiredIsLength=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return isLength_1=t,isLength_1}var _baseIsTypedArray,hasRequired_baseIsTypedArray;function require_baseIsTypedArray(){if(hasRequired_baseIsTypedArray)return _baseIsTypedArray;hasRequired_baseIsTypedArray=1;var e=require_baseGetTag(),t=requireIsLength(),r=requireIsObjectLike(),s="[object Arguments]",o="[object Array]",d="[object Boolean]",m="[object Date]",g="[object Error]",y="[object Function]",b="[object Map]",x="[object Number]",E="[object Object]",C="[object RegExp]",S="[object Set]",A="[object String]",N="[object WeakMap]",k="[object ArrayBuffer]",L="[object DataView]",G="[object Float32Array]",M="[object Float64Array]",z="[object Int8Array]",V="[object Int16Array]",Y="[object Int32Array]",X="[object Uint8Array]",Q="[object Uint8ClampedArray]",$="[object Uint16Array]",K="[object Uint32Array]",ee={};ee[G]=ee[M]=ee[z]=ee[V]=ee[Y]=ee[X]=ee[Q]=ee[$]=ee[K]=!0,ee[s]=ee[o]=ee[k]=ee[d]=ee[L]=ee[m]=ee[g]=ee[y]=ee[b]=ee[x]=ee[E]=ee[C]=ee[S]=ee[A]=ee[N]=!1;function se(ie){return r(ie)&&t(ie.length)&&!!ee[e(ie)]}return _baseIsTypedArray=se,_baseIsTypedArray}var _baseUnary,hasRequired_baseUnary;function require_baseUnary(){if(hasRequired_baseUnary)return _baseUnary;hasRequired_baseUnary=1;function e(t){return function(r){return t(r)}}return _baseUnary=e,_baseUnary}var _nodeUtil={exports:{}};_nodeUtil.exports;var hasRequired_nodeUtil;function require_nodeUtil(){return hasRequired_nodeUtil||(hasRequired_nodeUtil=1,(function(e,t){var r=require_freeGlobal(),s=t&&!t.nodeType&&t,o=s&&!0&&e&&!e.nodeType&&e,d=o&&o.exports===s,m=d&&r.process,g=(function(){try{var y=o&&o.require&&o.require("util").types;return y||m&&m.binding&&m.binding("util")}catch{}})();e.exports=g})(_nodeUtil,_nodeUtil.exports)),_nodeUtil.exports}var isTypedArray_1,hasRequiredIsTypedArray;function requireIsTypedArray(){if(hasRequiredIsTypedArray)return isTypedArray_1;hasRequiredIsTypedArray=1;var e=require_baseIsTypedArray(),t=require_baseUnary(),r=require_nodeUtil(),s=r&&r.isTypedArray,o=s?t(s):e;return isTypedArray_1=o,isTypedArray_1}var _arrayLikeKeys,hasRequired_arrayLikeKeys;function require_arrayLikeKeys(){if(hasRequired_arrayLikeKeys)return _arrayLikeKeys;hasRequired_arrayLikeKeys=1;var e=require_baseTimes(),t=requireIsArguments(),r=requireIsArray(),s=requireIsBuffer(),o=require_isIndex(),d=requireIsTypedArray(),m=Object.prototype,g=m.hasOwnProperty;function y(b,x){var E=r(b),C=!E&&t(b),S=!E&&!C&&s(b),A=!E&&!C&&!S&&d(b),N=E||C||S||A,k=N?e(b.length,String):[],L=k.length;for(var G in b)(x||g.call(b,G))&&!(N&&(G=="length"||S&&(G=="offset"||G=="parent")||A&&(G=="buffer"||G=="byteLength"||G=="byteOffset")||o(G,L)))&&k.push(G);return k}return _arrayLikeKeys=y,_arrayLikeKeys}var _isPrototype,hasRequired_isPrototype;function require_isPrototype(){if(hasRequired_isPrototype)return _isPrototype;hasRequired_isPrototype=1;var e=Object.prototype;function t(r){var s=r&&r.constructor,o=typeof s=="function"&&s.prototype||e;return r===o}return _isPrototype=t,_isPrototype}var _overArg,hasRequired_overArg;function require_overArg(){if(hasRequired_overArg)return _overArg;hasRequired_overArg=1;function e(t,r){return function(s){return t(r(s))}}return _overArg=e,_overArg}var _nativeKeys,hasRequired_nativeKeys;function require_nativeKeys(){if(hasRequired_nativeKeys)return _nativeKeys;hasRequired_nativeKeys=1;var e=require_overArg(),t=e(Object.keys,Object);return _nativeKeys=t,_nativeKeys}var _baseKeys,hasRequired_baseKeys;function require_baseKeys(){if(hasRequired_baseKeys)return _baseKeys;hasRequired_baseKeys=1;var e=require_isPrototype(),t=require_nativeKeys(),r=Object.prototype,s=r.hasOwnProperty;function o(d){if(!e(d))return t(d);var m=[];for(var g in Object(d))s.call(d,g)&&g!="constructor"&&m.push(g);return m}return _baseKeys=o,_baseKeys}var isArrayLike_1,hasRequiredIsArrayLike;function requireIsArrayLike(){if(hasRequiredIsArrayLike)return isArrayLike_1;hasRequiredIsArrayLike=1;var e=requireIsFunction(),t=requireIsLength();function r(s){return s!=null&&t(s.length)&&!e(s)}return isArrayLike_1=r,isArrayLike_1}var keys_1,hasRequiredKeys;function requireKeys(){if(hasRequiredKeys)return keys_1;hasRequiredKeys=1;var e=require_arrayLikeKeys(),t=require_baseKeys(),r=requireIsArrayLike();function s(o){return r(o)?e(o):t(o)}return keys_1=s,keys_1}var _getAllKeys,hasRequired_getAllKeys;function require_getAllKeys(){if(hasRequired_getAllKeys)return _getAllKeys;hasRequired_getAllKeys=1;var e=require_baseGetAllKeys(),t=require_getSymbols(),r=requireKeys();function s(o){return e(o,r,t)}return _getAllKeys=s,_getAllKeys}var _equalObjects,hasRequired_equalObjects;function require_equalObjects(){if(hasRequired_equalObjects)return _equalObjects;hasRequired_equalObjects=1;var e=require_getAllKeys(),t=1,r=Object.prototype,s=r.hasOwnProperty;function o(d,m,g,y,b,x){var E=g&t,C=e(d),S=C.length,A=e(m),N=A.length;if(S!=N&&!E)return!1;for(var k=S;k--;){var L=C[k];if(!(E?L in m:s.call(m,L)))return!1}var G=x.get(d),M=x.get(m);if(G&&M)return G==m&&M==d;var z=!0;x.set(d,m),x.set(m,d);for(var V=E;++k<S;){L=C[k];var Y=d[L],X=m[L];if(y)var Q=E?y(X,Y,L,m,d,x):y(Y,X,L,d,m,x);if(!(Q===void 0?Y===X||b(Y,X,g,y,x):Q)){z=!1;break}V||(V=L=="constructor")}if(z&&!V){var $=d.constructor,K=m.constructor;$!=K&&"constructor"in d&&"constructor"in m&&!(typeof $=="function"&&$ instanceof $&&typeof K=="function"&&K instanceof K)&&(z=!1)}return x.delete(d),x.delete(m),z}return _equalObjects=o,_equalObjects}var _DataView,hasRequired_DataView;function require_DataView(){if(hasRequired_DataView)return _DataView;hasRequired_DataView=1;var e=require_getNative(),t=require_root(),r=e(t,"DataView");return _DataView=r,_DataView}var _Promise,hasRequired_Promise;function require_Promise(){if(hasRequired_Promise)return _Promise;hasRequired_Promise=1;var e=require_getNative(),t=require_root(),r=e(t,"Promise");return _Promise=r,_Promise}var _Set,hasRequired_Set;function require_Set(){if(hasRequired_Set)return _Set;hasRequired_Set=1;var e=require_getNative(),t=require_root(),r=e(t,"Set");return _Set=r,_Set}var _WeakMap,hasRequired_WeakMap;function require_WeakMap(){if(hasRequired_WeakMap)return _WeakMap;hasRequired_WeakMap=1;var e=require_getNative(),t=require_root(),r=e(t,"WeakMap");return _WeakMap=r,_WeakMap}var _getTag,hasRequired_getTag;function require_getTag(){if(hasRequired_getTag)return _getTag;hasRequired_getTag=1;var e=require_DataView(),t=require_Map(),r=require_Promise(),s=require_Set(),o=require_WeakMap(),d=require_baseGetTag(),m=require_toSource(),g="[object Map]",y="[object Object]",b="[object Promise]",x="[object Set]",E="[object WeakMap]",C="[object DataView]",S=m(e),A=m(t),N=m(r),k=m(s),L=m(o),G=d;return(e&&G(new e(new ArrayBuffer(1)))!=C||t&&G(new t)!=g||r&&G(r.resolve())!=b||s&&G(new s)!=x||o&&G(new o)!=E)&&(G=function(M){var z=d(M),V=z==y?M.constructor:void 0,Y=V?m(V):"";if(Y)switch(Y){case S:return C;case A:return g;case N:return b;case k:return x;case L:return E}return z}),_getTag=G,_getTag}var _baseIsEqualDeep,hasRequired_baseIsEqualDeep;function require_baseIsEqualDeep(){if(hasRequired_baseIsEqualDeep)return _baseIsEqualDeep;hasRequired_baseIsEqualDeep=1;var e=require_Stack(),t=require_equalArrays(),r=require_equalByTag(),s=require_equalObjects(),o=require_getTag(),d=requireIsArray(),m=requireIsBuffer(),g=requireIsTypedArray(),y=1,b="[object Arguments]",x="[object Array]",E="[object Object]",C=Object.prototype,S=C.hasOwnProperty;function A(N,k,L,G,M,z){var V=d(N),Y=d(k),X=V?x:o(N),Q=Y?x:o(k);X=X==b?E:X,Q=Q==b?E:Q;var $=X==E,K=Q==E,ee=X==Q;if(ee&&m(N)){if(!m(k))return!1;V=!0,$=!1}if(ee&&!$)return z||(z=new e),V||g(N)?t(N,k,L,G,M,z):r(N,k,X,L,G,M,z);if(!(L&y)){var se=$&&S.call(N,"__wrapped__"),ie=K&&S.call(k,"__wrapped__");if(se||ie){var te=se?N.value():N,ue=ie?k.value():k;return z||(z=new e),M(te,ue,L,G,z)}}return ee?(z||(z=new e),s(N,k,L,G,M,z)):!1}return _baseIsEqualDeep=A,_baseIsEqualDeep}var _baseIsEqual,hasRequired_baseIsEqual;function require_baseIsEqual(){if(hasRequired_baseIsEqual)return _baseIsEqual;hasRequired_baseIsEqual=1;var e=require_baseIsEqualDeep(),t=requireIsObjectLike();function r(s,o,d,m,g){return s===o?!0:s==null||o==null||!t(s)&&!t(o)?s!==s&&o!==o:e(s,o,d,m,r,g)}return _baseIsEqual=r,_baseIsEqual}var _baseIsMatch,hasRequired_baseIsMatch;function require_baseIsMatch(){if(hasRequired_baseIsMatch)return _baseIsMatch;hasRequired_baseIsMatch=1;var e=require_Stack(),t=require_baseIsEqual(),r=1,s=2;function o(d,m,g,y){var b=g.length,x=b,E=!y;if(d==null)return!x;for(d=Object(d);b--;){var C=g[b];if(E&&C[2]?C[1]!==d[C[0]]:!(C[0]in d))return!1}for(;++b<x;){C=g[b];var S=C[0],A=d[S],N=C[1];if(E&&C[2]){if(A===void 0&&!(S in d))return!1}else{var k=new e;if(y)var L=y(A,N,S,d,m,k);if(!(L===void 0?t(N,A,r|s,y,k):L))return!1}}return!0}return _baseIsMatch=o,_baseIsMatch}var _isStrictComparable,hasRequired_isStrictComparable;function require_isStrictComparable(){if(hasRequired_isStrictComparable)return _isStrictComparable;hasRequired_isStrictComparable=1;var e=requireIsObject();function t(r){return r===r&&!e(r)}return _isStrictComparable=t,_isStrictComparable}var _getMatchData,hasRequired_getMatchData;function require_getMatchData(){if(hasRequired_getMatchData)return _getMatchData;hasRequired_getMatchData=1;var e=require_isStrictComparable(),t=requireKeys();function r(s){for(var o=t(s),d=o.length;d--;){var m=o[d],g=s[m];o[d]=[m,g,e(g)]}return o}return _getMatchData=r,_getMatchData}var _matchesStrictComparable,hasRequired_matchesStrictComparable;function require_matchesStrictComparable(){if(hasRequired_matchesStrictComparable)return _matchesStrictComparable;hasRequired_matchesStrictComparable=1;function e(t,r){return function(s){return s==null?!1:s[t]===r&&(r!==void 0||t in Object(s))}}return _matchesStrictComparable=e,_matchesStrictComparable}var _baseMatches,hasRequired_baseMatches;function require_baseMatches(){if(hasRequired_baseMatches)return _baseMatches;hasRequired_baseMatches=1;var e=require_baseIsMatch(),t=require_getMatchData(),r=require_matchesStrictComparable();function s(o){var d=t(o);return d.length==1&&d[0][2]?r(d[0][0],d[0][1]):function(m){return m===o||e(m,o,d)}}return _baseMatches=s,_baseMatches}var _isKey,hasRequired_isKey;function require_isKey(){if(hasRequired_isKey)return _isKey;hasRequired_isKey=1;var e=requireIsArray(),t=requireIsSymbol(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;function o(d,m){if(e(d))return!1;var g=typeof d;return g=="number"||g=="symbol"||g=="boolean"||d==null||t(d)?!0:s.test(d)||!r.test(d)||m!=null&&d in Object(m)}return _isKey=o,_isKey}var memoize_1,hasRequiredMemoize;function requireMemoize(){if(hasRequiredMemoize)return memoize_1;hasRequiredMemoize=1;var e=require_MapCache(),t="Expected a function";function r(s,o){if(typeof s!="function"||o!=null&&typeof o!="function")throw new TypeError(t);var d=function(){var m=arguments,g=o?o.apply(this,m):m[0],y=d.cache;if(y.has(g))return y.get(g);var b=s.apply(this,m);return d.cache=y.set(g,b)||y,b};return d.cache=new(r.Cache||e),d}return r.Cache=e,memoize_1=r,memoize_1}var _memoizeCapped,hasRequired_memoizeCapped;function require_memoizeCapped(){if(hasRequired_memoizeCapped)return _memoizeCapped;hasRequired_memoizeCapped=1;var e=requireMemoize(),t=500;function r(s){var o=e(s,function(m){return d.size===t&&d.clear(),m}),d=o.cache;return o}return _memoizeCapped=r,_memoizeCapped}var _stringToPath,hasRequired_stringToPath;function require_stringToPath(){if(hasRequired_stringToPath)return _stringToPath;hasRequired_stringToPath=1;var e=require_memoizeCapped(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,s=e(function(o){var d=[];return o.charCodeAt(0)===46&&d.push(""),o.replace(t,function(m,g,y,b){d.push(y?b.replace(r,"$1"):g||m)}),d});return _stringToPath=s,_stringToPath}var _castPath,hasRequired_castPath;function require_castPath(){if(hasRequired_castPath)return _castPath;hasRequired_castPath=1;var e=requireIsArray(),t=require_isKey(),r=require_stringToPath(),s=requireToString();function o(d,m){return e(d)?d:t(d,m)?[d]:r(s(d))}return _castPath=o,_castPath}var _toKey,hasRequired_toKey;function require_toKey(){if(hasRequired_toKey)return _toKey;hasRequired_toKey=1;var e=requireIsSymbol();function t(r){if(typeof r=="string"||e(r))return r;var s=r+"";return s=="0"&&1/r==-1/0?"-0":s}return _toKey=t,_toKey}var _baseGet,hasRequired_baseGet;function require_baseGet(){if(hasRequired_baseGet)return _baseGet;hasRequired_baseGet=1;var e=require_castPath(),t=require_toKey();function r(s,o){o=e(o,s);for(var d=0,m=o.length;s!=null&&d<m;)s=s[t(o[d++])];return d&&d==m?s:void 0}return _baseGet=r,_baseGet}var get_1,hasRequiredGet;function requireGet(){if(hasRequiredGet)return get_1;hasRequiredGet=1;var e=require_baseGet();function t(r,s,o){var d=r==null?void 0:e(r,s);return d===void 0?o:d}return get_1=t,get_1}var _baseHasIn,hasRequired_baseHasIn;function require_baseHasIn(){if(hasRequired_baseHasIn)return _baseHasIn;hasRequired_baseHasIn=1;function e(t,r){return t!=null&&r in Object(t)}return _baseHasIn=e,_baseHasIn}var _hasPath,hasRequired_hasPath;function require_hasPath(){if(hasRequired_hasPath)return _hasPath;hasRequired_hasPath=1;var e=require_castPath(),t=requireIsArguments(),r=requireIsArray(),s=require_isIndex(),o=requireIsLength(),d=require_toKey();function m(g,y,b){y=e(y,g);for(var x=-1,E=y.length,C=!1;++x<E;){var S=d(y[x]);if(!(C=g!=null&&b(g,S)))break;g=g[S]}return C||++x!=E?C:(E=g==null?0:g.length,!!E&&o(E)&&s(S,E)&&(r(g)||t(g)))}return _hasPath=m,_hasPath}var hasIn_1,hasRequiredHasIn;function requireHasIn(){if(hasRequiredHasIn)return hasIn_1;hasRequiredHasIn=1;var e=require_baseHasIn(),t=require_hasPath();function r(s,o){return s!=null&&t(s,o,e)}return hasIn_1=r,hasIn_1}var _baseMatchesProperty,hasRequired_baseMatchesProperty;function require_baseMatchesProperty(){if(hasRequired_baseMatchesProperty)return _baseMatchesProperty;hasRequired_baseMatchesProperty=1;var e=require_baseIsEqual(),t=requireGet(),r=requireHasIn(),s=require_isKey(),o=require_isStrictComparable(),d=require_matchesStrictComparable(),m=require_toKey(),g=1,y=2;function b(x,E){return s(x)&&o(E)?d(m(x),E):function(C){var S=t(C,x);return S===void 0&&S===E?r(C,x):e(E,S,g|y)}}return _baseMatchesProperty=b,_baseMatchesProperty}var identity_1,hasRequiredIdentity;function requireIdentity(){if(hasRequiredIdentity)return identity_1;hasRequiredIdentity=1;function e(t){return t}return identity_1=e,identity_1}var _baseProperty,hasRequired_baseProperty;function require_baseProperty(){if(hasRequired_baseProperty)return _baseProperty;hasRequired_baseProperty=1;function e(t){return function(r){return r?.[t]}}return _baseProperty=e,_baseProperty}var _basePropertyDeep,hasRequired_basePropertyDeep;function require_basePropertyDeep(){if(hasRequired_basePropertyDeep)return _basePropertyDeep;hasRequired_basePropertyDeep=1;var e=require_baseGet();function t(r){return function(s){return e(s,r)}}return _basePropertyDeep=t,_basePropertyDeep}var property_1,hasRequiredProperty;function requireProperty(){if(hasRequiredProperty)return property_1;hasRequiredProperty=1;var e=require_baseProperty(),t=require_basePropertyDeep(),r=require_isKey(),s=require_toKey();function o(d){return r(d)?e(s(d)):t(d)}return property_1=o,property_1}var _baseIteratee,hasRequired_baseIteratee;function require_baseIteratee(){if(hasRequired_baseIteratee)return _baseIteratee;hasRequired_baseIteratee=1;var e=require_baseMatches(),t=require_baseMatchesProperty(),r=requireIdentity(),s=requireIsArray(),o=requireProperty();function d(m){return typeof m=="function"?m:m==null?r:typeof m=="object"?s(m)?t(m[0],m[1]):e(m):o(m)}return _baseIteratee=d,_baseIteratee}var _createFind,hasRequired_createFind;function require_createFind(){if(hasRequired_createFind)return _createFind;hasRequired_createFind=1;var e=require_baseIteratee(),t=requireIsArrayLike(),r=requireKeys();function s(o){return function(d,m,g){var y=Object(d);if(!t(d)){var b=e(m,3);d=r(d),m=function(E){return b(y[E],E,y)}}var x=o(d,m,g);return x>-1?y[b?d[x]:x]:void 0}}return _createFind=s,_createFind}var _baseFindIndex,hasRequired_baseFindIndex;function require_baseFindIndex(){if(hasRequired_baseFindIndex)return _baseFindIndex;hasRequired_baseFindIndex=1;function e(t,r,s,o){for(var d=t.length,m=s+(o?1:-1);o?m--:++m<d;)if(r(t[m],m,t))return m;return-1}return _baseFindIndex=e,_baseFindIndex}var toFinite_1,hasRequiredToFinite;function requireToFinite(){if(hasRequiredToFinite)return toFinite_1;hasRequiredToFinite=1;var e=requireToNumber(),t=1/0,r=17976931348623157e292;function s(o){if(!o)return o===0?o:0;if(o=e(o),o===t||o===-t){var d=o<0?-1:1;return d*r}return o===o?o:0}return toFinite_1=s,toFinite_1}var toInteger_1,hasRequiredToInteger;function requireToInteger(){if(hasRequiredToInteger)return toInteger_1;hasRequiredToInteger=1;var e=requireToFinite();function t(r){var s=e(r),o=s%1;return s===s?o?s-o:s:0}return toInteger_1=t,toInteger_1}var findIndex_1,hasRequiredFindIndex;function requireFindIndex(){if(hasRequiredFindIndex)return findIndex_1;hasRequiredFindIndex=1;var e=require_baseFindIndex(),t=require_baseIteratee(),r=requireToInteger(),s=Math.max;function o(d,m,g){var y=d==null?0:d.length;if(!y)return-1;var b=g==null?0:r(g);return b<0&&(b=s(y+b,0)),e(d,t(m,3),b)}return findIndex_1=o,findIndex_1}var find_1,hasRequiredFind;function requireFind(){if(hasRequiredFind)return find_1;hasRequiredFind=1;var e=require_createFind(),t=requireFindIndex(),r=e(t);return find_1=r,find_1}var findExports=requireFind();const find=getDefaultExportFromCjs$1(findExports);let IdentifySidebar$1=class extends React.Component{constructor(t){super(t),this.renderResults=this.renderResults.bind(this)}renderResults(){const{identifyResults:t,cmLayerNames:r,uidMap:s}=this.props,o=/[:](.+)/i,d=[];let m=0;return t.forEach(g=>{const y=g.dataset,b=find(r,{teamDatasetId:y}),x=b?b.displayName:s[y];Object.keys(g.result).forEach(E=>{const C=g.result[E];if(C&&C.features&&C.features.length){const S=o.exec(E),A=S&&S[1]!==x?S[0]:"";d.push(jsxRuntime.jsx(IdentifySidebarList,{features:C.features,displayName:`${x}${A}`},m++))}})}),d}render(){const{primaryPanelShowClose:t,doToggleIdentifyView:r,doPrimaryPanelResize:s}=this.props,o=classnames({"sidebar-list":!t,"thin-scrollbar":!0,"sidebar-list-show-close-btn":t}),d=t?50:30;return jsxRuntime.jsx("div",{children:jsxRuntime.jsxs("div",{className:o,style:{top:d},children:[jsxRuntime.jsx("div",{className:"row",children:jsxRuntime.jsxs("div",{className:"col-xs-12",children:[jsxRuntime.jsx("button",{type:"button",className:"cm-btn cm-btn-xs cm-btn-default pull-right",title:"RESIZE PANE",onClick:()=>{s({width:585})},children:"RESIZE PANE"}),jsxRuntime.jsx("button",{type:"button",className:"cm-btn cm-btn-xs cm-btn-default pull-right",title:"TABLE VIEW",onClick:()=>{r("table")},children:"TABLE VIEW"})]})}),this.renderResults()]})})}};const IdentifySidebar=connect("selectIdentifyResults","selectCmLayerNames","selectUidMap","selectPrimaryPanelShowClose","doToggleIdentifyView","doPrimaryPanelResize",IdentifySidebar$1);let IdentifyDetails$1=class extends React.Component{constructor(t){super(t),this.renderValue=this.renderValue.bind(this)}componentDidMount(){const{map:t,identifyDetailLayer:r}=this.props;t.addLayer(r)}componentWillUnmount(){const{map:t,identifyDetailLayer:r}=this.props;t.removeLayer(r)}renderValue(t){return t&&typeof t=="string"?isHtml(t)?jsxRuntime.jsx("td",{className:"col-sm-8 overflow-sidebar-identify",dangerouslySetInnerHTML:{__html:t}}):t.indexOf("http")!==-1?jsxRuntime.jsx("td",{className:"col-sm-8 overflow-sidebar-identify",title:t,children:jsxRuntime.jsx("a",{href:t,children:t})}):jsxRuntime.jsx("td",{className:"col-sm-8 overflow-sidebar-identify",title:t,children:t}):jsxRuntime.jsx("td",{className:"col-sm-8 overflow-sidebar-identify",title:t,children:t})}render(){const{identifyDetailFeature:t,doRenderIdentifySidebar:r,primaryPanelShowClose:s}=this.props,o=classnames({"sidebar-list":!s,"thin-scrollbar":!0,"sidebar-list-show-close-btn":s}),d=s?60:30;return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("i",{onClick:r,style:{fontSize:24,cursor:"pointer"},title:"Return to List",className:"mdi mdi-arrow-left"}),jsxRuntime.jsx("div",{className:o,style:{top:d},children:jsxRuntime.jsxs("table",{className:"table table-striped table-hover ",children:[jsxRuntime.jsx("thead",{children:jsxRuntime.jsxs("tr",{children:[jsxRuntime.jsx("th",{className:"col-sm-4 overflow-sidebar-identify",children:jsxRuntime.jsx("strong",{children:"Attribute"})}),jsxRuntime.jsx("th",{className:"col-sm-8 overflow-sidebar-identify",children:jsxRuntime.jsx("strong",{children:"Value"})})]})}),jsxRuntime.jsx("tbody",{children:Object.keys(t.properties).map((m,g)=>jsxRuntime.jsxs("tr",{children:[jsxRuntime.jsx("td",{className:"col-sm-4 overflow-sidebar-identify",title:m,children:m}),this.renderValue(t.properties[m])]},btoa(m)+g))})]})})]})}};const IdentifyDetails=connect("selectIdentifyDetailFeature","doRenderIdentifySidebar","selectIdentifyDetailLayer","selectMap","selectPrimaryPanelShowClose",IdentifyDetails$1);class Cell extends React.Component{constructor(t){super(t),this.renderValue=this.renderValue.bind(this)}renderValue(t){return t&&typeof t=="string"?isHtml(t)?jsxRuntime.jsx("div",{className:"overflow-ellipsis overflow-ellipsis-user-select",dangerouslySetInnerHTML:{__html:t}}):t.indexOf("http")!==-1?jsxRuntime.jsx("div",{className:"overflow-ellipsis overflow-ellipsis-user-select",title:t,children:jsxRuntime.jsx("a",{href:t,children:t})}):jsxRuntime.jsx("div",{className:"overflow-ellipsis overflow-ellipsis-user-select",title:t,children:t}):jsxRuntime.jsx("div",{className:"overflow-ellipsis overflow-ellipsis-user-select",title:t,children:t})}render(){const{value:t}=this.props;return this.renderValue(t)}}const style$1=new style$3.Style({fill:new style$3.Fill({color:"rgba(84, 240, 240, 0.1)"}),stroke:new style$3.Stroke({color:"rgb(84, 240, 240)",width:1}),image:new style$3.Circle({radius:5,stroke:new style$3.Stroke({color:"rgb(84, 240, 240)",width:1}),fill:new style$3.Fill({color:"rgba(84, 240, 240, 0.1)"})})}),selectStyle=new style$3.Style({fill:new style$3.Fill({color:"rgba(244, 241, 66, 0.8)"}),stroke:new style$3.Stroke({color:"rgb(244, 241, 66)",width:1}),image:new style$3.Circle({radius:8,stroke:new style$3.Stroke({color:"rgb(244, 241, 66)"}),fill:new style$3.Fill({color:"rgba(244, 241, 66, 0.8)"})})});let IdentifyTable$1=class extends React.Component{constructor(t){super(t);const r=t.features,s=r[0].geometry.type,o=r[0].properties,d={type:"FeatureCollection",features:r};this.layer=getLayer({serviceType:"LocalVector",visible:!0,geometryType:s,style:style$1,zIndex:1e3}),this.selection=getLayer({serviceType:"LocalVector",visible:!0,geometryType:s,style:selectStyle,zIndex:1001});const m=new GeoJSON().readFeatures(d,{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"}),g=this.layer.getSource();g.addFeatures(m),this.setRowsFromSource=this.setRowsFromSource.bind(this),this.generateColumns=this.generateColumns.bind(this),this.onSortColumnsChange=this.onSortColumnsChange.bind(this),this.sortRows=this.sortRows.bind(this),this.exportToCSV=this.exportToCSV.bind(this),this.identifyCsv=this.identifyCsv.bind(this),this.exportToGeoJSON=this.exportToGeoJSON.bind(this),this.state={rows:[],columns:this.generateColumns(o),sortColumns:[],source:g,minHeight:200,selected:[],sortBy:"ol_uid",sortDir:0,featureCollection:d}}generateColumns(t){return Object.keys(t).map((r,s)=>{let o=r&&r.length>15?150+(r.length-10)*5:150;return{id:s,key:r,name:r,editable:!1,sortable:!0,filterable:!0,width:o,resizable:!0,nullable:!0,formatter:Cell}})}componentWillUnmount(){const{map:t}=this.props;t.removeLayer(this.layer),t.removeLayer(this.selection)}componentDidMount(){const{map:t}=this.props;this.setRowsFromSource(),t.addLayer(this.layer),t.addLayer(this.selection)}setRowsFromSource(){const{source:t}=this.state,r=[];t.forEachFeature(s=>{const o={id:s.ol_uid,ol_uid:s.ol_uid,feature:s},d=s.getProperties();r.push(Object.assign(o,d))}),this.setState({rows:r})}exportToCSV(){const{columns:t,rows:r,sortBy:s,sortDir:o,selected:d}=this.state,m=_.map(t,"name"),g=o===0||o===1?"asc":"desc";let y=[],b=[];d.length?(d.forEach(x=>{r.forEach(E=>{x===E.id&&y.push(E.feature.getProperties())})}),b=_.orderBy(y,[s],[g])):(r.forEach(x=>{y.push(x.feature.getProperties())}),b=_.orderBy(y,[s],[g])),this.identifyCsv(m,b)}identifyCsv(t,r){const{doGenerateCsv:s}=this.props;let o=[t];r.forEach((d,m)=>{let g=[];t.forEach(y=>{g.push(d[y])}),o.push(g)}),s(o)}exportToGeoJSON(){const{featureCollection:t,rows:r,selected:s}=this.state,{doGenerateGeoJSON:o}=this.props;let d={type:"FeatureCollection",features:[]},m=[];s.length?s.forEach(g=>{r.forEach(y=>{g===y.id&&m.push(y.objectid)}),t.features.forEach(y=>{m.includes(y.id)&&d.features.push(y)})}):d=t,o(d)}onSortColumnsChange(t){const{rows:r}=this.state;this.setState({sortColumns:t}),this.setState({rows:this.sortRows(r,t)})}sortRows(t,r){const s=[...t];return s.sort((o,d)=>{for(const m of r){const{columnKey:g,direction:y}=m,b=o[g],x=d[g];if(b==null)return y==="ASC"?-1:1;if(x==null||b>x)return y==="ASC"?1:-1;if(b<x)return y==="ASC"?-1:1}return 0}),s}render(){const{rows:t,columns:r,sortColumns:s,selected:o}=this.state,{doToggleIdentifyView:d}=this.props,m=document.getElementsByClassName("south-container")[0];return m&&m.clientHeight-65,jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"text-right",style:{padding:"2px",marginRight:"15px"},children:[jsxRuntime.jsx("button",{type:"button",className:"cm-btn cm-btn-xs cm-btn-default",style:{marginRight:"5px"},title:"Sidebar View",onClick:()=>{d("sidebar")},children:"SIDEBAR VIEW"}),jsxRuntime.jsxs("div",{className:"cm-btn-group",children:[jsxRuntime.jsx("button",{type:"button",className:"cm-btn cm-btn-xs cm-btn-primary",title:"Export to csv",onClick:this.exportToCSV,children:"Export to csv"}),jsxRuntime.jsx("button",{type:"button",className:"cm-btn cm-btn-xs cm-btn-primary",title:"Export to geoJSON",onClick:this.exportToGeoJSON,children:"Export to geoJSON"})]})]}),jsxRuntime.jsx(reactDataGrid.DataGrid,{columns:r,rows:t,sortColumns:s,onSortColumnsChange:this.onSortColumnsChange})]})}};const IdentifyTable=connect("selectMap","selectIdentifyResults","selectCmLayerNames","doSouthPanelCloseChild","doGenerateCsv","doGenerateGeoJSON","doToggleIdentifyView",IdentifyTable$1);class IdentifyPopup extends React.Component{constructor(t){super(t),this.overlay=t.overlay,this.startDrag=this.startDrag.bind(this),this.dragMe=this.dragMe.bind(this),this.placeMe=this.placeMe.bind(this),this.handleClose=this.handleClose.bind(this),this.renderValue=this.renderValue.bind(this)}componentDidMount(){this.dragHandle.addEventListener("mousedown",this.startDrag),this.closeButton.addEventListener("click",this.handleClose)}componentWillUnmount(){this.dragHandle.removeEventListener("mousedown",this.startDrag),this.closeButton.removeEventListener("click",this.handleClose)}handleClose(){const{onClear:t,overlay:r}=this.props;t(r)}startDrag(t){const{map:r}=this.props,s=[t.clientX,t.clientY],o=r.getCoordinateFromPixel(s),d=this.overlay.getPosition();this.offset=[d[0]-o[0],d[1]-o[1]],r.on("pointermove",this.dragMe),window.addEventListener("mouseup",this.placeMe),this.overlay.set("dragging",!0)}dragMe(t){this.overlay.get("dragging")&&this.overlay.setPosition([t.coordinate[0]+this.offset[0],t.coordinate[1]+this.offset[1]])}placeMe(t){const{map:r}=this.props;this.overlay.get("dragging")&&(r.un("pointermove",this.dragMe),window.removeEventListener("mouseup",this.placeMe),this.overlay.set("dragging",!1))}renderValue(t){return t&&typeof t=="string"?isHtml(t)?jsxRuntime.jsx("span",{className:"col-sm-6",style:{overflow:"hidden"},dangerouslySetInnerHTML:{__html:t}}):t.indexOf("http")!==-1?jsxRuntime.jsx("span",{className:"col-sm-6 overflow-ellipsis",title:t,children:jsxRuntime.jsx("a",{href:t,target:"_blank",children:t})}):jsxRuntime.jsx("span",{className:"col-sm-6 overflow-ellipsis",title:t,children:t}):jsxRuntime.jsx("span",{className:"col-sm-6 overflow-ellipsis",title:t,children:t})}render(){const{feature:t}=this.props;return jsxRuntime.jsxs("div",{className:"panel panel-default top clearfix",style:{marginBottom:0,marginTop:"-10px"},children:[jsxRuntime.jsx("div",{className:"pull-right",ref:r=>{this.closeButton=r},children:jsxRuntime.jsx("i",{className:"mdi mdi-close"})}),jsxRuntime.jsx("div",{className:"pull-left",ref:r=>{this.dragHandle=r},children:jsxRuntime.jsx("i",{className:"mdi mdi-drag"})}),jsxRuntime.jsx("div",{className:"arrow",style:{left:"50%"}}),jsxRuntime.jsxs("div",{className:"panel-body",children:[jsxRuntime.jsx("p",{className:"",children:jsxRuntime.jsx("strong",{})}),jsxRuntime.jsx("div",{className:"",children:jsxRuntime.jsx("ul",{className:"cm-list-group thin-scrollbar",style:{maxHeight:300,overflow:"auto"},children:Object.keys(t.properties).map((r,s)=>jsxRuntime.jsxs("li",{className:"cm-list-group-item row",style:{margin:"3px",padding:"2px",maxWidth:"500px"},children:[jsxRuntime.jsx("span",{className:"col-sm-6 overflow-ellipsis",title:r,children:r}),this.renderValue(t.properties[r])]},s))})})]})]})}}const IdentifyBufferSettings$1=e=>{const{theme:t,identifyBufferUnit:r,doUpdateBufferUnit:s,doModalClose:o}=e,d=[{name:"Degrees",abv:"deg"},{name:"Kilometers",abv:"km"},{name:"Miles",abv:"mi"}];return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:`cm-modal-header ${t}`,children:"Identify Buffer Settings"}),jsxRuntime.jsxs("div",{className:"cm-modal-body",children:[jsxRuntime.jsx("h6",{children:"Please choose a supported unit below:"}),d.map(m=>jsxRuntime.jsx("button",{name:m.abv,className:`cm-btn cm-btn-sm cm-btn-block cm-btn-default ${r===m.abv?"active":""}`,type:"button",onClick:s,children:m.name},m.abv))]}),jsxRuntime.jsx("div",{className:"cm-modal-footer",children:jsxRuntime.jsx("button",{className:`cm-btn cm-btn-sm cm-btn-theme ${t}`,onClick:o,children:"Cancel"})})]})},IdentifyBufferSettings=connect("doUpdateBufferUnit","doModalClose","selectIdentifyBufferUnit","selectTheme",IdentifyBufferSettings$1),interactions={dragbox:DragBox,draw:Draw,modify:Modify,snap:Snap,select:Select$1},createInteraction=e=>{const t=_.omit(e,["on","interaction"]);if(!interactions.hasOwnProperty(e.interaction))throw new Error(`${e.interaction} is not a valid interaction`);const r=new interactions[e.interaction](t);return e.on&&e.on.length&&e.on.forEach(s=>{r.on(s.event,s.listener,s.scope)}),r},style=new style$3.Style({fill:new style$3.Fill({color:"rgba(84, 240, 240, 0.3)"}),stroke:new style$3.Stroke({color:"rgb(84, 240, 240)",width:1}),image:new style$3.Circle({radius:5,stroke:new style$3.Stroke({color:"rgb(84, 240, 240)",width:1}),fill:new style$3.Fill({color:"rgba(84, 240, 240, 0.3)"})})}),polygonLayer=getLayer({serviceType:"LocalVector",visible:!0,geometryType:"Polygon",style,zIndex:1e3}),polygonDraw=createInteraction({interaction:"draw",source:polygonLayer.getSource(),type:"Polygon"}),pointLayer=getLayer({serviceType:"LocalVector",visible:!0,geometryType:"Point",style,zIndex:1e3}),pointDraw=createInteraction({interaction:"draw",source:polygonLayer.getSource(),type:"Point"}),bufferLayer=getLayer({serviceType:"LocalVector",visible:!0,geometryType:"Polygon",style:new style$3.Style({fill:new style$3.Fill({color:"rgba(192,192,192,0.4)"}),stroke:new style$3.Stroke({color:"rgba(192,192,192,1)",width:1}),image:new style$3.Circle({radius:5,stroke:new style$3.Stroke({color:"rgba(192,192,192,1)",width:1}),fill:new style$3.Fill({color:"rgba(192,192,192,0.4)"})})}),zIndex:1e3}),identify={overlays:[]},bundle$d={name:"identifyUi",getReducer(){const e={selectBy:null,displayAs:"sidebar",bufferUnit:"km",bufferUnitFull:"kilometers",bufferValue:"",bufferFeature:null,shouldQuery:!1,shouldRenderResults:!1,shouldRenderDetails:!1,geom:null,results:[],selectedFeature:null,selectedLayer:null,identifyColumnsExclude:[]};return(t=e,{type:r,payload:s})=>{switch(r){case"IDENTIFY_UI_STARTED":case"IDENTIFY_UI_STOPPED":case"IDENTIFY_UI_DISPLAY_AS":case"IDENTIFY_UI_RESULTS_DISPLAYED":case"IDENTIFY_UI_RESULT_PICKED":case"IDENTIFY_UI_DETAILS_DISPLAYED":case"IDENTIFY_UI_TABLE_DISPLAYED":case"IDENTIFY_UI_NO_RESULTS_RETURNED":case"IDENTIFY_UI_BUFFER_SETTINGS_OPENED":case"IDENTIFY_UI_BUFFER_UNIT_UPDATED":case"IDENTIFY_UI_BUFFER_VALUE_UPDATED":case"IDENTIFY_UI_BUFFER_FEATURE_UPDATED":case"IDENTIFY_EXCLUDED_COLUMNS_SET":return Object.assign({},t,s);case"IDENTIFY_ERROR":return Object.assign({},t,{selectBy:null});case"IDENTIFY_SUCCESS":return Object.assign({},t,{shouldRenderResults:!0,selectBy:null});default:return t}}},doToggleIdentifyView:e=>({dispatch:t,store:r})=>{switch(r.selectIdentifyDisplayAs()){case"sidebar":r.doPrimaryPanelClose(),r.doRenderIdentifyTable();break;case"table":r.doSouthRegionClose(),r.doRenderIdentifySidebar();break}r.doSetDisplayAs(null,e)},doUpdateIdentifyBuffer:e=>({dispatch:t,store:r})=>{e.preventDefault(),e.stopPropagation(),t({type:"IDENTIFY_UI_BUFFER_VALUE_UPDATED",payload:{bufferValue:e.target.value}})},doStartIdentify:e=>({dispatch:t,store:r})=>{r.selectMap().interactions.array_.forEach(d=>{d.ol_uid=="43"&&(d.values_.active=!1)}),e.preventDefault(),e.stopPropagation();const o=e.currentTarget.dataset.selectby;t({type:"IDENTIFY_UI_STARTED",payload:{selectBy:o}}),r.doAddIdentifyInteractions()},doAddIdentifyInteractions:()=>({store:e})=>{const t=e.selectIdentifySelectBy();e.doRemoveIdentifyInteractions(),t==="point"?e.doIdentifyByPoint():t==="polygon"&&e.doIdentifyByPolygon()},doRemoveIdentifyInteractions:()=>({dispatch:e,store:t})=>{t.doSetCursor();const r=t.selectMap();r.removeInteraction(pointDraw),r.removeInteraction(polygonDraw)},doSetIdentifyGeom:e=>({store:t})=>{e.preventDefault(),e.stopPropagation();const r=t.selectMap(),o=e.feature.getGeometry();pointLayer.getSource().clear(),polygonLayer.getSource().clear(),bufferLayer.getSource().clear(),r.removeLayer(pointLayer),r.removeLayer(polygonLayer),r.removeLayer(bufferLayer),t.doRenderIdentifyGeometry(o),t.doIdentifySetCoords(o)},doRenderIdentifyGeometry:e=>({store:t})=>{const r=t.selectMap(),s=t.selectIdentifySelectBy(),o=e.getCoordinates();s==="point"?(pointLayer.getSource().addFeature(new Feature({geometry:new Point(o)})),t.doRenderIdentifyBufferPoint(new Point(o)),r.addLayer(pointLayer)):(polygonLayer.getSource().addFeature(new Feature({geometry:new Polygon(o)})),t.doRenderIdentifyBufferPolygon(new Polygon(o)),r.addLayer(polygonLayer)),t.doPauseIdentify()},doRenderIdentifyBufferPoint:e=>({dispatch:t,store:r})=>{const s=r.selectIdentifyBufferValue();if(!s.length)return;const o=r.selectMap(),d=r.selectIdentifyBufferUnitFull(),m=r.selectDisplayProjection(),g=e.transform("EPSG:3857",m),y=point(g.getCoordinates()),b=bufferLayer.getSource();b.clear();const x=index_default$1(y,Number(s),{units:d}),E=new GeoJSON().readFeature(x,{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"});b.addFeature(E),o.addLayer(bufferLayer),t({type:"IDENTIFY_UI_BUFFER_FEATURE_UPDATED",payload:{bufferFeature:x}})},doRenderIdentifyBufferPolygon:e=>({dispatch:t,store:r})=>{const s=r.selectIdentifyBufferValue();if(!s.length)return;const o=r.selectMap(),d=r.selectIdentifyBufferUnitFull(),m=r.selectDisplayProjection(),g=e.transform("EPSG:3857",m),y=polygon(g.getCoordinates()),b=bufferLayer.getSource();b.clear();const x=index_default$1(y,Number(s),{units:d}),E=new GeoJSON().readFeature(x,{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"});b.addFeature(E),o.addLayer(bufferLayer),t({type:"IDENTIFY_UI_BUFFER_FEATURE_UPDATED",payload:{bufferFeature:x}})},doIdentifyByPoint:()=>({dispatch:e,store:t})=>{t.doSetCursor("default"),t.selectMap().addInteraction(pointDraw)},doIdentifyByPolygon:()=>({dispatch:e,store:t})=>{t.doSetCursor("default"),t.selectMap().addInteraction(polygonDraw)},doPauseIdentify:()=>({dispatch:e,store:t})=>{t.doRemoveIdentifyInteractions(),e({type:"IDENTIFY_UI_STOPPED",payload:{selectBy:null}})},doStopIdentify:()=>({dispatch:e,store:t})=>{const r=t.selectMap(),s=t.selectIdentifyDisplayAs();switch(t.doRemoveIdentifyInteractions(),r.removeLayer(pointLayer),r.removeLayer(polygonLayer),r.removeLayer(bufferLayer),s){case"popup":t.doClearIdentifyPopups();break;case"sidebar":t.doPrimaryPanelClose();break;case"table":t.doSouthRegionClose();break}t.doBasicToolbarDeactivate(),r.interactions.array_.forEach(o=>{o.ol_uid=="43"&&(o.values_.active=!0)}),e({type:"IDENTIFY_UI_STOPPED",payload:{selectBy:null}})},doSetDisplayAs:(e,t)=>({dispatch:r})=>{let s=null;e?(e.preventDefault(),e.stopPropagation(),s=e.currentTarget.dataset.displayas):s=t,r({type:"IDENTIFY_UI_DISPLAY_AS",payload:{displayAs:s}})},doRenderIdentifyPopups:()=>({dispatch:e,store:t})=>{e({type:"IDENTIFY_UI_RESULTS_DISPLAYED",payload:{shouldRenderResults:!1}});const r=t.selectMap(),s=t.selectIdentifyResults(),o=t.selectIdentifyCoordinates();let d=o;o.length===1&&(d=o[0][0]),s.forEach(m=>{Object.keys(m.result).forEach(g=>{const y=m.result[g];y&&y.features&&y.features.length?y.features.forEach(b=>{const x=document.createElement("div"),E=new Overlay$1({element:x,positioning:"bottom-center",offset:[0,-10]});r.addOverlay(E),ReactDOM.render(jsxRuntime.jsx(IdentifyPopup,{overlay:E,feature:b,map:r,onClear:t.doClearOverlay}),x),E.setPosition(proj.transform(d,"EPSG:4326","EPSG:3857")),identify.overlays.push(E)}):e({type:"IDENTIFY_UI_NO_RESULTS_RETURNED",payload:{notification:{message:`No results at this location for ${m.layerName}`,level:"warning"}}})})})},doClearOverlay:e=>({store:t})=>{const r=t.selectMap();if(identify.overlays&&identify.overlays.length){const s=identify.overlays.indexOf(e);e.setPosition(void 0);const o=e.getElement();o.parentNode.removeChild(o),r.removeOverlay(e),identify.overlays.splice(s,1)}},doClearIdentifyPopups:()=>({store:e})=>{const t=e.selectMap();identify.overlays&&identify.overlays.length&&(identify.overlays.forEach(r=>{r.setPosition(void 0);const s=r.getElement();s.parentNode.removeChild(s),t.removeOverlay(r)}),identify.overlays=[])},doRenderIdentifySidebar:()=>({dispatch:e,store:t})=>{e({type:"IDENTIFY_UI_RESULTS_DISPLAYED",payload:{shouldRenderResults:!1}});const r=t.selectIdentifyResults();if(r.length)for(let s=0;s<r.length;s++){const o=Object.keys(r[s].result);for(let d=0;d<o.length;d++){const m=r[s].result[o[d]];if(m&&m.features&&m.features.length){t.doPrimaryPanelOpen({openedBy:"IdentifyTools",children:[IdentifySidebar]});break}else e({type:"IDENTIFY_UI_NO_RESULTS_RETURNED",payload:{notification:{message:`No results at this location for ${r[s].layerName}`,level:"warning"}}})}}},doOpenIdentifyDetails:(e,t)=>({dispatch:r})=>{r({type:"IDENTIFY_UI_RESULT_PICKED",payload:{selectedFeature:e,selectedLayer:t,shouldRenderDetails:!0}})},doRenderIdentifyDetails:()=>({dispatch:e,store:t})=>{e({type:"IDENTIFY_UI_DETAILS_DISPLAYED",payload:{shouldRenderDetails:!1}}),t.doPrimaryPanelOpen({openedBy:"IdentifyTools",children:[IdentifyDetails]})},doRenderIdentifyTable:()=>({dispatch:e,store:t})=>{e({type:"IDENTIFY_UI_RESULTS_DISPLAYED",payload:{shouldRenderResults:!1}});const r=t.selectIdentifyResults(),s=t.selectCmLayerNames(),o=t.selectUidMap(),d=/[:](.+)/i;r.forEach(m=>{const g=m.dataset,y=find(s,{teamDatasetId:g}),b=y?y.displayName:o[g];Object.keys(m.result).forEach(x=>{const E=m.result[x],C=d.exec(x),S=C&&C[0]!==b?C[0]:"";E&&E.features&&E.features.length?t.doSouthRegionOpen({component:IdentifyTable,options:{features:E.features},openedBy:"identify",displayName:`${b}${S}`}):e({type:"IDENTIFY_UI_NO_RESULTS_RETURNED",payload:{notification:{message:`No results at this location for ${m.layerName}`,level:"warning"}}})})})},doShowBufferUnits:e=>({dispatch:t,store:r})=>{e.preventDefault(),e.stopPropagation(),r.doModalOpen({children:[IdentifyBufferSettings],options:{smSize:!0},openedBy:"Identify Tool"}),t({type:"IDENTIFY_UI_BUFFER_SETTINGS_OPENED"})},doUpdateBufferUnit:e=>({dispatch:t,store:r})=>{e.preventDefault(),e.stopPropagation(),t({type:"IDENTIFY_UI_BUFFER_UNIT_UPDATED",payload:{bufferUnit:e.target.name,bufferUnitFull:e.target.textContent.toLowerCase()}}),r.doModalClose()},doSetIdentifyColumnsExclude:e=>({dispatch:t})=>{t({type:"IDENTIFY_EXCLUDED_COLUMNS_SET",payload:{identifyColumnsExclude:e}})},selectIdentifyColumnsExclude:e=>e.identifyUi.identifyColumnsExclude,selectIdentifySelectBy:e=>e.identifyUi.selectBy,selectIdentifyDisplayAs:e=>e.identifyUi.displayAs,selectIdentifyDetailFeature:e=>e.identifyUi.selectedFeature,selectIdentifyDetailLayer:e=>e.identifyUi.selectedLayer,selectIdentifyBufferUnit:e=>e.identifyUi.bufferUnit,selectIdentifyBufferUnitFull:e=>e.identifyUi.bufferUnitFull,selectIdentifyBufferValue:e=>e.identifyUi.bufferValue,selectIdentifyBufferFeature:e=>e.identifyUi.bufferFeature,reactShouldRunIdentify:e=>{if(e.identifyUi.shouldQuery)return{actionCreator:"doIdentify"}},reactShouldRenderIdentifyResults:e=>{if(e.identifyUi.shouldRenderResults){if(e.identifyUi.displayAs==="popup")return{actionCreator:"doRenderIdentifyPopups"};if(e.identifyUi.displayAs==="sidebar")return{actionCreator:"doRenderIdentifySidebar"};if(e.identifyUi.displayAs==="table")return{actionCreator:"doRenderIdentifyTable"}}},reactShouldRenderIdentifyDetails:e=>{if(e.identifyUi.shouldRenderDetails)return{actionCreator:"doRenderIdentifyDetails"}},init:e=>{pointDraw.on("drawend",e.doSetIdentifyGeom),polygonDraw.on("drawend",e.doSetIdentifyGeom)}},esrijsonFormat=new EsriJSON$1;function formatUrl(e){let t=`${e.root}/identify?`;const r=[];for(var s in e)s!=="root"&&r.push(s+"="+e[s].toString());return t+=r.join("&"),t}const ArcGisListener={name:"arcGisRestIdent",getReducer(){const e={shouldRegister:!0};return(t=e,{type:r,payload:s})=>r==="ARCGIS_IDENT_REGISTERED"?Object.assign({},t,s):t},doArcGisRestIdentRegister:()=>({dispatch:e,store:t})=>{e({type:"ARCGIS_IDENT_REGISTERED",payload:{shouldRegister:!1}}),t.doIdentifyAddCollection({onIdentify:t.doArcGisRestIdentFire})},doArcGisRestIdentFire:e=>({store:t,anonGet:r})=>{const s=t.selectVisibleLayers();if(!s.length)return e(null,[]);const o=[],d=t.doSetIdentifyFeature();let m=t.selectIdentifyColumnsExclude();const g={sr:4326,tolerance:2,returnGeometry:!0,mapExtent:t.selectMapExtent(),imageDisplay:t.selectMapImageDisplay(),f:"json",geometryType:"esriGeometryPolygon",geometry:encodeURIComponent(JSON.stringify({spatialReference:{wkid:4326},rings:[d.geometry.coordinates[0]]}))};s.forEach(y=>{if(y.identifyType&&y.identifyType==="arcgisrest"){const b=y.layerList;g.layers=`all:${b}`;const x=Object.assign({},g,{root:y.url}),E=formatUrl(x);o.push(C=>{r(E,(S,A,N)=>{if(S||A.statusCode!==200)C(null,{dataset:y.uid,layerName:y.displayName,err:`Error for ${y.displayName}`,result:{[y.uid]:{}}});else try{let k=JSON.parse(N);k.results.length?(k=identifyColumnsArcgisrest(k,m),C(null,{dataset:y.uid,layerName:y.displayName,err:null,result:{[y.uid]:{type:"FeatureCollection",features:k.results.map(L=>{const M=esrijsonFormat.readFeature(L,{featureProjection:"EPSG:3857"}).getGeometry();return{type:"Feature",geometry:{type:M.getType(),coordinates:M.getCoordinates()},properties:formatArcgisrest(L.attributes)}})}}})):C(null,{dataset:y.uid,layerName:y.displayName,err:null,result:{[y.uid]:{}}})}catch(k){console.log(k),C(null,{dataset:y.uid,layerName:y.displayName,err:`Error for ${y.displayName}`,result:{[y.uid]:{}}})}})})}}),async.parallel(o,(y,b)=>{e(y,b)})},reactArcGisRestIdentShouldRegister:e=>{if(e.arcGisRestIdent.shouldRegister)return{actionCreator:"doArcGisRestIdentRegister"}}},geoJSON$1=new GeoJSON,VectorListener={name:"vectorIdent",getReducer(){const e={shouldRegister:!0};return(t=e,{type:r,payload:s})=>r==="VECTOR_IDENT_REGISTERED"?Object.assign({},t,s):t},doVectorIdentRegister:()=>({dispatch:e,store:t})=>{e({type:"VECTOR_IDENT_REGISTERED",payload:{shouldRegister:!1}}),t.doIdentifyAddCollection({onIdentify:t.doVectorIdentFire})},doVectorIdentFire:e=>({store:t})=>{const r=t.selectVisibleLayers(),s=t.doSetIdentifyFeature(),o=[],d=proj.transformExtent(index_default$2(s),"EPSG:4326","EPSG:3857");return r.forEach(m=>{if(m.identifyType&&m.identifyType==="arcgisvector"){const{mapLayer:g}=m;let y=[];const b=g.getSource();let x=t.selectIdentifyColumnsExclude();const E=m.identifyFields,C=m.identifyRenameColums,S=m.identifyFormatColumns;b.forEachFeatureIntersectingExtent(d,A=>{const N=geoJSON$1.writeFeatureObject(A,{featureProjection:"EPSG:3857",dataProjection:"EPSG:4326"});index_default(s,N)||y.push(N)}),y=identifyExcludeColumnsArcgisvector(y,x),E&&(y=identifyIncludeColumnsArcgisvector(y,E)),C&&(y=identifyRenameColumnsArcgisvector(y,C)),S&&(y=identifyFormatColumnsArcgisvector(y,S)),o.push({dataset:m.uid,layerName:m.displayName,err:null,result:{[m.uid]:{type:"FeatureCollection",features:formatArcgisVector(y)}}})}}),e(null,o)},reactVectorIdentShouldRegister:e=>{if(e.vectorIdent.shouldRegister)return{actionCreator:"doVectorIdentRegister"}}},plugin$g={pluginName:"IdentifyTools",enabled:!0,bundle:[bundle$d,ArcGisListener,VectorListener],components:[{component:IdentifyButton,region:"basic-toolbar",sortOrder:90}]};var _createBaseFor,hasRequired_createBaseFor;function require_createBaseFor(){if(hasRequired_createBaseFor)return _createBaseFor;hasRequired_createBaseFor=1;function e(t){return function(r,s,o){for(var d=-1,m=Object(r),g=o(r),y=g.length;y--;){var b=g[t?y:++d];if(s(m[b],b,m)===!1)break}return r}}return _createBaseFor=e,_createBaseFor}var _baseFor,hasRequired_baseFor;function require_baseFor(){if(hasRequired_baseFor)return _baseFor;hasRequired_baseFor=1;var e=require_createBaseFor(),t=e();return _baseFor=t,_baseFor}var _baseForOwn,hasRequired_baseForOwn;function require_baseForOwn(){if(hasRequired_baseForOwn)return _baseForOwn;hasRequired_baseForOwn=1;var e=require_baseFor(),t=requireKeys();function r(s,o){return s&&e(s,o,t)}return _baseForOwn=r,_baseForOwn}var _createBaseEach,hasRequired_createBaseEach;function require_createBaseEach(){if(hasRequired_createBaseEach)return _createBaseEach;hasRequired_createBaseEach=1;var e=requireIsArrayLike();function t(r,s){return function(o,d){if(o==null)return o;if(!e(o))return r(o,d);for(var m=o.length,g=s?m:-1,y=Object(o);(s?g--:++g<m)&&d(y[g],g,y)!==!1;);return o}}return _createBaseEach=t,_createBaseEach}var _baseEach,hasRequired_baseEach;function require_baseEach(){if(hasRequired_baseEach)return _baseEach;hasRequired_baseEach=1;var e=require_baseForOwn(),t=require_createBaseEach(),r=t(e);return _baseEach=r,_baseEach}var _baseMap,hasRequired_baseMap;function require_baseMap(){if(hasRequired_baseMap)return _baseMap;hasRequired_baseMap=1;var e=require_baseEach(),t=requireIsArrayLike();function r(s,o){var d=-1,m=t(s)?Array(s.length):[];return e(s,function(g,y,b){m[++d]=o(g,y,b)}),m}return _baseMap=r,_baseMap}var _baseSortBy,hasRequired_baseSortBy;function require_baseSortBy(){if(hasRequired_baseSortBy)return _baseSortBy;hasRequired_baseSortBy=1;function e(t,r){var s=t.length;for(t.sort(r);s--;)t[s]=t[s].value;return t}return _baseSortBy=e,_baseSortBy}var _compareAscending,hasRequired_compareAscending;function require_compareAscending(){if(hasRequired_compareAscending)return _compareAscending;hasRequired_compareAscending=1;var e=requireIsSymbol();function t(r,s){if(r!==s){var o=r!==void 0,d=r===null,m=r===r,g=e(r),y=s!==void 0,b=s===null,x=s===s,E=e(s);if(!b&&!E&&!g&&r>s||g&&y&&x&&!b&&!E||d&&y&&x||!o&&x||!m)return 1;if(!d&&!g&&!E&&r<s||E&&o&&m&&!d&&!g||b&&o&&m||!y&&m||!x)return-1}return 0}return _compareAscending=t,_compareAscending}var _compareMultiple,hasRequired_compareMultiple;function require_compareMultiple(){if(hasRequired_compareMultiple)return _compareMultiple;hasRequired_compareMultiple=1;var e=require_compareAscending();function t(r,s,o){for(var d=-1,m=r.criteria,g=s.criteria,y=m.length,b=o.length;++d<y;){var x=e(m[d],g[d]);if(x){if(d>=b)return x;var E=o[d];return x*(E=="desc"?-1:1)}}return r.index-s.index}return _compareMultiple=t,_compareMultiple}var _baseOrderBy,hasRequired_baseOrderBy;function require_baseOrderBy(){if(hasRequired_baseOrderBy)return _baseOrderBy;hasRequired_baseOrderBy=1;var e=require_arrayMap(),t=require_baseGet(),r=require_baseIteratee(),s=require_baseMap(),o=require_baseSortBy(),d=require_baseUnary(),m=require_compareMultiple(),g=requireIdentity(),y=requireIsArray();function b(x,E,C){E.length?E=e(E,function(N){return y(N)?function(k){return t(k,N.length===1?N[0]:N)}:N}):E=[g];var S=-1;E=e(E,d(r));var A=s(x,function(N,k,L){var G=e(E,function(M){return M(N)});return{criteria:G,index:++S,value:N}});return o(A,function(N,k){return m(N,k,C)})}return _baseOrderBy=b,_baseOrderBy}var _apply,hasRequired_apply;function require_apply(){if(hasRequired_apply)return _apply;hasRequired_apply=1;function e(t,r,s){switch(s.length){case 0:return t.call(r);case 1:return t.call(r,s[0]);case 2:return t.call(r,s[0],s[1]);case 3:return t.call(r,s[0],s[1],s[2])}return t.apply(r,s)}return _apply=e,_apply}var _overRest,hasRequired_overRest;function require_overRest(){if(hasRequired_overRest)return _overRest;hasRequired_overRest=1;var e=require_apply(),t=Math.max;function r(s,o,d){return o=t(o===void 0?s.length-1:o,0),function(){for(var m=arguments,g=-1,y=t(m.length-o,0),b=Array(y);++g<y;)b[g]=m[o+g];g=-1;for(var x=Array(o+1);++g<o;)x[g]=m[g];return x[o]=d(b),e(s,this,x)}}return _overRest=r,_overRest}var constant_1,hasRequiredConstant;function requireConstant(){if(hasRequiredConstant)return constant_1;hasRequiredConstant=1;function e(t){return function(){return t}}return constant_1=e,constant_1}var _defineProperty,hasRequired_defineProperty;function require_defineProperty(){if(hasRequired_defineProperty)return _defineProperty;hasRequired_defineProperty=1;var e=require_getNative(),t=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return _defineProperty=t,_defineProperty}var _baseSetToString,hasRequired_baseSetToString;function require_baseSetToString(){if(hasRequired_baseSetToString)return _baseSetToString;hasRequired_baseSetToString=1;var e=requireConstant(),t=require_defineProperty(),r=requireIdentity(),s=t?function(o,d){return t(o,"toString",{configurable:!0,enumerable:!1,value:e(d),writable:!0})}:r;return _baseSetToString=s,_baseSetToString}var _shortOut,hasRequired_shortOut;function require_shortOut(){if(hasRequired_shortOut)return _shortOut;hasRequired_shortOut=1;var e=800,t=16,r=Date.now;function s(o){var d=0,m=0;return function(){var g=r(),y=t-(g-m);if(m=g,y>0){if(++d>=e)return arguments[0]}else d=0;return o.apply(void 0,arguments)}}return _shortOut=s,_shortOut}var _setToString,hasRequired_setToString;function require_setToString(){if(hasRequired_setToString)return _setToString;hasRequired_setToString=1;var e=require_baseSetToString(),t=require_shortOut(),r=t(e);return _setToString=r,_setToString}var _baseRest,hasRequired_baseRest;function require_baseRest(){if(hasRequired_baseRest)return _baseRest;hasRequired_baseRest=1;var e=requireIdentity(),t=require_overRest(),r=require_setToString();function s(o,d){return r(t(o,d,e),o+"")}return _baseRest=s,_baseRest}var _isIterateeCall,hasRequired_isIterateeCall;function require_isIterateeCall(){if(hasRequired_isIterateeCall)return _isIterateeCall;hasRequired_isIterateeCall=1;var e=requireEq(),t=requireIsArrayLike(),r=require_isIndex(),s=requireIsObject();function o(d,m,g){if(!s(g))return!1;var y=typeof m;return(y=="number"?t(g)&&r(m,g.length):y=="string"&&m in g)?e(g[m],d):!1}return _isIterateeCall=o,_isIterateeCall}var sortBy_1,hasRequiredSortBy;function requireSortBy(){if(hasRequiredSortBy)return sortBy_1;hasRequiredSortBy=1;var e=require_baseFlatten(),t=require_baseOrderBy(),r=require_baseRest(),s=require_isIterateeCall(),o=r(function(d,m){if(d==null)return[];var g=m.length;return g>1&&s(d,m[0],m[1])?m=[]:g>2&&s(m[0],m[1],m[2])&&(m=[m[0]]),t(d,e(m,1),[])});return sortBy_1=o,sortBy_1}var sortByExports=requireSortBy();const sortBy=getDefaultExportFromCjs$1(sortByExports);let ToggleExpand$1=class extends React.Component{constructor(t){super(t),this.toggleExpanded=this.toggleExpanded.bind(this)}toggleExpanded(t){t.preventDefault(),t.stopPropagation(),this.props.doTreeViewToggleExpand()}render(){const{treeViewToggleExpanded:t}=this.props,r="",s=t?"Expand All Folders":"Collapse All Folders",o=classnames({"icon-inline":!1,mdi:!0,"mdi-plus-box-outline":t,"mdi-minus-box-outline":!t});return jsxRuntime.jsxs("button",{className:"cm-btn cm-btn-default cm-btn-xs",onClick:this.toggleExpanded,style:{marginRight:"5px"},title:s,children:[jsxRuntime.jsx("i",{className:o}),r]})}};const ToggleExpand=connect("selectTreeViewToggleExpanded","doTreeViewToggleExpand",ToggleExpand$1);let AddAll$1=class extends React.Component{constructor(t){super(t),this.addAllLayers=this.addAllLayers.bind(this)}addAllLayers(t){t.preventDefault(),t.stopPropagation(),this.props.doTreeViewAddAll()}render(){return jsxRuntime.jsx("button",{className:"cm-btn cm-btn-default cm-btn-xs",style:{marginRight:"5px"},title:"Add All Layers",onClick:this.addAllLayers,children:jsxRuntime.jsx("i",{className:"mdi mdi-layers-triple"})})}};const AddAll=connect("doTreeViewAddAll",AddAll$1);let RemoveAll$1=class extends React.Component{constructor(t){super(t),this.removeAllLayers=this.removeAllLayers.bind(this)}removeAllLayers(t){t.preventDefault(),t.stopPropagation(),this.props.doTreeViewRemoveAll()}render(){return jsxRuntime.jsx("button",{className:"cm-btn cm-btn-default cm-btn-xs",style:{marginRight:"5px"},title:"Turn Off All Layers",onClick:this.removeAllLayers,children:jsxRuntime.jsx("i",{className:"mdi mdi-layers-triple-outline"})})}};const RemoveAll=connect("doTreeViewRemoveAll",RemoveAll$1);let ToggleFilter$1=class extends React.Component{constructor(t){super(t),this.toggleFilter=this.toggleFilter.bind(this)}toggleFilter(t){t.preventDefault(),t.stopPropagation(),this.props.toggleFilter()}render(){const{layerShowFilter:t}=this.props,r="",s=classnames({"icon-inline":!1,mdi:!0,"mdi-filter-plus-outline":!t,"mdi-filter-minus-outline":t});return jsxRuntime.jsxs("button",{onClick:this.toggleFilter,className:"cm-btn cm-btn-default cm-btn-xs",title:"Show/Hide Layer Filter",children:[jsxRuntime.jsx("i",{className:s}),r]})}};const ToggleFilter=connect("selectLayerShowFilter",ToggleFilter$1);let Favorites$1=class extends React.Component{constructor(t){super(t),this.toggleFavorites=this.toggleFavorites.bind(this)}toggleFavorites(t){t.preventDefault(),t.stopPropagation(),this.props.doToggleFavoritesView()}render(){const t=this.props.treeViewToggleFavoritesView?"mdi mdi-star":"mdi mdi-star-outline",r=this.props.treeViewToggleFavoritesView?"Hide Favorite Layers":"Show Favorite Layers";return jsxRuntime.jsx("button",{className:"cm-btn cm-btn-default cm-btn-xs",style:{margin:"0 5px"},title:r,onClick:this.toggleFavorites,children:jsxRuntime.jsx("i",{className:t})})}};const Favorites=connect("doToggleFavoritesView","selectTreeViewToggleFavoritesView",Favorites$1),decodeCache={};function getDecodeCache(e){let t=decodeCache[e];if(t)return t;t=decodeCache[e]=[];for(let r=0;r<128;r++){const s=String.fromCharCode(r);t.push(s)}for(let r=0;r<e.length;r++){const s=e.charCodeAt(r);t[s]="%"+("0"+s.toString(16).toUpperCase()).slice(-2)}return t}function decode$1(e,t){typeof t!="string"&&(t=decode$1.defaultChars);const r=getDecodeCache(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(s){let o="";for(let d=0,m=s.length;d<m;d+=3){const g=parseInt(s.slice(d+1,d+3),16);if(g<128){o+=r[g];continue}if((g&224)===192&&d+3<m){const y=parseInt(s.slice(d+4,d+6),16);if((y&192)===128){const b=g<<6&1984|y&63;b<128?o+="��":o+=String.fromCharCode(b),d+=3;continue}}if((g&240)===224&&d+6<m){const y=parseInt(s.slice(d+4,d+6),16),b=parseInt(s.slice(d+7,d+9),16);if((y&192)===128&&(b&192)===128){const x=g<<12&61440|y<<6&4032|b&63;x<2048||x>=55296&&x<=57343?o+="���":o+=String.fromCharCode(x),d+=6;continue}}if((g&248)===240&&d+9<m){const y=parseInt(s.slice(d+4,d+6),16),b=parseInt(s.slice(d+7,d+9),16),x=parseInt(s.slice(d+10,d+12),16);if((y&192)===128&&(b&192)===128&&(x&192)===128){let E=g<<18&1835008|y<<12&258048|b<<6&4032|x&63;E<65536||E>1114111?o+="����":(E-=65536,o+=String.fromCharCode(55296+(E>>10),56320+(E&1023))),d+=9;continue}}o+="�"}return o})}decode$1.defaultChars=";/?:@&=+$,#",decode$1.componentChars="";const encodeCache={};function getEncodeCache(e){let t=encodeCache[e];if(t)return t;t=encodeCache[e]=[];for(let r=0;r<128;r++){const s=String.fromCharCode(r);/^[0-9a-z]$/i.test(s)?t.push(s):t.push("%"+("0"+r.toString(16).toUpperCase()).slice(-2))}for(let r=0;r<e.length;r++)t[e.charCodeAt(r)]=e[r];return t}function encode$1(e,t,r){typeof t!="string"&&(r=t,t=encode$1.defaultChars),typeof r>"u"&&(r=!0);const s=getEncodeCache(t);let o="";for(let d=0,m=e.length;d<m;d++){const g=e.charCodeAt(d);if(r&&g===37&&d+2<m&&/^[0-9a-f]{2}$/i.test(e.slice(d+1,d+3))){o+=e.slice(d,d+3),d+=2;continue}if(g<128){o+=s[g];continue}if(g>=55296&&g<=57343){if(g>=55296&&g<=56319&&d+1<m){const y=e.charCodeAt(d+1);if(y>=56320&&y<=57343){o+=encodeURIComponent(e[d]+e[d+1]),d++;continue}}o+="%EF%BF%BD";continue}o+=encodeURIComponent(e[d])}return o}encode$1.defaultChars=";/?:@&=+$,-_.!~*'()#",encode$1.componentChars="-_.!~*'()";function format(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function Url(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,simplePathPattern=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,delims=["<",">",'"',"`"," ","\r",`
143
+ `]))),loadingIndicatorCSS=function e(t,r){var s=t.isFocused,o=t.size,d=t.theme,m=d.colors,g=d.spacing.baseUnit;return _objectSpread2({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:o,lineHeight:1,marginRight:o,textAlign:"center",verticalAlign:"middle"},r?{}:{color:s?m.neutral60:m.neutral20,padding:g*2})},LoadingDot=function e(t){var r=t.delay,s=t.offset;return jsx("span",{css:css$2({animation:"".concat(loadingDotAnimations," 1s ease-in-out ").concat(r,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:s?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},process$1.env.NODE_ENV==="production"?"":";label:LoadingDot;",process$1.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGljYXRvcnMudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1RSSIsImZpbGUiOiJpbmRpY2F0b3JzLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3gsIGtleWZyYW1lcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuaW1wb3J0IHtcbiAgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWUsXG4gIENTU09iamVjdFdpdGhMYWJlbCxcbiAgR3JvdXBCYXNlLFxufSBmcm9tICcuLi90eXBlcyc7XG5pbXBvcnQgeyBnZXRTdHlsZVByb3BzIH0gZnJvbSAnLi4vdXRpbHMnO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgSWNvbnNcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBTdmcgPSAoe1xuICBzaXplLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzdmcnXSAmIHsgc2l6ZTogbnVtYmVyIH0pID0+IChcbiAgPHN2Z1xuICAgIGhlaWdodD17c2l6ZX1cbiAgICB3aWR0aD17c2l6ZX1cbiAgICB2aWV3Qm94PVwiMCAwIDIwIDIwXCJcbiAgICBhcmlhLWhpZGRlbj1cInRydWVcIlxuICAgIGZvY3VzYWJsZT1cImZhbHNlXCJcbiAgICBjc3M9e3tcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgZmlsbDogJ2N1cnJlbnRDb2xvcicsXG4gICAgICBsaW5lSGVpZ2h0OiAxLFxuICAgICAgc3Ryb2tlOiAnY3VycmVudENvbG9yJyxcbiAgICAgIHN0cm9rZVdpZHRoOiAwLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IHR5cGUgQ3Jvc3NJY29uUHJvcHMgPSBKU1guSW50cmluc2ljRWxlbWVudHNbJ3N2ZyddICYgeyBzaXplPzogbnVtYmVyIH07XG5leHBvcnQgY29uc3QgQ3Jvc3NJY29uID0gKHByb3BzOiBDcm9zc0ljb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNMTQuMzQ4IDE0Ljg0OWMtMC40NjkgMC40NjktMS4yMjkgMC40NjktMS42OTcgMGwtMi42NTEtMy4wMzAtMi42NTEgMy4wMjljLTAuNDY5IDAuNDY5LTEuMjI5IDAuNDY5LTEuNjk3IDAtMC40NjktMC40NjktMC40NjktMS4yMjkgMC0xLjY5N2wyLjc1OC0zLjE1LTIuNzU5LTMuMTUyYy0wLjQ2OS0wLjQ2OS0wLjQ2OS0xLjIyOCAwLTEuNjk3czEuMjI4LTAuNDY5IDEuNjk3IDBsMi42NTIgMy4wMzEgMi42NTEtMy4wMzFjMC40NjktMC40NjkgMS4yMjgtMC40NjkgMS42OTcgMHMwLjQ2OSAxLjIyOSAwIDEuNjk3bC0yLjc1OCAzLjE1MiAyLjc1OCAzLjE1YzAuNDY5IDAuNDY5IDAuNDY5IDEuMjI5IDAgMS42OTh6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuZXhwb3J0IHR5cGUgRG93bkNoZXZyb25Qcm9wcyA9IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snc3ZnJ10gJiB7IHNpemU/OiBudW1iZXIgfTtcbmV4cG9ydCBjb25zdCBEb3duQ2hldnJvbiA9IChwcm9wczogRG93bkNoZXZyb25Qcm9wcykgPT4gKFxuICA8U3ZnIHNpemU9ezIwfSB7Li4ucHJvcHN9PlxuICAgIDxwYXRoIGQ9XCJNNC41MTYgNy41NDhjMC40MzYtMC40NDYgMS4wNDMtMC40ODEgMS41NzYgMGwzLjkwOCAzLjc0NyAzLjkwOC0zLjc0N2MwLjUzMy0wLjQ4MSAxLjE0MS0wLjQ0NiAxLjU3NCAwIDAuNDM2IDAuNDQ1IDAuNDA4IDEuMTk3IDAgMS42MTUtMC40MDYgMC40MTgtNC42OTUgNC41MDItNC42OTUgNC41MDItMC4yMTcgMC4yMjMtMC41MDIgMC4zMzUtMC43ODcgMC4zMzVzLTAuNTctMC4xMTItMC43ODktMC4zMzVjMCAwLTQuMjg3LTQuMDg0LTQuNjk1LTQuNTAycy0wLjQzNi0xLjE3IDAtMS42MTV6XCIgLz5cbiAgPC9Tdmc+XG4pO1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIERyb3Bkb3duICYgQ2xlYXIgQnV0dG9uc1xuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG5cbmV4cG9ydCBpbnRlcmZhY2UgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxcbiAgT3B0aW9uID0gdW5rbm93bixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4gPSBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+ID0gR3JvdXBCYXNlPE9wdGlvbj5cbj4gZXh0ZW5kcyBDb21tb25Qcm9wc0FuZENsYXNzTmFtZTxPcHRpb24sIElzTXVsdGksIEdyb3VwPiB7XG4gIC8qKiBUaGUgY2hpbGRyZW4gdG8gYmUgcmVuZGVyZWQgaW5zaWRlIHRoZSBpbmRpY2F0b3IuICovXG4gIGNoaWxkcmVuPzogUmVhY3ROb2RlO1xuICAvKiogUHJvcHMgdGhhdCB3aWxsIGJlIHBhc3NlZCBvbiB0byB0aGUgY2hpbGRyZW4uICovXG4gIGlubmVyUHJvcHM6IEpTWC5JbnRyaW5zaWNFbGVtZW50c1snZGl2J107XG4gIC8qKiBUaGUgZm9jdXNlZCBzdGF0ZSBvZiB0aGUgc2VsZWN0LiAqL1xuICBpc0ZvY3VzZWQ6IGJvb2xlYW47XG4gIGlzRGlzYWJsZWQ6IGJvb2xlYW47XG59XG5cbmNvbnN0IGJhc2VDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgdGhlbWU6IHtcbiAgICAgIHNwYWNpbmc6IHsgYmFzZVVuaXQgfSxcbiAgICAgIGNvbG9ycyxcbiAgICB9LFxuICB9OlxuICAgIHwgRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuICAgIHwgQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2luZGljYXRvckNvbnRhaW5lcicsXG4gIGRpc3BsYXk6ICdmbGV4JyxcbiAgdHJhbnNpdGlvbjogJ2NvbG9yIDE1MG1zJyxcbiAgLi4uKHVuc3R5bGVkXG4gICAgPyB7fVxuICAgIDoge1xuICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw2MCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIHBhZGRpbmc6IGJhc2VVbml0ICogMixcbiAgICAgICAgJzpob3Zlcic6IHtcbiAgICAgICAgICBjb2xvcjogaXNGb2N1c2VkID8gY29sb3JzLm5ldXRyYWw4MCA6IGNvbG9ycy5uZXV0cmFsNDAsXG4gICAgICAgIH0sXG4gICAgICB9KSxcbn0pO1xuXG5leHBvcnQgY29uc3QgZHJvcGRvd25JbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IERyb3Bkb3duSW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogRHJvcGRvd25JbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnZHJvcGRvd25JbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2Ryb3Bkb3duLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8RG93bkNoZXZyb24gLz59XG4gICAgPC9kaXY+XG4gICk7XG59O1xuXG5leHBvcnQgaW50ZXJmYWNlIENsZWFySW5kaWNhdG9yUHJvcHM8XG4gIE9wdGlvbiA9IHVua25vd24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuID0gYm9vbGVhbixcbiAgR3JvdXAgZXh0ZW5kcyBHcm91cEJhc2U8T3B0aW9uPiA9IEdyb3VwQmFzZTxPcHRpb24+XG4+IGV4dGVuZHMgQ29tbW9uUHJvcHNBbmRDbGFzc05hbWU8T3B0aW9uLCBJc011bHRpLCBHcm91cD4ge1xuICAvKiogVGhlIGNoaWxkcmVuIHRvIGJlIHJlbmRlcmVkIGluc2lkZSB0aGUgaW5kaWNhdG9yLiAqL1xuICBjaGlsZHJlbj86IFJlYWN0Tm9kZTtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xufVxuXG5leHBvcnQgY29uc3QgY2xlYXJJbmRpY2F0b3JDU1MgPSBiYXNlQ1NTO1xuZXhwb3J0IGNvbnN0IENsZWFySW5kaWNhdG9yID0gPFxuICBPcHRpb24sXG4gIElzTXVsdGkgZXh0ZW5kcyBib29sZWFuLFxuICBHcm91cCBleHRlbmRzIEdyb3VwQmFzZTxPcHRpb24+XG4+KFxuICBwcm9wczogQ2xlYXJJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgY2hpbGRyZW4sIGlubmVyUHJvcHMgfSA9IHByb3BzO1xuICByZXR1cm4gKFxuICAgIDxkaXZcbiAgICAgIHsuLi5nZXRTdHlsZVByb3BzKHByb3BzLCAnY2xlYXJJbmRpY2F0b3InLCB7XG4gICAgICAgIGluZGljYXRvcjogdHJ1ZSxcbiAgICAgICAgJ2NsZWFyLWluZGljYXRvcic6IHRydWUsXG4gICAgICB9KX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIHtjaGlsZHJlbiB8fCA8Q3Jvc3NJY29uIC8+fVxuICAgIDwvZGl2PlxuICApO1xufTtcblxuLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4vLyBTZXBhcmF0b3Jcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5leHBvcnQgaW50ZXJmYWNlIEluZGljYXRvclNlcGFyYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgaXNEaXNhYmxlZDogYm9vbGVhbjtcbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpbm5lclByb3BzPzogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ107XG59XG5cbmV4cG9ydCBjb25zdCBpbmRpY2F0b3JTZXBhcmF0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0Rpc2FibGVkLFxuICAgIHRoZW1lOiB7XG4gICAgICBzcGFjaW5nOiB7IGJhc2VVbml0IH0sXG4gICAgICBjb2xvcnMsXG4gICAgfSxcbiAgfTogSW5kaWNhdG9yU2VwYXJhdG9yUHJvcHM8T3B0aW9uLCBJc011bHRpLCBHcm91cD4sXG4gIHVuc3R5bGVkOiBib29sZWFuXG4pOiBDU1NPYmplY3RXaXRoTGFiZWwgPT4gKHtcbiAgbGFiZWw6ICdpbmRpY2F0b3JTZXBhcmF0b3InLFxuICBhbGlnblNlbGY6ICdzdHJldGNoJyxcbiAgd2lkdGg6IDEsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgYmFja2dyb3VuZENvbG9yOiBpc0Rpc2FibGVkID8gY29sb3JzLm5ldXRyYWwxMCA6IGNvbG9ycy5uZXV0cmFsMjAsXG4gICAgICAgIG1hcmdpbkJvdHRvbTogYmFzZVVuaXQgKiAyLFxuICAgICAgICBtYXJnaW5Ub3A6IGJhc2VVbml0ICogMixcbiAgICAgIH0pLFxufSk7XG5cbmV4cG9ydCBjb25zdCBJbmRpY2F0b3JTZXBhcmF0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHByb3BzOiBJbmRpY2F0b3JTZXBhcmF0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPlxuKSA9PiB7XG4gIGNvbnN0IHsgaW5uZXJQcm9wcyB9ID0gcHJvcHM7XG4gIHJldHVybiAoXG4gICAgPHNwYW5cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgICAgey4uLmdldFN0eWxlUHJvcHMocHJvcHMsICdpbmRpY2F0b3JTZXBhcmF0b3InLCB7XG4gICAgICAgICdpbmRpY2F0b3Itc2VwYXJhdG9yJzogdHJ1ZSxcbiAgICAgIH0pfVxuICAgIC8+XG4gICk7XG59O1xuXG4vLyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbi8vIExvYWRpbmdcbi8vID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG5jb25zdCBsb2FkaW5nRG90QW5pbWF0aW9ucyA9IGtleWZyYW1lc2BcbiAgMCUsIDgwJSwgMTAwJSB7IG9wYWNpdHk6IDA7IH1cbiAgNDAlIHsgb3BhY2l0eTogMTsgfVxuYDtcblxuZXhwb3J0IGNvbnN0IGxvYWRpbmdJbmRpY2F0b3JDU1MgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oXG4gIHtcbiAgICBpc0ZvY3VzZWQsXG4gICAgc2l6ZSxcbiAgICB0aGVtZToge1xuICAgICAgY29sb3JzLFxuICAgICAgc3BhY2luZzogeyBiYXNlVW5pdCB9LFxuICAgIH0sXG4gIH06IExvYWRpbmdJbmRpY2F0b3JQcm9wczxPcHRpb24sIElzTXVsdGksIEdyb3VwPixcbiAgdW5zdHlsZWQ6IGJvb2xlYW5cbik6IENTU09iamVjdFdpdGhMYWJlbCA9PiAoe1xuICBsYWJlbDogJ2xvYWRpbmdJbmRpY2F0b3InLFxuICBkaXNwbGF5OiAnZmxleCcsXG4gIHRyYW5zaXRpb246ICdjb2xvciAxNTBtcycsXG4gIGFsaWduU2VsZjogJ2NlbnRlcicsXG4gIGZvbnRTaXplOiBzaXplLFxuICBsaW5lSGVpZ2h0OiAxLFxuICBtYXJnaW5SaWdodDogc2l6ZSxcbiAgdGV4dEFsaWduOiAnY2VudGVyJyxcbiAgdmVydGljYWxBbGlnbjogJ21pZGRsZScsXG4gIC4uLih1bnN0eWxlZFxuICAgID8ge31cbiAgICA6IHtcbiAgICAgICAgY29sb3I6IGlzRm9jdXNlZCA/IGNvbG9ycy5uZXV0cmFsNjAgOiBjb2xvcnMubmV1dHJhbDIwLFxuICAgICAgICBwYWRkaW5nOiBiYXNlVW5pdCAqIDIsXG4gICAgICB9KSxcbn0pO1xuXG5pbnRlcmZhY2UgTG9hZGluZ0RvdFByb3BzIHtcbiAgZGVsYXk6IG51bWJlcjtcbiAgb2Zmc2V0OiBib29sZWFuO1xufVxuY29uc3QgTG9hZGluZ0RvdCA9ICh7IGRlbGF5LCBvZmZzZXQgfTogTG9hZGluZ0RvdFByb3BzKSA9PiAoXG4gIDxzcGFuXG4gICAgY3NzPXt7XG4gICAgICBhbmltYXRpb246IGAke2xvYWRpbmdEb3RBbmltYXRpb25zfSAxcyBlYXNlLWluLW91dCAke2RlbGF5fW1zIGluZmluaXRlO2AsXG4gICAgICBiYWNrZ3JvdW5kQ29sb3I6ICdjdXJyZW50Q29sb3InLFxuICAgICAgYm9yZGVyUmFkaXVzOiAnMWVtJyxcbiAgICAgIGRpc3BsYXk6ICdpbmxpbmUtYmxvY2snLFxuICAgICAgbWFyZ2luTGVmdDogb2Zmc2V0ID8gJzFlbScgOiB1bmRlZmluZWQsXG4gICAgICBoZWlnaHQ6ICcxZW0nLFxuICAgICAgdmVydGljYWxBbGlnbjogJ3RvcCcsXG4gICAgICB3aWR0aDogJzFlbScsXG4gICAgfX1cbiAgLz5cbik7XG5cbmV4cG9ydCBpbnRlcmZhY2UgTG9hZGluZ0luZGljYXRvclByb3BzPFxuICBPcHRpb24gPSB1bmtub3duLFxuICBJc011bHRpIGV4dGVuZHMgYm9vbGVhbiA9IGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj4gPSBHcm91cEJhc2U8T3B0aW9uPlxuPiBleHRlbmRzIENvbW1vblByb3BzQW5kQ2xhc3NOYW1lPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+IHtcbiAgLyoqIFByb3BzIHRoYXQgd2lsbCBiZSBwYXNzZWQgb24gdG8gdGhlIGNoaWxkcmVuLiAqL1xuICBpbm5lclByb3BzOiBKU1guSW50cmluc2ljRWxlbWVudHNbJ2RpdiddO1xuICAvKiogVGhlIGZvY3VzZWQgc3RhdGUgb2YgdGhlIHNlbGVjdC4gKi9cbiAgaXNGb2N1c2VkOiBib29sZWFuO1xuICBpc0Rpc2FibGVkOiBib29sZWFuO1xuICAvKiogU2V0IHNpemUgb2YgdGhlIGNvbnRhaW5lci4gKi9cbiAgc2l6ZTogbnVtYmVyO1xufVxuZXhwb3J0IGNvbnN0IExvYWRpbmdJbmRpY2F0b3IgPSA8XG4gIE9wdGlvbixcbiAgSXNNdWx0aSBleHRlbmRzIGJvb2xlYW4sXG4gIEdyb3VwIGV4dGVuZHMgR3JvdXBCYXNlPE9wdGlvbj5cbj4oe1xuICBpbm5lclByb3BzLFxuICBpc1J0bCxcbiAgc2l6ZSA9IDQsXG4gIC4uLnJlc3RQcm9wc1xufTogTG9hZGluZ0luZGljYXRvclByb3BzPE9wdGlvbiwgSXNNdWx0aSwgR3JvdXA+KSA9PiB7XG4gIHJldHVybiAoXG4gICAgPGRpdlxuICAgICAgey4uLmdldFN0eWxlUHJvcHMoXG4gICAgICAgIHsgLi4ucmVzdFByb3BzLCBpbm5lclByb3BzLCBpc1J0bCwgc2l6ZSB9LFxuICAgICAgICAnbG9hZGluZ0luZGljYXRvcicsXG4gICAgICAgIHtcbiAgICAgICAgICBpbmRpY2F0b3I6IHRydWUsXG4gICAgICAgICAgJ2xvYWRpbmctaW5kaWNhdG9yJzogdHJ1ZSxcbiAgICAgICAgfVxuICAgICAgKX1cbiAgICAgIHsuLi5pbm5lclByb3BzfVxuICAgID5cbiAgICAgIDxMb2FkaW5nRG90IGRlbGF5PXswfSBvZmZzZXQ9e2lzUnRsfSAvPlxuICAgICAgPExvYWRpbmdEb3QgZGVsYXk9ezE2MH0gb2Zmc2V0IC8+XG4gICAgICA8TG9hZGluZ0RvdCBkZWxheT17MzIwfSBvZmZzZXQ9eyFpc1J0bH0gLz5cbiAgICA8L2Rpdj5cbiAgKTtcbn07XG4iXX0= */")})},LoadingIndicator=function e(t){var r=t.innerProps,s=t.isRtl,o=t.size,d=o===void 0?4:o,m=_objectWithoutProperties(t,_excluded2);return jsx("div",_extends({},getStyleProps(_objectSpread2(_objectSpread2({},m),{},{innerProps:r,isRtl:s,size:d}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),r),jsx(LoadingDot,{delay:0,offset:s}),jsx(LoadingDot,{delay:160,offset:!0}),jsx(LoadingDot,{delay:320,offset:!s}))},css$1=function e(t,r){var s=t.isDisabled,o=t.isFocused,d=t.theme,m=d.colors,g=d.borderRadius,y=d.spacing;return _objectSpread2({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:y.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},r?{}:{backgroundColor:s?m.neutral5:m.neutral0,borderColor:s?m.neutral10:o?m.primary:m.neutral20,borderRadius:g,borderStyle:"solid",borderWidth:1,boxShadow:o?"0 0 0 1px ".concat(m.primary):void 0,"&:hover":{borderColor:o?m.primary:m.neutral30}})},Control=function e(t){var r=t.children,s=t.isDisabled,o=t.isFocused,d=t.innerRef,m=t.innerProps,g=t.menuIsOpen;return jsx("div",_extends({ref:d},getStyleProps(t,"control",{control:!0,"control--is-disabled":s,"control--is-focused":o,"control--menu-is-open":g}),m,{"aria-disabled":s||void 0}),r)},Control$1=Control,_excluded$1=["data"],groupCSS=function e(t,r){var s=t.theme.spacing;return r?{}:{paddingBottom:s.baseUnit*2,paddingTop:s.baseUnit*2}},Group=function e(t){var r=t.children,s=t.cx,o=t.getStyles,d=t.getClassNames,m=t.Heading,g=t.headingProps,y=t.innerProps,b=t.label,x=t.theme,E=t.selectProps;return jsx("div",_extends({},getStyleProps(t,"group",{group:!0}),y),jsx(m,_extends({},g,{selectProps:E,theme:x,getStyles:o,getClassNames:d,cx:s}),b),jsx("div",null,r))},groupHeadingCSS=function e(t,r){var s=t.theme,o=s.colors,d=s.spacing;return _objectSpread2({label:"group",cursor:"default",display:"block"},r?{}:{color:o.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:d.baseUnit*3,paddingRight:d.baseUnit*3,textTransform:"uppercase"})},GroupHeading=function e(t){var r=cleanCommonProps(t);r.data;var s=_objectWithoutProperties(r,_excluded$1);return jsx("div",_extends({},getStyleProps(t,"groupHeading",{"group-heading":!0}),s))},Group$1=Group,_excluded$5=["innerRef","isDisabled","isHidden","inputClassName"],inputCSS=function e(t,r){var s=t.isDisabled,o=t.value,d=t.theme,m=d.spacing,g=d.colors;return _objectSpread2(_objectSpread2({visibility:s?"hidden":"visible",transform:o?"translateZ(0)":""},containerStyle),r?{}:{margin:m.baseUnit/2,paddingBottom:m.baseUnit/2,paddingTop:m.baseUnit/2,color:g.neutral80})},spacingStyle={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},containerStyle={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":_objectSpread2({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},spacingStyle)},inputStyle=function e(t){return _objectSpread2({label:"input",color:"inherit",background:0,opacity:t?0:1,width:"100%"},spacingStyle)},Input=function e(t){var r=t.cx,s=t.value,o=cleanCommonProps(t),d=o.innerRef,m=o.isDisabled,g=o.isHidden,y=o.inputClassName,b=_objectWithoutProperties(o,_excluded$5);return jsx("div",_extends({},getStyleProps(t,"input",{"input-container":!0}),{"data-value":s||""}),jsx("input",_extends({className:r({input:!0},y),ref:d,style:inputStyle(g),disabled:m},b)))},Input$1=Input,multiValueCSS=function e(t,r){var s=t.theme,o=s.spacing,d=s.borderRadius,m=s.colors;return _objectSpread2({label:"multiValue",display:"flex",minWidth:0},r?{}:{backgroundColor:m.neutral10,borderRadius:d/2,margin:o.baseUnit/2})},multiValueLabelCSS=function e(t,r){var s=t.theme,o=s.borderRadius,d=s.colors,m=t.cropWithEllipsis;return _objectSpread2({overflow:"hidden",textOverflow:m||m===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},r?{}:{borderRadius:o/2,color:d.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemoveCSS=function e(t,r){var s=t.theme,o=s.spacing,d=s.borderRadius,m=s.colors,g=t.isFocused;return _objectSpread2({alignItems:"center",display:"flex"},r?{}:{borderRadius:d/2,backgroundColor:g?m.dangerLight:void 0,paddingLeft:o.baseUnit,paddingRight:o.baseUnit,":hover":{backgroundColor:m.dangerLight,color:m.danger}})},MultiValueGeneric=function e(t){var r=t.children,s=t.innerProps;return jsx("div",s,r)},MultiValueContainer=MultiValueGeneric,MultiValueLabel=MultiValueGeneric;function MultiValueRemove(e){var t=e.children,r=e.innerProps;return jsx("div",_extends({role:"button"},r),t||jsx(CrossIcon,{size:14}))}var MultiValue=function e(t){var r=t.children,s=t.components,o=t.data,d=t.innerProps,m=t.isDisabled,g=t.removeProps,y=t.selectProps,b=s.Container,x=s.Label,E=s.Remove;return jsx(b,{data:o,innerProps:_objectSpread2(_objectSpread2({},getStyleProps(t,"multiValue",{"multi-value":!0,"multi-value--is-disabled":m})),d),selectProps:y},jsx(x,{data:o,innerProps:_objectSpread2({},getStyleProps(t,"multiValueLabel",{"multi-value__label":!0})),selectProps:y},r),jsx(E,{data:o,innerProps:_objectSpread2(_objectSpread2({},getStyleProps(t,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(r||"option")},g),selectProps:y}))},MultiValue$1=MultiValue,optionCSS=function e(t,r){var s=t.isDisabled,o=t.isFocused,d=t.isSelected,m=t.theme,g=m.spacing,y=m.colors;return _objectSpread2({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},r?{}:{backgroundColor:d?y.primary:o?y.primary25:"transparent",color:s?y.neutral20:d?y.neutral0:"inherit",padding:"".concat(g.baseUnit*2,"px ").concat(g.baseUnit*3,"px"),":active":{backgroundColor:s?void 0:d?y.primary:y.primary50}})},Option=function e(t){var r=t.children,s=t.isDisabled,o=t.isFocused,d=t.isSelected,m=t.innerRef,g=t.innerProps;return jsx("div",_extends({},getStyleProps(t,"option",{option:!0,"option--is-disabled":s,"option--is-focused":o,"option--is-selected":d}),{ref:m,"aria-disabled":s},g),r)},Option$1=Option,placeholderCSS=function e(t,r){var s=t.theme,o=s.spacing,d=s.colors;return _objectSpread2({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},r?{}:{color:d.neutral50,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},Placeholder=function e(t){var r=t.children,s=t.innerProps;return jsx("div",_extends({},getStyleProps(t,"placeholder",{placeholder:!0}),s),r)},Placeholder$1=Placeholder,css=function e(t,r){var s=t.isDisabled,o=t.theme,d=o.spacing,m=o.colors;return _objectSpread2({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},r?{}:{color:s?m.neutral40:m.neutral80,marginLeft:d.baseUnit/2,marginRight:d.baseUnit/2})},SingleValue=function e(t){var r=t.children,s=t.isDisabled,o=t.innerProps;return jsx("div",_extends({},getStyleProps(t,"singleValue",{"single-value":!0,"single-value--is-disabled":s}),o),r)},SingleValue$1=SingleValue,components={ClearIndicator,Control:Control$1,DropdownIndicator,DownChevron,CrossIcon,Group:Group$1,GroupHeading,IndicatorsContainer,IndicatorSeparator,Input:Input$1,LoadingIndicator,Menu:Menu$1,MenuList,MenuPortal,LoadingMessage,NoOptionsMessage,MultiValue:MultiValue$1,MultiValueContainer,MultiValueLabel,MultiValueRemove,Option:Option$1,Placeholder:Placeholder$1,SelectContainer,SingleValue:SingleValue$1,ValueContainer},defaultComponents=function e(t){return _objectSpread2(_objectSpread2({},components),t.components)},safeIsNaN=Number.isNaN||function e(t){return typeof t=="number"&&t!==t};function isEqual(e,t){return!!(e===t||safeIsNaN(e)&&safeIsNaN(t))}function areInputsEqual(e,t){if(e.length!==t.length)return!1;for(var r=0;r<e.length;r++)if(!isEqual(e[r],t[r]))return!1;return!0}function memoizeOne(e,t){t===void 0&&(t=areInputsEqual);var r=null;function s(){for(var o=[],d=0;d<arguments.length;d++)o[d]=arguments[d];if(r&&r.lastThis===this&&t(o,r.lastArgs))return r.lastResult;var m=e.apply(this,o);return r={lastResult:m,lastArgs:o,lastThis:this},m}return s.clear=function(){r=null},s}function _EMOTION_STRINGIFIED_CSS_ERROR__$2(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}for(var _ref=process$1.env.NODE_ENV==="production"?{name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"}:{name:"1f43avz-a11yText-A11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;label:A11yText;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkExMXlUZXh0LnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPSSIsImZpbGUiOiJBMTF5VGV4dC50c3giLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IEpTWCB9IGZyb20gJ3JlYWN0JztcbmltcG9ydCB7IGpzeCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0JztcblxuLy8gQXNzaXN0aXZlIHRleHQgdG8gZGVzY3JpYmUgdmlzdWFsIGVsZW1lbnRzLiBIaWRkZW4gZm9yIHNpZ2h0ZWQgdXNlcnMuXG5jb25zdCBBMTF5VGV4dCA9IChwcm9wczogSlNYLkludHJpbnNpY0VsZW1lbnRzWydzcGFuJ10pID0+IChcbiAgPHNwYW5cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAnYTExeVRleHQnLFxuICAgICAgekluZGV4OiA5OTk5LFxuICAgICAgYm9yZGVyOiAwLFxuICAgICAgY2xpcDogJ3JlY3QoMXB4LCAxcHgsIDFweCwgMXB4KScsXG4gICAgICBoZWlnaHQ6IDEsXG4gICAgICB3aWR0aDogMSxcbiAgICAgIHBvc2l0aW9uOiAnYWJzb2x1dGUnLFxuICAgICAgb3ZlcmZsb3c6ICdoaWRkZW4nLFxuICAgICAgcGFkZGluZzogMCxcbiAgICAgIHdoaXRlU3BhY2U6ICdub3dyYXAnLFxuICAgIH19XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcblxuZXhwb3J0IGRlZmF1bHQgQTExeVRleHQ7XG4iXX0= */",toString:_EMOTION_STRINGIFIED_CSS_ERROR__$2},A11yText=function e(t){return jsx("span",_extends({css:_ref},t))},A11yText$1=A11yText,defaultAriaLiveMessages={guidance:function e(t){var r=t.isSearchable,s=t.isMulti,o=t.tabSelectsValue,d=t.context,m=t.isInitialFocus;switch(d){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(o?", press Tab to select the option and exit the menu":"",".");case"input":return m?"".concat(t["aria-label"]||"Select"," is focused ").concat(r?",type to refine list":"",", press Down to open the menu, ").concat(s?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function e(t){var r=t.action,s=t.label,o=s===void 0?"":s,d=t.labels,m=t.isDisabled;switch(r){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(o,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(d.length>1?"s":""," ").concat(d.join(","),", selected.");case"select-option":return m?"option ".concat(o," is disabled. Select another option."):"option ".concat(o,", selected.");default:return""}},onFocus:function e(t){var r=t.context,s=t.focused,o=t.options,d=t.label,m=d===void 0?"":d,g=t.selectValue,y=t.isDisabled,b=t.isSelected,x=t.isAppleDevice,E=function(N,k){return N&&N.length?"".concat(N.indexOf(k)+1," of ").concat(N.length):""};if(r==="value"&&g)return"value ".concat(m," focused, ").concat(E(g,s),".");if(r==="menu"&&x){var C=y?" disabled":"",S="".concat(b?" selected":"").concat(C);return"".concat(m).concat(S,", ").concat(E(o,s),".")}return""},onFilter:function e(t){var r=t.inputValue,s=t.resultsMessage;return"".concat(s).concat(r?" for search term "+r:"",".")}},LiveRegion=function e(t){var r=t.ariaSelection,s=t.focusedOption,o=t.focusedValue,d=t.focusableOptions,m=t.isFocused,g=t.selectValue,y=t.selectProps,b=t.id,x=t.isAppleDevice,E=y.ariaLiveMessages,C=y.getOptionLabel,S=y.inputValue,A=y.isMulti,N=y.isOptionDisabled,k=y.isSearchable,L=y.menuIsOpen,G=y.options,M=y.screenReaderStatus,z=y.tabSelectsValue,V=y.isLoading,Y=y["aria-label"],X=y["aria-live"],Q=React.useMemo(function(){return _objectSpread2(_objectSpread2({},defaultAriaLiveMessages),E||{})},[E]),$=React.useMemo(function(){var ue="";if(r&&Q.onChange){var le=r.option,fe=r.options,ve=r.removedValue,xe=r.removedValues,ce=r.value,Te=function(J){return Array.isArray(J)?null:J},Ce=ve||le||Te(ce),me=Ce?C(Ce):"",pe=fe||xe||void 0,Ee=pe?pe.map(C):[],Ae=_objectSpread2({isDisabled:Ce&&N(Ce,g),label:me,labels:Ee},r);ue=Q.onChange(Ae)}return ue},[r,Q,N,g,C]),K=React.useMemo(function(){var ue="",le=s||o,fe=!!(s&&g&&g.includes(s));if(le&&Q.onFocus){var ve={focused:le,label:C(le),isDisabled:N(le,g),isSelected:fe,options:d,context:le===s?"menu":"value",selectValue:g,isAppleDevice:x};ue=Q.onFocus(ve)}return ue},[s,o,C,N,Q,d,g,x]),ee=React.useMemo(function(){var ue="";if(L&&G.length&&!V&&Q.onFilter){var le=M({count:d.length});ue=Q.onFilter({inputValue:S,resultsMessage:le})}return ue},[d,S,L,Q,G,M,V]),se=r?.action==="initial-input-focus",ie=React.useMemo(function(){var ue="";if(Q.guidance){var le=o?"value":L?"menu":"input";ue=Q.guidance({"aria-label":Y,context:le,isDisabled:s&&N(s,g),isMulti:A,isSearchable:k,tabSelectsValue:z,isInitialFocus:se})}return ue},[Y,s,o,A,N,k,L,Q,g,z,se]),te=jsx(React.Fragment,null,jsx("span",{id:"aria-selection"},$),jsx("span",{id:"aria-focused"},K),jsx("span",{id:"aria-results"},ee),jsx("span",{id:"aria-guidance"},ie));return jsx(React.Fragment,null,jsx(A11yText$1,{id:b},se&&te),jsx(A11yText$1,{"aria-live":X,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},m&&!se&&te))},LiveRegion$1=LiveRegion,diacritics=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],anyDiacritic=new RegExp("["+diacritics.map(function(e){return e.letters}).join("")+"]","g"),diacriticToBase={},i=0;i<diacritics.length;i++)for(var diacritic=diacritics[i],j=0;j<diacritic.letters.length;j++)diacriticToBase[diacritic.letters[j]]=diacritic.base;var stripDiacritics=function e(t){return t.replace(anyDiacritic,function(r){return diacriticToBase[r]})},memoizedStripDiacriticsForInput=memoizeOne(stripDiacritics),trimString=function e(t){return t.replace(/^\s+|\s+$/g,"")},defaultStringify=function e(t){return"".concat(t.label," ").concat(t.value)},createFilter=function e(t){return function(r,s){if(r.data.__isNew__)return!0;var o=_objectSpread2({ignoreCase:!0,ignoreAccents:!0,stringify:defaultStringify,trim:!0,matchFrom:"any"},t),d=o.ignoreCase,m=o.ignoreAccents,g=o.stringify,y=o.trim,b=o.matchFrom,x=y?trimString(s):s,E=y?trimString(g(r)):g(r);return d&&(x=x.toLowerCase(),E=E.toLowerCase()),m&&(x=memoizedStripDiacriticsForInput(x),E=stripDiacritics(E)),b==="start"?E.substr(0,x.length)===x:E.indexOf(x)>-1}},_excluded=["innerRef"];function DummyInput(e){var t=e.innerRef,r=_objectWithoutProperties(e,_excluded),s=removeProps(r,"onExited","in","enter","exit","appear");return jsx("input",_extends({ref:t},s,{css:css$2({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},process$1.env.NODE_ENV==="production"?"":";label:DummyInput;",process$1.env.NODE_ENV==="production"?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkR1bW15SW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQXlCTSIsImZpbGUiOiJEdW1teUlucHV0LnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsgSlNYLCBSZWYgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5pbXBvcnQgeyByZW1vdmVQcm9wcyB9IGZyb20gJy4uL3V0aWxzJztcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gRHVtbXlJbnB1dCh7XG4gIGlubmVyUmVmLFxuICAuLi5wcm9wc1xufTogSlNYLkludHJpbnNpY0VsZW1lbnRzWydpbnB1dCddICYge1xuICByZWFkb25seSBpbm5lclJlZjogUmVmPEhUTUxJbnB1dEVsZW1lbnQ+O1xufSkge1xuICAvLyBSZW1vdmUgYW5pbWF0aW9uIHByb3BzIG5vdCBtZWFudCBmb3IgSFRNTCBlbGVtZW50c1xuICBjb25zdCBmaWx0ZXJlZFByb3BzID0gcmVtb3ZlUHJvcHMoXG4gICAgcHJvcHMsXG4gICAgJ29uRXhpdGVkJyxcbiAgICAnaW4nLFxuICAgICdlbnRlcicsXG4gICAgJ2V4aXQnLFxuICAgICdhcHBlYXInXG4gICk7XG5cbiAgcmV0dXJuIChcbiAgICA8aW5wdXRcbiAgICAgIHJlZj17aW5uZXJSZWZ9XG4gICAgICB7Li4uZmlsdGVyZWRQcm9wc31cbiAgICAgIGNzcz17e1xuICAgICAgICBsYWJlbDogJ2R1bW15SW5wdXQnLFxuICAgICAgICAvLyBnZXQgcmlkIG9mIGFueSBkZWZhdWx0IHN0eWxlc1xuICAgICAgICBiYWNrZ3JvdW5kOiAwLFxuICAgICAgICBib3JkZXI6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgdGhpcyBoaWRlcyB0aGUgZmxhc2hpbmcgY3Vyc29yXG4gICAgICAgIGNhcmV0Q29sb3I6ICd0cmFuc3BhcmVudCcsXG4gICAgICAgIGZvbnRTaXplOiAnaW5oZXJpdCcsXG4gICAgICAgIGdyaWRBcmVhOiAnMSAvIDEgLyAyIC8gMycsXG4gICAgICAgIG91dGxpbmU6IDAsXG4gICAgICAgIHBhZGRpbmc6IDAsXG4gICAgICAgIC8vIGltcG9ydGFudCEgd2l0aG91dCBgd2lkdGhgIGJyb3dzZXJzIHdvbid0IGFsbG93IGZvY3VzXG4gICAgICAgIHdpZHRoOiAxLFxuXG4gICAgICAgIC8vIHJlbW92ZSBjdXJzb3Igb24gZGVza3RvcFxuICAgICAgICBjb2xvcjogJ3RyYW5zcGFyZW50JyxcblxuICAgICAgICAvLyByZW1vdmUgY3Vyc29yIG9uIG1vYmlsZSB3aGlsc3QgbWFpbnRhaW5pbmcgXCJzY3JvbGwgaW50byB2aWV3XCIgYmVoYXZpb3VyXG4gICAgICAgIGxlZnQ6IC0xMDAsXG4gICAgICAgIG9wYWNpdHk6IDAsXG4gICAgICAgIHBvc2l0aW9uOiAncmVsYXRpdmUnLFxuICAgICAgICB0cmFuc2Zvcm06ICdzY2FsZSguMDEpJyxcbiAgICAgIH19XG4gICAgLz5cbiAgKTtcbn1cbiJdfQ== */")}))}var cancelScroll=function e(t){t.cancelable&&t.preventDefault(),t.stopPropagation()};function useScrollCapture(e){var t=e.isEnabled,r=e.onBottomArrive,s=e.onBottomLeave,o=e.onTopArrive,d=e.onTopLeave,m=React.useRef(!1),g=React.useRef(!1),y=React.useRef(0),b=React.useRef(null),x=React.useCallback(function(k,L){if(b.current!==null){var G=b.current,M=G.scrollTop,z=G.scrollHeight,V=G.clientHeight,Y=b.current,X=L>0,Q=z-V-M,$=!1;Q>L&&m.current&&(s&&s(k),m.current=!1),X&&g.current&&(d&&d(k),g.current=!1),X&&L>Q?(r&&!m.current&&r(k),Y.scrollTop=z,$=!0,m.current=!0):!X&&-L>M&&(o&&!g.current&&o(k),Y.scrollTop=0,$=!0,g.current=!0),$&&cancelScroll(k)}},[r,s,o,d]),E=React.useCallback(function(k){x(k,k.deltaY)},[x]),C=React.useCallback(function(k){y.current=k.changedTouches[0].clientY},[]),S=React.useCallback(function(k){var L=y.current-k.changedTouches[0].clientY;x(k,L)},[x]),A=React.useCallback(function(k){if(k){var L=supportsPassiveEvents?{passive:!1}:!1;k.addEventListener("wheel",E,L),k.addEventListener("touchstart",C,L),k.addEventListener("touchmove",S,L)}},[S,C,E]),N=React.useCallback(function(k){k&&(k.removeEventListener("wheel",E,!1),k.removeEventListener("touchstart",C,!1),k.removeEventListener("touchmove",S,!1))},[S,C,E]);return React.useEffect(function(){if(t){var k=b.current;return A(k),function(){N(k)}}},[t,A,N]),function(k){b.current=k}}var STYLE_KEYS=["boxSizing","height","overflow","paddingRight","position"],LOCK_STYLES={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function preventTouchMove(e){e.cancelable&&e.preventDefault()}function allowTouchMove(e){e.stopPropagation()}function preventInertiaScroll(){var e=this.scrollTop,t=this.scrollHeight,r=e+this.offsetHeight;e===0?this.scrollTop=1:r===t&&(this.scrollTop=e-1)}function isTouchDevice(){return"ontouchstart"in window||navigator.maxTouchPoints}var canUseDOM=!!(typeof window<"u"&&window.document&&window.document.createElement),activeScrollLocks=0,listenerOptions={capture:!1,passive:!1};function useScrollLock(e){var t=e.isEnabled,r=e.accountForScrollbars,s=r===void 0?!0:r,o=React.useRef({}),d=React.useRef(null),m=React.useCallback(function(y){if(canUseDOM){var b=document.body,x=b&&b.style;if(s&&STYLE_KEYS.forEach(function(A){var N=x&&x[A];o.current[A]=N}),s&&activeScrollLocks<1){var E=parseInt(o.current.paddingRight,10)||0,C=document.body?document.body.clientWidth:0,S=window.innerWidth-C+E||0;Object.keys(LOCK_STYLES).forEach(function(A){var N=LOCK_STYLES[A];x&&(x[A]=N)}),x&&(x.paddingRight="".concat(S,"px"))}b&&isTouchDevice()&&(b.addEventListener("touchmove",preventTouchMove,listenerOptions),y&&(y.addEventListener("touchstart",preventInertiaScroll,listenerOptions),y.addEventListener("touchmove",allowTouchMove,listenerOptions))),activeScrollLocks+=1}},[s]),g=React.useCallback(function(y){if(canUseDOM){var b=document.body,x=b&&b.style;activeScrollLocks=Math.max(activeScrollLocks-1,0),s&&activeScrollLocks<1&&STYLE_KEYS.forEach(function(E){var C=o.current[E];x&&(x[E]=C)}),b&&isTouchDevice()&&(b.removeEventListener("touchmove",preventTouchMove,listenerOptions),y&&(y.removeEventListener("touchstart",preventInertiaScroll,listenerOptions),y.removeEventListener("touchmove",allowTouchMove,listenerOptions)))}},[s]);return React.useEffect(function(){if(t){var y=d.current;return m(y),function(){g(y)}}},[t,m,g]),function(y){d.current=y}}function _EMOTION_STRINGIFIED_CSS_ERROR__$1(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var blurSelectInput=function e(t){var r=t.target;return r.ownerDocument.activeElement&&r.ownerDocument.activeElement.blur()},_ref2$1=process$1.env.NODE_ENV==="production"?{name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"}:{name:"bp8cua-ScrollManager",styles:"position:fixed;left:0;bottom:0;right:0;top:0;label:ScrollManager;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlNjcm9sbE1hbmFnZXIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW9EVSIsImZpbGUiOiJTY3JvbGxNYW5hZ2VyLnRzeCIsInNvdXJjZXNDb250ZW50IjpbIi8qKiBAanN4IGpzeCAqL1xuaW1wb3J0IHsganN4IH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnO1xuaW1wb3J0IHsgRnJhZ21lbnQsIFJlYWN0RWxlbWVudCwgUmVmQ2FsbGJhY2ssIE1vdXNlRXZlbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgdXNlU2Nyb2xsQ2FwdHVyZSBmcm9tICcuL3VzZVNjcm9sbENhcHR1cmUnO1xuaW1wb3J0IHVzZVNjcm9sbExvY2sgZnJvbSAnLi91c2VTY3JvbGxMb2NrJztcblxuaW50ZXJmYWNlIFByb3BzIHtcbiAgcmVhZG9ubHkgY2hpbGRyZW46IChyZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PikgPT4gUmVhY3RFbGVtZW50O1xuICByZWFkb25seSBsb2NrRW5hYmxlZDogYm9vbGVhbjtcbiAgcmVhZG9ubHkgY2FwdHVyZUVuYWJsZWQ6IGJvb2xlYW47XG4gIHJlYWRvbmx5IG9uQm90dG9tQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Cb3R0b21MZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG4gIHJlYWRvbmx5IG9uVG9wQXJyaXZlPzogKGV2ZW50OiBXaGVlbEV2ZW50IHwgVG91Y2hFdmVudCkgPT4gdm9pZDtcbiAgcmVhZG9ubHkgb25Ub3BMZWF2ZT86IChldmVudDogV2hlZWxFdmVudCB8IFRvdWNoRXZlbnQpID0+IHZvaWQ7XG59XG5cbmNvbnN0IGJsdXJTZWxlY3RJbnB1dCA9IChldmVudDogTW91c2VFdmVudDxIVE1MRGl2RWxlbWVudD4pID0+IHtcbiAgY29uc3QgZWxlbWVudCA9IGV2ZW50LnRhcmdldCBhcyBIVE1MRGl2RWxlbWVudDtcbiAgcmV0dXJuIChcbiAgICBlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCAmJlxuICAgIChlbGVtZW50Lm93bmVyRG9jdW1lbnQuYWN0aXZlRWxlbWVudCBhcyBIVE1MRWxlbWVudCkuYmx1cigpXG4gICk7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBmdW5jdGlvbiBTY3JvbGxNYW5hZ2VyKHtcbiAgY2hpbGRyZW4sXG4gIGxvY2tFbmFibGVkLFxuICBjYXB0dXJlRW5hYmxlZCA9IHRydWUsXG4gIG9uQm90dG9tQXJyaXZlLFxuICBvbkJvdHRvbUxlYXZlLFxuICBvblRvcEFycml2ZSxcbiAgb25Ub3BMZWF2ZSxcbn06IFByb3BzKSB7XG4gIGNvbnN0IHNldFNjcm9sbENhcHR1cmVUYXJnZXQgPSB1c2VTY3JvbGxDYXB0dXJlKHtcbiAgICBpc0VuYWJsZWQ6IGNhcHR1cmVFbmFibGVkLFxuICAgIG9uQm90dG9tQXJyaXZlLFxuICAgIG9uQm90dG9tTGVhdmUsXG4gICAgb25Ub3BBcnJpdmUsXG4gICAgb25Ub3BMZWF2ZSxcbiAgfSk7XG4gIGNvbnN0IHNldFNjcm9sbExvY2tUYXJnZXQgPSB1c2VTY3JvbGxMb2NrKHsgaXNFbmFibGVkOiBsb2NrRW5hYmxlZCB9KTtcblxuICBjb25zdCB0YXJnZXRSZWY6IFJlZkNhbGxiYWNrPEhUTUxFbGVtZW50PiA9IChlbGVtZW50KSA9PiB7XG4gICAgc2V0U2Nyb2xsQ2FwdHVyZVRhcmdldChlbGVtZW50KTtcbiAgICBzZXRTY3JvbGxMb2NrVGFyZ2V0KGVsZW1lbnQpO1xuICB9O1xuXG4gIHJldHVybiAoXG4gICAgPEZyYWdtZW50PlxuICAgICAge2xvY2tFbmFibGVkICYmIChcbiAgICAgICAgPGRpdlxuICAgICAgICAgIG9uQ2xpY2s9e2JsdXJTZWxlY3RJbnB1dH1cbiAgICAgICAgICBjc3M9e3sgcG9zaXRpb246ICdmaXhlZCcsIGxlZnQ6IDAsIGJvdHRvbTogMCwgcmlnaHQ6IDAsIHRvcDogMCB9fVxuICAgICAgICAvPlxuICAgICAgKX1cbiAgICAgIHtjaGlsZHJlbih0YXJnZXRSZWYpfVxuICAgIDwvRnJhZ21lbnQ+XG4gICk7XG59XG4iXX0= */",toString:_EMOTION_STRINGIFIED_CSS_ERROR__$1};function ScrollManager(e){var t=e.children,r=e.lockEnabled,s=e.captureEnabled,o=s===void 0?!0:s,d=e.onBottomArrive,m=e.onBottomLeave,g=e.onTopArrive,y=e.onTopLeave,b=useScrollCapture({isEnabled:o,onBottomArrive:d,onBottomLeave:m,onTopArrive:g,onTopLeave:y}),x=useScrollLock({isEnabled:r}),E=function(S){b(S),x(S)};return jsx(React.Fragment,null,r&&jsx("div",{onClick:blurSelectInput,css:_ref2$1}),t(E))}function _EMOTION_STRINGIFIED_CSS_ERROR__(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}var _ref2=process$1.env.NODE_ENV==="production"?{name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"}:{name:"5kkxb2-requiredInput-RequiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%;label:RequiredInput;",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlJlcXVpcmVkSW5wdXQudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWNJIiwiZmlsZSI6IlJlcXVpcmVkSW5wdXQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBGb2N1c0V2ZW50SGFuZGxlciwgRnVuY3Rpb25Db21wb25lbnQgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBqc3ggfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbmNvbnN0IFJlcXVpcmVkSW5wdXQ6IEZ1bmN0aW9uQ29tcG9uZW50PHtcbiAgcmVhZG9ubHkgbmFtZT86IHN0cmluZztcbiAgcmVhZG9ubHkgb25Gb2N1czogRm9jdXNFdmVudEhhbmRsZXI8SFRNTElucHV0RWxlbWVudD47XG59PiA9ICh7IG5hbWUsIG9uRm9jdXMgfSkgPT4gKFxuICA8aW5wdXRcbiAgICByZXF1aXJlZFxuICAgIG5hbWU9e25hbWV9XG4gICAgdGFiSW5kZXg9ey0xfVxuICAgIGFyaWEtaGlkZGVuPVwidHJ1ZVwiXG4gICAgb25Gb2N1cz17b25Gb2N1c31cbiAgICBjc3M9e3tcbiAgICAgIGxhYmVsOiAncmVxdWlyZWRJbnB1dCcsXG4gICAgICBvcGFjaXR5OiAwLFxuICAgICAgcG9pbnRlckV2ZW50czogJ25vbmUnLFxuICAgICAgcG9zaXRpb246ICdhYnNvbHV0ZScsXG4gICAgICBib3R0b206IDAsXG4gICAgICBsZWZ0OiAwLFxuICAgICAgcmlnaHQ6IDAsXG4gICAgICB3aWR0aDogJzEwMCUnLFxuICAgIH19XG4gICAgLy8gUHJldmVudCBgU3dpdGNoaW5nIGZyb20gdW5jb250cm9sbGVkIHRvIGNvbnRyb2xsZWRgIGVycm9yXG4gICAgdmFsdWU9XCJcIlxuICAgIG9uQ2hhbmdlPXsoKSA9PiB7fX1cbiAgLz5cbik7XG5cbmV4cG9ydCBkZWZhdWx0IFJlcXVpcmVkSW5wdXQ7XG4iXX0= */",toString:_EMOTION_STRINGIFIED_CSS_ERROR__},RequiredInput=function e(t){var r=t.name,s=t.onFocus;return jsx("input",{required:!0,name:r,tabIndex:-1,"aria-hidden":"true",onFocus:s,css:_ref2,value:"",onChange:function(){}})},RequiredInput$1=RequiredInput;function testPlatform(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function isIPhone(){return testPlatform(/^iPhone/i)}function isMac(){return testPlatform(/^Mac/i)}function isIPad(){return testPlatform(/^iPad/i)||isMac()&&navigator.maxTouchPoints>1}function isIOS(){return isIPhone()||isIPad()}function isAppleDevice(){return isMac()||isIOS()}var formatGroupLabel=function e(t){return t.label},getOptionLabel$1=function e(t){return t.label},getOptionValue$1=function e(t){return t.value},isOptionDisabled=function e(t){return!!t.isDisabled},defaultStyles={clearIndicator:clearIndicatorCSS,container:containerCSS,control:css$1,dropdownIndicator:dropdownIndicatorCSS,group:groupCSS,groupHeading:groupHeadingCSS,indicatorsContainer:indicatorsContainerCSS,indicatorSeparator:indicatorSeparatorCSS,input:inputCSS,loadingIndicator:loadingIndicatorCSS,loadingMessage:loadingMessageCSS,menu:menuCSS,menuList:menuListCSS,menuPortal:menuPortalCSS,multiValue:multiValueCSS,multiValueLabel:multiValueLabelCSS,multiValueRemove:multiValueRemoveCSS,noOptionsMessage:noOptionsMessageCSS,option:optionCSS,placeholder:placeholderCSS,singleValue:css,valueContainer:valueContainerCSS},colors={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},borderRadius=4,baseUnit=4,controlHeight=38,menuGutter=baseUnit*2,spacing={baseUnit,controlHeight,menuGutter},defaultTheme={borderRadius,colors,spacing},defaultProps={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:isTouchCapable(),captureMenuScroll:!isTouchCapable(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:createFilter(),formatGroupLabel,getOptionLabel:getOptionLabel$1,getOptionValue:getOptionValue$1,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled,loadingMessage:function e(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!isMobileDevice(),noOptionsMessage:function e(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function e(t){var r=t.count;return"".concat(r," result").concat(r!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function toCategorizedOption(e,t,r,s){var o=_isOptionDisabled(e,t,r),d=_isOptionSelected(e,t,r),m=getOptionLabel(e,t),g=getOptionValue(e,t);return{type:"option",data:t,isDisabled:o,isSelected:d,label:m,value:g,index:s}}function buildCategorizedOptions(e,t){return e.options.map(function(r,s){if("options"in r){var o=r.options.map(function(m,g){return toCategorizedOption(e,m,t,g)}).filter(function(m){return isFocusable(e,m)});return o.length>0?{type:"group",data:r,options:o,index:s}:void 0}var d=toCategorizedOption(e,r,t,s);return isFocusable(e,d)?d:void 0}).filter(notNullish)}function buildFocusableOptionsFromCategorizedOptions(e){return e.reduce(function(t,r){return r.type==="group"?t.push.apply(t,_toConsumableArray(r.options.map(function(s){return s.data}))):t.push(r.data),t},[])}function buildFocusableOptionsWithIds(e,t){return e.reduce(function(r,s){return s.type==="group"?r.push.apply(r,_toConsumableArray(s.options.map(function(o){return{data:o.data,id:"".concat(t,"-").concat(s.index,"-").concat(o.index)}}))):r.push({data:s.data,id:"".concat(t,"-").concat(s.index)}),r},[])}function buildFocusableOptions(e,t){return buildFocusableOptionsFromCategorizedOptions(buildCategorizedOptions(e,t))}function isFocusable(e,t){var r=e.inputValue,s=r===void 0?"":r,o=t.data,d=t.isSelected,m=t.label,g=t.value;return(!shouldHideSelectedOptions(e)||!d)&&_filterOption(e,{label:m,value:g,data:o},s)}function getNextFocusedValue(e,t){var r=e.focusedValue,s=e.selectValue,o=s.indexOf(r);if(o>-1){var d=t.indexOf(r);if(d>-1)return r;if(o<t.length)return t[o]}return null}function getNextFocusedOption(e,t){var r=e.focusedOption;return r&&t.indexOf(r)>-1?r:t[0]}var getFocusedOptionId=function e(t,r){var s,o=(s=t.find(function(d){return d.data===r}))===null||s===void 0?void 0:s.id;return o||null},getOptionLabel=function e(t,r){return t.getOptionLabel(r)},getOptionValue=function e(t,r){return t.getOptionValue(r)};function _isOptionDisabled(e,t,r){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(t,r):!1}function _isOptionSelected(e,t,r){if(r.indexOf(t)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(t,r);var s=getOptionValue(e,t);return r.some(function(o){return getOptionValue(e,o)===s})}function _filterOption(e,t,r){return e.filterOption?e.filterOption(t,r):!0}var shouldHideSelectedOptions=function e(t){var r=t.hideSelectedOptions,s=t.isMulti;return r===void 0?s:r},instanceId=1,Select=(function(e){_inherits(r,e);var t=_createSuper(r);function r(s){var o;if(_classCallCheck(this,r),o=t.call(this,s),o.state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:"",isAppleDevice:!1},o.blockOptionHover=!1,o.isComposing=!1,o.commonProps=void 0,o.initialTouchX=0,o.initialTouchY=0,o.openAfterFocus=!1,o.scrollToFocusedOptionOnUpdate=!1,o.userIsDragging=void 0,o.controlRef=null,o.getControlRef=function(y){o.controlRef=y},o.focusedOptionRef=null,o.getFocusedOptionRef=function(y){o.focusedOptionRef=y},o.menuListRef=null,o.getMenuListRef=function(y){o.menuListRef=y},o.inputRef=null,o.getInputRef=function(y){o.inputRef=y},o.focus=o.focusInput,o.blur=o.blurInput,o.onChange=function(y,b){var x=o.props,E=x.onChange,C=x.name;b.name=C,o.ariaOnChange(y,b),E(y,b)},o.setValue=function(y,b,x){var E=o.props,C=E.closeMenuOnSelect,S=E.isMulti,A=E.inputValue;o.onInputChange("",{action:"set-value",prevInputValue:A}),C&&(o.setState({inputIsHiddenAfterUpdate:!S}),o.onMenuClose()),o.setState({clearFocusValueOnUpdate:!0}),o.onChange(y,{action:b,option:x})},o.selectOption=function(y){var b=o.props,x=b.blurInputOnSelect,E=b.isMulti,C=b.name,S=o.state.selectValue,A=E&&o.isOptionSelected(y,S),N=o.isOptionDisabled(y,S);if(A){var k=o.getOptionValue(y);o.setValue(S.filter(function(L){return o.getOptionValue(L)!==k}),"deselect-option",y)}else if(!N)E?o.setValue([].concat(_toConsumableArray(S),[y]),"select-option",y):o.setValue(y,"select-option");else{o.ariaOnChange(y,{action:"select-option",option:y,name:C});return}x&&o.blurInput()},o.removeValue=function(y){var b=o.props.isMulti,x=o.state.selectValue,E=o.getOptionValue(y),C=x.filter(function(A){return o.getOptionValue(A)!==E}),S=valueTernary(b,C,C[0]||null);o.onChange(S,{action:"remove-value",removedValue:y}),o.focusInput()},o.clearValue=function(){var y=o.state.selectValue;o.onChange(valueTernary(o.props.isMulti,[],null),{action:"clear",removedValues:y})},o.popValue=function(){var y=o.props.isMulti,b=o.state.selectValue,x=b[b.length-1],E=b.slice(0,b.length-1),C=valueTernary(y,E,E[0]||null);x&&o.onChange(C,{action:"pop-value",removedValue:x})},o.getFocusedOptionId=function(y){return getFocusedOptionId(o.state.focusableOptionsWithIds,y)},o.getFocusableOptionsWithIds=function(){return buildFocusableOptionsWithIds(buildCategorizedOptions(o.props,o.state.selectValue),o.getElementId("option"))},o.getValue=function(){return o.state.selectValue},o.cx=function(){for(var y=arguments.length,b=new Array(y),x=0;x<y;x++)b[x]=arguments[x];return classNames.apply(void 0,[o.props.classNamePrefix].concat(b))},o.getOptionLabel=function(y){return getOptionLabel(o.props,y)},o.getOptionValue=function(y){return getOptionValue(o.props,y)},o.getStyles=function(y,b){var x=o.props.unstyled,E=defaultStyles[y](b,x);E.boxSizing="border-box";var C=o.props.styles[y];return C?C(E,b):E},o.getClassNames=function(y,b){var x,E;return(x=(E=o.props.classNames)[y])===null||x===void 0?void 0:x.call(E,b)},o.getElementId=function(y){return"".concat(o.state.instancePrefix,"-").concat(y)},o.getComponents=function(){return defaultComponents(o.props)},o.buildCategorizedOptions=function(){return buildCategorizedOptions(o.props,o.state.selectValue)},o.getCategorizedOptions=function(){return o.props.menuIsOpen?o.buildCategorizedOptions():[]},o.buildFocusableOptions=function(){return buildFocusableOptionsFromCategorizedOptions(o.buildCategorizedOptions())},o.getFocusableOptions=function(){return o.props.menuIsOpen?o.buildFocusableOptions():[]},o.ariaOnChange=function(y,b){o.setState({ariaSelection:_objectSpread2({value:y},b)})},o.onMenuMouseDown=function(y){y.button===0&&(y.stopPropagation(),y.preventDefault(),o.focusInput())},o.onMenuMouseMove=function(y){o.blockOptionHover=!1},o.onControlMouseDown=function(y){if(!y.defaultPrevented){var b=o.props.openMenuOnClick;o.state.isFocused?o.props.menuIsOpen?y.target.tagName!=="INPUT"&&y.target.tagName!=="TEXTAREA"&&o.onMenuClose():b&&o.openMenu("first"):(b&&(o.openAfterFocus=!0),o.focusInput()),y.target.tagName!=="INPUT"&&y.target.tagName!=="TEXTAREA"&&y.preventDefault()}},o.onDropdownIndicatorMouseDown=function(y){if(!(y&&y.type==="mousedown"&&y.button!==0)&&!o.props.isDisabled){var b=o.props,x=b.isMulti,E=b.menuIsOpen;o.focusInput(),E?(o.setState({inputIsHiddenAfterUpdate:!x}),o.onMenuClose()):o.openMenu("first"),y.preventDefault()}},o.onClearIndicatorMouseDown=function(y){y&&y.type==="mousedown"&&y.button!==0||(o.clearValue(),y.preventDefault(),o.openAfterFocus=!1,y.type==="touchend"?o.focusInput():setTimeout(function(){return o.focusInput()}))},o.onScroll=function(y){typeof o.props.closeMenuOnScroll=="boolean"?y.target instanceof HTMLElement&&isDocumentElement(y.target)&&o.props.onMenuClose():typeof o.props.closeMenuOnScroll=="function"&&o.props.closeMenuOnScroll(y)&&o.props.onMenuClose()},o.onCompositionStart=function(){o.isComposing=!0},o.onCompositionEnd=function(){o.isComposing=!1},o.onTouchStart=function(y){var b=y.touches,x=b&&b.item(0);x&&(o.initialTouchX=x.clientX,o.initialTouchY=x.clientY,o.userIsDragging=!1)},o.onTouchMove=function(y){var b=y.touches,x=b&&b.item(0);if(x){var E=Math.abs(x.clientX-o.initialTouchX),C=Math.abs(x.clientY-o.initialTouchY),S=5;o.userIsDragging=E>S||C>S}},o.onTouchEnd=function(y){o.userIsDragging||(o.controlRef&&!o.controlRef.contains(y.target)&&o.menuListRef&&!o.menuListRef.contains(y.target)&&o.blurInput(),o.initialTouchX=0,o.initialTouchY=0)},o.onControlTouchEnd=function(y){o.userIsDragging||o.onControlMouseDown(y)},o.onClearIndicatorTouchEnd=function(y){o.userIsDragging||o.onClearIndicatorMouseDown(y)},o.onDropdownIndicatorTouchEnd=function(y){o.userIsDragging||o.onDropdownIndicatorMouseDown(y)},o.handleInputChange=function(y){var b=o.props.inputValue,x=y.currentTarget.value;o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange(x,{action:"input-change",prevInputValue:b}),o.props.menuIsOpen||o.onMenuOpen()},o.onInputFocus=function(y){o.props.onFocus&&o.props.onFocus(y),o.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(o.openAfterFocus||o.props.openMenuOnFocus)&&o.openMenu("first"),o.openAfterFocus=!1},o.onInputBlur=function(y){var b=o.props.inputValue;if(o.menuListRef&&o.menuListRef.contains(document.activeElement)){o.inputRef.focus();return}o.props.onBlur&&o.props.onBlur(y),o.onInputChange("",{action:"input-blur",prevInputValue:b}),o.onMenuClose(),o.setState({focusedValue:null,isFocused:!1})},o.onOptionHover=function(y){if(!(o.blockOptionHover||o.state.focusedOption===y)){var b=o.getFocusableOptions(),x=b.indexOf(y);o.setState({focusedOption:y,focusedOptionId:x>-1?o.getFocusedOptionId(y):null})}},o.shouldHideSelectedOptions=function(){return shouldHideSelectedOptions(o.props)},o.onValueInputFocus=function(y){y.preventDefault(),y.stopPropagation(),o.focus()},o.onKeyDown=function(y){var b=o.props,x=b.isMulti,E=b.backspaceRemovesValue,C=b.escapeClearsValue,S=b.inputValue,A=b.isClearable,N=b.isDisabled,k=b.menuIsOpen,L=b.onKeyDown,G=b.tabSelectsValue,M=b.openMenuOnFocus,z=o.state,V=z.focusedOption,Y=z.focusedValue,X=z.selectValue;if(!N&&!(typeof L=="function"&&(L(y),y.defaultPrevented))){switch(o.blockOptionHover=!0,y.key){case"ArrowLeft":if(!x||S)return;o.focusValue("previous");break;case"ArrowRight":if(!x||S)return;o.focusValue("next");break;case"Delete":case"Backspace":if(S)return;if(Y)o.removeValue(Y);else{if(!E)return;x?o.popValue():A&&o.clearValue()}break;case"Tab":if(o.isComposing||y.shiftKey||!k||!G||!V||M&&o.isOptionSelected(V,X))return;o.selectOption(V);break;case"Enter":if(y.keyCode===229)break;if(k){if(!V||o.isComposing)return;o.selectOption(V);break}return;case"Escape":k?(o.setState({inputIsHiddenAfterUpdate:!1}),o.onInputChange("",{action:"menu-close",prevInputValue:S}),o.onMenuClose()):A&&C&&o.clearValue();break;case" ":if(S)return;if(!k){o.openMenu("first");break}if(!V)return;o.selectOption(V);break;case"ArrowUp":k?o.focusOption("up"):o.openMenu("last");break;case"ArrowDown":k?o.focusOption("down"):o.openMenu("first");break;case"PageUp":if(!k)return;o.focusOption("pageup");break;case"PageDown":if(!k)return;o.focusOption("pagedown");break;case"Home":if(!k)return;o.focusOption("first");break;case"End":if(!k)return;o.focusOption("last");break;default:return}y.preventDefault()}},o.state.instancePrefix="react-select-"+(o.props.instanceId||++instanceId),o.state.selectValue=cleanValue(s.value),s.menuIsOpen&&o.state.selectValue.length){var d=o.getFocusableOptionsWithIds(),m=o.buildFocusableOptions(),g=m.indexOf(o.state.selectValue[0]);o.state.focusableOptionsWithIds=d,o.state.focusedOption=m[g],o.state.focusedOptionId=getFocusedOptionId(d,m[g])}return o}return _createClass(r,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&scrollIntoView(this.menuListRef,this.focusedOptionRef),isAppleDevice()&&this.setState({isAppleDevice:!0})}},{key:"componentDidUpdate",value:function(o){var d=this.props,m=d.isDisabled,g=d.menuIsOpen,y=this.state.isFocused;(y&&!m&&o.isDisabled||y&&g&&!o.menuIsOpen)&&this.focusInput(),y&&m&&!o.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!y&&!m&&o.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(scrollIntoView(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(o,d){this.props.onInputChange(o,d)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(o){var d=this,m=this.state,g=m.selectValue,y=m.isFocused,b=this.buildFocusableOptions(),x=o==="first"?0:b.length-1;if(!this.props.isMulti){var E=b.indexOf(g[0]);E>-1&&(x=E)}this.scrollToFocusedOptionOnUpdate=!(y&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:b[x],focusedOptionId:this.getFocusedOptionId(b[x])},function(){return d.onMenuOpen()})}},{key:"focusValue",value:function(o){var d=this.state,m=d.selectValue,g=d.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var y=m.indexOf(g);g||(y=-1);var b=m.length-1,x=-1;if(m.length){switch(o){case"previous":y===0?x=0:y===-1?x=b:x=y-1;break;case"next":y>-1&&y<b&&(x=y+1);break}this.setState({inputIsHidden:x!==-1,focusedValue:m[x]})}}}},{key:"focusOption",value:function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",d=this.props.pageSize,m=this.state.focusedOption,g=this.getFocusableOptions();if(g.length){var y=0,b=g.indexOf(m);m||(b=-1),o==="up"?y=b>0?b-1:g.length-1:o==="down"?y=(b+1)%g.length:o==="pageup"?(y=b-d,y<0&&(y=0)):o==="pagedown"?(y=b+d,y>g.length-1&&(y=g.length-1)):o==="last"&&(y=g.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:g[y],focusedValue:null,focusedOptionId:this.getFocusedOptionId(g[y])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(defaultTheme):_objectSpread2(_objectSpread2({},defaultTheme),this.props.theme):defaultTheme}},{key:"getCommonProps",value:function(){var o=this.clearValue,d=this.cx,m=this.getStyles,g=this.getClassNames,y=this.getValue,b=this.selectOption,x=this.setValue,E=this.props,C=E.isMulti,S=E.isRtl,A=E.options,N=this.hasValue();return{clearValue:o,cx:d,getStyles:m,getClassNames:g,getValue:y,hasValue:N,isMulti:C,isRtl:S,options:A,selectOption:b,selectProps:E,setValue:x,theme:this.getTheme()}}},{key:"hasValue",value:function(){var o=this.state.selectValue;return o.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var o=this.props,d=o.isClearable,m=o.isMulti;return d===void 0?m:d}},{key:"isOptionDisabled",value:function(o,d){return _isOptionDisabled(this.props,o,d)}},{key:"isOptionSelected",value:function(o,d){return _isOptionSelected(this.props,o,d)}},{key:"filterOption",value:function(o,d){return _filterOption(this.props,o,d)}},{key:"formatOptionLabel",value:function(o,d){if(typeof this.props.formatOptionLabel=="function"){var m=this.props.inputValue,g=this.state.selectValue;return this.props.formatOptionLabel(o,{context:d,inputValue:m,selectValue:g})}else return this.getOptionLabel(o)}},{key:"formatGroupLabel",value:function(o){return this.props.formatGroupLabel(o)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var o=this.props,d=o.isDisabled,m=o.isSearchable,g=o.inputId,y=o.inputValue,b=o.tabIndex,x=o.form,E=o.menuIsOpen,C=o.required,S=this.getComponents(),A=S.Input,N=this.state,k=N.inputIsHidden,L=N.ariaSelection,G=this.commonProps,M=g||this.getElementId("input"),z=_objectSpread2(_objectSpread2(_objectSpread2({"aria-autocomplete":"list","aria-expanded":E,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":C,role:"combobox","aria-activedescendant":this.state.isAppleDevice?void 0:this.state.focusedOptionId||""},E&&{"aria-controls":this.getElementId("listbox")}),!m&&{"aria-readonly":!0}),this.hasValue()?L?.action==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return m?React__namespace.createElement(A,_extends({},G,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:M,innerRef:this.getInputRef,isDisabled:d,isHidden:k,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:b,form:x,type:"text",value:y},z)):React__namespace.createElement(DummyInput,_extends({id:M,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:noop,onFocus:this.onInputFocus,disabled:d,tabIndex:b,inputMode:"none",form:x,value:""},z))}},{key:"renderPlaceholderOrValue",value:function(){var o=this,d=this.getComponents(),m=d.MultiValue,g=d.MultiValueContainer,y=d.MultiValueLabel,b=d.MultiValueRemove,x=d.SingleValue,E=d.Placeholder,C=this.commonProps,S=this.props,A=S.controlShouldRenderValue,N=S.isDisabled,k=S.isMulti,L=S.inputValue,G=S.placeholder,M=this.state,z=M.selectValue,V=M.focusedValue,Y=M.isFocused;if(!this.hasValue()||!A)return L?null:React__namespace.createElement(E,_extends({},C,{key:"placeholder",isDisabled:N,isFocused:Y,innerProps:{id:this.getElementId("placeholder")}}),G);if(k)return z.map(function(Q,$){var K=Q===V,ee="".concat(o.getOptionLabel(Q),"-").concat(o.getOptionValue(Q));return React__namespace.createElement(m,_extends({},C,{components:{Container:g,Label:y,Remove:b},isFocused:K,isDisabled:N,key:ee,index:$,removeProps:{onClick:function(){return o.removeValue(Q)},onTouchEnd:function(){return o.removeValue(Q)},onMouseDown:function(ie){ie.preventDefault()}},data:Q}),o.formatOptionLabel(Q,"value"))});if(L)return null;var X=z[0];return React__namespace.createElement(x,_extends({},C,{data:X,isDisabled:N}),this.formatOptionLabel(X,"value"))}},{key:"renderClearIndicator",value:function(){var o=this.getComponents(),d=o.ClearIndicator,m=this.commonProps,g=this.props,y=g.isDisabled,b=g.isLoading,x=this.state.isFocused;if(!this.isClearable()||!d||y||!this.hasValue()||b)return null;var E={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return React__namespace.createElement(d,_extends({},m,{innerProps:E,isFocused:x}))}},{key:"renderLoadingIndicator",value:function(){var o=this.getComponents(),d=o.LoadingIndicator,m=this.commonProps,g=this.props,y=g.isDisabled,b=g.isLoading,x=this.state.isFocused;if(!d||!b)return null;var E={"aria-hidden":"true"};return React__namespace.createElement(d,_extends({},m,{innerProps:E,isDisabled:y,isFocused:x}))}},{key:"renderIndicatorSeparator",value:function(){var o=this.getComponents(),d=o.DropdownIndicator,m=o.IndicatorSeparator;if(!d||!m)return null;var g=this.commonProps,y=this.props.isDisabled,b=this.state.isFocused;return React__namespace.createElement(m,_extends({},g,{isDisabled:y,isFocused:b}))}},{key:"renderDropdownIndicator",value:function(){var o=this.getComponents(),d=o.DropdownIndicator;if(!d)return null;var m=this.commonProps,g=this.props.isDisabled,y=this.state.isFocused,b={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return React__namespace.createElement(d,_extends({},m,{innerProps:b,isDisabled:g,isFocused:y}))}},{key:"renderMenu",value:function(){var o=this,d=this.getComponents(),m=d.Group,g=d.GroupHeading,y=d.Menu,b=d.MenuList,x=d.MenuPortal,E=d.LoadingMessage,C=d.NoOptionsMessage,S=d.Option,A=this.commonProps,N=this.state.focusedOption,k=this.props,L=k.captureMenuScroll,G=k.inputValue,M=k.isLoading,z=k.loadingMessage,V=k.minMenuHeight,Y=k.maxMenuHeight,X=k.menuIsOpen,Q=k.menuPlacement,$=k.menuPosition,K=k.menuPortalTarget,ee=k.menuShouldBlockScroll,se=k.menuShouldScrollIntoView,ie=k.noOptionsMessage,te=k.onMenuScrollToTop,ue=k.onMenuScrollToBottom;if(!X)return null;var le=function(me,pe){var Ee=me.type,Ae=me.data,Pe=me.isDisabled,J=me.isSelected,Ue=me.label,ye=me.value,de=N===Ae,q=Pe?void 0:function(){return o.onOptionHover(Ae)},Re=Pe?void 0:function(){return o.selectOption(Ae)},Oe="".concat(o.getElementId("option"),"-").concat(pe),je={id:Oe,onClick:Re,onMouseMove:q,onMouseOver:q,tabIndex:-1,role:"option","aria-selected":o.state.isAppleDevice?void 0:J};return React__namespace.createElement(S,_extends({},A,{innerProps:je,data:Ae,isDisabled:Pe,isSelected:J,key:Oe,label:Ue,type:Ee,value:ye,isFocused:de,innerRef:de?o.getFocusedOptionRef:void 0}),o.formatOptionLabel(me.data,"menu"))},fe;if(this.hasOptions())fe=this.getCategorizedOptions().map(function(Ce){if(Ce.type==="group"){var me=Ce.data,pe=Ce.options,Ee=Ce.index,Ae="".concat(o.getElementId("group"),"-").concat(Ee),Pe="".concat(Ae,"-heading");return React__namespace.createElement(m,_extends({},A,{key:Ae,data:me,options:pe,Heading:g,headingProps:{id:Pe,data:Ce.data},label:o.formatGroupLabel(Ce.data)}),Ce.options.map(function(J){return le(J,"".concat(Ee,"-").concat(J.index))}))}else if(Ce.type==="option")return le(Ce,"".concat(Ce.index))});else if(M){var ve=z({inputValue:G});if(ve===null)return null;fe=React__namespace.createElement(E,A,ve)}else{var xe=ie({inputValue:G});if(xe===null)return null;fe=React__namespace.createElement(C,A,xe)}var ce={minMenuHeight:V,maxMenuHeight:Y,menuPlacement:Q,menuPosition:$,menuShouldScrollIntoView:se},Te=React__namespace.createElement(MenuPlacer,_extends({},A,ce),function(Ce){var me=Ce.ref,pe=Ce.placerProps,Ee=pe.placement,Ae=pe.maxHeight;return React__namespace.createElement(y,_extends({},A,ce,{innerRef:me,innerProps:{onMouseDown:o.onMenuMouseDown,onMouseMove:o.onMenuMouseMove},isLoading:M,placement:Ee}),React__namespace.createElement(ScrollManager,{captureEnabled:L,onTopArrive:te,onBottomArrive:ue,lockEnabled:ee},function(Pe){return React__namespace.createElement(b,_extends({},A,{innerRef:function(Ue){o.getMenuListRef(Ue),Pe(Ue)},innerProps:{role:"listbox","aria-multiselectable":A.isMulti,id:o.getElementId("listbox")},isLoading:M,maxHeight:Ae,focusedOption:N}),fe)}))});return K||$==="fixed"?React__namespace.createElement(x,_extends({},A,{appendTo:K,controlElement:this.controlRef,menuPlacement:Q,menuPosition:$}),Te):Te}},{key:"renderFormField",value:function(){var o=this,d=this.props,m=d.delimiter,g=d.isDisabled,y=d.isMulti,b=d.name,x=d.required,E=this.state.selectValue;if(x&&!this.hasValue()&&!g)return React__namespace.createElement(RequiredInput$1,{name:b,onFocus:this.onValueInputFocus});if(!(!b||g))if(y)if(m){var C=E.map(function(N){return o.getOptionValue(N)}).join(m);return React__namespace.createElement("input",{name:b,type:"hidden",value:C})}else{var S=E.length>0?E.map(function(N,k){return React__namespace.createElement("input",{key:"i-".concat(k),name:b,type:"hidden",value:o.getOptionValue(N)})}):React__namespace.createElement("input",{name:b,type:"hidden",value:""});return React__namespace.createElement("div",null,S)}else{var A=E[0]?this.getOptionValue(E[0]):"";return React__namespace.createElement("input",{name:b,type:"hidden",value:A})}}},{key:"renderLiveRegion",value:function(){var o=this.commonProps,d=this.state,m=d.ariaSelection,g=d.focusedOption,y=d.focusedValue,b=d.isFocused,x=d.selectValue,E=this.getFocusableOptions();return React__namespace.createElement(LiveRegion$1,_extends({},o,{id:this.getElementId("live-region"),ariaSelection:m,focusedOption:g,focusedValue:y,isFocused:b,selectValue:x,focusableOptions:E,isAppleDevice:this.state.isAppleDevice}))}},{key:"render",value:function(){var o=this.getComponents(),d=o.Control,m=o.IndicatorsContainer,g=o.SelectContainer,y=o.ValueContainer,b=this.props,x=b.className,E=b.id,C=b.isDisabled,S=b.menuIsOpen,A=this.state.isFocused,N=this.commonProps=this.getCommonProps();return React__namespace.createElement(g,_extends({},N,{className:x,innerProps:{id:E,onKeyDown:this.onKeyDown},isDisabled:C,isFocused:A}),this.renderLiveRegion(),React__namespace.createElement(d,_extends({},N,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:C,isFocused:A,menuIsOpen:S}),React__namespace.createElement(y,_extends({},N,{isDisabled:C}),this.renderPlaceholderOrValue(),this.renderInput()),React__namespace.createElement(m,_extends({},N,{isDisabled:C}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(o,d){var m=d.prevProps,g=d.clearFocusValueOnUpdate,y=d.inputIsHiddenAfterUpdate,b=d.ariaSelection,x=d.isFocused,E=d.prevWasFocused,C=d.instancePrefix,S=o.options,A=o.value,N=o.menuIsOpen,k=o.inputValue,L=o.isMulti,G=cleanValue(A),M={};if(m&&(A!==m.value||S!==m.options||N!==m.menuIsOpen||k!==m.inputValue)){var z=N?buildFocusableOptions(o,G):[],V=N?buildFocusableOptionsWithIds(buildCategorizedOptions(o,G),"".concat(C,"-option")):[],Y=g?getNextFocusedValue(d,G):null,X=getNextFocusedOption(d,z),Q=getFocusedOptionId(V,X);M={selectValue:G,focusedOption:X,focusedOptionId:Q,focusableOptionsWithIds:V,focusedValue:Y,clearFocusValueOnUpdate:!1}}var $=y!=null&&o!==m?{inputIsHidden:y,inputIsHiddenAfterUpdate:void 0}:{},K=b,ee=x&&E;return x&&!ee&&(K={value:valueTernary(L,G,G[0]||null),options:G,action:"initial-input-focus"},ee=!E),b?.action==="initial-input-focus"&&(K=null),_objectSpread2(_objectSpread2(_objectSpread2({},M),$),{},{prevProps:o,ariaSelection:K,prevWasFocused:ee})}}]),r})(React.Component);Select.defaultProps=defaultProps;var StateManagedSelect=React.forwardRef(function(e,t){var r=useStateManager(e);return React__namespace.createElement(Select,_extends({ref:t},r))}),StateManagedSelect$1=StateManagedSelect;let SelectDistrict$1=class extends React.Component{constructor(t){super(t)}handleSelect(t){const{doSetDistrictFilter:r}=this.props;r(t)}render(){const{options:t,districtFilter:r}=this.props,{label:s,value:o}=r,d={control:m=>({...m,minHeight:"25px",height:"25px",fontSize:"14px",width:"150px"}),dropdownIndicator:m=>({...m,paddingTop:0,paddingBottom:0}),clearIndicator:m=>({...m,paddingTop:0,paddingBottom:0}),valueContainer:m=>({...m,padding:"0 8px"}),input:m=>({...m,margin:0,padding:0}),menu:m=>({...m,fontSize:"14px"}),option:m=>({...m,padding:"5px 14px"})};return jsxRuntime.jsx(StateManagedSelect$1,{id:"select-district",options:t,onChange:m=>{this.handleSelect(m)},styles:d,value:{label:s,value:o},defaultValue:{label:s,value:o}})}};const SelectDistrict=connect("doSetDistrictFilter","selectDistrictFilter",SelectDistrict$1);let ChangeLogModal$1=class extends React.Component{constructor(t){super(t),this.handleChange=this.handleChange.bind(this),this.close=this.close.bind(this),this.fomatDate=this.formatDate.bind(this)}handleChange(t){const{doSetSearchBarFilter:r}=this.props;r(t.target.value)}close(){const{doModalClose:t}=this.props;t()}formatDate(t){let r=new Date(t);return r=r.toLocaleDateString("default",{month:"long",day:"numeric",year:"numeric"}),r}render(){const{theme:t,doGetChangeLogData:r,changeLogItems:s,allChangeLogItems:o,searchBarFilter:d}=this.props,m=s;let g=[...new Set(o.map(E=>E.district_code))],y=[];g.sort().forEach((E,C)=>{E&&y.push({label:`${E}`,value:`${E}`})}),y.unshift({label:"All Districts",value:"All"});const b=m.map(E=>jsxRuntime.jsxs("div",{style:Object.keys(E).length>0?{listStyleType:"disc"}:{listStyleType:"none"},children:[E.change_date?jsxRuntime.jsx("li",{children:jsxRuntime.jsx("b",{children:this.formatDate(E.change_date)})},E.change_date+E.id):null,E.environment?jsxRuntime.jsxs("li",{style:{listStyleType:"none"},children:[jsxRuntime.jsx("b",{children:"Environment:"})," ",E.environment," "]},E.environment+E.id):null,E.change_type?jsxRuntime.jsxs("li",{style:{listStyleType:"none"},children:[jsxRuntime.jsx("b",{children:"Change Type:"})," ",E.change_type]},E.change_type+E.id):null,E.district_code?jsxRuntime.jsxs("li",{style:{listStyleType:"none"},children:[jsxRuntime.jsx("b",{children:"District:"})," ",E.district_code]},E.district_code+E.id):null,E.description?jsxRuntime.jsxs("li",{style:{listStyleType:"none"},children:[jsxRuntime.jsx("b",{children:"Description:"})," ",E.description]},E.description+E.id):null,jsxRuntime.jsx("br",{})]},E.id+E.id+9876)),x={display:"flex",justifyContent:"center",gap:"40px",width:"700px",alignItems:"flex-end",padding:"5px"};return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"cm-modal-header "+t,children:"Change Log"}),jsxRuntime.jsxs("div",{className:"cm-modal-body",children:[jsxRuntime.jsx("div",{style:x,children:jsxRuntime.jsx("label",{style:{fontSize:"18px",fontWeight:"bold"},children:"Change Log"})}),jsxRuntime.jsxs("div",{style:x,children:[jsxRuntime.jsx("label",{htmlFor:"select-district",children:jsxRuntime.jsx("b",{children:"Filter by District:"})}),jsxRuntime.jsx(SelectDistrict,{options:y})]}),jsxRuntime.jsxs("div",{style:x,children:[jsxRuntime.jsx("label",{htmlFor:"select-district",children:jsxRuntime.jsx("b",{children:"Search:"})}),jsxRuntime.jsx("input",{placeholder:"Change Log Search...",style:{width:"200px"},value:d,onChange:this.handleChange})]}),jsxRuntime.jsx("div",{style:{overflow:"auto scroll",width:"875px",height:"400px",whiteSpace:"pre-wrap"},children:jsxRuntime.jsx("ul",{children:b})})]}),jsxRuntime.jsxs("div",{className:"cm-modal-footer",children:[jsxRuntime.jsx("br",{}),jsxRuntime.jsx("br",{}),jsxRuntime.jsx("br",{}),jsxRuntime.jsx("button",{style:{textAlign:"left"},type:"Close",className:"cm-btn cm-btn-theme "+t,onClick:this.close,children:"Close"})]})]})}};const ChangeLogModal=connect("selectTheme","selectChangeLogItems","selectAllChangeLogItems","selectSearchBarFilter","doModalClose","doSubmitNotification","doGetChangeLogData","doSearchChangeLogData","doSetSearchBarFilter",ChangeLogModal$1);function getChangeLogUrl(){return window.FUDS_CHANGE_LOG_URL||""}const bundle$i={name:"changeLog",getReducer:()=>{const e={items:[],allItems:[],renderModal:!1,districtFilter:{label:"All Districts",value:"All"},searchBarFilter:"",executeSearch:!1};return(t=e,{type:r,payload:s})=>{switch(r){case"CHANGE_LOG_LOAD_ALL_DATA":case"CHANGE_LOG_MODAL_WINDOW_OPENED":case"CHANGE_LOG_LOAD_SELECTED_DATA":case"CHANGE_LOG_SET_DISTRICT_FILTER":case"CHANGE_LOG_SET_SEARCH_BAR_FILTER":case"CHANGE_LOG_EXECUTE_SEARCH":return Object.assign({},t,s);default:return t}}},doSearchChangeLogData:()=>({dispatch:e,store:t})=>{e({type:"CHANGE_LOG_EXECUTE_SEARCH",payload:{executeSearch:!1}});let r=t.selectAllChangeLogItems(),s=t.selectDistrictFilter(),o=t.selectSearchBarFilter().trim().toUpperCase(),d=[];if(s.value!=="All"?d=r.filter(m=>m.district_code===s.value):d=r,o.length>0){const m=[];d.forEach(g=>{let y=null;for(const[b,x]of Object.entries(g))typeof x=="string"&&x.trim().toUpperCase().includes(o)&&g&&(y=!0);y&&m.push(g)}),console.log("SELECTED ITEMS"),console.log(m),e({type:"CHANGE_LOG_LOAD_SELECTED_DATA",payload:{items:m}})}else e({type:"CHANGE_LOG_LOAD_SELECTED_DATA",payload:{items:d}})},doGetChangeLogData:()=>({dispatch:e,store:t,anonGet:r})=>{r(getChangeLogUrl(),(s,o,d)=>{if(!(s||o.statusCode!==200))try{console.log("Production Change Log Data"),console.log(d);let m=JSON.parse(d);console.log("data"),console.log(m);let g=m.items;console.log("ITEMS"),console.log(g),e({type:"CHANGE_LOG_LOAD_ALL_DATA",payload:{allItems:g,renderModal:!1}}),e({type:"CHANGE_LOG_LOAD_SELECTED_DATA",payload:{items:g,renderModal:!0}})}catch{}})},doOpenModalLog:()=>({dispatch:e,store:t})=>{t.doModalOpen({children:[ChangeLogModal],options:{},openedBy:"ChangeLogButton"}),e({type:"CHANGE_LOG_MODAL_WINDOW_OPENED",payload:{renderModal:!1}})},doSetDistrictFilter:e=>({dispatch:t})=>{t({type:"CHANGE_LOG_SET_DISTRICT_FILTER",payload:{districtFilter:e}}),t({type:"CHANGE_LOG_EXECUTE_SEARCH",payload:{executeSearch:!0}})},doSetSearchBarFilter:e=>({dispatch:t})=>{t({type:"CHANGE_LOG_SET_SEARCH_BAR_FILTER",payload:{searchBarFilter:e}}),t({type:"CHANGE_LOG_EXECUTE_SEARCH",payload:{executeSearch:!0}})},selectChangeLogItems:e=>e.changeLog.items,selectAllChangeLogItems:e=>e.changeLog.allItems,selectDistrictFilter:e=>e.changeLog.districtFilter,selectSearchBarFilter:e=>e.changeLog.searchBarFilter,reactRenderChangeLogModal:e=>{if(e.changeLog.renderModal)return{actionCreator:"doOpenModalLog"}},reactDoSearchChangeLogData:e=>{if(e.changeLog.executeSearch)return{actionCreator:"doSearchChangeLogData"}}};class ChangeLogButton extends React.Component{constructor(t){super(t),this.handleClick=this.handleClick.bind(this),this.openModalLog=this.openModalLog.bind(this)}openModalLog(){const{doModalOpen:t}=this.props;t({children:[ChangeLogModal],options:{},openedBy:"ChangeLogButton"})}handleClick(){const{doGetChangeLogData:t}=this.props;this.openModalLog(),t()}render(){return jsxRuntime.jsx(SidebarButton,{iconClass:"mdi mdi-exclamation",label:"Change Log",title:"Change Log",onClick:this.handleClick})}}const changeLogButton=connect("doModalOpen","doGetChangeLogData",ChangeLogButton),plugin$m={pluginName:"changeLog",enabled:!0,bundle:bundle$i,components:[{component:changeLogButton,region:"right-sidebar-top",sortOrder:120}]};let ResourcesModal$1=class extends React.Component{constructor(t){super(t),this.state={},this.close=this.close.bind(this)}close(){const{doModalClose:t}=this.props;t()}render(){function t(g,y){let b=g.filter(x=>x.resource_group_id!==null&&x.resource_group_id===y);return b=b.sort((x,E)=>x.resource_sort-E.resource_sort),b}const{theme:r,doGetResourceData:s,resourceItems:o,resourceGroups:d}=this.props;let m=[];return m=d.map(g=>{let y=(window.FUDS_RESOURCE_GROUP_IMAGE_URL||"")+g.groupId;return jsxRuntime.jsxs("div",{style:{paddingLeft:"25px",fontSize:"20px",fontWeight:"bold"},children:[jsxRuntime.jsxs("span",{children:[jsxRuntime.jsx("img",{src:y,width:"50px",height:"50px",onError:({currentTarget:b})=>{b.onerror=null,b.style.display="none"}},"imageID"+g.groupId),"      ",g.groupName]},"span"+g.groupId),jsxRuntime.jsx("br",{}),jsxRuntime.jsx("div",{style:{paddingLeft:"25px",fontSize:"16px"},children:jsxRuntime.jsxs("table",{className:"table",children:[jsxRuntime.jsx("thead",{children:jsxRuntime.jsxs("tr",{children:[jsxRuntime.jsx("th",{className:"col-md-6",style:{paddingRight:"40px"},children:"Description"}),jsxRuntime.jsx("th",{className:"col-md-6",children:"URL"})]},g.groupId+7777777777)}),jsxRuntime.jsx("tbody",{children:t(o,g.groupId).map(b=>jsxRuntime.jsxs("tr",{children:[jsxRuntime.jsx("td",{className:"col-md-6",style:{paddingRight:"40px"},children:b.description}),jsxRuntime.jsx("td",{className:"col-md-6",children:jsxRuntime.jsx("a",{href:b.url,target:"_blank",rel:"noreferrer nofollow noopener",download:"TEST_FILE",children:b.name})})]},b.resource_id))})]},"tableID"+g.groupId)},"itemDivID"+g.groupId),jsxRuntime.jsx("br",{})]},"image"+g.groupId)}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"cm-modal-header "+r,children:"Resources"}),jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{children:jsxRuntime.jsx("br",{})}),jsxRuntime.jsx("div",{children:jsxRuntime.jsx("div",{style:{overflow:"auto scroll",width:"875px",height:"390px",whiteSpace:"pre-wrap",paddingLeft:"25px"},children:m})})]}),jsxRuntime.jsxs("div",{className:"cm-modal-footer",children:[jsxRuntime.jsx("br",{}),jsxRuntime.jsx("br",{}),jsxRuntime.jsx("br",{}),jsxRuntime.jsx("button",{style:{textAlign:"left"},type:"Close",className:"cm-btn cm-btn-theme "+r,onClick:this.close,children:"Close"})]})]})}};const ResourcesModal=connect("selectTheme","selectResourceItems","selectResourceGroups","doModalClose","doGetResourceData",ResourcesModal$1),createResourceGroup=e=>{let t=[];for(let s=0;s<e.length;s++){let o=e[s].resource_group_id;if(o){let d={groupId:o,groupDescription:e[s]["group description"],groupName:e[s]["group name"],groupSort:e[s].group_sort};t.push(d)}}let r=t.reduce((s,o)=>s.find(m=>m.groupId===o.groupId)?s:s.concat([o]),[]);return r.sort((s,o)=>s.groupSort-o.groupSort),r};function getResourcesUrl(){return window.FUDS_RESOURCES_URL||""}const defaultHtml=[{name:"FUDSMIS Portal - Default",url:"https://fudsportal.usace.army.mil/"},{name:"IPaC Information for Planning and Consultation - Default",url:"https://ipac.ecosphere.fws.gov/"}],bundle$h={name:"resources",getReducer:()=>{const e={items:defaultHtml,groups:{},renderModal:!1};return(t=e,{type:r,payload:s})=>{switch(r){case"RESOURCES_LOAD_TEST_DATA":case"RESOURCES_LOAD_PRODUCTION_DATA":case"RESOURCES_MODAL_WINDOW_OPENED":return Object.assign({},t,s);default:return t}}},doGetResourceData:()=>({dispatch:e,store:t,anonGet:r})=>{r(getResourcesUrl(),(s,o,d)=>{if(s||o.statusCode!==200)e({type:"RESOURCES_LOAD_TEST_DATA",payload:{items:defaultHtml,groups:{},renderModal:!0}});else try{console.log("Production Resource Data");let g=JSON.parse(d).items,y={};y=createResourceGroup(g),console.log(g),console.log(y),e({type:"RESOURCES_LOAD_PRODUCTION_DATA",payload:{groups:y,items:g,renderModal:!0}})}catch{}})},doOpenModalResources:()=>({dispatch:e,store:t})=>{t.doModalOpen({children:[ResourcesModal],options:{},openedBy:"ResourcesButton"}),e({type:"RESOURCES_MODAL_WINDOW_OPENED",payload:{renderModal:!1}})},selectResourceItems:e=>e.resources.items,selectResourceGroups:e=>e.resources.groups,reactRenderResourceModal:e=>{if(e.resources.renderModal===!0)return{actionCreator:"doOpenModalResources"}}};class ResourcesButton extends React.Component{constructor(t){super(t),this.handleClick=this.handleClick.bind(this),this.openModalResources=this.openModalResources.bind(this)}openModalResources(){const{doModalOpen:t}=this.props;t({children:[ResourcesModal],options:{},openedBy:"ResourcesButton"})}handleClick(){const{doGetResourceData:t}=this.props;t()}render(){return jsxRuntime.jsx(SidebarButton,{iconClass:"mdi mdi-library",label:"Resources",title:"Resources",onClick:this.handleClick})}}const resourcesButton=connect("doModalOpen","doGetResourceData",ResourcesButton),plugin$l={pluginName:"resources",enabled:!0,bundle:bundle$h,components:[{component:resourcesButton,region:"right-sidebar-top",sortOrder:130}]},CoordinateLatLonInput$1=e=>{const{label:t,placeholder:r,doUpdateCoordInput:s,coordsLatLonInput:o}=e;return jsxRuntime.jsx("li",{children:jsxRuntime.jsx("span",{className:"cm-form-horizontal",children:jsxRuntime.jsxs("div",{className:"cm-form-group",style:{marginBottom:0},children:[jsxRuntime.jsx("label",{className:"col-md-1",style:{paddingTop:"3px"},children:t}),jsxRuntime.jsx("div",{className:"col-md-10",children:jsxRuntime.jsx("input",{type:"text",className:"cm-form-control cm-input-sm",onChange:d=>{s(d,t)},value:o[`${t}`],placeholder:r})})]})})})},CoordinateLatLonInput=connect("doUpdateCoordInput","selectCoordsLatLonInput",CoordinateLatLonInput$1),CoordinateDisplay$1=e=>{const{doStartCoordCopy:t,coordsCopyActive:r,coordsLatLonInput:s,doCoordZoomTo:o,coordsValues:d}=e,m=!(s.X.length>0&&s.Y.length>0);return jsxRuntime.jsx(BasicToolbarButton,{enabled:!0,dropup:!0,iconClass:"",title:"Coordinate Display",text:`${d.X}, ${d.Y}`,passProps:{style:{minWidth:180}},children:jsxRuntime.jsxs(BasicToolbarMenuUp,{children:[jsxRuntime.jsx(BasicToolbarMenuItem,{active:!1,iconClass:"mdi mdi-content-copy icon-inline",title:"Copy Coordinate to Clipboard",text:"Copy Coordinate to Clipboard",onClick:t,disabled:r,passProps:{}}),jsxRuntime.jsx(CoordinateLatLonInput,{label:"X",placeholder:"Enter Longitude.."}),jsxRuntime.jsx(CoordinateLatLonInput,{label:"Y",placeholder:"Enter Latitude.."}),jsxRuntime.jsx(BasicToolbarMenuItem,{active:!1,iconClass:"mdi mdi-map-marker-radius icon-inline",title:"Go to Coordinate",text:"Go to Coordinate",onClick:o,passProps:{},disabled:m})]})})},CoordinateDisplay=connect("doStartCoordCopy","doCoordZoomTo","selectCoordsCopyActive","selectCoordsLatLonInput","selectCoordsValues",CoordinateDisplay$1);class CoordinateDisplayProjItem extends React.Component{constructor(t){super(t),this.onSelect=this.onSelect.bind(this),this.onRemove=this.onRemove.bind(this)}onSelect(){const{proj:t,onSelect:r}=this.props;r(t.epsg,t.name)}onRemove(){const{proj:t,onRemove:r}=this.props;r(t.epsg)}render(){const{proj:t,epsg:r,i:s}=this.props,o="https://epsg.io/"+t.epsg.split(":")[1];return jsxRuntime.jsxs("li",{className:"cm-list-group-item clearfix",children:[jsxRuntime.jsx("div",{className:"col-md-6",children:jsxRuntime.jsx("div",{style:{margin:0},className:"radio",children:jsxRuntime.jsxs("label",{children:[jsxRuntime.jsx("input",{onChange:this.onSelect,type:"radio",name:"choose-epsg",id:"choose-epsg"+s,value:t.epsg,checked:t.epsg===r}),t.name]})})}),jsxRuntime.jsx("div",{className:"col-md-3",children:jsxRuntime.jsx("a",{href:o,target:"_blank",title:"More information on epsg.io",children:t.epsg})}),jsxRuntime.jsx("div",{className:"col-md-3",children:jsxRuntime.jsx("div",{className:"pull-right",children:jsxRuntime.jsx("button",{onClick:this.onRemove,className:"cm-btn cm-btn-link cm-btn-xs",children:"Remove"})})})]})}}class CoordinateDisplaySettings extends React.Component{constructor(t){super(t),this.state={addEpsg:"",filterString:"",height:window.innerHeight*.5},this.close=this.close.bind(this),this.filterFn=this.filterFn.bind(this),this.updateAddEpsg=this.updateAddEpsg.bind(this),this.updateFilterString=this.updateFilterString.bind(this),this.onSelect=this.onSelect.bind(this),this.onRemove=this.onRemove.bind(this),this.getProjDef=this.getProjDef.bind(this)}close(){const{doModalClose:t}=this.props;t()}filterFn(t){const{filterString:r}=this.state;return(t.name.toLowerCase()+" "+t.epsg.toLowerCase()).indexOf(r)!==-1}updateAddEpsg(t){const r=t.currentTarget.value;this.setState({addEpsg:""+r.toUpperCase()})}updateFilterString(t){const r=t.currentTarget.value;this.setState({filterString:r.toLowerCase()})}onSelect(t,r){const{doSelectProjection:s}=this.props;s(t,r)}onRemove(t){const{doRemoveProjection:r}=this.props;r(t)}getProjDef(){const{doLoadProjDef:t}=this.props;let r=this.state.addEpsg;r.indexOf("EPSG")===-1&&(r="EPSG:"+r),t(r)}render(){const{theme:t,projectionList:r,displayProjection:s,projectionCanUseEPSGIO:o}=this.props,{addEpsg:d,filterString:m,height:g}=this.state,y=_.filter(r,this.filterFn);return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:"cm-modal-header "+t,children:"Coordinate Display Settings"}),jsxRuntime.jsxs("div",{className:"cm-modal-body",style:{height:g,overflow:"auto"},children:[jsxRuntime.jsxs("div",{className:"row",children:[jsxRuntime.jsx("div",{className:"col-xs-6",children:jsxRuntime.jsxs("div",{className:"cm-form-group",children:[jsxRuntime.jsx("label",{className:"cm-control-label",children:"Filter the list by searching names and EPSG codes here:"}),jsxRuntime.jsx("input",{onChange:this.updateFilterString,value:m,type:"text",className:"cm-form-control cm-input-sm",placeholder:"Filter list..."})]})}),jsxRuntime.jsx("div",{className:"col-xs-6",children:jsxRuntime.jsxs("div",{className:"cm-form-group",children:[jsxRuntime.jsxs("label",{className:"cm-control-label",children:["Add more supported projections from"," ",jsxRuntime.jsx("a",{target:"_blank",rel:"noopener noreferrer",href:"https://epsg.io",children:"epsg.io"})]}),o?jsxRuntime.jsxs("div",{className:"cm-input-group",children:[jsxRuntime.jsx("input",{onChange:this.updateAddEpsg,value:d,type:"text",className:"cm-form-control cm-input-sm",placeholder:"Enter the EPSG code i.e. EPSG:4326 or 4326"}),jsxRuntime.jsx("span",{className:"cm-input-group-btn",children:jsxRuntime.jsx("button",{onClick:this.getProjDef,className:"cm-btn cm-btn-theme cm-btn-sm "+t,type:"button",children:"Go"})})]}):jsxRuntime.jsx("div",{children:"Connection to EPSG.io unavailable at this time"})]})})]}),jsxRuntime.jsx("div",{className:"row",children:jsxRuntime.jsx("ul",{className:"cm-list-group thin-scrollbar",style:{margin:"15px",overflow:"auto"},children:y.map((b,x)=>jsxRuntime.jsx(CoordinateDisplayProjItem,{proj:b,epsg:s,i:x,onSelect:this.onSelect,onRemove:this.onRemove},b.epsg))})})]}),jsxRuntime.jsx("div",{className:"cm-modal-footer",children:jsxRuntime.jsx("button",{className:"cm-btn cm-btn-theme "+t,onClick:this.close,children:"Close"})})]})}}const Settings$1=connect("selectTheme","selectProjectionList","selectDisplayProjection","selectProjectionCanUseEPSGIO","doModalClose","doRemoveProjection","doSelectProjection","doLoadProjDef",CoordinateDisplaySettings);let CoordinateInteraction$1=class extends React.Component{constructor(t){super(t),this.openSettings=this.openSettings.bind(this)}openSettings(){const{doModalOpen:t,doBasicToolbarDeactivate:r}=this.props;t({children:[Settings$1],options:{},openedBy:"PositionText"}),r()}render(){const{displayProjection:t,displayProjectionName:r}=this.props;return jsxRuntime.jsx(BasicToolbarButton,{enabled:!0,dropup:!0,iconClass:"",title:`Current Coordinate System: ${r}`,text:t,onDeactivate:this.cleanUp,children:jsxRuntime.jsx(BasicToolbarMenuUp,{children:jsxRuntime.jsx(BasicToolbarMenuItem,{active:!1,iconClass:"mdi mdi-settings icon-inline",title:"Set Display Coordinate System",text:"Set Display Coordinate System",onClick:this.openSettings,passProps:{}})})})}};const CoordinateInteraction=connect("selectDisplayProjection","selectDisplayProjectionName","doModalOpen","doBasicToolbarDeactivate",CoordinateInteraction$1),CoordinatePopup=e=>{const{coords:t,onClear:r,overlay:s}=e;return jsxRuntime.jsxs("div",{className:"panel panel-default top clearfix",style:{marginBottom:0},children:[jsxRuntime.jsx("div",{className:"pull-right",children:jsxRuntime.jsx("i",{style:{cursor:"pointer"},title:"Clear",className:"mdi mdi-close",onClick:o=>r(o,s)})}),jsxRuntime.jsx("div",{className:"arrow"}),jsxRuntime.jsx("div",{className:"panel-body",children:jsxRuntime.jsx("div",{style:{minWidth:"125px",textAlign:"center"},children:`${t.x}, ${t.y}`})})]})};var throttle_1,hasRequiredThrottle;function requireThrottle(){if(hasRequiredThrottle)return throttle_1;hasRequiredThrottle=1;var e=requireDebounce(),t=requireIsObject(),r="Expected a function";function s(o,d,m){var g=!0,y=!0;if(typeof o!="function")throw new TypeError(r);return t(m)&&(g="leading"in m?!!m.leading:g,y="trailing"in m?!!m.trailing:y),e(o,d,{leading:g,maxWait:d,trailing:y})}return throttle_1=s,throttle_1}var throttleExports=requireThrottle();const throttle=getDefaultExportFromCjs$1(throttleExports),bundle$g={name:"coordinateDisplay",getReducer(){const e={values:{X:"0.0000",Y:"0.0000"},latLonInput:{X:"",Y:""},copyActive:!1,overlay:null,container:null,_shouldInitialize:!1};return(t=e,{type:r,payload:s})=>{switch(r){case"MAP_INITIALIZED":return Object.assign({},t,{_shouldInitialize:!0});case"COORD_COPY_ACTIVE":case"COORD_COPIED":case"COORD_INPUT_UPDATED":case"COORD_INPUT_INVALID":case"COORD_INITIALIZE_START":case"COORD_INITIALIZE_FINISH":case"COORD_POSITION_UPDATE":case"COORD_OVERLAY_RENDERED":case"COORD_OVERLAY_REMOVED":return Object.assign({},t,s);default:return t}}},doCoordsInitialize:()=>({dispatch:e,store:t})=>{e({type:"COORD_INITIALIZE_START",payload:{_shouldInitialize:!1}}),t.selectMap().on("pointermove",throttle(t.doCoordsPointerMove,200)),e({type:"COORD_INITIALIZE_FINISH"})},doCoordsPointerMove:e=>({dispatch:t,store:r})=>{e.preventDefault(),e.stopPropagation();const s=r.selectDisplayProjection(),o=e.coordinate,d=proj.transform(o,"EPSG:3857",s),m=Math.round(d[0]*1e4)/1e4,g=Math.round(d[1]*1e4)/1e4;t({type:"COORD_POSITION_UPDATE",payload:{values:{X:m,Y:g}}})},doRenderCoordsOverlay:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectMap(),d=s.selectCoordsOverlay();d&&s.doClearCoordOverlay(d);const m=document.createElement("div"),g=new Overlay$1({element:m,positioning:"bottom-center",offset:[0,-10]});o.addOverlay(g),ReactDOM.render(jsxRuntime.jsx(CoordinatePopup,{overlay:g,coords:t,map:o,onClear:s.doClearPopup}),m),g.setPosition(e),r({type:"COORD_OVERLAY_RENDERED",payload:{overlay:g}})},doClearPopup:(e,t)=>({store:r})=>{console.log(e),e.preventDefault(),e.stopPropagation(),r.doClearCoordOverlay(t)},doClearCoordOverlay:e=>({dispatch:t,store:r})=>{const s=r.selectMap();e.setPosition(void 0);const o=e.getElement();o.parentNode.removeChild(o),s.removeOverlay(e),t({type:"COORD_OVERLAY_REMOVED",payload:{overlay:null}})},doStartCoordCopy:()=>({dispatch:e,store:t})=>{const r=t.selectMap();t.doSetCursor("crosshair");const s=document.createElement("div");s.id="cm-copy-coords",document.body.appendChild(s),e({type:"COORD_COPY_ACTIVE",payload:{copyActive:!0,container:s,notification:{message:"Click on map to copy coordinates.",level:"info"}}}),r.once("singleclick",t.doCoordCopy)},doCoordCopy:e=>({dispatch:t,store:r})=>{e.preventDefault(),e.stopPropagation();const s=r.selectCoordsContainer(),o=r.selectDisplayProjection(),d=e.coordinate,m=proj.transform(d,"EPSG:3857",o),g=Math.round(m[0]*1e4)/1e4,y=Math.round(m[1]*1e4)/1e4,b=document.createElement("input");s.appendChild(b),b.value=`${g}, ${y}`,b.select(),document.execCommand("copy"),r.doStopCoordCopy(g,y)},doStopCoordCopy:(e,t)=>({dispatch:r,store:s})=>{const o=s.selectCoordsContainer(),d=`Copied ${e}, ${t} to the clipboard.`;s.doSetCursor("default"),r({type:"COORD_COPIED",payload:{copyActive:!1,container:null,notification:{title:"Coordinate Display",message:d,level:"info"}}}),o.remove(),s.doBasicToolbarDeactivate()},doUpdateCoordInput:(e,t)=>({dispatch:r,store:s})=>{e.preventDefault(),e.stopPropagation();const o=s.selectCoordsLatLonInput();r({type:"COORD_INPUT_UPDATED",payload:{latLonInput:{...o,[`${t}`]:e.currentTarget.value}}})},doCoordZoomTo:()=>({dispatch:e,store:t})=>{const r=t.selectCoordsLatLonInput(),s=t.selectDisplayProjection(),o=Number(r.X),d=Number(r.Y);if(isNaN(o)||isNaN(d))e({type:"COORD_INPUT_INVALID",payload:{notification:{title:"Coordinate Display",message:"Enter valid number.",level:"danger"}}});else{const m=proj.transform([o,d],s,"EPSG:3857");t.doRenderCoordsOverlay(m,{x:o,y:d}),t.doZoomToLocation(m,13),t.doBasicToolbarDeactivate()}},selectCoordsValues:e=>e.coordinateDisplay.values,selectCoordsOverlay:e=>e.coordinateDisplay.overlay,selectCoordsContainer:e=>e.coordinateDisplay.container,selectCoordsCopyActive:e=>e.coordinateDisplay.copyActive,selectCoordsLatLonInput:e=>e.coordinateDisplay.latLonInput,reactCoordinateDisplayShouldInitialize:e=>{if(e.coordinateDisplay._shouldInitialize)return{actionCreator:"doCoordsInitialize"}}},plugin$k={pluginName:"PositionText",enabled:!0,bundle:bundle$g,components:[{component:CoordinateDisplay,region:"lower-right-toolbar",sortOrder:10},{component:CoordinateInteraction,region:"lower-right-toolbar",sortOrder:20}]};class DrawToolItem extends React.Component{constructor(t){super(t),this.toggleVisible=this.toggleVisible.bind(this),this.renderTextContent=this.renderTextContent.bind(this),this.renderVisibilityIcon=this.renderVisibilityIcon.bind(this)}toggleVisible(t){t.preventDefault(),t.stopPropagation();const{onToggleVisibility:r}=this.props;r()}renderTextContent(){const{liveDangerously:t,text:r}=this.props;return t?jsxRuntime.jsx("span",{dangerouslySetInnerHTML:{__html:r}}):r}renderVisibilityIcon(){const{visible:t}=this.props,r=classnames({"pull-right":!0}),s=classnames({mdi:!0,"mdi-eye":t,"text-primary":t,"mdi-eye-off":!t});return jsxRuntime.jsx("div",{onClick:this.toggleVisible,className:r,style:{position:"relative",right:"-20px"},title:"Show/Hide",children:jsxRuntime.jsx("i",{className:s})})}render(){const{active:t,passProps:r,onClick:s,iconClass:o}=this.props,d=classnames({active:t});return jsxRuntime.jsx("li",{className:d,...r,onClick:s,style:{paddingRight:"20px"},children:jsxRuntime.jsxs("span",{children:[this.renderVisibilityIcon(),jsxRuntime.jsx("i",{className:o}),this.renderTextContent()]})})}}let DrawButton$1=class extends React.Component{constructor(t){super(t),this.state={mode:null},this.updateMode=this.updateMode.bind(this),this.handleDeactivate=this.handleDeactivate.bind(this),this.removeInteractions=this.removeInteractions.bind(this)}handleDeactivate(){this.setState({mode:null},this.removeInteractions)}addInteractions(){this.removeInteractions();const{doDrawPointsAddInteractions:t,doDrawLinesAddInteractions:r,doDrawPolygonsAddInteractions:s,doDrawLabelsAddInteractions:o,doDrawModifyAddInteractions:d}=this.props,{mode:m}=this.state;switch(m){case"Point":return t();case"LineString":return r();case"Polygon":return s();case"Labels":return o();case"Modify":return d();default:return}}removeInteractions(){const{doDrawPointsRemoveInteractions:t,doDrawLinesRemoveInteractions:r,doDrawPolygonsRemoveInteractions:s,doDrawLabelsRemoveInteractions:o,doDrawModifyRemoveInteractions:d}=this.props;t(),r(),s(),o(),d()}updateMode(t){const r=t.currentTarget.dataset.mode;this.setState({mode:r},this.addInteractions)}render(){const{drawPointsVisible:t,drawPointsActive:r,doDrawPointsToggleVisible:s,drawLinesVisible:o,drawLinesActive:d,doDrawLinesToggleVisible:m,drawPolygonsVisible:g,drawPolygonsActive:y,doDrawPolygonsToggleVisible:b,drawLabelsActive:x,drawModifyActive:E,doDrawSaveDownload:C}=this.props;return jsxRuntime.jsx(BasicToolbarButton,{enabled:!0,iconClass:"mdi mdi-pencil",title:"Draw Tools",onDeactivate:this.handleDeactivate,children:jsxRuntime.jsxs(BasicToolbarMenu,{children:[jsxRuntime.jsx(BasicToolbarMenuItem,{active:E,iconClass:"ms ms-draw icon-inline",title:"Modify Draw Features",text:"Modify Draw Features",onClick:this.updateMode,passProps:{"data-mode":"Modify"}}),jsxRuntime.jsx(BasicToolbarMenuItem,{active:x,iconClass:"ms ms-label-o icon-inline",title:"Add / Edit Labels",text:"Add / Edit Labels",onClick:this.updateMode,passProps:{"data-mode":"Labels"}}),jsxRuntime.jsx(BasicToolbarMenuDivider,{}),jsxRuntime.jsx(DrawToolItem,{active:r,visible:t,iconClass:"ms ms-draw-point icon-inline",title:"Draw Points",text:"Draw Points",onClick:this.updateMode,passProps:{"data-mode":"Point"},onToggleVisibility:s}),jsxRuntime.jsx(DrawToolItem,{active:d,visible:o,iconClass:"ms ms-draw-line icon-inline",title:"Draw Lines",text:"Draw Lines",onClick:this.updateMode,passProps:{"data-mode":"LineString"},onToggleVisibility:m}),jsxRuntime.jsx(DrawToolItem,{active:y,visible:g,iconClass:"ms ms-draw-polygon icon-inline",title:"Draw Polygons",text:"Draw Polygons",onClick:this.updateMode,passProps:{"data-mode":"Polygon"},onToggleVisibility:b}),jsxRuntime.jsx(BasicToolbarMenuDivider,{}),jsxRuntime.jsx(BasicToolbarMenuItem,{active:!1,iconClass:"mdi mdi-download icon-inline",title:"Download Draw Layers as GeoJSON",text:"Download Draw Layers",onClick:C,passProps:{}})]})})}};const DrawButton=connect("selectDrawPointsVisible","selectDrawPointsActive","doDrawPointsToggleVisible","doDrawPointsAddInteractions","doDrawPointsRemoveInteractions","selectDrawLinesVisible","selectDrawLinesActive","doDrawLinesToggleVisible","doDrawLinesAddInteractions","doDrawLinesRemoveInteractions","selectDrawPolygonsVisible","selectDrawPolygonsActive","doDrawPolygonsToggleVisible","doDrawPolygonsAddInteractions","doDrawPolygonsRemoveInteractions","selectDrawLabelsActive","doDrawLabelsAddInteractions","doDrawLabelsRemoveInteractions","selectDrawModifyActive","doDrawModifyAddInteractions","doDrawModifyRemoveInteractions","doDrawSave","doDrawSaveDownload",DrawButton$1),styles=e=>{const t="rgba(245, 66, 233, 1)",r="rgba(245, 66, 233, 0.6)",s="#ffffff";return{Point:d=>{const m=d.get("label")||"";return new Style({image:new Circle({radius:7,fill:new Fill({color:t}),stroke:new Stroke({color:s,width:3})}),text:new Text({placement:"point",font:"14px sans-serif",weight:"bold",text:m,textAlign:"left",textBaseline:"bottom",offsetX:4,offsetY:-4,overflow:!0,stroke:new Stroke({color:s,width:3})}),fill:new Fill({color:t}),stroke:new Stroke({color:s,width:3})})},LineString:d=>{const m=d.get("label")||"";return[new Style({stroke:new Stroke({color:s,width:4})}),new Style({text:new Text({font:"14px sans-serif",weight:"bold",text:m,textAlign:"center",textBaseline:"middle",placement:"line",overflow:!0,stroke:new Stroke({color:s,width:3})}),stroke:new Stroke({color:t,width:2})})]},Polygon:d=>{const m=d.get("label")||"";return new Style({text:new Text({placement:"point",font:"14px sans-serif",weight:"bold",text:m,textAlign:"center",textBaseline:"middle",overflow:!0,stroke:new Stroke({color:s,width:3})}),fill:new Fill({color:r}),stroke:new Stroke({color:s,width:3})})}}[e]},geoJSON$3=new GeoJSON,createDrawBundle=e=>{const r=Object.assign({},{name:"draw",type:"Point",active:!1,visible:!0},e),s=r.name.charAt(0).toUpperCase()+r.name.slice(1),o=r.name.toUpperCase(),d={INITIALIZE_START:`${o}_INITIALIZE_START`,INITIALIZE_FINISH:`${o}_INITIALIZE_FINISH`,SHOW:`${o}_SHOW`,HIDE:`${o}_HIDE`,ACTIVATE:`${o}_ACTIVATE`,DEACTIVATE:`${o}_DEACTIVATE`},m=`do${s}Initialize`,g=`do${s}AddLayer`,y=`do${s}RemoveLayer`,b=`do${s}AddInteractions`,x=`do${s}RemoveInteractions`,E=`do${s}ToggleVisible`,C=`do${s}ToggleInteractions`,S=`select${s}Layer`,A=`select${s}DrawInteraction`,N=`select${s}InterselectInteractions`,k=`select${s}Active`,L=`select${s}Visible`,G=`react${s}ShouldInitialize`;return{name:r.name,getReducer(){const M={active:r.active,visible:r.visible,layer:null,drawInteraction:null,shouldInitialize:!1};return(z=M,{type:V,payload:Y})=>{switch(V){case d.INITIALIZE_START:case d.INITIALIZE_FINISH:case d.SHOW:case d.HIDE:case d.ACTIVATE:case d.DEACTIVATE:return Object.assign({},z,Y);case"DRAW_SAVE_INITIALIZE_FINISHED":return Object.assign({},z,{shouldInitialize:!0});default:return z}}},[m]:()=>({dispatch:M,store:z})=>{M({type:d.INITIALIZE_START,payload:{shouldInitialize:!1}});const V=`selectDrawSaveCache${r.type}`,Y=z[V](),X=new VectorSrc;if(Y&&Y.features&&Y.features.length){const K=geoJSON$3.readFeaturesFromObject(Y,{featureProjection:z.selectMapProjection(),dataProjection:z.selectGeoProjection()});X.addFeatures(K)}X.on("change",debounce(z.doDrawSave,300));const Q=new Vector({source:X,zIndex:9e4,style:styles(r.type)}),$=new Draw({source:X,type:r.type});r.visible&&z.selectMap().addLayer(Q),M({type:d.INITIALIZE_FINISH,payload:{layer:Q,drawInteraction:$}})},[g]:()=>({dispatch:M,store:z})=>{const V=z.selectMap(),Y=z[S]();V.addLayer(Y),M({type:d.SHOW,payload:{visible:!0}})},[y]:()=>({dispatch:M,store:z})=>{const V=z.selectMap(),Y=z[S]();V.removeLayer(Y),M({type:d.HIDE,payload:{visible:!1}})},[E]:()=>({dispatch:M,store:z})=>{z[L]()?z[y]():z[g]()},[b]:()=>({dispatch:M,store:z})=>{z.doSetCursor("crosshair");const V=z.selectMap();z[N]().forEach(X=>{V.addInteraction(X)}),M({type:d.ACTIVATE,payload:{active:!0}})},[x]:()=>({dispatch:M,store:z})=>{z.doSetCursor();const V=z.selectMap();z[N]().forEach(X=>{V.removeInteraction(X)}),M({type:d.DEACTIVATE,payload:{active:!1}})},[C]:()=>({store:M})=>{M.selectActive()?M[x]():M[b]()},[k]:M=>M[r.name].active,[L]:M=>M[r.name].visible,[S]:M=>M[r.name].layer,[A]:M=>M[r.name].drawInteraction,[N]:reduxBundler.createSelector(A,M=>[M]),[G]:M=>{if(M[r.name].shouldInitialize)return{actionCreator:m}}}},drawLabelBundle={name:"drawLabels",getReducer:()=>{const e={active:!1,select:null,shouldInitialize:!1};return(t=e,{type:r,payload:s})=>{switch(r.indexOf("DRAW")!==-1&&console.log(r),r){case"DRAW_LABELS_INITIALIZE_START":case"DRAW_LABELS_INITIALIZE_FINISH":case"DRAW_LABELS_ACTIVATE":case"DRAW_LABELS_DEACTIVATE":return Object.assign({},t,s);case"DRAWPOINTS_INITIALIZE_FINISH":case"DRAWLINES_INITIALIZE_FINISH":case"DRAWPOLYGONS_INITIALIZE_FINISH":return Object.assign({},t,{shouldInitialize:!0});default:return t}}},doDrawLabelsInitialize:()=>({dispatch:e,store:t})=>{e({type:"DRAW_LABELS_INITIALIZE_START",payload:{shouldInitialize:!1}});const r=t.selectDrawLabelsChildLayers();if(!r)return null;const s=new Select$1({layers:r});s.on("select",t.doDrawLabelsHandleSelect),e({type:"DRAW_LABELS_INITIALIZE_FINISH",payload:{select:s}})},doDrawLabelsAddInteractions:()=>({dispatch:e,store:t})=>{t.doSetCursor("pointer");const r=t.selectMap(),s=t.selectDrawLabelsInteraction();r.addInteraction(s),e({type:"DRAW_LABELS_ACTIVATE",payload:{active:!0}})},doDrawLabelsRemoveInteractions:()=>({dispatch:e,store:t})=>{t.doSetCursor();const r=t.selectMap(),s=t.selectDrawLabelsInteraction();r.removeInteraction(s),e({type:"DRAW_LABELS_DEACTIVATE",payload:{active:!1}})},doDrawLabelsHandleSelect:e=>({store:t})=>{const r=e.selected[0],s=r.get("label")||"",o=window.prompt("Label the Draw Feature",s);r.set("label",o),t.selectDrawLabelsInteraction().getFeatures().clear()},selectDrawLabelsChildLayers:reduxBundler.createSelector("selectDrawPointsLayer","selectDrawLinesLayer","selectDrawPolygonsLayer",(e,t,r)=>!e||!t||!r?null:[e,t,r]),selectDrawLabelsActive:e=>e.drawLabels.active,selectDrawLabelsInteraction:e=>e.drawLabels.select,reactDrawLabelsShouldInitialize:e=>{if(e.drawLabels.shouldInitialize)return{actionCreator:"doDrawLabelsInitialize"}}},drawModifyBundle={name:"drawModify",getReducer:()=>{const e={active:!1,select:null,modify:null,shouldInitialize:!1};return(t=e,{type:r,payload:s})=>{switch(r){case"DRAW_MODIFY_INITIALIZE_START":case"DRAW_MODIFY_INITIALIZE_FINISH":case"DRAW_MODIFY_ACTIVATE":case"DRAW_MODIFY_DEACTIVATE":return Object.assign({},t,s);case"DRAWPOINTS_INITIALIZE_FINISH":case"DRAWLINES_INITIALIZE_FINISH":case"DRAWPOLYGONS_INITIALIZE_FINISH":return Object.assign({},t,{shouldInitialize:!0});default:return t}}},doDrawModifyInitialize:()=>({dispatch:e,store:t})=>{e({type:"DRAW_MODIFY_INITIALIZE_START",payload:{shouldInitialize:!1}});const r=t.selectDrawModifyChildLayers();if(!r)return null;const s=new Select$1({layers:r}),o=new Modify({features:s.getFeatures()});e({type:"DRAW_MODIFY_INITIALIZE_FINISH",payload:{select:s,modify:o}})},doDrawModifyAddInteractions:()=>({dispatch:e,store:t})=>{t.doSetCursor("pointer");const r=t.selectMap();t.selectDrawModifyInteraction().forEach(o=>{r.addInteraction(o)}),window.addEventListener("keyup",t.doDrawModifyHandleKeyUp),e({type:"DRAW_MODIFY_ACTIVATE",payload:{active:!0}})},doDrawModifyRemoveInteractions:()=>({dispatch:e,store:t})=>{t.doSetCursor();const r=t.selectMap();t.selectDrawModifyInteraction().forEach(o=>{r.removeInteraction(o)}),window.removeEventListener("keyup",t.doDrawModifyHandleKeyUp),e({type:"DRAW_MODIFY_DEACTIVATE",payload:{active:!1}})},doDrawModifyHandleSelect:e=>({store:t})=>{const r=e.selected[0],s=r.get("label")||"",o=window.prompt("Label the Draw Feature",s);r.set("label",o),t.selectDrawModifyInteraction().getFeatures().clear()},doDrawModifyHandleKeyUp:e=>({store:t})=>{const r=e.keyCode,o=t.selectDrawModifySelect().getFeatures(),d=t.selectDrawModifyChildLayers();if(!d)return null;[8,46].indexOf(r)!==-1&&(o.forEach(m=>{d.forEach(g=>{const y=g.getSource();y.hasFeature(m)&&y.removeFeature(m)})}),o.clear())},selectDrawModifyChildLayers:reduxBundler.createSelector("selectDrawPointsLayer","selectDrawLinesLayer","selectDrawPolygonsLayer",(e,t,r)=>!e||!t||!r?null:[e,t,r]),selectDrawModifyActive:e=>e.drawModify.active,selectDrawModifySelect:e=>e.drawModify.select,selectDrawModifyModify:e=>e.drawModify.modify,selectDrawModifyInteraction:reduxBundler.createSelector("selectDrawModifySelect","selectDrawModifyModify",(e,t)=>[e,t]),reactDrawModifyShouldInitialize:e=>{if(e.drawModify.shouldInitialize)return{actionCreator:"doDrawModifyInitialize"}}};var FileSaver_min$1={exports:{}},FileSaver_min=FileSaver_min$1.exports,hasRequiredFileSaver_min;function requireFileSaver_min(){return hasRequiredFileSaver_min||(hasRequiredFileSaver_min=1,(function(e,t){(function(r,s){s()})(FileSaver_min,function(){function r(b,x){return typeof x>"u"?x={autoBom:!1}:typeof x!="object"&&(console.warn("Deprecated: Expected third argument to be a object"),x={autoBom:!x}),x.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(b.type)?new Blob(["\uFEFF",b],{type:b.type}):b}function s(b,x,E){var C=new XMLHttpRequest;C.open("GET",b),C.responseType="blob",C.onload=function(){y(C.response,x,E)},C.onerror=function(){console.error("could not download file")},C.send()}function o(b){var x=new XMLHttpRequest;x.open("HEAD",b,!1);try{x.send()}catch{}return 200<=x.status&&299>=x.status}function d(b){try{b.dispatchEvent(new MouseEvent("click"))}catch{var x=document.createEvent("MouseEvents");x.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),b.dispatchEvent(x)}}var m=typeof window=="object"&&window.window===window?window:typeof self=="object"&&self.self===self?self:typeof commonjsGlobal=="object"&&commonjsGlobal.global===commonjsGlobal?commonjsGlobal:void 0,g=m.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),y=m.saveAs||(typeof window!="object"||window!==m?function(){}:"download"in HTMLAnchorElement.prototype&&!g?function(b,x,E){var C=m.URL||m.webkitURL,S=document.createElement("a");x=x||b.name||"download",S.download=x,S.rel="noopener",typeof b=="string"?(S.href=b,S.origin===location.origin?d(S):o(S.href)?s(b,x,E):d(S,S.target="_blank")):(S.href=C.createObjectURL(b),setTimeout(function(){C.revokeObjectURL(S.href)},4e4),setTimeout(function(){d(S)},0))}:"msSaveOrOpenBlob"in navigator?function(b,x,E){if(x=x||b.name||"download",typeof b!="string")navigator.msSaveOrOpenBlob(r(b,E),x);else if(o(b))s(b,x,E);else{var C=document.createElement("a");C.href=b,C.target="_blank",setTimeout(function(){d(C)})}}:function(b,x,E,C){if(C=C||open("","_blank"),C&&(C.document.title=C.document.body.innerText="downloading..."),typeof b=="string")return s(b,x,E);var S=b.type==="application/octet-stream",A=/constructor/i.test(m.HTMLElement)||m.safari,N=/CriOS\/[\d]+/.test(navigator.userAgent);if((N||S&&A||g)&&typeof FileReader<"u"){var k=new FileReader;k.onloadend=function(){var M=k.result;M=N?M:M.replace(/^data:[^;]*;/,"data:attachment/file;"),C?C.location.href=M:location=M,C=null},k.readAsDataURL(b)}else{var L=m.URL||m.webkitURL,G=L.createObjectURL(b);C?C.location=G:location.href=G,C=null,setTimeout(function(){L.revokeObjectURL(G)},4e4)}});m.saveAs=y.saveAs=y,e.exports=y})})(FileSaver_min$1)),FileSaver_min$1.exports}var FileSaver_minExports=requireFileSaver_min();const FileSaver=getDefaultExportFromCjs$1(FileSaver_minExports),geoJSON$2=new GeoJSON,drawSaveBundle={name:"drawSave",getReducer:()=>{const e={points:null,lines:null,polygons:null,isSaving:!1,shouldSave:!1,lastDownload:null,shouldInitialize:!1};return(t=e,{type:r,payload:s})=>{switch(r){case"DRAW_SAVE_START":case"DRAW_SAVE_COMPLETE":case"DRAW_CACHE_START":case"DRAW_CACHE_COMPLETE":case"DRAW_DOWNLOAD_COMPLETE":case"DRAW_SAVE_INITIALIZE_START":case"DRAW_SAVE_INITIALIZE_FINISHED":return Object.assign({},t,s);case"MAP_INITIALIZED":return Object.assign({},t,{shouldInitialize:!0});default:return t}}},doDrawSaveInitialize:()=>({dispatch:e})=>{e({type:"DRAW_SAVE_INITIALIZE_FINISHED",payload:{shouldInitialize:!1}})},doDrawSave:()=>({dispatch:e,store:t})=>{e({type:"DRAW_SAVE_START",payload:{isSaving:!0,shouldSave:!1}});const r=t.selectDrawPointsLayer(),s=t.selectDrawLinesLayer(),o=t.selectDrawPolygonsLayer(),d=geoJSON$2.writeFeatures(r.getSource().getFeatures(),{featureProjection:t.selectMapProjection(),dataProjection:t.selectGeoProjection()}),m=geoJSON$2.writeFeatures(s.getSource().getFeatures(),{featureProjection:t.selectMapProjection(),dataProjection:t.selectGeoProjection()}),g=geoJSON$2.writeFeatures(o.getSource().getFeatures(),{featureProjection:t.selectMapProjection(),dataProjection:t.selectGeoProjection()});e({type:"DRAW_SAVE_COMPLETE",payload:{isSaving:!1,points:d,lines:m,polygons:g}})},doDrawSaveDownload:()=>({dispatch:e,store:t})=>{const r=t.selectDrawSaveCachePointHasFeatures(),s=t.selectDrawSaveCacheLineStringHasFeatures(),o=t.selectDrawSaveCachePolygonHasFeatures(),d=new Date().toISOString(),m=t.selectDrawSaveCache();if(!Blob)return null;if(r){const g=new Blob([m.points],{type:"text/plain;charset=utf-8"});FileSaver.saveAs(g,`corpsmap-points-${d}.geojson`)}if(s){const g=new Blob([m.lines],{type:"text/plain;charset=utf-8"});FileSaver.saveAs(g,`corpsmap-lines-${d}.geojson`)}if(o){const g=new Blob([m.polygons],{type:"text/plain;charset=utf-8"});FileSaver.saveAs(g,`corpsmap-polygons-${d}.geojson`)}e({type:"DRAW_DOWNLOAD_COMPLETE",payload:{lastDownload:d}})},selectDrawSaveLastDownload:e=>e.drawSave.lastDownload,selectDrawSaveAll:e=>e.drawSave,selectDrawSavePostAttempts:e=>e.drawSave.postAttempts,selectDrawSaveCache:e=>({points:e.drawSave.points,lines:e.drawSave.lines,polygons:e.drawSave.polygons}),selectDrawSaveCachePoint:e=>JSON.parse(e.drawSave.points),selectDrawSaveCachePointHasFeatures:reduxBundler.createSelector("selectDrawSaveCachePoint",e=>!!(e&&e.features&&e.features.length)),selectDrawSaveCacheLineString:e=>JSON.parse(e.drawSave.lines),selectDrawSaveCacheLineStringHasFeatures:reduxBundler.createSelector("selectDrawSaveCacheLineString",e=>!!(e&&e.features&&e.features.length)),selectDrawSaveCachePolygon:e=>JSON.parse(e.drawSave.polygons),selectDrawSaveCachePolygonHasFeatures:reduxBundler.createSelector("selectDrawSaveCachePolygon",e=>!!(e&&e.features&&e.features.length)),reactDrawSaveShouldSave:e=>{if(e.drawSave.shouldSave)return{actionCreator:"doDrawSave"}},reactDrawSaveShouldInitialize:e=>{if(e.drawSave.shouldInitialize)return{actionCreator:"doDrawSaveInitialize"}},persistActions:["DRAW_SAVE_COMPLETE"]},plugin$j={pluginName:"Draw Tools",enabled:!0,bundle:[createDrawBundle({name:"drawPoints",type:"Point"}),createDrawBundle({name:"drawLines",type:"LineString"}),createDrawBundle({name:"drawPolygons",type:"Polygon"}),drawLabelBundle,drawModifyBundle,drawSaveBundle],components:[{component:DrawButton,region:"basic-toolbar",sortOrder:80}]};let SearchBar$1=class extends React.Component{constructor(t){super(t),this.state={selectedIdx:null,currentVal:""},this.handleChange=this.handleChange.bind(this),this.fireSearch=this.fireSearch.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this),this.handleItemClick=this.handleItemClick.bind(this),this.debouncedSearch=_.debounce(this.fireSearch,200)}handleItemClick(t){const{doSearchSelectItem:r}=this.props;r(t),this.handleChange("")}handleChange(t){const{doSearchSetQuery:r}=this.props;if(this.setState({selectedIdx:null,currentVal:t}),r(t),t.length<3)return null;this.debouncedSearch()}fireSearch(){const{doSearchShouldFire:t}=this.props;t(this.state.currentVal)}handleKeyUp(t){const{searchResults:r}=this.props;let{selectedIdx:s}=this.state;switch(t.keyCode){case 40:s===null?s=0:s<r.length-1&&s++,this.setState({selectedIdx:s});break;case 38:s>0&&s--,this.setState({selectedIdx:s});break;case 13:s!==null&&this.handleItemClick(r[s]);break}}render(){const{selectedIdx:t,currentVal:r}=this.state,{theme:s,searchResults:o,searchQueryString:d}=this.props,m=[];let g=r<2?m:o;const y=classnames({[s]:!0,"cm-btn-group":!0});return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:y,style:{width:"250px",position:"relative",paddingLeft:"10px",paddingRight:"10px"},children:jsxRuntime.jsx(SearchInput,{inline:!0,onKeyUp:this.handleKeyUp,onUpdate:this.handleChange,filterString:d,placeholder:"Location Search..."})}),jsxRuntime.jsx(SearchResultsList,{ref:b=>{this.searchResultsList=b},onItemClick:this.handleItemClick,items:g,selectedIdx:t})]})}};const SearchBar=connect("doSearchSelectItem","doSearchShouldFire","doSearchSetQuery","selectTheme","selectSearchQueryString","selectSearchResults",SearchBar$1),Overlay=e=>{const{item:t,onClear:r,overlay:s}=e;return jsxRuntime.jsxs("div",{className:"panel panel-default top clearfix",style:{marginBottom:0},children:[jsxRuntime.jsx("div",{className:"pull-right",children:jsxRuntime.jsx("i",{style:{cursor:"pointer"},title:"Clear",className:"mdi mdi-close",onClick:o=>r(o,s)})}),jsxRuntime.jsx("div",{className:"arrow"}),jsxRuntime.jsx("div",{className:"panel-body",children:jsxRuntime.jsx("div",{style:{minWidth:"125px",maxWidth:"300px",textAlign:"center"},children:t.displayName})})]})},zoomScales={region:8,postcode:11,district:11,place:12,locality:12,neighborhood:14,address:19,poi:19,"poi.landmark":19},bundle$f={name:"geocoder",getReducer(){const e={shouldRegister:!0,shouldHandleSelect:!1,selectedItem:null};return(t=e,{type:r,payload:s})=>{switch(r){case"SEARCH_ITEM_SELECTED":return s.selected.provider&&s.selected.provider==="geocoder"?Object.assign({},t,{shouldHandleSelect:!0,selectedItem:s.selected}):t;case"GEOCODER_REGISTERED":case"GEOCODER_HANDLED_SELECT":case"GEOCODER_OVERLAY_RENDERED":case"GEOCODER_OVERLAY_REMOVED":return Object.assign({},t,s);default:return t}}},doGeocoderRegister:()=>({dispatch:e,store:t})=>{e({type:"GEOCODER_REGISTERED",payload:{shouldRegister:!1}}),t.doSearchAddCollection({onFireSearch:t.doGeocoderFireSearch})},doGeocoderHandleSelect:()=>({dispatch:e,store:t})=>{e({type:"GEOCODER_HANDLED_SELECT",payload:{shouldHandleSelect:!1}});const r=t.selectGeocoderLastSelected(),s=t.selectMap();if(r){const o=document.createElement("div"),d=new Overlay$1({element:o,positioning:"bottom-center",offset:[0,-10]}),m=t.selectDisplayProjection(),g=proj.transform(r.center,m,"EPSG:3857");s.addOverlay(d),ReactDOM.render(jsxRuntime.jsx(Overlay,{overlay:d,item:r,map:s,onClear:t.doClearGeocoderOverlay}),o),d.setPosition(g),t.doSetView({center:r.center,zoom:r.zoom})}},doClearGeocoderOverlay:(e,t)=>({store:r})=>{e.preventDefault(),e.stopPropagation();const s=r.selectMap();t.setPosition(void 0);const o=t.getElement();o.parentNode.removeChild(o),s.removeOverlay(t)},doGeocoderFireSearch:e=>({dispatch:t,store:r,apiGet:s})=>{const o=window.LIMIT_GEOCODER_COUNTRIES;let d=r.selectSearchQueryString();const m=r.selectMapProjection(),g=r.selectGeoProjection();let y=proj.transform(r.selectViewCenter(),m,g),b=r.selectDefaultConfig().mapboxToken;d.length<2||(d=encodeURIComponent(d),s(`https://api.mapbox.com/geocoding/v5/mapbox.places/${d}.json?proximity=${y.toString()}${o&&o.length?`&country=${o.join(",")}`:""}&access_token=${b}`,(x,E,C)=>{if(x)return e(x);const S=JSON.parse(C);return e(null,S.features.map(A=>{let N="mdi mdi-map-marker";const k=zoomScales[A.place_type[0]]||11;return{provider:"geocoder",displayName:A.place_name,place_type:A.place_type,iconClass:N,center:A.center,zoom:k,geometry:A.geometry,properties:A.properties}}))}))},selectGeocoderLastSelected:e=>e.geocoder.selectedItem,reactGeocoderShouldHandleSelect:e=>{if(e.geocoder.shouldHandleSelect)return{actionCreator:"doGeocoderHandleSelect"}},reactGeocoderShouldRegister:e=>{if(e.geocoder.shouldRegister)return{actionCreator:"doGeocoderRegister"}}},plugin$i={pluginName:"Geocoder",enabled:!0,bundle:bundle$f,components:[{component:SearchBar,region:"basic-toolbar",sortOrder:100}]},epsilon=11102230246251565e-32,splitter=134217729,resulterrbound=(3+8*epsilon)*epsilon;function sum$1(e,t,r,s,o){let d,m,g,y,b=t[0],x=s[0],E=0,C=0;x>b==x>-b?(d=b,b=t[++E]):(d=x,x=s[++C]);let S=0;if(E<e&&C<r)for(x>b==x>-b?(m=b+d,g=d-(m-b),b=t[++E]):(m=x+d,g=d-(m-x),x=s[++C]),d=m,g!==0&&(o[S++]=g);E<e&&C<r;)x>b==x>-b?(m=d+b,y=m-d,g=d-(m-y)+(b-y),b=t[++E]):(m=d+x,y=m-d,g=d-(m-y)+(x-y),x=s[++C]),d=m,g!==0&&(o[S++]=g);for(;E<e;)m=d+b,y=m-d,g=d-(m-y)+(b-y),b=t[++E],d=m,g!==0&&(o[S++]=g);for(;C<r;)m=d+x,y=m-d,g=d-(m-y)+(x-y),x=s[++C],d=m,g!==0&&(o[S++]=g);return(d!==0||S===0)&&(o[S++]=d),S}function estimate(e,t){let r=t[0];for(let s=1;s<e;s++)r+=t[s];return r}function vec(e){return new Float64Array(e)}const ccwerrboundA=(3+16*epsilon)*epsilon,ccwerrboundB=(2+12*epsilon)*epsilon,ccwerrboundC=(9+64*epsilon)*epsilon*epsilon,B=vec(4),C1=vec(8),C2=vec(12),D=vec(16),u=vec(4);function orient2dadapt(e,t,r,s,o,d,m){let g,y,b,x,E,C,S,A,N,k,L,G,M,z,V,Y,X,Q;const $=e-o,K=r-o,ee=t-d,se=s-d;z=$*se,C=splitter*$,S=C-(C-$),A=$-S,C=splitter*se,N=C-(C-se),k=se-N,V=A*k-(z-S*N-A*N-S*k),Y=ee*K,C=splitter*ee,S=C-(C-ee),A=ee-S,C=splitter*K,N=C-(C-K),k=K-N,X=A*k-(Y-S*N-A*N-S*k),L=V-X,E=V-L,B[0]=V-(L+E)+(E-X),G=z+L,E=G-z,M=z-(G-E)+(L-E),L=M-Y,E=M-L,B[1]=M-(L+E)+(E-Y),Q=G+L,E=Q-G,B[2]=G-(Q-E)+(L-E),B[3]=Q;let ie=estimate(4,B),te=ccwerrboundB*m;if(ie>=te||-ie>=te||(E=e-$,g=e-($+E)+(E-o),E=r-K,b=r-(K+E)+(E-o),E=t-ee,y=t-(ee+E)+(E-d),E=s-se,x=s-(se+E)+(E-d),g===0&&y===0&&b===0&&x===0)||(te=ccwerrboundC*m+resulterrbound*Math.abs(ie),ie+=$*x+se*g-(ee*b+K*y),ie>=te||-ie>=te))return ie;z=g*se,C=splitter*g,S=C-(C-g),A=g-S,C=splitter*se,N=C-(C-se),k=se-N,V=A*k-(z-S*N-A*N-S*k),Y=y*K,C=splitter*y,S=C-(C-y),A=y-S,C=splitter*K,N=C-(C-K),k=K-N,X=A*k-(Y-S*N-A*N-S*k),L=V-X,E=V-L,u[0]=V-(L+E)+(E-X),G=z+L,E=G-z,M=z-(G-E)+(L-E),L=M-Y,E=M-L,u[1]=M-(L+E)+(E-Y),Q=G+L,E=Q-G,u[2]=G-(Q-E)+(L-E),u[3]=Q;const ue=sum$1(4,B,4,u,C1);z=$*x,C=splitter*$,S=C-(C-$),A=$-S,C=splitter*x,N=C-(C-x),k=x-N,V=A*k-(z-S*N-A*N-S*k),Y=ee*b,C=splitter*ee,S=C-(C-ee),A=ee-S,C=splitter*b,N=C-(C-b),k=b-N,X=A*k-(Y-S*N-A*N-S*k),L=V-X,E=V-L,u[0]=V-(L+E)+(E-X),G=z+L,E=G-z,M=z-(G-E)+(L-E),L=M-Y,E=M-L,u[1]=M-(L+E)+(E-Y),Q=G+L,E=Q-G,u[2]=G-(Q-E)+(L-E),u[3]=Q;const le=sum$1(ue,C1,4,u,C2);z=g*x,C=splitter*g,S=C-(C-g),A=g-S,C=splitter*x,N=C-(C-x),k=x-N,V=A*k-(z-S*N-A*N-S*k),Y=y*b,C=splitter*y,S=C-(C-y),A=y-S,C=splitter*b,N=C-(C-b),k=b-N,X=A*k-(Y-S*N-A*N-S*k),L=V-X,E=V-L,u[0]=V-(L+E)+(E-X),G=z+L,E=G-z,M=z-(G-E)+(L-E),L=M-Y,E=M-L,u[1]=M-(L+E)+(E-Y),Q=G+L,E=Q-G,u[2]=G-(Q-E)+(L-E),u[3]=Q;const fe=sum$1(le,C2,4,u,D);return D[fe-1]}function orient2d(e,t,r,s,o,d){const m=(t-d)*(r-o),g=(e-o)*(s-d),y=m-g,b=Math.abs(m+g);return Math.abs(y)>=ccwerrboundA*b?y:-orient2dadapt(e,t,r,s,o,d,b)}function pointInPolygon(e,t){var r,s,o=0,d,m,g,y,b,x,E,C=e[0],S=e[1],A=t.length;for(r=0;r<A;r++){s=0;var N=t[r],k=N.length-1;if(x=N[0],x[0]!==N[k][0]&&x[1]!==N[k][1])throw new Error("First and last coordinates in a ring must be the same");for(m=x[0]-C,g=x[1]-S,s;s<k;s++){if(E=N[s+1],y=E[0]-C,b=E[1]-S,g===0&&b===0){if(y<=0&&m>=0||m<=0&&y>=0)return 0}else if(b>=0&&g<=0||b<=0&&g>=0){if(d=orient2d(m,y,g,b,0,0),d===0)return 0;(d>0&&b>0&&g<=0||d<0&&b<=0&&g>0)&&o++}x=E,g=b,m=y}}return o%2!==0}function getCoord(e){if(!e)throw new Error("coord is required");if(!Array.isArray(e)){if(e.type==="Feature"&&e.geometry!==null&&e.geometry.type==="Point")return[...e.geometry.coordinates];if(e.type==="Point")return[...e.coordinates]}if(Array.isArray(e)&&e.length>=2&&!Array.isArray(e[0])&&!Array.isArray(e[1]))return[...e];throw new Error("coord must be GeoJSON Point or an Array of numbers")}function getGeom(e){return e.type==="Feature"?e.geometry:e}function booleanPointInPolygon(e,t,r={}){if(!e)throw new Error("point is required");if(!t)throw new Error("polygon is required");const s=getCoord(e),o=getGeom(t),d=o.type,m=t.bbox;let g=o.coordinates;if(m&&inBBox(s,m)===!1)return!1;d==="Polygon"&&(g=[g]);let y=!1;for(var b=0;b<g.length;++b){const x=pointInPolygon(s,g[b]);if(x===0)return!r.ignoreBoundary;x&&(y=!0)}return y}function inBBox(e,t){return t[0]<=e[0]&&t[1]<=e[1]&&t[2]>=e[0]&&t[3]>=e[1]}class TinyQueue{constructor(t=[],r=defaultCompare){if(this.data=t,this.length=this.data.length,this.compare=r,this.length>0)for(let s=(this.length>>1)-1;s>=0;s--)this._down(s)}push(t){this.data.push(t),this.length++,this._up(this.length-1)}pop(){if(this.length===0)return;const t=this.data[0],r=this.data.pop();return this.length--,this.length>0&&(this.data[0]=r,this._down(0)),t}peek(){return this.data[0]}_up(t){const{data:r,compare:s}=this,o=r[t];for(;t>0;){const d=t-1>>1,m=r[d];if(s(o,m)>=0)break;r[t]=m,t=d}r[t]=o}_down(t){const{data:r,compare:s}=this,o=this.length>>1,d=r[t];for(;t<o;){let m=(t<<1)+1,g=r[m];const y=m+1;if(y<this.length&&s(r[y],g)<0&&(m=y,g=r[y]),s(g,d)>=0)break;r[t]=g,t=m}r[t]=d}}function defaultCompare(e,t){return e<t?-1:e>t?1:0}function checkWhichEventIsLeft(e,t){return e.p.x>t.p.x?1:e.p.x<t.p.x?-1:e.p.y!==t.p.y?e.p.y>t.p.y?1:-1:1}function checkWhichSegmentHasRightEndpointFirst(e,t){return e.rightSweepEvent.p.x>t.rightSweepEvent.p.x?1:e.rightSweepEvent.p.x<t.rightSweepEvent.p.x?-1:e.rightSweepEvent.p.y!==t.rightSweepEvent.p.y?e.rightSweepEvent.p.y<t.rightSweepEvent.p.y?1:-1:1}class Event{constructor(t,r,s,o){this.p={x:t[0],y:t[1]},this.featureId=r,this.ringId=s,this.eventId=o,this.otherEvent=null,this.isLeftEndpoint=null}isSamePoint(t){return this.p.x===t.p.x&&this.p.y===t.p.y}}function fillEventQueue(e,t){if(e.type==="FeatureCollection"){const r=e.features;for(let s=0;s<r.length;s++)processFeature(r[s],t)}else processFeature(e,t)}let featureId=0,ringId=0,eventId=0;function processFeature(e,t){const r=e.type==="Feature"?e.geometry:e;let s=r.coordinates;(r.type==="Polygon"||r.type==="MultiLineString")&&(s=[s]),r.type==="LineString"&&(s=[[s]]);for(let o=0;o<s.length;o++)for(let d=0;d<s[o].length;d++){let m=s[o][d][0],g=null;ringId=ringId+1;for(let y=0;y<s[o][d].length-1;y++){g=s[o][d][y+1];const b=new Event(m,featureId,ringId,eventId),x=new Event(g,featureId,ringId,eventId+1);b.otherEvent=x,x.otherEvent=b,checkWhichEventIsLeft(b,x)>0?(x.isLeftEndpoint=!0,b.isLeftEndpoint=!1):(b.isLeftEndpoint=!0,x.isLeftEndpoint=!1),t.push(b),t.push(x),m=g,eventId=eventId+1}}featureId=featureId+1}class Segment{constructor(t){this.leftSweepEvent=t,this.rightSweepEvent=t.otherEvent}}function testSegmentIntersect(e,t){if(e===null||t===null||e.leftSweepEvent.ringId===t.leftSweepEvent.ringId&&(e.rightSweepEvent.isSamePoint(t.leftSweepEvent)||e.rightSweepEvent.isSamePoint(t.leftSweepEvent)||e.rightSweepEvent.isSamePoint(t.rightSweepEvent)||e.leftSweepEvent.isSamePoint(t.leftSweepEvent)||e.leftSweepEvent.isSamePoint(t.rightSweepEvent)))return!1;const r=e.leftSweepEvent.p.x,s=e.leftSweepEvent.p.y,o=e.rightSweepEvent.p.x,d=e.rightSweepEvent.p.y,m=t.leftSweepEvent.p.x,g=t.leftSweepEvent.p.y,y=t.rightSweepEvent.p.x,b=t.rightSweepEvent.p.y,x=(b-g)*(o-r)-(y-m)*(d-s),E=(y-m)*(s-g)-(b-g)*(r-m),C=(o-r)*(s-g)-(d-s)*(r-m);if(x===0)return!1;const S=E/x,A=C/x;if(S>=0&&S<=1&&A>=0&&A<=1){const N=r+S*(o-r),k=s+S*(d-s);return[N,k]}return!1}function runCheck(e,t){t=t||!1;const r=[],s=new TinyQueue([],checkWhichSegmentHasRightEndpointFirst);for(;e.length;){const o=e.pop();if(o.isLeftEndpoint){const d=new Segment(o);for(let m=0;m<s.data.length;m++){const g=s.data[m];if(t&&g.leftSweepEvent.featureId===o.featureId)continue;const y=testSegmentIntersect(d,g);y!==!1&&r.push(y)}s.push(d)}else o.isLeftEndpoint===!1&&s.pop()}return r}function sweeplineIntersections$1(e,t){const r=new TinyQueue([],checkWhichEventIsLeft);return fillEventQueue(e,r),runCheck(r,t)}var sweeplineIntersections=sweeplineIntersections$1;function lineIntersect(e,t,r={}){const{removeDuplicates:s=!0,ignoreSelfIntersections:o=!0}=r;let d=[];e.type==="FeatureCollection"?d=d.concat(e.features):e.type==="Feature"?d.push(e):(e.type==="LineString"||e.type==="Polygon"||e.type==="MultiLineString"||e.type==="MultiPolygon")&&d.push(feature(e)),t.type==="FeatureCollection"?d=d.concat(t.features):t.type==="Feature"?d.push(t):(t.type==="LineString"||t.type==="Polygon"||t.type==="MultiLineString"||t.type==="MultiPolygon")&&d.push(feature(t));const m=sweeplineIntersections(featureCollection(d),o);let g=[];if(s){const y={};m.forEach(b=>{const x=b.join(",");y[x]||(y[x]=!0,g.push(b))})}else g=m;return featureCollection(g.map(y=>point(y)))}function polygonToLine(e,t={}){const r=getGeom(e);switch(!t.properties&&e.type==="Feature"&&(t.properties=e.properties),r.type){case"Polygon":return singlePolygonToLine(r,t);case"MultiPolygon":return multiPolygonToLine(r,t);default:throw new Error("invalid poly")}}function singlePolygonToLine(e,t={}){const s=getGeom(e).coordinates,o=t.properties?t.properties:e.type==="Feature"?e.properties:{};return coordsToLine(s,o)}function multiPolygonToLine(e,t={}){const s=getGeom(e).coordinates,o=t.properties?t.properties:e.type==="Feature"?e.properties:{},d=[];return s.forEach(m=>{d.push(coordsToLine(m,o))}),featureCollection(d)}function coordsToLine(e,t){return e.length>1?multiLineString(e,t):lineString(e[0],t)}function booleanDisjoint(e,t,{ignoreSelfIntersections:r=!0}={ignoreSelfIntersections:!0}){let s=!0;return flattenEach(e,o=>{flattenEach(t,d=>{if(s===!1)return!1;s=disjoint(o.geometry,d.geometry,r)})}),s}function disjoint(e,t,r){switch(e.type){case"Point":switch(t.type){case"Point":return!compareCoords(e.coordinates,t.coordinates);case"LineString":return!isPointOnLine(t,e);case"Polygon":return!booleanPointInPolygon(e,t)}break;case"LineString":switch(t.type){case"Point":return!isPointOnLine(e,t);case"LineString":return!isLineOnLine(e,t,r);case"Polygon":return!isLineInPoly(t,e,r)}break;case"Polygon":switch(t.type){case"Point":return!booleanPointInPolygon(t,e);case"LineString":return!isLineInPoly(e,t,r);case"Polygon":return!isPolyInPoly(t,e,r)}}return!1}function isPointOnLine(e,t){for(let r=0;r<e.coordinates.length-1;r++)if(isPointOnLineSegment(e.coordinates[r],e.coordinates[r+1],t.coordinates))return!0;return!1}function isLineOnLine(e,t,r){return lineIntersect(e,t,{ignoreSelfIntersections:r}).features.length>0}function isLineInPoly(e,t,r){for(const o of t.coordinates)if(booleanPointInPolygon(o,e))return!0;return lineIntersect(t,polygonToLine(e),{ignoreSelfIntersections:r}).features.length>0}function isPolyInPoly(e,t,r){for(const o of e.coordinates[0])if(booleanPointInPolygon(o,t))return!0;for(const o of t.coordinates[0])if(booleanPointInPolygon(o,e))return!0;return lineIntersect(polygonToLine(e),polygonToLine(t),{ignoreSelfIntersections:r}).features.length>0}function isPointOnLineSegment(e,t,r){const s=r[0]-e[0],o=r[1]-e[1],d=t[0]-e[0],m=t[1]-e[1];return s*m-o*d!==0?!1:Math.abs(d)>=Math.abs(m)?d>0?e[0]<=r[0]&&r[0]<=t[0]:t[0]<=r[0]&&r[0]<=e[0]:m>0?e[1]<=r[1]&&r[1]<=t[1]:t[1]<=r[1]&&r[1]<=e[1]}function compareCoords(e,t){return e[0]===t[0]&&e[1]===t[1]}var index_default=booleanDisjoint,pathBrowserify,hasRequiredPathBrowserify;function requirePathBrowserify(){if(hasRequiredPathBrowserify)return pathBrowserify;hasRequiredPathBrowserify=1;function e(o){if(typeof o!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(o))}function t(o,d){for(var m="",g=0,y=-1,b=0,x,E=0;E<=o.length;++E){if(E<o.length)x=o.charCodeAt(E);else{if(x===47)break;x=47}if(x===47){if(!(y===E-1||b===1))if(y!==E-1&&b===2){if(m.length<2||g!==2||m.charCodeAt(m.length-1)!==46||m.charCodeAt(m.length-2)!==46){if(m.length>2){var C=m.lastIndexOf("/");if(C!==m.length-1){C===-1?(m="",g=0):(m=m.slice(0,C),g=m.length-1-m.lastIndexOf("/")),y=E,b=0;continue}}else if(m.length===2||m.length===1){m="",g=0,y=E,b=0;continue}}d&&(m.length>0?m+="/..":m="..",g=2)}else m.length>0?m+="/"+o.slice(y+1,E):m=o.slice(y+1,E),g=E-y-1;y=E,b=0}else x===46&&b!==-1?++b:b=-1}return m}function r(o,d){var m=d.dir||d.root,g=d.base||(d.name||"")+(d.ext||"");return m?m===d.root?m+g:m+o+g:g}var s={resolve:function(){for(var d="",m=!1,g,y=arguments.length-1;y>=-1&&!m;y--){var b;y>=0?b=arguments[y]:(g===void 0&&(g=process$1.cwd()),b=g),e(b),b.length!==0&&(d=b+"/"+d,m=b.charCodeAt(0)===47)}return d=t(d,!m),m?d.length>0?"/"+d:"/":d.length>0?d:"."},normalize:function(d){if(e(d),d.length===0)return".";var m=d.charCodeAt(0)===47,g=d.charCodeAt(d.length-1)===47;return d=t(d,!m),d.length===0&&!m&&(d="."),d.length>0&&g&&(d+="/"),m?"/"+d:d},isAbsolute:function(d){return e(d),d.length>0&&d.charCodeAt(0)===47},join:function(){if(arguments.length===0)return".";for(var d,m=0;m<arguments.length;++m){var g=arguments[m];e(g),g.length>0&&(d===void 0?d=g:d+="/"+g)}return d===void 0?".":s.normalize(d)},relative:function(d,m){if(e(d),e(m),d===m||(d=s.resolve(d),m=s.resolve(m),d===m))return"";for(var g=1;g<d.length&&d.charCodeAt(g)===47;++g);for(var y=d.length,b=y-g,x=1;x<m.length&&m.charCodeAt(x)===47;++x);for(var E=m.length,C=E-x,S=b<C?b:C,A=-1,N=0;N<=S;++N){if(N===S){if(C>S){if(m.charCodeAt(x+N)===47)return m.slice(x+N+1);if(N===0)return m.slice(x+N)}else b>S&&(d.charCodeAt(g+N)===47?A=N:N===0&&(A=0));break}var k=d.charCodeAt(g+N),L=m.charCodeAt(x+N);if(k!==L)break;k===47&&(A=N)}var G="";for(N=g+A+1;N<=y;++N)(N===y||d.charCodeAt(N)===47)&&(G.length===0?G+="..":G+="/..");return G.length>0?G+m.slice(x+A):(x+=A,m.charCodeAt(x)===47&&++x,m.slice(x))},_makeLong:function(d){return d},dirname:function(d){if(e(d),d.length===0)return".";for(var m=d.charCodeAt(0),g=m===47,y=-1,b=!0,x=d.length-1;x>=1;--x)if(m=d.charCodeAt(x),m===47){if(!b){y=x;break}}else b=!1;return y===-1?g?"/":".":g&&y===1?"//":d.slice(0,y)},basename:function(d,m){if(m!==void 0&&typeof m!="string")throw new TypeError('"ext" argument must be a string');e(d);var g=0,y=-1,b=!0,x;if(m!==void 0&&m.length>0&&m.length<=d.length){if(m.length===d.length&&m===d)return"";var E=m.length-1,C=-1;for(x=d.length-1;x>=0;--x){var S=d.charCodeAt(x);if(S===47){if(!b){g=x+1;break}}else C===-1&&(b=!1,C=x+1),E>=0&&(S===m.charCodeAt(E)?--E===-1&&(y=x):(E=-1,y=C))}return g===y?y=C:y===-1&&(y=d.length),d.slice(g,y)}else{for(x=d.length-1;x>=0;--x)if(d.charCodeAt(x)===47){if(!b){g=x+1;break}}else y===-1&&(b=!1,y=x+1);return y===-1?"":d.slice(g,y)}},extname:function(d){e(d);for(var m=-1,g=0,y=-1,b=!0,x=0,E=d.length-1;E>=0;--E){var C=d.charCodeAt(E);if(C===47){if(!b){g=E+1;break}continue}y===-1&&(b=!1,y=E+1),C===46?m===-1?m=E:x!==1&&(x=1):m!==-1&&(x=-1)}return m===-1||y===-1||x===0||x===1&&m===y-1&&m===g+1?"":d.slice(m,y)},format:function(d){if(d===null||typeof d!="object")throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof d);return r("/",d)},parse:function(d){e(d);var m={root:"",dir:"",base:"",ext:"",name:""};if(d.length===0)return m;var g=d.charCodeAt(0),y=g===47,b;y?(m.root="/",b=1):b=0;for(var x=-1,E=0,C=-1,S=!0,A=d.length-1,N=0;A>=b;--A){if(g=d.charCodeAt(A),g===47){if(!S){E=A+1;break}continue}C===-1&&(S=!1,C=A+1),g===46?x===-1?x=A:N!==1&&(N=1):x!==-1&&(N=-1)}return x===-1||C===-1||N===0||N===1&&x===C-1&&x===E+1?C!==-1&&(E===0&&y?m.base=m.name=d.slice(1,C):m.base=m.name=d.slice(E,C)):(E===0&&y?(m.name=d.slice(1,x),m.base=d.slice(1,C)):(m.name=d.slice(E,x),m.base=d.slice(E,C)),m.ext=d.slice(x,C)),E>0?m.dir=d.slice(0,E-1):y&&(m.dir="/"),m},sep:"/",delimiter:":",win32:null,posix:null};return s.posix=s,pathBrowserify=s,pathBrowserify}requirePathBrowserify();const bundle$e={name:"geojsonIdent",getReducer(){const e={shouldRegister:!1,shouldHandleRemove:!1,removedUid:null,data:{}};return(t=e,{type:r,payload:s})=>{switch(r){case"GEOJSON_IDENT_REGISTERED":case"GEOJSON_IDENT_ADDED_FEATURES":case"GEOJSON_IDENT_REMOVED_FEATURES":case"GEOJSON_IDENT_HANDLED_REMOVE":return Object.assign({},t,s);case"LAYER_REMOVED":return Object.assign({},t,{removedUid:s.uid,shouldHandleRemove:!0});default:return t}}},doGeojsonIdentRegister:()=>({dispatch:e,store:t})=>{e({type:"GEOJSON_IDENT_REGISTERED",payload:{shouldRegister:!1}}),t.doIdentifyAddCollection({onIdentify:t.doGeojsonIdentFire})},doGeojsonIdentRemoveFeatures:e=>({dispatch:t,store:r})=>{t({type:"GEOJSON_IDENT_HANDLED_REMOVE",payload:{shouldHandleRemove:!1}});const s=r.selectGeojsonRemovedUid(),o=r.selectGeojsonIdentFeatures();delete o[s],t({type:"GEOJSON_IDENT_REMOVED_FEATURES",payload:{data:Object.assign({},o),removedUid:null}})},doGeojsonIdentAddFeatures:(e,t,r)=>({dispatch:s,store:o})=>{const d=o.selectGeojsonIdentFeatures();if(d[e]||(d[e]={features:[],maplayer:null}),t){let m=[];t.length?m=t:t.features?m=t.features:m=[t],d[e].features=[...d[e].features,...m]}r&&(d[e].mapLayer=r),s({type:"GEOJSON_IDENT_ADDED_FEATURES",payload:{data:Object.assign({},d)}})},doGeojsonIdentFire:e=>({dispatch:t,store:r})=>{const s=r.selectIdentifyCoordinates(),o=r.selectResolution(),d=r.selectGeojsonIdentFeatures();let m=null;if(typeof s[0]=="number"){const g=point(s),y=o*5/1e3;m=index_default$1(g,y,{units:"kilometers"})}else m=polygon(s);try{const g=[];Object.keys(d).forEach(y=>{const b=[],x=d[y].features;d[y].mapLayer.getVisible()&&(x.forEach(C=>{index_default(m,C)||b.push(C)}),g.push({dataset:y,err:null,result:{[y]:{type:"FeatureCollection",features:b}}}))}),e(null,g)}catch(g){console.log(g),e(g)}},selectGeojsonIdentFeatures:e=>e.geojsonIdent.data,selectGeojsonRemovedUid:e=>e.geojsonIdent.removedUid,reactGeojsonIdentShouldRegister:e=>{if(e.geojsonIdent.shouldRegister)return{actionCreator:"doGeojsonIdentRegister"}},reactGeojsonIdentShouldHandleRemove:e=>{if(e.geojsonIdent.shouldHandleRemove)return{actionCreator:"doGeojsonIdentRemoveFeatures"}}},plugin$h={pluginName:"Identify GeoJSON",enabled:!0,bundle:bundle$e,components:[]};var _baseSlice,hasRequired_baseSlice;function require_baseSlice(){if(hasRequired_baseSlice)return _baseSlice;hasRequired_baseSlice=1;function e(t,r,s){var o=-1,d=t.length;r<0&&(r=-r>d?0:d+r),s=s>d?d:s,s<0&&(s+=d),d=r>s?0:s-r>>>0,r>>>=0;for(var m=Array(d);++o<d;)m[o]=t[o+r];return m}return _baseSlice=e,_baseSlice}var _castSlice,hasRequired_castSlice;function require_castSlice(){if(hasRequired_castSlice)return _castSlice;hasRequired_castSlice=1;var e=require_baseSlice();function t(r,s,o){var d=r.length;return o=o===void 0?d:o,!s&&o>=d?r:e(r,s,o)}return _castSlice=t,_castSlice}var _hasUnicode,hasRequired_hasUnicode;function require_hasUnicode(){if(hasRequired_hasUnicode)return _hasUnicode;hasRequired_hasUnicode=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",s="\\u20d0-\\u20ff",o=t+r+s,d="\\ufe0e\\ufe0f",m="\\u200d",g=RegExp("["+m+e+o+d+"]");function y(b){return g.test(b)}return _hasUnicode=y,_hasUnicode}var _asciiToArray,hasRequired_asciiToArray;function require_asciiToArray(){if(hasRequired_asciiToArray)return _asciiToArray;hasRequired_asciiToArray=1;function e(t){return t.split("")}return _asciiToArray=e,_asciiToArray}var _unicodeToArray,hasRequired_unicodeToArray;function require_unicodeToArray(){if(hasRequired_unicodeToArray)return _unicodeToArray;hasRequired_unicodeToArray=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",s="\\u20d0-\\u20ff",o=t+r+s,d="\\ufe0e\\ufe0f",m="["+e+"]",g="["+o+"]",y="\\ud83c[\\udffb-\\udfff]",b="(?:"+g+"|"+y+")",x="[^"+e+"]",E="(?:\\ud83c[\\udde6-\\uddff]){2}",C="[\\ud800-\\udbff][\\udc00-\\udfff]",S="\\u200d",A=b+"?",N="["+d+"]?",k="(?:"+S+"(?:"+[x,E,C].join("|")+")"+N+A+")*",L=N+A+k,G="(?:"+[x+g+"?",g,E,C,m].join("|")+")",M=RegExp(y+"(?="+y+")|"+G+L,"g");function z(V){return V.match(M)||[]}return _unicodeToArray=z,_unicodeToArray}var _stringToArray,hasRequired_stringToArray;function require_stringToArray(){if(hasRequired_stringToArray)return _stringToArray;hasRequired_stringToArray=1;var e=require_asciiToArray(),t=require_hasUnicode(),r=require_unicodeToArray();function s(o){return t(o)?r(o):e(o)}return _stringToArray=s,_stringToArray}var _arrayMap,hasRequired_arrayMap;function require_arrayMap(){if(hasRequired_arrayMap)return _arrayMap;hasRequired_arrayMap=1;function e(t,r){for(var s=-1,o=t==null?0:t.length,d=Array(o);++s<o;)d[s]=r(t[s],s,t);return d}return _arrayMap=e,_arrayMap}var _baseToString,hasRequired_baseToString;function require_baseToString(){if(hasRequired_baseToString)return _baseToString;hasRequired_baseToString=1;var e=require_Symbol(),t=require_arrayMap(),r=requireIsArray(),s=requireIsSymbol(),o=e?e.prototype:void 0,d=o?o.toString:void 0;function m(g){if(typeof g=="string")return g;if(r(g))return t(g,m)+"";if(s(g))return d?d.call(g):"";var y=g+"";return y=="0"&&1/g==-1/0?"-0":y}return _baseToString=m,_baseToString}var toString_1,hasRequiredToString;function requireToString(){if(hasRequiredToString)return toString_1;hasRequiredToString=1;var e=require_baseToString();function t(r){return r==null?"":e(r)}return toString_1=t,toString_1}var _createCaseFirst,hasRequired_createCaseFirst;function require_createCaseFirst(){if(hasRequired_createCaseFirst)return _createCaseFirst;hasRequired_createCaseFirst=1;var e=require_castSlice(),t=require_hasUnicode(),r=require_stringToArray(),s=requireToString();function o(d){return function(m){m=s(m);var g=t(m)?r(m):void 0,y=g?g[0]:m.charAt(0),b=g?e(g,1).join(""):m.slice(1);return y[d]()+b}}return _createCaseFirst=o,_createCaseFirst}var upperFirst_1,hasRequiredUpperFirst;function requireUpperFirst(){if(hasRequiredUpperFirst)return upperFirst_1;hasRequiredUpperFirst=1;var e=require_createCaseFirst(),t=e("toUpperCase");return upperFirst_1=t,upperFirst_1}var upperFirstExports=requireUpperFirst();const upperFirst=getDefaultExportFromCjs$1(upperFirstExports),IdentifyBufferSection$1=e=>{const{theme:t,identifySelectBy:r,identifyBufferUnit:s,identifyBufferValue:o,doShowBufferUnits:d,doUpdateIdentifyBuffer:m}=e;return jsxRuntime.jsx("li",{className:`${t}`,id:"cm-identify-buffer-section",children:jsxRuntime.jsxs("div",{className:"text-center",children:[jsxRuntime.jsx("div",{id:"cm-identify-buffer-title",children:`Buffer ${upperFirst(r)} By:`}),jsxRuntime.jsxs("form",{className:"cm-form-inline",children:[jsxRuntime.jsx("input",{className:"cm-form-control",id:"cm-identify-buffer-input",type:"number",value:o,name:"identify-buffer",title:"Identify Buffer Input",onChange:m,onKeyPress:g=>{g.key==="Enter"&&g.preventDefault()}}),jsxRuntime.jsx("span",{id:"cm-identify-buffer-units",children:`${s}`}),jsxRuntime.jsx("i",{className:"mdi mdi-settings pointer",title:"Identify Buffer Units",onClick:d})]})]})})},IdentifyBufferSection=connect("selectTheme","selectIdentifySelectBy","selectIdentifyBufferUnit","selectIdentifyBufferValue","doShowBufferUnits","doUpdateIdentifyBuffer",IdentifyBufferSection$1),IdentifyButton$1=e=>{const{doStartIdentify:t,doPauseIdentify:r,doStopIdentify:s,doSetDisplayAs:o,identifySelectBy:d,identifyDisplayAs:m}=e;return jsxRuntime.jsx(BasicToolbarButton,{enabled:!0,iconClass:"ms ms-information",title:"Identify",onDeactivate:r,children:jsxRuntime.jsxs(BasicToolbarMenu,{children:[jsxRuntime.jsx(BasicToolbarMenuItem,{active:d==="point",onClick:t,iconClass:"ms ms-identify icon-inline",title:"Identify by Point",text:"Identify by Point",passProps:{"data-selectby":"point"}}),jsxRuntime.jsx(BasicToolbarMenuItem,{active:d==="polygon",onClick:t,iconClass:"ms ms-identify-box icon-inline",title:"Identify by Polygon",text:"Identify by Polygon",passProps:{"data-selectby":"polygon"}}),d?jsxRuntime.jsx(IdentifyBufferSection,{}):null,jsxRuntime.jsx(BasicToolbarMenuDivider,{}),jsxRuntime.jsx(BasicToolbarMenuItem,{active:!1,onClick:s,iconClass:"mdi mdi-close icon-inline",title:"Clear All",text:"Clear All"}),jsxRuntime.jsx(BasicToolbarMenuItem,{active:!1,iconClass:"mdi mdi-tune icon-inline",title:"Display Format",text:"Display Format",children:jsxRuntime.jsxs(BasicToolbarSubmenu,{children:[jsxRuntime.jsx(BasicToolbarMenuItem,{active:m==="popup",onClick:o,iconClass:"mdi mdi-message-outline icon-inline",title:"Display as Popups",text:"Display as Popups",passProps:{"data-displayas":"popup"}}),jsxRuntime.jsx(BasicToolbarMenuItem,{active:m==="sidebar",onClick:o,iconClass:"mdi mdi-format-list-bulleted icon-inline",title:"Display in Sidebar List",text:"Display in Sidebar List",passProps:{"data-displayas":"sidebar"}}),jsxRuntime.jsx(BasicToolbarMenuItem,{disabled:!1,active:m==="table",onClick:o,iconClass:"ms ms-table icon-inline",title:"Display in Attribute Table",text:"Display in Attribute Table",passProps:{"data-displayas":"table"}})]})})]})})},IdentifyButton=connect("doStartIdentify","doPauseIdentify","doStopIdentify","doSetDisplayAs","selectIdentifyDisplayAs","selectIdentifySelectBy",IdentifyButton$1),require$$0=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","link","main","map","mark","math","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rb","rp","rt","rtc","ruby","s","samp","script","search","section","select","slot","small","source","span","strong","style","sub","summary","sup","svg","table","tbody","td","template","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr"];var htmlTags$1,hasRequiredHtmlTags;function requireHtmlTags(){return hasRequiredHtmlTags||(hasRequiredHtmlTags=1,htmlTags$1=require$$0),htmlTags$1}var htmlTagsExports=requireHtmlTags();const htmlTags=getDefaultExportFromCjs$1(htmlTagsExports),basic=/\s?<!doctype html>|<html\b[^>]*>|<body\b[^>]*>|<x-[^>]+>/i,sortedTags=[...htmlTags].sort((e,t)=>e.length-t.length),full=new RegExp(sortedTags.map(e=>`<${e}\\b[^>]*>`).join("|"),"i");function isHtml(e){return e=e.trim().slice(0,1e3),e.includes("\0")||!e.includes("<")?!1:basic.test(e)||full.test(e)}const style$2=new style$3.Style({fill:new style$3.Fill({color:"rgba(84, 240, 240, 0.6)"}),stroke:new style$3.Stroke({color:"rgb(84, 240, 240)",width:1}),image:new style$3.Circle({radius:8,stroke:new style$3.Stroke({color:"rgb(84, 240, 240)"}),fill:new style$3.Fill({color:"rgba(84, 240, 240, 0.6)"})})});class ResultListItem extends React.Component{constructor(t){super(t);const r=t.feature.geometry.type;this.layer=getLayer({serviceType:"LocalVector",visible:!0,geometryType:r,style:style$2,zIndex:1e3});const s=new GeoJSON().readFeatures(t.feature,{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"});this.layer.getSource().addFeatures(s),this.handleClick=this.handleClick.bind(this),this.handleMouseOut=this.handleMouseOut.bind(this),this.handleMouseOver=this.handleMouseOver.bind(this)}componentWillUnmount(){const{map:t}=this.props;t.removeLayer(this.layer)}handleClick(){const{doOpenIdentifyDetails:t,feature:r}=this.props;t(r,this.layer)}handleMouseOver(){const{map:t}=this.props;t.addLayer(this.layer)}handleMouseOut(){const{map:t}=this.props;t.removeLayer(this.layer)}render(){const{feature:t}=this.props,r=Object.keys(t.properties)[0]||"No Properties",s=t.properties[r];return jsxRuntime.jsx("li",{onClick:this.handleClick,onMouseOver:this.handleMouseOver,onMouseOut:this.handleMouseOut,className:"cm-list-group-item pointer overflow-ellipsis",style:{margin:"3px",padding:"2px",cursor:"pointer"},title:"View More",children:jsxRuntime.jsxs("p",{children:[jsxRuntime.jsx("span",{className:"col-sm-2",children:jsxRuntime.jsx("i",{className:"mdi mdi-plus icon-inline"})}),jsxRuntime.jsx("span",{className:"col-sm-4 overflow-sidebar-identify",children:r}),isHtml(s)?jsxRuntime.jsx("span",{className:"col-sm-6",dangerouslySetInnerHTML:{__html:s}}):jsxRuntime.jsx("span",{className:"col-sm-6",children:s})]})})}}const IdentifySidebarListItem=connect("selectMap","doOpenIdentifyDetails",ResultListItem);class IdentifySidebarList extends React.Component{constructor(t){super(t),this.state={expanded:!0},this.toggleExpanded=this.toggleExpanded.bind(this),this.renderList=this.renderList.bind(this)}toggleExpanded(t){this.setState({expanded:!this.state.expanded})}renderList(t){const{expanded:r}=this.state;return r?t.length?jsxRuntime.jsx("ul",{className:"cm-list-group",children:t.map((s,o)=>jsxRuntime.jsx(IdentifySidebarListItem,{feature:s},o))}):jsxRuntime.jsx("div",{children:"No features at this location"}):null}render(){const{expanded:t}=this.state,{displayName:r,features:s}=this.props,o=classnames({mdi:!0,"mdi-menu-right":!t,"mdi-menu-down":t,"icon-inline":!0});return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("p",{onClick:this.toggleExpanded,className:"overflow-ellipsis",style:{cursor:"pointer",whiteSpace:"nowrap"},children:[jsxRuntime.jsx("i",{className:o}),jsxRuntime.jsx("strong",{children:r})]}),this.renderList(s)]})}}var _listCacheClear,hasRequired_listCacheClear;function require_listCacheClear(){if(hasRequired_listCacheClear)return _listCacheClear;hasRequired_listCacheClear=1;function e(){this.__data__=[],this.size=0}return _listCacheClear=e,_listCacheClear}var eq_1,hasRequiredEq;function requireEq(){if(hasRequiredEq)return eq_1;hasRequiredEq=1;function e(t,r){return t===r||t!==t&&r!==r}return eq_1=e,eq_1}var _assocIndexOf,hasRequired_assocIndexOf;function require_assocIndexOf(){if(hasRequired_assocIndexOf)return _assocIndexOf;hasRequired_assocIndexOf=1;var e=requireEq();function t(r,s){for(var o=r.length;o--;)if(e(r[o][0],s))return o;return-1}return _assocIndexOf=t,_assocIndexOf}var _listCacheDelete,hasRequired_listCacheDelete;function require_listCacheDelete(){if(hasRequired_listCacheDelete)return _listCacheDelete;hasRequired_listCacheDelete=1;var e=require_assocIndexOf(),t=Array.prototype,r=t.splice;function s(o){var d=this.__data__,m=e(d,o);if(m<0)return!1;var g=d.length-1;return m==g?d.pop():r.call(d,m,1),--this.size,!0}return _listCacheDelete=s,_listCacheDelete}var _listCacheGet,hasRequired_listCacheGet;function require_listCacheGet(){if(hasRequired_listCacheGet)return _listCacheGet;hasRequired_listCacheGet=1;var e=require_assocIndexOf();function t(r){var s=this.__data__,o=e(s,r);return o<0?void 0:s[o][1]}return _listCacheGet=t,_listCacheGet}var _listCacheHas,hasRequired_listCacheHas;function require_listCacheHas(){if(hasRequired_listCacheHas)return _listCacheHas;hasRequired_listCacheHas=1;var e=require_assocIndexOf();function t(r){return e(this.__data__,r)>-1}return _listCacheHas=t,_listCacheHas}var _listCacheSet,hasRequired_listCacheSet;function require_listCacheSet(){if(hasRequired_listCacheSet)return _listCacheSet;hasRequired_listCacheSet=1;var e=require_assocIndexOf();function t(r,s){var o=this.__data__,d=e(o,r);return d<0?(++this.size,o.push([r,s])):o[d][1]=s,this}return _listCacheSet=t,_listCacheSet}var _ListCache,hasRequired_ListCache;function require_ListCache(){if(hasRequired_ListCache)return _ListCache;hasRequired_ListCache=1;var e=require_listCacheClear(),t=require_listCacheDelete(),r=require_listCacheGet(),s=require_listCacheHas(),o=require_listCacheSet();function d(m){var g=-1,y=m==null?0:m.length;for(this.clear();++g<y;){var b=m[g];this.set(b[0],b[1])}}return d.prototype.clear=e,d.prototype.delete=t,d.prototype.get=r,d.prototype.has=s,d.prototype.set=o,_ListCache=d,_ListCache}var _stackClear,hasRequired_stackClear;function require_stackClear(){if(hasRequired_stackClear)return _stackClear;hasRequired_stackClear=1;var e=require_ListCache();function t(){this.__data__=new e,this.size=0}return _stackClear=t,_stackClear}var _stackDelete,hasRequired_stackDelete;function require_stackDelete(){if(hasRequired_stackDelete)return _stackDelete;hasRequired_stackDelete=1;function e(t){var r=this.__data__,s=r.delete(t);return this.size=r.size,s}return _stackDelete=e,_stackDelete}var _stackGet,hasRequired_stackGet;function require_stackGet(){if(hasRequired_stackGet)return _stackGet;hasRequired_stackGet=1;function e(t){return this.__data__.get(t)}return _stackGet=e,_stackGet}var _stackHas,hasRequired_stackHas;function require_stackHas(){if(hasRequired_stackHas)return _stackHas;hasRequired_stackHas=1;function e(t){return this.__data__.has(t)}return _stackHas=e,_stackHas}var isFunction_1,hasRequiredIsFunction;function requireIsFunction(){if(hasRequiredIsFunction)return isFunction_1;hasRequiredIsFunction=1;var e=require_baseGetTag(),t=requireIsObject(),r="[object AsyncFunction]",s="[object Function]",o="[object GeneratorFunction]",d="[object Proxy]";function m(g){if(!t(g))return!1;var y=e(g);return y==s||y==o||y==r||y==d}return isFunction_1=m,isFunction_1}var _coreJsData,hasRequired_coreJsData;function require_coreJsData(){if(hasRequired_coreJsData)return _coreJsData;hasRequired_coreJsData=1;var e=require_root(),t=e["__core-js_shared__"];return _coreJsData=t,_coreJsData}var _isMasked,hasRequired_isMasked;function require_isMasked(){if(hasRequired_isMasked)return _isMasked;hasRequired_isMasked=1;var e=require_coreJsData(),t=(function(){var s=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return s?"Symbol(src)_1."+s:""})();function r(s){return!!t&&t in s}return _isMasked=r,_isMasked}var _toSource,hasRequired_toSource;function require_toSource(){if(hasRequired_toSource)return _toSource;hasRequired_toSource=1;var e=Function.prototype,t=e.toString;function r(s){if(s!=null){try{return t.call(s)}catch{}try{return s+""}catch{}}return""}return _toSource=r,_toSource}var _baseIsNative,hasRequired_baseIsNative;function require_baseIsNative(){if(hasRequired_baseIsNative)return _baseIsNative;hasRequired_baseIsNative=1;var e=requireIsFunction(),t=require_isMasked(),r=requireIsObject(),s=require_toSource(),o=/[\\^$.*+?()[\]{}|]/g,d=/^\[object .+?Constructor\]$/,m=Function.prototype,g=Object.prototype,y=m.toString,b=g.hasOwnProperty,x=RegExp("^"+y.call(b).replace(o,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function E(C){if(!r(C)||t(C))return!1;var S=e(C)?x:d;return S.test(s(C))}return _baseIsNative=E,_baseIsNative}var _getValue,hasRequired_getValue;function require_getValue(){if(hasRequired_getValue)return _getValue;hasRequired_getValue=1;function e(t,r){return t?.[r]}return _getValue=e,_getValue}var _getNative,hasRequired_getNative;function require_getNative(){if(hasRequired_getNative)return _getNative;hasRequired_getNative=1;var e=require_baseIsNative(),t=require_getValue();function r(s,o){var d=t(s,o);return e(d)?d:void 0}return _getNative=r,_getNative}var _Map,hasRequired_Map;function require_Map(){if(hasRequired_Map)return _Map;hasRequired_Map=1;var e=require_getNative(),t=require_root(),r=e(t,"Map");return _Map=r,_Map}var _nativeCreate,hasRequired_nativeCreate;function require_nativeCreate(){if(hasRequired_nativeCreate)return _nativeCreate;hasRequired_nativeCreate=1;var e=require_getNative(),t=e(Object,"create");return _nativeCreate=t,_nativeCreate}var _hashClear,hasRequired_hashClear;function require_hashClear(){if(hasRequired_hashClear)return _hashClear;hasRequired_hashClear=1;var e=require_nativeCreate();function t(){this.__data__=e?e(null):{},this.size=0}return _hashClear=t,_hashClear}var _hashDelete,hasRequired_hashDelete;function require_hashDelete(){if(hasRequired_hashDelete)return _hashDelete;hasRequired_hashDelete=1;function e(t){var r=this.has(t)&&delete this.__data__[t];return this.size-=r?1:0,r}return _hashDelete=e,_hashDelete}var _hashGet,hasRequired_hashGet;function require_hashGet(){if(hasRequired_hashGet)return _hashGet;hasRequired_hashGet=1;var e=require_nativeCreate(),t="__lodash_hash_undefined__",r=Object.prototype,s=r.hasOwnProperty;function o(d){var m=this.__data__;if(e){var g=m[d];return g===t?void 0:g}return s.call(m,d)?m[d]:void 0}return _hashGet=o,_hashGet}var _hashHas,hasRequired_hashHas;function require_hashHas(){if(hasRequired_hashHas)return _hashHas;hasRequired_hashHas=1;var e=require_nativeCreate(),t=Object.prototype,r=t.hasOwnProperty;function s(o){var d=this.__data__;return e?d[o]!==void 0:r.call(d,o)}return _hashHas=s,_hashHas}var _hashSet,hasRequired_hashSet;function require_hashSet(){if(hasRequired_hashSet)return _hashSet;hasRequired_hashSet=1;var e=require_nativeCreate(),t="__lodash_hash_undefined__";function r(s,o){var d=this.__data__;return this.size+=this.has(s)?0:1,d[s]=e&&o===void 0?t:o,this}return _hashSet=r,_hashSet}var _Hash,hasRequired_Hash;function require_Hash(){if(hasRequired_Hash)return _Hash;hasRequired_Hash=1;var e=require_hashClear(),t=require_hashDelete(),r=require_hashGet(),s=require_hashHas(),o=require_hashSet();function d(m){var g=-1,y=m==null?0:m.length;for(this.clear();++g<y;){var b=m[g];this.set(b[0],b[1])}}return d.prototype.clear=e,d.prototype.delete=t,d.prototype.get=r,d.prototype.has=s,d.prototype.set=o,_Hash=d,_Hash}var _mapCacheClear,hasRequired_mapCacheClear;function require_mapCacheClear(){if(hasRequired_mapCacheClear)return _mapCacheClear;hasRequired_mapCacheClear=1;var e=require_Hash(),t=require_ListCache(),r=require_Map();function s(){this.size=0,this.__data__={hash:new e,map:new(r||t),string:new e}}return _mapCacheClear=s,_mapCacheClear}var _isKeyable,hasRequired_isKeyable;function require_isKeyable(){if(hasRequired_isKeyable)return _isKeyable;hasRequired_isKeyable=1;function e(t){var r=typeof t;return r=="string"||r=="number"||r=="symbol"||r=="boolean"?t!=="__proto__":t===null}return _isKeyable=e,_isKeyable}var _getMapData,hasRequired_getMapData;function require_getMapData(){if(hasRequired_getMapData)return _getMapData;hasRequired_getMapData=1;var e=require_isKeyable();function t(r,s){var o=r.__data__;return e(s)?o[typeof s=="string"?"string":"hash"]:o.map}return _getMapData=t,_getMapData}var _mapCacheDelete,hasRequired_mapCacheDelete;function require_mapCacheDelete(){if(hasRequired_mapCacheDelete)return _mapCacheDelete;hasRequired_mapCacheDelete=1;var e=require_getMapData();function t(r){var s=e(this,r).delete(r);return this.size-=s?1:0,s}return _mapCacheDelete=t,_mapCacheDelete}var _mapCacheGet,hasRequired_mapCacheGet;function require_mapCacheGet(){if(hasRequired_mapCacheGet)return _mapCacheGet;hasRequired_mapCacheGet=1;var e=require_getMapData();function t(r){return e(this,r).get(r)}return _mapCacheGet=t,_mapCacheGet}var _mapCacheHas,hasRequired_mapCacheHas;function require_mapCacheHas(){if(hasRequired_mapCacheHas)return _mapCacheHas;hasRequired_mapCacheHas=1;var e=require_getMapData();function t(r){return e(this,r).has(r)}return _mapCacheHas=t,_mapCacheHas}var _mapCacheSet,hasRequired_mapCacheSet;function require_mapCacheSet(){if(hasRequired_mapCacheSet)return _mapCacheSet;hasRequired_mapCacheSet=1;var e=require_getMapData();function t(r,s){var o=e(this,r),d=o.size;return o.set(r,s),this.size+=o.size==d?0:1,this}return _mapCacheSet=t,_mapCacheSet}var _MapCache,hasRequired_MapCache;function require_MapCache(){if(hasRequired_MapCache)return _MapCache;hasRequired_MapCache=1;var e=require_mapCacheClear(),t=require_mapCacheDelete(),r=require_mapCacheGet(),s=require_mapCacheHas(),o=require_mapCacheSet();function d(m){var g=-1,y=m==null?0:m.length;for(this.clear();++g<y;){var b=m[g];this.set(b[0],b[1])}}return d.prototype.clear=e,d.prototype.delete=t,d.prototype.get=r,d.prototype.has=s,d.prototype.set=o,_MapCache=d,_MapCache}var _stackSet,hasRequired_stackSet;function require_stackSet(){if(hasRequired_stackSet)return _stackSet;hasRequired_stackSet=1;var e=require_ListCache(),t=require_Map(),r=require_MapCache(),s=200;function o(d,m){var g=this.__data__;if(g instanceof e){var y=g.__data__;if(!t||y.length<s-1)return y.push([d,m]),this.size=++g.size,this;g=this.__data__=new r(y)}return g.set(d,m),this.size=g.size,this}return _stackSet=o,_stackSet}var _Stack,hasRequired_Stack;function require_Stack(){if(hasRequired_Stack)return _Stack;hasRequired_Stack=1;var e=require_ListCache(),t=require_stackClear(),r=require_stackDelete(),s=require_stackGet(),o=require_stackHas(),d=require_stackSet();function m(g){var y=this.__data__=new e(g);this.size=y.size}return m.prototype.clear=t,m.prototype.delete=r,m.prototype.get=s,m.prototype.has=o,m.prototype.set=d,_Stack=m,_Stack}var _setCacheAdd,hasRequired_setCacheAdd;function require_setCacheAdd(){if(hasRequired_setCacheAdd)return _setCacheAdd;hasRequired_setCacheAdd=1;var e="__lodash_hash_undefined__";function t(r){return this.__data__.set(r,e),this}return _setCacheAdd=t,_setCacheAdd}var _setCacheHas,hasRequired_setCacheHas;function require_setCacheHas(){if(hasRequired_setCacheHas)return _setCacheHas;hasRequired_setCacheHas=1;function e(t){return this.__data__.has(t)}return _setCacheHas=e,_setCacheHas}var _SetCache,hasRequired_SetCache;function require_SetCache(){if(hasRequired_SetCache)return _SetCache;hasRequired_SetCache=1;var e=require_MapCache(),t=require_setCacheAdd(),r=require_setCacheHas();function s(o){var d=-1,m=o==null?0:o.length;for(this.__data__=new e;++d<m;)this.add(o[d])}return s.prototype.add=s.prototype.push=t,s.prototype.has=r,_SetCache=s,_SetCache}var _arraySome,hasRequired_arraySome;function require_arraySome(){if(hasRequired_arraySome)return _arraySome;hasRequired_arraySome=1;function e(t,r){for(var s=-1,o=t==null?0:t.length;++s<o;)if(r(t[s],s,t))return!0;return!1}return _arraySome=e,_arraySome}var _cacheHas,hasRequired_cacheHas;function require_cacheHas(){if(hasRequired_cacheHas)return _cacheHas;hasRequired_cacheHas=1;function e(t,r){return t.has(r)}return _cacheHas=e,_cacheHas}var _equalArrays,hasRequired_equalArrays;function require_equalArrays(){if(hasRequired_equalArrays)return _equalArrays;hasRequired_equalArrays=1;var e=require_SetCache(),t=require_arraySome(),r=require_cacheHas(),s=1,o=2;function d(m,g,y,b,x,E){var C=y&s,S=m.length,A=g.length;if(S!=A&&!(C&&A>S))return!1;var N=E.get(m),k=E.get(g);if(N&&k)return N==g&&k==m;var L=-1,G=!0,M=y&o?new e:void 0;for(E.set(m,g),E.set(g,m);++L<S;){var z=m[L],V=g[L];if(b)var Y=C?b(V,z,L,g,m,E):b(z,V,L,m,g,E);if(Y!==void 0){if(Y)continue;G=!1;break}if(M){if(!t(g,function(X,Q){if(!r(M,Q)&&(z===X||x(z,X,y,b,E)))return M.push(Q)})){G=!1;break}}else if(!(z===V||x(z,V,y,b,E))){G=!1;break}}return E.delete(m),E.delete(g),G}return _equalArrays=d,_equalArrays}var _Uint8Array,hasRequired_Uint8Array;function require_Uint8Array(){if(hasRequired_Uint8Array)return _Uint8Array;hasRequired_Uint8Array=1;var e=require_root(),t=e.Uint8Array;return _Uint8Array=t,_Uint8Array}var _mapToArray,hasRequired_mapToArray;function require_mapToArray(){if(hasRequired_mapToArray)return _mapToArray;hasRequired_mapToArray=1;function e(t){var r=-1,s=Array(t.size);return t.forEach(function(o,d){s[++r]=[d,o]}),s}return _mapToArray=e,_mapToArray}var _setToArray,hasRequired_setToArray;function require_setToArray(){if(hasRequired_setToArray)return _setToArray;hasRequired_setToArray=1;function e(t){var r=-1,s=Array(t.size);return t.forEach(function(o){s[++r]=o}),s}return _setToArray=e,_setToArray}var _equalByTag,hasRequired_equalByTag;function require_equalByTag(){if(hasRequired_equalByTag)return _equalByTag;hasRequired_equalByTag=1;var e=require_Symbol(),t=require_Uint8Array(),r=requireEq(),s=require_equalArrays(),o=require_mapToArray(),d=require_setToArray(),m=1,g=2,y="[object Boolean]",b="[object Date]",x="[object Error]",E="[object Map]",C="[object Number]",S="[object RegExp]",A="[object Set]",N="[object String]",k="[object Symbol]",L="[object ArrayBuffer]",G="[object DataView]",M=e?e.prototype:void 0,z=M?M.valueOf:void 0;function V(Y,X,Q,$,K,ee,se){switch(Q){case G:if(Y.byteLength!=X.byteLength||Y.byteOffset!=X.byteOffset)return!1;Y=Y.buffer,X=X.buffer;case L:return!(Y.byteLength!=X.byteLength||!ee(new t(Y),new t(X)));case y:case b:case C:return r(+Y,+X);case x:return Y.name==X.name&&Y.message==X.message;case S:case N:return Y==X+"";case E:var ie=o;case A:var te=$&m;if(ie||(ie=d),Y.size!=X.size&&!te)return!1;var ue=se.get(Y);if(ue)return ue==X;$|=g,se.set(Y,X);var le=s(ie(Y),ie(X),$,K,ee,se);return se.delete(Y),le;case k:if(z)return z.call(Y)==z.call(X)}return!1}return _equalByTag=V,_equalByTag}var _baseGetAllKeys,hasRequired_baseGetAllKeys;function require_baseGetAllKeys(){if(hasRequired_baseGetAllKeys)return _baseGetAllKeys;hasRequired_baseGetAllKeys=1;var e=require_arrayPush(),t=requireIsArray();function r(s,o,d){var m=o(s);return t(s)?m:e(m,d(s))}return _baseGetAllKeys=r,_baseGetAllKeys}var _arrayFilter,hasRequired_arrayFilter;function require_arrayFilter(){if(hasRequired_arrayFilter)return _arrayFilter;hasRequired_arrayFilter=1;function e(t,r){for(var s=-1,o=t==null?0:t.length,d=0,m=[];++s<o;){var g=t[s];r(g,s,t)&&(m[d++]=g)}return m}return _arrayFilter=e,_arrayFilter}var stubArray_1,hasRequiredStubArray;function requireStubArray(){if(hasRequiredStubArray)return stubArray_1;hasRequiredStubArray=1;function e(){return[]}return stubArray_1=e,stubArray_1}var _getSymbols,hasRequired_getSymbols;function require_getSymbols(){if(hasRequired_getSymbols)return _getSymbols;hasRequired_getSymbols=1;var e=require_arrayFilter(),t=requireStubArray(),r=Object.prototype,s=r.propertyIsEnumerable,o=Object.getOwnPropertySymbols,d=o?function(m){return m==null?[]:(m=Object(m),e(o(m),function(g){return s.call(m,g)}))}:t;return _getSymbols=d,_getSymbols}var _baseTimes,hasRequired_baseTimes;function require_baseTimes(){if(hasRequired_baseTimes)return _baseTimes;hasRequired_baseTimes=1;function e(t,r){for(var s=-1,o=Array(t);++s<t;)o[s]=r(s);return o}return _baseTimes=e,_baseTimes}var isBuffer={exports:{}},stubFalse_1,hasRequiredStubFalse;function requireStubFalse(){if(hasRequiredStubFalse)return stubFalse_1;hasRequiredStubFalse=1;function e(){return!1}return stubFalse_1=e,stubFalse_1}isBuffer.exports;var hasRequiredIsBuffer;function requireIsBuffer(){return hasRequiredIsBuffer||(hasRequiredIsBuffer=1,(function(e,t){var r=require_root(),s=requireStubFalse(),o=t&&!t.nodeType&&t,d=o&&!0&&e&&!e.nodeType&&e,m=d&&d.exports===o,g=m?r.Buffer:void 0,y=g?g.isBuffer:void 0,b=y||s;e.exports=b})(isBuffer,isBuffer.exports)),isBuffer.exports}var _isIndex,hasRequired_isIndex;function require_isIndex(){if(hasRequired_isIndex)return _isIndex;hasRequired_isIndex=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function r(s,o){var d=typeof s;return o=o??e,!!o&&(d=="number"||d!="symbol"&&t.test(s))&&s>-1&&s%1==0&&s<o}return _isIndex=r,_isIndex}var isLength_1,hasRequiredIsLength;function requireIsLength(){if(hasRequiredIsLength)return isLength_1;hasRequiredIsLength=1;var e=9007199254740991;function t(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=e}return isLength_1=t,isLength_1}var _baseIsTypedArray,hasRequired_baseIsTypedArray;function require_baseIsTypedArray(){if(hasRequired_baseIsTypedArray)return _baseIsTypedArray;hasRequired_baseIsTypedArray=1;var e=require_baseGetTag(),t=requireIsLength(),r=requireIsObjectLike(),s="[object Arguments]",o="[object Array]",d="[object Boolean]",m="[object Date]",g="[object Error]",y="[object Function]",b="[object Map]",x="[object Number]",E="[object Object]",C="[object RegExp]",S="[object Set]",A="[object String]",N="[object WeakMap]",k="[object ArrayBuffer]",L="[object DataView]",G="[object Float32Array]",M="[object Float64Array]",z="[object Int8Array]",V="[object Int16Array]",Y="[object Int32Array]",X="[object Uint8Array]",Q="[object Uint8ClampedArray]",$="[object Uint16Array]",K="[object Uint32Array]",ee={};ee[G]=ee[M]=ee[z]=ee[V]=ee[Y]=ee[X]=ee[Q]=ee[$]=ee[K]=!0,ee[s]=ee[o]=ee[k]=ee[d]=ee[L]=ee[m]=ee[g]=ee[y]=ee[b]=ee[x]=ee[E]=ee[C]=ee[S]=ee[A]=ee[N]=!1;function se(ie){return r(ie)&&t(ie.length)&&!!ee[e(ie)]}return _baseIsTypedArray=se,_baseIsTypedArray}var _baseUnary,hasRequired_baseUnary;function require_baseUnary(){if(hasRequired_baseUnary)return _baseUnary;hasRequired_baseUnary=1;function e(t){return function(r){return t(r)}}return _baseUnary=e,_baseUnary}var _nodeUtil={exports:{}};_nodeUtil.exports;var hasRequired_nodeUtil;function require_nodeUtil(){return hasRequired_nodeUtil||(hasRequired_nodeUtil=1,(function(e,t){var r=require_freeGlobal(),s=t&&!t.nodeType&&t,o=s&&!0&&e&&!e.nodeType&&e,d=o&&o.exports===s,m=d&&r.process,g=(function(){try{var y=o&&o.require&&o.require("util").types;return y||m&&m.binding&&m.binding("util")}catch{}})();e.exports=g})(_nodeUtil,_nodeUtil.exports)),_nodeUtil.exports}var isTypedArray_1,hasRequiredIsTypedArray;function requireIsTypedArray(){if(hasRequiredIsTypedArray)return isTypedArray_1;hasRequiredIsTypedArray=1;var e=require_baseIsTypedArray(),t=require_baseUnary(),r=require_nodeUtil(),s=r&&r.isTypedArray,o=s?t(s):e;return isTypedArray_1=o,isTypedArray_1}var _arrayLikeKeys,hasRequired_arrayLikeKeys;function require_arrayLikeKeys(){if(hasRequired_arrayLikeKeys)return _arrayLikeKeys;hasRequired_arrayLikeKeys=1;var e=require_baseTimes(),t=requireIsArguments(),r=requireIsArray(),s=requireIsBuffer(),o=require_isIndex(),d=requireIsTypedArray(),m=Object.prototype,g=m.hasOwnProperty;function y(b,x){var E=r(b),C=!E&&t(b),S=!E&&!C&&s(b),A=!E&&!C&&!S&&d(b),N=E||C||S||A,k=N?e(b.length,String):[],L=k.length;for(var G in b)(x||g.call(b,G))&&!(N&&(G=="length"||S&&(G=="offset"||G=="parent")||A&&(G=="buffer"||G=="byteLength"||G=="byteOffset")||o(G,L)))&&k.push(G);return k}return _arrayLikeKeys=y,_arrayLikeKeys}var _isPrototype,hasRequired_isPrototype;function require_isPrototype(){if(hasRequired_isPrototype)return _isPrototype;hasRequired_isPrototype=1;var e=Object.prototype;function t(r){var s=r&&r.constructor,o=typeof s=="function"&&s.prototype||e;return r===o}return _isPrototype=t,_isPrototype}var _overArg,hasRequired_overArg;function require_overArg(){if(hasRequired_overArg)return _overArg;hasRequired_overArg=1;function e(t,r){return function(s){return t(r(s))}}return _overArg=e,_overArg}var _nativeKeys,hasRequired_nativeKeys;function require_nativeKeys(){if(hasRequired_nativeKeys)return _nativeKeys;hasRequired_nativeKeys=1;var e=require_overArg(),t=e(Object.keys,Object);return _nativeKeys=t,_nativeKeys}var _baseKeys,hasRequired_baseKeys;function require_baseKeys(){if(hasRequired_baseKeys)return _baseKeys;hasRequired_baseKeys=1;var e=require_isPrototype(),t=require_nativeKeys(),r=Object.prototype,s=r.hasOwnProperty;function o(d){if(!e(d))return t(d);var m=[];for(var g in Object(d))s.call(d,g)&&g!="constructor"&&m.push(g);return m}return _baseKeys=o,_baseKeys}var isArrayLike_1,hasRequiredIsArrayLike;function requireIsArrayLike(){if(hasRequiredIsArrayLike)return isArrayLike_1;hasRequiredIsArrayLike=1;var e=requireIsFunction(),t=requireIsLength();function r(s){return s!=null&&t(s.length)&&!e(s)}return isArrayLike_1=r,isArrayLike_1}var keys_1,hasRequiredKeys;function requireKeys(){if(hasRequiredKeys)return keys_1;hasRequiredKeys=1;var e=require_arrayLikeKeys(),t=require_baseKeys(),r=requireIsArrayLike();function s(o){return r(o)?e(o):t(o)}return keys_1=s,keys_1}var _getAllKeys,hasRequired_getAllKeys;function require_getAllKeys(){if(hasRequired_getAllKeys)return _getAllKeys;hasRequired_getAllKeys=1;var e=require_baseGetAllKeys(),t=require_getSymbols(),r=requireKeys();function s(o){return e(o,r,t)}return _getAllKeys=s,_getAllKeys}var _equalObjects,hasRequired_equalObjects;function require_equalObjects(){if(hasRequired_equalObjects)return _equalObjects;hasRequired_equalObjects=1;var e=require_getAllKeys(),t=1,r=Object.prototype,s=r.hasOwnProperty;function o(d,m,g,y,b,x){var E=g&t,C=e(d),S=C.length,A=e(m),N=A.length;if(S!=N&&!E)return!1;for(var k=S;k--;){var L=C[k];if(!(E?L in m:s.call(m,L)))return!1}var G=x.get(d),M=x.get(m);if(G&&M)return G==m&&M==d;var z=!0;x.set(d,m),x.set(m,d);for(var V=E;++k<S;){L=C[k];var Y=d[L],X=m[L];if(y)var Q=E?y(X,Y,L,m,d,x):y(Y,X,L,d,m,x);if(!(Q===void 0?Y===X||b(Y,X,g,y,x):Q)){z=!1;break}V||(V=L=="constructor")}if(z&&!V){var $=d.constructor,K=m.constructor;$!=K&&"constructor"in d&&"constructor"in m&&!(typeof $=="function"&&$ instanceof $&&typeof K=="function"&&K instanceof K)&&(z=!1)}return x.delete(d),x.delete(m),z}return _equalObjects=o,_equalObjects}var _DataView,hasRequired_DataView;function require_DataView(){if(hasRequired_DataView)return _DataView;hasRequired_DataView=1;var e=require_getNative(),t=require_root(),r=e(t,"DataView");return _DataView=r,_DataView}var _Promise,hasRequired_Promise;function require_Promise(){if(hasRequired_Promise)return _Promise;hasRequired_Promise=1;var e=require_getNative(),t=require_root(),r=e(t,"Promise");return _Promise=r,_Promise}var _Set,hasRequired_Set;function require_Set(){if(hasRequired_Set)return _Set;hasRequired_Set=1;var e=require_getNative(),t=require_root(),r=e(t,"Set");return _Set=r,_Set}var _WeakMap,hasRequired_WeakMap;function require_WeakMap(){if(hasRequired_WeakMap)return _WeakMap;hasRequired_WeakMap=1;var e=require_getNative(),t=require_root(),r=e(t,"WeakMap");return _WeakMap=r,_WeakMap}var _getTag,hasRequired_getTag;function require_getTag(){if(hasRequired_getTag)return _getTag;hasRequired_getTag=1;var e=require_DataView(),t=require_Map(),r=require_Promise(),s=require_Set(),o=require_WeakMap(),d=require_baseGetTag(),m=require_toSource(),g="[object Map]",y="[object Object]",b="[object Promise]",x="[object Set]",E="[object WeakMap]",C="[object DataView]",S=m(e),A=m(t),N=m(r),k=m(s),L=m(o),G=d;return(e&&G(new e(new ArrayBuffer(1)))!=C||t&&G(new t)!=g||r&&G(r.resolve())!=b||s&&G(new s)!=x||o&&G(new o)!=E)&&(G=function(M){var z=d(M),V=z==y?M.constructor:void 0,Y=V?m(V):"";if(Y)switch(Y){case S:return C;case A:return g;case N:return b;case k:return x;case L:return E}return z}),_getTag=G,_getTag}var _baseIsEqualDeep,hasRequired_baseIsEqualDeep;function require_baseIsEqualDeep(){if(hasRequired_baseIsEqualDeep)return _baseIsEqualDeep;hasRequired_baseIsEqualDeep=1;var e=require_Stack(),t=require_equalArrays(),r=require_equalByTag(),s=require_equalObjects(),o=require_getTag(),d=requireIsArray(),m=requireIsBuffer(),g=requireIsTypedArray(),y=1,b="[object Arguments]",x="[object Array]",E="[object Object]",C=Object.prototype,S=C.hasOwnProperty;function A(N,k,L,G,M,z){var V=d(N),Y=d(k),X=V?x:o(N),Q=Y?x:o(k);X=X==b?E:X,Q=Q==b?E:Q;var $=X==E,K=Q==E,ee=X==Q;if(ee&&m(N)){if(!m(k))return!1;V=!0,$=!1}if(ee&&!$)return z||(z=new e),V||g(N)?t(N,k,L,G,M,z):r(N,k,X,L,G,M,z);if(!(L&y)){var se=$&&S.call(N,"__wrapped__"),ie=K&&S.call(k,"__wrapped__");if(se||ie){var te=se?N.value():N,ue=ie?k.value():k;return z||(z=new e),M(te,ue,L,G,z)}}return ee?(z||(z=new e),s(N,k,L,G,M,z)):!1}return _baseIsEqualDeep=A,_baseIsEqualDeep}var _baseIsEqual,hasRequired_baseIsEqual;function require_baseIsEqual(){if(hasRequired_baseIsEqual)return _baseIsEqual;hasRequired_baseIsEqual=1;var e=require_baseIsEqualDeep(),t=requireIsObjectLike();function r(s,o,d,m,g){return s===o?!0:s==null||o==null||!t(s)&&!t(o)?s!==s&&o!==o:e(s,o,d,m,r,g)}return _baseIsEqual=r,_baseIsEqual}var _baseIsMatch,hasRequired_baseIsMatch;function require_baseIsMatch(){if(hasRequired_baseIsMatch)return _baseIsMatch;hasRequired_baseIsMatch=1;var e=require_Stack(),t=require_baseIsEqual(),r=1,s=2;function o(d,m,g,y){var b=g.length,x=b,E=!y;if(d==null)return!x;for(d=Object(d);b--;){var C=g[b];if(E&&C[2]?C[1]!==d[C[0]]:!(C[0]in d))return!1}for(;++b<x;){C=g[b];var S=C[0],A=d[S],N=C[1];if(E&&C[2]){if(A===void 0&&!(S in d))return!1}else{var k=new e;if(y)var L=y(A,N,S,d,m,k);if(!(L===void 0?t(N,A,r|s,y,k):L))return!1}}return!0}return _baseIsMatch=o,_baseIsMatch}var _isStrictComparable,hasRequired_isStrictComparable;function require_isStrictComparable(){if(hasRequired_isStrictComparable)return _isStrictComparable;hasRequired_isStrictComparable=1;var e=requireIsObject();function t(r){return r===r&&!e(r)}return _isStrictComparable=t,_isStrictComparable}var _getMatchData,hasRequired_getMatchData;function require_getMatchData(){if(hasRequired_getMatchData)return _getMatchData;hasRequired_getMatchData=1;var e=require_isStrictComparable(),t=requireKeys();function r(s){for(var o=t(s),d=o.length;d--;){var m=o[d],g=s[m];o[d]=[m,g,e(g)]}return o}return _getMatchData=r,_getMatchData}var _matchesStrictComparable,hasRequired_matchesStrictComparable;function require_matchesStrictComparable(){if(hasRequired_matchesStrictComparable)return _matchesStrictComparable;hasRequired_matchesStrictComparable=1;function e(t,r){return function(s){return s==null?!1:s[t]===r&&(r!==void 0||t in Object(s))}}return _matchesStrictComparable=e,_matchesStrictComparable}var _baseMatches,hasRequired_baseMatches;function require_baseMatches(){if(hasRequired_baseMatches)return _baseMatches;hasRequired_baseMatches=1;var e=require_baseIsMatch(),t=require_getMatchData(),r=require_matchesStrictComparable();function s(o){var d=t(o);return d.length==1&&d[0][2]?r(d[0][0],d[0][1]):function(m){return m===o||e(m,o,d)}}return _baseMatches=s,_baseMatches}var _isKey,hasRequired_isKey;function require_isKey(){if(hasRequired_isKey)return _isKey;hasRequired_isKey=1;var e=requireIsArray(),t=requireIsSymbol(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;function o(d,m){if(e(d))return!1;var g=typeof d;return g=="number"||g=="symbol"||g=="boolean"||d==null||t(d)?!0:s.test(d)||!r.test(d)||m!=null&&d in Object(m)}return _isKey=o,_isKey}var memoize_1,hasRequiredMemoize;function requireMemoize(){if(hasRequiredMemoize)return memoize_1;hasRequiredMemoize=1;var e=require_MapCache(),t="Expected a function";function r(s,o){if(typeof s!="function"||o!=null&&typeof o!="function")throw new TypeError(t);var d=function(){var m=arguments,g=o?o.apply(this,m):m[0],y=d.cache;if(y.has(g))return y.get(g);var b=s.apply(this,m);return d.cache=y.set(g,b)||y,b};return d.cache=new(r.Cache||e),d}return r.Cache=e,memoize_1=r,memoize_1}var _memoizeCapped,hasRequired_memoizeCapped;function require_memoizeCapped(){if(hasRequired_memoizeCapped)return _memoizeCapped;hasRequired_memoizeCapped=1;var e=requireMemoize(),t=500;function r(s){var o=e(s,function(m){return d.size===t&&d.clear(),m}),d=o.cache;return o}return _memoizeCapped=r,_memoizeCapped}var _stringToPath,hasRequired_stringToPath;function require_stringToPath(){if(hasRequired_stringToPath)return _stringToPath;hasRequired_stringToPath=1;var e=require_memoizeCapped(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,s=e(function(o){var d=[];return o.charCodeAt(0)===46&&d.push(""),o.replace(t,function(m,g,y,b){d.push(y?b.replace(r,"$1"):g||m)}),d});return _stringToPath=s,_stringToPath}var _castPath,hasRequired_castPath;function require_castPath(){if(hasRequired_castPath)return _castPath;hasRequired_castPath=1;var e=requireIsArray(),t=require_isKey(),r=require_stringToPath(),s=requireToString();function o(d,m){return e(d)?d:t(d,m)?[d]:r(s(d))}return _castPath=o,_castPath}var _toKey,hasRequired_toKey;function require_toKey(){if(hasRequired_toKey)return _toKey;hasRequired_toKey=1;var e=requireIsSymbol();function t(r){if(typeof r=="string"||e(r))return r;var s=r+"";return s=="0"&&1/r==-1/0?"-0":s}return _toKey=t,_toKey}var _baseGet,hasRequired_baseGet;function require_baseGet(){if(hasRequired_baseGet)return _baseGet;hasRequired_baseGet=1;var e=require_castPath(),t=require_toKey();function r(s,o){o=e(o,s);for(var d=0,m=o.length;s!=null&&d<m;)s=s[t(o[d++])];return d&&d==m?s:void 0}return _baseGet=r,_baseGet}var get_1,hasRequiredGet;function requireGet(){if(hasRequiredGet)return get_1;hasRequiredGet=1;var e=require_baseGet();function t(r,s,o){var d=r==null?void 0:e(r,s);return d===void 0?o:d}return get_1=t,get_1}var _baseHasIn,hasRequired_baseHasIn;function require_baseHasIn(){if(hasRequired_baseHasIn)return _baseHasIn;hasRequired_baseHasIn=1;function e(t,r){return t!=null&&r in Object(t)}return _baseHasIn=e,_baseHasIn}var _hasPath,hasRequired_hasPath;function require_hasPath(){if(hasRequired_hasPath)return _hasPath;hasRequired_hasPath=1;var e=require_castPath(),t=requireIsArguments(),r=requireIsArray(),s=require_isIndex(),o=requireIsLength(),d=require_toKey();function m(g,y,b){y=e(y,g);for(var x=-1,E=y.length,C=!1;++x<E;){var S=d(y[x]);if(!(C=g!=null&&b(g,S)))break;g=g[S]}return C||++x!=E?C:(E=g==null?0:g.length,!!E&&o(E)&&s(S,E)&&(r(g)||t(g)))}return _hasPath=m,_hasPath}var hasIn_1,hasRequiredHasIn;function requireHasIn(){if(hasRequiredHasIn)return hasIn_1;hasRequiredHasIn=1;var e=require_baseHasIn(),t=require_hasPath();function r(s,o){return s!=null&&t(s,o,e)}return hasIn_1=r,hasIn_1}var _baseMatchesProperty,hasRequired_baseMatchesProperty;function require_baseMatchesProperty(){if(hasRequired_baseMatchesProperty)return _baseMatchesProperty;hasRequired_baseMatchesProperty=1;var e=require_baseIsEqual(),t=requireGet(),r=requireHasIn(),s=require_isKey(),o=require_isStrictComparable(),d=require_matchesStrictComparable(),m=require_toKey(),g=1,y=2;function b(x,E){return s(x)&&o(E)?d(m(x),E):function(C){var S=t(C,x);return S===void 0&&S===E?r(C,x):e(E,S,g|y)}}return _baseMatchesProperty=b,_baseMatchesProperty}var identity_1,hasRequiredIdentity;function requireIdentity(){if(hasRequiredIdentity)return identity_1;hasRequiredIdentity=1;function e(t){return t}return identity_1=e,identity_1}var _baseProperty,hasRequired_baseProperty;function require_baseProperty(){if(hasRequired_baseProperty)return _baseProperty;hasRequired_baseProperty=1;function e(t){return function(r){return r?.[t]}}return _baseProperty=e,_baseProperty}var _basePropertyDeep,hasRequired_basePropertyDeep;function require_basePropertyDeep(){if(hasRequired_basePropertyDeep)return _basePropertyDeep;hasRequired_basePropertyDeep=1;var e=require_baseGet();function t(r){return function(s){return e(s,r)}}return _basePropertyDeep=t,_basePropertyDeep}var property_1,hasRequiredProperty;function requireProperty(){if(hasRequiredProperty)return property_1;hasRequiredProperty=1;var e=require_baseProperty(),t=require_basePropertyDeep(),r=require_isKey(),s=require_toKey();function o(d){return r(d)?e(s(d)):t(d)}return property_1=o,property_1}var _baseIteratee,hasRequired_baseIteratee;function require_baseIteratee(){if(hasRequired_baseIteratee)return _baseIteratee;hasRequired_baseIteratee=1;var e=require_baseMatches(),t=require_baseMatchesProperty(),r=requireIdentity(),s=requireIsArray(),o=requireProperty();function d(m){return typeof m=="function"?m:m==null?r:typeof m=="object"?s(m)?t(m[0],m[1]):e(m):o(m)}return _baseIteratee=d,_baseIteratee}var _createFind,hasRequired_createFind;function require_createFind(){if(hasRequired_createFind)return _createFind;hasRequired_createFind=1;var e=require_baseIteratee(),t=requireIsArrayLike(),r=requireKeys();function s(o){return function(d,m,g){var y=Object(d);if(!t(d)){var b=e(m,3);d=r(d),m=function(E){return b(y[E],E,y)}}var x=o(d,m,g);return x>-1?y[b?d[x]:x]:void 0}}return _createFind=s,_createFind}var _baseFindIndex,hasRequired_baseFindIndex;function require_baseFindIndex(){if(hasRequired_baseFindIndex)return _baseFindIndex;hasRequired_baseFindIndex=1;function e(t,r,s,o){for(var d=t.length,m=s+(o?1:-1);o?m--:++m<d;)if(r(t[m],m,t))return m;return-1}return _baseFindIndex=e,_baseFindIndex}var toFinite_1,hasRequiredToFinite;function requireToFinite(){if(hasRequiredToFinite)return toFinite_1;hasRequiredToFinite=1;var e=requireToNumber(),t=1/0,r=17976931348623157e292;function s(o){if(!o)return o===0?o:0;if(o=e(o),o===t||o===-t){var d=o<0?-1:1;return d*r}return o===o?o:0}return toFinite_1=s,toFinite_1}var toInteger_1,hasRequiredToInteger;function requireToInteger(){if(hasRequiredToInteger)return toInteger_1;hasRequiredToInteger=1;var e=requireToFinite();function t(r){var s=e(r),o=s%1;return s===s?o?s-o:s:0}return toInteger_1=t,toInteger_1}var findIndex_1,hasRequiredFindIndex;function requireFindIndex(){if(hasRequiredFindIndex)return findIndex_1;hasRequiredFindIndex=1;var e=require_baseFindIndex(),t=require_baseIteratee(),r=requireToInteger(),s=Math.max;function o(d,m,g){var y=d==null?0:d.length;if(!y)return-1;var b=g==null?0:r(g);return b<0&&(b=s(y+b,0)),e(d,t(m,3),b)}return findIndex_1=o,findIndex_1}var find_1,hasRequiredFind;function requireFind(){if(hasRequiredFind)return find_1;hasRequiredFind=1;var e=require_createFind(),t=requireFindIndex(),r=e(t);return find_1=r,find_1}var findExports=requireFind();const find=getDefaultExportFromCjs$1(findExports);let IdentifySidebar$1=class extends React.Component{constructor(t){super(t),this.renderResults=this.renderResults.bind(this)}renderResults(){const{identifyResults:t,cmLayerNames:r,uidMap:s}=this.props,o=/[:](.+)/i,d=[];let m=0;return t.forEach(g=>{const y=g.dataset,b=find(r,{teamDatasetId:y}),x=b?b.displayName:s[y];Object.keys(g.result).forEach(E=>{const C=g.result[E];if(C&&C.features&&C.features.length){const S=o.exec(E),A=S&&S[1]!==x?S[0]:"";d.push(jsxRuntime.jsx(IdentifySidebarList,{features:C.features,displayName:`${x}${A}`},m++))}})}),d}render(){const{primaryPanelShowClose:t,doToggleIdentifyView:r,doPrimaryPanelResize:s}=this.props,o=classnames({"sidebar-list":!t,"thin-scrollbar":!0,"sidebar-list-show-close-btn":t}),d=t?50:30;return jsxRuntime.jsx("div",{children:jsxRuntime.jsxs("div",{className:o,style:{top:d},children:[jsxRuntime.jsx("div",{className:"row",children:jsxRuntime.jsxs("div",{className:"col-xs-12",children:[jsxRuntime.jsx("button",{type:"button",className:"cm-btn cm-btn-xs cm-btn-default pull-right",title:"RESIZE PANE",onClick:()=>{s({width:585})},children:"RESIZE PANE"}),jsxRuntime.jsx("button",{type:"button",className:"cm-btn cm-btn-xs cm-btn-default pull-right",title:"TABLE VIEW",onClick:()=>{r("table")},children:"TABLE VIEW"})]})}),this.renderResults()]})})}};const IdentifySidebar=connect("selectIdentifyResults","selectCmLayerNames","selectUidMap","selectPrimaryPanelShowClose","doToggleIdentifyView","doPrimaryPanelResize",IdentifySidebar$1);let IdentifyDetails$1=class extends React.Component{constructor(t){super(t),this.renderValue=this.renderValue.bind(this)}componentDidMount(){const{map:t,identifyDetailLayer:r}=this.props;t.addLayer(r)}componentWillUnmount(){const{map:t,identifyDetailLayer:r}=this.props;t.removeLayer(r)}renderValue(t){return t&&typeof t=="string"?isHtml(t)?jsxRuntime.jsx("td",{className:"col-sm-8 overflow-sidebar-identify",dangerouslySetInnerHTML:{__html:t}}):t.indexOf("http")!==-1?jsxRuntime.jsx("td",{className:"col-sm-8 overflow-sidebar-identify",title:t,children:jsxRuntime.jsx("a",{href:t,children:t})}):jsxRuntime.jsx("td",{className:"col-sm-8 overflow-sidebar-identify",title:t,children:t}):jsxRuntime.jsx("td",{className:"col-sm-8 overflow-sidebar-identify",title:t,children:t})}render(){const{identifyDetailFeature:t,doRenderIdentifySidebar:r,primaryPanelShowClose:s}=this.props,o=classnames({"sidebar-list":!s,"thin-scrollbar":!0,"sidebar-list-show-close-btn":s}),d=s?60:30;return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("i",{onClick:r,style:{fontSize:24,cursor:"pointer"},title:"Return to List",className:"mdi mdi-arrow-left"}),jsxRuntime.jsx("div",{className:o,style:{top:d},children:jsxRuntime.jsxs("table",{className:"table table-striped table-hover ",children:[jsxRuntime.jsx("thead",{children:jsxRuntime.jsxs("tr",{children:[jsxRuntime.jsx("th",{className:"col-sm-4 overflow-sidebar-identify",children:jsxRuntime.jsx("strong",{children:"Attribute"})}),jsxRuntime.jsx("th",{className:"col-sm-8 overflow-sidebar-identify",children:jsxRuntime.jsx("strong",{children:"Value"})})]})}),jsxRuntime.jsx("tbody",{children:Object.keys(t.properties).map((m,g)=>jsxRuntime.jsxs("tr",{children:[jsxRuntime.jsx("td",{className:"col-sm-4 overflow-sidebar-identify",title:m,children:m}),this.renderValue(t.properties[m])]},btoa(m)+g))})]})})]})}};const IdentifyDetails=connect("selectIdentifyDetailFeature","doRenderIdentifySidebar","selectIdentifyDetailLayer","selectMap","selectPrimaryPanelShowClose",IdentifyDetails$1);class Cell extends React.Component{constructor(t){super(t),this.renderValue=this.renderValue.bind(this)}renderValue(t){return t&&typeof t=="string"?isHtml(t)?jsxRuntime.jsx("div",{className:"overflow-ellipsis overflow-ellipsis-user-select",dangerouslySetInnerHTML:{__html:t}}):t.indexOf("http")!==-1?jsxRuntime.jsx("div",{className:"overflow-ellipsis overflow-ellipsis-user-select",title:t,children:jsxRuntime.jsx("a",{href:t,children:t})}):jsxRuntime.jsx("div",{className:"overflow-ellipsis overflow-ellipsis-user-select",title:t,children:t}):jsxRuntime.jsx("div",{className:"overflow-ellipsis overflow-ellipsis-user-select",title:t,children:t})}render(){const{value:t}=this.props;return this.renderValue(t)}}const style$1=new style$3.Style({fill:new style$3.Fill({color:"rgba(84, 240, 240, 0.1)"}),stroke:new style$3.Stroke({color:"rgb(84, 240, 240)",width:1}),image:new style$3.Circle({radius:5,stroke:new style$3.Stroke({color:"rgb(84, 240, 240)",width:1}),fill:new style$3.Fill({color:"rgba(84, 240, 240, 0.1)"})})}),selectStyle=new style$3.Style({fill:new style$3.Fill({color:"rgba(244, 241, 66, 0.8)"}),stroke:new style$3.Stroke({color:"rgb(244, 241, 66)",width:1}),image:new style$3.Circle({radius:8,stroke:new style$3.Stroke({color:"rgb(244, 241, 66)"}),fill:new style$3.Fill({color:"rgba(244, 241, 66, 0.8)"})})});let IdentifyTable$1=class extends React.Component{constructor(t){super(t);const r=t.features,s=r[0].geometry.type,o=r[0].properties,d={type:"FeatureCollection",features:r};this.layer=getLayer({serviceType:"LocalVector",visible:!0,geometryType:s,style:style$1,zIndex:1e3}),this.selection=getLayer({serviceType:"LocalVector",visible:!0,geometryType:s,style:selectStyle,zIndex:1001});const m=new GeoJSON().readFeatures(d,{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"}),g=this.layer.getSource();g.addFeatures(m),this.setRowsFromSource=this.setRowsFromSource.bind(this),this.generateColumns=this.generateColumns.bind(this),this.onSortColumnsChange=this.onSortColumnsChange.bind(this),this.sortRows=this.sortRows.bind(this),this.exportToCSV=this.exportToCSV.bind(this),this.identifyCsv=this.identifyCsv.bind(this),this.exportToGeoJSON=this.exportToGeoJSON.bind(this),this.state={rows:[],columns:this.generateColumns(o),sortColumns:[],source:g,minHeight:200,selected:[],sortBy:"ol_uid",sortDir:0,featureCollection:d}}generateColumns(t){return Object.keys(t).map((r,s)=>{let o=r&&r.length>15?150+(r.length-10)*5:150;return{id:s,key:r,name:r,editable:!1,sortable:!0,filterable:!0,width:o,resizable:!0,nullable:!0,formatter:Cell}})}componentWillUnmount(){const{map:t}=this.props;t.removeLayer(this.layer),t.removeLayer(this.selection)}componentDidMount(){const{map:t}=this.props;this.setRowsFromSource(),t.addLayer(this.layer),t.addLayer(this.selection)}setRowsFromSource(){const{source:t}=this.state,r=[];t.forEachFeature(s=>{const o={id:s.ol_uid,ol_uid:s.ol_uid,feature:s},d=s.getProperties();r.push(Object.assign(o,d))}),this.setState({rows:r})}exportToCSV(){const{columns:t,rows:r,sortBy:s,sortDir:o,selected:d}=this.state,m=_.map(t,"name"),g=o===0||o===1?"asc":"desc";let y=[],b=[];d.length?(d.forEach(x=>{r.forEach(E=>{x===E.id&&y.push(E.feature.getProperties())})}),b=_.orderBy(y,[s],[g])):(r.forEach(x=>{y.push(x.feature.getProperties())}),b=_.orderBy(y,[s],[g])),this.identifyCsv(m,b)}identifyCsv(t,r){const{doGenerateCsv:s}=this.props;let o=[t];r.forEach((d,m)=>{let g=[];t.forEach(y=>{g.push(d[y])}),o.push(g)}),s(o)}exportToGeoJSON(){const{featureCollection:t,rows:r,selected:s}=this.state,{doGenerateGeoJSON:o}=this.props;let d={type:"FeatureCollection",features:[]},m=[];s.length?s.forEach(g=>{r.forEach(y=>{g===y.id&&m.push(y.objectid)}),t.features.forEach(y=>{m.includes(y.id)&&d.features.push(y)})}):d=t,o(d)}onSortColumnsChange(t){const{rows:r}=this.state;this.setState({sortColumns:t}),this.setState({rows:this.sortRows(r,t)})}sortRows(t,r){const s=[...t];return s.sort((o,d)=>{for(const m of r){const{columnKey:g,direction:y}=m,b=o[g],x=d[g];if(b==null)return y==="ASC"?-1:1;if(x==null||b>x)return y==="ASC"?1:-1;if(b<x)return y==="ASC"?-1:1}return 0}),s}render(){const{rows:t,columns:r,sortColumns:s,selected:o}=this.state,{doToggleIdentifyView:d}=this.props,m=document.getElementsByClassName("south-container")[0];return m&&m.clientHeight-65,jsxRuntime.jsxs("div",{children:[jsxRuntime.jsxs("div",{className:"text-right",style:{padding:"2px",marginRight:"15px"},children:[jsxRuntime.jsx("button",{type:"button",className:"cm-btn cm-btn-xs cm-btn-default",style:{marginRight:"5px"},title:"Sidebar View",onClick:()=>{d("sidebar")},children:"SIDEBAR VIEW"}),jsxRuntime.jsxs("div",{className:"cm-btn-group",children:[jsxRuntime.jsx("button",{type:"button",className:"cm-btn cm-btn-xs cm-btn-primary",title:"Export to csv",onClick:this.exportToCSV,children:"Export to csv"}),jsxRuntime.jsx("button",{type:"button",className:"cm-btn cm-btn-xs cm-btn-primary",title:"Export to geoJSON",onClick:this.exportToGeoJSON,children:"Export to geoJSON"})]})]}),jsxRuntime.jsx(reactDataGrid.DataGrid,{columns:r,rows:t,sortColumns:s,onSortColumnsChange:this.onSortColumnsChange})]})}};const IdentifyTable=connect("selectMap","selectIdentifyResults","selectCmLayerNames","doSouthPanelCloseChild","doGenerateCsv","doGenerateGeoJSON","doToggleIdentifyView",IdentifyTable$1);class IdentifyPopup extends React.Component{constructor(t){super(t),this.overlay=t.overlay,this.startDrag=this.startDrag.bind(this),this.dragMe=this.dragMe.bind(this),this.placeMe=this.placeMe.bind(this),this.handleClose=this.handleClose.bind(this),this.renderValue=this.renderValue.bind(this)}componentDidMount(){this.dragHandle.addEventListener("mousedown",this.startDrag),this.closeButton.addEventListener("click",this.handleClose)}componentWillUnmount(){this.dragHandle.removeEventListener("mousedown",this.startDrag),this.closeButton.removeEventListener("click",this.handleClose)}handleClose(){const{onClear:t,overlay:r}=this.props;t(r)}startDrag(t){const{map:r}=this.props,s=[t.clientX,t.clientY],o=r.getCoordinateFromPixel(s),d=this.overlay.getPosition();this.offset=[d[0]-o[0],d[1]-o[1]],r.on("pointermove",this.dragMe),window.addEventListener("mouseup",this.placeMe),this.overlay.set("dragging",!0)}dragMe(t){this.overlay.get("dragging")&&this.overlay.setPosition([t.coordinate[0]+this.offset[0],t.coordinate[1]+this.offset[1]])}placeMe(t){const{map:r}=this.props;this.overlay.get("dragging")&&(r.un("pointermove",this.dragMe),window.removeEventListener("mouseup",this.placeMe),this.overlay.set("dragging",!1))}renderValue(t){return t&&typeof t=="string"?isHtml(t)?jsxRuntime.jsx("span",{className:"col-sm-6",style:{overflow:"hidden"},dangerouslySetInnerHTML:{__html:t}}):t.indexOf("http")!==-1?jsxRuntime.jsx("span",{className:"col-sm-6 overflow-ellipsis",title:t,children:jsxRuntime.jsx("a",{href:t,target:"_blank",children:t})}):jsxRuntime.jsx("span",{className:"col-sm-6 overflow-ellipsis",title:t,children:t}):jsxRuntime.jsx("span",{className:"col-sm-6 overflow-ellipsis",title:t,children:t})}render(){const{feature:t}=this.props;return jsxRuntime.jsxs("div",{className:"panel panel-default top clearfix",style:{marginBottom:0,marginTop:"-10px"},children:[jsxRuntime.jsx("div",{className:"pull-right",ref:r=>{this.closeButton=r},children:jsxRuntime.jsx("i",{className:"mdi mdi-close"})}),jsxRuntime.jsx("div",{className:"pull-left",ref:r=>{this.dragHandle=r},children:jsxRuntime.jsx("i",{className:"mdi mdi-drag"})}),jsxRuntime.jsx("div",{className:"arrow",style:{left:"50%"}}),jsxRuntime.jsxs("div",{className:"panel-body",children:[jsxRuntime.jsx("p",{className:"",children:jsxRuntime.jsx("strong",{})}),jsxRuntime.jsx("div",{className:"",children:jsxRuntime.jsx("ul",{className:"cm-list-group thin-scrollbar",style:{maxHeight:300,overflow:"auto"},children:Object.keys(t.properties).map((r,s)=>jsxRuntime.jsxs("li",{className:"cm-list-group-item row",style:{margin:"3px",padding:"2px",maxWidth:"500px"},children:[jsxRuntime.jsx("span",{className:"col-sm-6 overflow-ellipsis",title:r,children:r}),this.renderValue(t.properties[r])]},s))})})]})]})}}const IdentifyBufferSettings$1=e=>{const{theme:t,identifyBufferUnit:r,doUpdateBufferUnit:s,doModalClose:o}=e,d=[{name:"Degrees",abv:"deg"},{name:"Kilometers",abv:"km"},{name:"Miles",abv:"mi"}];return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx("div",{className:`cm-modal-header ${t}`,children:"Identify Buffer Settings"}),jsxRuntime.jsxs("div",{className:"cm-modal-body",children:[jsxRuntime.jsx("h6",{children:"Please choose a supported unit below:"}),d.map(m=>jsxRuntime.jsx("button",{name:m.abv,className:`cm-btn cm-btn-sm cm-btn-block cm-btn-default ${r===m.abv?"active":""}`,type:"button",onClick:s,children:m.name},m.abv))]}),jsxRuntime.jsx("div",{className:"cm-modal-footer",children:jsxRuntime.jsx("button",{className:`cm-btn cm-btn-sm cm-btn-theme ${t}`,onClick:o,children:"Cancel"})})]})},IdentifyBufferSettings=connect("doUpdateBufferUnit","doModalClose","selectIdentifyBufferUnit","selectTheme",IdentifyBufferSettings$1),interactions={dragbox:DragBox,draw:Draw,modify:Modify,snap:Snap,select:Select$1},createInteraction=e=>{const t=_.omit(e,["on","interaction"]);if(!interactions.hasOwnProperty(e.interaction))throw new Error(`${e.interaction} is not a valid interaction`);const r=new interactions[e.interaction](t);return e.on&&e.on.length&&e.on.forEach(s=>{r.on(s.event,s.listener,s.scope)}),r},style=new style$3.Style({fill:new style$3.Fill({color:"rgba(84, 240, 240, 0.3)"}),stroke:new style$3.Stroke({color:"rgb(84, 240, 240)",width:1}),image:new style$3.Circle({radius:5,stroke:new style$3.Stroke({color:"rgb(84, 240, 240)",width:1}),fill:new style$3.Fill({color:"rgba(84, 240, 240, 0.3)"})})}),polygonLayer=getLayer({serviceType:"LocalVector",visible:!0,geometryType:"Polygon",style,zIndex:1e3}),polygonDraw=createInteraction({interaction:"draw",source:polygonLayer.getSource(),type:"Polygon"}),pointLayer=getLayer({serviceType:"LocalVector",visible:!0,geometryType:"Point",style,zIndex:1e3}),pointDraw=createInteraction({interaction:"draw",source:polygonLayer.getSource(),type:"Point"}),bufferLayer=getLayer({serviceType:"LocalVector",visible:!0,geometryType:"Polygon",style:new style$3.Style({fill:new style$3.Fill({color:"rgba(192,192,192,0.4)"}),stroke:new style$3.Stroke({color:"rgba(192,192,192,1)",width:1}),image:new style$3.Circle({radius:5,stroke:new style$3.Stroke({color:"rgba(192,192,192,1)",width:1}),fill:new style$3.Fill({color:"rgba(192,192,192,0.4)"})})}),zIndex:1e3}),identify={overlays:[]},bundle$d={name:"identifyUi",getReducer(){const e={selectBy:null,displayAs:"sidebar",bufferUnit:"km",bufferUnitFull:"kilometers",bufferValue:"",bufferFeature:null,shouldQuery:!1,shouldRenderResults:!1,shouldRenderDetails:!1,geom:null,results:[],selectedFeature:null,selectedLayer:null,identifyColumnsExclude:[]};return(t=e,{type:r,payload:s})=>{switch(r){case"IDENTIFY_UI_STARTED":case"IDENTIFY_UI_STOPPED":case"IDENTIFY_UI_DISPLAY_AS":case"IDENTIFY_UI_RESULTS_DISPLAYED":case"IDENTIFY_UI_RESULT_PICKED":case"IDENTIFY_UI_DETAILS_DISPLAYED":case"IDENTIFY_UI_TABLE_DISPLAYED":case"IDENTIFY_UI_NO_RESULTS_RETURNED":case"IDENTIFY_UI_BUFFER_SETTINGS_OPENED":case"IDENTIFY_UI_BUFFER_UNIT_UPDATED":case"IDENTIFY_UI_BUFFER_VALUE_UPDATED":case"IDENTIFY_UI_BUFFER_FEATURE_UPDATED":case"IDENTIFY_EXCLUDED_COLUMNS_SET":return Object.assign({},t,s);case"IDENTIFY_ERROR":return Object.assign({},t,{selectBy:null});case"IDENTIFY_SUCCESS":return Object.assign({},t,{shouldRenderResults:!0,selectBy:null});default:return t}}},doToggleIdentifyView:e=>({dispatch:t,store:r})=>{switch(r.selectIdentifyDisplayAs()){case"sidebar":r.doPrimaryPanelClose(),r.doRenderIdentifyTable();break;case"table":r.doSouthRegionClose(),r.doRenderIdentifySidebar();break}r.doSetDisplayAs(null,e)},doUpdateIdentifyBuffer:e=>({dispatch:t,store:r})=>{e.preventDefault(),e.stopPropagation(),t({type:"IDENTIFY_UI_BUFFER_VALUE_UPDATED",payload:{bufferValue:e.target.value}})},doStartIdentify:e=>({dispatch:t,store:r})=>{r.selectMap().interactions.array_.forEach(d=>{d.ol_uid=="43"&&(d.values_.active=!1)}),e.preventDefault(),e.stopPropagation();const o=e.currentTarget.dataset.selectby;t({type:"IDENTIFY_UI_STARTED",payload:{selectBy:o}}),r.doAddIdentifyInteractions()},doAddIdentifyInteractions:()=>({store:e})=>{const t=e.selectIdentifySelectBy();e.doRemoveIdentifyInteractions(),t==="point"?e.doIdentifyByPoint():t==="polygon"&&e.doIdentifyByPolygon()},doRemoveIdentifyInteractions:()=>({dispatch:e,store:t})=>{t.doSetCursor();const r=t.selectMap();r.removeInteraction(pointDraw),r.removeInteraction(polygonDraw)},doSetIdentifyGeom:e=>({store:t})=>{e.preventDefault(),e.stopPropagation();const r=t.selectMap(),o=e.feature.getGeometry();pointLayer.getSource().clear(),polygonLayer.getSource().clear(),bufferLayer.getSource().clear(),r.removeLayer(pointLayer),r.removeLayer(polygonLayer),r.removeLayer(bufferLayer),t.doRenderIdentifyGeometry(o),t.doIdentifySetCoords(o)},doRenderIdentifyGeometry:e=>({store:t})=>{const r=t.selectMap(),s=t.selectIdentifySelectBy(),o=e.getCoordinates();s==="point"?(pointLayer.getSource().addFeature(new Feature({geometry:new Point(o)})),t.doRenderIdentifyBufferPoint(new Point(o)),r.addLayer(pointLayer)):(polygonLayer.getSource().addFeature(new Feature({geometry:new Polygon(o)})),t.doRenderIdentifyBufferPolygon(new Polygon(o)),r.addLayer(polygonLayer)),t.doPauseIdentify()},doRenderIdentifyBufferPoint:e=>({dispatch:t,store:r})=>{const s=r.selectIdentifyBufferValue();if(!s.length)return;const o=r.selectMap(),d=r.selectIdentifyBufferUnitFull(),m=r.selectDisplayProjection(),g=e.transform("EPSG:3857",m),y=point(g.getCoordinates()),b=bufferLayer.getSource();b.clear();const x=index_default$1(y,Number(s),{units:d}),E=new GeoJSON().readFeature(x,{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"});b.addFeature(E),o.addLayer(bufferLayer),t({type:"IDENTIFY_UI_BUFFER_FEATURE_UPDATED",payload:{bufferFeature:x}})},doRenderIdentifyBufferPolygon:e=>({dispatch:t,store:r})=>{const s=r.selectIdentifyBufferValue();if(!s.length)return;const o=r.selectMap(),d=r.selectIdentifyBufferUnitFull(),m=r.selectDisplayProjection(),g=e.transform("EPSG:3857",m),y=polygon(g.getCoordinates()),b=bufferLayer.getSource();b.clear();const x=index_default$1(y,Number(s),{units:d}),E=new GeoJSON().readFeature(x,{dataProjection:"EPSG:4326",featureProjection:"EPSG:3857"});b.addFeature(E),o.addLayer(bufferLayer),t({type:"IDENTIFY_UI_BUFFER_FEATURE_UPDATED",payload:{bufferFeature:x}})},doIdentifyByPoint:()=>({dispatch:e,store:t})=>{t.doSetCursor("default"),t.selectMap().addInteraction(pointDraw)},doIdentifyByPolygon:()=>({dispatch:e,store:t})=>{t.doSetCursor("default"),t.selectMap().addInteraction(polygonDraw)},doPauseIdentify:()=>({dispatch:e,store:t})=>{t.doRemoveIdentifyInteractions(),e({type:"IDENTIFY_UI_STOPPED",payload:{selectBy:null}})},doStopIdentify:()=>({dispatch:e,store:t})=>{const r=t.selectMap(),s=t.selectIdentifyDisplayAs();switch(t.doRemoveIdentifyInteractions(),r.removeLayer(pointLayer),r.removeLayer(polygonLayer),r.removeLayer(bufferLayer),s){case"popup":t.doClearIdentifyPopups();break;case"sidebar":t.doPrimaryPanelClose();break;case"table":t.doSouthRegionClose();break}t.doBasicToolbarDeactivate(),r.interactions.array_.forEach(o=>{o.ol_uid=="43"&&(o.values_.active=!0)}),e({type:"IDENTIFY_UI_STOPPED",payload:{selectBy:null}})},doSetDisplayAs:(e,t)=>({dispatch:r})=>{let s=null;e?(e.preventDefault(),e.stopPropagation(),s=e.currentTarget.dataset.displayas):s=t,r({type:"IDENTIFY_UI_DISPLAY_AS",payload:{displayAs:s}})},doRenderIdentifyPopups:()=>({dispatch:e,store:t})=>{e({type:"IDENTIFY_UI_RESULTS_DISPLAYED",payload:{shouldRenderResults:!1}});const r=t.selectMap(),s=t.selectIdentifyResults(),o=t.selectIdentifyCoordinates();let d=o;o.length===1&&(d=o[0][0]),s.forEach(m=>{Object.keys(m.result).forEach(g=>{const y=m.result[g];y&&y.features&&y.features.length?y.features.forEach(b=>{const x=document.createElement("div"),E=new Overlay$1({element:x,positioning:"bottom-center",offset:[0,-10]});r.addOverlay(E),ReactDOM.render(jsxRuntime.jsx(IdentifyPopup,{overlay:E,feature:b,map:r,onClear:t.doClearOverlay}),x),E.setPosition(proj.transform(d,"EPSG:4326","EPSG:3857")),identify.overlays.push(E)}):e({type:"IDENTIFY_UI_NO_RESULTS_RETURNED",payload:{notification:{message:`No results at this location for ${m.layerName}`,level:"warning"}}})})})},doClearOverlay:e=>({store:t})=>{const r=t.selectMap();if(identify.overlays&&identify.overlays.length){const s=identify.overlays.indexOf(e);e.setPosition(void 0);const o=e.getElement();o.parentNode.removeChild(o),r.removeOverlay(e),identify.overlays.splice(s,1)}},doClearIdentifyPopups:()=>({store:e})=>{const t=e.selectMap();identify.overlays&&identify.overlays.length&&(identify.overlays.forEach(r=>{r.setPosition(void 0);const s=r.getElement();s.parentNode.removeChild(s),t.removeOverlay(r)}),identify.overlays=[])},doRenderIdentifySidebar:()=>({dispatch:e,store:t})=>{e({type:"IDENTIFY_UI_RESULTS_DISPLAYED",payload:{shouldRenderResults:!1}});const r=t.selectIdentifyResults();if(r.length)for(let s=0;s<r.length;s++){const o=Object.keys(r[s].result);for(let d=0;d<o.length;d++){const m=r[s].result[o[d]];if(m&&m.features&&m.features.length){t.doPrimaryPanelOpen({openedBy:"IdentifyTools",children:[IdentifySidebar]});break}else e({type:"IDENTIFY_UI_NO_RESULTS_RETURNED",payload:{notification:{message:`No results at this location for ${r[s].layerName}`,level:"warning"}}})}}},doOpenIdentifyDetails:(e,t)=>({dispatch:r})=>{r({type:"IDENTIFY_UI_RESULT_PICKED",payload:{selectedFeature:e,selectedLayer:t,shouldRenderDetails:!0}})},doRenderIdentifyDetails:()=>({dispatch:e,store:t})=>{e({type:"IDENTIFY_UI_DETAILS_DISPLAYED",payload:{shouldRenderDetails:!1}}),t.doPrimaryPanelOpen({openedBy:"IdentifyTools",children:[IdentifyDetails]})},doRenderIdentifyTable:()=>({dispatch:e,store:t})=>{e({type:"IDENTIFY_UI_RESULTS_DISPLAYED",payload:{shouldRenderResults:!1}});const r=t.selectIdentifyResults(),s=t.selectCmLayerNames(),o=t.selectUidMap(),d=/[:](.+)/i;r.forEach(m=>{const g=m.dataset,y=find(s,{teamDatasetId:g}),b=y?y.displayName:o[g];Object.keys(m.result).forEach(x=>{const E=m.result[x],C=d.exec(x),S=C&&C[0]!==b?C[0]:"";E&&E.features&&E.features.length?t.doSouthRegionOpen({component:IdentifyTable,options:{features:E.features},openedBy:"identify",displayName:`${b}${S}`}):e({type:"IDENTIFY_UI_NO_RESULTS_RETURNED",payload:{notification:{message:`No results at this location for ${m.layerName}`,level:"warning"}}})})})},doShowBufferUnits:e=>({dispatch:t,store:r})=>{e.preventDefault(),e.stopPropagation(),r.doModalOpen({children:[IdentifyBufferSettings],options:{smSize:!0},openedBy:"Identify Tool"}),t({type:"IDENTIFY_UI_BUFFER_SETTINGS_OPENED"})},doUpdateBufferUnit:e=>({dispatch:t,store:r})=>{e.preventDefault(),e.stopPropagation(),t({type:"IDENTIFY_UI_BUFFER_UNIT_UPDATED",payload:{bufferUnit:e.target.name,bufferUnitFull:e.target.textContent.toLowerCase()}}),r.doModalClose()},doSetIdentifyColumnsExclude:e=>({dispatch:t})=>{t({type:"IDENTIFY_EXCLUDED_COLUMNS_SET",payload:{identifyColumnsExclude:e}})},selectIdentifyColumnsExclude:e=>e.identifyUi.identifyColumnsExclude,selectIdentifySelectBy:e=>e.identifyUi.selectBy,selectIdentifyDisplayAs:e=>e.identifyUi.displayAs,selectIdentifyDetailFeature:e=>e.identifyUi.selectedFeature,selectIdentifyDetailLayer:e=>e.identifyUi.selectedLayer,selectIdentifyBufferUnit:e=>e.identifyUi.bufferUnit,selectIdentifyBufferUnitFull:e=>e.identifyUi.bufferUnitFull,selectIdentifyBufferValue:e=>e.identifyUi.bufferValue,selectIdentifyBufferFeature:e=>e.identifyUi.bufferFeature,reactShouldRunIdentify:e=>{if(e.identifyUi.shouldQuery)return{actionCreator:"doIdentify"}},reactShouldRenderIdentifyResults:e=>{if(e.identifyUi.shouldRenderResults){if(e.identifyUi.displayAs==="popup")return{actionCreator:"doRenderIdentifyPopups"};if(e.identifyUi.displayAs==="sidebar")return{actionCreator:"doRenderIdentifySidebar"};if(e.identifyUi.displayAs==="table")return{actionCreator:"doRenderIdentifyTable"}}},reactShouldRenderIdentifyDetails:e=>{if(e.identifyUi.shouldRenderDetails)return{actionCreator:"doRenderIdentifyDetails"}},init:e=>{pointDraw.on("drawend",e.doSetIdentifyGeom),polygonDraw.on("drawend",e.doSetIdentifyGeom)}},esrijsonFormat=new EsriJSON$1;function formatUrl(e){let t=`${e.root}/identify?`;const r=[];for(var s in e)s!=="root"&&r.push(s+"="+e[s].toString());return t+=r.join("&"),t}const ArcGisListener={name:"arcGisRestIdent",getReducer(){const e={shouldRegister:!0};return(t=e,{type:r,payload:s})=>r==="ARCGIS_IDENT_REGISTERED"?Object.assign({},t,s):t},doArcGisRestIdentRegister:()=>({dispatch:e,store:t})=>{e({type:"ARCGIS_IDENT_REGISTERED",payload:{shouldRegister:!1}}),t.doIdentifyAddCollection({onIdentify:t.doArcGisRestIdentFire})},doArcGisRestIdentFire:e=>({store:t,anonGet:r})=>{const s=t.selectVisibleLayers();if(!s.length)return e(null,[]);const o=[],d=t.doSetIdentifyFeature();let m=t.selectIdentifyColumnsExclude();const g={sr:4326,tolerance:2,returnGeometry:!0,mapExtent:t.selectMapExtent(),imageDisplay:t.selectMapImageDisplay(),f:"json",geometryType:"esriGeometryPolygon",geometry:encodeURIComponent(JSON.stringify({spatialReference:{wkid:4326},rings:[d.geometry.coordinates[0]]}))};s.forEach(y=>{if(y.identifyType&&y.identifyType==="arcgisrest"){const b=y.layerList;g.layers=`all:${b}`;const x=Object.assign({},g,{root:y.url}),E=formatUrl(x);o.push(C=>{r(E,(S,A,N)=>{if(S||A.statusCode!==200)C(null,{dataset:y.uid,layerName:y.displayName,err:`Error for ${y.displayName}`,result:{[y.uid]:{}}});else try{let k=JSON.parse(N);k.results.length?(k=identifyColumnsArcgisrest(k,m),C(null,{dataset:y.uid,layerName:y.displayName,err:null,result:{[y.uid]:{type:"FeatureCollection",features:k.results.map(L=>{const M=esrijsonFormat.readFeature(L,{featureProjection:"EPSG:3857"}).getGeometry();return{type:"Feature",geometry:{type:M.getType(),coordinates:M.getCoordinates()},properties:formatArcgisrest(L.attributes)}})}}})):C(null,{dataset:y.uid,layerName:y.displayName,err:null,result:{[y.uid]:{}}})}catch(k){console.log(k),C(null,{dataset:y.uid,layerName:y.displayName,err:`Error for ${y.displayName}`,result:{[y.uid]:{}}})}})})}}),async.parallel(o,(y,b)=>{e(y,b)})},reactArcGisRestIdentShouldRegister:e=>{if(e.arcGisRestIdent.shouldRegister)return{actionCreator:"doArcGisRestIdentRegister"}}},geoJSON$1=new GeoJSON,VectorListener={name:"vectorIdent",getReducer(){const e={shouldRegister:!0};return(t=e,{type:r,payload:s})=>r==="VECTOR_IDENT_REGISTERED"?Object.assign({},t,s):t},doVectorIdentRegister:()=>({dispatch:e,store:t})=>{e({type:"VECTOR_IDENT_REGISTERED",payload:{shouldRegister:!1}}),t.doIdentifyAddCollection({onIdentify:t.doVectorIdentFire})},doVectorIdentFire:e=>({store:t})=>{const r=t.selectVisibleLayers(),s=t.doSetIdentifyFeature(),o=[],d=proj.transformExtent(index_default$2(s),"EPSG:4326","EPSG:3857");return r.forEach(m=>{if(m.identifyType&&m.identifyType==="arcgisvector"){const{mapLayer:g}=m;let y=[];const b=g.getSource();let x=t.selectIdentifyColumnsExclude();const E=m.identifyFields,C=m.identifyRenameColums,S=m.identifyFormatColumns;b.forEachFeatureIntersectingExtent(d,A=>{const N=geoJSON$1.writeFeatureObject(A,{featureProjection:"EPSG:3857",dataProjection:"EPSG:4326"});index_default(s,N)||y.push(N)}),y=identifyExcludeColumnsArcgisvector(y,x),E&&(y=identifyIncludeColumnsArcgisvector(y,E)),C&&(y=identifyRenameColumnsArcgisvector(y,C)),S&&(y=identifyFormatColumnsArcgisvector(y,S)),o.push({dataset:m.uid,layerName:m.displayName,err:null,result:{[m.uid]:{type:"FeatureCollection",features:formatArcgisVector(y)}}})}}),e(null,o)},reactVectorIdentShouldRegister:e=>{if(e.vectorIdent.shouldRegister)return{actionCreator:"doVectorIdentRegister"}}},plugin$g={pluginName:"IdentifyTools",enabled:!0,bundle:[bundle$d,ArcGisListener,VectorListener],components:[{component:IdentifyButton,region:"basic-toolbar",sortOrder:90}]};var _createBaseFor,hasRequired_createBaseFor;function require_createBaseFor(){if(hasRequired_createBaseFor)return _createBaseFor;hasRequired_createBaseFor=1;function e(t){return function(r,s,o){for(var d=-1,m=Object(r),g=o(r),y=g.length;y--;){var b=g[t?y:++d];if(s(m[b],b,m)===!1)break}return r}}return _createBaseFor=e,_createBaseFor}var _baseFor,hasRequired_baseFor;function require_baseFor(){if(hasRequired_baseFor)return _baseFor;hasRequired_baseFor=1;var e=require_createBaseFor(),t=e();return _baseFor=t,_baseFor}var _baseForOwn,hasRequired_baseForOwn;function require_baseForOwn(){if(hasRequired_baseForOwn)return _baseForOwn;hasRequired_baseForOwn=1;var e=require_baseFor(),t=requireKeys();function r(s,o){return s&&e(s,o,t)}return _baseForOwn=r,_baseForOwn}var _createBaseEach,hasRequired_createBaseEach;function require_createBaseEach(){if(hasRequired_createBaseEach)return _createBaseEach;hasRequired_createBaseEach=1;var e=requireIsArrayLike();function t(r,s){return function(o,d){if(o==null)return o;if(!e(o))return r(o,d);for(var m=o.length,g=s?m:-1,y=Object(o);(s?g--:++g<m)&&d(y[g],g,y)!==!1;);return o}}return _createBaseEach=t,_createBaseEach}var _baseEach,hasRequired_baseEach;function require_baseEach(){if(hasRequired_baseEach)return _baseEach;hasRequired_baseEach=1;var e=require_baseForOwn(),t=require_createBaseEach(),r=t(e);return _baseEach=r,_baseEach}var _baseMap,hasRequired_baseMap;function require_baseMap(){if(hasRequired_baseMap)return _baseMap;hasRequired_baseMap=1;var e=require_baseEach(),t=requireIsArrayLike();function r(s,o){var d=-1,m=t(s)?Array(s.length):[];return e(s,function(g,y,b){m[++d]=o(g,y,b)}),m}return _baseMap=r,_baseMap}var _baseSortBy,hasRequired_baseSortBy;function require_baseSortBy(){if(hasRequired_baseSortBy)return _baseSortBy;hasRequired_baseSortBy=1;function e(t,r){var s=t.length;for(t.sort(r);s--;)t[s]=t[s].value;return t}return _baseSortBy=e,_baseSortBy}var _compareAscending,hasRequired_compareAscending;function require_compareAscending(){if(hasRequired_compareAscending)return _compareAscending;hasRequired_compareAscending=1;var e=requireIsSymbol();function t(r,s){if(r!==s){var o=r!==void 0,d=r===null,m=r===r,g=e(r),y=s!==void 0,b=s===null,x=s===s,E=e(s);if(!b&&!E&&!g&&r>s||g&&y&&x&&!b&&!E||d&&y&&x||!o&&x||!m)return 1;if(!d&&!g&&!E&&r<s||E&&o&&m&&!d&&!g||b&&o&&m||!y&&m||!x)return-1}return 0}return _compareAscending=t,_compareAscending}var _compareMultiple,hasRequired_compareMultiple;function require_compareMultiple(){if(hasRequired_compareMultiple)return _compareMultiple;hasRequired_compareMultiple=1;var e=require_compareAscending();function t(r,s,o){for(var d=-1,m=r.criteria,g=s.criteria,y=m.length,b=o.length;++d<y;){var x=e(m[d],g[d]);if(x){if(d>=b)return x;var E=o[d];return x*(E=="desc"?-1:1)}}return r.index-s.index}return _compareMultiple=t,_compareMultiple}var _baseOrderBy,hasRequired_baseOrderBy;function require_baseOrderBy(){if(hasRequired_baseOrderBy)return _baseOrderBy;hasRequired_baseOrderBy=1;var e=require_arrayMap(),t=require_baseGet(),r=require_baseIteratee(),s=require_baseMap(),o=require_baseSortBy(),d=require_baseUnary(),m=require_compareMultiple(),g=requireIdentity(),y=requireIsArray();function b(x,E,C){E.length?E=e(E,function(N){return y(N)?function(k){return t(k,N.length===1?N[0]:N)}:N}):E=[g];var S=-1;E=e(E,d(r));var A=s(x,function(N,k,L){var G=e(E,function(M){return M(N)});return{criteria:G,index:++S,value:N}});return o(A,function(N,k){return m(N,k,C)})}return _baseOrderBy=b,_baseOrderBy}var _apply,hasRequired_apply;function require_apply(){if(hasRequired_apply)return _apply;hasRequired_apply=1;function e(t,r,s){switch(s.length){case 0:return t.call(r);case 1:return t.call(r,s[0]);case 2:return t.call(r,s[0],s[1]);case 3:return t.call(r,s[0],s[1],s[2])}return t.apply(r,s)}return _apply=e,_apply}var _overRest,hasRequired_overRest;function require_overRest(){if(hasRequired_overRest)return _overRest;hasRequired_overRest=1;var e=require_apply(),t=Math.max;function r(s,o,d){return o=t(o===void 0?s.length-1:o,0),function(){for(var m=arguments,g=-1,y=t(m.length-o,0),b=Array(y);++g<y;)b[g]=m[o+g];g=-1;for(var x=Array(o+1);++g<o;)x[g]=m[g];return x[o]=d(b),e(s,this,x)}}return _overRest=r,_overRest}var constant_1,hasRequiredConstant;function requireConstant(){if(hasRequiredConstant)return constant_1;hasRequiredConstant=1;function e(t){return function(){return t}}return constant_1=e,constant_1}var _defineProperty,hasRequired_defineProperty;function require_defineProperty(){if(hasRequired_defineProperty)return _defineProperty;hasRequired_defineProperty=1;var e=require_getNative(),t=(function(){try{var r=e(Object,"defineProperty");return r({},"",{}),r}catch{}})();return _defineProperty=t,_defineProperty}var _baseSetToString,hasRequired_baseSetToString;function require_baseSetToString(){if(hasRequired_baseSetToString)return _baseSetToString;hasRequired_baseSetToString=1;var e=requireConstant(),t=require_defineProperty(),r=requireIdentity(),s=t?function(o,d){return t(o,"toString",{configurable:!0,enumerable:!1,value:e(d),writable:!0})}:r;return _baseSetToString=s,_baseSetToString}var _shortOut,hasRequired_shortOut;function require_shortOut(){if(hasRequired_shortOut)return _shortOut;hasRequired_shortOut=1;var e=800,t=16,r=Date.now;function s(o){var d=0,m=0;return function(){var g=r(),y=t-(g-m);if(m=g,y>0){if(++d>=e)return arguments[0]}else d=0;return o.apply(void 0,arguments)}}return _shortOut=s,_shortOut}var _setToString,hasRequired_setToString;function require_setToString(){if(hasRequired_setToString)return _setToString;hasRequired_setToString=1;var e=require_baseSetToString(),t=require_shortOut(),r=t(e);return _setToString=r,_setToString}var _baseRest,hasRequired_baseRest;function require_baseRest(){if(hasRequired_baseRest)return _baseRest;hasRequired_baseRest=1;var e=requireIdentity(),t=require_overRest(),r=require_setToString();function s(o,d){return r(t(o,d,e),o+"")}return _baseRest=s,_baseRest}var _isIterateeCall,hasRequired_isIterateeCall;function require_isIterateeCall(){if(hasRequired_isIterateeCall)return _isIterateeCall;hasRequired_isIterateeCall=1;var e=requireEq(),t=requireIsArrayLike(),r=require_isIndex(),s=requireIsObject();function o(d,m,g){if(!s(g))return!1;var y=typeof m;return(y=="number"?t(g)&&r(m,g.length):y=="string"&&m in g)?e(g[m],d):!1}return _isIterateeCall=o,_isIterateeCall}var sortBy_1,hasRequiredSortBy;function requireSortBy(){if(hasRequiredSortBy)return sortBy_1;hasRequiredSortBy=1;var e=require_baseFlatten(),t=require_baseOrderBy(),r=require_baseRest(),s=require_isIterateeCall(),o=r(function(d,m){if(d==null)return[];var g=m.length;return g>1&&s(d,m[0],m[1])?m=[]:g>2&&s(m[0],m[1],m[2])&&(m=[m[0]]),t(d,e(m,1),[])});return sortBy_1=o,sortBy_1}var sortByExports=requireSortBy();const sortBy=getDefaultExportFromCjs$1(sortByExports);let ToggleExpand$1=class extends React.Component{constructor(t){super(t),this.toggleExpanded=this.toggleExpanded.bind(this)}toggleExpanded(t){t.preventDefault(),t.stopPropagation(),this.props.doTreeViewToggleExpand()}render(){const{treeViewToggleExpanded:t}=this.props,r="",s=t?"Expand All Folders":"Collapse All Folders",o=classnames({"icon-inline":!1,mdi:!0,"mdi-plus-box-outline":t,"mdi-minus-box-outline":!t});return jsxRuntime.jsxs("button",{className:"cm-btn cm-btn-default cm-btn-xs",onClick:this.toggleExpanded,style:{marginRight:"5px"},title:s,children:[jsxRuntime.jsx("i",{className:o}),r]})}};const ToggleExpand=connect("selectTreeViewToggleExpanded","doTreeViewToggleExpand",ToggleExpand$1);let AddAll$1=class extends React.Component{constructor(t){super(t),this.addAllLayers=this.addAllLayers.bind(this)}addAllLayers(t){t.preventDefault(),t.stopPropagation(),this.props.doTreeViewAddAll()}render(){return jsxRuntime.jsx("button",{className:"cm-btn cm-btn-default cm-btn-xs",style:{marginRight:"5px"},title:"Add All Layers",onClick:this.addAllLayers,children:jsxRuntime.jsx("i",{className:"mdi mdi-layers-triple"})})}};const AddAll=connect("doTreeViewAddAll",AddAll$1);let RemoveAll$1=class extends React.Component{constructor(t){super(t),this.removeAllLayers=this.removeAllLayers.bind(this)}removeAllLayers(t){t.preventDefault(),t.stopPropagation(),this.props.doTreeViewRemoveAll()}render(){return jsxRuntime.jsx("button",{className:"cm-btn cm-btn-default cm-btn-xs",style:{marginRight:"5px"},title:"Turn Off All Layers",onClick:this.removeAllLayers,children:jsxRuntime.jsx("i",{className:"mdi mdi-layers-triple-outline"})})}};const RemoveAll=connect("doTreeViewRemoveAll",RemoveAll$1);let ToggleFilter$1=class extends React.Component{constructor(t){super(t),this.toggleFilter=this.toggleFilter.bind(this)}toggleFilter(t){t.preventDefault(),t.stopPropagation(),this.props.toggleFilter()}render(){const{layerShowFilter:t}=this.props,r="",s=classnames({"icon-inline":!1,mdi:!0,"mdi-filter-plus-outline":!t,"mdi-filter-minus-outline":t});return jsxRuntime.jsxs("button",{onClick:this.toggleFilter,className:"cm-btn cm-btn-default cm-btn-xs",title:"Show/Hide Layer Filter",children:[jsxRuntime.jsx("i",{className:s}),r]})}};const ToggleFilter=connect("selectLayerShowFilter",ToggleFilter$1);let Favorites$1=class extends React.Component{constructor(t){super(t),this.toggleFavorites=this.toggleFavorites.bind(this)}toggleFavorites(t){t.preventDefault(),t.stopPropagation(),this.props.doToggleFavoritesView()}render(){const t=this.props.treeViewToggleFavoritesView?"mdi mdi-star":"mdi mdi-star-outline",r=this.props.treeViewToggleFavoritesView?"Hide Favorite Layers":"Show Favorite Layers";return jsxRuntime.jsx("button",{className:"cm-btn cm-btn-default cm-btn-xs",style:{margin:"0 5px"},title:r,onClick:this.toggleFavorites,children:jsxRuntime.jsx("i",{className:t})})}};const Favorites=connect("doToggleFavoritesView","selectTreeViewToggleFavoritesView",Favorites$1),decodeCache={};function getDecodeCache(e){let t=decodeCache[e];if(t)return t;t=decodeCache[e]=[];for(let r=0;r<128;r++){const s=String.fromCharCode(r);t.push(s)}for(let r=0;r<e.length;r++){const s=e.charCodeAt(r);t[s]="%"+("0"+s.toString(16).toUpperCase()).slice(-2)}return t}function decode$1(e,t){typeof t!="string"&&(t=decode$1.defaultChars);const r=getDecodeCache(t);return e.replace(/(%[a-f0-9]{2})+/gi,function(s){let o="";for(let d=0,m=s.length;d<m;d+=3){const g=parseInt(s.slice(d+1,d+3),16);if(g<128){o+=r[g];continue}if((g&224)===192&&d+3<m){const y=parseInt(s.slice(d+4,d+6),16);if((y&192)===128){const b=g<<6&1984|y&63;b<128?o+="��":o+=String.fromCharCode(b),d+=3;continue}}if((g&240)===224&&d+6<m){const y=parseInt(s.slice(d+4,d+6),16),b=parseInt(s.slice(d+7,d+9),16);if((y&192)===128&&(b&192)===128){const x=g<<12&61440|y<<6&4032|b&63;x<2048||x>=55296&&x<=57343?o+="���":o+=String.fromCharCode(x),d+=6;continue}}if((g&248)===240&&d+9<m){const y=parseInt(s.slice(d+4,d+6),16),b=parseInt(s.slice(d+7,d+9),16),x=parseInt(s.slice(d+10,d+12),16);if((y&192)===128&&(b&192)===128&&(x&192)===128){let E=g<<18&1835008|y<<12&258048|b<<6&4032|x&63;E<65536||E>1114111?o+="����":(E-=65536,o+=String.fromCharCode(55296+(E>>10),56320+(E&1023))),d+=9;continue}}o+="�"}return o})}decode$1.defaultChars=";/?:@&=+$,#",decode$1.componentChars="";const encodeCache={};function getEncodeCache(e){let t=encodeCache[e];if(t)return t;t=encodeCache[e]=[];for(let r=0;r<128;r++){const s=String.fromCharCode(r);/^[0-9a-z]$/i.test(s)?t.push(s):t.push("%"+("0"+r.toString(16).toUpperCase()).slice(-2))}for(let r=0;r<e.length;r++)t[e.charCodeAt(r)]=e[r];return t}function encode$1(e,t,r){typeof t!="string"&&(r=t,t=encode$1.defaultChars),typeof r>"u"&&(r=!0);const s=getEncodeCache(t);let o="";for(let d=0,m=e.length;d<m;d++){const g=e.charCodeAt(d);if(r&&g===37&&d+2<m&&/^[0-9a-f]{2}$/i.test(e.slice(d+1,d+3))){o+=e.slice(d,d+3),d+=2;continue}if(g<128){o+=s[g];continue}if(g>=55296&&g<=57343){if(g>=55296&&g<=56319&&d+1<m){const y=e.charCodeAt(d+1);if(y>=56320&&y<=57343){o+=encodeURIComponent(e[d]+e[d+1]),d++;continue}}o+="%EF%BF%BD";continue}o+=encodeURIComponent(e[d])}return o}encode$1.defaultChars=";/?:@&=+$,-_.!~*'()#",encode$1.componentChars="-_.!~*'()";function format(e){let t="";return t+=e.protocol||"",t+=e.slashes?"//":"",t+=e.auth?e.auth+"@":"",e.hostname&&e.hostname.indexOf(":")!==-1?t+="["+e.hostname+"]":t+=e.hostname||"",t+=e.port?":"+e.port:"",t+=e.pathname||"",t+=e.search||"",t+=e.hash||"",t}function Url(){this.protocol=null,this.slashes=null,this.auth=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.pathname=null}const protocolPattern=/^([a-z0-9.+-]+:)/i,portPattern=/:[0-9]*$/,simplePathPattern=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,delims=["<",">",'"',"`"," ","\r",`
144
144
  `," "],unwise=["{","}","|","\\","^","`"].concat(delims),autoEscape=["'"].concat(unwise),nonHostChars=["%","/","?",";","#"].concat(autoEscape),hostEndingChars=["/","?","#"],hostnameMaxLen=255,hostnamePartPattern=/^[+a-z0-9A-Z_-]{0,63}$/,hostnamePartStart=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,hostlessProtocol={javascript:!0,"javascript:":!0},slashedProtocol={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0};function urlParse(e,t){if(e&&e instanceof Url)return e;const r=new Url;return r.parse(e,t),r}Url.prototype.parse=function(e,t){let r,s,o,d=e;if(d=d.trim(),!t&&e.split("#").length===1){const b=simplePathPattern.exec(d);if(b)return this.pathname=b[1],b[2]&&(this.search=b[2]),this}let m=protocolPattern.exec(d);if(m&&(m=m[0],r=m.toLowerCase(),this.protocol=m,d=d.substr(m.length)),(t||m||d.match(/^\/\/[^@\/]+@[^@\/]+/))&&(o=d.substr(0,2)==="//",o&&!(m&&hostlessProtocol[m])&&(d=d.substr(2),this.slashes=!0)),!hostlessProtocol[m]&&(o||m&&!slashedProtocol[m])){let b=-1;for(let A=0;A<hostEndingChars.length;A++)s=d.indexOf(hostEndingChars[A]),s!==-1&&(b===-1||s<b)&&(b=s);let x,E;b===-1?E=d.lastIndexOf("@"):E=d.lastIndexOf("@",b),E!==-1&&(x=d.slice(0,E),d=d.slice(E+1),this.auth=x),b=-1;for(let A=0;A<nonHostChars.length;A++)s=d.indexOf(nonHostChars[A]),s!==-1&&(b===-1||s<b)&&(b=s);b===-1&&(b=d.length),d[b-1]===":"&&b--;const C=d.slice(0,b);d=d.slice(b),this.parseHost(C),this.hostname=this.hostname||"";const S=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!S){const A=this.hostname.split(/\./);for(let N=0,k=A.length;N<k;N++){const L=A[N];if(L&&!L.match(hostnamePartPattern)){let G="";for(let M=0,z=L.length;M<z;M++)L.charCodeAt(M)>127?G+="x":G+=L[M];if(!G.match(hostnamePartPattern)){const M=A.slice(0,N),z=A.slice(N+1),V=L.match(hostnamePartStart);V&&(M.push(V[1]),z.unshift(V[2])),z.length&&(d=z.join(".")+d),this.hostname=M.join(".");break}}}}this.hostname.length>hostnameMaxLen&&(this.hostname=""),S&&(this.hostname=this.hostname.substr(1,this.hostname.length-2))}const g=d.indexOf("#");g!==-1&&(this.hash=d.substr(g),d=d.slice(0,g));const y=d.indexOf("?");return y!==-1&&(this.search=d.substr(y),d=d.slice(0,y)),d&&(this.pathname=d),slashedProtocol[r]&&this.hostname&&!this.pathname&&(this.pathname=""),this},Url.prototype.parseHost=function(e){let t=portPattern.exec(e);t&&(t=t[0],t!==":"&&(this.port=t.substr(1)),e=e.substr(0,e.length-t.length)),e&&(this.hostname=e)};const mdurl=Object.freeze(Object.defineProperty({__proto__:null,decode:decode$1,encode:encode$1,format,parse:urlParse},Symbol.toStringTag,{value:"Module"})),Any=/[\0-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Cc=/[\0-\x1F\x7F-\x9F]/,regex$1=/[\xAD\u0600-\u0605\u061C\u06DD\u070F\u0890\u0891\u08E2\u180E\u200B-\u200F\u202A-\u202E\u2060-\u2064\u2066-\u206F\uFEFF\uFFF9-\uFFFB]|\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC3F]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]/,P=/[!-#%-\*,-\/:;\?@\[-\]_\{\}\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061D-\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u09FD\u0A76\u0AF0\u0C77\u0C84\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1B7D\u1B7E\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E4F\u2E52-\u2E5D\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2\uDF00-\uDF09]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDF43-\uDF4F\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]/,regex=/[\$\+<->\^`\|~\xA2-\xA6\xA8\xA9\xAC\xAE-\xB1\xB4\xB8\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0384\u0385\u03F6\u0482\u058D-\u058F\u0606-\u0608\u060B\u060E\u060F\u06DE\u06E9\u06FD\u06FE\u07F6\u07FE\u07FF\u0888\u09F2\u09F3\u09FA\u09FB\u0AF1\u0B70\u0BF3-\u0BFA\u0C7F\u0D4F\u0D79\u0E3F\u0F01-\u0F03\u0F13\u0F15-\u0F17\u0F1A-\u0F1F\u0F34\u0F36\u0F38\u0FBE-\u0FC5\u0FC7-\u0FCC\u0FCE\u0FCF\u0FD5-\u0FD8\u109E\u109F\u1390-\u1399\u166D\u17DB\u1940\u19DE-\u19FF\u1B61-\u1B6A\u1B74-\u1B7C\u1FBD\u1FBF-\u1FC1\u1FCD-\u1FCF\u1FDD-\u1FDF\u1FED-\u1FEF\u1FFD\u1FFE\u2044\u2052\u207A-\u207C\u208A-\u208C\u20A0-\u20C0\u2100\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A\u218B\u2190-\u2307\u230C-\u2328\u232B-\u2426\u2440-\u244A\u249C-\u24E9\u2500-\u2767\u2794-\u27C4\u27C7-\u27E5\u27F0-\u2982\u2999-\u29D7\u29DC-\u29FB\u29FE-\u2B73\u2B76-\u2B95\u2B97-\u2BFF\u2CE5-\u2CEA\u2E50\u2E51\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFF\u3004\u3012\u3013\u3020\u3036\u3037\u303E\u303F\u309B\u309C\u3190\u3191\u3196-\u319F\u31C0-\u31E3\u31EF\u3200-\u321E\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA490-\uA4C6\uA700-\uA716\uA720\uA721\uA789\uA78A\uA828-\uA82B\uA836-\uA839\uAA77-\uAA79\uAB5B\uAB6A\uAB6B\uFB29\uFBB2-\uFBC2\uFD40-\uFD4F\uFDCF\uFDFC-\uFDFF\uFE62\uFE64-\uFE66\uFE69\uFF04\uFF0B\uFF1C-\uFF1E\uFF3E\uFF40\uFF5C\uFF5E\uFFE0-\uFFE6\uFFE8-\uFFEE\uFFFC\uFFFD]|\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|\uD805\uDF3F|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|\uD82F\uDC9C|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDC-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF76\uDF7B-\uDFD9\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC5\uDECE-\uDEDB\uDEE0-\uDEE8\uDEF0-\uDEF8\uDF00-\uDF92\uDF94-\uDFCA]/,Z=/[ \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000]/,ucmicro=Object.freeze(Object.defineProperty({__proto__:null,Any,Cc,Cf:regex$1,P,S:regex,Z},Symbol.toStringTag,{value:"Module"})),htmlDecodeTree=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),xmlDecodeTree=new Uint16Array("Ȁaglq \x1Bɭ\0\0p;䀦os;䀧t;䀾t;䀼uot;䀢".split("").map(e=>e.charCodeAt(0)));var _a;const decodeMap=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]),fromCodePoint$1=(_a=String.fromCodePoint)!==null&&_a!==void 0?_a:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function replaceCodePoint(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=decodeMap.get(e))!==null&&t!==void 0?t:e}var CharCodes;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(CharCodes||(CharCodes={}));const TO_LOWER_BIT=32;var BinTrieFlags;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(BinTrieFlags||(BinTrieFlags={}));function isNumber(e){return e>=CharCodes.ZERO&&e<=CharCodes.NINE}function isHexadecimalCharacter(e){return e>=CharCodes.UPPER_A&&e<=CharCodes.UPPER_F||e>=CharCodes.LOWER_A&&e<=CharCodes.LOWER_F}function isAsciiAlphaNumeric(e){return e>=CharCodes.UPPER_A&&e<=CharCodes.UPPER_Z||e>=CharCodes.LOWER_A&&e<=CharCodes.LOWER_Z||isNumber(e)}function isEntityInAttributeInvalidEnd(e){return e===CharCodes.EQUALS||isAsciiAlphaNumeric(e)}var EntityDecoderState;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(EntityDecoderState||(EntityDecoderState={}));var DecodingMode;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(DecodingMode||(DecodingMode={}));class EntityDecoder{constructor(t,r,s){this.decodeTree=t,this.emitCodePoint=r,this.errors=s,this.state=EntityDecoderState.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=DecodingMode.Strict}startEntity(t){this.decodeMode=t,this.state=EntityDecoderState.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,r){switch(this.state){case EntityDecoderState.EntityStart:return t.charCodeAt(r)===CharCodes.NUM?(this.state=EntityDecoderState.NumericStart,this.consumed+=1,this.stateNumericStart(t,r+1)):(this.state=EntityDecoderState.NamedEntity,this.stateNamedEntity(t,r));case EntityDecoderState.NumericStart:return this.stateNumericStart(t,r);case EntityDecoderState.NumericDecimal:return this.stateNumericDecimal(t,r);case EntityDecoderState.NumericHex:return this.stateNumericHex(t,r);case EntityDecoderState.NamedEntity:return this.stateNamedEntity(t,r)}}stateNumericStart(t,r){return r>=t.length?-1:(t.charCodeAt(r)|TO_LOWER_BIT)===CharCodes.LOWER_X?(this.state=EntityDecoderState.NumericHex,this.consumed+=1,this.stateNumericHex(t,r+1)):(this.state=EntityDecoderState.NumericDecimal,this.stateNumericDecimal(t,r))}addToNumericResult(t,r,s,o){if(r!==s){const d=s-r;this.result=this.result*Math.pow(o,d)+parseInt(t.substr(r,d),o),this.consumed+=d}}stateNumericHex(t,r){const s=r;for(;r<t.length;){const o=t.charCodeAt(r);if(isNumber(o)||isHexadecimalCharacter(o))r+=1;else return this.addToNumericResult(t,s,r,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,s,r,16),-1}stateNumericDecimal(t,r){const s=r;for(;r<t.length;){const o=t.charCodeAt(r);if(isNumber(o))r+=1;else return this.addToNumericResult(t,s,r,10),this.emitNumericEntity(o,2)}return this.addToNumericResult(t,s,r,10),-1}emitNumericEntity(t,r){var s;if(this.consumed<=r)return(s=this.errors)===null||s===void 0||s.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===CharCodes.SEMI)this.consumed+=1;else if(this.decodeMode===DecodingMode.Strict)return 0;return this.emitCodePoint(replaceCodePoint(this.result),this.consumed),this.errors&&(t!==CharCodes.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,r){const{decodeTree:s}=this;let o=s[this.treeIndex],d=(o&BinTrieFlags.VALUE_LENGTH)>>14;for(;r<t.length;r++,this.excess++){const m=t.charCodeAt(r);if(this.treeIndex=determineBranch(s,o,this.treeIndex+Math.max(1,d),m),this.treeIndex<0)return this.result===0||this.decodeMode===DecodingMode.Attribute&&(d===0||isEntityInAttributeInvalidEnd(m))?0:this.emitNotTerminatedNamedEntity();if(o=s[this.treeIndex],d=(o&BinTrieFlags.VALUE_LENGTH)>>14,d!==0){if(m===CharCodes.SEMI)return this.emitNamedEntityData(this.treeIndex,d,this.consumed+this.excess);this.decodeMode!==DecodingMode.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:r,decodeTree:s}=this,o=(s[r]&BinTrieFlags.VALUE_LENGTH)>>14;return this.emitNamedEntityData(r,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,r,s){const{decodeTree:o}=this;return this.emitCodePoint(r===1?o[t]&~BinTrieFlags.VALUE_LENGTH:o[t+1],s),r===3&&this.emitCodePoint(o[t+2],s),s}end(){var t;switch(this.state){case EntityDecoderState.NamedEntity:return this.result!==0&&(this.decodeMode!==DecodingMode.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case EntityDecoderState.NumericDecimal:return this.emitNumericEntity(0,2);case EntityDecoderState.NumericHex:return this.emitNumericEntity(0,3);case EntityDecoderState.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case EntityDecoderState.EntityStart:return 0}}}function getDecoder(e){let t="";const r=new EntityDecoder(e,s=>t+=fromCodePoint$1(s));return function(o,d){let m=0,g=0;for(;(g=o.indexOf("&",g))>=0;){t+=o.slice(m,g),r.startEntity(d);const b=r.write(o,g+1);if(b<0){m=g+r.end();break}m=g+b,g=b===0?m+1:m}const y=t+o.slice(m);return t="",y}}function determineBranch(e,t,r,s){const o=(t&BinTrieFlags.BRANCH_LENGTH)>>7,d=t&BinTrieFlags.JUMP_TABLE;if(o===0)return d!==0&&s===d?r:-1;if(d){const y=s-d;return y<0||y>=o?-1:e[r+y]-1}let m=r,g=m+o-1;for(;m<=g;){const y=m+g>>>1,b=e[y];if(b<s)m=y+1;else if(b>s)g=y-1;else return e[y+o]}return-1}const htmlDecoder=getDecoder(htmlDecodeTree);getDecoder(xmlDecodeTree);function decodeHTML(e,t=DecodingMode.Legacy){return htmlDecoder(e,t)}function _class$1(e){return Object.prototype.toString.call(e)}function isString$1(e){return _class$1(e)==="[object String]"}const _hasOwnProperty=Object.prototype.hasOwnProperty;function has(e,t){return _hasOwnProperty.call(e,t)}function assign$1(e){return Array.prototype.slice.call(arguments,1).forEach(function(r){if(r){if(typeof r!="object")throw new TypeError(r+"must be object");Object.keys(r).forEach(function(s){e[s]=r[s]})}}),e}function arrayReplaceAt(e,t,r){return[].concat(e.slice(0,t),r,e.slice(t+1))}function isValidEntityCode(e){return!(e>=55296&&e<=57343||e>=64976&&e<=65007||(e&65535)===65535||(e&65535)===65534||e>=0&&e<=8||e===11||e>=14&&e<=31||e>=127&&e<=159||e>1114111)}function fromCodePoint(e){if(e>65535){e-=65536;const t=55296+(e>>10),r=56320+(e&1023);return String.fromCharCode(t,r)}return String.fromCharCode(e)}const UNESCAPE_MD_RE=/\\([!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~])/g,ENTITY_RE=/&([a-z#][a-z0-9]{1,31});/gi,UNESCAPE_ALL_RE=new RegExp(UNESCAPE_MD_RE.source+"|"+ENTITY_RE.source,"gi"),DIGITAL_ENTITY_TEST_RE=/^#((?:x[a-f0-9]{1,8}|[0-9]{1,8}))$/i;function replaceEntityPattern(e,t){if(t.charCodeAt(0)===35&&DIGITAL_ENTITY_TEST_RE.test(t)){const s=t[1].toLowerCase()==="x"?parseInt(t.slice(2),16):parseInt(t.slice(1),10);return isValidEntityCode(s)?fromCodePoint(s):e}const r=decodeHTML(e);return r!==e?r:e}function unescapeMd(e){return e.indexOf("\\")<0?e:e.replace(UNESCAPE_MD_RE,"$1")}function unescapeAll(e){return e.indexOf("\\")<0&&e.indexOf("&")<0?e:e.replace(UNESCAPE_ALL_RE,function(t,r,s){return r||replaceEntityPattern(t,s)})}const HTML_ESCAPE_TEST_RE=/[&<>"]/,HTML_ESCAPE_REPLACE_RE=/[&<>"]/g,HTML_REPLACEMENTS={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function replaceUnsafeChar(e){return HTML_REPLACEMENTS[e]}function escapeHtml(e){return HTML_ESCAPE_TEST_RE.test(e)?e.replace(HTML_ESCAPE_REPLACE_RE,replaceUnsafeChar):e}const REGEXP_ESCAPE_RE=/[.?*+^$[\]\\(){}|-]/g;function escapeRE$1(e){return e.replace(REGEXP_ESCAPE_RE,"\\$&")}function isSpace(e){switch(e){case 9:case 32:return!0}return!1}function isWhiteSpace(e){if(e>=8192&&e<=8202)return!0;switch(e){case 9:case 10:case 11:case 12:case 13:case 32:case 160:case 5760:case 8239:case 8287:case 12288:return!0}return!1}function isPunctChar(e){return P.test(e)||regex.test(e)}function isMdAsciiPunct(e){switch(e){case 33:case 34:case 35:case 36:case 37:case 38:case 39:case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:case 58:case 59:case 60:case 61:case 62:case 63:case 64:case 91:case 92:case 93:case 94:case 95:case 96:case 123:case 124:case 125:case 126:return!0;default:return!1}}function normalizeReference(e){return e=e.trim().replace(/\s+/g," "),"ẞ".toLowerCase()==="Ṿ"&&(e=e.replace(/ẞ/g,"ß")),e.toLowerCase().toUpperCase()}const lib={mdurl,ucmicro},utils=Object.freeze(Object.defineProperty({__proto__:null,arrayReplaceAt,assign:assign$1,escapeHtml,escapeRE:escapeRE$1,fromCodePoint,has,isMdAsciiPunct,isPunctChar,isSpace,isString:isString$1,isValidEntityCode,isWhiteSpace,lib,normalizeReference,unescapeAll,unescapeMd},Symbol.toStringTag,{value:"Module"}));function parseLinkLabel(e,t,r){let s,o,d,m;const g=e.posMax,y=e.pos;for(e.pos=t+1,s=1;e.pos<g;){if(d=e.src.charCodeAt(e.pos),d===93&&(s--,s===0)){o=!0;break}if(m=e.pos,e.md.inline.skipToken(e),d===91){if(m===e.pos-1)s++;else if(r)return e.pos=y,-1}}let b=-1;return o&&(b=e.pos),e.pos=y,b}function parseLinkDestination(e,t,r){let s,o=t;const d={ok:!1,pos:0,str:""};if(e.charCodeAt(o)===60){for(o++;o<r;){if(s=e.charCodeAt(o),s===10||s===60)return d;if(s===62)return d.pos=o+1,d.str=unescapeAll(e.slice(t+1,o)),d.ok=!0,d;if(s===92&&o+1<r){o+=2;continue}o++}return d}let m=0;for(;o<r&&(s=e.charCodeAt(o),!(s===32||s<32||s===127));){if(s===92&&o+1<r){if(e.charCodeAt(o+1)===32)break;o+=2;continue}if(s===40&&(m++,m>32))return d;if(s===41){if(m===0)break;m--}o++}return t===o||m!==0||(d.str=unescapeAll(e.slice(t,o)),d.pos=o,d.ok=!0),d}function parseLinkTitle(e,t,r,s){let o,d=t;const m={ok:!1,can_continue:!1,pos:0,str:"",marker:0};if(s)m.str=s.str,m.marker=s.marker;else{if(d>=r)return m;let g=e.charCodeAt(d);if(g!==34&&g!==39&&g!==40)return m;t++,d++,g===40&&(g=41),m.marker=g}for(;d<r;){if(o=e.charCodeAt(d),o===m.marker)return m.pos=d+1,m.str+=unescapeAll(e.slice(t,d)),m.ok=!0,m;if(o===40&&m.marker===41)return m;o===92&&d+1<r&&d++,d++}return m.can_continue=!0,m.str+=unescapeAll(e.slice(t,d)),m}const helpers=Object.freeze(Object.defineProperty({__proto__:null,parseLinkDestination,parseLinkLabel,parseLinkTitle},Symbol.toStringTag,{value:"Module"})),default_rules={};default_rules.code_inline=function(e,t,r,s,o){const d=e[t];return"<code"+o.renderAttrs(d)+">"+escapeHtml(d.content)+"</code>"},default_rules.code_block=function(e,t,r,s,o){const d=e[t];return"<pre"+o.renderAttrs(d)+"><code>"+escapeHtml(e[t].content)+`</code></pre>
145
145
  `},default_rules.fence=function(e,t,r,s,o){const d=e[t],m=d.info?unescapeAll(d.info).trim():"";let g="",y="";if(m){const x=m.split(/(\s+)/g);g=x[0],y=x.slice(2).join("")}let b;if(r.highlight?b=r.highlight(d.content,g,y)||escapeHtml(d.content):b=escapeHtml(d.content),b.indexOf("<pre")===0)return b+`
146
146
  `;if(m){const x=d.attrIndex("class"),E=d.attrs?d.attrs.slice():[];x<0?E.push(["class",r.langPrefix+g]):(E[x]=E[x].slice(),E[x][1]+=" "+r.langPrefix+g);const C={attrs:E};return`<pre><code${o.renderAttrs(C)}>${b}</code></pre>