import { t } from "./chunk-K3NLQPKD.js"; import { u } from "./chunk-UVVU4UUO.js"; import "./chunk-X4SA4ELJ.js"; import "./chunk-ZYRIJWLX.js"; import "./chunk-RYY6632W.js"; import "./chunk-DW42UVIT.js"; import "./chunk-TJNOJH33.js"; import "./chunk-YAEIHDJH.js"; import "./chunk-OSHI574D.js"; import { U } from "./chunk-5DMBXPN2.js"; import "./chunk-QANZ6BFY.js"; import "./chunk-VEGAOVMY.js"; import "./chunk-SQOPWYIT.js"; import "./chunk-V6P2MAQQ.js"; import "./chunk-E5O6P5I2.js"; import "./chunk-SPWQ3AWG.js"; import "./chunk-2TIUKVZN.js"; import "./chunk-YXWMMD76.js"; import "./chunk-S5KM4IGW.js"; // node_modules/@arcgis/core/symbols/support/previewWebStyleSymbol.js function n(e, i, n2) { const o = e.thumbnail && e.thumbnail.url; return o ? U(o, { responseType: "image" }).then((t2) => { const e2 = h(t2.data, n2); return n2 && n2.node ? (n2.node.appendChild(e2), n2.node) : e2; }) : e.fetchSymbol().then((t2) => t2 ? i(t2, n2) : null); } function h(t2, n2) { const h2 = !/\\.svg$/i.test(t2.src) && n2 && n2.disableUpsampling, o = Math.max(t2.width, t2.height); let r = n2 && null != n2.maxSize ? u(n2.maxSize) : t.maxSize; h2 && (r = Math.min(o, r)); const s = "number" == typeof (n2 == null ? void 0 : n2.size) ? n2 == null ? void 0 : n2.size : null, l = Math.min(r, null != s ? u(s) : o); if (l !== o) { const e = 0 !== t2.width && 0 !== t2.height ? t2.width / t2.height : 1; e >= 1 ? (t2.width = l, t2.height = l / e) : (t2.width = l * e, t2.height = l); } return t2; } export { n as previewWebStyleSymbol }; //# sourceMappingURL=previewWebStyleSymbol-FPCX5BQQ.js.map