import { a, c } from "./chunk-ILP23N26.js"; import { p as p2 } from "./chunk-27P5ZSC7.js"; import { U, c as c2, d, j as j2, p as p3 } from "./chunk-UPD4MTCL.js"; import { c as c3, l2 as l, p2 as p } from "./chunk-EN7YGJWG.js"; import { i } from "./chunk-65BYCSII.js"; import { B } from "./chunk-4NKD334K.js"; import { Ot, j } from "./chunk-VBRY5KJM.js"; import { s3 as s } from "./chunk-EMJ4ZSM2.js"; import { r } from "./chunk-GZT4BVFP.js"; // node_modules/@arcgis/core/symbols/support/webStyleSymbolUtils.js function j3(t, e, r2, l2) { return t.name ? t.styleName && t.styleName === "Esri2DPointSymbolsStyle" ? d2(t, e, l2) : c2(t, e, l2).then((o) => h(o, t.name, e, r2, l2)) : Promise.reject(new s("symbolstyleutils:style-symbol-reference-name-missing", "Missing name in style symbol reference")); } function h(f, b, j4, h2, d3) { const U2 = f.data, N = j4 && r(j4.portal) ? j4.portal : B.getDefault(), w = { portal: N, url: j(f.baseUrl), origin: "portal-item" }, D = U2.items.find((t) => t.name === b); if (!D) { const t = `The symbol name '${b}' could not be found`; return Promise.reject(new s("symbolstyleutils:symbol-name-not-found", t, { symbolName: b })); } let P = i(d(D, h2), w), S = D.thumbnail && D.thumbnail.href; const E = D.thumbnail && D.thumbnail.imageData; c() && (P = a(P), S = a(S)); const O = { portal: N, url: j(Ot(P)), origin: "portal-item" }; return j2(P, d3).then((e) => { const r2 = h2 === "cimRef" ? p3(e.data) : e.data, o = p2(r2, O); if (o && c3(o)) { if (S) { const t = i(S, w); o.thumbnail = new p({ url: t }); } else E && (o.thumbnail = new p({ url: `data:image/png;base64,${E}` })); f.styleUrl ? o.styleOrigin = new l({ portal: j4.portal, styleUrl: f.styleUrl, name: b }) : f.styleName && (o.styleOrigin = new l({ portal: j4.portal, styleName: f.styleName, name: b })); } return o; }); } function d2(t, e, r2) { const o = U.replace(/\{SymbolName\}/gi, t.name), i2 = r(e.portal) ? e.portal : B.getDefault(); return j2(o, r2).then((t2) => { const e2 = p3(t2.data); return p2(e2, { portal: i2, url: j(Ot(o)), origin: "portal-item" }); }); } export { j3 as j, h }; //# sourceMappingURL=chunk-LHFSJ6EZ.js.map