(window.webpackJsonp=window.webpackJsonp||[]).push([[171],{423:function(e,t,r){"use strict";r.r(t);var o=r(3),n=r(10),i=r(2),a=r(27),p=r(138),s=r(39),c=r(23),u=r(36),l=r(72),b=r(87),g=r(32),y=r(0),m=r(12),O=r(1),h=r(17),w=r(4),f=r(6),j=r(41),d=s.a+" http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/1.0.0/gmlsf.xsd",v={MultiLineString:"lineStringMember",MultiCurve:"curveMember",MultiPolygon:"polygonMember",MultiSurface:"surfaceMember"},S=function(e){function t(t){var r=t||{};e.call(this,r),this.surface_=void 0!==r.surface&&r.surface,this.curve_=void 0!==r.curve&&r.curve,this.multiCurve_=void 0===r.multiCurve||r.multiCurve,this.multiSurface_=void 0===r.multiSurface||r.multiSurface,this.schemaLocation=r.schemaLocation?r.schemaLocation:d,this.hasZ=void 0!==r.hasZ&&r.hasZ}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.readMultiCurve=function(e,t){var r=Object(y.u)([],this.MULTICURVE_PARSERS,e,t,this);return r?new l.a(r):void 0},t.prototype.readMultiSurface=function(e,t){var r=Object(y.u)([],this.MULTISURFACE_PARSERS,e,t,this);if(r)return new b.a(r)},t.prototype.curveMemberParser=function(e,t){Object(y.t)(this.CURVEMEMBER_PARSERS,e,t,this)},t.prototype.surfaceMemberParser=function(e,t){Object(y.t)(this.SURFACEMEMBER_PARSERS,e,t,this)},t.prototype.readPatch=function(e,t){return Object(y.u)([null],this.PATCHES_PARSERS,e,t,this)},t.prototype.readSegment=function(e,t){return Object(y.u)([null],this.SEGMENTS_PARSERS,e,t,this)},t.prototype.readPolygonPatch=function(e,t){return Object(y.u)([null],this.FLAT_LINEAR_RINGS_PARSERS,e,t,this)},t.prototype.readLineStringSegment=function(e,t){return Object(y.u)([null],this.GEOMETRY_FLAT_COORDINATES_PARSERS,e,t,this)},t.prototype.interiorParser=function(e,t){var r=Object(y.u)(void 0,this.RING_PARSERS,e,t,this);r&&t[t.length-1].push(r)},t.prototype.exteriorParser=function(e,t){var r=Object(y.u)(void 0,this.RING_PARSERS,e,t,this);r&&(t[t.length-1][0]=r)},t.prototype.readSurface=function(e,t){var r=Object(y.u)([null],this.SURFACE_PARSERS,e,t,this);if(r&&r[0]){var o,n,i=r[0],a=[i.length];for(o=1,n=r.length;o=2,57)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(M),L=function(e){function t(t){e.call(this,"And",Array.prototype.slice.call(arguments))}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(C),I=function(e){function t(t,r,o){if(e.call(this,"BBOX"),this.geometryName=t,this.extent=r,4!==r.length)throw new Error("Expected an extent with four values ([minX, minY, maxX, maxY])");this.srsName=o}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(M),T=function(e){function t(t,r){e.call(this,t),this.propertyName=r}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(M),F=function(e){function t(t,r,o,n){e.call(this,t,r),this.expression=o,this.matchCase=n}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(T),x=function(e){function t(t,r,o){e.call(this,"PropertyIsEqualTo",t,r,o)}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(F),G=function(e){function t(t,r,o,n,i,a){e.call(this,"PropertyIsLike",t),this.pattern=r,this.wildCard=void 0!==o?o:"*",this.singleChar=void 0!==n?n:".",this.escapeChar=void 0!==i?i:"!",this.matchCase=a}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(T);function U(e){var t=[null].concat(Array.prototype.slice.call(arguments));return new(Function.prototype.bind.apply(L,t))}var Z={"http://www.opengis.net/gml":{boundedBy:Object(y.n)(s.b.prototype.readGeometryElement,"bounds")},"http://www.opengis.net/wfs/2.0":{member:Object(y.j)(s.b.prototype.readFeaturesInternal)}},D={"http://www.opengis.net/wfs":{totalInserted:Object(y.n)(f.f),totalUpdated:Object(y.n)(f.f),totalDeleted:Object(y.n)(f.f)},"http://www.opengis.net/wfs/2.0":{totalInserted:Object(y.n)(f.f),totalUpdated:Object(y.n)(f.f),totalDeleted:Object(y.n)(f.f)}},B={"http://www.opengis.net/wfs":{TransactionSummary:Object(y.n)($,"transactionSummary"),InsertResults:Object(y.n)(oe,"insertIds")},"http://www.opengis.net/wfs/2.0":{TransactionSummary:Object(y.n)($,"transactionSummary"),InsertResults:Object(y.n)(oe,"insertIds")}},Y={"http://www.opengis.net/wfs":{PropertyName:Object(y.l)(f.n)},"http://www.opengis.net/wfs/2.0":{PropertyName:Object(y.l)(f.n)}},V={"http://www.opengis.net/wfs":{Insert:Object(y.l)(ne),Update:Object(y.l)(se),Delete:Object(y.l)(pe),Property:Object(y.l)(ce),Native:Object(y.l)(ue)},"http://www.opengis.net/wfs/2.0":{Insert:Object(y.l)(ne),Update:Object(y.l)(se),Delete:Object(y.l)(pe),Property:Object(y.l)(ce),Native:Object(y.l)(ue)}},q="feature",z="http://www.w3.org/2000/xmlns/",k={"2.0.0":"http://www.opengis.net/ogc/1.1","1.1.0":"http://www.opengis.net/ogc","1.0.0":"http://www.opengis.net/ogc"},X={"2.0.0":"http://www.opengis.net/wfs/2.0","1.1.0":"http://www.opengis.net/wfs","1.0.0":"http://www.opengis.net/wfs"},W={"2.0.0":"http://www.opengis.net/fes/2.0","1.1.0":"http://www.opengis.net/fes","1.0.0":"http://www.opengis.net/fes"},H={"2.0.0":"http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd","1.1.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd","1.0.0":"http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/wfs.xsd"},K={"2.0.0":P,"1.1.0":E,"1.0.0":p.a},Q=function(e){function t(t){e.call(this);var r=t||{};this.version_=r.version?r.version:"1.1.0",this.featureType_=r.featureType,this.featureNS_=r.featureNS,this.gmlFormat_=r.gmlFormat?r.gmlFormat:new K[this.version_],this.schemaLocation_=r.schemaLocation?r.schemaLocation:H[this.version_]}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.getFeatureType=function(){return this.featureType_},t.prototype.setFeatureType=function(e){this.featureType_=e},t.prototype.readFeaturesFromNode=function(e,t){var r={node:e};Object(m.a)(r,{featureType:this.featureType_,featureNS:this.featureNS_}),Object(m.a)(r,this.getReadOptions(e,t||{}));var o,n=[r];o="2.0.0"===this.version_?Z:this.gmlFormat_.FEATURE_COLLECTION_PARSERS;var i=Object(y.u)([],o,e,n,this.gmlFormat_);return i||(i=[]),i},t.prototype.readTransactionResponse=function(e){if(e){if("string"==typeof e){var t=Object(y.s)(e);return this.readTransactionResponseFromDocument(t)}return Object(y.h)(e)?this.readTransactionResponseFromDocument(e):this.readTransactionResponseFromNode(e)}},t.prototype.readFeatureCollectionMetadata=function(e){if(e){if("string"==typeof e){var t=Object(y.s)(e);return this.readFeatureCollectionMetadataFromDocument(t)}return Object(y.h)(e)?this.readFeatureCollectionMetadataFromDocument(e):this.readFeatureCollectionMetadataFromNode(e)}},t.prototype.readFeatureCollectionMetadataFromDocument=function(e){for(var t=e.firstChild;t;t=t.nextSibling)if(t.nodeType==Node.ELEMENT_NODE)return this.readFeatureCollectionMetadataFromNode(t)},t.prototype.readFeatureCollectionMetadataFromNode=function(e){var t={},r=Object(f.g)(e.getAttribute("numberOfFeatures"));return t.numberOfFeatures=r,Object(y.u)(t,Z,e,[],this.gmlFormat_)},t.prototype.readTransactionResponseFromDocument=function(e){for(var t=e.firstChild;t;t=t.nextSibling)if(t.nodeType==Node.ELEMENT_NODE)return this.readTransactionResponseFromNode(t)},t.prototype.readTransactionResponseFromNode=function(e){return Object(y.u)({},B,e,[])},t.prototype.writeGetFeature=function(e){var t=this,r=Object(y.c)(X[this.version_],"GetFeature");r.setAttribute("service","WFS"),r.setAttribute("version",this.version_),e.handle&&r.setAttribute("handle",e.handle),e.outputFormat&&r.setAttribute("outputFormat",e.outputFormat),void 0!==e.maxFeatures&&r.setAttribute("maxFeatures",String(e.maxFeatures)),e.resultType&&r.setAttribute("resultType",e.resultType),void 0!==e.startIndex&&r.setAttribute("startIndex",String(e.startIndex)),void 0!==e.count&&r.setAttribute("count",String(e.count)),void 0!==e.viewParams&&r.setAttribute("viewParams",e.viewParams),r.setAttributeNS(y.b,"xsi:schemaLocation",this.schemaLocation_);var o={node:r};if(Object(m.a)(o,{version:this.version_,srsName:e.srsName,featureNS:e.featureNS?e.featureNS:this.featureNS_,featurePrefix:e.featurePrefix,propertyNames:e.propertyNames?e.propertyNames:[]}),Object(A.a)(Array.isArray(e.featureTypes),11),"string"==typeof e.featureTypes[0]){var n=e.filter;e.bbox&&(Object(A.a)(e.geometryName,12),n=this.combineBboxAndFilter(e.geometryName,e.bbox,e.srsName,n)),Object(m.a)(o,{geometryName:e.geometryName,filter:n}),_e(r,e.featureTypes,[o])}else e.featureTypes.forEach((function(n){var i=t.combineBboxAndFilter(n.geometryName,n.bbox,e.srsName,e.filter);Object(m.a)(o,{geometryName:n.geometryName,filter:i}),_e(r,[n.name],[o])}));return r},t.prototype.combineBboxAndFilter=function(e,t,r,o){var n=function(e,t,r){return new I(e,t,r)}(e,t,r);return o?U(o,n):n},t.prototype.writeTransaction=function(e,t,r,o){var n,i=[],a=o.version?o.version:this.version_,p=Object(y.c)(X[a],"Transaction");p.setAttribute("service","WFS"),p.setAttribute("version",a),o&&(n=o.gmlOptions?o.gmlOptions:{},o.handle&&p.setAttribute("handle",o.handle)),p.setAttributeNS(y.b,"xsi:schemaLocation",H[a]);var s=function(e,t,r,o){var n,i=o.featurePrefix?o.featurePrefix:q;"1.0.0"===r?n=2:"1.1.0"===r?n=3:"2.0.0"===r&&(n=3.2);return Object(m.a)({node:e},{version:r,featureNS:o.featureNS,featureType:o.featureType,featurePrefix:i,gmlVersion:n,hasZ:o.hasZ,srsName:o.srsName},t)}(p,n,a,o);return e&&J("Insert",e,i,s),t&&J("Update",t,i,s),r&&J("Delete",r,i,s),o.nativeElements&&J("Native",o.nativeElements,i,s),p},t.prototype.readProjectionFromDocument=function(e){for(var t=e.firstChild;t;t=t.nextSibling)if(t.nodeType==Node.ELEMENT_NODE)return this.readProjectionFromNode(t);return null},t.prototype.readProjectionFromNode=function(e){if(e.firstElementChild&&e.firstElementChild.firstElementChild)for(var t=(e=e.firstElementChild.firstElementChild).firstElementChild;t;t=t.nextElementSibling)if(0!==t.childNodes.length&&(1!==t.childNodes.length||3!==t.firstChild.nodeType)){var r=[{}];return this.gmlFormat_.readGeometryElement(t,r),Object(w.j)(r.pop().srsName)}return null},t}(N.a);function J(e,t,r,o){Object(y.v)(o,V,Object(y.q)(e),t,r)}function $(e,t){return Object(y.u)({},D,e,t)}var ee={"http://www.opengis.net/ogc":{FeatureId:Object(y.j)((function(e,t){return e.getAttribute("fid")}))},"http://www.opengis.net/ogc/1.1":{FeatureId:Object(y.j)((function(e,t){return e.getAttribute("fid")}))}};function te(e,t){Object(y.t)(ee,e,t)}var re={"http://www.opengis.net/wfs":{Feature:te},"http://www.opengis.net/wfs/2.0":{Feature:te}};function oe(e,t){return Object(y.u)([],re,e,t)}function ne(e,t,r){var o=r[r.length-1],n=o.featureType,i=o.featureNS,a=o.gmlVersion,s=Object(y.c)(i,n);e.appendChild(s),2===a?p.a.prototype.writeFeatureElement(s,t,r):3===a?E.prototype.writeFeatureElement(s,t,r):P.prototype.writeFeatureElement(s,t,r)}function ie(e,t,r){var o=r[r.length-1].version,n=k[o],i=Object(y.c)(n,"Filter"),a=Object(y.c)(n,"FeatureId");i.appendChild(a),a.setAttribute("fid",t),e.appendChild(i)}function ae(e,t){var r=(e=e||q)+":";return 0===t.indexOf(r)?t:r+t}function pe(e,t,r){var o=r[r.length-1];Object(A.a)(void 0!==t.getId(),26);var n=o.featureType,i=o.featurePrefix,a=o.featureNS,p=ae(i,n);e.setAttribute("typeName",p),e.setAttributeNS(z,"xmlns:"+i,a);var s=t.getId();void 0!==s&&ie(e,s,r)}function se(e,t,r){var o=r[r.length-1];Object(A.a)(void 0!==t.getId(),27);var n=o.version,i=o.featureType,a=o.featurePrefix,p=o.featureNS,s=ae(a,i),c=t.getGeometryName();e.setAttribute("typeName",s),e.setAttributeNS(z,"xmlns:"+a,p);var u=t.getId();if(void 0!==u){for(var l=t.getKeys(),b=[],g=0,m=l.length;g© MapTiler © OpenStreetMap contributors',url:"https://api.maptiler.com/tiles/satellite/{z}/{x}/{y}.jpg?key=get_your_own_D6rA4zTHduk6KOKTXzGB",maxZoom:20})}),ze=new o.a({layers:[qe,Ve],target:document.getElementById("map"),view:new i.a({center:[-8908887.277395891,5381918.072437216],maxZoom:19,zoom:12})}),ke=(new xe).writeGetFeature({srsName:"EPSG:3857",featureNS:"http://openstreemap.org",featurePrefix:"osm",featureTypes:["water_areas"],outputFormat:"application/json",filter:U((Ae="name",Ce="Mississippi*",new G(Ae,Ce,Le,Ie,Te,Fe)),function(e,t,r){return new x(e,t,r)}("waterway","riverbank"))});fetch("https://ahocevar.com/geoserver/wfs",{method:"POST",body:(new XMLSerializer).serializeToString(ke)}).then((function(e){return e.json()})).then((function(e){var t=(new Ge.a).readFeatures(e);Ye.addFeatures(t),ze.getView().fit(Ye.getExtent())}))}},[[423,0]]]); //# sourceMappingURL=vector-wfs-getfeature.js.map