{"size": 23807, "ext": "js", "max_stars_repo_path": "geonode_mapstore_client/static/mapstore/dist/8986.f997d46344730c49d959.chunk.js", "max_stars_repo_name": "bieganowski/geonode-mapstore-client", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "geonode_mapstore_client/static/mapstore/dist/8986.f997d46344730c49d959.chunk.js", "max_issues_repo_name": "bieganowski/geonode-mapstore-client", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "geonode_mapstore_client/static/mapstore/dist/8986.f997d46344730c49d959.chunk.js", "max_forks_repo_name": "bieganowski/geonode-mapstore-client", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 23807.0, "max_line_length": 23807, "alphanum_fraction": 0.682320326}
(self.webpackChunkgeonode_mapstore_client=self.webpackChunkgeonode_mapstore_client||[]).push([[8986],{32420:(e,t,r)=>{"use strict";r.r(t),r.d(t,{toDescribeURL:()=>d,getFeatureSimple:()=>f,getCapabilitiesURL:()=>m,getFeatureURL:()=>v,getFeature:()=>y,getCapabilities:()=>F,describeFeatureTypeOGCSchemas:()=>h,describeFeatureType:()=>b});var o=r(75875),n=r.n(o),i=r(8575),a=r(27418),l=r.n(a);function s(e,t){if(null==e)return{};var r,o,n=function(e,t){if(null==e)return{};var r,o,n={},i=Object.keys(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)r=i[o],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?c(Object(r),!0).forEach((function(t){g(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):c(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function g(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var d=function(e,t){var r=i.parse(e,!0);return i.format(p(p({},r),{},{search:void 0,query:p(p({},r.query),{},{service:"WFS",version:"1.1.0",typeName:t,outputFormat:"application/json",request:"DescribeFeatureType"})}))},f=function(e,t){return n().get(e+"?service=WFS&version=1.1.0&request=GetFeature",{params:l()({outputFormat:"application/json"},t)}).then((function(e){return"object"!==u(e.data)?JSON.parse(e.data):e.data}))},m=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.version,o=void 0===r?"1.1.0":r,n=i.parse(e,!0);return i.format(l()({},n,{query:l()({service:"WFS",version:o,request:"GetCapabilities"},n.query)}))},v=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.version,n=void 0===o?"1.1.0":o,a=s(r,["version"]),u=i.parse(e,!0);return i.format(l()({},u,{query:l()(p({service:"WFS",typeName:t,version:n,request:"GetFeature"},a),u.query)}))},y=function(e,t,r){return n().get(v(e,t,r))},F=function(e){return n().get(m(e))},h=function(e,t){var o=i.parse(e,!0),a=i.format(l()({},o,{query:l()({service:"WFS",version:"1.1.0",typeName:t,request:"DescribeFeatureType"},o.query)}));return new Promise((function(e){Promise.all([r.e(9942),r.e(7674)]).then(function(){var t=r(97674).unmarshaller;e(n().get(a).then((function(e){var r=t.unmarshalString(e.data);return r&&r.value})))}.bind(null,r)).catch(r.oe)}))},b=function(e,t){return n().get(d(e,t)).then((function(e){return e.data}))}},47805:(e,t,r)=>{"use strict";r.d(t,{toCQLFilter:()=>D,isFilterValid:()=>q});var o=r(65692),n=r(78889),i=r(99321),a=r(89291),l=r(89737),s=r.n(l),u=r(2245),c=r.n(u),p=r(90183),g=r(96486);function d(e){return function(e){if(Array.isArray(e))return f(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return f(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?f(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o}function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function v(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){y(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function y(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var F,h=function(e){return e&&e.replace?e.replace(/\'/g,"''"):e},b=function(e,t){return!(0,g.isNil)(e)&&"isNull"!==t||!(0,g.isUndefined)(e)&&"isNull"===t},w=function(e){return'"'+e+'"'},O=function(e){return e?"1.0"===e?"1.0.0":"1.1"===e?"1.1.0":e:"2.0"},S={ogc:{startTag:"<ogc:PropertyName>",endTag:"</ogc:PropertyName>"},fes:{startTag:"<fes:ValueReference>",endTag:"</fes:ValueReference>"}},L=function(e,t,r,o){var n;if("><"===t){if(r.startDate&&r.endDate){var a=r.startDate.toISOString?r.startDate.toISOString():r.startDate,l=r.endDate.toISOString?r.endDate.toISOString():r.endDate;n=i.ogcComparisonOperators[t](o,S[o].startTag+e+S[o].endTag+"<"+o+":LowerBoundary><"+o+":Literal>"+a+"</"+o+":Literal></"+o+":LowerBoundary><"+o+":UpperBoundary><"+o+":Literal>"+l+"</"+o+":Literal></"+o+":UpperBoundary>")}}else if(r.startDate){var s=r.startDate.toISOString?r.startDate.toISOString():r.startDate;n=i.ogcComparisonOperators[t](o,S[o].startTag+e+S[o].endTag+"<"+o+":Literal>"+s+"</"+o+":Literal>")}return n},C=function(e,t,r,o){var n;return b(r,t)&&(n="isNull"===t?i.ogcComparisonOperators[t](o,S[o].startTag+e+S[o].endTag):"="===t?i.ogcComparisonOperators[t](o,S[o].startTag+e+S[o].endTag+"<"+o+":Literal>"+r+"</"+o+":Literal>"):i.ogcComparisonOperators[t](o,S[o].startTag+e+S[o].endTag+"<"+o+":Literal>*"+r+"*</"+o+":Literal>")),n},N=function(e,t,r,o){var n="";return b(r,t)&&"="===t&&""!==r&&(n=i.ogcComparisonOperators[t](o,S[o].startTag+e+S[o].endTag+"<"+o+":Literal>"+r+"</"+o+":Literal>")),n},T=function(e,t,r,o){var n;if("><"===t)(0,g.isNil)(r)||null===r.lowBound||void 0===r.lowBound||null!==r.upBound&&void 0!==r.upBound?(0,g.isNil)(r)||null===r.upBound||void 0===r.upBound||null!==r.lowBound&&void 0!==r.lowBound?(0,g.isNil)(r)||null===r.upBound||void 0===r.upBound||null===r.lowBound||void 0===r.lowBound||(n=i.ogcComparisonOperators[t](o,S[o].startTag+e+S[o].endTag+"<"+o+":LowerBoundary><"+o+":Literal>"+r.lowBound+"</"+o+":Literal></"+o+":LowerBoundary><"+o+":UpperBoundary><"+o+":Literal>"+r.upBound+"</"+o+":Literal></"+o+":UpperBoundary>")):n=i.ogcComparisonOperators["<="](o,S[o].startTag+e+S[o].endTag+"<"+o+":Literal>"+r.upBound+"</"+o+":Literal>"):n=i.ogcComparisonOperators[">="](o,S[o].startTag+e+S[o].endTag+"<"+o+":Literal>"+r.lowBound+"</"+o+":Literal>");else{var a=(0,g.isNil)(r)||null===r.lowBound||void 0===r.lowBound?r:r.lowBound;(0,g.isNil)(a)||(n=i.ogcComparisonOperators[t](o,S[o].startTag+e+S[o].endTag+"<"+o+":Literal>"+a+"</"+o+":Literal>"))}return n},G=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.typeName,r=e.geometryName,o=e.cqlFilter,n=void 0===o?"INCLUDE":o;return"queryCollection('".concat(t,"', '").concat(r,"','").concat(h(n),"')")},j=function(e){return"collectGeometries(".concat(e,")")},B=function(e,t,r){var o,l,u,p,d,f,m,y=[];if(e.filterFields&&e.filterFields.length>0)""!==(o=e.groupFields&&e.groupFields.length>0?F.processOGCFilterGroup(e.groupFields[0],e,r):F.processOGCFilterFields(null,e,r))&&y.push(o);else if(e.simpleFilterFields&&e.simpleFilterFields.length>0){var h=i.ogcLogicalOperators.AND(r,e.simpleFilterFields.map((function(e){return function(e,t){var r="";switch(e.type){case"date":r=L(e.attribute,e.operator,e.values,t);break;case"number":r=T(e.attribute,e.operator,e.values,t);break;case"string":r=C(e.attribute,e.operator,e.values,t);break;case"boolean":r=N(e.attribute,e.operator,e.values,t);break;case"list":e.values&&e.values.length>0&&(r=e.values.reduce((function(r,o){var n=null===o||"null"===o?"isNull":"=";return r+C(e.attribute,n,o,t)}),""),r=i.ogcLogicalOperators.OR(t,r))}return r}(e,r)})).join(""));y.push(h)}if((0,g.isArray)(e.spatialField)?(p=(0,g.find)(e.spatialField,(function(e){return"BBOX"===e.operation})))||(u=e.spatialField):e.spatialField&&("BBOX"===e.spatialField.operation?p=e.spatialField:u=[e.spatialField]),p){if((0,g.isArray)(p.geometry&&p.geometry.extent[0])){var b=p.geometry.extent.reduce((function(e,o){var n=Object.assign({},p);return p.geometry.extent=o,e+F.processOGCSpatialFilter(t,n,r)}),"");l=i.ogcLogicalOperators.OR(r,b)}y.push(l)}else if(u&&(u=u.filter((function(e){return e&&e.geometry&&e.operation}))).length>0){var w=u.map((function(e){return F.processOGCSpatialFilter(t,e,r)})).join("");l=u.length>1?i.ogcLogicalOperators[e.spatialFieldOperator||"AND"](r,w):w,y.push(l)}if(e.crossLayerFilter&&e.crossLayerFilter.operation){var O=v(v({},e.crossLayerFilter),{},{attribute:e.crossLayerFilter.attribute});Array.isArray()?O.forEach((function(e){return y.push(F.processOGCCrossLayerFilter(e,r))})):y.push(F.processOGCCrossLayerFilter(O,r))}return e.options&&e.options.cqlFilter&&y.push((d=e.options.cqlFilter,f={filterNS:r,wfsVersion:t,gmlVersion:(0,n.wfsToGmlVersion)(t)},m=c()(f),s()(m)((0,a.read)(d)))),y},D=function(e){var t;try{t=e instanceof Object?e:JSON.parse(e)}catch(e){return e}var r,o,n=[];if(t.filterFields&&t.filterFields.length>0)(r=F.processCQLFilterGroup(t.groupFields[0],t))&&n.push(r);else if(t.simpleFilterFields&&t.simpleFilterFields.length>0){var i=t.simpleFilterFields.reduce((function(e,t){var r=e,o=F.processCQLSimpleFilterField(t);return!1!==o&&(r=e.length>0?e+" AND ("+o+")":"("+o+")"),r}),"");i=i.length>0?i:"INCLUDE",n.push(i)}if(t.spatialField&&(o=F.processCQLSpatialFilter(t))&&n.push(o),t.crossLayerFilter){var a=t.crossLayerFilter,l=a.operation,s=a.attribute,u=a.collectGeometries&&a.collectGeometries.queryCollection;if(l&&s&&u){var c=u.typeName,p=u.geometryName,g=F.getCrossLayerCqlFilter(a),d=j(G({typeName:c,geometryName:p,cqlFilter:g}));n.push("".concat(l,"(").concat(s,",").concat(d,")"))}}return n.length?"("+(n.length>1?n.join(") AND ("):n[0])+")":null},q=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return e.filterFields&&e.filterFields.length>0||e.simpleFilterFields&&e.simpleFilterFields.length>0||e.spatialField&&e.spatialField.geometry&&e.spatialField.operation||(0,g.isArray)(e.spatialField)&&(0,g.findIndex)(e.spatialField,(function(e){return e.operation&&e.geometry}))>-1||e.crossLayerFilter&&e.crossLayerFilter.collectGeometries&&e.crossLayerFilter.collectGeometries.queryCollection&&e.crossLayerFilter.collectGeometries.queryCollection.geometryName&&e.crossLayerFilter.collectGeometries.queryCollection.typeName};F={processOGCFilterGroup:function(e,t,r){var o=F.processOGCFilterFields(e,t,r),n=F.findSubGroups(e,t.groupFields);return n.length>0&&n.forEach((function(e){o+=F.processOGCFilterGroup(e,t,r)})),""!==o?i.ogcLogicalOperators[e.logic](r,o):""},processOGCFilterFields:function(e,t,r){var o=e?t.filterFields.filter((function(t){return t.groupId===e.id&&b(t.value,t.operator)})):t.filterFields.filter((function(e){return b(e.value,e.operator)}));return o.length?o.reduce((function(e,t){var o;switch(t.type){case"date":case"date-time":case"time":o=L(t.attribute,t.operator,t.value,r);break;case"number":o=T(t.attribute,t.operator,t.value,r);break;case"string":o=C(t.attribute,t.operator,t.value,r);break;case"boolean":o=N(t.attribute,t.operator,t.value,r);break;case"list":o=function(e,t,r,o){var n;return(0,g.isNil)(r)||(n=i.ogcComparisonOperators[t](o,S[o].startTag+e+S[o].endTag+"<"+o+":Literal>"+r+"</"+o+":Literal>")),n}(t.attribute,t.operator,t.value,r)}return"isNull"===t.operator&&(o=C(t.attribute,t.operator,t.operator,r)),o&&e.push(o),e}),[]).join(""):""},processOGCCrossLayerFilter:function(e,t){var r=t||"ogc",o=S[r].startTag+e.attribute+S[r].endTag;if(e.collectGeometries){var n=F.getCrossLayerCqlFilter(e);o+='<ogc:Function name="collectGeometries"><ogc:Function name="queryCollection">'+"<ogc:Literal>".concat(e.collectGeometries.queryCollection.typeName,"</ogc:Literal>")+"<ogc:Literal>".concat(e.collectGeometries.queryCollection.geometryName,"</ogc:Literal>")+"<ogc:Literal><![CDATA[".concat(n,"]]></ogc:Literal>")+"</ogc:Function></ogc:Function>"}return"DWITHIN"===e.operation&&(o+="<"+r+':Distance units="m">'+(e.distance||0)+"</"+r+":Distance>"),i.ogcSpatialOperators[e.operation](r,o)},getGetFeatureBase:function(e,t,r,o){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=O(e),a="<wfs:GetFeature ";switch(a+=o?'outputFormat="'+o+'" ':"",a+=t&&(t.startIndex||0===t.startIndex)?'startIndex="'+t.startIndex+'" ':"",a+=n.viewParams?' viewParams="'.concat(n.viewParams,'" '):"",i){case"1.0.0":a+=t&&t.maxFeatures?'maxFeatures="'+t.maxFeatures+'" ':"",a=r?a+' resultType="hits"':a,a+='service="WFS" version="'+i+'" outputFormat="GML2" xmlns:gml="http://www.opengis.net/gml" xmlns:wfs="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" '+(n.noSchemaLocation?"":'xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd"')+">";break;case"1.1.0":a+=t&&t.maxFeatures?'maxFeatures="'+t.maxFeatures+'" ':"",a=r?a+' resultType="hits"':a,a+='service="WFS" version="'+i+'" xmlns:gml="http://www.opengis.net/gml" xmlns:wfs="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" '+(n.noSchemaLocation?"":'xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"')+">";break;default:a+=t&&t.maxFeatures?'count="'+t.maxFeatures+'" ':"",a=r&&!t?a+' resultType="hits"':a,a+='service="WFS" version="'+i+'" xmlns:wfs="http://www.opengis.net/wfs/2.0" xmlns:fes="http://www.opengis.net/fes/2.0" xmlns:gml="http://www.opengis.net/gml/3.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" '+(n.noSchemaLocation?"":'xsi:schemaLocation="http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd"')+">"}return a},toOGCFilterParts:B,findSubGroups:function(e,t){return t.filter((function(t){return t.groupId===e.id}))},toCQLFilter:D,getCrossLayerCqlFilter:function(e){return(0,g.get)(e,"collectGeometries.queryCollection.cqlFilter")||((0,g.get)(e,"collectGeometries.queryCollection.filterFields")||[]).length>0&&((0,g.get)(e,"collectGeometries.queryCollection.groupFields")||[]).length>0&&F.toCQLFilter(e.collectGeometries.queryCollection)||"INCLUDE"},processCQLFilterGroup:function(e,t){var r="NOR"===e.logic?v(v({},e),{},{logic:"AND",negateAll:!0}):e,o=F.processCQLFilterFields(r,t),n=F.findSubGroups(r,t.groupFields);if(n.length>0){var i=n.map((function(e){return(r.negateAll?"NOT (":"(")+F.processCQLFilterGroup(e,t)+")"})).join(" "+r.logic+" ");return o?[o,i].join(" "+r.logic+" "):i}return o},processCQLSimpleFilterField:function(e){var t=!1;switch(e.type){case"date":t=F.cqlDateField(e.attribute,e.operator,e.values);break;case"number":t=F.cqlNumberField(e.attribute,e.operator,e.values);break;case"string":t=F.cqlStringField(e.attribute,e.operator,e.values);break;case"boolean":t=F.cqlBooleanField(e.attribute,e.operator,e.values);break;case"list":if(e.values.length!==e.optionsValues.length){var r=!1,o=e.values.reduce((function(e,t){return null===t||"null"===t?r=!0:e.push("'"+t+"'"),e}),[]);t=o.length>0?e.attribute+" IN("+o.join(",")+")":t,r&&(t=t?t+" OR isNull("+e.attribute+")=true":"isNull("+e.attribute+")=true")}}return!!(t&&t.length>0)&&t},processCQLSpatialFilter:function(e){var t=((0,g.isArray)(e.spatialField)?e.spatialField:[e.spatialField]).filter((function(e){return e&&e.geometry&&e.operation})),r="";return t.forEach((function(o,n){if(r+=o.operation+'("'+o.attribute+'",',o.collectGeometries&&o.collectGeometries.queryCollection)r+=j(G(o.collectGeometries.queryCollection));else{var i=o.geometry.projection||"";i=2===i.split(":").length?"SRID="+i.split(":")[1]+";":"",r+=i+F.getCQLGeometryElement(o.geometry.coordinates,o.geometry.type)}r+=")",n<t.length-1&&(r+=" ".concat(e.spatialFieldOperator||"AND"," "))})),r},processCQLFilterFields:function(e,t){var r=t.filterFields.filter((function(t){return t.groupId===e.id})),o=[];return r&&(r.forEach((function(t){var r;switch(t.type){case"date":case"time":case"date-time":r=F.cqlDateField(t.attribute,t.operator,t.value);break;case"number":r=F.cqlNumberField(t.attribute,t.operator,t.value);break;case"string":r=F.cqlStringField(t.attribute,t.operator,t.value);break;case"boolean":r=F.cqlBooleanField(t.attribute,t.operator,t.value);break;case"list":r=F.cqlListField(t.attribute,t.operator,t.value)}r&&o.push(e.negateAll?"NOT ("+r+")":r)})),o=o.join(" "+e.logic+" ")),o},getCQLGeometryElement:function(e,t){var r=t+"(";switch(t){case"Point":r+=e.join(" ");break;case"MultiPoint":e.forEach((function(t,o){r+=t.join(" "),r+=o<e.length-1?", ":""}));break;case"Polygon":e.forEach((function(t,n){r+="(";var i=(0,o.closePolygon)(t).map((function(e){return e[0]+" "+e[1]}));r+=i.join(", "),r+=")",r+=n<e.length-1?", ":""}));break;case"MultiPolygon":e.forEach((function(t,n){r+="(",t.forEach((function(e,n){r+="(";var i=(0,o.closePolygon)(e).map((function(e){return e[0]+" "+e[1]}));r+=i.join(", "),r+=")",r+=n<t.length-1?", ":""})),r+=")",r+=n<e.length-1?", ":""}))}return r+=")"},cqlStringField:function(e,t,r){var o,n=w(e);return(0,g.isNil)(r)||(o="isNull"===t?"isNull("+n+")=true":"="===t?n+t+"'"+h(r)+"'":"ilike"===t?"strToLowerCase("+n+") LIKE '%"+h(r).toLowerCase()+"%'":n+" LIKE '%"+h(r)+"%'"),o},cqlDateField:function(e,t,r){var o;return"><"===t?r.startDate&&r.endDate&&(o="("+e+">='"+(r.startDate.toISOString?r.startDate.toISOString():r.startDate)+"' AND "+e+"<='"+(r.endDate.toISOString?r.endDate.toISOString():r.endDate)+"')"):r.startDate&&(o=e+t+"'"+(r.startDate.toISOString?r.startDate.toISOString():r.startDate)+"'"),o},cqlNumberField:function(e,t,r){var o,n=w(e);if("><"===t)(0,g.isNil)(r)||null===r.lowBound||void 0===r.lowBound||null!==r.upBound&&void 0!==r.upBound?(0,g.isNil)(r)||null===r.upBound||void 0===r.upBound||null!==r.lowBound&&void 0!==r.lowBound?(0,g.isNil)(r)||null===r.upBound||void 0===r.upBound||null===r.lowBound||void 0===r.lowBound||(o="("+n+">='"+r.lowBound+"' AND "+n+"<='"+r.upBound+"')"):o="("+n+"<='"+r.upBound+"')":o="("+n+">='"+r.lowBound+"')";else{var i=(0,g.isNil)(r)||null===r.lowBound||void 0===r.lowBound?r:r.lowBound;(0,g.isNil)(i)||(o=n+" "+t+" '"+i+"'")}return o},cqlBooleanField:function(e,t,r){var o="";return(0,g.isNil)(r)||""===r||"="===t&&(o='"'+e+'"'+t+"'"+r+"'"),o},cqlListField:function(e,t,r){return F.cqlStringField(e,t,r)},toOGCFilter:function(e,t,r){var o,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null,i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:null,l=arguments.length>6&&void 0!==arguments[6]?arguments[6]:null,s=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"EPSG:4326";try{o=t instanceof Object?t:JSON.parse(t)}catch(e){return e}var u=O(r||"2.0"),c="2.0"===u?"fes":"ogc",p=F.getGetFeatureBase(u,o.pagination,i,a,t&&t.options),g=F.toOGCFilterParts(o,u,c),d="";return g.length>0&&(d="<"+c+":Filter>",1===g.length?d+=g[0]:(d+="<"+c+":And>",g.forEach((function(e){d+=e})),d+="</"+c+":And>"),d+="</"+c+":Filter>"),p+="<wfs:Query ".concat("2.0"===u?"typeNames":"typeName",'="').concat(e,'" ').concat("native"!==s&&'srsName="'.concat(s,'"')||"",">"),p+=d,l&&(p+=l.map((function(e){return S[c].startTag+e+S[c].endTag})).join("")),n&&n.sortBy&&n.sortOrder&&(p+="<"+c+":SortBy><"+c+":SortProperty>"+S[c].startTag+n.sortBy+S[c].endTag+"<"+c+":SortOrder>"+n.sortOrder+"</"+c+":SortOrder></"+c+":SortProperty></"+c+":SortBy>"),p+"</wfs:Query></wfs:GetFeature>"},reprojectFilterInNativeCrs:function(e,t){var r,o=e.spatialField.geometry.projection,n=e.spatialField.geometry.center,i=e.spatialField.geometry.radius,a=(0,p.reprojectGeoJson)(e.spatialField.geometry,e.spatialField.geometry.projection||"EPSG:3857",t).coordinates,l=n&&[(r=(0,p.reproject)(n,o,t)).x,r.y],s=i&&(0,p.reproject)([i,0],o,t).x;return v(v({},e),{},{spatialField:v(v({},e.spatialField),{},{geometry:v(v({},e.spatialField.geometry),{},{center:l,radius:s,coordinates:a,projection:t})})})},processOGCSpatialFilter:function(e,t,r){if(t.collectGeometries)return F.processOGCCrossLayerFilter(t);var a=S[r].startTag+t.attribute+S[r].endTag;switch(t.operation){case"INTERSECTS":case"DWITHIN":case"WITHIN":case"CONTAINS":a+=(0,o.processOGCGeometry)((0,n.wfsToGmlVersion)(e),t.geometry),"DWITHIN"===t.operation&&(a+="<"+r+':Distance units="m">'+(t.geometry.distance||0)+"</"+r+":Distance>");break;case"BBOX":var l=t.geometry.extent[0]+" "+t.geometry.extent[1],s=t.geometry.extent[2]+" "+t.geometry.extent[3];a+='<gml:Envelope srsName="'+t.geometry.projection+'"><gml:lowerCorner>'+l+"</gml:lowerCorner><gml:upperCorner>"+s+"</gml:upperCorner></gml:Envelope>"}return i.ogcSpatialOperators[t.operation](r,a)},mergeFiltersToOGC:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.nsPlaceholder,r=void 0===t?"ogc":t,o=e.ogcVersion,i=void 0===o?"2.0":o,l=e.addXmlnsToRoot,u=void 0!==l&&l,p=e.xmlnsToAdd,f=void 0===p?[]:p,m=c()({filterNS:r,wfsVersion:i,gmlVersion:(0,n.wfsToGmlVersion)(i)}),v=s()(m),y=arguments.length,F=new Array(y>1?y-1:0),h=1;h<y;h++)F[h-1]=arguments[h];var b=m.filter(m.and.apply(m,d((0,g.flatten)(F.filter((function(e){return!!e&&((0,g.isString)(e)||q(e)&&!e.disabled)})).map((function(e){return(0,g.isString)(e)?[v((0,a.read)(e))]:B(e,i,r)}))))));if(u){var w=b.indexOf(">");return"".concat(b.slice(0,w)).concat(f.length>0?" ".concat(f.join(" ")):"").concat(b.slice(w))}return b}}},59286:(e,t,r)=>{"use strict";r.r(t),r.d(t,{validateStringAttribute:()=>i,getCleanTemplate:()=>a,parseCustomTemplate:()=>l,generateTemplateString:()=>s,parseTemplate:()=>u,default:()=>c});var o,n=r(96486),i=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=(0,n.isString)(t)&&(0,n.trim)(t.substring(r,t.length-o))||"";return(0,n.has)(e,i)},a=function(e,t,r){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,l=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(){return""},s=(0,n.isString)(e)&&e.match(r),u=s&&s.map((function(e){var r=e.replace(/(<([^>]+)>)/gi,"");return{previous:e,next:i(t,r,o,a)?r:l(e)}}))||null;return u&&u.reduce((function(e,t){return e.replace(t.previous,t.next)}),e)||e||""},l=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(e){return"".concat((0,n.trim)(e.substring(2,e.length-1))," Not Available")};return(0,n.template)(a(e||"",t,/\$\{.*?\}/g,2,1,r))(t)},s=(o={},function(e,t){var r=o[e];return r&&!t||(r=function(r){var o=e.replace(/\$\{([\s]*[^;\s\{]+[\s]*)\}/g,(function(e,o){return(t||function(e){return e})(o.trim().split(".").reduce((function(e,t){return e&&e[t]}),r))}));return(0,n.isString)(o)&&o||""},t||(o[e]=r)),r}),u=function(e,t){r.e(181).then(function(){var o=r(90181),n="function"==typeof e?e():e;try{var i=o.transform(n,{presets:["es2015","react","stage-0"]}).code;t(i)}catch(e){t(null,e)}}.bind(null,r)).catch(r.oe)};const c={generateTemplateString:s,parseTemplate:u,validateStringAttribute:i,getCleanTemplate:a,parseCustomTemplate:l}}}]);