123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137 |
- import {
- T
- } from "./chunk-67RFR4NT.js";
- import {
- a,
- c as c2
- } from "./chunk-4HL6BBWO.js";
- import {
- f as f2
- } from "./chunk-3WXSWAUV.js";
- import {
- E,
- S
- } from "./chunk-EQNT4A7P.js";
- import {
- b,
- c as c3,
- d,
- p,
- w
- } from "./chunk-HKJ7X3BD.js";
- import {
- c
- } from "./chunk-4ONPMX2F.js";
- import {
- j as j2
- } from "./chunk-LU5IJZB4.js";
- import {
- j
- } from "./chunk-VEGAOVMY.js";
- import {
- f
- } from "./chunk-V6P2MAQQ.js";
- import {
- s3 as s
- } from "./chunk-E5O6P5I2.js";
- import {
- r
- } from "./chunk-YXWMMD76.js";
- // node_modules/@arcgis/core/symbols/cim/ExpandedCIM.js
- var s2 = { marker: E.MARKER, fill: E.FILL, line: E.LINE, text: E.TEXT };
- var l = class {
- constructor(e, l3, n2, r2) {
- const c4 = { minScale: l3 == null ? void 0 : l3.minScale, maxScale: l3 == null ? void 0 : l3.maxScale }, m = i(c4);
- this.layers = e, this.data = l3, this.hash = this._createHash() + m, this.rendererKey = n2;
- const o = { isOutline: false, placement: null, symbologyType: S.DEFAULT, vvFlags: n2 };
- for (const t of e) {
- const e2 = s2[t.type];
- o.isOutline = "line" === t.type && t.isOutline, t.materialKey = f2(e2, o), t.maxVVSize = r2, t.scaleInfo = c4, t.templateHash += m;
- }
- }
- get type() {
- return "expanded-cim";
- }
- _createHash() {
- let e = "";
- for (const t of this.layers)
- e += t.templateHash;
- return e;
- }
- };
- function i(e) {
- return e.minScale || e.maxScale ? e.minScale + "-" + e.maxScale : "";
- }
- // node_modules/@arcgis/core/views/2d/layers/support/webStyleUtils.js
- async function u(t, r2, o) {
- if (!t.name)
- throw new s("style-symbol-reference-name-missing", "Missing name in style symbol reference");
- if (t.styleName && "Esri2DPointSymbolsStyle" === t.styleName)
- return p2(t, o);
- try {
- return b2(await c3(t, r2, o), t.name, r2, o);
- } catch (s3) {
- return f(s3), null;
- }
- }
- async function p2(t, r2) {
- const e = w.replace(/\{SymbolName\}/gi, t.name);
- try {
- const t2 = await b(e, r2);
- return p(t2.data);
- } catch (o) {
- return f(o), null;
- }
- }
- async function b2(a2, i3, u2, p3) {
- const b3 = a2.data, d2 = { portal: u2 && r(u2.portal) ? u2.portal : j2.getDefault(), url: j(a2.baseUrl), origin: "portal-item" }, j3 = b3.items.find((t) => t.name === i3);
- if (!j3) {
- throw new s("symbolstyleutils:symbol-name-not-found", `The symbol name '${i3}' could not be found`, { symbolName: i3 });
- }
- let h = c(d(j3, "cimRef"), d2);
- c2() && (h = a(h));
- try {
- const t = await b(h, p3);
- return p(t.data);
- } catch (w2) {
- return f(w2), null;
- }
- }
- // node_modules/@arcgis/core/views/2d/layers/support/cimSymbolUtils.js
- var l2 = async (a2, r2, l3) => new l(await T(a2.data, r2, l3), a2.data, a2.rendererKey, a2.maxVVSize);
- var n = async (e, t, r2, n2) => {
- if (!e)
- return null;
- if ("cim" === e.type)
- return l2(e, t, r2);
- if ("web-style" === e.type) {
- const i3 = { type: "cim", data: await u(e, null, n2), rendererKey: e.rendererKey, maxVVSize: e.maxVVSize };
- return l2(i3, t, r2);
- }
- return e;
- };
- function i2(e) {
- if (!e)
- return null;
- const { type: t, cim: a2, url: r2, materialHash: l3 } = e, n2 = { cim: a2, type: t, mosaicHash: l3, url: r2, size: null, dashTemplate: null, path: null, text: null, fontName: null, animatedSymbolProperties: null };
- switch (t) {
- case "marker":
- n2.size = e.size, n2.path = e.path, n2.animatedSymbolProperties = e.animatedSymbolProperties;
- break;
- case "line":
- n2.dashTemplate = e.dashTemplate;
- break;
- case "text":
- n2.text = e.text, n2.fontName = e.fontName;
- }
- return n2;
- }
- export {
- n,
- i2 as i
- };
- //# sourceMappingURL=chunk-6LE4RPMZ.js.map
|