(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-41b20229"],{"659c":function(e,t,r){"use strict";r.d(t,"a",(function(){return F})),r.d(t,"b",(function(){return J})),r.d(t,"c",(function(){return G})),r.d(t,"d",(function(){return H})),r.d(t,"e",(function(){return _})),r.d(t,"f",(function(){return X}));r("e06a");var n=r("2eab"),o=r("ce50"),i=r("fa2a"),a=r("b2b2"),s=r("f4cc"),c=r("e041"),u=r("8188"),l=r("7f83"),p=r("74e2"),d=r("e3a3");function y(e){var t;return null!=(t=b(e))?t:f(e)}function f(e){const t=new Date(e).getTime();return Number.isNaN(t)?null:t}function b(e){var t,r,n,o;const i=m.exec(e);if(!i)return null;const a=i.groups,s=+a.year,c=+a.month-1,u=+a.day,l=+(null!=(t=a.hours)?t:"0"),p=+(null!=(r=a.minutes)?r:"0"),d=+(null!=(n=a.seconds)?n:"0");if(l>23)return null;if(p>59)return null;if(d>59)return null;const y=null!=(o=a.ms)?o:"0",f=y?+y.padEnd(3,"0").substring(0,3):0;let b;if(a.isUTC)b=Date.UTC(s,c,u,l,p,d,f);else if(a.offsetSign){const e=+a.offsetHours,t=+a.offsetMinutes;b=6e4*("+"===a.offsetSign?-1:1)*(60*e+t)+Date.UTC(s,c,u,l,p,d,f)}else b=new Date(s,c,u,l,p,d,f).getTime();return Number.isNaN(b)?null:b}const m=/^(?:(?-?\d{4,})-(?\d{2})-(?\d{2}))(?:T(?\d{2}):(?\d{2}):(?\d{2})(?:\.(?\d+))?)?(?:(?Z)|(?:(?\+|-)(?\d{2}):(?\d{2})))?$/;var g=r("68dc"),h=r("a1f3"),O=r("5996"),j=r("3af1");const w="xlink:href",v="2.0.0",F="__esri_wfs_id__",S="wfs-layer:getWFSLayerTypeInfo-error",T="wfs-layer:empty-service",x="wfs-layer:feature-type-not-found",P="wfs-layer:geojson-not-supported",C="wfs-layer:kvp-encoding-not-supported",R="wfs-layer:malformed-json",I="wfs-layer:unknown-geometry-type",N="wfs-layer:unknown-field-type",E="wfs-layer:unsupported-spatial-reference",k="wfs-layer:unsupported-wfs-version";async function G(e,t){const r=U((await Object(n["default"])(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"GetCapabilities",VERSION:v,...null==t?void 0:t.customParameters},signal:null==t?void 0:t.signal})).data);return A(e,r),r}function U(e){const t=K(e);te(t),re(t);const r=t.firstElementChild,n=Object(i["a"])(M(r));return{operations:D(r),get featureTypes(){return Array.from(n())},readFeatureTypes:n}}const q=new Set(["json","application/json","geojson","application/json; subtype=geojson"]);function D(e){let t=!1;const r={GetCapabilities:{url:""},DescribeFeatureType:{url:""},GetFeature:{url:"",outputFormat:null,supportsPagination:!1}};if(Object(g["b"])(e,{OperationsMetadata:{Operation:e=>{switch(e.getAttribute("name")){case"GetCapabilities":return{DCP:{HTTP:{Get:e=>{r.GetCapabilities.url=e.getAttribute(w)}}}};case"DescribeFeatureType":return{DCP:{HTTP:{Get:e=>{r.DescribeFeatureType.url=e.getAttribute(w)}}}};case"GetFeature":return{DCP:{HTTP:{Get:e=>{r.GetFeature.url=e.getAttribute(w)}}},Parameter:e=>{if("outputFormat"===e.getAttribute("name"))return{AllowedValues:{Value:e=>{const t=e.textContent;q.has(t.toLowerCase())&&(r.GetFeature.outputFormat=t)}}}}}}},Constraint:e=>{switch(e.getAttribute("name")){case"KVPEncoding":return{DefaultValue:e=>{t="true"===e.textContent.toLowerCase()}};case"ImplementsResultPaging":return{DefaultValue:e=>{r.GetFeature.supportsPagination="true"===e.textContent.toLowerCase()}}}}}}),!t)throw new o["a"](C,"WFS service doesn't support key/value pair (KVP) encoding");if(Object(a["j"])(r.GetFeature.outputFormat))throw new o["a"](P,"WFS service doesn't support GeoJSON output format");return r}function A(e,t){Object(c["x"])(e)&&(Object(c["s"])(e,t.operations.DescribeFeatureType.url,!0)&&(t.operations.DescribeFeatureType.url=Object(c["L"])(t.operations.DescribeFeatureType.url)),Object(c["s"])(e,t.operations.GetFeature.url,!0)&&(t.operations.GetFeature.url=Object(c["L"])(t.operations.GetFeature.url)))}function M(e){return Object(g["a"])(e,{FeatureTypeList:{FeatureType:e=>{const t={typeName:"undefined:undefined",name:"",title:"",description:"",extent:null,namespacePrefix:"",namespaceUri:"",supportedSpatialReferences:[]},r=new Set([4326]),n=e=>{var t,n;const o=parseInt(null==(t=e.textContent.match(/(?\d+$)/i))||null==(n=t.groups)?void 0:n.wkid,10);Number.isNaN(o)||r.add(o)};return Object(g["b"])(e,{Name:e=>{const{name:r,prefix:n}=ee(e.textContent);t.typeName=`${n}:${r}`,t.name=r,t.namespacePrefix=n,t.namespaceUri=e.lookupNamespaceURI(n)},Abstract:e=>{t.description=e.textContent},Title:e=>{t.title=e.textContent},WGS84BoundingBox:e=>{t.extent=L(e)},DefaultSRS:n,DefaultCRS:n,OtherSRS:n,OtherCRS:n}),t.title||(t.title=t.name),t.supportedSpatialReferences.push(...r),t}}})}function L(e){let t,r,n,o;for(const i of e.children)switch(i.localName){case"LowerCorner":[t,r]=i.textContent.split(" ").map(e=>Number.parseFloat(e));break;case"UpperCorner":[n,o]=i.textContent.split(" ").map(e=>Number.parseFloat(e))}return{xmin:t,ymin:r,xmax:n,ymax:o,spatialReference:l["b"]}}function J(e,t,r){return Object(i["b"])(e,e=>r?e.name===t&&e.namespaceUri===r:e.typeName===t||e.name===t)}async function _(e,t,r,n={}){var o;const{featureType:i,extent:a}=await W(e,t,r,n),{fields:s,geometryType:c,swapXY:u,objectIdField:l,geometryField:p}=await $(e,i.typeName,n);return{url:e.operations.GetCapabilities.url,name:i.name,namespaceUri:i.namespaceUri,fields:s,geometryField:p,geometryType:c,objectIdField:l,spatialReference:null!=(o=n.spatialReference)?o:O["a"].WGS84,extent:a,swapXY:u,wfsCapabilities:e,customParameters:n.customParameters}}async function W(e,t,r,n={}){const{spatialReference:i=O["a"].WGS84}=n,s=e.readFeatureTypes(),c=t?J(s,t,r):s.next().value;if(Object(a["j"])(c))throw t?new o["a"](x,`The type '${t}' could not be found in the service`):new o["a"](T,"The service is empty");let p=new j["a"]({...c.extent,spatialReference:i});if(!Object(l["d"])(i,l["b"]))try{await Object(u["g"])(l["b"],i,void 0,n),p=Object(u["m"])(p,l["b"])}catch{throw new o["a"](E,"Projection not supported")}return{extent:p,spatialReference:i,featureType:c}}async function $(e,t,r={}){const[n,i]=await Object(s["j"])([V(e.operations.DescribeFeatureType.url,t,r),Q(e,t,r)]);if(n.error||i.error)throw new o["a"](S,`An error occurred while getting info about the feature type '${t}'`,{error:n.error||i.error});const{fields:c,errors:u}=n.value,l=n.value.geometryType||i.value.geometryType,p=i.value.swapXY;if(Object(a["j"])(l))throw new o["a"](I,"The geometry type could not be determined for type '"+t,{typeName:t,geometryType:l,fields:c,errors:u});return{...X(c),geometryType:l,swapXY:p}}function X(e){var t;const r=e.find(e=>"geometry"===e.type);let n=e.find(e=>"oid"===e.type);return e=e.filter(e=>"geometry"!==e.type),n||(n=new h["a"]({name:F,type:"oid",alias:F}),e.unshift(n)),{geometryField:null!=(t=null==r?void 0:r.name)?t:null,objectIdField:n.name,fields:e}}async function Q(e,t,r={}){var o;let i,a=!1;const[s,c]=await Promise.all([H(e.operations.GetFeature.url,t,e.operations.GetFeature.outputFormat,{...r,count:1}),Object(n["default"])(e.operations.GetFeature.url,{responseType:"text",query:Z(t,void 0,{...r,count:1}),signal:null==r?void 0:r.signal})]),u="FeatureCollection"===s.type&&(null==(o=s.features[0])?void 0:o.geometry);if(u){let e;switch(i=p["a"].fromJSON(Object(d["b"])(u.type)),u.type){case"Point":e=u.coordinates;break;case"LineString":case"MultiPoint":e=u.coordinates[0];break;case"MultiLineString":case"Polygon":e=u.coordinates[0][0];break;case"MultiPolygon":e=u.coordinates[0][0][0]}const t=/<[^>]*pos[^>]*> *(-?\d+(?:\.\d+)?) (-?\d+(?:\.\d+)?)/.exec(c.data);if(t){const r=e[0].toFixed(3),n=e[1].toFixed(3),o=parseFloat(t[1]).toFixed(3);r===parseFloat(t[2]).toFixed(3)&&n===o&&(a=!0)}}return{geometryType:i,swapXY:a}}async function V(e,t,r){return Y(t,(await Object(n["default"])(e,{responseType:"text",query:{SERVICE:"WFS",REQUEST:"DescribeFeatureType",VERSION:v,TYPENAME:t,...null==r?void 0:r.customParameters},signal:null==r?void 0:r.signal})).data)}function Y(e,t){const{name:r}=ee(e),n=K(t);re(n);const s=Object(i["b"])(Object(g["a"])(n.firstElementChild,{element:e=>({name:e.getAttribute("name"),typeName:ee(e.getAttribute("type")).name})}),({name:e})=>e===r);if(Object(a["k"])(s)){const e=Object(i["b"])(Object(g["a"])(n.firstElementChild,{complexType:e=>e}),e=>e.getAttribute("name")===s.typeName);if(Object(a["k"])(e))return B(e)}throw new o["a"](x,`Type '${e}' not found in document`,{document:(new XMLSerializer).serializeToString(n)})}const z=new Set(["objectid","fid"]);function B(e){var t,r;const n=[],i=[];let a;const s=Object(g["a"])(e,{complexContent:{extension:{sequence:{element:e=>e}}}});for(const c of s){const s=c.getAttribute("name");if(!s)continue;let u,l;if(c.hasAttribute("type")?u=ee(c.getAttribute("type")).name:Object(g["b"])(c,{simpleType:{restriction:e=>(u=ee(e.getAttribute("base")).name,{maxLength:e=>{l=+e.getAttribute("value")}})}}),!u)continue;const p="true"===c.getAttribute("nillable");let d=!1;switch(u.toLowerCase()){case"integer":case"nonpositiveinteger":case"negativeinteger":case"long":case"int":case"short":case"byte":case"nonnegativeinteger":case"unsignedlong":case"unsignedint":case"unsignedshort":case"unsignedbyte":case"positiveinteger":i.push(new h["a"]({name:s,alias:s,type:"integer",nullable:p}));break;case"float":case"double":case"decimal":i.push(new h["a"]({name:s,alias:s,type:"double",nullable:p}));break;case"boolean":case"string":case"gyearmonth":case"gyear":case"gmonthday":case"gday":case"gmonth":case"anyuri":case"qname":case"notation":case"normalizedstring":case"token":case"language":case"idrefs":case"entities":case"nmtoken":case"nmtokens":case"name":case"ncname":case"id":case"idref":case"entity":case"duration":case"time":i.push(new h["a"]({name:s,alias:s,type:"string",nullable:p,length:null!=(t=l)?t:255}));break;case"datetime":case"date":i.push(new h["a"]({name:s,alias:s,type:"date",nullable:p,length:null!=(r=l)?r:36}));break;case"pointpropertytype":a="point",d=!0;break;case"multipointpropertytype":a="multipoint",d=!0;break;case"curvepropertytype":case"multicurvepropertytype":case"multilinestringpropertytype":a="polyline",d=!0;break;case"surfacepropertytype":case"multisurfacepropertytype":case"multipolygonpropertytype":a="polygon",d=!0;break;case"geometrypropertytype":case"multigeometrypropertytype":d=!0,n.push(new o["a"](I,`geometry type '${u}' is not supported`,{type:(new XMLSerializer).serializeToString(e)}));break;default:n.push(new o["a"](N,`Unknown field type '${u}'`,{type:(new XMLSerializer).serializeToString(e)}))}d&&i.push(new h["a"]({name:s,alias:s,type:"geometry",nullable:p}))}for(const o of i)if("integer"===o.type&&!o.nullable&&z.has(o.name.toLowerCase())){o.type="oid";break}return{geometryType:a,fields:i,errors:n}}async function H(e,t,r,i){let{data:a}=await Object(n["default"])(e,{responseType:"text",query:Z(t,r,i),signal:null==i?void 0:i.signal});a=a.replace(/": +(-?\d+),(\d+)(,)?/g,'": $1.$2$3');try{var s;if(null!=i&&null!=(s=i.dateFields)&&s.length){const e=new Set(i.dateFields);return JSON.parse(a,(t,r)=>e.has(t)?y(r):r)}return JSON.parse(a)}catch(c){throw new o["a"](R,"Error while parsing the response",{response:a,error:c})}}function Z(e,t,r){return{SERVICE:"WFS",REQUEST:"GetFeature",VERSION:v,TYPENAMES:e,OUTPUTFORMAT:t,SRSNAME:"EPSG:4326",STARTINDEX:null==r?void 0:r.startIndex,COUNT:null==r?void 0:r.count,...null==r?void 0:r.customParameters}}function K(e){return(new DOMParser).parseFromString(e.trim(),"text/xml")}function ee(e){const[t,r]=e.split(":");return{prefix:r?t:"",name:null!=r?r:t}}function te(e){const t=e.firstElementChild.getAttribute("version");if(t&&t!==v)throw new o["a"](k,`Unsupported WFS version ${t}. Supported version: ${v}`)}function re(e){let t,r;if(Object(g["b"])(e.firstElementChild,{Exception:e=>(t=e.getAttribute("exceptionCode"),{ExceptionText:e=>{r=e.textContent}})}),t)throw new o["a"]("wfs-layer:"+t,r)}},"68dc":function(e,t,r){"use strict";function n(e,t){for(const r of e.children)if(r.localName in t){const e=t[r.localName];if("function"==typeof e){const t=e(r);t&&n(r,t)}else n(r,e)}}function*o(e,t){for(const r of e.children)if(r.localName in t){const e=t[r.localName];"function"==typeof e?yield e(r):yield*o(r,e)}}r.d(t,"a",(function(){return o})),r.d(t,"b",(function(){return n}))},"88d1":function(e,t,r){"use strict";r.d(t,"a",(function(){return d})),r.d(t,"b",(function(){return l})),r.d(t,"c",(function(){return p})),r.d(t,"d",(function(){return s}));var n=r("c120"),o=r("7ffa"),i=r("a94c"),a=r("8246");function s(e){return{renderer:{type:"simple",symbol:"esriGeometryPoint"===e||"esriGeometryMultipoint"===e?a["c"]:"esriGeometryPolyline"===e?a["e"]:a["d"]}}}const c=/^[_$a-zA-Z][_$a-zA-Z0-9]*$/;let u=1;function l(e,t){if(Object(n["a"])("esri-csp-restrictions"))return()=>({[t]:null,...e});try{let r=`this.${t} = null;`;for(const t in e)r+=`this${c.test(t)?"."+t:`["${t}"]`} = ${JSON.stringify(e[t])};`;const n=new Function(`\n return class AttributesClass$${u++} {\n constructor() {\n ${r};\n }\n }\n `)();return()=>new n}catch(r){return()=>({[t]:null,...e})}}function p(e={}){return[{name:"New Feature",description:"",prototype:{attributes:Object(o["a"])(e)}}]}function d(e,t){return{attachment:null,data:{isVersioned:!1,supportsAttachment:!1,supportsM:!1,supportsZ:e},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:t,supportsDelete:t,supportsEditing:t,supportsChangeTracking:!1,supportsQuery:!0,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:t,supportsExceedsLimitStatistics:!0},query:i["a"],queryRelated:{supportsCount:!0,supportsOrderBy:!0,supportsPagination:!0},editing:{supportsGeometryUpdate:t,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1}}}},a94c:function(e,t,r){"use strict";r.d(t,"a",(function(){return n}));const n={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}},e3a3:function(e,t,r){"use strict";r.d(t,"a",(function(){return E})),r.d(t,"b",(function(){return c})),r.d(t,"c",(function(){return N})),r.d(t,"d",(function(){return I}));var n=r("ce50"),o=r("9392"),i=r("8152"),a=r("c1da");const s={LineString:"esriGeometryPolyline",MultiLineString:"esriGeometryPolyline",MultiPoint:"esriGeometryMultipoint",Point:"esriGeometryPoint",Polygon:"esriGeometryPolygon",MultiPolygon:"esriGeometryPolygon"};function c(e){return s[e]}function*u(e){switch(e.type){case"Feature":yield e;break;case"FeatureCollection":for(const t of e.features)t&&(yield t)}}function*l(e){if(!e)return null;switch(e.type){case"Point":yield e.coordinates;break;case"LineString":case"MultiPoint":yield*e.coordinates;break;case"MultiLineString":case"Polygon":for(const t of e.coordinates)yield*t;break;case"MultiPolygon":for(const t of e.coordinates)for(const e of t)yield*e}}function*p(e,t={}){const{geometryType:r,objectIdField:n}=t;for(const s of e){var a;const{geometry:e,properties:u,id:l}=s;if(e&&c(e.type)!==r)continue;const p=u||{};let d=null!=(a=p[n])?a:null;n&&null!=l&&!p[n]&&(p[n]=d=l);const y=new o["a"](e?g(new i["a"],e,t):null,p,null,d);yield y}}function d(e){for(const t of e)if(t.length>2)return!0;return!1}function y(e){return!b(e)}function f(e){return b(e)}function b(e){let t=0;for(let r=0;r=0;n--)C(e,t[n],r);e.lengths.push(t.length)}function C(e,t,r){const[n,o,i]=t;e.coords.push(n,o),r.hasZ&&e.coords.push(i||0)}function R(e){switch(typeof e){case"string":return"esriFieldTypeString";case"number":return"esriFieldTypeDouble";default:return"unknown"}}function I(e){if(!e)throw new n["a"]("geojson-layer:empty","GeoJSON data is empty");if("Feature"!==e.type&&"FeatureCollection"!==e.type)throw new n["a"]("geojson-layer:unsupported-geojson-object","missing or not supported GeoJSON object type",{data:e});const{crs:t}=e;if(!t)return;const r="string"==typeof t?t:"name"===t.type?t.properties.name:"EPSG"===t.type?t.properties.code:null,o=new RegExp(".*(CRS84H?|4326)$","i");if(!r||!o.test(r))throw new n["a"]("geojson-layer:unsupported-crs","unsupported GeoJSON 'crs' member",{crs:t})}function N(e,t={}){const r=[],n=new Set,o=new Set;let i,s=!1,p=null,y=!1,{geometryType:f=null}=t,b=!1;for(const a of u(e)){const{geometry:e,properties:t,id:u}=a;if((!e||(f||(f=c(e.type)),c(e.type)===f))&&(s||(s=d(l(e))),y||(y=null!=u,y&&(i=typeof u,p=Object.keys(t).filter(e=>t[e]===u))),y&&null!=u&&(p.length>1?p=p.filter(e=>t[e]===u):1===p.length&&(p=t[p[0]]===u?p:[])),!b&&t)){let e=!0;for(const i in t){if(n.has(i))continue;const a=t[i];if(null==a){e=!1,o.add(i);continue}const s=R(a);"unknown"!==s?(o.delete(i),n.add(i),r.push({name:i,alias:i,type:s})):o.add(i)}b=e}}const m=p&&1===p.length&&p[0]||null;if(m)for(const c of r)if(c.name===m&&Object(a["p"])(c)){c.type="esriFieldTypeOID";break}return{fields:r,geometryType:f,hasZ:s,objectIdFieldName:m,objectIdFieldType:i,unknownFields:Array.from(o)}}function E(e,t){return Array.from(p(u(e),t))}},fa4e:function(e,t,r){"use strict";r.r(t),r.d(t,"default",(function(){return B}));var n=r("a4ee"),o=(r("e06a"),r("4856")),i=(r("b423"),r("261a"),r("b48d"),r("478c"),r("667b"),r("ff57"),r("da00"),r("f976"),r("5cdb")),a=r("b2b2"),s=r("e694"),c=r("9d1d"),u=r("e041"),l=r("59b2"),p=(r("b50f"),r("c120")),d=r("cea0"),y=r("d386"),f=r("09db"),b=r("74e2"),m=r("a6a3"),g=r("ce50"),h=r("9096"),O=r("6d5f"),j=r("f4cc"),w=r("dfa0"),v=r("88d1"),F=r("659c"),S=r("2edc"),T=r("3af1");let x=class extends(Object(h["b"])(O["a"])){constructor(){super(...arguments),this.capabilities=Object(v["a"])(!1,!1),this.type="wfs",this.refresh=Object(j["i"])(async e=>{await this.load();const{extent:t}=await this._connection.invoke("refresh",e);return this.sourceJSON.extent=t,{dataChanged:!0,updates:{extent:this.sourceJSON.extent}}})}load(e){var t;const r=null!=(t=Object(a["k"])(e)&&e.signal)?t:null;return this.addResolvingPromise(this._startWorker({signal:r})),Promise.resolve(this)}destroy(){var e;null==(e=this._connection)||e.close(),this._connection=null}async openPorts(){return await this.load(),this._connection.openPorts()}async queryFeatures(e,t={}){await this.load(t);const r=await this._connection.invoke("queryFeatures",e?e.toJSON():null,t);return S["default"].fromJSON(r)}async queryFeaturesJSON(e,t={}){return await this.load(t),this._connection.invoke("queryFeatures",e?e.toJSON():null,t)}async queryFeatureCount(e,t={}){return await this.load(t),this._connection.invoke("queryFeatureCount",e?e.toJSON():null,t)}async queryObjectIds(e,t={}){return await this.load(t),this._connection.invoke("queryObjectIds",e?e.toJSON():null,t)}async queryExtent(e,t={}){await this.load(t);const r=await this._connection.invoke("queryExtent",e?e.toJSON():null,t);return{count:r.count,extent:T["a"].fromJSON(r.extent)}}async querySnapping(e,t={}){return await this.load(t),this._connection.invoke("querySnapping",e,t)}async _createLoadOptions(e){const{url:t,customParameters:r,name:n,namespaceUri:o,spatialReference:i,fields:s,geometryType:c,swapXY:u}=this.layer;if(!t)throw new g["a"]("wfs-layer:missing-url","WFSLayer must be created with a url");this.wfsCapabilities||(this.wfsCapabilities=await Object(F["c"])(t,{customParameters:r,...e}));const l=["fields","geometryType","name","namespaceUri","spatialReference","swapXY"].some(e=>null==this.layer[e]),p=l?await Object(F["e"])(this.wfsCapabilities,n,o,{spatialReference:i,customParameters:r,signal:null==e?void 0:e.signal}):{...Object(F["f"])(s),geometryType:c,name:n,namespaceUri:o,spatialReference:i,swapXY:u},d=Object(a["t"])(Object(F["b"])(this.wfsCapabilities.readFeatureTypes(),p.name,p.namespaceUri)),y=b["a"].toJSON(p.geometryType);return{customParameters:r,featureType:d,fields:p.fields.map(e=>e.toJSON()),geometryField:p.geometryField,geometryType:y,getFeatureUrl:this.wfsCapabilities.operations.GetFeature.url,getFeatureOutputFormat:this.wfsCapabilities.operations.GetFeature.outputFormat,objectIdField:p.objectIdField,spatialReference:p.spatialReference.toJSON(),swapXY:p.swapXY}}async _startWorker(e){const[t,r]=await Object(j["j"])([this._createLoadOptions(e),Object(w["b"])("WFSSourceWorker",{...e,strategy:Object(p["a"])("feature-layers-workers")?"dedicated":"local"})]),n=t.error||r.error||null,o=r.value||null;if(n)throw o&&o.close(),n;const i=t.value;this._connection=r.value;const{extent:a}=await this._connection.invoke("load",i,e);this.sourceJSON={extent:a,fields:i.fields,geometryType:i.geometryType,objectIdField:i.objectIdField,geometryField:i.geometryField,drawingInfo:Object(v["d"])(i.geometryType),name:i.featureType.title,wfsInfo:{name:i.featureType.name,featureUrl:i.getFeatureUrl,maxFeatures:3e3,swapXY:i.swapXY,supportedSpatialReferences:i.featureType.supportedSpatialReferences,version:"2.0.0",wfsNamespace:i.featureType.namespaceUri}}}};Object(n["a"])([Object(l["b"])()],x.prototype,"capabilities",void 0),Object(n["a"])([Object(l["b"])({constructOnly:!0})],x.prototype,"layer",void 0),Object(n["a"])([Object(l["b"])()],x.prototype,"sourceJSON",void 0),Object(n["a"])([Object(l["b"])()],x.prototype,"type",void 0),Object(n["a"])([Object(l["b"])()],x.prototype,"wfsCapabilities",void 0),x=Object(n["a"])([Object(y["a"])("esri.layers.graphics.sources.WFSSource")],x);const P=x;var C,R=r("997b"),I=r("8b28"),N=r("662d"),E=r("b911"),k=r("d9fd"),G=r("0db5"),U=r("8e17"),q=r("5a62"),D=r("601a"),A=r("22f4"),M=r("05b7"),L=r("a1f3"),J=r("2feb"),_=r("c1da"),W=r("c246"),$=r("10eb"),X=r("69dd"),Q=r("f51b"),V=r("5996");const Y=Object(J["a"])();let z=C=class extends(Object(k["a"])(Object(I["a"])(Object(N["a"])(Object(R["a"])(Object(D["a"])(Object(U["a"])(Object(q["a"])(Object(E["a"])(Object(G["a"])(Object(s["a"])(m["a"]))))))))))){constructor(e){super(e),this.capabilities=null,this.copyright=null,this.customParameters=null,this.definitionExpression=null,this.displayField=null,this.elevationInfo=null,this.featureReduction=null,this.featureUrl=void 0,this.fields=null,this.fieldsIndex=null,this.fullExtent=null,this.geometryType=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="WFS",this.maxFeatures=3e3,this.mode=0,this.name=null,this.namespaceUri=null,this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.source=new P({layer:this}),this.spatialReference=V["a"].WGS84,this.spatialReferences=[4326],this.swapXY=void 0,this.title="WFS",this.type="wfs",this.url=null,this.version=void 0}static fromWFSLayerInfo(e){const{customParameters:t,fields:r,geometryField:n,geometryType:o,name:i,namespaceUri:a,objectIdField:s,spatialReference:c,swapXY:u,url:l,wfsCapabilities:p}=e;return new C({customParameters:t,fields:r,geometryField:n,geometryType:o,name:i,namespaceUri:a,objectIdField:s,spatialReference:c,swapXY:u,url:l,wfsCapabilities:p})}destroy(){var e;null==(e=this.source)||e.destroy()}load(e){return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["WFS"]},e).then(()=>this.source.load(e)).then(()=>{this.read(this.source.sourceJSON,{origin:"service",url:this.parsedUrl}),this.revert(["objectIdField","fields","timeInfo","spatialReference","name","namespaceUri"],"service"),Object(_["k"])(this.renderer,this.fieldsIndex),Object(_["l"])(this.timeInfo,this.fieldsIndex)})),Promise.resolve(this)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("capabilities"),(this._get("createQueryVersion")||0)+1}get defaultPopupTemplate(){return this.createPopupTemplate()}writeFields(e,t,r){const n=e.filter(e=>e.name!==F["a"]);this.geometryField&&n.unshift(new L["a"]({name:this.geometryField,alias:this.geometryField,type:"geometry"})),Object(c["c"])(r,n.map(e=>e.toJSON()),t)}get parsedUrl(){return this.url?Object(u["M"])(this.url):null}set renderer(e){Object(_["k"])(e,this.fieldsIndex),this._set("renderer",e)}createPopupTemplate(e){return Object(Q["a"])(this,e)}createQuery(){const e=new X["a"];e.returnGeometry=!0,e.outFields=["*"],e.where=this.definitionExpression||"1=1";const{timeOffset:t,timeExtent:r}=this;return e.timeExtent=null!=t&&null!=r?r.offset(-t.value,t.unit):r||null,e}getFieldDomain(e,t){var r;return null==(r=this.getField(e))?void 0:r.domain}getField(e){return this.fieldsIndex.get(e)}queryFeatures(e,t){return this.load().then(()=>this.source.queryFeatures(X["a"].from(e)||this.createQuery(),t)).then(e=>{if(null!=e&&e.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e})}queryObjectIds(e,t){return this.load().then(()=>this.source.queryObjectIds(X["a"].from(e)||this.createQuery(),t))}queryFeatureCount(e,t){return this.load().then(()=>this.source.queryFeatureCount(X["a"].from(e)||this.createQuery(),t))}queryExtent(e,t){return this.load().then(()=>this.source.queryExtent(X["a"].from(e)||this.createQuery(),t))}async hasDataChanged(){try{const{dataChanged:e,updates:t}=await this.source.refresh(this.customParameters);return Object(a["k"])(t)&&this.read(t,{origin:"service",url:this.parsedUrl,ignoreDefaults:!0}),e}catch{}return!1}};Object(n["a"])([Object(l["b"])({readOnly:!0,aliasOf:"source.capabilities"})],z.prototype,"capabilities",void 0),Object(n["a"])([Object(l["b"])({type:String})],z.prototype,"copyright",void 0),Object(n["a"])([Object(l["b"])({readOnly:!0})],z.prototype,"createQueryVersion",null),Object(n["a"])([Object(l["b"])({json:{name:"wfsInfo.customParameters",write:{ignoreOrigin:!0}}})],z.prototype,"customParameters",void 0),Object(n["a"])([Object(l["b"])({readOnly:!0})],z.prototype,"defaultPopupTemplate",null),Object(n["a"])([Object(l["b"])({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],z.prototype,"definitionExpression",void 0),Object(n["a"])([Object(l["b"])({type:String})],z.prototype,"displayField",void 0),Object(n["a"])([Object(l["b"])(A["b"])],z.prototype,"elevationInfo",void 0),Object(n["a"])([Object(l["b"])(M["a"])],z.prototype,"featureReduction",void 0),Object(n["a"])([Object(l["b"])({type:String,readOnly:!0,json:{name:"wfsInfo.featureUrl",write:{ignoreOrigin:!0,isRequired:!0}}})],z.prototype,"featureUrl",void 0),Object(n["a"])([Object(l["b"])({type:[L["a"]],json:{name:"layerDefinition.fields",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"fields"}}}})],z.prototype,"fields",void 0),Object(n["a"])([Object(f["a"])("fields")],z.prototype,"writeFields",null),Object(n["a"])([Object(l["b"])(Y.fieldsIndex)],z.prototype,"fieldsIndex",void 0),Object(n["a"])([Object(l["b"])({type:T["a"],json:{name:"extent"}})],z.prototype,"fullExtent",void 0),Object(n["a"])([Object(l["b"])()],z.prototype,"geometryField",void 0),Object(n["a"])([Object(l["b"])({type:String,json:{read:{source:"layerDefinition.geometryType",reader:b["a"].read},write:{target:"layerDefinition.geometryType",writer:b["a"].write,ignoreOrigin:!0},origins:{service:{read:b["a"].read}}}})],z.prototype,"geometryType",void 0),Object(n["a"])([Object(l["b"])({type:String})],z.prototype,"id",void 0),Object(n["a"])([Object(l["b"])(A["d"])],z.prototype,"labelsVisible",void 0),Object(n["a"])([Object(l["b"])({type:[W["a"]],json:{name:"layerDefinition.drawingInfo.labelingInfo",read:{reader:$["a"]},write:!0}})],z.prototype,"labelingInfo",void 0),Object(n["a"])([Object(l["b"])(A["e"])],z.prototype,"legendEnabled",void 0),Object(n["a"])([Object(l["b"])({type:["show","hide"]})],z.prototype,"listMode",void 0),Object(n["a"])([Object(l["b"])({type:String})],z.prototype,"objectIdField",void 0),Object(n["a"])([Object(l["b"])({type:["WFS"]})],z.prototype,"operationalLayerType",void 0),Object(n["a"])([Object(l["b"])({type:d["a"],json:{name:"wfsInfo.maxFeatures",write:{ignoreOrigin:!0,isRequired:!0}}})],z.prototype,"maxFeatures",void 0),Object(n["a"])([Object(l["b"])({type:[0],readOnly:!0,json:{origins:{"web-map":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],z.prototype,"mode",void 0),Object(n["a"])([Object(l["b"])({type:String,json:{name:"wfsInfo.name",write:{ignoreOrigin:!0,isRequired:!0}}})],z.prototype,"name",void 0),Object(n["a"])([Object(l["b"])({type:String,json:{name:"wfsInfo.wfsNamespace",write:{ignoreOrigin:!0,isRequired:!0}}})],z.prototype,"namespaceUri",void 0),Object(n["a"])([Object(l["b"])(A["i"])],z.prototype,"opacity",void 0),Object(n["a"])([Object(l["b"])(Y.outFields)],z.prototype,"outFields",void 0),Object(n["a"])([Object(l["b"])({readOnly:!0})],z.prototype,"parsedUrl",null),Object(n["a"])([Object(l["b"])(A["j"])],z.prototype,"popupEnabled",void 0),Object(n["a"])([Object(l["b"])({type:o["a"],json:{name:"popupInfo",write:!0}})],z.prototype,"popupTemplate",void 0),Object(n["a"])([Object(l["b"])({types:i["a"],json:{origins:{service:{name:"drawingInfo.renderer"},"web-scene":{types:i["b"],name:"layerDefinition.drawingInfo.renderer",write:!0}},name:"layerDefinition.drawingInfo.renderer",write:{ignoreOrigin:!0}}})],z.prototype,"renderer",null),Object(n["a"])([Object(l["b"])(A["m"])],z.prototype,"screenSizePerspectiveEnabled",void 0),Object(n["a"])([Object(l["b"])({readOnly:!0})],z.prototype,"source",void 0),Object(n["a"])([Object(l["b"])({type:V["a"],json:{name:"layerDefinition.spatialReference",write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"extent.spatialReference"}}}})],z.prototype,"spatialReference",void 0),Object(n["a"])([Object(l["b"])({readOnly:!0,type:[d["a"]],json:{name:"wfsInfo.supportedSpatialReferences",write:{ignoreOrigin:!0,isRequired:!0}}})],z.prototype,"spatialReferences",void 0),Object(n["a"])([Object(l["b"])({type:Boolean,value:!1,json:{name:"wfsInfo.swapXY",write:{ignoreOrigin:!0,isRequired:!0}}})],z.prototype,"swapXY",void 0),Object(n["a"])([Object(l["b"])({json:{write:{ignoreOrigin:!0,isRequired:!0},origins:{service:{name:"name"}}}})],z.prototype,"title",void 0),Object(n["a"])([Object(l["b"])({json:{read:!1},readOnly:!0})],z.prototype,"type",void 0),Object(n["a"])([Object(l["b"])(A["n"])],z.prototype,"url",void 0),Object(n["a"])([Object(l["b"])({type:String,readOnly:!0,json:{name:"wfsInfo.version",write:{ignoreOrigin:!0,isRequired:!0}}})],z.prototype,"version",void 0),Object(n["a"])([Object(l["b"])({aliasOf:"source.wfsCapabilities"})],z.prototype,"wfsCapabilities",void 0),z=C=Object(n["a"])([Object(y["a"])("esri.layers.WFSLayer")],z);const B=z}}]); //# sourceMappingURL=chunk-41b20229.c14e92c4.js.map