123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- import {
- i
- } from "./chunk-F6A2QQ26.js";
- import {
- r
- } from "./chunk-7ZIDBK7B.js";
- import {
- s
- } from "./chunk-PDKDCAAD.js";
- import {
- o
- } from "./chunk-ECW2QABR.js";
- import {
- d,
- e,
- l3 as l,
- n2 as n
- } from "./chunk-Y3WMVFTW.js";
- import {
- S
- } from "./chunk-IHXECKQQ.js";
- import {
- m
- } from "./chunk-IKP3YN53.js";
- // node_modules/@arcgis/core/layers/support/CodedValue.js
- var t;
- var p = t = class extends l {
- constructor(r2) {
- super(r2), this.name = null, this.code = null;
- }
- clone() {
- return new t({ name: this.name, code: this.code });
- }
- };
- e([d({ type: String, json: { write: true } })], p.prototype, "name", void 0), e([d({ type: [String, Number], json: { write: true } })], p.prototype, "code", void 0), p = t = e([n("esri.layers.support.CodedValue")], p);
- // node_modules/@arcgis/core/layers/support/Domain.js
- var c = new s({ inherited: "inherited", codedValue: "coded-value", range: "range" });
- var a = class extends l {
- constructor(r2) {
- super(r2), this.name = null, this.type = null;
- }
- };
- e([d({ type: String, json: { write: true } })], a.prototype, "name", void 0), e([r(c)], a.prototype, "type", void 0), a = e([n("esri.layers.support.Domain")], a);
- var i2 = a;
- // node_modules/@arcgis/core/layers/support/CodedValueDomain.js
- var d2;
- var p2 = d2 = class extends i2 {
- constructor(e2) {
- super(e2), this.codedValues = null, this.type = "coded-value";
- }
- getName(e2) {
- let o2 = null;
- if (this.codedValues) {
- const r2 = String(e2);
- this.codedValues.some((e3) => (String(e3.code) === r2 && (o2 = e3.name), !!o2));
- }
- return o2;
- }
- clone() {
- return new d2({ codedValues: m(this.codedValues), name: this.name });
- }
- };
- e([d({ type: [p], json: { write: true } })], p2.prototype, "codedValues", void 0), e([r({ codedValue: "coded-value" })], p2.prototype, "type", void 0), p2 = d2 = e([n("esri.layers.support.CodedValueDomain")], p2);
- var u = p2;
- // node_modules/@arcgis/core/layers/support/InheritedDomain.js
- var t2;
- var p3 = t2 = class extends i2 {
- constructor(r2) {
- super(r2), this.type = "inherited";
- }
- clone() {
- return new t2();
- }
- };
- e([r({ inherited: "inherited" })], p3.prototype, "type", void 0), p3 = t2 = e([n("esri.layers.support.InheritedDomain")], p3);
- var c2 = p3;
- // node_modules/@arcgis/core/layers/support/RangeDomain.js
- var s2;
- var n2 = s2 = class extends i2 {
- constructor(e2) {
- super(e2), this.maxValue = null, this.minValue = null, this.type = "range";
- }
- clone() {
- return new s2({ maxValue: this.maxValue, minValue: this.minValue, name: this.name });
- }
- };
- e([d({ type: Number, json: { type: [Number], read: { source: "range", reader: (e2, r2) => r2.range && r2.range[1] }, write: { enabled: false, overridePolicy() {
- return { enabled: this.maxValue != null && this.minValue == null };
- }, target: "range", writer(e2, r2, a2) {
- r2[a2] = [this.minValue || 0, e2];
- } } } })], n2.prototype, "maxValue", void 0), e([d({ type: Number, json: { type: [Number], read: { source: "range", reader: (e2, r2) => r2.range && r2.range[0] }, write: { target: "range", writer(e2, r2, a2) {
- r2[a2] = [e2, this.maxValue || 0];
- } } } })], n2.prototype, "minValue", void 0), e([r({ range: "range" })], n2.prototype, "type", void 0), n2 = s2 = e([n("esri.layers.support.RangeDomain")], n2);
- var i3 = n2;
- // node_modules/@arcgis/core/layers/support/domains.js
- var n3 = { key: "type", base: i2, typeMap: { range: i3, "coded-value": u, inherited: c2 } };
- function t3(o2) {
- if (!o2 || !o2.type)
- return null;
- switch (o2.type) {
- case "range":
- return i3.fromJSON(o2);
- case "codedValue":
- return u.fromJSON(o2);
- case "inherited":
- return c2.fromJSON(o2);
- }
- return null;
- }
- // node_modules/@arcgis/core/layers/support/Field.js
- var u2;
- var c3 = new s({ binary: "binary", coordinate: "coordinate", countOrAmount: "count-or-amount", dateAndTime: "date-and-time", description: "description", locationOrPlaceName: "location-or-place-name", measurement: "measurement", nameOrTitle: "name-or-title", none: "none", orderedOrRanked: "ordered-or-ranked", percentageOrRatio: "percentage-or-ratio", typeOrCategory: "type-or-category", uniqueIdentifier: "unique-identifier" });
- var m2 = u2 = class extends l {
- constructor(e2) {
- super(e2), this.alias = null, this.defaultValue = void 0, this.description = null, this.domain = null, this.editable = true, this.length = -1, this.name = null, this.nullable = true, this.type = null, this.valueType = null;
- }
- readDescription(e2, { description: t4 }) {
- let o2;
- try {
- o2 = JSON.parse(t4);
- } catch (r2) {
- }
- return o2 ? o2.value : null;
- }
- readValueType(e2, { description: t4 }) {
- let o2;
- try {
- o2 = JSON.parse(t4);
- } catch (r2) {
- }
- return o2 ? c3.fromJSON(o2.fieldValueType) : null;
- }
- clone() {
- return new u2({ alias: this.alias, defaultValue: this.defaultValue, description: this.description, domain: this.domain && this.domain.clone() || null, editable: this.editable, length: this.length, name: this.name, nullable: this.nullable, type: this.type, valueType: this.valueType });
- }
- };
- e([d({ type: String, json: { write: true } })], m2.prototype, "alias", void 0), e([d({ type: [String, Number], json: { write: { allowNull: true } } })], m2.prototype, "defaultValue", void 0), e([d()], m2.prototype, "description", void 0), e([o("description")], m2.prototype, "readDescription", null), e([d({ types: n3, json: { read: { reader: t3 }, write: true } })], m2.prototype, "domain", void 0), e([d({ type: Boolean, json: { write: true } })], m2.prototype, "editable", void 0), e([d({ type: S, json: { write: true } })], m2.prototype, "length", void 0), e([d({ type: String, json: { write: true } })], m2.prototype, "name", void 0), e([d({ type: Boolean, json: { write: true } })], m2.prototype, "nullable", void 0), e([r(i)], m2.prototype, "type", void 0), e([d()], m2.prototype, "valueType", void 0), e([o("valueType", ["description"])], m2.prototype, "readValueType", null), m2 = u2 = e([n("esri.layers.support.Field")], m2);
- var y = m2;
- export {
- n3 as n,
- t3 as t,
- y
- };
- //# sourceMappingURL=chunk-BJHM4JNS.js.map
|