{"version":3,"sources":["node_modules/@arcgis/core/layers/support/layerUtils.js"],"sourcesContent":["/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.31/esri/copyright.txt for details.\n*/\nimport { id as e } from \"../../kernel.js\";\nimport t from \"../../request.js\";\nfunction n(e) {\n return f(e) || o(e);\n}\nfunction r(e) {\n return null != e && \"object\" == typeof e && \"type\" in e && \"feature\" === e.type;\n}\nfunction i(e) {\n return null != e && \"object\" == typeof e && \"type\" in e && \"graphics\" === e.type;\n}\nfunction u(e) {\n return null != e && \"object\" == typeof e && \"type\" in e && \"map-notes\" === e.type && \"sublayers\" in e;\n}\nfunction s(e) {\n return null != e && \"object\" == typeof e && \"type\" in e && \"knowledge-graph\" === e.type && \"layers\" in e;\n}\nfunction a(e) {\n return null != e && \"object\" == typeof e && \"type\" in e && \"link-chart\" === e.type && \"layers\" in e;\n}\nfunction o(e) {\n return \"scene\" === e?.type;\n}\nfunction c(e) {\n return null != e && \"object\" == typeof e && \"type\" in e && \"subtype-group\" === e.type && \"sublayers\" in e;\n}\nfunction l(e) {\n return \"subtype-sublayer\" === e?.type;\n}\nfunction f(e) {\n const t = e?.type;\n return \"imagery-tile\" === t || \"tile\" === t || \"open-street-map\" === t || \"vector-tile\" === t || \"web-tile\" === t || \"wmts\" === t;\n}\nfunction y(e) {\n const t = e?.type;\n return \"base-tile\" === t || \"tile\" === t || \"elevation\" === t || \"imagery-tile\" === t || \"base-elevation\" === t || \"open-street-map\" === t || \"wcs\" === t || \"web-tile\" === t || \"wmts\" === t || \"vector-tile\" === t;\n}\nfunction p(e) {\n return null != e && \"type\" in e && \"group\" === e.type;\n}\nconst g = {\n Point: \"SceneLayer\",\n \"3DObject\": \"SceneLayer\",\n IntegratedMesh: \"IntegratedMeshLayer\",\n PointCloud: \"PointCloudLayer\",\n Building: \"BuildingSceneLayer\"\n};\nfunction b(e) {\n const t = e?.type;\n return \"building-scene\" === t || \"integrated-mesh\" === t || \"point-cloud\" === t || \"scene\" === t;\n}\nfunction d(e) {\n return \"IntegratedMeshLayer\" === e || \"IntegratedMesh3DTilesLayer\" === e;\n}\nfunction m(e) {\n return \"integrated-mesh\" === e || \"integrated-mesh-3dtiles\" === e;\n}\nfunction h(e) {\n return \"voxel\" === e?.type;\n}\nfunction v(e) {\n return \"imagery-tile\" === e?.type;\n}\nfunction j(e) {\n return null != e?.parent && \"declaredClass\" in e.parent && \"esri.Basemap\" === e.parent.declaredClass && e.parent.baseLayers.includes(e);\n}\nfunction w(e) {\n return \"feature\" === e?.type && !e.url && \"memory\" === e.source?.type;\n}\nfunction L(e) {\n const t = e?.type;\n return (\"feature\" === t || \"subtype-group\" === t || \"oriented-imagery\" === t) && \"feature-layer\" === e.source?.type;\n}\nfunction E(e) {\n return \"feature\" === e?.type && \"feature-layer\" === e.source?.type;\n}\nfunction S(e) {\n const t = /[:;]/,\n n = [];\n let r = !1;\n if (e && (e.forEach((e, i) => {\n n.push([i, e]), !r && t.test(e) && (r = !0);\n }), n.length > 0)) {\n let e;\n if (r) {\n const t = {};\n n.forEach(e => {\n t[e[0]] = e[1];\n }), e = JSON.stringify(t);\n } else {\n const t = [];\n n.forEach(e => {\n t.push(e[0] + \":\" + e[1]);\n }), e = t.join(\";\");\n }\n return e;\n }\n return null;\n}\nfunction C(e) {\n if (!e) return;\n const t = [];\n return e.forEach((e, n) => {\n t.push('\"' + n + '\":' + JSON.stringify(e));\n }), t.length ? \"{\" + t.join(\",\") + \"}\" : void 0;\n}\nfunction M(e) {\n if (e.activeLayer) {\n const t = e.activeLayer.tileMatrixSet;\n if (t) return t;\n const n = e.activeLayer.tileMatrixSets;\n if (n) return n;\n }\n return null;\n}\nasync function x(n, r) {\n const i = e?.findServerInfo(n);\n if (null != i?.currentVersion) return i.owningSystemUrl || null;\n const u = n.toLowerCase().indexOf(\"/rest/services\");\n if (-1 === u) return null;\n const s = `${n.slice(0, u)}/rest/info`,\n a = null != r ? r.signal : null,\n {\n data: o\n } = await t(s, {\n query: {\n f: \"json\"\n },\n responseType: \"json\",\n signal: a\n });\n return o?.owningSystemUrl || null;\n}\nfunction I(e) {\n if (!(\"capabilities\" in e)) return !1;\n switch (e.type) {\n case \"catalog\":\n case \"catalog-footprint\":\n case \"csv\":\n case \"feature\":\n case \"geojson\":\n case \"imagery\":\n case \"knowledge-graph-sublayer\":\n case \"ogc-feature\":\n case \"oriented-imagery\":\n case \"scene\":\n case \"sublayer\":\n case \"subtype-group\":\n case \"subtype-sublayer\":\n case \"wfs\":\n return !0;\n default:\n return !1;\n }\n}\nfunction k(e) {\n return null != e && \"object\" == typeof e && \"isTable\" in e && !!e.isTable;\n}\nfunction O(e) {\n return I(e) ? \"effectiveCapabilities\" in e ? e.effectiveCapabilities : e.capabilities : null;\n}\nfunction T(e) {\n if (!(\"editingEnabled\" in e)) return !1;\n switch (e.type) {\n case \"csv\":\n case \"feature\":\n case \"geojson\":\n case \"oriented-imagery\":\n case \"scene\":\n case \"subtype-group\":\n case \"subtype-sublayer\":\n return !0;\n default:\n return !1;\n }\n}\nfunction B(e) {\n return !!T(e) && (\"effectiveEditingEnabled\" in e ? e.effectiveEditingEnabled : e.editingEnabled);\n}\nfunction P(e) {\n if (!e) return [];\n return (\"subtypes\" in e ? e.subtypes : c(e.parent) ? e.parent.subtypes : []) ?? [];\n}\nexport { B as getEffectiveEditingEnabled, O as getEffectiveLayerCapabilities, x as getOwningPortalUrl, P as getSubtypesFromLayer, M as getTileMaxtrixSetFromActiveLayer, j as isBaseLayer, n as isBasemap3DSupportedLayer, f as isBasemapSupportedTiledLayer, w as isFeatureCollectionLayer, r as isFeatureLayer, E as isFeatureServiceLayer, i as isGraphicsLayer, p as isGroupLayer, v as isImageryTileLayer, m as isIntegratedMeshLayer, d as isIntegratedMeshOperationalLayer, s as isKnowledgeGraphLayer, L as isLayerWithFeatureLayerSource, a as isLinkChartLayer, u as isMapNotesLayer, o as isSceneLayer, b as isSceneServiceLayer, c as isSubtypeGroupLayer, l as isSubtypeSublayer, k as isTable, y as isTiledLayer, h as isVoxelLayer, g as sceneServiceLayerTypeToClassName, S as serializeLayerDefinitions, C as serializeTimeOptions };"],"mappings":"uFASA,SAASA,EAAE,EAAG,CACZ,OAAe,GAAR,MAAyB,OAAO,GAAnB,UAAwB,SAAU,GAAmB,EAAE,OAAhB,SAC7D,CAgBA,SAASC,EAAE,EAAG,CACZ,OAAe,GAAR,MAAyB,OAAO,GAAnB,UAAwB,SAAU,GAAyB,EAAE,OAAtB,iBAA8B,cAAe,CAC1G,CACA,SAASC,EAAE,EAAG,CACZ,OAA8B,GAAG,OAA1B,kBACT,CAYA,IAAMC,EAAI,CACR,MAAO,aACP,WAAY,aACZ,eAAgB,sBAChB,WAAY,kBACZ,SAAU,oBACZ,EACA,SAASC,EAAE,EAAG,CACZ,IAAM,EAAI,GAAG,KACb,OAA4B,IAArB,kBAAgD,IAAtB,mBAA6C,IAAlB,eAAmC,IAAZ,OACrF,CAgBA,SAASC,EAAE,EAAG,CACZ,OAAqB,GAAG,OAAjB,WAAyB,CAAC,EAAE,KAAoB,EAAE,QAAQ,OAAvB,QAC5C,CACA,SAASC,EAAE,EAAG,CACZ,IAAM,EAAI,GAAG,KACb,OAAsB,IAAd,WAAuC,IAApB,iBAAgD,IAAvB,qBAAiD,EAAE,QAAQ,OAA9B,eACnF,CA2CA,SAAeC,EAAEC,EAAGC,EAAG,QAAAC,EAAA,sBACrB,IAAMC,EAAI,GAAG,eAAeH,CAAC,EAC7B,GAAYG,GAAG,gBAAX,KAA2B,OAAOA,EAAE,iBAAmB,KAC3D,IAAMC,EAAIJ,EAAE,YAAY,EAAE,QAAQ,gBAAgB,EAClD,GAAWI,IAAP,GAAU,OAAO,KACrB,IAAMC,EAAI,GAAGL,EAAE,MAAM,EAAGI,CAAC,CAAC,aACxBE,EAAYL,GAAR,KAAYA,EAAE,OAAS,KAC3B,CACE,KAAMM,CACR,EAAI,MAAMC,EAAEH,EAAG,CACb,MAAO,CACL,EAAG,MACL,EACA,aAAc,OACd,OAAQC,CACV,CAAC,EACH,OAAOC,GAAG,iBAAmB,IAC/B,GACA,SAASE,EAAE,EAAG,CACZ,GAAI,EAAE,iBAAkB,GAAI,MAAO,GACnC,OAAQ,EAAE,KAAM,CACd,IAAK,UACL,IAAK,oBACL,IAAK,MACL,IAAK,UACL,IAAK,UACL,IAAK,UACL,IAAK,2BACL,IAAK,cACL,IAAK,mBACL,IAAK,QACL,IAAK,WACL,IAAK,gBACL,IAAK,mBACL,IAAK,MACH,MAAO,GACT,QACE,MAAO,EACX,CACF,CAIA,SAASC,EAAE,EAAG,CACZ,OAAOC,EAAE,CAAC,EAAI,0BAA2B,EAAI,EAAE,sBAAwB,EAAE,aAAe,IAC1F,CACA,SAASC,EAAE,EAAG,CACZ,GAAI,EAAE,mBAAoB,GAAI,MAAO,GACrC,OAAQ,EAAE,KAAM,CACd,IAAK,MACL,IAAK,UACL,IAAK,UACL,IAAK,mBACL,IAAK,QACL,IAAK,gBACL,IAAK,mBACH,MAAO,GACT,QACE,MAAO,EACX,CACF,CACA,SAASC,EAAE,EAAG,CACZ,MAAO,CAAC,CAACD,EAAE,CAAC,IAAM,4BAA6B,EAAI,EAAE,wBAA0B,EAAE,eACnF","names":["r","c","l","g","b","w","L","x","n","r","__async","i","u","s","a","o","U","I","O","I","T","B"],"x_google_ignoreList":[0]}