chunk-6EU7GFUT.js 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. import {
  2. p
  3. } from "./chunk-HZJYXMI6.js";
  4. import {
  5. v
  6. } from "./chunk-GRBROWI6.js";
  7. import {
  8. a,
  9. e as e2,
  10. i,
  11. t
  12. } from "./chunk-5NKYXKIA.js";
  13. import {
  14. o as o2
  15. } from "./chunk-WEMIK25H.js";
  16. import {
  17. s as s4
  18. } from "./chunk-PDKDCAAD.js";
  19. import {
  20. o
  21. } from "./chunk-ECW2QABR.js";
  22. import {
  23. s as s3
  24. } from "./chunk-GCDJLKH4.js";
  25. import {
  26. r
  27. } from "./chunk-MRJEICT6.js";
  28. import {
  29. d,
  30. e,
  31. l3 as l,
  32. n2 as n
  33. } from "./chunk-Y3WMVFTW.js";
  34. import {
  35. u
  36. } from "./chunk-IHXECKQQ.js";
  37. import {
  38. s,
  39. s3 as s2
  40. } from "./chunk-EMJ4ZSM2.js";
  41. // node_modules/@arcgis/core/renderers/visualVariables/support/SizeStop.js
  42. var p2;
  43. var i2 = p2 = class extends l {
  44. constructor(r2) {
  45. super(r2), this.label = null, this.size = null, this.value = null;
  46. }
  47. clone() {
  48. return new p2({ label: this.label, size: this.size, value: this.value });
  49. }
  50. };
  51. e([d({ type: String, json: { write: true } })], i2.prototype, "label", void 0), e([d({ type: Number, cast: o2, json: { write: true } })], i2.prototype, "size", void 0), e([d({ type: Number, json: { write: true } })], i2.prototype, "value", void 0), i2 = p2 = e([n("esri.renderers.visualVariables.support.SizeStop")], i2);
  52. var l2 = i2;
  53. // node_modules/@arcgis/core/renderers/visualVariables/support/VisualVariableLegendOptions.js
  54. var t2;
  55. var p3 = t2 = class extends p {
  56. constructor() {
  57. super(...arguments), this.showLegend = null;
  58. }
  59. clone() {
  60. return new t2({ title: this.title, showLegend: this.showLegend });
  61. }
  62. };
  63. e([d({ type: Boolean, json: { write: true } })], p3.prototype, "showLegend", void 0), p3 = t2 = e([n("esri.renderers.visualVariables.support.VisualVariableLegendOptions")], p3);
  64. var i3 = p3;
  65. // node_modules/@arcgis/core/renderers/visualVariables/VisualVariable.js
  66. var a2 = s.getLogger("esri.renderers.visualVariables.VisualVariable");
  67. var u2 = new s4({ colorInfo: "color", transparencyInfo: "opacity", rotationInfo: "rotation", sizeInfo: "size" });
  68. var c = class extends l {
  69. constructor(e3) {
  70. super(e3), this.index = null, this.type = null, this.field = null, this.valueExpression = null, this.valueExpressionTitle = null, this.legendOptions = null;
  71. }
  72. castField(e3) {
  73. return e3 == null ? e3 : typeof e3 == "function" ? (a2.error(".field: field must be a string value"), null) : u(e3);
  74. }
  75. get arcadeRequired() {
  76. return !!this.valueExpression;
  77. }
  78. clone() {
  79. }
  80. getAttributeHash() {
  81. return `${this.type}-${this.field}-${this.valueExpression}`;
  82. }
  83. };
  84. e([d()], c.prototype, "index", void 0), e([d({ type: u2.apiValues, readOnly: true, json: { read: u2.read, write: u2.write } })], c.prototype, "type", void 0), e([d({ type: String, json: { write: true } })], c.prototype, "field", void 0), e([s3("field")], c.prototype, "castField", null), e([d({ type: String, json: { write: true } })], c.prototype, "valueExpression", void 0), e([d({ type: String, json: { write: true } })], c.prototype, "valueExpressionTitle", void 0), e([d({ readOnly: true })], c.prototype, "arcadeRequired", null), e([d({ type: i3, json: { write: true } })], c.prototype, "legendOptions", void 0), c = e([n("esri.renderers.visualVariables.VisualVariable")], c);
  85. var d2 = c;
  86. // node_modules/@arcgis/core/renderers/visualVariables/support/SizeVariableLegendOptions.js
  87. var t3;
  88. var i4 = t3 = class extends i3 {
  89. constructor() {
  90. super(...arguments), this.customValues = null;
  91. }
  92. clone() {
  93. return new t3({ title: this.title, showLegend: this.showLegend, customValues: this.customValues && this.customValues.slice(0) });
  94. }
  95. };
  96. e([d({ type: [Number], json: { write: true } })], i4.prototype, "customValues", void 0), i4 = t3 = e([n("esri.renderers.visualVariables.support.SizeVariableLegendOptions")], i4);
  97. var a3 = i4;
  98. // node_modules/@arcgis/core/renderers/visualVariables/SizeVariable.js
  99. var z;
  100. var v2 = s.getLogger("esri.renderers.visualVariables.SizeVariable");
  101. var w = new s4({ width: "width", depth: "depth", height: "height", widthAndDepth: "width-and-depth", all: "all" });
  102. var V = new s4({ unknown: "unknown", inch: "inches", foot: "feet", yard: "yards", mile: "miles", "nautical-mile": "nautical-miles", millimeter: "millimeters", centimeter: "centimeters", decimeter: "decimeters", meter: "meters", kilometer: "kilometers", "decimal-degree": "decimal-degrees" });
  103. function f(e3) {
  104. if (e3 != null)
  105. return typeof e3 == "string" || typeof e3 == "number" ? o2(e3) : e3.type === "size" ? e2(e3) ? e3 : (delete (e3 = { ...e3 }).type, new b(e3)) : void 0;
  106. }
  107. function g(e3, t4, i5) {
  108. if (typeof e3 != "object")
  109. return e3;
  110. const s5 = new b();
  111. return s5.read(e3, i5), s5;
  112. }
  113. var b = z = class extends d2 {
  114. constructor(e3) {
  115. super(e3), this.axis = null, this.legendOptions = null, this.normalizationField = null, this.scaleBy = null, this.target = null, this.type = "size", this.useSymbolValue = null, this.valueExpression = null, this.valueRepresentation = null, this.valueUnit = null;
  116. }
  117. get cache() {
  118. return { ipData: this._interpolateData(), hasExpression: !!this.valueExpression, compiledFunc: null, isScaleDriven: v.test(this.valueExpression) };
  119. }
  120. set expression(e3) {
  121. v2.warn("'expression' is deprecated since version 4.2. Use 'valueExpression' instead. The only supported expression is 'view.scale'."), e3 === "view.scale" ? (this.valueExpression = "$view.scale", this._set("expression", e3)) : this._set("expression", null);
  122. }
  123. set index(e3) {
  124. e2(this.maxSize) && (this.maxSize.index = `visualVariables[${e3}].maxSize`), e2(this.minSize) && (this.minSize.index = `visualVariables[${e3}].minSize`), this._set("index", e3);
  125. }
  126. get inputValueType() {
  127. return t(this);
  128. }
  129. set maxDataValue(e3) {
  130. e3 && this.stops && (v2.warn("cannot set maxDataValue when stops is not null."), e3 = null), this._set("maxDataValue", e3);
  131. }
  132. set maxSize(e3) {
  133. e3 && this.stops && (v2.warn("cannot set maxSize when stops is not null."), e3 = null), this._set("maxSize", e3);
  134. }
  135. castMaxSize(e3) {
  136. return f(e3);
  137. }
  138. readMaxSize(e3, t4, i5) {
  139. return g(e3, t4, i5);
  140. }
  141. set minDataValue(e3) {
  142. e3 && this.stops && (v2.warn("cannot set minDataValue when stops is not null."), e3 = null), this._set("minDataValue", e3);
  143. }
  144. set minSize(e3) {
  145. e3 && this.stops && (v2.warn("cannot set minSize when stops is not null."), e3 = null), this._set("minSize", e3);
  146. }
  147. castMinSize(e3) {
  148. return f(e3);
  149. }
  150. readMinSize(e3, t4, i5) {
  151. return g(e3, t4, i5);
  152. }
  153. get arcadeRequired() {
  154. return !!this.valueExpression || (this.minSize && typeof this.minSize == "object" && this.minSize.arcadeRequired || this.maxSize && typeof this.maxSize == "object" && this.maxSize.arcadeRequired);
  155. }
  156. set stops(e3) {
  157. this.minDataValue == null && this.maxDataValue == null && this.minSize == null && this.maxSize == null ? e3 && Array.isArray(e3) && (e3 = e3.filter((e4) => !!e4)).sort((e4, t4) => e4.value - t4.value) : e3 && (v2.warn("cannot set stops when one of minDataValue, maxDataValue, minSize or maxSize is not null."), e3 = null), this._set("stops", e3);
  158. }
  159. get transformationType() {
  160. return a(this, this.inputValueType);
  161. }
  162. readValueExpression(e3, t4) {
  163. return e3 || t4.expression && "$view.scale";
  164. }
  165. writeValueExpressionWebScene(e3, i5, s5, r2) {
  166. if (e3 === "$view.scale") {
  167. if (r2 && r2.messages) {
  168. const e4 = this.index, i6 = typeof e4 == "string" ? e4 : `visualVariables[${e4}]`;
  169. r2.messages.push(new s2("property:unsupported", this.type + "VisualVariable.valueExpression = '$view.scale' is not supported in Web Scene. Please remove this property to save the Web Scene.", { instance: this, propertyName: i6 + ".valueExpression", context: r2 }));
  170. }
  171. } else
  172. i5[s5] = e3;
  173. }
  174. readValueUnit(e3) {
  175. return e3 ? V.read(e3) : null;
  176. }
  177. clone() {
  178. return new z({ axis: this.axis, field: this.field, valueExpression: this.valueExpression, valueExpressionTitle: this.valueExpressionTitle, maxDataValue: this.maxDataValue, maxSize: e2(this.maxSize) ? this.maxSize.clone() : this.maxSize, minDataValue: this.minDataValue, minSize: e2(this.minSize) ? this.minSize.clone() : this.minSize, normalizationField: this.normalizationField, stops: this.stops && this.stops.map((e3) => e3.clone()), target: this.target, useSymbolValue: this.useSymbolValue, valueRepresentation: this.valueRepresentation, valueUnit: this.valueUnit, legendOptions: this.legendOptions && this.legendOptions.clone() });
  179. }
  180. flipSizes() {
  181. if (this.transformationType === i.ClampedLinear) {
  182. const { minSize: e3, maxSize: t4 } = this;
  183. return this.minSize = t4, this.maxSize = e3, this;
  184. }
  185. if (this.transformationType === i.Stops) {
  186. const e3 = this.stops, t4 = e3.map((e4) => e4.size).reverse(), i5 = e3.length;
  187. for (let s5 = 0; s5 < i5; s5++)
  188. e3[s5].size = t4[s5];
  189. return this;
  190. }
  191. return this;
  192. }
  193. getAttributeHash() {
  194. return `${super.getAttributeHash()}-${this.target}-${this.normalizationField}`;
  195. }
  196. _interpolateData() {
  197. return this.stops && this.stops.map((e3) => e3.value || 0);
  198. }
  199. };
  200. e([d({ readOnly: true })], b.prototype, "cache", null), e([d({ type: w.apiValues, json: { type: w.jsonValues, origins: { "web-map": { read: false } }, read: w.read, write: w.write } })], b.prototype, "axis", void 0), e([d({ type: String, value: null, json: { read: false } })], b.prototype, "expression", null), e([d()], b.prototype, "index", null), e([d({ type: String, readOnly: true })], b.prototype, "inputValueType", null), e([d({ type: a3, json: { write: true } })], b.prototype, "legendOptions", void 0), e([d({ type: Number, value: null, json: { write: true } })], b.prototype, "maxDataValue", null), e([d({ type: Number, value: null, json: { write: true } })], b.prototype, "maxSize", null), e([s3("maxSize")], b.prototype, "castMaxSize", null), e([o("maxSize")], b.prototype, "readMaxSize", null), e([d({ type: Number, value: null, json: { write: true } })], b.prototype, "minDataValue", null), e([d({ type: Number, value: null, json: { write: true } })], b.prototype, "minSize", null), e([s3("minSize")], b.prototype, "castMinSize", null), e([o("minSize")], b.prototype, "readMinSize", null), e([d({ type: String, json: { write: true } })], b.prototype, "normalizationField", void 0), e([d({ readOnly: true })], b.prototype, "arcadeRequired", null), e([d({ type: String })], b.prototype, "scaleBy", void 0), e([d({ type: [l2], value: null, json: { write: true } })], b.prototype, "stops", null), e([d({ type: ["outline"], json: { write: true } })], b.prototype, "target", void 0), e([d({ type: String, readOnly: true })], b.prototype, "transformationType", null), e([d({ type: ["size"], json: { type: ["sizeInfo"] } })], b.prototype, "type", void 0), e([d({ type: Boolean, json: { write: true, origins: { "web-map": { read: false } } } })], b.prototype, "useSymbolValue", void 0), e([d({ type: String, json: { write: true } })], b.prototype, "valueExpression", void 0), e([o("valueExpression", ["valueExpression", "expression"])], b.prototype, "readValueExpression", null), e([r("web-scene", "valueExpression")], b.prototype, "writeValueExpressionWebScene", null), e([d({ type: ["radius", "diameter", "area", "width", "distance"], json: { write: true } })], b.prototype, "valueRepresentation", void 0), e([d({ type: V.apiValues, json: { write: V.write, origins: { "web-map": { read: false }, "web-scene": { write: true } } } })], b.prototype, "valueUnit", void 0), e([o("valueUnit")], b.prototype, "readValueUnit", null), b = z = e([n("esri.renderers.visualVariables.SizeVariable")], b);
  201. var j = b;
  202. export {
  203. d2 as d,
  204. l2 as l,
  205. j
  206. };
  207. //# sourceMappingURL=chunk-6EU7GFUT.js.map